From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 13:24:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B531D106564A; Sun, 25 Dec 2011 13:24:49 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84CA58FC08; Sun, 25 Dec 2011 13:24:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPDOnKd060723; Sun, 25 Dec 2011 13:24:49 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPDOnao060722; Sun, 25 Dec 2011 13:24:49 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112251324.pBPDOnao060722@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 25 Dec 2011 13:24:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228873 - head/tools/regression/bin/sh/parameters X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 13:24:49 -0000 Author: jilles Date: Sun Dec 25 13:24:48 2011 New Revision: 228873 URL: http://svn.freebsd.org/changeset/base/228873 Log: sh: Add some testcases for pasting $*/$@ directly to a literal. This also passes on stable/8. Added: head/tools/regression/bin/sh/parameters/positional2.0 (contents, props changed) Added: head/tools/regression/bin/sh/parameters/positional2.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/parameters/positional2.0 Sun Dec 25 13:24:48 2011 (r228873) @@ -0,0 +1,65 @@ +# $FreeBSD$ + +failures='' +ok='' + +testcase() { + code="$1" + expected="$2" + oIFS="$IFS" + eval "$code" + IFS='|' + result="$#|$*" + IFS="$oIFS" + if [ "x$result" = "x$expected" ]; then + ok=x$ok + else + failures=x$failures + echo "For $code, expected $expected actual $result" + fi +} + +testcase 'set -- a b; set -- p$@q' '2|pa|bq' +testcase 'set -- a b; set -- $@q' '2|a|bq' +testcase 'set -- a b; set -- p$@' '2|pa|b' +testcase 'set -- a b; set -- p$@q' '2|pa|bq' +testcase 'set -- a b; set -- $@q' '2|a|bq' +testcase 'set -- a b; set -- p$@' '2|pa|b' +testcase 'set -- a b; set -- p$*q' '2|pa|bq' +testcase 'set -- a b; set -- $*q' '2|a|bq' +testcase 'set -- a b; set -- p$*' '2|pa|b' +testcase 'set -- a b; set -- p$*q' '2|pa|bq' +testcase 'set -- a b; set -- $*q' '2|a|bq' +testcase 'set -- a b; set -- p$*' '2|pa|b' +testcase 'set -- a b; set -- "p$@q"' '2|pa|bq' +testcase 'set -- a b; set -- "$@q"' '2|a|bq' +testcase 'set -- a b; set -- "p$@"' '2|pa|b' +testcase 'set -- a b; set -- p"$@"q' '2|pa|bq' +testcase 'set -- a b; set -- "$@"q' '2|a|bq' +testcase 'set -- a b; set -- p"$@"' '2|pa|b' +testcase 'set -- "" a b; set -- "p$@q"' '3|p|a|bq' +testcase 'set -- "" a b; set -- "$@q"' '3||a|bq' +testcase 'set -- "" a b; set -- "p$@"' '3|p|a|b' +testcase 'set -- "" a b; set -- p"$@"q' '3|p|a|bq' +testcase 'set -- "" a b; set -- "$@"q' '3||a|bq' +testcase 'set -- "" a b; set -- p"$@"' '3|p|a|b' +testcase 'set -- a; set -- p$@q' '1|paq' +testcase 'set -- a; set -- $@q' '1|aq' +testcase 'set -- a; set -- p$@' '1|pa' +testcase 'set -- a; set -- p$@q' '1|paq' +testcase 'set -- a; set -- $@q' '1|aq' +testcase 'set -- a; set -- p$@' '1|pa' +testcase 'set -- a; set -- p$*q' '1|paq' +testcase 'set -- a; set -- $*q' '1|aq' +testcase 'set -- a; set -- p$*' '1|pa' +testcase 'set -- a; set -- p$*q' '1|paq' +testcase 'set -- a; set -- $*q' '1|aq' +testcase 'set -- a; set -- p$*' '1|pa' +testcase 'set -- a; set -- "p$@q"' '1|paq' +testcase 'set -- a; set -- "$@q"' '1|aq' +testcase 'set -- a; set -- "p$@"' '1|pa' +testcase 'set -- a; set -- p"$@"q' '1|paq' +testcase 'set -- a; set -- "$@"q' '1|aq' +testcase 'set -- a; set -- p"$@"' '1|pa' + +test "x$failures" = x From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 14:29:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DBAE1065670; Sun, 25 Dec 2011 14:29:37 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 176BA8FC0A; Sun, 25 Dec 2011 14:29:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPETa6P062698; Sun, 25 Dec 2011 14:29:36 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPETawV062695; Sun, 25 Dec 2011 14:29:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201112251429.pBPETawV062695@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 25 Dec 2011 14:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228874 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 14:29:37 -0000 Author: bz Date: Sun Dec 25 14:29:36 2011 New Revision: 228874 URL: http://svn.freebsd.org/changeset/base/228874 Log: Quite the tinderbox for the holidays. Remove the assert[1]. Suggested by: jhibbits [1] MFC after: 3 days Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_powerpc.c Sun Dec 25 13:24:48 2011 (r228873) +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Sun Dec 25 14:29:36 2011 (r228874) @@ -686,11 +686,6 @@ powerpc_intr(int cpu, struct trapframe * v = pm->pm_sc.pm_reloadcount; config = mfspr(SPR_MMCR0); - KASSERT((config & ~AMD_PMC_ENABLE) == - (pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE), - ("[powerpc,%d] config mismatch reg=0x%x pm=0x%x", __LINE__, - config, pm->pm_md.pm_amd.pm_amd_evsel)); - mtspr(SPR_MMCR0, config | SPR_MMCR0_FC); powerpc_pmcn_write(i, v); From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 16:03:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B31DB1065670; Sun, 25 Dec 2011 16:03:54 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D7298FC0C; Sun, 25 Dec 2011 16:03:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPG3sF8066136; Sun, 25 Dec 2011 16:03:54 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPG3spM066134; Sun, 25 Dec 2011 16:03:54 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201112251603.pBPG3spM066134@svn.freebsd.org> From: David Chisnall Date: Sun, 25 Dec 2011 16:03:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228875 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 16:03:54 -0000 Author: theraven Date: Sun Dec 25 16:03:54 2011 New Revision: 228875 URL: http://svn.freebsd.org/changeset/base/228875 Log: Restore __is_threaded in C++ mode. Some Google stuff needs it apparently. Reported by: swills Approved by: dim (mentor) Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Sun Dec 25 14:29:36 2011 (r228874) +++ head/include/stdio.h Sun Dec 25 16:03:54 2011 (r228875) @@ -470,6 +470,9 @@ static __inline int __sputc(int _c, FILE __swbuf((int)(c), p) : \ (*(p)->_p = (c), (int)*(p)->_p++)) #endif + +extern int __isthreaded; + #ifndef __cplusplus #define __sfeof(p) (((p)->_flags & __SEOF) != 0) @@ -477,7 +480,6 @@ static __inline int __sputc(int _c, FILE #define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) #define __sfileno(p) ((p)->_file) -extern int __isthreaded; #define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p)) #define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p)) From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 18:15:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75300106566C; Sun, 25 Dec 2011 18:15:25 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 44BA18FC0A; Sun, 25 Dec 2011 18:15:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPIFPaD070104; Sun, 25 Dec 2011 18:15:25 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPIFP6d070102; Sun, 25 Dec 2011 18:15:25 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112251815.pBPIFP6d070102@svn.freebsd.org> From: Eitan Adler Date: Sun, 25 Dec 2011 18:15:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228876 - head/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 18:15:25 -0000 Author: eadler (ports committer) Date: Sun Dec 25 18:15:24 2011 New Revision: 228876 URL: http://svn.freebsd.org/changeset/base/228876 Log: - The -h option was removed shortly after it was added - ZFS is now up to version 28 - sysinstall(8) is not supported in -CURRENT Reviewed by: pgj Approved by: jilles Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Dec 25 16:03:54 2011 (r228875) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Dec 25 18:15:24 2011 (r228876) @@ -314,9 +314,8 @@ on behalf of an NFS client. The ZFS file system - has been upgraded to version 14. Additional changes include - support for NFSv4 ACLs, a speedup of zfs send and an improved L2ARC. - New statistics for prefetch and L2ARC have been introduced. + has been upgraded to version 28. Changes include Data + Deduplication, Triple parity RAIDZ, and zfs diff. @@ -367,10 +366,6 @@ of primaries that were present in GNU find but not &os; &man.find.1;. - &man.jexec.8; now supports option to specify the - jail where the command will be executed. - &man.kgdb.1; now supports a new add-kld command to make it easier to debug crash dumps with kernel modules. @@ -549,12 +544,6 @@ The &man.freebsd-update.8; utility requires that the host being upgraded have Internet connectivity. - An older form of binary upgrade is supported through the - Upgrade option from the main &man.sysinstall.8; - menu on CDROM distribution media. This type of binary upgrade - may be useful on non-&arch.i386;, non-&arch.amd64; machines - or on systems with no Internet connectivity. - Source-based upgrades (those based on recompiling the &os; base system from source code) from previous versions are supported, according to the instructions in From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 18:15:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F418D1065790; Sun, 25 Dec 2011 18:15:31 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C2BD8FC13; Sun, 25 Dec 2011 18:15:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPIFVfx070145; Sun, 25 Dec 2011 18:15:31 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPIFVdR070143; Sun, 25 Dec 2011 18:15:31 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201112251815.pBPIFVdR070143@svn.freebsd.org> From: Eitan Adler Date: Sun, 25 Dec 2011 18:15:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228877 - head/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 18:15:33 -0000 Author: eadler (ports committer) Date: Sun Dec 25 18:15:31 2011 New Revision: 228877 URL: http://svn.freebsd.org/changeset/base/228877 Log: - Add some information about sh(1) changes. Requested by: jilles (content) Reviewed by: gjb (doc) Approved by: jilles Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Dec 25 18:15:24 2011 (r228876) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sun Dec 25 18:15:31 2011 (r228877) @@ -392,6 +392,11 @@ a flag to suppress warnings; it now also accepts multiple paths on its command line. + &man.sh.1; has many bug fixes, some new features, and will now + refuse to parse some invalid scripts. Additionally, it now + has filename completion and defaults to the "emacs" editing + mode. + The &man.split.1; utility now supports a flag to split a file into a certain number of chunks. From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 20:15:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4373A1065675; Sun, 25 Dec 2011 20:15:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2E7CD8FC15; Sun, 25 Dec 2011 20:15:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPKFg6n073961; Sun, 25 Dec 2011 20:15:42 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPKFfZ1073959; Sun, 25 Dec 2011 20:15:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112252015.pBPKFfZ1073959@svn.freebsd.org> From: Ed Schouten Date: Sun, 25 Dec 2011 20:15:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228878 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 20:15:42 -0000 Author: ed Date: Sun Dec 25 20:15:41 2011 New Revision: 228878 URL: http://svn.freebsd.org/changeset/base/228878 Log: Remove unneeded guard. There is no reason why needs an include guard. It is already protected by __bool_true_false_are_defined. Modified: head/include/stdbool.h Modified: head/include/stdbool.h ============================================================================== --- head/include/stdbool.h Sun Dec 25 18:15:31 2011 (r228877) +++ head/include/stdbool.h Sun Dec 25 20:15:41 2011 (r228878) @@ -26,9 +26,6 @@ * $FreeBSD$ */ -#ifndef _STDBOOL_H_ -#define _STDBOOL_H_ - #ifndef __bool_true_false_are_defined #define __bool_true_false_are_defined 1 @@ -44,5 +41,3 @@ typedef int _Bool; #endif /* !__cplusplus */ #endif /* __bool_true_false_are_defined */ - -#endif /* !_STDBOOL_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 20:51:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CBBA106566C; Sun, 25 Dec 2011 20:51:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 064FE8FC08; Sun, 25 Dec 2011 20:51:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPKpe9C075084; Sun, 25 Dec 2011 20:51:40 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPKpeXL075080; Sun, 25 Dec 2011 20:51:40 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112252051.pBPKpeXL075080@svn.freebsd.org> From: Ed Schouten Date: Sun, 25 Dec 2011 20:51:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228879 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 20:51:41 -0000 Author: ed Date: Sun Dec 25 20:51:40 2011 New Revision: 228879 URL: http://svn.freebsd.org/changeset/base/228879 Log: Add and . Even though these header files make little sense to me, they are part of the standard. By including these header files, you can simply use `alignas', `alignof' and `noreturn' instead of the underscore-prefixed versions. Added: head/include/stdalign.h (contents, props changed) head/include/stdnoreturn.h (contents, props changed) Modified: head/include/Makefile Modified: head/include/Makefile ============================================================================== --- head/include/Makefile Sun Dec 25 20:15:41 2011 (r228878) +++ head/include/Makefile Sun Dec 25 20:51:40 2011 (r228879) @@ -19,8 +19,8 @@ INCS= a.out.h ar.h assert.h bitstring.h printf.h proc_service.h pthread.h \ pthread_np.h pwd.h ranlib.h readpassphrase.h regex.h \ res_update.h resolv.h runetype.h search.h semaphore.h setjmp.h \ - signal.h spawn.h stab.h stdatomic.h \ - stdbool.h stddef.h stdio.h stdlib.h string.h stringlist.h \ + signal.h spawn.h stab.h stdalign.h stdatomic.h stdbool.h stddef.h \ + stdnoreturn.h stdio.h stdlib.h string.h stringlist.h \ strings.h sysexits.h tar.h termios.h tgmath.h \ time.h timeconv.h timers.h ttyent.h \ ulimit.h unistd.h utime.h utmpx.h uuid.h varargs.h vis.h \ Added: head/include/stdalign.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/include/stdalign.h Sun Dec 25 20:51:40 2011 (r228879) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2012 Ed Schouten + * 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 __alignas_is_defined +#define __alignas_is_defined 1 + +#if !defined(__cplusplus) || __cplusplus < 201103L +#include +#define alignas _Alignas +#endif + +#endif /* !__alignas_is_defined */ + +#ifndef __alignof_is_defined +#define __alignof_is_defined 1 + +#if !defined(__cplusplus) || __cplusplus < 201103L +#include +#define alignof _Alignof +#endif + +#endif /* !__alignof_is_defined */ Added: head/include/stdnoreturn.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/include/stdnoreturn.h Sun Dec 25 20:51:40 2011 (r228879) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2012 Ed Schouten + * 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 noreturn + +#if !defined(__cplusplus) || __cplusplus < 201103L +#include +#define noreturn _Noreturn +#endif + +#endif /* !noreturn */ From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 20:59:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DF4B106564A; Sun, 25 Dec 2011 20:59:40 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED9C38FC0A; Sun, 25 Dec 2011 20:59:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPKxd2O075412; Sun, 25 Dec 2011 20:59:39 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPKxdtl075410; Sun, 25 Dec 2011 20:59:39 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112252059.pBPKxdtl075410@svn.freebsd.org> From: Ed Schouten Date: Sun, 25 Dec 2011 20:59:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228880 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 20:59:40 -0000 Author: ed Date: Sun Dec 25 20:59:39 2011 New Revision: 228880 URL: http://svn.freebsd.org/changeset/base/228880 Log: Fix field name. The value field in the atomic structure is called __val; not value. Modified: head/include/stdatomic.h Modified: head/include/stdatomic.h ============================================================================== --- head/include/stdatomic.h Sun Dec 25 20:51:40 2011 (r228879) +++ head/include/stdatomic.h Sun Dec 25 20:59:39 2011 (r228880) @@ -214,7 +214,7 @@ typedef _Atomic(__uintmax_t) atomic_uin #if __has_builtin(__sync_swap) /* Clang provides a full-barrier atomic exchange - use it if available. */ #define atomic_exchange_explicit(object, desired, order) \ - __sync_swap(&(object)->value, desired) + __sync_swap(&(object)->__val, desired) #else /* * __sync_lock_test_and_set() is only an acquire barrier in theory (although in From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 21:00:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 274D5106564A; Sun, 25 Dec 2011 21:00:57 +0000 (UTC) (envelope-from luigi@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11D8D8FC1D; Sun, 25 Dec 2011 21:00:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPL0uX6075511; Sun, 25 Dec 2011 21:00:56 GMT (envelope-from luigi@svn.freebsd.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPL0uR1075509; Sun, 25 Dec 2011 21:00:56 GMT (envelope-from luigi@svn.freebsd.org) Message-Id: <201112252100.pBPL0uR1075509@svn.freebsd.org> From: Luigi Rizzo Date: Sun, 25 Dec 2011 21:00:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228881 - head/sys/dev/netmap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 21:00:57 -0000 Author: luigi Date: Sun Dec 25 21:00:56 2011 New Revision: 228881 URL: http://svn.freebsd.org/changeset/base/228881 Log: remove a variable definition which shadows the correct one. Submitted by: Eitan Adler Modified: head/sys/dev/netmap/if_igb_netmap.h Modified: head/sys/dev/netmap/if_igb_netmap.h ============================================================================== --- head/sys/dev/netmap/if_igb_netmap.h Sun Dec 25 20:59:39 2011 (r228880) +++ head/sys/dev/netmap/if_igb_netmap.h Sun Dec 25 21:00:56 2011 (r228881) @@ -168,7 +168,6 @@ igb_netmap_txsync(void *a, u_int ring_nr j = kring->nr_hwcur; /* netmap ring index */ if (j != k) { /* we have new packets to send */ u32 olinfo_status = 0; - int n = 0; l = j - kring->nkr_hwofs; /* NIC ring index */ if (l < 0) From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 21:05:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 275251065676; Sun, 25 Dec 2011 21:05:36 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EBB438FC14; Sun, 25 Dec 2011 21:05:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPL5ZcC075691; Sun, 25 Dec 2011 21:05:35 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPL5Z6N075689; Sun, 25 Dec 2011 21:05:35 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112252105.pBPL5Z6N075689@svn.freebsd.org> From: Ed Schouten Date: Sun, 25 Dec 2011 21:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228882 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 21:05:36 -0000 Author: ed Date: Sun Dec 25 21:05:35 2011 New Revision: 228882 URL: http://svn.freebsd.org/changeset/base/228882 Log: Make white space in this file a bit more consistent. Remove trailing whitespace and place all macro definitions at the same column. Modified: head/include/stdatomic.h Modified: head/include/stdatomic.h ============================================================================== --- head/include/stdatomic.h Sun Dec 25 21:00:56 2011 (r228881) +++ head/include/stdatomic.h Sun Dec 25 21:05:35 2011 (r228882) @@ -42,7 +42,7 @@ #endif #ifdef __GNUC_ATOMICS -#define _Atomic(T) struct { volatile T __val; } +#define _Atomic(T) struct { volatile T __val; } #endif /* @@ -50,11 +50,11 @@ */ #if defined(__CLANG_ATOMICS) -#define ATOMIC_VAR_INIT(value) (value) -#define atomic_init(obj, value) __atomic_init(obj, value) +#define ATOMIC_VAR_INIT(value) (value) +#define atomic_init(obj, value) __atomic_init(obj, value) #elif defined(__GNUC_ATOMICS) -#define ATOMIC_VAR_INIT(value) { .__val = (value) } -#define atomic_init(obj, value) (obj = ATOMIC_VAR_INIT(value)) +#define ATOMIC_VAR_INIT(value) { .__val = (value) } +#define atomic_init(obj, value) (obj = ATOMIC_VAR_INIT(value)) #endif /* @@ -64,29 +64,29 @@ */ #ifndef __ATOMIC_RELAXED -#define __ATOMIC_RELAXED 0 +#define __ATOMIC_RELAXED 0 #endif #ifndef __ATOMIC_CONSUME -#define __ATOMIC_CONSUME 1 +#define __ATOMIC_CONSUME 1 #endif #ifndef __ATOMIC_ACQUIRE -#define __ATOMIC_ACQUIRE 2 +#define __ATOMIC_ACQUIRE 2 #endif #ifndef __ATOMIC_RELEASE -#define __ATOMIC_RELEASE 3 +#define __ATOMIC_RELEASE 3 #endif #ifndef __ATOMIC_ACQ_REL -#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_ACQ_REL 4 #endif #ifndef __ATOMIC_SEQ_CST -#define __ATOMIC_SEQ_CST 5 +#define __ATOMIC_SEQ_CST 5 #endif /* * 7.17.3 Order and consistency. * * The memory_order_* constants that denote the barrier behaviour of the - * atomic operations. + * atomic operations. */ enum memory_order { @@ -278,9 +278,9 @@ typedef _Atomic(__uintmax_t) atomic_uin * 7.17.8 Atomic flag type and operations. */ -typedef atomic_bool atomic_flag; +typedef atomic_bool atomic_flag; -#define ATOMIC_FLAG_INIT ATOMIC_VAR_INIT(0) +#define ATOMIC_FLAG_INIT ATOMIC_VAR_INIT(0) #define atomic_flag_clear_explicit(object, order) \ atomic_store_explicit(object, 0, order) From owner-svn-src-all@FreeBSD.ORG Sun Dec 25 22:05:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B7D6106566B; Sun, 25 Dec 2011 22:05:34 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26AFC8FC12; Sun, 25 Dec 2011 22:05:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBPM5YUD077512; Sun, 25 Dec 2011 22:05:34 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBPM5Y02077509; Sun, 25 Dec 2011 22:05:34 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112252205.pBPM5Y02077509@svn.freebsd.org> From: Ed Schouten Date: Sun, 25 Dec 2011 22:05:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228883 - head/contrib/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 25 Dec 2011 22:05:34 -0000 Author: ed Date: Sun Dec 25 22:05:33 2011 New Revision: 228883 URL: http://svn.freebsd.org/changeset/base/228883 Log: Add the C11 standard to groff. This allows us to refer to C11 as -isoC-11. MFC after: 2 months Modified: head/contrib/groff/tmac/doc-syms head/contrib/groff/tmac/groff_mdoc.man Modified: head/contrib/groff/tmac/doc-syms ============================================================================== --- head/contrib/groff/tmac/doc-syms Sun Dec 25 21:05:35 2011 (r228882) +++ head/contrib/groff/tmac/doc-syms Sun Dec 25 22:05:33 2011 (r228883) @@ -613,6 +613,8 @@ .as doc-str-St--isoC-tcor1 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^90\*[doc-str-St], Technical Corrigendum 1\*[Rq]) .ds doc-str-St--isoC-tcor2 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899/TCOR2:1995 .as doc-str-St--isoC-tcor2 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^90\*[doc-str-St], Technical Corrigendum 2\*[Rq]) +.ds doc-str-St--isoC-11 \*[doc-Tn-font-size]ISO/IEC\*[doc-str-St] 9899:2011 +.as doc-str-St--isoC-11 " (\*[Lq]\*[doc-Tn-font-size]ISO\~C\^11\*[doc-str-St]\*[Rq]) . .\" POSIX Part 1: System API .ds doc-str-St--p1003.1 \*[doc-Tn-font-size]\%IEEE\*[doc-str-St] Std 1003.1 Modified: head/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- head/contrib/groff/tmac/groff_mdoc.man Sun Dec 25 21:05:35 2011 (r228882) +++ head/contrib/groff/tmac/groff_mdoc.man Sun Dec 25 22:05:33 2011 (r228883) @@ -2036,6 +2036,8 @@ are: .St -isoC-90 .It Li \-isoC\-99 .St -isoC-99 +.It Li \-isoC\-11 +.St -isoC-11 .El .Pp . From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 03:14:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1082B106566B; Mon, 26 Dec 2011 03:14:38 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F33A48FC08; Mon, 26 Dec 2011 03:14:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ3EbJg087299; Mon, 26 Dec 2011 03:14:37 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ3EbUI087296; Mon, 26 Dec 2011 03:14:37 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201112260314.pBQ3EbUI087296@svn.freebsd.org> From: Glen Barber Date: Mon, 26 Dec 2011 03:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228885 - head/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 03:14:38 -0000 Author: gjb (doc committer) Date: Mon Dec 26 03:14:37 2011 New Revision: 228885 URL: http://svn.freebsd.org/changeset/base/228885 Log: Add missing opening and closing brackets in getopt_long.3 and getsubopt.3 to make the examples reflect reality more closely. MFC after: 1 week X-MFC-After: 9.0-RELEASE Modified: head/lib/libc/stdlib/getopt_long.3 head/lib/libc/stdlib/getsubopt.3 Modified: head/lib/libc/stdlib/getopt_long.3 ============================================================================== --- head/lib/libc/stdlib/getopt_long.3 Mon Dec 26 00:10:42 2011 (r228884) +++ head/lib/libc/stdlib/getopt_long.3 Mon Dec 26 03:14:37 2011 (r228885) @@ -31,7 +31,7 @@ .\" @(#)getopt.3 8.5 (Berkeley) 4/27/95 .\" $FreeBSD$ .\" -.Dd April 1, 2000 +.Dd December 25, 2011 .Dt GETOPT_LONG 3 .Os .Sh NAME @@ -239,7 +239,7 @@ static struct option longopts[] = { }; bflag = 0; -while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1) +while ((ch = getopt_long(argc, argv, "bf:", longopts, NULL)) != -1) { switch (ch) { case 'b': bflag = 1; @@ -256,6 +256,7 @@ while ((ch = getopt_long(argc, argv, "bf break; default: usage(); + } } argc -= optind; argv += optind; Modified: head/lib/libc/stdlib/getsubopt.3 ============================================================================== --- head/lib/libc/stdlib/getsubopt.3 Mon Dec 26 00:10:42 2011 (r228884) +++ head/lib/libc/stdlib/getsubopt.3 Mon Dec 26 03:14:37 2011 (r228885) @@ -28,7 +28,7 @@ .\" @(#)getsubopt.3 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd December 25, 2011 .Dt GETSUBOPT 3 .Os .Sh NAME @@ -131,9 +131,11 @@ while ((ch = getopt(argc, argv, "ab:")) else error("missing sub option"); break; + } } break; } +} .Ed .Sh SEE ALSO .Xr getopt 3 , From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 05:26:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E46241065673; Mon, 26 Dec 2011 05:26:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8F108FC18; Mon, 26 Dec 2011 05:26:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ5QZku091215; Mon, 26 Dec 2011 05:26:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ5QZIB091213; Mon, 26 Dec 2011 05:26:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260526.pBQ5QZIB091213@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 05:26:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228886 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 05:26:36 -0000 Author: adrian Date: Mon Dec 26 05:26:35 2011 New Revision: 228886 URL: http://svn.freebsd.org/changeset/base/228886 Log: Do a quick style(9) pass of some of the code introduced with 802.11n support. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Dec 26 03:14:37 2011 (r228885) +++ head/sys/dev/ath/if_ath.c Mon Dec 26 05:26:35 2011 (r228886) @@ -299,7 +299,8 @@ ath_attach(u_int16_t devid, struct ath_s if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); - ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, sc->sc_eepromdata, &status); + ah = ath_hal_attach(devid, sc, sc->sc_st, sc->sc_sh, + sc->sc_eepromdata, &status); if (ah == NULL) { if_printf(ifp, "unable to attach hardware; HAL status %u\n", status); @@ -469,7 +470,8 @@ ath_attach(u_int16_t devid, struct ath_s /* Attach DFS module */ if (! ath_dfs_attach(sc)) { - device_printf(sc->sc_dev, "%s: unable to attach DFS\n", __func__); + device_printf(sc->sc_dev, + "%s: unable to attach DFS\n", __func__); error = EIO; goto bad2; } @@ -521,7 +523,7 @@ ath_attach(u_int16_t devid, struct ath_s | IEEE80211_C_BGSCAN /* capable of bg scanning */ | IEEE80211_C_TXFRAG /* handle tx frags */ #ifdef ATH_ENABLE_DFS - | IEEE80211_C_DFS /* Enable DFS radar detection */ + | IEEE80211_C_DFS /* Enable radar detection */ #endif ; /* @@ -633,11 +635,12 @@ ath_attach(u_int16_t devid, struct ath_s int rxs, txs; device_printf(sc->sc_dev, "[HT] enabling HT modes\n"); - ic->ic_htcaps = IEEE80211_HTC_HT /* HT operation */ - | IEEE80211_HTC_AMPDU /* A-MPDU tx/rx */ - | IEEE80211_HTC_AMSDU /* A-MSDU tx/rx */ - | IEEE80211_HTCAP_MAXAMSDU_3839 /* max A-MSDU length */ - | IEEE80211_HTCAP_SMPS_OFF; /* SM power save off */ + ic->ic_htcaps = IEEE80211_HTC_HT /* HT operation */ + | IEEE80211_HTC_AMPDU /* A-MPDU tx/rx */ + | IEEE80211_HTC_AMSDU /* A-MSDU tx/rx */ + | IEEE80211_HTCAP_MAXAMSDU_3839 + /* max A-MSDU length */ + | IEEE80211_HTCAP_SMPS_OFF; /* SM power save off */ ; /* @@ -658,8 +661,8 @@ ath_attach(u_int16_t devid, struct ath_s | IEEE80211_HTCAP_SHORTGI40; /* - * rx/tx stream is not currently used anywhere; it needs to be taken - * into account when negotiating which MCS rates it'll receive and + * TX/RX streams need to be taken into account when + * negotiating which MCS rates it'll receive and * what MCS rates are available for TX. */ (void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 0, &rxs); @@ -671,7 +674,8 @@ ath_attach(u_int16_t devid, struct ath_s ic->ic_txstream = txs; ic->ic_rxstream = rxs; - device_printf(sc->sc_dev, "[HT] %d RX streams; %d TX streams\n", rxs, txs); + device_printf(sc->sc_dev, + "[HT] %d RX streams; %d TX streams\n", rxs, txs); } #endif @@ -683,7 +687,8 @@ ath_attach(u_int16_t devid, struct ath_s ath_hal_getcapability(ah, HAL_CAP_SERIALISE_WAR, 0, NULL) == HAL_OK) { sc->sc_ah->ah_config.ah_serialise_reg_war = 1; - device_printf(sc->sc_dev, "Enabling register serialisation\n"); + device_printf(sc->sc_dev, + "Enabling register serialisation\n"); } /* From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 05:37:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B63DA1065678; Mon, 26 Dec 2011 05:37:09 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A33BF8FC14; Mon, 26 Dec 2011 05:37:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ5b9E7091562; Mon, 26 Dec 2011 05:37:09 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ5b95a091556; Mon, 26 Dec 2011 05:37:09 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260537.pBQ5b95a091556@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 05:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228887 - in head/sys: conf dev/ath modules/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 05:37:09 -0000 Author: adrian Date: Mon Dec 26 05:37:09 2011 New Revision: 228887 URL: http://svn.freebsd.org/changeset/base/228887 Log: First pass of LED related code changes. Migrate the LED code out of if_ath.c and into if_ath_led.c. These routines are _all_ software based LED blinking. Added: head/sys/dev/ath/if_ath_led.c (contents, props changed) head/sys/dev/ath/if_ath_led.h (contents, props changed) Modified: head/sys/conf/files head/sys/dev/ath/if_ath.c head/sys/modules/ath/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Dec 26 05:26:35 2011 (r228886) +++ head/sys/conf/files Mon Dec 26 05:37:09 2011 (r228887) @@ -588,6 +588,8 @@ dev/ath/if_ath_debug.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_keycache.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" +dev/ath/if_ath_led.c optional ath \ + compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx.c optional ath \ compile-with "${NORMAL_C} -I$S/dev/ath" dev/ath/if_ath_tx_ht.c optional ath \ Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Dec 26 05:26:35 2011 (r228886) +++ head/sys/dev/ath/if_ath.c Mon Dec 26 05:37:09 2011 (r228887) @@ -101,6 +101,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -204,7 +205,6 @@ static int ath_setregdomain(struct ieee8 static void ath_getradiocaps(struct ieee80211com *, int, int *, struct ieee80211_channel []); static int ath_getchannels(struct ath_softc *); -static void ath_led_event(struct ath_softc *, int); static int ath_rate_setup(struct ath_softc *, u_int mode); static void ath_setcurmode(struct ath_softc *, enum ieee80211_phymode); @@ -5956,49 +5956,6 @@ ath_getchannels(struct ath_softc *sc) return 0; } -static void -ath_led_done(void *arg) -{ - struct ath_softc *sc = arg; - - sc->sc_blinking = 0; -} - -/* - * Turn the LED off: flip the pin and then set a timer so no - * update will happen for the specified duration. - */ -static void -ath_led_off(void *arg) -{ - struct ath_softc *sc = arg; - - ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); - callout_reset(&sc->sc_ledtimer, sc->sc_ledoff, ath_led_done, sc); -} - -/* - * Blink the LED according to the specified on/off times. - */ -static void -ath_led_blink(struct ath_softc *sc, int on, int off) -{ - DPRINTF(sc, ATH_DEBUG_LED, "%s: on %u off %u\n", __func__, on, off); - ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, sc->sc_ledon); - sc->sc_blinking = 1; - sc->sc_ledoff = off; - callout_reset(&sc->sc_ledtimer, on, ath_led_off, sc); -} - -static void -ath_led_event(struct ath_softc *sc, int rix) -{ - sc->sc_ledevent = ticks; /* time of last event */ - if (sc->sc_blinking) /* don't interrupt active blink */ - return; - ath_led_blink(sc, sc->sc_hwmap[rix].ledon, sc->sc_hwmap[rix].ledoff); -} - static int ath_rate_setup(struct ath_softc *sc, u_int mode) { Added: head/sys/dev/ath/if_ath_led.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_led.c Mon Dec 26 05:37:09 2011 (r228887) @@ -0,0 +1,154 @@ +/*- + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * 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. + * + * 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 NONINFRINGEMENT, 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 +__FBSDID("$FreeBSD$"); + +/* + * Driver for the Atheros Wireless LAN controller. + * + * This software is derived from work of Atsushi Onoe; his contribution + * is greatly appreciated. + */ + +#include "opt_inet.h" +#include "opt_ath.h" +/* + * This is needed for register operations which are performed + * by the driver - eg, calls to ath_hal_gettsf32(). + */ +#include "opt_ah.h" +#include "opt_wlan.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include /* for mp_ncpus */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#ifdef IEEE80211_SUPPORT_SUPERG +#include +#endif +#ifdef IEEE80211_SUPPORT_TDMA +#include +#endif + +#include + +#ifdef INET +#include +#include +#endif + +#include +#include /* XXX for softled */ +#include + +#include +#include + +#include + +/* + * Software LED driver routines. + */ + +/* + * XXX TODO: move the LED sysctls here. + */ + +static void +ath_led_done(void *arg) +{ + struct ath_softc *sc = arg; + + sc->sc_blinking = 0; +} + +/* + * Turn the LED off: flip the pin and then set a timer so no + * update will happen for the specified duration. + */ +static void +ath_led_off(void *arg) +{ + struct ath_softc *sc = arg; + + ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); + callout_reset(&sc->sc_ledtimer, sc->sc_ledoff, ath_led_done, sc); +} + +/* + * Blink the LED according to the specified on/off times. + */ +static void +ath_led_blink(struct ath_softc *sc, int on, int off) +{ + DPRINTF(sc, ATH_DEBUG_LED, "%s: on %u off %u\n", __func__, on, off); + ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, sc->sc_ledon); + sc->sc_blinking = 1; + sc->sc_ledoff = off; + callout_reset(&sc->sc_ledtimer, on, ath_led_off, sc); +} + +void +ath_led_event(struct ath_softc *sc, int rix) +{ + sc->sc_ledevent = ticks; /* time of last event */ + if (sc->sc_blinking) /* don't interrupt active blink */ + return; + ath_led_blink(sc, sc->sc_hwmap[rix].ledon, sc->sc_hwmap[rix].ledoff); +} Added: head/sys/dev/ath/if_ath_led.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/ath/if_ath_led.h Mon Dec 26 05:37:09 2011 (r228887) @@ -0,0 +1,36 @@ +/*- + * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting + * 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, + * without modification. + * 2. Redistributions in binary form must reproduce at minimum a disclaimer + * 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. + * + * 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 NONINFRINGEMENT, 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. + * + * $FreeBSD$ + */ +#ifndef __IF_ATH_LED_H__ +#define __IF_ATH_LED_H__ + +extern void ath_led_event(struct ath_softc *sc, int rix); + +#endif Modified: head/sys/modules/ath/Makefile ============================================================================== --- head/sys/modules/ath/Makefile Mon Dec 26 05:26:35 2011 (r228886) +++ head/sys/modules/ath/Makefile Mon Dec 26 05:37:09 2011 (r228887) @@ -36,7 +36,7 @@ ATH_RATE?= sample # tx rate control alg KMOD= if_ath SRCS= if_ath.c if_ath_debug.c if_ath_keycache.c if_ath_sysctl.c -SRCS+= if_ath_tx.c if_ath_tx_ht.c +SRCS+= if_ath_tx.c if_ath_tx_ht.c if_ath_led.c # NB: v3 eeprom support used by both AR5211 and AR5212; just include it SRCS+= ah_osdep.c ah.c ah_regdomain.c ah_eeprom_v3.c SRCS+= device_if.h bus_if.h pci_if.h opt_inet.h opt_ath.h opt_ah.h opt_wlan.h From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 05:46:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 421E8106566B; Mon, 26 Dec 2011 05:46:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 269398FC0A; Mon, 26 Dec 2011 05:46:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ5kN29091870; Mon, 26 Dec 2011 05:46:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ5kMa0091865; Mon, 26 Dec 2011 05:46:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260546.pBQ5kMa0091865@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 05:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228888 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 05:46:23 -0000 Author: adrian Date: Mon Dec 26 05:46:22 2011 New Revision: 228888 URL: http://svn.freebsd.org/changeset/base/228888 Log: Refactor out the software LED config code into a common function, called ath_led_config(). The eventual aim is to have both software and hardware based LED configuration done here. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_led.c head/sys/dev/ath/if_ath_led.h head/sys/dev/ath/if_ath_sysctl.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Dec 26 05:37:09 2011 (r228887) +++ head/sys/dev/ath/if_ath.c Mon Dec 26 05:46:22 2011 (r228888) @@ -490,11 +490,7 @@ ath_attach(u_int16_t devid, struct ath_s * support with a sysctl. */ sc->sc_softled = (devid == AR5212_DEVID_IBM || devid == AR5211_DEVID); - if (sc->sc_softled) { - ath_hal_gpioCfgOutput(ah, sc->sc_ledpin, - HAL_GPIO_MUX_MAC_NETWORK_LED); - ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon); - } + ath_led_config(sc); ifp->if_softc = sc; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; @@ -1332,11 +1328,7 @@ ath_resume(struct ath_softc *sc) } else ieee80211_resume_all(ic); } - if (sc->sc_softled) { - ath_hal_gpioCfgOutput(ah, sc->sc_ledpin, - HAL_GPIO_MUX_MAC_NETWORK_LED); - ath_hal_gpioset(ah, sc->sc_ledpin, !sc->sc_ledon); - } + ath_led_config(sc); /* XXX beacons ? */ } Modified: head/sys/dev/ath/if_ath_led.c ============================================================================== --- head/sys/dev/ath/if_ath_led.c Mon Dec 26 05:37:09 2011 (r228887) +++ head/sys/dev/ath/if_ath_led.c Mon Dec 26 05:46:22 2011 (r228888) @@ -110,6 +110,26 @@ __FBSDID("$FreeBSD$"); * XXX TODO: move the LED sysctls here. */ + +/* + * Configure the hardware for software and/or LED blinking. + * + * This requires the configuration to be set beforehand. + */ +void +ath_led_config(struct ath_softc *sc) +{ + /* Software LED blinking - GPIO controlled LED */ + if (sc->sc_softled) { + ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, + HAL_GPIO_MUX_MAC_NETWORK_LED); + ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); + return; + } + + /* Hardware LED blinking - MAC controlled LED */ +} + static void ath_led_done(void *arg) { Modified: head/sys/dev/ath/if_ath_led.h ============================================================================== --- head/sys/dev/ath/if_ath_led.h Mon Dec 26 05:37:09 2011 (r228887) +++ head/sys/dev/ath/if_ath_led.h Mon Dec 26 05:46:22 2011 (r228888) @@ -32,5 +32,6 @@ #define __IF_ATH_LED_H__ extern void ath_led_event(struct ath_softc *sc, int rix); +extern void ath_led_config(struct ath_softc *sc); #endif Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Mon Dec 26 05:37:09 2011 (r228887) +++ head/sys/dev/ath/if_ath_sysctl.c Mon Dec 26 05:46:22 2011 (r228888) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -151,10 +152,7 @@ ath_sysctl_softled(SYSCTL_HANDLER_ARGS) if (softled != sc->sc_softled) { if (softled) { /* NB: handle any sc_ledpin change */ - ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, - HAL_GPIO_MUX_MAC_NETWORK_LED); - ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, - !sc->sc_ledon); + ath_led_config(sc); } sc->sc_softled = softled; } @@ -174,10 +172,7 @@ ath_sysctl_ledpin(SYSCTL_HANDLER_ARGS) if (ledpin != sc->sc_ledpin) { sc->sc_ledpin = ledpin; if (sc->sc_softled) { - ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, - HAL_GPIO_MUX_MAC_NETWORK_LED); - ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, - !sc->sc_ledon); + ath_led_config(sc); } } return 0; From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 06:07:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D3A97106566C; Mon, 26 Dec 2011 06:07:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7C668FC0A; Mon, 26 Dec 2011 06:07:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ67L49092524; Mon, 26 Dec 2011 06:07:21 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ67L06092522; Mon, 26 Dec 2011 06:07:21 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260607.pBQ67L06092522@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 06:07:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228889 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 06:07:21 -0000 Author: adrian Date: Mon Dec 26 06:07:21 2011 New Revision: 228889 URL: http://svn.freebsd.org/changeset/base/228889 Log: Update the hardware LED blinking code to do something useful rather than relying on what the register defaults are. This forces the blink mode to be proportional to the TX and RX frames which match the RX filter. This (along with a few tweaks to if_ath_led.c to configure the correct GPIO pins) allows my DWA-552 AR5416 NIC to blink the LEDs in a useful fashion, however those LEDs are marked "Link" and "Act(ivity)", which don't really map well to the "power" / "network" LED interface which the MAC provides. Some further tinkering is needed to see what other useful operating modes are possible. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Dec 26 05:46:22 2011 (r228888) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Mon Dec 26 06:07:21 2011 (r228889) @@ -73,34 +73,29 @@ ar5416SetLedState(struct ath_hal *ah, HA AR_MAC_LED_ASSOC_NONE, AR_MAC_LED_ASSOC_NONE, }; -#if 0 - uint32_t bits; -#endif if (AR_SREV_HOWL(ah)) return; + /* + * Set the blink operating mode. + */ OS_REG_RMW_FIELD(ah, AR_MAC_LED, AR_MAC_LED_ASSOC, ledbits[state & 0x7]); + /* XXX Blink slow mode? */ + /* XXX Blink threshold? */ + /* XXX Blink sleep hystersis? */ + /* - * For now, don't override the power/network LED - * "on" bits. The reference driver notes that some - * devices connect the LED pins to other functionality - * so we can't just leave this on by default. + * Set the LED blink configuration to be proportional + * to the current TX and RX filter bytes. (Ie, RX'ed + * frames that don't match the filter are ignored.) + * This means that higher TX/RX throughput will result + * in the blink rate increasing. */ -#if 0 - bits = OS_REG_READ(ah, AR_MAC_LED); - bits = (bits &~ AR_MAC_LED_MODE) - | SM(AR_MAC_LED_MODE_POWON, AR_MAC_LED_MODE) -#if 1 - | SM(AR_MAC_LED_MODE_NETON, AR_MAC_LED_MODE) -#endif - ; - bits = (bits &~ AR_MAC_LED_ASSOC) - | SM(ledbits[state & 0x7], AR_MAC_LED_ASSOC); - OS_REG_WRITE(ah, AR_MAC_LED, bits); -#endif + OS_REG_RMW_FIELD(ah, AR_MAC_LED, AR_MAC_LED_MODE, + AR_MAC_LED_MODE_PROP); } /* From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 06:22:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 695C9106564A; Mon, 26 Dec 2011 06:22:21 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 4DBFE14FA0E; Mon, 26 Dec 2011 06:22:20 +0000 (UTC) Message-ID: <4EF8129B.9010605@FreeBSD.org> Date: Sun, 25 Dec 2011 22:22:19 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Steve Kargl References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111224230356.GA69395@troutmask.apl.washington.edu> In-Reply-To: <20111224230356.GA69395@troutmask.apl.washington.edu> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, Marius Strobl , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 06:22:21 -0000 On 12/24/2011 15:03, Steve Kargl wrote: > Imagine that! A request from someone, who is a staunch > anti-profiled lib supporter, to (I don't know) profile > a change to the system. Um, yeah. That was both pointless and uncalled for. I have nothing against profiled libs, I just don't think they should be enabled by default since the overwhelming majority of users have no use for them whatsoever. OTOH, as developers, it's our responsibility to make sure that the changes we make move things in the right direction, which is what I'm asking to confirm here. Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 06:23:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 28409106564A; Mon, 26 Dec 2011 06:23:50 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id A6A4414F00B; Mon, 26 Dec 2011 06:23:48 +0000 (UTC) Message-ID: <4EF812F4.9010902@FreeBSD.org> Date: Sun, 25 Dec 2011 22:23:48 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: <201112251429.pBPETawV062695@svn.freebsd.org> In-Reply-To: <201112251429.pBPETawV062695@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228874 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 06:23:50 -0000 On 12/25/2011 06:29, Bjoern A. Zeeb wrote: > Author: bz > Date: Sun Dec 25 14:29:36 2011 > New Revision: 228874 > URL: http://svn.freebsd.org/changeset/base/228874 > > Log: > Quite the tinderbox for the holidays. Remove the assert[1]. Shouldn't "Why it's Ok to remove the assert" be part of this commit log? > Suggested by: jhibbits [1] > MFC after: 3 days > > Modified: > head/sys/dev/hwpmc/hwpmc_powerpc.c > > Modified: head/sys/dev/hwpmc/hwpmc_powerpc.c > ============================================================================== > --- head/sys/dev/hwpmc/hwpmc_powerpc.c Sun Dec 25 13:24:48 2011 (r228873) > +++ head/sys/dev/hwpmc/hwpmc_powerpc.c Sun Dec 25 14:29:36 2011 (r228874) > @@ -686,11 +686,6 @@ powerpc_intr(int cpu, struct trapframe * > v = pm->pm_sc.pm_reloadcount; > config = mfspr(SPR_MMCR0); > > - KASSERT((config & ~AMD_PMC_ENABLE) == > - (pm->pm_md.pm_amd.pm_amd_evsel & ~AMD_PMC_ENABLE), > - ("[powerpc,%d] config mismatch reg=0x%x pm=0x%x", __LINE__, > - config, pm->pm_md.pm_amd.pm_amd_evsel)); > - > mtspr(SPR_MMCR0, config | SPR_MMCR0_FC); > powerpc_pmcn_write(i, v); > > -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 06:25:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3FC81065672; Mon, 26 Dec 2011 06:25:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 988538FC08; Mon, 26 Dec 2011 06:25:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ6PCTM093114; Mon, 26 Dec 2011 06:25:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ6PCHi093112; Mon, 26 Dec 2011 06:25:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260625.pBQ6PCHi093112@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 06:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228890 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 06:25:12 -0000 Author: adrian Date: Mon Dec 26 06:25:12 2011 New Revision: 228890 URL: http://svn.freebsd.org/changeset/base/228890 Log: Setup the initial LED state on attach and resume. Some of the NICs I have here power up with the LEDs blinking, which is incorrect. The blinking should only occur when the NIC is attempting to associate. * On powerup, set the state to HAL_LED_INIT, which turns on the "Power" MAC LED but leaves the "Network" MAC LED the way it is. * On resume, also init it to HAL_LED_INIT unless in station mode, where it's forced to HAL_LED_RUN. Hopefully the net80211 state machine will call newstate() at some point, which will refiddle the LEDs. I've tested this on a handful of 11n and pre-11n NICs. The blinking behaviour is slightly more sensible now. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Dec 26 06:07:21 2011 (r228889) +++ head/sys/dev/ath/if_ath.c Mon Dec 26 06:25:12 2011 (r228890) @@ -491,6 +491,7 @@ ath_attach(u_int16_t devid, struct ath_s */ sc->sc_softled = (devid == AR5212_DEVID_IBM || devid == AR5211_DEVID); ath_led_config(sc); + ath_hal_setledstate(ah, HAL_LED_INIT); ifp->if_softc = sc; ifp->if_flags = IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST; @@ -1312,9 +1313,14 @@ ath_resume(struct ath_softc *sc) /* Let DFS at it in case it's a DFS channel */ ath_dfs_radar_enable(sc, ic->ic_curchan); + /* Restore the LED configuration */ + ath_led_config(sc); + ath_hal_setledstate(ah, HAL_LED_INIT); + if (sc->sc_resume_up) { if (ic->ic_opmode == IEEE80211_M_STA) { ath_init(sc); + ath_hal_setledstate(ah, HAL_LED_RUN); /* * Program the beacon registers using the last rx'd * beacon frame and enable sync on the next beacon @@ -1328,7 +1334,6 @@ ath_resume(struct ath_softc *sc) } else ieee80211_resume_all(ic); } - ath_led_config(sc); /* XXX beacons ? */ } From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 07:09:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id CFFEA106566C; Mon, 26 Dec 2011 07:09:37 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 3482214F75B; Mon, 26 Dec 2011 07:09:19 +0000 (UTC) Message-ID: <4EF81D9E.7020208@FreeBSD.org> Date: Sun, 25 Dec 2011 23:09:18 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Eitan Adler References: <201112251815.pBPIFP6d070102@svn.freebsd.org> In-Reply-To: <201112251815.pBPIFP6d070102@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228876 - head/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 07:09:37 -0000 On 12/25/2011 10:15, Eitan Adler wrote: > - sysinstall(8) is not supported in -CURRENT Given that we have no replacement for the post-install configuration role that sysinstall played, this may be premature. -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 07:47:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9220B106564A; Mon, 26 Dec 2011 07:47:05 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 800E08FC08; Mon, 26 Dec 2011 07:47:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ7l5h6095571; Mon, 26 Dec 2011 07:47:05 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ7l5o9095566; Mon, 26 Dec 2011 07:47:05 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260747.pBQ7l5o9095566@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 07:47:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228891 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 07:47:05 -0000 Author: adrian Date: Mon Dec 26 07:47:05 2011 New Revision: 228891 URL: http://svn.freebsd.org/changeset/base/228891 Log: Flesh out configurable hardware based LED blinking. The hardware (MAC) LED blinking involves a few things: * Selecting which GPIO pins map to the MAC "power" and "network" lines; * Configuring the MAC LED state (associated, scanning, idle); * Configuring the MAC LED blinking type and speed. The AR5416 HAL configures the normal blinking setup - ie, blink rate based on TX/RX throughput. The default AR5212 HAL doesn't program in any specific blinking type, but the default of 0 is the same. This code introduces a few things: * The hardware led override is configured via sysctl 'hardled'; * The MAC network and power LED GPIO lines can be set, or left at -1 if needed. This is intended to allow only one of the hardware MUX entries to be configured (eg for PCIe cards which only have one LED exposed.) TODO: * For AR2417, the software LED blinking involves software blinking the Network LED. For the AR5416 and later, this can just be configured as a GPIO output line. I'll chase that up with a subsequent commit. * Add another software LED blink for "Link", separate from "activity", which blinks based on the association state. This would make my D-Link DWA-552 have consistent and useful LED behaviour (as they're marked "Link" and "Activity." * Don't expose the hardware LED override unless it's an AR5416 or later, as the previous generation hardware doesn't have this multiplexing setup. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_led.c head/sys/dev/ath/if_ath_sysctl.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Dec 26 06:25:12 2011 (r228890) +++ head/sys/dev/ath/if_ath.c Mon Dec 26 07:47:05 2011 (r228891) @@ -479,11 +479,27 @@ ath_attach(u_int16_t devid, struct ath_s /* Start DFS processing tasklet */ TASK_INIT(&sc->sc_dfstask, 0, ath_dfs_tasklet, sc); + /* Configure LED state */ sc->sc_blinking = 0; sc->sc_ledstate = 1; sc->sc_ledon = 0; /* low true */ sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */ callout_init(&sc->sc_ledtimer, CALLOUT_MPSAFE); + + /* + * Don't setup hardware-based blinking. + * + * Although some NICs may have this configured in the + * default reset register values, the user may wish + * to alter which pins have which function. + * + * The reference driver attaches the MAC network LED to GPIO1 and + * the MAC power LED to GPIO2. However, the DWA-552 cardbus + * NIC has these reversed. + */ + sc->sc_hardled = (1 == 0); + sc->sc_led_net_pin = -1; + sc->sc_led_pwr_pin = -1; /* * Auto-enable soft led processing for IBM cards and for * 5211 minipci cards. Users can also manually enable/disable Modified: head/sys/dev/ath/if_ath_led.c ============================================================================== --- head/sys/dev/ath/if_ath_led.c Mon Dec 26 06:25:12 2011 (r228890) +++ head/sys/dev/ath/if_ath_led.c Mon Dec 26 07:47:05 2011 (r228891) @@ -112,9 +112,12 @@ __FBSDID("$FreeBSD$"); /* - * Configure the hardware for software and/or LED blinking. + * Configure the hardware for software and LED blinking. + * The user may choose to configure part of each, depending upon the + * NIC being used. * - * This requires the configuration to be set beforehand. + * This requires the configuration to be set before this function + * is called. */ void ath_led_config(struct ath_softc *sc) @@ -124,10 +127,23 @@ ath_led_config(struct ath_softc *sc) ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, HAL_GPIO_MUX_MAC_NETWORK_LED); ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); - return; } /* Hardware LED blinking - MAC controlled LED */ + if (sc->sc_hardled) { + /* + * Only enable each LED if required. + * + * Some NICs only have one LED connected; others may + * have GPIO1/GPIO2 connected to other hardware. + */ + if (sc->sc_led_pwr_pin > 0) + ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_pwr_pin, + HAL_GPIO_MUX_MAC_POWER_LED); + if (sc->sc_led_net_pin > 0) + ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_led_net_pin, + HAL_GPIO_MUX_MAC_NETWORK_LED); + } } static void Modified: head/sys/dev/ath/if_ath_sysctl.c ============================================================================== --- head/sys/dev/ath/if_ath_sysctl.c Mon Dec 26 06:25:12 2011 (r228890) +++ head/sys/dev/ath/if_ath_sysctl.c Mon Dec 26 07:47:05 2011 (r228891) @@ -179,6 +179,27 @@ ath_sysctl_ledpin(SYSCTL_HANDLER_ARGS) } static int +ath_sysctl_hardled(SYSCTL_HANDLER_ARGS) +{ + struct ath_softc *sc = arg1; + int hardled = sc->sc_hardled; + int error; + + error = sysctl_handle_int(oidp, &hardled, 0, req); + if (error || !req->newptr) + return error; + hardled = (hardled != 0); + if (hardled != sc->sc_hardled) { + if (hardled) { + /* NB: handle any sc_ledpin change */ + ath_led_config(sc); + } + sc->sc_hardled = hardled; + } + return 0; +} + +static int ath_sysctl_txantenna(SYSCTL_HANDLER_ARGS) { struct ath_softc *sc = arg1; @@ -491,6 +512,7 @@ ath_sysctlattach(struct ath_softc *sc) SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ctstimeout", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_ctstimeout, "I", "802.11 CTS timeout (us)"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "softled", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_softled, "I", "enable/disable software LED support"); @@ -503,6 +525,18 @@ ath_sysctlattach(struct ath_softc *sc) SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0, "idle time for inactivity LED (ticks)"); + + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "hardled", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + ath_sysctl_hardled, "I", "enable/disable hardware LED support"); + /* XXX Laziness - configure pins, then flip hardled off/on */ + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "led_net_pin", CTLFLAG_RW, &sc->sc_led_net_pin, 0, + "MAC Network LED pin, or -1 to disable"); + SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "led_pwr_pin", CTLFLAG_RW, &sc->sc_led_pwr_pin, 0, + "MAC Power LED pin, or -1 to disable"); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "txantenna", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_txantenna, "I", "antenna switch"); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Dec 26 06:25:12 2011 (r228890) +++ head/sys/dev/ath/if_athvar.h Mon Dec 26 07:47:05 2011 (r228891) @@ -371,6 +371,7 @@ struct ath_softc { unsigned int sc_invalid : 1,/* disable hardware accesses */ sc_mrretry : 1,/* multi-rate retry support */ sc_softled : 1,/* enable LED gpio status */ + sc_hardled : 1,/* enable MAC LED status */ sc_splitmic : 1,/* split TKIP MIC keys */ sc_needmib : 1,/* enable MIB stats intr */ sc_diversity: 1,/* enable rx diversity */ @@ -445,6 +446,9 @@ struct ath_softc { u_int sc_keymax; /* size of key cache */ u_int8_t sc_keymap[ATH_KEYBYTES];/* key use bit map */ + /* + * Software based LED blinking + */ u_int sc_ledpin; /* GPIO pin for driving LED */ u_int sc_ledon; /* pin setting for LED on */ u_int sc_ledidle; /* idle polling interval */ @@ -453,6 +457,12 @@ struct ath_softc { u_int16_t sc_ledoff; /* off time for current blink */ struct callout sc_ledtimer; /* led off timer */ + /* + * Hardware based LED blinking + */ + int sc_led_pwr_pin; /* MAC power LED GPIO pin */ + int sc_led_net_pin; /* MAC network LED GPIO pin */ + u_int sc_rfsilentpin; /* GPIO pin for rfkill int */ u_int sc_rfsilentpol; /* pin setting for rfkill on */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 07:48:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15732106566C; Mon, 26 Dec 2011 07:48:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0453C8FC08; Mon, 26 Dec 2011 07:48:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ7mTWH095646; Mon, 26 Dec 2011 07:48:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ7mTQP095644; Mon, 26 Dec 2011 07:48:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260748.pBQ7mTQP095644@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 07:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228892 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 07:48:30 -0000 Author: adrian Date: Mon Dec 26 07:48:29 2011 New Revision: 228892 URL: http://svn.freebsd.org/changeset/base/228892 Log: Since the only thing with a mux is the AR5416 and later, and we're now doing split software/hardware LED configuration, we can now simply treat "softled" as an "output" mux type. This works fine on this DWA-552. Previous generation (pre-11n NICs) don't have a GPIO mux - only input/output configuration - so they ignore this field. Modified: head/sys/dev/ath/if_ath_led.c Modified: head/sys/dev/ath/if_ath_led.c ============================================================================== --- head/sys/dev/ath/if_ath_led.c Mon Dec 26 07:47:05 2011 (r228891) +++ head/sys/dev/ath/if_ath_led.c Mon Dec 26 07:48:29 2011 (r228892) @@ -125,7 +125,7 @@ ath_led_config(struct ath_softc *sc) /* Software LED blinking - GPIO controlled LED */ if (sc->sc_softled) { ath_hal_gpioCfgOutput(sc->sc_ah, sc->sc_ledpin, - HAL_GPIO_MUX_MAC_NETWORK_LED); + HAL_GPIO_MUX_OUTPUT); ath_hal_gpioset(sc->sc_ah, sc->sc_ledpin, !sc->sc_ledon); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 08:21:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 295081065672; Mon, 26 Dec 2011 08:21:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 17C118FC13; Mon, 26 Dec 2011 08:21:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ8LTr9096729; Mon, 26 Dec 2011 08:21:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ8LTF8096727; Mon, 26 Dec 2011 08:21:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112260821.pBQ8LTF8096727@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 08:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228893 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 08:21:30 -0000 Author: adrian Date: Mon Dec 26 08:21:29 2011 New Revision: 228893 URL: http://svn.freebsd.org/changeset/base/228893 Log: AR5416 has 14 GPIO pins, from 0->13. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Dec 26 07:48:29 2011 (r228892) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Mon Dec 26 08:21:29 2011 (r228893) @@ -865,7 +865,7 @@ ar5416FillCapabilityInfo(struct ath_hal ; pCap->halFastCCSupport = AH_TRUE; - pCap->halNumGpioPins = 6; + pCap->halNumGpioPins = 14; pCap->halWowSupport = AH_FALSE; pCap->halWowMatchPatternExact = AH_FALSE; pCap->halBtCoexSupport = AH_FALSE; /* XXX need support */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 08:59:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06F85106564A; Mon, 26 Dec 2011 08:59:17 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B05988FC08; Mon, 26 Dec 2011 08:59:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ8xHMA097903; Mon, 26 Dec 2011 08:59:17 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ8xH6P097901; Mon, 26 Dec 2011 08:59:17 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112260859.pBQ8xH6P097901@svn.freebsd.org> From: Xin LI Date: Mon, 26 Dec 2011 08:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228894 - vendor/netcat/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 08:59:18 -0000 Author: delphij Date: Mon Dec 26 08:59:17 2011 New Revision: 228894 URL: http://svn.freebsd.org/changeset/base/228894 Log: Import nc from OpenBSD 5.0. Modified: vendor/netcat/dist/netcat.c Modified: vendor/netcat/dist/netcat.c ============================================================================== --- vendor/netcat/dist/netcat.c Mon Dec 26 08:21:29 2011 (r228893) +++ vendor/netcat/dist/netcat.c Mon Dec 26 08:59:17 2011 (r228894) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.100 2011/01/09 22:16:46 jeremy Exp $ */ +/* $OpenBSD: netcat.c,v 1.101 2011/06/21 17:31:07 mikeb Exp $ */ /* * Copyright (c) 2001 Eric Jackson * @@ -552,7 +552,7 @@ remote_connect(const char *host, const c continue; if (rtableid) { - if (setsockopt(s, IPPROTO_IP, SO_RTABLE, &rtableid, + if (setsockopt(s, SOL_SOCKET, SO_RTABLE, &rtableid, sizeof(rtableid)) == -1) err(1, "setsockopt SO_RTABLE"); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 09:03:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D4081065673; Mon, 26 Dec 2011 09:03:29 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4204E8FC14; Mon, 26 Dec 2011 09:03:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ93TKP098078; Mon, 26 Dec 2011 09:03:29 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ93TWo098077; Mon, 26 Dec 2011 09:03:29 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112260903.pBQ93TWo098077@svn.freebsd.org> From: Xin LI Date: Mon, 26 Dec 2011 09:03:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228895 - vendor/netcat/5.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 09:03:29 -0000 Author: delphij Date: Mon Dec 26 09:03:28 2011 New Revision: 228895 URL: http://svn.freebsd.org/changeset/base/228895 Log: Tag nc from OpenBSD 5.0. Added: vendor/netcat/5.0/ - copied from r228894, vendor/netcat/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 09:07:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54532106566C; Mon, 26 Dec 2011 09:07:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 433118FC0C; Mon, 26 Dec 2011 09:07:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQ979jU098223; Mon, 26 Dec 2011 09:07:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQ979X4098221; Mon, 26 Dec 2011 09:07:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112260907.pBQ979X4098221@svn.freebsd.org> From: Xin LI Date: Mon, 26 Dec 2011 09:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 09:07:09 -0000 Author: delphij Date: Mon Dec 26 09:07:08 2011 New Revision: 228896 URL: http://svn.freebsd.org/changeset/base/228896 Log: Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not apply to us). Modified: head/contrib/netcat/netcat.c Directory Properties: head/contrib/netcat/ (props changed) Modified: head/contrib/netcat/netcat.c ============================================================================== --- head/contrib/netcat/netcat.c Mon Dec 26 09:03:28 2011 (r228895) +++ head/contrib/netcat/netcat.c Mon Dec 26 09:07:08 2011 (r228896) @@ -1,4 +1,4 @@ -/* $OpenBSD: netcat.c,v 1.100 2011/01/09 22:16:46 jeremy Exp $ */ +/* $OpenBSD: netcat.c,v 1.101 2011/06/21 17:31:07 mikeb Exp $ */ /* * Copyright (c) 2001 Eric Jackson * From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 09:14:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 6C9BA1065677; Mon, 26 Dec 2011 09:14:29 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 17376151345; Mon, 26 Dec 2011 09:14:29 +0000 (UTC) Message-ID: <4EF83AF4.9010108@FreeBSD.org> Date: Mon, 26 Dec 2011 01:14:28 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Xin LI References: <201112260907.pBQ979X4098221@svn.freebsd.org> In-Reply-To: <201112260907.pBQ979X4098221@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 09:14:29 -0000 On 12/26/2011 01:07, Xin LI wrote: > Author: delphij > Date: Mon Dec 26 09:07:08 2011 > New Revision: 228896 > URL: http://svn.freebsd.org/changeset/base/228896 > > Log: > Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not > apply to us). When I'm importing stat(1) stuff from Net/OpenBSD I don't do this. I will however comment in the commit log for the next substantive change, "Skipped update N.NN because the change was not relevant to us," or words to that effect. I'm not suggesting that my way of doing this is perfect, or cannot be improved. I would suggest however that this change was needless churn. hth, Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 10:28:21 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEE7E106566C; Mon, 26 Dec 2011 10:28:21 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 6D6078FC08; Mon, 26 Dec 2011 10:28:21 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pBQASKqL062162; Mon, 26 Dec 2011 11:28:20 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pBQASK1V062161; Mon, 26 Dec 2011 11:28:20 +0100 (CET) (envelope-from marius) Date: Mon, 26 Dec 2011 11:28:20 +0100 From: Marius Strobl To: Doug Barton Message-ID: <20111226102820.GT90831@alchemy.franken.de> References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF645D2.8080407@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 10:28:22 -0000 On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: > On 12/24/2011 04:16, Marius Strobl wrote: > > On FreeBSD just use the MD5 implementation of libmd rather than that of > > libcrypto so we don't need to relinquish csup when world is built without > > OpenSSL. > > Did you benchmark this at all? I agree that keeping csup available > absent openssl is a good goal, but csup is a prototypical "tool that > does the same thing many thousands of times" so even tiny regressions > could add up to a large cost in wall clock time. Well, in a real world test updating the same base on an amd64 machine connected to the Internet via Fast Ethernet from a national mirror with csup once linked against libcrypto and once against libmd and also with CVSup the csup linked against libmd actually was fasted with 29:51.37, followed by CVSup with 32:07.52 and csup linked against libcrypto with 34:49.88. This was with the libmd run done after the libcrypto run so in theory the former might even have picked up some more deltas than the latter. On the other hand the MD5 implementation of libmd is known to be 18-20% slower at least on x86 that that of libcrypto (probably due to its assembler implementation). I only can reliably reproduce that when checksumming files starting in the several hundreds MB range, at least when they are on disk. So in order to also see that slowdown with csup linked against libmd I guess you'd at least need some artificial setup with both server and client being on the LAN and having the repositories on memory backed disks, if at all possible. Using the libmd MD5 implementation for csup doesn't seem to have a real world impact though. > > If the openssl version is faster, then conditionalizing where to get md5 > is probably the right answer. > If we really cared about the MD5 performance of applications linked against libmd (including md5(1)), we should just optimize that MD5 implementation rather than working around it. Also for csup, fixing the problem that is causing it to fetch whole files over and over again likely would improve its performance way more than using a different MD5 implementation could do. Marius From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 10:58:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98DAC106566B; Mon, 26 Dec 2011 10:58:22 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87EA78FC08; Mon, 26 Dec 2011 10:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQAwMoj003652; Mon, 26 Dec 2011 10:58:22 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQAwMc7003650; Mon, 26 Dec 2011 10:58:22 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112261058.pBQAwMc7003650@svn.freebsd.org> From: Ed Schouten Date: Mon, 26 Dec 2011 10:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228897 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 10:58:22 -0000 Author: ed Date: Mon Dec 26 10:58:21 2011 New Revision: 228897 URL: http://svn.freebsd.org/changeset/base/228897 Log: The standard is now called C11 -- C12. While there, compare against the proper __STDC_VERSION value. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Mon Dec 26 09:07:08 2011 (r228896) +++ head/sys/sys/cdefs.h Mon Dec 26 10:58:21 2011 (r228897) @@ -223,7 +223,7 @@ #endif /* - * Keywords added in C1X. + * Keywords added in C11. */ #if defined(__cplusplus) && __cplusplus >= 201103L #define _Alignas(e) alignas(e) @@ -231,7 +231,7 @@ #define _Noreturn [[noreturn]] #define _Static_assert(e, s) static_assert(e, s) #define _Thread_local thread_local -#elif defined(__STDC_VERSION__) && __STDC_VERSION__ > 201000L +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* Do nothing. They are language keywords. */ #else /* Not supported. Implement them using our versions. */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 13:19:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 071CD1065672; Mon, 26 Dec 2011 13:19:57 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 890238FC23; Mon, 26 Dec 2011 13:19:56 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so9893802obb.13 for ; Mon, 26 Dec 2011 05:19:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; bh=uljutgHNRvMaFf49yv5mUdIP9MgTrFlEr9cZX73pt+U=; b=jh4qp8ur6lg8vgRlPjK1EjU0H5CxwyVSp/7SQdVqpvk5DZ/9ze/+2gOTXO/vEleZ/4 w6hcqG8CwJ5Hhh2gu70oPM5eqSPOZZAPbq8ekMVDHCjEpa4l0UIh/Gak51iEe6uDt1uv Ab6b+Iqx6+KhOUypbjQVAQnh8amOIGeMDVNgE= Received: by 10.50.51.199 with SMTP id m7mr26463999igo.23.1324903899872; Mon, 26 Dec 2011 04:51:39 -0800 (PST) Received: from triad.knownspace (216-15-41-8.c3-0.gth-ubr1.lnh-gth.md.cable.rcn.com. [216.15.41.8]) by mx.google.com with ESMTPS id gf6sm59851129igb.1.2011.12.26.04.51.38 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Dec 2011 04:51:39 -0800 (PST) Message-Id: <0AA7AB29-F489-4C8E-BA2A-85DC6788FFC6@gmail.com> From: Justin Hibbits To: Doug Barton In-Reply-To: <4EF812F4.9010902@FreeBSD.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 26 Dec 2011 07:50:16 -0500 References: <201112251429.pBPETawV062695@svn.freebsd.org> <4EF812F4.9010902@FreeBSD.org> X-Mailer: Apple Mail (2.936) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r228874 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 13:19:57 -0000 On Dec 26, 2011, at 1:23 AM, Doug Barton wrote: > On 12/25/2011 06:29, Bjoern A. Zeeb wrote: >> Author: bz >> Date: Sun Dec 25 14:29:36 2011 >> New Revision: 228874 >> URL: http://svn.freebsd.org/changeset/base/228874 >> >> Log: >> Quite the tinderbox for the holidays. Remove the assert[1]. > > Shouldn't "Why it's Ok to remove the assert" be part of this commit > log? When I suggested the removal, I didn't see it as necessary, and was just looking to quiet the build for now while I look closer. Right now, that code is never called, as it's only used when configured for sampling, and that code was originally just a copy from the hwpmc_amd driver. I will be finishing the sampling code in the new year. - Justin From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 16:47:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0956C1065672; Mon, 26 Dec 2011 16:47:46 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E7AA78FC12; Mon, 26 Dec 2011 16:47:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQGlj71014116; Mon, 26 Dec 2011 16:47:45 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQGljQR014114; Mon, 26 Dec 2011 16:47:45 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201112261647.pBQGljQR014114@svn.freebsd.org> From: Christian Brueffer Date: Mon, 26 Dec 2011 16:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228898 - head/sbin/dumpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 16:47:46 -0000 Author: brueffer Date: Mon Dec 26 16:47:45 2011 New Revision: 228898 URL: http://svn.freebsd.org/changeset/base/228898 Log: Add missing -l flag to usage(). PR: 163629 Submitted by: olgeni MFC after: 1 week Modified: head/sbin/dumpfs/dumpfs.c Modified: head/sbin/dumpfs/dumpfs.c ============================================================================== --- head/sbin/dumpfs/dumpfs.c Mon Dec 26 10:58:21 2011 (r228897) +++ head/sbin/dumpfs/dumpfs.c Mon Dec 26 16:47:45 2011 (r228898) @@ -499,6 +499,6 @@ ufserr(const char *name) static void usage(void) { - (void)fprintf(stderr, "usage: dumpfs [-fm] filesys | device\n"); + (void)fprintf(stderr, "usage: dumpfs [-flm] filesys | device\n"); exit(1); } From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 18:49:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C797C106564A; Mon, 26 Dec 2011 18:49:57 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1FDB8FC12; Mon, 26 Dec 2011 18:49:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQInv90017802; Mon, 26 Dec 2011 18:49:57 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQInvuc017800; Mon, 26 Dec 2011 18:49:57 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112261849.pBQInvuc017800@svn.freebsd.org> From: Ed Schouten Date: Mon, 26 Dec 2011 18:49:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228900 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 18:49:57 -0000 Author: ed Date: Mon Dec 26 18:49:56 2011 New Revision: 228900 URL: http://svn.freebsd.org/changeset/base/228900 Log: Add cdefs-magic to add optional C11 bits to headers. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Mon Dec 26 18:12:27 2011 (r228899) +++ head/sys/sys/cdefs.h Mon Dec 26 18:49:56 2011 (r228900) @@ -609,11 +609,16 @@ #define __XSI_VISIBLE 0 #define __BSD_VISIBLE 0 #define __ISO_C_VISIBLE 1999 +#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ +#define __POSIX_VISIBLE 0 +#define __XSI_VISIBLE 0 +#define __BSD_VISIBLE 0 +#define __ISO_C_VISIBLE 2011 #else /* Default environment: show everything. */ #define __POSIX_VISIBLE 200809 #define __XSI_VISIBLE 700 #define __BSD_VISIBLE 1 -#define __ISO_C_VISIBLE 1999 +#define __ISO_C_VISIBLE 2011 #endif #endif From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 18:55:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C7821065678; Mon, 26 Dec 2011 18:55:38 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77AA98FC1B; Mon, 26 Dec 2011 18:55:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQItcDX018017; Mon, 26 Dec 2011 18:55:38 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQItcbE018015; Mon, 26 Dec 2011 18:55:38 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112261855.pBQItcbE018015@svn.freebsd.org> From: Ed Schouten Date: Mon, 26 Dec 2011 18:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228901 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 18:55:38 -0000 Author: ed Date: Mon Dec 26 18:55:37 2011 New Revision: 228901 URL: http://svn.freebsd.org/changeset/base/228901 Log: Improve C11 bits in : - Add missing semicolon to quick_exit(), - Remove `func' parameter name from at_quick_exit(), - Fix indentation. - Compare against 2011 value. Modified: head/include/stdlib.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Mon Dec 26 18:49:56 2011 (r228900) +++ head/include/stdlib.h Mon Dec 26 18:55:37 2011 (r228901) @@ -151,11 +151,11 @@ _Noreturn void _Exit(int); /* * If we're in a mode greater than C99, expose C1x functions. */ -#if __ISO_C_VISIBLE > 1999 -_Noreturn void quick_exit(int) -int -at_quick_exit(void (*func)(void)); -#endif /* __ISO_C_VISIBLE > 1999 */ +#if __ISO_C_VISIBLE >= 2011 +_Noreturn void + quick_exit(int); +int at_quick_exit(void (*)(void)); +#endif /* __ISO_C_VISIBLE >= 2011 */ /* * Extensions made by POSIX relative to C. We don't know yet which edition * of POSIX made these extensions, so assume they've always been there until From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 18:58:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CB831065670; Mon, 26 Dec 2011 18:58:00 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 481578FC18; Mon, 26 Dec 2011 18:58:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQIw0kO018129; Mon, 26 Dec 2011 18:58:00 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQIw0P2018127; Mon, 26 Dec 2011 18:58:00 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112261858.pBQIw0P2018127@svn.freebsd.org> From: Ed Schouten Date: Mon, 26 Dec 2011 18:58:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228902 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 18:58:00 -0000 Author: ed Date: Mon Dec 26 18:57:59 2011 New Revision: 228902 URL: http://svn.freebsd.org/changeset/base/228902 Log: As per C11, add static_assert() to . Modified: head/include/assert.h Modified: head/include/assert.h ============================================================================== --- head/include/assert.h Mon Dec 26 18:55:37 2011 (r228901) +++ head/include/assert.h Mon Dec 26 18:57:59 2011 (r228902) @@ -57,7 +57,13 @@ #ifndef _ASSERT_H_ #define _ASSERT_H_ + +#if __ISO_C_VISIBLE >= 2011 && (!defined(__cplusplus) || __cplusplus < 201103L) +#define static_assert _Static_assert +#endif + __BEGIN_DECLS void __assert(const char *, const char *, int, const char *) __dead2; __END_DECLS + #endif /* !_ASSERT_H_ */ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 19:41:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB928106564A; Mon, 26 Dec 2011 19:41:46 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9704D8FC18; Mon, 26 Dec 2011 19:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQJfkO8019433; Mon, 26 Dec 2011 19:41:46 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQJfkqW019431; Mon, 26 Dec 2011 19:41:46 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112261941.pBQJfkqW019431@svn.freebsd.org> From: Adrian Chadd Date: Mon, 26 Dec 2011 19:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228903 - head/tools/tools/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 19:41:46 -0000 Author: adrian Date: Mon Dec 26 19:41:46 2011 New Revision: 228903 URL: http://svn.freebsd.org/changeset/base/228903 Log: Oops, my bad. Fix a broken thing I introduced earlier. Modified: head/tools/tools/ath/Makefile Modified: head/tools/tools/ath/Makefile ============================================================================== --- head/tools/tools/ath/Makefile Mon Dec 26 18:57:59 2011 (r228902) +++ head/tools/tools/ath/Makefile Mon Dec 26 19:41:46 2011 (r228903) @@ -1,7 +1,7 @@ # $FreeBSD$ SUBDIR= arcode athdebug athdecode athkey athpoke athprom athrd athregs -SUBDIR+= athstats ath_prom_read ath_radar +SUBDIR+= athstats ath_prom_read athradar SUBDIR+= ath_ee_v14_print ath_ee_v4k_print ath_ee_9287_print .include From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 20:32:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id D5AD5106564A; Mon, 26 Dec 2011 20:32:43 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 6C085150AF5; Mon, 26 Dec 2011 20:32:43 +0000 (UTC) Message-ID: <4EF8D9EB.9010506@FreeBSD.org> Date: Mon, 26 Dec 2011 12:32:43 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Justin Hibbits References: <201112251429.pBPETawV062695@svn.freebsd.org> <4EF812F4.9010902@FreeBSD.org> <0AA7AB29-F489-4C8E-BA2A-85DC6788FFC6@gmail.com> In-Reply-To: <0AA7AB29-F489-4C8E-BA2A-85DC6788FFC6@gmail.com> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, "Bjoern A. Zeeb" , src-committers@freebsd.org Subject: Re: svn commit: r228874 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 20:32:43 -0000 On 12/26/2011 04:50, Justin Hibbits wrote: > On Dec 26, 2011, at 1:23 AM, Doug Barton wrote: > >> On 12/25/2011 06:29, Bjoern A. Zeeb wrote: >>> Author: bz >>> Date: Sun Dec 25 14:29:36 2011 >>> New Revision: 228874 >>> URL: http://svn.freebsd.org/changeset/base/228874 >>> >>> Log: >>> Quite the tinderbox for the holidays. Remove the assert[1]. >> >> Shouldn't "Why it's Ok to remove the assert" be part of this commit log? > > When I suggested the removal, I didn't see it as necessary, and was just > looking to quiet the build for now while I look closer. Right now, that > code is never called, as it's only used when configured for sampling, > and that code was originally just a copy from the hwpmc_amd driver. I > will be finishing the sampling code in the new year. Thank you for the explanation. -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 20:43:27 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 8DC4B106566C; Mon, 26 Dec 2011 20:43:27 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id EB6AB1560A2; Mon, 26 Dec 2011 20:43:08 +0000 (UTC) Message-ID: <4EF8DC5B.9070404@FreeBSD.org> Date: Mon, 26 Dec 2011 12:43:07 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Marius Strobl References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> In-Reply-To: <20111226102820.GT90831@alchemy.franken.de> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 20:43:27 -0000 On 12/26/2011 02:28, Marius Strobl wrote: > On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: >> On 12/24/2011 04:16, Marius Strobl wrote: >>> On FreeBSD just use the MD5 implementation of libmd rather than that of >>> libcrypto so we don't need to relinquish csup when world is built without >>> OpenSSL. >> >> Did you benchmark this at all? I agree that keeping csup available >> absent openssl is a good goal, but csup is a prototypical "tool that >> does the same thing many thousands of times" so even tiny regressions >> could add up to a large cost in wall clock time. > > Well, in a real world test updating the same base on an amd64 machine > connected to the Internet Adding a network connection to the test is almost certainly going to obscure the results beyond utility. The appropriate way to test this would be to create a binary out of the md5 routine in csup, and link it alternately with libcrypto and libmd. Then for each version run it against the src tree (or ports, either way) 10 times. Discard the first and last, and then plot the results with ministat. > If we really cared about the MD5 performance of applications linked > against libmd (including md5(1)), we should just optimize that MD5 > implementation rather than working around it. If it turns out that it's slower, that's a valid option as long as it happens soon'ish. :) > Also for csup, fixing the problem that is causing it to fetch whole > files over and over again likely would improve its performance way > more than using a different MD5 implementation could do. "There are other problems with this program" is not a good reason to add a pessimization. But let's find out if it is a pessimization before we worry about that. Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 21:25:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6848C106566B; Mon, 26 Dec 2011 21:25:05 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 330A68FC19; Mon, 26 Dec 2011 21:25:03 +0000 (UTC) Received: by lahl5 with SMTP id l5so6173853lah.13 for ; Mon, 26 Dec 2011 13:25:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=2YRp/2sw3Qew6aI0GyA19oOxKC3csRWLhTO13H3dmOY=; b=H1q8GtUpy9Qky8jHuKp/B9C2xlOjOcTLq0ocrfqfHSt02E/3s6Wd0TP8BfVtv/CzfU oi4GGqevmIbqLu8ainrFI3Ete81561Z4ln43LhXVXyqq/JMeQ+2S81Zwj1M9ZmzfzoJM ATXIKTqHnF2ctgD+AV8MMWECK+NdXRbFJ01to= Received: by 10.152.104.6 with SMTP id ga6mr20463663lab.45.1324934701190; Mon, 26 Dec 2011 13:25:01 -0800 (PST) MIME-Version: 1.0 Received: by 10.152.129.8 with HTTP; Mon, 26 Dec 2011 13:24:30 -0800 (PST) In-Reply-To: <4EF8DC5B.9070404@FreeBSD.org> References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> From: Eitan Adler Date: Mon, 26 Dec 2011 16:24:30 -0500 Message-ID: To: Doug Barton Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Marius Strobl Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 21:25:05 -0000 On Mon, Dec 26, 2011 at 3:43 PM, Doug Barton wrote: > Then for each version run it > against the src tree (or ports, either way) 10 times. Discard the first > and last, and then plot the results with ministat. We discard the first to do warm cache benchmarks but why discard the last? Also see http://wiki.freebsd.org/BenchmarkAdvice?highlight=%28benchmarking%29 -- Eitan Adler From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 21:29:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id A17D01065670; Mon, 26 Dec 2011 21:29:16 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id DB96014EF45; Mon, 26 Dec 2011 21:29:15 +0000 (UTC) Message-ID: <4EF8E72B.10505@FreeBSD.org> Date: Mon, 26 Dec 2011 13:29:15 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Eitan Adler References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> In-Reply-To: X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 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, Marius Strobl Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 21:29:16 -0000 On 12/26/2011 13:24, Eitan Adler wrote: > On Mon, Dec 26, 2011 at 3:43 PM, Doug Barton wrote: >> Then for each version run it >> against the src tree (or ports, either way) 10 times. Discard the first >> and last, and then plot the results with ministat. > > We discard the first to do warm cache benchmarks but why discard the last? Because the East German judge is always too brutal. Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 21:51:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D6FD10657A9; Mon, 26 Dec 2011 21:51:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1615D8FC12; Mon, 26 Dec 2011 21:51:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQLpsnk023353; Mon, 26 Dec 2011 21:51:54 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQLprF2023340; Mon, 26 Dec 2011 21:51:53 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112262151.pBQLprF2023340@svn.freebsd.org> From: Ed Schouten Date: Mon, 26 Dec 2011 21:51:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228904 - in head: contrib/groff/tmac lib lib/libstdthreads X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 21:51:54 -0000 Author: ed Date: Mon Dec 26 21:51:53 2011 New Revision: 228904 URL: http://svn.freebsd.org/changeset/base/228904 Log: Add libstdthreads. This library implements the C11 threads interface on top of the pthreads library. As discussed on the lists, the preferred way to implement this, is as a separate library. It is unlikely that these functions will be used a lot in the future. It would have been easier if the C11 working group standardized (a subset of) pthreads and clock_nanosleep(). Having it as a separate library allows the embedded people to omit it from their system. Discussed on: arch@, threads@ Added: head/lib/libstdthreads/ head/lib/libstdthreads/Makefile (contents, props changed) head/lib/libstdthreads/Symbol.map (contents, props changed) head/lib/libstdthreads/call_once.c (contents, props changed) head/lib/libstdthreads/cnd.c (contents, props changed) head/lib/libstdthreads/mtx.c (contents, props changed) head/lib/libstdthreads/thrd.c (contents, props changed) head/lib/libstdthreads/thrd_create.3 (contents, props changed) head/lib/libstdthreads/threads.h (contents, props changed) head/lib/libstdthreads/tss.c (contents, props changed) Modified: head/contrib/groff/tmac/doc-syms head/contrib/groff/tmac/groff_mdoc.man head/lib/Makefile Modified: head/contrib/groff/tmac/doc-syms ============================================================================== --- head/contrib/groff/tmac/doc-syms Mon Dec 26 19:41:46 2011 (r228903) +++ head/contrib/groff/tmac/doc-syms Mon Dec 26 21:51:53 2011 (r228904) @@ -814,6 +814,7 @@ .ds doc-str-Lb-librt \*[Px] \*[doc-str-Lb]Real-time Library (librt, \-lrt) .ds doc-str-Lb-libsdp Bluetooth Service Discovery Protocol User Library (libsdp, \-lsdp) .ds doc-str-Lb-libssp Buffer Overflow Protection Library (libssp, \-lssp) +.ds doc-str-Lb-libstdthreads C11 Threads Library (libstdthreads, \-lstdthreads) .ds doc-str-Lb-libSystem System Library (libSystem, \-lSystem) .ds doc-str-Lb-libtermcap Termcap Access Library (libtermcap, \-ltermcap) .ds doc-str-Lb-libterminfo Terminal Information Library (libterminfo, \-lterminfo) Modified: head/contrib/groff/tmac/groff_mdoc.man ============================================================================== --- head/contrib/groff/tmac/groff_mdoc.man Mon Dec 26 19:41:46 2011 (r228903) +++ head/contrib/groff/tmac/groff_mdoc.man Mon Dec 26 21:51:53 2011 (r228904) @@ -1797,6 +1797,8 @@ and their results are: .Lb libsdp .It Li libssp .Lb libssp +.It Li libstdthreads +.Lb libstdthreads .It Li libSystem .Lb libSystem .It Li libtermcap Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Mon Dec 26 19:41:46 2011 (r228903) +++ head/lib/Makefile Mon Dec 26 21:51:53 2011 (r228904) @@ -101,6 +101,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libsmdb} \ ${_libsmutil} \ libstand \ + libstdthreads \ ${_libtelnet} \ ${_libthr} \ libthread_db \ Added: head/lib/libstdthreads/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/Makefile Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,41 @@ +# $FreeBSD$ + +LIB= stdthreads +SHLIB_MAJOR= 0 + +INCS= threads.h +SRCS= threads.h call_once.c cnd.c mtx.c thrd.c tss.c + +MAN= thrd_create.3 +MLINKS= thrd_create.3 call_once.3 \ + thrd_create.3 cnd_broadcast.3 \ + thrd_create.3 cnd_destroy.3 \ + thrd_create.3 cnd_init.3 \ + thrd_create.3 cnd_signal.3 \ + thrd_create.3 cnd_timedwait.3 \ + thrd_create.3 cnd_wait.3 \ + thrd_create.3 mtx_destroy.3 \ + thrd_create.3 mtx_init.3 \ + thrd_create.3 mtx_lock.3 \ + thrd_create.3 mtx_timedlock.3 \ + thrd_create.3 mtx_trylock.3 \ + thrd_create.3 mtx_unlock.3 \ + thrd_create.3 thrd_current.3 \ + thrd_create.3 thrd_detach.3 \ + thrd_create.3 thrd_equal.3 \ + thrd_create.3 thrd_exit.3 \ + thrd_create.3 thrd_join.3 \ + thrd_create.3 thrd_sleep.3 \ + thrd_create.3 thrd_yield.3 \ + thrd_create.3 tss_create.3 \ + thrd_create.3 tss_delete.3 \ + thrd_create.3 tss_get.3 \ + thrd_create.3 tss_set.3 + +DPADD= ${LIBPTHREAD} +LDADD= -lpthread + +VERSION_DEF= ${.CURDIR}/../libc/Versions.def +SYMBOL_MAPS= ${.CURDIR}/Symbol.map + +.include Added: head/lib/libstdthreads/Symbol.map ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/Symbol.map Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,31 @@ +/* + * $FreeBSD$ + */ + +FBSD_1.3 { + call_once; + cnd_broadcast; + cnd_destroy; + cnd_init; + cnd_signal; + cnd_timedwait; + cnd_wait; + mtx_destroy; + mtx_init; + mtx_lock; + mtx_timedlock; + mtx_trylock; + mtx_unlock; + thrd_create; + thrd_current; + thrd_detach; + thrd_equal; + thrd_exit; + thrd_join; + thrd_sleep; + thrd_yield; + tss_create; + tss_delete; + tss_get; + tss_set; +}; Added: head/lib/libstdthreads/call_once.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/call_once.c Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "threads.h" + +void +call_once(once_flag *flag, void (*func)(void)) +{ + + (void)pthread_once((pthread_once_t *)flag, func); +} + +_Static_assert(sizeof(once_flag) == sizeof(pthread_once_t), + "once_flag must be of the same size as pthread_once_t"); Added: head/lib/libstdthreads/cnd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/cnd.c Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,98 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "threads.h" + +int +cnd_broadcast(cnd_t *cond) +{ + + if (pthread_cond_broadcast(cond) != 0) + return (thrd_error); + return (thrd_success); +} + +void +cnd_destroy(cnd_t *cond) +{ + + (void)pthread_cond_destroy(cond); +} + +int +cnd_init(cnd_t *cond) +{ + + switch (pthread_cond_init(cond, NULL)) { + case 0: + return (thrd_success); + case ENOMEM: + return (thrd_nomem); + default: + return (thrd_error); + } +} + +int +cnd_signal(cnd_t *cond) +{ + + if (pthread_cond_signal(cond) != 0) + return (thrd_error); + return (thrd_success); +} + +int +cnd_timedwait(cnd_t *restrict cond, mtx_t *restrict mtx, + const struct timespec *restrict ts) +{ + + switch (pthread_cond_timedwait(cond, mtx, ts)) { + case 0: + return (thrd_success); + case ETIMEDOUT: + return (thrd_timedout); + default: + return (thrd_error); + } +} + +int +cnd_wait(cnd_t *cond, mtx_t *mtx) +{ + + if (pthread_cond_wait(cond, mtx) != 0) + return (thrd_error); + return (thrd_success); +} Added: head/lib/libstdthreads/mtx.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/mtx.c Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,116 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#include "threads.h" + +void +mtx_destroy(mtx_t *mtx) +{ + + (void)pthread_mutex_destroy(mtx); +} + +int +mtx_init(mtx_t *mtx, int type) +{ + pthread_mutexattr_t attr; + int mt; + + switch (type) { + case mtx_plain: + case mtx_timed: + mt = PTHREAD_MUTEX_NORMAL; + break; + case mtx_plain | mtx_recursive: + case mtx_timed | mtx_recursive: + mt = PTHREAD_MUTEX_RECURSIVE; + break; + default: + return (thrd_error); + } + + if (pthread_mutexattr_init(&attr) != 0) + return (thrd_error); + if (pthread_mutexattr_settype(&attr, mt) != 0) + return (thrd_error); + if (pthread_mutex_init(mtx, &attr) != 0) + return (thrd_error); + return (thrd_success); +} + +int +mtx_lock(mtx_t *mtx) +{ + + if (pthread_mutex_lock(mtx) != 0) + return (thrd_error); + return (thrd_success); +} + +int +mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts) +{ + + switch (pthread_mutex_timedlock(mtx, ts)) { + case 0: + return (thrd_success); + case ETIMEDOUT: + return (thrd_timedout); + default: + return (thrd_error); + } +} + +int +mtx_trylock(mtx_t *mtx) +{ + + switch (pthread_mutex_lock(mtx)) { + case 0: + return (thrd_success); + case EBUSY: + return (thrd_busy); + default: + return (thrd_error); + } +} + +int +mtx_unlock(mtx_t *mtx) +{ + + if (pthread_mutex_unlock(mtx) != 0) + return (thrd_error); + return (thrd_success); +} Added: head/lib/libstdthreads/thrd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/thrd.c Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,127 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include "threads.h" + +struct thrd_param { + thrd_start_t func; + void *arg; +}; + +static void * +thrd_entry(void *arg) +{ + struct thrd_param tp; + + tp = *(struct thrd_param *)arg; + free(arg); + return ((void *)(intptr_t)tp.func(tp.arg)); +} + +int +thrd_create(thrd_t *thr, thrd_start_t func, void *arg) +{ + struct thrd_param *tp; + + /* + * Work around return type inconsistency. Wrap execution using + * a function conforming to pthread_create()'s start_routine. + */ + tp = malloc(sizeof(*tp)); + if (tp == NULL) + return (thrd_nomem); + tp->func = func; + tp->arg = arg; + if (pthread_create(thr, NULL, thrd_entry, tp) != 0) { + free(tp); + return (thrd_error); + } + return (thrd_success); +} + +thrd_t +thrd_current(void) +{ + + return (pthread_self()); +} + +int +thrd_detach(thrd_t thr) +{ + + if (pthread_detach(thr) != 0) + return (thrd_error); + return (thrd_success); +} + +int +thrd_equal(thrd_t thr0, thrd_t thr1) +{ + + return (pthread_equal(thr0, thr1)); +} + +_Noreturn void +thrd_exit(int res) +{ + + pthread_exit((void *)(intptr_t)res); +} + +int +thrd_join(thrd_t thr, int *res) +{ + void *value_ptr; + + if (pthread_join(thr, &value_ptr) != 0) + return (thrd_error); + *res = (intptr_t)value_ptr; + return (thrd_success); +} + +int +thrd_sleep(const struct timespec *duration, struct timespec *remaining) +{ + + return (nanosleep(duration, remaining)); +} + +void +thrd_yield(void) +{ + + pthread_yield(); +} Added: head/lib/libstdthreads/thrd_create.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/thrd_create.3 Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,260 @@ +.\" Copyright (c) 2011 Ed Schouten +.\" 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 December 26, 2011 +.Dt THRD_CREATE 3 +.Os +.Sh NAME +.Nm call_once , +.Nm cnd_broadcast , +.Nm cnd_destroy , +.Nm cnd_init , +.Nm cnd_signal , +.Nm cnd_timedwait , +.Nm cnd_wait , +.Nm mtx_destroy , +.Nm mtx_init , +.Nm mtx_lock , +.Nm mtx_timedlock , +.Nm mtx_trylock , +.Nm mtx_unlock , +.Nm thrd_create , +.Nm thrd_current , +.Nm thrd_detach , +.Nm thrd_equal , +.Nm thrd_exit , +.Nm thrd_join , +.Nm thrd_sleep , +.Nm thrd_yield , +.Nm tss_create , +.Nm tss_delete , +.Nm tss_get , +.Nm tss_set +.Nd C11 threads interface +.Sh LIBRARY +.Lb libstdthreads +.Sh SYNOPSIS +.In threads.h +.Ft void +.Fn call_once "once_flag *flag" "void (*func)(void)" +.Ft int +.Fn cnd_broadcast "cnd_t *cond" +.Ft void +.Fn cnd_destroy "cnd_t *cond" +.Ft int +.Fn cnd_init "cnd_t *cond" +.Ft int +.Fn cnd_signal "cnd_t *cond" +.Ft int +.Fn cnd_timedwait "cnd_t * restrict cond" "mtx_t * restrict mtx" "const struct timespec * restrict ts" +.Ft int +.Fn cnd_wait "cnd_t *cond" "mtx_t *mtx" +.Ft void +.Fn mtx_destroy "mtx_t *mtx" +.Ft int +.Fn mtx_init "mtx_t *mtx" "int type" +.Ft int +.Fn mtx_lock "mtx_t *mtx" +.Ft int +.Fn mtx_timedlock "mtx_t * restrict mtx" "const struct timespec * restrict ts" +.Ft int +.Fn mtx_trylock "mtx_t *mtx" +.Ft int +.Fn mtx_unlock "mtx_t *mtx" +.Ft int +.Fn thrd_create "thrd_t *thr" "int (*func)(void *)" "void *arg" +.Ft thrd_t +.Fn thrd_current "void" +.Ft int +.Fn thrd_detach "thrd_t thr" +.Ft int +.Fn thrd_equal "thrd_t thr0" "thrd_t thr1" +.Ft _Noreturn void +.Fn thrd_exit "int res" +.Ft int +.Fn thrd_join "thrd_t thr" "int *res" +.Ft int +.Fn thrd_sleep "const struct timespec *duration" "struct timespec *remaining" +.Ft void +.Fn thrd_yield "void" +.Ft int +.Fn tss_create "tss_t *key" "void (*dtor)(void *)" +.Ft void +.Fn tss_delete "tss_t key" +.Ft void * +.Fn tss_get "tss_t key" +.Ft int +.Fn tss_set "tss_t key" "void *val" +.Sh DESCRIPTION +As of +.St -isoC-11 , +the C standard includes an API for writing multithreaded applications. +Since POSIX.1 already includes a threading API that is used by virtually +any multithreaded application, the interface provided by the C standard +can be considered superfluous. +.Pp +In this implementation, the threading interface is therefore implemented +as a light-weight layer on top of existing interfaces. +The functions to which these routines are mapped, are listed in the +following table. +Please refer to the documentation of the POSIX equivalent functions for +more information. +.Bl -column ".Fn mtx_timedlock" ".Xr pthread_mutex_timedlock 3" -offset indent +.It Em Function Ta Em POSIX equivalent +.It Fn call_once Ta Xr pthread_once 3 +.It Fn cnd_broadcast Ta Xr pthread_cond_broadcast 3 +.It Fn cnd_destroy Ta Xr pthread_cond_destroy 3 +.It Fn cnd_init Ta Xr pthread_cond_init 3 +.It Fn cnd_signal Ta Xr pthread_cond_signal 3 +.It Fn cnd_timedwait Ta Xr pthread_cond_timedwait 3 +.It Fn cnd_wait Ta Xr pthread_cond_wait 3 +.It Fn mtx_destroy Ta Xr pthread_mutex_destroy 3 +.It Fn mtx_init Ta Xr pthread_mutex_init 3 +.It Fn mtx_lock Ta Xr pthread_mutex_lock 3 +.It Fn mtx_timedlock Ta Xr pthread_mutex_timedlock 3 +.It Fn mtx_trylock Ta Xr pthread_mutex_trylock 3 +.It Fn mtx_unlock Ta Xr pthread_mutex_unlock 3 +.It Fn thrd_create Ta Xr pthread_create 3 +.It Fn thrd_current Ta Xr pthread_self 3 +.It Fn thrd_detach Ta Xr pthread_detach 3 +.It Fn thrd_equal Ta Xr pthread_equal 3 +.It Fn thrd_exit Ta Xr pthread_exit 3 +.It Fn thrd_join Ta Xr pthread_join 3 +.It Fn thrd_sleep Ta Xr nanosleep 2 +.It Fn thrd_yield Ta Xr pthread_yield 3 +.It Fn tss_create Ta Xr pthread_key_create 3 +.It Fn tss_delete Ta Xr pthread_key_delete 3 +.It Fn tss_get Ta Xr pthread_getspecific 3 +.It Fn tss_set Ta Xr pthread_setspecific 3 +.El +.Sh DIFFERENCES WITH POSIX EQUIVALENTS +The +.Fn thrd_exit +function returns an integer value to the thread calling +.Fn thrd_join , +whereas the +.Fn pthread_exit +function uses a pointer. +.Pp +The mutex created by +.Fn mtx_init +can be of +.Fa type +.Dv mtx_plain +or +.Dv mtx_timed +to distinguish between a mutex that supports +.Fn mtx_timedlock . +This type can be +.Em or'd +with +.Dv mtx_recursive +to create a mutex that allows recursive acquisition. +These properties are normally set using +.Fn pthread_mutex_init Ns 's +.Fa attr +parameter. +.Sh RETURN VALUES +If successful, the +.Fn cnd_broadcast , +.Fn cnd_init , +.Fn cnd_signal , +.Fn cnd_timedwait , +.Fn cnd_wait , +.Fn mtx_init , +.Fn mtx_lock , +.Fn mtx_timedlock , +.Fn mtx_trylock , +.Fn mtx_unlock , +.Fn thrd_create , +.Fn thrd_detach , +.Fn thrd_equal , +.Fn thrd_join , +.Fn thrd_sleep , +.Fn tss_create +and +.Fn tss_set +functions return +.Dv thrd_success . +Otherwise an error code will be returned to indicate the error. +.Pp +The +.Fn thrd_current +function returns the thread ID of the calling thread. +.Pp +The +.Fn tss_get +function returns the thread-specific data value associated with the +given +.Fa key . +If no thread-specific data value is associated with +.Fa key , +then the value NULL is returned. +.Sh ERRORS +The +.Fn cnd_init +and +.Fn thrd_create +functions will fail if: +.Bl -tag -width thrd_timedout +.It Dv thrd_nomem +The system has insufficient memory. +.El +.Pp +The +.Fn cnd_timedwait +and +.Fn mtx_timedlock +functions will fail if: +.Bl -tag -width thrd_timedout +.It Dv thrd_timedout +The system time has reached or exceeded the time specified in +.Fa ts +before the operation could be completed. +.El +.Pp +The +.Fn mtx_trylock +function will fail if: +.Bl -tag -width thrd_timedout +.It Dv thrd_busy +The mutex is already locked. +.El +.Pp +In all other cases, these functions may fail by returning general error +code +.Dv thrd_error . +.Sh SEE ALSO +.Xr nanosleep 2 , +.Xr pthread 3 +.Sh STANDARDS +These functions are expected to conform to +.St -isoC-11 . +.Sh HISTORY +These functions appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Ed Schouten Aq ed@FreeBSD.org Added: head/lib/libstdthreads/threads.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/threads.h Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,106 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * 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 _THREADS_H_ +#define _THREADS_H_ + +#include + +/* + * The C11 threads interface. + * + * This interface is implemented as a light-weight wrapper around + * . To prevent namespace pollution, the once_flag object, + * its corresponding ONCE_FLAG_INIT and TSS_DTOR_ITERATIONS have been + * copied from this header file. They must be kept in sync. + */ + +typedef struct pthread_cond *cnd_t; +typedef struct pthread_mutex *mtx_t; +typedef struct pthread *thrd_t; +typedef int tss_t; + +typedef struct { + int __state; + mtx_t __mutex; +} once_flag; + +typedef void (*tss_dtor_t)(void *); +typedef int (*thrd_start_t)(void *); + +enum { + mtx_plain = 0x1, + mtx_recursive = 0x2, + mtx_timed = 0x4 +}; + +enum { + thrd_busy = 1, + thrd_error = 2, + thrd_nomem = 3, + thrd_success = 4, + thrd_timedout = 5 +}; + +#if !defined(__cplusplus) || __cplusplus < 201103L +#define thread_local _Thread_local +#endif +#define ONCE_FLAG_INIT { 0, NULL } +#define TSS_DTOR_ITERATIONS 4 + +__BEGIN_DECLS +void call_once(once_flag *, void (*)(void)); +int cnd_broadcast(cnd_t *); +void cnd_destroy(cnd_t *); +int cnd_init(cnd_t *); +int cnd_signal(cnd_t *); +int cnd_timedwait(cnd_t *__restrict, mtx_t *__restrict, + const struct timespec *__restrict); +int cnd_wait(cnd_t *, mtx_t *); +void mtx_destroy(mtx_t *); +int mtx_init(mtx_t *, int); +int mtx_lock(mtx_t *); +int mtx_timedlock(mtx_t *__restrict, const struct timespec *__restrict); +int mtx_trylock(mtx_t *); +int mtx_unlock(mtx_t *); +int thrd_create(thrd_t *, thrd_start_t, void *); +thrd_t thrd_current(void); +int thrd_detach(thrd_t); +int thrd_equal(thrd_t, thrd_t); +_Noreturn void + thrd_exit(int); +int thrd_join(thrd_t, int *); +int thrd_sleep(const struct timespec *, struct timespec *); +void thrd_yield(void); +int tss_create(tss_t *, tss_dtor_t); +void tss_delete(tss_t); +void * tss_get(tss_t); +int tss_set(tss_t, void *); +__END_DECLS + +#endif /* !_THREADS_H_ */ Added: head/lib/libstdthreads/tss.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libstdthreads/tss.c Mon Dec 26 21:51:53 2011 (r228904) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +#include "threads.h" + +int +tss_create(tss_t *key, tss_dtor_t dtor) +{ + + if (pthread_key_create(key, dtor) != 0) + return (thrd_error); + return (thrd_success); +} + +void +tss_delete(tss_t key) +{ + + (void)pthread_key_delete(key); +} + +void * +tss_get(tss_t key) +{ + + return (pthread_getspecific(key)); +} + +int +tss_set(tss_t key, void *val) +{ + + if (pthread_setspecific(key, val) != 0) + return (thrd_error); + return (thrd_success); +} + +_Static_assert(TSS_DTOR_ITERATIONS == PTHREAD_DESTRUCTOR_ITERATIONS, + "TSS_DTOR_ITERATIONS must be identical to PTHREAD_DESTRUCTOR_ITERATIONS"); From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 22:25:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4DD9106566C; Mon, 26 Dec 2011 22:25:58 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCCCB8FC0A; Mon, 26 Dec 2011 22:25:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQMPwSN024609; Mon, 26 Dec 2011 22:25:58 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQMPwYJ024582; Mon, 26 Dec 2011 22:25:58 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112262225.pBQMPwYJ024582@svn.freebsd.org> From: Martin Matuska Date: Mon, 26 Dec 2011 22:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228905 - in vendor/libarchive/dist: . cpio libarchive libarchive/test libarchive_fe tar tar/test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 22:25:58 -0000 Author: mm Date: Mon Dec 26 22:25:58 2011 New Revision: 228905 URL: http://svn.freebsd.org/changeset/base/228905 Log: Update to vendor revision 3982 Obtained from: http://libarchive.googlecode.com/svn/release/2.8 Added: vendor/libarchive/dist/libarchive/test/test_compat_zip_2.zip.uu (contents, props changed) Modified: vendor/libarchive/dist/CMakeLists.txt vendor/libarchive/dist/cpio/bsdcpio.1 vendor/libarchive/dist/cpio/cmdline.c vendor/libarchive/dist/cpio/cpio.c vendor/libarchive/dist/cpio/cpio.h vendor/libarchive/dist/libarchive/archive.h vendor/libarchive/dist/libarchive/archive_entry.3 vendor/libarchive/dist/libarchive/archive_private.h vendor/libarchive/dist/libarchive/archive_read.3 vendor/libarchive/dist/libarchive/archive_read.c vendor/libarchive/dist/libarchive/archive_read_disk.3 vendor/libarchive/dist/libarchive/archive_read_disk.c vendor/libarchive/dist/libarchive/archive_read_extract.c vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c vendor/libarchive/dist/libarchive/archive_util.3 vendor/libarchive/dist/libarchive/archive_virtual.c vendor/libarchive/dist/libarchive/archive_write.3 vendor/libarchive/dist/libarchive/archive_write.c vendor/libarchive/dist/libarchive/archive_write_disk.3 vendor/libarchive/dist/libarchive/archive_write_disk.c vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c vendor/libarchive/dist/libarchive/cpio.5 vendor/libarchive/dist/libarchive/libarchive-formats.5 vendor/libarchive/dist/libarchive/libarchive.3 vendor/libarchive/dist/libarchive/tar.5 vendor/libarchive/dist/libarchive/test/test_acl_freebsd.c vendor/libarchive/dist/libarchive/test/test_compat_zip.c vendor/libarchive/dist/libarchive_fe/pathmatch.c vendor/libarchive/dist/tar/bsdtar.1 vendor/libarchive/dist/tar/read.c vendor/libarchive/dist/tar/test/test_option_s.c vendor/libarchive/dist/tar/tree.c vendor/libarchive/dist/tar/util.c vendor/libarchive/dist/tar/write.c Modified: vendor/libarchive/dist/CMakeLists.txt ============================================================================== --- vendor/libarchive/dist/CMakeLists.txt Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/CMakeLists.txt Mon Dec 26 22:25:58 2011 (r228905) @@ -857,12 +857,6 @@ INCLUDE_DIRECTORIES(BEFORE ${CMAKE_CURRE IF(MSVC) ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE) ENDIF(MSVC) -# Especially for early development, we want to be a little -# aggressive about diagnosing build problems; this can get -# relaxed somewhat in final shipping versions. -IF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") - ADD_DEFINITIONS(-Wall -Werror) -ENDIF ("CMAKE_C_COMPILER_ID" MATCHES "^GNU$") IF(ENABLE_TEST) ADD_CUSTOM_TARGET(run_all_tests) Modified: vendor/libarchive/dist/cpio/bsdcpio.1 ============================================================================== --- vendor/libarchive/dist/cpio/bsdcpio.1 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/cpio/bsdcpio.1 Mon Dec 26 22:25:58 2011 (r228905) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 21, 2007 +.Dd September 5, 2010 .Dt BSDCPIO 1 .Os .Sh NAME @@ -140,7 +140,7 @@ The POSIX.1 tar format. The default format is .Ar odc . See -.Xr libarchive_formats 5 +.Xr libarchive-formats 5 for more complete information about the formats currently supported by the underlying .Xr libarchive 3 @@ -295,7 +295,7 @@ for more information. .Sh EXAMPLES The .Nm -command is traditionally used to copy file heirarchies in conjunction +command is traditionally used to copy file hierarchies in conjunction with the .Xr find 1 command. Modified: vendor/libarchive/dist/cpio/cmdline.c ============================================================================== --- vendor/libarchive/dist/cpio/cmdline.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/cpio/cmdline.c Mon Dec 26 22:25:58 2011 (r228905) @@ -285,6 +285,8 @@ cpio_getopt(struct cpio *cpio) * A period can be used instead of the colon. * * Sets uid/gid return as appropriate, -1 indicates uid/gid not specified. + * TODO: If the spec uses uname/gname, then return those to the caller + * as well. If the spec provides uid/gid, just return names as NULL. * * Returns NULL if no error, otherwise returns error string for display. * Modified: vendor/libarchive/dist/cpio/cpio.c ============================================================================== --- vendor/libarchive/dist/cpio/cpio.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/cpio/cpio.c Mon Dec 26 22:25:58 2011 (r228905) @@ -273,15 +273,21 @@ main(int argc, char *argv[]) cpio->quiet = 1; break; case 'R': /* GNU cpio, also --owner */ + /* TODO: owner_parse should return uname/gname + * also; use that to set [ug]name_override. */ errmsg = owner_parse(cpio->optarg, &uid, &gid); if (errmsg) { lafe_warnc(-1, "%s", errmsg); usage(); } - if (uid != -1) + if (uid != -1) { cpio->uid_override = uid; - if (gid != -1) + cpio->uname_override = NULL; + } + if (gid != -1) { cpio->gid_override = gid; + cpio->gname_override = NULL; + } break; case 'r': /* POSIX 1997 */ cpio->option_rename = 1; @@ -575,10 +581,14 @@ file_to_archive(struct cpio *cpio, const return (r); } - if (cpio->uid_override >= 0) + if (cpio->uid_override >= 0) { archive_entry_set_uid(entry, cpio->uid_override); - if (cpio->gid_override >= 0) + archive_entry_set_uname(entry, cpio->uname_override); + } + if (cpio->gid_override >= 0) { archive_entry_set_gid(entry, cpio->gid_override); + archive_entry_set_gname(entry, cpio->gname_override); + } /* * Generate a destination path for this entry. Modified: vendor/libarchive/dist/cpio/cpio.h ============================================================================== --- vendor/libarchive/dist/cpio/cpio.h Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/cpio/cpio.h Mon Dec 26 22:25:58 2011 (r228905) @@ -68,7 +68,9 @@ struct cpio { size_t pass_destpath_alloc; char *pass_destpath; int uid_override; + char *uname_override; int gid_override; + char *gname_override; int day_first; /* true if locale prefers day/mon */ /* If >= 0, then close this when done. */ Modified: vendor/libarchive/dist/libarchive/archive.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive.h Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive.h Mon Dec 26 22:25:58 2011 (r228905) @@ -493,11 +493,10 @@ __LA_DECL void archive_read_extract_set /* Close the file and release most resources. */ __LA_DECL int archive_read_close(struct archive *); /* Release all resources and destroy the object. */ -/* Note that archive_read_finish will call archive_read_close for you. */ -#if ARCHIVE_VERSION_NUMBER < 2000000 -/* Erroneously declared to return void in libarchive 1.x */ -__LA_DECL void archive_read_finish(struct archive *); -#else +/* Note that archive_read_free will call archive_read_close for you. */ +__LA_DECL int archive_read_free(struct archive *); +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Synonym for archive_read_free() for backwards compatibility. */ __LA_DECL int archive_read_finish(struct archive *); #endif @@ -514,7 +513,7 @@ __LA_DECL int archive_read_finish(stru * - archive_write_header to write the header * - archive_write_data to write the entry data * 5) archive_write_close to close the output - * 6) archive_write_finish to cleanup the writer and release resources + * 6) archive_write_free to cleanup the writer and release resources */ __LA_DECL struct archive *archive_write_new(void); __LA_DECL int archive_write_set_bytes_per_block(struct archive *, @@ -595,13 +594,12 @@ __LA_DECL __LA_SSIZE_T archive_write_da #endif __LA_DECL int archive_write_finish_entry(struct archive *); __LA_DECL int archive_write_close(struct archive *); -#if ARCHIVE_VERSION_NUMBER < 2000000 -/* Return value was incorrect in libarchive 1.x. */ -__LA_DECL void archive_write_finish(struct archive *); -#else -/* Libarchive 2.x and later returns an error if this fails. */ -/* It can fail if the archive wasn't already closed, in which case - * archive_write_finish() will implicitly call archive_write_close(). */ + +/* This can fail if the archive wasn't already closed, in which case + * archive_write_free() will implicitly call archive_write_close(). */ +__LA_DECL int archive_write_free(struct archive *); +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* Synonym for archive_write_free() for backwards compatibility. */ __LA_DECL int archive_write_finish(struct archive *); #endif @@ -630,7 +628,7 @@ __LA_DECL int archive_write_set_options * - construct an appropriate struct archive_entry structure * - archive_write_header to create the file/dir/etc on disk * - archive_write_data to write the entry data - * 4) archive_write_finish to cleanup the writer and release resources + * 4) archive_write_free to cleanup the writer and release resources * * In particular, you can use this in conjunction with archive_read() * to pull entries out of an archive and create them on disk. Modified: vendor/libarchive/dist/libarchive/archive_entry.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_entry.3 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_entry.3 Mon Dec 26 22:25:58 2011 (r228905) @@ -25,7 +25,7 @@ .\" $FreeBSD: src/lib/libarchive/archive_entry.3,v 1.18 2008/05/26 17:00:22 kientzle Exp $ .\" .Dd May 12, 2008 -.Dt archive_entry 3 +.Dt ARCHIVE_ENTRY 3 .Os .Sh NAME .Nm archive_entry_acl_add_entry , Modified: vendor/libarchive/dist/libarchive/archive_private.h ============================================================================== --- vendor/libarchive/dist/libarchive/archive_private.h Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_private.h Mon Dec 26 22:25:58 2011 (r228905) @@ -58,7 +58,7 @@ struct archive_vtable { int (*archive_close)(struct archive *); - int (*archive_finish)(struct archive *); + int (*archive_free)(struct archive *); int (*archive_write_header)(struct archive *, struct archive_entry *); int (*archive_write_finish_entry)(struct archive *); Modified: vendor/libarchive/dist/libarchive/archive_read.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read.3 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read.3 Mon Dec 26 22:25:58 2011 (r228905) @@ -25,7 +25,7 @@ .\" $FreeBSD: head/lib/libarchive/archive_read.3 191595 2009-04-27 20:13:13Z kientzle $ .\" .Dd April 13, 2009 -.Dt archive_read 3 +.Dt ARCHIVE_READ 3 .Os .Sh NAME .Nm archive_read_new , @@ -69,7 +69,7 @@ .Nm archive_read_extract2 , .Nm archive_read_extract_set_progress_callback , .Nm archive_read_close , -.Nm archive_read_finish +.Nm archive_read_free .Nd functions for reading streaming archives .Sh SYNOPSIS .In archive.h @@ -196,7 +196,7 @@ .Ft int .Fn archive_read_close "struct archive *" .Ft int -.Fn archive_read_finish "struct archive *" +.Fn archive_read_free "struct archive *" .Sh DESCRIPTION These functions provide a complete API for reading streaming archives. The general process is to first create the @@ -457,7 +457,7 @@ object and the archive_entry object so t can be retrieved for the progress display. .It Fn archive_read_close Complete the archive and invoke the close callback. -.It Fn archive_read_finish +.It Fn archive_read_free Invokes .Fn archive_read_close if it was not invoked manually, then release all resources. @@ -600,7 +600,7 @@ list_archive(const char *name) printf("%s\en",archive_entry_pathname(entry)); archive_read_data_skip(a); } - archive_read_finish(a); + archive_read_free(a); free(mydata); } Modified: vendor/libarchive/dist/libarchive/archive_read.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read.c Mon Dec 26 22:25:58 2011 (r228905) @@ -60,7 +60,7 @@ static int choose_format(struct archive_ static int cleanup_filters(struct archive_read *); static struct archive_vtable *archive_read_vtable(void); static int _archive_read_close(struct archive *); -static int _archive_read_finish(struct archive *); +static int _archive_read_free(struct archive *); static struct archive_vtable * archive_read_vtable(void) @@ -69,7 +69,7 @@ archive_read_vtable(void) static int inited = 0; if (!inited) { - av.archive_finish = _archive_read_finish; + av.archive_free = _archive_read_free; av.archive_close = _archive_read_close; } return (&av); @@ -779,7 +779,7 @@ cleanup_filters(struct archive_read *a) * Release memory and other resources. */ static int -_archive_read_finish(struct archive *_a) +_archive_read_free(struct archive *_a) { struct archive_read *a = (struct archive_read *)_a; int i; @@ -787,7 +787,7 @@ _archive_read_finish(struct archive *_a) int r = ARCHIVE_OK; __archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_ANY, - "archive_read_finish"); + "archive_read_free"); if (a->archive.state != ARCHIVE_STATE_CLOSED) r = archive_read_close(&a->archive); Modified: vendor/libarchive/dist/libarchive/archive_read_disk.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk.3 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read_disk.3 Mon Dec 26 22:25:58 2011 (r228905) @@ -25,7 +25,7 @@ .\" $FreeBSD: head/lib/libarchive/archive_read_disk.3 190957 2009-04-12 05:04:02Z kientzle $ .\" .Dd March 10, 2009 -.Dt archive_read_disk 3 +.Dt ARCHIVE_READ_DISK 3 .Os .Sh NAME .Nm archive_read_disk_new , @@ -39,7 +39,7 @@ .Nm archive_read_disk_set_gname_lookup , .Nm archive_read_disk_set_standard_lookup , .Nm archive_read_close , -.Nm archive_read_finish +.Nm archive_read_free .Nd functions for reading objects from disk .Sh SYNOPSIS .In archive.h @@ -81,7 +81,7 @@ .Ft int .Fn archive_read_close "struct archive *" .Ft int -.Fn archive_read_finish "struct archive *" +.Fn archive_read_free "struct archive *" .Sh DESCRIPTION These functions provide an API for reading information about objects on disk. @@ -178,9 +178,9 @@ This affects the file ownership fields a object. .It Fn archive_read_close This currently does nothing. -.It Fn archive_write_finish +.It Fn archive_read_free Invokes -.Fn archive_write_close +.Fn archive_read_close if it was not invoked manually, then releases all resources. .El More information about the @@ -213,7 +213,7 @@ file_to_archive(struct archive *a, const while ((bytes_read = read(fd, buff, sizeof(buff))) > 0) archive_write_data(a, buff, bytes_read); archive_write_finish_entry(a); - archive_read_finish(ard); + archive_read_free(ard); archive_entry_free(entry); } .Ed @@ -276,7 +276,7 @@ and first appeared in The .Nm libarchive library was written by -.An Tim Kientzle Aq kientzle@freebsd.org . +.An Tim Kientzle Aq kientzle@FreeBSD.org . .Sh BUGS The .Dq standard Modified: vendor/libarchive/dist/libarchive/archive_read_disk.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_disk.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read_disk.c Mon Dec 26 22:25:58 2011 (r228905) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/ #include "archive_private.h" #include "archive_read_disk_private.h" -static int _archive_read_finish(struct archive *); +static int _archive_read_free(struct archive *); static int _archive_read_close(struct archive *); static const char *trivial_lookup_gname(void *, gid_t gid); static const char *trivial_lookup_uname(void *, uid_t uid); @@ -45,7 +45,7 @@ archive_read_disk_vtable(void) static int inited = 0; if (!inited) { - av.archive_finish = _archive_read_finish; + av.archive_free = _archive_read_free; av.archive_close = _archive_read_close; } return (&av); @@ -129,7 +129,7 @@ archive_read_disk_new(void) } static int -_archive_read_finish(struct archive *_a) +_archive_read_free(struct archive *_a) { struct archive_read_disk *a = (struct archive_read_disk *)_a; Modified: vendor/libarchive/dist/libarchive/archive_read_extract.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_extract.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read_extract.c Mon Dec 26 22:25:58 2011 (r228905) @@ -173,10 +173,7 @@ archive_read_extract_cleanup(struct arch { int ret = ARCHIVE_OK; -#if ARCHIVE_API_VERSION > 1 - ret = -#endif - archive_write_finish(a->extract->ad); + ret = archive_write_free(a->extract->ad); free(a->extract); a->extract = NULL; return (ret); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_cpio.c Mon Dec 26 22:25:58 2011 (r228905) @@ -42,6 +42,10 @@ __FBSDID("$FreeBSD: head/lib/libarchive/ #include "archive_private.h" #include "archive_read_private.h" +#ifdef _MSC_VER +#define __packed +#pragma pack(push, 1) +#endif struct cpio_bin_header { unsigned char c_magic[2]; unsigned char c_dev[2]; @@ -54,7 +58,7 @@ struct cpio_bin_header { unsigned char c_mtime[4]; unsigned char c_namesize[2]; unsigned char c_filesize[4]; -}; +} __packed; struct cpio_odc_header { char c_magic[6]; @@ -68,7 +72,7 @@ struct cpio_odc_header { char c_mtime[11]; char c_namesize[6]; char c_filesize[11]; -}; +} __packed; struct cpio_newc_header { char c_magic[6]; @@ -85,7 +89,12 @@ struct cpio_newc_header { char c_rdevminor[8]; char c_namesize[8]; char c_crc[8]; -}; +} __packed; + +#ifdef _MSC_VER +#undef __packed +#pragma pack(pop) +#endif struct links_entry { struct links_entry *next; Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Mon Dec 26 22:25:58 2011 (r228905) @@ -302,8 +302,6 @@ struct file_info { struct file_info *first; struct file_info **last; } rede_files; - /* To check a ininity loop. */ - struct file_info *loop_by; }; struct heap_queue { @@ -1799,26 +1797,82 @@ parse_file_info(struct archive_read *a, file->re = 0; parent->subdirs--; } else if (file->re) { - /* This file's parent is not rr_moved, clear invalid - * "RE" mark. */ - if (parent == NULL || parent->rr_moved == 0) - file->re = 0; - else if ((flags & 0x02) == 0) { - file->rr_moved_has_re_only = 0; - file->re = 0; + /* + * Sanity check: file's parent is rr_moved. + */ + if (parent == NULL || parent->rr_moved == 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge RE"); + return (NULL); + } + /* + * Sanity check: file does not have "CL" extension. + */ + if (file->cl_offset) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge RE and CL"); + return (NULL); + } + /* + * Sanity check: The file type must be a directory. + */ + if ((flags & 0x02) == 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge RE"); + return (NULL); } } else if (parent != NULL && parent->rr_moved) file->rr_moved_has_re_only = 0; else if (parent != NULL && (flags & 0x02) && (parent->re || parent->re_descendant)) file->re_descendant = 1; - if (file->cl_offset != 0) { + if (file->cl_offset) { + struct file_info *p; + + if (parent == NULL || parent->parent == NULL) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } + /* + * Sanity check: The file type must be a regular file. + */ + if ((flags & 0x02) != 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } parent->subdirs++; /* Overwrite an offset and a number of this "CL" entry * to appear before other dirs. "+1" to those is to * make sure to appear after "RE" entry which this * "CL" entry should be connected with. */ file->offset = file->number = file->cl_offset + 1; + + /* + * Sanity check: cl_offset does not point at its + * the parents or itself. + */ + for (p = parent; p; p = p->parent) { + if (p->offset == file->cl_offset) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } + } + if (file->cl_offset == file->offset || + parent->rr_moved) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } } } @@ -1922,6 +1976,13 @@ parse_rockridge(struct archive_read *a, */ break; } + if (p[0] == 'P' && p[1] == 'L') { + /* + * PL extension won't appear; + * contents are always ignored. + */ + break; + } if (p[0] == 'P' && p[1] == 'N') { if (version == 1 && data_length == 16) { file->rdev = toi(data,4); @@ -2697,15 +2758,12 @@ rede_add_entry(struct file_info *file) { struct file_info *re; + /* + * Find "RE" entry. + */ re = file->parent; - while (re != NULL && !re->re) { - /* Sanity check to prevent a infinity loop - * cause by a currupted iso file. */ - if (re->loop_by == file) - return (-1); - re->loop_by = file; + while (re != NULL && !re->re) re = re->parent; - } if (re == NULL) return (-1); Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_zip.c Mon Dec 26 22:25:58 2011 (r228905) @@ -128,6 +128,7 @@ static int archive_read_format_zip_read_ static int archive_read_format_zip_read_data_skip(struct archive_read *a); static int archive_read_format_zip_read_header(struct archive_read *, struct archive_entry *); +static int search_next_signature(struct archive_read *); static int zip_read_data_deflate(struct archive_read *a, const void **buff, size_t *size, off_t *offset); static int zip_read_data_none(struct archive_read *a, const void **buff, @@ -317,10 +318,17 @@ archive_read_format_zip_read_header(stru signature = (const char *)h; } + /* If we don't see a PK signature here, scan forward. */ if (signature[0] != 'P' || signature[1] != 'K') { - archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, - "Bad ZIP file"); - return (ARCHIVE_FATAL); + r = search_next_signature(a); + if (r != ARCHIVE_OK) { + archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, + "Bad ZIP file"); + return (ARCHIVE_FATAL); + } + if ((h = __archive_read_ahead(a, 4, NULL)) == NULL) + return (ARCHIVE_FATAL); + signature = (const char *)h; } /* @@ -375,6 +383,42 @@ archive_read_format_zip_read_header(stru } static int +search_next_signature(struct archive_read *a) +{ + const void *h; + const char *p, *q; + size_t skip; + ssize_t bytes; + int64_t skipped = 0; + + for (;;) { + h = __archive_read_ahead(a, 4, &bytes); + if (h == NULL) + return (ARCHIVE_FATAL); + p = h; + q = p + bytes; + + while (p + 4 <= q) { + if (p[0] == 'P' && p[1] == 'K') { + if ((p[2] == '\001' && p[3] == '\002') + || (p[2] == '\003' && p[3] == '\004') + || (p[2] == '\005' && p[3] == '\006') + || (p[2] == '\007' && p[3] == '\010') + || (p[2] == '0' && p[3] == '0')) { + skip = p - (const char *)h; + __archive_read_consume(a, skip); + return (ARCHIVE_OK); + } + } + ++p; + } + skip = p - (const char *)h; + __archive_read_consume(a, skip); + skipped += skip; + } +} + +static int zip_read_file_header(struct archive_read *a, struct archive_entry *entry, struct zip *zip) { @@ -888,6 +932,9 @@ process_extra(const void* extra, struct if (datasize >= 4) zip->gid = archive_le16dec(p + offset + 2); break; + case 0x7875: + /* Info-Zip Unix Extra Field (type 3) "ux". */ + break; default: break; } Modified: vendor/libarchive/dist/libarchive/archive_util.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_util.3 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_util.3 Mon Dec 26 22:25:58 2011 (r228905) @@ -25,7 +25,7 @@ .\" $FreeBSD: head/lib/libarchive/archive_util.3 201098 2009-12-28 02:58:14Z kientzle $ .\" .Dd January 8, 2005 -.Dt archive_util 3 +.Dt ARCHIVE_UTIL 3 .Os .Sh NAME .Nm archive_clear_error , Modified: vendor/libarchive/dist/libarchive/archive_virtual.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_virtual.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_virtual.c Mon Dec 26 22:25:58 2011 (r228905) @@ -42,26 +42,35 @@ archive_read_close(struct archive *a) return ((a->vtable->archive_close)(a)); } -#if ARCHIVE_API_VERSION > 1 int -archive_write_finish(struct archive *a) +archive_write_free(struct archive *a) { - return ((a->vtable->archive_finish)(a)); + return ((a->vtable->archive_free)(a)); } -#else -/* Temporarily allow library to compile with either 1.x or 2.0 API. */ -void + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* For backwards compatibility; will be removed with libarchive 4.0. */ +int archive_write_finish(struct archive *a) { - (void)(a->vtable->archive_finish)(a); + return ((a->vtable->archive_free)(a)); } #endif int +archive_read_free(struct archive *a) +{ + return ((a->vtable->archive_free)(a)); +} + +#if ARCHIVE_VERSION_NUMBER < 4000000 +/* For backwards compatibility; will be removed with libarchive 4.0. */ +int archive_read_finish(struct archive *a) { - return ((a->vtable->archive_finish)(a)); + return ((a->vtable->archive_free)(a)); } +#endif int archive_write_header(struct archive *a, struct archive_entry *entry) @@ -76,12 +85,7 @@ archive_write_finish_entry(struct archiv return ((a->vtable->archive_write_finish_entry)(a)); } -#if ARCHIVE_API_VERSION > 1 ssize_t -#else -/* Temporarily allow library to compile with either 1.x or 2.0 API. */ -int -#endif archive_write_data(struct archive *a, const void *buff, size_t s) { return ((a->vtable->archive_write_data)(a, buff, s)); Modified: vendor/libarchive/dist/libarchive/archive_write.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write.3 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_write.3 Mon Dec 26 22:25:58 2011 (r228905) @@ -25,7 +25,7 @@ .\" $FreeBSD: head/lib/libarchive/archive_write.3 201110 2009-12-28 03:31:29Z kientzle $ .\" .Dd May 11, 2008 -.Dt archive_write 3 +.Dt ARCHIVE_WRITE 3 .Os .Sh NAME .Nm archive_write_new , @@ -55,7 +55,7 @@ .Nm archive_write_data , .Nm archive_write_finish_entry , .Nm archive_write_close , -.Nm archive_write_finish +.Nm archive_write_free .Nd functions for creating archives .Sh SYNOPSIS .In archive.h @@ -125,7 +125,7 @@ .Ft int .Fn archive_write_close "struct archive *" .Ft int -.Fn archive_write_finish "struct archive *" +.Fn archive_write_free "struct archive *" .Sh DESCRIPTION These functions provide a complete API for creating streaming archive files. @@ -363,16 +363,16 @@ and as needed. .It Fn archive_write_close Complete the archive and invoke the close callback. -.It Fn archive_write_finish +.It Fn archive_write_free Invokes .Fn archive_write_close -if it was not invoked manually, then releases all resources. -Note that this function was declared to return -.Ft void -in libarchive 1.x, which made it impossible to detect errors when +if necessary, then releases all resources. +If you need detailed information about .Fn archive_write_close -was invoked implicitly from this function. -This is corrected beginning with libarchive 2.0. +failures, you should be careful to call it separately, as +you cannot obtain error information after +.Fn archive_write_free +returns. .El More information about the .Va struct archive @@ -529,7 +529,7 @@ write_archive(const char *outname, const archive_entry_free(entry); filename++; } - archive_write_finish(a); + archive_write_free(a); } int main(int argc, const char **argv) @@ -580,7 +580,7 @@ may include .Fn archive_write_data , .Fn archive_write_close , or -.Fn archive_write_finish . +.Fn archive_write_free . The client callback can call .Fn archive_set_error to provide values that can then be retrieved by Modified: vendor/libarchive/dist/libarchive/archive_write.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_write.c Mon Dec 26 22:25:58 2011 (r228905) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD: head/lib/libarchive/ static struct archive_vtable *archive_write_vtable(void); static int _archive_write_close(struct archive *); -static int _archive_write_finish(struct archive *); +static int _archive_write_free(struct archive *); static int _archive_write_header(struct archive *, struct archive_entry *); static int _archive_write_finish_entry(struct archive *); static ssize_t _archive_write_data(struct archive *, const void *, size_t); @@ -73,7 +73,7 @@ archive_write_vtable(void) if (!inited) { av.archive_close = _archive_write_close; - av.archive_finish = _archive_write_finish; + av.archive_free = _archive_write_free; av.archive_write_header = _archive_write_header; av.archive_write_finish_entry = _archive_write_finish_entry; av.archive_write_data = _archive_write_data; @@ -383,13 +383,13 @@ _archive_write_close(struct archive *_a) * Destroy the archive structure. */ static int -_archive_write_finish(struct archive *_a) +_archive_write_free(struct archive *_a) { struct archive_write *a = (struct archive_write *)_a; int r = ARCHIVE_OK; __archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC, - ARCHIVE_STATE_ANY, "archive_write_finish"); + ARCHIVE_STATE_ANY, "archive_write_free"); if (a->archive.state != ARCHIVE_STATE_CLOSED) r = archive_write_close(&a->archive); Modified: vendor/libarchive/dist/libarchive/archive_write_disk.3 ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk.3 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_write_disk.3 Mon Dec 26 22:25:58 2011 (r228905) @@ -25,7 +25,7 @@ .\" $FreeBSD: src/lib/libarchive/archive_write_disk.3,v 1.4 2008/09/04 05:22:00 kientzle Exp $ .\" .Dd August 5, 2008 -.Dt archive_write_disk 3 +.Dt ARCHIVE_WRITE_DISK 3 .Os .Sh NAME .Nm archive_write_disk_new , @@ -38,7 +38,7 @@ .Nm archive_write_data , .Nm archive_write_finish_entry , .Nm archive_write_close , -.Nm archive_write_finish +.Nm archive_write_free .Nd functions for creating objects on disk .Sh SYNOPSIS .In archive.h @@ -73,7 +73,7 @@ .Ft int .Fn archive_write_close "struct archive *" .Ft int -.Fn archive_write_finish "struct archive *" +.Fn archive_write_free "struct archive *" .Sh DESCRIPTION These functions provide a complete API for creating objects on disk from @@ -239,7 +239,7 @@ The .Nm library maintains a list of all such deferred attributes and sets them when this function is invoked. -.It Fn archive_write_finish +.It Fn archive_write_free Invokes .Fn archive_write_close if it was not invoked manually, then releases all resources. @@ -339,7 +339,7 @@ In particular, the directory .Pa aa is created as well as the final object .Pa bb . -In theory, this can be exploited to create an entire directory heirarchy +In theory, this can be exploited to create an entire directory hierarchy with a single request. Of course, this does not work if the .Cm ARCHIVE_EXTRACT_NODOTDOT @@ -371,5 +371,5 @@ compact implementation when appropriate. .Pp There should be a corresponding .Nm archive_read_disk -interface that walks a directory heirarchy and returns archive +interface that walks a directory hierarchy and returns archive entry objects. \ No newline at end of file Modified: vendor/libarchive/dist/libarchive/archive_write_disk.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_disk.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_write_disk.c Mon Dec 26 22:25:58 2011 (r228905) @@ -252,7 +252,7 @@ static ssize_t write_data_block(struct a static struct archive_vtable *archive_write_disk_vtable(void); static int _archive_write_close(struct archive *); -static int _archive_write_finish(struct archive *); +static int _archive_write_free(struct archive *); static int _archive_write_header(struct archive *, struct archive_entry *); static int _archive_write_finish_entry(struct archive *); static ssize_t _archive_write_data(struct archive *, const void *, size_t); @@ -291,7 +291,7 @@ archive_write_disk_vtable(void) if (!inited) { av.archive_close = _archive_write_close; - av.archive_finish = _archive_write_finish; + av.archive_free = _archive_write_free; av.archive_write_header = _archive_write_header; av.archive_write_finish_entry = _archive_write_finish_entry; av.archive_write_data = _archive_write_data; @@ -1295,7 +1295,7 @@ _archive_write_close(struct archive *_a) } static int -_archive_write_finish(struct archive *_a) +_archive_write_free(struct archive *_a) { struct archive_write_disk *a = (struct archive_write_disk *)_a; int ret; Modified: vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/archive_write_set_format_cpio.c Mon Dec 26 22:25:58 2011 (r228905) @@ -62,6 +62,11 @@ struct cpio { size_t ino_list_next; }; +#ifdef _MSC_VER +#define __packed +#pragma pack(push, 1) +#endif + struct cpio_header { char c_magic[6]; char c_dev[6]; @@ -74,7 +79,12 @@ struct cpio_header { char c_mtime[11]; char c_namesize[6]; char c_filesize[11]; -}; +} __packed; + +#ifdef _MSC_VER +#undef __packed +#pragma pack(pop) +#endif /* * Set output format to 'cpio' format. Modified: vendor/libarchive/dist/libarchive/cpio.5 ============================================================================== --- vendor/libarchive/dist/libarchive/cpio.5 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/cpio.5 Mon Dec 26 22:25:58 2011 (r228905) @@ -268,31 +268,6 @@ data, including ACLs and extended attrib entries in cpio archives. .Pp XXX Others? XXX -.Sh BUGS -The -.Dq CRC -format is mis-named, as it uses a simple checksum and -not a cyclic redundancy check. -.Pp -The old binary format is limited to 16 bits for user id, -group id, device, and inode numbers. -It is limited to 4 gigabyte file sizes. -.Pp -The old ASCII format is limited to 18 bits for -the user id, group id, device, and inode numbers. -It is limited to 8 gigabyte file sizes. -.Pp -The new ASCII format is limited to 4 gigabyte file sizes. -.Pp -None of the cpio formats store user or group names, -which are essential when moving files between systems with -dissimilar user or group numbering. -.Pp -Especially when writing older cpio variants, it may be necessary -to map actual device/inode values to synthesized values that -fit the available fields. -With very large filesystems, this may be necessary even for -the newer formats. .Sh SEE ALSO .Xr cpio 1 , .Xr tar 5 @@ -323,3 +298,28 @@ license. The character format was adopted as part of .St -p1003.1-88 . XXX when did "newc" appear? Who invented it? When did HP come out with their variant? When did Sun introduce ACLs and extended attributes? XXX +.Sh BUGS +The +.Dq CRC +format is mis-named, as it uses a simple checksum and +not a cyclic redundancy check. +.Pp +The old binary format is limited to 16 bits for user id, +group id, device, and inode numbers. +It is limited to 4 gigabyte file sizes. +.Pp +The old ASCII format is limited to 18 bits for +the user id, group id, device, and inode numbers. +It is limited to 8 gigabyte file sizes. +.Pp +The new ASCII format is limited to 4 gigabyte file sizes. +.Pp +None of the cpio formats store user or group names, +which are essential when moving files between systems with +dissimilar user or group numbering. +.Pp +Especially when writing older cpio variants, it may be necessary +to map actual device/inode values to synthesized values that +fit the available fields. +With very large filesystems, this may be necessary even for +the newer formats. Modified: vendor/libarchive/dist/libarchive/libarchive-formats.5 ============================================================================== --- vendor/libarchive/dist/libarchive/libarchive-formats.5 Mon Dec 26 21:51:53 2011 (r228904) +++ vendor/libarchive/dist/libarchive/libarchive-formats.5 Mon Dec 26 22:25:58 2011 (r228905) @@ -25,7 +25,7 @@ .\" $FreeBSD: head/lib/libarchive/libarchive-formats.5 201077 2009-12-28 01:50:23Z kientzle $ .\" .Dd December 27, 2009 -.Dt libarchive-formats 5 +.Dt LIBARCHIVE-FORMATS 5 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 22:51:45 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C8DE106564A; Mon, 26 Dec 2011 22:51:45 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id BACCB8FC0C; Mon, 26 Dec 2011 22:51:44 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBQMpasl079924; Mon, 26 Dec 2011 14:51:36 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBQMpagX079923; Mon, 26 Dec 2011 14:51:36 -0800 (PST) (envelope-from sgk) Date: Mon, 26 Dec 2011 14:51:36 -0800 From: Steve Kargl To: Doug Barton Message-ID: <20111226225136.GA79882@troutmask.apl.washington.edu> References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF8DC5B.9070404@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Marius Strobl Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 22:51:45 -0000 On Mon, Dec 26, 2011 at 12:43:07PM -0800, Doug Barton wrote: > On 12/26/2011 02:28, Marius Strobl wrote: > > On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: > >> On 12/24/2011 04:16, Marius Strobl wrote: > >>> On FreeBSD just use the MD5 implementation of libmd rather than that of > >>> libcrypto so we don't need to relinquish csup when world is built without > >>> OpenSSL. > >> > >> Did you benchmark this at all? I agree that keeping csup available > >> absent openssl is a good goal, but csup is a prototypical "tool that > >> does the same thing many thousands of times" so even tiny regressions > >> could add up to a large cost in wall clock time. > > > > Well, in a real world test updating the same base on an amd64 machine > > connected to the Internet > > Adding a network connection to the test is almost certainly going to > obscure the results beyond utility. Given that the majority of FreeBSD users will be pulling code from the internet, this seems to be the most relevant test. > The appropriate way to test this > would be to create a binary out of the md5 routine in csup, and link it > alternately with libcrypto and libmd. Then for each version run it > against the src tree (or ports, either way) 10 times. Discard the first > and last, and then plot the results with ministat. The proper way to test the libmd vs libcrypto versions of the md5 routines is to use a profiler. Of course, one might ask the question on how the use of libmd effects the majority of FreeBSD users (ie., not FreeBSD developers). Does the majority run csup hourly? Daily? Weekly? For a utility seldomly run be the majority of FreeBSD users, Doug, you seem to be wasting Marius's time. -- Steve From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 23:27:42 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 57691106566B; Mon, 26 Dec 2011 23:27:42 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9F6E114ECC2; Mon, 26 Dec 2011 23:27:39 +0000 (UTC) Message-ID: <4EF902EB.5050009@FreeBSD.org> Date: Mon, 26 Dec 2011 15:27:39 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Steve Kargl References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> <20111226225136.GA79882@troutmask.apl.washington.edu> In-Reply-To: <20111226225136.GA79882@troutmask.apl.washington.edu> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 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, Marius Strobl Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 23:27:42 -0000 On 12/26/2011 14:51, Steve Kargl wrote: > On Mon, Dec 26, 2011 at 12:43:07PM -0800, Doug Barton wrote: >> On 12/26/2011 02:28, Marius Strobl wrote: >>> On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: >>>> On 12/24/2011 04:16, Marius Strobl wrote: >>>>> On FreeBSD just use the MD5 implementation of libmd rather than that of >>>>> libcrypto so we don't need to relinquish csup when world is built without >>>>> OpenSSL. >>>> >>>> Did you benchmark this at all? I agree that keeping csup available >>>> absent openssl is a good goal, but csup is a prototypical "tool that >>>> does the same thing many thousands of times" so even tiny regressions >>>> could add up to a large cost in wall clock time. >>> >>> Well, in a real world test updating the same base on an amd64 machine >>> connected to the Internet >> >> Adding a network connection to the test is almost certainly going to >> obscure the results beyond utility. > > Given that the majority of FreeBSD users will be pulling code > from the internet, this seems to be the most relevant test. Sorry if I wasn't clear. The change was to how the md5 portion of csup is linked. In order to isolate the effects of that change you have to remove everything that isn't related to that change. But this is regression testing 101, so I'm sure that you know that already. >> The appropriate way to test this >> would be to create a binary out of the md5 routine in csup, and link it >> alternately with libcrypto and libmd. Then for each version run it >> against the src tree (or ports, either way) 10 times. Discard the first >> and last, and then plot the results with ministat. > > The proper way to test the libmd vs libcrypto versions of > the md5 routines is to use a profiler. That'll give you a good view of where the performance bottlenecks are if it turns out that libmd is actually slower, sure. But the interesting question in terms of this change is the effect on wall clock time, since that's what users are going to see. > Of course, one might ask the question on how the use of > libmd effects the majority of FreeBSD users (ie., not FreeBSD > developers). Does the majority run csup hourly? Daily? > Weekly? For those that use csup, I imagine that they use it at least daily. But that's not the point. > For a utility seldomly run be the majority of FreeBSD > users, Doug, you seem to be wasting Marius's time. How often it's used isn't really relevant to whether or not introducing a pessimization is worth it. In any case I didn't ask him to back it out, I only asked to have it be an option if it turns out that libmd is slower. I understand that what you're really trying to do here is to take a shot at me relative to my assertion that profiled libs should be off by default. If you're going to respond in kind to every message I send it's going to get boring really quick. Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Mon Dec 26 23:33:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D66A1106566B; Mon, 26 Dec 2011 23:33:41 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6B328FC0A; Mon, 26 Dec 2011 23:33:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBQNXfGo026721; Mon, 26 Dec 2011 23:33:41 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBQNXflx026719; Mon, 26 Dec 2011 23:33:41 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112262333.pBQNXflx026719@svn.freebsd.org> From: Ed Schouten Date: Mon, 26 Dec 2011 23:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228906 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 26 Dec 2011 23:33:41 -0000 Author: ed Date: Mon Dec 26 23:33:41 2011 New Revision: 228906 URL: http://svn.freebsd.org/changeset/base/228906 Log: Fix some bugs in . - Make atomic_init() work for GCC, as assigning to structs doesn't work. - Fix misplaced parenthesis in atomic_is_lock_free() for GCC. - Make atomic_compare_exchange_strong() for GCC return the proper boolean value, whether object == expected. - Fix argument passing in atomic_exchange_explicit() for GCC. Modified: head/include/stdatomic.h Modified: head/include/stdatomic.h ============================================================================== --- head/include/stdatomic.h Mon Dec 26 22:25:58 2011 (r228905) +++ head/include/stdatomic.h Mon Dec 26 23:33:41 2011 (r228906) @@ -54,7 +54,9 @@ #define atomic_init(obj, value) __atomic_init(obj, value) #elif defined(__GNUC_ATOMICS) #define ATOMIC_VAR_INIT(value) { .__val = (value) } -#define atomic_init(obj, value) (obj = ATOMIC_VAR_INIT(value)) +#define atomic_init(obj, value) do { \ + (obj)->__val = (value); \ +} while (0) #endif /* @@ -116,7 +118,7 @@ enum memory_order { #if defined(__CLANG_ATOMICS) #define atomic_is_lock_free(obj) __atomic_is_lock_free(obj) #elif defined(__GNUC_ATOMICS) -#define atomic_is_lock_free(obj) (sizeof((obj->__val)) <= sizeof(void *)) +#define atomic_is_lock_free(obj) (sizeof((obj)->__val) <= sizeof(void *)) #endif /* @@ -200,12 +202,13 @@ typedef _Atomic(__uintmax_t) atomic_uin #define atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) ({ \ __typeof__((object)->__val) __v; \ - __v = \ - __sync_val_compare_and_swap((__typeof(&((object)->__val)))object,\ - *expected, desired); \ - *expected = __v; \ - (*expected == __v); \ - }) + _Bool __r; \ + __v = __sync_val_compare_and_swap(&(object)->__val, \ + *(expected), desired); \ + __r = *(expected) == __v; \ + *(expected) = __v; \ + __r; \ +}) #define atomic_compare_exchange_weak_explicit(object, expected, \ desired, success, failure) \ @@ -223,7 +226,7 @@ typedef _Atomic(__uintmax_t) atomic_uin */ #define atomic_exchange_explicit(object, desired, order) ({ \ __typeof__((object)->__val) __v; \ - __v = __sync_lock_test_and_set(object, desired); \ + __v = __sync_lock_test_and_set(&(object)->__val, desired); \ __sync_synchronize(); \ __v; \ }) From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 00:09:23 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B76D9106564A; Tue, 27 Dec 2011 00:09:23 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 888E38FC0C; Tue, 27 Dec 2011 00:09:23 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBR09FRk080225; Mon, 26 Dec 2011 16:09:15 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBR09FLU080224; Mon, 26 Dec 2011 16:09:15 -0800 (PST) (envelope-from sgk) Date: Mon, 26 Dec 2011 16:09:15 -0800 From: Steve Kargl To: Doug Barton Message-ID: <20111227000915.GA80162@troutmask.apl.washington.edu> References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> <20111226225136.GA79882@troutmask.apl.washington.edu> <4EF902EB.5050009@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF902EB.5050009@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Marius Strobl Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 00:09:23 -0000 On Mon, Dec 26, 2011 at 03:27:39PM -0800, Doug Barton wrote: > On 12/26/2011 14:51, Steve Kargl wrote: > > On Mon, Dec 26, 2011 at 12:43:07PM -0800, Doug Barton wrote: > >> On 12/26/2011 02:28, Marius Strobl wrote: > >>> On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: > >>>> On 12/24/2011 04:16, Marius Strobl wrote: > >>>>> On FreeBSD just use the MD5 implementation of libmd rather than that of > >>>>> libcrypto so we don't need to relinquish csup when world is built without > >>>>> OpenSSL. > >>>> > >>>> Did you benchmark this at all? I agree that keeping csup available > >>>> absent openssl is a good goal, but csup is a prototypical "tool that > >>>> does the same thing many thousands of times" so even tiny regressions > >>>> could add up to a large cost in wall clock time. > >>> > >>> Well, in a real world test updating the same base on an amd64 machine > >>> connected to the Internet > >> > >> Adding a network connection to the test is almost certainly going to > >> obscure the results beyond utility. > > > > Given that the majority of FreeBSD users will be pulling code > > from the internet, this seems to be the most relevant test. > > Sorry if I wasn't clear. The change was to how the md5 portion of csup > is linked. In order to isolate the effects of that change you have to > remove everything that isn't related to that change. > > But this is regression testing 101, so I'm sure that you know that already. If 99% of the usage of csup goes over the internet and 95% of the execution time (as determined by a profiler) involves dealing with network, then worrying about libmd vs libcrypto is a waste of time. If you're concerned about performance, then find the bottlenecks for that most common usage pattern. Micro-optimizing a synthetic usage case is a waste of time. > >> The appropriate way to test this > >> would be to create a binary out of the md5 routine in csup, and link it > >> alternately with libcrypto and libmd. Then for each version run it > >> against the src tree (or ports, either way) 10 times. Discard the first > >> and last, and then plot the results with ministat. > > > > The proper way to test the libmd vs libcrypto versions of > > the md5 routines is to use a profiler. > > That'll give you a good view of where the performance bottlenecks are if > it turns out that libmd is actually slower, sure. But the interesting > question in terms of this change is the effect on wall clock time, since > that's what users are going to see. > > > Of course, one might ask the question on how the use of > > libmd effects the majority of FreeBSD users (ie., not FreeBSD > > developers). Does the majority run csup hourly? Daily? > > Weekly? > > For those that use csup, I imagine that they use it at least daily. But > that's not the point. > > > For a utility seldomly run be the majority of FreeBSD > > users, Doug, you seem to be wasting Marius's time. > > How often it's used isn't really relevant to whether or not introducing > a pessimization is worth it. In any case I didn't ask him to back it > out, I only asked to have it be an option if it turns out that libmd is > slower. Yes, I know you did not ask him to back out his change. You asked him if he measured the impact on performance with that implication that he should run some performance test. Marius ran additional tests (wasting his time) to answer your question. Your response was essentially, "well, your really need to do the test this way (ie., no internet)", with the obvious implication of "please go do your test again." > I understand that what you're really trying to do here is to take a shot > at me relative to my assertion that profiled libs should be off by > default. If you're going to respond in kind to every message I send it's > going to get boring really quick. Nope. I'm concerned that your wasting valuable developer time. If you were really concerned with the performance, I suspect that you know how to do the tests you have asked of Marius. Now, let's read his commit message: On FreeBSD just use the MD5 implementation of libmd rather than that of libcrypto so we don't need to relinquish csup when world is built without OpenSSL. His change actually allows FreeBSD users to use csup if they are in a situation where WITHOUT_CRYPTO and/or WITHOUT_OPENSSL is required. Yes, I know you want him to waste his time to come up with the perfect patch with Makefile magic to find libcrypto and fall back to libmd. If you're really concerned about performance I'm fairly certain that Marius would be willing to review your Makefile magic patch. -- Steve From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 00:24:14 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 62FF5106566B; Tue, 27 Dec 2011 00:24:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9E30A152C4B; Tue, 27 Dec 2011 00:24:13 +0000 (UTC) Message-ID: <4EF9102C.6010606@FreeBSD.org> Date: Mon, 26 Dec 2011 16:24:12 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Steve Kargl References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> <20111226225136.GA79882@troutmask.apl.washington.edu> <4EF902EB.5050009@FreeBSD.org> <20111227000915.GA80162@troutmask.apl.washington.edu> In-Reply-To: <20111227000915.GA80162@troutmask.apl.washington.edu> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 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, Marius Strobl Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 00:24:14 -0000 On 12/26/2011 16:09, Steve Kargl wrote: > On Mon, Dec 26, 2011 at 03:27:39PM -0800, Doug Barton wrote: >> On 12/26/2011 14:51, Steve Kargl wrote: >>> On Mon, Dec 26, 2011 at 12:43:07PM -0800, Doug Barton wrote: >>>> On 12/26/2011 02:28, Marius Strobl wrote: >>>>> On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: >>>>>> On 12/24/2011 04:16, Marius Strobl wrote: >>>>>>> On FreeBSD just use the MD5 implementation of libmd rather than that of >>>>>>> libcrypto so we don't need to relinquish csup when world is built without >>>>>>> OpenSSL. >>>>>> >>>>>> Did you benchmark this at all? I agree that keeping csup available >>>>>> absent openssl is a good goal, but csup is a prototypical "tool that >>>>>> does the same thing many thousands of times" so even tiny regressions >>>>>> could add up to a large cost in wall clock time. >>>>> >>>>> Well, in a real world test updating the same base on an amd64 machine >>>>> connected to the Internet >>>> >>>> Adding a network connection to the test is almost certainly going to >>>> obscure the results beyond utility. >>> >>> Given that the majority of FreeBSD users will be pulling code >>> from the internet, this seems to be the most relevant test. >> >> Sorry if I wasn't clear. The change was to how the md5 portion of csup >> is linked. In order to isolate the effects of that change you have to >> remove everything that isn't related to that change. >> >> But this is regression testing 101, so I'm sure that you know that already. > > If 99% of the usage of csup goes over the internet and 95% of the > execution time (as determined by a profiler) involves dealing with > network, Those are both completely theoretical of course. > then worrying about libmd vs libcrypto is a waste of time. This is really getting boring now. If a change makes performance worse it shouldn't be made without a really good reason. There is absolutely nothing controversial about that. > Yes, I know you did not ask him to back out his change. You asked > him if he measured the impact on performance with that implication > that he should run some performance test. Marius ran additional > tests (wasting his time) to answer your question. Your response > was essentially, "well, your really need to do the test this way > (ie., no internet)", with the obvious implication of "please go > do your test again." If Marius was confused about what I was asking him to test, or he didn't understand how to properly test his change, he should have asked. The fact that he did some kind of test that didn't actually demonstrate anything useful isn't my problem. >> I understand that what you're really trying to do here is to take a shot >> at me relative to my assertion that profiled libs should be off by >> default. If you're going to respond in kind to every message I send it's >> going to get boring really quick. > > Nope. I'm concerned that your wasting valuable developer time. And I'm concerned about wasting the time of every FreeBSD user that uses csup. > If you > were really concerned with the performance, I suspect that you know > how to do the tests you have asked of Marius. I'm not the one proposing to make the change, he is. It's up to HIM to demonstrate that his change is moving us in the right direction. > Now, let's read his commit message: > > On FreeBSD just use the MD5 implementation of libmd rather than > that of libcrypto so we don't need to relinquish csup when world > is built without OpenSSL. I read his commit message, I understand what he's trying to accomplish. > His change actually allows FreeBSD users to use csup if they are > in a situation where WITHOUT_CRYPTO and/or WITHOUT_OPENSSL is > required. Personally I've never seen anyone mention this as a problem. > Yes, I know you want him to waste his time to come > up with the perfect patch with Makefile magic to find libcrypto > and fall back to libmd. If you're really concerned about > performance I'm fairly certain that Marius would be willing > to review your Makefile magic patch. You're still missing the fundamental point that the person proposing the change is the one who needs to demonstrate that the change is the right way to go. Imagine that the scenario was reversed. You would no doubt be demanding that I provide extensive evidence that my change was correct. Doug -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 10:16:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F227A106564A; Tue, 27 Dec 2011 10:16:24 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DFB638FC13; Tue, 27 Dec 2011 10:16:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRAGON2048397; Tue, 27 Dec 2011 10:16:24 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRAGOKl048388; Tue, 27 Dec 2011 10:16:24 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201112271016.pBRAGOKl048388@svn.freebsd.org> From: Michael Tuexen Date: Tue, 27 Dec 2011 10:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228907 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 10:16:25 -0000 Author: tuexen Date: Tue Dec 27 10:16:24 2011 New Revision: 228907 URL: http://svn.freebsd.org/changeset/base/228907 Log: Address issues found by clang. While there, fix also some style issues. MFC after: 3 months. Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_auth.c head/sys/netinet/sctp_cc_functions.c head/sys/netinet/sctp_constants.h head/sys/netinet/sctp_indata.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_ss_functions.c head/sys/netinet/sctp_sysctl.c head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_usrreq.c head/sys/netinet/sctp_var.h head/sys/netinet/sctputil.c head/sys/netinet6/sctp6_usrreq.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Mon Dec 26 23:33:41 2011 (r228906) +++ head/sys/netinet/sctp_asconf.c Tue Dec 27 10:16:24 2011 (r228907) @@ -138,7 +138,7 @@ sctp_asconf_success_response(uint32_t id if (m_reply == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "asconf_success_response: couldn't get mbuf!\n"); - return NULL; + return (NULL); } aph = mtod(m_reply, struct sctp_asconf_paramhdr *); aph->correlation_id = id; @@ -147,7 +147,7 @@ sctp_asconf_success_response(uint32_t id SCTP_BUF_LEN(m_reply) = aph->ph.param_length; aph->ph.param_length = htons(aph->ph.param_length); - return m_reply; + return (m_reply); } static struct mbuf * @@ -166,7 +166,7 @@ sctp_asconf_error_response(uint32_t id, if (m_reply == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "asconf_error_response: couldn't get mbuf!\n"); - return NULL; + return (NULL); } aph = mtod(m_reply, struct sctp_asconf_paramhdr *); error = (struct sctp_error_cause *)(aph + 1); @@ -183,7 +183,7 @@ sctp_asconf_error_response(uint32_t id, "asconf_error_response: tlv_length (%xh) too big\n", tlv_length); sctp_m_freem(m_reply); /* discard */ - return NULL; + return (NULL); } if (error_tlv != NULL) { tlv = (uint8_t *) (error + 1); @@ -193,7 +193,7 @@ sctp_asconf_error_response(uint32_t id, error->length = htons(error->length); aph->ph.param_length = htons(aph->ph.param_length); - return m_reply; + return (m_reply); } static struct mbuf * @@ -231,7 +231,7 @@ sctp_process_asconf_add_ip(struct mbuf * case SCTP_IPV4_ADDRESS: if (param_length != sizeof(struct sctp_ipv4addr_param)) { /* invalid param size */ - return NULL; + return (NULL); } v4addr = (struct sctp_ipv4addr_param *)ph; sin = (struct sockaddr_in *)&sa_store; @@ -254,7 +254,7 @@ sctp_process_asconf_add_ip(struct mbuf * case SCTP_IPV6_ADDRESS: if (param_length != sizeof(struct sctp_ipv6addr_param)) { /* invalid param size */ - return NULL; + return (NULL); } v6addr = (struct sctp_ipv6addr_param *)ph; sin6 = (struct sockaddr_in6 *)&sa_store; @@ -277,7 +277,7 @@ sctp_process_asconf_add_ip(struct mbuf * m_reply = sctp_asconf_error_response(aph->correlation_id, SCTP_CAUSE_INVALID_PARAM, (uint8_t *) aph, aparam_length); - return m_reply; + return (m_reply); } /* end switch */ /* if 0.0.0.0/::0, add the source address instead */ @@ -314,7 +314,7 @@ sctp_process_asconf_add_ip(struct mbuf * sctp_send_hb(stcb, net, SCTP_SO_NOT_LOCKED); } } - return m_reply; + return (m_reply); } static int @@ -326,7 +326,7 @@ sctp_asconf_del_remote_addrs_except(stru src_net = sctp_findnet(stcb, src); if (src_net == NULL) { /* not found */ - return -1; + return (-1); } /* delete all destination addresses except the source */ TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { @@ -342,7 +342,7 @@ sctp_asconf_del_remote_addrs_except(stru (struct sockaddr *)&net->ro._l_addr, SCTP_SO_NOT_LOCKED); } } - return 0; + return (0); } static struct mbuf * @@ -382,7 +382,7 @@ sctp_process_asconf_delete_ip(struct mbu case SCTP_IPV4_ADDRESS: if (param_length != sizeof(struct sctp_ipv4addr_param)) { /* invalid param size */ - return NULL; + return (NULL); } v4addr = (struct sctp_ipv4addr_param *)ph; sin = (struct sockaddr_in *)&sa_store; @@ -402,7 +402,7 @@ sctp_process_asconf_delete_ip(struct mbu case SCTP_IPV6_ADDRESS: if (param_length != sizeof(struct sctp_ipv6addr_param)) { /* invalid param size */ - return NULL; + return (NULL); } v6addr = (struct sctp_ipv6addr_param *)ph; sin6 = (struct sockaddr_in6 *)&sa_store; @@ -423,7 +423,7 @@ sctp_process_asconf_delete_ip(struct mbu m_reply = sctp_asconf_error_response(aph->correlation_id, SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, aparam_length); - return m_reply; + return (m_reply); } /* make sure the source address is not being deleted */ @@ -433,7 +433,7 @@ sctp_process_asconf_delete_ip(struct mbu m_reply = sctp_asconf_error_response(aph->correlation_id, SCTP_CAUSE_DELETING_SRC_ADDR, (uint8_t *) aph, aparam_length); - return m_reply; + return (m_reply); } /* if deleting 0.0.0.0/::0, delete all addresses except src addr */ if (zero_address && SCTP_BASE_SYSCTL(sctp_nat_friendly)) { @@ -452,7 +452,7 @@ sctp_process_asconf_delete_ip(struct mbu m_reply = sctp_asconf_success_response(aph->correlation_id); } - return m_reply; + return (m_reply); } /* delete the address */ result = sctp_del_remote_addr(stcb, sa); @@ -474,7 +474,7 @@ sctp_process_asconf_delete_ip(struct mbu /* notify upper layer */ sctp_ulp_notify(SCTP_NOTIFY_ASCONF_DELETE_IP, stcb, 0, sa, SCTP_SO_NOT_LOCKED); } - return m_reply; + return (m_reply); } static struct mbuf * @@ -511,7 +511,7 @@ sctp_process_asconf_set_primary(struct m case SCTP_IPV4_ADDRESS: if (param_length != sizeof(struct sctp_ipv4addr_param)) { /* invalid param size */ - return NULL; + return (NULL); } v4addr = (struct sctp_ipv4addr_param *)ph; sin = (struct sockaddr_in *)&sa_store; @@ -529,7 +529,7 @@ sctp_process_asconf_set_primary(struct m case SCTP_IPV6_ADDRESS: if (param_length != sizeof(struct sctp_ipv6addr_param)) { /* invalid param size */ - return NULL; + return (NULL); } v6addr = (struct sctp_ipv6addr_param *)ph; sin6 = (struct sockaddr_in6 *)&sa_store; @@ -548,7 +548,7 @@ sctp_process_asconf_set_primary(struct m m_reply = sctp_asconf_error_response(aph->correlation_id, SCTP_CAUSE_UNRESOLVABLE_ADDR, (uint8_t *) aph, aparam_length); - return m_reply; + return (m_reply); } /* if 0.0.0.0/::0, use the source address instead */ @@ -620,7 +620,7 @@ sctp_process_asconf_set_primary(struct m aparam_length); } - return m_reply; + return (m_reply); } /* @@ -2530,9 +2530,9 @@ sctp_is_addr_pending(struct sctp_tcb *st */ if (add_cnt > del_cnt || (add_cnt == del_cnt && last_param_type == SCTP_ADD_IP_ADDRESS)) { - return 1; + return (1); } - return 0; + return (0); } static struct sockaddr * Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Mon Dec 26 23:33:41 2011 (r228906) +++ head/sys/netinet/sctp_auth.c Tue Dec 27 10:16:24 2011 (r228907) @@ -469,7 +469,6 @@ sctp_compute_hashkey(sctp_key_t * key1, } if (sctp_get_keylen(key2)) { bcopy(key2->key, key_ptr, key2->keylen); - key_ptr += key2->keylen; } } else { /* key is shared + key2 + key1 */ @@ -483,7 +482,6 @@ sctp_compute_hashkey(sctp_key_t * key1, } if (sctp_get_keylen(key1)) { bcopy(key1->key, key_ptr, key1->keylen); - key_ptr += key1->keylen; } } return (new_key); Modified: head/sys/netinet/sctp_cc_functions.c ============================================================================== --- head/sys/netinet/sctp_cc_functions.c Mon Dec 26 23:33:41 2011 (r228906) +++ head/sys/netinet/sctp_cc_functions.c Tue Dec 27 10:16:24 2011 (r228907) @@ -80,7 +80,6 @@ sctp_set_initial_cc_param(struct sctp_tc } } net->ssthresh = assoc->peers_rwnd; - SDT_PROBE(sctp, cwnd, net, init, stcb->asoc.my_vtag, ((stcb->sctp_ep->sctp_lport << 16) | (stcb->rport)), net, 0, net->cwnd); @@ -339,7 +338,6 @@ cc_bw_same(struct sctp_tcb *stcb, struct ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt), net->flight_size, probepoint); - if ((net->cc_mod.rtcc.steady_step) && (inst_ind != SCTP_INST_LOOSING)) { if (net->cc_mod.rtcc.last_step_state == 5) net->cc_mod.rtcc.step_cnt++; @@ -389,7 +387,6 @@ cc_bw_decrease(struct sctp_tcb *stcb, st ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt), net->flight_size, probepoint); - if (net->cc_mod.rtcc.ret_from_eq) { /* * Switch over to CA if we are less @@ -408,7 +405,6 @@ cc_bw_decrease(struct sctp_tcb *stcb, st ((net->cc_mod.rtcc.lbw_rtt << 32) | net->rtt), net->flight_size, probepoint); - /* Someone else - fight for more? */ if (net->cc_mod.rtcc.steady_step) { oth = net->cc_mod.rtcc.vol_reduce; @@ -553,7 +549,8 @@ cc_bw_increase(struct sctp_tcb *stcb, st static int cc_bw_limit(struct sctp_tcb *stcb, struct sctp_nets *net, uint64_t nbw) { - uint64_t bw_offset, rtt_offset, rtt, vtag, probepoint; + uint64_t bw_offset, rtt_offset; + uint64_t probepoint, rtt, vtag; uint64_t bytes_for_this_rtt, inst_bw; uint64_t div, inst_off; int bw_shift; @@ -619,15 +616,15 @@ cc_bw_limit(struct sctp_tcb *stcb, struc inst_ind = SCTP_INST_NEUTRAL; probepoint |= ((0xb << 16) | inst_ind); } else { + inst_ind = net->cc_mod.rtcc.last_inst_ind; inst_bw = bytes_for_this_rtt / (uint64_t) (net->rtt); /* Can't determine do not change */ - inst_ind = net->cc_mod.rtcc.last_inst_ind; probepoint |= ((0xc << 16) | inst_ind); } } else { + inst_ind = net->cc_mod.rtcc.last_inst_ind; inst_bw = bytes_for_this_rtt; /* Can't determine do not change */ - inst_ind = net->cc_mod.rtcc.last_inst_ind; probepoint |= ((0xd << 16) | inst_ind); } SDT_PROBE(sctp, cwnd, net, rttvar, @@ -702,15 +699,18 @@ sctp_cwnd_update_after_sack_common(struc } } } - if (t_ucwnd_sbw == 0) { - t_ucwnd_sbw = 1; - } if (t_path_mptcp > 0) { mptcp_like_alpha = max_path / (t_path_mptcp * t_path_mptcp); } else { mptcp_like_alpha = 1; } } + if (t_ssthresh == 0) { + t_ssthresh = 1; + } + if (t_ucwnd_sbw == 0) { + t_ucwnd_sbw = 1; + } /******************************/ /* update cwnd and Early FR */ /******************************/ @@ -1012,6 +1012,9 @@ sctp_cwnd_update_after_timeout(struct sc t_ucwnd_sbw += (uint64_t) lnet->cwnd / (uint64_t) srtt; } } + if (t_ssthresh < 1) { + t_ssthresh = 1; + } if (t_ucwnd_sbw < 1) { t_ucwnd_sbw = 1; } @@ -1841,19 +1844,19 @@ static int use_bandwidth_switch = 1; static inline int between(uint32_t seq1, uint32_t seq2, uint32_t seq3) { - return seq3 - seq2 >= seq1 - seq2; + return (seq3 - seq2 >= seq1 - seq2); } static inline uint32_t htcp_cong_time(struct htcp *ca) { - return sctp_get_tick_count() - ca->last_cong; + return (sctp_get_tick_count() - ca->last_cong); } static inline uint32_t htcp_ccount(struct htcp *ca) { - return htcp_cong_time(ca) / ca->minRTT; + return (htcp_cong_time(ca) / ca->minRTT); } static inline void @@ -1873,7 +1876,7 @@ htcp_cwnd_undo(struct sctp_tcb *stcb, st net->cc_mod.htcp_ca.last_cong = net->cc_mod.htcp_ca.undo_last_cong; net->cc_mod.htcp_ca.maxRTT = net->cc_mod.htcp_ca.undo_maxRTT; net->cc_mod.htcp_ca.old_maxB = net->cc_mod.htcp_ca.undo_old_maxB; - return max(net->cwnd, ((net->ssthresh / net->mtu << 7) / net->cc_mod.htcp_ca.beta) * net->mtu); + return (max(net->cwnd, ((net->ssthresh / net->mtu << 7) / net->cc_mod.htcp_ca.beta) * net->mtu)); } #endif @@ -2017,7 +2020,7 @@ static uint32_t htcp_recalc_ssthresh(struct sctp_nets *net) { htcp_param_update(net); - return max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu); + return (max(((net->cwnd / net->mtu * net->cc_mod.htcp_ca.beta) >> 7) * net->mtu, 2U * net->mtu)); } static void @@ -2087,7 +2090,7 @@ htcp_cong_avoid(struct sctp_tcb *stcb, s static uint32_t htcp_min_cwnd(struct sctp_tcb *stcb, struct sctp_nets *net) { - return net->ssthresh; + return (net->ssthresh); } #endif Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Mon Dec 26 23:33:41 2011 (r228906) +++ head/sys/netinet/sctp_constants.h Tue Dec 27 10:16:24 2011 (r228907) @@ -396,7 +396,7 @@ __FBSDID("$FreeBSD$"); /* SCTP chunk types are moved sctp.h for application (NAT, FW) use */ /* align to 32-bit sizes */ -#define SCTP_SIZE32(x) ((((x)+3) >> 2) << 2) +#define SCTP_SIZE32(x) ((((x) + 3) >> 2) << 2) #define IS_SCTP_CONTROL(a) ((a)->chunk_type != SCTP_DATA) #define IS_SCTP_DATA(a) ((a)->chunk_type == SCTP_DATA) @@ -933,7 +933,7 @@ __FBSDID("$FreeBSD$"); } else { \ gap = (MAX_TSN - mapping_tsn) + tsn + 1; \ } \ - } while(0) + } while (0) #define SCTP_RETRAN_DONE -1 Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Mon Dec 26 23:33:41 2011 (r228906) +++ head/sys/netinet/sctp_indata.c Tue Dec 27 10:16:24 2011 (r228907) @@ -845,7 +845,7 @@ sctp_queue_data_for_reasm(struct sctp_tc struct sctp_tmit_chunk *chk, int *abort_flag) { struct mbuf *oper; - uint32_t cum_ackp1, last_tsn, prev_tsn, post_tsn; + uint32_t cum_ackp1, prev_tsn, post_tsn; struct sctp_tmit_chunk *at, *prev, *next; prev = next = NULL; @@ -1032,7 +1032,6 @@ sctp_queue_data_for_reasm(struct sctp_tc sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); return; } else { - last_tsn = at->rec.data.TSN_seq; prev = at; if (TAILQ_NEXT(at, sctp_next) == NULL) { /* @@ -1698,12 +1697,10 @@ sctp_process_a_data_chunk(struct sctp_tc if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { struct mbuf *mat; - mat = dmbuf; - while (mat) { + for (mat = dmbuf; mat; mat = SCTP_BUF_NEXT(mat)) { if (SCTP_BUF_IS_EXTENDED(mat)) { sctp_log_mb(mat, SCTP_MBUF_ICOPY); } - mat = SCTP_BUF_NEXT(mat); } } #endif @@ -1724,10 +1721,8 @@ sctp_process_a_data_chunk(struct sctp_tc struct mbuf *lat; l_len = 0; - lat = dmbuf; - while (lat) { + for (lat = dmbuf; lat; lat = SCTP_BUF_NEXT(lat)) { l_len += SCTP_BUF_LEN(lat); - lat = SCTP_BUF_NEXT(lat); } } if (l_len > the_len) { @@ -1804,15 +1799,10 @@ failed_express_del: if (tsn == (control->sinfo_tsn + 1)) { /* Yep, we can add it on */ int end = 0; - uint32_t cumack; if (chunk_flags & SCTP_DATA_LAST_FRAG) { end = 1; } - cumack = asoc->cumulative_tsn; - if ((cumack + 1) == tsn) - cumack = tsn; - if (sctp_append_to_readq(stcb->sctp_ep, stcb, control, dmbuf, end, tsn, &stcb->sctp_socket->so_rcv)) { @@ -2634,7 +2624,7 @@ sctp_process_data(struct mbuf **mm, int if (length - *offset < chk_length) { /* all done, mutulated chunk */ stop_proc = 1; - break; + continue; } if (ch->ch.chunk_type == SCTP_DATA) { if ((size_t)chk_length < sizeof(struct sctp_data_chunk) + 1) { @@ -2690,7 +2680,7 @@ sctp_process_data(struct mbuf **mm, int * drop rep space left. */ stop_proc = 1; - break; + continue; } } else { /* not a data chunk in the data region */ @@ -2698,7 +2688,7 @@ sctp_process_data(struct mbuf **mm, int case SCTP_INITIATION: case SCTP_INITIATION_ACK: case SCTP_SELECTIVE_ACK: - case SCTP_NR_SELECTIVE_ACK: /* EY */ + case SCTP_NR_SELECTIVE_ACK: case SCTP_HEARTBEAT_REQUEST: case SCTP_HEARTBEAT_ACK: case SCTP_ABORT_ASSOCIATION: @@ -2772,7 +2762,7 @@ sctp_process_data(struct mbuf **mm, int } /* else skip this bad chunk and * continue... */ break; - }; /* switch of chunk type */ + } /* switch of chunk type */ } *offset += SCTP_SIZE32(chk_length); if ((*offset >= length) || stop_proc) { @@ -2785,10 +2775,9 @@ sctp_process_data(struct mbuf **mm, int if (ch == NULL) { *offset = length; stop_proc = 1; - break; - + continue; } - } /* while */ + } if (break_flag) { /* * we need to report rwnd overrun drops. @@ -3598,7 +3587,8 @@ sctp_strike_gap_ack_chunks(struct sctp_t * this guy had a RTO calculation pending on * it, cancel it */ - if (tp1->whoTo->rto_needed == 0) { + if ((tp1->whoTo != NULL) && + (tp1->whoTo->rto_needed == 0)) { tp1->whoTo->rto_needed = 1; } tp1->do_rtt = 0; Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Mon Dec 26 23:33:41 2011 (r228906) +++ head/sys/netinet/sctp_input.c Tue Dec 27 10:16:24 2011 (r228907) @@ -1418,7 +1418,6 @@ sctp_process_cookie_existing(struct mbuf struct sctp_nets *net; struct mbuf *op_err; struct sctp_paramhdr *ph; - int chk_length; int init_offset, initack_offset, i; int retval; int spec_flag = 0; @@ -1468,7 +1467,6 @@ sctp_process_cookie_existing(struct mbuf /* could not pull a INIT chunk in cookie */ return (NULL); } - chk_length = ntohs(init_cp->ch.chunk_length); if (init_cp->ch.chunk_type != SCTP_INITIATION) { return (NULL); } @@ -1476,7 +1474,7 @@ sctp_process_cookie_existing(struct mbuf * find and validate the INIT-ACK chunk in the cookie (my info) the * INIT-ACK follows the INIT chunk */ - initack_offset = init_offset + SCTP_SIZE32(chk_length); + initack_offset = init_offset + SCTP_SIZE32(ntohs(init_cp->ch.chunk_length)); initack_cp = (struct sctp_init_ack_chunk *) sctp_m_getptr(m, initack_offset, sizeof(struct sctp_init_ack_chunk), (uint8_t *) & initack_buf); @@ -1484,7 +1482,6 @@ sctp_process_cookie_existing(struct mbuf /* could not pull INIT-ACK chunk in cookie */ return (NULL); } - chk_length = ntohs(initack_cp->ch.chunk_length); if (initack_cp->ch.chunk_type != SCTP_INITIATION_ACK) { return (NULL); } @@ -1984,11 +1981,9 @@ sctp_process_cookie_new(struct mbuf *m, struct sockaddr_storage sa_store; struct sockaddr *initack_src = (struct sockaddr *)&sa_store; struct sctp_association *asoc; - int chk_length; int init_offset, initack_offset, initack_limit; int retval; int error = 0; - uint32_t old_tag; uint8_t auth_chunk_buf[SCTP_PARAM_BUFFER_SIZE]; #ifdef INET @@ -2020,12 +2015,11 @@ sctp_process_cookie_new(struct mbuf *m, "process_cookie_new: could not pull INIT chunk hdr\n"); return (NULL); } - chk_length = ntohs(init_cp->ch.chunk_length); if (init_cp->ch.chunk_type != SCTP_INITIATION) { SCTPDBG(SCTP_DEBUG_INPUT1, "HUH? process_cookie_new: could not find INIT chunk!\n"); return (NULL); } - initack_offset = init_offset + SCTP_SIZE32(chk_length); + initack_offset = init_offset + SCTP_SIZE32(ntohs(init_cp->ch.chunk_length)); /* * find and validate the INIT-ACK chunk in the cookie (my info) the * INIT-ACK follows the INIT chunk @@ -2038,7 +2032,6 @@ sctp_process_cookie_new(struct mbuf *m, SCTPDBG(SCTP_DEBUG_INPUT1, "process_cookie_new: could not pull INIT-ACK chunk hdr\n"); return (NULL); } - chk_length = ntohs(initack_cp->ch.chunk_length); if (initack_cp->ch.chunk_type != SCTP_INITIATION_ACK) { return (NULL); } @@ -2115,7 +2108,6 @@ sctp_process_cookie_new(struct mbuf *m, return (NULL); } /* process the INIT-ACK info (my info) */ - old_tag = asoc->my_vtag; asoc->my_vtag = ntohl(initack_cp->init.initiate_tag); asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd); asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams); @@ -2702,10 +2694,9 @@ sctp_handle_cookie_echo(struct mbuf *m, */ if (netl == NULL) { /* TSNH! Huh, why do I need to add this address here? */ - int ret; - - ret = sctp_add_remote_addr(*stcb, to, NULL, SCTP_DONOT_SETSCOPE, - SCTP_IN_COOKIE_PROC); + if (sctp_add_remote_addr(*stcb, to, NULL, SCTP_DONOT_SETSCOPE, SCTP_IN_COOKIE_PROC)) { + return (NULL); + } netl = sctp_findnet(*stcb, to); } if (netl) { @@ -3003,7 +2994,7 @@ sctp_handle_ecn_echo(struct sctp_ecne_ch struct sctp_nets *net; struct sctp_tmit_chunk *lchk; struct sctp_ecne_chunk bkup; - uint8_t override_bit = 0; + uint8_t override_bit; uint32_t tsn, window_data_tsn; int len; unsigned int pkt_cnt; @@ -3050,27 +3041,33 @@ sctp_handle_ecn_echo(struct sctp_ecne_ch TAILQ_FOREACH(net, &stcb->asoc.nets, sctp_next) { if (tsn == net->last_cwr_tsn) { /* Found him, send it off */ - goto out; + break; } } - /* - * If we reach here, we need to send a special CWR that says - * hey, we did this a long time ago and you lost the - * response. - */ - net = TAILQ_FIRST(&stcb->asoc.nets); - override_bit = SCTP_CWR_REDUCE_OVERRIDE; + if (net == NULL) { + /* + * If we reach here, we need to send a special CWR + * that says hey, we did this a long time ago and + * you lost the response. + */ + net = TAILQ_FIRST(&stcb->asoc.nets); + if (net == NULL) { + /* TSNH */ + return; + } + override_bit = SCTP_CWR_REDUCE_OVERRIDE; + } else { + override_bit = 0; + } + } else { + override_bit = 0; } -out: if (SCTP_TSN_GT(tsn, net->cwr_window_tsn) && ((override_bit & SCTP_CWR_REDUCE_OVERRIDE) == 0)) { /* * JRS - Use the congestion control given in the pluggable * CC module */ - int ocwnd; - - ocwnd = net->cwnd; stcb->asoc.cc_functions.sctp_cwnd_update_after_ecn_echo(stcb, net, 0, pkt_cnt); /* * We reduce once every RTT. So we will only lower cwnd at @@ -5074,7 +5071,6 @@ process_control_chunks: } SCTPDBG(SCTP_DEBUG_INPUT3, "GAK, null buffer\n"); - auth_skipped = 0; *offset = length; return (NULL); } @@ -5697,7 +5693,8 @@ sctp_common_input_processing(struct mbuf */ } /* take care of ecn */ - if ((stcb->asoc.ecn_allowed == 1) && + if ((data_processed == 1) && + (stcb->asoc.ecn_allowed == 1) && ((ecn_bits & SCTP_CE_BITS) == SCTP_CE_BITS)) { /* Yep, we need to add a ECNE */ sctp_send_ecn_echo(stcb, net, high_tsn); @@ -5807,12 +5804,10 @@ sctp_input_with_port(struct mbuf *i_pak, #ifdef SCTP_MBUF_LOGGING /* Log in any input mbufs */ if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MBUF_LOGGING_ENABLE) { - mat = m; - while (mat) { + for (mat = m; mat; mat = SCTP_BUF_NEXT(mat)) { if (SCTP_BUF_IS_EXTENDED(mat)) { sctp_log_mb(mat, SCTP_MBUF_INPUT); } - mat = SCTP_BUF_NEXT(mat); } } #endif Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Dec 26 23:33:41 2011 (r228906) +++ head/sys/netinet/sctp_output.c Tue Dec 27 10:16:24 2011 (r228907) @@ -2156,23 +2156,20 @@ skip_count: } cnt++; } - if (cnt > SCTP_ADDRESS_LIMIT) { - limit_out = 1; - } /* * To get through a NAT we only list addresses if we have * more than one. That way if you just bind a single address * we let the source of the init dictate our address. */ if (cnt > 1) { + cnt = cnt_inits_to; LIST_FOREACH(laddr, &inp->sctp_addr_list, sctp_nxt_addr) { - cnt = 0; if (laddr->ifa == NULL) { continue; } - if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED) + if (laddr->ifa->localifa_flags & SCTP_BEING_DELETED) { continue; - + } if (sctp_is_address_in_scope(laddr->ifa, scope->ipv4_addr_legal, scope->ipv6_addr_legal, @@ -3758,7 +3755,6 @@ sctp_add_cookie(struct mbuf *init, int i /* tack the INIT and then the INIT-ACK onto the chain */ cookie_sz = 0; - m_at = mret; for (m_at = mret; m_at; m_at = SCTP_BUF_NEXT(m_at)) { cookie_sz += SCTP_BUF_LEN(m_at); if (SCTP_BUF_NEXT(m_at) == NULL) { @@ -3766,7 +3762,6 @@ sctp_add_cookie(struct mbuf *init, int i break; } } - for (m_at = copy_init; m_at; m_at = SCTP_BUF_NEXT(m_at)) { cookie_sz += SCTP_BUF_LEN(m_at); if (SCTP_BUF_NEXT(m_at) == NULL) { @@ -3774,7 +3769,6 @@ sctp_add_cookie(struct mbuf *init, int i break; } } - for (m_at = copy_initack; m_at; m_at = SCTP_BUF_NEXT(m_at)) { cookie_sz += SCTP_BUF_LEN(m_at); if (SCTP_BUF_NEXT(m_at) == NULL) { @@ -4804,7 +4798,6 @@ sctp_send_initiate(struct sctp_inpcb *in SCTP_BUF_LEN(m) += SCTP_SIZE32(p_len); } } - m_at = m; /* now the addresses */ { struct sctp_scoping scp; @@ -4813,9 +4806,10 @@ sctp_send_initiate(struct sctp_inpcb *in * To optimize this we could put the scoping stuff into a * structure and remove the individual uint8's from the * assoc structure. Then we could just sifa in the address - * within the stcb.. but for now this is a quick hack to get + * within the stcb. But for now this is a quick hack to get * the address stuff teased apart. */ + scp.ipv4_addr_legal = stcb->asoc.ipv4_addr_legal; scp.ipv6_addr_legal = stcb->asoc.ipv6_addr_legal; scp.loopback_scope = stcb->asoc.loopback_scope; @@ -4823,7 +4817,7 @@ sctp_send_initiate(struct sctp_inpcb *in scp.local_scope = stcb->asoc.local_scope; scp.site_scope = stcb->asoc.site_scope; - m_at = sctp_add_addresses_to_i_ia(inp, stcb, &scp, m_at, cnt_inits_to); + sctp_add_addresses_to_i_ia(inp, stcb, &scp, m, cnt_inits_to); } /* calulate the size and update pkt header and chunk header */ @@ -4853,7 +4847,6 @@ sctp_send_initiate(struct sctp_inpcb *in sctp_m_freem(m); return; } - p_len += padval; } SCTPDBG(SCTP_DEBUG_OUTPUT4, "Sending INIT - calls lowlevel_output\n"); ret = sctp_lowlevel_chunk_output(inp, stcb, net, @@ -5074,7 +5067,6 @@ sctp_arethere_unrecognized_parameters(st return (NULL); } m_copyback(op_err, err_at, plen, (caddr_t)phdr); - err_at += plen; } return (op_err); break; @@ -5317,6 +5309,7 @@ sctp_are_there_new_addresses(struct sctp p4 = (struct sctp_ipv4addr_param *)phdr; sin4.sin_addr.s_addr = p4->addr; sa_touse = (struct sockaddr *)&sin4; + break; } #endif #ifdef INET6 @@ -5334,10 +5327,12 @@ sctp_are_there_new_addresses(struct sctp memcpy((caddr_t)&sin6.sin6_addr, p6->addr, sizeof(p6->addr)); sa_touse = (struct sockaddr *)&sin6; + break; } #endif default: sa_touse = NULL; + break; } if (sa_touse) { /* ok, sa_touse points to one to check */ @@ -5546,7 +5541,7 @@ do_a_abort: default: goto do_a_abort; break; - }; + } if (net == NULL) { to = (struct sockaddr *)&store; @@ -5966,6 +5961,7 @@ do_a_abort: llen = 0; ol = op_err; + while (ol) { llen += SCTP_BUF_LEN(ol); ol = SCTP_BUF_NEXT(ol); @@ -6035,15 +6031,11 @@ do_a_abort: padval = p_len % 4; if ((padval) && (mp_last)) { /* see my previous comments on mp_last */ - int ret; - - ret = sctp_add_pad_tombuf(mp_last, (4 - padval)); - if (ret) { + if (sctp_add_pad_tombuf(mp_last, (4 - padval))) { /* Houston we have a problem, no space */ sctp_m_freem(m); return; } - p_len += padval; } if (stc.loopback_scope) { over_addr = &store1; @@ -6242,7 +6234,7 @@ sctp_msg_append(struct sctp_tcb *stcb, struct mbuf *m, struct sctp_sndrcvinfo *srcv, int hold_stcb_lock) { - int error = 0, holds_lock; + int error = 0; struct mbuf *at; struct sctp_stream_queue_pending *sp = NULL; struct sctp_stream_out *strm; @@ -6251,7 +6243,6 @@ sctp_msg_append(struct sctp_tcb *stcb, * Given an mbuf chain, put it into the association send queue and * place it on the wheel */ - holds_lock = hold_stcb_lock; if (srcv->sinfo_stream >= stcb->asoc.streamoutcnt) { /* Invalid stream number */ SCTP_LTRACE_ERR_RET_PKT(m, NULL, stcb, net, SCTP_FROM_SCTP_OUTPUT, EINVAL); @@ -6320,7 +6311,9 @@ sctp_msg_append(struct sctp_tcb *stcb, sctp_auth_key_acquire(stcb, sp->auth_keyid); sp->holds_key_ref = 1; } - SCTP_TCB_SEND_LOCK(stcb); + if (hold_stcb_lock == 0) { + SCTP_TCB_SEND_LOCK(stcb); + } sctp_snd_sb_alloc(stcb, sp->length); atomic_add_int(&stcb->asoc.stream_queue_cnt, 1); TAILQ_INSERT_TAIL(&strm->outqueue, sp, next); @@ -6330,7 +6323,9 @@ sctp_msg_append(struct sctp_tcb *stcb, } stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, &stcb->asoc, strm, sp, 1); m = NULL; - SCTP_TCB_SEND_UNLOCK(stcb); + if (hold_stcb_lock == 0) { + SCTP_TCB_SEND_UNLOCK(stcb); + } out_now: if (m) { sctp_m_freem(m); @@ -7597,7 +7592,6 @@ dont_do_it: out_of: if (send_lock_up) { SCTP_TCB_SEND_UNLOCK(stcb); - send_lock_up = 0; } return (to_move); } @@ -7612,7 +7606,7 @@ sctp_fill_outqueue(struct sctp_tcb *stcb ) { struct sctp_association *asoc; - struct sctp_stream_out *strq, *strqn; + struct sctp_stream_out *strq; int goal_mtu, moved_how_much, total_moved = 0, bail = 0; int locked, giveup; @@ -7641,7 +7635,6 @@ sctp_fill_outqueue(struct sctp_tcb *stcb strq = stcb->asoc.ss_functions.sctp_ss_select_stream(stcb, net, asoc); locked = 0; } - strqn = strq; while ((goal_mtu > 0) && strq) { giveup = 0; bail = 0; @@ -7954,7 +7947,7 @@ again_one_more_time: */ continue; } - ctl_cnt = bundle_at = 0; + bundle_at = 0; endoutchain = outchain = NULL; no_fragmentflg = 1; one_chunk = 0; @@ -8652,7 +8645,6 @@ again_one_more_time: chk->window_probe = 0; data_list[bundle_at++] = chk; if (bundle_at >= SCTP_MAX_DATA_BUNDLING) { - mtu = 0; break; } if (chk->sent == SCTP_DATAGRAM_UNSENT) { @@ -8769,7 +8761,7 @@ no_data_fill: } else { asoc->ifp_had_enobuf = 0; } - outchain = endoutchain = NULL; + endoutchain = NULL; auth = NULL; auth_offset = 0; if (bundle_at || hbflag) { @@ -9233,7 +9225,7 @@ sctp_send_asconf_ack(struct sctp_tcb *st */ struct sctp_tmit_chunk *chk; struct sctp_asconf_ack *ack, *latest_ack; - struct mbuf *m_ack, *m; + struct mbuf *m_ack; struct sctp_nets *net = NULL; SCTP_TCB_LOCK_ASSERT(stcb); @@ -9312,7 +9304,6 @@ sctp_send_asconf_ack(struct sctp_tcb *st chk->data = m_ack; chk->send_size = 0; /* Get size */ - m = m_ack; chk->send_size = ack->len; chk->rec.chunk_id.id = SCTP_ASCONF_ACK; chk->rec.chunk_id.can_take_data = 1; @@ -9405,7 +9396,6 @@ sctp_chunk_retransmission(struct sctp_in ctl_cnt++; if (chk->rec.chunk_id.id == SCTP_FORWARD_CUM_TSN) { fwd_tsn = 1; - fwd = chk; } /* * Add an AUTH chunk, if chunk requires it save the @@ -9443,7 +9433,7 @@ sctp_chunk_retransmission(struct sctp_in SCTP_STAT_INCR(sctps_lowlevelerr); return (error); } - m = endofchain = NULL; + endofchain = NULL; auth = NULL; auth_offset = 0; /* @@ -9613,16 +9603,13 @@ one_chunk_around: * now are there anymore forward from chk to pick * up? */ - fwd = TAILQ_NEXT(chk, sctp_next); - while (fwd) { + for (fwd = TAILQ_NEXT(chk, sctp_next); fwd != NULL; fwd = TAILQ_NEXT(fwd, sctp_next)) { if (fwd->sent != SCTP_DATAGRAM_RESEND) { /* Nope, not for retran */ - fwd = TAILQ_NEXT(fwd, sctp_next); continue; } if (fwd->whoTo != net) { /* Nope, not the net in question */ - fwd = TAILQ_NEXT(fwd, sctp_next); continue; } if (data_auth_reqd && (auth == NULL)) { @@ -9670,7 +9657,6 @@ one_chunk_around: if (bundle_at >= SCTP_MAX_DATA_BUNDLING) { break; } - fwd = TAILQ_NEXT(fwd, sctp_next); } else { /* can't fit so we are done */ break; @@ -9702,7 +9688,7 @@ one_chunk_around: SCTP_STAT_INCR(sctps_lowlevelerr); return (error); } - m = endofchain = NULL; + endofchain = NULL; auth = NULL; auth_offset = 0; /* For HB's */ @@ -10264,12 +10250,14 @@ sctp_fill_in_rest: * we report. */ at = TAILQ_FIRST(&asoc->sent_queue); - for (i = 0; i < cnt_of_skipped; i++) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 10:21:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB74E1065672; Tue, 27 Dec 2011 10:21:29 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA6438FC12; Tue, 27 Dec 2011 10:21:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRALTkr048599; Tue, 27 Dec 2011 10:21:29 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRALT5R048597; Tue, 27 Dec 2011 10:21:29 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112271021.pBRALT5R048597@svn.freebsd.org> From: Martin Matuska Date: Tue, 27 Dec 2011 10:21:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228908 - vendor/libarchive/dist/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 10:21:30 -0000 Author: mm Date: Tue Dec 27 10:21:29 2011 New Revision: 228908 URL: http://svn.freebsd.org/changeset/base/228908 Log: Update to vendor revision 4016 Obtained from: http://libarchive.googlecode.com/svn/release/2.8 Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Modified: vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Tue Dec 27 10:16:24 2011 (r228907) +++ vendor/libarchive/dist/libarchive/archive_read_support_format_iso9660.c Tue Dec 27 10:21:29 2011 (r228908) @@ -1830,7 +1830,7 @@ parse_file_info(struct archive_read *a, (parent->re || parent->re_descendant)) file->re_descendant = 1; if (file->cl_offset) { - struct file_info *p; + struct file_info *r; if (parent == NULL || parent->parent == NULL) { archive_set_error(&a->archive, @@ -1858,8 +1858,8 @@ parse_file_info(struct archive_read *a, * Sanity check: cl_offset does not point at its * the parents or itself. */ - for (p = parent; p; p = p->parent) { - if (p->offset == file->cl_offset) { + for (r = parent; r; r = r->parent) { + if (r->offset == file->cl_offset) { archive_set_error(&a->archive, ARCHIVE_ERRNO_MISC, "Invalid Rockridge CL"); From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 10:21:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 763711065678; Tue, 27 Dec 2011 10:21:59 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 62C988FC13; Tue, 27 Dec 2011 10:21:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRALxCx048648; Tue, 27 Dec 2011 10:21:59 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRALvxB048644; Tue, 27 Dec 2011 10:21:57 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112271021.pBRALvxB048644@svn.freebsd.org> From: Doug Barton Date: Tue, 27 Dec 2011 10:21:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228909 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 10:21:59 -0000 Author: dougb Date: Tue Dec 27 10:21:57 2011 New Revision: 228909 URL: http://svn.freebsd.org/changeset/base/228909 Log: 1. Remove a bunch of duplicates. Usually this means removing them from fortunes, but occasionally remove them from the other 2 files when they are not offensive, or not murphy'ish enough. Where the version in fortunes had better attribution and/or formatting, copy it over. 2. Fix a few typos 3. Use the full name of François De La Rochefoucauld, fix one of his quotes, and remove the duplicate of it. Modified: head/games/fortune/datfiles/fortunes head/games/fortune/datfiles/fortunes-o.real head/games/fortune/datfiles/murphy Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Tue Dec 27 10:21:29 2011 (r228908) +++ head/games/fortune/datfiles/fortunes Tue Dec 27 10:21:57 2011 (r228909) @@ -773,40 +773,6 @@ the female, autopsied her, and sure enou "What do you think?" said the first ranger. "The Czech is in the male," replied the second. % - A group of soldiers being prepared for a practice landing on a tropical -island were warned of the one danger the island held, a poisonous snake that -could be readily identified by its alternating orange and black bands. They -were instructed, should they find one of these snakes, to grab the tail end of -the snake with one hand and slide the other hand up the body of the snake to -the snake's head. Then, forcefully, bend the thumb above the snake's head -downward to break the snake's spine. All went well for the landing, the -charge up the beach, and the move into the jungle. At one foxhole site, two -men were starting to dig and wondering what had happened to their partner. -Suddenly he staggered out of the underbrush, uniform in shreds, covered with -blood. He collapsed to the ground. His buddies were so shocked they could -only blurt out, "What happened?" - "I ran from the beachhead to the edge of the jungle, and, as I hit the -ground, I saw an orange and black striped snake right in front of me. I -grabbed its tail end with my left hand. I placed my right hand above my left -hand. I held firmly with my left hand and slid my right hand up the body of -the snake. When I reached the head of the snake I flicked my right thumb down -to break the snake's spine... did you ever goose a tiger?" -% - A guy returns from a long trip to Europe, having left his beloved -dog in his brother's care. The minute he's cleared customs, he calls up his -brother and inquires after his pet. - "Your dog's dead," replies his brother bluntly. - The guy is devastated. "You know how much that dog meant to me," -he moaned into the phone. "Couldn't you at least have thought of a nicer way -of breaking the news? Couldn't you have said, `Well, you know, the dog got -outside one day, and was crossing the street, and a car was speeding around a -corner...' or something...? Why are you always so thoughtless?" - "Look, I'm sorry," said his brother, "I guess I just didn't think." - "Okay, okay, let's just put it behind us. How are you anyway? -How's Mom?" - His brother is silent a moment. "Uh," he stammers, "uh... Mom got -outside one day..." -% A hard-luck actor who appeared in one colossal disaster after another finally got a break, a broken leg to be exact. Someone pointed out that it's the first time the poor fellow's been in the same cast for more than a week. @@ -1137,12 +1103,6 @@ went out to be killed? The Pole pulls a bottle of vodka from the other side of his jacket. He smiles and replies, "Five men on one bottle -- too many." % - A priest was walking along the cliffs at Dover when he came upon -two locals pulling another man ashore on the end of a rope. "That's what -I like to see", said the priest, "A man helping his fellow man". - As he was walking away, one local remarked to the other, "Well, -he sure doesn't know the first thing about shark fishing." -% A program should be light and agile, its subroutines connected like a strings of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little nor too much, neither needless @@ -1361,16 +1321,6 @@ realize the full significance of Pharoah -- Grendel Briarton "Through Time & Space With Ferdinand Feghoot!" % - After watching an extremely attractive maternity-ward patient -earnestly thumbing her way through a telephone directory for several -minutes, a hospital orderly finally asked if he could be of some help. - "No, thanks," smiled the young mother, "I'm just looking for a -name for my baby." - "But the hospital supplies a special booklet that lists hundreds -of first names and their meanings," said the orderly. - "That won't help," said the woman, "my baby already has a first -name." -% All I really need to know about how to live and what to do and how to be I learned in kindergarten. Wisdom was not at the top of the graduate-school mountain, but there in the sandpile at Sunday School. @@ -1470,26 +1420,6 @@ the ideas and frills that were cautiousl The result, as Ovid says, is a "big pile". -- Frederick Brooks, Jr., "The Mythical Man-Month" % - An eighty-year-old woman is rocking away the afternoon on her -porch when she sees an old, tarnished lamp sitting near the steps. She -picks it up, rubs it gently, and lo and behold a genie appears! The genie -tells the woman the he will grant her any three wishes her heart desires. - After a bit of thought, she says, "I wish I were young and -beautiful!" And POOF! In a cloud of smoke she becomes a young, beautiful, -voluptuous woman. - After a little more thought, she says, "I would like to be rich -for the rest of my life." And POOF! When the smoke clears, there are -stacks and stacks of money lying on the porch. - The genie then says, "Now, madam, what is your final wish?" - "Well," says the woman, "I would like for you to transform my -faithful old cat, whom I have loved dearly for fifteen years, into a young -handsome prince!" - And with another billow of smoke the cat is changed into a tall, -handsome, young man, with dark hair, dressed in a dashing uniform. - As they gaze at each other in adoration, the prince leans over to -the woman and whispers into her ear, "Now, aren't you sorry you had me -fixed?" -% An elderly man stands in line for hours at a Warsaw meat store (meat is severely rationed). When the butcher comes out at the end of the day and announces that there is no meat left, the man flies into a rage. @@ -1552,14 +1482,6 @@ young welp with a masochistic streak who up-and-down bureaucracy in the history of mankind." -- R. L. Forward, "Flight of the Dragonfly" % - "Anything else, sir?" asked the attentive bellhop, trying his best -to make the lady and gentleman comfortable in their penthouse suite in the -posh hotel. - "No. No, thank you," replied the gentleman. - "Anything for your wife, sir?" the bellhop asked. - "Why, yes, young man," said the gentleman. "Would you bring me -a postcard?" -% "Anything else you wish to draw to my attention, Mr. Holmes ?" "The curious incident of the stable dog in the nighttime." "But the dog did nothing in the nighttime." @@ -1932,52 +1854,16 @@ said the Duck: "it's generally a frog or The question is, what did the archbishop find?" % - Four Oxford dons were taking their evening walk together and as -usual, were engaged in casual but learned conversation. On this particular -evening, their conversation was about the names given to groups of animals, -such as a "pride of lions" or a "gaggle of geese." - One of the professors noticed a group of prostitutes down the block, -and posed the question, "What name would be given to that group?" The four -fell into silence for a moment, as they pondered the possibilities... - At last, one spoke: "How about `a Jam of Tarts'?" The others nodded -in acknowledgment as they continued to consider the problem. A second -professor spoke: "I'd suggest `an Essay of Trollops.'" Again, the others -nodded. A third spoke: "I propose `a Flourish of Strumpets.'" - They continued their walk in silence, until the first professor -remarked to the remaining professor, who was the most senior and learned of -the four, "You haven't suggested a name for our ladies. What are your -thoughts?" - Replied the fourth professor, "`An Anthology of Prose.'" -% Fred noticed his roommate had a black eye upon returning from a dance. "What happened?" "I was struck by the beauty of the place." % - Friends were surprised, indeed, when Frank and Jennifer broke their -engagement, but Frank had a ready explanation: "Would you marry someone who -was habitually unfaithful, who lied at every turn, who was selfish and lazy -and sarcastic?" - "Of course not," said a sympathetic friend. - "Well," retorted Frank, "neither would Jennifer." -% "Gee, Mudhead, everyone at Morse Science High has an extracurricular activity except you." "Well, gee, doesn't Louise count?" "Only to ten, Mudhead." -- The Firesign Theatre % - "Gentlemen of the jury," said the defense attorney, now beginning -to warm to his summation, "the real question here before you is, shall this -beautiful young woman be forced to languish away her loveliest years in a -dark prison cell? Or shall she be set free to return to her cozy little -apartment at 4134 Mountain Ave. -- there to spend her lonely, loveless hours -in her boudoir, lying beside her little Princess phone, 962-7873?" -% - God decided to take the devil to court and settle their -differences once and for all. - When Satan heard of this, he grinned and said, "And just -where do you think you're going to find a lawyer?" -% Graduating seniors, parents and friends... Let me begin by reassuring you that my remarks today will stand up to the most stringent requirements of the new appropriateness. @@ -2050,33 +1936,6 @@ for it is complete within itself. It ex Software and Hardware, ashamed, returned to their homes. -- Geoffrey James, "The Tao of Programming" % - Harry, a golfing enthusiast if there ever was one, arrived home -from the club to an irate, ranting wife. - "I'm leaving you, Harry," his wife announced bitterly. "You -promised me faithfully that you'd be back before six and here it is almost -nine. It just can't take that long to play 18 holes of golf." - "Honey, wait," said Harry. "Let me explain. I know what I promised -you, but I have a very good reason for being late. Fred and I tee'd off -right on time and everything was fine for the first three holes. Then, on -the fourth tee Fred had a stroke. I ran back to the clubhouse but couldn't -find a doctor. And, by the time I got back to Fred, he was dead. So, for -the next 15 holes, it was hit the ball, drag Fred, hit the ball, drag Fred... -% - Harry constantly irritated his friends with his eternal optimism. -No matter how bad the situation, he would always say, "Well, it could have -been worse." - To cure him of his annoying habit, his friends decided to invent a -situation so completely black, so dreadful, that even Harry could find no -hope in it. Approaching him at the club bar one day, one of them said, -"Harry! Did you hear what happened to George? He came home last night, -found his wife in bed with another man, shot them both, and then turned -the gun on himself!" - "Terrible," said Harry. "But it could have been worse." - "How in hell," demanded his dumbfounded friend, "could it possibly -have been worse?" - "Well," said Harry, "if it had happened the night before, I'd be -dead right now." -% "Has anyone had problems with the computer accounts?" "Yes; I don't have one." "Okay, you can send mail to one of the tutors..." @@ -2112,13 +1971,6 @@ lessening mine; as he who lights his tap without darkening me. -- Thomas Jefferson on patents on ideas % - "Heard you were moving your piano, so I came over to help." - "Thanks. Got it upstairs already." - "Do it alone?" - "Nope. Hitched the cat to it." - "How would that help?" - "Used a whip." -% "Hey, Sam, how about a loan?" "Whattaya need?" "Oh, about $500." @@ -2182,11 +2034,6 @@ could forget that, to within half a perc social climber said to her roommate. "I mean, I've never seen a Porsche full of money before." % - "How'd you get that flat?" - "Ran over a bottle." - "Didn't you see it?" - "Damn kid had it under his coat." -% Human thinking can skip over a great deal, leap over small misunderstandings, can contain ifs and buts in untroubled corners of the mind. But the machine has no corners. Despite all the attempts to @@ -2199,11 +2046,6 @@ line by code line, the programmer confro The ways of human and machine understanding are disjunct. -- Ellen Ullman, "Close to the Machine" % - "I believe you have the wrong number," said the old gentleman into -the phone. "You'll have to call the weather bureau for that information." - "Who was that?" his young wife asked. - "Some guy wanting to know if the coast was clear." -% "I cannot read the fiery letters," said Frito Bugger in a quavering voice. "No," said GoodGulf, "but I can. The letters are Elvish, of @@ -2496,11 +2338,6 @@ it gets so bad you can't handle it alone would destroy the whole point of it." -- Thomas Pynchon, "The Crying of Lot 49" % - "I'm looking for adventure, excitement, beautiful women," cried the -young man to his father as he prepared to leave home. "Don't try to stop me. -I'm on my way." - "Who's trying to stop you?" shouted the father. "Take me along!" -% I'm sure that VMS is completely documented, I just haven't found the right manual yet. I've been working my way through the manuals in the document library and I'm half way through the second cabinet, (3 shelves to go), so I @@ -2558,20 +2395,6 @@ pie-bakers and pie-dividers is way out o been an efficiency expert? -- Motor Trend, May 1983 % - In the beginning, God created the Earth and he said, "Let there be -mud." - And there was mud. - And God said, "Let Us make living creatures out of mud, so the mud -can see what we have done." - And God created every living creature that now moveth, and one was -man. Mud-as-man alone could speak. - "What is the purpose of all this?" man asked politely. - "Everything must have a purpose?" asked God. - "Certainly," said man. - "Then I leave it to you to think of one for all of this," said God. - And He went away. - -- Kurt Vonnegut, Jr., "Between Time and Timbuktu" -% In the beginning there was data. The data was without form and null, and darkness was upon the face of the console; and the Spirit of IBM was moving over the face of the market. And DEC said, "Let there @@ -2926,11 +2749,6 @@ Church soon made its peace with Galileo' earth really does revolve about the sun. -- S. J. Gould, "The Mismeasure of Man" % - "My mother," said the sweet young steno, "says there are some things -a girl should not do before twenty." - "Your mother is right," said the executive, "I don't like a large -audience, either." -% NEW YORK -- Kraft Foods, Inc. announced today that its board of directors unanimously rejected the $11 billion takeover bid by Philip Morris and Co. A Kraft spokesman stated in a press conference that the @@ -3727,14 +3545,6 @@ was solidly entrenched in the market, an improve ... -- Dave Barry, "In Search of Excellence" % - "That wife of mine is a liar," said the angry husband to a -sympathetic pal seated next to him in a bar. - "How do you know?" the friend asked. - "She didn't come home last night, and when I asked her where -she'd been she said she'd spent the night with her sister Shirley." - "So?" - "So, she's a liar. I spent the night with her sister Shirley." -% "That's right; the upper-case shift works fine on the screen, but they're not coming out on the damn printer... Hold? Sure, I'll hold." -- e. e. cummings last service call @@ -3768,13 +3578,6 @@ laughed uproariously. "What's the matte got a sense of humor?" "I don't have to laugh," she said. "I'm leaving Friday anyway. % - The doctor had just finished giving the young man a thorough -physical examination. "The best thing for you to do," the M.D. said, -"is give up drinking, give up smoking, get to bed early and stay away -from women." - "Doc, I don't deserve the best," pleaded his patient. "What's -second best?" -% The FIELD GUIDE to NORTH AMERICAN MALES SPECIES: Cranial Males @@ -3889,22 +3692,6 @@ win through and still know where his tow reckoned with. -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" % - The honeymooning couple agreed it was a fine day for horseback riding. -After a mile or so, the bride's mount cantered under a low tree and a -branch scraped her forehead lightly. The groom dismounted, glared at his -wife's horse, and said, "That's number one." - The ride then proceeded. After another mile or so, the bride's -horse stumbled over a pebble and the lady suffered a slight jostling. -Again, her man leapt from his saddle and strode over to the nervous animal. -"That's two," he said. - Five miles later, the bride's horse became frightened when a rabbit -crossed its path, reared up and threw the girl. Immediately, the groom was -off his horse. "That's three!", he shouted, and, pulling out a pistol, he -shot the horse between the eyes. - "You brute!" shrieked his bride. "Now I see the kind of man I -married! You're a sadist, that's what!" - The groom turned to her coolly. "That's one," he said. -% "The jig's up, Elman." "Which jig?" -- Jeff Elman @@ -4349,29 +4136,6 @@ of his mortal enemy -- to those both com spread only for demons or for gods." -- Gordon R. Dickson, "Soldier Ask Not" % - "They spend years searching for their natural parents, convinced their -parents will be happy to see them. I mean, really, can you imagine someone -being happy to see an orphan? Nobody wants them... that's why they're orphans!" - The speaker is Anne Baker, founder and guiding force behind -Orphan-Off, an organization dedicated to keeping orphans confused about the -whereabouts of their natural parents. She is a woman with a mission: - "Basically, what we do is band together to exchange information -about which orphans are looking for which parents in what part of the -country. We're completely computerized. - "The idea is to throw the orphans as many red herrings and false -leads as possible. We'll tell some twenty-three-year-old loser that his -real parents can be found at a certain address on the other side of the -country. Well, by the time the kid shows up, the family is prepared. They -look over the kid's photos and information and they say, 'Oh, the Emersons... -yeah, they used to live here... I think they moved out about five years ago. -I think they went to Iowa, or maybe Idaho.' - "Bam, the door shuts in the kid's face and he's back to zero again. -He's got nothing to go on but the orphan's pathetic determination to continue. - "It's really amazing how much these kids will put up with. Last year -we even sent one kid all the way to Australia. I mean, really. Besides, if -your natural parents were Australian, would you want to meet them?" - -- "National Lampoon", September, 1984 -% This is where the bloodthirsty license agreement is supposed to go, explaining that Interactive EasyFlow is a copyrighted package licensed for use by a single person, and sternly warning you not to pirate copies of it @@ -4683,13 +4447,6 @@ men with whom I felt an immediate sympat more satisfactory to me than the opaque vogue word "empathy". -- Alistair Cooke, "Six Men" % - "What the hell are you getting so upset about? I thought you -didn't believe in God". - "I don't," she sobbed, bursting violently into tears, "but the -God I don't believe in is a good God, a just God, a merciful God. He's -not the mean and stupid God you make Him out to be". - -- Joseph Heller -% "What was the worst thing you've ever done?" "I won't tell you that, but I'll tell you the worst thing that ever happened to me... the most dreadful thing." @@ -4806,20 +4563,6 @@ unanswered. Eventually the form for the the section marked "DEDUCTIONS," Rogers listed: "Bad debt, US Government -- $40,000." % - With deep concern, if not alarm, Dick noted that his friend -Conrad was drunker than he'd ever seen him before. "What's the trouble, -buddy?", he asked, sliding onto the stool next to his friend. - "It's a woman, Dick," Conrad replied. - "I guessed that much. Tell me about it." - "I can't," Conrad said. But after a few more drinks his tongue -and resolution both seemed to weaken and, turning to his buddy, he said, -"Okay. It's your wife." - "My wife!!" - "Yeah." - "What about her?" - Conrad pondered the question heavily, and draped his arm around -his pal. "Well, buddy-boy," he said, "I'm afraid she's cheating on us." -% Work Hard. Rock Hard. Eat Hard. @@ -6593,9 +6336,6 @@ a fund for his funeral. The Lord Chief a shilling. "Only a shilling?" exclaimed the man. "Only a shilling to bury an attorney? Here's a guinea; go and bury twenty of them." % -A fail-safe circuit will destroy others. - -- Klipstein -% A failure will not appear until a unit has passed final inspection. % A fair exterior is a silent recommendation. @@ -6662,17 +6402,6 @@ go!'" % A few hours grace before the madness begins again. % -A figure with curves always offers a lot of interesting angles. -% -A fisherman from Maine went to Alabama on his vacation. He rented a boat, -rowed out to the middle of the lake, and cast his line, but when he looked -down into the water he was horrified to see a man wrapped in chains lying -on the bottom of the lake. He quickly rowed to shore and ran to the police -station. "Sheriff, sheriff," he gasped, there's a guy wrapped in chains, -drowned in the lake!" - "Now ain't that jest like a Yankee," drawled the sheriff, "to steal -more chain than he can swim with?" -% A fitter fits; Though sinners sin A cutter cuts; And thinners thin And an aircraft spotter spots; And paper-blotters blot @@ -6697,11 +6426,6 @@ A fool and his honey are soon parted. % A fool and his money are soon popular. % -A fool and your money are soon partners. -% -A fool is a man who worries about whether or not his lover has integrity. -A wise man, on the other hand, busies himself with deeper attributes. -% A fool must now and then be right by chance. % A foolish consistency is the hobgoblin of little minds. @@ -6744,8 +6468,6 @@ You'll just be walking down the street a A friend of mine won't get a divorce, because he hates lawyers more than he hates his wife. % -A friend with weed is a friend indeed. -% A full belly makes a dull brain. -- Benjamin Franklin @@ -6809,9 +6531,6 @@ A girl with a future avoids the man with A girl's best friend is her mutter. -- Dorothy Parker % -A girl's conscience doesn't really keep her from doing anything wrong-- -it merely keeps her from enjoying it. -% A gleekzorp without a tornpee is like a quop without a fertsneet (sort of). % @@ -7102,27 +6821,6 @@ A language that doesn't have everything actually easier to program in than some that do. -- Dennis M. Ritchie % -A lanky Texan was mad because Texas had just become the second largest state in -the Union, so he made up his mind to move to Alaska. He drove for three days -and three nights to get there and finally he came to what looked like the state -line. He halted his car and walked up to the border guard. "Hi, there! How -do I become a resident of this here biggest state?" demanded the Texan. - The guard looked him up and down and grinned. "Waal," he answered, -there are three things you gotta do to get in. First, drink down a quart of -110 proof corn liquor without blinkin'. Second, kill a grizzly bear, and -third, make love to an Eskimo woman." - "Sounds easy enough," said the Texan. "Where can I get a quart of -this here corn liquor?" - "Got one right here," replied the guard. - The Texan gulped down the whiskey without batting an eyelash. -"Now, do you happen to know where I can find me a grizzly?" - "Yep," answered the guard, "there's a big b'ar over that way, 'bout -a mile... lives in a cave on that cliff." - The Texan lurched merrily off. About an hour later he returned -with his clothes almost torn off and his face scratched and bloody. He was -smiling happily. "Now," he roared, "where's that damn Eskimo woman you -want killed?" -% A large number of installed systems work by fiat. That is, they work by being declared to work. -- Anatol Holt @@ -7230,33 +6928,16 @@ A lot of people I know believe in positi and so do I. I believe everything positively stinks. -- Lew Col % -A lover without indiscretion is no lover at all. - -- Thomas Hardy -% A major, with wonderful force, Called out in Hyde Park for a horse. All the flowers looked round, But no horse could be found; So he just rhododendron, of course. % -A male gynecologist is like an auto mechanic who has never owned a car. - -- Carrie Snow -% -A man always needs to remember one thing about -a beautiful woman. Somewhere, somebody's tired of her. -% A man always remembers his first love with special tenderness, but after that begins to bunch them. -- H. L. Mencken % -A man arrived home early to find his wife in the arms of his best friend, -who swore how much they were in love. To quiet the enraged husband, the -lover suggested, "Friends shouldn't fight, let's play gin rummy. If I win, -you get a divorce so I can marry her. If you win, I promise never to see -her again. Okay?" - "Alright," agreed the husband. "But how about a quarter a point -on the side to make it interesting?" -% A man can have two, maybe three love affairs while he's married. After that it's cheating. -- Yves Montand @@ -7393,9 +7074,6 @@ in no other way. A man who fishes for marlin in ponds will put his money in Etruscan bonds. % -A man who likes to lie in bed can usually -find a girl willing to listen to him. -% A man who turns green has eschewed protein. % A man with 3 wings and a dictionary is cousin to the turkey. @@ -7403,12 +7081,8 @@ A man with 3 wings and a dictionary is c A man with one watch knows what time it is. A man with two watches is never quite sure. % -A man without a God is like a fish without a bicycle. -% A man without a woman is like a fish without gills. % -A man without a woman is like a statue without pigeons. -% A man would still do something out of sheer perversity - he would create destruction and chaos - just to gain his point... and if all this could in turn be analyzed and prevented by predicting that it would occur, then man @@ -7593,33 +7267,6 @@ will go far towards curing the rascal of A New York City ordinance prohibits the shooting of rabbits from the rear of a Third Avenue street car -- if the car is in motion. % -A New Yorker is riding down the road in his new Mercedes. So intent is he -on the cocaine in his hand he completely misses a turn and his car plunges -over the five-hundred-foot cliff to be smashed into pieces at the bottom. -As the on-lookers rush to the edge of the cliff they see him fifty feet -from the top of the cliff clinging to a stunted bush with all his strength. -"Dear Lord," he prays, "I never asked you for nothin' before, but I'm askin' -you now: Save me, Lord, save me." - Booms the Lord: "LET GO OF THE BRANCH." - "But Lord, if I do that, I'll fall!" - "TRUST ME, LET GO OF THE BRANCH." - "But Lord, I'm gonna fall and die..." - "TRUST ME TO SAVE YOU. LET GO OF THE BRANCH." - Okay, Lord, I'll trust you, here I... here I go!" And he falls -to his death. - "DUMB YANKEE." -% -A New Yorker was driving through Berkeley when he saw a big crowd gathered -by the side of the street. Curiosity got the better of him and he leaned -out of his window to ask an onlooker what was going on. The fellow explained -that a protestor against the U.S. position in South America had doused -himself with gasoline and set himself on fire. "That's terrible," gasped -the man. "But why is everyone still standing around?" - "Well, they're taking up a collection for his wife and kids," the -onlooker explained. "Would you be willing to help?" - "Well, sure," replied the New Yorker. "I suppose I could spare a -gallon or two." -% A newspaper is a circulating library with high blood pressure. -- Arthure "Bugs" Baer % @@ -7684,12 +7331,6 @@ itself, and that is an excellent thing f manufacturers for whom patriotic terrors are an abundant source of gain. -- Anatole France % -A perfectly honest woman, a woman who never flatters, who never manages, -who never cajoles, who never conceals, who never uses her eyes, who never -speculates on the effect which she produces, who never is conscious of -unspoken admiration, what a monster, I say, would such a female be! - -- Thackeray -% A person forgives only when they are in the wrong. % A person is just about as big as the things that make him angry. @@ -7794,8 +7435,6 @@ last pair of shoes, already worn out in of yours to press against my heart. -- Johann Wolfgang von Goethe % -A pretty woman can do anything; an ugly woman must do everything. -% A priest advised Voltaire on his death bed to renounce the devil. Replied Voltaire, "This is no time to make new enemies." % @@ -7881,23 +7520,6 @@ the ball is more than three inches from to make a travesty of the game. -- Donald A. Metz % -A rabbi and a priest are sitting together on a train, and the rabbi leans -over and asks, "So, how high can you advance in your organization?" - The priest replies, "Well, if I am lucky, I guess I could become a -Bishop." - "Well, could you get any higher than that?" - "I suppose that if my works are seen in a very good light that I -might be made an Archbishop." - "Is there any way that you might go higher than that?" - "If all the Saints should smile, I guess I could be made a Cardinal." - "Could you be anything higher than a Cardinal?" - Hesitating a little bit, the priest said, "I suppose that I could -be elected Pope, but only if it's God's will." - "And could you be anything higher than that, is there any way to go -up from being the Pope?" - "What?! I should be the Messiah himself?!" - The rabbi leaned back and smiled. "One of our boys made it." -% A raccoon tangled with a 23,000 volt line today. The results blacked out 1400 homes and, of course, one raccoon. -- Steel City News @@ -7912,17 +7534,6 @@ A real diplomat is one who can cut his n his neighbor notice it. -- Trygve Lie % -A real estate agent, looking over a farmer's house for possible sale, -commented to the farmer how sturdy the house looked. - The farmer replied, "Yep, built it with my bare hands... did it -the hard way. The steps to the front door, here, carved 'em out of -field stones... did it the hard way. That hardwood floor in the living -room, dovetailed the pieces myself... did it the hard way. The ceiling -beams, made 'em out of my own oak trees... did it the hard way." - Just then, the farmer's gorgeous daughter walked in. The farmer -looks over at the real estate agent who is trying not to stare too -obviously and smiles. "Yep... standing up in a canoe." -% A real friend isn't someone you use once and then throw away. A real friend is someone you can use over and over again. % @@ -8180,8 +7791,6 @@ the student with a stick. % A student who changes the course of history is probably taking an exam. % -A stunning blonde, but probably all bean dip above the eyebrows. -% A successful [software] tool is one that was used to do something undreamed of by its author. -- S. C. Johnson @@ -8318,12 +7927,6 @@ than some of the stuff that nature repla A verbal contract isn't worth the paper it's written on. -- Samuel Goldwyn % -A very intelligent turtle -Found programming UNIX a hurdle - The system, you see, - Ran as slow as did he, -And that's not saying much for the turtle. -% A violent man will die a violent death. -- Lao Tsu % @@ -8351,9 +7954,6 @@ Software rots if not used. These are great mysteries. -- Geoffrey James, "The Tao of Programming" % -A widow is more sought after than an old maid of the same age. - -- Addison -% A wise man can see more from a mountain top than a fool can from the bottom of a well. % @@ -8382,27 +7982,14 @@ A woman can look both moral and exciting were quite a struggle. -- Edna Ferber % -A woman can never be too rich or too thin. -% A woman did what a woman had to, the best way she knew how. To do more was impossible, to do less, unthinkable. -- Dirisha, "The Man Who Never Missed" % -A woman employs sincerity only when every other form of deception has failed. - -- Scott -% A woman, especially if she have the misfortune of knowing anything, should conceal it as well as she can. -- Jane Austen % -A woman forgives the audacity of which -her beauty has prompted us to be guilty. - -- LeSage -% -A woman has got to love a bad man once or twice in her life to be -thankful for a good one. - -- Marjorie Kinnan Rawlings -% A woman is like your shadow; follow her, she flies; fly from her, she follows. -- Chamfort @@ -8580,7 +8167,7 @@ Abscond, v.: % Absence diminishes mediocre passions and increases great ones, as the wind blows out candles and fans fires. - -- La Rochefoucauld + -- François De La Rochefoucauld % Absence in love is like water upon fire; a little quickens, but much extinguishes it. @@ -8654,11 +8241,6 @@ Accept people for what they are -- compl ACCEPTANCE TESTING: An unsuccessful attempt to find bugs. % -Acceptance without proof is the fundamental characteristic of Western -religion; rejection without proof is the fundamental characteristic of -Western science. - -- Gary Zukav, "The Dancing Wu Li Masters" -% Accident, n.: A condition in which presence of mind is good, but absence of body is better. @@ -8993,8 +8575,6 @@ the unimpeded right to get rich, to use cost to others, to win advancement. -- Norman Thomas % -After I run your program, let's make love like crazed weasels, OK? -% After living in New York, you trust nobody, but you believe everything. Just in case. % @@ -9535,7 +9115,7 @@ All the men on my staff can type. % All the passions make us commit faults; love makes us commit the most ridiculous ones. - -- La Rochefoucauld + -- François De La Rochefoucauld % All the really good ideas I ever had came to me while I was milking a cow. -- Grant Wood @@ -10571,8 +10151,6 @@ Any girl can be glamorous; all you have stupid. -- Hedy Lamarr % -Any given program, when running, is obsolete. -% Any given program will expand to fill available memory. % Any great truth can -- and eventually will -- be expressed as a cliche -- @@ -11466,9 +11044,6 @@ Asking a working writer what he thinks a lamp-post how it feels about dogs. -- Christopher Hampton % -Ass, n.: - The masculine of "lass". -% Assembly language experience is [important] for the maturity and understanding of how computers work that it provides. -- D. Gries @@ -12051,11 +11626,6 @@ the wise man saith, "Put all your eggs i basket!" -- Mark Twain % -Behold the unborn foetus and - Weep salt tears crocodilian; -All life is sacred (save, of course, - An enemy civilian). -% Behold the warranty -- the bold print giveth and the fine print taketh away. % @@ -12477,8 +12047,6 @@ Blessed are the forgetful: for they get the better even of their blunders. -- Friedrich Nietzsche % -Blessed are the meek for they shall inhibit the earth. -% Blessed are the young, for they shall inherit the national debt. -- Herbert Hoover % @@ -13660,9 +13228,6 @@ Drinking beer and playing cards neighb plays with elves! -- Elmo and Patsy, "Grandma Got Run Over by a Reindeer" % -Christ: - A man who was born at least 5,000 years ahead of his time. -% Christ died for our sins, so let's not disappoint Him. % Christianity might be a good thing if anyone ever tried it. @@ -13748,8 +13313,6 @@ the walk before it stops snowing. Cleanliness becomes more important when godliness is unlikely. -- P. J. O'Rourke % -Cleanliness is next to impossible. -% CLEVELAND: Where their last tornado did six million dollars worth of improvements. @@ -13890,9 +13453,6 @@ Coincidences are spiritual puns. -- G. K. Chesterton % Cold, adj.: - When the local flashers are handing out written descriptions. -% -Cold, adj.: When the politicians walk around with their hands in their own pockets. % @@ -14184,7 +13744,7 @@ Computers will not be perfected until th than the estimate the job will cost. % Conceit causes more conversation than wit. - -- La Rochefoucauld + -- François De La Rochefoucauld % Concept, n.: Any "idea" for which an outside consultant billed you more than @@ -14644,8 +14204,6 @@ DALLAS: The city that chose Astroturf to keep the cheerleaders from grazing. % -Dallas still lives. God MUST be dead. -% Dammit Jim, I'm an actor not a doctor. % Dammit, man, that's unprofessional! A good bartender laughs anyway! @@ -14908,14 +14466,6 @@ of education may be of even greater impo correct current table manners, vital as Miss Manners believes that is. % Dear Miss Manners: - Please list some tactful ways of removing a man's saliva from -your face. - -Gentle Reader: - Please list some decent ways of acquiring a man's saliva on -your face ... -% -Dear Miss Manners: I carry a big black umbrella, even if there's just a thirty percent chance of rain. May I ask a young lady who is a stranger to me to share its protection? This morning, I was waiting for a bus in comparative comfort, my umbrella @@ -15537,16 +15087,12 @@ Do clones have navels? Do I like getting drunk? Depends on who's doing the drinking. -- Amy Gorin % -Do infants have as much fun in infancy as adults do in adultery? -% Do Miami a favor. When you leave, take someone with you. % Do molecular biologists wear designer genes? % Do more than anyone expects, and pretty soon everyone will expect more. % -Do not believe in miracles -- rely on them. -% Do not clog intellect's sluices with bits of knowledge of questionable uses. % Do not count your chickens before they are hatched. @@ -16031,10 +15577,6 @@ want to help you could agree with each o % Don't you wish you had more energy... or less ambition? % -Dope will get you through times of no money better that money will get -you through times of no dope. - -- Gilbert Shelton -% Dorothy: How can you talk if you haven't got a brain? Scarecrow: I don't know. But some people without brains do an awful lot of talking, don't they? @@ -19581,12 +19123,6 @@ GEMINI (May 21 - June 20) the mail carefully, although there won't be anything good in it today, either. % -GEMINI (May 21 - June 20) - You are a quick and intelligent thinker. People like you -because you are bisexual. However, you are inclined to expect too much -for too little. This means you are cheap. Geminis are known for -committing incest. -% GEMINI (May 21 to Jun. 20) Good news and bad news highlighted. Enjoy the good news while you can; the bad news will make you forget it. You will enjoy praise @@ -20001,8 +19537,6 @@ can't find it anywhere. I'm sure he's t would he lie about a thing like that? -- Arthur Naiman, "Every Goy's Guide to Yiddish" % -God gives us relatives; thank goodness we can chose our friends. -% God grant us the serenity to accept the things we cannot change, courage to change the things we can, and wisdom to know the difference. % @@ -20033,8 +19567,6 @@ but by pains and contradictions. % God is a comic playing to an audience that's afraid to laugh. % -God is a polytheist. -% God is Dead. -- Nietzsche Nietzsche is Dead. @@ -20071,8 +19603,6 @@ God made machine language; all the rest God made the integers; all else is the work of Man. -- Kronecker % -God made the world in six days, and was arrested on the seventh. -% God may be subtle, but He isn't plain mean. -- Albert Einstein % @@ -20174,10 +19704,6 @@ Diary of a Young Girl LITE(tm) % Good advice is one of those insults that ought to be forgiven. % -Good advice is something a man gives -when he is too old to set a bad example. - -- La Rochefoucauld -% Good day for a change of scene. Repaper the bedroom wall. % Good day for business affairs. @@ -20373,8 +19899,6 @@ GRAVITY: % Gravity brings me down. % -Gravity is a myth, the Earth sucks. -% Gray's Law of Programming: 'n+1' trivial tasks are expected to be accomplished in the same time as 'n' tasks. @@ -20457,13 +19981,6 @@ Groundhog Day has been observed only onc groundhog came out of its hole, it was killed by a mudslide. -- Johnny Carson % -Grover Cleveland, though constantly at loggerheads with the Senate, got on -better with the House of Representatives. A popular story circulating -during his presidency concerned the night he was roused by his wife crying, -"Wake up! I think there are burglars in the house." - "No, no, my dear," said the president sleepily, "in the Senate -maybe, but not in the House." -% Growing old isn't bad when you consider the alternatives. -- Maurice Chevalier % @@ -21832,8 +21349,6 @@ Him: "Really? That's incredible... Hindsight is always 20:20. -- Billy Wilder % -Hindsight is an exact science. -% Hippogriff, n.: An animal (now extinct) which was half horse and half griffin. The griffin was itself a compound creature, half lion and half @@ -22032,8 +21547,6 @@ Home is the place where, when you have t they have to take you in. -- Robert Frost, "The Death of the Hired Man" % -Home is where the hurt is. -% Home life as we understand it is no more natural to us than a cage is to a cockatoo. -- George Bernard Shaw @@ -25271,9 +24784,6 @@ is a camel's behind. % If a can of Alpo costs 38 cents, would it cost $2.50 in Dog Dollars? % -If a child annoys you, quiet him by brushing their hair. If this doesn't -work, use the other side of the brush on the other end of the child. -% If A equals success, then the formula is _A = _X + _Y + _Z. _X is work. _Y is play. _Z is keep your mouth shut. -- Albert Einstein @@ -25454,8 +24964,6 @@ We're offering a substantial reward. He blind in his left eye, is missing part of his right ear and the tip of his tail. He's been recently fixed. Answers to "Lucky". % -If anything can go wrong, it will. -% If at first you do succeed, try to hide your astonishment. % If at first you don't succeed, destroy all evidence that you tried. @@ -25866,8 +25374,6 @@ of a student-poet to hang on to his ever % If it weren't for the last minute, nothing would ever get done. % -If it's not in the computer, it doesn't exist. -% If it's Tuesday, this must be someone else's fortune. % If it's worth doing, do it for money. @@ -26304,9 +25810,6 @@ itself to going to bed each night by the If two people love each other, there can be no happy end to it. -- Ernest Hemingway % -If two wrongs don't make a right, try three. - -- Dr. Laurence J. Peter -% *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 10:34:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A85E5106566B; Tue, 27 Dec 2011 10:34:00 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 964608FC08; Tue, 27 Dec 2011 10:34:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRAY08r049178; Tue, 27 Dec 2011 10:34:00 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRAY0M4049175; Tue, 27 Dec 2011 10:34:00 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112271034.pBRAY0M4049175@svn.freebsd.org> From: Xin LI Date: Tue, 27 Dec 2011 10:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228910 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 10:34:00 -0000 Author: delphij Date: Tue Dec 27 10:34:00 2011 New Revision: 228910 URL: http://svn.freebsd.org/changeset/base/228910 Log: Update rtprio(2) manual page to reflect the latest changes in -CURRENT as well as provide documentation for rtprio_thread(2) system call. MFC after: 1 month X-MFC-after: r228470 Modified: head/lib/libc/sys/Makefile.inc head/lib/libc/sys/rtprio.2 Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Tue Dec 27 10:21:57 2011 (r228909) +++ head/lib/libc/sys/Makefile.inc Tue Dec 27 10:34:00 2011 (r228910) @@ -188,6 +188,7 @@ MLINKS+=read.2 pread.2 read.2 preadv.2 r MLINKS+=readlink.2 readlinkat.2 MLINKS+=recv.2 recvfrom.2 recv.2 recvmsg.2 MLINKS+=rename.2 renameat.2 +MLINKS+=rtprio.2 rtprio_thread.2 .if !defined(NO_P1003_1B) MLINKS+=sched_get_priority_max.2 sched_get_priority_min.2 \ sched_get_priority_max.2 sched_rr_get_interval.2 Modified: head/lib/libc/sys/rtprio.2 ============================================================================== --- head/lib/libc/sys/rtprio.2 Tue Dec 27 10:21:57 2011 (r228909) +++ head/lib/libc/sys/rtprio.2 Tue Dec 27 10:34:00 2011 (r228910) @@ -1,3 +1,4 @@ +.\"- .\" Copyright (c) 1994, Henrik Vestergaard Draboel .\" All rights reserved. .\" @@ -26,15 +27,40 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. +.\"- +.\" Copyright (c) 2011 Xin LI +.\" 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 July 23, 1994 +.Dd December 27, 2011 .Dt RTPRIO 2 .Os .Sh NAME -.Nm rtprio -.Nd examine or modify a process realtime or idle priority +.Nm rtprio , +.Nm rtprio_thread +.Nd examine or modify realtime or idle priority .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -42,11 +68,18 @@ .In sys/rtprio.h .Ft int .Fn rtprio "int function" "pid_t pid" "struct rtprio *rtp" +.Ft int +.Fn rtprio_thread "int function" "lwpid_t lwpid" "struct rtprio *rtp" .Sh DESCRIPTION The .Fn rtprio system call -is used to lookup or change the realtime or idle priority of a process. +is used to lookup or change the realtime or idle priority of a process, +or the calling thread. +The +.Fn rtprio_thread +system call +is used to lookup or change the realtime or idle priority of a thread. .Pp The .Fa function @@ -54,10 +87,31 @@ argument specifies the operation to be performed. RTP_LOOKUP to lookup the current priority, and RTP_SET to set the priority. -The +.Pp +For the +.Fn rtprio +system call, +the .Fa pid argument -specifies the process to be used, 0 for the current process. +specifies the process to operate on, +0 for the calling thread. +When +.Fa pid +is non-zero, +the system call reports the highest priority in the process, +or sets all threads' priority in the process, +depending on value of the +.Fa function +argument. +.Pp +For the +.Fn rtprio_thread +system call, +the +.Fa lwpid +specifies the thread to operate on, +0 for the calling thread. .Pp The .Fa *rtp @@ -83,12 +137,12 @@ field ranges between 0 and .Pp Realtime and idle priority is inherited through fork() and exec(). .Pp -A realtime process can only be preempted by a process of equal or -higher priority, or by an interrupt; idle priority processes will run only -when no other real/normal priority process is runnable. -Higher real/idle priority processes -preempt lower real/idle priority processes. -Processes of equal real/idle priority are run round-robin. +A realtime thread can only be preempted by a thread of equal or +higher priority, or by an interrupt; idle priority threads will run only +when no other real/normal priority thread is runnable. +Higher real/idle priority threads +preempt lower real/idle priority threads. +Threads of equal real/idle priority are run round-robin. .Sh RETURN VALUES .Rv -std rtprio .Sh ERRORS @@ -102,12 +156,17 @@ The specified .Fa prio was out of range. .It Bq Er EPERM -The calling process is not allowed to set the realtime priority. +The calling thread is not allowed to set the realtime priority. Only -root is allowed to change the realtime priority of any process, and non-root -may only change the idle priority of the current process. +root is allowed to change the realtime priority of any thread, and non-root +may only change the idle priority of threads the user owns, +when the +.Xr sysctl 8 +variable +.Va security.bsd.unprivileged_idprio +is set to non-zero. .It Bq Er ESRCH -The specified process was not found. +The specified process or thread was not found or visible. .El .Sh SEE ALSO .Xr nice 1 , @@ -115,7 +174,8 @@ The specified process was not found. .Xr rtprio 1 , .Xr setpriority 2 , .Xr nice 3 , -.Xr renice 8 +.Xr renice 8 , +.Xr p_cansee 9 . .Sh AUTHORS .An -nosplit The original author was @@ -124,3 +184,7 @@ This implementation in .Fx was substantially rewritten by .An David Greenman . +The +.Fn rtprio_thread +system call was implemented by +.An David Xu . From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 10:36:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF57E1065689; Tue, 27 Dec 2011 10:36:56 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BDDF68FC28; Tue, 27 Dec 2011 10:36:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRAauRm049318; Tue, 27 Dec 2011 10:36:56 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRAau5J049313; Tue, 27 Dec 2011 10:36:56 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201112271036.pBRAau5J049313@svn.freebsd.org> From: Martin Matuska Date: Tue, 27 Dec 2011 10:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228911 - in head/contrib/libarchive/libarchive: . test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 10:36:56 -0000 Author: mm Date: Tue Dec 27 10:36:56 2011 New Revision: 228911 URL: http://svn.freebsd.org/changeset/base/228911 Log: Update to vendor revision 4016. Vendor has integrated most of our local changes in revisions 3976-3979 so future updates are going to be easier. Thanks to Tim Kientzle . MFC after: 8 days Replaced: head/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu - copied unchanged from r228908, vendor/libarchive/dist/libarchive/test/test_compat_zip_2.zip.uu Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c Directory Properties: head/contrib/libarchive/ (props changed) head/contrib/libarchive/cpio/ (props changed) head/contrib/libarchive/libarchive/ (props changed) head/contrib/libarchive/libarchive_fe/ (props changed) head/contrib/libarchive/tar/ (props changed) Modified: head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Tue Dec 27 10:34:00 2011 (r228910) +++ head/contrib/libarchive/libarchive/archive_read_support_format_cpio.c Tue Dec 27 10:36:56 2011 (r228911) @@ -42,6 +42,10 @@ __FBSDID("$FreeBSD$"); #include "archive_private.h" #include "archive_read_private.h" +#ifdef _MSC_VER +#define __packed +#pragma pack(push, 1) +#endif struct cpio_bin_header { unsigned char c_magic[2]; unsigned char c_dev[2]; @@ -87,6 +91,11 @@ struct cpio_newc_header { char c_crc[8]; } __packed; +#ifdef _MSC_VER +#undef __packed +#pragma pack(pop) +#endif + struct links_entry { struct links_entry *next; struct links_entry *previous; Modified: head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Tue Dec 27 10:34:00 2011 (r228910) +++ head/contrib/libarchive/libarchive/archive_read_support_format_iso9660.c Tue Dec 27 10:36:56 2011 (r228911) @@ -302,8 +302,6 @@ struct file_info { struct file_info *first; struct file_info **last; } rede_files; - /* To check a ininity loop. */ - struct file_info *loop_by; }; struct heap_queue { @@ -1802,26 +1800,82 @@ parse_file_info(struct archive_read *a, file->re = 0; parent->subdirs--; } else if (file->re) { - /* This file's parent is not rr_moved, clear invalid - * "RE" mark. */ - if (parent == NULL || parent->rr_moved == 0) - file->re = 0; - else if ((flags & 0x02) == 0) { - file->rr_moved_has_re_only = 0; - file->re = 0; + /* + * Sanity check: file's parent is rr_moved. + */ + if (parent == NULL || parent->rr_moved == 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge RE"); + return (NULL); + } + /* + * Sanity check: file does not have "CL" extension. + */ + if (file->cl_offset) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge RE and CL"); + return (NULL); + } + /* + * Sanity check: The file type must be a directory. + */ + if ((flags & 0x02) == 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge RE"); + return (NULL); } } else if (parent != NULL && parent->rr_moved) file->rr_moved_has_re_only = 0; else if (parent != NULL && (flags & 0x02) && (parent->re || parent->re_descendant)) file->re_descendant = 1; - if (file->cl_offset != 0) { + if (file->cl_offset) { + struct file_info *r; + + if (parent == NULL || parent->parent == NULL) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } + /* + * Sanity check: The file type must be a regular file. + */ + if ((flags & 0x02) != 0) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } parent->subdirs++; /* Overwrite an offset and a number of this "CL" entry * to appear before other dirs. "+1" to those is to * make sure to appear after "RE" entry which this * "CL" entry should be connected with. */ file->offset = file->number = file->cl_offset + 1; + + /* + * Sanity check: cl_offset does not point at its + * the parents or itself. + */ + for (r = parent; r; r = r->parent) { + if (r->offset == file->cl_offset) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } + } + if (file->cl_offset == file->offset || + parent->rr_moved) { + archive_set_error(&a->archive, + ARCHIVE_ERRNO_MISC, + "Invalid Rockridge CL"); + return (NULL); + } } } @@ -1925,6 +1979,13 @@ parse_rockridge(struct archive_read *a, */ break; } + if (p[0] == 'P' && p[1] == 'L') { + /* + * PL extension won't appear; + * contents are always ignored. + */ + break; + } if (p[0] == 'P' && p[1] == 'N') { if (version == 1 && data_length == 16) { file->rdev = toi(data,4); @@ -2700,15 +2761,12 @@ rede_add_entry(struct file_info *file) { struct file_info *re; + /* + * Find "RE" entry. + */ re = file->parent; - while (re != NULL && !re->re) { - /* Sanity check to prevent a infinity loop - * cause by a currupted iso file. */ - if (re->loop_by == file) - return (-1); - re->loop_by = file; + while (re != NULL && !re->re) re = re->parent; - } if (re == NULL) return (-1); Modified: head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c Tue Dec 27 10:34:00 2011 (r228910) +++ head/contrib/libarchive/libarchive/archive_write_set_format_cpio.c Tue Dec 27 10:36:56 2011 (r228911) @@ -62,6 +62,11 @@ struct cpio { size_t ino_list_next; }; +#ifdef _MSC_VER +#define __packed +#pragma pack(push, 1) +#endif + struct cpio_header { char c_magic[6]; char c_dev[6]; @@ -76,6 +81,11 @@ struct cpio_header { char c_filesize[11]; } __packed; +#ifdef _MSC_VER +#undef __packed +#pragma pack(pop) +#endif + /* * Set output format to 'cpio' format. */ Copied: head/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu (from r228908, vendor/libarchive/dist/libarchive/test/test_compat_zip_2.zip.uu) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libarchive/libarchive/test/test_compat_zip_2.zip.uu Tue Dec 27 10:36:56 2011 (r228911, copy of r228908, vendor/libarchive/dist/libarchive/test/test_compat_zip_2.zip.uu) @@ -0,0 +1,10 @@ +$FreeBSD$ + +begin 644 test_compat_zip_2.zip +M4$L#!`H``````'V59CT````````````````%````9FEL93$M2E5.2RU02P,$ +M"@``````@95F/<>D!,D&````!@````4```!F:6QE,F9I;&4R"E!+`0(>`PH` +M`````'V59CT````````````````%``````````````"D@0````!F:6QE,5!+ +M`0(>`PH``````(&59CW'I`3)!@````8````%``````````````"D@2D```!F +::6QE,E!+!08``````@`"`&8```!2```````` +` +end From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 12:58:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD675106564A; Tue, 27 Dec 2011 12:58:54 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0AA88FC0C; Tue, 27 Dec 2011 12:58:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRCwsWf053724; Tue, 27 Dec 2011 12:58:54 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRCwsrU053722; Tue, 27 Dec 2011 12:58:54 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112271258.pBRCwsrU053722@svn.freebsd.org> From: Ed Schouten Date: Tue, 27 Dec 2011 12:58:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228912 - head/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 12:58:55 -0000 Author: ed Date: Tue Dec 27 12:58:54 2011 New Revision: 228912 URL: http://svn.freebsd.org/changeset/base/228912 Log: Add manual page for atomic operations. Added: head/share/man/man3/ATOMIC_VAR_INIT.3 (contents, props changed) Modified: head/share/man/man3/Makefile Added: head/share/man/man3/ATOMIC_VAR_INIT.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man3/ATOMIC_VAR_INIT.3 Tue Dec 27 12:58:54 2011 (r228912) @@ -0,0 +1,295 @@ +.\" Copyright (c) 2011 Ed Schouten +.\" 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 December 27, 2011 +.Dt ATOMIC_VAR_INIT 3 +.Os +.Sh NAME +.Nm ATOMIC_VAR_INIT , +.Nm atomic_init , +.Nm atomic_load , +.Nm atomic_store , +.Nm atomic_exchange , +.Nm atomic_compare_exchange_strong , +.Nm atomic_compare_exchange_weak , +.Nm atomic_fetch_add , +.Nm atomic_fetch_and , +.Nm atomic_fetch_or , +.Nm atomic_fetch_sub , +.Nm atomic_fetch_xor , +.Nm atomic_is_lock_free +.Nd type-generic atomic operations +.Sh SYNOPSIS +.In stdatomic.h +.Pp +_Atomic(T) +.Fa v += ATOMIC_VAR_INIT(c); +.Ft void +.Fn atomic_init "_Atomic(T) *object" "T value" +.Ft T +.Fn atomic_load "_Atomic(T) *object" +.Ft T +.Fn atomic_load_explicit "_Atomic(T) *object" "memory_order order" +.Ft void +.Fn atomic_store "_Atomic(T) *object" "T desired" +.Ft void +.Fn atomic_store_explicit "_Atomic(T) *object" "T desired" "memory_order order" +.Ft T +.Fn atomic_exchange "_Atomic(T) *object" "T desired" +.Ft T +.Fn atomic_exchange_explicit "_Atomic(T) *object" "T desired" "memory_order order" +.Ft _Bool +.Fn atomic_compare_exchange_strong "_Atomic(T) *object" "T *expected" "T desired" +.Ft _Bool +.Fn atomic_compare_exchange_strong_explicit "_Atomic(T) *object" "T *expected" "T desired" "memory_order success" "memory_order failure" +.Ft _Bool +.Fn atomic_compare_exchange_weak "_Atomic(T) *object" "T *expected" "T desired" +.Ft _Bool +.Fn atomic_compare_exchange_weak_explicit "_Atomic(T) *object" "T *expected" "T desired" "memory_order success" "memory_order failure" +.Ft T +.Fn atomic_fetch_add "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_add_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_and "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_and_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_or "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_or_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_sub "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_sub_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft T +.Fn atomic_fetch_xor "_Atomic(T) *object" "T operand" +.Ft T +.Fn atomic_fetch_xor_explicit "_Atomic(T) *object" "T operand" "memory_order order" +.Ft _Bool +.Fn atomic_is_lock_free "const _Atomic(T) *object" +.Sh DESCRIPTION +The header +.In stdatomic.h +provides type-generic macros for atomic operations. +Atomic operations can be used by multithreaded programs to provide +shared variables between threads that in most cases may be modified +without acquiring locks. +.Pp +Atomic variables are declared using the +.Fn _Atomic +type specifier. +These variables are not type-compatible with their non-atomic +counterparts. +Depending on the compiler used, atomic variables may be opaque and can +therefore only be influenced using the macros described. +.Pp +The +.Fn atomic_init +macro initializes the atomic variable +.Fa object +with a +.Fa value . +Atomic variables can be initialized while being declared using +.Fn ATOMIC_VAR_INIT . +.Pp +The +.Fn atomic_load +macro returns the value of atomic variable +.Fa object . +The +.Fn atomic_store +macro sets the atomic variable +.Fa object +to its +.Fa desired +value. +.Pp +The +.Fn atomic_exchange +macro combines the behaviour of +.Fn atomic_load +and +.Fn atomic_store . +It sets the atomic variable +.Fa object +to its desired +.Fa value +and returs the original contents of the atomic variable. +.Pp +The +.Fn atomic_compare_exchange_strong +macro stores a +.Fa desired +value into atomic variable +.Fa object , +only if the atomic variable is equal to its +.Fa expected +value. +Upon success, the macro returns +.Dv true . +Upon failure, the +.Fa desired +value is overwritten with the value of the atomic variable and +.Dv false +is returned. +The +.Fn atomic_compare_exchange_weak +macro is identical to +.Fn atomic_compare_exchange_strong , +but is allowed to fail even if atomic variable +.Fa object +is equal to its +.Fa expected +value. +.Pp +The +.Fn atomic_fetch_add +macro adds the value +.Fa operand +to atomic variable +.Fa object +and returns the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_and +macro applies the +.Em and +operator to atomic variable +.Fa object +and +.Fa operand +and stores the value into +.Fa object , +while returning the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_or +macro applies the +.Em or +operator to atomic variable +.Fa object +and +.Fa operand +and stores the value into +.Fa object , +while returning the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_sub +macro subtracts the value +.Fa operand +to atomic variable +.Fa object +and returns the original contents of the atomic variable. +.Pp +The +.Fn atomic_fetch_xor +macro applies the +.Em xor +operator to atomic variable +.Fa object +and +.Fa operand +and stores the value into +.Fa object , +while returning the original contents of the atomic variable. +.Pp +The +.Fn atomic_is_lock_free +macro returns whether atomic variable +.Fa object +uses locks when using atomic operations. +.Sh BARRIERS +The atomic operations described previously are implemented in such a way +that they disallow both the compiler and the executing processor to +re-order any nearby memory operations across the atomic operation. +In certain cases this behaviour may cause suboptimal performance. +To mitigate this, every atomic operation has an +.Fn _explicit +version that allows the re-ordering to be configured. +.Pp +The +.Fa order +parameter of these +.Fn _explicit +macros can have one of the following values. +.Bl -tag -width memory_order_relaxed +.It Dv memory_order_relaxed +No operation orders memory. +.It Dv memory_order_consume +Perform consume operation. +.It Dv memory_order_acquire +Acquire fence. +.It Dv memory_order_release +Release fence. +.It Dv memory_order_acq_rel +Acquire and release fence. +.It Dv memory_order_seq_cst +Sequentially consistent acquire and release fence. +.El +.Pp +The previously described macros are identical to the +.Fn _explicit +macros, when +.Fa order +is +.Dv memory_order_seq_cst . +.Sh COMPILER SUPPORT +These atomic operations are typically implemented by the compiler, as +they must be implemented type-generically and must often use special +hardware instructions. +As this interface has not been adopted by most compilers yet, the +.In stdatomic.h +header implements these macros on top of existing compiler intrinsics to +provide forward compatibility. +.Pp +This means that certain aspects of the interface, such as support for +different barrier types may simply be ignored. +When using GCC, all atomic operations are executed as if they are using +.Dv memory_order_seq_cst . +.Pp +Instead of using the atomic operations provided by this interface, +.St -isoC-11 +allows the atomic variables to be modified directly using built-in +language operators. +This behaviour cannot be emulated for older compilers. +To prevent unintended non-atomic access to these variables, this header +file places the atomic variable in a structure when using an older +compiler. +.Sh SEE ALSO +.Xr pthread 3 , +.Xr atomic 9 +.Sh STANDARDS +These macros attempt to conform to +.St -isoC-11 . +.Sh HISTORY +These macros appeared in +.Fx 10.0 . +.Sh AUTHORS +.An Ed Schouten Aq ed@FreeBSD.org , +.An David Chisnall Aq theraven@FreeBSD.org Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Tue Dec 27 10:36:56 2011 (r228911) +++ head/share/man/man3/Makefile Tue Dec 27 12:58:54 2011 (r228912) @@ -4,6 +4,7 @@ .include MAN= assert.3 \ + ATOMIC_VAR_INIT.3 \ bitstring.3 \ end.3 \ fpgetround.3 \ @@ -18,7 +19,29 @@ MAN= assert.3 \ timeradd.3 \ tree.3 -MLINKS= bitstring.3 bit_alloc.3 \ +MLINKS= ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong.3 \ + ATOMIC_VAR_INIT.3 atomic_compare_exchange_strong_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak.3 \ + ATOMIC_VAR_INIT.3 atomic_compare_exchange_weak_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_exchange.3 \ + ATOMIC_VAR_INIT.3 atomic_exchange_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_add.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_add_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_and.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_and_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_or.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_or_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_sub.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_sub_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_xor.3 \ + ATOMIC_VAR_INIT.3 atomic_fetch_xor_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_init.3 \ + ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 + ATOMIC_VAR_INIT.3 atomic_load.3 \ + ATOMIC_VAR_INIT.3 atomic_load_explicit.3 \ + ATOMIC_VAR_INIT.3 atomic_store.3 \ + ATOMIC_VAR_INIT.3 atomic_store_explicit.3 +MLINKS+= bitstring.3 bit_alloc.3 \ bitstring.3 bit_clear.3 \ bitstring.3 bit_decl.3 \ bitstring.3 bit_ffc.3 \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 13:01:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF12B1065677; Tue, 27 Dec 2011 13:01:10 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DE96F8FC0C; Tue, 27 Dec 2011 13:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRD1Aff053915; Tue, 27 Dec 2011 13:01:10 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRD1APt053913; Tue, 27 Dec 2011 13:01:10 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112271301.pBRD1APt053913@svn.freebsd.org> From: Ed Schouten Date: Tue, 27 Dec 2011 13:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228913 - head/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 13:01:11 -0000 Author: ed Date: Tue Dec 27 13:01:10 2011 New Revision: 228913 URL: http://svn.freebsd.org/changeset/base/228913 Log: Add missing \. While sorting the MLINKS by name, I forgot to re-add it. Modified: head/share/man/man3/Makefile Modified: head/share/man/man3/Makefile ============================================================================== --- head/share/man/man3/Makefile Tue Dec 27 12:58:54 2011 (r228912) +++ head/share/man/man3/Makefile Tue Dec 27 13:01:10 2011 (r228913) @@ -36,7 +36,7 @@ MLINKS= ATOMIC_VAR_INIT.3 atomic_compar ATOMIC_VAR_INIT.3 atomic_fetch_xor.3 \ ATOMIC_VAR_INIT.3 atomic_fetch_xor_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_init.3 \ - ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 + ATOMIC_VAR_INIT.3 atomic_is_lock_free.3 \ ATOMIC_VAR_INIT.3 atomic_load.3 \ ATOMIC_VAR_INIT.3 atomic_load_explicit.3 \ ATOMIC_VAR_INIT.3 atomic_store.3 \ From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 14:59:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED07A106566C; Tue, 27 Dec 2011 14:59:24 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB90B8FC08; Tue, 27 Dec 2011 14:59:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRExOft057469; Tue, 27 Dec 2011 14:59:24 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRExOog057466; Tue, 27 Dec 2011 14:59:24 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <201112271459.pBRExOog057466@svn.freebsd.org> From: Matt Jacob Date: Tue, 27 Dec 2011 14:59:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228914 - head/sys/dev/isp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 14:59:25 -0000 Author: mjacob Date: Tue Dec 27 14:59:24 2011 New Revision: 228914 URL: http://svn.freebsd.org/changeset/base/228914 Log: Fix target mode compilation issues that arose after a change in the sense data structures. MFC after: 1 week Modified: head/sys/dev/isp/isp_freebsd.c head/sys/dev/isp/isp_freebsd.h Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Tue Dec 27 13:01:10 2011 (r228913) +++ head/sys/dev/isp/isp_freebsd.c Tue Dec 27 14:59:24 2011 (r228914) @@ -3170,10 +3170,10 @@ isptargstart(struct cam_periph *periph, xpt_print(atio->ccb_h.path, "[0x%x] Non-Zero Lun %d: cdb0=0x%x\n", atio->tag_id, return_lun, cdb[0]); if (cdb[0] != INQUIRY && cdb[0] != REPORT_LUNS && cdb[0] != REQUEST_SENSE) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_ILLEGAL_REQUEST; - atio->sense_data.add_sense_code = 0x25; - atio->sense_data.add_sense_code_qual = 0x0; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_ILLEGAL_REQUEST; + SDFIXED(atio->sense_data)->add_sense_code = 0x25; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x0; + atio->sense_len = SSD_MIN_SIZE; } return_lun = CAM_LUN_WILDCARD; } @@ -3197,10 +3197,10 @@ isptargstart(struct cam_periph *periph, case READ_16: if (isptarg_rwparm(cdb, disk_data, disk_size, atio->ccb_h.ccb_data_offset, &data_ptr, &data_len, &last)) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x24; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24; + atio->sense_len = SSD_MIN_SIZE; } else { #ifdef ISP_FORCE_TIMEOUT { @@ -3236,10 +3236,10 @@ isptargstart(struct cam_periph *periph, case WRITE_16: if (isptarg_rwparm(cdb, disk_data, disk_size, atio->ccb_h.ccb_data_offset, &data_ptr, &data_len, &last)) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x24; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24; + atio->sense_len = SSD_MIN_SIZE; } else { #ifdef ISP_FORCE_TIMEOUT { @@ -3273,10 +3273,10 @@ isptargstart(struct cam_periph *periph, flags |= CAM_DIR_IN; if (cdb[1] || cdb[2] || cdb[3]) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x20; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x20; + atio->sense_len = SSD_MIN_SIZE; break; } data_len = sizeof (iqd); @@ -3297,10 +3297,10 @@ isptargstart(struct cam_periph *periph, if (ca) { ca = 0; status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x28; - atio->sense_data.add_sense_code_qual = 0x0; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x28; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x0; + atio->sense_len = SSD_MIN_SIZE; } break; case SYNCHRONIZE_CACHE: @@ -3315,10 +3315,10 @@ isptargstart(struct cam_periph *periph, flags |= CAM_DIR_IN; if (cdb[2] || cdb[3] || cdb[4] || cdb[5]) { status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x24; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x24; + atio->sense_len = SSD_MIN_SIZE; break; } if (cdb[8] & 0x1) { /* PMI */ @@ -3369,10 +3369,10 @@ isptargstart(struct cam_periph *periph, default: flags |= CAM_DIR_NONE; status = SCSI_STATUS_CHECK_COND; - atio->sense_data.error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; - atio->sense_data.add_sense_code = 0x5; - atio->sense_data.add_sense_code_qual = 0x20; - atio->sense_len = sizeof (atio->sense_data); + SDFIXED(atio->sense_data)->error_code = SSD_ERRCODE_VALID|SSD_CURRENT_ERROR|SSD_KEY_UNIT_ATTENTION; + SDFIXED(atio->sense_data)->add_sense_code = 0x5; + SDFIXED(atio->sense_data)->add_sense_code_qual = 0x20; + atio->sense_len = SSD_MIN_SIZE; break; } Modified: head/sys/dev/isp/isp_freebsd.h ============================================================================== --- head/sys/dev/isp/isp_freebsd.h Tue Dec 27 13:01:10 2011 (r228913) +++ head/sys/dev/isp/isp_freebsd.h Tue Dec 27 14:59:24 2011 (r228914) @@ -76,6 +76,13 @@ #define ISP_IFLAGS INTR_TYPE_CAM | INTR_ENTROPY | INTR_MPSAFE #ifdef ISP_TARGET_MODE +/* Not quite right, but there was no bump for this change */ +#if __FreeBSD_version < 225469 +#define SDFIXED(x) (&x) +#else +#define SDFIXED(x) ((struct scsi_sense_data_fixed *)(&x)) +#endif + #define ISP_TARGET_FUNCTIONS 1 #define ATPDPSIZE 4096 From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 15:59:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B49E1065677; Tue, 27 Dec 2011 15:59:52 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0E98FC16; Tue, 27 Dec 2011 15:59:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRFxpjp059344; Tue, 27 Dec 2011 15:59:51 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRFxp6u059342; Tue, 27 Dec 2011 15:59:51 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201112271559.pBRFxp6u059342@svn.freebsd.org> From: Sergey Kandaurov Date: Tue, 27 Dec 2011 15:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228916 - head/sys/boot/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 15:59:52 -0000 Author: pluknet Date: Tue Dec 27 15:59:51 2011 New Revision: 228916 URL: http://svn.freebsd.org/changeset/base/228916 Log: Clean up from the 4.x era. In an example of boot command: - rename wd(4) IDE disk drives name to ad(4) for the time being. - update the used kernel path "/kernel" to the current default. [It still worked occasionally by looking into the /boot/kernel directory, so the resulting path was "/boot//kernel/kernel", with two slashes.] Bump .Dd for this and previous changes. MFC after: 1 week Modified: head/sys/boot/common/loader.8 Modified: head/sys/boot/common/loader.8 ============================================================================== --- head/sys/boot/common/loader.8 Tue Dec 27 15:05:55 2011 (r228915) +++ head/sys/boot/common/loader.8 Tue Dec 27 15:59:51 2011 (r228916) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2009 +.Dd December 27, 2011 .Dt LOADER 8 .Os .Sh NAME @@ -926,10 +926,10 @@ autoboot 5 .Pp Set the disk unit of the root device to 2, and then boot. This would be needed in a system with two IDE disks, -with the second IDE disk hardwired to wd2 instead of wd1. +with the second IDE disk hardwired to ad2 instead of ad1. .Bd -literal -offset indent set root_disk_unit=2 -boot /kernel +boot /boot/kernel/kernel .Ed .Pp See also: From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 16:28:00 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16543106566B; Tue, 27 Dec 2011 16:28:00 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 8500F8FC17; Tue, 27 Dec 2011 16:27:59 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pBRGRvHF073003; Tue, 27 Dec 2011 17:27:57 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pBRGRvDk073002; Tue, 27 Dec 2011 17:27:57 +0100 (CET) (envelope-from marius) Date: Tue, 27 Dec 2011 17:27:57 +0100 From: Marius Strobl To: Doug Barton Message-ID: <20111227162757.GW90831@alchemy.franken.de> References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF8DC5B.9070404@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 16:28:00 -0000 On Mon, Dec 26, 2011 at 12:43:07PM -0800, Doug Barton wrote: > On 12/26/2011 02:28, Marius Strobl wrote: > > On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: > >> On 12/24/2011 04:16, Marius Strobl wrote: > >>> On FreeBSD just use the MD5 implementation of libmd rather than that of > >>> libcrypto so we don't need to relinquish csup when world is built without > >>> OpenSSL. > >> > >> Did you benchmark this at all? I agree that keeping csup available > >> absent openssl is a good goal, but csup is a prototypical "tool that > >> does the same thing many thousands of times" so even tiny regressions > >> could add up to a large cost in wall clock time. > > > > Well, in a real world test updating the same base on an amd64 machine > > connected to the Internet > > Adding a network connection to the test is almost certainly going to > obscure the results beyond utility. The appropriate way to test this > would be to create a binary out of the md5 routine in csup, and link it > alternately with libcrypto and libmd. Then for each version run it > against the src tree (or ports, either way) 10 times. Discard the first > and last, and then plot the results with ministat. marius@flak:/home/marius > ministat -w 76 libmd libcrypto x libmd + libcrypto +----------------------------------------------------------------------------+ | + | | + | |x x + | |xxx ++ | |xxx ++ +| ||A| |A_| | +----------------------------------------------------------------------------+ N Min Max Median Avg Stddev x 8 244.08 246.16 245.18 245.01375 0.78758106 + 8 302.36 307.12 302.92 303.26875 1.5784028 Difference at 95.0% confidence 58.255 +/- 1.33776 23.7762% +/- 0.545992% (Student's t, pooled s = 1.24732) Looks like the MD5 implementation of libcrypto is the counterpart of SCHED_ULE and only pays out on real big stuff. At least this result is consistent with the real world test of csup. Marius From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 19:41:31 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id B20291065672; Tue, 27 Dec 2011 19:41:31 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5EAAF14DDA1; Tue, 27 Dec 2011 19:41:31 +0000 (UTC) Message-ID: <4EFA1F6B.6050101@FreeBSD.org> Date: Tue, 27 Dec 2011 11:41:31 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Marius Strobl References: <201112241216.pBOCGd1H012696@svn.freebsd.org> <4EF645D2.8080407@FreeBSD.org> <20111226102820.GT90831@alchemy.franken.de> <4EF8DC5B.9070404@FreeBSD.org> <20111227162757.GW90831@alchemy.franken.de> In-Reply-To: <20111227162757.GW90831@alchemy.franken.de> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228857 - in head/usr.bin: . csup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 19:41:31 -0000 On 12/27/2011 08:27, Marius Strobl wrote: > On Mon, Dec 26, 2011 at 12:43:07PM -0800, Doug Barton wrote: >> On 12/26/2011 02:28, Marius Strobl wrote: >>> On Sat, Dec 24, 2011 at 01:36:18PM -0800, Doug Barton wrote: >>>> On 12/24/2011 04:16, Marius Strobl wrote: >>>>> On FreeBSD just use the MD5 implementation of libmd rather than that of >>>>> libcrypto so we don't need to relinquish csup when world is built without >>>>> OpenSSL. >>>> >>>> Did you benchmark this at all? I agree that keeping csup available >>>> absent openssl is a good goal, but csup is a prototypical "tool that >>>> does the same thing many thousands of times" so even tiny regressions >>>> could add up to a large cost in wall clock time. >>> >>> Well, in a real world test updating the same base on an amd64 machine >>> connected to the Internet >> >> Adding a network connection to the test is almost certainly going to >> obscure the results beyond utility. The appropriate way to test this >> would be to create a binary out of the md5 routine in csup, and link it >> alternately with libcrypto and libmd. Then for each version run it >> against the src tree (or ports, either way) 10 times. Discard the first >> and last, and then plot the results with ministat. > > marius@flak:/home/marius > ministat -w 76 libmd libcrypto > x libmd > + libcrypto > +----------------------------------------------------------------------------+ > | + | > | + | > |x x + | > |xxx ++ | > |xxx ++ +| > ||A| |A_| | > +----------------------------------------------------------------------------+ > N Min Max Median Avg Stddev > x 8 244.08 246.16 245.18 245.01375 0.78758106 > + 8 302.36 307.12 302.92 303.26875 1.5784028 > Difference at 95.0% confidence > 58.255 +/- 1.33776 > 23.7762% +/- 0.545992% > (Student's t, pooled s = 1.24732) > > Looks like the MD5 implementation of libcrypto is the counterpart of > SCHED_ULE and only pays out on real big stuff. At least this result > is consistent with the real world test of csup. That's awesome news! Thanks for doing this additional work, and I'm glad to see that the result is a win-win. :) Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 20:03:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EE171065673; Tue, 27 Dec 2011 20:03:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6379E8FC0A; Tue, 27 Dec 2011 20:03:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRK3wv9066983; Tue, 27 Dec 2011 20:03:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRK3wqS066981; Tue, 27 Dec 2011 20:03:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112272003.pBRK3wqS066981@svn.freebsd.org> From: Xin LI Date: Tue, 27 Dec 2011 20:03:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228917 - head/usr.sbin/rtprio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 20:03:58 -0000 Author: delphij Date: Tue Dec 27 20:03:57 2011 New Revision: 228917 URL: http://svn.freebsd.org/changeset/base/228917 Log: - Fail when the utility is not invoked as rtprio nor idprio. - use warnx() to tell the user whether a process is running in normal, idle or realtime priority. with the old code it would have been possible for another process to send data to stdout between printf("%s: ", p); and printf("* priority\n"); and thus break the formatting. - 'rtprio 10 -0' triggeres non-intuitive behavior. It would first set the priority of itself to 10 *and* would then try to execute '-0'. Of course, setting the priority of [id|rt]prio itself doesn't make a lot of sense, but it is intuitive compared to the previous behavior. - 'rtprio -t --1' will actually pass over the '-1' to rtprio(). Now invoking rtprio like this will catch the wrong usage before passing over the invalid argument to rtprio(). - Garrett Cooper suggested to add further diagnostics where the failure occures, if execvp fails. PR: bin/154042 Submitted by: arundel MFC after: 1 month Modified: head/usr.sbin/rtprio/rtprio.c Modified: head/usr.sbin/rtprio/rtprio.c ============================================================================== --- head/usr.sbin/rtprio/rtprio.c Tue Dec 27 15:59:51 2011 (r228916) +++ head/usr.sbin/rtprio/rtprio.c Tue Dec 27 20:03:57 2011 (r228917) @@ -53,20 +53,17 @@ int main(int argc, char *argv[]) { struct rtprio rtp; - char *p; - pid_t proc; + const char *progname; + pid_t proc = 0; - /* find basename */ - if ((p = rindex(argv[0], '/')) == NULL) - p = argv[0]; - else - ++p; - proc = 0; + progname = getprogname(); - if (!strcmp(p, "rtprio")) + if (strcmp(progname, "rtprio") == 0) rtp.type = RTP_PRIO_REALTIME; - else if (!strcmp(p, "idprio")) + else if (strcmp(progname, "idprio") == 0) rtp.type = RTP_PRIO_IDLE; + else + errx(1, "invalid progname"); switch (argc) { case 2: @@ -76,20 +73,19 @@ main(int argc, char *argv[]) case 1: if (rtprio(RTP_LOOKUP, proc, &rtp) != 0) err(1, "RTP_LOOKUP"); - printf("%s: ", p); switch (rtp.type) { case RTP_PRIO_REALTIME: case RTP_PRIO_FIFO: - printf("realtime priority %d\n", rtp.prio); + warnx("realtime priority %d", rtp.prio); break; case RTP_PRIO_NORMAL: - printf("normal priority\n"); + warnx("normal priority"); break; case RTP_PRIO_IDLE: - printf("idle priority %d\n", rtp.prio); + warnx("idle priority %d", rtp.prio); break; default: - printf("invalid priority type %d\n", rtp.type); + errx(1, "invalid priority type %d", rtp.type); break; } exit(0); @@ -110,18 +106,18 @@ main(int argc, char *argv[]) break; } - if (argv[2][0] == '-') - proc = parseint(argv[2] + 1, "pid"); - if (rtprio(RTP_SET, proc, &rtp) != 0) - err(1, "RTP_SET"); - - if (proc == 0) { + if (argv[2][0] == '-') { + proc = parseint(argv[2], "pid"); + proc = abs(proc); + if (rtprio(RTP_SET, proc, &rtp) != 0) + err(1, "RTP_SET"); + } else { execvp(argv[2], &argv[2]); - err(1, "%s", argv[2]); + err(1, "execvp: %s", argv[2]); } exit(0); } - exit(1); + /* NOTREACHED */ } static int From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 21:36:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42E5B106566B; Tue, 27 Dec 2011 21:36:32 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2D65C8FC0C; Tue, 27 Dec 2011 21:36:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRLaWHv069840; Tue, 27 Dec 2011 21:36:32 GMT (envelope-from theraven@svn.freebsd.org) Received: (from theraven@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRLaVZs069838; Tue, 27 Dec 2011 21:36:31 GMT (envelope-from theraven@svn.freebsd.org) Message-Id: <201112272136.pBRLaVZs069838@svn.freebsd.org> From: David Chisnall Date: Tue, 27 Dec 2011 21:36:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228918 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 21:36:32 -0000 Author: theraven Date: Tue Dec 27 21:36:31 2011 New Revision: 228918 URL: http://svn.freebsd.org/changeset/base/228918 Log: Define NULL to nullptr in C++11 mode (not strictly required, but it makes migrating code to C++11 easier). Approved by: dim (mentor) Modified: head/sys/sys/_null.h Modified: head/sys/sys/_null.h ============================================================================== --- head/sys/sys/_null.h Tue Dec 27 20:03:57 2011 (r228917) +++ head/sys/sys/_null.h Tue Dec 27 21:36:31 2011 (r228918) @@ -31,7 +31,9 @@ #if !defined(__cplusplus) #define NULL ((void *)0) #else -#if defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 +#if __cplusplus >= 201103L +#define NULL nullptr +#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 #define NULL __null #else #if defined(__LP64__) From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 22:13:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0649F106564A; Tue, 27 Dec 2011 22:13:52 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E401B8FC15; Tue, 27 Dec 2011 22:13:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRMDpI8071036; Tue, 27 Dec 2011 22:13:51 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRMDpVY071018; Tue, 27 Dec 2011 22:13:51 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112272213.pBRMDpVY071018@svn.freebsd.org> From: Ed Schouten Date: Tue, 27 Dec 2011 22:13:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228919 - head/lib/libcompiler_rt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 22:13:52 -0000 Author: ed Date: Tue Dec 27 22:13:51 2011 New Revision: 228919 URL: http://svn.freebsd.org/changeset/base/228919 Log: Add locally implemented atomic intrinsics to libcompiler_rt. The built-in atomic operations are not implemented in our version of GCC 4.2 for the ARM and MIPS architectures. Instead of emitting locked instructions, they generate calls to functions that can be implemented in the C runtime. Only implement the atomic operations that are used by for datatype sizes that are supported by atomic(9). This means that on these architectures, we can only use atomic operations on 32-bits and 64-bits variables, which is typically sufficient. This makes work on all architectures except MIPS, since MIPS and SPARC64 still use libgcc. Converting these architectures to libcompiler_rt is on my todo list. Added: head/lib/libcompiler_rt/__sync_fetch_and_add_4.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_add_8.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_and_4.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_and_8.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_op_n.h (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_or_4.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_or_8.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_sub_4.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_sub_8.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_xor_4.c (contents, props changed) head/lib/libcompiler_rt/__sync_fetch_and_xor_8.c (contents, props changed) head/lib/libcompiler_rt/__sync_lock_test_and_set_4.c (contents, props changed) head/lib/libcompiler_rt/__sync_lock_test_and_set_8.c (contents, props changed) head/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c (contents, props changed) head/lib/libcompiler_rt/__sync_val_compare_and_swap_8.c (contents, props changed) head/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h (contents, props changed) Modified: head/lib/libcompiler_rt/Makefile Modified: head/lib/libcompiler_rt/Makefile ============================================================================== --- head/lib/libcompiler_rt/Makefile Tue Dec 27 21:36:31 2011 (r228918) +++ head/lib/libcompiler_rt/Makefile Tue Dec 27 22:13:51 2011 (r228919) @@ -144,6 +144,26 @@ SRCF+= adddf3 \ umodsi3 .endif +# FreeBSD-specific atomic intrinsics. +.if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" +SRCF+= __sync_fetch_and_add_4 \ + __sync_fetch_and_and_4 \ + __sync_fetch_and_or_4 \ + __sync_fetch_and_sub_4 \ + __sync_fetch_and_xor_4 \ + __sync_lock_test_and_set_4 \ + __sync_val_compare_and_swap_4 +.endif +.if ${MACHINE_ARCH:Mmips64*} != "" +SRCF+= __sync_fetch_and_add_8 \ + __sync_fetch_and_and_8 \ + __sync_fetch_and_or_8 \ + __sync_fetch_and_sub_8 \ + __sync_fetch_and_xor_8 \ + __sync_lock_test_and_set_8 \ + __sync_val_compare_and_swap_8 +.endif + .for file in ${SRCF} . if ${MACHINE_CPUARCH} != "arm" && exists(${CRTSRC}/${CRTARCH}/${file}.S) SRCS+= ${file}.S Added: head/lib/libcompiler_rt/__sync_fetch_and_add_4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_add_4.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_add_4 +#define TYPE uint32_t +#define FETCHADD(x, y) atomic_fetchadd_32(x, y) + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_add_8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_add_8.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_add_8 +#define TYPE uint64_t +#define FETCHADD(x, y) atomic_fetchadd_64(x, y) + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_and_4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_and_4.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_and_4 +#define TYPE uint32_t +#define CMPSET atomic_cmpset_32 +#define EXPRESSION t & value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_and_8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_and_8.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_and_8 +#define TYPE uint64_t +#define CMPSET atomic_cmpset_64 +#define EXPRESSION t & value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_op_n.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_op_n.h Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +TYPE +NAME(volatile TYPE *ptr, TYPE value) +{ + TYPE t; + +#ifdef FETCHADD + t = FETCHADD(ptr, value); +#else + do { + t = *ptr; + } while (!CMPSET(ptr, t, EXPRESSION)); +#endif + + return (t); +} Added: head/lib/libcompiler_rt/__sync_fetch_and_or_4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_or_4.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_or_4 +#define TYPE uint32_t +#define CMPSET atomic_cmpset_32 +#define EXPRESSION t | value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_or_8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_or_8.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_or_8 +#define TYPE uint64_t +#define CMPSET atomic_cmpset_64 +#define EXPRESSION t | value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_sub_4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_sub_4.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_sub_4 +#define TYPE uint32_t +#define FETCHADD(x, y) atomic_fetchadd_32(x, -(y)) + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_sub_8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_sub_8.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_sub_8 +#define TYPE uint64_t +#define FETCHADD(x, y) atomic_fetchadd_64(x, -(y)) + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_xor_4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_xor_4.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_xor_4 +#define TYPE uint32_t +#define CMPSET atomic_cmpset_32 +#define EXPRESSION t ^ value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_fetch_and_xor_8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_fetch_and_xor_8.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_fetch_and_xor_8 +#define TYPE uint64_t +#define CMPSET atomic_cmpset_64 +#define EXPRESSION t ^ value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_lock_test_and_set_4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_lock_test_and_set_4.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_lock_test_and_set_4 +#define TYPE uint32_t +#define CMPSET atomic_cmpset_32 +#define EXPRESSION value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_lock_test_and_set_8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_lock_test_and_set_8.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,7 @@ +/* $FreeBSD$ */ +#define NAME __sync_lock_test_and_set_8 +#define TYPE uint64_t +#define CMPSET atomic_cmpset_64 +#define EXPRESSION value + +#include "__sync_fetch_and_op_n.h" Added: head/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_val_compare_and_swap_4.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +#define NAME __sync_val_compare_and_swap_4 +#define TYPE uint32_t +#define CMPSET atomic_cmpset_32 + +#include "__sync_val_compare_and_swap_n.h" Added: head/lib/libcompiler_rt/__sync_val_compare_and_swap_8.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_val_compare_and_swap_8.c Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ +#define NAME __sync_val_compare_and_swap_8 +#define TYPE uint64_t +#define CMPSET atomic_cmpset_64 + +#include "__sync_val_compare_and_swap_n.h" Added: head/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libcompiler_rt/__sync_val_compare_and_swap_n.h Tue Dec 27 22:13:51 2011 (r228919) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2011 Ed Schouten + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +TYPE +NAME(volatile TYPE *ptr, TYPE oldval, TYPE newval) +{ + TYPE t; + + while (!CMPSET(ptr, oldval, newval)) { + t = *ptr; + if (t != oldval) + return (t); + } + + return (oldval); +} From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 22:14:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48FD61065675; Tue, 27 Dec 2011 22:14:36 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 337288FC24; Tue, 27 Dec 2011 22:14:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRMEaaB071099; Tue, 27 Dec 2011 22:14:36 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRMEZYO071097; Tue, 27 Dec 2011 22:14:35 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112272214.pBRMEZYO071097@svn.freebsd.org> From: Ed Schouten Date: Tue, 27 Dec 2011 22:14:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228920 - head/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 22:14:36 -0000 Author: ed Date: Tue Dec 27 22:14:35 2011 New Revision: 228920 URL: http://svn.freebsd.org/changeset/base/228920 Log: Document restriction on 32-bits and 64-bits datatypes. Modified: head/share/man/man3/ATOMIC_VAR_INIT.3 Modified: head/share/man/man3/ATOMIC_VAR_INIT.3 ============================================================================== --- head/share/man/man3/ATOMIC_VAR_INIT.3 Tue Dec 27 22:13:51 2011 (r228919) +++ head/share/man/man3/ATOMIC_VAR_INIT.3 Tue Dec 27 22:14:35 2011 (r228920) @@ -281,6 +281,12 @@ This behaviour cannot be emulated for ol To prevent unintended non-atomic access to these variables, this header file places the atomic variable in a structure when using an older compiler. +.Pp +When using GCC on architectures on which it lacks support for built-in +atomic intrinsics, these macros may emit function calls to fallback +routines. +These fallback routines are only implemented for 32-bits and 64-bits +datatypes, if supported by the CPU. .Sh SEE ALSO .Xr pthread 3 , .Xr atomic 9 From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 23:28:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7298C106564A; Tue, 27 Dec 2011 23:28:01 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D3158FC0A; Tue, 27 Dec 2011 23:28:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRNS1Px073346; Tue, 27 Dec 2011 23:28:01 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRNS1OQ073344; Tue, 27 Dec 2011 23:28:01 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112272328.pBRNS1OQ073344@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 27 Dec 2011 23:28:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228921 - head/lib/libc/locale X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 23:28:01 -0000 Author: jilles Date: Tue Dec 27 23:28:01 2011 New Revision: 228921 URL: http://svn.freebsd.org/changeset/base/228921 Log: libc: Eliminate some relative relocations in setlocale(). Modified: head/lib/libc/locale/setlocale.c Modified: head/lib/libc/locale/setlocale.c ============================================================================== --- head/lib/libc/locale/setlocale.c Tue Dec 27 22:14:35 2011 (r228920) +++ head/lib/libc/locale/setlocale.c Tue Dec 27 23:28:01 2011 (r228921) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); /* * Category names for getenv() */ -static char *categories[_LC_LAST] = { +static const char categories[_LC_LAST][12] = { "LC_ALL", "LC_COLLATE", "LC_CTYPE", From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 23:35:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26C471065670; Tue, 27 Dec 2011 23:35:11 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1191D8FC16; Tue, 27 Dec 2011 23:35:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRNZAOQ073602; Tue, 27 Dec 2011 23:35:10 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRNZA6Q073600; Tue, 27 Dec 2011 23:35:10 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112272335.pBRNZA6Q073600@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 27 Dec 2011 23:35:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228922 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 23:35:11 -0000 Author: jilles Date: Tue Dec 27 23:35:10 2011 New Revision: 228922 URL: http://svn.freebsd.org/changeset/base/228922 Log: libc: Eliminate some relative relocations in getusershell(). Modified: head/lib/libc/gen/getusershell.c Modified: head/lib/libc/gen/getusershell.c ============================================================================== --- head/lib/libc/gen/getusershell.c Tue Dec 27 23:28:01 2011 (r228921) +++ head/lib/libc/gen/getusershell.c Tue Dec 27 23:35:10 2011 (r228922) @@ -58,12 +58,6 @@ __FBSDID("$FreeBSD$"); #endif #include "un-namespace.h" -/* - * Local shells should NOT be added here. They should be added in - * /etc/shells. - */ - -static const char *const okshells[] = { _PATH_BSHELL, _PATH_CSHELL, NULL }; static const char *const *curshell; static StringList *sl; @@ -261,8 +255,13 @@ initshells() != NS_SUCCESS) { if (sl) sl_free(sl, 1); - sl = NULL; - return (okshells); + sl = sl_init(); + /* + * Local shells should NOT be added here. They should be + * added in /etc/shells. + */ + sl_add(sl, strdup(_PATH_BSHELL)); + sl_add(sl, strdup(_PATH_CSHELL)); } sl_add(sl, NULL); From owner-svn-src-all@FreeBSD.ORG Tue Dec 27 23:53:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97E54106564A; Tue, 27 Dec 2011 23:53:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8115E8FC12; Tue, 27 Dec 2011 23:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBRNr0Lf074140; Tue, 27 Dec 2011 23:53:00 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBRNr0ti074137; Tue, 27 Dec 2011 23:53:00 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112272353.pBRNr0ti074137@svn.freebsd.org> From: Alan Cox Date: Tue, 27 Dec 2011 23:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228923 - in head/sys/i386: i386 xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 27 Dec 2011 23:53:00 -0000 Author: alc Date: Tue Dec 27 23:53:00 2011 New Revision: 228923 URL: http://svn.freebsd.org/changeset/base/228923 Log: Eliminate many of the unnecessary differences between the native and paravirtualized pmap implementations for i386. This includes some style fixes to the native pmap and several bug fixes that were not previously applied to the paravirtualized pmap. Tested by: sbruno MFC after: 3 weeks Modified: head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Tue Dec 27 23:35:10 2011 (r228922) +++ head/sys/i386/i386/pmap.c Tue Dec 27 23:53:00 2011 (r228923) @@ -330,7 +330,7 @@ static void pmap_update_pde_invalidate(v static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); -static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags); +static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags); static int _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free); static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static void pmap_pte_release(pt_entry_t *pte); @@ -340,6 +340,8 @@ static void *pmap_pdpt_allocf(uma_zone_t #endif static void pmap_set_pg(void); +static __inline void pagezero(void *page); + CTASSERT(1 << PDESHIFT == sizeof(pd_entry_t)); CTASSERT(1 << PTESHIFT == sizeof(pt_entry_t)); @@ -1216,7 +1218,7 @@ pmap_is_current(pmap_t pmap) { return (pmap == kernel_pmap || - (pmap == vmspace_pmap(curthread->td_proc->p_vmspace) && + (pmap == vmspace_pmap(curthread->td_proc->p_vmspace) && (pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & PG_FRAME))); } @@ -1759,7 +1761,6 @@ pmap_pinit(pmap_t pmap) if (pmap->pm_pdir == NULL) { pmap->pm_pdir = (pd_entry_t *)kmem_alloc_nofault(kernel_map, NBPTD); - if (pmap->pm_pdir == NULL) { PMAP_LOCK_DESTROY(pmap); return (0); @@ -1792,10 +1793,9 @@ pmap_pinit(pmap_t pmap) pmap_qenter((vm_offset_t)pmap->pm_pdir, ptdpg, NPGPTD); - for (i = 0; i < NPGPTD; i++) { + for (i = 0; i < NPGPTD; i++) if ((ptdpg[i]->flags & PG_ZERO) == 0) - bzero(pmap->pm_pdir + (i * NPDEPG), PAGE_SIZE); - } + pagezero(pmap->pm_pdir + (i * NPDEPG)); mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); @@ -1824,7 +1824,7 @@ pmap_pinit(pmap_t pmap) * mapped correctly. */ static vm_page_t -_pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags) +_pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags) { vm_paddr_t ptepa; vm_page_t m; @@ -1872,7 +1872,7 @@ _pmap_allocpte(pmap_t pmap, unsigned pte static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags) { - unsigned ptepindex; + u_int ptepindex; pd_entry_t ptepa; vm_page_t m; @@ -2020,7 +2020,7 @@ pmap_lazyfix(pmap_t pmap) cr3 = vtophys(pmap->pm_pdir); if (cr3 == rcr3()) { load_cr3(PCPU_GET(curpcb)->pcb_cr3); - CPU_CLR(PCPU_GET(cpuid), &pmap->pm_active); + CPU_CLR(PCPU_GET(cpuid), &pmap->pm_active); } } #endif /* SMP */ @@ -2849,7 +2849,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva } for (; sva < eva; sva = pdnxt) { - unsigned pdirindex; + u_int pdirindex; /* * Calculate index for next page table. @@ -3070,7 +3070,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv PMAP_LOCK(pmap); for (; sva < eva; sva = pdnxt) { pt_entry_t obits, pbits; - unsigned pdirindex; + u_int pdirindex; pdnxt = (sva + NBPDR) & ~PDRMASK; if (pdnxt < sva) @@ -3596,7 +3596,7 @@ pmap_enter_object(pmap_t pmap, vm_offset m = TAILQ_NEXT(m, listq); } vm_page_unlock_queues(); - PMAP_UNLOCK(pmap); + PMAP_UNLOCK(pmap); } /* @@ -3638,7 +3638,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ * resident, we are creating it here. */ if (va < VM_MAXUSER_ADDRESS) { - unsigned ptepindex; + u_int ptepindex; pd_entry_t ptepa; /* @@ -3904,7 +3904,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm pt_entry_t *src_pte, *dst_pte; vm_page_t dstmpte, srcmpte; pd_entry_t srcptepaddr; - unsigned ptepindex; + u_int ptepindex; KASSERT(addr < UPT_MIN_ADDRESS, ("pmap_copy: invalid to pmap_copy page tables")); @@ -5244,7 +5244,7 @@ pmap_pid_dump(int pid) #if defined(DEBUG) static void pads(pmap_t pm); -void pmap_pvdump(vm_offset_t pa); +void pmap_pvdump(vm_paddr_t pa); /* print address space of pmap*/ static void Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Tue Dec 27 23:35:10 2011 (r228922) +++ head/sys/i386/xen/pmap.c Tue Dec 27 23:53:00 2011 (r228923) @@ -125,6 +125,8 @@ __FBSDID("$FreeBSD$"); #include #ifdef SMP #include +#else +#include #endif #include @@ -221,6 +223,8 @@ extern u_int32_t KERNend; pt_entry_t pg_nx; #endif +static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); + static int pat_works; /* Is page attribute table sane? */ /* @@ -273,19 +277,6 @@ SYSCTL_INT(_debug, OID_AUTO, PMAP1unchan "Number of times pmap_pte_quick didn't change PMAP1"); static struct mtx PMAP2mutex; -static SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); - -SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0, - "Max number of PV entries"); -SYSCTL_INT(_vm_pmap, OID_AUTO, shpgperproc, CTLFLAG_RD, &shpgperproc, 0, - "Page share factor per proc"); -static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0, - "2/4MB page mapping counters"); - -static u_long pmap_pde_mappings; -SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, mappings, CTLFLAG_RD, - &pmap_pde_mappings, 0, "2/4MB page mappings"); - static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t locked_pmap, int try); static void pmap_pvh_free(struct md_page *pvh, pmap_t pmap, vm_offset_t va); @@ -294,6 +285,8 @@ static pv_entry_t pmap_pvh_remove(struct static vm_page_t pmap_enter_quick_locked(multicall_entry_t **mcl, int *count, pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); +static void pmap_flush_page(vm_page_t m); +static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static int pmap_remove_pte(pmap_t pmap, pt_entry_t *ptq, vm_offset_t sva, vm_page_t *free); static void pmap_remove_page(struct pmap *pmap, vm_offset_t va, @@ -305,14 +298,12 @@ static boolean_t pmap_try_insert_pv_entr static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags); -static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags); +static vm_page_t _pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags); static int _pmap_unwire_pte_hold(pmap_t pmap, vm_page_t m, vm_page_t *free); static pt_entry_t *pmap_pte_quick(pmap_t pmap, vm_offset_t va); static void pmap_pte_release(pt_entry_t *pte); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t *); -static vm_offset_t pmap_kmem_choose(vm_offset_t addr); static boolean_t pmap_is_prefaultable_locked(pmap_t pmap, vm_offset_t addr); -static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static __inline void pagezero(void *page); @@ -326,8 +317,6 @@ CTASSERT(1 << PTESHIFT == sizeof(pt_entr */ CTASSERT(KERNBASE % (1 << 24) == 0); - - void pd_set(struct pmap *pmap, int ptepindex, vm_paddr_t val, int type) { @@ -359,24 +348,6 @@ pd_set(struct pmap *pmap, int ptepindex, } /* - * Move the kernel virtual free pointer to the next - * 4MB. This is used to help improve performance - * by using a large (4MB) page for much of the kernel - * (.text, .data, .bss) - */ -static vm_offset_t -pmap_kmem_choose(vm_offset_t addr) -{ - vm_offset_t newaddr = addr; - -#ifndef DISABLE_PSE - if (cpu_feature & CPUID_PSE) - newaddr = (addr + PDRMASK) & ~PDRMASK; -#endif - return newaddr; -} - -/* * Bootstrap the system enough to run with virtual memory. * * On the i386 this is called after mapping has already been enabled @@ -395,15 +366,13 @@ pmap_bootstrap(vm_paddr_t firstaddr) int i; /* - * XXX The calculation of virtual_avail is wrong. It's NKPT*PAGE_SIZE too - * large. It should instead be correctly calculated in locore.s and - * not based on 'first' (which is a physical address, not a virtual - * address, for the start of unused physical memory). The kernel - * page tables are NOT double mapped and thus should not be included - * in this calculation. + * Initialize the first available kernel virtual address. However, + * using "firstaddr" may waste a few pages of the kernel virtual + * address space, because locore may not have mapped every physical + * page that it allocated. Preferably, locore would provide a first + * unused virtual address in addition to "firstaddr". */ virtual_avail = (vm_offset_t) KERNBASE + firstaddr; - virtual_avail = pmap_kmem_choose(virtual_avail); virtual_end = VM_MAX_KERNEL_ADDRESS; @@ -468,8 +437,8 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* * ptemap is used for pmap_pte_quick */ - SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1); - SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1); + SYSMAP(pt_entry_t *, PMAP1, PADDR1, 1) + SYSMAP(pt_entry_t *, PMAP2, PADDR2, 1) mtx_init(&PMAP2mutex, "PMAP2", NULL, MTX_DEF); @@ -650,6 +619,18 @@ pmap_init(void) } +SYSCTL_INT(_vm_pmap, OID_AUTO, pv_entry_max, CTLFLAG_RD, &pv_entry_max, 0, + "Max number of PV entries"); +SYSCTL_INT(_vm_pmap, OID_AUTO, shpgperproc, CTLFLAG_RD, &shpgperproc, 0, + "Page share factor per proc"); + +static SYSCTL_NODE(_vm_pmap, OID_AUTO, pde, CTLFLAG_RD, 0, + "2/4MB page mapping counters"); + +static u_long pmap_pde_mappings; +SYSCTL_ULONG(_vm_pmap_pde, OID_AUTO, mappings, CTLFLAG_RD, + &pmap_pde_mappings, 0, "2/4MB page mappings"); + /*************************************************** * Low level helper routines..... ***************************************************/ @@ -896,6 +877,8 @@ pmap_invalidate_cache(void) } #endif /* !SMP */ +#define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) + void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) { @@ -907,7 +890,8 @@ pmap_invalidate_cache_range(vm_offset_t if (cpu_feature & CPUID_SS) ; /* If "Self Snoop" is supported, do nothing. */ - else if (cpu_feature & CPUID_CLFSH) { + else if ((cpu_feature & CPUID_CLFSH) != 0 && + eva - sva < PMAP_CLFLUSH_THRESHOLD) { /* * Otherwise, do per-cache line flush. Use the mfence @@ -924,12 +908,27 @@ pmap_invalidate_cache_range(vm_offset_t /* * No targeted cache flush methods are supported by CPU, - * globally invalidate cache as a last resort. + * or the supplied range is bigger than 2MB. + * Globally invalidate cache. */ pmap_invalidate_cache(); } } +void +pmap_invalidate_cache_pages(vm_page_t *pages, int count) +{ + int i; + + if (count >= PMAP_CLFLUSH_THRESHOLD / PAGE_SIZE || + (cpu_feature & CPUID_CLFSH) == 0) { + pmap_invalidate_cache(); + } else { + for (i = 0; i < count; i++) + pmap_flush_page(pages[i]); + } +} + /* * Are we current address space or kernel? N.B. We return FALSE when * a pmap's page table is in use because a kernel thread is borrowing @@ -942,7 +941,7 @@ pmap_is_current(pmap_t pmap) return (pmap == kernel_pmap || (pmap == vmspace_pmap(curthread->td_proc->p_vmspace) && - (pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & PG_FRAME))); + (pmap->pm_pdir[PTDPTDI] & PG_FRAME) == (PTDpde[0] & PG_FRAME))); } /* @@ -971,10 +970,9 @@ pmap_pte(pmap_t pmap, vm_offset_t va) CTR3(KTR_PMAP, "pmap_pte: pmap=%p va=0x%x newpte=0x%08x", pmap, va, (*PMAP2 & 0xffffffff)); } - return (PADDR2 + (i386_btop(va) & (NPTEPG - 1))); } - return (0); + return (NULL); } /* @@ -1065,7 +1063,7 @@ pmap_extract(pmap_t pmap, vm_offset_t va pt_entry_t *pte; pd_entry_t pde; pt_entry_t pteval; - + rtval = 0; PMAP_LOCK(pmap); pde = pmap->pm_pdir[va >> PDRSHIFT]; @@ -1170,10 +1168,13 @@ retry: /* * Add a wired page to the kva. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ void pmap_kenter(vm_offset_t va, vm_paddr_t pa) { + PT_SET_MA(va, xpmap_ptom(pa)| PG_RW | PG_V | pgeflag); } @@ -1186,16 +1187,18 @@ pmap_kenter_ma(vm_offset_t va, vm_paddr_ pte_store_ma(pte, ma | PG_RW | PG_V | pgeflag); } - -static __inline void +static __inline void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode) { + PT_SET_MA(va, pa | PG_RW | PG_V | pgeflag | pmap_cache_bits(mode, 0)); } /* * Remove a page from the kernel pagetables. * Note: not SMP coherent. + * + * This function may be used before pmap_bootstrap() is called. */ PMAP_INLINE void pmap_kremove(vm_offset_t va) @@ -1292,7 +1295,6 @@ pmap_qenter(vm_offset_t sva, vm_page_t * #endif } - /* * This routine tears out page mappings from the * kernel -- it is meant only for temporary mappings. @@ -1342,9 +1344,9 @@ pmap_unwire_pte_hold(pmap_t pmap, vm_pag --m->wire_count; if (m->wire_count == 0) - return _pmap_unwire_pte_hold(pmap, m, free); + return (_pmap_unwire_pte_hold(pmap, m, free)); else - return 0; + return (0); } static int @@ -1385,7 +1387,7 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa m->right = *free; *free = m; - return 1; + return (1); } /* @@ -1399,17 +1401,25 @@ pmap_unuse_pt(pmap_t pmap, vm_offset_t v vm_page_t mpte; if (va >= VM_MAXUSER_ADDRESS) - return 0; + return (0); ptepde = PT_GET(pmap_pde(pmap, va)); mpte = PHYS_TO_VM_PAGE(ptepde & PG_FRAME); - return pmap_unwire_pte_hold(pmap, mpte, free); + return (pmap_unwire_pte_hold(pmap, mpte, free)); } +/* + * Initialize the pmap for the swapper process. + */ void pmap_pinit0(pmap_t pmap) { PMAP_LOCK_INIT(pmap); + /* + * Since the page table directory is shared with the kernel pmap, + * which is already included in the list "allpmaps", this pmap does + * not need to be inserted into that list. + */ pmap->pm_pdir = (pd_entry_t *)(KERNBASE + (vm_offset_t)IdlePTD); #ifdef PAE pmap->pm_pdpt = (pdpt_entry_t *)(KERNBASE + (vm_offset_t)IdlePDPT); @@ -1418,9 +1428,6 @@ pmap_pinit0(pmap_t pmap) PCPU_SET(curpmap, pmap); TAILQ_INIT(&pmap->pm_pvchunk); bzero(&pmap->pm_stats, sizeof pmap->pm_stats); - mtx_lock_spin(&allpmaps_lock); - LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); - mtx_unlock_spin(&allpmaps_lock); } /* @@ -1471,18 +1478,19 @@ pmap_pinit(pmap_t pmap) ptdpg[i++] = m; } } + pmap_qenter((vm_offset_t)pmap->pm_pdir, ptdpg, NPGPTD); - for (i = 0; i < NPGPTD; i++) { + + for (i = 0; i < NPGPTD; i++) if ((ptdpg[i]->flags & PG_ZERO) == 0) - pagezero(&pmap->pm_pdir[i*NPTEPG]); - } + pagezero(pmap->pm_pdir + (i * NPDEPG)); mtx_lock_spin(&allpmaps_lock); LIST_INSERT_HEAD(&allpmaps, pmap, pm_list); + /* Copy the kernel page table directory entries. */ + bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); mtx_unlock_spin(&allpmaps_lock); - /* Wire in kernel global address entries. */ - bcopy(PTD + KPTDI, pmap->pm_pdir + KPTDI, nkpt * sizeof(pd_entry_t)); #ifdef PAE pmap_qenter((vm_offset_t)pmap->pm_pdpt, &ptdpg[NPGPTD], 1); if ((ptdpg[NPGPTD]->flags & PG_ZERO) == 0) @@ -1534,7 +1542,7 @@ pmap_pinit(pmap_t pmap) * mapped correctly. */ static vm_page_t -_pmap_allocpte(pmap_t pmap, unsigned int ptepindex, int flags) +_pmap_allocpte(pmap_t pmap, u_int ptepindex, int flags) { vm_paddr_t ptema; vm_page_t m; @@ -1569,6 +1577,7 @@ _pmap_allocpte(pmap_t pmap, unsigned int * Map the pagetable page into the process address space, if * it isn't already there. */ + pmap->pm_stats.resident_count++; ptema = VM_PAGE_TO_MACH(m); @@ -1584,7 +1593,7 @@ _pmap_allocpte(pmap_t pmap, unsigned int static vm_page_t pmap_allocpte(pmap_t pmap, vm_offset_t va, int flags) { - unsigned ptepindex; + u_int ptepindex; pd_entry_t ptema; vm_page_t m; @@ -1762,6 +1771,7 @@ pmap_release(pmap_t pmap) #else int npgptd = NPGPTD; #endif + KASSERT(pmap->pm_stats.resident_count == 0, ("pmap_release: pmap resident count %ld != 0", pmap->pm_stats.resident_count)); @@ -1817,7 +1827,7 @@ kvm_size(SYSCTL_HANDLER_ARGS) { unsigned long ksize = VM_MAX_KERNEL_ADDRESS - KERNBASE; - return sysctl_handle_long(oidp, &ksize, 0, req); + return (sysctl_handle_long(oidp, &ksize, 0, req)); } SYSCTL_PROC(_vm, OID_AUTO, kvm_size, CTLTYPE_LONG|CTLFLAG_RD, 0, 0, kvm_size, "IU", "Size of KVM"); @@ -1827,7 +1837,7 @@ kvm_free(SYSCTL_HANDLER_ARGS) { unsigned long kfree = VM_MAX_KERNEL_ADDRESS - kernel_vm_end; - return sysctl_handle_long(oidp, &kfree, 0, req); + return (sysctl_handle_long(oidp, &kfree, 0, req)); } SYSCTL_PROC(_vm, OID_AUTO, kvm_free, CTLTYPE_LONG|CTLFLAG_RD, 0, 0, kvm_free, "IU", "Amount of KVM free"); @@ -1856,12 +1866,12 @@ pmap_growkernel(vm_offset_t addr) } } } - addr = roundup2(addr, PAGE_SIZE * NPTEPG); + addr = roundup2(addr, NBPDR); if (addr - 1 >= kernel_map->max_offset) addr = kernel_map->max_offset; while (kernel_vm_end < addr) { if (pdir_pde(PTD, kernel_vm_end)) { - kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); + kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; break; @@ -1869,17 +1879,16 @@ pmap_growkernel(vm_offset_t addr) continue; } - /* - * This index is bogus, but out of the way - */ - nkpg = vm_page_alloc(NULL, nkpt, - VM_ALLOC_NOOBJ | VM_ALLOC_SYSTEM | VM_ALLOC_WIRED); - if (!nkpg) + nkpg = vm_page_alloc(NULL, kernel_vm_end >> PDRSHIFT, + VM_ALLOC_INTERRUPT | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED | + VM_ALLOC_ZERO); + if (nkpg == NULL) panic("pmap_growkernel: no memory to grow kernel"); nkpt++; - pmap_zero_page(nkpg); + if ((nkpg->flags & PG_ZERO) == 0) + pmap_zero_page(nkpg); ptppaddr = VM_PAGE_TO_PHYS(nkpg); newpdir = (pd_entry_t) (ptppaddr | PG_V | PG_RW | PG_A | PG_M); vm_page_lock_queues(); @@ -1891,7 +1900,7 @@ pmap_growkernel(vm_offset_t addr) mtx_unlock_spin(&allpmaps_lock); vm_page_unlock_queues(); - kernel_vm_end = (kernel_vm_end + PAGE_SIZE * NPTEPG) & ~(PAGE_SIZE * NPTEPG - 1); + kernel_vm_end = (kernel_vm_end + NBPDR) & ~PDRMASK; if (kernel_vm_end - 1 >= kernel_map->max_offset) { kernel_vm_end = kernel_map->max_offset; break; @@ -1911,7 +1920,7 @@ static __inline struct pv_chunk * pv_to_chunk(pv_entry_t pv) { - return (struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK); + return ((struct pv_chunk *)((uintptr_t)pv & ~(uintptr_t)PAGE_MASK)); } #define PV_PMAP(pv) (pv_to_chunk(pv)->pc_pmap) @@ -2033,15 +2042,15 @@ free_pv_entry(pmap_t pmap, pv_entry_t pv pc->pc_map[field] |= 1ul << bit; /* move to head of list */ TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); - TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); for (idx = 0; idx < _NPCM; idx++) - if (pc->pc_map[idx] != pc_freemask[idx]) + if (pc->pc_map[idx] != pc_freemask[idx]) { + TAILQ_INSERT_HEAD(&pmap->pm_pvchunk, pc, pc_list); return; + } PV_STAT(pv_entry_spare -= _NPCPV); PV_STAT(pc_chunk_count--); PV_STAT(pc_chunk_frees++); /* entire chunk is free, return it */ - TAILQ_REMOVE(&pmap->pm_pvchunk, pc, pc_list); m = PHYS_TO_VM_PAGE(pmap_kextract((vm_offset_t)pc)); pmap_qremove((vm_offset_t)pc, 1); vm_page_unwire(m, 0); @@ -2270,10 +2279,10 @@ pmap_remove(pmap_t pmap, vm_offset_t sva pt_entry_t *pte; vm_page_t free = NULL; int anyvalid; - + CTR3(KTR_PMAP, "pmap_remove: pmap=%p sva=0x%x eva=0x%x", pmap, sva, eva); - + /* * Perform an unsynchronized read. This is, however, safe. */ @@ -2298,7 +2307,7 @@ pmap_remove(pmap_t pmap, vm_offset_t sva } for (; sva < eva; sva = pdnxt) { - unsigned pdirindex; + u_int pdirindex; /* * Calculate index for next page table. @@ -2393,7 +2402,6 @@ pmap_remove_all(vm_page_t m) PMAP_LOCK(pmap); pmap->pm_stats.resident_count--; pte = pmap_pte_quick(pmap, pv->pv_va); - tpte = *pte; PT_SET_VA_MA(pte, 0, TRUE); if (tpte & PG_W) @@ -2457,7 +2465,7 @@ pmap_protect(pmap_t pmap, vm_offset_t sv PMAP_LOCK(pmap); for (; sva < eva; sva = pdnxt) { pt_entry_t obits, pbits; - unsigned pdirindex; + u_int pdirindex; pdnxt = (sva + NBPDR) & ~PDRMASK; @@ -2569,7 +2577,8 @@ pmap_enter(pmap_t pmap, vm_offset_t va, KASSERT(va < UPT_MIN_ADDRESS || va >= UPT_MAX_ADDRESS, ("pmap_enter: invalid to pmap_enter page table pages (va: 0x%x)", va)); - KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0, + KASSERT((m->oflags & (VPO_UNMANAGED | VPO_BUSY)) != 0 || + VM_OBJECT_LOCKED(m->object), ("pmap_enter: page %p is not busy", m)); mpte = NULL; @@ -2772,10 +2781,9 @@ pmap_enter_object(pmap_t pmap, vm_offset multicall_entry_t mcl[16]; multicall_entry_t *mclp = mcl; int error, count = 0; - + VM_OBJECT_LOCK_ASSERT(m_start->object, MA_OWNED); psize = atop(end - start); - mpte = NULL; m = m_start; vm_page_lock_queues(); @@ -2814,7 +2822,7 @@ pmap_enter_quick(pmap_t pmap, vm_offset_ multicall_entry_t mcl, *mclp; int count = 0; mclp = &mcl; - + CTR4(KTR_PMAP, "pmap_enter_quick: pmap=%p va=0x%x m=%p prot=0x%x", pmap, va, m, prot); @@ -2865,7 +2873,7 @@ pmap_enter_quick_locked(multicall_entry_ vm_paddr_t pa; vm_page_t free; multicall_entry_t *mcl = *mclpp; - + KASSERT(va < kmi.clean_sva || va >= kmi.clean_eva || (m->oflags & VPO_UNMANAGED) != 0, ("pmap_enter_quick_locked: managed mapping within the clean submap")); @@ -2877,7 +2885,7 @@ pmap_enter_quick_locked(multicall_entry_ * resident, we are creating it here. */ if (va < VM_MAXUSER_ADDRESS) { - unsigned ptepindex; + u_int ptepindex; pd_entry_t ptema; /* @@ -2981,7 +2989,7 @@ pmap_enter_quick_locked(multicall_entry_ *mclpp = mcl + 1; *count = *count + 1; #endif - return mpte; + return (mpte); } /* @@ -3006,9 +3014,8 @@ pmap_kenter_temporary(vm_paddr_t pa, int * are taken, but the code works. */ void -pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, - vm_object_t object, vm_pindex_t pindex, - vm_size_t size) +pmap_object_init_pt(pmap_t pmap, vm_offset_t addr, vm_object_t object, + vm_pindex_t pindex, vm_size_t size) { pd_entry_t *pde; vm_paddr_t pa, ptepa; @@ -3026,6 +3033,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs KASSERT(p->valid == VM_PAGE_BITS_ALL, ("pmap_object_init_pt: invalid page %p", p)); pat_mode = p->md.pat_mode; + /* * Abort the mapping if the first page is not physically * aligned to a 2/4MB page boundary. @@ -3033,6 +3041,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs ptepa = VM_PAGE_TO_PHYS(p); if (ptepa & (NBPDR - 1)) return; + /* * Skip the first page. Abort the mapping if the rest of * the pages are not physically contiguous or have differing @@ -3048,7 +3057,12 @@ pmap_object_init_pt(pmap_t pmap, vm_offs return; p = TAILQ_NEXT(p, listq); } - /* Map using 2/4MB pages. */ + + /* + * Map using 2/4MB pages. Since "ptepa" is 2/4M aligned and + * "size" is a multiple of 2/4M, adding the PAT setting to + * "pa" will not affect the termination of this loop. + */ PMAP_LOCK(pmap); for (pa = ptepa | pmap_cache_bits(pat_mode, 1); pa < ptepa + size; pa += NBPDR) { @@ -3112,7 +3126,7 @@ pmap_change_wiring(pmap_t pmap, vm_offse void pmap_copy(pmap_t dst_pmap, pmap_t src_pmap, vm_offset_t dst_addr, vm_size_t len, - vm_offset_t src_addr) + vm_offset_t src_addr) { vm_page_t free; vm_offset_t addr; @@ -3149,7 +3163,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm pt_entry_t *src_pte, *dst_pte; vm_page_t dstmpte, srcmpte; pd_entry_t srcptepaddr; - unsigned ptepindex; + u_int ptepindex; KASSERT(addr < UPT_MIN_ADDRESS, ("pmap_copy: invalid to pmap_copy page tables")); @@ -3188,7 +3202,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm dstmpte = pmap_allocpte(dst_pmap, addr, M_NOWAIT); if (dstmpte == NULL) - break; + goto out; dst_pte = pmap_pte_quick(dst_pmap, addr); if (*dst_pte == 0 && pmap_try_insert_pv_entry(dst_pmap, addr, @@ -3212,6 +3226,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm addr); pmap_free_zero_pages(free); } + goto out; } if (dstmpte->wire_count >= srcmpte->wire_count) break; @@ -3220,6 +3235,7 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm src_pte++; } } +out: PT_UPDATES_FLUSH(); sched_unpin(); vm_page_unlock_queues(); @@ -3282,7 +3298,7 @@ pmap_zero_page_area(vm_page_t m, int off sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP2) - panic("pmap_zero_page: CMAP2 busy"); + panic("pmap_zero_page_area: CMAP2 busy"); sched_pin(); PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); @@ -3306,7 +3322,7 @@ pmap_zero_page_idle(vm_page_t m) { if (*CMAP3) - panic("pmap_zero_page: CMAP3 busy"); + panic("pmap_zero_page_idle: CMAP3 busy"); sched_pin(); PT_SET_MA(CADDR3, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M); pagezero(CADDR3); @@ -3770,7 +3786,6 @@ pmap_ts_referenced(vm_page_t m) PT_UPDATES_FLUSH(); if (*PMAP1) PT_SET_MA(PADDR1, 0); - sched_unpin(); vm_page_unlock_queues(); return (rtval); @@ -3805,7 +3820,7 @@ pmap_clear_modify(vm_page_t m) pmap = PV_PMAP(pv); PMAP_LOCK(pmap); pte = pmap_pte_quick(pmap, pv->pv_va); - if ((*pte & PG_M) != 0) { + if ((*pte & (PG_M | PG_RW)) == (PG_M | PG_RW)) { /* * Regardless of whether a pte is 32 or 64 bits * in size, PG_M is among the least significant @@ -3927,8 +3942,6 @@ pmap_unmapdev(vm_offset_t va, vm_size_t void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) { - struct sysmaps *sysmaps; - vm_offset_t sva, eva; m->md.pat_mode = ma; if ((m->flags & PG_FICTITIOUS) != 0) @@ -3951,11 +3964,21 @@ pmap_page_set_memattr(vm_page_t m, vm_me * invalidation. In the worst case, whole cache is flushed by * pmap_invalidate_cache_range(). */ - if ((cpu_feature & (CPUID_SS|CPUID_CLFSH)) == CPUID_CLFSH) { + if ((cpu_feature & CPUID_SS) == 0) + pmap_flush_page(m); +} + +static void +pmap_flush_page(vm_page_t m) +{ + struct sysmaps *sysmaps; + vm_offset_t sva, eva; + + if ((cpu_feature & CPUID_CLFSH) != 0) { sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP2) - panic("pmap_page_set_memattr: CMAP2 busy"); + panic("pmap_flush_page: CMAP2 busy"); sched_pin(); PT_SET_MA(sysmaps->CADDR2, PG_V | PG_RW | VM_PAGE_TO_MACH(m) | PG_A | PG_M | @@ -3963,21 +3986,35 @@ pmap_page_set_memattr(vm_page_t m, vm_me invlcaddr(sysmaps->CADDR2); sva = (vm_offset_t)sysmaps->CADDR2; eva = sva + PAGE_SIZE; - } else - sva = eva = 0; /* gcc */ - pmap_invalidate_cache_range(sva, eva); - if (sva != 0) { + + /* + * Use mfence despite the ordering implied by + * mtx_{un,}lock() because clflush is not guaranteed + * to be ordered by any other instruction. + */ + mfence(); + for (; sva < eva; sva += cpu_clflush_line_size) + clflush(sva); + mfence(); PT_SET_MA(sysmaps->CADDR2, 0); sched_unpin(); mtx_unlock(&sysmaps->lock); - } + } else + pmap_invalidate_cache(); } +/* + * Changes the specified virtual address range's memory type to that given by + * the parameter "mode". The specified virtual address range must be + * completely contained within either the kernel map. + * + * Returns zero if the change completed successfully, and either EINVAL or + * ENOMEM if the change failed. Specifically, EINVAL is returned if some part + * of the virtual address range was not mapped, and ENOMEM is returned if + * there was insufficient memory available to complete the change. + */ int -pmap_change_attr(va, size, mode) - vm_offset_t va; - vm_size_t size; - int mode; +pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { vm_offset_t base, offset, tmpva; pt_entry_t *pte; @@ -4031,8 +4068,8 @@ pmap_change_attr(va, size, mode) } /* - * Flush CPU caches to make sure any data isn't cached that shouldn't - * be, etc. + * Flush CPU caches to make sure any data isn't cached that + * shouldn't be, etc. */ if (changed) { pmap_invalidate_range(kernel_pmap, base, tmpva); @@ -4050,7 +4087,7 @@ pmap_mincore(pmap_t pmap, vm_offset_t ad pt_entry_t *ptep, pte; vm_paddr_t pa; int val; - + PMAP_LOCK(pmap); retry: ptep = pmap_pte(pmap, addr); @@ -4233,7 +4270,7 @@ pmap_pid_dump(int pid) printf("\n"); } sx_sunlock(&allproc_lock); - return npte; + return (npte); } pte = pmap_pte(pmap, va); if (pte && pmap_pte_v(pte)) { @@ -4258,7 +4295,7 @@ pmap_pid_dump(int pid) } } sx_sunlock(&allproc_lock); - return npte; + return (npte); } #endif From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 05:35:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 67E9B1065670; Wed, 28 Dec 2011 05:35:34 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 524E68FC18; Wed, 28 Dec 2011 05:35:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBS5ZYEZ084885; Wed, 28 Dec 2011 05:35:34 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBS5ZYc5084883; Wed, 28 Dec 2011 05:35:34 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112280535.pBS5ZYc5084883@svn.freebsd.org> From: Xin LI Date: Wed, 28 Dec 2011 05:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228924 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 05:35:34 -0000 Author: delphij Date: Wed Dec 28 05:35:33 2011 New Revision: 228924 URL: http://svn.freebsd.org/changeset/base/228924 Log: In POSIX.1-2008: P_tmpdir [OB XSI] Default directory prefix for tempnam(). This macro is used in a lot of places in legacy applications, and is why we see a lot of programs written for e.g. Linux store volatile temporary files in /var/tmp and not /tmp. MFC after: 2 months Modified: head/include/stdio.h Modified: head/include/stdio.h ============================================================================== --- head/include/stdio.h Tue Dec 27 23:53:00 2011 (r228923) +++ head/include/stdio.h Wed Dec 28 05:35:33 2011 (r228924) @@ -205,7 +205,7 @@ __END_DECLS /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ #if __XSI_VISIBLE -#define P_tmpdir "/var/tmp/" +#define P_tmpdir "/tmp/" #endif #define L_tmpnam 1024 /* XXX must be == PATH_MAX */ #define TMP_MAX 308915776 From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 05:57:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 025B3106564A; Wed, 28 Dec 2011 05:57:04 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF0658FC0C; Wed, 28 Dec 2011 05:57:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBS5v3Nt085559; Wed, 28 Dec 2011 05:57:03 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBS5v3HZ085555; Wed, 28 Dec 2011 05:57:03 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112280557.pBS5v3HZ085555@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Wed, 28 Dec 2011 05:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228925 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 05:57:04 -0000 Author: gonzo Date: Wed Dec 28 05:57:03 2011 New Revision: 228925 URL: http://svn.freebsd.org/changeset/base/228925 Log: - Add generic GPIO driver for Cavium Octeon. At the moment pin definition is hardcoded but will be changed later with more flexible way to define them. Added: head/sys/mips/cavium/octeon_gpio.c (contents, props changed) head/sys/mips/cavium/octeon_gpiovar.h (contents, props changed) Modified: head/sys/mips/cavium/files.octeon1 Modified: head/sys/mips/cavium/files.octeon1 ============================================================================== --- head/sys/mips/cavium/files.octeon1 Wed Dec 28 05:35:33 2011 (r228924) +++ head/sys/mips/cavium/files.octeon1 Wed Dec 28 05:57:03 2011 (r228925) @@ -49,6 +49,8 @@ mips/cavium/usb/octusb_octeon.c option contrib/octeon-sdk/cvmx-usb.c optional octusb +mips/cavium/octeon_gpio.c optional gpio + # XXX Some files could be excluded in some configurations. Making them # optional but on in the default config would seem reasonable. contrib/octeon-sdk/cvmx-cmd-queue.c standard Added: head/sys/mips/cavium/octeon_gpio.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/cavium/octeon_gpio.c Wed Dec 28 05:57:03 2011 (r228925) @@ -0,0 +1,494 @@ +/*- + * Copyright (c) 2011, Oleksandr Tymoshenko + * 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 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. + */ + +/* + * GPIO driver for Cavium Octeon + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include + +#include "gpio_if.h" + +#define DEFAULT_CAPS (GPIO_PIN_INPUT | GPIO_PIN_OUTPUT) + +struct octeon_gpio_pin { + const char *name; + int pin; + int flags; +}; + +/* + * on CAP100 GPIO 7 is "Factory defaults" button + * + */ +static struct octeon_gpio_pin octeon_gpio_pins[] = { + { "F/D", 7, GPIO_PIN_INPUT}, + { NULL, 0, 0}, +}; + +/* + * Helpers + */ +static void octeon_gpio_pin_configure(struct octeon_gpio_softc *sc, + struct gpio_pin *pin, uint32_t flags); + +/* + * Driver stuff + */ +static void octeon_gpio_identify(driver_t *, device_t); +static int octeon_gpio_probe(device_t dev); +static int octeon_gpio_attach(device_t dev); +static int octeon_gpio_detach(device_t dev); +static int octeon_gpio_filter(void *arg); +static void octeon_gpio_intr(void *arg); + +/* + * GPIO interface + */ +static int octeon_gpio_pin_max(device_t dev, int *maxpin); +static int octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps); +static int octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t + *flags); +static int octeon_gpio_pin_getname(device_t dev, uint32_t pin, char *name); +static int octeon_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags); +static int octeon_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value); +static int octeon_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val); +static int octeon_gpio_pin_toggle(device_t dev, uint32_t pin); + +static void +octeon_gpio_pin_configure(struct octeon_gpio_softc *sc, struct gpio_pin *pin, + unsigned int flags) +{ + uint32_t mask; + cvmx_gpio_bit_cfgx_t gpio_cfgx; + + mask = 1 << pin->gp_pin; + GPIO_LOCK(sc); + + /* + * Manage input/output + */ + if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(pin->gp_pin)); + pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); + if (flags & GPIO_PIN_OUTPUT) { + pin->gp_flags |= GPIO_PIN_OUTPUT; + gpio_cfgx.s.tx_oe = 1; + } + else { + pin->gp_flags |= GPIO_PIN_INPUT; + gpio_cfgx.s.tx_oe = 0; + } + if (flags & GPIO_PIN_INVIN) + gpio_cfgx.s.rx_xor = 1; + else + gpio_cfgx.s.rx_xor = 0; + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(pin->gp_pin), gpio_cfgx.u64); + } + + GPIO_UNLOCK(sc); +} + +static int +octeon_gpio_pin_max(device_t dev, int *maxpin) +{ + + *maxpin = OCTEON_GPIO_PINS - 1; + return (0); +} + +static int +octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) +{ + struct octeon_gpio_softc *sc = device_get_softc(dev); + int i; + + for (i = 0; i < sc->gpio_npins; i++) { + if (sc->gpio_pins[i].gp_pin == pin) + break; + } + + if (i >= sc->gpio_npins) + return (EINVAL); + + GPIO_LOCK(sc); + *caps = sc->gpio_pins[i].gp_caps; + GPIO_UNLOCK(sc); + + return (0); +} + +static int +octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *flags) +{ + struct octeon_gpio_softc *sc = device_get_softc(dev); + int i; + + for (i = 0; i < sc->gpio_npins; i++) { + if (sc->gpio_pins[i].gp_pin == pin) + break; + } + + if (i >= sc->gpio_npins) + return (EINVAL); + + GPIO_LOCK(sc); + *flags = sc->gpio_pins[i].gp_flags; + GPIO_UNLOCK(sc); + + return (0); +} + +static int +octeon_gpio_pin_getname(device_t dev, uint32_t pin, char *name) +{ + struct octeon_gpio_softc *sc = device_get_softc(dev); + int i; + + for (i = 0; i < sc->gpio_npins; i++) { + if (sc->gpio_pins[i].gp_pin == pin) + break; + } + + if (i >= sc->gpio_npins) + return (EINVAL); + + GPIO_LOCK(sc); + memcpy(name, sc->gpio_pins[i].gp_name, GPIOMAXNAME); + GPIO_UNLOCK(sc); + + return (0); +} + +static int +octeon_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) +{ + int i; + struct octeon_gpio_softc *sc = device_get_softc(dev); + + for (i = 0; i < sc->gpio_npins; i++) { + if (sc->gpio_pins[i].gp_pin == pin) + break; + } + + if (i >= sc->gpio_npins) + return (EINVAL); + + /* Filter out unwanted flags */ + if ((flags &= sc->gpio_pins[i].gp_caps) != flags) + return (EINVAL); + + /* Can't mix input/output together */ + if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == + (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) + return (EINVAL); + + octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); + return (0); +} + +static int +octeon_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) +{ + struct octeon_gpio_softc *sc = device_get_softc(dev); + int i; + + for (i = 0; i < sc->gpio_npins; i++) { + if (sc->gpio_pins[i].gp_pin == pin) + break; + } + + if (i >= sc->gpio_npins) + return (EINVAL); + + GPIO_LOCK(sc); + if (value) + cvmx_gpio_set(1 << pin); + else + cvmx_gpio_clear(1 << pin); + GPIO_UNLOCK(sc); + + return (0); +} + +static int +octeon_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) +{ + struct octeon_gpio_softc *sc = device_get_softc(dev); + int i; + uint64_t state; + + for (i = 0; i < sc->gpio_npins; i++) { + if (sc->gpio_pins[i].gp_pin == pin) + break; + } + + if (i >= sc->gpio_npins) + return (EINVAL); + + GPIO_LOCK(sc); + state = cvmx_gpio_read(); + *val = (state & (1 << pin)) ? 1 : 0; + GPIO_UNLOCK(sc); + + return (0); +} + +static int +octeon_gpio_pin_toggle(device_t dev, uint32_t pin) +{ + int i; + uint64_t state; + struct octeon_gpio_softc *sc = device_get_softc(dev); + + for (i = 0; i < sc->gpio_npins; i++) { + if (sc->gpio_pins[i].gp_pin == pin) + break; + } + + if (i >= sc->gpio_npins) + return (EINVAL); + + GPIO_LOCK(sc); + /* + * XXX: Need to check if read returns actual state of output + * pins or we need to keep this information by ourself + */ + state = cvmx_gpio_read(); + if (state & (1 << pin)) + cvmx_gpio_clear(1 << pin); + else + cvmx_gpio_set(1 << pin); + GPIO_UNLOCK(sc); + + return (0); +} + +static int +octeon_gpio_filter(void *arg) +{ + cvmx_gpio_bit_cfgx_t gpio_cfgx; + void **cookie = arg; + struct octeon_gpio_softc *sc = *cookie; + long int irq = (cookie - sc->gpio_intr_cookies); + + if ((irq < 0) || (irq >= OCTEON_GPIO_IRQS)) + return (FILTER_STRAY); + + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(irq)); + /* Clear rising edge detector */ + if (gpio_cfgx.s.int_type == OCTEON_GPIO_IRQ_EDGE) + cvmx_gpio_interrupt_clear(1 << irq); + /* disable interrupt */ + gpio_cfgx.s.int_en = 0; + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(irq), gpio_cfgx.u64); + + return (FILTER_SCHEDULE_THREAD); +} + +static void +octeon_gpio_intr(void *arg) +{ + cvmx_gpio_bit_cfgx_t gpio_cfgx; + void **cookie = arg; + struct octeon_gpio_softc *sc = *cookie; + long int irq = (cookie - sc->gpio_intr_cookies); + + if ((irq < 0) || (irq >= OCTEON_GPIO_IRQS)) { + printf("%s: invalid GPIO IRQ: %ld\n", + __func__, irq); + return; + } + + GPIO_LOCK(sc); + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(irq)); + /* disable interrupt */ + gpio_cfgx.s.int_en = 1; + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(irq), gpio_cfgx.u64); + + /* TODO: notify bus here or something */ + printf("GPIO IRQ for pin %ld\n", irq); + GPIO_UNLOCK(sc); +} + +static void +octeon_gpio_identify(driver_t *drv, device_t parent) +{ + + BUS_ADD_CHILD(parent, 0, "gpio", 0); +} + +static int +octeon_gpio_probe(device_t dev) +{ + + device_set_desc(dev, "Cavium Octeon GPIO driver"); + return (0); +} + +static int +octeon_gpio_attach(device_t dev) +{ + struct octeon_gpio_softc *sc = device_get_softc(dev); + struct octeon_gpio_pin *pinp; + cvmx_gpio_bit_cfgx_t gpio_cfgx; + + int i; + + KASSERT((device_get_unit(dev) == 0), + ("octeon_gpio: Only one gpio module supported")); + + mtx_init(&sc->gpio_mtx, device_get_nameunit(dev), MTX_NETWORK_LOCK, + MTX_DEF); + + for ( i = 0; i < OCTEON_GPIO_IRQS; i++) { + if ((sc->gpio_irq_res[i] = bus_alloc_resource(dev, + SYS_RES_IRQ, &sc->gpio_irq_rid[i], + CVMX_IRQ_GPIO0 + i, CVMX_IRQ_GPIO0 + i, 1, + RF_SHAREABLE | RF_ACTIVE)) == NULL) { + device_printf(dev, "unable to allocate IRQ resource\n"); + return (ENXIO); + } + + sc->gpio_intr_cookies[i] = sc; + if ((bus_setup_intr(dev, sc->gpio_irq_res[i], INTR_TYPE_MISC, + octeon_gpio_filter, octeon_gpio_intr, + &(sc->gpio_intr_cookies[i]), &sc->gpio_ih[i]))) { + device_printf(dev, + "WARNING: unable to register interrupt handler\n"); + return (ENXIO); + } + } + + sc->dev = dev; + /* Configure all pins as input */ + /* disable interrupts for all pins */ + pinp = octeon_gpio_pins; + i = 0; + while (pinp->name) { + strncpy(sc->gpio_pins[i].gp_name, pinp->name, GPIOMAXNAME); + sc->gpio_pins[i].gp_pin = pinp->pin; + sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; + sc->gpio_pins[i].gp_flags = 0; + octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], pinp->flags); + pinp++; + i++; + } + + sc->gpio_npins = i; + +#if 0 + /* + * Sample: how to enable edge-triggered interrupt + * for GPIO pin + */ + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(7)); + gpio_cfgx.s.int_en = 1; + gpio_cfgx.s.int_type = OCTEON_GPIO_IRQ_EDGE; + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(7), gpio_cfgx.u64); +#endif + + if (bootverbose) { + for (i = 0; i < 16; i++) { + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(i)); + device_printf(dev, "[pin%d] output=%d, invinput=%d, intr=%d, intr_type=%s\n", + i, gpio_cfgx.s.tx_oe, gpio_cfgx.s.rx_xor, + gpio_cfgx.s.int_en, gpio_cfgx.s.int_type ? "rising edge" : "level"); + } + } + + device_add_child(dev, "gpioc", device_get_unit(dev)); + device_add_child(dev, "gpiobus", device_get_unit(dev)); + return (bus_generic_attach(dev)); +} + +static int +octeon_gpio_detach(device_t dev) +{ + struct octeon_gpio_softc *sc = device_get_softc(dev); + int i; + + KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not initialized")); + + for ( i = 0; i < OCTEON_GPIO_IRQS; i++) { + bus_release_resource(dev, SYS_RES_IRQ, + sc->gpio_irq_rid[i], sc->gpio_irq_res[i]); + } + bus_generic_detach(dev); + + mtx_destroy(&sc->gpio_mtx); + + return(0); +} + +static device_method_t octeon_gpio_methods[] = { + DEVMETHOD(device_identify, octeon_gpio_identify), + DEVMETHOD(device_probe, octeon_gpio_probe), + DEVMETHOD(device_attach, octeon_gpio_attach), + DEVMETHOD(device_detach, octeon_gpio_detach), + + /* GPIO protocol */ + DEVMETHOD(gpio_pin_max, octeon_gpio_pin_max), + DEVMETHOD(gpio_pin_getname, octeon_gpio_pin_getname), + DEVMETHOD(gpio_pin_getflags, octeon_gpio_pin_getflags), + DEVMETHOD(gpio_pin_getcaps, octeon_gpio_pin_getcaps), + DEVMETHOD(gpio_pin_setflags, octeon_gpio_pin_setflags), + DEVMETHOD(gpio_pin_get, octeon_gpio_pin_get), + DEVMETHOD(gpio_pin_set, octeon_gpio_pin_set), + DEVMETHOD(gpio_pin_toggle, octeon_gpio_pin_toggle), + {0, 0}, +}; + +static driver_t octeon_gpio_driver = { + "gpio", + octeon_gpio_methods, + sizeof(struct octeon_gpio_softc), +}; +static devclass_t octeon_gpio_devclass; + +DRIVER_MODULE(octeon_gpio, ciu, octeon_gpio_driver, octeon_gpio_devclass, 0, 0); Added: head/sys/mips/cavium/octeon_gpiovar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/cavium/octeon_gpiovar.h Wed Dec 28 05:57:03 2011 (r228925) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2011, Oleksandr Tymoshenko + * 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 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 __OCTEON_GPIOVAR_H__ +#define __OCTEON_GPIOVAR_H__ + +#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->gpio_mtx) +#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->gpio_mtx) +#define GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->gpio_mtx, MA_OWNED) + +#define OCTEON_GPIO_IRQ_LEVEL 0 +#define OCTEON_GPIO_IRQ_EDGE 1 + +#define OCTEON_GPIO_PINS 24 +#define OCTEON_GPIO_IRQS 16 + +struct octeon_gpio_softc { + device_t dev; + struct mtx gpio_mtx; + struct resource *gpio_irq_res[OCTEON_GPIO_IRQS]; + int gpio_irq_rid[OCTEON_GPIO_IRQS]; + void *gpio_ih[OCTEON_GPIO_IRQS]; + void *gpio_intr_cookies[OCTEON_GPIO_IRQS]; + int gpio_npins; + struct gpio_pin gpio_pins[OCTEON_GPIO_PINS]; +}; + +#endif /* __OCTEON_GPIOVAR_H__ */ From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 05:58:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BC8C106566B; Wed, 28 Dec 2011 05:58:31 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 679F58FC08; Wed, 28 Dec 2011 05:58:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBS5wVA3085643; Wed, 28 Dec 2011 05:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBS5wVnJ085636; Wed, 28 Dec 2011 05:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201112280558.pBS5wVnJ085636@svn.freebsd.org> From: Kevin Lo Date: Wed, 28 Dec 2011 05:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228926 - head/contrib/tcpdump X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 05:58:31 -0000 Author: kevlo Date: Wed Dec 28 05:58:31 2011 New Revision: 228926 URL: http://svn.freebsd.org/changeset/base/228926 Log: Fix incorrect uses of sizeof(). The details of the fix can be found in the tcpdump git repository: commit 684955d58611ee94eccdc34e82b32e676337188c Modified: head/contrib/tcpdump/print-eigrp.c head/contrib/tcpdump/print-ldp.c head/contrib/tcpdump/print-lmp.c head/contrib/tcpdump/print-lspping.c head/contrib/tcpdump/print-rsvp.c head/contrib/tcpdump/print-slow.c Modified: head/contrib/tcpdump/print-eigrp.c ============================================================================== --- head/contrib/tcpdump/print-eigrp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-eigrp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -280,7 +280,7 @@ eigrp_print(register const u_char *pptr, if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) || eigrp_tlv_len > tlen) { - print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ",tlen); + print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ",tlen); return; } @@ -468,7 +468,7 @@ eigrp_print(register const u_char *pptr, } /* do we want to see an additionally hexdump ? */ if (vflag > 1) - print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ", eigrp_tlv_len-sizeof(struct eigrp_tlv_header)); tptr+=eigrp_tlv_len; Modified: head/contrib/tcpdump/print-ldp.c ============================================================================== --- head/contrib/tcpdump/print-ldp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-ldp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -609,7 +609,7 @@ ldp_msg_print(register const u_char *ppt } /* do we want to see an additionally hexdump ? */ if (vflag > 1 || hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct ldp_msg_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct ldp_msg_header),"\n\t ", msg_len); tptr += msg_len+4; Modified: head/contrib/tcpdump/print-lmp.c ============================================================================== --- head/contrib/tcpdump/print-lmp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-lmp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -871,7 +871,7 @@ lmp_print(register const u_char *pptr, r } /* do we want to see an additionally hexdump ? */ if (vflag > 1 || hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct lmp_object_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct lmp_object_header),"\n\t ", lmp_obj_len-sizeof(struct lmp_object_header)); tptr+=lmp_obj_len; Modified: head/contrib/tcpdump/print-lspping.c ============================================================================== --- head/contrib/tcpdump/print-lspping.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-lspping.c Wed Dec 28 05:58:31 2011 (r228926) @@ -878,7 +878,7 @@ lspping_print(register const u_char *ppt } /* do we want to see an additionally tlv hexdump ? */ if (vflag > 1 || tlv_hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct lspping_tlv_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct lspping_tlv_header),"\n\t ", lspping_tlv_len); Modified: head/contrib/tcpdump/print-rsvp.c ============================================================================== --- head/contrib/tcpdump/print-rsvp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-rsvp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -1790,7 +1790,7 @@ _U_ } /* do we also want to see a hex dump ? */ if (vflag > 1 || hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct rsvp_object_header)),"\n\t ", /* FIXME indentation */ + print_unknown_data(tptr+sizeof(struct rsvp_object_header),"\n\t ", /* FIXME indentation */ rsvp_obj_len-sizeof(struct rsvp_object_header)); tptr+=rsvp_obj_len; Modified: head/contrib/tcpdump/print-slow.c ============================================================================== --- head/contrib/tcpdump/print-slow.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-slow.c Wed Dec 28 05:58:31 2011 (r228926) @@ -368,7 +368,7 @@ void slow_marker_lacp_print(register con tlv_header->type != LACP_TLV_TERMINATOR && tlv_header->type != MARKER_TLV_TERMINATOR) { printf("\n\t-----trailing data-----"); - print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ",tlen); + print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ",tlen); return; } @@ -441,7 +441,7 @@ void slow_marker_lacp_print(register con } /* do we want to see an additional hexdump ? */ if (vflag > 1) { - print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ", + print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ", tlv_len-sizeof(struct tlv_header_t)); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 10:15:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6324F106566C; Wed, 28 Dec 2011 10:15:30 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 915738FC0A; Wed, 28 Dec 2011 10:15:29 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id BD27EC4955; Wed, 28 Dec 2011 12:15:28 +0200 (EET) Date: Wed, 28 Dec 2011 12:15:41 +0200 From: Aleksandr Rybalko To: Oleksandr Tymoshenko Message-Id: <20111228121541.9698722c.ray@dlink.ua> In-Reply-To: <201112280557.pBS5v3HZ085555@svn.freebsd.org> References: <201112280557.pBS5v3HZ085555@svn.freebsd.org> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228925 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 10:15:30 -0000 On Wed, 28 Dec 2011 05:57:03 +0000 (UTC) Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Wed Dec 28 05:57:03 2011 >> New Revision: 228925 >> URL: http://svn.freebsd.org/changeset/base/228925 >> >> Log: >> - Add generic GPIO driver for Cavium Octeon. At the moment pin >> definition is hardcoded but will be changed later with more flexible >> way to define them. >> >> Added: >> head/sys/mips/cavium/octeon_gpio.c (contents, props changed) >> head/sys/mips/cavium/octeon_gpiovar.h (contents, props changed) >> Modified: >> head/sys/mips/cavium/files.octeon1 >> >> Modified: head/sys/mips/cavium/files.octeon1 >> ============================================================================== >> --- head/sys/mips/cavium/files.octeon1 Wed Dec 28 05:35:33 >> 2011 (r228924) +++ head/sys/mips/cavium/files.octeon1 >> Wed Dec 28 05:57:03 2011 (r228925) @@ -49,6 +49,8 @@ >> mips/cavium/usb/octusb_octeon.c option >> contrib/octeon-sdk/cvmx-usb.c optional octusb >> >> +mips/cavium/octeon_gpio.c optional gpio >> + >> # XXX Some files could be excluded in some configurations. Making >> # them optional but on in the default config would seem reasonable. >> contrib/octeon-sdk/cvmx-cmd-queue.c standard >> >> Added: head/sys/mips/cavium/octeon_gpio.c >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is >> newly added) +++ head/sys/mips/cavium/octeon_gpio.c Wed Dec >> 28 05:57:03 2011 (r228925) @@ -0,0 +1,494 @@ >> +/*- >> + * Copyright (c) 2011, Oleksandr Tymoshenko >> + * 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 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. >> + */ >> + >> +/* >> + * GPIO driver for Cavium Octeon >> + */ >> + >> +#include >> +__FBSDID("$FreeBSD$"); >> + >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include >> +#include >> + >> +#include >> +#include >> +#include >> + >> +#include >> + >> +#include "gpio_if.h" >> + >> +#define DEFAULT_CAPS (GPIO_PIN_INPUT | >> GPIO_PIN_OUTPUT) + >> +struct octeon_gpio_pin { >> + const char *name; >> + int pin; >> + int flags; >> +}; >> + >> +/* >> + * on CAP100 GPIO 7 is "Factory defaults" button >> + * >> + */ >> +static struct octeon_gpio_pin octeon_gpio_pins[] = { >> + { "F/D", 7, GPIO_PIN_INPUT}, >> + { NULL, 0, 0}, >> +}; >> + >> +/* >> + * Helpers >> + */ >> +static void octeon_gpio_pin_configure(struct octeon_gpio_softc *sc, >> + struct gpio_pin *pin, uint32_t flags); >> + >> +/* >> + * Driver stuff >> + */ >> +static void octeon_gpio_identify(driver_t *, device_t); >> +static int octeon_gpio_probe(device_t dev); >> +static int octeon_gpio_attach(device_t dev); >> +static int octeon_gpio_detach(device_t dev); >> +static int octeon_gpio_filter(void *arg); >> +static void octeon_gpio_intr(void *arg); >> + >> +/* >> + * GPIO interface >> + */ >> +static int octeon_gpio_pin_max(device_t dev, int *maxpin); >> +static int octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, >> uint32_t *caps); +static int octeon_gpio_pin_getflags(device_t dev, >> uint32_t pin, uint32_t >> + *flags); >> +static int octeon_gpio_pin_getname(device_t dev, uint32_t pin, char >> *name); +static int octeon_gpio_pin_setflags(device_t dev, uint32_t >> pin, uint32_t flags); +static int octeon_gpio_pin_set(device_t dev, >> uint32_t pin, unsigned int value); +static int octeon_gpio_pin_get >> (device_t dev, uint32_t pin, unsigned int *val); +static int >> octeon_gpio_pin_toggle(device_t dev, uint32_t pin); + >> +static void >> +octeon_gpio_pin_configure(struct octeon_gpio_softc *sc, struct >> gpio_pin *pin, >> + unsigned int flags) >> +{ >> + uint32_t mask; >> + cvmx_gpio_bit_cfgx_t gpio_cfgx; >> + >> + mask = 1 << pin->gp_pin; >> + GPIO_LOCK(sc); >> + >> + /* >> + * Manage input/output >> + */ >> + if (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) { >> + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX >> (pin->gp_pin)); >> + pin->gp_flags &= ~(GPIO_PIN_INPUT|GPIO_PIN_OUTPUT); >> + if (flags & GPIO_PIN_OUTPUT) { >> + pin->gp_flags |= GPIO_PIN_OUTPUT; >> + gpio_cfgx.s.tx_oe = 1; >> + } >> + else { >> + pin->gp_flags |= GPIO_PIN_INPUT; >> + gpio_cfgx.s.tx_oe = 0; >> + } >> + if (flags & GPIO_PIN_INVIN) >> + gpio_cfgx.s.rx_xor = 1; >> + else >> + gpio_cfgx.s.rx_xor = 0; >> + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(pin->gp_pin), >> gpio_cfgx.u64); >> + } >> + >> + GPIO_UNLOCK(sc); >> +} >> + >> +static int >> +octeon_gpio_pin_max(device_t dev, int *maxpin) >> +{ >> + >> + *maxpin = OCTEON_GPIO_PINS - 1; >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) >> +{ >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + int i; >> + >> + for (i = 0; i < sc->gpio_npins; i++) { >> + if (sc->gpio_pins[i].gp_pin == pin) >> + break; >> + } >> + >> + if (i >= sc->gpio_npins) >> + return (EINVAL); >> + >> + GPIO_LOCK(sc); >> + *caps = sc->gpio_pins[i].gp_caps; >> + GPIO_UNLOCK(sc); >> + >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t >> *flags) +{ >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + int i; >> + >> + for (i = 0; i < sc->gpio_npins; i++) { >> + if (sc->gpio_pins[i].gp_pin == pin) >> + break; >> + } >> + >> + if (i >= sc->gpio_npins) >> + return (EINVAL); >> + >> + GPIO_LOCK(sc); >> + *flags = sc->gpio_pins[i].gp_flags; >> + GPIO_UNLOCK(sc); >> + >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_pin_getname(device_t dev, uint32_t pin, char *name) >> +{ >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + int i; >> + >> + for (i = 0; i < sc->gpio_npins; i++) { >> + if (sc->gpio_pins[i].gp_pin == pin) >> + break; >> + } >> + >> + if (i >= sc->gpio_npins) >> + return (EINVAL); >> + >> + GPIO_LOCK(sc); >> + memcpy(name, sc->gpio_pins[i].gp_name, GPIOMAXNAME); >> + GPIO_UNLOCK(sc); >> + >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) >> +{ >> + int i; >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + >> + for (i = 0; i < sc->gpio_npins; i++) { >> + if (sc->gpio_pins[i].gp_pin == pin) >> + break; >> + } >> + >> + if (i >= sc->gpio_npins) >> + return (EINVAL); >> + >> + /* Filter out unwanted flags */ >> + if ((flags &= sc->gpio_pins[i].gp_caps) != flags) >> + return (EINVAL); >> + >> + /* Can't mix input/output together */ >> + if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == >> + (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) >> + return (EINVAL); >> + >> + octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_pin_set(device_t dev, uint32_t pin, unsigned int value) >> +{ >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + int i; >> + >> + for (i = 0; i < sc->gpio_npins; i++) { >> + if (sc->gpio_pins[i].gp_pin == pin) >> + break; >> + } >> + >> + if (i >= sc->gpio_npins) >> + return (EINVAL); >> + >> + GPIO_LOCK(sc); >> + if (value) >> + cvmx_gpio_set(1 << pin); >> + else >> + cvmx_gpio_clear(1 << pin); >> + GPIO_UNLOCK(sc); >> + >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_pin_get(device_t dev, uint32_t pin, unsigned int *val) >> +{ >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + int i; >> + uint64_t state; >> + >> + for (i = 0; i < sc->gpio_npins; i++) { >> + if (sc->gpio_pins[i].gp_pin == pin) >> + break; >> + } >> + >> + if (i >= sc->gpio_npins) >> + return (EINVAL); >> + >> + GPIO_LOCK(sc); >> + state = cvmx_gpio_read(); >> + *val = (state & (1 << pin)) ? 1 : 0; >> + GPIO_UNLOCK(sc); >> + >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_pin_toggle(device_t dev, uint32_t pin) >> +{ >> + int i; >> + uint64_t state; >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + >> + for (i = 0; i < sc->gpio_npins; i++) { >> + if (sc->gpio_pins[i].gp_pin == pin) >> + break; >> + } >> + >> + if (i >= sc->gpio_npins) >> + return (EINVAL); >> + >> + GPIO_LOCK(sc); >> + /* >> + * XXX: Need to check if read returns actual state of >> output >> + * pins or we need to keep this information by ourself >> + */ >> + state = cvmx_gpio_read(); >> + if (state & (1 << pin)) >> + cvmx_gpio_clear(1 << pin); >> + else >> + cvmx_gpio_set(1 << pin); >> + GPIO_UNLOCK(sc); >> + >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_filter(void *arg) >> +{ >> + cvmx_gpio_bit_cfgx_t gpio_cfgx; >> + void **cookie = arg; >> + struct octeon_gpio_softc *sc = *cookie; >> + long int irq = (cookie - sc->gpio_intr_cookies); >> + >> + if ((irq < 0) || (irq >= OCTEON_GPIO_IRQS)) >> + return (FILTER_STRAY); >> + >> + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(irq)); >> + /* Clear rising edge detector */ >> + if (gpio_cfgx.s.int_type == OCTEON_GPIO_IRQ_EDGE) >> + cvmx_gpio_interrupt_clear(1 << irq); >> + /* disable interrupt */ >> + gpio_cfgx.s.int_en = 0; >> + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(irq), gpio_cfgx.u64); >> + >> + return (FILTER_SCHEDULE_THREAD); >> +} >> + >> +static void >> +octeon_gpio_intr(void *arg) >> +{ >> + cvmx_gpio_bit_cfgx_t gpio_cfgx; >> + void **cookie = arg; >> + struct octeon_gpio_softc *sc = *cookie; >> + long int irq = (cookie - sc->gpio_intr_cookies); >> + >> + if ((irq < 0) || (irq >= OCTEON_GPIO_IRQS)) { >> + printf("%s: invalid GPIO IRQ: %ld\n", >> + __func__, irq); >> + return; >> + } >> + >> + GPIO_LOCK(sc); >> + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(irq)); >> + /* disable interrupt */ >> + gpio_cfgx.s.int_en = 1; >> + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(irq), gpio_cfgx.u64); >> + >> + /* TODO: notify bus here or something */ >> + printf("GPIO IRQ for pin %ld\n", irq); >> + GPIO_UNLOCK(sc); >> +} >> + >> +static void >> +octeon_gpio_identify(driver_t *drv, device_t parent) >> +{ >> + >> + BUS_ADD_CHILD(parent, 0, "gpio", 0); >> +} >> + >> +static int >> +octeon_gpio_probe(device_t dev) >> +{ >> + >> + device_set_desc(dev, "Cavium Octeon GPIO driver"); >> + return (0); >> +} >> + >> +static int >> +octeon_gpio_attach(device_t dev) >> +{ >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + struct octeon_gpio_pin *pinp; >> + cvmx_gpio_bit_cfgx_t gpio_cfgx; >> + >> + int i; >> + >> + KASSERT((device_get_unit(dev) == 0), >> + ("octeon_gpio: Only one gpio module supported")); >> + >> + mtx_init(&sc->gpio_mtx, device_get_nameunit(dev), >> MTX_NETWORK_LOCK, >> + MTX_DEF); >> + >> + for ( i = 0; i < OCTEON_GPIO_IRQS; i++) { >> + if ((sc->gpio_irq_res[i] = bus_alloc_resource(dev, >> + SYS_RES_IRQ, &sc->gpio_irq_rid[i], >> + CVMX_IRQ_GPIO0 + i, CVMX_IRQ_GPIO0 + i, 1, >> + RF_SHAREABLE | RF_ACTIVE)) == NULL) { >> + device_printf(dev, "unable to allocate IRQ >> resource\n"); >> + return (ENXIO); >> + } >> + >> + sc->gpio_intr_cookies[i] = sc; >> + if ((bus_setup_intr(dev, sc->gpio_irq_res[i], >> INTR_TYPE_MISC, >> + octeon_gpio_filter, octeon_gpio_intr, >> + &(sc->gpio_intr_cookies[i]), &sc->gpio_ih[i]))) >> { >> + device_printf(dev, >> + "WARNING: unable to register interrupt >> handler\n"); >> + return (ENXIO); >> + } >> + } >> + >> + sc->dev = dev; >> + /* Configure all pins as input */ >> + /* disable interrupts for all pins */ >> + pinp = octeon_gpio_pins; >> + i = 0; >> + while (pinp->name) { >> + strncpy(sc->gpio_pins[i].gp_name, pinp->name, >> GPIOMAXNAME); >> + sc->gpio_pins[i].gp_pin = pinp->pin; >> + sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; >> + sc->gpio_pins[i].gp_flags = 0; >> + octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], >> pinp->flags); >> + pinp++; >> + i++; >> + } >> + >> + sc->gpio_npins = i; >> + >> +#if 0 >> + /* >> + * Sample: how to enable edge-triggered interrupt >> + * for GPIO pin >> + */ >> + gpio_cfgx.u64 = cvmx_read_csr(CVMX_GPIO_BIT_CFGX(7)); >> + gpio_cfgx.s.int_en = 1; >> + gpio_cfgx.s.int_type = OCTEON_GPIO_IRQ_EDGE; >> + cvmx_write_csr(CVMX_GPIO_BIT_CFGX(7), gpio_cfgx.u64); >> +#endif >> + >> + if (bootverbose) { >> + for (i = 0; i < 16; i++) { >> + gpio_cfgx.u64 = cvmx_read_csr >> (CVMX_GPIO_BIT_CFGX(i)); >> + device_printf(dev, "[pin%d] output=%d, >> invinput=%d, intr=%d, intr_type=%s\n", >> + i, gpio_cfgx.s.tx_oe, >> gpio_cfgx.s.rx_xor, >> + gpio_cfgx.s.int_en, >> gpio_cfgx.s.int_type ? "rising edge" : "level"); >> + } >> + } >> + >> + device_add_child(dev, "gpioc", device_get_unit(dev)); >> + device_add_child(dev, "gpiobus", device_get_unit(dev)); >> + return (bus_generic_attach(dev)); >> +} >> + >> +static int >> +octeon_gpio_detach(device_t dev) >> +{ >> + struct octeon_gpio_softc *sc = device_get_softc(dev); >> + int i; >> + >> + KASSERT(mtx_initialized(&sc->gpio_mtx), ("gpio mutex not >> initialized")); + >> + for ( i = 0; i < OCTEON_GPIO_IRQS; i++) { >> + bus_release_resource(dev, SYS_RES_IRQ, >> + sc->gpio_irq_rid[i], sc->gpio_irq_res[i]); >> + } >> + bus_generic_detach(dev); >> + >> + mtx_destroy(&sc->gpio_mtx); >> + >> + return(0); >> +} >> + >> +static device_method_t octeon_gpio_methods[] = { >> + DEVMETHOD(device_identify, octeon_gpio_identify), >> + DEVMETHOD(device_probe, octeon_gpio_probe), >> + DEVMETHOD(device_attach, octeon_gpio_attach), >> + DEVMETHOD(device_detach, octeon_gpio_detach), >> + >> + /* GPIO protocol */ >> + DEVMETHOD(gpio_pin_max, octeon_gpio_pin_max), >> + DEVMETHOD(gpio_pin_getname, octeon_gpio_pin_getname), >> + DEVMETHOD(gpio_pin_getflags, octeon_gpio_pin_getflags), >> + DEVMETHOD(gpio_pin_getcaps, octeon_gpio_pin_getcaps), >> + DEVMETHOD(gpio_pin_setflags, octeon_gpio_pin_setflags), >> + DEVMETHOD(gpio_pin_get, octeon_gpio_pin_get), >> + DEVMETHOD(gpio_pin_set, octeon_gpio_pin_set), >> + DEVMETHOD(gpio_pin_toggle, octeon_gpio_pin_toggle), >> + {0, 0}, >> +}; >> + >> +static driver_t octeon_gpio_driver = { >> + "gpio", >> + octeon_gpio_methods, >> + sizeof(struct octeon_gpio_softc), >> +}; >> +static devclass_t octeon_gpio_devclass; >> + >> +DRIVER_MODULE(octeon_gpio, ciu, octeon_gpio_driver, >> octeon_gpio_devclass, 0, 0); >> >> Added: head/sys/mips/cavium/octeon_gpiovar.h >> ============================================================================== >> --- /dev/null 00:00:00 1970 (empty, because file is >> newly added) +++ head/sys/mips/cavium/octeon_gpiovar.h Wed >> Dec 28 05:57:03 2011 (r228925) @@ -0,0 +1,55 @@ >> +/*- >> + * Copyright (c) 2011, Oleksandr Tymoshenko >> + * 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 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 __OCTEON_GPIOVAR_H__ >> +#define __OCTEON_GPIOVAR_H__ >> + >> +#define GPIO_LOCK(_sc) mtx_lock(&(_sc)->gpio_mtx) >> +#define GPIO_UNLOCK(_sc) mtx_unlock(&(_sc)->gpio_mtx) >> +#define GPIO_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->gpio_mtx, >> MA_OWNED) + >> +#define OCTEON_GPIO_IRQ_LEVEL 0 >> +#define OCTEON_GPIO_IRQ_EDGE 1 >> + >> +#define OCTEON_GPIO_PINS 24 >> +#define OCTEON_GPIO_IRQS 16 >> + >> +struct octeon_gpio_softc { >> + device_t dev; >> + struct mtx gpio_mtx; >> + struct resource *gpio_irq_res >> [OCTEON_GPIO_IRQS]; >> + int gpio_irq_rid[OCTEON_GPIO_IRQS]; >> + void *gpio_ih[OCTEON_GPIO_IRQS]; >> + void *gpio_intr_cookies >> [OCTEON_GPIO_IRQS]; >> + int gpio_npins; >> + struct gpio_pin gpio_pins[OCTEON_GPIO_PINS]; >> +}; >> + >> +#endif /* __OCTEON_GPIOVAR_H__ */ Thank you very much Oleksandr! Oleksandr, can you please avoid define board depended futures in a SoC drivers in future '{ "F/D", 7, GPIO_PIN_INPUT}'? So others will be able to use driver in different boards w/o modification (just by define it in hints/FDT or so). Thanks again! WBW -- Alexandr Rybalko aka Alex RAY From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 13:01:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13D811065678; Wed, 28 Dec 2011 13:01:13 +0000 (UTC) (envelope-from cognet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 029368FC16; Wed, 28 Dec 2011 13:01:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSD1CuC007820; Wed, 28 Dec 2011 13:01:12 GMT (envelope-from cognet@svn.freebsd.org) Received: (from cognet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSD1C5b007818; Wed, 28 Dec 2011 13:01:12 GMT (envelope-from cognet@svn.freebsd.org) Message-Id: <201112281301.pBSD1C5b007818@svn.freebsd.org> From: Olivier Houchard Date: Wed, 28 Dec 2011 13:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228927 - head/tools/tools/netrate/netreceive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 13:01:13 -0000 Author: cognet Date: Wed Dec 28 13:01:12 2011 New Revision: 228927 URL: http://svn.freebsd.org/changeset/base/228927 Log: Oops, if we want to check from 0 to nsock, the test condition should be < nsock, not >. Pointy hat to: cognet Submitted by: Olivier Cochard-Labbe Modified: head/tools/tools/netrate/netreceive/netreceive.c Modified: head/tools/tools/netrate/netreceive/netreceive.c ============================================================================== --- head/tools/tools/netrate/netreceive/netreceive.c Wed Dec 28 05:58:31 2011 (r228926) +++ head/tools/tools/netrate/netreceive/netreceive.c Wed Dec 28 13:01:12 2011 (r228927) @@ -126,7 +126,7 @@ main(int argc, char *argv[]) while (1) { if (poll(fds, nsock, -1) < 0) perror("poll"); - for (i = 0; i > nsock; i++) { + for (i = 0; i < nsock; i++) { if (fds[i].revents & POLLIN) { if (recv(s[i], packet, 65536, 0) < 0) perror("recv"); From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 15:40:51 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B7DF106566C; Wed, 28 Dec 2011 15:40:51 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id C382C8FC0C; Wed, 28 Dec 2011 15:40:50 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBSFenok012459 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 28 Dec 2011 16:40:49 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325086849; bh=AVKv5q8XwZoTHeucMdlBAOs5UTbPyH93myA2bP6VR/w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=VJVMRZbGsZ7HQz6z46H+rJBS8kLSUzf2lswSWk2oASE1EsDyOfJRAfvSO083jGhfM PuYRAtIkpP7yxAu7wX8Ro39lJwpH3SJ36fgzkDyOfXC6M02DuEKEDXcgnsqUvrUPnb ZK0J+WHK8+3y9DjvjsxJHOPr2djVdx23VKp/VGKg= Date: Wed, 28 Dec 2011 16:40:49 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Doug Barton Message-ID: <20111228154049.GD83814@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Doug Barton , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4EF83AF4.9010108@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 15:40:51 -0000 On Mon, 2011-12-26 at 01:14:28 -0800, Doug Barton wrote: > On 12/26/2011 01:07, Xin LI wrote: > > Author: delphij > > Date: Mon Dec 26 09:07:08 2011 > > New Revision: 228896 > > URL: http://svn.freebsd.org/changeset/base/228896 > > > > Log: > > Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not > > apply to us). > > When I'm importing stat(1) stuff from Net/OpenBSD I don't do this. I > will however comment in the commit log for the next substantive change, > "Skipped update N.NN because the change was not relevant to us," or > words to that effect. > > I'm not suggesting that my way of doing this is perfect, or cannot be > improved. I would suggest however that this change was needless churn. I think it was the right thing to do. It's better to have one person (Xin LI) figure out if the change is needed or a no-op and do the upgrade to match our version to upstream's version, than to have a discrepancy between the two and cause half a dozen developers that stumble upon that difference to scratch their heads and spend time in figuring out if we should import the change. Cheers, Uli From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 15:53:41 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E50A5106566C; Wed, 28 Dec 2011 15:53:41 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 5EE668FC13; Wed, 28 Dec 2011 15:53:41 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBSFreHe012812 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 28 Dec 2011 16:53:40 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325087620; bh=/idBlJbYU8sYGOjycmuuweggV/pOizhlXUFl2ECcWU8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=azecNWqPIDkq5DyQMURHkzwkCfDdd0yXZpro92IEDqTcm4+q+8EekBJHoMpKQNYhB qCr3/1Q833OMXTbOO05bKTw+Oqz/InZSfrB3zItFjoU0LQloc9N/KeGGWOIwuUIzX8 whaoNq5NE1oX58Qe0ElY0fUAZpf5nzOnBwAazxhw= Date: Wed, 28 Dec 2011 16:53:40 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Doug Barton Message-ID: <20111228155340.GE83814@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Doug Barton , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112271021.pBRALvxB048644@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201112271021.pBRALvxB048644@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228909 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 15:53:42 -0000 On Tue, 2011-12-27 at 10:21:57 +0000, Doug Barton wrote: > Author: dougb > Date: Tue Dec 27 10:21:57 2011 > New Revision: 228909 > URL: http://svn.freebsd.org/changeset/base/228909 > > Log: > 1. Remove a bunch of duplicates. Usually this means removing them from > fortunes, but occasionally remove them from the other 2 files when > they are not offensive, or not murphy'ish enough. > > Where the version in fortunes had better attribution and/or formatting, > copy it over. > > 2. Fix a few typos > > 3. Use the full name of François De La Rochefoucauld, fix one of his > quotes, and remove the duplicate of it. Sigh, except for a stupid Unicode version of an apostrophe (’ vs ') this file was ASCII. And I made it so for a reason. We don't currently have a way to iconv fortune(6)'s output to the users LC_CTYPE. ASCII is the common denominator so that's what we have to choose to be bug free. My plan was to teach fortune to use bsdiconv once that is ready and in the tree to convert from Unicode to the users' locale. But until that is ready, we have to stick to ASCII. This is not a backout request, merely an explanation for why things were the way they were. I wish we'd mandated UTF-8 as the one true encoding a looong time ago. If Plan9 could do it, why not us? Cheers, Uli From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 17:45:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4022E106566C; Wed, 28 Dec 2011 17:45:27 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0198FC0C; Wed, 28 Dec 2011 17:45:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSHjRfF017118; Wed, 28 Dec 2011 17:45:27 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSHjQ3p017116; Wed, 28 Dec 2011 17:45:26 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201112281745.pBSHjQ3p017116@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 28 Dec 2011 17:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228933 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 17:45:27 -0000 Author: bapt Date: Wed Dec 28 17:45:26 2011 New Revision: 228933 URL: http://svn.freebsd.org/changeset/base/228933 Log: Add myself as a src committer Approved by: des (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Dec 28 15:26:38 2011 (r228932) +++ head/share/misc/committers-src.dot Wed Dec 28 17:45:26 2011 (r228933) @@ -34,6 +34,7 @@ archie [label="Archie Cobbs\narchie@Free arr [label="Andrew R. Reiter\narr@FreeBSD.org\n2001/11/02\n2005/05/25"] arun [label="Arun Sharma\narun@FreeBSD.org\n2003/03/06\n2006/12/16"] asmodai [label="Jeroen Ruigrok\nasmodai@FreeBSD.org\n1999/12/16\n2001/11/16"] +bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"] benjsc [label="Benjamin Close\nbenjsc@FreeBSD.org\n2007/02/09\n2010/09/15"] billf [label="Bill Fumerola\nbillf@FreeBSD.org\n1998/11/11\n2008/11/10"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2002/01/29\n2009/09/13"] @@ -333,6 +334,7 @@ des -> hmp des -> mike des -> olli des -> ru +des -> bapt dds -> versus From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 17:59:13 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id E0DF51065670; Wed, 28 Dec 2011 17:59:13 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9092715144D; Wed, 28 Dec 2011 17:59:13 +0000 (UTC) Message-ID: <4EFB58F1.6020206@FreeBSD.org> Date: Wed, 28 Dec 2011 09:59:13 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: =?windows-1252?Q?Ulrich_Sp=F6rlein?= , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112271021.pBRALvxB048644@svn.freebsd.org> <20111228155340.GE83814@acme.spoerlein.net> In-Reply-To: <20111228155340.GE83814@acme.spoerlein.net> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r228909 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 17:59:14 -0000 On 12/28/2011 07:53, Ulrich Spörlein wrote: > On Tue, 2011-12-27 at 10:21:57 +0000, Doug Barton wrote: >> Author: dougb >> Date: Tue Dec 27 10:21:57 2011 >> New Revision: 228909 >> URL: http://svn.freebsd.org/changeset/base/228909 >> >> Log: >> 1. Remove a bunch of duplicates. Usually this means removing them from >> fortunes, but occasionally remove them from the other 2 files when >> they are not offensive, or not murphy'ish enough. >> >> Where the version in fortunes had better attribution and/or formatting, >> copy it over. >> >> 2. Fix a few typos >> >> 3. Use the full name of François De La Rochefoucauld, fix one of his >> quotes, and remove the duplicate of it. > > Sigh, > > except for a stupid Unicode version of an apostrophe (’ vs ') That seems like an easy thing to fix? > this file > was ASCII. And I made it so for a reason. We don't currently have a way > to iconv fortune(6)'s output to the users LC_CTYPE. ASCII is the common > denominator so that's what we have to choose to be bug free. What breaks for non-ASCII text? > My plan was to teach fortune to use bsdiconv once that is ready and in > the tree to convert from Unicode to the users' locale. But until that is > ready, we have to stick to ASCII. I'm not opposed to doing that, but I want to make sure that a) it's for a good reason, and b) that we have some way to know what needs to be added back when it's safe. Meanwhile, I did actually test this change and it worked for me, so I thought it was safe to proceed. > This is not a backout request, I've no objection to making a change. Apparently the De should be de anyway, so what do you suggest? Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 19:36:08 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7FC5106564A; Wed, 28 Dec 2011 19:36:08 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 50FCF8FC0C; Wed, 28 Dec 2011 19:36:08 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBSJa7M2019799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 28 Dec 2011 20:36:07 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325100967; bh=b0maSZUWOZWGWqcXeCK8QZs6IVRMdstQJP6V+2Xbkog=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=WQ9e1JS4MsjyoYkHj4yQylQ+Yq73LLdbhN2HzAxmL40uEGJ/a2Ew1lOlugJbzGm6Z 9Bm80GoYfVaVfFQhZvwIicU7lI7gzg+3rxBnEFJ6MKTl/X260UjB6OtaWANlJEPRfQ Ejb27QjS/lHihoXWS49sgMkawnafEpdLh8BwVhkE= Date: Wed, 28 Dec 2011 20:36:07 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Doug Barton Message-ID: <20111228193607.GF83814@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Doug Barton , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112271021.pBRALvxB048644@svn.freebsd.org> <20111228155340.GE83814@acme.spoerlein.net> <4EFB58F1.6020206@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4EFB58F1.6020206@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228909 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 19:36:09 -0000 On Wed, 2011-12-28 at 09:59:13 -0800, Doug Barton wrote: > On 12/28/2011 07:53, Ulrich Spörlein wrote: > > On Tue, 2011-12-27 at 10:21:57 +0000, Doug Barton wrote: > >> Author: dougb > >> Date: Tue Dec 27 10:21:57 2011 > >> New Revision: 228909 > >> URL: http://svn.freebsd.org/changeset/base/228909 > >> > >> Log: > >> 1. Remove a bunch of duplicates. Usually this means removing them from > >> fortunes, but occasionally remove them from the other 2 files when > >> they are not offensive, or not murphy'ish enough. > >> > >> Where the version in fortunes had better attribution and/or formatting, > >> copy it over. > >> > >> 2. Fix a few typos > >> > >> 3. Use the full name of François De La Rochefoucauld, fix one of his > >> quotes, and remove the duplicate of it. > > > > Sigh, > > > > except for a stupid Unicode version of an apostrophe (’ vs ') > > That seems like an easy thing to fix? Sure, somebody must have snuk that in while I was not watching ;] However, the real solution would be some sort of pre-submit check or even breaking the build when the datfile is not 7bit clean. The state is that all datfiles were ASCII clean some time in the past, except for gerrold.limerick which has a unicode (C) in a comment, so it doesn't actually affect operation of fortune so I left it in. > > this file > > was ASCII. And I made it so for a reason. We don't currently have a way > > to iconv fortune(6)'s output to the users LC_CTYPE. ASCII is the common > > denominator so that's what we have to choose to be bug free. > > What breaks for non-ASCII text? If your terminal is ISO8859-1 (aka latin1) or an other non-UTF-8 groking terminal, you'll get garbage instead of François. Not a biggie but ugly anyhow. > > My plan was to teach fortune to use bsdiconv once that is ready and in > > the tree to convert from Unicode to the users' locale. But until that is > > ready, we have to stick to ASCII. > > I'm not opposed to doing that, but I want to make sure that a) it's for > a good reason, and b) that we have some way to know what needs to be > added back when it's safe. > > Meanwhile, I did actually test this change and it worked for me, so I > thought it was safe to proceed. Your terminal understands UTF-8, so you don't see a difference between ASCII and Unicode chars. Try setting LANG to, e.g. en_US.ISO8859-1 and run xterm +u8 with it (just to make sure). Then, when displaying a quote you get: % fortune -m Rochefoucauld %% (fortunes) Absence diminishes mediocre passions and increases great ones, as the wind blows out candles and fans fires. -- François De La Rochefoucauld (I hope this makes it through the way I see it). It all boils down to that fact that fortune(6) is not locale aware and thus only ASCII chars are safe to display (no EBCDIC does not count). > > This is not a backout request, > > I've no objection to making a change. Apparently the De should be de > anyway, so what do you suggest? I cannot speak to that with any authority. Uli PS: I'd love for us to drop supporting anything but Unicode, but then again I'd also would like to have a pony ... From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 19:37:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12D27106566C; Wed, 28 Dec 2011 19:37:05 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 018448FC15; Wed, 28 Dec 2011 19:37:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSJb4wY022287; Wed, 28 Dec 2011 19:37:04 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSJb3Lf022284; Wed, 28 Dec 2011 19:37:03 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112281937.pBSJb3Lf022284@svn.freebsd.org> From: Ulrich Spoerlein Date: Wed, 28 Dec 2011 19:37:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228934 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 19:37:05 -0000 Author: uqs Date: Wed Dec 28 19:37:03 2011 New Revision: 228934 URL: http://svn.freebsd.org/changeset/base/228934 Log: Prefer ASCII apostrophes over Unicode ones like the rest of the file. Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Wed Dec 28 17:45:26 2011 (r228933) +++ head/games/fortune/datfiles/fortunes Wed Dec 28 19:37:03 2011 (r228934) @@ -4699,7 +4699,7 @@ the soul. Worry, doubt, self-distrust, long, long years that bow the head and turn the growing spirit back to dust. - Whether seventy or sixteen, there is in every being’s heart a + Whether seventy or sixteen, there is in every being's heart a love of wonder; the sweet amazement at the stars and starlike things and thoughts; the undaunted challenge of events, the unfailing childlike appetite for what comes next, and the joy in the game of life. From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 19:59:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9594D106564A; Wed, 28 Dec 2011 19:59:55 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83DCF8FC14; Wed, 28 Dec 2011 19:59:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSJxtBd023032; Wed, 28 Dec 2011 19:59:55 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSJxtch023028; Wed, 28 Dec 2011 19:59:55 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112281959.pBSJxtch023028@svn.freebsd.org> From: Alan Cox Date: Wed, 28 Dec 2011 19:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228935 - in head/sys: amd64/amd64 i386/i386 i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 19:59:55 -0000 Author: alc Date: Wed Dec 28 19:59:54 2011 New Revision: 228935 URL: http://svn.freebsd.org/changeset/base/228935 Log: Fix a bug in the Xen pmap's implementation of pmap_extract_and_hold(): If the page lock acquisition is retried, then the underlying thread is not unpinned. Wrap nearby lines that exceed 80 columns. Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/i386/xen/pmap.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Wed Dec 28 19:37:03 2011 (r228934) +++ head/sys/amd64/amd64/pmap.c Wed Dec 28 19:59:54 2011 (r228935) @@ -1255,8 +1255,8 @@ retry: if (pdep != NULL && (pde = *pdep)) { if (pde & PG_PS) { if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) { - if (vm_page_pa_tryrelock(pmap, (pde & PG_PS_FRAME) | - (va & PDRMASK), &pa)) + if (vm_page_pa_tryrelock(pmap, (pde & + PG_PS_FRAME) | (va & PDRMASK), &pa)) goto retry; m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) | (va & PDRMASK)); @@ -1266,7 +1266,8 @@ retry: pte = *pmap_pde_to_pte(pdep, va); if ((pte & PG_V) && ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, &pa)) + if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, + &pa)) goto retry; m = PHYS_TO_VM_PAGE(pte & PG_FRAME); vm_page_hold(m); Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Wed Dec 28 19:37:03 2011 (r228934) +++ head/sys/i386/i386/pmap.c Wed Dec 28 19:59:54 2011 (r228935) @@ -1368,8 +1368,8 @@ retry: if (pde != 0) { if (pde & PG_PS) { if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) { - if (vm_page_pa_tryrelock(pmap, (pde & PG_PS_FRAME) | - (va & PDRMASK), &pa)) + if (vm_page_pa_tryrelock(pmap, (pde & + PG_PS_FRAME) | (va & PDRMASK), &pa)) goto retry; m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) | (va & PDRMASK)); @@ -1381,7 +1381,8 @@ retry: pmap_pte_release(ptep); if (pte != 0 && ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, &pa)) + if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, + &pa)) goto retry; m = PHYS_TO_VM_PAGE(pte & PG_FRAME); vm_page_hold(m); Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Wed Dec 28 19:37:03 2011 (r228934) +++ head/sys/i386/xen/pmap.c Wed Dec 28 19:59:54 2011 (r228935) @@ -1134,8 +1134,8 @@ retry: if (pde != 0) { if (pde & PG_PS) { if ((pde & PG_RW) || (prot & VM_PROT_WRITE) == 0) { - if (vm_page_pa_tryrelock(pmap, (pde & PG_PS_FRAME) | - (va & PDRMASK), &pa)) + if (vm_page_pa_tryrelock(pmap, (pde & + PG_PS_FRAME) | (va & PDRMASK), &pa)) goto retry; m = PHYS_TO_VM_PAGE((pde & PG_PS_FRAME) | (va & PDRMASK)); @@ -1148,8 +1148,11 @@ retry: PT_SET_MA(PADDR1, 0); if ((pte & PG_V) && ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { - if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, &pa)) + if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, + &pa)) { + sched_unpin(); goto retry; + } m = PHYS_TO_VM_PAGE(pte & PG_FRAME); vm_page_hold(m); } From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 20:27:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A17A106564A; Wed, 28 Dec 2011 20:27:19 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 292018FC08; Wed, 28 Dec 2011 20:27:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSKRJE0023945; Wed, 28 Dec 2011 20:27:19 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSKRIAN023943; Wed, 28 Dec 2011 20:27:18 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112282027.pBSKRIAN023943@svn.freebsd.org> From: Alan Cox Date: Wed, 28 Dec 2011 20:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228936 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 20:27:19 -0000 Author: alc Date: Wed Dec 28 20:27:18 2011 New Revision: 228936 URL: http://svn.freebsd.org/changeset/base/228936 Log: Optimize vm_object_split()'s handling of reservations. Modified: head/sys/vm/vm_object.c Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Wed Dec 28 19:59:54 2011 (r228935) +++ head/sys/vm/vm_object.c Wed Dec 28 20:27:18 2011 (r228936) @@ -1323,6 +1323,21 @@ retry: VM_OBJECT_LOCK(new_object); goto retry; } +#if VM_NRESERVLEVEL > 0 + /* + * If some of the reservation's allocated pages remain with + * the original object, then transferring the reservation to + * the new object is neither particularly beneficial nor + * particularly harmful as compared to leaving the reservation + * with the original object. If, however, all of the + * reservation's allocated pages are transferred to the new + * object, then transferring the reservation is typically + * beneficial. Determining which of these two cases applies + * would be more costly than unconditionally renaming the + * reservation. + */ + vm_reserv_rename(m, new_object, orig_object, offidxstart); +#endif vm_page_lock(m); vm_page_rename(m, new_object, idx); vm_page_unlock(m); From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 21:29:16 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74EE4106566B; Wed, 28 Dec 2011 21:29:16 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id 521568FC08; Wed, 28 Dec 2011 21:29:15 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id D91B756172; Wed, 28 Dec 2011 15:11:33 -0600 (CST) Date: Wed, 28 Dec 2011 15:11:33 -0600 From: Mark Linimon To: Ulrich =?iso-8859-1?Q?Sp=F6rlein?= , Doug Barton , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Message-ID: <20111228211133.GA2731@lonesome.com> References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> <20111228154049.GD83814@acme.spoerlein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20111228154049.GD83814@acme.spoerlein.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 21:29:16 -0000 On Wed, Dec 28, 2011 at 04:40:49PM +0100, Ulrich Spörlein wrote: > It's better to have one person > (Xin LI) figure out if the change is needed or a no-op and do the > upgrade to match our version to upstream's version, than to have a > discrepancy between the two and cause half a dozen developers that > stumble upon that difference to scratch their heads and spend time in > figuring out if we should import the change. We already have the following wiki page: http://wiki.freebsd.org/PortsNotUpgraded Perhaps an analagous page for src would be helpful? mcl From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 22:09:10 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id D783E106566B; Wed, 28 Dec 2011 22:09:10 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 5491A14EFB1; Wed, 28 Dec 2011 22:09:10 +0000 (UTC) Message-ID: <4EFB9386.8060909@FreeBSD.org> Date: Wed, 28 Dec 2011 14:09:10 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> <20111228154049.GD83814@acme.spoerlein.net> In-Reply-To: <20111228154049.GD83814@acme.spoerlein.net> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 22:09:10 -0000 On 12/28/2011 07:40, Ulrich Spörlein wrote: > On Mon, 2011-12-26 at 01:14:28 -0800, Doug Barton wrote: >> On 12/26/2011 01:07, Xin LI wrote: >>> Author: delphij >>> Date: Mon Dec 26 09:07:08 2011 >>> New Revision: 228896 >>> URL: http://svn.freebsd.org/changeset/base/228896 >>> >>> Log: >>> Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not >>> apply to us). >> >> When I'm importing stat(1) stuff from Net/OpenBSD I don't do this. I >> will however comment in the commit log for the next substantive change, >> "Skipped update N.NN because the change was not relevant to us," or >> words to that effect. >> >> I'm not suggesting that my way of doing this is perfect, or cannot be >> improved. I would suggest however that this change was needless churn. > > I think it was the right thing to do. It's better to have one person > (Xin LI) figure out if the change is needed or a no-op and do the > upgrade to match our version to upstream's version, than to have a > discrepancy between the two and cause half a dozen developers that > stumble upon that difference to scratch their heads and spend time in > figuring out if we should import the change. Fair enough. Having thought more about this my only remaining concern is that by slipping the tag we're misrepresenting the status quo since what's in our tree is not really that version of the file. Perhaps a comment to the effect of "purposely skipping version 1.23 because ..." would be better? Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 22:10:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC8681065675; Wed, 28 Dec 2011 22:10:12 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB9E68FC08; Wed, 28 Dec 2011 22:10:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSMACvP026983; Wed, 28 Dec 2011 22:10:12 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSMACIg026981; Wed, 28 Dec 2011 22:10:12 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112282210.pBSMACIg026981@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 28 Dec 2011 22:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228937 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 22:10:12 -0000 Author: jilles Date: Wed Dec 28 22:10:12 2011 New Revision: 228937 URL: http://svn.freebsd.org/changeset/base/228937 Log: sh: Do not force special builtins non-special in optimized command subst. This is not necessary: errors are already caught in evalbackcmd() and forcelocal handles changes to variables. Note that this depends on r223024. MFC after: 4 weeks Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Wed Dec 28 20:27:18 2011 (r228936) +++ head/bin/sh/eval.c Wed Dec 28 22:10:12 2011 (r228937) @@ -978,7 +978,6 @@ evalcommand(union node *cmd, int flags, memout.nextc = memout.buf; memout.bufsize = 64; mode |= REDIR_BACKQ; - cmdentry.special = 0; } savecmdname = commandname; savetopfile = getcurrentfile(); @@ -999,7 +998,7 @@ evalcommand(union node *cmd, int flags, * If there is no command word, redirection errors should * not be fatal but assignment errors should. */ - if (argc == 0 && !(flags & EV_BACKCMD)) + if (argc == 0) cmdentry.special = 1; listsetvar(cmdenviron, cmdentry.special ? 0 : VNOSET); if (argc > 0) From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 22:18:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E60BE106564A; Wed, 28 Dec 2011 22:18:55 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4AB08FC13; Wed, 28 Dec 2011 22:18:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSMIt6P027294; Wed, 28 Dec 2011 22:18:55 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSMIsPB027292; Wed, 28 Dec 2011 22:18:54 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <201112282218.pBSMIsPB027292@svn.freebsd.org> From: Doug Barton Date: Wed, 28 Dec 2011 22:18:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228938 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 22:18:56 -0000 Author: dougb Date: Wed Dec 28 22:18:53 2011 New Revision: 228938 URL: http://svn.freebsd.org/changeset/base/228938 Log: 1. Correct capitalization of the nobility particle for Francois de La Rochefoucauld introduced in r228909 [1],[2] 2. Change c-cedilla introduced in the same commit to ASCII c since non-UTF-8 terminals will choke on the non-ASCII text. [2],[3] Pointed out by: bf [1] Reviewed by: French-speakers on #bsdcode [2] Requested by: uqs [3] Modified: head/games/fortune/datfiles/fortunes Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Wed Dec 28 22:10:12 2011 (r228937) +++ head/games/fortune/datfiles/fortunes Wed Dec 28 22:18:53 2011 (r228938) @@ -8167,7 +8167,7 @@ Abscond, v.: % Absence diminishes mediocre passions and increases great ones, as the wind blows out candles and fans fires. - -- François De La Rochefoucauld + -- Francois de La Rochefoucauld % Absence in love is like water upon fire; a little quickens, but much extinguishes it. @@ -9115,7 +9115,7 @@ All the men on my staff can type. % All the passions make us commit faults; love makes us commit the most ridiculous ones. - -- François De La Rochefoucauld + -- Francois de La Rochefoucauld % All the really good ideas I ever had came to me while I was milking a cow. -- Grant Wood @@ -13744,7 +13744,7 @@ Computers will not be perfected until th than the estimate the job will cost. % Conceit causes more conversation than wit. - -- François De La Rochefoucauld + -- Francois de La Rochefoucauld % Concept, n.: Any "idea" for which an outside consultant billed you more than @@ -27582,7 +27582,7 @@ live?" % In the misfortune of our friends we find something that is not displeasing to us. - -- François De La Rochefoucauld, "Maxims" + -- Francois de La Rochefoucauld, "Maxims" % In the next world, you're on your own. % @@ -28538,7 +28538,7 @@ The main thing is to use it well. % It is not enough to have great qualities, we should also have the management of them. - -- François De La Rochefoucauld + -- Francois de La Rochefoucauld % It is not every question that deserves an answer. -- Publilius Syrus @@ -35780,7 +35780,7 @@ Old mail has arrived. % Old men are fond of giving good advice to console themselves for being no longer in a position to give bad examples. - -- François De La Rochefoucauld, "Maxims" + -- Francois de La Rochefoucauld, "Maxims" % Old Mother Hubbard went to the cupboard To fetch her poor daughter a dress. @@ -52478,7 +52478,7 @@ He who practices it will have neighbors. -- Confucius % Virtue would go far if vanity did not keep it company. - -- François De La Rochefoucauld + -- Francois de La Rochefoucauld % Visit beautiful Vergas Minnesota. % @@ -52949,7 +52949,7 @@ We gave you an atomic bomb, what do you -- I. I. Rabi to the Atomic Energy Commission % We give advice, but we cannot give the wisdom to profit by it. - -- François De La Rochefoucauld + -- Francois de La Rochefoucauld % We gotta get out of this place, If it's the last thing we ever do. @@ -53174,7 +53174,7 @@ children smart. % We only acknowledge small faults in order to make it appear that we are free from great ones. - -- François De La Rochefoucauld + -- Francois de La Rochefoucauld % We ought to be very grateful that we have tools. Millions of years ago people did not have them, and home projects were extremely difficult. From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 22:30:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id E50C2106564A; Wed, 28 Dec 2011 22:30:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 0A482157F59; Wed, 28 Dec 2011 22:30:29 +0000 (UTC) Message-ID: <4EFB9884.1000000@FreeBSD.org> Date: Wed, 28 Dec 2011 14:30:28 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201112282218.pBSMIsPB027292@svn.freebsd.org> In-Reply-To: <201112282218.pBSMIsPB027292@svn.freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: Re: svn commit: r228938 - head/games/fortune/datfiles X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 22:30:50 -0000 On 12/28/2011 14:18, Doug Barton wrote: > Reviewed by: French-speakers on #bsdcode [2] Blah, that's #bsdports. -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 22:49:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30359106564A; Wed, 28 Dec 2011 22:49:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4C98FC13; Wed, 28 Dec 2011 22:49:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSMnTRe028306; Wed, 28 Dec 2011 22:49:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSMnTZu028304; Wed, 28 Dec 2011 22:49:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201112282249.pBSMnTZu028304@svn.freebsd.org> From: Alexander Motin Date: Wed, 28 Dec 2011 22:49:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228939 - head/sys/dev/mps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 22:49:29 -0000 Author: mav Date: Wed Dec 28 22:49:28 2011 New Revision: 228939 URL: http://svn.freebsd.org/changeset/base/228939 Log: Set maximum I/O size for mps(4) to MAXPHYS. Looking into the code, I see no reason why it should be limited to 64K of DFLTPHYS. DMA data tag is any way set to allow MAXPHYS, S/G lists (chain elements) are sufficient and overflows are also handled. On my tests even 1MB I/Os are working fine. Reviewed by: ken@ Modified: head/sys/dev/mps/mps_sas.c Modified: head/sys/dev/mps/mps_sas.c ============================================================================== --- head/sys/dev/mps/mps_sas.c Wed Dec 28 22:18:53 2011 (r228938) +++ head/sys/dev/mps/mps_sas.c Wed Dec 28 22:49:28 2011 (r228939) @@ -937,6 +937,7 @@ mpssas_action(struct cam_sim *sim, union cpi->transport_version = 0; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_SPC; + cpi->maxio = MAXPHYS; cpi->ccb_h.status = CAM_REQ_CMP; break; } From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 22:52:08 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4A08106566C; Wed, 28 Dec 2011 22:52:08 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3C3A08FC16; Wed, 28 Dec 2011 22:52:08 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBSMq6ZL024616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 28 Dec 2011 23:52:07 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325112727; bh=aZE2v31D82wRSaEqMN8Zc3JSM1nQk8kPPEEWoo0xFcc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=Rswoq8tyDA+yJl/wX4N7bBXAZAPD7+sUGuMB6VVQdU1wyUpcTC0mYYpioWjyS47fs IgF3DL2blMkjBHudPNETY9WocTa2toPVoC7KgazUIzFf49lKC81nYRKlPdGzu1DHeU iXo+upBKfjmOVNRNvkc1NxCc8fjRnEAZqsGY7h0o= Date: Wed, 28 Dec 2011 23:52:06 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Mark Linimon Message-ID: <20111228225206.GG83814@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Mark Linimon , Doug Barton , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> <20111228154049.GD83814@acme.spoerlein.net> <20111228211133.GA2731@lonesome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20111228211133.GA2731@lonesome.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Doug Barton , Xin LI , src-committers@FreeBSD.org Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 22:52:08 -0000 On Wed, 2011-12-28 at 15:11:33 -0600, Mark Linimon wrote: > On Wed, Dec 28, 2011 at 04:40:49PM +0100, Ulrich Spörlein wrote: > > It's better to have one person > > (Xin LI) figure out if the change is needed or a no-op and do the > > upgrade to match our version to upstream's version, than to have a > > discrepancy between the two and cause half a dozen developers that > > stumble upon that difference to scratch their heads and spend time in > > figuring out if we should import the change. > > We already have the following wiki page: > > http://wiki.freebsd.org/PortsNotUpgraded > > Perhaps an analagous page for src would be helpful? > > mcl We have http://wiki.freebsd.org/ContribSoftware that tries to track the state of anything upstream in src. Maintainers are encouraged to add notes to their entries if there are reasons the software is kept at a lower version or whatever. See also the section for GPLv3'ed software on that page. Cheers, Uli From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:00:10 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id D4202106564A; Wed, 28 Dec 2011 23:00:08 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 6CBF314D9AC; Wed, 28 Dec 2011 23:00:08 +0000 (UTC) Message-ID: <4EFB9F77.7060309@FreeBSD.org> Date: Wed, 28 Dec 2011 15:00:07 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= , Mark Linimon , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> <20111228154049.GD83814@acme.spoerlein.net> <20111228211133.GA2731@lonesome.com> <20111228225206.GG83814@acme.spoerlein.net> In-Reply-To: <20111228225206.GG83814@acme.spoerlein.net> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:00:10 -0000 On 12/28/2011 14:52, Ulrich Spörlein wrote: > We have > > http://wiki.freebsd.org/ContribSoftware > > that tries to track the state of anything upstream in src. I've been maintaining BIND in the base for 9 1/2 years, and never knew about that page ... the wiki is a good tool for some things, but IMO this kind of information needs to be in the src tree where it is easily available, archived for the future, etc. Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:00:58 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7FC1A1065672; Wed, 28 Dec 2011 23:00:58 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 2F0888FC15; Wed, 28 Dec 2011 23:00:58 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBSN0vSw024858 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 29 Dec 2011 00:00:57 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325113257; bh=MFrYJH7c00ptMOOxhZvLmydfF5Zs1v997SN8UvVCooE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=O4K5AVBRvfpRzGZJvOuiQAY3J77Op5gK2XkbcEFk/oDh7GyTuPNxFniQZ12hPpo3j su5dCAaaECVk38l0pQ6U7UCPSfAOE7UhelLAyIyUjFBU+r/RwVmxyNsLdgEHuPTt9/ E+8ee+HfPeW1Aaw1yOM1n4bdk76ExoA1+KibDezA= Date: Thu, 29 Dec 2011 00:00:57 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Doug Barton Message-ID: <20111228230056.GH83814@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Doug Barton , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> <20111228154049.GD83814@acme.spoerlein.net> <4EFB9386.8060909@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4EFB9386.8060909@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:00:58 -0000 On Wed, 2011-12-28 at 14:09:10 -0800, Doug Barton wrote: > On 12/28/2011 07:40, Ulrich Spörlein wrote: > > On Mon, 2011-12-26 at 01:14:28 -0800, Doug Barton wrote: > >> On 12/26/2011 01:07, Xin LI wrote: > >>> Author: delphij > >>> Date: Mon Dec 26 09:07:08 2011 > >>> New Revision: 228896 > >>> URL: http://svn.freebsd.org/changeset/base/228896 > >>> > >>> Log: > >>> Merge from OpenBSD 5.0 (this is a dummy change, the vendor change does not > >>> apply to us). > >> > >> When I'm importing stat(1) stuff from Net/OpenBSD I don't do this. I > >> will however comment in the commit log for the next substantive change, > >> "Skipped update N.NN because the change was not relevant to us," or > >> words to that effect. > >> > >> I'm not suggesting that my way of doing this is perfect, or cannot be > >> improved. I would suggest however that this change was needless churn. > > > > I think it was the right thing to do. It's better to have one person > > (Xin LI) figure out if the change is needed or a no-op and do the > > upgrade to match our version to upstream's version, than to have a > > discrepancy between the two and cause half a dozen developers that > > stumble upon that difference to scratch their heads and spend time in > > figuring out if we should import the change. > > Fair enough. Having thought more about this my only remaining concern is > that by slipping the tag we're misrepresenting the status quo since > what's in our tree is not really that version of the file. Perhaps a > comment to the effect of "purposely skipping version 1.23 because ..." > would be better? I always look at the CVS Ids from other projects as some kind of guideline or high water mark as to when someone has last looked at all the upstream changes and possibly brought over all the changes that apply. I mean the files are never guaranteed to be the *exact* revision 1.23 from OpenBSD, due to FreeBSD specific changes. Should every committer changing a file look for CVS Ids of other projects and then remove them as the file is being altered and no longer matches upstream bit for bit? That surely is impractical, of course no one would propose such a scheme. Adding that information to the commit message is prudent, however. In the end, whoever gets shit done is getting shit done :) Cheers, Uli From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:03:37 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEB4910657A1; Wed, 28 Dec 2011 23:03:37 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 5457B8FC14; Wed, 28 Dec 2011 23:03:37 +0000 (UTC) Received: from localhost (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBSN3ajX024945 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 29 Dec 2011 00:03:36 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325113416; bh=Fqu/uRfwj+SLVnK3vrlqSnW6YwzP26RpcSgGw6xRLJY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=LPzvz3pyurNx3cFHpe1ZkhPbRz9QovLFFPJ7Xp950wrIRGyARU6tf4C269L9h8W6h e3/AZw2bNLBsUgxkyPhaqdNc/k1Tekzg3hfqUXaT89e4o0p4CTD1wGf2Y45g1lcsbt LzH7sQLBFOWXICYbkwiSVoxAA0fDrFKF5eicBmSw= Date: Thu, 29 Dec 2011 00:03:36 +0100 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Doug Barton Message-ID: <20111228230336.GI83814@acme.spoerlein.net> Mail-Followup-To: Ulrich =?utf-8?B?U3DDtnJsZWlu?= , Doug Barton , Mark Linimon , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> <20111228154049.GD83814@acme.spoerlein.net> <20111228211133.GA2731@lonesome.com> <20111228225206.GG83814@acme.spoerlein.net> <4EFB9F77.7060309@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4EFB9F77.7060309@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, Mark Linimon , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:03:38 -0000 On Wed, 2011-12-28 at 15:00:07 -0800, Doug Barton wrote: > On 12/28/2011 14:52, Ulrich Spörlein wrote: > > > We have > > > > http://wiki.freebsd.org/ContribSoftware > > > > that tries to track the state of anything upstream in src. > > I've been maintaining BIND in the base for 9 1/2 years, and never knew > about that page ... the wiki is a good tool for some things, but IMO > this kind of information needs to be in the src tree where it is easily > available, archived for the future, etc. Agreed. It would make branching that information a whole lot easier! Any good ideas on how to implement this? It could be as simple as having all that information in /CONTRIB or something, similar to UPDATING or MAINTAINERS. Uli From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:09:01 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 9AD541065673; Wed, 28 Dec 2011 23:09:01 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 9AF0014DDB6; Wed, 28 Dec 2011 23:09:00 +0000 (UTC) Message-ID: <4EFBA18C.5060705@FreeBSD.org> Date: Wed, 28 Dec 2011 15:09:00 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= , Mark Linimon , Xin LI , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201112260907.pBQ979X4098221@svn.freebsd.org> <4EF83AF4.9010108@FreeBSD.org> <20111228154049.GD83814@acme.spoerlein.net> <20111228211133.GA2731@lonesome.com> <20111228225206.GG83814@acme.spoerlein.net> <4EFB9F77.7060309@FreeBSD.org> <20111228230336.GI83814@acme.spoerlein.net> In-Reply-To: <20111228230336.GI83814@acme.spoerlein.net> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: svn commit: r228896 - head/contrib/netcat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:09:01 -0000 On 12/28/2011 15:03, Ulrich Spörlein wrote: > On Wed, 2011-12-28 at 15:00:07 -0800, Doug Barton wrote: >> On 12/28/2011 14:52, Ulrich Spörlein wrote: >> >>> We have >>> >>> http://wiki.freebsd.org/ContribSoftware >>> >>> that tries to track the state of anything upstream in src. >> >> I've been maintaining BIND in the base for 9 1/2 years, and never knew >> about that page ... the wiki is a good tool for some things, but IMO >> this kind of information needs to be in the src tree where it is easily >> available, archived for the future, etc. > > Agreed. It would make branching that information a whole lot easier! > > Any good ideas on how to implement this? It could be as simple as having > all that information in /CONTRIB or something, similar to UPDATING or > MAINTAINERS. Well I still think a comment in the code, next to the foreign repo Id would be the easiest way. In svn-world we tend to keep FREEBSD-Upgrade files in $REPO/vendor/foo/dist/ rather than in src/contrib, otherwise that might be a useful alternative. Doug -- You can observe a lot just by watching. -- Yogi Berra Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:26:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AA78106564A; Wed, 28 Dec 2011 23:26:58 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75E4A8FC08; Wed, 28 Dec 2011 23:26:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSNQwU7029495; Wed, 28 Dec 2011 23:26:58 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSNQwDB029486; Wed, 28 Dec 2011 23:26:58 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201112282326.pBSNQwDB029486@svn.freebsd.org> From: Xin LI Date: Wed, 28 Dec 2011 23:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228940 - in head: share/man/man4 sys/amd64/conf sys/conf sys/dev/hpt27xx sys/i386/conf sys/modules sys/modules/hpt27xx X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:26:58 -0000 Author: delphij Date: Wed Dec 28 23:26:58 2011 New Revision: 228940 URL: http://svn.freebsd.org/changeset/base/228940 Log: Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver. This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms. Many thanks to HighPoint for providing this driver. MFC after: 2 weeks Added: head/share/man/man4/hpt27xx.4 (contents, props changed) head/sys/dev/hpt27xx/ head/sys/dev/hpt27xx/README (contents, props changed) head/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu (contents, props changed) head/sys/dev/hpt27xx/array.h (contents, props changed) head/sys/dev/hpt27xx/him.h (contents, props changed) head/sys/dev/hpt27xx/himfuncs.h (contents, props changed) head/sys/dev/hpt27xx/hpt27xx_config.c (contents, props changed) head/sys/dev/hpt27xx/hpt27xx_config.h (contents, props changed) head/sys/dev/hpt27xx/hptintf.h (contents, props changed) head/sys/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu (contents, props changed) head/sys/dev/hpt27xx/ldm.h (contents, props changed) head/sys/dev/hpt27xx/list.h (contents, props changed) head/sys/dev/hpt27xx/os_bsd.c (contents, props changed) head/sys/dev/hpt27xx/os_bsd.h (contents, props changed) head/sys/dev/hpt27xx/osm.h (contents, props changed) head/sys/dev/hpt27xx/osm_bsd.c (contents, props changed) head/sys/dev/hpt27xx/wj.h (contents, props changed) head/sys/modules/hpt27xx/ head/sys/modules/hpt27xx/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/amd64/conf/NOTES head/sys/conf/files.amd64 head/sys/conf/files.i386 head/sys/i386/conf/NOTES head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Wed Dec 28 22:49:28 2011 (r228939) +++ head/share/man/man4/Makefile Wed Dec 28 23:26:58 2011 (r228940) @@ -150,6 +150,7 @@ MAN= aac.4 \ hifn.4 \ hme.4 \ hpet.4 \ + ${_hpt27xx.4} \ ${_hptiop.4} \ ${_hptmv.4} \ ${_hptrr.4} \ @@ -687,6 +688,7 @@ _atp.4= atp.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 +_hpt27xx.4= hpt27xx.4 _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptrr.4= hptrr.4 Added: head/share/man/man4/hpt27xx.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/hpt27xx.4 Wed Dec 28 23:26:58 2011 (r228940) @@ -0,0 +1,101 @@ +.\" +.\" Copyright (c) 2011 iXsystems, 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 DEVELOPERS ``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 DEVELOPERS 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 December 28, 2011 +.Dt HPT27XX 4 +.Os +.Sh NAME +.Nm hpt27xx +.Nd "HighPoint RocketRAID 27xx SAS 6Gb/s HBA card driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device hpt27xx" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hpt27xx_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for HighPoint's RocketRAID 27xx based RAID controller. +.Pp +These devices support SAS disk drives +and provide RAID0 (striping), RAID1 (mirroring), and RAID5 functionality. +.Sh HARDWARE +The +.Nm +driver supports the following SAS +controllers: +.Pp +.Bl -bullet -compact +.It +HighPoint's RocketRAID 271x series +.It +HighPoint's RocketRAID 272x series +.It +HighPoint's RocketRAID 274x series +.It +HighPoint's RocketRAID 276x series +.It +HighPoint's RocketRAID 278x series +.El +.Sh NOTES +The +.Nm +driver only works on the i386 and amd64 platforms as it requires a binary +blob object from the manufacturer which they only supply for these platforms. +The +.Nm +driver does +.Em not +work on i386 with +.Xr pae 4 +enabled. +.Sh SEE ALSO +.Xr kld 4 , +.Xr kldload 8 , +.Xr loader 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +device driver was written by +.An HighPoint Technologies, Inc. . +This manual page was written by +.An Xin LI Aq delphij@FreeBSD.org +for iXsystems, Inc. Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Wed Dec 28 22:49:28 2011 (r228939) +++ head/sys/amd64/conf/NOTES Wed Dec 28 23:26:58 2011 (r228940) @@ -388,6 +388,10 @@ device aac device aacp # SCSI Passthrough interface (optional, CAM required) # +# Highpoint RocketRAID 27xx. +device hpt27xx + +# # Highpoint RocketRAID 182x. device hptmv Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Wed Dec 28 22:49:28 2011 (r228939) +++ head/sys/conf/files.amd64 Wed Dec 28 23:26:58 2011 (r228940) @@ -58,6 +58,10 @@ os+%DIKED-nve.h optional nve pci \ no-implicit-rule no-obj before-depend \ clean "os+%DIKED-nve.h" # +hpt27xx_lib.o optional hpt27xx \ + dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ + compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ + no-implicit-rule hptmvraid.o optional hptmv \ dependency "$S/dev/hptmv/amd64-elf.raid.o.uu" \ compile-with "uudecode < $S/dev/hptmv/amd64-elf.raid.o.uu" \ @@ -187,6 +191,9 @@ dev/fdc/fdc.c optional fdc dev/fdc/fdc_acpi.c optional fdc dev/fdc/fdc_isa.c optional fdc isa dev/fdc/fdc_pccard.c optional fdc pccard +dev/hpt27xx/os_bsd.c optional hpt27xx +dev/hpt27xx/osm_bsd.c optional hpt27xx +dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv dev/hptmv/gui_lib.c optional hptmv Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Wed Dec 28 22:49:28 2011 (r228939) +++ head/sys/conf/files.i386 Wed Dec 28 23:26:58 2011 (r228940) @@ -57,6 +57,10 @@ os+%DIKED-nve.h optional nve pci \ no-implicit-rule no-obj before-depend \ clean "os+%DIKED-nve.h" # +hpt27xx_lib.o optional hpt27xx \ + dependency "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ + compile-with "uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ + no-implicit-rule hptmvraid.o optional hptmv \ dependency "$S/dev/hptmv/i386-elf.raid.o.uu" \ compile-with "uudecode < $S/dev/hptmv/i386-elf.raid.o.uu" \ @@ -174,6 +178,9 @@ dev/fe/if_fe_isa.c optional fe isa dev/glxiic/glxiic.c optional glxiic dev/glxsb/glxsb.c optional glxsb dev/glxsb/glxsb_hash.c optional glxsb +dev/hpt27xx/os_bsd.c optional hpt27xx +dev/hpt27xx/osm_bsd.c optional hpt27xx +dev/hpt27xx/hpt27xx_config.c optional hpt27xx dev/hptmv/entry.c optional hptmv dev/hptmv/mv.c optional hptmv dev/hptmv/gui_lib.c optional hptmv Added: head/sys/dev/hpt27xx/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hpt27xx/README Wed Dec 28 23:26:58 2011 (r228940) @@ -0,0 +1,196 @@ +RocketRAID Controller Driver for FreeBSD +Copyright (C) 2011 HighPoint Technologies, Inc. All rights reserved. + +############################################################################# +Revision History: + v1.0 2011-12-27 + First source code release + +############################################################################# + +1. Overview +--------------------- + This package contains FreeBSD driver source code for HighPoint RocketRAID + controller, include: + SAS Controller: RR271x, RR272x, RR274x, RR276x, RR278x. + + NO WARRANTY + + THE DRIVER SOURCE CODE HIGHPOINT PROVIDED IS FREE OF CHARGE, AND THERE IS + NO WARRANTY FOR THE PROGRAM. THERE ARE NO RESTRICTIONS ON THE USE OF THIS + FREE SOURCE CODE. HIGHPOINT DOES NOT PROVIDE ANY TECHNICAL SUPPORT IF THE + CODE HAS BEEN CHANGED FROM ORIGINAL SOURCE CODE. + + LIMITATION OF LIABILITY + + IN NO EVENT WILL HIGHPOINT BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, + INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF OR + INABILITY TO USE THIS PRODUCT OR DOCUMENTATION, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. IN PARTICULAR, HIGHPOINT SHALL NOT HAVE + LIABILITY FOR ANY HARDWARE, SOFTWARE, OR DATA STORED USED WITH THE + PRODUCT, INCLUDING THE COSTS OF REPAIRING, REPLACING, OR RECOVERING + SUCH HARDWARE, OR DATA. + + +2. Rebuild the kernel with HighPoint RocketRAID support +----------------------------------------------- + + 1) Install kernel source package and building tools. + + 2) Extract the driver files under the kernel source tree: + + # cd /usr/src/sys/ + # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz + + 3) Update the kernel configuration file to include the HighPoint source. + Assume the configure file is GENERIC, and new kernel configure file is + MYKERNEL: + + # cd i386/conf (or amd64/conf for AMD64) + # cp GENERIC MYKERNEL + + 4) Edit MYKERNEL, and add the following line under "RAID controllers + interfaced to the SCSI subsystem": + + device "hpt27xx" #HighPoint RocketRAID + + 5) For i386 system, edit /usr/src/sys/conf/files.i386 and append the lines + shown below: + + hpt27xx_lib.o optional hpt27xx \ + dependency "$S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ + compile-with "uudecode < $S/dev/hpt27xx/i386-elf.hpt27xx_lib.o.uu" \ + no-implicit-rule + + dev/hpt27xx/os_bsd.c optional hpt27xx + dev/hpt27xx/osm_bsd.c optional hpt27xx + dev/hpt27xx/hpt27xx_config.c optional hpt27xx + + For amd64 system, edit /usr/src/sys/conf/files.amd64 and append the lines + shown below: + + hpt27xx_lib.o optional hpt27xx \ + dependency "$S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ + compile-with "uudecode < $S/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu" \ + no-implicit-rule + + dev/hpt27xx/os_bsd.c optional hpt27xx + dev/hpt27xx/osm_bsd.c optional hpt27xx + dev/hpt27xx/hpt27xx_config.c optional hpt27xx + + 6) Rebuild and install the kernel: + + a) for FreeBSD 5.x-i386/6.x-i386/7.x-i386/8.x-i386/9.x-i386: + + # cd /usr/src/sys/i386/conf/ + # /usr/sbin/config MYKERNEL + # cd ../compile/MYKERNEL/ + # make depend + # make + # make install + + b) for FreeBSD 5.x-amd64/6.x-amd64/7.x-amd64/8.x-amd64/9.x-amd64: + + # cd /usr/src/sys/amd64/conf/ + # /usr/sbin/config MYKERNEL + # cd ../compile/MYKERNEL/ + # make depend + # make + # make install + + c) for FreeBSD 4.x: + + # cd /usr/src/sys/i386/conf/ + # /usr/sbin/config MYKERNEL + # cd ../../compile/MYKERNEL/ + # make depend + # make + # make install + + If the driver was previously configured as an auto-loaded module by + /boot/defaults/loader.conf, please remove the entry hpt27xx_load="YES" + from loader.conf to prevent the driver from being loaded twice. + + 7) Reboot from the new kernel. + + +3. Build/Load the driver as a kernel module +------------------------------------------------ + + 1) Install kernel source package and building tools. + + 2) Extract the driver files under the kernel source tree: + + # cd /usr/src/sys/ + # tar xvzf /your/path/to/hpt27xx-freebsd-src-v1.0-111227.tgz + + + 4) Build the driver module: + + # cd modules/hpt27xx + # make + + 5) Copy the driver module to the kernel module directory + + For FreeBSD 4.x: + + # cp hpt27xx.ko /modules/ + + For FreeBSD 5.x/6.x/7.x/8.x/9.x: + + # cp hpt27xx.ko /boot/kernel/ + + 6) Reboot and load the driver under loader prompt. e.g: + + BTX loader 1.00 BTX version is 1.01 + Console: internal video/keyboard + BIOS driver A: is disk0 + BIOS driver C: is disk2 + BIOS 636kB/74512kB available memory + + FreeBSD/i386 bootstrap loader, Revision 0.8 + (mailto:jkh@narf.osd.bsdi.com, Sat Apr 21 08:46:19 GMT 2001) + Loading /boot/defaults/loader.conf + /kernel text=0x24f1db data=0x3007ec+0x2062c - + + Hit [Enter] to boot immediagely, or any other key for command prompt. + Booting [kernel] in 9 seconds¡­ + + <-- press SPACE key here + Type '?' for a list of commands, 'help' for more detailed help. + ok load hpt27xx + /modules/hpt27xx.ko text=0xf571 data=0x2c8+0x254 + ok boot + + For FreeBSD 5.x/6.x/7.x/8.x/9.x, you can select 6 on the boot menu to get a loader + prompt. + + 7) You can add a below line into /boot/defaults/loader.conf to load the + driver automatically: + + hpt27xx_load="YES" + + Please refer to the installation guide in HighPoint FreeBSD driver release + package for more information. + + +############################################################################# +Technical support and service + + If you have questions about installing or using your HighPoint product, + check the user's guide or readme file first, and you will find answers to + most of your questions here. If you need further assistance, please + contact us. We offer the following support and information services: + + 1) The HighPoint Web Site provides information on software upgrades, + answers to common questions, and other topics. The Web Site is + available from Internet 24 hours a day, 7 days a week, at + http://www.highpoint-tech.com. + + 2) For technical support, send e-mail to support@highpoint-tech.com + + NOTE: Before you send an e-mail, please visit our Web Site + (http://www.highpoint-tech.com) to check if there is a new or + updated device driver for your system. + +$FreeBSD$ Added: head/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/hpt27xx/amd64-elf.hpt27xx_lib.o.uu Wed Dec 28 23:26:58 2011 (r228940) @@ -0,0 +1,22893 @@ +begin 644 hpt27xx_lib.o +M?T5,1@(!`0D```````````$`/@`!`````````````````````````(A^"@`` +M`````````$```````$``$``-`,8'",9'`1)`@/X!&<#WT(/@!(A'`L9'`P#& +M1P0`QD<%`,9'!@#&1P<`QD<(`,9'"0#&1PH`QD<+`(#Z`1G`@^`@B$<,QD<- +M`,9'#@#&1P\`QD<0`,9'$0#&1Q(`QD<3`+@4````PV9F9I!F9I!F9I!(@^PX +M2(E<)`A(B6PD$$R)9"083(EL)"!,B70D*$R)?"0P28G_2(GU08G608G-Z``` +M``!)B<2X`````$V%Y`^$HP```$F+7"0000^VU4$/MO9(C7L$Z`````!!B<7& +M`P#&0P$`QD,"`,9#`P!(B>Y,B?_H`````+D`````NA````!(C44XB`A(_\!( +M_\IU]D&-103&13@5QD4Y$8A%/,9%/0!(C5U81`^VZ$2);33'A90````````` +M28M$)!!(B45(3(EE>+X`````2(G?Z`````!)BW0D&$2)ZDB)W^@`````N`$` +M``!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0XPY"0D)"0D$&) +M\&:)=PC&1PX`9L='#```O@````!F1#G&`^2\/E<"`^8\/E<(/ML"%P@^%S0$```^V1SB#^"\/A*X` +M``"#^"]_.8/X"G1[@_@*D'\.@_@(='#IA@$``&9F9I"#^"@/A(<```"#^"IF +M9F:0#X1Z````Z6D;`0`` +M#[9'.8/@'\'@$`^V5SK!X@@)T`^V5SL)T(G"#[9//.D%`0``9F:09I`/ME(8#[9'.\'@$`G"#[9'/,'@"`G"#[9'/0G"B=(/MD\_P>$(#[9'0`G!Z(8#[9'.\'@$`G"#[9'/,'@"`G"#[9'/0G"B=(/MD\^P>$8#[9' +M/\'@$`G!#[9'0,'@"`G!#[9'00G!Z8@```!(#[97.DC!XCA(#[9'.TC!X#!( +M"<)(#[9'/$C!X"A("<)(#[9'/4C!X"!("<)(#[9'/DC!X!A("<)(#[9'/TC! +MX!!("<)(#[9'0$C!X`A("<)(#[9'04@)P@^V3T+!X1@/MD=#P>`0"<$/MD=$ +MP>`("<$/MD=%"<'K#KH`````N0````!F9F:02(F7B````(F/D````&:#3R(! +M\\-F9F:09F9FD&9F9I!32(/L8$B)^T0/MD\[1`^V1SH/MD\Y#[97.`^V1T>) +M1"18#[9'1HE$)%`/MD=%B40D2`^V1T2)1"1`#[9'0XE$)#@/MD="B40D,`^V +M1T&)1"0H#[9'0(E$)"`/MD<_B40D&`^V1SZ)1"00#[9'/8E$)`@/MD<\B00D +M2(G^2,?'`````+@`````Z``````/MW,@2,?'`````+@`````Z`````!(@\1@ +M6\-F9F:09F9FD+K_____N0````!F.?%S(4G'P``````/M\$/M@0X,=`/ML#! +MZ@A!,Q2`_\%F.?%RYHG0PY"0D)"0D)"0D)"0D)!(BP>+D`0!``")%0````") +MT8'A?O_^_TB+!XF(!`$``(G1@>%^__+_2(M'"(D(2(M'"(E(#$B+1PB)2!!( +MBT<(B4@42(M'"(E(&$B+1PB)2`1(BP>+@%0!``")!0````")P8'A_@#__TB+ +M!XF(5`$``,-F9F:09F9FD&9FD&9FD%532(/L"(GS2(LO@_X#=AB-!-W@____ +MBX0HH`$``(D%`````(G!ZQB-!-T`````B<"+A"B``0``B04`````B<&#X?Z# +M^P-V$(T$W>#___^)C"B@`0``ZQ"-!-T`````B<")C"B``0``A-(/A*````"# +M^P-V&(T$G?#___^+A"C@`0``B04`````B<'K&(T$G0````")P(N$*-`!``") +M!0````")P8/)`H/[`W80C02=\/___XF,*.`!``#K$(T$G0````")P(F,*-`! +M``"-!)T`````C7#PB<)F9F:09F:0@_L#=A&+A"[@`0``B04`````B<'K#XN$ +M*M`!``")!0````")P?;!`G76Z94```"0@_L#=A2-!-W@____QX0H4`(````` +M``#K%(T$W0````")P,>$*%`"````````OQ`G``#H`````(/[`W88C03=X/__ +M_XN$*%0"``")!0````")P>L8C03=`````(G`BX0H5`(``(D%`````(G!@\D! +M@_L#=A"-!-W@____B8PH5`(``.L0C03=`````(G`B8PH5`(``$B#Q`A;7<-F +M9I!FD$%6055!5%5328G\08GU08G62(LONP````"`?SX`#X1.`@``1(GJ#[;" +MB=E(T_BH`0^$*P(``(/[`W88C03=X/___XN$**0!``")!0````")PNL8C03= +M`````(G`BX0HA`$``(D%`````(G"@^+^@_L#=A"-!-W@____B90HI`$``.L0 +MC03=`````(G`B90HA`$``+\0)P``Z`````!%A/8/A)H```"#^P-V&(T$G?#_ +M__^+A"C@`0``B04`````B<+K&(T$G0````")P(N$*-`!``")!0````")PH/* +M`H/[`W80C02=\/___XF4*.`!``#K$(T$G0````")P(F4*-`!``"-!)T````` +MC7#PB<&0@_L#=A&+A"[@`0``B04`````B<+K#XN$*=`!``")!0````")PO;" +M`G76Z94```"0@_L#=A2-!-W@____QX0H4`(```````#K%(T$W0````")P,>$ +M*%`"````````OQ`G``#H`````(/[`W88C03=X/___XN$*%0"``")!0````") +MPNL8C03=`````(G`BX0H5`(``(D%`````(G"@\H!@_L#=A"-!-W@____B90H +M5`(``.L0C03=`````(G`B90H5`(``(/[`W87C03=X/___\>$**`!```!```` +MZQ=F9I"-!-T`````B<#'A"B``0```0```(/[`W88C03=X/___XN$**0!``") +M!0````")PNL8C03=`````(G`BX0HA`$``(D%`````(G"@\H!@_L#=A"-!-W@ +M____B90HI`$``.L0C03=`````(G`B90HA`$``/_#00^V1"0^.=@/A[+]__]; +M74%<05U!7L-F9I!F9I")\4B+!XN`!`$``(D%`````$&)P`^W1SQF/8!D#Y3" +M9CV`D0^4P`G0J`%U"&:!?SR`E'42#[;)@\$(N`$```#3X$$)P.L10`^VSH/! +M#+@!````T^!!"+@`0! +M``")!0````!!B<`/MT<\9CV`9`^4PF8]@)$/E,`)T*@!=0AF@7\\@)1U$@^V +MR8/!"+C^____T\!!(<#K$4`/MLZ#P0RX_O___]/`02'`2(L'1(F`!`$``,-F +M9F:09F9FD&9FD&9FD$B#[!A(B5PD"$R)9"0028G\0`^VWHG>Z`````"_$"<` +M`.@`````B=Y,B>?H`````$B+7"0(3(MD)!!(@\08PY")\4"`_O]T>$"`_A]W +M-HN7&`$``(D5`````+@!````T^")P??0(=")AQ@!``"+AU@!``")!0`````A +MR'1#B8=8`0``PXN7'`$``(D5`````$`/MLZ#Z2"X`0```-/@B<'WT"'0B8<< +M`0``BX=@`0``B04`````($(``"```,`0``ZQQF9I!( +MC03=`````"7X!P``0L>$(``"```,`0``OQ`G``#H`````(#[`W8X2(T,W0`` +M``"!X?@'```/ME4#P>(8#[9%`L'@$`G"#[9%`<'@"`G"#[9%``G"0HF4(00" +M``#K-I!(C0S=`````('A^`<```^V50/!XA@/MD4"P>`0"<(/MD4!P>`("<(/ +MMD4`"<)"B90A!`(``(#[`W8;2(T$W0`````E^`<``$+'A"```@``$`$``.L9 +M2(T$W0`````E^`<``$+'A"```@``$`$``+\0)P``Z`````"`^P-V-TB-#-T` +M````@>'X!P``#[95!\'B&`^V10;!X!`)P@^V107!X`@)P@^V100)PD*)E"$$ +M`@``ZS5(C0S=`````('A^`<```^V50?!XA@/MD4&P>`0"<(/MD4%P>`("<(/ +MMD4$"<)"B90A!`(``%M=05S#D)!32(/L8$B)^P^W?SQ(C40D7DB)1"0X2(U$ +M)%Q(B40D,$B-1"1:2(E$)"A(C40D6$B)1"0@2(U$)%9(B40D&$B-1"152(E$ +M)!!(C40D5$B)1"0(2(U$)%)(B00D3(U,)%%,C40D3DB-3"1-2(U4)$Q(C70D +M2^@`````#[94)$L/MG0D3$B-?"1$Z`````!(#[94)$M(:=*(`0``2(MS($B- +MN_@(``"Y`0```.@`````2`^V5"1-2&G2T````$B+(#2(MS($B-NW`)``"Y`0```.@`````2`^W5"1.2&G2J````$B+(%2(MS($B-NY@*``"Y`0`` +M`.@`````2`^V5"152(T4DDC!X@5(BW,@2(V[P`H``+D!````Z`````!(#[=4 +M)%)(C1222,'B`TB+("2(MS($B-NS`1 +M``!!N`$```"Y!````.@`````#[94)%3!X@M(BW,@2(V[8!$``$&X`0```+D( +M````Z`````!(#[=4)%)(:=*,`0``2(MS($B!PY`1``!!N`$```"Y"````$B) +MW^@`````N`````!(@\1@6\-F9I!FD$%6055!5%532(/L8$F)_$&^`````,9' +M40#&1U``QD=/`$C'A_@3````````QH?Q$P```+D`````NJ`!``!(C8=`$@`` +MB`A(_\!(_\IU]DF-A"3H````28F$).@```!)B80D\````$F-A"3X````28F$ +M)/@```!)B80D``$``$F-A"0(`0``28F$)`@!``!)B80D$`$``$F-A"08`0`` +M28F$)!@!``!)B80D(`$``$F-A"0H`0``28F$)"@!``!)B80D,`$``$F-A"1( +M`0``28F$)$@!``!)B80D4`$``$F-A"18`0``28F$)%@!``!)B80D8`$``$F- +MA"0X`0``28F$)#@!``!)B80D0`$``$$/MWPD/$B-1"1>2(E$)#A(C40D7$B) +M1"0P2(U$)%I(B40D*$B-1"182(E$)"!(C40D5DB)1"082(U$)%5(B40D$$B- +M1"142(E$)`A(C40D4DB)!"1,C4PD44R-1"1.2(U,)$U(C50D3$B-="1+Z``` +M```/MD0D2T&(1"1&#[9$)$Q!B$0D1P^V1"1-08B$).$````/MT0D5F9!B40D +M6(M$)%QF08F$)#P2```/MT0D7O_(9D&)A"0^$@``00^W1"0\/8"1``!T"SV` +ME```#X4C"0``0<9$)$T$0<9$)$,$0<9$)$Y`0<9$)$P`0<:$)-X````)0<9$ +M)$0`28V\)/@(``#H`````$F)A"08"0``N0````!(#[94)$M(:=*(`0``ZPB( +M"$C_RDC_P$B%TG7S28V\)"`)``#H`````$F)A"1`"0``N0````!(#[94)$U( +M:=+0````2(72=`J("$C_P$C_RG7V28V\)$@)``#H`````$F)A"1H"0``N0`` +M``!(#[94)$Q(:=+(#P``2(72=`J("$C_P$C_RG7V28V\)'`)``#H`````$F) +MA"20"0``N0````!(#[=4)%9(P>(#=`J("$C_P$C_RG7V28V\)``*``#H```` +M`$F)A"0@"@``28V\)-@)``#H`````$F)A"3X"0``2(G#28V\)$@*``#H```` +M`$F)A"1H"@``2(G"O0````!F.VPD3G-$28V,)`@!``!(B5I@#[9$)%&(0EA( +MBT$(2(E1"$B)"DB)0@A(B1!(#[9$)%%(C01`2(T<@TB!PJ@```#_Q68[;"1. +MAWW4F-O"3`"@``Z`````!)B80DX`H` +M`$B)PKT`````@'PD50!T+DF-C"1(`0``2(M!"$B)40A(B0I(B4((2(D02('" +MH````/_%9@^V1"159CGH=]I)C;PDZ`H``.@`````28F$)`@+``!(B<*]```` +M`&8[;"12!QF!7``"Y`````(GR2(72=`J("$C_P$C_RG7V28N$)&@0 +M``"),$F+E"1H$```#[9$)$R(0@0/ME0D3$F+O"1H$```Z`````"]`````$&` +M?"0^`'1]#[?%2&G`J````$P!X$R-L*`!``!!B&X(0<9&"0!,B:"@`0``0<9& +M#@!!QD98`$'&1B@`0<>&H`````````!(C9#0`0``28E6,$F)5CA(C9#H`0`` +M28E62$F)5E!(!0`"``!)B49@28E&:$'&1@H"_\5F00^V1"0^9CGH=X-!QD0D +M3`"]``````^WQ4+&A"#&"```___%9H/]`W;LO0````"`?"1+``^$D`````^W +MS4F+E"08"0``2&G!B`$``,9$$$,!28N4)!@)``#&1!!"`$F+E"08"0``QD00 +M>/])BY0D&`D``,9$$&K_28N4)!@)``!FQX00P```````2<>$S$`$```````` +M2(G!20.,)!@)``!(C5$@2(E1($D#A"08"0``2(/`($B)0`C_Q68/MD0D2V8Y +MZ`^'@/AS[___]!QH0DWP```("] +M`````(!\)$T`#X2'````#[?528N$)$`)``!(:=+0````9L=$`DX$`$F+A"1` +M"0``QD0"0@!)BX0D0`D``,9$`D3_28N$)$`)``#&1`)0_TB)T4D#C"1`"0`` +M2(U!*$B)02A(B=!)`X0D0`D``$B#P"A(B4`(28N$)$`)``!,B;0"B````/_% +M9@^V1"1-9CGH#X=Y____0<:$).````""28VT))@0``!)C;PD_H`````$B)PTB+10A( +MB5T(2(DK2(E#"$B)&$B#>S@`=!I(BU,X28NT)-`(``"_!0```.@`````@$M$ +M`DB)VKX"````3(GWZ`````"`>WL`=!A,B>?H`````+\!````Z`````"`>WL` +M=>A!_\5%.&\.=XO^1"0'@'PD!P,/AC[___],B>?H`````$B#Q`A;74%<05U! +M7D%?PY!(@^P(2#E^*'5F#[9..(#Y"`^5P(#Y*`^5P@^VP(7"=&B`^:AT8X#Y +MB'1>@/D*#Y7`@/DJ#Y7"#[;`A<)T2X#YJG1&@/F*=$%(C9?H````2(N'Z``` +M`$B)<`A(B09(B58(2(FWZ````.L?9F:09F:02(V'Z````$B+4`A(B7`(2(D& +M2(E6"$B),N@`````2(/$",-F9F:09F:09F:09F:02(/L".@`````2(/$",-F +MD$%455-(B?-(B=5!O`````!F@7XXX0%U"P^V1CJ#Z!$\`78R2(L72(NR&`D` +M`$R-IGB&`0!F@7L@A0!W&4@/MT,@2`^VA!!`"```2&G`B`$``$R-)`;&100% +M@&4%_H!E`-^Z`````&:!>SCA`742#[9#.O_(/`&X`0````]&T&:0B=#!X``&@^*_"<*(50!F@7LXX0%U$@^V0SJ# +MZ!$\`7<'9HE-".L'.!(`````2`^WCS@2``!(BY<@$0`` +MBP:)!(H/MX+___\?"<*)$0^V00.#R!"# +MX/>(00/V1PH!=!1$BR"!`'R"%``^'H0```$@/MT,@0H"\ +M($`(``#_#X2-````9H-[(']W)DH/MH0@0`@``$F+E"08"0``2&G`B`$``$B+ +M1!!(1`^V:`CK:&:09H%[(($`=RE(#[=#($H/MH0@0`@``$F+E"1H"0``2&G` +MR`\``$B+1!`(1`^V:`CK-4@/MT,@2@^VA"!`"```28N4)$`)``!(:<#0```` +M2(N$$(@```!$#[9H".L)9F:00;W_____NO\```!F@7L@A0!W#T@/MT,@9D(/ +MMI0@0`@``$2)Z0^VP4H/MJP@Q@@``$AI[:@```!*C:PEH`$```^WPDAIP(@! +M``!)B<9-`[0D&`D``&:!>SCA`74*#[9#.O_(/`%V*6:!^O\`=`=!]D9#!'4; +MQD,D!D''!P````"X`0```.G6`@``9F:09F:020^V1D"H`70GJ`1T(T$/MD0D +M1$$Z1"1.3(GWZ`````"$P'45QD,D!$''!P````"X`0`` +M`.E>`@``08!^>Q]V$4''!P$```"X`0```.E&`@``]H.6`````70&]D4,`70; +M]H.6`````74&]D4,`74,@'LD@70&]D4,"'0A00^V]4R)Y^@`````A,!T$4'' +M!P$```"X`0```.G[`0``]H.6`````0^$;@$``/9%#`$/A&0!``!,B??H```` +M`&:#^!\/AE(!``!!QPT$Z1GIR$4''!P$```"X`0```.F/`0``BT,X)?___P`]X0$0 +M``^$_````$D/MT9B2(G"2-'J@^(!N0$```"`>SCA#X7?````@'LY`0^%U0`` +M``^V0SJ#Z`:#^`D/AZT```")P/\DQ0`````/MLFZ`0```$B)WDR)Y^@````` +MA,`/A:$```!!QP<"````N`$```#I$`$```^VR;H`````2(G>3(GGZ`````"$ +MP'5Y0<<'`@```+@!````Z>@````/MM*Y`0```$B)WDR)Y^@`````A,!U44'' +M!P(```"X`0```.G`````#[;2N0````!(B=Y,B>?H`````(3`=2E!QP<"```` +MN`$```#IF````,9#)`1!QP<`````N`$```#I@P```&9FD$F-O"18#P``Z``` +M``"$P'0/0<<'`0```+@!````ZV&0@'LXX751@'LY`75+@'LZ#W5%@'L]`74_ +M9@^V$!$``/A1(!``"_B!,``.@`````9H%]((4`#X><````2`^W +M12!"@+PP0`@``/\/A(@```!F@WT@?W`B^`````+JP!```2(G(9F9FD$"(,$C_P$C_RG7U9H%]..$! +M=6H/MD4Z@^@1/`%W7TB-3"1`2(M$)#`/ME`(2(GN2(M\)!#H`````$$/M\=( +M:<"P!```2`-$)"!)*X;P$```2(G&20.V^!```$B!QB`$``!(BT0D,(EP$$B) +M\DC!ZB!(BT0D,(E0%.F8`0``2(M$)!CV0`H!=2V+13@E____`#WA`1``#X0% +M`0``2(M4)!!(#[9"0*@!#X3S````J`0/A.L```#VA98````@=`](C70D0$B) +M[^@`````ZQM(C4PD0$B+1"0P#[90"$B)[DB+?"00Z`````!!#[?'2&G`L`0` +M`$@#1"0@22N&\!```$B)QDD#MO@0``!(@<8@!```2(M$)#")H@ +M2(M$)#")4!1F@7TXX0%U#P^V13J#Z!$\`0^&UP```$B+3"002`^V04"H`@^$ +MQ0```*@$#X2]````J`$/A+4```!!#[?'2&G`L`0``$@#1"0@22N&\!```$B) +MQDD#MO@0``!(BT0D,(EP&$B)\DC!ZB!(BT0D,(E0'.M[9F:09F:02(M$)!CV +M0`H"=&I!#[?'2&G`L`0``$@#1"0@2(G"22N6\!```$B)UDD#MO@0``!(BU0D +M,(ER&$B)\4C!Z2!(BU0D,(E*'$DKAO`0``!(B<9)`[;X$```2('&(`0``$B+ +M1"0PB7`02(GR2,'J($B+1"0PB5`42(M$)#"`2`$"9@^V55E(BT0D,&:)4`*_ +M`````(!]60!T+8GX2(T$0$C!X`)(B<9(`W,02(M-8$B+%`A(B1:+1`@(B48( +M_\Y(BWPD +M&.@`````2(M4)!B`8@S^Z6,%``!(BTPD&/9!"@(/A-T$``!(BT0D,,9`!OY( +MBT0D,(!@!_Y(@WPD$``/A.T```!(BUPD$$@/MD-`J`(/A-L```"H!`^$TP`` +M`*@!#X3+````00^WSTB+5"0P2(GN2(M\)!CH`````/:%E@````%T$$B+1"0P +M#[=`",'@`XA$)$%(C4PD0$$/M]=(:=*P!```2`-4)"!(B>Y(BWPD&.@````` +M]H66`````70+2(M$)!B`2`P!ZPE(BU0D&(!B#/Y!#[?/2&G)L`0``$B+7"0@ +MQ@09H4B+1"00#[:0X@```(/B#P^V1!D!@^#P"="(1!D!2(M4)!`/MT(P_\`/ +MMM#!X@@/ML0)T&:)1!D"3(ML)!!)@<7,````Z:X#``!F@7TXX0$/A7@"```/ +MMD4Z@_@/=`Z#^!`/A.(```#IBP,``&8/ME4\P>((9@^V13L!PDB+1"0PQD`$ +M#4B+1"0P@&`%_H!,)"\(2(MT)#`/MD4E00^VCMX```#3X&8)1@A(BTPD,`^V +M00&#X!^#R""(00%!#[?/2&G)L`0``$B+7"0@2(TT&4B+13Y(B88X!```#[;" +MP>`(#[;6"<)FB9091`0```^V13V(A!E"!```Q@:12(M4)!`/MT(P_\`/MM#! +MX@@/ML0)T&:)1!D"2(M<)!`/MI/B````@^(/2(M<)"`/MD09`8/@\`G0B$09 +M`4R+;"0028'%S````.FN`@``2(M4)#`/MD4E00^VCMX```#3X&8)0@A!#[?7 +M2&G2L`0``$B+1"0@Q@0"@6;'1`("__]!#[:,)+L```"#X0](BUPD(`^V1!H! +M@^#P"[H`````(/@#TB+3"0@#[94"P&#XO`) +MPHA4"P'K`TV)Y;X$````2(M52`^V0@$]DP```'=VB<#_),4`````@\8$ZVB# +MQ@3K8X/&".M>@\8(9F:0ZU:#Q@CK48/&".M,@\8(D.M&@\8(ZT&#QACK/(/& +M&)#K-H/&#.LQ@\8(ZRP/MG($C32U"````.L?@<:(````D.L6@\8DZQ&#QB3K +M#(/&))#K!H'&B````(U6`\'J`DB+1"0PB%`$2(M,)#!FP>H(@^(!#[9!!8/@ +M_@G0B$$%00^W_TAI_[`$``!(BUPD($B-O!\@!```B?)(BW5(Z`````#I*@$` +M``^V13B#Z`0]JP```'<_B<#_),4`````#[9%0,'@"`^V54&-#!"#^0UW&+@! +M````2-/@J=@^``!T"4B+1"0P@$@!!$B+1"0P@$@!`>L)2(M$)#"`8`'[2(M$ +M)##&0`0-2(M$)#"`8`7^2(M4)#`/MD4E00^VCMX```#3X&8)0@A(BT0D,(!@ +M`1]!#[??2&G;L`0``$B+1"0@QH0#(`0```9,BVPD$$F!Q[H`````$F-O"0E!```3(GNZ`````!(BT4X28F$)$0$``!(BT5` +M28F$)$P$``!!Q@0DD4B+3"00#[:1X@```(/B#TB+3"0@#[9$"P&#X/`)T(A$ +M"P%(BU0D$`^W0C#_P`^VT,'B"`^VQ`G09HE$"P)-A>T/A)(```!!#[?'2&G` +ML`0``$F+50!(BTPD($B)5`@$ZW=(BUPD&/9#"@%T;$$/M\](BU0D,$B)[DB) +MW^@`````]H66`````7002(M$)#`/MT`(P>`#B$0D04B-3"1`00^WUTAITK`$ +M``!(`U0D($B)[DB+?"08Z`````#VA98````!=`M(BT0D&(!(#`'K"4B+5"08 +M@&(,_D$/M]=)BX:0"0``2(DLT$2)^F;!Z@4/M])$B?F#X1^X`0```$C3X$$) +MA):8"0``BT4X)?___P`]X0$0`'4O00^W]TB-3"0LN@````!(BWPD&.@````` +MBT0D+"7___\?#0```$")1"0LZ:$```!F@7TXX0%U-@^V13J#Z!$\`7N````2`^W1B"`O#A`"```_P^$FP```&:#?B!_=RE(#[:$.$`( +M``!(BY<8"0``2&G`B`$``$B+1!!(2`^V0`A(!<`(``#K<&:!?B"!`'$R) +MY^@`````9F:02(GN3(GGZ`````!,B>Y(B=]!_Y6@````2(M<)`A(BVPD$$R+ +M9"083(ML)"!(@\0HPV9F9I!F9F:09F9FD&9FD$B#[#A(B5PD"$B);"003(ED +M)!A,B6PD($R)="0H3(E\)#!)B?9)B?U,BS](C5](2(G?Z`````!)B<1)@^PX +M3(G_Z`````!(B<5)C40D.$B+4PA(B4,(28E<)#A(B5`(2(D"N`$```!(A>UT +M>4B-?5C&13CAQD4Y`<9%.A"`33L!28N&H````$B)16A(BT5P3(EP*$F-AI`` +M``!(B450QD4ES&9!#[9$)%MFB44@28M%`$B)12C'1320````3(EU2$C'A:`` +M````````O@````#H`````$B)[DR)_^@`````N`````!(BUPD"$B+;"003(MD +M)!A,BVPD($R+="0H3(M\)#!(@\0XPV9F9I!F9F:02(/L*$B)'"1(B6PD"$R) +M9"003(EL)!A,B70D($B)\TB)_4R+;TA-BV4`#[=.,HG.9L'N!0^WQD&+1(1< +M@^$?2-/XJ`$/A68#``!)BQ0D#[?&C02%``,``(F"<`$``$F+!"2+@'0!``") +M!0````")PL9#)"&+0S@E____`#WA`0\`=2*^`````$B)W^@`````N@````!( +MB=Y,B>?H`````.D+`P``B=`/MTLR@^$?2-/XJ`%T&[X!````2(G?Z`````!, +MB>?H`````&9FD&9FD`^VA>````"#^`0/A]`"``")P/\DQ0````#&A>`````! +MN@$```!(B=Y,B>_H`````.FK`@``QH7@`````KH(````2(G>3(GOZ`````#I +MCP(``,:%X`````-(B>J^(0```$R)[^@`````2(-]4`!T(`^V57E(BW500;@` +M````N0$```!,B>_H`````.E1`@``00^V=0VZ`````$R)Y^@`````Z3H"``#& +MA>`````$2(-]4`!T,$B)ZKXA````3(GOZ``````/ME5Y2(MU4$&X`````+D" +M````3(GOZ`````#I_`$``+H`````OB$```!,B>_H`````$$/MG4-N@$```!, +MB>?H`````.G3`0``2(GJO@8```!,B>_H`````$B#?3@`=!9(BT4XBT@$C5$! +MB5`$@_D%#X:F`0``QD5#`<9%0@"`?7L`=!A,B>?H`````+\!````Z`````"` +M?7L`=>A(@WU0`'082(M5&$B+11!(B5`(2(D"2(M%4/Y(6.L92(-]6`!T$DB+ +M55A(#[9%>4C'1,)8`````$B+50A(BT4`2(E0"$B)`D'^30Y(@[T8`0```'08 +M#[:U!0$``$B+O1@!``"Z`0```.@`````2(-]4`!T$@^V=7E(BWU0N@$```#H +M`````$B#?3@`#X2"````2(M%.$C'0&``````0?Z$).\3``!,B>?H`````$B+ +M13@/MG`!N@$```!,B>?H`````$B+13@/ME`"#[9P`4C'QP````"X`````.@` +M````2(M5.$F+M"30"```OP$```#H`````$B+53A)B[0DT`@``+\&````Z``` +M``!(QT4X`````$B)[DR)Y^@`````08!]"?]T6T&^`````$&`?0X`=CE)C5U@ +M2(G?Z`````!(B<5(BT,(2(EK"$B)70!(B44(2(DH@'U"_W4+0?_&13AU#G?3 +MZP9%.'4.=Q5!QD4)_TR)[DR)Y^@`````9F:09I!(BQPD2(ML)`A,BV0D$$R+ +M;"083(MT)"!(@\0HPV9FD$B#[#A(B5PD"$B);"003(ED)!A,B6PD($R)="0H +M3(E\)#!(B?-(B?U,BV=(38LL)$&_`````$'V1"0,$'0'QH?@````!@^VA>`` +M``"#^`$/A(L```"#^`%_"X7`=!YFD.G[`P``@_@$#X2B````@_@Y`0`` +MZ>0#``#&A>`````!2(GN3(GOZ`````#&0R2!08!,)`P(2(.[@`````!T#TB- +MLX````!,B>_H`````$F-E>@```!)BX7H````2(E8"$B)`TB)4PA)B9WH```` +M3(GOZ`````#I@@,``&:008!D)`SW_H7C````QH7@`````,9#)`)(B=Y,B>_H +M`````$R)[^@`````Z5$#``"0QH7C`````$B#?3@`#X1.`0``2(M%.(M(!(U1 +M`8E0!(/Y!0^'.`$``$&`9"0,]TB#NX``````=`](C;.`````3(GOZ`````!) +MC97H````28N%Z````$B)6`A(B0-(B5,(28F=Z````$&`3"0,$$B#?5``="`/ +MME5Y2(MU4$&X`````+D"````3(GGZ`````#IO`(``,9$)`<`08!\)`X`#X:G +M````38UT)&!F9I!F9I!,B??H`````$B)PTF+1@A)B5X(3(DS2(E#"$B)&$B# +M>S@`=!Q(BU,X28NUT`@``+\%````Z`````"`2T0"9F:02(G:O@8```!,B>?H +M`````(![>P!T,D2)^$'_QSU_EI@`=R5,B>_H`````+\!````Z`````"`>WL` +M=`U$B?A!_\<]?Y:8`';;_D0D!P^V1"0'03A$)`X/AV3____&14(#2(GN3(GO +MZ`````#I\`$``$F-E>@```!)BX7H````2(E8"$B)`TB)4PA)B9WH````2(-] +M.`!T%DB+13B+2`2-40&)4`2#^04/AI8!``!(Q\<`````N`````#H`````$B) +MZKX&````3(GGZ`````!!_DPD#DB+50A(BT4`2(E0"$B)`DB#?5``=!A(BT50 +M_DA82(M5&$B+11!(B5`(2(D"ZQ](@WU8`'082(M56$@/MD5Y2,=$PE@````` +M9F:09F:0@'U[`'0R1(GX0?_'/7^6F`!W)4R)[^@`````OP$```#H`````(!] +M>P!T#42)^$'_QSU_EI@`=MM(BU4(2(M%`$B)4`A(B0)(@[T8`0```'0?#[:U +M!0$``$B+O1@!``"Z`0```.@`````9F9FD&9FD$B#?5``=!D/MG5Y2(M]4+H! +M````Z`````!F9F:09F:02(-].`!T?TB+13A(QT!@`````$'^A>\3``!,B>_H +M`````$B+13@/MG`!N@$```!,B>_H`````$B+13@/ME`"#[9P`4C'QP````"X +M`````.@`````2(M5.$F+M=`(``"_`0```.@`````2(M5.$F+M=`(``"_!@`` +M`.@`````2,=%.`````!(B>Y,B>_H`````.L02(GJO@(```!,B>?H`````$R) +M[^@`````9F:09I!(BUPD"$B+;"003(MD)!A,BVPD($R+="0H3(M\)#!(@\0X +MPV9F9I!F9I!F9I!F9I!!5D%505154TB)\TF)_$R+KX@```!)BVT`0?9%#!!T +M!,9'409!#[9$)%&#^`$/A(D```"#^`%_#87`="!F9F:0Z7L#``"#^`0/A)H` +M``"#^`4/A)_H`````$B-E>@```!(BX7H````2(E8"$B)`TB) +M4PA(B9WH````2(GOZ`````#I!`,``$&`90SW0?Y$)%)!QD0D40#&0R0"2(G> +M2(GOZ`````!(B>_H`````.G8`@``08!E#/=(@[N``````'0/2(VS@````$B) +M[^@`````2(V%Z````$B+E>@```!(B5H(2(D32(E#"$B)G>@```"Z`````+X& +M````3(GOZ`````!!#[9U#;H!````2(GOZ`````!!O@````!!@'T.``^&?``` +M`$V-96"03(GGZ`````!(B<-)BT0D"$F)7"0(3(DC2(E#"$B)&$B#>S@`=!I( +MBU,X2(NUT`@``+\%````Z`````"`2T0"D$B)VKX&````3(GOZ`````"`>WL` +M=!A(B>_H`````+\!````Z`````"`>WL`=>A!_\9%.'4.=XE!QD4)`$&`30P0 +M3(GOZ`````#IT@$``$&`90SW2(.[@`````!T#TB-LX````!(B>_H`````$B- +MA>@```!(BY7H````2(E:"$B)$TB)0PA(B9WH````28U%8$B)PDDY16`/A.$` +M``!)B<9(B=?H`````$B)PTB#>#@`=!Y(BU`X2(NUT`@``+\%````Z`````"` +M2T0"9F:09I!(B=J^!@```$R)[^@`````@'M[`'082(GOZ`````"_`0```.@` +M````@'M[`'7H2(-[.`!T84B+0SA(QT!@`````/Z%[Q,``$B)[^@`````2(M# +M.`^V<`&Z`0```$B)[^@`````2(M3.$B+M=`(``"_`0```.@`````2(M3.$B+ +MM=`(``"_!@```.@`````2,=#.`````!(B=Y(B>_H`````$R)\DTY=6`/A2+_ +M__^Z`````+X&````3(GOZ`````!,B>9(B>_H`````$G'14``````2(M%`(N0 +M6`$``(D5`````(72=`I(BT4`B9!8`0``0?9%"@%T6$&^`````(!]0P!V&TD/ +MME4-2(G01(GQ2-/XJ`%U"4'_QD0X=4-WZD$/MO9(B>_H`````$R)[DB)[^@` +M````1(GR#[;"2&O`:$C'A"A($@```````&9F9I!;74%<05U!7L-F9F:09F:0 +M05=!5D%505154TB#[`A)B?Q,BW=(28L>2(G^2(G?Z`````!!@+PDXP````%V +M"4'&A"3@````!$F-;"0@23EL)"`/A#D"``!(B>_H`````$F)QTF+1"0@3(EX +M"$F)!TF);PA-B7PD($&]`````.G6`0``00^WU4B+@Y`)``!(BRS02(7M#X2[ +M`0``00^W1"0P9CM%(`^%JP$```^WBSH2``!(BX-0$0``.0AT5&9F9I#_P0^W +M@SX2```YR+@`````#T;(C5$!2(N#4!$``(L$D*D```@`=1XE_P\``&9!.<5U +M$TDY[W492(G?Z`````"0Z8L!``!(BX-0$0``.0AUL$&`?E@`#X4Z`0``9H%] +M((4`#X@%#[?` +M@^$?2-/B]](A5(-<3#G]=$E(BU4(2(M%`$B)4`A(B0)(@[V``````'0/2(VU +M@````$B)W^@`````2(V3Z````$B+@^@```!(B6@(2(E%`$B)50A(B:OH```` +M#[=U,DB-NU@/``#H`````$'^3"1[ZQ)!]D8*`G0+2(GN3(GGZ`````!!_\5F +M1#EK6`^''_[__TV%Y'0H20^V1"1`J`%T'J@$=!I)BU<(28L'2(E0"$B)`DR) +M_DR)Y^@`````D$B#Q`A;74%<05U!7D%?PY!!5D%505154TF)_$R+MX@```!) +MBQY(B?Y(B=_H`````$&`?"12`78&0<9$)%$$28UL)"A).6PD*`^$\@$``$B) +M[^@`````28G%28M$)"A,B6@(28E%`$F);0A-B6PD*+T`````Z9L!``!F9F:0 +M9F:0#[?52(N#D`D``$B+--!(A?8/A'L!``!!#[=$)$!F.T8@#X5K`0``#[>+ +M.A(``$B+@U`1```Y"'179F9FD&9FD/_!#[>#/A(``#G(N``````/1LB-40%( +MBX-0$0``BP20J0``"`!U'B7_#P``9CG%=11).?5U&DB)W^@`````9I#I.P$` +M`$B+@U`1```Y"'6P9H%^((4`#X?V````2`^W1B"`O!A`"```_P^$XP```$&` +M?E@`#X78````0?9&"@$/A,T```!(BQ,/MT8R9L'H!0^WP(T$A0`#``")@G`! +M``!(BP,/MTXR@^$?N@$```!(B==(T^>)N'0!``!(#[=.,DB+@Y`)``!(QP3( +M``````^W3C*)R&;!Z`4/M\"#X1](B==(T^=(B?GWT2&,@Y@)```/MTXRB@%#[?`@^$?2-/B]](A5(-<3#GN="Y(BU8(2(L&2(E0"$B)`DB-D^@```!( +MBX/H````2(EP"$B)!DB)5@A(B;/H````#[=V,DB-NU@/``#H`````$'^3"1% +M_\5F.6M8#X=B_O__0?9&"@%T&TF+50A)BT4`2(E0"$B)`DR)[DR)Y^@````` +MD%M=05Q!74%>PV9F9I!F9I!!5T%6055!5%532(/L"$B)_4&^`````$B-A^@` +M``!(B<)(.8?H````#X33`0``28G'28G%28G42(G7Z`````!(B<-(@WAP`'4O +M2(GOZ`````!(B4-P2(7`=1Y(BX7H````2(E8"$B)`TR)8PA(B9WH````Z8D! +M``"+0S@E____`#WA`1``#X3L````9H%[((``#X3@````9@^V0R!FB4,@9H/X +M?W8:9H%[..$!=2D/MD,Z@^@1/`%W'F9F9I!F9I!F@7L@A0!W#T@/MT,@@+PH +M0`@``/]U&<9#)`9(B=Y(B>_H`````.D&`0``9F:09I!F@7LXX0%U"P^V0SJ# +MZ!$\`78O2(N5&`D``$R-LGB&`0!F@7L@A0!W&4@/MT,@2`^VA"A`"```2&G` +MB`$``$R--`)F@7LXX0%U"@^V0SK_R#P!=C-F@7L@@`!T*V:!>SCA`74+#[9# +M.H/H$3P!=AA!]D9#!'41QD,D!DB)WDB)[^@`````ZWI(B=Y(B>_H`````(/X +M`G<+@_@!2(GOZ`````!F9I#K +M/TB#NX``````=`](C;.`````2(GOZ`````!(BX7H````2(E8"$B)`TR)>PA( +MB9WH````ZQM(B=Y(B>_H`````$R)ZDPYK>@````/A3/^__](@\0(6UU!7$%= +M05Y!7\-!5T%6055!5%532(/L2$F)_4"(="0P2`^V5"0P2&O2:$@!^DR+LD@2 +M``!(Q\#^____B?%(T\`B@FD2``"(1"0O3(L_QT0D*`````!`@/X#=@U!QX=P +M`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``B04`````#[9,)#"#X0.[!P`` +M`-/CB<4)W4&)KW0!``"_Z`,``.@`````]],AW4&)KW0!``"`?"0P`W8@#[9$ +M)#!(P>`")?P#``!"BX0XT`$``(D%`````(G%ZQX/MD0D,$C!X`(E_`,``$*+ +MA#C0`0``B04`````B<6#S0B`?"0P`W88#[9$)#!(P>`")?P#``!"B:PXT`$` +M`.L6#[9$)#!(P>`")?P#``!"B:PXT`$``(!\)#`#=AP/MD0D,$C!X`,E^`<` +M`$+'A#@``@``.````.L:#[9$)#!(P>`#)?@'``!"QX0X``(``#@```"_$"<` +M`.@`````@'PD,`-V'`^V1"0P2,'@`R7X!P``0L>$.`0"````````ZQH/MD0D +M,$C!X`,E^`<``$+'A#@$`@```````$V%]@^$[@<``$&\`````$&`?4,`=BUF +M9F:020^V1@U!#[;,2-/XJ`%T$+H!````B_H`````)!!_\1%.&5#=]=! +M]D8*`71B3(GV3(GOZ``````/MG0D,$R)[^@`````2`^V1"0P2&O`:$J-E"A@ +M$@``BT(,J0``$`!T""7__^__B4(,3(GV3(GOZ`````!(#[9$)#!(:\!H2L>$ +M*$@2````````Z4L'``!!@'Y8`'0328N]:!```$R)]N@`````0?Y.6(!\)"\` +M#X2I`@``2,=$)"``````QD0D'P`/MG0D,$R)[^@`````2`^V1"0P2&O`:$J- +ME"A@$@``BT(,J0``$`!T""7__^__B4(,#[9$)"]!B$8-0;P`````08!]0P`/ +MAI,!``!(#[94)"](B50D$`^VR(E,)`Q!#[;,2(M$)!!(T_BH`0^$8`$``$2) +MX@^VPDAKP&@/ME0D+T*(E"AI$@``08#\`W87C03-`````$B80L>$.``"```X +M````ZQE*C03E`````"7X!P``0L>$.``"```X````OQ`G``#H`````$&`_`-V +M&TJ-!.4`````)?@'``"+3"0,0HF,.`0"``#K&4J-!.4`````)?@'``"+5"0, +M0HF4.`0"``!!@/P#=@U!QX=P`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0`` +MB04`````1(GA@^$#NP<```#3XXG%"=U!B:]T`0``O^@#``#H`````/?3(=U! +MB:]T`0``08#\`W8?2HT$I0`````E_`,``$*+A#C0`0``B04`````B<7K'4J- +M!*4`````)?P#``!"BX0XT`$``(D%`````(G%@\T(08#\`W872HT$I0`````E +M_`,``$*)K#C0`0``ZQ5*C02E`````"7\`P``0HFL.-`!``!!_\1%.&5##X=_ +M_O__28U&2$B)PDDY1DAT-DB)TTB)U^@`````2(U(R$B)3"0@2(M3"$B)0PA( +MB1A(B5`(2(D"2(-XV`!T"4B)VDDY7DAURDB#?"0@`'1%2(M$)"#&0%H`0;P` +M````08!]0P!V+TD/MD8-1(GA2-/XJ`%T%T@/MD0D'TB+5"0@1(AD$'#^0EK^ +M1"0?0?_$13AE0W?1N@````"^@0```$R)]^@`````2`^V1"0P2&O`:$K'A"A( +M$@```````.EH`P``N@````"^!@```$R)]^@`````#[9T)#!,B>_H`````$@/ +MMD0D,$AKP&A*C90H8!(``(M"#*D``!``=`@E___O_XE"#$F-1DA(B<)).49( +M#X3L`0``2(D$)$B)U^@`````3(U@R$B-4!!(.5`0#X2Q`0``28U\)$CH```` +M`$B-6/"`>T$-=1I(C;!(`0``2(M#2$B+`$B+>"CH`````&9FD$B+4PA(BP-( +MB5`(2(D"@'M[`'083(GOZ`````"_`0```.@`````@'M[`'7H2(-[.``/A"@! +M``!(BT,X2,=`8`````"`>WL`#X29````O0````!F08-]6``/A(@```!FD$AC +MU4F+A9`)``!(BS302(7V=&0/MT8@9CM#,'5:9CV%`'=4#[?`0H"\*$`(``#_ +M=$9)BU4`#[=&,F;!Z`4/M\"-!(4``P``B8)P`0``28M%``^W3C*#X1^Z`0`` +M`$C3XHF0=`$``,9&)"&Z`````$R)[^@`````_\5!#[=%6#GH#X]Z____]D-$ +M!'4D0?Z%[Q,``$R)[^@`````2(M#.`^V<`&Z`0```$R)[^@`````2(M#.`^V +M4`(/MG`!2,?'`````+@`````Z`````!(BU,X28NUT`@``+\!````Z`````!( +MBU,X28NUT`@``+\&````Z`````!(QT,X`````$'^3@Y!_DPD6$B)WDR)[^@` +M````28U$)$A).40D2`^%3_[__T'^3BA,B>9,B>_H`````$B+%"1).59(#X48 +M_O__28U&8$B)PDDY1F`/A/8```!(B<5(B=?H`````$B)PX!X>P!T-HM$)"C_ +M1"0H/7^6F`!W)TR)[^@`````OP$```#H`````(![>P!T#XM$)"C_1"0H/7^6 +MF`!VV4B#>S@`#X2%````2(M#.$C'0&``````]D-$!'4D0?Z%[Q,``$R)[^@` +M````2(M#.`^V<`&Z`0```$R)[^@`````2(M#.`^V4`(/MG`!2,?'`````+@` +M````Z`````!(BU,X28NUT`@``+\!````Z`````!(BU,X28NUT`@``+\&```` +MZ`````!(QT,X`````$'^3@Y(B=Y,B>_H`````$B)ZDDY;F`/A0W___],B?9, +MB>_H`````$@/MD0D,$AKP&A*QX0H2!(```````!!O`````!!@'U#``^&!`$` +M`$P/MG0D+Y!,B?)$B>%(T_I$.F0D,`^4P`G0J`$/A-4```!!@/P#=@U!QX=P +M`0``Q`$``.L+0<>'<`$``*@!``!!BX=T`0``B04`````1(GA@^$#C0Q)NP<` +M``#3XXG%"=U!B:]T`0``O^@#``#H`````/?3(=U!B:]T`0``08#\`W8?2HT$ +MI0`````E_`,``$*+A#C0`0``B04`````B<7K'4J-!*4`````)?P#``!"BX0X +MT`$``(D%`````(G%@\T(08#\`W872HT$I0`````E_`,``$*)K#C0`0``ZQA* +MC02E`````"7\`P``0HFL.-`!``!F9I!!_\1%.&5##X<#____2(/$2%M=05Q! +M74%>05_#9F9FD$B#[`A,BP>Z`````$&`>$,`=AP/ML)(:\!H2HV$`$`2``!( +M.?AT"/_"03A00W?D#[;"2&O`:$P!P$B+L$@2``!(A?9T:_9&"@)T94@%0!(` +M`$@Y1B!U68!^6`!T*/Y&6.M._D9800^VB;L```!)B[AH$```21``=,))BT$X3(U(R$@Y +MT'7L9F:02(/$",-F9F:09F9FD&9FD$%505154TB#[`A!B?1)B?V[`````(GR +M#[;"2&O`:$B-%#A(BZI($@``2(7M#X2!`0``2,?`_O___XGQ2-/`A$4-#X5L +M`0``2(U%2$@Y14AT$4B-ND`2``#H`````.G^`@``0;P`````@'T.``^&[@(` +M`$B-76!(B=_H`````$B)P4B+0PA(B4L(2(D92(E!"$B)"(!Y00`/A00!``!( +M#[=!,$F#O,5`!````'4+2(-Y.``/A-,```!(#[=!,$F+A,5`!```2(.X@``` +M```/A*$```#&@>``````2`^V04"H`G0MJ`1T*:@!="7&04(%QD%#!`^V47E( +MBW%02(MY2.@`````Z9@```!F9F:09F:02`^V04"H`G4GJ`1F9I!FD'0>J`%T +M&L9!0@/&04,$2(G.3(GOZ`````#K9F9FD&:02`^V04"H`G18J`1F9I!FD'1/ +MJ`%U2\9!0P;&04(%9L>!P```````2(G.3(GOZ`````#K+4B+43A)B[70"``` +MOP0```#H`````.L62`^W43!)B[70"```OP(```#H`````$'_Q$0X90X/A\C^ +M___IK0$``&:!^_,!=V=*C02E`````$B)Q8'E_`,``&9FD&:0OQ`G``#H```` +M`$&`_`-V($F+10"+A"C0`0``B04`````J0``$`!U*>L>9F:09F:028M%`(N$ +M*-`!``")!0````"I```0`'4)_\-F@?OS`7:O00^V]$R)[^@`````3(GOZ``` +M``!$B>(/ML)(:\!H2HNL*$@2``!(A>T/A!`!``"[`````$&`?4,`=BQF9F:0 +M2`^V10T/MLM(T_BH`701N@````")SDR)[^@`````9I#_PT$X74-WV$2)X0^V +MP4AKP&A*C80H0!(``$B)12!(C45(2#E%2'4.2(U%8$@Y16`/A(8```"^```` +M`$&\`````$B-14A(B<)(.45(=#-FD$B)TTB)U^@`````2(UPR$B+4PA(B4,( +M2(D82(E0"$B)`DB#>-@`=`E(B=I(.5U(=<](A?9T6L9&6@"Y`````$&`?4,` +M=DI(#[9%#4C3^*@!=!!$B>(/ML*(3#!P_D9:0?_$_\%!.$U#=]SK)/9%"@%T +M#4B)[DR)[^@`````ZQ&^`````$B)[^@`````9F9FD$B#Q`A;74%<05W#9F:0 +M9I!(@^P(2(GX2(L_9L=`3B``2(G&Z`````!(@\0(PV9FD%-(BP]$BT4,`=AL/ML-(:\!H2(V$"$`2``!(.?AT!__#.%E#=^6`^P-V+4B-!)T` +M````)?P#``!(BQ&+A`+0`0``B04`````J0``$`!U+>L[9F9FD&9FD$B-!)T` +M````)?P#``!(BQ&+A`+0`0``B04`````J0``$`!T$`^V\T2)PDB)S^@````` +MZPL/MO-(B<_H`````%O#9F9FD&9F9I!F9F:09F:02(N'P!```(L`B04````` +M2(N'P!```(M`!(D%`````$B+A\`0``"+0`B)!0````!(BX?`$```BT`,B04` +M````PT%7059!54%455-(@^P8B70D%$F)_$&^`````(!_0P`/ADD(``"+="04 +M00^VUHU*"$B)\$C3^*@!=1&-2A!(B?!(T_BH`0^$%0@``$&`_@-V)TJ-!/4` +M````)?@'``!)BQ0DBX0"@`$``(D%`````*D```@`=2?K0TJ-!/4`````)?@' +M``!)BQ0DBX0"@`$``(D%`````*D```@`=!Y,B>?H`````$2)\@^VPDAKP&A" +M@8P@_H`````$'_QT4X?0YWH[H@H0<` +MZR!!#[;VN@$```!,B>?H`````+^@A@$`Z`````"Z`"TQ`42)\0^VP4AKP&A, +M`>!(C;!X$@``B9!X$@``2,=&$`````!(!4`2``!(B48828M\)"CH`````$&` +M_@-V($J-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````.L>2HT$]0`````E +M^`<``$F+%"2+A`*``0``B04`````08#^`W8L2HT$]0`````E^`<``$F+%"2+ +MA`*``0``B04`````J8````!U,.G"````9I!*C03U`````"7X!P``28L4)(N$ +M`H`!``")!0````"I@`````^$EP```$&`_@-V(DJ-!/4`````)?@'``!)BQ0D +MBX0"A`$``(D%`````(G&ZR!*C03U`````"7X!P``28L4)(N$`H0!``")!0`` +M``")QD&`_@-V(DJ-!/4`````)?@'``!)BPPDB?*!R@```0")E`&$`0``ZR=* +MC03U`````"7X!P``28L,)(GR@X"``!$B?$/ML%(:\!H3HNL($@2``!)@WU```^$V0`` +M`$F+14!(#[=03O;&`0^%QP```$B)Q?;"`@^$M0```$B-L)````!)BWPD*.@` +M````0;X`````@'T[`'9I1(GR#[;"2(MS@`=!I(BU,X28NT +M)-`(``"_!0```.@`````@$M$`DB)VKX&````3(GOZ`````"`>WL`=!F03(GG +MZ`````"_`0```.@`````@'M[`'7H0?_&1#AU.W>7QX60````(*$'`$C'A:`` +M````````2(FMJ````$B-M9````!)BWPD*.@`````ZP9F@4A.@`!!@/X#=BA* +MC03U`````"7X!P``28L4)(N$`H`!``")!0````#VQ`%U+.D\`0``2HT$]0`` +M```E^`<``$F+%"2+A`*``0``B04`````]L0!#X05`0``08#^`W8G2HT$]0`` +M```E^`<``$F+%"2+A`*``0``B04`````J`%T*^GH````2HT$]0`````E^`<` +M`$F+%"2+A`*``0``B04`````J`$/A<(```!$B?%$#[;I36OM:$^-K"5`$@`` +M28-]"``/A*0```!)BT4(2(E$)`A)C74X28M\)"CH`````$&_`````$B+5"0( +M@'H.`'932(G52(/%8$B)[^@`````2(G#2(M%"$B)70A(B2M(B4,(2(D82(-[ +M.`!T&DB+4SA)B[0DT`@``+\%````Z`````"`2T0"0?_'2(M,)`A$.'D.=[1! +MQT4X@(0>`$G'14@`````38EM4$F-=3A)BWPD*.@`````9F9FD&9FD$&`_@-V +M(DJ-!/4`````)?@'``!)BQ0DBX0"@`$``(D%`````(G!ZR!*C03U`````"7X +M!P``28L4)(N$`H`!``")!0````")P4&`_@-V&DJ-!/4`````)?@'``!)BQ0D +MB8P"@`$``.L82HT$]0`````E^`<``$F+%"2)C`*``0``0?_&13AT)$,/A[?W +M__](@\086UU!7$%=05Y!7\-F9I!!5T%6055!5%532(/L&$B)_4F)]4B+EQ@) +M``!,C:)XA@$`9H%^((4`=QE(#[=&($@/MH0X0`@``$AIP(@!``!,C20"00^V +M1"1JP>`(2)A(BY7`$```BX0"0`@``(D%`````$&)QD'![A!!B<=!P>\800^V +M1"1JP>`(2)A(BY7`$```BX0"1`@``(D%`````(A$)!!(C70D$(G"P>H(B%8! +MP>@0B$8"00^V1"1JP>`(2)A(BY7`$```BX0"2`@``(D%`````(A&`XG"P>H( +MB%8$P>@0B$8%QD8&`,9&!P"+3"0000^VUT$/MMY$BT8$B=Y(Q\<`````N``` +M``#H`````$6$]@^5P(/S`878=!)!QD4D`+@`````Z;,"``!F9I!!@'TD@74I +M00^VUT$/MO9(C4PD$$R)[^@`````0<9%)`*X`````.F%`@``9F:09I!!BT4X +M)?___P`]X0$.`'400<9%)"&X`````.EA`@``D$'VA98````!=19!]L8!=!!! +M@'PD0O\/A2<"``!F9F:03(GF2(GOZ`````!,B>9(B>_H`````$B+50!!#[=% +M,F;!Z`4/M\"-!(4``P``B8)P`0``2(M%`$$/MTTR@^$?N@$```!(B=-(T^.) +MF'0!``!)#[=-,DB+A9`)``!(QP3(`````$$/MTTRB@%#[?`@^$?2(G3 +M2-/C2(G9]]$AC(68"0``00^W33*)R&;!Z`4/M\"#X1](T^+WTB%4A5Q)BU4( +M28M%`$B)4`A(B0)!#[=U,DB-O5@/``#H`````$'^3"1[0<9%)(%)@[V````` +M`'0/28VU@````$B)[^@`````28U$)"!(B<)).40D(`^$!@$``$&^`0```$B- +MA>@```!(B40D"$F)UV9F9I!(B=?H`````$B)PTB+50`/MT`R9L'H!0^WP(T$ +MA0`#``")@G`!``!(BT4`#[=+,H/A'TR)\DC3XHF0=`$``$@/MU,R2(N%D`D` +M`$C'!-``````#[=+,HG(9L'H!0^WP(/A'TR)\DC3XDB)T??1(8R%F`D```^W +M2S*)R&;!Z`4/M\"#X1],B?)(T^)(B='WT2%,A5P/MW,R2(V]6`\``.@````` +M0?Y,)'M(@[N``````'0/2(VS@````$B)[^@`````2(N%Z````$B)6`A(B0-( +MBT0D"$B)0PA(B9WH````3(GZ33E\)"`/A1/___]!@:64````___^_T'&A"3@ +M````!$R)[DR)Y^@`````N`$```#K'4$/MM=!#[;V2(U,)!!,B>_H`````+@` +M````9F:02(/$&%M=05Q!74%>05_#D$B#[$A(B5PD&$B);"0@3(ED)"A,B6PD +M,$R)="0X3(E\)$!(B50D$(GU2(L?3(NS\!```$&]`````$B%T@^$!0,```^W +MUDAIPK`$``!"]D0P(0)T$4B+@Y`)``!(BP30QD`D`NL2#[?&2(N3D`D``$B+ +M!,+&0"0A#[?%2(N3D`D``$B+%,*+0C@E____`#WA`1``#X2X`0``N/____]F +M@7H@A0!W#4@/MT(@#[:$&$`(```\_W4:#[?%2(N3D`D``$B+!,+&0"0&Z3,) +M``!F9I`/ML!(:<"(`0``28G%3`.K&`D``(!\)!,`>6])#[9%0*@"="RH!'0H +MJ`%T)$B+`XN`6`$``(D%`````(G"A$!#@`/A(`'``!!#[9%:L'@"$B82(N3 +MP!```(N$`D`(``")!0````")QL'N$$&)P$'!Z!A!#[9%:L'@"$B82(N3P!`` +M`(N$`D0(``")!0````"(1"0(2(U,)`B)PL'J"(A1`<'H$(A!`D$/MD5JP>`( +M2)A(BY/`$```BX0"2`@``(D%`````(A!`XG"P>H(B%$$P>@0B$$%QD$&`,9! +M!P#VAY8````!=1A`#[;V0/;&`70.00^VT.@`````Z2!@`` +MN`$```!(T^"IP#````^%\@```*D`@```=0VI```!`'5?D.EK!@``#[?62(N# +MD`D``$B+#-!,:<*P!```0P^V1#`SB$$D2(N#D`D``$B+!-#V0",$#X0X!@`` *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:30:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A53101065670; Wed, 28 Dec 2011 23:30:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9420A8FC15; Wed, 28 Dec 2011 23:30:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSNUHm6029637; Wed, 28 Dec 2011 23:30:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSNUHxI029635; Wed, 28 Dec 2011 23:30:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112282330.pBSNUHxI029635@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 28 Dec 2011 23:30:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228941 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:30:17 -0000 Author: jilles Date: Wed Dec 28 23:30:17 2011 New Revision: 228941 URL: http://svn.freebsd.org/changeset/base/228941 Log: sh: Cache de->d_namlen in a local variable. Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Wed Dec 28 23:26:58 2011 (r228940) +++ head/bin/sh/expand.c Wed Dec 28 23:30:17 2011 (r228941) @@ -1186,6 +1186,7 @@ expmeta(char *enddir, char *name) int atend; int matchdot; int esc; + int namlen; metaflag = 0; start = name; @@ -1284,17 +1285,18 @@ expmeta(char *enddir, char *name) if (dp->d_name[0] == '.' && ! matchdot) continue; if (patmatch(start, dp->d_name, 0)) { - if (enddir + dp->d_namlen + 1 > expdir_end) + namlen = dp->d_namlen; + if (enddir + namlen + 1 > expdir_end) continue; - memcpy(enddir, dp->d_name, dp->d_namlen + 1); + memcpy(enddir, dp->d_name, namlen + 1); if (atend) addfname(expdir); else { - if (enddir + dp->d_namlen + 2 > expdir_end) + if (enddir + namlen + 2 > expdir_end) continue; - enddir[dp->d_namlen] = '/'; - enddir[dp->d_namlen + 1] = '\0'; - expmeta(enddir + dp->d_namlen + 1, endname); + enddir[namlen] = '/'; + enddir[namlen + 1] = '\0'; + expmeta(enddir + namlen + 1, endname); } } } From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:40:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 459351065672; Wed, 28 Dec 2011 23:40:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3481D8FC12; Wed, 28 Dec 2011 23:40:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSNeltS029979; Wed, 28 Dec 2011 23:40:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSNelmW029977; Wed, 28 Dec 2011 23:40:47 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112282340.pBSNelmW029977@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 28 Dec 2011 23:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228942 - head/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:40:47 -0000 Author: jilles Date: Wed Dec 28 23:40:46 2011 New Revision: 228942 URL: http://svn.freebsd.org/changeset/base/228942 Log: sh: Use dirent.d_type in pathname generation. This improves performance for globs where a slash or another component follows a component with metacharacters by eliminating unnecessary attempts to open directories that are not. Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Wed Dec 28 23:30:17 2011 (r228941) +++ head/bin/sh/expand.c Wed Dec 28 23:40:46 2011 (r228942) @@ -1292,6 +1292,10 @@ expmeta(char *enddir, char *name) if (atend) addfname(expdir); else { + if (dp->d_type != DT_UNKNOWN && + dp->d_type != DT_DIR && + dp->d_type != DT_LNK) + continue; if (enddir + namlen + 2 > expdir_end) continue; enddir[namlen] = '/'; From owner-svn-src-all@FreeBSD.ORG Wed Dec 28 23:51:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9D08106566B; Wed, 28 Dec 2011 23:51:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97EA18FC1A; Wed, 28 Dec 2011 23:51:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBSNpHoo030328; Wed, 28 Dec 2011 23:51:17 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBSNpHIK030325; Wed, 28 Dec 2011 23:51:17 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112282351.pBSNpHIK030325@svn.freebsd.org> From: Jilles Tjoelker Date: Wed, 28 Dec 2011 23:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228943 - in head: bin/sh tools/regression/bin/sh/builtins X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 28 Dec 2011 23:51:17 -0000 Author: jilles Date: Wed Dec 28 23:51:17 2011 New Revision: 228943 URL: http://svn.freebsd.org/changeset/base/228943 Log: sh: Allow quoting ^ and ] in bracket expressions. Added: head/tools/regression/bin/sh/builtins/case13.0 (contents, props changed) Modified: head/bin/sh/mksyntax.c Modified: head/bin/sh/mksyntax.c ============================================================================== --- head/bin/sh/mksyntax.c Wed Dec 28 23:40:46 2011 (r228942) +++ head/bin/sh/mksyntax.c Wed Dec 28 23:51:17 2011 (r228943) @@ -219,16 +219,16 @@ main(int argc __unused, char **argv __un add("`", "CBQUOTE"); add("$", "CVAR"); add("}", "CENDVAR"); - /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */ - add("!*?[=~:/-", "CCTL"); + /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ + add("!*?[]=~:/-^", "CCTL"); print("dqsyntax"); init(); fputs("\n/* syntax table used when in single quotes */\n", cfile); add("\n", "CNL"); add("\\", "CSBACK"); add("'", "CENDQUOTE"); - /* ':/' for tilde expansion, '-' for [a\-x] pattern ranges */ - add("!*?[=~:/-", "CCTL"); + /* ':/' for tilde expansion, '-^]' for [a\-x] pattern ranges */ + add("!*?[]=~:/-^", "CCTL"); print("sqsyntax"); init(); fputs("\n/* syntax table used when in arithmetic */\n", cfile); Added: head/tools/regression/bin/sh/builtins/case13.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/case13.0 Wed Dec 28 23:51:17 2011 (r228943) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +case ^ in +[\^^]) ;; +*) echo Failed at $LINENO ;; +esac + +case s in +[\^^]) echo Failed at $LINENO ;; +[s\]]) ;; +*) echo Failed at $LINENO ;; +esac From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 03:20:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21459106564A; Thu, 29 Dec 2011 03:20:35 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id D06028FC12; Thu, 29 Dec 2011 03:20:34 +0000 (UTC) Received: from localhost ([127.0.0.1]) by hq.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1Rg6Xe-000Hzn-IS; Wed, 28 Dec 2011 19:20:31 -0800 Message-ID: <4EFBDC7F.9000605@freebsd.org> Date: Wed, 28 Dec 2011 19:20:31 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Aleksandr Rybalko References: <201112280557.pBS5v3HZ085555@svn.freebsd.org> <20111228121541.9698722c.ray@dlink.ua> In-Reply-To: <20111228121541.9698722c.ray@dlink.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 28/12/2011 2:15 AM, Aleksandr Rybalko wrote: > On Wed, 28 Dec 2011 05:57:03 +0000 (UTC) > Oleksandr Tymoshenko wrote: > >>> Author: gonzo >>> Date: Wed Dec 28 05:57:03 2011 >>> New Revision: 228925 >>> URL: http://svn.freebsd.org/changeset/base/228925 >>> >>> Log: >>> - Add generic GPIO driver for Cavium Octeon. At the moment pin >>> definition is hardcoded but will be changed later with more flexible >>> way to define them. /* __OCTEON_GPIOVAR_H__ */ > > Thank you very much Oleksandr! > > Oleksandr, can you please avoid define board depended futures in > a SoC drivers in future '{ "F/D", 7, GPIO_PIN_INPUT}'? So others will > be able to use driver in different boards w/o modification (just by > define it in hints/FDT or so). [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228925 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 03:20:35 -0000 On 28/12/2011 2:15 AM, Aleksandr Rybalko wrote: > On Wed, 28 Dec 2011 05:57:03 +0000 (UTC) > Oleksandr Tymoshenko wrote: > >>> Author: gonzo >>> Date: Wed Dec 28 05:57:03 2011 >>> New Revision: 228925 >>> URL: http://svn.freebsd.org/changeset/base/228925 >>> >>> Log: >>> - Add generic GPIO driver for Cavium Octeon. At the moment pin >>> definition is hardcoded but will be changed later with more flexible >>> way to define them. /* __OCTEON_GPIOVAR_H__ */ > > Thank you very much Oleksandr! > > Oleksandr, can you please avoid define board depended futures in > a SoC drivers in future '{ "F/D", 7, GPIO_PIN_INPUT}'? So others will > be able to use driver in different boards w/o modification (just by > define it in hints/FDT or so). OK, I'll remove it soon. It supposed to be just example. From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 05:51:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48B97106564A; Thu, 29 Dec 2011 05:51:49 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 32B128FC08; Thu, 29 Dec 2011 05:51:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBT5pn8l041798; Thu, 29 Dec 2011 05:51:49 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBT5pnbp041788; Thu, 29 Dec 2011 05:51:49 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112290551.pBT5pnbp041788@svn.freebsd.org> From: Adrian Chadd Date: Thu, 29 Dec 2011 05:51:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228944 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 05:51:49 -0000 Author: adrian Date: Thu Dec 29 05:51:48 2011 New Revision: 228944 URL: http://svn.freebsd.org/changeset/base/228944 Log: Break out the AR71XX config file into _BASE and board specific bits. The ROUERSTATION and RSPRO variants contain: * the board specific bits (eg the RTC for RSPRO, later on it'll include the GPIO/LED definitions); * the boot specific bits (eg, on-board flash, usb flash, etc). For now the AR71XX_BASE file contains the common board config, drivers and net80211/ath wireless drivers. I'll follow this up with config files for the other boards I have (eg the Ubiquiti LSSR71, as well as some Mikrotik boards that use the AR71XX and atheros reference boards) which will be quite easy to do now. Added: head/sys/mips/conf/AR71XX_BASE (contents, props changed) head/sys/mips/conf/AR71XX_BASE.hints (contents, props changed) head/sys/mips/conf/ROUTERSTATION (contents, props changed) head/sys/mips/conf/ROUTERSTATION.hints (contents, props changed) head/sys/mips/conf/ROUTERSTATION_MFS (contents, props changed) head/sys/mips/conf/RSPRO (contents, props changed) head/sys/mips/conf/RSPRO.hints (contents, props changed) head/sys/mips/conf/RSPRO_MFS (contents, props changed) head/sys/mips/conf/RSPRO_STANDALONE (contents, props changed) Deleted: head/sys/mips/conf/AR71XX head/sys/mips/conf/AR71XX.hints Added: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AR71XX_BASE Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,122 @@ +# +# AR71XX -- Kernel configuration file for FreeBSD/MIPS for Atheros 71xx systems +# +# This includes all the common drivers for the AR71XX boards along with +# the usb, net80211 and atheros driver code. +# +# $FreeBSD$ +# + +machine mips mipseb +ident AR71XX_BASE +cpu CPU_MIPS4KC +options ISA_MIPS32 +makeoptions TARGET_BIG_ENDIAN +makeoptions KERNLOADADDR=0x80050000 +options HZ=1000 +options HWPMC_HOOKS + +files "../atheros/files.ar71xx" + +# For now, hints are per-board. + +hints "AR71XX_BASE.hints" + +makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols + +# Also build these as modules, just to ensure the build gets tested. +makeoptions MODULES_OVERRIDE="wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp ath ath_pci" + +options DDB +options KDB + +options SCHED_4BSD #4BSD scheduler +options INET #InterNETworking +options INET6 # IPv6 + +# options NFS_CL #Network Filesystem Client + +options PSEUDOFS #Pseudo-filesystem framework +options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions + +# options NFS_LEGACYRPC +# Debugging for use in -current +options INVARIANTS +options INVARIANT_SUPPORT +options WITNESS +options WITNESS_SKIPSPIN +options DEBUG_REDZONE +options DEBUG_MEMGUARD + +options FFS #Berkeley Fast Filesystem +# options SOFTUPDATES #Enable FFS soft updates support +# options UFS_ACL #Support for access control lists +# options UFS_DIRHASH #Improve performance on big directories +# options MSDOSFS # Read MSDOS filesystems; useful for USB/CF + +device pci +device ar71xx_pci + +# 802.11 framework +options IEEE80211_DEBUG +options IEEE80211_ALQ +options IEEE80211_SUPPORT_MESH +# This option is currently broken for if_ath_tx. +options IEEE80211_SUPPORT_TDMA +options IEEE80211_AMPDU_AGE +device wlan # 802.11 support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_xauth # 802.11 hostap support + +# Atheros wireless NICs +device ath # Atheros interface support +device ath_pci # Atheros PCI/Cardbus bus +options ATH_DEBUG +options ATH_DIAGAPI +options ATH_ENABLE_11N +options AH_DEBUG +options AH_DEBUG_ALQ +options ALQ +device ath_hal +option AH_SUPPORT_AR5416 +device ath_rate_sample +option AH_RXCFG_SDMAMW_4BYTES +option AH_AR5416_INTERRUPT_MITIGATION +# There's no DFS radar detection support yet so this won't actually +# detect radars. It however does enable the rest of the channel change +# machinery so DFS can be debugged. +option ATH_ENABLE_DFS + +device mii +device arge + +device usb +options USB_EHCI_BIG_ENDIAN_DESC # handle big-endian byte order +options USB_DEBUG +options USB_HOST_ALIGN=32 # AR71XX (MIPS in general?) requires this +device ehci + +device scbus +device umass +device da + +# On-board SPI flash +device spibus +device ar71xx_spi +device mx25l +device ar71xx_wdog + +device uart + +device loop +device ether +device md +device bpf +device random +device if_bridge +device gif # ip[46] in ip[46] tunneling protocol +device gre # generic encapsulation - only for IPv4 in IPv4 though atm + +options ARGE_DEBUG # Enable if_arge debugging for now Added: head/sys/mips/conf/AR71XX_BASE.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/AR71XX_BASE.hints Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,66 @@ +# +# $FreeBSD$ +# +hint.apb.0.at="nexus0" +hint.apb.0.irq=4 + +# uart0 +hint.uart.0.at="apb0" +# see atheros/uart_cpu_ar71xx.c why +3 +hint.uart.0.maddr=0x18020003 +hint.uart.0.msize=0x18 +hint.uart.0.irq=3 + +#ohci +hint.ohci.0.at="apb0" +hint.ohci.0.maddr=0x1c000000 +hint.ohci.0.msize=0x01000000 +hint.ohci.0.irq=6 + +#ehci +hint.ehci.0.at="nexus0" +hint.ehci.0.maddr=0x1b000000 +hint.ehci.0.msize=0x01000000 +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 +hint.arge.0.irq=2 + +# phymask, media and fduplex depend upon the specific +# board. +# So each board will override the settings as needed. + +hint.arge.1.at="nexus0" +hint.arge.1.maddr=0x1a000000 +hint.arge.1.msize=0x1000 +hint.arge.1.irq=3 + +# SPI flash +hint.spi.0.at="nexus0" +hint.spi.0.maddr=0x1f000000 +hint.spi.0.msize=0x10 + +hint.mx25l.0.at="spibus0" +hint.mx25l.0.cs=0 + +# Watchdog +hint.ar71xx_wdog.0.at="nexus0" + +# GPIO +hint.gpio.0.at="apb0" +hint.gpio.0.maddr=0x18040000 +hint.gpio.0.msize=0x1000 +hint.gpio.0.irq=2 + +# Each board should override the GPIO bus pins with the configuration +# relevant to it. Thus no pins are defined here. + +# hwpmc device +hint.ar71xx_pmc.0.at="apb0" +hint.ar71xx_pmc.0.irq=5 Added: head/sys/mips/conf/ROUTERSTATION ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/ROUTERSTATION Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,24 @@ +# +# Ubiquiti Routerstation: Boot from onboard flash +# +# $FreeBSD$ +# + +include "UBNT_AR71XX_BASE" +ident "ROUTERSTATION" +hints "ROUTERSTATION.hints" + +# XXX Is there an RTC on the RS? + +# GEOM modules +device geom_redboot # to get access to the SPI flash partitions +device geom_uzip # compressed in-memory filesystem support +options GEOM_UZIP + +# For DOS +options GEOM_PART_BSD +options GEOM_PART_MBR +options MSDOSFS + +# Boot path - redboot MFS +options ROOTDEVNAME=\"ufs:redboot/rootfs.uzip\" Added: head/sys/mips/conf/ROUTERSTATION.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/ROUTERSTATION.hints Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,19 @@ +# +# $FreeBSD$ +# + +# Uncomment this hint for RS (not PRO) +# PHY20 = 1 << 20 +hint.arge.0.phymask=0x100000 + +# should be 100 for RS +hint.arge.1.media=100 +hint.arge.1.fduplex=1 +# Uncomment this hint for RS (not PRO) +hint.arge.1.phymask=0x30000 + +# RF led +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="rf" +# pin 2 +hint.gpioled.0.pins=0x0004 Added: head/sys/mips/conf/ROUTERSTATION_MFS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/ROUTERSTATION_MFS Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,19 @@ +# +# Ubiquiti Routerstation: boot from MFS +# +# $FreeBSD$ +# + +include "AR71XX_BASE" +ident "ROUTERSTATION_MFS" +hints "ROUTERSTATION.hints" + +# GEOM modules +device geom_redboot # to get access to the SPI flash partitions +device geom_uzip # compressed in-memory filesystem hackery! +options GEOM_UZIP + +options ROOTDEVNAME=\"ufs:md0.uzip\" + +options MD_ROOT +options MD_ROOT_SIZE="6144" Added: head/sys/mips/conf/RSPRO ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/RSPRO Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,26 @@ +# +# Routerstation Pro: boot from on-board flash +# +# $FreeBSD$ +# + +include "AR71XX_BASE" +ident "RSPRO" +hints "RSPRO.hints" + +# RTC - requires hackery in the spibus code to work +device pcf2123_rtc + +# GEOM modules +device geom_redboot # to get access to the SPI flash partitions +device geom_uzip # compressed in-memory filesystem support +options GEOM_UZIP + +# For DOS +options GEOM_PART_BSD +options GEOM_PART_MBR +options MSDOSFS + +# Boot off of flash +options ROOTDEVNAME=\"ufs:redboot/rootfs.uzip\" + Added: head/sys/mips/conf/RSPRO.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/RSPRO.hints Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +hint.arge.0.phymask=0x10 + +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 +hint.arge.1.phymask=0x0e + +# RF led +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="rf" +# pin 2 +hint.gpioled.0.pins=0x0004 Added: head/sys/mips/conf/RSPRO_MFS ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/RSPRO_MFS Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,23 @@ +# +# Ubiquiti Routerstation Pro: boot from MFS +# +# $FreeBSD$ +# + +include "AR71XX_BASE" +ident "RSPRO_MFS" +hints "RSPRO.hints" + +# RTC - requires hackery in the spibus code to work +device pcf2123_rtc + +# GEOM modules +device geom_redboot # to get access to the SPI flash partitions +device geom_uzip # compressed in-memory filesystem hackery! +options GEOM_UZIP + +# Boot from the first MFS uzip +options ROOTDEVNAME=\"ufs:md0.uzip\" + +options MD_ROOT +options MD_ROOT_SIZE="6144" Added: head/sys/mips/conf/RSPRO_STANDALONE ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/RSPRO_STANDALONE Thu Dec 29 05:51:48 2011 (r228944) @@ -0,0 +1,26 @@ +# +# Ubiquiti Routerstation Pro: boot from first DOS-partitioned, BSD +# sliced flash disk. +# +# $FreeBSD$ +# + +include "AR71XX_BASE" +ident "RSPRO_STANDALONE" +hints "RSPRO.hints" + +# RTC - requires hackery in the spibus code to work +device pcf2123_rtc + +# GEOM modules +device geom_redboot # to get access to the SPI flash partitions +device geom_uzip # compressed in-memory filesystem support +options GEOM_UZIP + +# For DOS +options GEOM_PART_BSD +options GEOM_PART_MBR +options MSDOSFS + +# .. first DOS-partitioned, BSD sliced flash disk +options ROOTDEVNAME=\"ufs:da0s1a\" From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 06:07:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9257B106566C; Thu, 29 Dec 2011 06:07:24 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C7B48FC0C; Thu, 29 Dec 2011 06:07:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBT67Obw042297; Thu, 29 Dec 2011 06:07:24 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBT67OY5042294; Thu, 29 Dec 2011 06:07:24 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112290607.pBT67OY5042294@svn.freebsd.org> From: Adrian Chadd Date: Thu, 29 Dec 2011 06:07:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228945 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 06:07:24 -0000 Author: adrian Date: Thu Dec 29 06:07:24 2011 New Revision: 228945 URL: http://svn.freebsd.org/changeset/base/228945 Log: Flesh out the RSPRO GPIO config, including the RF LED. Modified: head/sys/mips/conf/AR71XX_BASE head/sys/mips/conf/RSPRO.hints Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Thu Dec 29 05:51:48 2011 (r228944) +++ head/sys/mips/conf/AR71XX_BASE Thu Dec 29 06:07:24 2011 (r228945) @@ -120,3 +120,7 @@ device gif # ip[46] in ip[46] tunnelin device gre # generic encapsulation - only for IPv4 in IPv4 though atm options ARGE_DEBUG # Enable if_arge debugging for now + +# Enable GPIO +device gpio +device gpioled Modified: head/sys/mips/conf/RSPRO.hints ============================================================================== --- head/sys/mips/conf/RSPRO.hints Thu Dec 29 05:51:48 2011 (r228944) +++ head/sys/mips/conf/RSPRO.hints Thu Dec 29 06:07:24 2011 (r228945) @@ -6,6 +6,24 @@ hint.arge.1.media=1000 hint.arge.1.fduplex=1 hint.arge.1.phymask=0x0e +# Don't flip on anything that isn't already enabled. +# This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're +# not used here. +hint.gpio.0.function_set=0x00000000 +hint.gpio.0.function_clear=0x00000000 + +# These are the GPIO LEDs and buttons which can be software controlled. +hint.gpio.0.pinmask=0x000000ff + +# GPIO 0: Pin 1 +# GPIO 1: Pin 2 +# GPIO 2: RF LED +# GPIO 3: Pin 3 +# GPIO 4: Pin 4 +# GPIO 5: Pin 5 +# GPIO 6: Pin 6 +# GPIO 7: Pin 7 + # RF led hint.gpioled.0.at="gpiobus0" hint.gpioled.0.name="rf" From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 08:13:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E28BC106564A; Thu, 29 Dec 2011 08:13:11 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDD0E8FC0A; Thu, 29 Dec 2011 08:13:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBT8DBSm046045; Thu, 29 Dec 2011 08:13:11 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBT8DBXW046043; Thu, 29 Dec 2011 08:13:11 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201112290813.pBT8DBXW046043@svn.freebsd.org> From: Baptiste Daroussin Date: Thu, 29 Dec 2011 08:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228946 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 08:13:12 -0000 Author: bapt Date: Thu Dec 29 08:13:11 2011 New Revision: 228946 URL: http://svn.freebsd.org/changeset/base/228946 Log: I'm not yet an alumni, add myself in the right section Approved by: des (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Dec 29 06:07:24 2011 (r228945) +++ head/share/misc/committers-src.dot Thu Dec 29 08:13:11 2011 (r228946) @@ -34,7 +34,6 @@ archie [label="Archie Cobbs\narchie@Free arr [label="Andrew R. Reiter\narr@FreeBSD.org\n2001/11/02\n2005/05/25"] arun [label="Arun Sharma\narun@FreeBSD.org\n2003/03/06\n2006/12/16"] asmodai [label="Jeroen Ruigrok\nasmodai@FreeBSD.org\n1999/12/16\n2001/11/16"] -bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"] benjsc [label="Benjamin Close\nbenjsc@FreeBSD.org\n2007/02/09\n2010/09/15"] billf [label="Bill Fumerola\nbillf@FreeBSD.org\n1998/11/11\n2008/11/10"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2002/01/29\n2009/09/13"] @@ -102,6 +101,7 @@ antoine [label="Antoine Brodin\nantoine@ ariff [label="Ariff Abdullah\nariff@FreeBSD.org\n2005/11/14"] art [label="Artem Belevich\nart@FreeBSD.org\n2011/03/29"] avg [label="Andriy Gapon\navg@FreeBSD.org\n2009/02/18"] +bapt [label="Baptiste Daroussin\nbapt@FreeBSD.org\n2011/12/23"] benl [label="Ben Laurie\nbenl@FreeBSD.org\n2011/05/18"] benno [label="Benno Rice\nbenno@FreeBSD.org\n2000/11/02"] bms [label="Bruce M Simpson\nbms@FreeBSD.org\n2003/08/06"] From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 08:27:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 729C3106567A; Thu, 29 Dec 2011 08:27:37 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D3FD8FC30; Thu, 29 Dec 2011 08:27:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBT8RbKd046591; Thu, 29 Dec 2011 08:27:37 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBT8RbZS046589; Thu, 29 Dec 2011 08:27:37 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112290827.pBT8RbZS046589@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 29 Dec 2011 08:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228947 - head/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 08:27:37 -0000 Author: kib Date: Thu Dec 29 08:27:37 2011 New Revision: 228947 URL: http://svn.freebsd.org/changeset/base/228947 Log: Add PCI Id for the Intel AMT serial interface as found on my DQ67OW. MFC after: 1 week Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Thu Dec 29 08:13:11 2011 (r228946) +++ head/sys/dev/uart/uart_bus_pci.c Thu Dec 29 08:27:37 2011 (r228947) @@ -111,6 +111,7 @@ static struct pci_id pci_ns8250_ids[] = { 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, +{ 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x9710, 0x9820, 0x1000, 1, "NetMos NM9820 Serial Port", 0x10 }, { 0x9710, 0x9835, 0x1000, 1, "NetMos NM9835 Serial Port", 0x10 }, { 0x9710, 0x9865, 0xa000, 0x1000, "NetMos NM9865 Serial Port", 0x10 }, From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 09:34:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D97EA106566C; Thu, 29 Dec 2011 09:34:11 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 8DC318FC12; Thu, 29 Dec 2011 09:34:11 +0000 (UTC) Received: from terran.dlink.ua (unknown [192.168.10.90]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id DB5CAC493C; Thu, 29 Dec 2011 11:34:09 +0200 (EET) Date: Thu, 29 Dec 2011 11:34:26 +0200 From: Aleksandr Rybalko To: Oleksandr Tymoshenko Message-Id: <20111229113426.14c9acc3.ray@dlink.ua> In-Reply-To: <4EFBDC7F.9000605@freebsd.org> References: <201112280557.pBS5v3HZ085555@svn.freebsd.org> <20111228121541.9698722c.ray@dlink.ua> <4EFBDC7F.9000605@freebsd.org> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228925 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 09:34:12 -0000 On Wed, 28 Dec 2011 19:20:31 -0800 Oleksandr Tymoshenko wrote: >> On 28/12/2011 2:15 AM, Aleksandr Rybalko wrote: >> > On Wed, 28 Dec 2011 05:57:03 +0000 (UTC) >> > Oleksandr Tymoshenko wrote: >> > >> >>> Author: gonzo >> >>> Date: Wed Dec 28 05:57:03 2011 >> >>> New Revision: 228925 >> >>> URL: http://svn.freebsd.org/changeset/base/228925 >> >>> >> >>> Log: >> >>> - Add generic GPIO driver for Cavium Octeon. At the moment pin >> >>> definition is hardcoded but will be changed later with more >> >>> flexible way to define them. >> /* __OCTEON_GPIOVAR_H__ */ >> > >> > Thank you very much Oleksandr! >> > >> > Oleksandr, can you please avoid define board depended futures in >> > a SoC drivers in future '{ "F/D", 7, GPIO_PIN_INPUT}'? So others >> > will be able to use driver in different boards w/o modification >> > (just by define it in hints/FDT or so). >> >> OK, I'll remove it soon. It supposed to be just example. >> Thanks again! it just confuse peoples a bit, even developers. i remember adri say "many words" about it when he remove board depended struct from atheros gpio driver :) Anyway thanks! I will try to use/modify it ASAP and will send patches for review to you and my mentor of course. -- Alexandr Rybalko aka Alex RAY From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 12:28:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DED74106566C; Thu, 29 Dec 2011 12:28:05 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C93E48FC12; Thu, 29 Dec 2011 12:28:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTCS5EN056047; Thu, 29 Dec 2011 12:28:05 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTCS5km056045; Thu, 29 Dec 2011 12:28:05 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201112291228.pBTCS5km056045@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 29 Dec 2011 12:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228952 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 12:28:06 -0000 Author: pluknet Date: Thu Dec 29 12:28:05 2011 New Revision: 228952 URL: http://svn.freebsd.org/changeset/base/228952 Log: Update LOCKLEAF comment: it should say "vnode". Inspired by PR docs/11596. Modified: head/sys/sys/namei.h Modified: head/sys/sys/namei.h ============================================================================== --- head/sys/sys/namei.h Thu Dec 29 11:38:02 2011 (r228951) +++ head/sys/sys/namei.h Thu Dec 29 12:28:05 2011 (r228952) @@ -107,7 +107,7 @@ struct nameidata { /* * namei operational modifier flags, stored in ni_cnd.flags */ -#define LOCKLEAF 0x0004 /* lock inode on return */ +#define LOCKLEAF 0x0004 /* lock vnode on return */ #define LOCKPARENT 0x0008 /* want parent vnode returned locked */ #define WANTPARENT 0x0010 /* want parent vnode returned unlocked */ #define NOCACHE 0x0020 /* name must not be left in cache */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 12:33:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B0A1106566C; Thu, 29 Dec 2011 12:33:28 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7AEE08FC16; Thu, 29 Dec 2011 12:33:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTCXSjE056258; Thu, 29 Dec 2011 12:33:28 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTCXS3v056250; Thu, 29 Dec 2011 12:33:28 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112291233.pBTCXS3v056250@svn.freebsd.org> From: Ulrich Spoerlein Date: Thu, 29 Dec 2011 12:33:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228953 - in head/tools: regression/pthread/mutex_isowned_np tools/ansify tools/genericize tools/hcomp tools/mtxstat tools/prstats tools/whereintheworld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 12:33:28 -0000 Author: uqs Date: Thu Dec 29 12:33:27 2011 New Revision: 228953 URL: http://svn.freebsd.org/changeset/base/228953 Log: Reencode files from latin1 to UTF-8. Modified: head/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c head/tools/tools/ansify/ansify.pl head/tools/tools/genericize/genericize.pl head/tools/tools/hcomp/hcomp.pl head/tools/tools/mtxstat/mtxstat.pl head/tools/tools/prstats/prstats.pl head/tools/tools/whereintheworld/whereintheworld.pl Modified: head/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c ============================================================================== --- head/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c Thu Dec 29 12:28:05 2011 (r228952) +++ head/tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c Thu Dec 29 12:33:27 2011 (r228953) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2008 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2008 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/tools/tools/ansify/ansify.pl ============================================================================== --- head/tools/tools/ansify/ansify.pl Thu Dec 29 12:28:05 2011 (r228952) +++ head/tools/tools/ansify/ansify.pl Thu Dec 29 12:33:27 2011 (r228953) @@ -1,6 +1,6 @@ #!/usr/bin/perl -w #- -# Copyright (c) 2005 Dag-Erling Coïdan Smørgrav +# Copyright (c) 2005 Dag-Erling Coïdan Smørgrav # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/tools/tools/genericize/genericize.pl ============================================================================== --- head/tools/tools/genericize/genericize.pl Thu Dec 29 12:28:05 2011 (r228952) +++ head/tools/tools/genericize/genericize.pl Thu Dec 29 12:33:27 2011 (r228953) @@ -1,6 +1,6 @@ #!/usr/bin/perl -w #- -# Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +# Copyright (c) 2004 Dag-Erling Coïdan Smørgrav # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/tools/tools/hcomp/hcomp.pl ============================================================================== --- head/tools/tools/hcomp/hcomp.pl Thu Dec 29 12:28:05 2011 (r228952) +++ head/tools/tools/hcomp/hcomp.pl Thu Dec 29 12:33:27 2011 (r228953) @@ -1,6 +1,6 @@ #!/usr/bin/perl -w #- -# Copyright (c) 2003 Dag-Erling Coïdan Smørgrav +# Copyright (c) 2003 Dag-Erling Coïdan Smørgrav # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/tools/tools/mtxstat/mtxstat.pl ============================================================================== --- head/tools/tools/mtxstat/mtxstat.pl Thu Dec 29 12:28:05 2011 (r228952) +++ head/tools/tools/mtxstat/mtxstat.pl Thu Dec 29 12:33:27 2011 (r228953) @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw #- -# Copyright (c) 2002 Dag-Erling Coïdan Smørgrav +# Copyright (c) 2002 Dag-Erling Coïdan Smørgrav # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/tools/tools/prstats/prstats.pl ============================================================================== --- head/tools/tools/prstats/prstats.pl Thu Dec 29 12:28:05 2011 (r228952) +++ head/tools/tools/prstats/prstats.pl Thu Dec 29 12:33:27 2011 (r228953) @@ -1,6 +1,6 @@ #!/usr/bin/perl -w #- -# Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +# Copyright (c) 2001 Dag-Erling Coïdan Smørgrav # All rights reserved. # # Redistribution and use in source and binary forms, with or without Modified: head/tools/tools/whereintheworld/whereintheworld.pl ============================================================================== --- head/tools/tools/whereintheworld/whereintheworld.pl Thu Dec 29 12:28:05 2011 (r228952) +++ head/tools/tools/whereintheworld/whereintheworld.pl Thu Dec 29 12:33:27 2011 (r228953) @@ -4,7 +4,7 @@ # Parses "make world" output and summarize where it's been so far. # # Bill Fenner 11 January 2000 -# Dag-Erling Smørgrav 09 January 2003 +# Dag-Erling Smørgrav 09 January 2003 # # $Id: whereintheworld,v 1.3 2000/01/28 00:42:32 fenner Exp $ # $FreeBSD$ From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 14:41:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84154106566B; Thu, 29 Dec 2011 14:41:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72BD58FC08; Thu, 29 Dec 2011 14:41:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTEfIAZ060129; Thu, 29 Dec 2011 14:41:18 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTEfI8l060127; Thu, 29 Dec 2011 14:41:18 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112291441.pBTEfI8l060127@svn.freebsd.org> From: Ed Schouten Date: Thu, 29 Dec 2011 14:41:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228955 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 14:41:18 -0000 Author: ed Date: Thu Dec 29 14:41:17 2011 New Revision: 228955 URL: http://svn.freebsd.org/changeset/base/228955 Log: Don't define static_assert for C++. Even though _Static_assert() is pretty robust for C code, it cannot work correctly with C++ code. This is due to the fact that C++ template parameters may contain commas that are not enclosed in parentheses. For example: static_assert(foo::bar == baz, "..."); This causes _Static_assert to be called with an excessive number of parameters. If you want to use static_assert in C++, just use a C++11 compiler. Reported on: current@, ports@ Modified: head/include/assert.h Modified: head/include/assert.h ============================================================================== --- head/include/assert.h Thu Dec 29 12:33:41 2011 (r228954) +++ head/include/assert.h Thu Dec 29 14:41:17 2011 (r228955) @@ -58,7 +58,16 @@ #ifndef _ASSERT_H_ #define _ASSERT_H_ -#if __ISO_C_VISIBLE >= 2011 && (!defined(__cplusplus) || __cplusplus < 201103L) +/* + * Static assertions. In principle we could define static_assert for + * C++ older than C++11, but this breaks if _Static_assert is + * implemented as a macro. + * + * C++ template parameters may contain commas, even if not enclosed in + * parentheses, causing the _Static_assert macro to be invoked with more + * than two parameters. + */ +#if __ISO_C_VISIBLE >= 2011 && !defined(__cplusplus) #define static_assert _Static_assert #endif From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 15:04:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3668106566B; Thu, 29 Dec 2011 15:04:47 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 058C18FC13; Thu, 29 Dec 2011 15:04:47 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 7048E2A28CC3; Thu, 29 Dec 2011 16:04:46 +0100 (CET) Date: Thu, 29 Dec 2011 16:04:46 +0100 From: Ed Schouten To: Ulrich Spoerlein Message-ID: <20111229150446.GH1895@hoeg.nl> References: <201112291233.pBTCXS3v056250@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+9faIjRurCDpBc7U" Content-Disposition: inline In-Reply-To: <201112291233.pBTCXS3v056250@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228953 - in head/tools: regression/pthread/mutex_isowned_np tools/ansify tools/genericize tools/hcomp tools/mtxstat tools/prstats tools/whereintheworld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 15:04:47 -0000 --+9faIjRurCDpBc7U Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Uli, * Ulrich Spoerlein , 20111229 13:33: > Reencode files from latin1 to UTF-8. I've got some more for you. ;-) crypto/openssh/FREEBSD-upgrade: line 119, char 1, byte offset 23: invalid U= TF-8 code games/morse/morse.c: line 148, char 1, byte offset 4: invalid UTF-8 code gnu/usr.bin/cvs/contrib/easy-import.pl: line 9, char 1, byte offset 15: inv= alid UTF-8 code gnu/usr.bin/grep/AUTHORS: line 43, char 1, byte offset 24: invalid UTF-8 co= de gnu/usr.bin/groff/tmac/fr.ISO8859-1: line 32, char 1, byte offset 43: inval= id UTF-8 code gnu/usr.bin/groff/tmac/hyphen.ru: line 7, char 1, byte offset 2: invalid UT= F-8 code gnu/usr.bin/groff/tmac/ru.KOI8-R: line 29, char 1, byte offset 5: invalid U= TF-8 code lib/libgssapi/gss_display_status.c: line 29, char 1, byte offset 49: invali= d UTF-8 code lib/libgssapi/gss_pseudo_random.c: line 2, char 1, byte offset 42: invalid = UTF-8 code lib/libgssapi/gss_release_oid.c: line 2, char 1, byte offset 42: invalid UT= F-8 code lib/libutil/flopen.3: line 2, char 1, byte offset 37: invalid UTF-8 code lib/libutil/kld.3: line 2, char 1, byte offset 37: invalid UTF-8 code lib/libvgl/bitmap.c: line 2, char 1, byte offset 29: invalid UTF-8 code lib/libvgl/keyboard.c: line 2, char 1, byte offset 24: invalid UTF-8 code lib/libvgl/main.c: line 2, char 1, byte offset 29: invalid UTF-8 code lib/libvgl/mouse.c: line 2, char 1, byte offset 29: invalid UTF-8 code lib/libvgl/simple.c: line 2, char 1, byte offset 29: invalid UTF-8 code lib/libvgl/text.c: line 2, char 1, byte offset 29: invalid UTF-8 code lib/libvgl/vgl.3: line 1, char 1, byte offset 25: invalid UTF-8 code lib/libvgl/vgl.h: line 2, char 1, byte offset 29: invalid UTF-8 code lib/libz/ChangeLog: line 303, char 1, byte offset 57: invalid UTF-8 code lib/libz/contrib/README.contrib: line 41, char 1, byte offset 22: invalid U= TF-8 code lib/msun/src/s_fabsl.c: line 2, char 1, byte offset 36: invalid UTF-8 code release/picobsd/tinyware/view/fbsd.png: line 1, char 1, byte offset 1: inva= lid UTF-8 code share/colldef/map.ISCII-DEV: line 81, char 1, byte offset 58: invalid UTF-8= code share/doc/papers/devfs/paper.me: line 243, char 1, byte offset 15: invalid = UTF-8 code share/doc/papers/timecounter/timecounter.ms: line 2, char 1, byte offset 7:= invalid UTF-8 code share/misc/latin1: line 3, char 1, byte offset 15: invalid UTF-8 code share/misc/usb_hid_usages: line 1283, char 1, byte offset 22: invalid UTF-8= code share/syscons/fonts/INDEX.fonts: line 52, char 1, byte offset 10: invalid U= TF-8 code share/syscons/keymaps/INDEX.keymaps: line 24, char 1, byte offset 16: inval= id UTF-8 code share/syscons/keymaps/by.cp1131.kbd: line 120, char 1, byte offset 17: inva= lid UTF-8 code share/syscons/keymaps/by.cp1251.kbd: line 120, char 1, byte offset 17: inva= lid UTF-8 code share/syscons/keymaps/by.iso5.kbd: line 120, char 1, byte offset 17: invali= d UTF-8 code share/syscons/keymaps/ce.iso2.kbd: line 31, char 1, byte offset 9: invalid = UTF-8 code share/syscons/keymaps/colemak.iso15.acc.kbd: line 12, char 1, byte offset 3= 8: invalid UTF-8 code share/syscons/keymaps/cs.latin2.qwertz.kbd: line 18, char 1, byte offset 55= : invalid UTF-8 code share/syscons/keymaps/cz.iso2.kbd: line 38, char 1, byte offset 9: invalid = UTF-8 code share/syscons/keymaps/el.iso07.kbd: line 20, char 1, byte offset 43: invali= d UTF-8 code share/syscons/keymaps/fr.dvorak.acc.kbd: line 11, char 1, byte offset 8: in= valid UTF-8 code share/syscons/keymaps/fr.dvorak.kbd: line 7, char 1, byte offset 8: invalid= UTF-8 code share/syscons/keymaps/gr.elot.acc.kbd: line 13, char 1, byte offset 17: inv= alid UTF-8 code share/syscons/keymaps/norwegian.dvorak.kbd: line 33, char 1, byte offset 38= : invalid UTF-8 code share/syscons/keymaps/sk.iso2.kbd: line 38, char 1, byte offset 9: invalid = UTF-8 code share/syscons/keymaps/tr.iso9.q.kbd: line 24, char 1, byte offset 38: inval= id UTF-8 code share/syscons/keymaps/ua.koi8-u.shift.alt.kbd: line 10, char 1, byte offset= 11: invalid UTF-8 code sys/amd64/linux32/linux.h: line 4, char 1, byte offset 29: invalid UTF-8 co= de sys/amd64/linux32/linux32_dummy.c: line 2, char 1, byte offset 29: invalid = UTF-8 code sys/amd64/linux32/linux32_sysvec.c: line 6, char 1, byte offset 29: invalid= UTF-8 code sys/arm/at91/at91_st.c: line 203, char 1, byte offset 28: invalid UTF-8 code sys/arm/sa11x0/sa11x0_ost.c: line 254, char 1, byte offset 42: invalid UTF-= 8 code sys/compat/linux/linux_file.c: line 2, char 1, byte offset 29: invalid UTF-= 8 code sys/compat/linux/linux_ioctl.c: line 2, char 1, byte offset 29: invalid UTF= -8 code sys/compat/linux/linux_ipc.c: line 2, char 1, byte offset 29: invalid UTF-8= code sys/compat/linux/linux_misc.c: line 3, char 1, byte offset 29: invalid UTF-= 8 code sys/compat/linux/linux_signal.c: line 2, char 1, byte offset 29: invalid UT= F-8 code sys/compat/linux/linux_socket.c: line 2, char 1, byte offset 24: invalid UT= F-8 code sys/compat/linux/linux_stats.c: line 2, char 1, byte offset 29: invalid UTF= -8 code sys/compat/svr4/imgact_svr4.c: line 3, char 1, byte offset 29: invalid UTF-= 8 code sys/contrib/dev/npe/LICENSE: line 11, char 1, byte offset 208: invalid UTF-= 8 code sys/contrib/dev/nve/amd64/nvenetlib.README: line 7, char 1, byte offset 193= : invalid UTF-8 code sys/contrib/dev/nve/i386/nvenetlib.README: line 7, char 1, byte offset 193:= invalid UTF-8 code sys/contrib/octeon-sdk/cvmx-dma-engine.h: line 84, char 1, byte offset 57: = invalid UTF-8 code sys/contrib/octeon-sdk/cvmx-higig.h: line 123, char 1, byte offset 56: inva= lid UTF-8 code sys/contrib/octeon-sdk/cvmx-pcie.c: line 708, char 1, byte offset 8: invali= d UTF-8 code sys/contrib/octeon-sdk/cvmx-raid.h: line 124, char 1, byte offset 111: inva= lid UTF-8 code sys/contrib/octeon-sdk/cvmx-usb.c: line 780, char 1, byte offset 19: invali= d UTF-8 code sys/contrib/octeon-sdk/cvmx-usbd.c: line 382, char 1, byte offset 19: inval= id UTF-8 code sys/dev/ahci/ahci.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/arcmsr/arcmsr.h: line 1192, char 1, byte offset 72: invalid UTF-8 c= ode sys/dev/ata/ata-all.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-all.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-card.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-cbus.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-disk.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-disk.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-dma.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-isa.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-lowlevel.c: line 2, char 1, byte offset 31: invalid UTF-8 c= ode sys/dev/ata/ata-pci.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-pci.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-queue.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-raid.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-raid.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata-sata.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/ata_if.m: line 1, char 1, byte offset 30: invalid UTF-8 code sys/dev/ata/atapi-cd.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/atapi-cd.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/atapi-fd.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/atapi-fd.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/atapi-tape.c: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/atapi-tape.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/dev/ata/chipsets/ata-acard.c: line 2, char 1, byte offset 31: invalid U= TF-8 code sys/dev/ata/chipsets/ata-acerlabs.c: line 2, char 1, byte offset 31: invali= d UTF-8 code sys/dev/ata/chipsets/ata-adaptec.c: line 2, char 1, byte offset 31: invalid= UTF-8 code sys/dev/ata/chipsets/ata-ahci.c: line 2, char 1, byte offset 31: invalid UT= F-8 code sys/dev/ata/chipsets/ata-amd.c: line 2, char 1, byte offset 31: invalid UTF= -8 code sys/dev/ata/chipsets/ata-ati.c: line 2, char 1, byte offset 31: invalid UTF= -8 code sys/dev/ata/chipsets/ata-cenatek.c: line 2, char 1, byte offset 31: invalid= UTF-8 code sys/dev/ata/chipsets/ata-cypress.c: line 2, char 1, byte offset 31: invalid= UTF-8 code sys/dev/ata/chipsets/ata-cyrix.c: line 2, char 1, byte offset 31: invalid U= TF-8 code sys/dev/ata/chipsets/ata-highpoint.c: line 2, char 1, byte offset 31: inval= id UTF-8 code sys/dev/ata/chipsets/ata-intel.c: line 2, char 1, byte offset 31: invalid U= TF-8 code sys/dev/ata/chipsets/ata-ite.c: line 2, char 1, byte offset 31: invalid UTF= -8 code sys/dev/ata/chipsets/ata-jmicron.c: line 2, char 1, byte offset 31: invalid= UTF-8 code sys/dev/ata/chipsets/ata-marvell.c: line 2, char 1, byte offset 31: invalid= UTF-8 code sys/dev/ata/chipsets/ata-micron.c: line 2, char 1, byte offset 31: invalid = UTF-8 code sys/dev/ata/chipsets/ata-national.c: line 2, char 1, byte offset 31: invali= d UTF-8 code sys/dev/ata/chipsets/ata-netcell.c: line 2, char 1, byte offset 31: invalid= UTF-8 code sys/dev/ata/chipsets/ata-nvidia.c: line 2, char 1, byte offset 31: invalid = UTF-8 code sys/dev/ata/chipsets/ata-promise.c: line 2, char 1, byte offset 31: invalid= UTF-8 code sys/dev/ata/chipsets/ata-serverworks.c: line 2, char 1, byte offset 31: inv= alid UTF-8 code sys/dev/ata/chipsets/ata-siliconimage.c: line 2, char 1, byte offset 31: in= valid UTF-8 code sys/dev/ata/chipsets/ata-sis.c: line 2, char 1, byte offset 31: invalid UTF= -8 code sys/dev/ata/chipsets/ata-via.c: line 2, char 1, byte offset 31: invalid UTF= -8 code sys/dev/bxe/bxe_hsi.h: line 285, char 1, byte offset 48: invalid UTF-8 code sys/dev/ce/tau32-ddk.h: line 474, char 1, byte offset 9: invalid UTF-8 code sys/dev/ctau/ctau.c: line 193, char 1, byte offset 5: invalid UTF-8 code sys/dev/ex/if_ex.c: line 2, char 1, byte offset 35: invalid UTF-8 code sys/dev/ex/if_exreg.h: line 2, char 1, byte offset 35: invalid UTF-8 code sys/dev/fb/boot_font.c: line 2934, char 1, byte offset 5: invalid UTF-8 code sys/dev/fb/splash_pcx.c: line 4, char 1, byte offset 36: invalid UTF-8 code sys/dev/fb/vga.c: line 3, char 1, byte offset 29: invalid UTF-8 code sys/dev/hptmv/readme.txt: line 187, char 1, byte offset 39: invalid UTF-8 c= ode sys/dev/ieee488/ibfoo.c: line 27, char 1, byte offset 26: invalid UTF-8 code sys/dev/ieee488/pcii.c: line 27, char 1, byte offset 39: invalid UTF-8 code sys/dev/ieee488/upd7210.c: line 27, char 1, byte offset 26: invalid UTF-8 c= ode sys/dev/ieee488/upd7210.h: line 29, char 1, byte offset 23: invalid UTF-8 c= ode sys/dev/nxge/include/xgehal-channel.h: line 142, char 1, byte offset 9: inv= alid UTF-8 code sys/dev/nxge/include/xgehal-config.h: line 624, char 1, byte offset 27: inv= alid UTF-8 code sys/dev/nxge/xgehal/xgehal-fifo-fp.c: line 797, char 1, byte offset 75: inv= alid UTF-8 code sys/dev/pst/pst-iop.c: line 2, char 1, byte offset 34: invalid UTF-8 code sys/dev/pst/pst-iop.h: line 2, char 1, byte offset 34: invalid UTF-8 code sys/dev/pst/pst-pci.c: line 2, char 1, byte offset 34: invalid UTF-8 code sys/dev/pst/pst-raid.c: line 2, char 1, byte offset 34: invalid UTF-8 code sys/dev/si/si2_z280.c: line 50, char 1, byte offset 54: invalid UTF-8 code sys/dev/si/si3_t225.c: line 58, char 1, byte offset 53: invalid UTF-8 code sys/dev/sound/pci/ds1-fw.h: line 825, char 1, byte offset 9: invalid UTF-8 = code sys/dev/syscons/blank/blank_saver.c: line 2, char 1, byte offset 29: invali= d UTF-8 code sys/dev/syscons/fade/fade_saver.c: line 2, char 1, byte offset 29: invalid = UTF-8 code sys/dev/syscons/green/green_saver.c: line 2, char 1, byte offset 29: invali= d UTF-8 code sys/dev/syscons/logo/logo_saver.c: line 2, char 1, byte offset 36: invalid = UTF-8 code sys/dev/syscons/rain/rain_saver.c: line 2, char 1, byte offset 36: invalid = UTF-8 code sys/dev/syscons/schistory.c: line 3, char 1, byte offset 29: invalid UTF-8 = code sys/dev/syscons/snake/snake_saver.c: line 2, char 1, byte offset 29: invali= d UTF-8 code sys/dev/syscons/star/star_saver.c: line 2, char 1, byte offset 29: invalid = UTF-8 code sys/dev/syscons/syscons.c: line 2, char 1, byte offset 29: invalid UTF-8 co= de sys/dev/syscons/syscons.h: line 2, char 1, byte offset 29: invalid UTF-8 co= de sys/dev/syscons/warp/warp_saver.c: line 2, char 1, byte offset 36: invalid = UTF-8 code sys/dev/usb/serial/ucycom.c: line 5, char 1, byte offset 36: invalid UTF-8 = code sys/dev/vxge/include/vxgehal-ll.h: line 370, char 1, byte offset 51: invali= d UTF-8 code sys/fs/procfs/procfs.c: line 2, char 1, byte offset 36: invalid UTF-8 code sys/fs/procfs/procfs_ioctl.c: line 2, char 1, byte offset 36: invalid UTF-8= code sys/fs/pseudofs/pseudofs.c: line 2, char 1, byte offset 36: invalid UTF-8 c= ode sys/fs/pseudofs/pseudofs.h: line 2, char 1, byte offset 36: invalid UTF-8 c= ode sys/fs/pseudofs/pseudofs_fileno.c: line 2, char 1, byte offset 36: invalid = UTF-8 code sys/fs/pseudofs/pseudofs_internal.h: line 2, char 1, byte offset 36: invali= d UTF-8 code sys/fs/pseudofs/pseudofs_vncache.c: line 2, char 1, byte offset 36: invalid= UTF-8 code sys/fs/pseudofs/pseudofs_vnops.c: line 2, char 1, byte offset 36: invalid U= TF-8 code sys/gnu/fs/reiserfs/reiserfs_fs.h: line 5, char 1, byte offset 31: invalid = UTF-8 code sys/gnu/fs/reiserfs/reiserfs_fs_i.h: line 5, char 1, byte offset 31: invali= d UTF-8 code sys/gnu/fs/reiserfs/reiserfs_fs_sb.h: line 5, char 1, byte offset 31: inval= id UTF-8 code sys/gnu/fs/reiserfs/reiserfs_hashes.c: line 5, char 1, byte offset 31: inva= lid UTF-8 code sys/gnu/fs/reiserfs/reiserfs_inode.c: line 5, char 1, byte offset 31: inval= id UTF-8 code sys/gnu/fs/reiserfs/reiserfs_item_ops.c: line 5, char 1, byte offset 31: in= valid UTF-8 code sys/gnu/fs/reiserfs/reiserfs_mount.h: line 5, char 1, byte offset 31: inval= id UTF-8 code sys/gnu/fs/reiserfs/reiserfs_namei.c: line 5, char 1, byte offset 31: inval= id UTF-8 code sys/gnu/fs/reiserfs/reiserfs_prints.c: line 5, char 1, byte offset 31: inva= lid UTF-8 code sys/gnu/fs/reiserfs/reiserfs_stree.c: line 5, char 1, byte offset 31: inval= id UTF-8 code sys/gnu/fs/reiserfs/reiserfs_vfsops.c: line 5, char 1, byte offset 31: inva= lid UTF-8 code sys/gnu/fs/reiserfs/reiserfs_vnops.c: line 5, char 1, byte offset 31: inval= id UTF-8 code sys/i386/ibcs2/coff.h: line 3, char 1, byte offset 24: invalid UTF-8 code sys/i386/ibcs2/ibcs2_isc.c: line 2, char 1, byte offset 24: invalid UTF-8 c= ode sys/i386/ibcs2/ibcs2_sysi86.c: line 2, char 1, byte offset 24: invalid UTF-= 8 code sys/i386/ibcs2/ibcs2_xenix.c: line 3, char 1, byte offset 24: invalid UTF-8= code sys/i386/ibcs2/imgact_coff.c: line 3, char 1, byte offset 24: invalid UTF-8= code sys/i386/include/pcaudioio.h: line 2, char 1, byte offset 24: invalid UTF-8= code sys/i386/linux/imgact_linux.c: line 2, char 1, byte offset 29: invalid UTF-= 8 code sys/i386/linux/linux.h: line 2, char 1, byte offset 29: invalid UTF-8 code sys/i386/linux/linux_dummy.c: line 2, char 1, byte offset 29: invalid UTF-8= code sys/i386/linux/linux_sysvec.c: line 2, char 1, byte offset 29: invalid UTF-= 8 code sys/kern/imgact_elf.c: line 3, char 1, byte offset 29: invalid UTF-8 code sys/ofed/drivers/infiniband/core/local_sa.c: line 2, char 1, byte offset 41= : invalid UTF-8 code sys/ofed/drivers/infiniband/core/notice.c: line 2, char 1, byte offset 41: = invalid UTF-8 code sys/sys/ata.h: line 2, char 1, byte offset 31: invalid UTF-8 code sys/sys/cdrio.h: line 2, char 1, byte offset 34: invalid UTF-8 code sys/sys/consio.h: line 2, char 1, byte offset 29: invalid UTF-8 code sys/sys/dvdio.h: line 2, char 1, byte offset 39: invalid UTF-8 code sys/sys/imgact_elf.h: line 2, char 1, byte offset 29: invalid UTF-8 code tools/regression/msdosfs/msdosfstest-3.sh: line 12, char 1, byte offset 36:= invalid UTF-8 code tools/regression/msdosfs/msdosfstest-4.sh: line 12, char 1, byte offset 24:= invalid UTF-8 code tools/regression/msdosfs/msdosfstest-5.sh: line 14, char 1, byte offset 25:= invalid UTF-8 code tools/regression/msdosfs/msdosfstest-6.sh: line 12, char 1, byte offset 25:= invalid UTF-8 code tools/regression/usr.bin/file2c/regress.in: line 1, char 1, byte offset 1: = invalid UTF-8 code tools/regression/usr.bin/lastcomm/v1-amd64-acct.in: line 1, char 1, byte of= fset 23: invalid UTF-8 code tools/regression/usr.bin/lastcomm/v1-i386-acct.in: line 1, char 1, byte off= set 23: invalid UTF-8 code tools/regression/usr.bin/lastcomm/v1-sparc64-acct.in: line 1, char 1, byte = offset 31: invalid UTF-8 code tools/regression/usr.bin/lastcomm/v2-amd64-acct.in: line 1, char 1, byte of= fset 26: invalid UTF-8 code tools/regression/usr.bin/lastcomm/v2-i386-acct.in: line 1, char 1, byte off= set 30: invalid UTF-8 code tools/regression/usr.bin/lastcomm/v2-sparc64-acct.in: line 1, char 1, byte = offset 30: invalid UTF-8 code tools/regression/usr.bin/make/archives/fmt_44bsd/libtest.a: line 4, char 1,= byte offset 353: invalid UTF-8 code tools/regression/usr.bin/make/archives/fmt_44bsd_mod/libtest.a: line 4, cha= r 1, byte offset 353: invalid UTF-8 code tools/regression/usr.bin/make/archives/fmt_oldbsd/libtest.a: line 3, char 1= , byte offset 353: invalid UTF-8 code tools/regression/usr.bin/uudecode/regress.out: line 1, char 1, byte offset = 3: invalid UTF-8 code tools/regression/usr.bin/uuencode/regress.in: line 1, char 1, byte offset 3= : invalid UTF-8 code tools/regression/usr.sbin/sa/v1-amd64-sav.in: line 1, char 1, byte offset 4= 115: invalid UTF-8 code tools/regression/usr.sbin/sa/v1-amd64-usr.in: line 1, char 1, byte offset 4= 115: invalid UTF-8 code tools/regression/usr.sbin/sa/v1-i386-sav.in: line 1, char 1, byte offset 41= 15: invalid UTF-8 code tools/regression/usr.sbin/sa/v1-i386-usr.in: line 1, char 1, byte offset 41= 15: invalid UTF-8 code tools/regression/usr.sbin/sa/v1-sparc64-sav.in: line 1, char 1, byte offset= 8214: invalid UTF-8 code tools/regression/usr.sbin/sa/v1-sparc64-usr.in: line 1, char 1, byte offset= 8212: invalid UTF-8 code tools/regression/usr.sbin/sa/v2-amd64-sav.in: line 1, char 1, byte offset 4= 115: invalid UTF-8 code tools/regression/usr.sbin/sa/v2-amd64-usr.in: line 1, char 1, byte offset 4= 115: invalid UTF-8 code tools/regression/usr.sbin/sa/v2-i386-sav.in: line 1, char 1, byte offset 41= 15: invalid UTF-8 code tools/regression/usr.sbin/sa/v2-i386-usr.in: line 1, char 1, byte offset 41= 15: invalid UTF-8 code tools/regression/usr.sbin/sa/v2-sparc64-sav.in: line 1, char 1, byte offset= 8216: invalid UTF-8 code tools/regression/usr.sbin/sa/v2-sparc64-usr.in: line 1, char 1, byte offset= 8212: invalid UTF-8 code usr.bin/brandelf/brandelf.c: line 3, char 1, byte offset 24: invalid UTF-8 = code usr.bin/calendar/calendars/calendar.birthday: line 294, char 1, byte offset= 28: invalid UTF-8 code usr.bin/calendar/calendars/calendar.freebsd: line 329, char 1, byte offset = 15: invalid UTF-8 code usr.bin/calendar/calendars/calendar.history: line 305, char 1, byte offset = 9: invalid UTF-8 code usr.bin/calendar/calendars/calendar.music: line 228, char 1, byte offset 42= : invalid UTF-8 code usr.bin/logins/logins.1: line 2, char 1, byte offset 37: invalid UTF-8 code usr.bin/logins/logins.c: line 2, char 1, byte offset 36: invalid UTF-8 code usr.bin/sockstat/sockstat.1: line 2, char 1, byte offset 37: invalid UTF-8 = code usr.bin/sockstat/sockstat.c: line 2, char 1, byte offset 36: invalid UTF-8 = code usr.bin/unzip/unzip.1: line 2, char 1, byte offset 42: invalid UTF-8 code usr.bin/unzip/unzip.c: line 3, char 1, byte offset 41: invalid UTF-8 code usr.bin/whereis/pathnames.h: line 2, char 1, byte offset 14: invalid UTF-8 = code usr.bin/whereis/whereis.c: line 2, char 1, byte offset 14: invalid UTF-8 co= de usr.sbin/acpi/acpiconf/acpiconf.8: line 2, char 1, byte offset 37: invalid = UTF-8 code usr.sbin/bluetooth/hccontrol/host_controller_baseband.c: line 1635, char 1,= byte offset 32: invalid UTF-8 code usr.sbin/burncd/burncd.8: line 2, char 1, byte offset 35: invalid UTF-8 code usr.sbin/burncd/burncd.c: line 2, char 1, byte offset 34: invalid UTF-8 code usr.sbin/chkgrp/chkgrp.8: line 1, char 1, byte offset 37: invalid UTF-8 code usr.sbin/chkgrp/chkgrp.c: line 2, char 1, byte offset 36: invalid UTF-8 code usr.sbin/kbdcontrol/kbdcontrol.c: line 2, char 1, byte offset 29: invalid U= TF-8 code usr.sbin/kbdcontrol/lex.h: line 2, char 1, byte offset 29: invalid UTF-8 co= de usr.sbin/kbdcontrol/lex.l: line 2, char 1, byte offset 29: invalid UTF-8 co= de usr.sbin/kldxref/kldxref.8: line 3, char 1, byte offset 37: invalid UTF-8 c= ode usr.sbin/pkg_install/updating/main.c: line 6, char 1, byte offset 76: inval= id UTF-8 code usr.sbin/pkg_install/updating/pathnames.h: line 6, char 1, byte offset 76: = invalid UTF-8 code usr.sbin/pkg_install/updating/pkg_updating.1: line 9, char 1, byte offset 7= 7: invalid UTF-8 code usr.sbin/vidcontrol/decode.c: line 2, char 1, byte offset 24: invalid UTF-8= code usr.sbin/vidcontrol/vidcontrol.c: line 2, char 1, byte offset 29: invalid U= TF-8 code --=20 Ed Schouten WWW: http://80386.nl/ --+9faIjRurCDpBc7U Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO/IGOAAoJEG5e2P40kaK7PvAP+QHrN6oMomRI9win6hHzZaR2 WVMktGGdFQ6SeqD1JyAg4tGOIEiqrtBJaT2p0d6Ev/FP6tmU/R6wivNaWGLnGRWQ sQaNVA4Tht+fnhcxhWtW0k+TB632fUCB0/9AqKlALHH+M6WkCPMfxMwjp0HXSkWz vTnfokKwyMIG8gBNOiiUHIXyEPNZ3GQIjRNXvT1pJi1mtaGzxrnbifqZk+pJNRCq rVdLV9m3y93RWY7rzAZdNXFN+jQ5AQcMF5NKxXYmSnomA21xv2zoh/38jv+HyNM/ ZWiL83fHxf42TWpYpvcHOO7x4waRBf91BI0gGCJRBOAcgoy481X7nQpTkwu8JeZU fdE/lpHHnyRybrM931ojk3Rc/2vJTSEUbpeS0kVIBmSkmkYLRWcKiF7oruu/zlIm cCLJkQmhvQm4UHrHglCj5ckMi113DQuxKFsv/WjP/LlVLqVVPOLdk+kM1CkAsyCR Ju2q5zracECZpJ0yPb6nHdf/IOFNnG+jMDHJKNrUfH0HhcTiqgs7mJhrTNfO2Jox WHhP2teLaIBLoE/qBRCb0mzCd62PsKk7GlQWLmLJ0VYFDW3wCDjdaYQz4rKU2do9 EjgVRSlwl1oPfYrACXBaSyWk4T+xbKUzeSzc29fsTMayN3LQWznVvaI4i856Ekj1 Xziy1eyCNTxpZyGoYOHV =khw9 -----END PGP SIGNATURE----- --+9faIjRurCDpBc7U-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 15:06:50 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70F7D106573B; Thu, 29 Dec 2011 15:06:50 +0000 (UTC) (envelope-from uqs@spoerlein.net) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2a01:4f8:131:23c2::1]) by mx1.freebsd.org (Postfix) with ESMTP id C74888FC13; Thu, 29 Dec 2011 15:06:49 +0000 (UTC) Received: from [176.99.102.219] ([176.99.102.219]) (authenticated bits=0) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id pBTF6je0049776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 29 Dec 2011 16:06:47 +0100 (CET) (envelope-from uqs@spoerlein.net) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=spoerlein.net; s=dkim200908; t=1325171208; bh=CAS0AqeuSn/LKMQL5BqMv32N2mC+6XNgLfY4IyTKeqs=; h=References:In-Reply-To:MIME-Version:Content-Type:Subject:From: Date:To:CC:Message-ID; b=NARZGil6SOvvg+XFJ1S+gSob2e/4tBs/jybupPVcelXe2/+53qTD15KwqJXG7L6+n 5SMzcarL4YjPdz1BkExeRwAYjcG2oVPxkPaELIQk+GJC4sN9xHAtuJnPcvgSmLouba dN8n66TYOvyId0PtB2IY29BoXs72XZ9hdr/LrfWQ= References: <201112291233.pBTCXS3v056250@svn.freebsd.org> <20111229150446.GH1895@hoeg.nl> User-Agent: K-9 Mail for Android In-Reply-To: <20111229150446.GH1895@hoeg.nl> MIME-Version: 1.0 From: =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= Date: Thu, 29 Dec 2011 16:06:42 +0100 To: Ed Schouten , Ulrich Spoerlein Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228953 - in head/tools: regression/pthread/mutex_isowned_np tools/ansify tools/genericize tools/hcomp tools/mtxstat tools/prstats tools/whereintheworld X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 15:06:50 -0000 I know :) Making my way through them one subdir at a time... Cheers Uli From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 15:35:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 461A7106586D; Thu, 29 Dec 2011 15:35:00 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3406C8FC13; Thu, 29 Dec 2011 15:35:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTFZ05I061761; Thu, 29 Dec 2011 15:35:00 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTFYxkZ061756; Thu, 29 Dec 2011 15:34:59 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201112291534.pBTFYxkZ061756@svn.freebsd.org> From: Robert Watson Date: Thu, 29 Dec 2011 15:34:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228956 - head/tools/tools/netrate/tcpp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 15:35:00 -0000 Author: rwatson Date: Thu Dec 29 15:34:59 2011 New Revision: 228956 URL: http://svn.freebsd.org/changeset/base/228956 Log: Fix typo in comment. MFC after: 3 days Modified: head/tools/tools/netrate/tcpp/tcpp_client.c Modified: head/tools/tools/netrate/tcpp/tcpp_client.c ============================================================================== --- head/tools/tools/netrate/tcpp/tcpp_client.c Thu Dec 29 14:41:17 2011 (r228955) +++ head/tools/tools/netrate/tcpp/tcpp_client.c Thu Dec 29 15:34:59 2011 (r228956) @@ -99,7 +99,7 @@ tcpp_client_newconn(void) int fd, i; /* - * Spread load over available IPs, roating through them as we go. No + * Spread load over available IPs, rotating through them as we go. No * attempt to localize IPs to particular workers. */ sin = localipbase; From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 15:35:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F2FE1065870; Thu, 29 Dec 2011 15:35:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6C38C8FC19; Thu, 29 Dec 2011 15:35:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTFZ0eR061775; Thu, 29 Dec 2011 15:35:00 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTFZ09v061763; Thu, 29 Dec 2011 15:35:00 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112291535.pBTFZ09v061763@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2011 15:35:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228957 - in head/sys: amd64/linux32 compat/linux i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 15:35:00 -0000 Author: jhb Date: Thu Dec 29 15:34:59 2011 New Revision: 228957 URL: http://svn.freebsd.org/changeset/base/228957 Log: Implement linux_fadvise64() and linux_fadvise64_64() using kern_posix_fadvise(). Reviewed by: silence on emulation@ MFC after: 2 weeks Modified: head/sys/amd64/linux32/linux.h head/sys/amd64/linux32/linux32_dummy.c head/sys/amd64/linux32/syscalls.master head/sys/compat/linux/linux_file.c head/sys/i386/linux/linux.h head/sys/i386/linux/linux_dummy.c head/sys/i386/linux/syscalls.master Modified: head/sys/amd64/linux32/linux.h ============================================================================== --- head/sys/amd64/linux32/linux.h Thu Dec 29 15:34:59 2011 (r228956) +++ head/sys/amd64/linux32/linux.h Thu Dec 29 15:34:59 2011 (r228957) @@ -597,6 +597,16 @@ int linux_ioctl_unregister_handler(struc #define LINUX_F_UNLCK 2 /* + * posix_fadvise advice + */ +#define LINUX_POSIX_FADV_NORMAL 0 +#define LINUX_POSIX_FADV_RANDOM 1 +#define LINUX_POSIX_FADV_SEQUENTIAL 2 +#define LINUX_POSIX_FADV_WILLNEED 3 +#define LINUX_POSIX_FADV_DONTNEED 4 +#define LINUX_POSIX_FADV_NOREUSE 5 + +/* * mount flags */ #define LINUX_MS_RDONLY 0x0001 Modified: head/sys/amd64/linux32/linux32_dummy.c ============================================================================== --- head/sys/amd64/linux32/linux32_dummy.c Thu Dec 29 15:34:59 2011 (r228956) +++ head/sys/amd64/linux32/linux32_dummy.c Thu Dec 29 15:34:59 2011 (r228957) @@ -59,7 +59,6 @@ DUMMY(setfsuid); DUMMY(setfsgid); DUMMY(pivot_root); DUMMY(mincore); -DUMMY(fadvise64); DUMMY(ptrace); DUMMY(lookup_dcookie); DUMMY(epoll_create); @@ -72,7 +71,6 @@ DUMMY(timer_gettime); DUMMY(timer_getoverrun); DUMMY(timer_delete); DUMMY(fstatfs64); -DUMMY(fadvise64_64); DUMMY(mbind); DUMMY(get_mempolicy); DUMMY(set_mempolicy); Modified: head/sys/amd64/linux32/syscalls.master ============================================================================== --- head/sys/amd64/linux32/syscalls.master Thu Dec 29 15:34:59 2011 (r228956) +++ head/sys/amd64/linux32/syscalls.master Thu Dec 29 15:34:59 2011 (r228957) @@ -419,7 +419,8 @@ 247 AUE_NULL UNIMPL linux_io_getevents 248 AUE_NULL UNIMPL linux_io_submit 249 AUE_NULL UNIMPL linux_io_cancel -250 AUE_NULL STD { int linux_fadvise64(void); } +250 AUE_NULL STD { int linux_fadvise64(int fd, l_loff_t offset, \ + l_size_t len, int advice); } 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } @@ -443,7 +444,9 @@ 270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); } 271 AUE_UTIMES STD { int linux_utimes(char *fname, \ struct l_timeval *tptr); } -272 AUE_NULL STD { int linux_fadvise64_64(void); } +272 AUE_NULL STD { int linux_fadvise64_64(int fd, \ + l_loff_t offset, l_loff_t len, \ + int advice); } 273 AUE_NULL UNIMPL 274 AUE_NULL STD { int linux_mbind(void); } 275 AUE_NULL STD { int linux_get_mempolicy(void); } Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Thu Dec 29 15:34:59 2011 (r228956) +++ head/sys/compat/linux/linux_file.c Thu Dec 29 15:34:59 2011 (r228957) @@ -1530,3 +1530,48 @@ linux_lchown(struct thread *td, struct l LFREEPATH(path); return (error); } + +static int +convert_fadvice(int advice) +{ + switch (advice) { + case LINUX_POSIX_FADV_NORMAL: + return (POSIX_FADV_NORMAL); + case LINUX_POSIX_FADV_RANDOM: + return (POSIX_FADV_RANDOM); + case LINUX_POSIX_FADV_SEQUENTIAL: + return (POSIX_FADV_SEQUENTIAL); + case LINUX_POSIX_FADV_WILLNEED: + return (POSIX_FADV_WILLNEED); + case LINUX_POSIX_FADV_DONTNEED: + return (POSIX_FADV_DONTNEED); + case LINUX_POSIX_FADV_NOREUSE: + return (POSIX_FADV_NOREUSE); + default: + return (-1); + } +} + +int +linux_fadvise64(struct thread *td, struct linux_fadvise64_args *args) +{ + int advice; + + advice = convert_fadvice(args->advice); + if (advice == -1) + return (EINVAL); + return (kern_posix_fadvise(td, args->fd, args->offset, args->len, + advice)); +} + +int +linux_fadvise64_64(struct thread *td, struct linux_fadvise64_64_args *args) +{ + int advice; + + advice = convert_fadvice(args->advice); + if (advice == -1) + return (EINVAL); + return (kern_posix_fadvise(td, args->fd, args->offset, args->len, + advice)); +} Modified: head/sys/i386/linux/linux.h ============================================================================== --- head/sys/i386/linux/linux.h Thu Dec 29 15:34:59 2011 (r228956) +++ head/sys/i386/linux/linux.h Thu Dec 29 15:34:59 2011 (r228957) @@ -573,6 +573,16 @@ int linux_ioctl_unregister_handler(struc #define LINUX_F_UNLCK 2 /* + * posix_fadvise advice + */ +#define LINUX_POSIX_FADV_NORMAL 0 +#define LINUX_POSIX_FADV_RANDOM 1 +#define LINUX_POSIX_FADV_SEQUENTIAL 2 +#define LINUX_POSIX_FADV_WILLNEED 3 +#define LINUX_POSIX_FADV_DONTNEED 4 +#define LINUX_POSIX_FADV_NOREUSE 5 + +/* * mount flags */ #define LINUX_MS_RDONLY 0x0001 Modified: head/sys/i386/linux/linux_dummy.c ============================================================================== --- head/sys/i386/linux/linux_dummy.c Thu Dec 29 15:34:59 2011 (r228956) +++ head/sys/i386/linux/linux_dummy.c Thu Dec 29 15:34:59 2011 (r228957) @@ -62,14 +62,12 @@ DUMMY(setfsuid); DUMMY(setfsgid); DUMMY(pivot_root); DUMMY(mincore); -DUMMY(fadvise64); DUMMY(lookup_dcookie); DUMMY(epoll_create); DUMMY(epoll_ctl); DUMMY(epoll_wait); DUMMY(remap_file_pages); DUMMY(fstatfs64); -DUMMY(fadvise64_64); DUMMY(mbind); DUMMY(get_mempolicy); DUMMY(set_mempolicy); Modified: head/sys/i386/linux/syscalls.master ============================================================================== --- head/sys/i386/linux/syscalls.master Thu Dec 29 15:34:59 2011 (r228956) +++ head/sys/i386/linux/syscalls.master Thu Dec 29 15:34:59 2011 (r228957) @@ -421,7 +421,8 @@ 247 AUE_NULL UNIMPL linux_io_getevents 248 AUE_NULL UNIMPL linux_io_submit 249 AUE_NULL UNIMPL linux_io_cancel -250 AUE_NULL STD { int linux_fadvise64(void); } +250 AUE_NULL STD { int linux_fadvise64(int fd, l_loff_t offset, \ + l_size_t len, int advice); } 251 AUE_NULL UNIMPL 252 AUE_EXIT STD { int linux_exit_group(int error_code); } 253 AUE_NULL STD { int linux_lookup_dcookie(void); } @@ -447,7 +448,9 @@ 270 AUE_NULL STD { int linux_tgkill(int tgid, int pid, int sig); } 271 AUE_UTIMES STD { int linux_utimes(char *fname, \ struct l_timeval *tptr); } -272 AUE_NULL STD { int linux_fadvise64_64(void); } +272 AUE_NULL STD { int linux_fadvise64_64(int fd, \ + l_loff_t offset, l_loff_t len, \ + int advice); } 273 AUE_NULL UNIMPL 274 AUE_NULL STD { int linux_mbind(void); } 275 AUE_NULL STD { int linux_get_mempolicy(void); } From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 15:35:48 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21800106566B; Thu, 29 Dec 2011 15:35:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 02CE98FC19; Thu, 29 Dec 2011 15:35:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTFZlL2061843; Thu, 29 Dec 2011 15:35:47 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTFZlXC061832; Thu, 29 Dec 2011 15:35:47 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112291535.pBTFZlXC061832@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2011 15:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228958 - in head/sys: amd64/linux32 i386/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 15:35:48 -0000 Author: jhb Date: Thu Dec 29 15:35:47 2011 New Revision: 228958 URL: http://svn.freebsd.org/changeset/base/228958 Log: Regen. Modified: head/sys/amd64/linux32/linux32_proto.h head/sys/amd64/linux32/linux32_syscall.h head/sys/amd64/linux32/linux32_syscalls.c head/sys/amd64/linux32/linux32_sysent.c head/sys/amd64/linux32/linux32_systrace_args.c head/sys/i386/linux/linux_proto.h head/sys/i386/linux/linux_syscall.h head/sys/i386/linux/linux_syscalls.c head/sys/i386/linux/linux_sysent.c head/sys/i386/linux/linux_systrace_args.c Modified: head/sys/amd64/linux32/linux32_proto.h ============================================================================== --- head/sys/amd64/linux32/linux32_proto.h Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/amd64/linux32/linux32_proto.h Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ #ifndef _LINUX_SYSPROTO_H_ @@ -756,7 +756,10 @@ struct linux_set_thread_area_args { char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; char desc_r_[PADR_(struct l_user_desc *)]; }; struct linux_fadvise64_args { - register_t dummy; + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; struct linux_exit_group_args { char error_code_l_[PADL_(int)]; int error_code; char error_code_r_[PADR_(int)]; @@ -830,7 +833,10 @@ struct linux_utimes_args { char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char tptr_r_[PADR_(struct l_timeval *)]; }; struct linux_fadvise64_64_args { - register_t dummy; + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)]; + char len_l_[PADL_(l_loff_t)]; l_loff_t len; char len_r_[PADR_(l_loff_t)]; + char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; struct linux_mbind_args { register_t dummy; Modified: head/sys/amd64/linux32/linux32_syscall.h ============================================================================== --- head/sys/amd64/linux32/linux32_syscall.h Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/amd64/linux32/linux32_syscall.h Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ #define LINUX_SYS_exit 1 Modified: head/sys/amd64/linux32/linux32_syscalls.c ============================================================================== --- head/sys/amd64/linux32/linux32_syscalls.c Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/amd64/linux32/linux32_syscalls.c Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ const char *linux_syscallnames[] = { Modified: head/sys/amd64/linux32/linux32_sysent.c ============================================================================== --- head/sys/amd64/linux32/linux32_sysent.c Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/amd64/linux32/linux32_sysent.c Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/amd64/linux32/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ #include "opt_compat.h" @@ -269,7 +269,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 247 = linux_io_getevents */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = linux_io_submit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = linux_io_cancel */ - { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */ + { AS(linux_fadvise64_args), (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */ @@ -291,7 +291,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */ { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */ { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */ - { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ + { AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = */ { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_mbind */ { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_get_mempolicy */ Modified: head/sys/amd64/linux32/linux32_systrace_args.c ============================================================================== --- head/sys/amd64/linux32/linux32_systrace_args.c Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/amd64/linux32/linux32_systrace_args.c Thu Dec 29 15:35:47 2011 (r228958) @@ -1674,7 +1674,12 @@ systrace_args(int sysnum, void *params, } /* linux_fadvise64 */ case 250: { - *n_args = 0; + struct linux_fadvise64_args *p = params; + iarg[0] = p->fd; /* int */ + iarg[1] = p->offset; /* l_loff_t */ + iarg[2] = p->len; /* l_size_t */ + iarg[3] = p->advice; /* int */ + *n_args = 4; break; } /* linux_exit_group */ @@ -1808,7 +1813,12 @@ systrace_args(int sysnum, void *params, } /* linux_fadvise64_64 */ case 272: { - *n_args = 0; + struct linux_fadvise64_64_args *p = params; + iarg[0] = p->fd; /* int */ + iarg[1] = p->offset; /* l_loff_t */ + iarg[2] = p->len; /* l_loff_t */ + iarg[3] = p->advice; /* int */ + *n_args = 4; break; } /* linux_mbind */ @@ -4614,6 +4624,22 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_fadvise64 */ case 250: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "l_loff_t"; + break; + case 2: + p = "l_size_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; break; /* linux_exit_group */ case 252: @@ -4773,6 +4799,22 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_fadvise64_64 */ case 272: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "l_loff_t"; + break; + case 2: + p = "l_loff_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; break; /* linux_mbind */ case 274: @@ -6089,6 +6131,9 @@ systrace_return_setargdesc(int sysnum, i break; /* linux_fadvise64 */ case 250: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_exit_group */ case 252: if (ndx == 0 || ndx == 1) @@ -6158,6 +6203,9 @@ systrace_return_setargdesc(int sysnum, i break; /* linux_fadvise64_64 */ case 272: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mbind */ case 274: /* linux_get_mempolicy */ Modified: head/sys/i386/linux/linux_proto.h ============================================================================== --- head/sys/i386/linux/linux_proto.h Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/i386/linux/linux_proto.h Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ #ifndef _LINUX_SYSPROTO_H_ @@ -756,7 +756,10 @@ struct linux_get_thread_area_args { char desc_l_[PADL_(struct l_user_desc *)]; struct l_user_desc * desc; char desc_r_[PADR_(struct l_user_desc *)]; }; struct linux_fadvise64_args { - register_t dummy; + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)]; + char len_l_[PADL_(l_size_t)]; l_size_t len; char len_r_[PADR_(l_size_t)]; + char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; struct linux_exit_group_args { char error_code_l_[PADL_(int)]; int error_code; char error_code_r_[PADR_(int)]; @@ -835,7 +838,10 @@ struct linux_utimes_args { char tptr_l_[PADL_(struct l_timeval *)]; struct l_timeval * tptr; char tptr_r_[PADR_(struct l_timeval *)]; }; struct linux_fadvise64_64_args { - register_t dummy; + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char offset_l_[PADL_(l_loff_t)]; l_loff_t offset; char offset_r_[PADR_(l_loff_t)]; + char len_l_[PADL_(l_loff_t)]; l_loff_t len; char len_r_[PADR_(l_loff_t)]; + char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; struct linux_mbind_args { register_t dummy; Modified: head/sys/i386/linux/linux_syscall.h ============================================================================== --- head/sys/i386/linux/linux_syscall.h Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/i386/linux/linux_syscall.h Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ #define LINUX_SYS_exit 1 Modified: head/sys/i386/linux/linux_syscalls.c ============================================================================== --- head/sys/i386/linux/linux_syscalls.c Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/i386/linux/linux_syscalls.c Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ const char *linux_syscallnames[] = { Modified: head/sys/i386/linux/linux_sysent.c ============================================================================== --- head/sys/i386/linux/linux_sysent.c Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/i386/linux/linux_sysent.c Thu Dec 29 15:35:47 2011 (r228958) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/i386/linux/syscalls.master 227693 2011-11-19 07:19:37Z ed + * created from FreeBSD: head/sys/i386/linux/syscalls.master 228957 2011-12-29 15:34:59Z jhb */ #include @@ -268,7 +268,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 247 = linux_io_getevents */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 248 = linux_io_submit */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 249 = linux_io_cancel */ - { 0, (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */ + { AS(linux_fadvise64_args), (sy_call_t *)linux_fadvise64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 250 = linux_fadvise64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 251 = */ { AS(linux_exit_group_args), (sy_call_t *)linux_exit_group, AUE_EXIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = linux_exit_group */ { 0, (sy_call_t *)linux_lookup_dcookie, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = linux_lookup_dcookie */ @@ -290,7 +290,7 @@ struct sysent linux_sysent[] = { { 0, (sy_call_t *)linux_fstatfs64, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 269 = linux_fstatfs64 */ { AS(linux_tgkill_args), (sy_call_t *)linux_tgkill, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 270 = linux_tgkill */ { AS(linux_utimes_args), (sy_call_t *)linux_utimes, AUE_UTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 271 = linux_utimes */ - { 0, (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ + { AS(linux_fadvise64_64_args), (sy_call_t *)linux_fadvise64_64, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 272 = linux_fadvise64_64 */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 273 = */ { 0, (sy_call_t *)linux_mbind, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 274 = linux_mbind */ { 0, (sy_call_t *)linux_get_mempolicy, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 275 = linux_get_mempolicy */ Modified: head/sys/i386/linux/linux_systrace_args.c ============================================================================== --- head/sys/i386/linux/linux_systrace_args.c Thu Dec 29 15:34:59 2011 (r228957) +++ head/sys/i386/linux/linux_systrace_args.c Thu Dec 29 15:35:47 2011 (r228958) @@ -1724,7 +1724,12 @@ systrace_args(int sysnum, void *params, } /* linux_fadvise64 */ case 250: { - *n_args = 0; + struct linux_fadvise64_args *p = params; + iarg[0] = p->fd; /* int */ + iarg[1] = p->offset; /* l_loff_t */ + iarg[2] = p->len; /* l_size_t */ + iarg[3] = p->advice; /* int */ + *n_args = 4; break; } /* linux_exit_group */ @@ -1873,7 +1878,12 @@ systrace_args(int sysnum, void *params, } /* linux_fadvise64_64 */ case 272: { - *n_args = 0; + struct linux_fadvise64_64_args *p = params; + iarg[0] = p->fd; /* int */ + iarg[1] = p->offset; /* l_loff_t */ + iarg[2] = p->len; /* l_loff_t */ + iarg[3] = p->advice; /* int */ + *n_args = 4; break; } /* linux_mbind */ @@ -4776,6 +4786,22 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_fadvise64 */ case 250: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "l_loff_t"; + break; + case 2: + p = "l_size_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; break; /* linux_exit_group */ case 252: @@ -4985,6 +5011,22 @@ systrace_entry_setargdesc(int sysnum, in break; /* linux_fadvise64_64 */ case 272: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "l_loff_t"; + break; + case 2: + p = "l_loff_t"; + break; + case 3: + p = "int"; + break; + default: + break; + }; break; /* linux_mbind */ case 274: @@ -6414,6 +6456,9 @@ systrace_return_setargdesc(int sysnum, i break; /* linux_fadvise64 */ case 250: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_exit_group */ case 252: if (ndx == 0 || ndx == 1) @@ -6498,6 +6543,9 @@ systrace_return_setargdesc(int sysnum, i break; /* linux_fadvise64_64 */ case 272: + if (ndx == 0 || ndx == 1) + p = "int"; + break; /* linux_mbind */ case 274: /* linux_get_mempolicy */ From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 15:59:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E0C61065689; Thu, 29 Dec 2011 15:59:15 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C9778FC08; Thu, 29 Dec 2011 15:59:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTFxFDu062567; Thu, 29 Dec 2011 15:59:15 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTFxFP5062565; Thu, 29 Dec 2011 15:59:15 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112291559.pBTFxFP5062565@svn.freebsd.org> From: Gleb Smirnoff Date: Thu, 29 Dec 2011 15:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228959 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 15:59:15 -0000 Author: glebius Date: Thu Dec 29 15:59:14 2011 New Revision: 228959 URL: http://svn.freebsd.org/changeset/base/228959 Log: Don't fallback to a CARP address in BACKUP state. Modified: head/sys/netinet/if_ether.c Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Dec 29 15:35:47 2011 (r228958) +++ head/sys/netinet/if_ether.c Thu Dec 29 15:59:14 2011 (r228959) @@ -610,7 +610,9 @@ in_arpinput(struct mbuf *m) */ IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) - if (ifa->ifa_addr->sa_family == AF_INET) { + if (ifa->ifa_addr->sa_family == AF_INET && + (ifa->ifa_carp == NULL || + (*carp_iamatch_p)(ifa, &enaddr))) { ia = ifatoia(ifa); ifa_ref(ifa); IF_ADDR_UNLOCK(ifp); From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 16:17:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9030E106566C; Thu, 29 Dec 2011 16:17:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EB748FC19; Thu, 29 Dec 2011 16:17:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTGHHT4063163; Thu, 29 Dec 2011 16:17:17 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTGHHQs063161; Thu, 29 Dec 2011 16:17:17 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112291617.pBTGHHQs063161@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2011 16:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228960 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 16:17:17 -0000 Author: jhb Date: Thu Dec 29 16:17:16 2011 New Revision: 228960 URL: http://svn.freebsd.org/changeset/base/228960 Log: Cap the priority calculated from the current thread's running tick count at SCHED_PRI_RANGE to prevent overflows in the priority value. This can happen due to irregularities with clock interrupts under certain virtualization environments. Tested by: Larry Rosenman ler lerctr org MFC after: 2 weeks Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c ============================================================================== --- head/sys/kern/sched_ule.c Thu Dec 29 15:59:14 2011 (r228959) +++ head/sys/kern/sched_ule.c Thu Dec 29 16:17:16 2011 (r228960) @@ -1434,7 +1434,8 @@ sched_priority(struct thread *td) } else { pri = SCHED_PRI_MIN; if (td->td_sched->ts_ticks) - pri += SCHED_PRI_TICKS(td->td_sched); + pri += min(SCHED_PRI_TICKS(td->td_sched), + SCHED_PRI_RANGE); pri += SCHED_PRI_NICE(td->td_proc->p_nice); KASSERT(pri >= PRI_MIN_BATCH && pri <= PRI_MAX_BATCH, ("sched_priority: invalid priority %d: nice %d, " From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 16:23:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C2441065672; Thu, 29 Dec 2011 16:23:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D49A78FC12; Thu, 29 Dec 2011 16:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTGNEm9063390; Thu, 29 Dec 2011 16:23:14 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTGNEvh063388; Thu, 29 Dec 2011 16:23:14 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112291623.pBTGNEvh063388@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2011 16:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228961 - head/sys/dev/acpica X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 16:23:15 -0000 Author: jhb Date: Thu Dec 29 16:23:14 2011 New Revision: 228961 URL: http://svn.freebsd.org/changeset/base/228961 Log: Further relax the strictness of enforcing allocations to only come from decoded ranges. Pass any request for a specific range that fails because it is not in a decoded range for an ACPI Host-PCI bridge up to the parent to see if it can still be allocated. This is based on the assumption that many BIOSes are inconsistent/broken and that settings programmed into BARs or resources assigned to other built-in components are more trustworthy than the list of decoded resource ranges in _CRS. This effectively limits the decoded ranges to only being used for "wildcard" ranges when allocating fresh resources for a BAR, etc. At some point I would like to only be this permissive during an early scan of firmware-assigned resources during boot and to be strict about all later allocations, but that isn't viable currently. MFC after: 2 weeks Modified: head/sys/dev/acpica/acpi_pcib_acpi.c Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Thu Dec 29 16:17:16 2011 (r228960) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Thu Dec 29 16:23:14 2011 (r228961) @@ -511,8 +511,17 @@ acpi_pcib_acpi_alloc_resource(device_t d sc = device_get_softc(dev); res = pcib_host_res_alloc(&sc->ap_host_res, child, type, rid, start, end, count, flags); + + /* + * XXX: If this is a request for a specific range, assume it is + * correct and pass it up to the parent. What we probably want to + * do long-term is explicitly trust any firmware-configured + * resources during the initial bus scan on boot and then disable + * this after that. + */ if (res == NULL && start + count - 1 == end) - res = acpi_alloc_sysres(child, type, rid, start, end, count, flags); + res = bus_generic_alloc_resource(dev, child, type, rid, start, end, + count, flags); return (res); #else return (bus_generic_alloc_resource(dev, child, type, rid, start, end, From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 16:40:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 998DA1065675; Thu, 29 Dec 2011 16:40:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87F128FC14; Thu, 29 Dec 2011 16:40:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTGetwN063946; Thu, 29 Dec 2011 16:40:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTGetCb063943; Thu, 29 Dec 2011 16:40:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112291640.pBTGetCb063943@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2011 16:40:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228962 - in head/sys: i386/i386 mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 16:40:55 -0000 Author: jhb Date: Thu Dec 29 16:40:54 2011 New Revision: 228962 URL: http://svn.freebsd.org/changeset/base/228962 Log: Use curthread rather than PCPU_GET(curthread). 'curthread' uses special-case optimizations on several platforms and is preferred. Reported by: dim (indirectly) MFC after: 2 weeks Modified: head/sys/i386/i386/sys_machdep.c head/sys/mips/mips/gdb_machdep.c Modified: head/sys/i386/i386/sys_machdep.c ============================================================================== --- head/sys/i386/i386/sys_machdep.c Thu Dec 29 16:23:14 2011 (r228961) +++ head/sys/i386/i386/sys_machdep.c Thu Dec 29 16:40:54 2011 (r228962) @@ -553,7 +553,7 @@ user_ldt_free(struct thread *td) return; } - if (td == PCPU_GET(curthread)) { + if (td == curthread) { #ifdef XEN i386_reset_ldt(&default_proc_ldt); PCPU_SET(currentldt, (int)&default_proc_ldt); Modified: head/sys/mips/mips/gdb_machdep.c ============================================================================== --- head/sys/mips/mips/gdb_machdep.c Thu Dec 29 16:23:14 2011 (r228961) +++ head/sys/mips/mips/gdb_machdep.c Thu Dec 29 16:40:54 2011 (r228962) @@ -116,7 +116,7 @@ gdb_cpu_getreg(int regnum, size_t *regsz { *regsz = gdb_cpu_regsz(regnum); - if (kdb_thread == PCPU_GET(curthread)) { + if (kdb_thread == curthread) { register_t *zero_ptr = &kdb_frame->zero; return zero_ptr + regnum; } @@ -154,7 +154,7 @@ gdb_cpu_setreg(int regnum, void *val) switch (regnum) { case GDB_REG_PC: kdb_thrctx->pcb_context[10] = *(register_t *)val; - if (kdb_thread == PCPU_GET(curthread)) + if (kdb_thread == curthread) kdb_frame->pc = *(register_t *)val; } } From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 17:43:06 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630FE106566C; Thu, 29 Dec 2011 17:43:06 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id E8B2D8FC08; Thu, 29 Dec 2011 17:43:05 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id pBTHdS9Z033057; Thu, 29 Dec 2011 18:39:29 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <4EFCA6A6.6080103@FreeBSD.org> Date: Thu, 29 Dec 2011 18:43:02 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Ed Schouten References: <201112291441.pBTEfI8l060127@svn.freebsd.org> In-Reply-To: <201112291441.pBTEfI8l060127@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228955 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 17:43:07 -0000 On 29.12.11 15:41, Ed Schouten wrote: > Author: ed > Date: Thu Dec 29 14:41:17 2011 > New Revision: 228955 > URL: http://svn.freebsd.org/changeset/base/228955 > > Log: > Don't define static_assert for C++. > > Even though _Static_assert() is pretty robust for C code, it cannot work > correctly with C++ code. This is due to the fact that C++ template > parameters may contain commas that are not enclosed in parentheses. For > example: > > static_assert(foo::bar == baz, "..."); > > This causes _Static_assert to be called with an excessive number of > parameters. If you want to use static_assert in C++, just use a C++11 > compiler. > > Reported on: current@, ports@ Thank you Ed! gcc-4.6 bootstrap successful. Andreas From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 17:46:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E649106566C; Thu, 29 Dec 2011 17:46:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7CE118FC13; Thu, 29 Dec 2011 17:46:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTHkPQa066002; Thu, 29 Dec 2011 17:46:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTHkPNt065999; Thu, 29 Dec 2011 17:46:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112291746.pBTHkPNt065999@svn.freebsd.org> From: Dimitry Andric Date: Thu, 29 Dec 2011 17:46:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228963 - in head/sys/dev: ce cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 17:46:25 -0000 Author: dim Date: Thu Dec 29 17:46:24 2011 New Revision: 228963 URL: http://svn.freebsd.org/changeset/base/228963 Log: Fix clang warnings in sys/dev/ce/if_ce.c and sys/dev/cp/if_cp.c, using jkim's last patch (reviewed by bde) from here: http://docs.freebsd.org/cgi/mid.cgi?201010141558.03154.jkim MFC after: 1 week Modified: head/sys/dev/ce/if_ce.c head/sys/dev/cp/if_cp.c Modified: head/sys/dev/ce/if_ce.c ============================================================================== --- head/sys/dev/ce/if_ce.c Thu Dec 29 16:40:54 2011 (r228962) +++ head/sys/dev/ce/if_ce.c Thu Dec 29 17:46:24 2011 (r228963) @@ -1313,9 +1313,11 @@ static int ce_ioctl (struct cdev *dev, u IFP2SP(d->ifp)->pp_flags &= ~(PP_FR); IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE; d->ifp->if_flags |= PP_CISCO; - } else if (! strcmp ("fr", (char*)data) && PP_FR) { +#if PP_FR != 0 + } else if (! strcmp ("fr", (char*)data)) { d->ifp->if_flags &= ~(PP_CISCO); IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE; +#endif } else if (! strcmp ("ppp", (char*)data)) { IFP2SP(d->ifp)->pp_flags &= ~PP_FR; IFP2SP(d->ifp)->pp_flags &= ~PP_KEEPALIVE; Modified: head/sys/dev/cp/if_cp.c ============================================================================== --- head/sys/dev/cp/if_cp.c Thu Dec 29 16:40:54 2011 (r228962) +++ head/sys/dev/cp/if_cp.c Thu Dec 29 17:46:24 2011 (r228963) @@ -1052,9 +1052,11 @@ static int cp_ioctl (struct cdev *dev, u IFP2SP(d->ifp)->pp_flags &= ~(PP_FR); IFP2SP(d->ifp)->pp_flags |= PP_KEEPALIVE; d->ifp->if_flags |= PP_CISCO; - } else if (! strcmp ("fr", (char*)data) && PP_FR) { +#if PP_FR != 0 + } else if (! strcmp ("fr", (char*)data)) { d->ifp->if_flags &= ~(PP_CISCO); IFP2SP(d->ifp)->pp_flags |= PP_FR | PP_KEEPALIVE; +#endif } else if (! strcmp ("ppp", (char*)data)) { IFP2SP(d->ifp)->pp_flags &= ~PP_FR; IFP2SP(d->ifp)->pp_flags &= ~PP_KEEPALIVE; From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 18:25:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC7E61065672; Thu, 29 Dec 2011 18:25:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9C358FC13; Thu, 29 Dec 2011 18:25:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTIPIIr067455; Thu, 29 Dec 2011 18:25:18 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTIPIrp067447; Thu, 29 Dec 2011 18:25:18 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112291825.pBTIPIrp067447@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2011 18:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228966 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 18:25:19 -0000 Author: jhb Date: Thu Dec 29 18:25:18 2011 New Revision: 228966 URL: http://svn.freebsd.org/changeset/base/228966 Log: Use queue(3) macros instead of home-rolled versions in several places in the INET6 code. This includes retiring the 'ndpr_next' and 'pfr_next' macros. Submitted by: pluknet (earlier version) Reviewed by: pluknet Modified: head/sys/netinet/sctp_output.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_rtr.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Dec 29 18:18:42 2011 (r228965) +++ head/sys/netinet/sctp_output.c Thu Dec 29 18:25:18 2011 (r228966) @@ -13797,8 +13797,7 @@ sctp_v6src_match_nexthop(struct sockaddr SCTPDBG_ADDR(SCTP_DEBUG_OUTPUT2, (struct sockaddr *)src6); /* search installed gateway from prefix entry */ - for (pfxrtr = pfx->ndpr_advrtrs.lh_first; pfxrtr; pfxrtr = - pfxrtr->pfr_next) { + LIST_FOREACH(pfxrtr, &pfx->ndpr_advrtrs, pfr_entry) { memset(&gw6, 0, sizeof(struct sockaddr_in6)); gw6.sin6_family = AF_INET6; gw6.sin6_len = sizeof(struct sockaddr_in6); Modified: head/sys/netinet6/icmp6.c ============================================================================== --- head/sys/netinet6/icmp6.c Thu Dec 29 18:18:42 2011 (r228965) +++ head/sys/netinet6/icmp6.c Thu Dec 29 18:25:18 2011 (r228966) @@ -1780,7 +1780,7 @@ ni6_addrs(struct icmp6_nodeinfo *ni6, st } IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { addrsofif = 0; IF_ADDR_LOCK(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Thu Dec 29 18:18:42 2011 (r228965) +++ head/sys/netinet6/in6.c Thu Dec 29 18:25:18 2011 (r228966) @@ -1369,7 +1369,7 @@ in6_purgeaddr(struct ifaddr *ifa) /* * leave from multicast groups we have joined for the interface */ - while ((imm = ia->ia6_memberships.lh_first) != NULL) { + while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) { LIST_REMOVE(imm, i6mm_chain); in6_leavegroup(imm); } @@ -2353,8 +2353,7 @@ in6_setmaxmtu(void) struct ifnet *ifp; IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { /* this function can be called during ifnet initialization */ if (!ifp->if_afdata[AF_INET6]) continue; Modified: head/sys/netinet6/in6_ifattach.c ============================================================================== --- head/sys/netinet6/in6_ifattach.c Thu Dec 29 18:18:42 2011 (r228965) +++ head/sys/netinet6/in6_ifattach.c Thu Dec 29 18:25:18 2011 (r228966) @@ -405,7 +405,7 @@ get_ifid(struct ifnet *ifp0, struct ifne /* next, try to get it from some other hardware interface */ IFNET_RLOCK_NOSLEEP(); - for (ifp = V_ifnet.tqh_first; ifp; ifp = ifp->if_list.tqe_next) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { if (ifp == ifp0) continue; if (in6_get_hw_ifid(ifp, in6) != 0) @@ -820,7 +820,7 @@ in6_ifdetach(struct ifnet *ifp) /* * leave from multicast groups we have joined for the interface */ - while ((imm = ia->ia6_memberships.lh_first) != NULL) { + while ((imm = LIST_FIRST(&ia->ia6_memberships)) != NULL) { LIST_REMOVE(imm, i6mm_chain); in6_leavegroup(imm); } @@ -923,8 +923,7 @@ in6_tmpaddrtimer(void *arg) V_ip6_temp_regen_advance) * hz, in6_tmpaddrtimer, curvnet); bzero(nullbuf, sizeof(nullbuf)); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { ndi = ND_IFINFO(ifp); if (bcmp(ndi->randomid, nullbuf, sizeof(nullbuf)) != 0) { /* Modified: head/sys/netinet6/nd6.c ============================================================================== --- head/sys/netinet6/nd6.c Thu Dec 29 18:18:42 2011 (r228965) +++ head/sys/netinet6/nd6.c Thu Dec 29 18:25:18 2011 (r228966) @@ -572,8 +572,8 @@ nd6_timer(void *arg) { CURVNET_SET((struct vnet *) arg); int s; - struct nd_defrouter *dr; - struct nd_prefix *pr; + struct nd_defrouter *dr, *ndr; + struct nd_prefix *pr, *npr; struct in6_ifaddr *ia6, *nia6; struct in6_addrlifetime *lt6; @@ -582,16 +582,9 @@ nd6_timer(void *arg) /* expire default router list */ s = splnet(); - dr = TAILQ_FIRST(&V_nd_defrouter); - while (dr) { - if (dr->expire && dr->expire < time_second) { - struct nd_defrouter *t; - t = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { + if (dr->expire && dr->expire < time_second) defrtrlist_del(dr); - dr = t; - } else { - dr = TAILQ_NEXT(dr, dr_entry); - } } /* @@ -668,8 +661,7 @@ nd6_timer(void *arg) } /* expire prefix list */ - pr = V_nd_prefix.lh_first; - while (pr) { + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { /* * check prefix lifetime. * since pltime is just for autoconf, pltime processing for @@ -677,18 +669,13 @@ nd6_timer(void *arg) */ if (pr->ndpr_vltime != ND6_INFINITE_LIFETIME && time_second - pr->ndpr_lastupdate > pr->ndpr_vltime) { - struct nd_prefix *t; - t = pr->ndpr_next; /* * address expiration and prefix expiration are * separate. NEVER perform in6_purgeaddr here. */ - prelist_remove(pr); - pr = t; - } else - pr = pr->ndpr_next; + } } splx(s); CURVNET_RESTORE(); @@ -781,8 +768,7 @@ nd6_purge(struct ifnet *ifp) * in the routing table, in order to keep additional side effects as * small as possible. */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) { - ndr = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (dr->installed) continue; @@ -790,8 +776,7 @@ nd6_purge(struct ifnet *ifp) defrtrlist_del(dr); } - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = ndr) { - ndr = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, ndr) { if (!dr->installed) continue; @@ -800,8 +785,7 @@ nd6_purge(struct ifnet *ifp) } /* Nuke prefix list entries toward ifp */ - for (pr = V_nd_prefix.lh_first; pr; pr = npr) { - npr = pr->ndpr_next; + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, npr) { if (pr->ndpr_ifp == ifp) { /* * Because if_detach() does *not* release prefixes @@ -912,7 +896,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * If the address matches one of our on-link prefixes, it should be a * neighbor. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (pr->ndpr_ifp != ifp) continue; @@ -962,7 +946,7 @@ nd6_is_new_addr_neighbor(struct sockaddr * as on-link, and thus, as a neighbor. */ if (ND_IFINFO(ifp)->flags & ND6_IFF_ACCEPT_RTADV && - TAILQ_FIRST(&V_nd_defrouter) == NULL && + TAILQ_EMPTY(&V_nd_defrouter) && V_nd6_defifindex == ifp->if_index) { return (1); } @@ -1234,8 +1218,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru */ bzero(drl, sizeof(*drl)); s = splnet(); - dr = TAILQ_FIRST(&V_nd_defrouter); - while (dr && i < DRLSTSIZ) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { + if (i >= DRLSTSIZ) + break; drl->defrouter[i].rtaddr = dr->rtaddr; in6_clearscope(&drl->defrouter[i].rtaddr); @@ -1244,7 +1229,6 @@ nd6_ioctl(u_long cmd, caddr_t data, stru drl->defrouter[i].expire = dr->expire; drl->defrouter[i].if_index = dr->ifp->if_index; i++; - dr = TAILQ_NEXT(dr, dr_entry); } splx(s); break; @@ -1263,11 +1247,12 @@ nd6_ioctl(u_long cmd, caddr_t data, stru */ bzero(oprl, sizeof(*oprl)); s = splnet(); - pr = V_nd_prefix.lh_first; - while (pr && i < PRLSTSIZ) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { struct nd_pfxrouter *pfr; int j; + if (i >= PRLSTSIZ) + break; oprl->prefix[i].prefix = pr->ndpr_prefix.sin6_addr; oprl->prefix[i].raflags = pr->ndpr_raf; oprl->prefix[i].prefixlen = pr->ndpr_plen; @@ -1292,9 +1277,8 @@ nd6_ioctl(u_long cmd, caddr_t data, stru oprl->prefix[i].expire = maxexpire; } - pfr = pr->ndpr_advrtrs.lh_first; j = 0; - while (pfr) { + LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) { if (j < DRLSTSIZ) { #define RTRADDR oprl->prefix[i].advrtr[j] RTRADDR = pfr->router->rtaddr; @@ -1302,13 +1286,11 @@ nd6_ioctl(u_long cmd, caddr_t data, stru #undef RTRADDR } j++; - pfr = pfr->pfr_next; } oprl->prefix[i].advrtrs = j; oprl->prefix[i].origin = PR_ORIG_RA; i++; - pr = pr->ndpr_next; } splx(s); @@ -1470,11 +1452,9 @@ nd6_ioctl(u_long cmd, caddr_t data, stru struct nd_prefix *pr, *next; s = splnet(); - for (pr = V_nd_prefix.lh_first; pr; pr = next) { + LIST_FOREACH_SAFE(pr, &V_nd_prefix, ndpr_entry, next) { struct in6_ifaddr *ia, *ia_next; - next = pr->ndpr_next; - if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; /* XXX */ @@ -1500,8 +1480,7 @@ nd6_ioctl(u_long cmd, caddr_t data, stru s = splnet(); defrouter_reset(); - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; dr = next) { - next = TAILQ_NEXT(dr, dr_entry); + TAILQ_FOREACH_SAFE(dr, &V_nd_defrouter, dr_entry, next) { defrtrlist_del(dr); } defrouter_select(); @@ -1824,8 +1803,7 @@ nd6_slowtimo(void *arg) callout_reset(&V_nd6_slowtimo_ch, ND6_SLOWTIMER_INTERVAL * hz, nd6_slowtimo, curvnet); IFNET_RLOCK_NOSLEEP(); - for (ifp = TAILQ_FIRST(&V_ifnet); ifp; - ifp = TAILQ_NEXT(ifp, if_list)) { + TAILQ_FOREACH(ifp, &V_ifnet, if_list) { nd6if = ND_IFINFO(ifp); if (nd6if->basereachable && /* already initialized */ (nd6if->recalctm -= ND6_SLOWTIMER_INTERVAL) <= 0) { @@ -2294,8 +2272,7 @@ nd6_sysctl_drlist(SYSCTL_HANDLER_ARGS) return EPERM; error = 0; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { d = (struct in6_defrouter *)buf; de = (struct in6_defrouter *)(buf + sizeof(buf)); @@ -2335,7 +2312,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) return EPERM; error = 0; - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { u_short advrtrs; size_t advance; struct sockaddr_in6 *sin6, *s6; @@ -2380,8 +2357,7 @@ nd6_sysctl_prlist(SYSCTL_HANDLER_ARGS) p->flags = pr->ndpr_stateflags; p->origin = PR_ORIG_RA; advrtrs = 0; - for (pfr = pr->ndpr_advrtrs.lh_first; pfr; - pfr = pfr->pfr_next) { + LIST_FOREACH(pfr, &pr->ndpr_advrtrs, pfr_entry) { if ((void *)&sin6[advrtrs + 1] > (void *)pe) { advrtrs++; continue; Modified: head/sys/netinet6/nd6.h ============================================================================== --- head/sys/netinet6/nd6.h Thu Dec 29 18:18:42 2011 (r228965) +++ head/sys/netinet6/nd6.h Thu Dec 29 18:25:18 2011 (r228966) @@ -278,8 +278,6 @@ struct nd_prefix { int ndpr_refcnt; /* reference couter from addresses */ }; -#define ndpr_next ndpr_entry.le_next - #define ndpr_raf ndpr_flags #define ndpr_raf_onlink ndpr_flags.onlink #define ndpr_raf_auto ndpr_flags.autonomous @@ -313,7 +311,6 @@ struct inet6_ndpr_msghdr { struct nd_pfxrouter { LIST_ENTRY(nd_pfxrouter) pfr_entry; -#define pfr_next pfr_entry.le_next struct nd_defrouter *router; }; Modified: head/sys/netinet6/nd6_rtr.c ============================================================================== --- head/sys/netinet6/nd6_rtr.c Thu Dec 29 18:18:42 2011 (r228965) +++ head/sys/netinet6/nd6_rtr.c Thu Dec 29 18:25:18 2011 (r228966) @@ -501,8 +501,7 @@ defrouter_lookup(struct in6_addr *addr, { struct nd_defrouter *dr; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { if (dr->ifp == ifp && IN6_ARE_ADDR_EQUAL(addr, &dr->rtaddr)) return (dr); } @@ -549,8 +548,7 @@ defrouter_reset(void) { struct nd_defrouter *dr; - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) defrouter_delreq(dr); /* @@ -581,7 +579,7 @@ defrtrlist_del(struct nd_defrouter *dr) /* * Also delete all the pointers to the router in each prefix lists. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { struct nd_pfxrouter *pfxrtr; if ((pfxrtr = pfxrtr_lookup(pr, dr)) != NULL) pfxrtr_del(pfxrtr); @@ -631,7 +629,7 @@ defrouter_select(void) * Let's handle easy case (3) first: * If default router list is empty, there's nothing to be done. */ - if (!TAILQ_FIRST(&V_nd_defrouter)) { + if (TAILQ_EMPTY(&V_nd_defrouter)) { splx(s); return; } @@ -641,8 +639,7 @@ defrouter_select(void) * We just pick up the first reachable one (if any), assuming that * the ordering rule of the list described in defrtrlist_update(). */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { IF_AFDATA_LOCK(dr->ifp); if (selected_dr == NULL && (ln = nd6_lookup(&dr->rtaddr, 0, dr->ifp)) && @@ -799,8 +796,7 @@ insert: */ /* insert at the end of the group */ - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { if (rtpref(n) > rtpref(dr)) break; } @@ -821,7 +817,7 @@ pfxrtr_lookup(struct nd_prefix *pr, stru { struct nd_pfxrouter *search; - for (search = pr->ndpr_advrtrs.lh_first; search; search = search->pfr_next) { + LIST_FOREACH(search, &pr->ndpr_advrtrs, pfr_entry) { if (search->router == dr) break; } @@ -857,8 +853,7 @@ nd6_prefix_lookup(struct nd_prefixctl *k { struct nd_prefix *search; - for (search = V_nd_prefix.lh_first; - search; search = search->ndpr_next) { + LIST_FOREACH(search, &V_nd_prefix, ndpr_entry) { if (key->ndpr_ifp == search->ndpr_ifp && key->ndpr_plen == search->ndpr_plen && in6_are_prefix_equal(&key->ndpr_prefix.sin6_addr, @@ -964,9 +959,7 @@ prelist_remove(struct nd_prefix *pr) LIST_REMOVE(pr, ndpr_entry); /* free list of routers that adversed the prefix */ - for (pfr = pr->ndpr_advrtrs.lh_first; pfr; pfr = next) { - next = pfr->pfr_next; - + LIST_FOREACH_SAFE(pfr, &pr->ndpr_advrtrs, pfr_entry, next) { free(pfr, M_IP6NDP); } splx(s); @@ -1329,8 +1322,7 @@ find_pfxlist_reachable_router(struct nd_ struct llentry *ln; int canreach; - for (pfxrtr = LIST_FIRST(&pr->ndpr_advrtrs); pfxrtr != NULL; - pfxrtr = LIST_NEXT(pfxrtr, pfr_entry)) { + LIST_FOREACH(pfxrtr, &pr->ndpr_advrtrs, pfr_entry) { IF_AFDATA_LOCK(pfxrtr->router->ifp); ln = nd6_lookup(&pfxrtr->router->rtaddr, 0, pfxrtr->router->ifp); IF_AFDATA_UNLOCK(pfxrtr->router->ifp); @@ -1369,7 +1361,7 @@ pfxlist_onlink_check() * Check if there is a prefix that has a reachable advertising * router. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (pr->ndpr_raf_onlink && find_pfxlist_reachable_router(pr)) break; } @@ -1379,12 +1371,10 @@ pfxlist_onlink_check() * that does not advertise any prefixes. */ if (pr == NULL) { - for (dr = TAILQ_FIRST(&V_nd_defrouter); dr; - dr = TAILQ_NEXT(dr, dr_entry)) { + TAILQ_FOREACH(dr, &V_nd_defrouter, dr_entry) { struct nd_prefix *pr0; - for (pr0 = V_nd_prefix.lh_first; pr0; - pr0 = pr0->ndpr_next) { + LIST_FOREACH(pr0, &V_nd_prefix, ndpr_entry) { if ((pfxrtr = pfxrtr_lookup(pr0, dr)) != NULL) break; } @@ -1392,7 +1382,7 @@ pfxlist_onlink_check() break; } } - if (pr != NULL || (TAILQ_FIRST(&V_nd_defrouter) && pfxrtr == NULL)) { + if (pr != NULL || (!TAILQ_EMPTY(&V_nd_defrouter) && pfxrtr == NULL)) { /* * There is at least one prefix that has a reachable router, * or at least a router which probably does not advertise @@ -1402,7 +1392,7 @@ pfxlist_onlink_check() * Detach prefixes which have no reachable advertising * router, and attach other prefixes. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { /* XXX: a link-local prefix should never be detached */ if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; @@ -1426,7 +1416,7 @@ pfxlist_onlink_check() } } else { /* there is no prefix that has a reachable router */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { if (IN6_IS_ADDR_LINKLOCAL(&pr->ndpr_prefix.sin6_addr)) continue; @@ -1449,7 +1439,7 @@ pfxlist_onlink_check() * interfaces. Such cases will be handled in nd6_prefix_onlink, * so we don't have to care about them. */ - for (pr = V_nd_prefix.lh_first; pr; pr = pr->ndpr_next) { + LIST_FOREACH(pr, &V_nd_prefix, ndpr_entry) { int e; char ip6buf[INET6_ADDRSTRLEN]; @@ -1577,7 +1567,7 @@ nd6_prefix_onlink(struct nd_prefix *pr) * Although such a configuration is expected to be rare, we explicitly * allow it. */ - for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) { + LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) { if (opr == pr) continue; @@ -1716,7 +1706,7 @@ nd6_prefix_offlink(struct nd_prefix *pr) * If there's one, try to make the prefix on-link on the * interface. */ - for (opr = V_nd_prefix.lh_first; opr; opr = opr->ndpr_next) { + LIST_FOREACH(opr, &V_nd_prefix, ndpr_entry) { if (opr == pr) continue; From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 18:32:14 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED886106566B; Thu, 29 Dec 2011 18:32:14 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 8A8E38FC14; Thu, 29 Dec 2011 18:32:14 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id C79912A28CC3; Thu, 29 Dec 2011 19:32:13 +0100 (CET) Date: Thu, 29 Dec 2011 19:32:13 +0100 From: Ed Schouten To: Andreas Tobler Message-ID: <20111229183213.GK1895@hoeg.nl> References: <201112291441.pBTEfI8l060127@svn.freebsd.org> <4EFCA6A6.6080103@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="JlJsEFsx9RQyiX4C" Content-Disposition: inline In-Reply-To: <4EFCA6A6.6080103@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228955 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 18:32:15 -0000 --JlJsEFsx9RQyiX4C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Andreas, * Andreas Tobler , 20111229 18:43: > Thank you Ed! gcc-4.6 bootstrap successful. But it seems GCC 4.7 is still broken. I am not planning to fix that, because it's a shortcoming of GCC. As soon as the GNU folks implement C++11 [[noreturn]], it should work again. --=20 Ed Schouten WWW: http://80386.nl/ --JlJsEFsx9RQyiX4C Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO/LItAAoJEG5e2P40kaK7hAUP/jEoKhy1CHhRVdFXV2PqC2ZG axzWA0J5IynC9SeGnfTHl5f1igfASsWPX8kHFhDYjVAJK/IQoeq/cyQv+R9hPAbi nawDGhl/EmOQqDU6GHOJwaC7zE/39GAhmAlGFuCFGmu2DcqCYMXSYcLbJtdckKhf Cs/sMl+DsisSfxGD3I63pwdVlRqYegyBxwM/RztijmphddFZMBg4GeiXjXa+8zbA KajSoPorA2Ipt9xx1IoUZYPHYB6QbyxGVOPypXyuFTqWNUsf3UqOqRp1GlxU3VSM m1fpNwyyj+ya6JJ/j5ZBxel2Xx8m93bx5sJPUiAPsqSe6pQ4YHn5vej4Sdv+wQt6 zPvPtgovUIN0Pqui9vxQjZXMqNJr2CAxE0Fel4d/pEjXZTNdkZOg3ROBz9zH0d3a YTp2+7AFRTM+d6B9uGL8lSEOoC0bM8aOOk76GaOO6XN29tmnulx/LeNB9XaLtVaM 6WuzwxHVme0GZIsxsbqaz25SG1rsoXulLsqa3OJ6d7gL9dUvRC8Sa501spgxtsux WM/tsx+oojEue7k9TPH76Lj0JoojJyr/4VhXmKx8tdvVsZjsZazTuP7RSQGEE5g7 o1dGPKtZMeUe1pMmeGmjRf88GtrOKdu40lw59zhyXL5IV483YLBiuvwebJfzwQk/ IzVc5e0p6Sk0hux6QRJW =d9Jj -----END PGP SIGNATURE----- --JlJsEFsx9RQyiX4C-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 18:40:17 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32CA2106566B; Thu, 29 Dec 2011 18:40:17 +0000 (UTC) (envelope-from andreast@FreeBSD.org) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id B93BD8FC0A; Thu, 29 Dec 2011 18:40:16 +0000 (UTC) Received: from deuterium.andreas.nets (dhclient-91-190-14-19.flashcable.ch [91.190.14.19]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id pBTIabAw024297; Thu, 29 Dec 2011 19:36:38 +0100 (CET) (envelope-from andreast@FreeBSD.org) Message-ID: <4EFCB40B.5090405@FreeBSD.org> Date: Thu, 29 Dec 2011 19:40:11 +0100 From: Andreas Tobler User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Ed Schouten References: <201112291441.pBTEfI8l060127@svn.freebsd.org> <4EFCA6A6.6080103@FreeBSD.org> <20111229183213.GK1895@hoeg.nl> In-Reply-To: <20111229183213.GK1895@hoeg.nl> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228955 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 18:40:17 -0000 Hi Ed, On 29.12.11 19:32, Ed Schouten wrote: > * Andreas Tobler, 20111229 18:43: >> Thank you Ed! gcc-4.6 bootstrap successful. > > But it seems GCC 4.7 is still broken. I am not planning to fix that, > because it's a shortcoming of GCC. As soon as the GNU folks implement > C++11 [[noreturn]], it should work again. Yep, gcc-trunk is still broken. I help(ed) myself with a !defined(__GNUC__) with this I can continue hacking on trunk... Well, I possibly do not understand all/everything regarding this [[noreturn]]. But I do not see an activity in this direction on the gcc side. They implemented the _Noreturn for STDC but the double-square-bracket notation for noreturn C++ I do not see. As said, I might simply do not see it. Thanks again, Andreas From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 18:40:58 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D13031065673; Thu, 29 Dec 2011 18:40:58 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFDD28FC12; Thu, 29 Dec 2011 18:40:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTIewTo068029; Thu, 29 Dec 2011 18:40:58 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTIewdP068027; Thu, 29 Dec 2011 18:40:58 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112291840.pBTIewdP068027@svn.freebsd.org> From: Pyun YongHyeon Date: Thu, 29 Dec 2011 18:40:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228967 - head/sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 18:40:58 -0000 Author: yongari Date: Thu Dec 29 18:40:58 2011 New Revision: 228967 URL: http://svn.freebsd.org/changeset/base/228967 Log: Update if_obytes and if_omcast after successful transmit. While I'm here update if_oerrors if parent interface of vlan is not up and running. Previously it updated collision counter and it was confusing to interprete it. PR: kern/163478 Reviewed by: glebius, jhb Tested by: Joe Holden < lists <> rewt dot org dot uk > Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Thu Dec 29 18:25:18 2011 (r228966) +++ head/sys/net/if_vlan.c Thu Dec 29 18:40:58 2011 (r228967) @@ -1012,10 +1012,12 @@ vlan_transmit(struct ifnet *ifp, struct { struct ifvlan *ifv; struct ifnet *p; - int error; + int error, len, mcast; ifv = ifp->if_softc; p = PARENT(ifv); + len = m->m_pkthdr.len; + mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1 : 0; BPF_MTAP(ifp, m); @@ -1025,7 +1027,7 @@ vlan_transmit(struct ifnet *ifp, struct */ if (!UP_AND_RUNNING(p)) { m_freem(m); - ifp->if_collisions++; + ifp->if_oerrors++; return (0); } @@ -1081,9 +1083,11 @@ vlan_transmit(struct ifnet *ifp, struct * Send it, precisely as ether_output() would have. */ error = (p->if_transmit)(p, m); - if (!error) + if (!error) { ifp->if_opackets++; - else + ifp->if_omcasts += mcast; + ifp->if_obytes += len; + } else ifp->if_oerrors++; return (error); } From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 18:49:37 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E82101065792; Thu, 29 Dec 2011 18:49:37 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id C6EBB8FC0A; Thu, 29 Dec 2011 18:49:37 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBTInYEJ047901; Thu, 29 Dec 2011 10:49:34 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBTInYBJ047900; Thu, 29 Dec 2011 10:49:34 -0800 (PST) (envelope-from sgk) Date: Thu, 29 Dec 2011 10:49:34 -0800 From: Steve Kargl To: Ed Schouten Message-ID: <20111229184934.GA47885@troutmask.apl.washington.edu> References: <201112291441.pBTEfI8l060127@svn.freebsd.org> <4EFCA6A6.6080103@FreeBSD.org> <20111229183213.GK1895@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111229183213.GK1895@hoeg.nl> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andreas Tobler Subject: Re: svn commit: r228955 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 18:49:38 -0000 On Thu, Dec 29, 2011 at 07:32:13PM +0100, Ed Schouten wrote: > Hi Andreas, > > * Andreas Tobler , 20111229 18:43: > > Thank you Ed! gcc-4.6 bootstrap successful. > > But it seems GCC 4.7 is still broken. I am not planning to fix that, > because it's a shortcoming of GCC. As soon as the GNU folks implement > C++11 [[noreturn]], it should work again. > Are you going to submit a bug report to GCC? Because, as of now, you've broken my ability to do development work on bleeding edge freebsd and bleeding edge gcc. -- Steve From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 19:24:00 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9AD321065672; Thu, 29 Dec 2011 19:24:00 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 5DBE48FC13; Thu, 29 Dec 2011 19:24:00 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 8D0002A28CC3; Thu, 29 Dec 2011 20:23:59 +0100 (CET) Date: Thu, 29 Dec 2011 20:23:59 +0100 From: Ed Schouten To: Steve Kargl Message-ID: <20111229192359.GM1895@hoeg.nl> References: <201112291441.pBTEfI8l060127@svn.freebsd.org> <4EFCA6A6.6080103@FreeBSD.org> <20111229183213.GK1895@hoeg.nl> <20111229184934.GA47885@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="p2pkNiL1PnZBJ6Nr" Content-Disposition: inline In-Reply-To: <20111229184934.GA47885@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andreas Tobler Subject: Re: svn commit: r228955 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 19:24:00 -0000 --p2pkNiL1PnZBJ6Nr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Steve, * Steve Kargl , 20111229 19:49: > Are you going to submit a bug report to GCC? Because, as of now, > you've broken my ability to do development work on bleeding edge > freebsd and bleeding edge gcc. Here you go: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D51705 In the future, could you write such bug reports yourself? I am really not that interested in GCC's development process. --=20 Ed Schouten WWW: http://80386.nl/ --p2pkNiL1PnZBJ6Nr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO/L5PAAoJEG5e2P40kaK7ASsQAKvSCjsKgBBemuqd6ZqsiAJ8 zSB+pSd6qKwKvIfwpVJYOYghyyosKZtczJk4qIbYBkxgCY8VV3dq/h4Qao5JcuCw JRZHYLMiRCgVBimk00lHjaYZZjaxX1WN3RpsGH5OlgufyFhdc2UzDsubuSRug2LM L52kT9oNuv+axGzp0T53HFHscEHWo9wKlEoeNl1w2oCW6p/wSqvyrfo2gFolJ9Ya TfHhfTIAQ7/DONHUfap5nSe80ZJStdt2eWqaoDCVm3l5sXoqf1ZAeOtGzRO6iEkp 5SQKNbIfs+xQTVSaHB2HxXpNOeX8eE5BbOc3UXL7xpgSDAzkEtWmB21KxINvKmFj EWKAdPNF1SodvC7bn3z+pfsSXfZNej6ks9HWopd/8B/PvnBJ6KeoHokJQsbxtR8H iaAe8vDsfMfoy3D0hLi+H09K7tW6TBvMnUOQDG45WV8SA72qux45TXJWb+wjlT/2 o41ier9WTjAdjMCRKNW87YSQ7+6ajU41ascuLiFmUy3c7XWUvlzjRAXlDaID1I3I BR1cl0BaKEqQRNFn2iU41cPqoWDZ7aNCrGDJ35IvNNatZ93LpEkn70C+3f04IYNo xb2nZGKcAJDQPRsPYlL8WadBGtCk+VF7rCYtAp9T2+KBPzYeTx6XV41o8l28beh6 pR+3LhzDZZImQ9e+wsEN =6Kec -----END PGP SIGNATURE----- --p2pkNiL1PnZBJ6Nr-- From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 19:51:17 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2AFE1065677; Thu, 29 Dec 2011 19:51:17 +0000 (UTC) (envelope-from sgk@troutmask.apl.washington.edu) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) by mx1.freebsd.org (Postfix) with ESMTP id 903EF8FC0A; Thu, 29 Dec 2011 19:51:17 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.5/8.14.5) with ESMTP id pBTJpEx4048360; Thu, 29 Dec 2011 11:51:14 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.5/8.14.5/Submit) id pBTJpEfd048359; Thu, 29 Dec 2011 11:51:14 -0800 (PST) (envelope-from sgk) Date: Thu, 29 Dec 2011 11:51:14 -0800 From: Steve Kargl To: Ed Schouten Message-ID: <20111229195114.GA48308@troutmask.apl.washington.edu> References: <201112291441.pBTEfI8l060127@svn.freebsd.org> <4EFCA6A6.6080103@FreeBSD.org> <20111229183213.GK1895@hoeg.nl> <20111229184934.GA47885@troutmask.apl.washington.edu> <20111229192359.GM1895@hoeg.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111229192359.GM1895@hoeg.nl> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andreas Tobler Subject: Re: svn commit: r228955 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 19:51:17 -0000 On Thu, Dec 29, 2011 at 08:23:59PM +0100, Ed Schouten wrote: > Hi Steve, > > * Steve Kargl , 20111229 19:49: > > Are you going to submit a bug report to GCC? Because, as of now, > > you've broken my ability to do development work on bleeding edge > > freebsd and bleeding edge gcc. > > Here you go: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705 Thanks. > In the future, could you write such bug reports yourself? I am really > not that interested in GCC's development process. I'll try, but I don't know C11 or C++11. While you may have no interest in GCC developement, the ports collection uses GCC. I can also see this type of problem leading to 3rd part software developer dropping support for FreeBSD because they need to work around issues with FreeBSD headers. -- Steve From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 20:41:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD7BA106571E; Thu, 29 Dec 2011 20:41:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BE878FC0A; Thu, 29 Dec 2011 20:41:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTKfG6x071714; Thu, 29 Dec 2011 20:41:16 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTKfGkj071711; Thu, 29 Dec 2011 20:41:16 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201112292041.pBTKfGkj071711@svn.freebsd.org> From: John Baldwin Date: Thu, 29 Dec 2011 20:41:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228969 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 20:41:16 -0000 Author: jhb Date: Thu Dec 29 20:41:16 2011 New Revision: 228969 URL: http://svn.freebsd.org/changeset/base/228969 Log: Defer the work of freeing IPv4 multicast options from a socket to an asychronous task. This avoids tearing down multicast state including sending IGMP leave messages and reprogramming MAC filters while holding the per-protocol global pcbinfo lock that is used in the receive path of packet processing. Reviewed by: rwatson MFC after: 1 month Modified: head/sys/netinet/in_mcast.c head/sys/netinet/ip_var.h Modified: head/sys/netinet/in_mcast.c ============================================================================== --- head/sys/netinet/in_mcast.c Thu Dec 29 19:01:29 2011 (r228968) +++ head/sys/netinet/in_mcast.c Thu Dec 29 20:41:16 2011 (r228969) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -144,6 +145,8 @@ static void inm_purge(struct in_multi *) static void inm_reap(struct in_multi *); static struct ip_moptions * inp_findmoptions(struct inpcb *); +static void inp_freemoptions_internal(struct ip_moptions *); +static void inp_gcmoptions(void *, int); static int inp_get_source_filters(struct inpcb *, struct sockopt *); static int inp_join_group(struct inpcb *, struct sockopt *); static int inp_leave_group(struct inpcb *, struct sockopt *); @@ -179,6 +182,10 @@ static SYSCTL_NODE(_net_inet_ip_mcast, O CTLFLAG_RD | CTLFLAG_MPSAFE, sysctl_ip_mcast_filters, "Per-interface stack-wide source filters"); +static STAILQ_HEAD(, ip_moptions) imo_gc_list = + STAILQ_HEAD_INITIALIZER(imo_gc_list); +static struct task imo_gc_task = TASK_INITIALIZER(0, inp_gcmoptions, NULL); + /* * Inline function which wraps assertions for a valid ifp. * The ifnet layer will set the ifma's ifp pointer to NULL if the ifp @@ -1518,17 +1525,29 @@ inp_findmoptions(struct inpcb *inp) } /* - * Discard the IP multicast options (and source filters). + * Discard the IP multicast options (and source filters). To minimize + * the amount of work done while holding locks such as the INP's + * pcbinfo lock (which is used in the receive path), the free + * operation is performed asynchronously in a separate task. * * SMPng: NOTE: assumes INP write lock is held. */ void inp_freemoptions(struct ip_moptions *imo) { - struct in_mfilter *imf; - size_t idx, nmships; KASSERT(imo != NULL, ("%s: ip_moptions is NULL", __func__)); + IN_MULTI_LOCK(); + STAILQ_INSERT_TAIL(&imo_gc_list, imo, imo_link); + IN_MULTI_UNLOCK(); + taskqueue_enqueue(taskqueue_thread, &imo_gc_task); +} + +static void +inp_freemoptions_internal(struct ip_moptions *imo) +{ + struct in_mfilter *imf; + size_t idx, nmships; nmships = imo->imo_num_memberships; for (idx = 0; idx < nmships; ++idx) { @@ -1546,6 +1565,22 @@ inp_freemoptions(struct ip_moptions *imo free(imo, M_IPMOPTS); } +static void +inp_gcmoptions(void *context, int pending) +{ + struct ip_moptions *imo; + + IN_MULTI_LOCK(); + while (!STAILQ_EMPTY(&imo_gc_list)) { + imo = STAILQ_FIRST(&imo_gc_list); + STAILQ_REMOVE_HEAD(&imo_gc_list, imo_link); + IN_MULTI_UNLOCK(); + inp_freemoptions_internal(imo); + IN_MULTI_LOCK(); + } + IN_MULTI_UNLOCK(); +} + /* * Atomically get source filters on a socket for an IPv4 multicast group. * Called with INP lock held; returns with lock released. Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Dec 29 19:01:29 2011 (r228968) +++ head/sys/netinet/ip_var.h Thu Dec 29 20:41:16 2011 (r228969) @@ -93,6 +93,7 @@ struct ip_moptions { u_short imo_max_memberships; /* max memberships this socket */ struct in_multi **imo_membership; /* group memberships */ struct in_mfilter *imo_mfilters; /* source filters */ + STAILQ_ENTRY(ip_moptions) imo_link; }; struct ipstat { From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 21:12:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D1281065670; Thu, 29 Dec 2011 21:12:23 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D58BD8FC14; Thu, 29 Dec 2011 21:12:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTLCMPI072674; Thu, 29 Dec 2011 21:12:22 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTLCMSo072672; Thu, 29 Dec 2011 21:12:22 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201112292112.pBTLCMSo072672@svn.freebsd.org> From: Sergey Kandaurov Date: Thu, 29 Dec 2011 21:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228970 - head/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 21:12:23 -0000 Author: pluknet Date: Thu Dec 29 21:12:22 2011 New Revision: 228970 URL: http://svn.freebsd.org/changeset/base/228970 Log: Fix manual section for acl_get(3) and mac_get(3) family functions. Reviewed by: rwatson MFC after: 1 week Modified: head/lib/libc/sys/cap_new.2 Modified: head/lib/libc/sys/cap_new.2 ============================================================================== --- head/lib/libc/sys/cap_new.2 Thu Dec 29 20:41:16 2011 (r228969) +++ head/lib/libc/sys/cap_new.2 Thu Dec 29 21:12:22 2011 (r228970) @@ -107,17 +107,17 @@ Permit checking of an ACL on a file desc for this system call. .It Dv CAP_ACL_DELETE Permit -.Xr acl_delete_fd_np 2 . +.Xr acl_delete_fd_np 3 . .It Dv CAP_ACL_GET Permit -.Xr acl_get_fd 2 +.Xr acl_get_fd 3 and -.Xr acl_get_fd_np 2 . +.Xr acl_get_fd_np 3 . .It Dv CAP_ACL_SET Permit -.Xr acl_set_fd 2 +.Xr acl_set_fd 3 and -.Xr acl_set_fd_np 2 . +.Xr acl_set_fd_np 3 . .It Dv CAP_BIND Permit .Xr bind 2 . @@ -240,10 +240,10 @@ a global name space; see for details. .It Dv CAP_MAC_GET Permit -.Xr mac_get_fd 2 . +.Xr mac_get_fd 3 . .It Dv CAP_MAC_SET Permit -.Xr mac_set_fd 2 . +.Xr mac_set_fd 3 . .It Dv CAP_MMAP Permit .Xr mmap 2 ; @@ -385,12 +385,8 @@ argument is not a capability. .El .Sh SEE ALSO .Xr accept 2 , -.Xr acl_delete_fd_np 2 , -.Xr acl_get_fd 2 , -.Xr acl_get_fd_np 2 , -.Xr acl_set_fd_np 2 , -.Xr aio_read 2 , .Xr aio_fsync 2 , +.Xr aio_read 2 , .Xr aio_write 2 , .Xr bind 2 , .Xr cap_enter 2 , @@ -421,8 +417,6 @@ argument is not a capability. .Xr kqueue 2 , .Xr linkat 2 , .Xr listen 2 , -.Xr mac_get_fd 2 , -.Xr mac_set_fd 2 , .Xr mmap 2 , .Xr mq_open 2 , .Xr open 2 , @@ -450,8 +444,14 @@ argument is not a capability. .Xr socketpair 2 , .Xr unlinkat 2 , .Xr write 2 , +.Xr acl_delete_fd_np 3 , +.Xr acl_get_fd 3 , +.Xr acl_get_fd_np 3 , +.Xr acl_set_fd_np 3 , .Xr cap_limitfd 3 , .Xr libcapsicum 3 , +.Xr mac_get_fd 3 , +.Xr mac_set_fd 3 , .Xr sem_getvalue 3 , .Xr sem_post 3 , .Xr sem_trywait 3 , From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 21:13:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 768E21065670; Thu, 29 Dec 2011 21:13:26 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2459E8FC0C; Thu, 29 Dec 2011 21:13:25 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so14791557obb.13 for ; Thu, 29 Dec 2011 13:13:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=9iOABIipSYeRnb5SUTvBbsEqs/73B5mNOf0cPjr2y+Y=; b=f5duV9MGIO4uV2DxViAM4gm9M1iw1EOexh2GnJ1cyDsJ6tnJ/xuwhpEZIWD9aSXifa Qz4ZApqLi3c9R3aEHoCbl1EyZcKcMn0yOTQXYjZazOAbACUEA2SqZL6KAlYZezT62KCA 8lIuPkZXYI1kiWkYbiApjDMTnDUpAXEqpG6Ks= MIME-Version: 1.0 Received: by 10.182.15.104 with SMTP id w8mr32549569obc.20.1325191761494; Thu, 29 Dec 2011 12:49:21 -0800 (PST) Sender: pluknet@gmail.com Received: by 10.182.171.67 with HTTP; Thu, 29 Dec 2011 12:49:21 -0800 (PST) In-Reply-To: <201112291825.pBTIPIrp067447@svn.freebsd.org> References: <201112291825.pBTIPIrp067447@svn.freebsd.org> Date: Thu, 29 Dec 2011 23:49:21 +0300 X-Google-Sender-Auth: 7L1zacGm-Znonr8UyUur-wQnpLE Message-ID: From: Sergey Kandaurov To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228966 - in head/sys: netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 21:13:26 -0000 On 29 December 2011 22:25, John Baldwin wrote: > Author: jhb > Date: Thu Dec 29 18:25:18 2011 > New Revision: 228966 > URL: http://svn.freebsd.org/changeset/base/228966 > > Log: > =A0Use queue(3) macros instead of home-rolled versions in several places = in > =A0the INET6 code. =A0This includes retiring the 'ndpr_next' and 'pfr_nex= t' > =A0macros. > > =A0Submitted by: pluknet (earlier version) > =A0Reviewed by: =A0pluknet Thanks! --=20 wbr, pluknet From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 21:17:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DEF061065670; Thu, 29 Dec 2011 21:17:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD9338FC0C; Thu, 29 Dec 2011 21:17:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTLHZ2b072864; Thu, 29 Dec 2011 21:17:35 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTLHZ9H072861; Thu, 29 Dec 2011 21:17:35 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112292117.pBTLHZ9H072861@svn.freebsd.org> From: Dimitry Andric Date: Thu, 29 Dec 2011 21:17:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228971 - in head/sys: conf modules/ce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 21:17:36 -0000 Author: dim Date: Thu Dec 29 21:17:35 2011 New Revision: 228971 URL: http://svn.freebsd.org/changeset/base/228971 Log: For sys/dev/ce/tau32-ddk.c, disable the following warning when building with clang: sys/dev/ce/tau32-ddk.c:1228:37: warning: implicit truncation from 'int' to bitfield changes value from 65532 to 8188 [-Wconstant-conversion] Since this file is obfuscated C, we can never determine (in a sane way, at least :) if this points to a real problem or not. The driver has been in the tree for more than five years, so it most likely isn't. MFC after: 1 week Modified: head/sys/conf/files.i386 head/sys/modules/ce/Makefile Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Thu Dec 29 21:12:22 2011 (r228970) +++ head/sys/conf/files.i386 Thu Dec 29 21:17:35 2011 (r228971) @@ -148,7 +148,8 @@ dev/atkbdc/atkbdc_subr.c optional atkbdc dev/atkbdc/psm.c optional psm atkbdc dev/ce/ceddk.c optional ce dev/ce/if_ce.c optional ce -dev/ce/tau32-ddk.c optional ce +dev/ce/tau32-ddk.c optional ce \ + compile-with "${NORMAL_C} ${NO_WCONSTANT_CONVERSION}" dev/cm/if_cm_isa.c optional cm isa dev/coretemp/coretemp.c optional coretemp dev/cp/cpddk.c optional cp Modified: head/sys/modules/ce/Makefile ============================================================================== --- head/sys/modules/ce/Makefile Thu Dec 29 21:12:22 2011 (r228970) +++ head/sys/modules/ce/Makefile Thu Dec 29 21:17:35 2011 (r228971) @@ -26,3 +26,6 @@ opt_ng_cronyx.h: .endif .include + +CWARNFLAGS.tau32-ddk.c= ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 22:15:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D2CF106566C; Thu, 29 Dec 2011 22:15:19 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E575F8FC13; Thu, 29 Dec 2011 22:15:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTMFIQn075501; Thu, 29 Dec 2011 22:15:18 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTMFIxD075499; Thu, 29 Dec 2011 22:15:18 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112292215.pBTMFIxD075499@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 29 Dec 2011 22:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228972 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 22:15:19 -0000 Author: jilles Date: Thu Dec 29 22:15:18 2011 New Revision: 228972 URL: http://svn.freebsd.org/changeset/base/228972 Log: libc: Eliminate some relative relocations in file flags table. Modified: head/lib/libc/gen/strtofflags.c Modified: head/lib/libc/gen/strtofflags.c ============================================================================== --- head/lib/libc/gen/strtofflags.c Thu Dec 29 21:17:35 2011 (r228971) +++ head/lib/libc/gen/strtofflags.c Thu Dec 29 22:15:18 2011 (r228972) @@ -41,35 +41,35 @@ __FBSDID("$FreeBSD$"); #include #include +#define longestflaglen 12 static struct { - char *name; + char name[longestflaglen + 1]; + char invert; u_long flag; - int invert; -} mapping[] = { +} const mapping[] = { /* shorter names per flag first, all prefixed by "no" */ - { "nosappnd", SF_APPEND, 0 }, - { "nosappend", SF_APPEND, 0 }, - { "noarch", SF_ARCHIVED, 0 }, - { "noarchived", SF_ARCHIVED, 0 }, - { "noschg", SF_IMMUTABLE, 0 }, - { "noschange", SF_IMMUTABLE, 0 }, - { "nosimmutable", SF_IMMUTABLE, 0 }, - { "nosunlnk", SF_NOUNLINK, 0 }, - { "nosunlink", SF_NOUNLINK, 0 }, + { "nosappnd", 0, SF_APPEND }, + { "nosappend", 0, SF_APPEND }, + { "noarch", 0, SF_ARCHIVED }, + { "noarchived", 0, SF_ARCHIVED }, + { "noschg", 0, SF_IMMUTABLE }, + { "noschange", 0, SF_IMMUTABLE }, + { "nosimmutable", 0, SF_IMMUTABLE }, + { "nosunlnk", 0, SF_NOUNLINK }, + { "nosunlink", 0, SF_NOUNLINK }, #ifdef SF_SNAPSHOT - { "nosnapshot", SF_SNAPSHOT, 0 }, + { "nosnapshot", 0, SF_SNAPSHOT }, #endif - { "nouappnd", UF_APPEND, 0 }, - { "nouappend", UF_APPEND, 0 }, - { "nouchg", UF_IMMUTABLE, 0 }, - { "nouchange", UF_IMMUTABLE, 0 }, - { "nouimmutable", UF_IMMUTABLE, 0 }, - { "nodump", UF_NODUMP, 1 }, - { "noopaque", UF_OPAQUE, 0 }, - { "nouunlnk", UF_NOUNLINK, 0 }, - { "nouunlink", UF_NOUNLINK, 0 } + { "nouappnd", 0, UF_APPEND }, + { "nouappend", 0, UF_APPEND }, + { "nouchg", 0, UF_IMMUTABLE }, + { "nouchange", 0, UF_IMMUTABLE }, + { "nouimmutable", 0, UF_IMMUTABLE }, + { "nodump", 1, UF_NODUMP }, + { "noopaque", 0, UF_OPAQUE }, + { "nouunlnk", 0, UF_NOUNLINK }, + { "nouunlink", 0, UF_NOUNLINK } }; -#define longestflaglen 12 #define nmappings (sizeof(mapping) / sizeof(mapping[0])) /* From owner-svn-src-all@FreeBSD.ORG Thu Dec 29 22:48:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE833106566B; Thu, 29 Dec 2011 22:48:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC2818FC08; Thu, 29 Dec 2011 22:48:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBTMma3l078735; Thu, 29 Dec 2011 22:48:36 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBTMma4G078728; Thu, 29 Dec 2011 22:48:36 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201112292248.pBTMma4G078728@svn.freebsd.org> From: Robert Watson Date: Thu, 29 Dec 2011 22:48:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228973 - in head/sys: amd64/conf i386/conf ia64/conf pc98/conf powerpc/conf sparc64/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 29 Dec 2011 22:48:37 -0000 Author: rwatson Date: Thu Dec 29 22:48:36 2011 New Revision: 228973 URL: http://svn.freebsd.org/changeset/base/228973 Log: Add "options CAPABILITY_MODE" and "options CAPABILITIES" to GENERIC kernel configurations for various architectures in FreeBSD 10.x. This allows basic Capsicum functionality to be used in the default FreeBSD configuration on non-embedded architectures; process descriptors are not yet enabled by default. MFC after: 3 months Sponsored by: Google, Inc Modified: head/sys/amd64/conf/GENERIC head/sys/i386/conf/GENERIC head/sys/ia64/conf/GENERIC head/sys/pc98/conf/GENERIC head/sys/powerpc/conf/GENERIC head/sys/sparc64/conf/GENERIC Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Dec 29 22:15:18 2011 (r228972) +++ head/sys/amd64/conf/GENERIC Thu Dec 29 22:48:36 2011 (r228973) @@ -60,6 +60,8 @@ options PRINTF_BUFR_SIZE=128 # Prevent options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework #options KDTRACE_FRAME # Ensure frames are compiled in #options KDTRACE_HOOKS # Kernel DTrace hooks Modified: head/sys/i386/conf/GENERIC ============================================================================== --- head/sys/i386/conf/GENERIC Thu Dec 29 22:15:18 2011 (r228972) +++ head/sys/i386/conf/GENERIC Thu Dec 29 22:48:36 2011 (r228973) @@ -61,6 +61,8 @@ options PRINTF_BUFR_SIZE=128 # Prevent options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework #options KDTRACE_HOOKS # Kernel DTrace hooks options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/ia64/conf/GENERIC ============================================================================== --- head/sys/ia64/conf/GENERIC Thu Dec 29 22:15:18 2011 (r228972) +++ head/sys/ia64/conf/GENERIC Thu Dec 29 22:48:36 2011 (r228973) @@ -26,6 +26,8 @@ ident GENERIC makeoptions DEBUG=-g # Build kernel with debug information. options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities options CD9660 # ISO 9660 Filesystem options COMPAT_FREEBSD7 # Compatible with FreeBSD7 options FFS # Berkeley Fast Filesystem Modified: head/sys/pc98/conf/GENERIC ============================================================================== --- head/sys/pc98/conf/GENERIC Thu Dec 29 22:15:18 2011 (r228972) +++ head/sys/pc98/conf/GENERIC Thu Dec 29 22:48:36 2011 (r228973) @@ -63,6 +63,8 @@ options _KPOSIX_PRIORITY_SCHEDULING # P options KBD_INSTALL_CDEV # install a CDEV entry in /dev options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/powerpc/conf/GENERIC ============================================================================== --- head/sys/powerpc/conf/GENERIC Thu Dec 29 22:15:18 2011 (r228972) +++ head/sys/powerpc/conf/GENERIC Thu Dec 29 22:48:36 2011 (r228973) @@ -64,6 +64,8 @@ options SYSVSEM #SYSV-style semaphore options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel Modified: head/sys/sparc64/conf/GENERIC ============================================================================== --- head/sys/sparc64/conf/GENERIC Thu Dec 29 22:15:18 2011 (r228972) +++ head/sys/sparc64/conf/GENERIC Thu Dec 29 22:48:36 2011 (r228973) @@ -60,6 +60,8 @@ options _KPOSIX_PRIORITY_SCHEDULING # P options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities options MAC # TrustedBSD MAC Framework options INCLUDE_CONFIG_FILE # Include this file in kernel From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 00:02:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94689106567E; Fri, 30 Dec 2011 00:02:56 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B22F8FC17; Fri, 30 Dec 2011 00:02:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU02uvH084215; Fri, 30 Dec 2011 00:02:56 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU02uka084214; Fri, 30 Dec 2011 00:02:56 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112300002.pBU02uka084214@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Dec 2011 00:02:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228974 - head/tools/test/testfloat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 00:02:56 -0000 Author: uqs Date: Fri Dec 30 00:02:56 2011 New Revision: 228974 URL: http://svn.freebsd.org/changeset/base/228974 Log: Set fbsd:nokeywords for contributed sources. Modified: Directory Properties: head/tools/test/testfloat/systemBugs.txt (props changed) head/tools/test/testfloat/testfloat-history.txt (props changed) head/tools/test/testfloat/testfloat-source.txt (props changed) head/tools/test/testfloat/testfloat.txt (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 00:04:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C304106564A; Fri, 30 Dec 2011 00:04:12 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 172BB8FC15; Fri, 30 Dec 2011 00:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU04Cod084348; Fri, 30 Dec 2011 00:04:12 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU04BYa084315; Fri, 30 Dec 2011 00:04:11 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112300004.pBU04BYa084315@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Dec 2011 00:04:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228975 - in head/tools: KSE/ksetest debugscripts regression regression/bin/sh/builtins regression/fifo/fifo_io regression/file/dup regression/kthread/kld regression/lib/libc/nss regres... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 00:04:12 -0000 Author: uqs Date: Fri Dec 30 00:04:11 2011 New Revision: 228975 URL: http://svn.freebsd.org/changeset/base/228975 Log: Spelling fixes for tools/ Add some $FreeBSD$ tags so svn will allow the commit. Modified: head/tools/KSE/ksetest/kse_threads_test.c head/tools/debugscripts/gdbinit.i386 head/tools/debugscripts/kld_deb.py head/tools/regression/README head/tools/regression/bin/sh/builtins/cd1.0 head/tools/regression/fifo/fifo_io/fifo_io.c head/tools/regression/file/dup/dup.c head/tools/regression/kthread/kld/kthrdlk.c head/tools/regression/lib/libc/nss/README head/tools/regression/nfsmmap/Makefile head/tools/regression/nfsmmap/README head/tools/regression/pjdfstest/tests/chown/00.t head/tools/regression/priv/priv_cred.c head/tools/regression/security/open_to_operation/open_to_operation.c head/tools/regression/usr.bin/env/regress-sb.rb head/tools/regression/usr.bin/make/README head/tools/regression/usr.bin/make/variables/modifier_M/Makefile head/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1 head/tools/regression/usr.bin/sed/math.sed head/tools/regression/usr.sbin/newsyslog/regress.sh head/tools/test/posixshm/shm_test.c head/tools/test/testfloat/systemBugs.txt head/tools/test/testfloat/testfloat-source.txt head/tools/test/testfloat/testfloat.txt head/tools/tools/bus_autoconf/bus_autoconf.c head/tools/tools/cd2dvd/cd2dvd.sh head/tools/tools/net80211/wlaninject/README head/tools/tools/netmap/bridge.c head/tools/tools/netmap/pkt-gen.c head/tools/tools/sysbuild/README head/tools/tools/tinybsd/README Modified: head/tools/KSE/ksetest/kse_threads_test.c ============================================================================== --- head/tools/KSE/ksetest/kse_threads_test.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/KSE/ksetest/kse_threads_test.c Fri Dec 30 00:04:11 2011 (r228975) @@ -418,7 +418,7 @@ uts(struct kse_mailbox *km) simplelock_lock(&data->runq->lock); /* - * Process any signals we've recieved (but only if we have + * Process any signals we've received (but only if we have * somewhere to deliver them to). */ if ((data->runq->head != NULL) && SIGNOTEMPTY(km->km_sigscaught)) { Modified: head/tools/debugscripts/gdbinit.i386 ============================================================================== --- head/tools/debugscripts/gdbinit.i386 Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/debugscripts/gdbinit.i386 Fri Dec 30 00:04:11 2011 (r228975) @@ -268,7 +268,7 @@ while (*(int *) $frame > 0xc0000000) end end document btr -Show a backtrace from the ebp address specified. This can be used to get a backtrace from any stack resident in memory. It's the user's responsiblity to ensure that the address is meaningful. +Show a backtrace from the ebp address specified. This can be used to get a backtrace from any stack resident in memory. It's the user's responsibility to ensure that the address is meaningful. end # btp Modified: head/tools/debugscripts/kld_deb.py ============================================================================== --- head/tools/debugscripts/kld_deb.py Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/debugscripts/kld_deb.py Fri Dec 30 00:04:11 2011 (r228975) @@ -68,9 +68,9 @@ gdb = popen2.popen4(gdb_cmd) def searchfor(inp, re, j = 0, l = None): """searchfor(inp, re, j, l): Searches for regex re in inp. It will -automaticly add more lines. If j is set, the lines will be joined together. +automatically add more lines. If j is set, the lines will be joined together. l can provide a starting line to help search against. Return value is a -tupple of the last line, and the match if any.""" +tuple of the last line, and the match if any.""" ret = None if not l: l = inp.readline() @@ -87,7 +87,7 @@ tupple of the last line, and the match i def get_addresses(inp, out): """get_addresses(inp, out): It will search for addresses from gdb. inp and out, are the gdb input and output respectively. Return value is -a list of tupples. The tupples contain the filename and the address the +a list of tuples. The tuples contain the filename and the address the filename was loaded.""" addr = [] nxad = 1 Modified: head/tools/regression/README ============================================================================== --- head/tools/regression/README Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/README Fri Dec 30 00:04:11 2011 (r228975) @@ -37,7 +37,7 @@ test name. For example, A test may be flagged as 'todo'. This indicates that you expect the test to fail (perhaps because the necessary functionality hasn't been written yet). 'todo' tests are expected to fail, so when they start working the -test framework can alert you to this happy occurence. Flag these tests +test framework can alert you to this happy occurrence. Flag these tests with a '# TODO' comment after the test name not ok 1 - infiniteloop # TODO write test for an infinite loop Modified: head/tools/regression/bin/sh/builtins/cd1.0 ============================================================================== --- head/tools/regression/bin/sh/builtins/cd1.0 Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/bin/sh/builtins/cd1.0 Fri Dec 30 00:04:11 2011 (r228975) @@ -7,7 +7,7 @@ T=$(mktemp -d sh-test.XXXXXX) chmod 0 $T if [ `id -u` -ne 0 ]; then - # Root can always cd, irregardless of directory permissions. + # Root can always cd, regardless of directory permissions. cd -L $T 2>/dev/null && exit 1 [ "$PWD" = "$P" ] [ "$(pwd)" = "$P" ] Modified: head/tools/regression/fifo/fifo_io/fifo_io.c ============================================================================== --- head/tools/regression/fifo/fifo_io/fifo_io.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/fifo/fifo_io/fifo_io.c Fri Dec 30 00:04:11 2011 (r228975) @@ -395,7 +395,7 @@ timed_read(int fd, void *data, size_t le * * We use a timeout of 5 seconds, concluding that in 5 seconds either all I/O * that can take place will, and that if we reach the end of the timeout, - * then blocking has occured. + * then blocking has occurred. * * We assume that the buffer size on a fifo is <512K, and as such, that * writing that much data without an active reader will result in blocking. Modified: head/tools/regression/file/dup/dup.c ============================================================================== --- head/tools/regression/file/dup/dup.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/file/dup/dup.c Fri Dec 30 00:04:11 2011 (r228975) @@ -104,7 +104,7 @@ main(int __unused argc, char __unused *a * Normally dup and dup2 will clear the close-on-exec * flag on the new fd (which appears to be an implementation * mistake from start and not some planned behavior). - * In todays implementations of dup and dup2 we have to make + * In today's implementations of dup and dup2 we have to make * an effort to really clear that flag. But all tested * implementations of dup2 have another tweak. If we * dup2(old, new) when old == new, the syscall short-circuits Modified: head/tools/regression/kthread/kld/kthrdlk.c ============================================================================== --- head/tools/regression/kthread/kld/kthrdlk.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/kthread/kld/kthrdlk.c Fri Dec 30 00:04:11 2011 (r228975) @@ -164,7 +164,7 @@ kthrdlk_done(void) while (test_thrcnt != 0) { ret = mtx_sleep(&global_condvar, &test_global_lock, 0, "waiting thrs end", 30 * hz); if (ret == EWOULDBLOCK) { - panic("some threads not die! remaing: %d", test_thrcnt); + panic("some threads not die! remaining: %d", test_thrcnt); break; } } Modified: head/tools/regression/lib/libc/nss/README ============================================================================== --- head/tools/regression/lib/libc/nss/README Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/lib/libc/nss/README Fri Dec 30 00:04:11 2011 (r228975) @@ -5,7 +5,7 @@ A brief how-to Each nsswitch regression test does 2 kinds of actions: 1. It runs a series of queries and tests the correctness of results. - There are 2 basic criterias which are used for that: + There are 2 basic criteria which are used for that: - numbers must be in the correct range - certain pointers should not be NULL Modified: head/tools/regression/nfsmmap/Makefile ============================================================================== --- head/tools/regression/nfsmmap/Makefile Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/nfsmmap/Makefile Fri Dec 30 00:04:11 2011 (r228975) @@ -1,3 +1,5 @@ +# $FreeBSD$ + SUBDIR= test1 test2 .include Modified: head/tools/regression/nfsmmap/README ============================================================================== --- head/tools/regression/nfsmmap/README Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/nfsmmap/README Fri Dec 30 00:04:11 2011 (r228975) @@ -1,3 +1,4 @@ +$FreeBSD$ These tests are intended to make sure that NFS's use of the b_{valid,dirty}{off,end} fields of struct buf is consistent with the VM system's use of the underlying VM pages. @@ -17,4 +18,4 @@ Test2: should first write out the dirty range and then read the rest of the page. This is currently broken since the vnode_pager doesn't use the original buf for its i/o and therefore the - information in b_dirtyoff, b_dirtyend is not avalable. + information in b_dirtyoff, b_dirtyend is not available. Modified: head/tools/regression/pjdfstest/tests/chown/00.t ============================================================================== --- head/tools/regression/pjdfstest/tests/chown/00.t Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/pjdfstest/tests/chown/00.t Fri Dec 30 00:04:11 2011 (r228975) @@ -296,7 +296,7 @@ for type in regular dir fifo block char fi done -# successfull chown(2) call (except uid and gid equal to -1) updates ctime. +# successful chown(2) call (except uid and gid equal to -1) updates ctime. for type in regular dir fifo block char socket symlink; do if [ "${type}" != "symlink" ]; then create_file ${type} ${n0} Modified: head/tools/regression/priv/priv_cred.c ============================================================================== --- head/tools/regression/priv/priv_cred.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/priv/priv_cred.c Fri Dec 30 00:04:11 2011 (r228975) @@ -31,7 +31,7 @@ /* * Confirm that various UID/GID/etc-related system calls require root - * privilege in the absense of any saved/real/etc variations in the + * privilege in the absence of any saved/real/etc variations in the * credential. It would be nice to also check cases where those bits of the * credential are more interesting. * Modified: head/tools/regression/security/open_to_operation/open_to_operation.c ============================================================================== --- head/tools/regression/security/open_to_operation/open_to_operation.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/security/open_to_operation/open_to_operation.c Fri Dec 30 00:04:11 2011 (r228975) @@ -796,7 +796,7 @@ check_write(const char *testname, write_ } else { if (!((mode & O_ACCMODE) == O_WRONLY || (mode & O_ACCMODE) == O_RDWR)) - notok_mode(testname, "write suceeded", mode); + notok_mode(testname, "write succeeded", mode); else ok_mode(testname, "write succeeded", mode); } @@ -880,7 +880,7 @@ check_read(const char *testname, read_fn } else { if (!((mode & O_ACCMODE) == O_RDONLY || (mode & O_ACCMODE) == O_RDWR)) - notok_mode(testname, "read suceeded", mode); + notok_mode(testname, "read succeeded", mode); else ok_mode(testname, "read succeeded", mode); } Modified: head/tools/regression/usr.bin/env/regress-sb.rb ============================================================================== --- head/tools/regression/usr.bin/env/regress-sb.rb Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/usr.bin/env/regress-sb.rb Fri Dec 30 00:04:11 2011 (r228975) @@ -341,7 +341,7 @@ class RGTestOptions # for test data. Format of all recognized values should be: # [%-object.value-%] # which is hopefully distinctive-enough that they will never - # conflict with any naturally-occuring string. Also note that + # conflict with any naturally-occurring string. Also note that # we only match the specific values that we recognize, and not # "just anything" that matches the general pattern. There are # no blanks in the recognized values, but I use an x-tended Modified: head/tools/regression/usr.bin/make/README ============================================================================== --- head/tools/regression/usr.bin/make/README Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/usr.bin/make/README Fri Dec 30 00:04:11 2011 (r228975) @@ -8,7 +8,7 @@ output for '^not ok'. ---------------------------------------------------------------------------- -The rest of this file is intented for developers. +The rest of this file is intended for developers. The tests are invoked via the test.sh script or prove(1) from p5-Test-Harness. Tests are normally executed in a special test directory that is built under Modified: head/tools/regression/usr.bin/make/variables/modifier_M/Makefile ============================================================================== --- head/tools/regression/usr.bin/make/variables/modifier_M/Makefile Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/usr.bin/make/variables/modifier_M/Makefile Fri Dec 30 00:04:11 2011 (r228975) @@ -12,7 +12,7 @@ test1: @echo "all files: ${FILES}" @echo "cfiles: ${FILES:M*.c}" @echo "hfiles: ${FILES:M*.h}" - @echo "grammer and lexer: ${FILES:M*.[ly]}" + @echo "grammar and lexer: ${FILES:M*.[ly]}" @echo "man page: ${FILES:M*.[1-9]}" @echo "utility files: ${FILES:Mutil.?}" @echo "m files: ${FILES:Mm*}" Modified: head/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1 ============================================================================== --- head/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1 Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/usr.bin/make/variables/modifier_M/expected.stdout.1 Fri Dec 30 00:04:11 2011 (r228975) @@ -1,7 +1,7 @@ all files: main.c globals.h util.c util.h map.c map.h parser.y lexer.l cmdman.1 format.5 cfiles: main.c util.c map.c hfiles: globals.h util.h map.h -grammer and lexer: parser.y lexer.l +grammar and lexer: parser.y lexer.l man page: cmdman.1 format.5 utility files: util.c util.h m files: main.c map.c map.h Modified: head/tools/regression/usr.bin/sed/math.sed ============================================================================== --- head/tools/regression/usr.bin/sed/math.sed Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/usr.bin/sed/math.sed Fri Dec 30 00:04:11 2011 (r228975) @@ -57,7 +57,7 @@ x s//\1(\2)/ b loop } -# pull any burried exponents +# pull any buried exponents /^\(.*[^0-9]\)\([0-9][0-9]*^[0-9][0-9]*\)$/{ s//\1(\2)/ b loop Modified: head/tools/regression/usr.sbin/newsyslog/regress.sh ============================================================================== --- head/tools/regression/usr.sbin/newsyslog/regress.sh Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/regression/usr.sbin/newsyslog/regress.sh Fri Dec 30 00:04:11 2011 (r228975) @@ -70,8 +70,8 @@ cknt() fi } -# Check if a file is there, depending of if it's suposed to or not - -# basically how many log files we are suposed to keep vs. how many we +# Check if a file is there, depending of if it's supposed to or not - +# basically how many log files we are supposed to keep vs. how many we # actually keep. ckntfe() { Modified: head/tools/test/posixshm/shm_test.c ============================================================================== --- head/tools/test/posixshm/shm_test.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/test/posixshm/shm_test.c Fri Dec 30 00:04:11 2011 (r228975) @@ -1,6 +1,6 @@ /* * Test the POSIX shared-memory API. - * Dedicated to tyhe public domain by Garrett A. Wollman, 2000. + * Dedicated to the public domain by Garrett A. Wollman, 2000. * $FreeBSD$ */ Modified: head/tools/test/testfloat/systemBugs.txt ============================================================================== --- head/tools/test/testfloat/systemBugs.txt Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/test/testfloat/systemBugs.txt Fri Dec 30 00:04:11 2011 (r228975) @@ -27,7 +27,7 @@ For some reason, most of the bugs found point to integer formats. The bugs are shown as actual TestFloat error lines, along with a brief -explanation. The error lines given are not necesarily exhaustive and were +explanation. The error lines given are not necessarily exhaustive and were not necessarily output in the order shown. This document does not pretend to be an authoritative bug listing for all Modified: head/tools/test/testfloat/testfloat-source.txt ============================================================================== --- head/tools/test/testfloat/testfloat-source.txt Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/test/testfloat/testfloat-source.txt Fri Dec 30 00:04:11 2011 (r228975) @@ -46,7 +46,7 @@ name has been obsolete for some time. Limitations TestFloat as written requires an ISO/ANSI-style C compiler. No attempt has -been made to accomodate compilers that are not ISO-conformant. Older ``K&R- +been made to accommodate compilers that are not ISO-conformant. Older ``K&R- style'' compilers are not adequate for compiling TestFloat. All testing I have done so far has been with the GNU C Compiler. Compilation with other compilers should be possible but has not been tested. @@ -168,7 +168,7 @@ intended to be identical to that include These are the defaults, but other organizations of the sources are possible. The TestFloat makefiles and `milieu.h' files (see below) are easily edited -to accomodate other arrangements. +to accommodate other arrangements. ------------------------------------------------------------------------------- Modified: head/tools/test/testfloat/testfloat.txt ============================================================================== --- head/tools/test/testfloat/testfloat.txt Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/test/testfloat/testfloat.txt Fri Dec 30 00:04:11 2011 (r228975) @@ -289,7 +289,7 @@ raise the invalid exception if the sourc representable integer of the desired size (32 or 64 bits). If such a conversion overflows, TestFloat expects the largest integer with the same sign as the operand to be returned. If the floating-point operand is a NaN, -TestFloat allows either the largest postive or largest negative integer to +TestFloat allows either the largest positive or largest negative integer to be returned. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -629,7 +629,7 @@ TestFloat assumes that conversions to in exception if the source value cannot be rounded to a representable integer. When the conversion overflows, TestFloat expects the largest integer with the same sign as the operand to be returned. If the floating-point operand -is a NaN, TestFloat allows either the largest postive or largest negative +is a NaN, TestFloat allows either the largest positive or largest negative integer to be returned. The current version of TestFloat provides no means to alter these conventions. Modified: head/tools/tools/bus_autoconf/bus_autoconf.c ============================================================================== --- head/tools/tools/bus_autoconf/bus_autoconf.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/tools/bus_autoconf/bus_autoconf.c Fri Dec 30 00:04:11 2011 (r228975) @@ -27,7 +27,7 @@ /* * Disclaimer: This utility and format is subject to change and not a - * comitted interface. + * committed interface. */ #include Modified: head/tools/tools/cd2dvd/cd2dvd.sh ============================================================================== --- head/tools/tools/cd2dvd/cd2dvd.sh Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/tools/cd2dvd/cd2dvd.sh Fri Dec 30 00:04:11 2011 (r228975) @@ -229,7 +229,7 @@ then echo "Error: less than two CD images specified." fi -## Some usefull variables +## Some useful variables pwd=`pwd` tmpdirin="${pwd}/tmp-$$-in" tmpdirout="${pwd}/tmp-$$-out" Modified: head/tools/tools/net80211/wlaninject/README ============================================================================== --- head/tools/tools/net80211/wlaninject/README Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/tools/net80211/wlaninject/README Fri Dec 30 00:04:11 2011 (r228975) @@ -46,7 +46,7 @@ Interesting 802.11 header options. will be calculated. Symbolic names are: preq, probereq Probe Request auth Authenticate - areq, assocreq Assocation Request + areq, assocreq Association Request data Data Otherwise the numerical subtype must be supplied. -4 The 4th MAC addr used for WDS. Make sure you specify this before Modified: head/tools/tools/netmap/bridge.c ============================================================================== --- head/tools/tools/netmap/bridge.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/tools/netmap/bridge.c Fri Dec 30 00:04:11 2011 (r228975) @@ -227,7 +227,7 @@ process_rings(struct netmap_ring *rxring ts->buf_idx = rs->buf_idx; rs->buf_idx = pkt; - /* copy the packet lenght. */ + /* copy the packet length. */ if (rs->len < 14 || rs->len > 2048) D("wrong len %d rx[%d] -> tx[%d]", rs->len, j, k); else if (verbose > 1) Modified: head/tools/tools/netmap/pkt-gen.c ============================================================================== --- head/tools/tools/netmap/pkt-gen.c Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/tools/netmap/pkt-gen.c Fri Dec 30 00:04:11 2011 (r228975) @@ -432,7 +432,7 @@ sender_body(void *data) if (setaffinity(targ->thread, targ->affinity)) goto quit; - /* setup poll(2) machanism. */ + /* setup poll(2) mechanism. */ memset(fds, 0, sizeof(fds)); fds[0].fd = targ->fd; fds[0].events = (POLLOUT); @@ -543,7 +543,7 @@ receiver_body(void *data) if (setaffinity(targ->thread, targ->affinity)) goto quit; - /* setup poll(2) machanism. */ + /* setup poll(2) mechanism. */ memset(fds, 0, sizeof(fds)); fds[0].fd = targ->fd; fds[0].events = (POLLIN); @@ -568,7 +568,7 @@ receiver_body(void *data) before quitting. */ if (poll(fds, 1, 1 * 1000) <= 0) { gettimeofday(&targ->toc, NULL); - targ->toc.tv_sec -= 1; /* Substract timeout time. */ + targ->toc.tv_sec -= 1; /* Subtract timeout time. */ break; } @@ -994,8 +994,8 @@ main(int arc, char **argv) continue; /* - * Collect threads o1utput and extract information about - * how log it took to send all the packets. + * Collect threads output and extract information about + * how long it took to send all the packets. */ count += targs[i].count; if (!timerisset(&tic) || timercmp(&targs[i].tic, &tic, <)) Modified: head/tools/tools/sysbuild/README ============================================================================== --- head/tools/tools/sysbuild/README Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/tools/sysbuild/README Fri Dec 30 00:04:11 2011 (r228975) @@ -22,7 +22,7 @@ If you know how nanobsd works, you will HOWTO ===== -In all likelyhood, it is easier if we imagine you start with a blank +In all likelihood, it is easier if we imagine you start with a blank computer. Grab a FreeBSD install ISO and boot it. Modified: head/tools/tools/tinybsd/README ============================================================================== --- head/tools/tools/tinybsd/README Fri Dec 30 00:02:56 2011 (r228974) +++ head/tools/tools/tinybsd/README Fri Dec 30 00:04:11 2011 (r228975) @@ -105,7 +105,7 @@ do that step-by-step. 3) Edit the tinybsd.basefiles file and add/remove all binaries you'll need on your system. -4) Copy all your /etc configuration wich you want to conf/YOURIMAGE/etc/. +4) Copy all your /etc configuration which you want to conf/YOURIMAGE/etc/. 5) Gather the right information on your destination media. To do that, plug in the device on the system and fetch the information using diskinfo(8): From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 00:59:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AED30106566B; Fri, 30 Dec 2011 00:59:08 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A9558FC14; Fri, 30 Dec 2011 00:59:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU0x8IS087209; Fri, 30 Dec 2011 00:59:08 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU0x8BX087193; Fri, 30 Dec 2011 00:59:08 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112300059.pBU0x8BX087193@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Dec 2011 00:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228976 - in head/usr.sbin: acpi/acpiconf bluetooth/hccontrol burncd chkgrp kbdcontrol kldxref pkg_install/updating vidcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 00:59:08 -0000 Author: uqs Date: Fri Dec 30 00:59:08 2011 New Revision: 228976 URL: http://svn.freebsd.org/changeset/base/228976 Log: Reencode files to UTF-8. Drop CP1252 em-dash. Modified: head/usr.sbin/acpi/acpiconf/acpiconf.8 head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c head/usr.sbin/burncd/burncd.8 head/usr.sbin/burncd/burncd.c head/usr.sbin/chkgrp/chkgrp.8 head/usr.sbin/chkgrp/chkgrp.c head/usr.sbin/kbdcontrol/kbdcontrol.c head/usr.sbin/kbdcontrol/lex.h head/usr.sbin/kbdcontrol/lex.l head/usr.sbin/kldxref/kldxref.8 head/usr.sbin/pkg_install/updating/main.c head/usr.sbin/pkg_install/updating/pathnames.h head/usr.sbin/pkg_install/updating/pkg_updating.1 head/usr.sbin/vidcontrol/decode.c head/usr.sbin/vidcontrol/vidcontrol.c Modified: head/usr.sbin/acpi/acpiconf/acpiconf.8 ============================================================================== --- head/usr.sbin/acpi/acpiconf/acpiconf.8 Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/acpi/acpiconf/acpiconf.8 Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2000 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Fri Dec 30 00:59:08 2011 (r228976) @@ -1632,8 +1632,8 @@ struct hci_command host_controller_baseb "begins the next page scan. The Page_Scan_Window configuration parameter\n" \ "defines the amount of time for the duration of the page scan. \n" \ "The Page_Scan_Window can only be less than or equal to the Page_Scan_Interval.\n\n" \ -"\t - Range: 0x0012 -– 0x100, Time = N * 0.625 msec\n" \ -"\t - Range: 0x0012 -– 0x100, Time = N * 0.625 msen", +"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msec\n" \ +"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msen", &hci_write_page_scan_activity }, { @@ -1654,8 +1654,8 @@ struct hci_command host_controller_baseb "until it begins the next inquiry scan. The Inquiry_Scan_Window configuration\n" \ "parameter defines the amount of time for the duration of the inquiry scan.\n" \ "The Inquiry_Scan_Window can only be less than or equal to the Inquiry_Scan_Interval.\n\n" \ -"\t - Range: 0x0012 -– 0x100, Time = N * 0.625 msec\n" \ -"\t - Range: 0x0012 -– 0x100, Time = N * 0.625 msen", +"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msec\n" \ +"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msen", &hci_write_inquiry_scan_activity }, { Modified: head/usr.sbin/burncd/burncd.8 ============================================================================== --- head/usr.sbin/burncd/burncd.8 Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/burncd/burncd.8 Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2000,2001,2002 Søren Schmidt +.\" Copyright (c) 2000,2001,2002 Søren Schmidt .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/burncd/burncd.c ============================================================================== --- head/usr.sbin/burncd/burncd.c Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/burncd/burncd.c Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2000,2001,2002 Søren Schmidt + * Copyright (c) 2000,2001,2002 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/chkgrp/chkgrp.8 ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.8 Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/chkgrp/chkgrp.8 Fri Dec 30 00:59:08 2011 (r228976) @@ -1,4 +1,4 @@ -.\" Copyright (c) 1998 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 1998 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/chkgrp/chkgrp.c ============================================================================== --- head/usr.sbin/chkgrp/chkgrp.c Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/chkgrp/chkgrp.c Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav + * Copyright (c) 1998 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/kbdcontrol/kbdcontrol.c ============================================================================== --- head/usr.sbin/kbdcontrol/kbdcontrol.c Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/kbdcontrol/kbdcontrol.c Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1994-1995 Søren Schmidt + * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/kbdcontrol/lex.h ============================================================================== --- head/usr.sbin/kbdcontrol/lex.h Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/kbdcontrol/lex.h Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1994-1995 Søren Schmidt + * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/kbdcontrol/lex.l ============================================================================== --- head/usr.sbin/kbdcontrol/lex.l Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/kbdcontrol/lex.l Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1994-1995 Søren Schmidt + * Copyright (c) 1994-1995 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/kldxref/kldxref.8 ============================================================================== --- head/usr.sbin/kldxref/kldxref.8 Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/kldxref/kldxref.8 Fri Dec 30 00:59:08 2011 (r228976) @@ -1,6 +1,6 @@ .\"- .\" Copyright (c) 2001 Boris Popov -.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2001 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/pkg_install/updating/main.c ============================================================================== --- head/usr.sbin/pkg_install/updating/main.c Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/pkg_install/updating/main.c Fri Dec 30 00:59:08 2011 (r228976) @@ -3,7 +3,7 @@ * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Beat Gätzi + * this stuff is worth it, you can buy me a beer in return. Beat Gätzi * ---------------------------------------------------------------------------- */ Modified: head/usr.sbin/pkg_install/updating/pathnames.h ============================================================================== --- head/usr.sbin/pkg_install/updating/pathnames.h Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/pkg_install/updating/pathnames.h Fri Dec 30 00:59:08 2011 (r228976) @@ -3,7 +3,7 @@ * "THE BEER-WARE LICENSE" (Revision 42): * wrote this file. As long as you retain this notice you * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Beat Gätzi + * this stuff is worth it, you can buy me a beer in return. Beat Gätzi * ---------------------------------------------------------------------------- * * $FreeBSD$ Modified: head/usr.sbin/pkg_install/updating/pkg_updating.1 ============================================================================== --- head/usr.sbin/pkg_install/updating/pkg_updating.1 Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/pkg_install/updating/pkg_updating.1 Fri Dec 30 00:59:08 2011 (r228976) @@ -6,7 +6,7 @@ .\" "THE BEER-WARE LICENSE" (Revision 42): .\" wrote this file. As long as you retain this notice you .\" can do whatever you want with this stuff. If we meet some day, and you think -.\" this stuff is worth it, you can buy me a beer in return. Beat Gätzi +.\" this stuff is worth it, you can buy me a beer in return. Beat Gätzi .\" .\" $FreeBSD$ .\" Modified: head/usr.sbin/vidcontrol/decode.c ============================================================================== --- head/usr.sbin/vidcontrol/decode.c Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/vidcontrol/decode.c Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1994 Søren Schmidt + * Copyright (c) 1994 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.sbin/vidcontrol/vidcontrol.c ============================================================================== --- head/usr.sbin/vidcontrol/vidcontrol.c Fri Dec 30 00:04:11 2011 (r228975) +++ head/usr.sbin/vidcontrol/vidcontrol.c Fri Dec 30 00:59:08 2011 (r228976) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1994-1996 Søren Schmidt + * Copyright (c) 1994-1996 Søren Schmidt * All rights reserved. * * Portions of this software are based in part on the work of From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 01:37:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F2961065670; Fri, 30 Dec 2011 01:37:26 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E6CAE8FC0A; Fri, 30 Dec 2011 01:37:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU1bPHu089211; Fri, 30 Dec 2011 01:37:25 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU1bPda089209; Fri, 30 Dec 2011 01:37:25 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112300137.pBU1bPda089209@svn.freebsd.org> From: Ed Schouten Date: Fri, 30 Dec 2011 01:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228977 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 01:37:26 -0000 Author: ed Date: Fri Dec 30 01:37:25 2011 New Revision: 228977 URL: http://svn.freebsd.org/changeset/base/228977 Log: Extend to support GCC 4.7's __atomic. The development version of GCC also supports an atomics interface similar to Clang's. Change the header file to work as follows: - __CLANG_ATOMICS: Use Clang's new atomics interface, - __GNUC_ATOMICS: Use GCC's new atomics interface, - else: fall back to GCC's __sync interface. Modified: head/include/stdatomic.h Modified: head/include/stdatomic.h ============================================================================== --- head/include/stdatomic.h Fri Dec 30 00:59:08 2011 (r228976) +++ head/include/stdatomic.h Fri Dec 30 01:37:25 2011 (r228977) @@ -35,13 +35,13 @@ #if __has_feature(cxx_atomic) #define __CLANG_ATOMICS -#elif defined(__GNUC__) +#elif __GNUC_PREREQ__(4, 7) #define __GNUC_ATOMICS -#else +#elif !defined(__GNUC__) #error "stdatomic.h does not support your compiler" #endif -#ifdef __GNUC_ATOMICS +#if !defined(__CLANG_ATOMICS) #define _Atomic(T) struct { volatile T __val; } #endif @@ -52,7 +52,7 @@ #if defined(__CLANG_ATOMICS) #define ATOMIC_VAR_INIT(value) (value) #define atomic_init(obj, value) __atomic_init(obj, value) -#elif defined(__GNUC_ATOMICS) +#else #define ATOMIC_VAR_INIT(value) { .__val = (value) } #define atomic_init(obj, value) do { \ (obj)->__val = (value); \ @@ -106,19 +106,28 @@ enum memory_order { #if defined(__CLANG_ATOMICS) #define atomic_thread_fence(order) __atomic_thread_fence(order) +#define atomic_signal_fence(order) __asm volatile ("" : : : "memory"); #elif defined(__GNUC_ATOMICS) +#define atomic_thread_fence(order) __atomic_thread_fence(order) +#define atomic_signal_fence(order) __atomic_signal_fence(order) +#else #define atomic_thread_fence(order) __sync_synchronize() -#endif #define atomic_signal_fence(order) __asm volatile ("" : : : "memory"); +#endif /* * 7.17.5 Lock-free property. */ #if defined(__CLANG_ATOMICS) -#define atomic_is_lock_free(obj) __atomic_is_lock_free(obj) +#define atomic_is_lock_free(obj) \ + __atomic_is_lock_free(obj) #elif defined(__GNUC_ATOMICS) -#define atomic_is_lock_free(obj) (sizeof((obj)->__val) <= sizeof(void *)) +#define atomic_is_lock_free(obj) \ + __atomic_is_lock_free(sizeof((obj)->__val)) +#else +#define atomic_is_lock_free(obj) \ + (sizeof((obj)->__val) <= sizeof(void *)) #endif /* @@ -200,6 +209,31 @@ typedef _Atomic(__uintmax_t) atomic_uin __atomic_store(object, desired, order) #elif defined(__GNUC_ATOMICS) #define atomic_compare_exchange_strong_explicit(object, expected, \ + desired, success, failure) \ + __atomic_compare_exchange_n(&(object)->__val, expected, \ + desired, 0, success, failure) +#define atomic_compare_exchange_weak_explicit(object, expected, \ + desired, success, failure) \ + __atomic_compare_exchange_n(&(object)->__val, expected, \ + desired, 1, success, failure) +#define atomic_exchange_explicit(object, desired, order) \ + __atomic_exchange_n(&(object)->__val, desired, order) +#define atomic_fetch_add_explicit(object, operand, order) \ + __atomic_fetch_add(&(object)->__val, operand, order) +#define atomic_fetch_and_explicit(object, operand, order) \ + __atomic_fetch_and(&(object)->__val, operand, order) +#define atomic_fetch_or_explicit(object, operand, order) \ + __atomic_fetch_or(&(object)->__val, operand, order) +#define atomic_fetch_sub_explicit(object, operand, order) \ + __atomic_fetch_sub(&(object)->__val, operand, order) +#define atomic_fetch_xor_explicit(object, operand, order) \ + __atomic_fetch_xor(&(object)->__val, operand, order) +#define atomic_load_explicit(object, order) \ + __atomic_load_n(&(object)->__val, order) +#define atomic_store_explicit(object, desired, order) \ + __atomic_store_n(&(object)->__val, desired, order) +#else +#define atomic_compare_exchange_strong_explicit(object, expected, \ desired, success, failure) ({ \ __typeof__((object)->__val) __v; \ _Bool __r; \ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 01:54:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 932BA106566B; Fri, 30 Dec 2011 01:54:45 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7812A8FC1A; Fri, 30 Dec 2011 01:54:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU1sjct090144; Fri, 30 Dec 2011 01:54:45 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU1sjID090138; Fri, 30 Dec 2011 01:54:45 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112300154.pBU1sjID090138@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 01:54:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228978 - in head/sys: conf modules/drm/r128 modules/drm/radeon modules/drm/via X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 01:54:45 -0000 Author: dim Date: Fri Dec 30 01:54:45 2011 New Revision: 228978 URL: http://svn.freebsd.org/changeset/base/228978 Log: For several files in sys/dev/drm, disable -Wunused-value when building with clang. There are several macros in these files that return values, and in some cases nothing is done with them, but it is completely harmless. For some other files, also disable -Wconstant-conversion, since that triggers a false positive with the DMA_BIT_MASK() macro. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk head/sys/modules/drm/r128/Makefile head/sys/modules/drm/radeon/Makefile head/sys/modules/drm/via/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Dec 30 01:37:25 2011 (r228977) +++ head/sys/conf/files Fri Dec 30 01:54:45 2011 (r228978) @@ -992,15 +992,18 @@ dev/drm/mga_irq.c optional mgadrm dev/drm/mga_state.c optional mgadrm \ compile-with "${NORMAL_C} -finline-limit=13500" dev/drm/mga_warp.c optional mgadrm -dev/drm/r128_cce.c optional r128drm +dev/drm/r128_cce.c optional r128drm \ + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}" dev/drm/r128_drv.c optional r128drm dev/drm/r128_irq.c optional r128drm dev/drm/r128_state.c optional r128drm \ - compile-with "${NORMAL_C} -finline-limit=13500" + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} -finline-limit=13500" dev/drm/r300_cmdbuf.c optional radeondrm dev/drm/r600_blit.c optional radeondrm -dev/drm/r600_cp.c optional radeondrm -dev/drm/radeon_cp.c optional radeondrm +dev/drm/r600_cp.c optional radeondrm \ + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}" +dev/drm/radeon_cp.c optional radeondrm \ + compile-with "${NORMAL_C} ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION}" dev/drm/radeon_cs.c optional radeondrm dev/drm/radeon_drv.c optional radeondrm dev/drm/radeon_irq.c optional radeondrm Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Dec 30 01:37:25 2011 (r228977) +++ head/sys/conf/kern.mk Fri Dec 30 01:54:45 2011 (r228978) @@ -20,6 +20,7 @@ NO_WCONSTANT_CONVERSION= -Wno-constant-c NO_WARRAY_BOUNDS= -Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow +NO_WUNUSED_VALUE= -Wno-unused-value # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. Modified: head/sys/modules/drm/r128/Makefile ============================================================================== --- head/sys/modules/drm/r128/Makefile Fri Dec 30 01:37:25 2011 (r228977) +++ head/sys/modules/drm/r128/Makefile Fri Dec 30 01:54:45 2011 (r228978) @@ -6,3 +6,7 @@ SRCS = r128_cce.c r128_drv.c r128_irq.c SRCS +=device_if.h bus_if.h pci_if.h opt_drm.h .include + +CWARNFLAGS.r128_cce.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.r128_state.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/modules/drm/radeon/Makefile ============================================================================== --- head/sys/modules/drm/radeon/Makefile Fri Dec 30 01:37:25 2011 (r228977) +++ head/sys/modules/drm/radeon/Makefile Fri Dec 30 01:54:45 2011 (r228978) @@ -7,3 +7,7 @@ SRCS = r300_cmdbuf.c r600_blit.c r600_cp SRCS +=device_if.h bus_if.h pci_if.h opt_drm.h .include + +CWARNFLAGS.r600_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS.radeon_cp.c= ${NO_WUNUSED_VALUE} ${NO_WCONSTANT_CONVERSION} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/modules/drm/via/Makefile ============================================================================== --- head/sys/modules/drm/via/Makefile Fri Dec 30 01:37:25 2011 (r228977) +++ head/sys/modules/drm/via/Makefile Fri Dec 30 01:54:45 2011 (r228978) @@ -20,3 +20,7 @@ opt_drm.h: echo $(DRM_LINUX_OPT) >> opt_drm.h .include + +CWARNFLAGS.via_dma.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS.via_dmablit.c= ${NO_WUNUSED_VALUE} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 02:07:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EA54106564A; Fri, 30 Dec 2011 02:07:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA9D8FC16; Fri, 30 Dec 2011 02:07:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU27oeg090779; Fri, 30 Dec 2011 02:07:50 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU27oFc090777; Fri, 30 Dec 2011 02:07:50 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112300207.pBU27oFc090777@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 02:07:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228979 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 02:07:51 -0000 Author: dim Date: Fri Dec 30 02:07:50 2011 New Revision: 228979 URL: http://svn.freebsd.org/changeset/base/228979 Log: In sys/dev/drm/radeon_state.c, use the correct printf length modifiers for ints. MFC after: 1 week Modified: head/sys/dev/drm/radeon_state.c Modified: head/sys/dev/drm/radeon_state.c ============================================================================== --- head/sys/dev/drm/radeon_state.c Fri Dec 30 01:54:45 2011 (r228978) +++ head/sys/dev/drm/radeon_state.c Fri Dec 30 02:07:50 2011 (r228979) @@ -1745,7 +1745,7 @@ static int radeon_cp_dispatch_texture(st DRM_DEBUG("tex=%dx%d blit=%d\n", tex_width, tex->height, blit_width); do { - DRM_DEBUG("tex: ofs=0x%x p=%d f=%d x=%hd y=%hd w=%hd h=%hd\n", + DRM_DEBUG("tex: ofs=0x%x p=%d f=%d x=%d y=%d w=%d h=%d\n", tex->offset >> 10, tex->pitch, tex->format, image->x, image->y, image->width, image->height); From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 02:54:57 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E91F106566B; Fri, 30 Dec 2011 02:54:57 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f07:14d3:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id C707D8FC13; Fri, 30 Dec 2011 02:54:56 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f07:14d3:1::5]) by mail.farley.org (8.14.5/8.14.5) with ESMTP id pBU2st8u028658; Thu, 29 Dec 2011 21:54:55 -0500 (EST) (envelope-from scf@FreeBSD.org) Date: Thu, 29 Dec 2011 21:54:55 -0500 (EST) From: "Sean C. Farley" To: Ed Schouten In-Reply-To: <201112252015.pBPKFfZ1073959@svn.freebsd.org> Message-ID: References: <201112252015.pBPKFfZ1073959@svn.freebsd.org> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.farley.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228878 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 02:54:57 -0000 On Sun, 25 Dec 2011, Ed Schouten wrote: > Author: ed > Date: Sun Dec 25 20:15:41 2011 > New Revision: 228878 > URL: http://svn.freebsd.org/changeset/base/228878 > > Log: > Remove unneeded guard. > > There is no reason why needs an include guard. It is already > protected by __bool_true_false_are_defined. > > Modified: > head/include/stdbool.h > > Modified: head/include/stdbool.h > ============================================================================== > --- head/include/stdbool.h Sun Dec 25 18:15:31 2011 (r228877) > +++ head/include/stdbool.h Sun Dec 25 20:15:41 2011 (r228878) > @@ -26,9 +26,6 @@ > * $FreeBSD$ > */ > > -#ifndef _STDBOOL_H_ > -#define _STDBOOL_H_ > - > #ifndef __bool_true_false_are_defined > #define __bool_true_false_are_defined 1 > > @@ -44,5 +41,3 @@ typedef int _Bool; > > #endif /* !__cplusplus */ > #endif /* __bool_true_false_are_defined */ > - > -#endif /* !_STDBOOL_H_ */ I just thought of this while reviewing the change: should __bool_true_false_are_defined be set only if __cplusplus is not set? It should be set for C99, but I wonder if it should be set for C++. Also, is there a style requirement that the guard for a header file be based off of the name of the file? I did not see anything obvious for this within style(9), but I am curious. Sean -- scf@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 02:58:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28FA5106564A; Fri, 30 Dec 2011 02:58:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F15B78FC0C; Fri, 30 Dec 2011 02:58:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU2wb8N092413; Fri, 30 Dec 2011 02:58:37 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU2wbHY092410; Fri, 30 Dec 2011 02:58:37 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112300258.pBU2wbHY092410@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 02:58:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228980 - in head/sys/dev/ath/ath_hal: ar5210 ar5211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 02:58:38 -0000 Author: dim Date: Fri Dec 30 02:58:37 2011 New Revision: 228980 URL: http://svn.freebsd.org/changeset/base/228980 Log: Reapply r228785 now it has been tested by Adrian. Also add comments with the old AR_SCR_SLE_XXX values, with a short explanation why they were changed. Reviewed by: adrian MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Modified: head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Fri Dec 30 02:07:50 2011 (r228979) +++ head/sys/dev/ath/ath_hal/ar5210/ar5210reg.h Fri Dec 30 02:58:37 2011 (r228980) @@ -245,9 +245,20 @@ #define AR_SCR_SLDUR 0x0000ffff /* sleep duration */ #define AR_SCR_SLE 0x00030000 /* sleep enable */ #define AR_SCR_SLE_S 16 -#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */ -#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */ -#define AR_SCR_SLE_ALLOW 0x00020000 /* allow to control sleep */ +/* + * The previous values for the following three defines were: + * + * AR_SCR_SLE_WAKE 0x00000000 + * AR_SCR_SLE_SLP 0x00010000 + * AR_SCR_SLE_ALLOW 0x00020000 + * + * However, these have been pre-shifted with AR_SCR_SLE_S. The + * OS_REG_READ() macro would attempt to shift them again, effectively + * shifting out any of the set bits completely. + */ +#define AR_SCR_SLE_WAKE 0 /* force wake */ +#define AR_SCR_SLE_SLP 1 /* force sleep */ +#define AR_SCR_SLE_ALLOW 2 /* allow to control sleep */ #define AR_SCR_BITS "\20\20SLE_SLP\21SLE_ALLOW" #define AR_INTPEND_IP 0x00000001 /* interrupt pending */ Modified: head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Fri Dec 30 02:07:50 2011 (r228979) +++ head/sys/dev/ath/ath_hal/ar5211/ar5211reg.h Fri Dec 30 02:58:37 2011 (r228980) @@ -618,9 +618,20 @@ #define AR_SCR_SLDUR_S 0 #define AR_SCR_SLE 0x00030000 /* sleep enable mask */ #define AR_SCR_SLE_S 16 /* sleep enable bits shift */ -#define AR_SCR_SLE_WAKE 0x00000000 /* force wake */ -#define AR_SCR_SLE_SLP 0x00010000 /* force sleep */ -#define AR_SCR_SLE_NORM 0x00020000 /* sleep logic normal operation */ +/* + * The previous values for the following three defines were: + * + * AR_SCR_SLE_WAKE 0x00000000 + * AR_SCR_SLE_SLP 0x00010000 + * AR_SCR_SLE_NORM 0x00020000 + * + * However, these have been pre-shifted with AR_SCR_SLE_S. The + * OS_REG_READ() macro would attempt to shift them again, effectively + * shifting out any of the set bits completely. + */ +#define AR_SCR_SLE_WAKE 0 /* force wake */ +#define AR_SCR_SLE_SLP 1 /* force sleep */ +#define AR_SCR_SLE_NORM 2 /* sleep logic normal operation */ #define AR_SCR_SLE_UNITS 0x00000008 /* SCR units/TU */ #define AR_SCR_BITS "\20\20SLE_SLP\21SLE" From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 03:44:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3DD6106566B; Fri, 30 Dec 2011 03:44:04 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6F5B58FC1D; Fri, 30 Dec 2011 03:44:04 +0000 (UTC) Received: by pbcc3 with SMTP id c3so11619106pbc.13 for ; Thu, 29 Dec 2011 19:44:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=fthelDljwZ2cbwh7tB+LGbOY6weV03mgCwio2mDs450=; b=kNvGEfWGZGxInm7oBgJNo7/u2e7bw55MET4KqocA64h9isiOois5zVayiRnTYNBM3z oWkXuDjGBO7bBoYD7nhUNWl5BmERq6JnUOoxUk3mfc0UaxWdl9yur5ARQxNS5wQTRtF6 hUqlNfON6N4uMhkri0Fjw0Om6UzdSfR6q0n4g= MIME-Version: 1.0 Received: by 10.68.213.41 with SMTP id np9mr90395829pbc.71.1325216643872; Thu, 29 Dec 2011 19:44:03 -0800 (PST) Sender: mdf356@gmail.com Received: by 10.68.208.167 with HTTP; Thu, 29 Dec 2011 19:44:03 -0800 (PST) In-Reply-To: References: <201112252015.pBPKFfZ1073959@svn.freebsd.org> Date: Thu, 29 Dec 2011 19:44:03 -0800 X-Google-Sender-Auth: 7OcL_af15edSqhUS_TAfp3x_ELQ Message-ID: From: mdf@FreeBSD.org To: "Sean C. Farley" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Schouten Subject: Re: svn commit: r228878 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 03:44:04 -0000 On Thu, Dec 29, 2011 at 6:54 PM, Sean C. Farley wrote: > On Sun, 25 Dec 2011, Ed Schouten wrote: > >> Author: ed >> Date: Sun Dec 25 20:15:41 2011 >> New Revision: 228878 >> URL: http://svn.freebsd.org/changeset/base/228878 >> >> Log: >> =A0Remove unneeded guard. >> >> =A0There is no reason why needs an include guard. It is alre= ady >> =A0protected by __bool_true_false_are_defined. >> >> Modified: >> =A0head/include/stdbool.h >> >> Modified: head/include/stdbool.h >> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/include/stdbool.h =A0 =A0 =A0Sun Dec 25 18:15:31 2011 =A0 =A0 = =A0 =A0(r228877) >> +++ head/include/stdbool.h =A0 =A0 =A0Sun Dec 25 20:15:41 2011 =A0 =A0 = =A0 =A0(r228878) >> @@ -26,9 +26,6 @@ >> =A0* $FreeBSD$ >> =A0*/ >> >> -#ifndef _STDBOOL_H_ >> -#define =A0 =A0 =A0 =A0_STDBOOL_H_ >> - >> #ifndef __bool_true_false_are_defined >> #define __bool_true_false_are_defined =A0 1 >> >> @@ -44,5 +41,3 @@ typedef =A0 =A0 =A0 int =A0 =A0 _Bool; >> >> #endif /* !__cplusplus */ >> #endif /* __bool_true_false_are_defined */ >> - >> -#endif /* !_STDBOOL_H_ */ > > > I just thought of this while reviewing the change: =A0should > __bool_true_false_are_defined be set only if __cplusplus is not set? =A0I= t > should be set for C99, but I wonder if it should be set for C++. My quick googling didn't show anything at all about the C++ standard and stdbool.h or __bool_true_false_are_defined. It was probably originally set because bool, true, and false are all C++ keywords so certain code that wanted to ifdef on them didn't also need to check __cplusplus. > Also, is there a style requirement that the guard for a header file be ba= sed > off of the name of the file? =A0I did not see anything obvious for this w= ithin > style(9), but I am curious. I think it's just common use to make sure different headers use a different include guard, so they only protect their contents, not any other file's. The C standard only mentions the symbols bool, true, false, and __bool_true_false_are_defined in regards to stdbool.h. Cheers, matthew From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 03:48:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 13036106564A; Fri, 30 Dec 2011 03:48:40 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 01A048FC08; Fri, 30 Dec 2011 03:48:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU3mdMk094162; Fri, 30 Dec 2011 03:48:39 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU3mdef094159; Fri, 30 Dec 2011 03:48:39 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201112300348.pBU3mdef094159@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 30 Dec 2011 03:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228981 - in head/sys/modules: . cfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 03:48:40 -0000 Author: marcel Date: Fri Dec 30 03:48:39 2011 New Revision: 228981 URL: http://svn.freebsd.org/changeset/base/228981 Log: Add a module for cfi(4). Build only for arm and powerpc, as there are only bus attachments only for these. Added: head/sys/modules/cfi/ head/sys/modules/cfi/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Dec 30 02:58:37 2011 (r228980) +++ head/sys/modules/Makefile Fri Dec 30 03:48:39 2011 (r228981) @@ -57,6 +57,7 @@ SUBDIR= ${_3dfx} \ cd9660 \ cd9660_iconv \ ${_ce} \ + ${_cfi} \ ${_ciss} \ ${_cm} \ ${_cmx} \ @@ -654,6 +655,10 @@ _zfs= zfs .endif .endif +.if ${MACHINE_CPUARCH} == "arm" +_cfi= cfi +.endif + .if ${MACHINE_CPUARCH} == "ia64" _aac= aac _aic= aic @@ -697,6 +702,7 @@ _xe= xe _agp= agp _an= an _bm= bm +_cfi= cfi _cpufreq= cpufreq _nvram= powermac_nvram _smbfs= smbfs Added: head/sys/modules/cfi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/cfi/Makefile Fri Dec 30 03:48:39 2011 (r228981) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/cfi + +KMOD= cfi +SRCS= ${_cfi_bus} cfi_core.c cfi_dev.c +SRCS+= bus_if.h device_if.h opt_cfi.h + +.if ${MACHINE} == "arm" +_cfi_bus= cfi_bus_fdt.c cfi_bus_ixp4xx.c +.endif +.if ${MACHINE} == "powerpc" +_cfi_bus= cfi_bus_fdt.c +.endif + +opt_cfi.h: + echo "#define CFI_SUPPORT_STRATAFLASH 1" > ${.TARGET} + +.include From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 03:54:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8D6E106566B; Fri, 30 Dec 2011 03:54:22 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C79D08FC1A; Fri, 30 Dec 2011 03:54:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU3sMDS094358; Fri, 30 Dec 2011 03:54:22 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU3sMLo094356; Fri, 30 Dec 2011 03:54:22 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201112300354.pBU3sMLo094356@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 30 Dec 2011 03:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228982 - head/sys/mips/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 03:54:22 -0000 Author: marcel Date: Fri Dec 30 03:54:22 2011 New Revision: 228982 URL: http://svn.freebsd.org/changeset/base/228982 Log: Remove trailing white-space. Modified: head/sys/mips/include/intr_machdep.h Modified: head/sys/mips/include/intr_machdep.h ============================================================================== --- head/sys/mips/include/intr_machdep.h Fri Dec 30 03:48:39 2011 (r228981) +++ head/sys/mips/include/intr_machdep.h Fri Dec 30 03:54:22 2011 (r228982) @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD$ + * $FreeBSD$ */ #ifndef _MACHINE_INTR_MACHDEP_H_ @@ -32,7 +32,7 @@ #include #if defined(CPU_RMI) || defined(CPU_NLM) -#define XLR_MAX_INTR 64 +#define XLR_MAX_INTR 64 #else #define NHARD_IRQS 6 #define NSOFT_IRQS 2 @@ -41,9 +41,9 @@ struct trapframe; void cpu_init_interrupts(void); -void cpu_establish_hardintr(const char *, driver_filter_t *, driver_intr_t *, +void cpu_establish_hardintr(const char *, driver_filter_t *, driver_intr_t *, void *, int, int, void **); -void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*), +void cpu_establish_softintr(const char *, driver_filter_t *, void (*)(void*), void *, int, int, void **); void cpu_intr(struct trapframe *); From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 03:57:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE09B106566C; Fri, 30 Dec 2011 03:57:17 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ACDD68FC16; Fri, 30 Dec 2011 03:57:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU3vHsC094483; Fri, 30 Dec 2011 03:57:17 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU3vHt6094481; Fri, 30 Dec 2011 03:57:17 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201112300357.pBU3vHt6094481@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 30 Dec 2011 03:57:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228983 - head/sys/dev/uart X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 03:57:17 -0000 Author: marcel Date: Fri Dec 30 03:57:17 2011 New Revision: 228983 URL: http://svn.freebsd.org/changeset/base/228983 Log: Actually set the baudrate from the FDT. Modified: head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Fri Dec 30 03:54:22 2011 (r228982) +++ head/sys/dev/uart/uart_bus_fdt.c Fri Dec 30 03:57:17 2011 (r228983) @@ -186,7 +186,7 @@ uart_cpu_getdev(int devtype, struct uart di->bas.chan = 0; di->bas.regshft = (u_int)shift; - di->baudrate = 0; + di->baudrate = br; di->bas.rclk = (u_int)rclk; di->ops = uart_getops(class); di->databits = 8; From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 04:00:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 580D51065672; Fri, 30 Dec 2011 04:00:32 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46EA28FC0A; Fri, 30 Dec 2011 04:00:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU40WXL094633; Fri, 30 Dec 2011 04:00:32 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU40Wx5094629; Fri, 30 Dec 2011 04:00:32 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201112300400.pBU40Wx5094629@svn.freebsd.org> From: Marcel Moolenaar Date: Fri, 30 Dec 2011 04:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228984 - head/sys/dev/fdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 04:00:32 -0000 Author: marcel Date: Fri Dec 30 04:00:31 2011 New Revision: 228984 URL: http://svn.freebsd.org/changeset/base/228984 Log: DEBUG is a kernel option. Don't define it here, as it breaks LINT. Since DEBUG was subsequently undefined, this is just debugging left- over. Modified: head/sys/dev/fdt/fdt_pci.c head/sys/dev/fdt/fdtbus.c head/sys/dev/fdt/simplebus.c Modified: head/sys/dev/fdt/fdt_pci.c ============================================================================== --- head/sys/dev/fdt/fdt_pci.c Fri Dec 30 03:57:17 2011 (r228983) +++ head/sys/dev/fdt/fdt_pci.c Fri Dec 30 04:00:31 2011 (r228984) @@ -46,9 +46,6 @@ __FBSDID("$FreeBSD$"); #include "ofw_bus_if.h" #include "pcib_if.h" -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) Modified: head/sys/dev/fdt/fdtbus.c ============================================================================== --- head/sys/dev/fdt/fdtbus.c Fri Dec 30 03:57:17 2011 (r228983) +++ head/sys/dev/fdt/fdtbus.c Fri Dec 30 04:00:31 2011 (r228984) @@ -46,9 +46,6 @@ __FBSDID("$FreeBSD$"); #include "fdt_common.h" #include "ofw_bus_if.h" -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Fri Dec 30 03:57:17 2011 (r228983) +++ head/sys/dev/fdt/simplebus.c Fri Dec 30 04:00:31 2011 (r228984) @@ -49,9 +49,6 @@ __FBSDID("$FreeBSD$"); #include "fdt_common.h" #include "ofw_bus_if.h" -#define DEBUG -#undef DEBUG - #ifdef DEBUG #define debugf(fmt, args...) do { printf("%s(): ", __func__); \ printf(fmt,##args); } while (0) From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 06:24:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79F62106564A; Fri, 30 Dec 2011 06:24:59 +0000 (UTC) (envelope-from pluknet@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 637A08FC08; Fri, 30 Dec 2011 06:24:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU6Ox4d098910; Fri, 30 Dec 2011 06:24:59 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU6OxO9098906; Fri, 30 Dec 2011 06:24:59 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201112300624.pBU6OxO9098906@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 30 Dec 2011 06:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228985 - head/sys/boot/forth X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 06:24:59 -0000 Author: pluknet Date: Fri Dec 30 06:24:59 2011 New Revision: 228985 URL: http://svn.freebsd.org/changeset/base/228985 Log: Unset the environment variables associated with individual menu items before invoking the kernel. Quoting submitter: The issue is with the new boot loader menu. It adds many loader variables including ones that contain ANSI color escapes. Obviously, these ANSI codes don't play well with serial consoles when kenv(1) is executed without arguments (reports vary as to what happens, but it's never pretty). The net-effect is that kenv(1) no longer reports menu-related variables. In essence, kenv(1) output should now appear the same as on RELENG_8 (which lacks the new boot loader and didn't use any such variables). Thus, restoring serial console glory. Submitted by: Devin Teske MFC after: 2 weeks Modified: head/sys/boot/forth/loader.4th head/sys/boot/forth/menu.4th head/sys/boot/forth/menu.4th.8 Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Fri Dec 30 04:00:31 2011 (r228984) +++ head/sys/boot/forth/loader.4th Fri Dec 30 06:24:59 2011 (r228985) @@ -41,12 +41,15 @@ s" arch-i386" environment? [if] [if] include /boot/support.4th -\ ***** boot-conf -\ -\ Prepares to boot as specified by loaded configuration files. - only forth also support-functions also builtins definitions +: try-menu-unset + s" menu-unset" + ['] evaluate catch if + 2drop + then +; + : boot 0= if ( interpreted ) get_arguments then @@ -57,24 +60,32 @@ only forth also support-functions also b 0 1 unload drop else s" kernelname" getenv? if ( a kernel has been loaded ) + try-menu-unset 1 boot exit then load_kernel_and_modules ?dup if exit then + try-menu-unset 0 1 boot exit then else s" kernelname" getenv? if ( a kernel has been loaded ) + try-menu-unset 1 boot exit then load_kernel_and_modules ?dup if exit then + try-menu-unset 0 1 boot exit then load_kernel_and_modules ?dup 0= if 0 1 boot then ; +\ ***** boot-conf +\ +\ Prepares to boot as specified by loaded configuration files. + : boot-conf 0= if ( interpreted ) get_arguments then 0 1 unload drop Modified: head/sys/boot/forth/menu.4th ============================================================================== --- head/sys/boot/forth/menu.4th Fri Dec 30 04:00:31 2011 (r228984) +++ head/sys/boot/forth/menu.4th Fri Dec 30 06:24:59 2011 (r228985) @@ -131,11 +131,11 @@ create init_text8 255 allot \ Print the value of menuidx loader_color? if - ." " + ." " (  ) then menuidx @ . loader_color? if - ." " + ." " (  ) then \ Move the cursor forward 1 column @@ -897,22 +897,60 @@ create init_text8 255 allot ; \ This function unsets all the possible environment variables associated with -\ creating the interactive menu. Call this when you want to clear the menu -\ area in preparation for another menu. +\ creating the interactive menu. \ -: menu-clear ( -- ) +: menu-unset ( -- ) 49 \ Iterator start (loop range 49 to 56; ASCII '1' to '8') begin - \ basename for caption variable - loader_color? if - s" ansi_caption[x]" - else - s" menu_caption[x]" - then + \ Unset variables in-order of appearance in menu.4th(8) + + s" menu_caption[x]" \ basename for caption variable -rot 2dup 13 + c! rot \ replace 'x' with current iteration unsetenv \ not erroneous to unset unknown var + s" menu_command[x]" \ command basename + -rot 2dup 13 + c! rot \ replace 'x' + unsetenv + + s" menu_keycode[x]" \ keycode basename + -rot 2dup 13 + c! rot \ replace 'x' + unsetenv + + s" ansi_caption[x]" \ ANSI caption basename + -rot 2dup 13 + c! rot \ replace 'x' + unsetenv + + s" toggled_text[x]" \ toggle_menuitem caption basename + -rot 2dup 13 + c! rot \ replace 'x' + unsetenv + + s" toggled_ansi[x]" \ toggle_menuitem ANSI caption basename + -rot 2dup 13 + c! rot \ replace 'x' + unsetenv + + s" menu_caption[x][y]" \ cycle_menuitem caption + -rot 2dup 13 + c! rot \ replace 'x' + 49 -rot + begin + 16 2over rot + c! \ replace 'y' + 2dup unsetenv + + rot 1+ dup 56 > 2swap rot + until + 2drop drop + + s" ansi_caption[x][y]" \ cycle_menuitem ANSI caption + -rot 2dup 13 + c! rot \ replace 'x' + 49 -rot + begin + 16 2over rot + c! \ replace 'y' + 2dup unsetenv + + rot 1+ dup 56 > 2swap rot + until + 2drop drop + s" 0 menukeyN !" \ basename for key association var -rot 2dup 9 + c! rot \ replace 'N' with current iteration evaluate \ assign zero (0) to key assoc. var @@ -921,6 +959,9 @@ create init_text8 255 allot until drop \ iterator + \ unset the timeout command + s" menu_timeout_command" unsetenv + \ clear the "Reboot" menu option flag s" menu_reboot" unsetenv 0 menureboot ! @@ -933,6 +974,13 @@ create init_text8 255 allot s" menu_options" unsetenv 0 menuoptions ! +; + +\ This function both unsets menu variables and visually erases the menu area +\ in-preparation for another menu. +\ +: menu-clear ( -- ) + menu-unset menu-erase ; Modified: head/sys/boot/forth/menu.4th.8 ============================================================================== --- head/sys/boot/forth/menu.4th.8 Fri Dec 30 04:00:31 2011 (r228984) +++ head/sys/boot/forth/menu.4th.8 Fri Dec 30 06:24:59 2011 (r228985) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Aug 29, 2011 +.Dd Dec 27, 2011 .Dt MENU.4TH 8 .Os .Sh NAME @@ -69,9 +69,13 @@ Clears the screen area within the menu b Calls .Ic menu-erase and then redraws the menu. +.It Ic menu-unset +Unsets the environment variables associated with individual menu items, +clearing the way for a new menu. .It Ic menu-clear -Unsets all possible environment variables used -to configure the menu and then calls +Calls +.Ic menu-unset +and then .Ic menu-erase . .El .Pp From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 08:57:59 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97D54106566C; Fri, 30 Dec 2011 08:57:59 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F11C8FC0A; Fri, 30 Dec 2011 08:57:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU8vxYd004918; Fri, 30 Dec 2011 08:57:59 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU8vxfP004914; Fri, 30 Dec 2011 08:57:59 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201112300857.pBU8vxfP004914@svn.freebsd.org> From: Lawrence Stewart Date: Fri, 30 Dec 2011 08:57:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228986 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 08:57:59 -0000 Author: lstewart Date: Fri Dec 30 08:57:58 2011 New Revision: 228986 URL: http://svn.freebsd.org/changeset/base/228986 Log: - Introduce the net.bpf.tscfg sysctl tree and associated code so as to make one aspect of time stamp configuration per interface rather than per BPF descriptor. Prior to this, the order in which BPF devices were opened and the per descriptor time stamp configuration settings could cause non-deterministic and unintended behaviour with respect to time stamping. With the new scheme, a BPF attached interface's tscfg sysctl entry can be set to "default", "none", "fast", "normal" or "external". Setting "default" means use the system default option (set with the net.bpf.tscfg.default sysctl), "none" means do not generate time stamps for tapped packets, "fast" means generate time stamps for tapped packets using a hz granularity system clock read, "normal" means generate time stamps for tapped packets using a full timecounter granularity system clock read and "external" (currently unimplemented) means use the time stamp provided with the packet from an underlying source. - Utilise the recently introduced sysclock_getsnapshot() and sysclock_snap2bintime() KPIs to ensure the system clock is only read once per packet, regardless of the number of BPF descriptors and time stamp formats requested. Use the per BPF attached interface time stamp configuration to control if sysclock_getsnapshot() is called and whether the system clock read is fast or normal. The per BPF descriptor time stamp configuration is then used to control how the system clock snapshot is converted to a bintime by sysclock_snap2bintime(). - Remove all FAST related BPF descriptor flag variants. Performing a "fast" read of the system clock is now controlled per BPF attached interface using the net.bpf.tscfg sysctl tree. - Update the bpf.4 man page. Committed on behalf of Julien Ridoux and Darryl Veitch from the University of Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward Clock Synchronization Algorithms" project. For more information, see http://www.synclab.org/radclock/ In collaboration with: Julien Ridoux (jridoux at unimelb edu au) Modified: head/share/man/man4/bpf.4 head/sys/net/bpf.c head/sys/net/bpf.h Modified: head/share/man/man4/bpf.4 ============================================================================== --- head/share/man/man4/bpf.4 Fri Dec 30 06:24:59 2011 (r228985) +++ head/share/man/man4/bpf.4 Fri Dec 30 08:57:58 2011 (r228986) @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 15, 2010 +.Dd December 30, 2011 .Dt BPF 4 .Os .Sh NAME @@ -516,61 +516,48 @@ by default. .It Dv BIOCSTSTAMP .It Dv BIOCGTSTAMP .Pq Li u_int -Set or get format and resolution of the time stamps returned by BPF. +Set or get the format and resolution of time stamps returned by BPF. +The per-BPF descriptor configuration provided by the +.Dv BIOCSTSTAMP +IOCTL complements the per-interface time stamp configuration detailed in the +.Sx CONFIGURATION +section. +.Pp Set to -.Dv BPF_T_MICROTIME , -.Dv BPF_T_MICROTIME_FAST , -.Dv BPF_T_MICROTIME_MONOTONIC , +.Dv BPF_T_MICROTIME or -.Dv BPF_T_MICROTIME_MONOTONIC_FAST +.Dv BPF_T_MICROTIME_MONOTONIC to get time stamps in 64-bit .Vt struct timeval format. Set to -.Dv BPF_T_NANOTIME , -.Dv BPF_T_NANOTIME_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC , +.Dv BPF_T_NANOTIME or -.Dv BPF_T_NANOTIME_MONOTONIC_FAST +.Dv BPF_T_NANOTIME_MONOTONIC to get time stamps in 64-bit .Vt struct timespec format. Set to -.Dv BPF_T_BINTIME , -.Dv BPF_T_BINTIME_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC , +.Dv BPF_T_BINTIME or -.Dv BPF_T_BINTIME_MONOTONIC_FAST +.Dv BPF_T_BINTIME_MONOTONIC to get time stamps in 64-bit .Vt struct bintime format. Set to .Dv BPF_T_NONE -to ignore time stamp. +to not set a time stamp. +By default, time stamps are initilized to +.Dv BPF_T_MICROTIME . +.Pp All 64-bit time stamp formats are wrapped in .Vt struct bpf_ts . The -.Dv BPF_T_MICROTIME_FAST , -.Dv BPF_T_NANOTIME_FAST , -.Dv BPF_T_BINTIME_FAST , -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC_FAST , -and -.Dv BPF_T_BINTIME_MONOTONIC_FAST -are analogs of corresponding formats without _FAST suffix but do not perform -a full time counter query, so their accuracy is one timer tick. -The .Dv BPF_T_MICROTIME_MONOTONIC , .Dv BPF_T_NANOTIME_MONOTONIC , -.Dv BPF_T_BINTIME_MONOTONIC , -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , -.Dv BPF_T_NANOTIME_MONOTONIC_FAST , and -.Dv BPF_T_BINTIME_MONOTONIC_FAST +.Dv BPF_T_BINTIME_MONOTONIC store the time elapsed since kernel boot. -This setting is initialized to -.Dv BPF_T_MICROTIME -by default. .It Dv BIOCFEEDBACK .Pq Li u_int Set packet feedback mode. @@ -692,14 +679,14 @@ Currently, .Vt bpf_hdr is used when the time stamp is set to .Dv BPF_T_MICROTIME , -.Dv BPF_T_MICROTIME_FAST , .Dv BPF_T_MICROTIME_MONOTONIC , -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , or .Dv BPF_T_NONE -for backward compatibility reasons. Otherwise, +for backward compatibility reasons. +Otherwise, .Vt bpf_xhdr -is used. However, +is used. +However, .Vt bpf_hdr may be deprecated in the near future. Suitable precautions @@ -952,6 +939,48 @@ array initializers: .Fn BPF_STMT opcode operand and .Fn BPF_JUMP opcode operand true_offset false_offset . +.Sh CONFIGURATION +Per-interface BPF time stamp configuration is possible via the +.Va net.bpf.tscfg +.Xr sysctl 8 +tree which provides the following variables: +.Bl -tag -width " " -offset indent +.It Va net.bpf.tscfg.default +The default time stamp configuration setting used by all BPF attached interfaces +which have not been explicitly changed. +Valid values are "none", "fast", "normal" and "external". +The default is "normal". +.It Va net.bpf.tscfg. +The time stamp configuration setting used by a specific BPF attached interface. +There will be a separate entry in the +.Va net.bpf.tscfg +sysctl tree for each BPF attached interface. +Valid values are "default", "none", "fast", "normal" and "external". +The default is "default", which means the system wide default setting specified +by the +.Va net.bpf.tscfg.default +sysctl is used. +.El +.Pp +The meaning of each per-interface time stamp configuration option is as follows: +.Bl -tag -width " " -offset indent +.It none +Do not generate a time stamp for all packets tapped from this interface. +.It fast +Generate a time stamp for all packets tapped from this interface by doing a fast +read of the system clock. +Fast reads have a granularity equivalent to the underlying kernel tick rate. +.It normal +Generate a time stamp for all packets tapped from this interface by doing a full +read of the system clock. +Full reads are slower than fast reads, but provide full hardware time counter +granularity for the time stamp. +.It external +Something external to BPF is capable of generating time stamps for all packets +tapped from this interface and BPF should use these external time stamps. +Currently unimplemented, but will become useful when drivers for NICs which +support hardware packet time stamping add support for this feature. +.El .Sh FILES .Bl -tag -compact -width /dev/bpf .It Pa /dev/bpf Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri Dec 30 06:24:59 2011 (r228985) +++ head/sys/net/bpf.c Fri Dec 30 08:57:58 2011 (r228986) @@ -1,12 +1,17 @@ /*- * Copyright (c) 1990, 1991, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. + * Copyright (c) 2011 The University of Melbourne. + * All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * + * Portions of this software were developed by Julien Ridoux at the University + * of Melbourne under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -55,6 +60,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -112,7 +118,7 @@ struct bpf_hdr32 { uint16_t bh_hdrlen; /* length of bpf header (this struct plus alignment padding) */ }; -#endif +#endif /* !BURN_BRIDGES */ struct bpf_program32 { u_int bf_len; @@ -130,7 +136,28 @@ struct bpf_dltlist32 { #define BIOCGDLTLIST32 _IOWR('B', 121, struct bpf_dltlist32) #define BIOCSETWF32 _IOW('B', 123, struct bpf_program32) #define BIOCSETFNR32 _IOW('B', 130, struct bpf_program32) -#endif +#endif /* COMPAT_FREEBSD32 */ + +static const char *bpfiftstypes[] = { + "default", +#define BPF_TSTAMP_DEFAULT 0 + "none", +#define BPF_TSTAMP_NONE 1 + "fast", +#define BPF_TSTAMP_FAST 2 + "normal", +#define BPF_TSTAMP_NORMAL 3 + "external" +#define BPF_TSTAMP_EXTERNAL 4 +}; +#define NUM_BPFIFTSTYPES (sizeof(bpfiftstypes) / sizeof(*bpfiftstypes)) + +#define SET_CLOCKCFG_FLAGS(tstype, active, clock, flags) do { \ + (flags) = 0; \ + (clock) = SYSCLOCK_FBCK; \ + if ((tstype) & BPF_T_MONOTONIC) \ + (flags) |= FBCLOCK_UPTIME; \ +} while (0) /* * bpf_iflist is a list of BPF interface structures, each corresponding to a @@ -162,6 +189,7 @@ static void filt_bpfdetach(struct knote static int filt_bpfread(struct knote *, long); static void bpf_drvinit(void *); static int bpf_stats_sysctl(SYSCTL_HANDLER_ARGS); +static int bpf_tscfg_sysctl_handler(SYSCTL_HANDLER_ARGS); SYSCTL_NODE(_net, OID_AUTO, bpf, CTLFLAG_RW, 0, "bpf sysctl"); int bpf_maxinsns = BPF_MAXINSNS; @@ -172,6 +200,12 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_ &bpf_zerocopy_enable, 0, "Enable new zero-copy BPF buffer sessions"); static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW, bpf_stats_sysctl, "bpf statistics portal"); +static SYSCTL_NODE(_net_bpf, OID_AUTO, tscfg, CTLFLAG_RW, NULL, + "Per-interface timestamp configuration"); +static int bpf_default_tstype = BPF_TSTAMP_NORMAL; +SYSCTL_PROC(_net_bpf_tscfg, OID_AUTO, default, + CTLTYPE_STRING | CTLFLAG_RW, NULL, 0, bpf_tscfg_sysctl_handler, "A", + "Per-interface system wide default timestamp configuration"); static d_open_t bpfopen; static d_read_t bpfread; @@ -1759,48 +1793,6 @@ filt_bpfread(struct knote *kn, long hint return (ready); } -#define BPF_TSTAMP_NONE 0 -#define BPF_TSTAMP_FAST 1 -#define BPF_TSTAMP_NORMAL 2 -#define BPF_TSTAMP_EXTERN 3 - -static int -bpf_ts_quality(int tstype) -{ - - if (tstype == BPF_T_NONE) - return (BPF_TSTAMP_NONE); - if ((tstype & BPF_T_FAST) != 0) - return (BPF_TSTAMP_FAST); - - return (BPF_TSTAMP_NORMAL); -} - -static int -bpf_gettime(struct bintime *bt, int tstype, struct mbuf *m) -{ - struct m_tag *tag; - int quality; - - quality = bpf_ts_quality(tstype); - if (quality == BPF_TSTAMP_NONE) - return (quality); - - if (m != NULL) { - tag = m_tag_locate(m, MTAG_BPF, MTAG_BPF_TIMESTAMP, NULL); - if (tag != NULL) { - *bt = *(struct bintime *)(tag + 1); - return (BPF_TSTAMP_EXTERN); - } - } - if (quality == BPF_TSTAMP_NORMAL) - binuptime(bt); - else - getbinuptime(bt); - - return (quality); -} - /* * Incoming linkage from device drivers. Process the packet pkt, of length * pktlen, which is stored in a contiguous buffer. The packet is parsed @@ -1811,14 +1803,23 @@ void bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { struct bintime bt; + struct sysclock_snap cs; struct bpf_d *d; + int tstype, whichclock; + u_int clockflags, slen; #ifdef BPF_JITTER bpf_jit_filter *bf; #endif - u_int slen; - int gottime; - gottime = BPF_TSTAMP_NONE; + tstype = bp->tstype; + if (tstype == BPF_TSTAMP_DEFAULT) + tstype = bpf_default_tstype; + + if (tstype == BPF_TSTAMP_NORMAL || tstype == BPF_TSTAMP_FAST) + sysclock_getsnapshot(&cs, tstype == BPF_TSTAMP_FAST ? 1 : 0); + else + bzero(&bt, sizeof(bt)); + BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { BPFD_LOCK(d); @@ -1838,8 +1839,16 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); if (slen != 0) { d->bd_fcount++; - if (gottime < bpf_ts_quality(d->bd_tstamp)) - gottime = bpf_gettime(&bt, d->bd_tstamp, NULL); + if (tstype == BPF_TSTAMP_NORMAL || + tstype == BPF_TSTAMP_FAST) { + whichclock = -1; + SET_CLOCKCFG_FLAGS(d->bd_tstamp, + cs.sysclock_active, whichclock, clockflags); + KASSERT(whichclock >= 0, ("Bogus BPF tstamp " + "configuration: 0x%04x", d->bd_tstamp)); + sysclock_snap2bintime(&cs, &bt, whichclock, + clockflags); + } #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif @@ -1862,12 +1871,13 @@ void bpf_mtap(struct bpf_if *bp, struct mbuf *m) { struct bintime bt; + struct sysclock_snap cs; struct bpf_d *d; + u_int clockflags, pktlen, slen; + int tstype, whichclock; #ifdef BPF_JITTER bpf_jit_filter *bf; #endif - u_int pktlen, slen; - int gottime; /* Skip outgoing duplicate packets. */ if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { @@ -1875,9 +1885,22 @@ bpf_mtap(struct bpf_if *bp, struct mbuf return; } + tstype = bp->tstype; + if (tstype == BPF_TSTAMP_DEFAULT) + tstype = bpf_default_tstype; + + if (tstype == BPF_TSTAMP_NORMAL || tstype == BPF_TSTAMP_FAST) + sysclock_getsnapshot(&cs, tstype == BPF_TSTAMP_FAST ? + 1 : 0); +#ifdef notyet + else if (tstype == BPF_TSTAMP_EXTERNAL) + /* XXX: Convert external tstamp to bintime. */ +#endif + else + bzero(&bt, sizeof(bt)); + pktlen = m_length(m, NULL); - gottime = BPF_TSTAMP_NONE; BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) @@ -1894,8 +1917,16 @@ bpf_mtap(struct bpf_if *bp, struct mbuf slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); if (slen != 0) { d->bd_fcount++; - if (gottime < bpf_ts_quality(d->bd_tstamp)) - gottime = bpf_gettime(&bt, d->bd_tstamp, m); + if (tstype == BPF_TSTAMP_NORMAL || + tstype == BPF_TSTAMP_FAST) { + whichclock = -1; + SET_CLOCKCFG_FLAGS(d->bd_tstamp, + cs.sysclock_active, whichclock, clockflags); + KASSERT(whichclock >= 0, ("Bogus BPF tstamp " + "configuration: 0x%04x", d->bd_tstamp)); + sysclock_snap2bintime(&cs, &bt, whichclock, + clockflags); + } #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif @@ -1915,10 +1946,11 @@ void bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m) { struct bintime bt; + struct sysclock_snap cs; struct mbuf mb; struct bpf_d *d; - u_int pktlen, slen; - int gottime; + u_int clockflags, pktlen, slen; + int tstype, whichclock; /* Skip outgoing duplicate packets. */ if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { @@ -1926,6 +1958,20 @@ bpf_mtap2(struct bpf_if *bp, void *data, return; } + tstype = bp->tstype; + if (tstype == BPF_TSTAMP_DEFAULT) + tstype = bpf_default_tstype; + + if (tstype == BPF_TSTAMP_NORMAL || tstype == BPF_TSTAMP_FAST) + sysclock_getsnapshot(&cs, tstype == BPF_TSTAMP_FAST ? + 1 : 0); +#ifdef notyet + else if (tstype == BPF_TSTAMP_EXTERNAL) + /* XXX: Convert extern tstamp to bintime. */ +#endif + else + bzero(&bt, sizeof(bt)); + pktlen = m_length(m, NULL); /* * Craft on-stack mbuf suitable for passing to bpf_filter. @@ -1937,7 +1983,6 @@ bpf_mtap2(struct bpf_if *bp, void *data, mb.m_len = dlen; pktlen += dlen; - gottime = BPF_TSTAMP_NONE; BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) @@ -1947,8 +1992,16 @@ bpf_mtap2(struct bpf_if *bp, void *data, slen = bpf_filter(d->bd_rfilter, (u_char *)&mb, pktlen, 0); if (slen != 0) { d->bd_fcount++; - if (gottime < bpf_ts_quality(d->bd_tstamp)) - gottime = bpf_gettime(&bt, d->bd_tstamp, m); + if (tstype == BPF_TSTAMP_NORMAL || + tstype == BPF_TSTAMP_FAST) { + whichclock = -1; + SET_CLOCKCFG_FLAGS(d->bd_tstamp, + cs.sysclock_active, whichclock, clockflags); + KASSERT(whichclock >= 0, ("Bogus BPF tstamp " + "configuration: 0x%04x", d->bd_tstamp)); + sysclock_snap2bintime(&cs, &bt, whichclock, + clockflags); + } #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif @@ -1962,11 +2015,6 @@ bpf_mtap2(struct bpf_if *bp, void *data, #undef BPF_CHECK_DIRECTION -#undef BPF_TSTAMP_NONE -#undef BPF_TSTAMP_FAST -#undef BPF_TSTAMP_NORMAL -#undef BPF_TSTAMP_EXTERN - static int bpf_hdrlen(struct bpf_d *d) { @@ -1998,15 +2046,9 @@ bpf_hdrlen(struct bpf_d *d) static void bpf_bintime2ts(struct bintime *bt, struct bpf_ts *ts, int tstype) { - struct bintime bt2; struct timeval tsm; struct timespec tsn; - if ((tstype & BPF_T_MONOTONIC) == 0) { - bt2 = *bt; - bintime_add(&bt2, &boottimebin); - bt = &bt2; - } switch (BPF_T_FORMAT(tstype)) { case BPF_T_MICROTIME: bintime2timeval(bt, &tsm); @@ -2200,6 +2242,64 @@ bpf_freed(struct bpf_d *d) } /* + * Show or change the per bpf_if or system wide default timestamp configuration. + */ +static int +bpf_tscfg_sysctl_handler(SYSCTL_HANDLER_ARGS) +{ + char tstype_name[16]; + struct bpf_if *bp; + int error, tstype; + + bp = (struct bpf_if *)arg1; + + if (req->newptr == NULL) { + /* + * Return the name of the BPF interface's timestamp setting, or + * the system wide default if bp is NULL. + */ + strlcpy(tstype_name, + bpfiftstypes[bp ? bp->tstype : bpf_default_tstype], + sizeof(tstype_name)); + error = sysctl_handle_string(oidp, tstype_name, + sizeof(tstype_name), req); + } else { + /* + * Change the timestamp configuration for this BPF interface or + * the system wide default setting. + */ + error = EINVAL; + for (tstype = 0; tstype < NUM_BPFIFTSTYPES; tstype++) { + if (strncmp((char *)req->newptr, bpfiftstypes[tstype], + strlen(bpfiftstypes[tstype])) == 0) { + /* User specified type found in bpfiftstypes. */ + if (strcmp(oidp->oid_name, "default") == 0) { + /* + * Don't allow BPF_TSTAMP_DEFAULT to be + * assigned to the + * "net.bpf.tscfg.default" OID. + */ + if (tstype != BPF_TSTAMP_DEFAULT) { + bpf_default_tstype = tstype; + error = 0; + } + } else { + /* + * Valid tstype for + * "net.bpf.tscfg." OID. + */ + bp->tstype = tstype; + error = 0; + } + break; + } + } + } + + return (error); +} + +/* * Attach an interface to bpf. dlt is the link layer type; hdrlen is the * fixed size of the link header (variable length headers not yet supported). */ @@ -2225,6 +2325,17 @@ bpfattach2(struct ifnet *ifp, u_int dlt, if (bp == NULL) panic("bpfattach"); + bp->tscfgoid = SYSCTL_ADD_PROC(NULL, + SYSCTL_STATIC_CHILDREN(_net_bpf_tscfg), OID_AUTO, ifp->if_xname, + CTLTYPE_STRING | CTLFLAG_RW, bp, sizeof(bp), + bpf_tscfg_sysctl_handler, "A", + "Interface BPF timestamp configuration"); + if (bp->tscfgoid == NULL) { + free(bp, M_BPF); + panic("bpfattach tscfgoid"); + } + + bp->tstype = BPF_TSTAMP_DEFAULT; LIST_INIT(&bp->bif_dlist); bp->bif_ifp = ifp; bp->bif_dlt = dlt; @@ -2278,6 +2389,7 @@ bpfdetach(struct ifnet *ifp) BPFD_UNLOCK(d); } + sysctl_remove_oid(bp->tscfgoid, 1, 0); mtx_destroy(&bp->bif_mtx); free(bp, M_BPF); } Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Fri Dec 30 06:24:59 2011 (r228985) +++ head/sys/net/bpf.h Fri Dec 30 08:57:58 2011 (r228986) @@ -1,12 +1,17 @@ /*- * Copyright (c) 1990, 1991, 1993 - * The Regents of the University of California. All rights reserved. + * The Regents of the University of California. + * Copyright (c) 2011 The University of Melbourne. + * All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * + * Portions of this software were developed by Julien Ridoux at the University + * of Melbourne under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -166,25 +171,17 @@ enum bpf_direction { #define BPF_T_NONE 0x0003 #define BPF_T_FORMAT_MASK 0x0003 #define BPF_T_NORMAL 0x0000 -#define BPF_T_FAST 0x0100 -#define BPF_T_MONOTONIC 0x0200 -#define BPF_T_MONOTONIC_FAST (BPF_T_FAST | BPF_T_MONOTONIC) -#define BPF_T_FLAG_MASK 0x0300 +#define BPF_T_MONOTONIC 0x0100 +#define BPF_T_FLAG_MASK 0x0100 #define BPF_T_FORMAT(t) ((t) & BPF_T_FORMAT_MASK) #define BPF_T_FLAG(t) ((t) & BPF_T_FLAG_MASK) #define BPF_T_VALID(t) \ ((t) == BPF_T_NONE || (BPF_T_FORMAT(t) != BPF_T_NONE && \ ((t) & ~(BPF_T_FORMAT_MASK | BPF_T_FLAG_MASK)) == 0)) -#define BPF_T_MICROTIME_FAST (BPF_T_MICROTIME | BPF_T_FAST) -#define BPF_T_NANOTIME_FAST (BPF_T_NANOTIME | BPF_T_FAST) -#define BPF_T_BINTIME_FAST (BPF_T_BINTIME | BPF_T_FAST) #define BPF_T_MICROTIME_MONOTONIC (BPF_T_MICROTIME | BPF_T_MONOTONIC) #define BPF_T_NANOTIME_MONOTONIC (BPF_T_NANOTIME | BPF_T_MONOTONIC) #define BPF_T_BINTIME_MONOTONIC (BPF_T_BINTIME | BPF_T_MONOTONIC) -#define BPF_T_MICROTIME_MONOTONIC_FAST (BPF_T_MICROTIME | BPF_T_MONOTONIC_FAST) -#define BPF_T_NANOTIME_MONOTONIC_FAST (BPF_T_NANOTIME | BPF_T_MONOTONIC_FAST) -#define BPF_T_BINTIME_MONOTONIC_FAST (BPF_T_BINTIME | BPF_T_MONOTONIC_FAST) /* * Structure prepended to each packet. @@ -1100,6 +1097,8 @@ struct bpf_if { u_int bif_hdrlen; /* length of link header */ struct ifnet *bif_ifp; /* corresponding interface */ struct mtx bif_mtx; /* mutex for interface */ + struct sysctl_oid *tscfgoid; /* timestamp sysctl oid for interface */ + int tstype; /* timestamp setting for interface */ }; void bpf_bufheld(struct bpf_d *d); From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 09:06:23 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63A0F1065670; Fri, 30 Dec 2011 09:06:23 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id F214D8FC0A; Fri, 30 Dec 2011 09:06:22 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 3626E2A28CDD; Fri, 30 Dec 2011 10:06:22 +0100 (CET) Date: Fri, 30 Dec 2011 10:06:22 +0100 From: Ed Schouten To: "Sean C. Farley" Message-ID: <20111230090622.GO1895@hoeg.nl> References: <201112252015.pBPKFfZ1073959@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DMLl6fZPX8o7hGmc" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228878 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 09:06:23 -0000 --DMLl6fZPX8o7hGmc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Sean, * Sean C. Farley , 20111230 03:54: > I just thought of this while reviewing the change: should > __bool_true_false_are_defined be set only if __cplusplus is not set? > It should be set for C99, but I wonder if it should be set for C++. Even if the C++ standard doesn't mention it at all, I think it doesn't mean it is forbidden to define it. It starts with __[a-z], so it is in the reserved namespace. > Also, is there a style requirement that the guard for a header file > be based off of the name of the file? I did not see anything obvious > for this within style(9), but I am curious. I am not aware of this. --=20 Ed Schouten WWW: http://80386.nl/ --DMLl6fZPX8o7hGmc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO/X8NAAoJEG5e2P40kaK73aUQAI+KXgJyTDLtfQmCRk/8WpCL Mlcx11geKCdAEz1VM4aDS4Tsx8+NBZLt19bGv+a59GCV3D1ocdyxk87M9owtQmUr 4S6Gr2R3//94ZKTfaRuYwjqK0PUhcs78W92DTRsFe3p2Cry/zy+kt++iQKyQnrxn 3E3t3ae5fcrqvDtVyKEUmHU5ZS/CuWTDHPI7drmMXd0QqloNsWkgM1nq/HQ34oQk QRuqMkd7sR3GRq0LAknyrd/pvDnvQptNY7+ofudm8IVvmIEh5GgNVkqRAjGVwclN avs3e2g8RyQojCtF+It0ylhO7Bo8GTkO7+8dOyopGtve/6HsNFWAJ21/DEyioWe7 wRXi46Y2DsN2NrzKKxxQGPni6jsBUlC+L80wy1iw6cHDA/vov8nY39ivBgrYn0SB h20oyGeKSp2GNM4EN3Ijn8kYVRsZIc2RIDB51QCZT5S99Ag72+pndT7McGaFHsXY tq/TjyLTdmx3bIQ4ER0c3eDUBff1dBUrsWFuTV0ybfk3+HIJdFCBAn32wrPDRYlf Toee7H6SCfAdxsro+BfnRtpO+HzJgicG/C5d0H2xbI9xJlcIXU7lZ+a1z/X+kk0g GzFiI8F8xWqeW3NBtbqE+4s2sm1bqJ2Gf+DqksoOhrFndLBT/tXQ0dyJ79RryEqB Zjxa767K33I/ohCbiwtf =9A8r -----END PGP SIGNATURE----- --DMLl6fZPX8o7hGmc-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 09:39:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8696106564A; Fri, 30 Dec 2011 09:39:25 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A364F8FC0A; Fri, 30 Dec 2011 09:39:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU9dPsO006168; Fri, 30 Dec 2011 09:39:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU9dPhg006166; Fri, 30 Dec 2011 09:39:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112300939.pBU9dPhg006166@svn.freebsd.org> From: Adrian Chadd Date: Fri, 30 Dec 2011 09:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228987 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 09:39:25 -0000 Author: adrian Date: Fri Dec 30 09:39:24 2011 New Revision: 228987 URL: http://svn.freebsd.org/changeset/base/228987 Log: Add a couple of missing wlan modules. Modified: head/sys/mips/conf/AR71XX_BASE Modified: head/sys/mips/conf/AR71XX_BASE ============================================================================== --- head/sys/mips/conf/AR71XX_BASE Fri Dec 30 08:57:58 2011 (r228986) +++ head/sys/mips/conf/AR71XX_BASE Fri Dec 30 09:39:24 2011 (r228987) @@ -25,7 +25,7 @@ hints "AR71XX_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols # Also build these as modules, just to ensure the build gets tested. -makeoptions MODULES_OVERRIDE="wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp ath ath_pci" +makeoptions MODULES_OVERRIDE="wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr ath ath_pci" options DDB options KDB From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 09:48:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCFCE106566C; Fri, 30 Dec 2011 09:48:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B8CA8FC08; Fri, 30 Dec 2011 09:48:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBU9mZIZ006495; Fri, 30 Dec 2011 09:48:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBU9mZfI006493; Fri, 30 Dec 2011 09:48:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112300948.pBU9mZfI006493@svn.freebsd.org> From: Adrian Chadd Date: Fri, 30 Dec 2011 09:48:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228988 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 09:48:35 -0000 Author: adrian Date: Fri Dec 30 09:48:35 2011 New Revision: 228988 URL: http://svn.freebsd.org/changeset/base/228988 Log: Add a configuration file for the Atheros PB47 reference board. This is an AR71xx based board with 8MB flash, 64MB RAM, a Mini-PCI+ slot (see below) and a single 10/100/1000baseT ethernet port. It also has two USB ports. This is an easier board than most to add as it doesn't have a switch PHY on-board. This made it (mostly) trivial to craft a working configuration. Things to note: * This, like most other reference boards, use uboot rather then redboot. It means that you typically have to manually flash both the kernel and rootfs partitions. * Since there's currently no (nice) way to extract out the ethernet MAC and RAM from the uboot environment, the RAM will default to 32mb and the MAC will be something very incorrect. I'll try to fix this up in a subsequent commit or two, even if it's just some hard-coded nonsense in ar71xx_machdep.c for now. * The board is designed for a specific model of mini-PCI+ NIC which never made it into production. Normal mini-PCI NICs will work fine; if you happen to have the NIC in question then it will work fine with this board. Added: head/sys/mips/conf/PB47 (contents, props changed) head/sys/mips/conf/PB47.hints (contents, props changed) Added: head/sys/mips/conf/PB47 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/PB47 Fri Dec 30 09:48:35 2011 (r228988) @@ -0,0 +1,51 @@ +# +# Atheros PB47 reference board. +# +# * one MiniPCI+ slot (modified to allow two idsel lines +# on the one slot, for a specific kind of internal-only +# NIC; +# * one XMII slot +# * One ethernet PHY +# * Akros Silicon AS1834 +# * 8MB NOR SPI flash +# * 64MB RAM +# +# $FreeBSD$ +# + +include "AR71XX_BASE" +ident "PB47" +hints "PB47.hints" + +# Enable the uboot environment stuff rather then the +# redboot stuff. +options AR71XX_ENV_UBOOT + +# XXX TODO: add uboot boot parameter parsing to extract MAC, RAM. +# Right now it will just detect 32mb out of 64mb, as well as +# return a garbage MAC address. + +# don't compile these in - the default flash area for kernel space +# is only 1.2 megabytes. To keep the flash allocation in line with +# what the documentation says for this board, we'll just have to keep +# the kernel smaller than that. +nodevice wlan, wlan_wep, wlan_ccmp, wlan_tkip, wlan_xauth +nodevice ath, ath_pci, ath_hal, ath_rate_sample + +# Since the module build doesn't like TDMA.. +nooptions IEEE80211_SUPPORT_TDMA + +# For DOS - enable if required +#options GEOM_PART_BSD +#options GEOM_PART_MBR +#options MSDOSFS + +# uzip - to boot natively from flash +device geom_uzip +options GEOM_UZIP + +# Used for the static uboot partition map +device geom_map + +# Boot off of the rootfs, as defined in the geom_map setup. +options ROOTDEVNAME=\"ufs:map/rootfs.uzip\" Added: head/sys/mips/conf/PB47.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/PB47.hints Fri Dec 30 09:48:35 2011 (r228988) @@ -0,0 +1,79 @@ + +# $FreeBSD$ + +# There's two interfaces, but only one socket is populated. +# +# There's an AR8021 PHY attached to arge1. +# +# XXX TODO: figure out where to extract the MAC from. +hint.arge.1.phymask=0x01 + +# XXX TODO: pass in hints for the GPIO -> LED mapping for the +# minipci slot. The specific customer reference design NIC +# wires GPIO5 from each AR9220 to one of two GPIO pins on the +# MiniPCI bus. However, this may be very specific to the NIC +# being used. + +# The default flash layout: +# uboot: 192k +# env: 64k +# rootfs: 6144k +# uimage (kernel): 1728k +# caldata: 64k +# +# We steal 64k from the end of rootfs to store the local config. + +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x000030000 +hint.map.0.name="uboot" +hint.map.0.readonly=1 + +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00030000 +hint.map.1.end=0x00040000 +hint.map.1.name="uboot-env" +hint.map.1.readonly=1 + +hint.map.2.at="flash/spi0" +hint.map.2.start=0x00040000 +hint.map.2.end=0x00630000 +hint.map.2.name="rootfs" +hint.map.2.readonly=1 + +hint.map.3.at="flash/spi0" +hint.map.3.start=0x00630000 +hint.map.3.end=0x00640000 +hint.map.3.name="cfg" +hint.map.3.readonly=0 + +hint.map.4.at="flash/spi0" +hint.map.4.start=0x00640000 +hint.map.4.end=0x007f0000 +hint.map.4.name="kernel" +hint.map.4.readonly=1 + +hint.map.5.at="flash/spi0" +hint.map.5.start=0x007f0000 +hint.map.5.end=0x00800000 +hint.map.5.name="art" +hint.map.5.readonly=1 + +# Don't flip on anything that isn't already enabled by the +# bootloader. +hint.gpio.0.function_set=0x00000000 +hint.gpio.0.function_clear=0x00000000 + +# Which GPIO lines to enable - just GPIO2/3 for the LEDs. +hint.gpio.0.pinmask=0x0000000c + +# GPIO2 and GPIO3 are LEDs, where 0=on and 1=off. +# XXX TODO: teach gpioled about polarity? +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.pins="0x0004" +hint.gpioled.0.name="led1" + +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.pins="0x0008" +hint.gpioled.1.name="led2" + From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 10:45:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A676106564A; Fri, 30 Dec 2011 10:45:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1658FC0C; Fri, 30 Dec 2011 10:45:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUAj1SP010052; Fri, 30 Dec 2011 10:45:01 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUAj1aL010049; Fri, 30 Dec 2011 10:45:01 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201112301045.pBUAj1aL010049@svn.freebsd.org> From: Robert Watson Date: Fri, 30 Dec 2011 10:45:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228989 - head/lib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 10:45:01 -0000 Author: rwatson Date: Fri Dec 30 10:45:00 2011 New Revision: 228989 URL: http://svn.freebsd.org/changeset/base/228989 Log: Fix typo in Makefile comment. MFC after: 3 days Modified: head/lib/Makefile Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Fri Dec 30 09:48:35 2011 (r228988) +++ head/lib/Makefile Fri Dec 30 10:45:00 2011 (r228989) @@ -8,7 +8,7 @@ # # csu must be built before all shared libaries for ELF. # libc must be built before all other shared libraries. -# libbsm must be built before ibauditd. +# libbsm must be built before libauditd. # libcom_err must be built before libpam. # libcrypt must be built before libpam. # libkvm must be built before libdevstat. From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 10:58:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A0C8106566B; Fri, 30 Dec 2011 10:58:16 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F82F8FC08; Fri, 30 Dec 2011 10:58:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUAwGGw010530; Fri, 30 Dec 2011 10:58:16 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUAwFsw010478; Fri, 30 Dec 2011 10:58:15 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112301058.pBUAwFsw010478@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Dec 2011 10:58:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 10:58:16 -0000 Author: uqs Date: Fri Dec 30 10:58:14 2011 New Revision: 228990 URL: http://svn.freebsd.org/changeset/base/228990 Log: Spelling fixes for usr.sbin/ Modified: head/usr.sbin/IPXrouted/sap_input.c head/usr.sbin/IPXrouted/sap_tables.c head/usr.sbin/adduser/adduser.sh head/usr.sbin/bluetooth/btpand/event.h head/usr.sbin/bluetooth/sdpd/server.c head/usr.sbin/bootparamd/bootparamd/README head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h head/usr.sbin/cron/cron/do_command.c head/usr.sbin/cron/doc/CHANGES head/usr.sbin/cron/doc/MAIL head/usr.sbin/cron/lib/entry.c head/usr.sbin/edquota/edquota.c head/usr.sbin/fwcontrol/fwcontrol.c head/usr.sbin/fwcontrol/fwmpegts.c head/usr.sbin/ifmcstat/ifmcstat.c head/usr.sbin/inetd/builtins.c head/usr.sbin/kbdmap/kbdmap.c head/usr.sbin/kgmon/kgmon.c head/usr.sbin/lpr/common_source/rmjob.c head/usr.sbin/lpr/lpc/cmds.c head/usr.sbin/lpr/lpd/printjob.c head/usr.sbin/lpr/pac/pac.c head/usr.sbin/makefs/cd9660/cd9660_eltorito.c head/usr.sbin/makefs/cd9660/cd9660_write.c head/usr.sbin/makefs/cd9660/iso9660_rrip.c head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs/ffs_subr.c head/usr.sbin/makefs/walk.c head/usr.sbin/mount_portalfs/cred.c head/usr.sbin/mount_portalfs/pt_pipe.c head/usr.sbin/mount_portalfs/pt_tcplisten.c head/usr.sbin/mountd/mountd.c head/usr.sbin/moused/moused.c head/usr.sbin/mptutil/mpt_config.c head/usr.sbin/newsyslog/newsyslog.c head/usr.sbin/nscd/protocol.h head/usr.sbin/ntp/doc/ntp.conf.5 head/usr.sbin/pc-sysinstall/backend-partmanager/delete-part.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh head/usr.sbin/pc-sysinstall/backend/functions-parse.sh head/usr.sbin/pciconf/pciconf.c head/usr.sbin/pkg_install/README head/usr.sbin/pkg_install/add/add.h head/usr.sbin/pkg_install/add/extract.c head/usr.sbin/pkg_install/add/futil.c head/usr.sbin/pkg_install/add/main.c head/usr.sbin/pkg_install/add/perform.c head/usr.sbin/pkg_install/add/pkg_add.1 head/usr.sbin/pkg_install/create/create.h head/usr.sbin/pkg_install/create/main.c head/usr.sbin/pkg_install/create/perform.c head/usr.sbin/pkg_install/create/pkg_create.1 head/usr.sbin/pkg_install/create/pl.c head/usr.sbin/pkg_install/delete/delete.h head/usr.sbin/pkg_install/delete/main.c head/usr.sbin/pkg_install/delete/perform.c head/usr.sbin/pkg_install/delete/pkg_delete.1 head/usr.sbin/pkg_install/info/info.h head/usr.sbin/pkg_install/info/main.c head/usr.sbin/pkg_install/info/perform.c head/usr.sbin/pkg_install/info/show.c head/usr.sbin/pkg_install/lib/deps.c head/usr.sbin/pkg_install/lib/exec.c head/usr.sbin/pkg_install/lib/file.c head/usr.sbin/pkg_install/lib/global.c head/usr.sbin/pkg_install/lib/lib.h head/usr.sbin/pkg_install/lib/match.c head/usr.sbin/pkg_install/lib/msg.c head/usr.sbin/pkg_install/lib/pen.c head/usr.sbin/pkg_install/lib/plist.c head/usr.sbin/pkg_install/lib/str.c head/usr.sbin/pkg_install/lib/url.c head/usr.sbin/pkg_install/version/main.c head/usr.sbin/pkg_install/version/perform.c head/usr.sbin/pkg_install/version/version.h head/usr.sbin/pmcstat/pmcpl_calltree.c head/usr.sbin/pmcstat/pmcpl_gprof.c head/usr.sbin/pmcstat/pmcstat.c head/usr.sbin/pmcstat/pmcstat_log.c head/usr.sbin/ppp/cbcp.c head/usr.sbin/ppp/chat.h head/usr.sbin/ppp/command.c head/usr.sbin/ppp/mp.c head/usr.sbin/ppp/ppp.8.m4 head/usr.sbin/ppp/vjcomp.c head/usr.sbin/pw/cpdir.c head/usr.sbin/route6d/route6d.c head/usr.sbin/rpc.lockd/kern.c head/usr.sbin/rpc.lockd/lockd_lock.c head/usr.sbin/rpcbind/check_bound.c head/usr.sbin/rpcbind/rpcbind.c head/usr.sbin/rtadvd/config.c head/usr.sbin/rtadvd/rtadvd.c head/usr.sbin/rtsold/rtsold.8 head/usr.sbin/sade/label.c head/usr.sbin/tcpdump/tcpdump/tcpdump.1 head/usr.sbin/timed/timed/CHANGES head/usr.sbin/vidcontrol/vidcontrol.c head/usr.sbin/wpa/hostapd/driver_freebsd.c head/usr.sbin/ypserv/yp_access.c Modified: head/usr.sbin/IPXrouted/sap_input.c ============================================================================== --- head/usr.sbin/IPXrouted/sap_input.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/IPXrouted/sap_input.c Fri Dec 30 10:58:14 2011 (r228990) @@ -136,7 +136,7 @@ sap_input(from, size) * The idea here is that if the hop count is more * than INFINITY it is bogus and should be discarded. * If it is equal to INFINITY it is a message to say - * that a service went down. If we don't allready + * that a service went down. If we don't already * have it in our tables discard it. Otherwise * update our table and set the timer to EXPIRE_TIME * so that it is removed next time we go through the Modified: head/usr.sbin/IPXrouted/sap_tables.c ============================================================================== --- head/usr.sbin/IPXrouted/sap_tables.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/IPXrouted/sap_tables.c Fri Dec 30 10:58:14 2011 (r228990) @@ -178,7 +178,7 @@ sap_add(struct sap_info *si, struct sock /* * Change an existing SAP entry. If a clone exist for the old one, - * check if it is cheaper. If it is change tothe clone, otherwise + * check if it is cheaper. If it is change to the clone, otherwise * delete all the clones. */ void Modified: head/usr.sbin/adduser/adduser.sh ============================================================================== --- head/usr.sbin/adduser/adduser.sh Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/adduser/adduser.sh Fri Dec 30 10:58:14 2011 (r228990) @@ -894,7 +894,7 @@ if [ "$procowner" != "0" ]; then exit 1 fi -# Overide from our conf file +# Override from our conf file # Quickly go through the commandline line to see if we should read # from our configuration file. The actual parsing of the commandline # arguments happens after we read in our configuration file (commandline @@ -914,7 +914,7 @@ if [ -n "$readconfig" ]; then fi fi -# Proccess command-line options +# Process command-line options # for _switch ; do case $_switch in Modified: head/usr.sbin/bluetooth/btpand/event.h ============================================================================== --- head/usr.sbin/bluetooth/btpand/event.h Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bluetooth/btpand/event.h Fri Dec 30 10:58:14 2011 (r228990) @@ -40,7 +40,7 @@ #define EV_READ 0x02 #define EV_WRITE 0x04 -#define EV_PERSIST 0x10 /* Persistant event */ +#define EV_PERSIST 0x10 /* Persistent event */ #define EV_PENDING (1 << 13) /* internal use only! */ #define EV_HAS_TIMEOUT (1 << 14) /* internal use only! */ #define EV_CURRENT (1 << 15) /* internal use only! */ Modified: head/usr.sbin/bluetooth/sdpd/server.c ============================================================================== --- head/usr.sbin/bluetooth/sdpd/server.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bluetooth/sdpd/server.c Fri Dec 30 10:58:14 2011 (r228990) @@ -334,7 +334,7 @@ server_accept_client(server_p srv, int32 * The minimum L2CAP MTU is 43 bytes. That means we need * 65536 / 43 = ~1524 chunks to transfer maximum packet * size with minimum MTU. The "rsp_cs" field in fd_idx_t - * is 11 bit wide that gives us upto 2048 chunks. + * is 11 bit wide that gives us up to 2048 chunks. */ if (omtu < NG_L2CAP_MTU_MINIMUM) { Modified: head/usr.sbin/bootparamd/bootparamd/README ============================================================================== --- head/usr.sbin/bootparamd/bootparamd/README Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bootparamd/bootparamd/README Fri Dec 30 10:58:14 2011 (r228990) @@ -19,7 +19,7 @@ RPC.BOOTPARAMD The rpc.bootparamd program does NOT use the yellow pages for the bootparams -database. This data should recide in /etc/bootparams on the local host, +database. This data should reside in /etc/bootparams on the local host, or another file given when the server is started. The default router is set to the address of the machine running the server. @@ -59,17 +59,3 @@ Cache the date, instead of rereading it. Maybe match by comparing the inet address instead. (But beware that caching will prevent the server from detecting that a machine has changed name or address.) - - - - - - - - - - - - - - Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_addrs.c Fri Dec 30 10:58:14 2011 (r228990) @@ -108,7 +108,7 @@ bridge_compare_macs(const uint8_t *m1, c /* * Insert an address entry in the bridge address TAILQ starting to search * for its place from the position of the first bridge address for the bridge - * interface. Update the first bridge address if neccessary. + * interface. Update the first bridge address if necessary. */ static void bridge_addrs_insert_at(struct tp_entries *headp, @@ -136,7 +136,7 @@ bridge_addrs_insert_at(struct tp_entries } /* - * Find an address entry's possition in the address list + * Find an address entry's position in the address list * according to bridge interface name. */ static struct tp_entry * Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_if.c Fri Dec 30 10:58:14 2011 (r228990) @@ -378,7 +378,7 @@ bridge_get_time_since_tc(struct bridge_i * Return: * 1, if successful * 0, if the interface was deleted - * -1, error occured while fetching the info from the kernel. + * -1, error occurred while fetching the info from the kernel. */ static int bridge_update_bif(struct bridge_if *bif) Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_port.c Fri Dec 30 10:58:14 2011 (r228990) @@ -87,7 +87,7 @@ bridge_port_memif_free(struct bridge_por /* * Insert a port entry in the base port TAILQ starting to search * for its place from the position of the first bridge port for the bridge - * interface. Update the first bridge port if neccessary. + * interface. Update the first bridge port if necessary. */ static void bridge_port_insert_at(struct bridge_ports *headp, @@ -119,7 +119,7 @@ bridge_port_insert_at(struct bridge_port } /* - * Find a port entry's possition in the ports list according + * Find a port entry's position in the ports list according * to it's parent bridge interface name. Returns a NULL if * we should be at the TAILQ head, otherwise the entry after * which we should be inserted. Modified: head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_bridge/bridge_sys.c Fri Dec 30 10:58:14 2011 (r228990) @@ -1167,7 +1167,7 @@ bridge_port_find_ifstplist(uint8_t port_ /* * Read the initial info for all members of a bridge interface. * Returns the number of ports, 0 - if none, otherwise - * -1 if some other error occured. + * -1 if some other error occurred. */ int bridge_getinfo_bif_ports(struct bridge_if *bif) @@ -1358,7 +1358,7 @@ bridge_addrs_getinfo_ifalist(struct brid /* * Read the initial info for all addresses on a bridge interface. * Returns the number of addresses, 0 - if none, otherwise - * -1 if some other error occured. + * -1 if some other error occurred. */ int bridge_getinfo_bif_addrs(struct bridge_if *bif) Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_device_tbl.c Fri Dec 30 10:58:14 2011 (r228990) @@ -200,7 +200,7 @@ device_entry_create(const char *name, co /* * From here till the end of this function we reuse name_len - * for a diferrent purpose - for device_entry::descr + * for a different purpose - for device_entry::descr */ if (name[0] != '\0') name_len = strlen(name) + strlen(descr) + Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_scalars.c Fri Dec 30 10:58:14 2011 (r228990) @@ -170,8 +170,8 @@ OS_getSystemDate(struct snmp_value *valu /** * Get kernel boot path. For FreeBSD it seems that no arguments are - * present. Returns NULL if an error occured. The returned data is a - * pointer to a global strorage. + * present. Returns NULL if an error occurred. The returned data is a + * pointer to a global storage. */ int OS_getSystemInitialLoadParameters(u_char **params) Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_snmp.h Fri Dec 30 10:58:14 2011 (r228990) @@ -218,7 +218,7 @@ void fs_tbl_process_statfs_entry(const s /* Called after refreshing fs part of hrStorageTable */ void fs_tbl_post_refresh(void); -/* Refresh the FS table if neccessary. */ +/* Refresh the FS table if necessary. */ void refresh_fs_tbl(void); /* Finalization routine for hrFSTable. */ Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Fri Dec 30 10:58:14 2011 (r228990) @@ -133,7 +133,7 @@ static const struct asn_oid OIDX_hrStora OIDX_hrStorageVirtualMemory; /** - * Create a new entry into the storage table and, if neccessary, an + * Create a new entry into the storage table and, if necessary, an * entry into the storage map. */ static struct storage_entry * Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt Fri Dec 30 10:58:14 2011 (r228990) @@ -82,8 +82,8 @@ WlanMgmtReasonCode ::= TEXTUAL-CONVENTIO associationLeave(8), associationNotAuthenticated(9), -- XXX: TODO - FIXME - dissasocPwrcapBad(10), - dissasocSuperchanBad(11), + disassocPwrcapBad(10), + disassocSuperchanBad(11), ieInvalid(13), micFailure(14), fourWayHandshakeTimeout(15), @@ -579,10 +579,10 @@ wlanIfaceCountryCode OBJECT-TYPE interface is operating include all environments in the specified country. - 2. an ASCII 'O' character, if the country's regulastions are for + 2. an ASCII 'O' character, if the country's regulations are for Outdoor environment only. - 3. an ASCII 'I' character, if the country's regulastions are for + 3. an ASCII 'I' character, if the country's regulations are for Indoor environment only." ::= { wlanIfaceConfigEntry 2 } @@ -634,7 +634,7 @@ wlanIfaceFastFrames OBJECT-TYPE DESCRIPTION "The value of this object controls whether use of Atheros Fast Frames is enabled when when communicating with another Fast - Frames-capable station. The value is only meaningfull for + Frames-capable station. The value is only meaningful for interfaces that support Atheros Fast Frames." ::= { wlanIfaceConfigEntry 7 } @@ -645,7 +645,7 @@ wlanIfaceDturbo OBJECT-TYPE DESCRIPTION "The value of this object controls whether use of Atheros Dynamic Turbo mode is enabled when when communicating with another Dynamic - Turbo-capable station. The value is only meaningfull for interfaces + Turbo-capable station. The value is only meaningful for interfaces that support Atheros Dynamic Turbo mode." ::= { wlanIfaceConfigEntry 8 } @@ -731,7 +731,7 @@ wlanIfaceBeaconMissedThreshold OBJECT-TY MAX-ACCESS read-write STATUS current DESCRIPTION - "The value of this object specifies the number of consequtive missed + "The value of this object specifies the number of consecutive missed beacons before an interface operating in station mode will attempt to search for a new access point." DEFVAL { 7 } @@ -788,7 +788,7 @@ wlanIfaceDynamicWds OBJECT-TYPE STATUS current DESCRIPTION "The value of this object specifies whether Dynamic WDS (DWDS) - support is enabled. The value is only meaningfull for interfaces + support is enabled. The value is only meaningful for interfaces that support Dynamic WDS." ::= { wlanIfaceConfigEntry 21 } @@ -798,7 +798,7 @@ wlanIfacePowerSave OBJECT-TYPE STATUS current DESCRIPTION "The value of this object specifies whether powersave operation - is enabled. The value is only meaningfull for interfaces that + is enabled. The value is only meaningful for interfaces that support powersave operation." ::= { wlanIfaceConfigEntry 22 } @@ -809,7 +809,7 @@ wlanIfaceApBridge OBJECT-TYPE DESCRIPTION "The value of this object specifies whether packets between wireless clients will be passed directly by an interface - operating in host ap mode. Disabling it may be usefull in + operating in host ap mode. Disabling it may be useful in situations when traffic between wireless clients needs to be processed with packet filtering." DEFVAL { true } @@ -1308,7 +1308,7 @@ wlanIfaceChannelFrequency OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The channel frequency setting in Mhz." + "The channel frequency setting in MHz." ::= { wlanIfaceChannelEntry 5 } wlanIfaceChannelMaxRegPower OBJECT-TYPE @@ -2741,7 +2741,7 @@ wlanStatsDwdsMcastDiscard OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of multicast over DWDS frames discared by this interface." + "The number of multicast over DWDS frames discarded by this interface." ::= { wlanIfaceStatisticsEntry 98 } wlanStatsHTAssocRejectNoHT OBJECT-TYPE @@ -2759,7 +2759,7 @@ wlanStatsHTAssocDowngrade OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times HT was dissallowed for an association on + "The number of times HT was disallowed for an association on this interface due to WEP or TKIP requested." ::= { wlanIfaceStatisticsEntry 100 } @@ -2769,7 +2769,7 @@ wlanStatsHTAssocRateMismatch OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of times rate mismatch occured furing HT rate set + "The number of times rate mismatch occurred during HT rate set handling on this interface." ::= { wlanIfaceStatisticsEntry 101 } @@ -2787,7 +2787,7 @@ wlanStatsAMPDUMoved OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of time A-MPDU MSDU moved window occured for this + "The number of time A-MPDU MSDU moved window occurred for this interface." ::= { wlanIfaceStatisticsEntry 103 } @@ -2807,7 +2807,7 @@ wlanStatsADDBANoRequest OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of received ADDBA responces frames that were discarded + "The number of received ADDBA responses frames that were discarded by this interface due to no pending ADDBA." ::= { wlanIfaceStatisticsEntry 105 } @@ -2817,7 +2817,7 @@ wlanStatsADDBABadToken OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of received ADDBA responce frames that were discarded + "The number of received ADDBA response frames that were discarded by this interface since ADDBA response caused dialogtoken mismatch." ::= { wlanIfaceStatisticsEntry 106 } @@ -2827,7 +2827,7 @@ wlanStatsADDBABadPolicy OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of received ADDBA responce frames that were discarded + "The number of received ADDBA response frames that were discarded by this interface since ADDBA response caused policy mismatch." ::= { wlanIfaceStatisticsEntry 107 } @@ -2877,7 +2877,7 @@ wlanLastDissasocReason OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The last received dissasociate reason on this interface." + "The last received disassociate reason on this interface." ::= { wlanIfaceStatisticsEntry 113 } wlanLastAuthFailReason OBJECT-TYPE @@ -2942,7 +2942,7 @@ wlanStatsAMPDURexmtFailed OBJECT-TYPE MAX-ACCESS read-only STATUS current DESCRIPTION - "The number of A-MPDU frames for which retransmition failed on + "The number of A-MPDU frames for which retransmission failed on this interface." ::= { wlanIfaceStatisticsEntry 120 } @@ -3696,7 +3696,7 @@ wlanMeshDroppedMisaligned OBJECT-TYPE STATUS current DESCRIPTION "The number of frames that were dropped by this interface due to - bad alighment." + bad alignment." ::= { wlanMeshStatsEntry 11 } -- ---------------------------------------------------------- -- Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def Fri Dec 30 10:58:14 2011 (r228990) @@ -75,8 +75,8 @@ typedef WlanMgmtReasonCode ENUM ( 7 notAssociated 8 associationLeave 9 associationNotAuthenticated - 10 dissasocPwrcapBad - 11 dissasocSuperchanBad + 10 disassocPwrcapBad + 11 disassocSuperchanBad 13 ieInvalid 14 micFailure 15 fourWayHandshakeTimeout Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.1 Fri Dec 30 10:58:14 2011 (r228990) @@ -102,7 +102,7 @@ and .Nm bsnmpset are simple tools for retrieving management information from and setting -management information to a Simple Network Managment Protocol (SNMP) agent. +management information to a Simple Network Management Protocol (SNMP) agent. .Pp Depending on the options .Nm bsnmpget @@ -119,7 +119,7 @@ rooted at the provided OIDs. .Nm Bsnmpset constructs a SMNP SetRequest packet, fills in the OIDs (object identifiers), syntaxes and values of the objects whose values are to be set and waits for a -responce from server. +response from server. .Sh OPTIONS .Pp The options are as follows (not all apply to all three programs): @@ -165,7 +165,7 @@ terminal. Retry on error. If an error is returned in the response PDU, resend the request removing the variable that caused the error until a valid response is received. -This is only usefull for a GetRequest- and a GetNextRequest-PDU. +This is only useful for a GetRequest- and a GetNextRequest-PDU. .It Fl h Print a short help text with default values for various options. .It Fl I Ar options Modified: head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c ============================================================================== --- head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/tools/bsnmptools/bsnmpget.c Fri Dec 30 10:58:14 2011 (r228990) @@ -248,9 +248,9 @@ snmptool_parse_options(struct snmp_tooli /* * Read user input OID - one of following formats: - * 1) 1.2.1.1.2.1.0 - that is if option numeric was giveni; + * 1) 1.2.1.1.2.1.0 - that is if option numeric was given; * 2) string - in such case append .0 to the asn_oid subs; - * 3) string.1 - no additional proccessing required in such case. + * 3) string.1 - no additional processing required in such case. */ static char * snmptools_parse_stroid(struct snmp_toolinfo *snmptoolctx, @@ -458,7 +458,7 @@ static int snmptool_walk(struct snmp_toolinfo *snmptoolctx) { struct snmp_pdu req, resp; - struct asn_oid root; /* Keep the inital oid. */ + struct asn_oid root; /* Keep the initial oid. */ int32_t outputs, rc; snmp_pdu_create(&req, SNMP_PDU_GETNEXT); @@ -1105,13 +1105,13 @@ snmptool_set(struct snmp_toolinfo *snmpt */ /* * According to command line options prepare SNMP Get | GetNext | GetBulk PDU. - * Wait for a responce and print it. + * Wait for a response and print it. */ /* * Do a 'snmp walk' - according to command line options request for values * lexicographically subsequent and subrooted at a common node. Send a GetNext - * PDU requesting the value for each next variable and print the responce. Stop - * when a Responce PDU is received that contains the value of a variable not + * PDU requesting the value for each next variable and print the response. Stop + * when a Response PDU is received that contains the value of a variable not * subrooted at the variable the walk started. */ int Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Fri Dec 30 10:58:14 2011 (r228990) @@ -87,7 +87,7 @@ static const struct { { "General error", SNMP_ERR_GENERR }, { "No access", SNMP_ERR_NO_ACCESS }, { "Wrong type", SNMP_ERR_WRONG_TYPE }, - { "Wrong lenght", SNMP_ERR_WRONG_LENGTH }, + { "Wrong length", SNMP_ERR_WRONG_LENGTH }, { "Wrong encoding", SNMP_ERR_WRONG_ENCODING }, { "Wrong value", SNMP_ERR_WRONG_VALUE }, { "No creation", SNMP_ERR_NO_CREATION }, @@ -227,12 +227,12 @@ snmp_import_all(struct snmp_toolinfo *sn } /* - * Add a filename to the file list - the initail idea of keeping a list with all + * Add a filename to the file list - the initial idea of keeping a list with all * files to read OIDs from was that an application might want to have loaded in * memory the OIDs from a single file only and when done with them read the OIDs * from another file. This is not used yet but might be a good idea at some * point. Size argument is number of bytes in string including trailing '\0', - * not string lenght. + * not string length. */ int32_t add_filename(struct snmp_toolinfo *snmptoolctx, const char *filename, @@ -449,7 +449,7 @@ parse_ascii(char *ascii, uint8_t *binstr uint32_t val; char dptr[3]; - /* Filter 0x at the beggining */ + /* Filter 0x at the beginning */ if ((alen = strlen(ascii)) > 2 && ascii[0] == '0' && ascii[1] == 'x') i = 2; else @@ -468,7 +468,7 @@ parse_ascii(char *ascii, uint8_t *binstr } binstr[count] = (uint8_t) val; if (++count >= binlen) { - warnx("Key %s too long - truncating to %zu octest", + warnx("Key %s too long - truncating to %zu octets", ascii, binlen); break; } @@ -1523,10 +1523,10 @@ snmp_object_seterror(struct snmp_toolinf } /* - * Check a PDU received in responce to a SNMP_PDU_GET/SNMP_PDU_GETBULK request + * Check a PDU received in response to a SNMP_PDU_GET/SNMP_PDU_GETBULK request * but don't compare syntaxes - when sending a request PDU they must be null. * This is a (almost) complete copy of snmp_pdu_check() - with matching syntaxes - * checks and some other checks skiped. + * checks and some other checks skipped. */ int32_t snmp_parse_get_resp(struct snmp_pdu *resp, struct snmp_pdu *req) @@ -1605,7 +1605,7 @@ snmp_parse_getnext_resp(struct snmp_pdu } /* - * Should be called to check a responce to get/getnext/getbulk. + * Should be called to check a response to get/getnext/getbulk. */ int32_t snmp_parse_resp(struct snmp_pdu *resp, struct snmp_pdu *req) @@ -1624,7 +1624,7 @@ snmp_parse_resp(struct snmp_pdu *resp, s } if (resp->error_status != SNMP_ERR_NOERROR) { - warnx("Error %d in responce", resp->error_status); + warnx("Error %d in response", resp->error_status); return (-1); } Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h ============================================================================== --- head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.h Fri Dec 30 10:58:14 2011 (r228990) @@ -185,14 +185,14 @@ extern struct snmp_toolinfo snmptool; /* Definitions for some flags' bits. */ #define OUTPUT_BITS 0x00000003 /* bits 0-1 for output type */ #define NUMERIC_BIT 0x00000004 /* bit 2 for numeric oids */ -#define RETRY_BIT 0x00000008 /* bit 3 for retry on error responce */ +#define RETRY_BIT 0x00000008 /* bit 3 for retry on error response */ #define ERRIGNORE_BIT 0x00000010 /* bit 4 for skip sanity checking */ #define ERRIGNORE_BIT 0x00000010 /* bit 4 for skip sanity checking */ #define EDISCOVER_BIT 0x00000020 /* bit 5 for SNMP Engine Discovery */ #define LOCALKEY_BIT 0x00000040 /* bit 6 for using localized key */ - /* 0x00000080 */ /* bit 7 reserverd */ + /* 0x00000080 */ /* bit 7 reserved */ #define PDUTYPE_BITS 0x00000f00 /* bits 8-11 for pdu type */ - /* 0x0000f000 */ /* bit 12-15 reserverd */ + /* 0x0000f000 */ /* bit 12-15 reserved */ #define MAXREP_BITS 0x00ff0000 /* bits 16-23 for max-repetit. value */ #define NONREP_BITS 0xff000000 /* bits 24-31 for non-repeaters value */ Modified: head/usr.sbin/cron/cron/do_command.c ============================================================================== --- head/usr.sbin/cron/cron/do_command.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/cron/cron/do_command.c Fri Dec 30 10:58:14 2011 (r228990) @@ -147,7 +147,7 @@ child_process(e, u) #ifdef USE_SIGCHLD /* our parent is watching for our death by catching SIGCHLD. we * do not care to watch for our children's deaths this way -- we - * use wait() explictly. so we have to disable the signal (which + * use wait() explicitly. so we have to disable the signal (which * was inherited from the parent). */ (void) signal(SIGCHLD, SIG_DFL); Modified: head/usr.sbin/cron/doc/CHANGES ============================================================================== --- head/usr.sbin/cron/doc/CHANGES Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/cron/doc/CHANGES Fri Dec 30 10:58:14 2011 (r228990) @@ -1,3 +1,6 @@ +$FreeBSD$ +-------- + Vixie Cron Changes from V2 to V3 Paul Vixie 29-Dec-1993 @@ -20,7 +23,7 @@ be reread whenever it changes. I also added a "-e" option to crontab(1). Nine people also sent me diffs to add this option, but I had already implemented it on my own. I actually -released an interrim version (V2.2, I think) for limited testing, and got a +released an interim version (V2.2, I think) for limited testing, and got a chance to fix a bad security bug in the "-e" option thanks to XXX. The daemon used to be extraordinarily sloppy in its use of file descriptors. @@ -57,7 +60,7 @@ which explains why a lot of other people syslog even when they configured it that way :-). Steve Simmons told me first, though, so he gets the point. -An interrim version of the daemon tried to "stat" every file before +An interim version of the daemon tried to "stat" every file before executing it; this turned out to be a horribly bad idea since finding the name of a file from a shell command is a hard job (that's why we have shells, right?) I removed this bogus code. Dave Burgess gets the point. Modified: head/usr.sbin/cron/doc/MAIL ============================================================================== --- head/usr.sbin/cron/doc/MAIL Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/cron/doc/MAIL Fri Dec 30 10:58:14 2011 (r228990) @@ -186,7 +186,7 @@ five fields. Examples: (run command if day-of-month AND day-of-week are true) -Get the picture? This would be compatable with existing versions of +Get the picture? This would be compatible with existing versions of cron (which wouldn't currently be using any special characters, so that old crontabs would be handled correctly). Modified: head/usr.sbin/cron/lib/entry.c ============================================================================== --- head/usr.sbin/cron/lib/entry.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/cron/lib/entry.c Fri Dec 30 10:58:14 2011 (r228990) @@ -254,7 +254,7 @@ load_entry(file, error_func, pw, envp) } } - /* make sundays equivilent */ + /* make sundays equivalent */ if (bit_test(e->dow, 0) || bit_test(e->dow, 7)) { bit_set(e->dow, 0); bit_set(e->dow, 7); Modified: head/usr.sbin/edquota/edquota.c ============================================================================== --- head/usr.sbin/edquota/edquota.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/edquota/edquota.c Fri Dec 30 10:58:14 2011 (r228990) @@ -426,7 +426,7 @@ putprivs(long id, struct quotause *qupli } /* - * Take a list of priviledges and get it edited. + * Take a list of privileges and get it edited. */ int editit(char *tmpf) Modified: head/usr.sbin/fwcontrol/fwcontrol.c ============================================================================== --- head/usr.sbin/fwcontrol/fwcontrol.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/fwcontrol/fwcontrol.c Fri Dec 30 10:58:14 2011 (r228990) @@ -1056,7 +1056,7 @@ main(int argc, char **argv) show_topology_map(fd); /* - * Recieve data file from node "-R" + * Receive data file from node "-R" */ #define TAG (1<<6) #define CHANNEL 63 Modified: head/usr.sbin/fwcontrol/fwmpegts.c ============================================================================== --- head/usr.sbin/fwcontrol/fwmpegts.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/fwcontrol/fwmpegts.c Fri Dec 30 10:58:14 2011 (r228990) @@ -94,7 +94,7 @@ MPEG-2 Transport Stream (MPEG TS) packet N.b. that CRCs are removed by firewire layer! -The following fiels are fixed for IEEE-1394: +The following fields are fixed for IEEE-1394: tag = 01b tcode = 1010b The length is payload length, i.e. includes CIP header and data size. Modified: head/usr.sbin/ifmcstat/ifmcstat.c ============================================================================== --- head/usr.sbin/ifmcstat/ifmcstat.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/ifmcstat/ifmcstat.c Fri Dec 30 10:58:14 2011 (r228990) @@ -888,7 +888,7 @@ out_free: /* * Retrieve MLD per-group source filter mode and lists via sysctl. * - * Note: The 128-bit IPv6 group addres needs to be segmented into + * Note: The 128-bit IPv6 group address needs to be segmented into * 32-bit pieces for marshaling to sysctl. So the MIB name ends * up looking like this: * a.b.c.d.e.ifindex.g[0].g[1].g[2].g[3] Modified: head/usr.sbin/inetd/builtins.c ============================================================================== --- head/usr.sbin/inetd/builtins.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/inetd/builtins.c Fri Dec 30 10:58:14 2011 (r228990) @@ -745,7 +745,7 @@ machtime_stream(int s, struct servtab *s #define MAX_SERV_LEN (256+2) /* 2 bytes for \r\n */ #define strwrite(fd, buf) (void) write(fd, buf, sizeof(buf)-1) -static int /* # of characters upto \r,\n or \0 */ +static int /* # of characters up to \r,\n or \0 */ getline(int fd, char *buf, int len) { int count = 0, n; Modified: head/usr.sbin/kbdmap/kbdmap.c ============================================================================== --- head/usr.sbin/kbdmap/kbdmap.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/kbdmap/kbdmap.c Fri Dec 30 10:58:14 2011 (r228990) @@ -547,7 +547,7 @@ check_file(const char *keym) } /* - * Read options from the relevent configuration file, then + * Read options from the relevant configuration file, then * present to user. */ static void Modified: head/usr.sbin/kgmon/kgmon.c ============================================================================== --- head/usr.sbin/kgmon/kgmon.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/kgmon/kgmon.c Fri Dec 30 10:58:14 2011 (r228990) @@ -240,13 +240,13 @@ kern_readonly(mode) if (pflag && (mode == GMON_PROF_HIRES || mode == GMON_PROF_ON)) (void)fprintf(stderr, "data may be inconsistent\n"); if (rflag) - (void)fprintf(stderr, "-r supressed\n"); + (void)fprintf(stderr, "-r suppressed\n"); if (Bflag) - (void)fprintf(stderr, "-B supressed\n"); + (void)fprintf(stderr, "-B suppressed\n"); if (bflag) - (void)fprintf(stderr, "-b supressed\n"); + (void)fprintf(stderr, "-b suppressed\n"); if (hflag) - (void)fprintf(stderr, "-h supressed\n"); + (void)fprintf(stderr, "-h suppressed\n"); rflag = Bflag = bflag = hflag = 0; } Modified: head/usr.sbin/lpr/common_source/rmjob.c ============================================================================== --- head/usr.sbin/lpr/common_source/rmjob.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/lpr/common_source/rmjob.c Fri Dec 30 10:58:14 2011 (r228990) @@ -78,7 +78,7 @@ void rmjob(const char *printer) { register int i, nitems; - int assasinated = 0; + int assassinated = 0; struct dirent **files; char *cp; struct printer myprinter, *pp = &myprinter; @@ -125,9 +125,9 @@ rmjob(const char *printer) */ if (lockchk(pp, pp->lock_file) && chk(current)) { seteuid(euid); - assasinated = kill(cur_daemon, SIGINT) == 0; + assassinated = kill(cur_daemon, SIGINT) == 0; seteuid(uid); - if (!assasinated) + if (!assassinated) fatal(pp, "cannot kill printer daemon"); } /* @@ -140,7 +140,7 @@ rmjob(const char *printer) /* * Restart the printer daemon if it was killed */ - if (assasinated && !startdaemon(pp)) + if (assassinated && !startdaemon(pp)) fatal(pp, "cannot restart printer daemon\n"); exit(0); } Modified: head/usr.sbin/lpr/lpc/cmds.c ============================================================================== --- head/usr.sbin/lpr/lpc/cmds.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/lpr/lpc/cmds.c Fri Dec 30 10:58:14 2011 (r228990) @@ -496,7 +496,7 @@ sortq(const void *a, const void *b) fname_b = (*(const struct dirent * const *)b)->d_name; /* - * First separate filenames into cagatories. Catagories are + * First separate filenames into categories. Categories are * legitimate `cf', `df', `rf' & `tf' filenames, and "other" - in * that order. It is critical that the mapping be exactly the * same for 'a' vs 'b', so define a macro for the job. @@ -562,7 +562,7 @@ sortq(const void *a, const void *b) /* * We have two files which belong to the same job. Sort based - * on the catagory of file (`c' before `d', etc). + * on the category of file (`c' before `d', etc). */ if (cat_a < cat_b) { res = a_lt_b; @@ -573,8 +573,8 @@ sortq(const void *a, const void *b) } /* - * Two files in the same catagory for a single job. Sort based - * on the sequence letter(s). (usually `A' thru `Z', etc). + * Two files in the same category for a single job. Sort based + * on the sequence letter(s). (usually `A' through `Z', etc). */ if (seq_a < seq_b) { res = a_lt_b; Modified: head/usr.sbin/lpr/lpd/printjob.c ============================================================================== --- head/usr.sbin/lpr/lpd/printjob.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/lpr/lpd/printjob.c Fri Dec 30 10:58:14 2011 (r228990) @@ -604,7 +604,7 @@ pass2: /* * Print a file. * Set up the chain [ PR [ | {IF, OF} ] ] or {IF, RF, TF, NF, DF, CF, VF}. - * Return -1 if a non-recoverable error occured, + * Return -1 if a non-recoverable error occurred, * 2 if the filter detected some errors (but printed the job anyway), * 1 if we should try to reprint this job and * 0 if all is well. @@ -887,7 +887,7 @@ start: /* * Send the daemon control file (cf) and any data files. - * Return -1 if a non-recoverable error occured, 1 if a recoverable error and + * Return -1 if a non-recoverable error occurred, 1 if a recoverable error and * 0 if all is well. */ static int Modified: head/usr.sbin/lpr/pac/pac.c ============================================================================== --- head/usr.sbin/lpr/pac/pac.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/lpr/pac/pac.c Fri Dec 30 10:58:14 2011 (r228990) @@ -203,7 +203,7 @@ usage(void) * Read the entire accounting file, accumulating statistics * for the users that we have in the hash table. If allflag * is set, then just gather the facts on everyone. - * Note that we must accomodate both the active and summary file + * Note that we must accommodate both the active and summary file * formats here. * Host names are ignored if the -m flag is present. */ Modified: head/usr.sbin/makefs/cd9660/cd9660_eltorito.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/makefs/cd9660/cd9660_eltorito.c Fri Dec 30 10:58:14 2011 (r228990) @@ -589,7 +589,7 @@ cd9660_write_boot(FILE *fd) e->entry_type); } /* - * It doesnt matter which one gets written + * It doesn't matter which one gets written * since they are the same size */ fwrite(&(e->entry_data.VE), 1, 32, fd); Modified: head/usr.sbin/makefs/cd9660/cd9660_write.c ============================================================================== --- head/usr.sbin/makefs/cd9660/cd9660_write.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/makefs/cd9660/cd9660_write.c Fri Dec 30 10:58:14 2011 (r228990) @@ -305,10 +305,10 @@ cd9660_write_file(FILE *fd, cd9660node * } } else { /* - * Here is a new revelation that ECMA didnt explain + * Here is a new revelation that ECMA didn't explain * (at least not well). * ALL . and .. records store the name "\0" and "\1" - * resepctively. So, for each directory, we have to + * respectively. So, for each directory, we have to * make a new node. * * This is where it gets kinda messy, since we have to Modified: head/usr.sbin/makefs/cd9660/iso9660_rrip.c ============================================================================== --- head/usr.sbin/makefs/cd9660/iso9660_rrip.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/makefs/cd9660/iso9660_rrip.c Fri Dec 30 10:58:14 2011 (r228990) @@ -298,7 +298,7 @@ cd9660_susp_initialize_node(cd9660node * * CE: is added for us where needed * ST: not sure if it is even required, but if so, should be * handled by the CE code - * PD: isnt needed (though might be added for testing) + * PD: isn't needed (though might be added for testing) * SP: is stored ONLY on the . record of the root directory * ES: not sure */ Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/makefs/ffs.c Fri Dec 30 10:58:14 2011 (r228990) @@ -145,7 +145,7 @@ static void *ffs_build_dinode2(struct u int sectorsize; /* XXX: for buf.c::getblk() */ - /* publically visible functions */ + /* publicly visible functions */ void ffs_prep_opts(fsinfo_t *fsopts) Modified: head/usr.sbin/makefs/ffs/ffs_subr.c ============================================================================== --- head/usr.sbin/makefs/ffs/ffs_subr.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/makefs/ffs/ffs_subr.c Fri Dec 30 10:58:14 2011 (r228990) @@ -78,8 +78,8 @@ ffs_fragacct_swap(struct fs *fs, int fra * block operations * * check if a block is available - * returns true if all the correponding bits in the free map are 1 - * returns false if any corresponding bit in the free map is 0 + * returns true if all the corresponding bits in the free map are 1 + * returns false if any corresponding bit in the free map is 0 */ int ffs_isblock(fs, cp, h) Modified: head/usr.sbin/makefs/walk.c ============================================================================== --- head/usr.sbin/makefs/walk.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/makefs/walk.c Fri Dec 30 10:58:14 2011 (r228990) @@ -172,7 +172,7 @@ create_fsnode(const char *name, struct s /* * free_fsnodes -- * Removes node from tree and frees it and all of - * its decendents. + * its descendants. */ void free_fsnodes(fsnode *node) Modified: head/usr.sbin/mount_portalfs/cred.c ============================================================================== --- head/usr.sbin/mount_portalfs/cred.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/mount_portalfs/cred.c Fri Dec 30 10:58:14 2011 (r228990) @@ -39,7 +39,7 @@ __FBSDID("$FreeBSD$"); /* * Set the process's credentials to those specified in user, - * saveing the existing ones in save. + * saving the existing ones in save. * Return 0 on success, -1 (with errno set) on error. */ int Modified: head/usr.sbin/mount_portalfs/pt_pipe.c ============================================================================== --- head/usr.sbin/mount_portalfs/pt_pipe.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/mount_portalfs/pt_pipe.c Fri Dec 30 10:58:14 2011 (r228990) @@ -92,7 +92,7 @@ int portal_pipe(struct portal_cred *pcr, if (argc == 0) return (ENOENT); - /* Swap priviledges. */ + /* Swap privileges. */ if (set_user_credentials(pcr, &save_area) < 0) return (errno); @@ -137,7 +137,7 @@ int portal_pipe(struct portal_cred *pcr, } done: - /* Re-establish our priviledges. */ + /* Re-establish our privileges. */ if (restore_credentials(&save_area) < 0) error = errno; Modified: head/usr.sbin/mount_portalfs/pt_tcplisten.c ============================================================================== --- head/usr.sbin/mount_portalfs/pt_tcplisten.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/mount_portalfs/pt_tcplisten.c Fri Dec 30 10:58:14 2011 (r228990) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); * Key will be tcplisten/host/port * * Create a TCP socket bound to the requested host and port. - * If the host is "ANY" the receving address will be set to INADDR_ANY. + * If the host is "ANY" the receiving address will be set to INADDR_ANY. * If the port is 0 the caller must find out the returned port number * using a call to getsockname. * Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/mountd/mountd.c Fri Dec 30 10:58:14 2011 (r228990) @@ -3092,7 +3092,7 @@ checkmask(struct sockaddr *sa) /* * Compare two sockaddrs according to a specified mask. Return zero if * `sa1' matches `sa2' when filtered by the netmask in `samask'. - * If samask is NULL, perform a full comparision. + * If samask is NULL, perform a full comparison. */ int sacmp(struct sockaddr *sa1, struct sockaddr *sa2, struct sockaddr *samask) Modified: head/usr.sbin/moused/moused.c ============================================================================== --- head/usr.sbin/moused/moused.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/moused/moused.c Fri Dec 30 10:58:14 2011 (r228990) @@ -1025,7 +1025,7 @@ moused(void) { struct mouse_info mouse; mousestatus_t action0; /* original mouse action */ - mousestatus_t action; /* interrim buffer */ + mousestatus_t action; /* interim buffer */ mousestatus_t action2; /* mapped action */ struct timeval timeout; fd_set fds; @@ -2278,7 +2278,7 @@ r_protocol(u_char rBuf, mousestatus_t *a act->button |= ((pBuf[0] & MOUSE_PS2_TAP)) ? 0 : MOUSE_BUTTON4DOWN; break; case MOUSE_MODEL_NETSCROLL: - /* three addtional bytes encode buttons and wheel events */ + /* three additional bytes encode buttons and wheel events */ act->button |= (pBuf[3] & MOUSE_PS2_BUTTON3DOWN) ? MOUSE_BUTTON4DOWN : 0; act->button |= (pBuf[3] & MOUSE_PS2_BUTTON1DOWN) Modified: head/usr.sbin/mptutil/mpt_config.c ============================================================================== --- head/usr.sbin/mptutil/mpt_config.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/mptutil/mpt_config.c Fri Dec 30 10:58:14 2011 (r228990) @@ -482,7 +482,7 @@ restart: if (state->list->drives[i]->PhysDiskID == state->target_id) goto restart; - /* Seach volumes second. */ + /* Search volumes second. */ vol = state->ioc2->RaidVolume; for (i = 0; i < state->ioc2->NumActiveVolumes; vol++, i++) if (vol->VolumeID == state->target_id) Modified: head/usr.sbin/newsyslog/newsyslog.c ============================================================================== --- head/usr.sbin/newsyslog/newsyslog.c Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/newsyslog/newsyslog.c Fri Dec 30 10:58:14 2011 (r228990) @@ -1597,7 +1597,7 @@ delete_oldest_timelog(const struct conf_ } /* - * Generate a log filename, when using clasic filenames. + * Generate a log filename, when using classic filenames. */ static void gen_clasiclog_fname(char *fname, size_t fname_sz, const char *archive_dir, @@ -1612,7 +1612,7 @@ gen_clasiclog_fname(char *fname, size_t } /* - * Delete a rotated logfiles, when using clasic filenames. + * Delete a rotated logfiles, when using classic filenames. */ static void delete_clasiclog(const char *archive_dir, const char *namepart, int numlog_c) Modified: head/usr.sbin/nscd/protocol.h ============================================================================== --- head/usr.sbin/nscd/protocol.h Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/nscd/protocol.h Fri Dec 30 10:58:14 2011 (r228990) @@ -67,7 +67,7 @@ struct cache_read_response { }; enum transformation_type { - TT_USER = 0, // tranform only the entries of the caller + TT_USER = 0, // transform only the entries of the caller TT_ALL = 1 // transform all entries }; Modified: head/usr.sbin/ntp/doc/ntp.conf.5 ============================================================================== --- head/usr.sbin/ntp/doc/ntp.conf.5 Fri Dec 30 10:45:00 2011 (r228989) +++ head/usr.sbin/ntp/doc/ntp.conf.5 Fri Dec 30 10:58:14 2011 (r228990) @@ -783,7 +783,7 @@ The remaining files are necessary only f Autokey protocol. .Pp Certificates imported from OpenSSL or public certificate -authorities have certian limitations. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 10:59:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00240106564A; Fri, 30 Dec 2011 10:59:15 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD5F78FC0A; Fri, 30 Dec 2011 10:59:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUAxFGC010607; Fri, 30 Dec 2011 10:59:15 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUAxFrs010593; Fri, 30 Dec 2011 10:59:15 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112301059.pBUAxFrs010593@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Dec 2011 10:59:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228991 - in head/usr.bin: brandelf calendar/calendars logins sockstat unzip whereis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 10:59:16 -0000 Author: uqs Date: Fri Dec 30 10:59:15 2011 New Revision: 228991 URL: http://svn.freebsd.org/changeset/base/228991 Log: Reencode files from latin1 to UTF-8. This makes a tiny percentage of entries in calendars ugly for latin1 users, but fixes them for UTF-8 users. This badly needs a solution involving locale-dependent re-encoding. Modified: head/usr.bin/brandelf/brandelf.c head/usr.bin/calendar/calendars/calendar.birthday head/usr.bin/calendar/calendars/calendar.freebsd head/usr.bin/calendar/calendars/calendar.history head/usr.bin/calendar/calendars/calendar.music head/usr.bin/logins/logins.1 head/usr.bin/logins/logins.c head/usr.bin/sockstat/sockstat.1 head/usr.bin/sockstat/sockstat.c head/usr.bin/unzip/unzip.1 head/usr.bin/unzip/unzip.c head/usr.bin/whereis/pathnames.h head/usr.bin/whereis/whereis.c Modified: head/usr.bin/brandelf/brandelf.c ============================================================================== --- head/usr.bin/brandelf/brandelf.c Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/brandelf/brandelf.c Fri Dec 30 10:59:15 2011 (r228991) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2000, 2001 David O'Brien - * Copyright (c) 1996 Søren Schmidt + * Copyright (c) 1996 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/calendar/calendars/calendar.birthday ============================================================================== --- head/usr.bin/calendar/calendars/calendar.birthday Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/calendar/calendars/calendar.birthday Fri Dec 30 10:59:15 2011 (r228991) @@ -291,7 +291,7 @@ 12/12 E.G. Robinson born, 1893 12/14 George Washington dies, 1799 12/17 William Safire (Safir) born, 1929 -12/18 Konrad Zuse died in Hünfeld, 1995 +12/18 Konrad Zuse died in Hünfeld, 1995 12/20 Carl Sagan died, 1996 12/21 Benjamin Disraeli born, 1804 12/22 Giacomo Puccini born, 1858 Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/calendar/calendars/calendar.freebsd Fri Dec 30 10:59:15 2011 (r228991) @@ -326,7 +326,7 @@ 11/28 Stanislav Sedov born in Chelyabinsk, USSR, 1985 12/01 Hajimu Umemoto born in Nara, Japan, 1961 12/01 Alexey Dokuchaev born in Magadan, USSR, 1980 -12/02 Ermal Luçi born in Tirane, Albania, 1980 +12/02 Ermal Luçi born in Tirane, Albania, 1980 12/03 Diane Bruce born in Ottawa, Ontario, Canada, 1952 12/05 Ivan Voras born in Slavonski Brod, Croatia, 1981 12/06 Stefan Farfeleder born in Wien, Austria, 1980 Modified: head/usr.bin/calendar/calendars/calendar.history ============================================================================== --- head/usr.bin/calendar/calendars/calendar.history Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/calendar/calendars/calendar.history Fri Dec 30 10:59:15 2011 (r228991) @@ -302,7 +302,7 @@ 09/11 Terrorists destroy World Trade Center in New York, 2001 09/12 German paratroopers rescue Mussolini from captivity in Rome, 1943 09/12 Germany annexes Sudetenland, 1938 -09/13 58° C (136.4° F) measured at el Azizia, Libya, 1922 +09/13 58 °C (136.4 °F) measured at el Azizia, Libya, 1922 09/13 British defeat the French at the Plains of Abraham, just outside the walls of Quebec City, 1759 09/13 Building of Hadrian's Wall begun, 122 09/13 Chiang Kai-Shek becomes president of China, 1943 Modified: head/usr.bin/calendar/calendars/calendar.music ============================================================================== --- head/usr.bin/calendar/calendars/calendar.music Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/calendar/calendars/calendar.music Fri Dec 30 10:59:15 2011 (r228991) @@ -225,7 +225,7 @@ 12/08 Jim Morrison is born in Melbourne, Florida, 1943 12/08 John Lennon is shot and killed in New York City, 1980 12/09 The Who's "Tommy" premieres in London, 1973 -12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803 +12/11 (Louis) Hector Berlioz born in La-Côte-Saint-André, 1803 12/13 Ted Nugent, the motor city madman, born in Detroit, 1949 12/15 Thomas Edison receives patent on the phonograph, 1877 12/16 Don McLean's "American Pie" is released, 1971 Modified: head/usr.bin/logins/logins.1 ============================================================================== --- head/usr.bin/logins/logins.1 Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/logins/logins.1 Fri Dec 30 10:59:15 2011 (r228991) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/logins/logins.c ============================================================================== --- head/usr.bin/logins/logins.c Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/logins/logins.c Fri Dec 30 10:59:15 2011 (r228991) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2004 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sockstat/sockstat.1 ============================================================================== --- head/usr.bin/sockstat/sockstat.1 Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/sockstat/sockstat.1 Fri Dec 30 10:59:15 2011 (r228991) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 1999 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 1999 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/sockstat/sockstat.c ============================================================================== --- head/usr.bin/sockstat/sockstat.c Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/sockstat/sockstat.c Fri Dec 30 10:59:15 2011 (r228991) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2002 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2002 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/unzip/unzip.1 ============================================================================== --- head/usr.bin/unzip/unzip.1 Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/unzip/unzip.1 Fri Dec 30 10:59:15 2011 (r228991) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/unzip/unzip.c ============================================================================== --- head/usr.bin/unzip/unzip.c Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/unzip/unzip.c Fri Dec 30 10:59:15 2011 (r228991) @@ -1,6 +1,6 @@ /*- * Copyright (c) 2009 Joerg Sonnenberger - * Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2007-2008 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without Modified: head/usr.bin/whereis/pathnames.h ============================================================================== --- head/usr.bin/whereis/pathnames.h Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/whereis/pathnames.h Fri Dec 30 10:59:15 2011 (r228991) @@ -1,5 +1,5 @@ /* - * Copyright © 2002, Jörg Wunsch + * Copyright © 2002, Jörg Wunsch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: head/usr.bin/whereis/whereis.c ============================================================================== --- head/usr.bin/whereis/whereis.c Fri Dec 30 10:58:14 2011 (r228990) +++ head/usr.bin/whereis/whereis.c Fri Dec 30 10:59:15 2011 (r228991) @@ -1,5 +1,5 @@ /* - * Copyright © 2002, Jörg Wunsch + * Copyright © 2002, Jörg Wunsch * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 11:02:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F8B1106564A; Fri, 30 Dec 2011 11:02:42 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 25EB38FC14; Fri, 30 Dec 2011 11:02:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUB2gUZ010809; Fri, 30 Dec 2011 11:02:42 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUB2fMb010759; Fri, 30 Dec 2011 11:02:41 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112301102.pBUB2fMb010759@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Dec 2011 11:02:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228992 - in head/usr.bin: csup finger fstat indent ipcs lex limits locate/locate login mail make man ncplogin netstat pr rpcgen rpcinfo systat talk tip/tip top vgrind xlint/lint1 xlint... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 11:02:42 -0000 Author: uqs Date: Fri Dec 30 11:02:40 2011 New Revision: 228992 URL: http://svn.freebsd.org/changeset/base/228992 Log: Spelling fixes for usr.bin/ Modified: head/usr.bin/csup/fixups.c head/usr.bin/csup/mux.c head/usr.bin/csup/rcsfile.c head/usr.bin/finger/finger.c head/usr.bin/fstat/fstat.c head/usr.bin/indent/indent.c head/usr.bin/indent/io.c head/usr.bin/ipcs/ipc.c head/usr.bin/ipcs/ipc.h head/usr.bin/lex/NEWS head/usr.bin/lex/flexdef.h head/usr.bin/lex/tblcmp.c head/usr.bin/limits/limits.c head/usr.bin/locate/locate/locate.c head/usr.bin/locate/locate/util.c head/usr.bin/login/login_fbtab.c head/usr.bin/mail/head.c head/usr.bin/mail/main.c head/usr.bin/mail/util.c head/usr.bin/make/GNode.h head/usr.bin/make/arch.c head/usr.bin/make/buf.c head/usr.bin/make/for.c head/usr.bin/make/job.c head/usr.bin/make/main.c head/usr.bin/make/str.c head/usr.bin/make/var.c head/usr.bin/man/man.sh head/usr.bin/ncplogin/ncplogin.c head/usr.bin/netstat/ipx.c head/usr.bin/pr/pr.c head/usr.bin/rpcgen/rpc_svcout.c head/usr.bin/rpcinfo/rpcinfo.c head/usr.bin/systat/icmp6.c head/usr.bin/talk/ctl_transact.c head/usr.bin/talk/invite.c head/usr.bin/tip/tip/tip.h head/usr.bin/top/machine.c head/usr.bin/vgrind/extern.h head/usr.bin/vgrind/vfontedpr.c head/usr.bin/xlint/lint1/decl.c head/usr.bin/xlint/lint1/emit1.c head/usr.bin/xlint/lint1/func.c head/usr.bin/xlint/lint1/mem1.c head/usr.bin/xlint/lint2/chk.c head/usr.bin/xlint/lint2/read.c head/usr.bin/xlint/xlint/xlint.c head/usr.bin/yacc/NEW_FEATURES head/usr.bin/yacc/reader.c Modified: head/usr.bin/csup/fixups.c ============================================================================== --- head/usr.bin/csup/fixups.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/csup/fixups.c Fri Dec 30 11:02:40 2011 (r228992) @@ -38,7 +38,7 @@ /* * A synchronized queue to implement fixups. The updater thread adds * fixup requests to the queue with fixups_put() when a checksum - * mismatch error occured. It then calls fixups_close() when he's + * mismatch error occurred. It then calls fixups_close() when he's * done requesting fixups. The detailer thread gets the fixups with * fixups_get() and then send the requests to the server. * Modified: head/usr.bin/csup/mux.c ============================================================================== --- head/usr.bin/csup/mux.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/csup/mux.c Fri Dec 30 11:02:40 2011 (r228992) @@ -680,7 +680,7 @@ mux_init(struct mux *m) /* * Close all the channels, terminate the sender and receiver thread. - * This is an important function because it is used everytime we need + * This is an important function because it is used every time we need * to wake up all the worker threads to abort the program. * * This function accepts an error message that will be printed if the Modified: head/usr.bin/csup/rcsfile.c ============================================================================== --- head/usr.bin/csup/rcsfile.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/csup/rcsfile.c Fri Dec 30 11:02:40 2011 (r228992) @@ -1254,8 +1254,8 @@ rcsfile_insertsorteddelta(struct rcsfile /* * Insert a delta into the correct place in branch. A trunk branch will have * different ordering scheme and be sorted by revision number, but a normal - * branch will be sorted by date to maintain compability with branches that is - * "hand-hacked". + * branch will be sorted by date to maintain compatibility with branches that + * is "hand-hacked". */ static void rcsfile_insertdelta(struct branch *b, struct delta *d, int trunk) Modified: head/usr.bin/finger/finger.c ============================================================================== --- head/usr.bin/finger/finger.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/finger/finger.c Fri Dec 30 11:02:40 2011 (r228992) @@ -299,8 +299,8 @@ userlist(int argc, char **argv) goto net; /* - * Mark any arguments beginning with '/' as invalid so that we - * don't accidently confuse them with expansions from finger.conf + * Mark any arguments beginning with '/' as invalid so that we + * don't accidentally confuse them with expansions from finger.conf */ for (p = argv, ip = used; *p; ++p, ++ip) if (**p == '/') { Modified: head/usr.bin/fstat/fstat.c ============================================================================== --- head/usr.bin/fstat/fstat.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/fstat/fstat.c Fri Dec 30 11:02:40 2011 (r228992) @@ -150,7 +150,7 @@ do_fstat(int argc, char **argv) if (getfname(*argv)) checkfile = 1; } - if (!checkfile) /* file(s) specified, but none accessable */ + if (!checkfile) /* file(s) specified, but none accessible */ exit(1); } Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/indent/indent.c Fri Dec 30 11:02:40 2011 (r228992) @@ -326,7 +326,7 @@ main(int argc, char **argv) case lbrace: /* this is a brace that starts the compound * stmt */ - if (sc_end == 0) { /* ignore buffering if a comment wasnt + if (sc_end == 0) { /* ignore buffering if a comment wasn't * stored up */ ps.search_brace = false; goto check_type; @@ -384,7 +384,7 @@ main(int argc, char **argv) && e_code != s_code && e_code[-1] == '}')) force_nl = false; - if (sc_end == 0) { /* ignore buffering if comment wasnt + if (sc_end == 0) { /* ignore buffering if comment wasn't * saved up */ ps.search_brace = false; goto check_type; @@ -794,8 +794,8 @@ check_type: /* ? dec_ind = 0; */ } else { - ps.decl_on_line = false; /* we cant be in the middle of - * a declaration, so dont do + ps.decl_on_line = false; /* we can't be in the middle of + * a declaration, so don't do * special indentation of * comments */ if (blanklines_after_declarations_at_proctop Modified: head/usr.bin/indent/io.c ============================================================================== --- head/usr.bin/indent/io.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/indent/io.c Fri Dec 30 11:02:40 2011 (r228992) @@ -232,7 +232,7 @@ dump_line(void) target = ((target - 1) & ~7) + 9, com_st++; else target = 1; - if (cur_col > target) { /* if comment cant fit on this line, + if (cur_col > target) { /* if comment can't fit on this line, * put it on next line */ putc('\n', output); cur_col = 1; Modified: head/usr.bin/ipcs/ipc.c ============================================================================== --- head/usr.bin/ipcs/ipc.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/ipcs/ipc.c Fri Dec 30 11:02:40 2011 (r228992) @@ -24,7 +24,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * The split of ipcs.c into ipcs.c and ipc.c to accomodate the + * The split of ipcs.c into ipcs.c and ipc.c to accommodate the * changes in ipcrm.c was done by Edwin Groothuis */ Modified: head/usr.bin/ipcs/ipc.h ============================================================================== --- head/usr.bin/ipcs/ipc.h Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/ipcs/ipc.h Fri Dec 30 11:02:40 2011 (r228992) @@ -24,7 +24,7 @@ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * The split of ipcs.c into ipcs.c and ipc.c to accomodate the + * The split of ipcs.c into ipcs.c and ipc.c to accommodate the * changes in ipcrm.c was done by Edwin Groothuis * * $FreeBSD$ Modified: head/usr.bin/lex/NEWS ============================================================================== --- head/usr.bin/lex/NEWS Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/lex/NEWS Fri Dec 30 11:02:40 2011 (r228992) @@ -1,3 +1,5 @@ +$FreeBSD$ + Changes between release 2.5.4 (11Sep96) and release 2.5.3: - Fixed a bug introduced in 2.5.3 that blew it when a call @@ -944,7 +946,7 @@ Changes between 2.3 (full) release of 28 given. To specify an end-of-file action for just the initial state, use <>. - - -d debug output is now contigent on the global yy_flex_debug + - -d debug output is now contingent on the global yy_flex_debug being set to a non-zero value, which it is by default. - A new macro, YY_USER_INIT, is provided for the user to specify @@ -987,7 +989,7 @@ Changes between 2.3 (full) release of 28 - yy_switch_to_buffer() can be used in the yywrap() macro/routine. - flex scanners do not use stdio for their input, and hence when - writing an interactive scanner one must explictly call fflush() + writing an interactive scanner one must explicitly call fflush() after writing out a prompt. - flex scanner can be made reentrant (after a fashion) by using Modified: head/usr.bin/lex/flexdef.h ============================================================================== --- head/usr.bin/lex/flexdef.h Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/lex/flexdef.h Fri Dec 30 11:02:40 2011 (r228992) @@ -869,7 +869,7 @@ extern void mark_defs1 PROTO((void)); /* Mark the current position in the action array as the end of the prolog. */ extern void mark_prolog PROTO((void)); -/* Generate a data statment for a two-dimensional array. */ +/* Generate a data statement for a two-dimensional array. */ extern void mk2data PROTO((int)); extern void mkdata PROTO((int)); /* generate a data statement */ Modified: head/usr.bin/lex/tblcmp.c ============================================================================== --- head/usr.bin/lex/tblcmp.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/lex/tblcmp.c Fri Dec 30 11:02:40 2011 (r228992) @@ -510,7 +510,7 @@ void mkdeftbl() * (i.e., jam entries) into the table. It is assumed that by linking to * "JAMSTATE" they will be taken care of. In any case, entries in "state" * marking transitions to "SAME_TRANS" are treated as though they will be - * taken care of by whereever "deflink" points. "totaltrans" is the total + * taken care of by wherever "deflink" points. "totaltrans" is the total * number of transitions out of the state. If it is below a certain threshold, * the tables are searched for an interior spot that will accommodate the * state array. Modified: head/usr.bin/limits/limits.c ============================================================================== --- head/usr.bin/limits/limits.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/limits/limits.c Fri Dec 30 11:02:40 2011 (r228992) @@ -236,7 +236,7 @@ static struct { /* * One letter for each resource levels. - * NOTE: There is a dependancy on the corresponding + * NOTE: There is a dependency on the corresponding * letter index being equal to the resource number. * If sys/resource.h defines are changed, this needs * to be modified accordingly! Modified: head/usr.bin/locate/locate/locate.c ============================================================================== --- head/usr.bin/locate/locate/locate.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/locate/locate/locate.c Fri Dec 30 11:02:40 2011 (r228992) @@ -188,7 +188,7 @@ main(argc, argv) /* no (valid) database as argument */ if (dbv == NULL || *dbv == NULL) { - /* try to read database from enviroment */ + /* try to read database from environment */ if ((path_fcodes = getenv("LOCATE_PATH")) == NULL || *path_fcodes == '\0') /* use default database */ Modified: head/usr.bin/locate/locate/util.c ============================================================================== --- head/usr.bin/locate/locate/util.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/locate/locate/util.c Fri Dec 30 11:02:40 2011 (r228992) @@ -218,11 +218,11 @@ tolower_word(word) /* - * Read integer from mmap pointer. - * Essential a simple ``return *(int *)p'' but avoid sigbus + * Read integer from mmap pointer. + * Essential a simple ``return *(int *)p'' but avoid sigbus * for integer alignment (SunOS 4.x, 5.x). * - * Convert network byte order to host byte order if neccessary. + * Convert network byte order to host byte order if necessary. * So we can read on FreeBSD/i386 (little endian) a locate database * which was built on SunOS/sparc (big endian). */ @@ -254,7 +254,7 @@ getwm(p) /* * Read integer from stream. * - * Convert network byte order to host byte order if neccessary. + * Convert network byte order to host byte order if necessary. * So we can read on FreeBSD/i386 (little endian) a locate database * which was built on SunOS/sparc (big endian). */ Modified: head/usr.bin/login/login_fbtab.c ============================================================================== --- head/usr.bin/login/login_fbtab.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/login/login_fbtab.c Fri Dec 30 11:02:40 2011 (r228992) @@ -25,7 +25,7 @@ SunOS 4.1.x fbtab(5) and SunOS 5.x logindevperm(4) manual pages. The program first looks for /etc/fbtab. If that file cannot be opened it attempts to process /etc/logindevperm. - We expect entries with the folowing format: + We expect entries with the following format: Comments start with a # and extend to the end of the line. Modified: head/usr.bin/mail/head.c ============================================================================== --- head/usr.bin/mail/head.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/mail/head.c Fri Dec 30 11:02:40 2011 (r228992) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); /* * See if the passed line buffer is a mail header. * Return true if yes. Note the extreme pains to - * accomodate all funny formats. + * accommodate all funny formats. */ int ishead(char linebuf[]) Modified: head/usr.bin/mail/main.c ============================================================================== --- head/usr.bin/mail/main.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/mail/main.c Fri Dec 30 11:02:40 2011 (r228992) @@ -259,7 +259,7 @@ Usage: %s [-dEiInv] [-s subject] [-c cc- if (ef == NULL) ef = "%"; if (setfile(ef) <= 0) - /* Either an error has occured, or no mail */ + /* Either an error has occurted, or no mail */ exit(1); else exit(0); Modified: head/usr.bin/mail/util.c ============================================================================== --- head/usr.bin/mail/util.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/mail/util.c Fri Dec 30 11:02:40 2011 (r228992) @@ -550,7 +550,7 @@ newname: } /* - * Count the occurances of c in str + * Count the occurrances of c in str */ int charcount(char *str, int c) Modified: head/usr.bin/make/GNode.h ============================================================================== --- head/usr.bin/make/GNode.h Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/GNode.h Fri Dec 30 11:02:40 2011 (r228992) @@ -139,7 +139,7 @@ typedef struct GNode { UPTODATE, /* Was already up-to-date */ /* - * An error occured while it was being + * An error occurred while it was being * made (used only in compat mode) */ ERROR, Modified: head/usr.bin/make/arch.c ============================================================================== --- head/usr.bin/make/arch.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/arch.c Fri Dec 30 11:02:40 2011 (r228992) @@ -179,8 +179,8 @@ Boolean arch_fatal = TRUE; /** * ArchError - * An error happend while handling an archive. BSDmake traditionally - * ignored these errors. Now this is dependend on the global arch_fatal + * An error happened while handling an archive. BSDmake traditionally + * ignored these errors. Now this is dependent on the global arch_fatal * which, if true, makes these errors fatal and, if false, just emits an * error message. */ @@ -529,7 +529,7 @@ ArchArchiveOpen(const char *archive, con /* * Read the next header from the archive. The return value will be +1 if - * the header is read successfully, 0 on EOF and -1 if an error happend. + * the header is read successfully, 0 on EOF and -1 if an error happened. * On a successful return sname contains the truncated member name and * member the full name. hdr contains the member header. For the symbol table * names of length 0 are returned. The entry for the file name table is never @@ -830,7 +830,7 @@ ArchFindMember(const char *archive, cons * (3) the name is longer and the archive doesn't support long * names. * Because we don't know whether the archive supports long - * names or not we need to be carefull. + * names or not we need to be careful. */ if (member == NULL) { /* special case - symbol table */ @@ -942,7 +942,7 @@ ArchStatMember(const char *archive, cons ArchArchiveClose(arf); if (t < 0) { - /* error happend - throw away everything */ + /* error happened - throw away everything */ Hash_DeleteTable(&ar->members); free(ar->name); free(ar); Modified: head/usr.bin/make/buf.c ============================================================================== --- head/usr.bin/make/buf.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/buf.c Fri Dec 30 11:02:40 2011 (r228992) @@ -206,7 +206,7 @@ Buf_Destroy(Buffer *buf, Boolean freeDat /** * Replace the last byte in a buffer. If the buffer was empty - * intially, then a new byte will be added. + * initially, then a new byte will be added. */ void Buf_ReplaceLastByte(Buffer *bp, Byte byte) Modified: head/usr.bin/make/for.c ============================================================================== --- head/usr.bin/make/for.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/for.c Fri Dec 30 11:02:40 2011 (r228992) @@ -218,7 +218,7 @@ For_Eval(char *line) /*- *----------------------------------------------------------------------- * For_Run -- - * Run the for loop, immitating the actions of an include file + * Run the for loop, imitating the actions of an include file * * Results: * None. Modified: head/usr.bin/make/job.c ============================================================================== --- head/usr.bin/make/job.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/job.c Fri Dec 30 11:02:40 2011 (r228992) @@ -1897,7 +1897,7 @@ JobOutput(Job *job, char *cp, char *endp * this makes up a line, we print it tagged by the job's identifier, * as necessary. * If output has been collected in a temporary file, we open the - * file and read it line by line, transfering it to our own + * file and read it line by line, transferring it to our own * output channel until the file is empty. At which point we * remove the temporary file. * In both cases, however, we keep our figurative eye out for the Modified: head/usr.bin/make/main.c ============================================================================== --- head/usr.bin/make/main.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/main.c Fri Dec 30 11:02:40 2011 (r228992) @@ -267,13 +267,13 @@ ReadMakefile(const char p[]) * XXX The realpath stuff breaks relative includes * XXX in some cases. The problem likely is in * XXX parse.c where it does special things in - * XXX ParseDoInclude if the file is relateive + * XXX ParseDoInclude if the file is relative * XXX or absolute and not a system file. There * XXX it assumes that if the current file that's * XXX being included is absolute, that any files * XXX that it includes shouldn't do the -I path - * XXX stuff, which is inconsistant with historical - * XXX behavior. However, I can't pentrate the mists + * XXX stuff, which is inconsistent with historical + * XXX behavior. However, I can't penetrate the mists * XXX further, so I'm putting this workaround in * XXX here until such time as the underlying bug * XXX can be fixed. @@ -675,7 +675,7 @@ chdir_verify_path(const char *path, char * prevent a forkbomb from happening, in a dumb and mechanical way. * * Side Effects: - * Creates or modifies enviornment variable MKLVL_ENVVAR via setenv(). + * Creates or modifies environment variable MKLVL_ENVVAR via setenv(). */ static void check_make_level(void) @@ -954,7 +954,7 @@ main(int argc, char **argv) } /* - * Set machine_cpu to the minumum supported CPU revision based + * Set machine_cpu to the minimum supported CPU revision based * on the target architecture, if not already set. */ if ((machine_cpu = getenv("MACHINE_CPU")) == NULL) { @@ -1047,7 +1047,7 @@ main(int argc, char **argv) * * Once things are initted, * have to add the original directory to the search path, - * and modify the paths for the Makefiles apropriately. The + * and modify the paths for the Makefiles appropriately. The * current directory is also placed as a variable for make scripts. */ if (!(pathp = getenv("MAKEOBJDIRPREFIX"))) { Modified: head/usr.bin/make/str.c ============================================================================== --- head/usr.bin/make/str.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/str.c Fri Dec 30 11:02:40 2011 (r228992) @@ -50,10 +50,10 @@ __FBSDID("$FreeBSD$"); /** * Initialize the argument array object. The array is initially - * eight positions, and will be expaned as neccessary. The first + * eight positions, and will be expanded as necessary. The first * position is set to NULL since everything ignores it. We allocate * (size + 1) since we need space for the terminating NULL. The - * buffer is set to NULL, since no common buffer is alloated yet. + * buffer is set to NULL, since no common buffer is allocated yet. */ void ArgArray_Init(ArgArray *aa) Modified: head/usr.bin/make/var.c ============================================================================== --- head/usr.bin/make/var.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/make/var.c Fri Dec 30 11:02:40 2011 (r228992) @@ -842,7 +842,7 @@ VarLocal(const char name[]) } /** - * Find the given variable in the given context and the enviornment. + * Find the given variable in the given context and the environment. * * Results: * A pointer to the structure describing the desired variable or Modified: head/usr.bin/man/man.sh ============================================================================== --- head/usr.bin/man/man.sh Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/man/man.sh Fri Dec 30 11:02:40 2011 (r228992) @@ -369,7 +369,7 @@ man_display_page() { while getopts 'egprtv' preproc_arg; do case "${preproc_arg}" in e) pipeline="$pipeline | $EQN" ;; - g) ;; # Ignore for compatability. + g) ;; # Ignore for compatibility. p) pipeline="$pipeline | $PIC" ;; r) pipeline="$pipeline | $REFER" ;; t) pipeline="$pipeline | $TBL" ;; Modified: head/usr.bin/ncplogin/ncplogin.c ============================================================================== --- head/usr.bin/ncplogin/ncplogin.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/ncplogin/ncplogin.c Fri Dec 30 11:02:40 2011 (r228992) @@ -188,8 +188,8 @@ main(int argc, char *argv[]) { error = 0; } while(0); if (error) - errx(EX_DATAERR, - "an error occured while parsing '%s'", + errx(EX_DATAERR, + "an error occurred while parsing '%s'", argv[argc - 1]); } Modified: head/usr.bin/netstat/ipx.c ============================================================================== --- head/usr.bin/netstat/ipx.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/netstat/ipx.c Fri Dec 30 11:02:40 2011 (r228992) @@ -201,7 +201,7 @@ spx_stats(u_long off, const char *name, ANYl(spxstat.spxs_sndurg, "packet", " sent with URG only"); ANYl(spxstat.spxs_sndwinup, "window update-only packet", " sent"); ANYl(spxstat.spxs_sndctrl, "control (SYN|FIN|RST) packet", " sent"); - ANYl(spxstat.spxs_sndvoid, "request", " to send a non-existant packet"); + ANYl(spxstat.spxs_sndvoid, "request", " to send a non-existent packet"); ANYl(spxstat.spxs_rcvtotal, "total packet", " received"); ANYl(spxstat.spxs_rcvpack, "packet", " received in sequence"); ANYl(spxstat.spxs_rcvbyte, "byte", " received in sequence"); Modified: head/usr.bin/pr/pr.c ============================================================================== --- head/usr.bin/pr/pr.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/pr/pr.c Fri Dec 30 11:02:40 2011 (r228992) @@ -822,7 +822,7 @@ mulfile(int argc, char *argv[]) * do not know how many columns yet. The number of operands provide an * upper bound on the number of columns. We use the number of files * we can open successfully to set the number of columns. The operation - * of the merge operation (-m) in relation to unsuccesful file opens + * of the merge operation (-m) in relation to unsuccessful file opens * is unspecified by posix. */ j = 0; @@ -841,7 +841,7 @@ mulfile(int argc, char *argv[]) return(1); /* - * calculate page boundries based on open file count + * calculate page boundaries based on open file count */ clcnt = j; if (nmwd) { @@ -987,7 +987,7 @@ mulfile(int argc, char *argv[]) * inf: file * buf: buffer * lim: buffer length - * cps: column positon 1st char in buffer (large line support) + * cps: column position 1st char in buffer (large line support) * trnc: throw away data more than lim up to \n * mor: set if more data in line (not truncated) */ Modified: head/usr.bin/rpcgen/rpc_svcout.c ============================================================================== --- head/usr.bin/rpcgen/rpc_svcout.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/rpcgen/rpc_svcout.c Fri Dec 30 11:02:40 2011 (r228992) @@ -325,7 +325,7 @@ write_programs(const char *storage) /* * write out definition of internal function (e.g. _printmsg_1(...)) - * which calls server's defintion of actual function (e.g. printmsg_1(...)). + * which calls server's definition of actual function (e.g. printmsg_1(...)). * Unpacks single user argument of printmsg_1 to call-by-value format * expected by printmsg_1. */ Modified: head/usr.bin/rpcinfo/rpcinfo.c ============================================================================== --- head/usr.bin/rpcinfo/rpcinfo.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/rpcinfo/rpcinfo.c Fri Dec 30 11:02:40 2011 (r228992) @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); */ /* - * We are for now defining PORTMAP here. It doesnt even compile + * We are for now defining PORTMAP here. It doesn't even compile * unless it is defined. */ #ifndef PORTMAP Modified: head/usr.bin/systat/icmp6.c ============================================================================== --- head/usr.bin/systat/icmp6.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/systat/icmp6.c Fri Dec 30 11:02:40 2011 (r228992) @@ -75,7 +75,7 @@ static struct icmp6stat icmp6stat, inits 12999999999 time-to-live exceeded 999999999 time-to-line exceeded 13999999999 parameter problem 999999999 parameter problem 14999999999 neighbor solicitation 999999999 neighbor solicitation -15999999999 neighbor advertisment 999999999 neighbor advertisment +15999999999 neighbor advertisement 999999999 neighbor advertisement 16999999999 router advertisement 999999999 router solicitation 17 18 @@ -121,7 +121,7 @@ labelicmp6(void) B(12, "time-to-live exceeded"); B(13, "parameter problem"); B(14, "neighbor solicitation"); - B(15, "neighbor advertisment"); + B(15, "neighbor advertisement"); L(16, "router advertisement"); R(16, "router solicitation"); #undef L #undef R Modified: head/usr.bin/talk/ctl_transact.c ============================================================================== --- head/usr.bin/talk/ctl_transact.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/talk/ctl_transact.c Fri Dec 30 11:02:40 2011 (r228992) @@ -46,7 +46,7 @@ static const char sccsid[] = "@(#)ctl_tr /* * SOCKDGRAM is unreliable, so we must repeat messages if we have - * not recieved an acknowledgement within a reasonable amount + * not received an acknowledgement within a reasonable amount * of time */ void Modified: head/usr.bin/talk/invite.c ============================================================================== --- head/usr.bin/talk/invite.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/talk/invite.c Fri Dec 30 11:02:40 2011 (r228992) @@ -87,7 +87,7 @@ invite_remote(void) announce_invite(); /* * Shut off the automatic messages for a while, - * so we can use the interupt timer to resend the invitation + * so we can use the interrupt timer to resend the invitation */ end_msgs(); setitimer(ITIMER_REAL, &itimer, (struct itimerval *)0); @@ -117,7 +117,7 @@ invite_remote(void) } /* - * Routine called on interupt to re-invite the callee + * Routine called on interrupt to re-invite the callee */ /* ARGSUSED */ void Modified: head/usr.bin/tip/tip/tip.h ============================================================================== --- head/usr.bin/tip/tip/tip.h Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/tip/tip/tip.h Fri Dec 30 11:02:40 2011 (r228992) @@ -99,7 +99,7 @@ typedef char *v_name; /* whose name is it */ char v_type; /* for interpreting set's */ char v_access; /* protection of touchy ones */ - char *v_abrev; /* possible abreviation */ + char *v_abrev; /* possible abbreviation */ char *v_value; /* casted to a union later */ } value_t; @@ -162,7 +162,7 @@ typedef /* * Escape command table definitions -- * lookup in this table is performed when ``escapec'' is recognized - * at the begining of a line (as defined by the eolmarks variable). + * at the beginning of a line (as defined by the eolmarks variable). */ typedef Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/top/machine.c Fri Dec 30 11:02:40 2011 (r228992) @@ -1404,7 +1404,7 @@ compare_ivcsw(void *arg1, void *arg2) /* * proc_owner(pid) - returns the uid that owns process "pid", or -1 if * the process does not exist. - * It is EXTREMLY IMPORTANT that this function work correctly. + * It is EXTREMELY IMPORTANT that this function work correctly. * If top runs setuid root (as in SVR4), then this function * is the only thing that stands in the way of a serious * security problem. It validates requests for the "kill" Modified: head/usr.bin/vgrind/extern.h ============================================================================== --- head/usr.bin/vgrind/extern.h Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/vgrind/extern.h Fri Dec 30 11:02:40 2011 (r228992) @@ -37,7 +37,7 @@ extern boolean _escaped; /* extern char *s_start; /* start of the current string */ extern char *l_acmbeg; /* string introducing a comment */ extern char *l_acmend; /* string ending a comment */ -extern char *l_blkbeg; /* string begining of a block */ +extern char *l_blkbeg; /* string beginning of a block */ extern char *l_blkend; /* string ending a block */ extern char *l_chrbeg; /* delimiter for character constant */ extern char *l_chrend; /* delimiter for character constant */ Modified: head/usr.bin/vgrind/vfontedpr.c ============================================================================== --- head/usr.bin/vgrind/vfontedpr.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/vgrind/vfontedpr.c Fri Dec 30 11:02:40 2011 (r228992) @@ -110,7 +110,7 @@ static char pstack[PSMAX][PNAMELEN+1]; / char *l_acmbeg; /* string introducing a comment */ char *l_acmend; /* string ending a comment */ -char *l_blkbeg; /* string begining of a block */ +char *l_blkbeg; /* string beginning of a block */ char *l_blkend; /* string ending a block */ char *l_chrbeg; /* delimiter for character constant */ char *l_chrend; /* delimiter for character constant */ Modified: head/usr.bin/xlint/lint1/decl.c ============================================================================== --- head/usr.bin/xlint/lint1/decl.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/xlint/lint1/decl.c Fri Dec 30 11:02:40 2011 (r228992) @@ -308,7 +308,7 @@ addtype(type_t *tp) /* now it can be only a combination of arithmetic types and void */ if (t == SIGNED || t == UNSIGN) { - /* remeber specifiers "signed" and "unsigned" in dcs->d_smod */ + /* remember specifiers "signed" and "unsigned" in dcs->d_smod */ if (dcs->d_smod != NOTSPEC) /* * more than one "signed" and/or "unsigned"; print @@ -545,7 +545,7 @@ popdecl(void) /* * casts and sizeof * Append all symbols declared in the abstract declaration - * to the list of symbols declared in the surounding decl. + * to the list of symbols declared in the surrounding decl. * or block. * XXX I'm not sure whether they should be removed from the * symbol table now or later. @@ -2580,8 +2580,8 @@ ledecl(sym_t *dsym) } /* - * Print an error or a warning if the symbol cant be initialized due - * to type/storage class. Returnvalue is 1 if an error has been + * Print an error or a warning if the symbol can't be initialized due + * to type/storage class. Return value is 1 if an error has been * detected. */ static int @@ -2613,7 +2613,7 @@ chkinit(sym_t *sym) } /* - * Create a symbole for an abstract declaration. + * Create a symbol for an abstract declaration. */ sym_t * aname(void) @@ -2895,7 +2895,7 @@ chktusg(sym_t *sym) if (!incompl(sym->s_type)) return; - /* complain alwasy about incomplet tags declared inside blocks */ + /* complain always about incomplete tags declared inside blocks */ if (!zflag || dcs->d_ctx != EXTERN) return; Modified: head/usr.bin/xlint/lint1/emit1.c ============================================================================== --- head/usr.bin/xlint/lint1/emit1.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/xlint/lint1/emit1.c Fri Dec 30 11:02:40 2011 (r228992) @@ -81,7 +81,7 @@ static void outfstrg(strg_t *); * 2 n typename only type name * * spaces are only for better readability - * additionaly it is possible to prepend the characters 'c' (for const) + * additionally it is possible to prepend the characters 'c' (for const) * and 'v' (for volatile) */ void Modified: head/usr.bin/xlint/lint1/func.c ============================================================================== --- head/usr.bin/xlint/lint1/func.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/xlint/lint1/func.c Fri Dec 30 11:02:40 2011 (r228992) @@ -59,15 +59,15 @@ int reached = 1; int rchflg; /* - * In conjunction with reached ontrols printing of "fallthrough on ..." + * In conjunction with reached controls printing of "fallthrough on ..." * warnings. * Reset by each statement and set by FALLTHROUGH, switch (switch1()) * and case (label()). * * Control statements if, for, while and switch do not reset ftflg because - * this must be done by the controled statement. At least for if this is + * this must be done by the controlled statement. At least for if this is * important because ** FALLTHROUGH ** after "if (expr) stmnt" is evaluated - * befor the following token, wich causes reduction of above, is read. + * before the following token, which causes reduction of above, is read. * This means that ** FALLTHROUGH ** after "if ..." would always be ignored. */ int ftflg; @@ -107,13 +107,13 @@ pos_t prflpos; pos_t scflpos; /* - * Are both plibflg and llibflg set, prototypes are writen as function + * Are both plibflg and llibflg set, prototypes are written as function * definitions to the output file. */ int plibflg; /* - * Nonzero means that no warnings about constands in conditional + * Nonzero means that no warnings about constants in conditional * context are printed. */ int ccflg; @@ -323,7 +323,7 @@ funcdef(sym_t *fsym) if (fsym->s_osdef && !fsym->s_type->t_proto) { if (sflag && hflag && strcmp(fsym->s_name, "main") != 0) - /* function definition is not a prototyp */ + /* function definition is not a prototype */ warning(286); } @@ -353,7 +353,7 @@ funcend(void) } /* - * This warning is printed only if the return value was implizitly + * This warning is printed only if the return value was implicitly * declared to be int. Otherwise the wrong return statement * has already printed a warning. */ Modified: head/usr.bin/xlint/lint1/mem1.c ============================================================================== --- head/usr.bin/xlint/lint1/mem1.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/xlint/lint1/mem1.c Fri Dec 30 11:02:40 2011 (r228992) @@ -133,7 +133,7 @@ getfnid(const char *s) /* * Memory for declarations and other things which must be available * until the end of a block (or the end of the translation unit) - * are assoziated with the level (mblklev) of the block (or wiht 0). + * are associated with the level (mblklev) of the block (or with 0). * Because these memory is allocated in large blocks associated with * a given level it can be freed easily at the end of a block. */ Modified: head/usr.bin/xlint/lint2/chk.c ============================================================================== --- head/usr.bin/xlint/lint2/chk.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/xlint/lint2/chk.c Fri Dec 30 11:02:40 2011 (r228992) @@ -447,11 +447,11 @@ chkau(hte_t *hte, int n, sym_t *def, sym char *pos1; /* - * If a function definition is available (def != NULL), we compair the + * If a function definition is available (def != NULL), we compare the * function call (call) with the definition. Otherwise, if a function * definition is available and it is not an old style definition - * (decl != NULL && TP(decl->s_type)->t_proto), we compair the call - * with this declaration. Otherwise we compair it with the first + * (decl != NULL && TP(decl->s_type)->t_proto), we compare the call + * with this declaration. Otherwise we compare it with the first * call we have found (call1). */ @@ -474,7 +474,7 @@ chkau(hte_t *hte, int n, sym_t *def, sym * of an argument does not match exactly the expected type. The * result are lots of warnings which are really not necessary. * We print a warning only if - * (0) at least one type is not an interger type and types differ + * (0) at least one type is not an integer type and types differ * (1) hflag is set and types differ * (2) types differ, except in signedness * If the argument is an integer constant whose msb is not set, @@ -482,7 +482,7 @@ chkau(hte_t *hte, int n, sym_t *def, sym * int). This is with and without hflag. * If the argument is an integer constant with value 0 and the * expected argument is of type pointer and the width of the - * interger constant is the same as the width of the pointer, + * integer constant is the same as the width of the pointer, * no warning is printed. */ t1 = arg1->t_tspec; @@ -490,7 +490,7 @@ chkau(hte_t *hte, int n, sym_t *def, sym if (isityp(t1) && isityp(t2) && !arg1->t_isenum && !arg2->t_isenum) { if (promote) { /* - * XXX Here is a problem: Althrough it is possible to + * XXX Here is a problem: Although it is possible to * pass an int where a char/short it expected, there * may be loss in significant digits. We should first * check for const arguments if they can be converted Modified: head/usr.bin/xlint/lint2/read.c ============================================================================== --- head/usr.bin/xlint/lint2/read.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/xlint/lint2/read.c Fri Dec 30 11:02:40 2011 (r228992) @@ -506,7 +506,7 @@ decldef(pos_t *posp, const char *cp) } /* - * Read an u-record (emited by lint1 if a symbol was used). + * Read an u-record (emitted by lint1 if a symbol was used). */ static void usedsym(pos_t *posp, const char *cp) Modified: head/usr.bin/xlint/xlint/xlint.c ============================================================================== --- head/usr.bin/xlint/xlint/xlint.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/xlint/xlint/xlint.c Fri Dec 30 11:02:40 2011 (r228992) @@ -80,7 +80,7 @@ static char *p2out; /* flags always passed to cc(1) */ static char **cflags; -/* flags for cc(1), controled by sflag/tflag */ +/* flags for cc(1), controlled by sflag/tflag */ static char **lcflags; /* flags for lint1 */ Modified: head/usr.bin/yacc/NEW_FEATURES ============================================================================== --- head/usr.bin/yacc/NEW_FEATURES Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/yacc/NEW_FEATURES Fri Dec 30 11:02:40 2011 (r228992) @@ -1,3 +1,5 @@ +$FreeBSD$ + The -r option has been implemented. The -r option tells Yacc to put the read-only tables in y.tab.c and the code and variables in y.code.c. Keith Bostic asked for this option so that :yyfix could be @@ -35,7 +37,7 @@ is %ident string -where string is a sequence of characters begining with a double quote +where string is a sequence of characters beginning with a double quote and ending with either a double quote or the next end-of-line, whichever comes first. The declaration will cause a #ident directive to be written near the start of the output file. Modified: head/usr.bin/yacc/reader.c ============================================================================== --- head/usr.bin/yacc/reader.c Fri Dec 30 10:59:15 2011 (r228991) +++ head/usr.bin/yacc/reader.c Fri Dec 30 11:02:40 2011 (r228992) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); /* The line size must be a positive integer. One hundred was chosen */ /* because few lines in Yacc input grammars exceed 100 characters. */ /* Note that if a line exceeds LINESIZE characters, the line buffer */ -/* will be expanded to accomodate it. */ +/* will be expanded to accommodate it. */ #define LINESIZE 100 From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 11:11:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CF371065670; Fri, 30 Dec 2011 11:11:55 +0000 (UTC) (envelope-from uqs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 65AF18FC16; Fri, 30 Dec 2011 11:11:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUBBtwd011118; Fri, 30 Dec 2011 11:11:55 GMT (envelope-from uqs@svn.freebsd.org) Received: (from uqs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUBBt6Z011114; Fri, 30 Dec 2011 11:11:55 GMT (envelope-from uqs@svn.freebsd.org) Message-Id: <201112301111.pBUBBt6Z011114@svn.freebsd.org> From: Ulrich Spoerlein Date: Fri, 30 Dec 2011 11:11:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228993 - in head/share: doc/IPv6 termcap X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 11:11:55 -0000 Author: uqs Date: Fri Dec 30 11:11:54 2011 New Revision: 228993 URL: http://svn.freebsd.org/changeset/base/228993 Log: Spelling fixes for share/ Modified: head/share/doc/IPv6/IMPLEMENTATION head/share/termcap/termcap.src Modified: head/share/doc/IPv6/IMPLEMENTATION ============================================================================== --- head/share/doc/IPv6/IMPLEMENTATION Fri Dec 30 11:02:40 2011 (r228992) +++ head/share/doc/IPv6/IMPLEMENTATION Fri Dec 30 11:11:54 2011 (r228993) @@ -1404,7 +1404,7 @@ both definitions. As an userland progra dealing with it is to: (1) ensure ss_family and/or ss_len are available on the platform, by using GNU autoconf, -(2) have -Dss_family=__ss_family to unify all occurences (including header +(2) have -Dss_family=__ss_family to unify all occurrences (including header file) into __ss_family, or (3) never touch __ss_family. cast to sockaddr * and use sa_family like: struct sockaddr_storage ss; @@ -1414,7 +1414,7 @@ dealing with it is to: Some of IPv6 transition technologies embed IPv4 address into IPv6 address. These specifications themselves are fine, however, there can be certain -set of attacks enabled by these specifications. Recent speicifcation +set of attacks enabled by these specifications. Recent specification documents covers up those issues, however, there are already-published RFCs that does not have protection against those (like using source address of ::ffff:127.0.0.1 to bypass "reject packet from remote" filter). @@ -1441,7 +1441,7 @@ compatible is very rare. You should tak If we see IPv6 packets with IPv4 mapped address (::ffff:0.0.0.0/96) in the header in dual-stack environment (not in SIIT environment), they indicate -that someone is trying to inpersonate IPv4 peer. The packet should be dropped. +that someone is trying to impersonate IPv4 peer. The packet should be dropped. IPv6 specifications do not talk very much about IPv6 unspecified address (::) in the IPv6 source address field. Clarification is in progress. @@ -1456,10 +1456,10 @@ Here are couple of comments: - The following examples are seemingly illegal. It seems that there's general consensus among ipngwg for those. (1) Mobile IPv6 home address option, (2) offlink packets (so routers should not forward them). - KAME implmements (2) already. + KAME implements (2) already. KAME code is carefully written to avoid such incidents. More specifically, -KAME kernel will reject packets with certain source/dstination address in IPv6 +KAME kernel will reject packets with certain source/destination address in IPv6 base header, or IPv6 routing header. Also, KAME default configuration file is written carefully, to avoid those attacks. @@ -1552,7 +1552,7 @@ KAME implementation treats them as follo 1.17 DNS resolver KAME ships with modified DNS resolver, in libinet6.a. -libinet6.a has a comple of extensions against libc DNS resolver: +libinet6.a has a couple of extensions against libc DNS resolver: - Can take "options insecure1" and "options insecure2" in /etc/resolv.conf, which toggles RES_INSECURE[12] option flag bit. - EDNS0 receive buffer size notification support. It can be enabled by @@ -1870,7 +1870,7 @@ Tunnel mode works basically fine, but co - Path MTU discovery does not work across IPv6 IPsec tunnel gateway due to insufficient code. -AH specificaton does not talk much about "multiple AH on a packet" case. +AH specification does not talk much about "multiple AH on a packet" case. We incrementally compute AH checksum, from inside to outside. Also, we treat inner AH to be immutable. For example, if we are to create the following packet: @@ -1890,8 +1890,8 @@ to randomly pad packets shorter than N b or equal to N. Note that N does not include ESP authentication data length. Also note that the random padding is not included in TCP segment size computation. Negative value will turn off the functionality. -Recommeded value for N is like 128, or 256. If you use a too big number -as N, you may experience inefficiency due to fragmented packtes. +Recommended value for N is like 128, or 256. If you use a too big number +as N, you may experience inefficiency due to fragmented packets. 4.4 IPComp handling @@ -2097,7 +2097,7 @@ RFC2401 defines IPsec tunnel mode, withi defines tunnel mode packet encapsulation/decapsulation on its own, and does not refer other tunnelling specifications. Since RFC2401 advocates filter-based SPD database matches, it would be natural for us to implement -IPsec IPsec tunnel mode as filters - not as pseudo interfaces. +IPsec tunnel mode as filters - not as pseudo interfaces. There are some people who are trying to separate IPsec "tunnel mode" from the IPsec itself. They would like to implement IPsec transport mode only, @@ -2110,7 +2110,7 @@ interpretation. The KAME stack implements can be configured in two ways. You may need to recompile your kernel to switch the behavior. -- RFC2401 IPsec tunnel mode appraoch (4.8.1) +- RFC2401 IPsec tunnel mode approach (4.8.1) - draft-touch-ipsec-vpn approach (4.8.2) Works in all kernel configuration, but racoon(8) may not interoperate. @@ -2226,7 +2226,7 @@ ALTQ occupies single character device nu allocated. For OpenBSD and NetBSD, we use the number which is not currently allocated (will eventually get an official number). The character device is enabled for i386 architecture only. To enable and -compile ALTQ-ready kernel for other archititectures, take the following steps: +compile ALTQ-ready kernel for other architectures, take the following steps: - assume that your architecture is FOOBAA. - modify sys/arch/FOOBAA/FOOBAA/conf.c (or somewhere that defines cdevsw), to include a line for ALTQ. look at sys/arch/i386/i386/conf.c for @@ -2243,7 +2243,7 @@ compile ALTQ-ready kernel for other arch 6.1 KAME node as correspondent node Default installation recognizes home address option (in destination -options header). No sub-options are supported. interaction with +options header). No sub-options are supported. Interaction with IPsec, and/or 2292bis API, needs further study. 6.2 KAME node as home agent/mobile node @@ -2262,7 +2262,7 @@ are other implementations available: The KAME developers basically do not make a bother about coding style. However, there is still some agreement on the style, in order -to make the distributed develoment smooth. +to make the distributed development smooth. - follow *BSD KNF where possible. note: there are multiple KNF standards. - the tab character should be 8 columns wide (tabstops are at 8, 16, 24, ... @@ -2291,13 +2291,13 @@ to make the distributed develoment smoot where "(dollar)" is the dollar character ($), and around "$" are tabs. (this is for C. For other language, you should use its own comment line.) - Once commited to the CVS repository, this line will contain its + Once committed to the CVS repository, this line will contain its version number (see, for example, at the top of this file). This would make it easy to report a bug. - when creating a new file with the WIDE copyright, tap "make copyright.c" at the top-level, and use copyright.c as a template. KAME RCS tag will be included automatically. -- when editting a third-party package, keep its own coding style as +- when editing a third-party package, keep its own coding style as much as possible, even if the style does not follow the items above. - it is recommended to always wrap an expression containing bitwise operators by parentheses, especially when the expression is @@ -2384,7 +2384,7 @@ is free of IPR infringement, you MUST ch KAME into your product (or whatever): READ CAREFULLY: Several countries have legal enforcement for export/import/use of cryptographic software. Check it before playing - with the kit. We do not intend to be your legalease clearing house + with the kit. We do not intend to be your legalese clearing house (NO WARRANTY). If you intend to include KAME stack into your product, you'll need to check if the licenses on each file fit your situations, and/or possible intellectual property right issues. Modified: head/share/termcap/termcap.src ============================================================================== --- head/share/termcap/termcap.src Fri Dec 30 11:02:40 2011 (r228992) +++ head/share/termcap/termcap.src Fri Dec 30 11:11:54 2011 (r228993) @@ -4409,11 +4409,11 @@ yterm10|yterm 1.0 UCB ascii.kbd:\ :ku=^K:kd=^J:kl=^H:kr=^L:kh=^^:ma=^Hh\012j^Kk^Ll^^H:\ :k0=\E0:k1=\E1:k2=\E2:k3=\E3:k4=\E4:k5=\E5:k6=\E6:k7=\E7:k8=\E8:k9=\E9:\ :vs=^O\E[7i\E[m\E[?7h\E[?3g\r\EHY0 \EH \EH \EH \EH \EH \EH \EH \EH \EH\r: -# YTERM varient version 1.1. (gts 9-13-84) Version 1.1 has :xn:. +# YTERM variant version 1.1. (gts 9-13-84) Version 1.1 has :xn:. yterm11|yterm 1.1 UCB ascii.kbd:\ :xn:is=^O\E[7i\E[m\E[?7h\E[?3g\r\EHY1 for \EHYTERM 1.\EH1 with A\EHSCII.KBD\EH 9-13-84\EH \EH \EH \EH \EH\n:\ :tc=yterm10: -# YTERM 1.0 varient no autowrap or tabs +# YTERM 1.0 variant no autowrap or tabs # X does not remember autowrap or tabs when T is deleted and restarted. yterm10nat|yterm 1.0 UCB ascii.kbd no autowrap or tabs:\ :am@:pt@:vs=^O\E[7i\E[m\E[?7l\E[?3g\rY2\r:\ @@ -4475,7 +4475,7 @@ h19k|h19kermit|heathkit emulation provid :am@:ta@:pt@:xt:da:db:tc=h19-u: # Amiga termcap by Kent Polk, kent@swrinde.nde.swri.edu (30 May 90) # Added a few more entries, converted caret-type control sequence (^x) entries -# to '\0xx' entries since a couple of people mentioned loosing '^x' sequences. +# to '\0xx' entries since a couple of people mentioned losing '^x' sequences. # # :as, :ae Support for alternate character sets. # :ve=\E[\040p:vi=\E[\060\040p cursor visible/invisible. From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 13:17:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78266106566C; Fri, 30 Dec 2011 13:17:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61AD08FC18; Fri, 30 Dec 2011 13:17:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUDH0Z5014876; Fri, 30 Dec 2011 13:17:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUDH0Bc014870; Fri, 30 Dec 2011 13:17:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112301317.pBUDH0Bc014870@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 13:17:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228994 - in head/sys: conf modules/ipfilter modules/nxge modules/xfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 13:17:00 -0000 Author: dim Date: Fri Dec 30 13:16:59 2011 New Revision: 228994 URL: http://svn.freebsd.org/changeset/base/228994 Log: Disable several instances instances of clang's -Wself-assign warning. All of these are harmless, and are in fact used to shut up warnings from lint. While here, remove -Wno-missing-prototypes from the xfs module Makefile, as I could not reproduce those warnings either with gcc or clang. MFC after: 1 week Modified: head/sys/conf/files head/sys/conf/kern.mk head/sys/modules/ipfilter/Makefile head/sys/modules/nxge/Makefile head/sys/modules/xfs/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Fri Dec 30 11:11:54 2011 (r228993) +++ head/sys/conf/files Fri Dec 30 13:16:59 2011 (r228994) @@ -304,7 +304,7 @@ contrib/dev/acpica/utilities/utxface.c contrib/dev/acpica/utilities/utxferror.c optional acpi #contrib/dev/acpica/utilities/utxfmutex.c optional acpi contrib/ipfilter/netinet/fil.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_auth.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_fil_freebsd.c optional ipfilter inet \ @@ -316,11 +316,11 @@ contrib/ipfilter/netinet/ip_log.c option contrib/ipfilter/netinet/ip_nat.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_proxy.c optional ipfilter inet \ - compile-with "${NORMAL_C} -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_state.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_lookup.c optional ipfilter inet \ - compile-with "${NORMAL_C} -Wno-error -I$S/contrib/ipfilter" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -Wno-error -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_pool.c optional ipfilter inet \ compile-with "${NORMAL_C} -I$S/contrib/ipfilter" contrib/ipfilter/netinet/ip_htable.c optional ipfilter inet \ @@ -1522,17 +1522,25 @@ dev/ncv/ncr53c500.c optional ncv dev/ncv/ncr53c500_pccard.c optional ncv pccard dev/netmap/netmap.c optional netmap dev/nge/if_nge.c optional nge -dev/nxge/if_nxge.c optional nxge -dev/nxge/xgehal/xgehal-device.c optional nxge +dev/nxge/if_nxge.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-device.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-mm.c optional nxge dev/nxge/xgehal/xge-queue.c optional nxge -dev/nxge/xgehal/xgehal-driver.c optional nxge -dev/nxge/xgehal/xgehal-ring.c optional nxge -dev/nxge/xgehal/xgehal-channel.c optional nxge -dev/nxge/xgehal/xgehal-fifo.c optional nxge -dev/nxge/xgehal/xgehal-stats.c optional nxge +dev/nxge/xgehal/xgehal-driver.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-ring.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-channel.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-fifo.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" +dev/nxge/xgehal/xgehal-stats.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nxge/xgehal/xgehal-config.c optional nxge -dev/nxge/xgehal/xgehal-mgmt.c optional nxge +dev/nxge/xgehal/xgehal-mgmt.c optional nxge \ + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN}" dev/nmdm/nmdm.c optional nmdm dev/nsp/nsp.c optional nsp dev/nsp/nsp_pccard.c optional nsp pccard @@ -3478,7 +3486,7 @@ gnu/fs/xfs/FreeBSD/xfs_sysctl.c optional gnu/fs/xfs/FreeBSD/xfs_fs_subr.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/xfs_ioctl.c optional xfs \ - compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" + compile-with "${NORMAL_C} ${NO_WSELF_ASSIGN} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/debug.c optional xfs \ compile-with "${NORMAL_C} -I$S/gnu/fs/xfs/FreeBSD -I$S/gnu/fs/xfs/FreeBSD/support -I$S/gnu/fs/xfs" gnu/fs/xfs/FreeBSD/support/ktrace.c optional xfs \ Modified: head/sys/conf/kern.mk ============================================================================== --- head/sys/conf/kern.mk Fri Dec 30 11:11:54 2011 (r228993) +++ head/sys/conf/kern.mk Fri Dec 30 13:16:59 2011 (r228994) @@ -21,6 +21,7 @@ NO_WARRAY_BOUNDS= -Wno-array-bounds NO_WSHIFT_COUNT_NEGATIVE= -Wno-shift-count-negative NO_WSHIFT_COUNT_OVERFLOW= -Wno-shift-count-overflow NO_WUNUSED_VALUE= -Wno-unused-value +NO_WSELF_ASSIGN= -Wno-self-assign # Several other warnings which might be useful in some cases, but not severe # enough to error out the whole kernel build. Display them anyway, so there is # some incentive to fix them eventually. Modified: head/sys/modules/ipfilter/Makefile ============================================================================== --- head/sys/modules/ipfilter/Makefile Fri Dec 30 11:11:54 2011 (r228993) +++ head/sys/modules/ipfilter/Makefile Fri Dec 30 13:16:59 2011 (r228994) @@ -26,3 +26,8 @@ CFLAGS+= -DIPFILTER=1 -DIPFILTER_LKM -DI # .include + +CWARNFLAGS.fil.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.ip_proxy.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.ip_lookup.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/modules/nxge/Makefile ============================================================================== --- head/sys/modules/nxge/Makefile Fri Dec 30 11:11:54 2011 (r228993) +++ head/sys/modules/nxge/Makefile Fri Dec 30 13:16:59 2011 (r228994) @@ -39,3 +39,13 @@ SRCS+= xgehal-mgmt.c SRCS+= device_if.h bus_if.h pci_if.h .include + +CWARNFLAGS.if_nxge.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-device.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-driver.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-ring.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-channel.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-fifo.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-stats.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS.xgehal-mgmt.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} Modified: head/sys/modules/xfs/Makefile ============================================================================== --- head/sys/modules/xfs/Makefile Fri Dec 30 11:11:54 2011 (r228993) +++ head/sys/modules/xfs/Makefile Fri Dec 30 13:16:59 2011 (r228994) @@ -86,8 +86,5 @@ CFLAGS+= -I${.CURDIR}/../../gnu/fs/xfs/F -I${.CURDIR}/../../gnu/fs/xfs/FreeBSD/support \ -I${.CURDIR}/../../gnu/fs/xfs -# -# XFS sources trigger missing-prototypes warnings. -# Disable them here. -# -CWARNFLAGS+= -Wno-missing-prototypes +CWARNFLAGS.xfs_ioctl.c= ${NO_WSELF_ASSIGN} +CWARNFLAGS+= ${CWARNFLAGS.${.IMPSRC:T}} From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 14:30:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 945361065670; Fri, 30 Dec 2011 14:30:18 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64D718FC13; Fri, 30 Dec 2011 14:30:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUEUID4017216; Fri, 30 Dec 2011 14:30:18 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUEUIll017214; Fri, 30 Dec 2011 14:30:18 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201112301430.pBUEUIll017214@svn.freebsd.org> From: Ken Smith Date: Fri, 30 Dec 2011 14:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228999 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 14:30:18 -0000 Author: kensmith Date: Fri Dec 30 14:30:16 2011 New Revision: 228999 URL: http://svn.freebsd.org/changeset/base/228999 Log: Release the code freeze on stable/9. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers ============================================================================== --- svnadmin/conf/approvers Fri Dec 30 13:53:04 2011 (r228998) +++ svnadmin/conf/approvers Fri Dec 30 14:30:16 2011 (r228999) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/ re -^stable/9/ re +#^stable/9/ re #^stable/8/ re #^stable/7/ re ^releng/9.0/ re From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 14:33:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E24EB1065675; Fri, 30 Dec 2011 14:33:08 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2A1C8FC16; Fri, 30 Dec 2011 14:33:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUEX8eb017345; Fri, 30 Dec 2011 14:33:08 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUEX8GX017343; Fri, 30 Dec 2011 14:33:08 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201112301433.pBUEX8GX017343@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Fri, 30 Dec 2011 14:33:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229000 - head/sbin/dhclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 14:33:09 -0000 Author: dumbbell Date: Fri Dec 30 14:33:08 2011 New Revision: 229000 URL: http://svn.freebsd.org/changeset/base/229000 Log: Invalid Domain Search option isn't considered as a fatal error In the original Domain Search option patch, an invalid option value would cause the whole lease to be rejected. However, DHCP servers who emit such an invalid value are more common than I thought. With this new patch, just the option is rejected, not the entire lease. PR: bin/163431 Submitted by: Fabian Keil (earlier version) Reviewed by: Fabian Keil Sponsored by: Yakaz (http://www.yakaz.com) Modified: head/sbin/dhclient/options.c Modified: head/sbin/dhclient/options.c ============================================================================== --- head/sbin/dhclient/options.c Fri Dec 30 14:30:16 2011 (r228999) +++ head/sbin/dhclient/options.c Fri Dec 30 14:33:08 2011 (r229000) @@ -211,7 +211,7 @@ parse_option_buffer(struct packet *packe void expand_domain_search(struct packet *packet) { - int offset, expanded_len; + int offset, expanded_len, next_domain_len; struct option_data *option; unsigned char *domain_search, *cursor; @@ -224,9 +224,13 @@ expand_domain_search(struct packet *pack expanded_len = 0; offset = 0; while (offset < option->len) { + next_domain_len = find_search_domain_name_len(option, &offset); + if (next_domain_len < 0) + /* The Domain Search option value is invalid. */ + return; + /* We add 1 for the space between domain names. */ - expanded_len += - find_search_domain_name_len(option, &offset) + 1; + expanded_len += next_domain_len + 1; } if (expanded_len > 0) /* Remove 1 for the superfluous trailing space. */ @@ -271,8 +275,9 @@ find_search_domain_name_len(struct optio /* This is a pointer to another list of labels. */ if (i + 1 >= option->len) { /* The pointer is truncated. */ - error("Truncated pointer in DHCP Domain " + warning("Truncated pointer in DHCP Domain " "Search option."); + return (-1); } pointer = ((label_len & ~(0xC0)) << 8) + @@ -282,8 +287,9 @@ find_search_domain_name_len(struct optio * The pointer must indicates a prior * occurance. */ - error("Invalid forward pointer in DHCP Domain " - "Search option compression."); + warning("Invalid forward pointer in DHCP " + "Domain Search option compression."); + return (-1); } pointed_len = find_search_domain_name_len(option, @@ -295,7 +301,9 @@ find_search_domain_name_len(struct optio } if (i + label_len >= option->len) { - error("Truncated label in DHCP Domain Search option."); + warning("Truncated label in DHCP Domain Search " + "option."); + return (-1); } /* @@ -308,9 +316,9 @@ find_search_domain_name_len(struct optio i += label_len + 1; } - error("Truncated DHCP Domain Search option."); + warning("Truncated DHCP Domain Search option."); - return (0); + return (-1); } void From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 14:41:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C54E71065670; Fri, 30 Dec 2011 14:41:47 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B03358FC16; Fri, 30 Dec 2011 14:41:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUEfll6017622; Fri, 30 Dec 2011 14:41:47 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUEfl36017620; Fri, 30 Dec 2011 14:41:47 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201112301441.pBUEfl36017620@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Fri, 30 Dec 2011 14:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229001 - head/tools/regression/sbin/dhclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 14:41:47 -0000 Author: dumbbell Date: Fri Dec 30 14:41:47 2011 New Revision: 229001 URL: http://svn.freebsd.org/changeset/base/229001 Log: Adapt testsuite following change in Domain Search error handling In this testsuite, warning() and error() have the same behaviour. PR: bin/163431 Sponsored by: Yakaz (http://www.yakaz.com) Modified: head/tools/regression/sbin/dhclient/fake.c Modified: head/tools/regression/sbin/dhclient/fake.c ============================================================================== --- head/tools/regression/sbin/dhclient/fake.c Fri Dec 30 14:33:08 2011 (r229000) +++ head/tools/regression/sbin/dhclient/fake.c Fri Dec 30 14:41:47 2011 (r229001) @@ -32,7 +32,11 @@ warning(char *fmt, ...) va_end(ap); fprintf(stderr, "\n"); - return ret; + /* + * The original warning() would return "ret" here. We do this to + * check warnings explicitely. + */ + longjmp(env, 1); } int From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 14:46:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8581E106566B; Fri, 30 Dec 2011 14:46:54 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5602F8FC0C; Fri, 30 Dec 2011 14:46:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUEksAL017819; Fri, 30 Dec 2011 14:46:54 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUEks7L017818; Fri, 30 Dec 2011 14:46:54 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201112301446.pBUEks7L017818@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Fri, 30 Dec 2011 14:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229002 - head/sbin/dhclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 14:46:54 -0000 Author: dumbbell Date: Fri Dec 30 14:46:53 2011 New Revision: 229002 URL: http://svn.freebsd.org/changeset/base/229002 Log: Set svn:executable on dhclient-script Sponsored by: Yakaz (http://www.yakaz.com) Modified: Directory Properties: head/sbin/dhclient/dhclient-script (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 15:41:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F214F106564A; Fri, 30 Dec 2011 15:41:28 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DAF828FC12; Fri, 30 Dec 2011 15:41:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUFfSVG019457; Fri, 30 Dec 2011 15:41:28 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUFfS9K019455; Fri, 30 Dec 2011 15:41:28 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201112301541.pBUFfS9K019455@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 30 Dec 2011 15:41:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229003 - head/sys/netgraph X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 15:41:29 -0000 Author: glebius Date: Fri Dec 30 15:41:28 2011 New Revision: 229003 URL: http://svn.freebsd.org/changeset/base/229003 Log: style(9), whitespace and spelling nits. Modified: head/sys/netgraph/ng_base.c Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Fri Dec 30 14:46:53 2011 (r229002) +++ head/sys/netgraph/ng_base.c Fri Dec 30 15:41:28 2011 (r229003) @@ -1,7 +1,3 @@ -/* - * ng_base.c - */ - /*- * Copyright (c) 1996-1999 Whistle Communications, Inc. * All rights reserved. @@ -333,18 +329,18 @@ ng_alloc_node(void) #define NG_FREE_HOOK(hook) \ do { \ - mtx_lock(&ng_nodelist_mtx); \ + mtx_lock(&ng_nodelist_mtx); \ LIST_INSERT_HEAD(&ng_freehooks, hook, hk_hooks); \ hook->hk_magic = 0; \ - mtx_unlock(&ng_nodelist_mtx); \ + mtx_unlock(&ng_nodelist_mtx); \ } while (0) #define NG_FREE_NODE(node) \ do { \ - mtx_lock(&ng_nodelist_mtx); \ + mtx_lock(&ng_nodelist_mtx); \ LIST_INSERT_HEAD(&ng_freenodes, node, nd_nodes); \ node->nd_magic = 0; \ - mtx_unlock(&ng_nodelist_mtx); \ + mtx_unlock(&ng_nodelist_mtx); \ } while (0) #else /* NETGRAPH_DEBUG */ /*----------------------------------------------*/ @@ -670,8 +666,8 @@ ng_make_node_common(struct ng_type *type break; } } - LIST_INSERT_HEAD(&V_ng_ID_hash[NG_IDHASH_FN(node->nd_ID)], - node, nd_idnodes); + LIST_INSERT_HEAD(&V_ng_ID_hash[NG_IDHASH_FN(node->nd_ID)], node, + nd_idnodes); mtx_unlock(&ng_idhash_mtx); /* Done */ @@ -824,7 +820,7 @@ ng_node2ID(node_p node) ************************************************************************/ /* - * Assign a node a name. Once assigned, the name cannot be changed. + * Assign a node a name. */ int ng_name_node(node_p node, const char *name) @@ -921,27 +917,21 @@ ng_decodeidname(const char *name) u_long val; /* Check for proper length, brackets, no leading junk */ - if ((len < 3) - || (name[0] != '[') - || (name[len - 1] != ']') - || (!isxdigit(name[1]))) { + if ((len < 3) || (name[0] != '[') || (name[len - 1] != ']') || + (!isxdigit(name[1]))) return ((ng_ID_t)0); - } /* Decode number */ val = strtoul(name + 1, &eptr, 16); - if ((eptr - name != len - 1) - || (val == ULONG_MAX) - || (val == 0)) { + if ((eptr - name != len - 1) || (val == ULONG_MAX) || (val == 0)) return ((ng_ID_t)0); - } - return (ng_ID_t)val; + + return ((ng_ID_t)val); } /* * Remove a name from a node. This should only be called * when shutting down and removing the node. - * IF we allow name changing this may be more resurrected. */ void ng_unname(node_p node) @@ -1045,8 +1035,8 @@ ng_findhook(node_p node, const char *nam if (node->nd_type->findhook != NULL) return (*node->nd_type->findhook)(node, name); LIST_FOREACH(hook, &node->nd_hooks, hk_hooks) { - if (NG_HOOK_IS_VALID(hook) - && (strcmp(NG_HOOK_NAME(hook), name) == 0)) + if (NG_HOOK_IS_VALID(hook) && + (strcmp(NG_HOOK_NAME(hook), name) == 0)) return (hook); } return (NULL); @@ -1182,12 +1172,12 @@ ng_newtype(struct ng_type *tp) const size_t namelen = strlen(tp->name); /* Check version and type name fields */ - if ((tp->version != NG_ABI_VERSION) - || (namelen == 0) - || (namelen >= NG_TYPESIZ)) { + if ((tp->version != NG_ABI_VERSION) || (namelen == 0) || + (namelen >= NG_TYPESIZ)) { TRAP_ERROR(); if (tp->version != NG_ABI_VERSION) { - printf("Netgraph: Node type rejected. ABI mismatch. Suggest recompile\n"); + printf("Netgraph: Node type rejected. ABI mismatch. " + "Suggest recompile\n"); } return (EINVAL); } @@ -1635,8 +1625,8 @@ ng_path_parse(char *addr, char **nodep, * return the destination node. */ int -ng_path2noderef(node_p here, const char *address, - node_p *destp, hook_p *lasthook) +ng_path2noderef(node_p here, const char *address, node_p *destp, + hook_p *lasthook) { char fullpath[NG_PATHSIZ]; char *nodename, *path; @@ -1715,10 +1705,9 @@ ng_path2noderef(node_p here, const char mtx_lock(&ng_topo_mtx); /* Can't get there from here... */ - if (hook == NULL - || NG_HOOK_PEER(hook) == NULL - || NG_HOOK_NOT_VALID(hook) - || NG_HOOK_NOT_VALID(NG_HOOK_PEER(hook))) { + if (hook == NULL || NG_HOOK_PEER(hook) == NULL || + NG_HOOK_NOT_VALID(hook) || + NG_HOOK_NOT_VALID(NG_HOOK_PEER(hook))) { TRAP_ERROR(); NG_NODE_UNREF(node); mtx_unlock(&ng_topo_mtx); @@ -1882,9 +1871,9 @@ ng_dequeue(node_p node, int *rw) long t = ngq->q_flags; if (t & WRITER_ACTIVE) { /* There is writer, reader can't proceed. */ - CTR4(KTR_NET, "%20s: node [%x] (%p) queued reader " - "can't proceed; queue flags 0x%lx", __func__, - node->nd_ID, node, t); + CTR4(KTR_NET, "%20s: node [%x] (%p) queued " + "reader can't proceed; queue flags 0x%lx", + __func__, node->nd_ID, node, t); return (NULL); } if (atomic_cmpset_acq_int(&ngq->q_flags, t, @@ -1900,9 +1889,9 @@ ng_dequeue(node_p node, int *rw) *rw = NGQRW_W; } else { /* There is somebody other, writer can't proceed. */ - CTR4(KTR_NET, "%20s: node [%x] (%p) queued writer " - "can't proceed; queue flags 0x%lx", __func__, - node->nd_ID, node, ngq->q_flags); + CTR4(KTR_NET, "%20s: node [%x] (%p) queued writer can't " + "proceed; queue flags 0x%lx", __func__, node->nd_ID, node, + ngq->q_flags); return (NULL); } @@ -1914,10 +1903,9 @@ ng_dequeue(node_p node, int *rw) STAILQ_REMOVE_HEAD(&ngq->queue, el_next); if (STAILQ_EMPTY(&ngq->queue)) atomic_clear_int(&ngq->q_flags, OP_PENDING); - CTR6(KTR_NET, "%20s: node [%x] (%p) returning item %p as %s; " - "queue flags 0x%lx", __func__, - node->nd_ID, node, item, *rw ? "WRITER" : "READER" , - ngq->q_flags); + CTR6(KTR_NET, "%20s: node [%x] (%p) returning item %p as %s; queue " + "flags 0x%lx", __func__, node->nd_ID, node, item, *rw ? "WRITER" : + "READER", ngq->q_flags); return (item); } @@ -1941,7 +1929,7 @@ ng_queue_rw(node_p node, item_p item, i CTR5(KTR_NET, "%20s: node [%x] (%p) queued item %p as %s", __func__, node->nd_ID, node, item, rw ? "WRITER" : "READER" ); - + /* * We can take the worklist lock with the node locked * BUT NOT THE REVERSE! @@ -1959,12 +1947,12 @@ ng_acquire_read(node_p node, item_p item ("%s: working on deadnode", __func__)); /* Reader needs node without writer and pending items. */ - while (1) { + for (;;) { long t = node->nd_input_queue.q_flags; if (t & NGQ_RMASK) break; /* Node is not ready for reader. */ - if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, - t, t + READER_INCREMENT)) { + if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, t, + t + READER_INCREMENT)) { /* Successfully grabbed node */ CTR4(KTR_NET, "%20s: node [%x] (%p) acquired item %p", __func__, node->nd_ID, node, item); @@ -1987,8 +1975,8 @@ ng_acquire_write(node_p node, item_p ite ("%s: working on deadnode", __func__)); /* Writer needs completely idle node. */ - if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, - 0, WRITER_ACTIVE)) { + if (atomic_cmpset_acq_int(&node->nd_input_queue.q_flags, 0, + WRITER_ACTIVE)) { /* Successfully grabbed node */ CTR4(KTR_NET, "%20s: node [%x] (%p) acquired item %p", __func__, node->nd_ID, node, item); @@ -2032,11 +2020,10 @@ ng_upgrade_write(node_p node, item_p ite ng_apply_item(node, item, 0); /* - * Having acted on the item, atomically - * down grade back to READER and finish up + * Having acted on the item, atomically + * downgrade back to READER and finish up. */ - atomic_add_int(&ngq->q_flags, - READER_INCREMENT - WRITER_ACTIVE); + atomic_add_int(&ngq->q_flags, READER_INCREMENT - WRITER_ACTIVE); /* Our caller will call ng_leave_read() */ return; @@ -2204,11 +2191,10 @@ ng_snd_item(item_p item, int flags) size_t st, su, sl; GET_STACK_USAGE(st, su); sl = st - su; - if ((sl * 4 < st) || - ((sl * 2 < st) && ((node->nd_flags & NGF_HI_STACK) || - (hook && (hook->hk_flags & HK_HI_STACK))))) { + if ((sl * 4 < st) || ((sl * 2 < st) && + ((node->nd_flags & NGF_HI_STACK) || (hook && + (hook->hk_flags & HK_HI_STACK))))) queue = 1; - } #endif } @@ -2310,10 +2296,10 @@ ng_apply_item(node_p node, item_p item, } /* * If no receive method, just silently drop it. - * Give preference to the hook over-ride method + * Give preference to the hook over-ride method. */ - if ((!(rcvdata = hook->hk_rcvdata)) - && (!(rcvdata = NG_HOOK_NODE(hook)->nd_type->rcvdata))) { + if ((!(rcvdata = hook->hk_rcvdata)) && + (!(rcvdata = NG_HOOK_NODE(hook)->nd_type->rcvdata))) { error = 0; NG_FREE_ITEM(item); break; @@ -2533,8 +2519,8 @@ ng_generic_msg(node_p here, item_p item, hook_p hook; /* Get response struct */ - NG_MKRESPONSE(resp, msg, sizeof(*hl) - + (nhooks * sizeof(struct linkinfo)), M_NOWAIT); + NG_MKRESPONSE(resp, msg, sizeof(*hl) + + (nhooks * sizeof(struct linkinfo)), M_NOWAIT); if (resp == NULL) { error = ENOMEM; break; @@ -2595,8 +2581,8 @@ ng_generic_msg(node_p here, item_p item, mtx_unlock(&ng_namehash_mtx); /* Get response struct */ - NG_MKRESPONSE(resp, msg, sizeof(*nl) - + (num * sizeof(struct nodeinfo)), M_NOWAIT); + NG_MKRESPONSE(resp, msg, sizeof(*nl) + + (num * sizeof(struct nodeinfo)), M_NOWAIT); if (resp == NULL) { error = ENOMEM; break; @@ -2646,8 +2632,8 @@ ng_generic_msg(node_p here, item_p item, mtx_unlock(&ng_typelist_mtx); /* Get response struct */ - NG_MKRESPONSE(resp, msg, sizeof(*tl) - + (num * sizeof(struct typeinfo)), M_NOWAIT); + NG_MKRESPONSE(resp, msg, sizeof(*tl) + + (num * sizeof(struct typeinfo)), M_NOWAIT); if (resp == NULL) { error = ENOMEM; break; @@ -2702,16 +2688,16 @@ ng_generic_msg(node_p here, item_p item, bcopy(binary, ascii, sizeof(*binary)); /* Find command by matching typecookie and command number */ - for (c = here->nd_type->cmdlist; - c != NULL && c->name != NULL; c++) { - if (binary->header.typecookie == c->cookie - && binary->header.cmd == c->cmd) + for (c = here->nd_type->cmdlist; c != NULL && c->name != NULL; + c++) { + if (binary->header.typecookie == c->cookie && + binary->header.cmd == c->cmd) break; } if (c == NULL || c->name == NULL) { for (c = ng_generic_cmds; c->name != NULL; c++) { - if (binary->header.typecookie == c->cookie - && binary->header.cmd == c->cmd) + if (binary->header.typecookie == c->cookie && + binary->header.cmd == c->cmd) break; } if (c->name == NULL) { @@ -2805,8 +2791,8 @@ ng_generic_msg(node_p here, item_p item, if (argstype == NULL) { bufSize = 0; } else { - if ((error = ng_parse(argstype, ascii->data, - &off, (u_char *)binary->data, &bufSize)) != 0) { + if ((error = ng_parse(argstype, ascii->data, &off, + (u_char *)binary->data, &bufSize)) != 0) { NG_FREE_MSG(resp); break; } @@ -2837,7 +2823,7 @@ ng_generic_msg(node_p here, item_p item, } /* * Sometimes a generic message may be statically allocated - * to avoid problems with allocating when in tight memeory situations. + * to avoid problems with allocating when in tight memory situations. * Don't free it if it is so. * I break them appart here, because erros may cause a free if the item * in which case we'd be doing it twice. @@ -2871,7 +2857,7 @@ SYSCTL_INT(_net_graph, OID_AUTO, maxdata #ifdef NETGRAPH_DEBUG static TAILQ_HEAD(, ng_item) ng_itemlist = TAILQ_HEAD_INITIALIZER(ng_itemlist); -static int allocated; /* number of items malloc'd */ +static int allocated; /* number of items malloc'd */ #endif /* @@ -2889,7 +2875,7 @@ ng_alloc_item(int type, int flags) KASSERT(((type & ~NGQF_TYPE) == 0), ("%s: incorrect item type: %d", __func__, type)); - item = uma_zalloc((type == NGQF_DATA)?ng_qdzone:ng_qzone, + item = uma_zalloc((type == NGQF_DATA) ? ng_qdzone : ng_qzone, ((flags & NG_WAITOK) ? M_WAITOK : M_NOWAIT) | M_ZERO); if (item) { @@ -2945,8 +2931,8 @@ ng_free_item(item_p item) allocated--; mtx_unlock(&ngq_mtx); #endif - uma_zfree(((item->el_flags & NGQF_TYPE) == NGQF_DATA)? - ng_qdzone:ng_qzone, item); + uma_zfree(((item->el_flags & NGQF_TYPE) == NGQF_DATA) ? + ng_qdzone : ng_qzone, item); } /* @@ -2991,17 +2977,14 @@ int ng_mod_event(module_t mod, int event, void *data) { struct ng_type *const type = data; - int s, error = 0; + int error = 0; switch (event) { case MOD_LOAD: /* Register new netgraph node type */ - s = splnet(); - if ((error = ng_newtype(type)) != 0) { - splx(s); + if ((error = ng_newtype(type)) != 0) break; - } /* Call type specific code */ if (type->mod_event != NULL) @@ -3011,31 +2994,23 @@ ng_mod_event(module_t mod, int event, vo LIST_REMOVE(type, types); mtx_unlock(&ng_typelist_mtx); } - splx(s); break; case MOD_UNLOAD: - s = splnet(); if (type->refs > 1) { /* make sure no nodes exist! */ error = EBUSY; } else { - if (type->refs == 0) { - /* failed load, nothing to undo */ - splx(s); + if (type->refs == 0) /* failed load, nothing to undo */ break; - } if (type->mod_event != NULL) { /* check with type */ error = (*type->mod_event)(mod, event, data); - if (error != 0) { /* type refuses.. */ - splx(s); + if (error != 0) /* type refuses.. */ break; - } } mtx_lock(&ng_typelist_mtx); LIST_REMOVE(type, types); mtx_unlock(&ng_typelist_mtx); } - splx(s); break; default: @@ -3048,7 +3023,7 @@ ng_mod_event(module_t mod, int event, vo return (error); } -#ifdef VIMAGE +#ifdef VIMAGE static void vnet_netgraph_uninit(const void *unused __unused) { @@ -3074,8 +3049,8 @@ vnet_netgraph_uninit(const void *unused if (node != NULL) { if (node == last_killed) { /* This should never happen */ - printf("ng node %s needs" - "NGF_REALLY_DIE\n", node->nd_name); + printf("ng node %s needs NGF_REALLY_DIE\n", + node->nd_name); if (node->nd_flags & NGF_REALLY_DIE) panic("ng node %s won't die", node->nd_name); @@ -3123,8 +3098,9 @@ ngb_mod_event(module_t mod, int event, v ng_qzone = uma_zcreate("NetGraph items", sizeof(struct ng_item), NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); uma_zone_set_max(ng_qzone, maxalloc); - ng_qdzone = uma_zcreate("NetGraph data items", sizeof(struct ng_item), - NULL, NULL, NULL, NULL, UMA_ALIGN_CACHE, 0); + ng_qdzone = uma_zcreate("NetGraph data items", + sizeof(struct ng_item), NULL, NULL, NULL, NULL, + UMA_ALIGN_CACHE, 0); uma_zone_set_max(ng_qdzone, maxdata); /* Autoconfigure number of threads. */ if (numthreads <= 0) @@ -3365,7 +3341,7 @@ ng_worklist_add(node_p node) * then put us on. */ node->nd_input_queue.q_flags2 |= NGQ2_WORKQ; - NG_NODE_REF(node); /* XXX fafe in mutex? */ + NG_NODE_REF(node); /* XXX safe in mutex? */ NG_WORKLIST_LOCK(); STAILQ_INSERT_TAIL(&ng_worklist, node, nd_input_queue.q_work); NG_WORKLIST_UNLOCK(); @@ -3493,8 +3469,7 @@ ng_address_hook(node_p here, item_p item * that the peer node is present, though maybe invalid. */ mtx_lock(&ng_topo_mtx); - if ((hook == NULL) || - NG_HOOK_NOT_VALID(hook) || + if ((hook == NULL) || NG_HOOK_NOT_VALID(hook) || NG_HOOK_NOT_VALID(peer = NG_HOOK_PEER(hook)) || NG_NODE_NOT_VALID(peernode = NG_PEER_NODE(hook))) { NG_FREE_ITEM(item); @@ -3786,4 +3761,3 @@ ng_macro_test(item_p item) NG_FWD_MSG_HOOK(error, node, item, hook, retaddr); } #endif /* TESTING */ - From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 16:52:23 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 158221065677; Fri, 30 Dec 2011 16:52:23 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f07:14d3:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id C88CE8FC12; Fri, 30 Dec 2011 16:52:22 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f07:14d3:1::5]) by mail.farley.org (8.14.5/8.14.5) with ESMTP id pBUGqLEX042150; Fri, 30 Dec 2011 11:52:21 -0500 (EST) (envelope-from scf@FreeBSD.org) Date: Fri, 30 Dec 2011 11:52:21 -0500 (EST) From: "Sean C. Farley" To: Matthew D Fleming In-Reply-To: Message-ID: References: <201112252015.pBPKFfZ1073959@svn.freebsd.org> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="56599777-835880625-1325263941=:4588" X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.farley.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228878 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 16:52:23 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --56599777-835880625-1325263941=:4588 Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8BIT On Thu, 29 Dec 2011, mdf@FreeBSD.org wrote: > On Thu, Dec 29, 2011 at 6:54 PM, Sean C. Farley wrote: >> On Sun, 25 Dec 2011, Ed Schouten wrote: >> >>> Author: ed >>> Date: Sun Dec 25 20:15:41 2011 >>> New Revision: 228878 >>> URL: http://svn.freebsd.org/changeset/base/228878 >>> >>> Log: >>>  Remove unneeded guard. >>> >>>  There is no reason why needs an include guard. It is already >>>  protected by __bool_true_false_are_defined. >>> >>> Modified: >>>  head/include/stdbool.h >>> >>> Modified: head/include/stdbool.h >>> >>> ============================================================================== >>> --- head/include/stdbool.h      Sun Dec 25 18:15:31 2011        (r228877) >>> +++ head/include/stdbool.h      Sun Dec 25 20:15:41 2011        (r228878) >>> @@ -26,9 +26,6 @@ >>>  * $FreeBSD$ >>>  */ >>> >>> -#ifndef _STDBOOL_H_ >>> -#define        _STDBOOL_H_ >>> - >>> #ifndef __bool_true_false_are_defined >>> #define __bool_true_false_are_defined   1 >>> >>> @@ -44,5 +41,3 @@ typedef       int     _Bool; >>> >>> #endif /* !__cplusplus */ >>> #endif /* __bool_true_false_are_defined */ >>> - >>> -#endif /* !_STDBOOL_H_ */ >> >> >> I just thought of this while reviewing the change:  should >> __bool_true_false_are_defined be set only if __cplusplus is not set? >> It should be set for C99, but I wonder if it should be set for C++. > > My quick googling didn't show anything at all about the C++ standard > and stdbool.h or __bool_true_false_are_defined. It was probably > originally set because bool, true, and false are all C++ keywords so > certain code that wanted to ifdef on them didn't also need to check > __cplusplus. I did not find anything definitive either. >> Also, is there a style requirement that the guard for a header file >> be based off of the name of the file?  I did not see anything obvious >> for this within style(9), but I am curious. > > I think it's just common use to make sure different headers use a > different include guard, so they only protect their contents, not any > other file's. The C standard only mentions the symbols bool, true, > false, and __bool_true_false_are_defined in regards to stdbool.h. Thank you. I asked since I have only really noticed filename-based guards in the tree although not all are this way (i.e., bsdxml.h uses Expat_INCLUDED). Sean -- scf@FreeBSD.org --56599777-835880625-1325263941=:4588-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 17:04:07 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C54D9106566C; Fri, 30 Dec 2011 17:04:07 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f07:14d3:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id 7465C8FC18; Fri, 30 Dec 2011 17:04:07 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f07:14d3:1::5]) by mail.farley.org (8.14.5/8.14.5) with ESMTP id pBUH43E9042348; Fri, 30 Dec 2011 12:04:03 -0500 (EST) (envelope-from scf@FreeBSD.org) Date: Fri, 30 Dec 2011 12:04:03 -0500 (EST) From: "Sean C. Farley" To: Ed Schouten In-Reply-To: <20111230090622.GO1895@hoeg.nl> Message-ID: References: <201112252015.pBPKFfZ1073959@svn.freebsd.org> <20111230090622.GO1895@hoeg.nl> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Spam-Status: No, score=-1.5 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.farley.org Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228878 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 17:04:07 -0000 On Fri, 30 Dec 2011, Ed Schouten wrote: > Hello Sean, > > * Sean C. Farley , 20111230 03:54: >> I just thought of this while reviewing the change: should >> __bool_true_false_are_defined be set only if __cplusplus is not set? >> It should be set for C99, but I wonder if it should be set for C++. > > Even if the C++ standard doesn't mention it at all, I think it doesn't > mean it is forbidden to define it. It starts with __[a-z], so it is in > the reserved namespace. I am fine with it. I found many variations of stdbool.h with some wrapping __bool_true_false_are_defined within the __cplusplus check (e.g., glibc) and some that did not. glibc may have it because stdbool.h is included from cstdbool and stdbool.h in /usr/include/c++/4.2/tr1/. >> Also, is there a style requirement that the guard for a header file >> be based off of the name of the file? I did not see anything obvious >> for this within style(9), but I am curious. > > I am not aware of this. I am not aware of it either, hence, my question. It was just something to which I have grown accustomed. Using __bool_true_false_are_defined as the guard works. Sean -- scf@FreeBSD.org From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 17:18:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60ABC1065672; Fri, 30 Dec 2011 17:18:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BBFD8FC0A; Fri, 30 Dec 2011 17:18:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUHIA5Y022339; Fri, 30 Dec 2011 17:18:10 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUHIAFv022337; Fri, 30 Dec 2011 17:18:10 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112301718.pBUHIAFv022337@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 17:18:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229004 - head/sys/compat/ndis X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 17:18:10 -0000 Author: dim Date: Fri Dec 30 17:18:09 2011 New Revision: 229004 URL: http://svn.freebsd.org/changeset/base/229004 Log: In sys/compat/ndis/subr_ntoskrnl.c, change the RtlFillMemory function definition from K&R to ANSI, to avoid a clang warning about the uint8_t parameter being promoted to int, which is not compatible with the type declared in the earlier prototype. MFC after: 1 week Modified: head/sys/compat/ndis/subr_ntoskrnl.c Modified: head/sys/compat/ndis/subr_ntoskrnl.c ============================================================================== --- head/sys/compat/ndis/subr_ntoskrnl.c Fri Dec 30 15:41:28 2011 (r229003) +++ head/sys/compat/ndis/subr_ntoskrnl.c Fri Dec 30 17:18:09 2011 (r229004) @@ -3016,10 +3016,7 @@ RtlSecureZeroMemory(dst, len) } static void -RtlFillMemory(dst, len, c) - void *dst; - size_t len; - uint8_t c; +RtlFillMemory(void *dst, size_t len, uint8_t c) { memset(dst, c, len); } From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 17:45:20 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3FFD1065670; Fri, 30 Dec 2011 17:45:20 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 2EFED8FC0C; Fri, 30 Dec 2011 17:45:19 +0000 (UTC) Received: from [192.168.0.2] (cpc2-cwma5-0-0-cust875.7-3.cable.virginmedia.com [86.11.39.108]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id pBUHjI7p097361 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 30 Dec 2011 17:45:18 GMT (envelope-from theraven@FreeBSD.org) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: Date: Fri, 30 Dec 2011 17:45:13 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <0473BBE1-7A08-4B8B-A70A-A4B44E32302C@FreeBSD.org> References: <201112252015.pBPKFfZ1073959@svn.freebsd.org> To: "Sean C. Farley" X-Mailer: Apple Mail (2.1251.1) Cc: svn-src-head@FreeBSD.org, Matthew D Fleming , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r228878 - head/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 17:45:20 -0000 On 30 Dec 2011, at 16:52, Sean C. Farley wrote: >> My quick googling didn't show anything at all about the C++ standard = and stdbool.h or __bool_true_false_are_defined. It was probably = originally set because bool, true, and false are all C++ keywords so = certain code that wanted to ifdef on them didn't also need to check = __cplusplus. >=20 > I did not find anything definitive either. It's usually a better idea to check the spec than Google... stdbool.h is not part of the C++ standard, and so it is free to contain = anything in C++ mode, just as any other non-standard header is. The = header is defined by the C++11 spec as containing JUST the = __bool_true_false_are_defined macro. The purpose of this header in C++ = mode is to allow the inclusion of C++ headers that expect to be able to = use true and false and guard this by the use of the = __bool_true_false_are_defined macro. David= From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 17:54:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC633106567B; Fri, 30 Dec 2011 17:54:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BA8078FC13; Fri, 30 Dec 2011 17:54:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUHsXSH023421; Fri, 30 Dec 2011 17:54:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUHsXTj023419; Fri, 30 Dec 2011 17:54:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301754.pBUHsXTj023419@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 17:54:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229005 - stable/9/sys/fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 17:54:33 -0000 Author: kib Date: Fri Dec 30 17:54:33 2011 New Revision: 229005 URL: http://svn.freebsd.org/changeset/base/229005 Log: MFC r227104: Fix typo. Modified: stable/9/sys/fs/procfs/procfs_status.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 17:18:09 2011 (r229004) +++ stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 17:54:33 2011 (r229005) @@ -175,7 +175,7 @@ procfs_doproccmdline(PFS_FILL_ARGS) /* * If we are using the ps/cmdline caching, use that. Otherwise * revert back to the old way which only implements full cmdline - * for the currept process and just p->p_comm for all other + * for the current process and just p->p_comm for all other * processes. * Note that if the argv is no longer available, we deliberately * don't fall back on p->p_comm or return an error: the authentic From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 18:02:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 330DB10656D1; Fri, 30 Dec 2011 18:02:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D021D8FC18; Fri, 30 Dec 2011 18:02:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUI2EAB023798; Fri, 30 Dec 2011 18:02:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUI2EGM023796; Fri, 30 Dec 2011 18:02:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301802.pBUI2EGM023796@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:02:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229006 - stable/8/sys/fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 18:02:15 -0000 Author: kib Date: Fri Dec 30 18:02:14 2011 New Revision: 229006 URL: http://svn.freebsd.org/changeset/base/229006 Log: MFC r227104: Fix typo. Modified: stable/8/sys/fs/procfs/procfs_status.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 17:54:33 2011 (r229005) +++ stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 18:02:14 2011 (r229006) @@ -175,7 +175,7 @@ procfs_doproccmdline(PFS_FILL_ARGS) /* * If we are using the ps/cmdline caching, use that. Otherwise * revert back to the old way which only implements full cmdline - * for the currept process and just p->p_comm for all other + * for the current process and just p->p_comm for all other * processes. * Note that if the argv is no longer available, we deliberately * don't fall back on p->p_comm or return an error: the authentic From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 18:16:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB5E91065670; Fri, 30 Dec 2011 18:16:16 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BFCC78FC0C; Fri, 30 Dec 2011 18:16:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIGGkG024331; Fri, 30 Dec 2011 18:16:16 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIGGHX024329; Fri, 30 Dec 2011 18:16:16 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201112301816.pBUIGGHX024329@svn.freebsd.org> From: Alan Cox Date: Fri, 30 Dec 2011 18:16:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229007 - head/sys/i386/xen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 18:16:17 -0000 Author: alc Date: Fri Dec 30 18:16:15 2011 New Revision: 229007 URL: http://svn.freebsd.org/changeset/base/229007 Log: Merge r216333 and r216555 from the native pmap When r207410 eliminated the acquisition and release of the page queues lock from pmap_extract_and_hold(), it didn't take into account that pmap_pte_quick() sometimes requires the page queues lock to be held. This change reimplements pmap_extract_and_hold() such that it no longer uses pmap_pte_quick(), and thus never requires the page queues lock. Merge r177525 from the native pmap Prevent the overflow in the calculation of the next page directory. The overflow causes the wraparound with consequent corruption of the (almost) whole address space mapping. Strictly speaking, r177525 is not required by the Xen pmap because the hypervisor steals the uppermost region of the normal kernel address space. I am nonetheless merging it in order to reduce the number of unnecessary differences between the native and Xen pmap implementations. Tested by: sbruno Modified: head/sys/i386/xen/pmap.c Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Fri Dec 30 18:02:14 2011 (r229006) +++ head/sys/i386/xen/pmap.c Fri Dec 30 18:16:15 2011 (r229007) @@ -1122,7 +1122,7 @@ vm_page_t pmap_extract_and_hold(pmap_t pmap, vm_offset_t va, vm_prot_t prot) { pd_entry_t pde; - pt_entry_t pte; + pt_entry_t pte, *ptep; vm_page_t m; vm_paddr_t pa; @@ -1142,21 +1142,17 @@ retry: vm_page_hold(m); } } else { - sched_pin(); - pte = PT_GET(pmap_pte_quick(pmap, va)); - if (*PMAP1) - PT_SET_MA(PADDR1, 0); - if ((pte & PG_V) && + ptep = pmap_pte(pmap, va); + pte = PT_GET(ptep); + pmap_pte_release(ptep); + if (pte != 0 && ((pte & PG_RW) || (prot & VM_PROT_WRITE) == 0)) { if (vm_page_pa_tryrelock(pmap, pte & PG_FRAME, - &pa)) { - sched_unpin(); + &pa)) goto retry; - } m = PHYS_TO_VM_PAGE(pte & PG_FRAME); vm_page_hold(m); } - sched_unpin(); } } PA_UNLOCK_COND(pa); @@ -2316,6 +2312,8 @@ pmap_remove(pmap_t pmap, vm_offset_t sva * Calculate index for next page table. */ pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; if (pmap->pm_stats.resident_count == 0) break; @@ -2471,6 +2469,8 @@ pmap_protect(pmap_t pmap, vm_offset_t sv u_int pdirindex; pdnxt = (sva + NBPDR) & ~PDRMASK; + if (pdnxt < sva) + pdnxt = eva; pdirindex = sva >> PDRSHIFT; ptpaddr = pmap->pm_pdir[pdirindex]; @@ -3172,6 +3172,8 @@ pmap_copy(pmap_t dst_pmap, pmap_t src_pm ("pmap_copy: invalid to pmap_copy page tables")); pdnxt = (addr + NBPDR) & ~PDRMASK; + if (pdnxt < addr) + pdnxt = end_addr; ptepindex = addr >> PDRSHIFT; srcptepaddr = PT_GET(&src_pmap->pm_pdir[ptepindex]); From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 18:18:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8F801065672; Fri, 30 Dec 2011 18:18:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CB998FC14; Fri, 30 Dec 2011 18:18:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUII6ae024422; Fri, 30 Dec 2011 18:18:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUII6l8024419; Fri, 30 Dec 2011 18:18:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301818.pBUII6l8024419@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:18:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229008 - stable/9/lib/libc/amd64/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 18:18:06 -0000 Author: kib Date: Fri Dec 30 18:18:06 2011 New Revision: 229008 URL: http://svn.freebsd.org/changeset/base/229008 Log: MFC r227023: Make sure that stack is 16-byte aligned before calling a function, as it is required by amd64 ABI. Add a comment for the places were the stack is accidentally properly aligned already. PR: amd64/162214 Modified: stable/9/lib/libc/amd64/gen/setjmp.S stable/9/lib/libc/amd64/gen/sigsetjmp.S Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/amd64/gen/setjmp.S ============================================================================== --- stable/9/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:16:15 2011 (r229007) +++ stable/9/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:18:06 2011 (r229008) @@ -54,6 +54,7 @@ ENTRY(setjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10; (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi movq %rdi,%rcx @@ -81,7 +82,9 @@ ENTRY(__longjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ movq %rdi,%rdx Modified: stable/9/lib/libc/amd64/gen/sigsetjmp.S ============================================================================== --- stable/9/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:16:15 2011 (r229007) +++ stable/9/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:18:06 2011 (r229008) @@ -62,6 +62,7 @@ ENTRY(sigsetjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10 (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi 2: movq %rdi,%rcx @@ -90,7 +91,9 @@ ENTRY(__siglongjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ 2: movq %rdi,%rdx From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 18:20:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38979106564A; Fri, 30 Dec 2011 18:20:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0C8488FC14; Fri, 30 Dec 2011 18:20:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIKiOH024552; Fri, 30 Dec 2011 18:20:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIKici024549; Fri, 30 Dec 2011 18:20:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301820.pBUIKici024549@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229009 - stable/9/lib/libc/i386/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 18:20:45 -0000 Author: kib Date: Fri Dec 30 18:20:44 2011 New Revision: 229009 URL: http://svn.freebsd.org/changeset/base/229009 Log: MFC r227024: Despite official i386 ABI does not mandate any stack alignment besides the word alignment, some versions of gcc do require 16-byte alignment. Make sure the stack is 16-byte aligned before calling a subroutine. Modified: stable/9/lib/libc/i386/gen/setjmp.S stable/9/lib/libc/i386/gen/sigsetjmp.S Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/i386/gen/setjmp.S ============================================================================== --- stable/9/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:18:06 2011 (r229008) +++ stable/9/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:20:44 2011 (r229009) @@ -51,12 +51,19 @@ __FBSDID("$FreeBSD$"); ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx movl 0(%esp),%edx @@ -76,12 +83,19 @@ END(setjmp) ENTRY(__longjmp) movl 4(%esp),%edx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx movl 8(%esp),%eax Modified: stable/9/lib/libc/i386/gen/sigsetjmp.S ============================================================================== --- stable/9/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:18:06 2011 (r229008) +++ stable/9/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:20:44 2011 (r229009) @@ -60,12 +60,19 @@ ENTRY(sigsetjmp) testl %eax,%eax jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx 2: movl 0(%esp),%edx @@ -87,12 +94,19 @@ ENTRY(__siglongjmp) cmpl $0,44(%edx) jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx 2: movl 8(%esp),%eax From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 18:22:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FFE1106566C; Fri, 30 Dec 2011 18:22:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 63DBA8FC0A; Fri, 30 Dec 2011 18:22:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIMZnd024729; Fri, 30 Dec 2011 18:22:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIMZCl024726; Fri, 30 Dec 2011 18:22:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301822.pBUIMZCl024726@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:22:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229010 - stable/8/lib/libc/amd64/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 18:22:35 -0000 Author: kib Date: Fri Dec 30 18:22:34 2011 New Revision: 229010 URL: http://svn.freebsd.org/changeset/base/229010 Log: MFC r227023: Make sure that stack is 16-byte aligned before calling a function, as it is required by amd64 ABI. Add a comment for the places were the stack is accidentally properly aligned already. PR: amd64/162214 Modified: stable/8/lib/libc/amd64/gen/setjmp.S stable/8/lib/libc/amd64/gen/sigsetjmp.S Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/amd64/gen/setjmp.S ============================================================================== --- stable/8/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:20:44 2011 (r229009) +++ stable/8/lib/libc/amd64/gen/setjmp.S Fri Dec 30 18:22:34 2011 (r229010) @@ -54,6 +54,7 @@ ENTRY(setjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10; (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi movq %rdi,%rcx @@ -81,7 +82,9 @@ ENTRY(__longjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ movq %rdi,%rdx Modified: stable/8/lib/libc/amd64/gen/sigsetjmp.S ============================================================================== --- stable/8/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:20:44 2011 (r229009) +++ stable/8/lib/libc/amd64/gen/sigsetjmp.S Fri Dec 30 18:22:34 2011 (r229010) @@ -62,6 +62,7 @@ ENTRY(sigsetjmp) movq $1,%rdi /* SIG_BLOCK */ movq $0,%rsi /* (sigset_t*)set */ leaq 72(%rcx),%rdx /* 9,10 (sigset_t*)oset */ + /* stack is 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) popq %rdi 2: movq %rdi,%rcx @@ -90,7 +91,9 @@ ENTRY(__siglongjmp) movq $3,%rdi /* SIG_SETMASK */ leaq 72(%rdx),%rsi /* (sigset_t*)set */ movq $0,%rdx /* (sigset_t*)oset */ + subq $0x8,%rsp /* make the stack 16-byte aligned */ call PIC_PLT(CNAME(_sigprocmask)) + addq $0x8,%rsp popq %rsi popq %rdi /* jmpbuf */ 2: movq %rdi,%rdx From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 18:29:09 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2097106566C; Fri, 30 Dec 2011 18:29:09 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5CBE8FC12; Fri, 30 Dec 2011 18:29:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIT9xR024966; Fri, 30 Dec 2011 18:29:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIT9Cv024963; Fri, 30 Dec 2011 18:29:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301829.pBUIT9Cv024963@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:29:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229011 - stable/8/lib/libc/i386/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 18:29:09 -0000 Author: kib Date: Fri Dec 30 18:29:09 2011 New Revision: 229011 URL: http://svn.freebsd.org/changeset/base/229011 Log: MFC r227024: Despite official i386 ABI does not mandate any stack alignment besides the word alignment, some versions of gcc do require 16-byte alignment. Make sure the stack is 16-byte aligned before calling a subroutine. Modified: stable/8/lib/libc/i386/gen/setjmp.S stable/8/lib/libc/i386/gen/sigsetjmp.S Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/i386/gen/setjmp.S ============================================================================== --- stable/8/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:22:34 2011 (r229010) +++ stable/8/lib/libc/i386/gen/setjmp.S Fri Dec 30 18:29:09 2011 (r229011) @@ -51,12 +51,19 @@ __FBSDID("$FreeBSD$"); ENTRY(setjmp) movl 4(%esp),%ecx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx movl 0(%esp),%edx @@ -76,12 +83,19 @@ END(setjmp) ENTRY(__longjmp) movl 4(%esp),%edx PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx movl 8(%esp),%eax Modified: stable/8/lib/libc/i386/gen/sigsetjmp.S ============================================================================== --- stable/8/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:22:34 2011 (r229010) +++ stable/8/lib/libc/i386/gen/sigsetjmp.S Fri Dec 30 18:29:09 2011 (r229011) @@ -60,12 +60,19 @@ ENTRY(sigsetjmp) testl %eax,%eax jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif leal 28(%ecx), %eax pushl %eax /* (sigset_t*)oset */ pushl $0 /* (sigset_t*)set */ pushl $1 /* SIG_BLOCK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%ecx 2: movl 0(%esp),%edx @@ -87,12 +94,19 @@ ENTRY(__siglongjmp) cmpl $0,44(%edx) jz 2f PIC_PROLOGUE +#ifdef PIC + subl $12,%esp /* make the stack 16-byte aligned */ +#endif pushl $0 /* (sigset_t*)oset */ leal 28(%edx), %eax pushl %eax /* (sigset_t*)set */ pushl $3 /* SIG_SETMASK */ call PIC_PLT(CNAME(_sigprocmask)) +#ifdef PIC + addl $24,%esp +#else addl $12,%esp +#endif PIC_EPILOGUE movl 4(%esp),%edx 2: movl 8(%esp),%eax From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 18:58:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A482106566C; Fri, 30 Dec 2011 18:58:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 286E88FC13; Fri, 30 Dec 2011 18:58:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUIwhbk025869; Fri, 30 Dec 2011 18:58:43 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUIwgt5025867; Fri, 30 Dec 2011 18:58:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301858.pBUIwgt5025867@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 18:58:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229012 - stable/9/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 18:58:43 -0000 Author: kib Date: Fri Dec 30 18:58:42 2011 New Revision: 229012 URL: http://svn.freebsd.org/changeset/base/229012 Log: MFC r228432: Fix printf. Modified: stable/9/sys/vm/swap_pager.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/swap_pager.c ============================================================================== --- stable/9/sys/vm/swap_pager.c Fri Dec 30 18:29:09 2011 (r229011) +++ stable/9/sys/vm/swap_pager.c Fri Dec 30 18:58:42 2011 (r229012) @@ -233,7 +233,7 @@ swap_reserve_by_cred(vm_ooffset_t incr, } if (!res && ppsratecheck(&lastfail, &curfail, 1)) { printf("uid %d, pid %d: swap reservation for %jd bytes failed\n", - curproc->p_pid, uip->ui_uid, incr); + uip->ui_uid, curproc->p_pid, incr); } #ifdef RACCT From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:04:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E38161065673; Fri, 30 Dec 2011 19:04:12 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1C4C8FC13; Fri, 30 Dec 2011 19:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJ4Chp026102; Fri, 30 Dec 2011 19:04:12 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJ4CCD026100; Fri, 30 Dec 2011 19:04:12 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301904.pBUJ4CCD026100@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229013 - stable/8/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:04:13 -0000 Author: kib Date: Fri Dec 30 19:04:12 2011 New Revision: 229013 URL: http://svn.freebsd.org/changeset/base/229013 Log: MFC r228432: Fix printf. Modified: stable/8/sys/vm/swap_pager.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/vm/swap_pager.c ============================================================================== --- stable/8/sys/vm/swap_pager.c Fri Dec 30 18:58:42 2011 (r229012) +++ stable/8/sys/vm/swap_pager.c Fri Dec 30 19:04:12 2011 (r229013) @@ -216,7 +216,7 @@ swap_reserve_by_uid(vm_ooffset_t incr, s } if (!res && ppsratecheck(&lastfail, &curfail, 1)) { printf("uid %d, pid %d: swap reservation for %jd bytes failed\n", - curproc->p_pid, uip->ui_uid, incr); + uip->ui_uid, curproc->p_pid, incr); } return (res); From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:18:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0DDB106566C; Fri, 30 Dec 2011 19:18:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF3AC8FC0A; Fri, 30 Dec 2011 19:18:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJIDIe026559; Fri, 30 Dec 2011 19:18:13 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJID1H026557; Fri, 30 Dec 2011 19:18:13 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301918.pBUJID1H026557@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:18:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229014 - stable/9/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:18:14 -0000 Author: kib Date: Fri Dec 30 19:18:13 2011 New Revision: 229014 URL: http://svn.freebsd.org/changeset/base/229014 Log: MFC r227392: Assert that _PRELE() is done for the held process. Modified: stable/9/sys/sys/proc.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/sys/proc.h ============================================================================== --- stable/9/sys/sys/proc.h Fri Dec 30 19:04:12 2011 (r229013) +++ stable/9/sys/sys/proc.h Fri Dec 30 19:18:13 2011 (r229014) @@ -755,6 +755,7 @@ MALLOC_DECLARE(M_SUBPROC); } while (0) #define _PRELE(p) do { \ PROC_LOCK_ASSERT((p), MA_OWNED); \ + PROC_ASSERT_HELD(p); \ (--(p)->p_lock); \ if (((p)->p_flag & P_WEXIT) && (p)->p_lock == 0) \ wakeup(&(p)->p_lock); \ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:24:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE02D106566C; Fri, 30 Dec 2011 19:24:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC3748FC0C; Fri, 30 Dec 2011 19:24:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJOrSH026811; Fri, 30 Dec 2011 19:24:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJOre7026809; Fri, 30 Dec 2011 19:24:53 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301924.pBUJOre7026809@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229015 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:24:54 -0000 Author: kib Date: Fri Dec 30 19:24:53 2011 New Revision: 229015 URL: http://svn.freebsd.org/changeset/base/229015 Log: MFC r227392: Assert that _PRELE() is done for the held process. Modified: stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Fri Dec 30 19:18:13 2011 (r229014) +++ stable/8/sys/sys/proc.h Fri Dec 30 19:24:53 2011 (r229015) @@ -747,6 +747,7 @@ MALLOC_DECLARE(M_SUBPROC); } while (0) #define _PRELE(p) do { \ PROC_LOCK_ASSERT((p), MA_OWNED); \ + PROC_ASSERT_HELD(p); \ (--(p)->p_lock); \ if (((p)->p_flag & P_WEXIT) && (p)->p_lock == 0) \ wakeup(&(p)->p_lock); \ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:43:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89C18106566C; Fri, 30 Dec 2011 19:43:23 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0ADCC8FC12; Fri, 30 Dec 2011 19:43:22 +0000 (UTC) Received: by ggnp1 with SMTP id p1so12523640ggn.13 for ; Fri, 30 Dec 2011 11:43:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=DC7/iVkYY0NWLZBPNC5Zd36oD2P2wR0aSzPclMSBz/w=; b=M84h29z7qocmdyCq1m2HO5O//ydVMwVWELm/3DKHz7/qD3a+adpoTzutjBpoPqwwN6 /iOXTIuToLIK3iv3yVYZPYGpRn28xoPJPODL9ydGn6zK1FXd1p+AmAzYXIq0cHsronkO ER3OFGyczCfPtKy9o7YvS0dFS3wXVCBJQnD6I= MIME-Version: 1.0 Received: by 10.101.174.1 with SMTP id b1mr16434944anp.1.1325274202267; Fri, 30 Dec 2011 11:43:22 -0800 (PST) Received: by 10.236.110.40 with HTTP; Fri, 30 Dec 2011 11:43:22 -0800 (PST) In-Reply-To: <201112301058.pBUAwFsw010478@svn.freebsd.org> References: <201112301058.pBUAwFsw010478@svn.freebsd.org> Date: Fri, 30 Dec 2011 14:43:22 -0500 Message-ID: From: Ben Kaduk To: Ulrich Spoerlein Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:43:23 -0000 On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein wrote: > Author: uqs > Date: Fri Dec 30 10:58:14 2011 > New Revision: 228990 > URL: http://svn.freebsd.org/changeset/base/228990 > > Log: > =A0Spelling fixes for usr.sbin/ > > Modified: head/usr.sbin/bluetooth/sdpd/server.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/bluetooth/sdpd/server.c =A0 =A0 =A0 Fri Dec 30 10:45:00= 2011 =A0 =A0 =A0 =A0(r228989) > +++ head/usr.sbin/bluetooth/sdpd/server.c =A0 =A0 =A0 Fri Dec 30 10:58:14= 2011 =A0 =A0 =A0 =A0(r228990) > @@ -334,7 +334,7 @@ server_accept_client(server_p srv, int32 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * The minimum L2CAP MTU is 43 bytes. That= means we need > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * 65536 / 43 =3D ~1524 chunks to transfer= maximum packet > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * size with minimum MTU. The "rsp_cs" fie= ld in fd_idx_t > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* is 11 bit wide that gives us upto 2048= chunks. > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* is 11 bit wide that gives us up to 204= 8 chunks. Should be "11 bits", no? > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */ > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (omtu < NG_L2CAP_MTU_MINIMUM) { > > Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt =A0 = =A0 Fri Dec 30 10:45:00 2011 =A0 =A0 =A0 =A0(r228989) > +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt =A0 = =A0 Fri Dec 30 10:58:14 2011 =A0 =A0 =A0 =A0(r228990) > @@ -82,8 +82,8 @@ WlanMgmtReasonCode ::=3D TEXTUAL-CONVENTIO > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0associationLeave(8), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0associationNotAuthenticated(9), > =A0-- XXX: TODO - FIXME > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dissasocPwrcapBad(10), > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 dissasocSuperchanBad(11), > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 disassocPwrcapBad(10), > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 disassocSuperchanBad(11), This file looks like it might be intended to be machine-readable -- I would worry about changing it without test/review. Perhaps this spelling "error" is even the reason for the XXX comment above. > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ieInvalid(13), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0micFailure(14), > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0fourWayHandshakeTimeout(15), > @@ -579,10 +579,10 @@ wlanIfaceCountryCode OBJECT-TYPE > =A0 =A0 =A0 =A0interface is operating include all environments in the spe= cified > =A0 =A0 =A0 =A0country. > > - =A0 =A0 =A0 2. an ASCII 'O' character, if the country's regulastions ar= e for > + =A0 =A0 =A0 2. an ASCII 'O' character, if the country's regulations are= for > =A0 =A0 =A0 =A0Outdoor environment only. > > - =A0 =A0 =A0 3. an ASCII 'I' character, if the country's regulastions ar= e for > + =A0 =A0 =A0 3. an ASCII 'I' character, if the country's regulations are= for > =A0 =A0 =A0 =A0Indoor environment only." > =A0 =A0 ::=3D { wlanIfaceConfigEntry 2 } > > @@ -634,7 +634,7 @@ wlanIfaceFastFrames OBJECT-TYPE > =A0 =A0 DESCRIPTION > =A0 =A0 =A0 =A0"The value of this object controls whether use of Atheros = Fast > =A0 =A0 =A0 =A0Frames is enabled when when communicating with another Fas= t > - =A0 =A0 =A0 Frames-capable station. The value is only meaningfull for > + =A0 =A0 =A0 Frames-capable station. The value is only meaningful for > =A0 =A0 =A0 =A0interfaces that support Atheros Fast Frames." > =A0 =A0 ::=3D { wlanIfaceConfigEntry 7 } > > @@ -645,7 +645,7 @@ wlanIfaceDturbo OBJECT-TYPE > =A0 =A0 DESCRIPTION > =A0 =A0 =A0 =A0"The value of this object controls whether use of Atheros = Dynamic > =A0 =A0 =A0 =A0Turbo mode is enabled when when communicating with another= Dynamic > - =A0 =A0 =A0 Turbo-capable station. The value is only meaningfull for in= terfaces > + =A0 =A0 =A0 Turbo-capable station. The value is only meaningful for int= erfaces > =A0 =A0 =A0 =A0that support Atheros Dynamic Turbo mode." > =A0 =A0 ::=3D { wlanIfaceConfigEntry 8 } > > @@ -731,7 +731,7 @@ wlanIfaceBeaconMissedThreshold OBJECT-TY > =A0 =A0 MAX-ACCESS read-write > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The value of this object specifies the number of consequti= ve missed > + =A0 =A0 =A0 "The value of this object specifies the number of consecuti= ve missed > =A0 =A0 =A0 =A0beacons before an interface operating in station mode will= attempt > =A0 =A0 =A0 =A0to search for a new access point." > =A0 =A0 DEFVAL =A0 =A0 { 7 } > @@ -788,7 +788,7 @@ wlanIfaceDynamicWds OBJECT-TYPE > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > =A0 =A0 =A0 =A0"The value of this object specifies whether Dynamic WDS (D= WDS) > - =A0 =A0 =A0 support is enabled. The value is only meaningfull for inter= faces > + =A0 =A0 =A0 support is enabled. The value is only meaningful for interf= aces > =A0 =A0 =A0 =A0that support Dynamic WDS." > =A0 =A0 ::=3D { wlanIfaceConfigEntry 21 } > > @@ -798,7 +798,7 @@ wlanIfacePowerSave OBJECT-TYPE > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > =A0 =A0 =A0 =A0"The value of this object specifies whether powersave oper= ation > - =A0 =A0 =A0 is enabled. The value is only meaningfull for interfaces th= at > + =A0 =A0 =A0 is enabled. The value is only meaningful for interfaces tha= t > =A0 =A0 =A0 =A0support powersave operation." > =A0 =A0 ::=3D { wlanIfaceConfigEntry 22 } > > @@ -809,7 +809,7 @@ wlanIfaceApBridge OBJECT-TYPE > =A0 =A0 DESCRIPTION > =A0 =A0 =A0 =A0"The value of this object specifies whether packets betwee= n > =A0 =A0 =A0 =A0wireless clients will be passed directly by an interface > - =A0 =A0 =A0 operating in host ap mode. Disabling it may be usefull in > + =A0 =A0 =A0 operating in host ap mode. Disabling it may be useful in > =A0 =A0 =A0 =A0situations when traffic between wireless clients needs to = be > =A0 =A0 =A0 =A0processed with packet filtering." > =A0 =A0 DEFVAL =A0 =A0 { true } > @@ -1308,7 +1308,7 @@ wlanIfaceChannelFrequency OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The channel frequency setting in Mhz." > + =A0 =A0 =A0 "The channel frequency setting in MHz." > =A0 =A0 ::=3D { wlanIfaceChannelEntry 5 } > > =A0wlanIfaceChannelMaxRegPower OBJECT-TYPE > @@ -2741,7 +2741,7 @@ wlanStatsDwdsMcastDiscard OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of multicast over DWDS frames discared by this = interface." > + =A0 =A0 =A0 "The number of multicast over DWDS frames discarded by this= interface." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 98 } > > =A0wlanStatsHTAssocRejectNoHT OBJECT-TYPE > @@ -2759,7 +2759,7 @@ wlanStatsHTAssocDowngrade OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of times HT was dissallowed for an association = on > + =A0 =A0 =A0 "The number of times HT was disallowed for an association o= n > =A0 =A0 =A0 =A0this interface due to WEP or TKIP requested." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 100 } > > @@ -2769,7 +2769,7 @@ wlanStatsHTAssocRateMismatch OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of times rate mismatch occured furing HT rate s= et > + =A0 =A0 =A0 "The number of times rate mismatch occurred during HT rate = set > =A0 =A0 =A0 =A0handling on this interface." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 101 } > > @@ -2787,7 +2787,7 @@ wlanStatsAMPDUMoved OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of time A-MPDU MSDU moved window occured for th= is > + =A0 =A0 =A0 "The number of time A-MPDU MSDU moved window occurred for t= his > =A0 =A0 =A0 =A0interface." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 103 } > > @@ -2807,7 +2807,7 @@ wlanStatsADDBANoRequest OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of received ADDBA responces frames that were di= scarded > + =A0 =A0 =A0 "The number of received ADDBA responses frames that were di= scarded > =A0 =A0 =A0 =A0by this interface due to no pending ADDBA." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 105 } > > @@ -2817,7 +2817,7 @@ wlanStatsADDBABadToken OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of received ADDBA responce frames that were dis= carded > + =A0 =A0 =A0 "The number of received ADDBA response frames that were dis= carded > =A0 =A0 =A0 =A0by this interface since ADDBA response caused dialogtoken = mismatch." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 106 } > > @@ -2827,7 +2827,7 @@ wlanStatsADDBABadPolicy OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of received ADDBA responce frames that were dis= carded > + =A0 =A0 =A0 "The number of received ADDBA response frames that were dis= carded > =A0 =A0 =A0 =A0by this interface since ADDBA response caused policy misma= tch." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 107 } > > @@ -2877,7 +2877,7 @@ wlanLastDissasocReason OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The last received dissasociate reason on this interface." > + =A0 =A0 =A0 "The last received disassociate reason on this interface." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 113 } > > =A0wlanLastAuthFailReason OBJECT-TYPE > @@ -2942,7 +2942,7 @@ wlanStatsAMPDURexmtFailed OBJECT-TYPE > =A0 =A0 MAX-ACCESS read-only > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > - =A0 =A0 =A0 "The number of A-MPDU frames for which retransmition failed= on > + =A0 =A0 =A0 "The number of A-MPDU frames for which retransmission faile= d on > =A0 =A0 =A0 =A0this interface." > =A0 =A0 ::=3D { wlanIfaceStatisticsEntry 120 } > > @@ -3696,7 +3696,7 @@ wlanMeshDroppedMisaligned OBJECT-TYPE > =A0 =A0 STATUS =A0 =A0 current > =A0 =A0 DESCRIPTION > =A0 =A0 =A0 =A0"The number of frames that were dropped by this interface = due to > - =A0 =A0 =A0 bad alighment." > + =A0 =A0 =A0 bad alignment." > =A0 =A0 ::=3D { wlanMeshStatsEntry 11 } > > =A0-- ---------------------------------------------------------- -- > > Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def =A0 =A0 =A0 =A0F= ri Dec 30 10:45:00 2011 =A0 =A0 =A0 =A0(r228989) > +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/wlan_tree.def =A0 =A0 =A0 =A0F= ri Dec 30 10:58:14 2011 =A0 =A0 =A0 =A0(r228990) > @@ -75,8 +75,8 @@ typedef WlanMgmtReasonCode ENUM ( > =A0 =A0 =A0 =A07 notAssociated > =A0 =A0 =A0 =A08 associationLeave > =A0 =A0 =A0 =A09 associationNotAuthenticated > - =A0 =A0 =A0 10 dissasocPwrcapBad > - =A0 =A0 =A0 11 dissasocSuperchanBad > + =A0 =A0 =A0 10 disassocPwrcapBad > + =A0 =A0 =A0 11 disassocSuperchanBad Hmm, but the same mis-spellings are also changed here (and presumably elsewhere), so maybe it is less risky. > =A0 =A0 =A0 =A013 ieInvalid > =A0 =A0 =A0 =A014 micFailure > =A0 =A0 =A0 =A015 fourWayHandshakeTimeout > > Modified: head/usr.sbin/cron/doc/CHANGES > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/cron/doc/CHANGES =A0 =A0 =A0Fri Dec 30 10:45:00 2011 = =A0 =A0 =A0 =A0(r228989) > +++ head/usr.sbin/cron/doc/CHANGES =A0 =A0 =A0Fri Dec 30 10:58:14 2011 = =A0 =A0 =A0 =A0(r228990) > @@ -1,3 +1,6 @@ > +$FreeBSD$ > +-------- > + > =A0Vixie Cron =A0 =A0 =A0 =A0 =A0 =A0 Changes from V2 to V3 > =A0Paul Vixie > =A029-Dec-1993 > @@ -20,7 +23,7 @@ be reread whenever it changes. > > =A0I also added a "-e" option to crontab(1). =A0Nine people also sent me = diffs > =A0to add this option, but I had already implemented it on my own. =A0I a= ctually > -released an interrim version (V2.2, I think) for limited testing, and go= t a > +released an interim version (V2.2, I think) for limited testing, and got= a Should we really be in the business of modifying Vixie's changelog? > =A0chance to fix a bad security bug in the "-e" option thanks to XXX. > > =A0The daemon used to be extraordinarily sloppy in its use of file descri= ptors. > @@ -57,7 +60,7 @@ which explains why a lot of other people > =A0syslog even when they configured it that way :-). =A0Steve Simmons tol= d me > =A0first, though, so he gets the point. > > -An interrim version of the daemon tried to "stat" every file before > +An interim version of the daemon tried to "stat" every file before > =A0executing it; this turned out to be a horribly bad idea since finding = the > =A0name of a file from a shell command is a hard job (that's why we have > =A0shells, right?) =A0I removed this bogus code. =A0Dave Burgess gets the= point. > > Modified: head/usr.sbin/newsyslog/newsyslog.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/newsyslog/newsyslog.c Fri Dec 30 10:45:00 2011 =A0 =A0 = =A0 =A0(r228989) > +++ head/usr.sbin/newsyslog/newsyslog.c Fri Dec 30 10:58:14 2011 =A0 =A0 = =A0 =A0(r228990) > @@ -1597,7 +1597,7 @@ delete_oldest_timelog(const struct conf_ > =A0} > > =A0/* > - * Generate a log filename, when using clasic filenames. > + * Generate a log filename, when using classic filenames. > =A0*/ > =A0static void > =A0gen_clasiclog_fname(char *fname, size_t fname_sz, const char *archive_= dir, > @@ -1612,7 +1612,7 @@ gen_clasiclog_fname(char *fname, size_t > =A0} > > =A0/* > - * Delete a rotated logfiles, when using clasic filenames. > + * Delete a rotated logfiles, when using classic filenames. "a logfiles" is inconsistent. Without looking up the implementation, I'm going to guess that "a rotated logfile" is correct. > =A0*/ > =A0static void > =A0delete_clasiclog(const char *archive_dir, const char *namepart, int nu= mlog_c) > > Modified: head/usr.sbin/ntp/doc/ntp.conf.5 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.sbin/ntp/doc/ntp.conf.5 =A0 =A0Fri Dec 30 10:45:00 2011 =A0 = =A0 =A0 =A0(r228989) > +++ head/usr.sbin/ntp/doc/ntp.conf.5 =A0 =A0Fri Dec 30 10:58:14 2011 =A0 = =A0 =A0 =A0(r228990) > @@ -783,7 +783,7 @@ The remaining files are necessary only f > =A0Autokey protocol. > =A0.Pp > =A0Certificates imported from OpenSSL or public certificate > -authorities have certian limitations. > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** Hmm, that's unfortunate. Pulling out a svn client, it looks like: usr.sbin/pkg_install/lib/plist.c changes a misspelled form to the still-misspelled "occurrance" (not occurrence) Thanks for doing this cleanup along with the encoding cleanup! -Ben Kaduk From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:54:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 7CC3E1065673; Fri, 30 Dec 2011 19:54:44 +0000 (UTC) Date: Fri, 30 Dec 2011 19:54:44 +0000 From: Alexey Dokuchaev To: Ben Kaduk Message-ID: <20111230195444.GA25204@FreeBSD.org> References: <201112301058.pBUAwFsw010478@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ulrich Spoerlein Subject: Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:54:44 -0000 On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote: > On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein wrote: > > - š š š š š š š š* is 11 bit wide that gives us upto 2048 chunks. > > + š š š š š š š š* is 11 bit wide that gives us up to 2048 chunks. > > Should be "11 bits", no? I'm not a native speaker, but I think "11 bit wide" is correct here. I could have probably got into specifics, but simple googling for "16 ton shit dropped on me" yielded 525M results, while the same phrase with "tons" only 18,9M. :-^ ./danfe From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:58:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E66D5106566C; Fri, 30 Dec 2011 19:58:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE1048FC25; Fri, 30 Dec 2011 19:58:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJw6IV027805; Fri, 30 Dec 2011 19:58:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJw6q0027803; Fri, 30 Dec 2011 19:58:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301958.pBUJw6q0027803@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229016 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:58:07 -0000 Author: kib Date: Fri Dec 30 19:58:06 2011 New Revision: 229016 URL: http://svn.freebsd.org/changeset/base/229016 Log: MFC r228178: If alloc_unr() call in the pipe_create() failed, then pipe->pipe_ino is -1. But, because ino_t is unsigned, this case was not covered by the test ino > 0 in pipeclose(), leading to the free_unr(-1). Fix it by explicitely comparing with 0 and -1. Do no access freed memory, the inode number was cached to prevent access to cpipe after it possibly was freed, but I failed to commit the right patch. Modified: stable/9/sys/kern/sys_pipe.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/sys_pipe.c ============================================================================== --- stable/9/sys/kern/sys_pipe.c Fri Dec 30 19:24:53 2011 (r229015) +++ stable/9/sys/kern/sys_pipe.c Fri Dec 30 19:58:06 2011 (r229016) @@ -1554,8 +1554,8 @@ pipeclose(cpipe) } else PIPE_UNLOCK(cpipe); - if (ino > 0) - free_unr(pipeino_unr, cpipe->pipe_ino); + if (ino != 0 && ino != (ino_t)-1) + free_unr(pipeino_unr, ino); } /*ARGSUSED*/ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:59:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4124E106564A; Fri, 30 Dec 2011 19:59:16 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id 188558FC14; Fri, 30 Dec 2011 19:59:15 +0000 (UTC) Received: from s0106005004e13421.vs.shawcable.net ([70.71.175.212] helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1Rgi3T-000DJP-UJ; Fri, 30 Dec 2011 11:23:52 -0800 Message-ID: <4EFE0FC1.6070909@FreeBSD.org> Date: Fri, 30 Dec 2011 11:23:45 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Andre Oppermann References: <201110071343.p97Dh1c9013228@svn.freebsd.org> In-Reply-To: <201110071343.p97Dh1c9013228@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn: head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:59:16 -0000 Won't this break whole lot of third-party software, which expects FreeBSD to be slightly different in this regards? Just curious. -Maxim On 10/7/2011 6:43 AM, Andre Oppermann wrote: > Author: andre > Date: Fri Oct 7 13:43:01 2011 > New Revision: 226105 > URL: http://svn.freebsd.org/changeset/base/226105 > > Log: > Add back the IP header length to the total packet length field on > raw IP sockets. It was deducted in ip_input() in preparation for > protocols interested only in the payload. > > On raw sockets the IP header should be delivered as it at came in > from the network except for the byte order swaps in some fields. > > This brings us in line with all other OS'es that provide raw > IP sockets. > > Reported by: Matthew Cini Sarreo > MFC after: 3 days > > Modified: > head/sys/netinet/raw_ip.c > > Modified: head/sys/netinet/raw_ip.c > ============================================================================== > --- head/sys/netinet/raw_ip.c Fri Oct 7 13:16:21 2011 (r226104) > +++ head/sys/netinet/raw_ip.c Fri Oct 7 13:43:01 2011 (r226105) > @@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off) > last = NULL; > > ifp = m->m_pkthdr.rcvif; > + /* > + * Add back the IP header length which was > + * removed by ip_input(). Raw sockets do > + * not modify the packet except for some > + * byte order swaps. > + */ > + ip->ip_len += off; > > hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr, > ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); > > From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 19:59:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA0051065672; Fri, 30 Dec 2011 19:59:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D86E18FC0C; Fri, 30 Dec 2011 19:59:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUJxswu027902; Fri, 30 Dec 2011 19:59:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUJxsaL027900; Fri, 30 Dec 2011 19:59:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112301959.pBUJxsaL027900@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 19:59:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229017 - stable/9/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 19:59:55 -0000 Author: kib Date: Fri Dec 30 19:59:54 2011 New Revision: 229017 URL: http://svn.freebsd.org/changeset/base/229017 Log: MFC r228375: Typo. Modified: stable/9/libexec/rtld-elf/rtld.h Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/rtld.h ============================================================================== --- stable/9/libexec/rtld-elf/rtld.h Fri Dec 30 19:58:06 2011 (r229016) +++ stable/9/libexec/rtld-elf/rtld.h Fri Dec 30 19:59:54 2011 (r229017) @@ -246,7 +246,7 @@ typedef struct Struct_Obj_Entry { /* Flags to be passed into symlook_ family of functions. */ #define SYMLOOK_IN_PLT 0x01 /* Lookup for PLT symbol */ -#define SYMLOOK_DLSYM 0x02 /* Return newes versioned symbol. Used by +#define SYMLOOK_DLSYM 0x02 /* Return newest versioned symbol. Used by dlsym. */ /* Flags for load_object(). */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:01:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BFF1106564A; Fri, 30 Dec 2011 20:01:15 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from mailhost.dlr.de (mailhost.dlr.de [129.247.252.32]) by mx1.freebsd.org (Postfix) with ESMTP id 757408FC1D; Fri, 30 Dec 2011 20:01:14 +0000 (UTC) Received: from DLREXHUB01.intra.dlr.de (172.21.152.130) by dlrexedge01.dlr.de (172.21.163.100) with Microsoft SMTP Server (TLS) id 14.1.355.2; Fri, 30 Dec 2011 20:50:13 +0100 Received: from beagle.kn.op.dlr.de (129.247.178.136) by smtp.dlr.de (172.21.152.151) with Microsoft SMTP Server (TLS) id 14.1.355.2; Fri, 30 Dec 2011 20:50:19 +0100 Date: Fri, 30 Dec 2011 20:50:16 +0100 From: Harti Brandt X-X-Sender: brandt_h@beagle.kn.op.dlr.de To: Ben Kaduk In-Reply-To: Message-ID: <20111230204653.Y31442@beagle.kn.op.dlr.de> References: <201112301058.pBUAwFsw010478@svn.freebsd.org> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="1964543108-470614106-1325274616=:31442" X-Originating-IP: [129.247.178.136] Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ulrich Spoerlein Subject: Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: "SVN commit messages 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, 30 Dec 2011 20:01:15 -0000 --1964543108-470614106-1325274616=:31442 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 30 Dec 2011, Ben Kaduk wrote: BK>On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein wrot= e: BK>> Author: uqs BK>> Date: Fri Dec 30 10:58:14 2011 BK>> New Revision: 228990 BK>> URL: http://svn.freebsd.org/changeset/base/228990 BK>> BK>> Log: BK>> =9ASpelling fixes for usr.sbin/ BK>> [snip] BK>> Modified: head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.= txt BK>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D BK>> --- head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt = =9A =9A Fri Dec 30 10:45:00 2011 =9A =9A =9A =9A(r228989) BK>> +++ head/usr.sbin/bsnmpd/modules/snmp_wlan/BEGEMOT-WIRELESS-MIB.txt = =9A =9A Fri Dec 30 10:58:14 2011 =9A =9A =9A =9A(r228990) BK>> @@ -82,8 +82,8 @@ WlanMgmtReasonCode ::=3D TEXTUAL-CONVENTIO BK>> =9A =9A =9A =9A =9A =9A =9A =9A =9A =9AassociationLeave(8), BK>> =9A =9A =9A =9A =9A =9A =9A =9A =9A =9AassociationNotAuthenticated(9), BK>> =9A-- XXX: TODO - FIXME BK>> - =9A =9A =9A =9A =9A =9A =9A =9A =9A dissasocPwrcapBad(10), BK>> - =9A =9A =9A =9A =9A =9A =9A =9A =9A dissasocSuperchanBad(11), BK>> + =9A =9A =9A =9A =9A =9A =9A =9A =9A disassocPwrcapBad(10), BK>> + =9A =9A =9A =9A =9A =9A =9A =9A =9A disassocSuperchanBad(11), BK> BK>This file looks like it might be intended to be machine-readable -- I BK>would worry about changing it without test/review. BK>Perhaps this spelling "error" is even the reason for the XXX comment abo= ve. Absolutely. If there is a spelling error in an SNMP MIB outside comments=20 or description strings it must stay there. Otherwise applications reading= =20 that file will break. This is also true for the corresponding .def file. harti --1964543108-470614106-1325274616=:31442-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:01:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D944910656D3; Fri, 30 Dec 2011 20:01:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C76BF8FC1B; Fri, 30 Dec 2011 20:01:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUK1Qkq028021; Fri, 30 Dec 2011 20:01:26 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUK1QxG028019; Fri, 30 Dec 2011 20:01:26 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302001.pBUK1QxG028019@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229018 - stable/8/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:01:27 -0000 Author: kib Date: Fri Dec 30 20:01:26 2011 New Revision: 229018 URL: http://svn.freebsd.org/changeset/base/229018 Log: MFC r228375: Typo. Modified: stable/8/libexec/rtld-elf/rtld.h Directory Properties: stable/8/libexec/rtld-elf/ (props changed) Modified: stable/8/libexec/rtld-elf/rtld.h ============================================================================== --- stable/8/libexec/rtld-elf/rtld.h Fri Dec 30 19:59:54 2011 (r229017) +++ stable/8/libexec/rtld-elf/rtld.h Fri Dec 30 20:01:26 2011 (r229018) @@ -239,7 +239,7 @@ typedef struct Struct_Obj_Entry { /* Flags to be passed into symlook_ family of functions. */ #define SYMLOOK_IN_PLT 0x01 /* Lookup for PLT symbol */ -#define SYMLOOK_DLSYM 0x02 /* Return newes versioned symbol. Used by +#define SYMLOOK_DLSYM 0x02 /* Return newest versioned symbol. Used by dlsym. */ /* Flags for load_object(). */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:02:52 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12917106566B; Fri, 30 Dec 2011 20:02:52 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3BD8FC15; Fri, 30 Dec 2011 20:02:51 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pBUK2nCk025819; Sat, 31 Dec 2011 00:02:49 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pBUK2nXX025818; Sat, 31 Dec 2011 00:02:49 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 31 Dec 2011 00:02:49 +0400 From: Gleb Smirnoff To: Maxim Sobolev Message-ID: <20111230200249.GF12721@FreeBSD.org> References: <201110071343.p97Dh1c9013228@svn.freebsd.org> <4EFE0FC1.6070909@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <4EFE0FC1.6070909@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann Subject: Re: svn: head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:02:52 -0000 On Fri, Dec 30, 2011 at 11:23:45AM -0800, Maxim Sobolev wrote: M> Won't this break whole lot of third-party software, which expects M> FreeBSD to be slightly different in this regards? Just curious. Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix this software (at least in ports). The MFC to stable/9 of r226105 was back out. M> -Maxim M> M> On 10/7/2011 6:43 AM, Andre Oppermann wrote: M> > Author: andre M> > Date: Fri Oct 7 13:43:01 2011 M> > New Revision: 226105 M> > URL: http://svn.freebsd.org/changeset/base/226105 M> > M> > Log: M> > Add back the IP header length to the total packet length field on M> > raw IP sockets. It was deducted in ip_input() in preparation for M> > protocols interested only in the payload. M> > M> > On raw sockets the IP header should be delivered as it at came in M> > from the network except for the byte order swaps in some fields. M> > M> > This brings us in line with all other OS'es that provide raw M> > IP sockets. M> > M> > Reported by: Matthew Cini Sarreo M> > MFC after: 3 days M> > M> > Modified: M> > head/sys/netinet/raw_ip.c M> > M> > Modified: head/sys/netinet/raw_ip.c M> > ============================================================================== M> > --- head/sys/netinet/raw_ip.c Fri Oct 7 13:16:21 2011 (r226104) M> > +++ head/sys/netinet/raw_ip.c Fri Oct 7 13:43:01 2011 (r226105) M> > @@ -289,6 +289,13 @@ rip_input(struct mbuf *m, int off) M> > last = NULL; M> > M> > ifp = m->m_pkthdr.rcvif; M> > + /* M> > + * Add back the IP header length which was M> > + * removed by ip_input(). Raw sockets do M> > + * not modify the packet except for some M> > + * byte order swaps. M> > + */ M> > + ip->ip_len += off; M> > M> > hash = INP_PCBHASH_RAW(proto, ip->ip_src.s_addr, M> > ip->ip_dst.s_addr, V_ripcbinfo.ipi_hashmask); M> > M> > -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:04:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F519106566C for ; Fri, 30 Dec 2011 20:04:12 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from glenbarber.us (onyx.glenbarber.us [199.48.134.227]) by mx1.freebsd.org (Postfix) with SMTP id 410998FC14 for ; Fri, 30 Dec 2011 20:04:12 +0000 (UTC) Received: (qmail 65388 invoked by uid 0); 30 Dec 2011 15:04:11 -0500 Received: from unknown (HELO glenbarber.us) (75.146.225.65) by 0 with SMTP; 30 Dec 2011 15:04:11 -0500 Date: Fri, 30 Dec 2011 15:04:05 -0500 From: Glen Barber To: Alexey Dokuchaev Message-ID: <20111230200405.GA293@glenbarber.us> References: <201112301058.pBUAwFsw010478@svn.freebsd.org> <20111230195444.GA25204@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wRRV7LY7NUeQGEoC" Content-Disposition: inline In-Reply-To: <20111230195444.GA25204@FreeBSD.org> X-Operating-System: Darwin 10.8.0 i386 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ben Kaduk , Ulrich Spoerlein Subject: Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:04:12 -0000 --wRRV7LY7NUeQGEoC Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 30, 2011 at 07:54:44PM +0000, Alexey Dokuchaev wrote: > On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote: > > On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein wro= te: > > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* is 11 bit wide that gives us upto = 2048 chunks. > > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* is 11 bit wide that gives us up to= 2048 chunks. > >=20 > > Should be "11 bits", no? >=20 > I'm not a native speaker, but I think "11 bit wide" is correct here. I > could have probably got into specifics, but simple googling for "16 ton s= hit > dropped on me" yielded 525M results, while the same phrase with "tons" on= ly > 18,9M. :-^ >=20 Considering the full context, maybe it would be better written as: rsp_cs is an 11 bit wide field that gives ... Glen --wRRV7LY7NUeQGEoC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (Darwin) iQEcBAEBCAAGBQJO/hk1AAoJEFJPDDeguUaj0s0IAJuekx54dfRBeJMC3ezVz38b BCMJmJHvYHUjP9nqIjelkjP/t95fMAn+feyWGTRB8cqq28Jn6v+eP6wpABIQMSei 1BnEvxqXtX3qmrpsWj2hpjb6/HcAQFc3q0hzoWz6PHgeIIAg0AovLDCj213oKg69 TR6O/EtZu8X+QoHj2WKNO6bn7R9J0dGIDwb3yWsXs/T+uk4blndbT4/AaivVL/vi 5HPL1CtmjvAYkOJE7h2NIEeODmi6wvjxy548PT5WlKkJmA/hf57KyRIZG4jK7LQe cYJc346cfnXw+AOdxs7Xpo+c2qnjNXo8EKCLnBgd6RbUg6gIS6ruEIB/l6ha2sk= =spZZ -----END PGP SIGNATURE----- --wRRV7LY7NUeQGEoC-- From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:06:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EA94106566C; Fri, 30 Dec 2011 20:06:44 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5D00B8FC18; Fri, 30 Dec 2011 20:06:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUK6i87028233; Fri, 30 Dec 2011 20:06:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUK6iB8028231; Fri, 30 Dec 2011 20:06:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302006.pBUK6iB8028231@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:06:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229019 - stable/9/sys/ddb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:06:44 -0000 Author: kib Date: Fri Dec 30 20:06:43 2011 New Revision: 229019 URL: http://svn.freebsd.org/changeset/base/229019 Log: MFC r228376: Typo. Modified: stable/9/sys/ddb/db_thread.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ddb/db_thread.c ============================================================================== --- stable/9/sys/ddb/db_thread.c Fri Dec 30 20:01:26 2011 (r229018) +++ stable/9/sys/ddb/db_thread.c Fri Dec 30 20:06:43 2011 (r229019) @@ -109,7 +109,7 @@ db_show_threads(db_expr_t addr, boolean_ * Lookup a thread based on a db expression address. We assume that the * address was parsed in hexadecimal. We reparse the address in decimal * first and try to treat it as a thread ID to find an associated thread. - * If that fails and check_pid is true, we terat the decimal value as a + * If that fails and check_pid is true, we treat the decimal value as a * PID. If that matches a process, we return the first thread in that * process. Otherwise, we treat the addr as a pointer to a thread. */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:11:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F02F1065677; Fri, 30 Dec 2011 20:11:26 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id E9A068FC15; Fri, 30 Dec 2011 20:11:25 +0000 (UTC) Received: by yenl9 with SMTP id l9so9314538yen.13 for ; Fri, 30 Dec 2011 12:11:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=o1VQanTJSwRu9cJ3O4VTSsx7cbBDs0QjzsP8XMmK7ZI=; b=Sd0rPB1F/8psyZ19l1YRqyNCvNPvglNTOj5QcWxmZdVNcQB/tyO4T/2mgkM4OC5SSk uC+sgogvbpRfjJ/CfzrxctfwIcAQEmtBoiMej6K1/FRwSzeu0OIHCZ/Ls8rqnMe1ZAqH vx6w166XptjTvqWJ2uONZ5rl4K3G0/XNAmJU4= MIME-Version: 1.0 Received: by 10.236.173.40 with SMTP id u28mr7631548yhl.15.1325275885148; Fri, 30 Dec 2011 12:11:25 -0800 (PST) Received: by 10.236.110.40 with HTTP; Fri, 30 Dec 2011 12:11:25 -0800 (PST) In-Reply-To: <201112301102.pBUB2fMb010759@svn.freebsd.org> References: <201112301102.pBUB2fMb010759@svn.freebsd.org> Date: Fri, 30 Dec 2011 15:11:25 -0500 Message-ID: From: Ben Kaduk To: Ulrich Spoerlein Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228992 - in head/usr.bin: csup finger fstat indent ipcs lex limits locate/locate login mail make man ncplogin netstat pr rpcgen rpcinfo systat talk tip/tip top vgrind xlint/lint1 xlint... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:11:26 -0000 On Fri, Dec 30, 2011 at 6:02 AM, Ulrich Spoerlein wrote: > Author: uqs > Date: Fri Dec 30 11:02:40 2011 > New Revision: 228992 > URL: http://svn.freebsd.org/changeset/base/228992 > > Log: > =A0Spelling fixes for usr.bin/ > > > Modified: head/usr.bin/lex/NEWS > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.bin/lex/NEWS =A0 =A0 =A0 Fri Dec 30 10:59:15 2011 =A0 =A0 = =A0 =A0(r228991) > +++ head/usr.bin/lex/NEWS =A0 =A0 =A0 Fri Dec 30 11:02:40 2011 =A0 =A0 = =A0 =A0(r228992) > @@ -1,3 +1,5 @@ > +$FreeBSD$ > + NEWS feels pretty similar to CHANGES, to me (viz r228990's comments) > =A0Changes between release 2.5.4 (11Sep96) and release 2.5.3: > > =A0 =A0 =A0 =A0- Fixed a bug introduced in 2.5.3 that blew it when a call > @@ -944,7 +946,7 @@ Changes between 2.3 (full) release of 28 > =A0 =A0 =A0 =A0 =A0given. =A0To specify an end-of-file action for just th= e initial > =A0 =A0 =A0 =A0 =A0state, use <>. > > - =A0 =A0 =A0 - -d debug output is now contigent on the global yy_flex_de= bug > + =A0 =A0 =A0 - -d debug output is now contingent on the global yy_flex_d= ebug > =A0 =A0 =A0 =A0 =A0being set to a non-zero value, which it is by default. > > =A0 =A0 =A0 =A0- A new macro, YY_USER_INIT, is provided for the user to s= pecify > @@ -987,7 +989,7 @@ Changes between 2.3 (full) release of 28 > =A0 =A0 =A0 =A0- yy_switch_to_buffer() can be used in the yywrap() macro/= routine. > > =A0 =A0 =A0 =A0- flex scanners do not use stdio for their input, and henc= e when > - =A0 =A0 =A0 =A0 writing an interactive scanner one must explictly call = fflush() > + =A0 =A0 =A0 =A0 writing an interactive scanner one must explicitly call= fflush() > =A0 =A0 =A0 =A0 =A0after writing out a prompt. > > =A0 =A0 =A0 =A0- flex scanner can be made reentrant (after a fashion) by = using > > Modified: head/usr.bin/locate/locate/util.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/locate/locate/util.c =A0 Fri Dec 30 10:59:15 2011 =A0 = =A0 =A0 =A0(r228991) > +++ head/usr.bin/locate/locate/util.c =A0 Fri Dec 30 11:02:40 2011 =A0 = =A0 =A0 =A0(r228992) > @@ -218,11 +218,11 @@ tolower_word(word) > > > =A0/* > - * Read integer from mmap pointer. > - * Essential a simple =A0``return *(int *)p'' but avoid sigbus > + * Read integer from mmap pointer. > + * Essential a simple =A0``return *(int *)p'' but avoid sigbus I feel like this wants to be "Essentially ... avoids". (Also, is trailing whitespace really "spelling"?) > =A0* for integer alignment (SunOS 4.x, 5.x). > =A0* > - * Convert network byte order to host byte order if neccessary. > + * Convert network byte order to host byte order if necessary. > =A0* So we can read on FreeBSD/i386 (little endian) a locate database > =A0* which was built on SunOS/sparc (big endian). > =A0*/ > @@ -254,7 +254,7 @@ getwm(p) > =A0/* > =A0* Read integer from stream. > =A0* > - * Convert network byte order to host byte order if neccessary. > + * Convert network byte order to host byte order if necessary. > =A0* So we can read on FreeBSD/i386 (little endian) a locate database > =A0* which was built on SunOS/sparc (big endian). > =A0*/ > > Modified: head/usr.bin/mail/main.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/mail/main.c =A0 =A0Fri Dec 30 10:59:15 2011 =A0 =A0 =A0 = =A0(r228991) > +++ head/usr.bin/mail/main.c =A0 =A0Fri Dec 30 11:02:40 2011 =A0 =A0 =A0 = =A0(r228992) > @@ -259,7 +259,7 @@ Usage: %s [-dEiInv] [-s subject] [-c cc- > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (ef =3D=3D NULL) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ef =3D "%"; > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (setfile(ef) <=3D 0) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Either an error has occu= red, or no mail */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* Either an error has occu= rted, or no mail */ Just "occurred", no? > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0exit(1); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0else > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0exit(0); > > Modified: head/usr.bin/mail/util.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/mail/util.c =A0 =A0Fri Dec 30 10:59:15 2011 =A0 =A0 =A0 = =A0(r228991) > +++ head/usr.bin/mail/util.c =A0 =A0Fri Dec 30 11:02:40 2011 =A0 =A0 =A0 = =A0(r228992) > @@ -550,7 +550,7 @@ newname: > =A0} > > =A0/* > - * Count the occurances of c in str > + * Count the occurrances of c in str "occurrences", again. > =A0*/ > =A0int > =A0charcount(char *str, int c) > > Modified: head/usr.bin/talk/ctl_transact.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.bin/talk/ctl_transact.c =A0 =A0Fri Dec 30 10:59:15 2011 =A0 = =A0 =A0 =A0(r228991) > +++ head/usr.bin/talk/ctl_transact.c =A0 =A0Fri Dec 30 11:02:40 2011 =A0 = =A0 =A0 =A0(r228992) > @@ -46,7 +46,7 @@ static const char sccsid[] =3D "@(#)ctl_tr > > =A0/* > =A0* SOCKDGRAM is unreliable, so we must repeat messages if we have > - * not recieved an acknowledgement within a reasonable amount > + * not received an acknowledgement within a reasonable amount Merriam-Webster thinks it's "acknowledgment", but I always have to double-check this one. > =A0* of time > =A0*/ > =A0void > > Modified: head/usr.bin/yacc/NEW_FEATURES > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=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/usr.bin/yacc/NEW_FEATURES =A0 =A0 =A0Fri Dec 30 10:59:15 2011 = =A0 =A0 =A0 =A0(r228991) > +++ head/usr.bin/yacc/NEW_FEATURES =A0 =A0 =A0Fri Dec 30 11:02:40 2011 = =A0 =A0 =A0 =A0(r228992) > @@ -1,3 +1,5 @@ > +$FreeBSD$ > + NEWS, CHANGES, NEW_FEATURES, all similar, I suppose. -Ben Kaduk From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:12:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E1C5106564A; Fri, 30 Dec 2011 20:12:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F05AD8FC13; Fri, 30 Dec 2011 20:12:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKCoRM028467; Fri, 30 Dec 2011 20:12:50 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKCopa028465; Fri, 30 Dec 2011 20:12:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302012.pBUKCopa028465@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229020 - stable/8/sys/ddb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:12:51 -0000 Author: kib Date: Fri Dec 30 20:12:50 2011 New Revision: 229020 URL: http://svn.freebsd.org/changeset/base/229020 Log: MFC r228376: Typo. Modified: stable/8/sys/ddb/db_thread.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/ddb/db_thread.c ============================================================================== --- stable/8/sys/ddb/db_thread.c Fri Dec 30 20:06:43 2011 (r229019) +++ stable/8/sys/ddb/db_thread.c Fri Dec 30 20:12:50 2011 (r229020) @@ -109,7 +109,7 @@ db_show_threads(db_expr_t addr, boolean_ * Lookup a thread based on a db expression address. We assume that the * address was parsed in hexadecimal. We reparse the address in decimal * first and try to treat it as a thread ID to find an associated thread. - * If that fails and check_pid is true, we terat the decimal value as a + * If that fails and check_pid is true, we treat the decimal value as a * PID. If that matches a process, we return the first thread in that * process. Otherwise, we treat the addr as a pointer to a thread. */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:14:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B445106566B for ; Fri, 30 Dec 2011 20:14:30 +0000 (UTC) (envelope-from bounces+73574-8822-svn-src-all=freebsd.org@sendgrid.me) Received: from o1.shared.sendgrid.net (o1.shared.sendgrid.net [74.63.231.244]) by mx1.freebsd.org (Postfix) with SMTP id 435C88FC0C for ; Fri, 30 Dec 2011 20:14:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=EEP53c/7G7OcqR6oPvFfgEhSW5M=; b=T/UdCwepR6uUJLBYgf7F8aMw1mrr E/NDVzU9yrTYBMdQ9Ke/ppGgSd17TNC0wiQa0tVtn0oEv2kBiBXH6XE8lkdvJgE4 BOHcwqw/a7mVCDlB8ESUx6Avd9nYqdAaVFuV4HKv3D2h7GP7Ctea40VNKDWYGcOG tCqpqBijO6nc2RY= Received: by 10.41.149.113 with SMTP id f04-10.5649.4EFE1851C Fri, 30 Dec 2011 20:00:17 +0000 (UTC) Received: from mail.tarsnap.com (unknown [10.41.149.212]) by i04-04 (SG) with ESMTP id 4efe16e9.3ab9.1407a42 for ; Fri, 30 Dec 2011 19:54:17 +0000 (UTC) Received: (qmail 51786 invoked from network); 30 Dec 2011 19:59:25 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 30 Dec 2011 19:59:25 -0000 Received: (qmail 35801 invoked from network); 30 Dec 2011 19:59:24 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 30 Dec 2011 19:59:24 -0000 Message-ID: <4EFE181C.5070009@freebsd.org> Date: Fri, 30 Dec 2011 11:59:24 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111112 Thunderbird/8.0 MIME-Version: 1.0 To: Alexey Dokuchaev References: <201112301058.pBUAwFsw010478@svn.freebsd.org> <20111230195444.GA25204@FreeBSD.org> In-Reply-To: <20111230195444.GA25204@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit X-Sendgrid-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PGZLRH7Rl7PC1/aqPaR/Li2X34NcmhQaYuJaTx/QvnqRmQNIi9kKCqXYHW34/rF8oRjq/wlXx4GT2VVx6wJ1ij15AkHzNA4qK8dODfGW8is6OYE5dnAZO5Wy+fP1bMef+M= Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ben Kaduk , Ulrich Spoerlein Subject: Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:14:30 -0000 On 12/30/11 11:54, Alexey Dokuchaev wrote: > On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote: >> On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein wrote: >>> - * is 11 bit wide that gives us upto 2048 chunks. >>> + * is 11 bit wide that gives us up to 2048 chunks. >> >> Should be "11 bits", no? > > I'm not a native speaker, but I think "11 bit wide" is correct here. I am a native speaker, and it's "11 bits wide". English is an odd language: An "11 bit wide field" is "11 bits wide". (Similarly, a 45 *foot* long bus is 45 *feet* long.) -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:18:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48EB3106564A; Fri, 30 Dec 2011 20:18:02 +0000 (UTC) (envelope-from slw@zxy.spb.ru) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) by mx1.freebsd.org (Postfix) with ESMTP id E9D708FC18; Fri, 30 Dec 2011 20:18:01 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.69 (FreeBSD)) (envelope-from ) id 1Rgitu-0003S8-J1; Sat, 31 Dec 2011 00:18:02 +0400 Date: Sat, 31 Dec 2011 00:18:02 +0400 From: Slawa Olhovchenkov To: Peter Grehan Message-ID: <20111230201802.GA18564@zxy.spb.ru> References: <201111180543.pAI5hh0I053042@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201111180543.pAI5hh0I053042@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r227652 - in head: share/man/man4 sys/dev/virtio sys/dev/virtio/balloon sys/dev/virtio/block sys/dev/virtio/network sys/dev/virtio/pci sys/modules sys/modules/virtio sys/modules/virtio/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:18:02 -0000 On Fri, Nov 18, 2011 at 05:43:43AM +0000, Peter Grehan wrote: > Author: grehan > Date: Fri Nov 18 05:43:43 2011 > New Revision: 227652 > URL: http://svn.freebsd.org/changeset/base/227652 > > Log: > Import virtio base, PCI front-end, and net/block/balloon drivers. > Tested on Qemu/KVM, VirtualBox, and BHyVe. > > Currently built as modules-only on i386/amd64. Man pages not yet hooked > up, pending review. > > Submitted by: Bryan Venteicher bryanv at daemoninthecloset dot org > Reviewed by: bz > MFC after: 4 weeks or so MFC ready? From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:21:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ABBE106566C; Fri, 30 Dec 2011 20:21:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38DA58FC12; Fri, 30 Dec 2011 20:21:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKLsnh028783; Fri, 30 Dec 2011 20:21:54 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKLsXY028781; Fri, 30 Dec 2011 20:21:54 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302021.pBUKLsXY028781@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229021 - stable/9/sys/fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:21:54 -0000 Author: kib Date: Fri Dec 30 20:21:53 2011 New Revision: 229021 URL: http://svn.freebsd.org/changeset/base/229021 Log: MFC r227393: Lock the thread lock around block that retrieves td_wmesg. Otherwise, procfs could see a thread with assigned td_wchan but still NULL td_wmesg. Modified: stable/9/sys/fs/procfs/procfs_status.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 20:12:50 2011 (r229020) +++ stable/9/sys/fs/procfs/procfs_status.c Fri Dec 30 20:21:53 2011 (r229021) @@ -113,12 +113,14 @@ procfs_doprocstatus(PFS_FILL_ARGS) } tdfirst = FIRST_THREAD_IN_PROC(p); + thread_lock(tdfirst); if (tdfirst->td_wchan != NULL) { KASSERT(tdfirst->td_wmesg != NULL, ("wchan %p has no wmesg", tdfirst->td_wchan)); wmesg = tdfirst->td_wmesg; } else wmesg = "nochan"; + thread_unlock(tdfirst); if (p->p_flag & P_INMEM) { struct timeval start, ut, st; From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:24:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41B1F106566C; Fri, 30 Dec 2011 20:24:53 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FE418FC16; Fri, 30 Dec 2011 20:24:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKOrAB028929; Fri, 30 Dec 2011 20:24:53 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKOqha028927; Fri, 30 Dec 2011 20:24:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302024.pBUKOqha028927@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:24:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229022 - stable/8/sys/fs/procfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:24:53 -0000 Author: kib Date: Fri Dec 30 20:24:52 2011 New Revision: 229022 URL: http://svn.freebsd.org/changeset/base/229022 Log: MFC r227393: Lock the thread lock around block that retrieves td_wmesg. Otherwise, procfs could see a thread with assigned td_wchan but still NULL td_wmesg. Modified: stable/8/sys/fs/procfs/procfs_status.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/fs/procfs/procfs_status.c ============================================================================== --- stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 20:21:53 2011 (r229021) +++ stable/8/sys/fs/procfs/procfs_status.c Fri Dec 30 20:24:52 2011 (r229022) @@ -113,12 +113,14 @@ procfs_doprocstatus(PFS_FILL_ARGS) } tdfirst = FIRST_THREAD_IN_PROC(p); + thread_lock(tdfirst); if (tdfirst->td_wchan != NULL) { KASSERT(tdfirst->td_wmesg != NULL, ("wchan %p has no wmesg", tdfirst->td_wchan)); wmesg = tdfirst->td_wmesg; } else wmesg = "nochan"; + thread_unlock(tdfirst); if (p->p_flag & P_INMEM) { struct timeval start, ut, st; From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:33:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EE84106566C; Fri, 30 Dec 2011 20:33:54 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3B8CF8FC08; Fri, 30 Dec 2011 20:33:53 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so15991695obb.13 for ; Fri, 30 Dec 2011 12:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=OvAJlXna3ilbGzz6rs1e58HQhI/YCI9oxYU6NuOearM=; b=d3bp0Ej8FPCsX4HLsIJEEZnEGcr9SMDG7xqhi1+BXY2T7bImlH5ckflKrIQ8FBA/n+ IDvQYawd8if/2K2T7eCQrMmWUT52LuBoqZLVyJk7A2BfV7SImjP/Zhn42PwnL87bGWCd yWkIuOoU5VRg5/Oe9xPlso60DfwvHUFMM7xuc= MIME-Version: 1.0 Received: by 10.182.193.99 with SMTP id hn3mr34869764obc.61.1325277233575; Fri, 30 Dec 2011 12:33:53 -0800 (PST) Received: by 10.182.152.6 with HTTP; Fri, 30 Dec 2011 12:33:53 -0800 (PST) In-Reply-To: <20111230195444.GA25204@FreeBSD.org> References: <201112301058.pBUAwFsw010478@svn.freebsd.org> <20111230195444.GA25204@FreeBSD.org> Date: Fri, 30 Dec 2011 12:33:53 -0800 Message-ID: From: Garrett Cooper To: Alexey Dokuchaev Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ben Kaduk , Ulrich Spoerlein Subject: Re: svn commit: r228990 - in head/usr.sbin: IPXrouted adduser bluetooth/btpand bluetooth/sdpd bootparamd/bootparamd bsnmpd/modules/snmp_bridge bsnmpd/modules/snmp_hostres bsnmpd/modules/snmp_wlan bsnmp... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:33:54 -0000 2011/12/30 Alexey Dokuchaev : > On Fri, Dec 30, 2011 at 02:43:22PM -0500, Ben Kaduk wrote: >> On Fri, Dec 30, 2011 at 5:58 AM, Ulrich Spoerlein wrot= e: >> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* is 11 bit wide that gives us upto 2= 048 chunks. >> > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* is 11 bit wide that gives us up to = 2048 chunks. >> >> Should be "11 bits", no? > > I'm not a native speaker, but I think "11 bit wide" is correct here. =A0I > could have probably got into specifics, but simple googling for "16 ton s= hit > dropped on me" yielded 525M results, while the same phrase with "tons" on= ly > 18,9M. =A0:-^ bits is correct because it's the plural form of the word, but the sentence sounds off even with that change. This sounds better: "is 11-bits wide, which gives us up to 2048 chunks" The only question that lingers in my mind, is what does "chunks" qualify (buffer chunks? chunks of gold? chunks of rocca chocolate bars? etc)? Thanks, -Garrett From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:35:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 741EF106564A; Fri, 30 Dec 2011 20:35:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 611108FC08; Fri, 30 Dec 2011 20:35:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKZEhn029366; Fri, 30 Dec 2011 20:35:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKZErK029359; Fri, 30 Dec 2011 20:35:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302035.pBUKZErK029359@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:35:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229023 - in stable/9/sys: amd64/amd64 amd64/include i386/i386 i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:35:14 -0000 Author: kib Date: Fri Dec 30 20:35:13 2011 New Revision: 229023 URL: http://svn.freebsd.org/changeset/base/229023 Log: MFC r227399: Attempt to improve formatting and content of several comments for amd64 and i386 MD code. Modified: stable/9/sys/amd64/amd64/trap.c stable/9/sys/amd64/include/signal.h stable/9/sys/amd64/include/ucontext.h stable/9/sys/i386/i386/trap.c stable/9/sys/i386/include/signal.h stable/9/sys/i386/include/ucontext.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/amd64/amd64/trap.c ============================================================================== --- stable/9/sys/amd64/amd64/trap.c Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/amd64/amd64/trap.c Fri Dec 30 20:35:13 2011 (r229023) @@ -900,9 +900,9 @@ cpu_fetch_syscall_args(struct thread *td #include "../../kern/subr_syscall.c" /* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. + * System call handler for native binaries. The trap frame is already + * set up by the assembler trampoline and a pointer to it is saved in + * td_frame. */ void amd64_syscall(struct thread *td, int traced) Modified: stable/9/sys/amd64/include/signal.h ============================================================================== --- stable/9/sys/amd64/include/signal.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/amd64/include/signal.h Fri Dec 30 20:35:13 2011 (r229023) @@ -47,18 +47,14 @@ typedef long sig_atomic_t; #include /* codes for SIGILL, SIGFPE */ /* - * Only the kernel should need these old type definitions. - */ -/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available * to the handler to allow it to restore state properly if * a non-standard exit is performed. - */ -/* - * The sequence of the fields/registers in struct sigcontext should match - * those in mcontext_t. + * + * The sequence of the fields/registers after sc_mask in struct + * sigcontext must match those in mcontext_t and struct trapframe. */ struct sigcontext { struct __sigset sc_mask; /* signal mask to restore */ @@ -93,8 +89,8 @@ struct sigcontext { long sc_ss; long sc_len; /* sizeof(mcontext_t) */ /* - * XXX - See and for - * the following fields. + * See and for the following + * fields. */ long sc_fpformat; long sc_ownedfp; Modified: stable/9/sys/amd64/include/ucontext.h ============================================================================== --- stable/9/sys/amd64/include/ucontext.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/amd64/include/ucontext.h Fri Dec 30 20:35:13 2011 (r229023) @@ -41,12 +41,13 @@ typedef struct __mcontext { /* - * The first 24 fields must match the definition of - * sigcontext. So that we can support sigcontext - * and ucontext_t at the same time. + * The definition of mcontext_t must match the layout of + * struct sigcontext after the sc_mask member. This is so + * that we can support sigcontext and ucontext_t at the same + * time. */ - __register_t mc_onstack; /* XXX - sigcontext compat. */ - __register_t mc_rdi; /* machine state (struct trapframe) */ + __register_t mc_onstack; /* XXX - sigcontext compat. */ + __register_t mc_rdi; /* machine state (struct trapframe) */ __register_t mc_rsi; __register_t mc_rdx; __register_t mc_rcx; Modified: stable/9/sys/i386/i386/trap.c ============================================================================== --- stable/9/sys/i386/i386/trap.c Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/i386/i386/trap.c Fri Dec 30 20:35:13 2011 (r229023) @@ -1065,9 +1065,8 @@ cpu_fetch_syscall_args(struct thread *td #include "../../kern/subr_syscall.c" /* - * syscall - system call request C handler - * - * A system call is essentially treated as a trap. + * syscall - system call request C handler. A system call is + * essentially treated as a trap by reusing the frame layout. */ void syscall(struct trapframe *frame) Modified: stable/9/sys/i386/include/signal.h ============================================================================== --- stable/9/sys/i386/include/signal.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/i386/include/signal.h Fri Dec 30 20:35:13 2011 (r229023) @@ -46,16 +46,17 @@ typedef int sig_atomic_t; #include /* codes for SIGILL, SIGFPE */ /* - * Only the kernel should need these old type definitions. - */ -#if defined(_KERNEL) && defined(COMPAT_43) -/* * Information pushed on stack when a signal is delivered. * This is used by the kernel to restore state following * execution of the signal handler. It is also made available * to the handler to allow it to restore state properly if * a non-standard exit is performed. */ + +#if defined(_KERNEL) && defined(COMPAT_43) +/* + * Only the kernel should need these old type definitions. + */ struct osigcontext { int sc_onstack; /* sigstack state to restore */ osigset_t sc_mask; /* signal mask to restore */ @@ -83,7 +84,7 @@ struct osigcontext { /* * The sequence of the fields/registers in struct sigcontext should match - * those in mcontext_t. + * those in mcontext_t and struct trapframe. */ struct sigcontext { struct __sigset sc_mask; /* signal mask to restore */ @@ -109,8 +110,8 @@ struct sigcontext { int sc_ss; int sc_len; /* sizeof(mcontext_t) */ /* - * XXX - See and for - * the following fields. + * See and for + * the following fields. */ int sc_fpformat; int sc_ownedfp; Modified: stable/9/sys/i386/include/ucontext.h ============================================================================== --- stable/9/sys/i386/include/ucontext.h Fri Dec 30 20:24:52 2011 (r229022) +++ stable/9/sys/i386/include/ucontext.h Fri Dec 30 20:35:13 2011 (r229023) @@ -33,9 +33,9 @@ typedef struct __mcontext { /* - * The first 20 fields must match the definition of - * sigcontext. So that we can support sigcontext - * and ucontext_t at the same time. + * The definition of mcontext_t shall match the layout of + * struct sigcontext after the sc_mask member. So that we can + * support sigcontext and ucontext_t at the same time. */ __register_t mc_onstack; /* XXX - sigcontext compat. */ __register_t mc_gs; /* machine state (struct trapframe) */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:41:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FB68106566C; Fri, 30 Dec 2011 20:41:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA438FC14; Fri, 30 Dec 2011 20:41:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKfPmM029588; Fri, 30 Dec 2011 20:41:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKfP2v029586; Fri, 30 Dec 2011 20:41:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302041.pBUKfP2v029586@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 20:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229024 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:41:25 -0000 Author: dim Date: Fri Dec 30 20:41:24 2011 New Revision: 229024 URL: http://svn.freebsd.org/changeset/base/229024 Log: Add some additional const poison after r228972. The 'mapping' array in lib/libc/gen/strtofflags.c became const, but gcc did not warn about assigning its members to non-const pointers. Clang warned about this with: lib/libc/gen/strtofflags.c:98:12: error: assigning to 'char *' from 'const char *' discards qualifiers [-Werror,-Wincompatible-pointer-types] for (sp = mapping[i].invert ? mapping[i].name : ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Reviewed by: jilles Modified: head/lib/libc/gen/strtofflags.c Modified: head/lib/libc/gen/strtofflags.c ============================================================================== --- head/lib/libc/gen/strtofflags.c Fri Dec 30 20:35:13 2011 (r229023) +++ head/lib/libc/gen/strtofflags.c Fri Dec 30 20:41:24 2011 (r229024) @@ -82,7 +82,8 @@ fflagstostr(flags) u_long flags; { char *string; - char *sp, *dp; + const char *sp; + char *dp; u_long setflags; int i; From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:45:40 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA0C1106566C; Fri, 30 Dec 2011 20:45:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A85D18FC08; Fri, 30 Dec 2011 20:45:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKjeV8029765; Fri, 30 Dec 2011 20:45:40 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKjeQT029763; Fri, 30 Dec 2011 20:45:40 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302045.pBUKjeQT029763@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229025 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:45:40 -0000 Author: kib Date: Fri Dec 30 20:45:40 2011 New Revision: 229025 URL: http://svn.freebsd.org/changeset/base/229025 Log: MFC r227443: Guard against the unlikely case of the alias path containing the '%' symbols. Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c ============================================================================== --- stable/9/sys/kern/kern_conf.c Fri Dec 30 20:41:24 2011 (r229024) +++ stable/9/sys/kern/kern_conf.c Fri Dec 30 20:45:40 2011 (r229025) @@ -1016,7 +1016,7 @@ make_dev_physpath_alias(int flags, struc old_alias = NULL; ret = 0; } else { - ret = make_dev_alias_p(flags, cdev, pdev, devfspath); + ret = make_dev_alias_p(flags, cdev, pdev, "%s", devfspath); } out: if (old_alias != NULL) From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:52:57 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0014A106564A; Fri, 30 Dec 2011 20:52:56 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E29AA8FC12; Fri, 30 Dec 2011 20:52:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKquFw030029; Fri, 30 Dec 2011 20:52:56 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKqumr030027; Fri, 30 Dec 2011 20:52:56 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302052.pBUKqumr030027@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229026 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:52:57 -0000 Author: kib Date: Fri Dec 30 20:52:56 2011 New Revision: 229026 URL: http://svn.freebsd.org/changeset/base/229026 Log: MFC r227444: Style. Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c ============================================================================== --- stable/9/sys/kern/kern_conf.c Fri Dec 30 20:45:40 2011 (r229025) +++ stable/9/sys/kern/kern_conf.c Fri Dec 30 20:52:56 2011 (r229026) @@ -1009,8 +1009,7 @@ make_dev_physpath_alias(int flags, struc } sprintf(devfspath, "%s/%s", physpath, pdev->si_name); - if (old_alias != NULL - && strcmp(old_alias->si_name, devfspath) == 0) { + if (old_alias != NULL && strcmp(old_alias->si_name, devfspath) == 0) { /* Retain the existing alias. */ *cdev = old_alias; old_alias = NULL; From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:55:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EC54106566C; Fri, 30 Dec 2011 20:55:39 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F10918FC0A; Fri, 30 Dec 2011 20:55:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKtcie030170; Fri, 30 Dec 2011 20:55:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKtciK030168; Fri, 30 Dec 2011 20:55:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302055.pBUKtciK030168@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229027 - stable/9/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:55:39 -0000 Author: kib Date: Fri Dec 30 20:55:38 2011 New Revision: 229027 URL: http://svn.freebsd.org/changeset/base/229027 Log: MFC r227622: Fix typo. Modified: stable/9/lib/libc/sys/stat.2 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/sys/stat.2 ============================================================================== --- stable/9/lib/libc/sys/stat.2 Fri Dec 30 20:52:56 2011 (r229026) +++ stable/9/lib/libc/sys/stat.2 Fri Dec 30 20:55:38 2011 (r229027) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd March 28, 2010 +.Dd November 17, 2011 .Dt STAT 2 .Os .Sh NAME @@ -411,7 +411,7 @@ and system calls are expected to conform to .St -p1003.1-90 . The -.Fn fchownat +.Fn fstatat system call follows The Open Group Extended API Set 2 specification. .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 20:57:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AACE7106566C; Fri, 30 Dec 2011 20:57:36 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98EC58FC15; Fri, 30 Dec 2011 20:57:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUKvaiu030275; Fri, 30 Dec 2011 20:57:36 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUKva75030273; Fri, 30 Dec 2011 20:57:36 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302057.pBUKva75030273@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 20:57:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229028 - stable/8/lib/libc/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 20:57:36 -0000 Author: kib Date: Fri Dec 30 20:57:36 2011 New Revision: 229028 URL: http://svn.freebsd.org/changeset/base/229028 Log: MFC r227622: Fix typo. Modified: stable/8/lib/libc/sys/stat.2 Directory Properties: stable/8/lib/libc/ (props changed) Modified: stable/8/lib/libc/sys/stat.2 ============================================================================== --- stable/8/lib/libc/sys/stat.2 Fri Dec 30 20:55:38 2011 (r229027) +++ stable/8/lib/libc/sys/stat.2 Fri Dec 30 20:57:36 2011 (r229028) @@ -28,7 +28,7 @@ .\" @(#)stat.2 8.4 (Berkeley) 5/1/95 .\" $FreeBSD$ .\" -.Dd April 10, 2008 +.Dd November 17, 2011 .Dt STAT 2 .Os .Sh NAME @@ -405,7 +405,7 @@ and system calls are expected to conform to .St -p1003.1-90 . The -.Fn fchownat +.Fn fstatat system call follows The Open Group Extended API Set 2 specification. .Sh HISTORY The From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:00:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D0C4106564A; Fri, 30 Dec 2011 21:00:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 378C18FC08; Fri, 30 Dec 2011 21:00:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUL03DP030425; Fri, 30 Dec 2011 21:00:03 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUL02Rt030423; Fri, 30 Dec 2011 21:00:02 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302100.pBUL02Rt030423@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 21:00:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229029 - stable/9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:00:03 -0000 Author: dim Date: Fri Dec 30 21:00:02 2011 New Revision: 229029 URL: http://svn.freebsd.org/changeset/base/229029 Log: MFC r227120: Make it possible to set CC and CXX (and optionally, AS and LD) in make.conf(5), while allowing the build32 stage on 64-bit architectures to still override them, so that stage can successfully build 32-bit compatibility libraries. Explanation: 1) The build32 stage sets environment variables CC, CXX, AS and LD for its sub-make, to add 32-bit specific flags (-m32 and such). 2) The sub-make reads sys.mk, encounters CC?= and CXX?= assignments, so does not alter them. 3) After some other stuff, sys.mk reads /etc/make.conf. When you have "CC=xxx" and "CXX=yyy" statements in there, they will *override* the build32-supplied CC/CXX values, nullifying the 32-bit specific flags. 4) Thus all objects get built as 64-bit anyway, and since LD is usually not set in make.conf, it still has the 32-bit flags! 5) Now, whenever something is linked, you will get a "ld: Relocatable linking with relocations from format elf64-x86-64-freebsd (foo.o) to format elf32-i386-freebsd (bar.o) is not supported" error. Fix this by adding "-ECC -ECXX -EAS -ELD" to the build32 sub-make invocation, which forces those environment variables to always override any assignment in makefiles. Thus making it possible to simply set: CC=my-cc CXX=my-c++ in your make.conf, or specify a path, even: CC=/usr/local/bin/other-cc CXX=/usr/local/bin/other-c++ Note this was never a problem on i386, since it has no build32 stage. Silence from: current@ Modified: stable/9/Makefile.inc1 (contents, props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Fri Dec 30 20:57:36 2011 (r229028) +++ stable/9/Makefile.inc1 Fri Dec 30 21:00:02 2011 (r229029) @@ -313,7 +313,8 @@ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTR LIB32WMAKE= ${LIB32WMAKEENV} ${MAKE} -DNO_CPU_CFLAGS -DCOMPAT_32BIT \ -DWITHOUT_BIND -DWITHOUT_MAN -DWITHOUT_INFO \ - -DWITHOUT_HTML -DNO_CTF -DNO_LINT DESTDIR=${LIB32TMP} + -DWITHOUT_HTML -DNO_CTF -DNO_LINT -ECC -ECXX -EAS -ELD \ + DESTDIR=${LIB32TMP} LIB32IMAKE= ${LIB32WMAKE:NINSTALL=*:NDESTDIR=*} -DNO_INCS .endif From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:01:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42D1E1065675; Fri, 30 Dec 2011 21:01:15 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC30D8FC1F; Fri, 30 Dec 2011 21:01:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUL1Evi030500; Fri, 30 Dec 2011 21:01:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUL1Ech030498; Fri, 30 Dec 2011 21:01:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302101.pBUL1Ech030498@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 21:01:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229030 - stable/9/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:01:15 -0000 Author: kib Date: Fri Dec 30 21:01:14 2011 New Revision: 229030 URL: http://svn.freebsd.org/changeset/base/229030 Log: MFC r227816: Remove the wrong comment about ufs not being loadable. Note that only root filesystem module needs to be available before root is mounted. Modified: stable/9/sys/conf/NOTES Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) Modified: stable/9/sys/conf/NOTES ============================================================================== --- stable/9/sys/conf/NOTES Fri Dec 30 21:00:02 2011 (r229029) +++ stable/9/sys/conf/NOTES Fri Dec 30 21:01:14 2011 (r229030) @@ -965,11 +965,10 @@ options ZERO_COPY_SOCKETS # FILESYSTEM OPTIONS # -# Only the root, /usr, and /tmp filesystems need be statically -# compiled; everything else will be automatically loaded at mount -# time. (Exception: the UFS family--- FFS --- cannot -# currently be demand-loaded.) Some people still prefer to statically -# compile other filesystems as well. +# Only the root filesystem needs to be statically compiled or preloaded +# as module; everything else will be automatically loaded at mount +# time. Some people still prefer to statically compile other +# filesystems as well. # # NB: The PORTAL filesystem is known to be buggy, and WILL panic your # system if you attempt to do anything with it. It is included here From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:02:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEB811065670; Fri, 30 Dec 2011 21:02:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD0638FC0C; Fri, 30 Dec 2011 21:02:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUL2WPY030587; Fri, 30 Dec 2011 21:02:32 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUL2WnN030585; Fri, 30 Dec 2011 21:02:32 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112302102.pBUL2WnN030585@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 30 Dec 2011 21:02:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229031 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:02:32 -0000 Author: kib Date: Fri Dec 30 21:02:32 2011 New Revision: 229031 URL: http://svn.freebsd.org/changeset/base/229031 Log: MFC r227816: Remove the wrong comment about ufs not being loadable. Note that only root filesystem module needs to be available before root is mounted. Modified: stable/8/sys/conf/NOTES Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/conf/NOTES ============================================================================== --- stable/8/sys/conf/NOTES Fri Dec 30 21:01:14 2011 (r229030) +++ stable/8/sys/conf/NOTES Fri Dec 30 21:02:32 2011 (r229031) @@ -947,11 +947,10 @@ options ZERO_COPY_SOCKETS # FILESYSTEM OPTIONS # -# Only the root, /usr, and /tmp filesystems need be statically -# compiled; everything else will be automatically loaded at mount -# time. (Exception: the UFS family--- FFS --- cannot -# currently be demand-loaded.) Some people still prefer to statically -# compile other filesystems as well. +# Only the root filesystem needs to be statically compiled or preloaded +# as module; everything else will be automatically loaded at mount +# time. Some people still prefer to statically compile other +# filesystems as well. # # NB: The PORTAL filesystem is known to be buggy, and WILL panic your # system if you attempt to do anything with it. It is included here From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:22:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2F621065675; Fri, 30 Dec 2011 21:22:10 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1E288FC08; Fri, 30 Dec 2011 21:22:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULMA0V031218; Fri, 30 Dec 2011 21:22:10 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULMAuS031216; Fri, 30 Dec 2011 21:22:10 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112302122.pBULMAuS031216@svn.freebsd.org> From: Marius Strobl Date: Fri, 30 Dec 2011 21:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229032 - head/sys/modules/cfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:22:10 -0000 Author: marius Date: Fri Dec 30 21:22:10 2011 New Revision: 229032 URL: http://svn.freebsd.org/changeset/base/229032 Log: Add header required by cfi_bus_fdt.c. Modified: head/sys/modules/cfi/Makefile Modified: head/sys/modules/cfi/Makefile ============================================================================== --- head/sys/modules/cfi/Makefile Fri Dec 30 21:02:32 2011 (r229031) +++ head/sys/modules/cfi/Makefile Fri Dec 30 21:22:10 2011 (r229032) @@ -7,10 +7,10 @@ SRCS= ${_cfi_bus} cfi_core.c cfi_dev.c SRCS+= bus_if.h device_if.h opt_cfi.h .if ${MACHINE} == "arm" -_cfi_bus= cfi_bus_fdt.c cfi_bus_ixp4xx.c +_cfi_bus= cfi_bus_fdt.c cfi_bus_ixp4xx.c ofw_bus_if.h .endif .if ${MACHINE} == "powerpc" -_cfi_bus= cfi_bus_fdt.c +_cfi_bus= cfi_bus_fdt.c ofw_bus_if.h .endif opt_cfi.h: From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:27:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72DCE106566C; Fri, 30 Dec 2011 21:27:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60F658FC08; Fri, 30 Dec 2011 21:27:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULRq85031411; Fri, 30 Dec 2011 21:27:52 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULRqOY031409; Fri, 30 Dec 2011 21:27:52 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302127.pBULRqOY031409@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:27:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229033 - stable/9/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:27:52 -0000 Author: jilles Date: Fri Dec 30 21:27:51 2011 New Revision: 229033 URL: http://svn.freebsd.org/changeset/base/229033 Log: MFC r227121: make(1): obj dirs are physical paths so write `pwd -P` rather than `pwd`. Regular pwd may return a pathname containing symlinks, but make does not use such pathnames. Modified: stable/9/usr.bin/make/make.1 Directory Properties: stable/9/usr.bin/make/ (props changed) Modified: stable/9/usr.bin/make/make.1 ============================================================================== --- stable/9/usr.bin/make/make.1 Fri Dec 30 21:22:10 2011 (r229032) +++ stable/9/usr.bin/make/make.1 Fri Dec 30 21:27:51 2011 (r229033) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 29, 2008 +.Dd November 5, 2011 .Dt MAKE 1 .Os .Sh NAME @@ -631,7 +631,7 @@ The following directories are tried in o .Pp .Bl -enum -compact .It -${MAKEOBJDIRPREFIX}/`pwd` +${MAKEOBJDIRPREFIX}/`pwd -P` .It ${MAKEOBJDIR} .It @@ -639,7 +639,7 @@ obj.${MACHINE} .It obj .It -/usr/obj/`pwd` +/usr/obj/`pwd -P` .El .Pp The first directory that From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:33:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DE90106564A; Fri, 30 Dec 2011 21:33:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5C1698FC12; Fri, 30 Dec 2011 21:33:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULXKuo031631; Fri, 30 Dec 2011 21:33:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULXKpH031629; Fri, 30 Dec 2011 21:33:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302133.pBULXKpH031629@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:33:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229034 - stable/8/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:33:20 -0000 Author: jilles Date: Fri Dec 30 21:33:19 2011 New Revision: 229034 URL: http://svn.freebsd.org/changeset/base/229034 Log: MFC r227121: make(1): obj dirs are physical paths so write `pwd -P` rather than `pwd`. Regular pwd may return a pathname containing symlinks, but make does not use such pathnames. Modified: stable/8/usr.bin/make/make.1 Directory Properties: stable/8/usr.bin/make/ (props changed) Modified: stable/8/usr.bin/make/make.1 ============================================================================== --- stable/8/usr.bin/make/make.1 Fri Dec 30 21:27:51 2011 (r229033) +++ stable/8/usr.bin/make/make.1 Fri Dec 30 21:33:19 2011 (r229034) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 29, 2008 +.Dd November 5, 2011 .Dt MAKE 1 .Os .Sh NAME @@ -601,7 +601,7 @@ The following directories are tried in o .Pp .Bl -enum -compact .It -${MAKEOBJDIRPREFIX}/`pwd` +${MAKEOBJDIRPREFIX}/`pwd -P` .It ${MAKEOBJDIR} .It @@ -609,7 +609,7 @@ obj.${MACHINE} .It obj .It -/usr/obj/`pwd` +/usr/obj/`pwd -P` .El .Pp The first directory that From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:46:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB56A106564A; Fri, 30 Dec 2011 21:46:30 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D96808FC0A; Fri, 30 Dec 2011 21:46:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULkU66032130; Fri, 30 Dec 2011 21:46:30 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULkUeK032128; Fri, 30 Dec 2011 21:46:30 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302146.pBULkUeK032128@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229035 - stable/7/usr.bin/make X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:46:31 -0000 Author: jilles Date: Fri Dec 30 21:46:30 2011 New Revision: 229035 URL: http://svn.freebsd.org/changeset/base/229035 Log: MFC r227121: make(1): obj dirs are physical paths so write `pwd -P` rather than `pwd`. Regular pwd may return a pathname containing symlinks, but make does not use such pathnames. Modified: stable/7/usr.bin/make/make.1 Directory Properties: stable/7/usr.bin/make/ (props changed) Modified: stable/7/usr.bin/make/make.1 ============================================================================== --- stable/7/usr.bin/make/make.1 Fri Dec 30 21:33:19 2011 (r229034) +++ stable/7/usr.bin/make/make.1 Fri Dec 30 21:46:30 2011 (r229035) @@ -32,7 +32,7 @@ .\" @(#)make.1 8.8 (Berkeley) 6/13/95 .\" $FreeBSD$ .\" -.Dd December 29, 2008 +.Dd November 5, 2011 .Dt MAKE 1 .Os .Sh NAME @@ -601,7 +601,7 @@ The following directories are tried in o .Pp .Bl -enum -compact .It -${MAKEOBJDIRPREFIX}/`pwd` +${MAKEOBJDIRPREFIX}/`pwd -P` .It ${MAKEOBJDIR} .It @@ -609,7 +609,7 @@ obj.${MACHINE} .It obj .It -/usr/obj/`pwd` +/usr/obj/`pwd -P` .El .Pp The first directory that From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 21:50:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E0FF106566C; Fri, 30 Dec 2011 21:50:17 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 016818FC13; Fri, 30 Dec 2011 21:50:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBULoGME032285; Fri, 30 Dec 2011 21:50:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBULoGCo032283; Fri, 30 Dec 2011 21:50:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302150.pBULoGCo032283@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 21:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229036 - stable/9/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 21:50:17 -0000 Author: jilles Date: Fri Dec 30 21:50:16 2011 New Revision: 229036 URL: http://svn.freebsd.org/changeset/base/229036 Log: MFC r227122: sh(1): Improve documentation of field splitting. This describes the POSIX-compliant splitting algorithm that first appeared in 8.0. Modified: stable/9/bin/sh/sh.1 Directory Properties: stable/9/bin/sh/ (props changed) Modified: stable/9/bin/sh/sh.1 ============================================================================== --- stable/9/bin/sh/sh.1 Fri Dec 30 21:46:30 2011 (r229035) +++ stable/9/bin/sh/sh.1 Fri Dec 30 21:50:16 2011 (r229036) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd July 10, 2011 +.Dd November 5, 2011 .Dt SH 1 .Os .Sh NAME @@ -1160,6 +1160,11 @@ of alphabetics, numerics, and underscore The first letter of a variable name must not be numeric. A parameter can also be denoted by a number or a special character as explained below. +.Pp +Assignments are expanded differently from other words: +tilde expansion is also performed after the equals sign and after any colon +and usernames are also terminated by colons, +and field splitting and pathname expansion are not performed. .Ss Positional Parameters A positional parameter is a parameter denoted by a number greater than zero. The shell sets these initially to the values of its command line @@ -1273,11 +1278,15 @@ used in tilde expansion and as a default built-in. .It Va IFS Input Field Separators. -This is normally set to +The default value is .Aq space , .Aq tab , and -.Aq newline . +.Aq newline +in that order. +This default also applies if +.Va IFS +is unset, but not if it is set to the empty string. See the .Sx White Space Splitting section for more details. @@ -1423,12 +1432,12 @@ part of the name. If a parameter expansion occurs inside double-quotes: .Bl -enum .It -Pathname expansion is not performed on the results of the -expansion. -.It Field splitting is not performed on the results of the expansion, with the exception of the special parameter .Va @ . +.It +Pathname expansion is not performed on the results of the +expansion. .El .Pp In addition, a parameter expansion can be modified by using one of the @@ -1641,16 +1650,51 @@ and contain integer constants. .Pp The result of the expression is substituted in decimal. .Ss White Space Splitting (Field Splitting) -After parameter expansion, command substitution, and +In certain contexts, +after parameter expansion, command substitution, and arithmetic expansion the shell scans the results of expansions and substitutions that did not occur in double-quotes for field splitting and multiple fields can result. .Pp -The shell treats each character of the +Characters in +.Va IFS +that are whitespace +.Po +.Aq space , +.Aq tab , +and +.Aq newline +.Pc +are treated differently from other characters in +.Va IFS . +.Pp +Whitespace in +.Va IFS +at the beginning or end of a word is discarded. +.Pp +Subsequently, a field is delimited by either +.Bl -enum +.It +a non-whitespace character in +.Va IFS +with any whitespace in +.Va IFS +surrounding it, or +.It +one or more whitespace characters in +.Va IFS . +.El +.Pp +If a word ends with a non-whitespace character in +.Va IFS , +there is no empty field after this character. +.Pp +If no field is delimited, the word is discarded. +In particular, if a word consists solely of an unquoted substitution +and the result of the substitution is null, +it is removed by field splitting even if .Va IFS -variable as a delimiter and uses -the delimiters to split the results of parameter expansion and command -substitution into fields. +is null. .Ss Pathname Expansion (File Name Generation) Unless the .Fl f From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:07:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 61CE2106566C; Fri, 30 Dec 2011 22:07:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4F12F8FC15; Fri, 30 Dec 2011 22:07:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUM75qs032907; Fri, 30 Dec 2011 22:07:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUM75PQ032903; Fri, 30 Dec 2011 22:07:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302207.pBUM75PQ032903@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:07:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229037 - in stable/9: gnu/lib/libstdc++ lib/clang/include/llvm/Config X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:07:05 -0000 Author: dim Date: Fri Dec 30 22:07:04 2011 New Revision: 229037 URL: http://svn.freebsd.org/changeset/base/229037 Log: MFC r227215: When one attempts to compile the tree with -march=i386, which also used to be gcc's default before r198344, calls to atomic builtins will not be expanded inline. Instead, they will be generated as calls to external functions (e.g. __sync_fetch_and_add_N), leading to linking errors later on. Put in a seatbelt that disables use of atomic builtins in libstdc++ and llvm, when tuning specifically for the real i386 CPU. This does not protect against all possible issues, but it is better than nothing. MFC r227538: LLVM uses atomic operations, which are not supported on i386 and GCC emits calls for them, rather than expanding them inline. Older FreeBSD versions compile for i386 by default and as such we end up with unresolved symbols when we build LLVM's TableGen utility as a build tool on them. Add the functions that GCC emits here, but don't bother to make them atomic. Such is not needed. Submitted by: marcel MFC r227636: Revert r227538, since it doesn't compile with clang at all (it doesn't allow the built-in operations to be redefined, at least not without excessive force). Instead, just disable LLVM's support for atomic operations for now. Nothing in either clang or the tablegen tools currently depends on it. This still allows users of head built before r198344 to upgrade to top-of-head seamlessly. Modified: stable/9/gnu/lib/libstdc++/config.h stable/9/lib/clang/include/llvm/Config/config.h stable/9/lib/clang/include/llvm/Config/llvm-config.h Directory Properties: stable/9/gnu/lib/ (props changed) stable/9/lib/clang/ (props changed) stable/9/tools/ (props changed) Modified: stable/9/gnu/lib/libstdc++/config.h ============================================================================== --- stable/9/gnu/lib/libstdc++/config.h Fri Dec 30 21:50:16 2011 (r229036) +++ stable/9/gnu/lib/libstdc++/config.h Fri Dec 30 22:07:04 2011 (r229037) @@ -671,7 +671,7 @@ /* #undef VERSION */ /* Define if builtin atomic operations are supported on this host. */ -#if defined(__amd64__) || defined(__i386__) +#if defined(__amd64__) || (defined(__i386__) && !defined(__tune_i386__)) #define _GLIBCXX_ATOMIC_BUILTINS 1 #endif Modified: stable/9/lib/clang/include/llvm/Config/config.h ============================================================================== --- stable/9/lib/clang/include/llvm/Config/config.h Fri Dec 30 21:50:16 2011 (r229036) +++ stable/9/lib/clang/include/llvm/Config/config.h Fri Dec 30 22:07:04 2011 (r229037) @@ -552,7 +552,7 @@ /* #undef LLVM_ETCDIR */ /* Has gcc/MSVC atomic intrinsics */ -#define LLVM_HAS_ATOMICS 1 +#define LLVM_HAS_ATOMICS 0 /* Host triple we were built on */ /* #undef LLVM_HOSTTRIPLE */ Modified: stable/9/lib/clang/include/llvm/Config/llvm-config.h ============================================================================== --- stable/9/lib/clang/include/llvm/Config/llvm-config.h Fri Dec 30 21:50:16 2011 (r229036) +++ stable/9/lib/clang/include/llvm/Config/llvm-config.h Fri Dec 30 22:07:04 2011 (r229037) @@ -34,7 +34,7 @@ /* #undef LLVM_ETCDIR */ /* Has gcc/MSVC atomic intrinsics */ -#define LLVM_HAS_ATOMICS 1 +#define LLVM_HAS_ATOMICS 0 /* Host triple we were built on */ /* #undef LLVM_HOSTTRIPLE */ From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:07:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FEBA106564A; Fri, 30 Dec 2011 22:07:16 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7399E8FC08; Fri, 30 Dec 2011 22:07:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUM7GcE032948; Fri, 30 Dec 2011 22:07:16 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUM7GG6032946; Fri, 30 Dec 2011 22:07:16 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201112302207.pBUM7GG6032946@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 30 Dec 2011 22:07:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229038 - stable/8/bin/sh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:07:16 -0000 Author: jilles Date: Fri Dec 30 22:07:15 2011 New Revision: 229038 URL: http://svn.freebsd.org/changeset/base/229038 Log: MFC r227122: sh(1): Improve documentation of field splitting. This describes the POSIX-compliant splitting algorithm that first appeared in 8.0. Modified: stable/8/bin/sh/sh.1 Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/sh.1 ============================================================================== --- stable/8/bin/sh/sh.1 Fri Dec 30 22:07:04 2011 (r229037) +++ stable/8/bin/sh/sh.1 Fri Dec 30 22:07:15 2011 (r229038) @@ -32,7 +32,7 @@ .\" from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\" $FreeBSD$ .\" -.Dd June 24, 2011 +.Dd November 5, 2011 .Dt SH 1 .Os .Sh NAME @@ -1045,6 +1045,11 @@ of alphabetics, numerics, and underscore The first letter of a variable name must not be numeric. A parameter can also be denoted by a number or a special character as explained below. +.Pp +Assignments are expanded differently from other words: +tilde expansion is also performed after the equals sign and after any colon +and usernames are also terminated by colons, +and field splitting and pathname expansion are not performed. .Ss Positional Parameters A positional parameter is a parameter denoted by a number greater than zero. The shell sets these initially to the values of its command line @@ -1154,11 +1159,15 @@ used in tilde expansion and as a default built-in. .It Va IFS Input Field Separators. -This is normally set to +The default value is .Aq space , .Aq tab , and -.Aq newline . +.Aq newline +in that order. +This default also applies if +.Va IFS +is unset, but not if it is set to the empty string. See the .Sx White Space Splitting section for more details. @@ -1291,12 +1300,12 @@ part of the name. If a parameter expansion occurs inside double-quotes: .Bl -enum .It -Pathname expansion is not performed on the results of the -expansion. -.It Field splitting is not performed on the results of the expansion, with the exception of the special parameter .Va @ . +.It +Pathname expansion is not performed on the results of the +expansion. .El .Pp In addition, a parameter expansion can be modified by using one of the @@ -1495,16 +1504,51 @@ This is a bug. .Pp The result of the expression is substituted in decimal. .Ss White Space Splitting (Field Splitting) -After parameter expansion, command substitution, and +In certain contexts, +after parameter expansion, command substitution, and arithmetic expansion the shell scans the results of expansions and substitutions that did not occur in double-quotes for field splitting and multiple fields can result. .Pp -The shell treats each character of the +Characters in +.Va IFS +that are whitespace +.Po +.Aq space , +.Aq tab , +and +.Aq newline +.Pc +are treated differently from other characters in +.Va IFS . +.Pp +Whitespace in +.Va IFS +at the beginning or end of a word is discarded. +.Pp +Subsequently, a field is delimited by either +.Bl -enum +.It +a non-whitespace character in +.Va IFS +with any whitespace in +.Va IFS +surrounding it, or +.It +one or more whitespace characters in +.Va IFS . +.El +.Pp +If a word ends with a non-whitespace character in +.Va IFS , +there is no empty field after this character. +.Pp +If no field is delimited, the word is discarded. +In particular, if a word consists solely of an unquoted substitution +and the result of the substitution is null, +it is removed by field splitting even if .Va IFS -variable as a delimiter and uses -the delimiters to split the results of parameter expansion and command -substitution into fields. +is null. .Ss Pathname Expansion (File Name Generation) Unless the .Fl f From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:17:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C9111065670; Fri, 30 Dec 2011 22:17:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC9A8FC08; Fri, 30 Dec 2011 22:17:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMHBwt033305; Fri, 30 Dec 2011 22:17:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMHAT8033302; Fri, 30 Dec 2011 22:17:10 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302217.pBUMHAT8033302@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229039 - in stable/9/contrib/llvm/tools/clang: include/clang/Basic lib/Sema X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:17:11 -0000 Author: dim Date: Fri Dec 30 22:17:10 2011 New Revision: 229039 URL: http://svn.freebsd.org/changeset/base/229039 Log: MFC r227735: Pull in r144110 from upstream clang trunk: Mark the overloaded atomic builtins as having custom type checking, which they do. This avoids all of the default argument promotions that we (1) don't want, and (2) undo during that custom type checking, and makes sure that we don't run into trouble during template instantiation. Fixes llvm/clang PR11320. Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:07:15 2011 (r229038) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:17:10 2011 (r229039) @@ -480,111 +480,111 @@ BUILTIN(__builtin_alloca, "v*z" , "n") // FIXME: These assume that char -> i8, short -> i16, int -> i32, // long long -> i64. -BUILTIN(__sync_fetch_and_add, "v.", "") -BUILTIN(__sync_fetch_and_add_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_add_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_add_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_add_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_add_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_sub, "v.", "") -BUILTIN(__sync_fetch_and_sub_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_sub_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_sub_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_sub_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_sub_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_or, "v.", "") -BUILTIN(__sync_fetch_and_or_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_or_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_or_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_or_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_or_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_and, "v.", "") -BUILTIN(__sync_fetch_and_and_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_and_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_and_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_and_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_and_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_fetch_and_xor, "v.", "") -BUILTIN(__sync_fetch_and_xor_1, "ccD*c.", "n") -BUILTIN(__sync_fetch_and_xor_2, "ssD*s.", "n") -BUILTIN(__sync_fetch_and_xor_4, "iiD*i.", "n") -BUILTIN(__sync_fetch_and_xor_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_fetch_and_xor_16, "LLLiLLLiD*LLLi.", "n") - - -BUILTIN(__sync_add_and_fetch, "v.", "") -BUILTIN(__sync_add_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_add_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_add_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_add_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_add_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_sub_and_fetch, "v.", "") -BUILTIN(__sync_sub_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_sub_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_sub_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_sub_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_sub_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_or_and_fetch, "v.", "") -BUILTIN(__sync_or_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_or_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_or_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_or_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_or_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_and_and_fetch, "v.", "") -BUILTIN(__sync_and_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_and_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_and_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_and_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_and_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_xor_and_fetch, "v.", "") -BUILTIN(__sync_xor_and_fetch_1, "ccD*c.", "n") -BUILTIN(__sync_xor_and_fetch_2, "ssD*s.", "n") -BUILTIN(__sync_xor_and_fetch_4, "iiD*i.", "n") -BUILTIN(__sync_xor_and_fetch_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_xor_and_fetch_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_bool_compare_and_swap, "v.", "") -BUILTIN(__sync_bool_compare_and_swap_1, "bcD*cc.", "n") -BUILTIN(__sync_bool_compare_and_swap_2, "bsD*ss.", "n") -BUILTIN(__sync_bool_compare_and_swap_4, "biD*ii.", "n") -BUILTIN(__sync_bool_compare_and_swap_8, "bLLiD*LLiLLi.", "n") -BUILTIN(__sync_bool_compare_and_swap_16, "bLLLiD*LLLiLLLi.", "n") - -BUILTIN(__sync_val_compare_and_swap, "v.", "") -BUILTIN(__sync_val_compare_and_swap_1, "ccD*cc.", "n") -BUILTIN(__sync_val_compare_and_swap_2, "ssD*ss.", "n") -BUILTIN(__sync_val_compare_and_swap_4, "iiD*ii.", "n") -BUILTIN(__sync_val_compare_and_swap_8, "LLiLLiD*LLiLLi.", "n") -BUILTIN(__sync_val_compare_and_swap_16, "LLLiLLLiD*LLLiLLLi.", "n") - -BUILTIN(__sync_lock_test_and_set, "v.", "") -BUILTIN(__sync_lock_test_and_set_1, "ccD*c.", "n") -BUILTIN(__sync_lock_test_and_set_2, "ssD*s.", "n") -BUILTIN(__sync_lock_test_and_set_4, "iiD*i.", "n") -BUILTIN(__sync_lock_test_and_set_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_lock_test_and_set_16, "LLLiLLLiD*LLLi.", "n") - -BUILTIN(__sync_lock_release, "v.", "") -BUILTIN(__sync_lock_release_1, "vcD*.", "n") -BUILTIN(__sync_lock_release_2, "vsD*.", "n") -BUILTIN(__sync_lock_release_4, "viD*.", "n") -BUILTIN(__sync_lock_release_8, "vLLiD*.", "n") -BUILTIN(__sync_lock_release_16, "vLLLiD*.", "n") - -BUILTIN(__sync_swap, "v.", "") -BUILTIN(__sync_swap_1, "ccD*c.", "n") -BUILTIN(__sync_swap_2, "ssD*s.", "n") -BUILTIN(__sync_swap_4, "iiD*i.", "n") -BUILTIN(__sync_swap_8, "LLiLLiD*LLi.", "n") -BUILTIN(__sync_swap_16, "LLLiLLLiD*LLLi.", "n") +BUILTIN(__sync_fetch_and_add, "v.", "t") +BUILTIN(__sync_fetch_and_add_1, "ccD*c.", "nt") +BUILTIN(__sync_fetch_and_add_2, "ssD*s.", "nt") +BUILTIN(__sync_fetch_and_add_4, "iiD*i.", "nt") +BUILTIN(__sync_fetch_and_add_8, "LLiLLiD*LLi.", "nt") +BUILTIN(__sync_fetch_and_add_16, "LLLiLLLiD*LLLi.", "nt") + +BUILTIN(__sync_fetch_and_sub, "v.", "t") +BUILTIN(__sync_fetch_and_sub_1, "ccD*c.", "nt") +BUILTIN(__sync_fetch_and_sub_2, "ssD*s.", "nt") +BUILTIN(__sync_fetch_and_sub_4, "iiD*i.", "nt") +BUILTIN(__sync_fetch_and_sub_8, "LLiLLiD*LLi.", "nt") +BUILTIN(__sync_fetch_and_sub_16, "LLLiLLLiD*LLLi.", "nt") + +BUILTIN(__sync_fetch_and_or, "v.", "t") +BUILTIN(__sync_fetch_and_or_1, "ccD*c.", "nt") +BUILTIN(__sync_fetch_and_or_2, "ssD*s.", "nt") +BUILTIN(__sync_fetch_and_or_4, "iiD*i.", "nt") +BUILTIN(__sync_fetch_and_or_8, "LLiLLiD*LLi.", "nt") +BUILTIN(__sync_fetch_and_or_16, "LLLiLLLiD*LLLi.", "nt") + +BUILTIN(__sync_fetch_and_and, "v.", "t") +BUILTIN(__sync_fetch_and_and_1, "ccD*c.", "tn") +BUILTIN(__sync_fetch_and_and_2, "ssD*s.", "tn") +BUILTIN(__sync_fetch_and_and_4, "iiD*i.", "tn") +BUILTIN(__sync_fetch_and_and_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_fetch_and_and_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_fetch_and_xor, "v.", "t") +BUILTIN(__sync_fetch_and_xor_1, "ccD*c.", "tn") +BUILTIN(__sync_fetch_and_xor_2, "ssD*s.", "tn") +BUILTIN(__sync_fetch_and_xor_4, "iiD*i.", "tn") +BUILTIN(__sync_fetch_and_xor_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_fetch_and_xor_16, "LLLiLLLiD*LLLi.", "tn") + + +BUILTIN(__sync_add_and_fetch, "v.", "t") +BUILTIN(__sync_add_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_add_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_add_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_add_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_add_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_sub_and_fetch, "v.", "t") +BUILTIN(__sync_sub_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_sub_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_sub_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_sub_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_sub_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_or_and_fetch, "v.", "t") +BUILTIN(__sync_or_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_or_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_or_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_or_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_or_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_and_and_fetch, "v.", "t") +BUILTIN(__sync_and_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_and_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_and_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_and_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_and_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_xor_and_fetch, "v.", "t") +BUILTIN(__sync_xor_and_fetch_1, "ccD*c.", "tn") +BUILTIN(__sync_xor_and_fetch_2, "ssD*s.", "tn") +BUILTIN(__sync_xor_and_fetch_4, "iiD*i.", "tn") +BUILTIN(__sync_xor_and_fetch_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_xor_and_fetch_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_bool_compare_and_swap, "v.", "t") +BUILTIN(__sync_bool_compare_and_swap_1, "bcD*cc.", "tn") +BUILTIN(__sync_bool_compare_and_swap_2, "bsD*ss.", "tn") +BUILTIN(__sync_bool_compare_and_swap_4, "biD*ii.", "tn") +BUILTIN(__sync_bool_compare_and_swap_8, "bLLiD*LLiLLi.", "tn") +BUILTIN(__sync_bool_compare_and_swap_16, "bLLLiD*LLLiLLLi.", "tn") + +BUILTIN(__sync_val_compare_and_swap, "v.", "t") +BUILTIN(__sync_val_compare_and_swap_1, "ccD*cc.", "tn") +BUILTIN(__sync_val_compare_and_swap_2, "ssD*ss.", "tn") +BUILTIN(__sync_val_compare_and_swap_4, "iiD*ii.", "tn") +BUILTIN(__sync_val_compare_and_swap_8, "LLiLLiD*LLiLLi.", "tn") +BUILTIN(__sync_val_compare_and_swap_16, "LLLiLLLiD*LLLiLLLi.", "tn") + +BUILTIN(__sync_lock_test_and_set, "v.", "t") +BUILTIN(__sync_lock_test_and_set_1, "ccD*c.", "tn") +BUILTIN(__sync_lock_test_and_set_2, "ssD*s.", "tn") +BUILTIN(__sync_lock_test_and_set_4, "iiD*i.", "tn") +BUILTIN(__sync_lock_test_and_set_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_lock_test_and_set_16, "LLLiLLLiD*LLLi.", "tn") + +BUILTIN(__sync_lock_release, "v.", "t") +BUILTIN(__sync_lock_release_1, "vcD*.", "tn") +BUILTIN(__sync_lock_release_2, "vsD*.", "tn") +BUILTIN(__sync_lock_release_4, "viD*.", "tn") +BUILTIN(__sync_lock_release_8, "vLLiD*.", "tn") +BUILTIN(__sync_lock_release_16, "vLLLiD*.", "tn") + +BUILTIN(__sync_swap, "v.", "t") +BUILTIN(__sync_swap_1, "ccD*c.", "tn") +BUILTIN(__sync_swap_2, "ssD*s.", "tn") +BUILTIN(__sync_swap_4, "iiD*i.", "tn") +BUILTIN(__sync_swap_8, "LLiLLiD*LLi.", "tn") +BUILTIN(__sync_swap_16, "LLLiLLLiD*LLLi.", "tn") BUILTIN(__atomic_load, "v.", "t") BUILTIN(__atomic_store, "v.", "t") Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Fri Dec 30 22:07:15 2011 (r229038) +++ stable/9/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp Fri Dec 30 22:17:10 2011 (r229039) @@ -803,14 +803,6 @@ Sema::SemaBuiltinAtomicOverloaded(ExprRe for (unsigned i = 0; i != NumFixed; ++i) { ExprResult Arg = TheCall->getArg(i+1); - // If the argument is an implicit cast, then there was a promotion due to - // "...", just remove it now. - if (ImplicitCastExpr *ICE = dyn_cast(Arg.get())) { - Arg = ICE->getSubExpr(); - ICE->setSubExpr(0); - TheCall->setArg(i+1, Arg.get()); - } - // GCC does an implicit conversion to the pointer or integer ValType. This // can fail in some cases (1i -> int**), check for this error case now. // Initialize the argument. From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:27:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC088106564A; Fri, 30 Dec 2011 22:27:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A97488FC08; Fri, 30 Dec 2011 22:27:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMRQ33033705; Fri, 30 Dec 2011 22:27:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMRQfc033703; Fri, 30 Dec 2011 22:27:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302227.pBUMRQfc033703@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:27:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229040 - stable/9/contrib/llvm/tools/clang/include/clang/Basic X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:27:26 -0000 Author: dim Date: Fri Dec 30 22:27:26 2011 New Revision: 229040 URL: http://svn.freebsd.org/changeset/base/229040 Log: MFC r227736: Pull in r144237 from upstream clang trunk: Fix the signature of __sigsetjmp and sigsetjmp. This eliminates incorrect warnings about the prototypes of these functions. Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:17:10 2011 (r229039) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:27:26 2011 (r229040) @@ -679,9 +679,9 @@ LIBBUILTIN(vfork, "i", "fj", // it here to avoid having two identical LIBBUILTIN entries. #undef setjmp LIBBUILTIN(_setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) -LIBBUILTIN(__sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES) +LIBBUILTIN(__sigsetjmp, "iSJi", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(setjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) -LIBBUILTIN(sigsetjmp, "iJi", "fj", "setjmp.h", ALL_LANGUAGES) +LIBBUILTIN(sigsetjmp, "iSJi", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(setjmp_syscall, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(savectx, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(qsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:30:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8D35106564A; Fri, 30 Dec 2011 22:30:21 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D40758FC14; Fri, 30 Dec 2011 22:30:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMULRs033861; Fri, 30 Dec 2011 22:30:21 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMULC6033851; Fri, 30 Dec 2011 22:30:21 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302230.pBUMULC6033851@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229041 - in stable/9/contrib/llvm/tools/clang: include/clang/AST include/clang/Basic include/clang/Serialization lib/AST lib/Sema lib/Serialization X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:30:22 -0000 Author: dim Date: Fri Dec 30 22:30:21 2011 New Revision: 229041 URL: http://svn.freebsd.org/changeset/base/229041 Log: MFC r227737: Pull in r144505 from upstream clang trunk: Fix the signature of the getcontext builtin, eliminating incorrect warnings about its prototype. This also adds a -W(no-)builtin-requires-header option, which can be used to enable or disable warnings of this kind. Modified: stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h Fri Dec 30 22:30:21 2011 (r229041) @@ -229,6 +229,9 @@ class ASTContext : public llvm::RefCount /// \brief The type for the C sigjmp_buf type. TypeDecl *sigjmp_bufDecl; + /// \brief The type for the C ucontext_t type. + TypeDecl *ucontext_tDecl; + /// \brief Type for the Block descriptor for Blocks CodeGen. /// /// Since this is only used for generation of debug info, it is not @@ -955,6 +958,18 @@ public: return QualType(); } + /// \brief Set the type for the C ucontext_t type. + void setucontext_tDecl(TypeDecl *ucontext_tDecl) { + this->ucontext_tDecl = ucontext_tDecl; + } + + /// \brief Retrieve the C ucontext_t type. + QualType getucontext_tType() const { + if (ucontext_tDecl) + return getTypeDeclType(ucontext_tDecl); + return QualType(); + } + /// \brief The result type of logical operations, '<', '>', '!=', etc. QualType getLogicalOperationType() const { return getLangOptions().CPlusPlus ? BoolTy : IntTy; @@ -1099,7 +1114,8 @@ public: enum GetBuiltinTypeError { GE_None, //< No error GE_Missing_stdio, //< Missing a type from - GE_Missing_setjmp //< Missing a type from + GE_Missing_setjmp, //< Missing a type from + GE_Missing_ucontext //< Missing a type from }; /// GetBuiltinType - Return the type for the specified builtin. If Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def Fri Dec 30 22:30:21 2011 (r229041) @@ -39,6 +39,7 @@ // P -> FILE // J -> jmp_buf // SJ -> sigjmp_buf +// K -> ucontext_t // . -> "...". This may only occur at the end of the function list. // // Types may be prefixed with the following modifiers: @@ -685,7 +686,7 @@ LIBBUILTIN(sigsetjmp, "iSJi", "fj", LIBBUILTIN(setjmp_syscall, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(savectx, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(qsetjmp, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) -LIBBUILTIN(getcontext, "iJ", "fj", "setjmp.h", ALL_LANGUAGES) +LIBBUILTIN(getcontext, "iK*", "fj", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(_longjmp, "vJi", "fr", "setjmp.h", ALL_LANGUAGES) LIBBUILTIN(siglongjmp, "vSJi", "fr", "setjmp.h", ALL_LANGUAGES) Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td Fri Dec 30 22:30:21 2011 (r229041) @@ -26,6 +26,7 @@ def : DiagGroup<"attributes">; def : DiagGroup<"bad-function-cast">; def Availability : DiagGroup<"availability">; def BoolConversions : DiagGroup<"bool-conversions">; +def BuiltinRequiresHeader : DiagGroup<"builtin-requires-header">; def CXXCompat: DiagGroup<"c++-compat">; def CastAlign : DiagGroup<"cast-align">; def : DiagGroup<"cast-qual">; Modified: stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td Fri Dec 30 22:30:21 2011 (r229041) @@ -254,10 +254,16 @@ def note_please_include_header : Note< def note_previous_builtin_declaration : Note<"%0 is a builtin with type %1">; def warn_implicit_decl_requires_stdio : Warning< "declaration of built-in function '%0' requires inclusion of the header " - "">; + "">, + InGroup; def warn_implicit_decl_requires_setjmp : Warning< "declaration of built-in function '%0' requires inclusion of the header " - "">; + "">, + InGroup; +def warn_implicit_decl_requires_ucontext : Warning< + "declaration of built-in function '%0' requires inclusion of the header " + "">, + InGroup; def warn_redecl_library_builtin : Warning< "incompatible redeclaration of library function %0">; def err_builtin_definition : Error<"definition of builtin function %0">; Modified: stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h ============================================================================== --- stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h Fri Dec 30 22:30:21 2011 (r229041) @@ -677,7 +677,9 @@ namespace clang { /// \brief Objective-C "Class" redefinition type SPECIAL_TYPE_OBJC_CLASS_REDEFINITION = 7, /// \brief Objective-C "SEL" redefinition type - SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 8 + SPECIAL_TYPE_OBJC_SEL_REDEFINITION = 8, + /// \brief C ucontext_t typedef type + SPECIAL_TYPE_UCONTEXT_T = 9 }; /// \brief The number of special type IDs. Modified: stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -227,8 +227,9 @@ ASTContext::ASTContext(LangOptions& LOpt ObjCIdDecl(0), ObjCSelDecl(0), ObjCClassDecl(0), CFConstantStringTypeDecl(0), ObjCInstanceTypeDecl(0), FILEDecl(0), - jmp_bufDecl(0), sigjmp_bufDecl(0), BlockDescriptorType(0), - BlockDescriptorExtendedType(0), cudaConfigureCallDecl(0), + jmp_bufDecl(0), sigjmp_bufDecl(0), ucontext_tDecl(0), + BlockDescriptorType(0), BlockDescriptorExtendedType(0), + cudaConfigureCallDecl(0), NullTypeSourceInfo(QualType()), SourceMgr(SM), LangOpts(LOpts), AddrSpaceMap(0), Target(t), PrintingPolicy(LOpts), @@ -6293,6 +6294,15 @@ static QualType DecodeTypeFromStr(const return QualType(); } break; + case 'K': + assert(HowLong == 0 && !Signed && !Unsigned && "Bad modifiers for 'K'!"); + Type = Context.getucontext_tType(); + + if (Type.isNull()) { + Error = ASTContext::GE_Missing_ucontext; + return QualType(); + } + break; } // If there are modifiers and if we're allowed to parse them, go for it. Modified: stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -1305,6 +1305,12 @@ NamedDecl *Sema::LazilyCreateBuiltin(Ide Diag(Loc, diag::warn_implicit_decl_requires_setjmp) << Context.BuiltinInfo.GetName(BID); return 0; + + case ASTContext::GE_Missing_ucontext: + if (ForRedeclaration) + Diag(Loc, diag::warn_implicit_decl_requires_ucontext) + << Context.BuiltinInfo.GetName(BID); + return 0; } if (!ForRedeclaration && Context.BuiltinInfo.isPredefinedLibFunction(BID)) { @@ -3635,6 +3641,8 @@ Sema::ActOnTypedefNameDecl(Scope *S, Dec Context.setjmp_bufDecl(NewTD); else if (II->isStr("sigjmp_buf")) Context.setsigjmp_bufDecl(NewTD); + else if (II->isStr("ucontext_t")) + Context.setucontext_tDecl(NewTD); else if (II->isStr("__builtin_va_list")) Context.setBuiltinVaListType(Context.getTypedefType(NewTD)); } Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -2659,6 +2659,24 @@ void ASTReader::InitializeContext() { if (Context.ObjCSelRedefinitionType.isNull()) Context.ObjCSelRedefinitionType = GetType(ObjCSelRedef); } + + if (unsigned Ucontext_t = SpecialTypes[SPECIAL_TYPE_UCONTEXT_T]) { + QualType Ucontext_tType = GetType(Ucontext_t); + if (Ucontext_tType.isNull()) { + Error("ucontext_t type is NULL"); + return; + } + + if (!Context.ucontext_tDecl) { + if (const TypedefType *Typedef = Ucontext_tType->getAs()) + Context.setucontext_tDecl(Typedef->getDecl()); + else { + const TagType *Tag = Ucontext_tType->getAs(); + assert(Tag && "Invalid ucontext_t type in AST file"); + Context.setucontext_tDecl(Tag->getDecl()); + } + } + } } ReadPragmaDiagnosticMappings(Context.getDiagnostics()); Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp Fri Dec 30 22:27:26 2011 (r229040) +++ stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp Fri Dec 30 22:30:21 2011 (r229041) @@ -2994,6 +2994,7 @@ void ASTWriter::WriteASTCore(Sema &SemaR AddTypeRef(Context.ObjCIdRedefinitionType, SpecialTypes); AddTypeRef(Context.ObjCClassRedefinitionType, SpecialTypes); AddTypeRef(Context.ObjCSelRedefinitionType, SpecialTypes); + AddTypeRef(Context.getucontext_tType(), SpecialTypes); // Keep writing types and declarations until all types and // declarations have been written. From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:40:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 035BB1065673; Fri, 30 Dec 2011 22:40:18 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1B268FC08; Fri, 30 Dec 2011 22:40:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMeHiE034244; Fri, 30 Dec 2011 22:40:17 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMeHSI034226; Fri, 30 Dec 2011 22:40:17 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302240.pBUMeHSI034226@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229042 - in stable/9: contrib/llvm/lib/CodeGen contrib/llvm/lib/CodeGen/AsmPrinter contrib/llvm/lib/CodeGen/SelectionDAG contrib/llvm/lib/Target/ARM contrib/llvm/lib/Target/CppBackend ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:40:18 -0000 Author: dim Date: Fri Dec 30 22:40:17 2011 New Revision: 229042 URL: http://svn.freebsd.org/changeset/base/229042 Log: MFC r228379: Upgrade our copy of llvm/clang to 3.0 release. Release notes can be found at: http://llvm.org/releases/3.0/docs/ReleaseNotes.html MFC r228383: Use the correct upstream revision number for llvm/clang 3.0 release. The r145546 revision is from branches/release_30, the r145349 revision is from tags/RELEASE_30/final. Added: stable/9/lib/clang/include/MipsGenCodeEmitter.inc - copied unchanged from r228379, head/lib/clang/include/MipsGenCodeEmitter.inc Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td stable/9/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFormats.td stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td stable/9/contrib/llvm/lib/Target/Mips/MipsJITInfo.cpp stable/9/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp stable/9/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp stable/9/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp stable/9/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td stable/9/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h stable/9/contrib/llvm/tools/clang/include/clang/Frontend/HeaderSearchOptions.h stable/9/contrib/llvm/tools/clang/lib/Basic/Version.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp stable/9/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp stable/9/contrib/llvm/tools/clang/lib/Driver/ToolChains.h stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp stable/9/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp stable/9/lib/clang/include/clang/Basic/Version.inc stable/9/lib/clang/libllvmmipscodegen/Makefile Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) stable/9/lib/clang/ (props changed) Modified: stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -527,18 +527,20 @@ bool CompileUnit::addConstantValue(DIE * // Get the raw data form of the large APInt. const APInt Val = CI->getValue(); - const char *Ptr = (const char*)Val.getRawData(); + const uint64_t *Ptr64 = Val.getRawData(); int NumBytes = Val.getBitWidth() / 8; // 8 bits per byte. bool LittleEndian = Asm->getTargetData().isLittleEndian(); - int Incr = (LittleEndian ? 1 : -1); - int Start = (LittleEndian ? 0 : NumBytes - 1); - int Stop = (LittleEndian ? NumBytes : -1); // Output the constant to DWARF one byte at a time. - for (; Start != Stop; Start += Incr) - addUInt(Block, 0, dwarf::DW_FORM_data1, - (unsigned char)0xFF & Ptr[Start]); + for (int i = 0; i < NumBytes; i++) { + uint8_t c; + if (LittleEndian) + c = Ptr64[i / 8] >> (8 * (i & 7)); + else + c = Ptr64[(NumBytes - 1 - i) / 8] >> (8 * ((NumBytes - 1 - i) & 7)); + addUInt(Block, 0, dwarf::DW_FORM_data1, c); + } addBlock(Die, dwarf::DW_AT_const_value, 0, Block); return true; Modified: stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -119,7 +119,8 @@ LLVMTargetMachine::LLVMTargetMachine(con // we'll crash later. // Provide the user with a useful error message about what's wrong. assert(AsmInfo && "MCAsmInfo not initialized." - "Make sure you include the correct TargetSelect.h!"); + "Make sure you include the correct TargetSelect.h" + "and that InitializeAllTargetMCs() is being invoked!"); } bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, Modified: stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -2034,14 +2034,17 @@ bool SelectionDAGBuilder::handleJTSwitch return false; APInt Range = ComputeRange(First, Last); - double Density = TSize.roundToDouble() / Range.roundToDouble(); - if (Density < 0.4) + // The density is TSize / Range. Require at least 40%. + // It should not be possible for IntTSize to saturate for sane code, but make + // sure we handle Range saturation correctly. + uint64_t IntRange = Range.getLimitedValue(UINT64_MAX/10); + uint64_t IntTSize = TSize.getLimitedValue(UINT64_MAX/10); + if (IntTSize * 10 < IntRange * 4) return false; DEBUG(dbgs() << "Lowering jump table\n" << "First entry: " << First << ". Last entry: " << Last << '\n' - << "Range: " << Range - << ". Size: " << TSize << ". Density: " << Density << "\n\n"); + << "Range: " << Range << ". Size: " << TSize << ".\n\n"); // Get the MachineFunction which holds the current MBB. This is used when // inserting any additional MBBs necessary to represent the switch. Modified: stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp ============================================================================== --- stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -506,7 +506,9 @@ getExprForDwarfGlobalReference(const Glo // Add information about the stub reference to MachOMMI so that the stub // gets emitted by the asmprinter. MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym); + MachineModuleInfoImpl::StubValueTy &StubSym = + GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) : + MachOMMI.getGVStubEntry(SSym); if (StubSym.getPointer() == 0) { MCSymbol *Sym = Mang->getSymbol(GV); StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage()); @@ -534,7 +536,9 @@ getCFIPersonalitySymbol(const GlobalValu // Add information about the stub reference to MachOMMI so that the stub // gets emitted by the asmprinter. MCSymbol *SSym = getContext().GetOrCreateSymbol(Name.str()); - MachineModuleInfoImpl::StubValueTy &StubSym = MachOMMI.getGVStubEntry(SSym); + MachineModuleInfoImpl::StubValueTy &StubSym = + GV->hasHiddenVisibility() ? MachOMMI.getHiddenGVStubEntry(SSym) : + MachOMMI.getGVStubEntry(SSym); if (StubSym.getPointer() == 0) { MCSymbol *Sym = Mang->getSymbol(GV); StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage()); Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -63,6 +63,13 @@ ARMBaseRegisterInfo::ARMBaseRegisterInfo const unsigned* ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const { + bool ghcCall = false; + + if (MF) { + const Function *F = MF->getFunction(); + ghcCall = (F ? F->getCallingConv() == CallingConv::GHC : false); + } + static const unsigned CalleeSavedRegs[] = { ARM::LR, ARM::R11, ARM::R10, ARM::R9, ARM::R8, ARM::R7, ARM::R6, ARM::R5, ARM::R4, @@ -82,7 +89,13 @@ ARMBaseRegisterInfo::getCalleeSavedRegs( ARM::D11, ARM::D10, ARM::D9, ARM::D8, 0 }; - return STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs; + + static const unsigned GhcCalleeSavedRegs[] = { + 0 + }; + + return ghcCall ? GhcCalleeSavedRegs : + STI.isTargetDarwin() ? DarwinCalleeSavedRegs : CalleeSavedRegs; } BitVector ARMBaseRegisterInfo:: Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMCallingConv.td Fri Dec 30 22:40:17 2011 (r229042) @@ -82,6 +82,25 @@ def RetFastCC_ARM_APCS : CallingConv<[ CCDelegateTo ]>; +//===----------------------------------------------------------------------===// +// ARM APCS Calling Convention for GHC +//===----------------------------------------------------------------------===// + +def CC_ARM_APCS_GHC : CallingConv<[ + // Handle all vector types as either f64 or v2f64. + CCIfType<[v1i64, v2i32, v4i16, v8i8, v2f32], CCBitConvertToType>, + CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType>, + + CCIfType<[v2f64], CCAssignToReg<[Q4, Q5]>>, + CCIfType<[f64], CCAssignToReg<[D8, D9, D10, D11]>>, + CCIfType<[f32], CCAssignToReg<[S16, S17, S18, S19, S20, S21, S22, S23]>>, + + // Promote i8/i16 arguments to i32. + CCIfType<[i8, i16], CCPromoteToType>, + + // Pass in STG registers: Base, Sp, Hp, R1, R2, R3, R4, SpLim + CCIfType<[i32], CCAssignToReg<[R4, R5, R6, R7, R8, R9, R10, R11]>> +]>; //===----------------------------------------------------------------------===// // ARM AAPCS (EABI) Calling Convention, common parts Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -1548,6 +1548,11 @@ CCAssignFn *ARMFastISel::CCAssignFnForCa return (Return ? RetCC_ARM_AAPCS: CC_ARM_AAPCS); case CallingConv::ARM_APCS: return (Return ? RetCC_ARM_APCS: CC_ARM_APCS); + case CallingConv::GHC: + if (Return) + llvm_unreachable("Can't return in GHC call convention"); + else + return CC_ARM_APCS_GHC; } } Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -15,6 +15,8 @@ #include "ARMBaseInstrInfo.h" #include "ARMBaseRegisterInfo.h" #include "ARMMachineFunctionInfo.h" +#include "llvm/CallingConv.h" +#include "llvm/Function.h" #include "MCTargetDesc/ARMAddressingModes.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" @@ -139,6 +141,10 @@ void ARMFrameLowering::emitPrologue(Mach unsigned GPRCS1Size = 0, GPRCS2Size = 0, DPRCSSize = 0; int FramePtrSpillFI = 0; + // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. + if (MF.getFunction()->getCallingConv() == CallingConv::GHC) + return; + // Allocate the vararg register save area. This is not counted in NumBytes. if (VARegSaveSize) emitSPUpdate(isARM, MBB, MBBI, dl, TII, -VARegSaveSize, @@ -326,6 +332,10 @@ void ARMFrameLowering::emitEpilogue(Mach int NumBytes = (int)MFI->getStackSize(); unsigned FramePtr = RegInfo->getFrameRegister(MF); + // All calls are tail calls in GHC calling conv, and functions have no prologue/epilogue. + if (MF.getFunction()->getCallingConv() == CallingConv::GHC) + return; + if (!AFI->hasStackFrame()) { if (NumBytes != 0) emitSPUpdate(isARM, MBB, MBBI, dl, TII, NumBytes); Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -1091,6 +1091,8 @@ CCAssignFn *ARMTargetLowering::CCAssignF return (Return ? RetCC_ARM_AAPCS : CC_ARM_AAPCS); case CallingConv::ARM_APCS: return (Return ? RetCC_ARM_APCS : CC_ARM_APCS); + case CallingConv::GHC: + return (Return ? RetCC_ARM_APCS : CC_ARM_APCS_GHC); } } Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td Fri Dec 30 22:40:17 2011 (r229042) @@ -1538,8 +1538,7 @@ multiclass thumb2_ld_multgetName()); Out << "\", " << (load->isVolatile() ? "true" : "false" ) << ", " << bbname << ");"; + if (load->getAlignment()) + nl(Out) << iName << "->setAlignment(" + << load->getAlignment() << ");"; + if (load->isAtomic()) { + StringRef Ordering = ConvertAtomicOrdering(load->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(load->getSynchScope()); + nl(Out) << iName << "->setAtomic(" + << Ordering << ", " << CrossThread << ");"; + } break; } case Instruction::Store: { const StoreInst* store = cast(I); - Out << " new StoreInst(" + Out << "StoreInst* " << iName << " = new StoreInst(" << opNames[0] << ", " << opNames[1] << ", " << (store->isVolatile() ? "true" : "false") << ", " << bbname << ");"; + if (store->getAlignment()) + nl(Out) << iName << "->setAlignment(" + << store->getAlignment() << ");"; + if (store->isAtomic()) { + StringRef Ordering = ConvertAtomicOrdering(store->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(store->getSynchScope()); + nl(Out) << iName << "->setAtomic(" + << Ordering << ", " << CrossThread << ");"; + } break; } case Instruction::GetElementPtr: { @@ -1447,6 +1486,60 @@ void CppWriter::printInstruction(const I Out << "\", " << bbname << ");"; break; } + case Instruction::Fence: { + const FenceInst *fi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(fi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope()); + Out << "FenceInst* " << iName + << " = new FenceInst(mod->getContext(), " + << Ordering << ", " << CrossThread << ", " << bbname + << ");"; + break; + } + case Instruction::AtomicCmpXchg: { + const AtomicCmpXchgInst *cxi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(cxi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(cxi->getSynchScope()); + Out << "AtomicCmpXchgInst* " << iName + << " = new AtomicCmpXchgInst(" + << opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", " + << Ordering << ", " << CrossThread << ", " << bbname + << ");"; + nl(Out) << iName << "->setName(\""; + printEscapedString(cxi->getName()); + Out << "\");"; + break; + } + case Instruction::AtomicRMW: { + const AtomicRMWInst *rmwi = cast(I); + StringRef Ordering = ConvertAtomicOrdering(rmwi->getOrdering()); + StringRef CrossThread = ConvertAtomicSynchScope(rmwi->getSynchScope()); + StringRef Operation; + switch (rmwi->getOperation()) { + case AtomicRMWInst::Xchg: Operation = "AtomicRMWInst::Xchg"; break; + case AtomicRMWInst::Add: Operation = "AtomicRMWInst::Add"; break; + case AtomicRMWInst::Sub: Operation = "AtomicRMWInst::Sub"; break; + case AtomicRMWInst::And: Operation = "AtomicRMWInst::And"; break; + case AtomicRMWInst::Nand: Operation = "AtomicRMWInst::Nand"; break; + case AtomicRMWInst::Or: Operation = "AtomicRMWInst::Or"; break; + case AtomicRMWInst::Xor: Operation = "AtomicRMWInst::Xor"; break; + case AtomicRMWInst::Max: Operation = "AtomicRMWInst::Max"; break; + case AtomicRMWInst::Min: Operation = "AtomicRMWInst::Min"; break; + case AtomicRMWInst::UMax: Operation = "AtomicRMWInst::UMax"; break; + case AtomicRMWInst::UMin: Operation = "AtomicRMWInst::UMin"; break; + case AtomicRMWInst::BAD_BINOP: llvm_unreachable("Bad atomic operation"); + } + Out << "AtomicRMWInst* " << iName + << " = new AtomicRMWInst(" + << Operation << ", " + << opNames[0] << ", " << opNames[1] << ", " + << Ordering << ", " << CrossThread << ", " << bbname + << ");"; + nl(Out) << iName << "->setName(\""; + printEscapedString(rmwi->getName()); + Out << "\");"; + break; + } } DefinedValues.insert(I); nl(Out); @@ -1623,7 +1716,9 @@ void CppWriter::printFunctionBody(const Out << "Value* " << getCppName(AI) << " = args++;"; nl(Out); if (AI->hasName()) { - Out << getCppName(AI) << "->setName(\"" << AI->getName() << "\");"; + Out << getCppName(AI) << "->setName(\""; + printEscapedString(AI->getName()); + Out << "\");"; nl(Out); } } Modified: stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Fri Dec 30 22:40:17 2011 (r229042) @@ -39,51 +39,51 @@ def imm32_63 : ImmLeaf func, bits<5> _rs, string instr_asm, SDNode OpNode, PatFrag PF>: - FR<0x00, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$b, shamt_64:$c), - !strconcat(instr_asm, "\t$dst, $b, $c"), - [(set CPU64Regs:$dst, (OpNode CPU64Regs:$b, (i64 PF:$c)))], + FR<0x00, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rt, shamt_64:$shamt), + !strconcat(instr_asm, "\t$rd, $rt, $shamt"), + [(set CPU64Regs:$rd, (OpNode CPU64Regs:$rt, (i64 PF:$shamt)))], IIAlu> { let rs = _rs; } class LogicR_shift_rotate_reg64 func, bits<5> _shamt, string instr_asm, SDNode OpNode>: - FR<0x00, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$c, CPU64Regs:$b), - !strconcat(instr_asm, "\t$dst, $b, $c"), - [(set CPU64Regs:$dst, (OpNode CPU64Regs:$b, CPU64Regs:$c))], IIAlu> { + FR<0x00, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rs, CPU64Regs:$rt), + !strconcat(instr_asm, "\t$rd, $rt, $rs"), + [(set CPU64Regs:$rd, (OpNode CPU64Regs:$rt, CPU64Regs:$rs))], IIAlu> { let shamt = _shamt; } // Mul, Div -let Defs = [HI64, LO64] in { +let rd = 0, shamt = 0, Defs = [HI64, LO64] in { let isCommutable = 1 in class Mul64 func, string instr_asm, InstrItinClass itin>: - FR<0x00, func, (outs), (ins CPU64Regs:$a, CPU64Regs:$b), - !strconcat(instr_asm, "\t$a, $b"), [], itin>; + FR<0x00, func, (outs), (ins CPU64Regs:$rs, CPU64Regs:$rt), + !strconcat(instr_asm, "\t$rs, $rt"), [], itin>; class Div64 func, string instr_asm, InstrItinClass itin>: - FR<0x00, func, (outs), (ins CPU64Regs:$a, CPU64Regs:$b), - !strconcat(instr_asm, "\t$$zero, $a, $b"), - [(op CPU64Regs:$a, CPU64Regs:$b)], itin>; + FR<0x00, func, (outs), (ins CPU64Regs:$rs, CPU64Regs:$rt), + !strconcat(instr_asm, "\t$$zero, $rs, $rt"), + [(op CPU64Regs:$rs, CPU64Regs:$rt)], itin>; } // Move from Hi/Lo let shamt = 0 in { let rs = 0, rt = 0 in class MoveFromLOHI64 func, string instr_asm>: - FR<0x00, func, (outs CPU64Regs:$dst), (ins), - !strconcat(instr_asm, "\t$dst"), [], IIHiLo>; + FR<0x00, func, (outs CPU64Regs:$rd), (ins), + !strconcat(instr_asm, "\t$rd"), [], IIHiLo>; let rt = 0, rd = 0 in class MoveToLOHI64 func, string instr_asm>: - FR<0x00, func, (outs), (ins CPU64Regs:$src), - !strconcat(instr_asm, "\t$src"), [], IIHiLo>; + FR<0x00, func, (outs), (ins CPU64Regs:$rs), + !strconcat(instr_asm, "\t$rs"), [], IIHiLo>; } // Count Leading Ones/Zeros in Word class CountLeading64 func, string instr_asm, list pattern>: - FR<0x1c, func, (outs CPU64Regs:$dst), (ins CPU64Regs:$src), - !strconcat(instr_asm, "\t$dst, $src"), pattern, IIAlu>, + FR<0x1c, func, (outs CPU64Regs:$rd), (ins CPU64Regs:$rs), + !strconcat(instr_asm, "\t$rd, $rs"), pattern, IIAlu>, Requires<[HasBitCount]> { let shamt = 0; let rt = rd; @@ -180,9 +180,9 @@ let Uses = [LO64] in /// Count Leading def DCLZ : CountLeading64<0x24, "dclz", - [(set CPU64Regs:$dst, (ctlz CPU64Regs:$src))]>; + [(set CPU64Regs:$rd, (ctlz CPU64Regs:$rs))]>; def DCLO : CountLeading64<0x25, "dclo", - [(set CPU64Regs:$dst, (ctlz (not CPU64Regs:$src)))]>; + [(set CPU64Regs:$rd, (ctlz (not CPU64Regs:$rs)))]>; //===----------------------------------------------------------------------===// // Arbitrary patterns that map to one or more instructions Modified: stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/MipsCodeEmitter.cpp Fri Dec 30 22:40:17 2011 (r229042) @@ -105,6 +105,9 @@ class MipsCodeEmitter : public MachineFu unsigned getRelocation(const MachineInstr &MI, const MachineOperand &MO) const; + unsigned getMemEncoding(const MachineInstr &MI, unsigned OpNo) const; + unsigned getSizeExtEncoding(const MachineInstr &MI, unsigned OpNo) const; + unsigned getSizeInsEncoding(const MachineInstr &MI, unsigned OpNo) const; }; } @@ -153,6 +156,28 @@ unsigned MipsCodeEmitter::getRelocation( return Mips::reloc_mips_lo; } +unsigned MipsCodeEmitter::getMemEncoding(const MachineInstr &MI, + unsigned OpNo) const { + // Base register is encoded in bits 20-16, offset is encoded in bits 15-0. + assert(MI.getOperand(OpNo).isReg()); + unsigned RegBits = getMachineOpValue(MI, MI.getOperand(OpNo)) << 16; + return + (getMachineOpValue(MI, MI.getOperand(OpNo+1)) & 0xFFFF) | RegBits; +} + +unsigned MipsCodeEmitter::getSizeExtEncoding(const MachineInstr &MI, + unsigned OpNo) const { + // size is encoded as size-1. + return getMachineOpValue(MI, MI.getOperand(OpNo)) - 1; +} + +unsigned MipsCodeEmitter::getSizeInsEncoding(const MachineInstr &MI, + unsigned OpNo) const { + // size is encoded as pos+size-1. + return getMachineOpValue(MI, MI.getOperand(OpNo-1)) + + getMachineOpValue(MI, MI.getOperand(OpNo)) - 1; +} + /// getMachineOpValue - Return binary encoding of operand. If the machine /// operand requires relocation, record the relocation and return zero. unsigned MipsCodeEmitter::getMachineOpValue(const MachineInstr &MI, @@ -238,8 +263,4 @@ FunctionPass *llvm::createMipsJITCodeEmi return new MipsCodeEmitter(TM, JCE); } -unsigned MipsCodeEmitter::getBinaryCodeForInstr(const MachineInstr &MI) const { - // this function will be automatically generated by the CodeEmitterGenerator - // using TableGen - return 0; -} +#include "MipsGenCodeEmitter.inc" Modified: stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td Fri Dec 30 22:40:17 2011 (r229042) @@ -76,14 +76,16 @@ def IsNotSingleFloat : Predicate<"!Subta // FP load. class FPLoad op, string opstr, PatFrag FOp, RegisterClass RC, Operand MemOpnd>: - FFI; + FMem; // FP store. class FPStore op, string opstr, PatFrag FOp, RegisterClass RC, Operand MemOpnd>: - FFI; + FMem; // Instructions that convert an FP value to 32-bit fixed point. multiclass FFR1_W_M funct, string opstr> { @@ -158,22 +160,28 @@ defm FSQRT : FFR1P_M<0x4, "sqrt", fsqr // stores, and moves between floating-point and integer registers. // When defining instructions, we reference all 32-bit registers, // regardless of register aliasing. -let fd = 0 in { - /// Move Control Registers From/To CPU Registers - def CFC1 : FFR<0x11, 0x0, 0x2, (outs CPURegs:$rt), (ins CCR:$fs), + +class FFRGPR _fmt, dag outs, dag ins, string asmstr, list pattern>: + FFR<0x11, 0x0, _fmt, outs, ins, asmstr, pattern> { + bits<5> rt; + let ft = rt; + let fd = 0; +} + +/// Move Control Registers From/To CPU Registers +def CFC1 : FFRGPR<0x2, (outs CPURegs:$rt), (ins CCR:$fs), "cfc1\t$rt, $fs", []>; - def CTC1 : FFR<0x11, 0x0, 0x6, (outs CCR:$rt), (ins CPURegs:$fs), - "ctc1\t$fs, $rt", []>; +def CTC1 : FFRGPR<0x6, (outs CCR:$fs), (ins CPURegs:$rt), + "ctc1\t$rt, $fs", []>; - def MFC1 : FFR<0x11, 0x00, 0x00, (outs CPURegs:$rt), (ins FGR32:$fs), +def MFC1 : FFRGPR<0x00, (outs CPURegs:$rt), (ins FGR32:$fs), "mfc1\t$rt, $fs", [(set CPURegs:$rt, (bitconvert FGR32:$fs))]>; - def MTC1 : FFR<0x11, 0x00, 0x04, (outs FGR32:$fs), (ins CPURegs:$rt), +def MTC1 : FFRGPR<0x04, (outs FGR32:$fs), (ins CPURegs:$rt), "mtc1\t$rt, $fs", [(set FGR32:$fs, (bitconvert CPURegs:$rt))]>; -} def FMOV_S : FFR1<0x6, 16, "mov", "s", FGR32, FGR32>; def FMOV_D32 : FFR1<0x6, 17, "mov", "d", AFGR64, AFGR64>, @@ -203,7 +211,7 @@ let Predicates = [NotN64] in { } /// Floating-point Aritmetic -defm FADD : FFR2P_M<0x10, "add", fadd, 1>; +defm FADD : FFR2P_M<0x00, "add", fadd, 1>; defm FDIV : FFR2P_M<0x03, "div", fdiv>; defm FMUL : FFR2P_M<0x02, "mul", fmul, 1>; defm FSUB : FFR2P_M<0x01, "sub", fsub>; @@ -218,12 +226,16 @@ def MIPS_BRANCH_T : PatLeaf<(i32 1)>; /// Floating Point Branch of False/True (Likely) let isBranch=1, isTerminator=1, hasDelaySlot=1, base=0x8, Uses=[FCR31] in - class FBRANCH : FFI<0x11, (outs), - (ins brtarget:$dst), !strconcat(asmstr, "\t$dst"), - [(MipsFPBrcond op, bb:$dst)]>; + class FBRANCH nd, bits<1> tf, PatLeaf op, string asmstr> : + FFI<0x11, (outs), (ins brtarget:$dst), !strconcat(asmstr, "\t$dst"), + [(MipsFPBrcond op, bb:$dst)]> { + let Inst{20-18} = 0; + let Inst{17} = nd; + let Inst{16} = tf; +} -def BC1F : FBRANCH; -def BC1T : FBRANCH; +def BC1F : FBRANCH<0, 0, MIPS_BRANCH_F, "bc1f">; +def BC1T : FBRANCH<0, 1, MIPS_BRANCH_T, "bc1t">; //===----------------------------------------------------------------------===// // Floating Point Flag Conditions @@ -249,11 +261,11 @@ def MIPS_FCOND_NGT : PatLeaf<(i32 15)>; /// Floating Point Compare let Defs=[FCR31] in { - def FCMP_S32 : FCC<0x0, (outs), (ins FGR32:$fs, FGR32:$ft, condcode:$cc), + def FCMP_S32 : FCC<0x10, (outs), (ins FGR32:$fs, FGR32:$ft, condcode:$cc), "c.$cc.s\t$fs, $ft", [(MipsFPCmp FGR32:$fs, FGR32:$ft, imm:$cc)]>; - def FCMP_D32 : FCC<0x1, (outs), (ins AFGR64:$fs, AFGR64:$ft, condcode:$cc), + def FCMP_D32 : FCC<0x11, (outs), (ins AFGR64:$fs, AFGR64:$ft, condcode:$cc), "c.$cc.d\t$fs, $ft", [(MipsFPCmp AFGR64:$fs, AFGR64:$ft, imm:$cc)]>, Requires<[NotFP64bit]>; @@ -287,7 +299,8 @@ let Predicates = [NotFP64bit] in { defm : MovnPats; } -let usesCustomInserter = 1, Uses = [FCR31], Constraints = "$F = $dst" in { +let cc = 0, usesCustomInserter = 1, Uses = [FCR31], + Constraints = "$F = $dst" in { // flag:float, data:int class CondMovFPInt tf, string instr_asm> : FCMOV [(set CPURegs:$dst, (cmov CPURegs:$T, CPURegs:$F))]>; // flag:float, data:float +let cc = 0 in class CondMovFPFP fmt, bits<1> tf, string instr_asm> : FFCMOV val> { + bits<4> Value = val; +} + +def Pseudo : Format<0>; +def FrmR : Format<1>; +def FrmI : Format<2>; +def FrmJ : Format<3>; +def FrmFR : Format<4>; +def FrmFI : Format<5>; +def FrmOther : Format<6>; // Instruction w/ a custom format + // Generic Mips Format class MipsInst pattern, - InstrItinClass itin>: Instruction + InstrItinClass itin, Format f>: Instruction { field bits<32> Inst; + Format Form = f; let Namespace = "Mips"; - bits<6> opcode; + bits<6> Opcode = 0; - // Top 5 bits are the 'opcode' field - let Inst{31-26} = opcode; + // Top 6 bits are the 'opcode' field + let Inst{31-26} = Opcode; - dag OutOperandList = outs; - dag InOperandList = ins; + let OutOperandList = outs; + let InOperandList = ins; let AsmString = asmstr; let Pattern = pattern; let Itinerary = itin; + + // + // Attributes specific to Mips instructions... + // + bits<4> FormBits = Form.Value; + + // TSFlags layout should be kept in sync with MipsInstrInfo.h. + let TSFlags{3-0} = FormBits; } // Mips Pseudo Instructions Format class MipsPseudo pattern>: - MipsInst { + MipsInst { + let isCodeGenOnly = 1; let isPseudo = 1; } @@ -54,7 +79,7 @@ class MipsPseudo op, bits<6> _funct, dag outs, dag ins, string asmstr, list pattern, InstrItinClass itin>: - MipsInst + MipsInst { bits<5> rd; bits<5> rs; @@ -62,7 +87,7 @@ class FR op, bits<6> _funct, dag bits<5> shamt; bits<6> funct; - let opcode = op; + let Opcode = op; let funct = _funct; let Inst{25-21} = rs; @@ -77,13 +102,13 @@ class FR op, bits<6> _funct, dag //===----------------------------------------------------------------------===// class FI op, dag outs, dag ins, string asmstr, list pattern, - InstrItinClass itin>: MipsInst + InstrItinClass itin>: MipsInst { bits<5> rt; bits<5> rs; bits<16> imm16; - let opcode = op; + let Opcode = op; let Inst{25-21} = rs; let Inst{20-16} = rt; @@ -92,13 +117,13 @@ class FI op, dag outs, dag ins, class CBranchBase op, dag outs, dag ins, string asmstr, list pattern, InstrItinClass itin>: - MipsInst + MipsInst { bits<5> rs; bits<5> rt; bits<16> imm16; - let opcode = op; + let Opcode = op; let Inst{25-21} = rs; let Inst{20-16} = rt; @@ -110,11 +135,11 @@ class CBranchBase op, dag outs, //===----------------------------------------------------------------------===// class FJ op, dag outs, dag ins, string asmstr, list pattern, - InstrItinClass itin>: MipsInst + InstrItinClass itin>: MipsInst { bits<26> addr; - let opcode = op; + let Opcode = op; let Inst{25-0} = addr; } @@ -138,7 +163,7 @@ class FJ op, dag outs, dag ins, class FFR op, bits<6> _funct, bits<5> _fmt, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> fd; bits<5> fs; @@ -146,7 +171,7 @@ class FFR op, bits<6> _funct, bi bits<5> fmt; bits<6> funct; - let opcode = op; + let Opcode = op; let funct = _funct; let fmt = _fmt; @@ -162,13 +187,13 @@ class FFR op, bits<6> _funct, bi //===----------------------------------------------------------------------===// class FFI op, dag outs, dag ins, string asmstr, list pattern>: - MipsInst + MipsInst { bits<5> ft; bits<5> base; bits<16> imm16; - let opcode = op; + let Opcode = op; let Inst{25-21} = base; let Inst{20-16} = ft; @@ -180,14 +205,14 @@ class FFI op, dag outs, dag ins, //===----------------------------------------------------------------------===// class FCC _fmt, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> fs; bits<5> ft; bits<4> cc; bits<5> fmt; - let opcode = 0x11; + let Opcode = 0x11; let fmt = _fmt; let Inst{25-21} = fmt; @@ -201,18 +226,18 @@ class FCC _fmt, dag outs, dag in class FCMOV _tf, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> rd; bits<5> rs; - bits<3> N; + bits<3> cc; bits<1> tf; - let opcode = 0; + let Opcode = 0; let tf = _tf; let Inst{25-21} = rs; - let Inst{20-18} = N; + let Inst{20-18} = cc; let Inst{17} = 0; let Inst{16} = tf; let Inst{15-11} = rd; @@ -222,20 +247,20 @@ class FCMOV _tf, dag outs, dag i class FFCMOV _fmt, bits<1> _tf, dag outs, dag ins, string asmstr, list pattern> : - MipsInst + MipsInst { bits<5> fd; bits<5> fs; - bits<3> N; + bits<3> cc; bits<5> fmt; bits<1> tf; - let opcode = 17; + let Opcode = 17; let fmt = _fmt; let tf = _tf; let Inst{25-21} = fmt; - let Inst{20-18} = N; + let Inst{20-18} = cc; let Inst{17} = 0; let Inst{16} = tf; let Inst{15-11} = fs; Modified: stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td Fri Dec 30 22:30:21 2011 (r229041) +++ stable/9/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td Fri Dec 30 22:40:17 2011 (r229042) @@ -153,6 +153,7 @@ def uimm16 : Operand { def mem : Operand { let PrintMethod = "printMemOperand"; let MIOperandInfo = (ops CPURegs, simm16); + let EncoderMethod = "getMemEncoding"; } def mem64 : Operand { @@ -163,6 +164,17 @@ def mem64 : Operand { def mem_ea : Operand { let PrintMethod = "printMemOperandEA"; let MIOperandInfo = (ops CPURegs, simm16); + let EncoderMethod = "getMemEncoding"; +} + +// size operand of ext instruction +def size_ext : Operand { + let EncoderMethod = "getSizeExtEncoding"; +} + +// size operand of ins instruction +def size_ins : Operand { + let EncoderMethod = "getSizeInsEncoding"; } // Transformation Function - get the lower 16 bits. @@ -271,14 +283,14 @@ class ArithOverflowR op, bits<6> // Arithmetic and logical instructions with 2 register operands. class ArithLogicI op, string instr_asm, SDNode OpNode, Operand Od, PatLeaf imm_type, RegisterClass RC> : - FI; + FI; class ArithOverflowI op, string instr_asm, SDNode OpNode, Operand Od, PatLeaf imm_type, RegisterClass RC> : - FI; + FI; // Arithmetic Multiply ADD/SUB let rd = 0, shamt = 0, Defs = [HI, LO], Uses = [HI, LO] in @@ -319,16 +331,23 @@ class LogicR_shift_rotate_reg fu // Load Upper Imediate class LoadUpper op, string instr_asm>: - FI { + FI { let rs = 0; } +class FMem op, dag outs, dag ins, string asmstr, list pattern, + InstrItinClass itin>: FFI { + bits<21> addr; + let Inst{25-21} = addr{20-16}; + let Inst{15-0} = addr{15-0}; +} + // Memory Load/Store let canFoldAsLoad = 1 in class LoadM op, string instr_asm, PatFrag OpNode, RegisterClass RC, Operand MemOpnd, bit Pseudo>: - FI { let isPseudo = Pseudo; @@ -336,7 +355,7 @@ class LoadM op, string instr_asm class StoreM op, string instr_asm, PatFrag OpNode, RegisterClass RC, Operand MemOpnd, bit Pseudo>: - FI { let isPseudo = Pseudo; @@ -380,9 +399,9 @@ multiclass StoreM64 op, string i // Conditional Branch class CBranch op, string instr_asm, PatFrag cond_op, RegisterClass RC>: - CBranchBase { + CBranchBase { let isBranch = 1; let isTerminator = 1; let hasDelaySlot = 1; @@ -390,9 +409,9 @@ class CBranch op, string instr_a class CBranchZero op, bits<5> _rt, string instr_asm, PatFrag cond_op, RegisterClass RC>: - CBranchBase { + CBranchBase { let rt = _rt; let isBranch = 1; let isTerminator = 1; @@ -411,9 +430,9 @@ class SetCC_R op, bits<6> func, class SetCC_I op, string instr_asm, PatFrag cond_op, Operand Od, PatLeaf imm_type, RegisterClass RC>: - FI; // Unconditional branch @@ -450,10 +469,8 @@ let isCall=1, hasDelaySlot=1, } class BranchLink: - FI<0x1, (outs), (ins CPURegs:$rs, brtarget:$target, variable_ops), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:42:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630A61065670; Fri, 30 Dec 2011 22:42:22 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 514C28FC0A; Fri, 30 Dec 2011 22:42:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMgMen034354; Fri, 30 Dec 2011 22:42:22 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMgMO5034352; Fri, 30 Dec 2011 22:42:22 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112302242.pBUMgMO5034352@svn.freebsd.org> From: Matthew D Fleming Date: Fri, 30 Dec 2011 22:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229043 - stable/9/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:42:22 -0000 Author: mdf Date: Fri Dec 30 22:42:22 2011 New Revision: 229043 URL: http://svn.freebsd.org/changeset/base/229043 Log: MFC r228442: Do not use the sometimes-reserved word 'bool' for a variable name. Modified: stable/9/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_xpt.c Fri Dec 30 22:40:17 2011 (r229042) +++ stable/9/sys/cam/scsi/scsi_xpt.c Fri Dec 30 22:42:22 2011 (r229043) @@ -1811,14 +1811,14 @@ scsi_find_quirk(struct cam_ed *device) static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS) { - int error, bool; + int error, val; - bool = cam_srch_hi; - error = sysctl_handle_int(oidp, &bool, 0, req); + val = cam_srch_hi; + error = sysctl_handle_int(oidp, &val, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (bool == 0 || bool == 1) { - cam_srch_hi = bool; + if (val == 0 || val == 1) { + cam_srch_hi = val; return (0); } else { return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:50:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD77106564A; Fri, 30 Dec 2011 22:50:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A9E28FC0C; Fri, 30 Dec 2011 22:50:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMoHvb034650; Fri, 30 Dec 2011 22:50:17 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMoH5n034644; Fri, 30 Dec 2011 22:50:17 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201112302250.pBUMoH5n034644@svn.freebsd.org> From: Hiroki Sato Date: Fri, 30 Dec 2011 22:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229044 - in releng/9.0/release/doc: de_DE.ISO8859-1 en_US.ISO8859-1/errata en_US.ISO8859-1/relnotes en_US.ISO8859-1/share/sgml fr_FR.ISO8859-1 ja_JP.eucJP ru_RU.KOI8-R share/examples s... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:50:17 -0000 Author: hrs Date: Fri Dec 30 22:50:16 2011 New Revision: 229044 URL: http://svn.freebsd.org/changeset/base/229044 Log: Clean up release/doc for 9.0R. Content updates will follow in stable/9. Approved by: re (kensmith) Deleted: releng/9.0/release/doc/de_DE.ISO8859-1/ releng/9.0/release/doc/fr_FR.ISO8859-1/ releng/9.0/release/doc/ja_JP.eucJP/ releng/9.0/release/doc/ru_RU.KOI8-R/ releng/9.0/release/doc/zh_CN.GB2312/ Modified: releng/9.0/release/doc/en_US.ISO8859-1/errata/article.sgml releng/9.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml releng/9.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl releng/9.0/release/doc/share/examples/Makefile.relnotesng releng/9.0/release/doc/share/sgml/release.ent Modified: releng/9.0/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- releng/9.0/release/doc/en_US.ISO8859-1/errata/article.sgml Fri Dec 30 22:42:22 2011 (r229043) +++ releng/9.0/release/doc/en_US.ISO8859-1/errata/article.sgml Fri Dec 30 22:50:16 2011 (r229044) @@ -21,15 +21,7 @@
&os; -<![ %release.type.current [ &release.current; -]]> -<![ %release.type.snapshot [ - &release.prev; -]]> -<![ %release.type.release [ - &release.current; -]]> Errata @@ -45,6 +37,12 @@ 2003 2004 2005 + 2006 + 2007 + 2008 + 2009 + 2010 + 2011 The &os; Documentation Project @@ -58,18 +56,11 @@ This document lists errata items for &os; - - - containing significant information discovered after the release or too late in the release cycle to be otherwise included in the - release documentation. + release documentation. The latest version can be found at . This information includes security advisories, as well as news relating to the software or documentation that could affect its operation or usability. An up-to-date version of this document @@ -77,15 +68,7 @@ &os;. This errata document for &os; - - - will be maintained until the release of &os; &release.next;. @@ -94,15 +77,7 @@ This errata document contains late-breaking news about &os; - - - Before installing this version, it is important to consult this document to learn about any post-release discoveries or problems that may already have been found and fixed. @@ -129,51 +104,18 @@ Security Advisories -No advisories. -]]> - -No advisories. -]]> - -No advisories. -]]> - Open Issues -No open issues. -]]> - -No open issues. -]]> - -No open issues. -]]> - Late-Breaking News -No news. -]]> - -No news. -]]> - -No news. -]]> -
Modified: releng/9.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- releng/9.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Dec 30 22:42:22 2011 (r229043) +++ releng/9.0/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Dec 30 22:50:16 2011 (r229044) @@ -1,14 +1,8 @@ %articles.ent; - %release; - - - - - ]>
@@ -31,6 +25,7 @@ 2008 2009 2010 + 2011 The &os; Documentation Project @@ -58,33 +53,8 @@ Introduction This document contains the release notes for &os; - &release.current;. It - describes recently added, changed, or deleted features of &os;. - It also provides some notes on upgrading - from previous versions of &os;. - -The &release.type; distribution to which these release notes - apply represents the latest point along the &release.branch; development - branch since &release.branch; was created. Information regarding pre-built, binary - &release.type; distributions along this branch - can be found at . - -]]> - -The &release.type; distribution to which these release notes - apply represents a point along the &release.branch; development - branch between &release.prev; and the future &release.next;. - Information regarding - pre-built, binary &release.type; distributions along this branch - can be found at . - -]]> - -. This distribution of &os; &release.current; is a &release.type; distribution. It can be found at &os; Handbook. -]]> - All users are encouraged to consult the release errata before installing &os;. The errata document is updated with late-breaking information discovered late in the @@ -105,436 +73,14 @@ information on known bugs, security advisories, and corrections to documentation. An up-to-date copy of the errata for &os; &release.current; can be found on the &os; Web site. - What's New - This section describes - the most user-visible new or changed features in &os; - since &release.prev;. - In general, changes described here are unique to the &release.branch; - branch unless specifically marked as &merged; features. - - - Typical release note items - document recent security advisories issued after - &release.prev;, - new drivers or hardware support, new commands or options, - major bug fixes, or contributed software upgrades. They may also - list changes to major ports/packages or release engineering - practices. Clearly the release notes cannot list every single - change made to &os; between releases; this document focuses - primarily on security advisories, user-visible changes, and major - architectural improvements. - - - Security Advisories - - - - - - - Kernel Changes - - A new &man.cpuset.2; API has been added - for thread to CPU binding and CPU resource grouping and - assignment. The &man.cpuset.1; userland utility has been added - to allow manipulation of processor sets. - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - Kernel support for M:N threading has been removed. While - the KSE (Kernel Scheduled Entities) project was quite successful - in bringing threading to FreeBSD, the M:N approach taken by the - KSE library was never developed to its full potential. - Backwards compatibility for applications using KSE threading - will be provided via &man.libmap.conf.5; for dynamically linked - binaries. The &os; Project greatly appreciates the work of - &a.julian;, &a.deischen;, and &a.davidxu; on KSE support. - - The &os; kernel now exports information about certain kernel - features via the kern.features sysctl tree. - The &man.feature.present.3; library call provides a convenient - interface for user applications to test the presence of - features. - - The &os; kernel now has support for large - memory page mappings (superpages). - - The ULE - scheduler is now the default process scheduler - in GENERIC kernels. - - - Boot Loader Changes - - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. - - - - - Hardware Support - - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.syscons.4; driver now supports Colemak keyboard layout. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. - - - Multimedia Support - - - - - - - Network Interface Support - - The &man.ale.4; driver has been added to provide support - for Atheros AR8121/AR8113/AR8114 Gigabit/Fast Ethernet controllers. - - The &man.em.4; driver has been split into two drivers - with some common parts. The &man.em.4; driver will continue - to support adapters up to the 82575, as well as new - client/desktop adapters. A new &man.igb.4; driver - will support new server adapters. - - The &man.jme.4; driver has been added to provide support - for PCIe network adapters based on JMicron JMC250 Gigabit - Ethernet and JMC260 Fast Ethernet controllers. - - The &man.malo.4; driver has been added to provide - support for Marvell Libertas 88W8335 based PCI network - adapters. - - The firmware for the &man.mxge.4; driver has been - updated from 1.4.25 to 1.4.29. - - The &man.sf.4; driver has been overhauled to improve its - performance and to add support for checksum offloading. It - should also work on all architectures. - - The &man.re.4; driver has been overhauled to fix a - number of issues. This driver now has Wake On LAN (WOL) - support. - - The &man.vr.4; driver has been overhauled to fix a - number of outstanding issues. It also now works on all - architectures. - - The &man.wpi.4; driver has - been updated to include a number of stability fixes. - - - - - - Network Protocols - - The &man.bpf.4; packet filter and capture facility now - supports a zero-copy mode of operation, in which buffers are - loaned from a user process to the kernel. This feature can - be enabled by setting - the net.bpf.zerocopy_enable sysctl - variable to 1. - - ISDN4BSD(I4B), netatm, and all - related subsystems have been removed due to lack of - multi-processor support. - - A bug in TCP options padding, where the wrong padding - bytes were used, has been fixed. - - - - - Disks and Storage - - The &man.aac.4; driver now supports volumes larger than - 2TB in size. - - The &man.ata.4; driver now supports a spindown command for - disks; after a configurable amount of time, if no requests - have been received for a disk, the disk will be spun down - until the next request. The &man.atacontrol.8; utility now - supports a spindown command to configure - this feature. - - The &man.hptrr.4; driver has been updated to version 1.2 - from Highpoint. - - - - - File Systems - - A problem with using &man.mmap.2; on ZFS filesystems has - been fixed. - - A new kernel-mode NFS lock manager has been added, - improving performance and behavior of NFS locking. A new - &man.clear.locks.8; command has been added to clear locks held - on behalf of an NFS client. - - The ZFS file system - has been upgraded to version 14. Additional changes include - support for NFSv4 ACLs, a speedup of zfs send and an improved L2ARC. - New statistics for prefetch and L2ARC have been introduced. - - - - - - Userland Changes - - The &man.adduser.8; utility now supports - a option to set the mode of a new user's - home directory. - - BSD-licensed versions of &man.ar.1; and &man.ranlib.1;, - based on libarchive, have replaced the GNU - Binutils versions of these utilities. - - BSD-licensed versions of &man.bc.1; and &man.dc.1; have - replaced their GNU counterparts. - - &man.chflags.1; now supports a flag for - verbose output and a flag to ignore errors - with the same semantics as (for example) - &man.chmod.1;. - - For compatiblity with other implementations, &man.cp.1; now - supports a flag, which is equivalent to - specifying the flags. - - BSD-licensed version of &man.cpio.1; based on - libarchive, has replaced the GNU cpio. - Note that the GNU cpio is still installed as - gcpio. - - The &man.env.1; program now supports - which will completely unset the given variable - name by removing it from the environment, - instead of just setting it to a null value. - - The &man.fdopendir.3; library function has been added. - - The &man.fetch.3; library now support HTTP 1.1 - If-Modified-Since behavior. The &man.fetch.1; program now - supports - which will only download the specified HTTP URL if the content - is newer than filename. - - &man.find.1; has been enhanced by the addition of a number - of primaries that were present in GNU find but not &os; - &man.find.1;. - - &man.jexec.8; now supports option to specify the - jail where the command will be executed. - - &man.kgdb.1; now supports a new add-kld - command to make it easier to debug crash dumps with kernel - modules. - - The &man.ls.1; program now supports a - option to specify a date format string to be used with the long - format () output. - - &man.nc.1; now supports a switch to - disable the use of TCP options. - - &man.nc.1;'s switch has been deprecated. - It will be removed in a future release. - - The &man.ping6.8; utility now returns 2 - when the packet transmission was successful but no responses - were received (this is the same behavior as &man.ping.8;). - It returned a non-zero value before this change. - - The &man.procstat.1; utility has been added to display - detailed information about processes. - - The &man.realpath.1; utility now supports - a flag to suppress warnings; it now also - accepts multiple paths on its command line. - - The &man.split.1; utility now supports a - flag to split a file into a certain number of chunks. - - The &man.tar.1; utility now supports a - flag to enable &man.compress.1;-style - compression/decompression. - - The &man.tar.1; utility now supports a - flag to ignore user/group names - on create and extract. - - The &man.tar.1; utility now supports an - flag to sparsify files on extraction. - - The &man.tar.1; utility now supports a - flag to substitute filenames based on the specified regular - expression. - - The &man.tcgetsid.3; library function has been added to - return the process group ID for the session leader for the - controlling terminal. It is defined in IEEE Std 1003.1-2001 - (POSIX). - - &man.top.1; now supports a flag to - provide per-CPU usage statistics. - - &man.zdump.8; is now working properly on 64 bit architectures. - - - &man.traceroute.8; now has the ability to print the AS - number for each hop with the new switch; a - new option allows selecting a particular - WHOIS server. - - &man.traceroute6.8; now supports a flag - to send probe packets with no upper-layer protocol, rather than - the usual UDP probe packets. - - - <filename>/etc/rc.d</filename> Scripts - - - - - - - - Contributed Software - - AMD has been updated from 6.0.10 - to 6.1.5. - - awk has been updated from 1 May - 2007 release to the 23 October 2007 release. - - bzip2 has been updated from 1.0.4 - to 1.0.5. - - CVS has been updated from 1.11.17 - to a post-1.11.22 snapshot from 10 March 2008. - - FILE has been updated from 4.23 - to 5.03. - - hostapd has been - updated from 0.5.8 to 0.5.10. - - IPFilter has been updated from - 4.1.23 to 4.1.28. - - less has been updated from - v408 to v429. - - ncurses has been updated from - 5.6-20061217 to 5.6-20080503. - - OpenSSH has been updated - from 4.5p1 to 5.1p1. - - OpenPAM has been updated from the - Figwort release to the Hydrangea release. - - sendmail has been updated from - 8.14.1 to 8.14.5. - - The timezone database has been updated from - the tzdata2008h release to - the tzdata2009m release. - - The stdtime part of libc, &man.zdump.8 and &man.zic.8 - have been updated from the tzcode2004a - release to the tzcode2009h release. - If you have upgraded from source or via the &man.freebsd-update.8, - then please run &man.tzsetup.8 to install a new /etc/localtime. - - - WPA Supplicant has been - updated from 0.5.8 to 0.5.10. - - xz has been updated - from snapshot as of 12 April 2010 to 5.0.0. - - - - - Ports/Packages Collection Infrastructure - - The &man.pkg.create.1; utility now supports - . When this option is specified and a - package tarball exists, it will not be overwritten. This is - useful when multiple packages are saved with several consecutive - runs of &man.pkg.create.1; with the - options. - - The pkg_sign and pkg_check utilities for cryptographically - signing &os; packages have been removed. They were only useful - for packages compressed using &man.gzip.1;; however - &man.bzip2.1; compression has been the norm for some time - now. - - - - - Release Engineering and Integration - - The supported version of - the GNOME desktop environment - (x11/gnome2) has been - updated from 2.20.1 to 2.22. - - - - - Documentation - - - - + The most user-visible new or changed features in &os; since + 8.0-RELEASE can be found at Modified: releng/9.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl ============================================================================== --- releng/9.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl Fri Dec 30 22:42:22 2011 (r229043) +++ releng/9.0/release/doc/en_US.ISO8859-1/share/sgml/release.dsl Fri Dec 30 22:50:16 2011 (r229044) @@ -42,8 +42,8 @@ (literal (entity-text "release.branch")) (literal " should subscribe to the ") (literal "<") - (create-link (list (list "HREF" "mailto:current@FreeBSD.org")) - (literal "current@FreeBSD.org")) + (create-link (list (list "HREF" "mailto:stable@FreeBSD.org")) + (literal "stable@FreeBSD.org")) (literal "> mailing list."))) (make element gi: "p" Modified: releng/9.0/release/doc/share/examples/Makefile.relnotesng ============================================================================== --- releng/9.0/release/doc/share/examples/Makefile.relnotesng Fri Dec 30 22:42:22 2011 (r229043) +++ releng/9.0/release/doc/share/examples/Makefile.relnotesng Fri Dec 30 22:50:16 2011 (r229044) @@ -12,7 +12,7 @@ UNITEXTS= hardware readme relnotes errat IMAGEDIR= .imagedir RHOST= freefall.freebsd.org -RDIR= public_html/relnotes/CURRENT +RDIR= public_html/relnotes/9.0-RELEASE DOCDIR= ./release/doc LANG= en_US.ISO8859-1 Modified: releng/9.0/release/doc/share/sgml/release.ent ============================================================================== --- releng/9.0/release/doc/share/sgml/release.ent Fri Dec 30 22:42:22 2011 (r229043) +++ releng/9.0/release/doc/share/sgml/release.ent Fri Dec 30 22:50:16 2011 (r229044) @@ -6,40 +6,40 @@ - + - + - + - + - + - - + + - + - + From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:54:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ADBF106566C; Fri, 30 Dec 2011 22:54:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1E4DD8FC15; Fri, 30 Dec 2011 22:54:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMsKmk034816; Fri, 30 Dec 2011 22:54:20 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMsK6p034814; Fri, 30 Dec 2011 22:54:20 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302254.pBUMsK6p034814@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229045 - stable/9/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:54:20 -0000 Author: dim Date: Fri Dec 30 22:54:19 2011 New Revision: 229045 URL: http://svn.freebsd.org/changeset/base/229045 Log: MFC r228409: Add more files to cleanup with 'make delete-old' when WITHOUT_CLANG is in effect. Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/tools/ (props changed) Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Dec 30 22:50:16 2011 (r229044) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Dec 30 22:54:19 2011 (r229045) @@ -627,6 +627,8 @@ OLD_FILES+=usr/share/man/man8/zpool.8.gz .if ${MK_CLANG} == no OLD_FILES+=usr/bin/clang OLD_FILES+=usr/bin/clang++ +OLD_FILES+=usr/bin/clang-cpp +OLD_FILES+=usr/bin/clang-tblgen OLD_FILES+=usr/bin/tblgen OLD_FILES+=usr/include/clang/2.8/emmintrin.h OLD_FILES+=usr/include/clang/2.8/mm_malloc.h @@ -634,6 +636,39 @@ OLD_FILES+=usr/include/clang/2.8/mmintri OLD_FILES+=usr/include/clang/2.8/pmmintrin.h OLD_FILES+=usr/include/clang/2.8/tmmintrin.h OLD_FILES+=usr/include/clang/2.8/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.8 +OLD_FILES+=usr/include/clang/2.9/emmintrin.h +OLD_FILES+=usr/include/clang/2.9/mm_malloc.h +OLD_FILES+=usr/include/clang/2.9/mmintrin.h +OLD_FILES+=usr/include/clang/2.9/pmmintrin.h +OLD_FILES+=usr/include/clang/2.9/tmmintrin.h +OLD_FILES+=usr/include/clang/2.9/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.9 +OLD_FILES+=usr/include/clang/3.0/altivec.h +OLD_FILES+=usr/include/clang/3.0/avxintrin.h +OLD_FILES+=usr/include/clang/3.0/emmintrin.h +OLD_FILES+=usr/include/clang/3.0/immintrin.h +OLD_FILES+=usr/include/clang/3.0/mm3dnow.h +OLD_FILES+=usr/include/clang/3.0/mm_malloc.h +OLD_FILES+=usr/include/clang/3.0/mmintrin.h +OLD_FILES+=usr/include/clang/3.0/nmmintrin.h +OLD_FILES+=usr/include/clang/3.0/pmmintrin.h +OLD_FILES+=usr/include/clang/3.0/smmintrin.h +OLD_FILES+=usr/include/clang/3.0/tmmintrin.h +OLD_FILES+=usr/include/clang/3.0/wmmintrin.h +OLD_FILES+=usr/include/clang/3.0/x86intrin.h +OLD_FILES+=usr/include/clang/3.0/xmmintrin.h +OLD_DIRS+=usr/include/clang/3.0 +OLD_DIRS+=usr/include/clang +OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT +OLD_DIRS+=usr/share/doc/llvm/clang +OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex +OLD_FILES+=usr/share/doc/llvm/LICENSE.TXT +OLD_DIRS+=usr/share/doc/llvm +OLD_FILES+=usr/share/man/man1/clang.1.gz +OLD_FILES+=usr/share/man/man1/clang++.1.gz +OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz +OLD_FILES+=usr/share/man/man1/tblgen.1.gz .endif .if ${MK_CPP} == no From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 22:59:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3ED4106564A; Fri, 30 Dec 2011 22:59:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9800D8FC16; Fri, 30 Dec 2011 22:59:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUMx0sw034999; Fri, 30 Dec 2011 22:59:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUMx01Q034996; Fri, 30 Dec 2011 22:59:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302259.pBUMx01Q034996@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 22:59:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229046 - stable/9/contrib/libstdc++/include/debug X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 22:59:00 -0000 Author: dim Date: Fri Dec 30 22:59:00 2011 New Revision: 229046 URL: http://svn.freebsd.org/changeset/base/229046 Log: MFC r228328: Make it possible to use the debug versions of std::map and std::multimap with clang, by removing two unneeded using declarations. Otherwise, you would get errors similar to: /usr/include/c++/4.2/debug/map.h:77:20: error: dependent using declaration resolved to type without 'typename' using _Base::value_compare; ^ N.B.: Take care when you actually use the debug versions of any libstdc++ header. They are more likely to contain problems, because they are exercised far less often, and since the standard library complexity guarantees don't always apply anymore, compile times can drastically increase. Modified: stable/9/contrib/libstdc++/include/debug/map.h stable/9/contrib/libstdc++/include/debug/multimap.h Directory Properties: stable/9/contrib/libstdc++/ (props changed) Modified: stable/9/contrib/libstdc++/include/debug/map.h ============================================================================== --- stable/9/contrib/libstdc++/include/debug/map.h Fri Dec 30 22:54:19 2011 (r229045) +++ stable/9/contrib/libstdc++/include/debug/map.h Fri Dec 30 22:59:00 2011 (r229046) @@ -74,8 +74,6 @@ namespace __debug typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; - using _Base::value_compare; - // 23.3.1.1 construct/copy/destroy: explicit map(const _Compare& __comp = _Compare(), const _Allocator& __a = _Allocator()) Modified: stable/9/contrib/libstdc++/include/debug/multimap.h ============================================================================== --- stable/9/contrib/libstdc++/include/debug/multimap.h Fri Dec 30 22:54:19 2011 (r229045) +++ stable/9/contrib/libstdc++/include/debug/multimap.h Fri Dec 30 22:59:00 2011 (r229046) @@ -74,8 +74,6 @@ namespace __debug typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; - using _Base::value_compare; - // 23.3.1.1 construct/copy/destroy: explicit multimap(const _Compare& __comp = _Compare(), const _Allocator& __a = _Allocator()) From owner-svn-src-all@FreeBSD.ORG Fri Dec 30 23:41:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5C48106566B; Fri, 30 Dec 2011 23:41:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88BEF8FC0C; Fri, 30 Dec 2011 23:41:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBUNfOG8036441; Fri, 30 Dec 2011 23:41:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBUNfOVK036438; Fri, 30 Dec 2011 23:41:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112302341.pBUNfOVK036438@svn.freebsd.org> From: Dimitry Andric Date: Fri, 30 Dec 2011 23:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229047 - in stable/9/lib/libthr/arch: amd64/include i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 30 Dec 2011 23:41:24 -0000 Author: dim Date: Fri Dec 30 23:41:24 2011 New Revision: 229047 URL: http://svn.freebsd.org/changeset/base/229047 Log: MFC r228536: The TCB_GET32() and TCB_GET64() macros in the i386 and amd64-specific versions of pthread_md.h have a special case of dereferencing a null pointer. Clang warns about this with: In file included from lib/libthr/arch/i386/i386/pthread_md.c:36: lib/libthr/arch/i386/include/pthread_md.h:96:10: error: indirection of non-volatile null pointer will be deleted, not trap [-Werror,-Wnull-dereference] return (TCB_GET32(tcb_self)); ^~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:73:13: note: expanded from: : "m" (*(u_int *)(__tcb_offset(name)))); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ lib/libthr/arch/i386/include/pthread_md.h:96:10: note: consider using __builtin_trap() or qualifying pointer with 'volatile' Since this indirection is done relative to the fs or gs segment, to retrieve thread-specific data, it is an exception to the rule. Therefore, add a volatile qualifier to tell the compiler we really want to dereference a zero address. Modified: stable/9/lib/libthr/arch/amd64/include/pthread_md.h stable/9/lib/libthr/arch/i386/include/pthread_md.h Directory Properties: stable/9/lib/libthr/ (props changed) Modified: stable/9/lib/libthr/arch/amd64/include/pthread_md.h ============================================================================== --- stable/9/lib/libthr/arch/amd64/include/pthread_md.h Fri Dec 30 22:59:00 2011 (r229046) +++ stable/9/lib/libthr/arch/amd64/include/pthread_md.h Fri Dec 30 23:41:24 2011 (r229047) @@ -71,7 +71,7 @@ struct tcb { u_long __i; \ __asm __volatile("movq %%fs:%1, %0" \ : "=r" (__i) \ - : "m" (*(u_long *)(__tcb_offset(name)))); \ + : "m" (*(volatile u_long *)(__tcb_offset(name)))); \ __result = (__tcb_type(name))__i; \ \ __result; \ Modified: stable/9/lib/libthr/arch/i386/include/pthread_md.h ============================================================================== --- stable/9/lib/libthr/arch/i386/include/pthread_md.h Fri Dec 30 22:59:00 2011 (r229046) +++ stable/9/lib/libthr/arch/i386/include/pthread_md.h Fri Dec 30 23:41:24 2011 (r229047) @@ -70,7 +70,7 @@ struct tcb { u_int __i; \ __asm __volatile("movl %%gs:%1, %0" \ : "=r" (__i) \ - : "m" (*(u_int *)(__tcb_offset(name)))); \ + : "m" (*(volatile u_int *)(__tcb_offset(name)))); \ __result = (__tcb_type(name))__i; \ \ __result; \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 00:09:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98A3A10656D1; Sat, 31 Dec 2011 00:09:33 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CCCB8FC13; Sat, 31 Dec 2011 00:09:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV09Xfp037345; Sat, 31 Dec 2011 00:09:33 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV09Xxs037343; Sat, 31 Dec 2011 00:09:33 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <201112310009.pBV09Xxs037343@svn.freebsd.org> From: Maxim Sobolev Date: Sat, 31 Dec 2011 00:09:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229049 - head/sbin/bsdlabel X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 00:09:33 -0000 Author: sobomax Date: Sat Dec 31 00:09:33 2011 New Revision: 229049 URL: http://svn.freebsd.org/changeset/base/229049 Log: Use in-label sectorsize to determine position of the label when writing label into a file image. The most common use - putting disklabel into ISO file. Before this change the label would always go to the offset 512, while geom_part code expects it to be in the 1st sector (i.e. 2048 incase of ISO). BSD disklabels provide good and lightweight way to logically split livecds. It is non-intrusive as far as ISO9660 goes (both boot-wise and metadata-wise) and completely transparent to anything but BSD, so you can have BSD-specific area appended after regular ISO. And with a little bit of GEOM trickery you can do even more interesting stuff with it. For example we make "hybrid" bootable CDs using this method. We create bootable ISO with kernel and such and append UFS image compressed with UZIP and it works like a charm. We put label based on the offsef of the BSD part into the ISO. The kernel boots off normal ISO9660 part, tastes label attaches it, tastes UZIP, attaches it and finally mounts UFS using GEOM_LABEL. This provides much better way of eliminating waste than doing "crunched" build. MFC after: 1 month Modified: head/sbin/bsdlabel/bsdlabel.c Modified: head/sbin/bsdlabel/bsdlabel.c ============================================================================== --- head/sbin/bsdlabel/bsdlabel.c Sat Dec 31 00:03:13 2011 (r229048) +++ head/sbin/bsdlabel/bsdlabel.c Sat Dec 31 00:09:33 2011 (r229049) @@ -400,7 +400,7 @@ writelabel(void) for (i = 0; i < lab.d_npartitions; i++) if (lab.d_partitions[i].p_size) lab.d_partitions[i].p_offset += lba_offset; - bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * secsize, + bsd_disklabel_le_enc(bootarea + labeloffset + labelsoffset * lab.d_secsize, lp); fd = open(specname, O_RDWR); @@ -434,7 +434,7 @@ writelabel(void) gctl_ro_param(grq, "class", -1, "BSD"); gctl_ro_param(grq, "geom", -1, pname); gctl_ro_param(grq, "label", 148+16*8, - bootarea + labeloffset + labelsoffset * secsize); + bootarea + labeloffset + labelsoffset * lab.d_secsize); errstr = gctl_issue(grq); if (errstr != NULL) { warnx("%s", errstr); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 00:13:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04E8A1065676; Sat, 31 Dec 2011 00:13:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 641358FC0A; Sat, 31 Dec 2011 00:13:07 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so19594644vcb.13 for ; Fri, 30 Dec 2011 16:13:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=GsEvD/CXIlNceDIttltV45sk6Uk53aUoRCxcv+/9GQ4=; b=EU6K7JN3W0Vgb4Vjgyj37vu3/pgmFvrv1bBUnPakKxoNXVTN2rMtyJdF07g7nFDW+Y FUUSdbriPqsfBc9TkhuTlN4BLEogHfTkSGr92FNWZPqzfU6SZgR7RbxXdWHfJt8NbHZm 3xqCE66yukhiI3OscpHPSVrJ+m4b1xToJbVG0= MIME-Version: 1.0 Received: by 10.220.153.134 with SMTP id k6mr23784157vcw.23.1325290384859; Fri, 30 Dec 2011 16:13:04 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Fri, 30 Dec 2011 16:13:04 -0800 (PST) In-Reply-To: <201112300857.pBU8vxfP004914@svn.freebsd.org> References: <201112300857.pBU8vxfP004914@svn.freebsd.org> Date: Fri, 30 Dec 2011 16:13:04 -0800 X-Google-Sender-Auth: dmZzR23zKHrzwBrE2wPP5PP89I4 Message-ID: From: Adrian Chadd To: Lawrence Stewart Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228986 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 00:13:08 -0000 This just broke wlan. Please consider fixing this patch :) Adrian *** Interface: wlan0: start can't re-use a leaf (wlan0)! panic: bpfattach tscfgoid KDB: enter: panic [ thread pid 166 tid 100048 ]Stopped at kdb_enter+0x4c: lui at,0x8= 048 db> db> bt Tracing pid 166 tid 100048 td 0x80c37900 db_trace_thread+30 (?,?,?,?) ra 80074cc0 sp c40075f0 sz 24 80074bac+114 (0,?,ffffffff,?) ra 8007427c sp c4007608 sz 32 80073ef4+388 (?,?,?,?) ra 80074400 sp c4007628 sz 168 db_command_loop+70 (?,?,?,?) ra 80076ac4 sp c40076d0 sz 24 800769d0+f4 (?,?,?,?) ra 801b7560 sp c40076e8 sz 424 kdb_trap+110 (?,?,?,?) ra 8035c7ec sp c4007890 sz 48 trap+bf4 (?,?,?,?) ra 80354560 sp c40078c0 sz 184 MipsKernGenException+134 (0,4,803c089c,113) ra 801b72d8 sp c4007978 sz 200 kdb_enter+4c (?,?,?,?) ra 8017f88c sp c4007a40 sz 24 panic+11c (?,0,80706500,0) ra 802304b8 sp c4007a58 sz 40 bpfattach2+cc (?,?,?,?) ra 802305e0 sp c4007a80 sz 64 bpfattach+10 (?,?,?,?) ra 802448ec sp c4007ac0 sz 24 ether_ifattach+d0 (?,?,?,?) ra 8025f0ac sp c4007ad8 sz 32 ieee80211_vap_attach+104 (?,?,?,?) ra 8007ffe8 sp c4007af8 sz 96 8007f960+688 (?,?,0,?) ra 8026a39c sp c4007b58 sz 88 8026a22c+170 (?,?,?,?) ra 802430dc sp c4007bb0 sz 88 ifc_simple_create+80 (?,?,?,?) ra 80242b04 sp c4007c08 sz 64 80242ab0+54 (?,?,?,?) ra 80242d78 sp c4007c48 sz 40 if_clone_create+a8 (?,?,?,?) ra 8023bdd4 sp c4007c70 sz 40 ifioctl+3a4 (?,?,80c7f460,80c37900) ra 801d8070 sp c4007c98 sz 144 soo_ioctl+3b0 (?,?,?,?) ra 801d2804 sp c4007d28 sz 40 kern_ioctl+248 (?,?,?,?) ra 801d29ac sp c4007d50 sz 64 sys_ioctl+130 (?,?,?,?) ra 8035c3ec sp c4007d90 sz 56 trap+7f4 (?,?,?,?) ra 8035475c sp c4007dc8 sz 184 MipsUserGenException+10c (?,?,?,4061d590) ra 0 sp c4007e80 sz 0 pid 166 db> reset On 30 December 2011 00:57, Lawrence Stewart wrote: > Author: lstewart > Date: Fri Dec 30 08:57:58 2011 > New Revision: 228986 > URL: http://svn.freebsd.org/changeset/base/228986 > > Log: > =A0- Introduce the net.bpf.tscfg sysctl tree and associated code so as to= make one > =A0 =A0aspect of time stamp configuration per interface rather than per B= PF > =A0 =A0descriptor. Prior to this, the order in which BPF devices were ope= ned and the > =A0 =A0per descriptor time stamp configuration settings could cause non-d= eterministic > =A0 =A0and unintended behaviour with respect to time stamping. With the n= ew scheme, a > =A0 =A0BPF attached interface's tscfg sysctl entry can be set to "default= ", "none", > =A0 =A0"fast", "normal" or "external". Setting "default" means use the sy= stem default > =A0 =A0option (set with the net.bpf.tscfg.default sysctl), "none" means d= o not > =A0 =A0generate time stamps for tapped packets, "fast" means generate tim= e stamps for > =A0 =A0tapped packets using a hz granularity system clock read, "normal" = means > =A0 =A0generate time stamps for tapped packets using a full timecounter g= ranularity > =A0 =A0system clock read and "external" (currently unimplemented) means u= se the time > =A0 =A0stamp provided with the packet from an underlying source. > > =A0- Utilise the recently introduced sysclock_getsnapshot() and > =A0 =A0sysclock_snap2bintime() KPIs to ensure the system clock is only re= ad once per > =A0 =A0packet, regardless of the number of BPF descriptors and time stamp= formats > =A0 =A0requested. Use the per BPF attached interface time stamp configura= tion to > =A0 =A0control if sysclock_getsnapshot() is called and whether the system= clock read > =A0 =A0is fast or normal. The per BPF descriptor time stamp configuration= is then > =A0 =A0used to control how the system clock snapshot is converted to a bi= ntime by > =A0 =A0sysclock_snap2bintime(). > > =A0- Remove all FAST related BPF descriptor flag variants. Performing a "= fast" > =A0 =A0read of the system clock is now controlled per BPF attached interf= ace using > =A0 =A0the net.bpf.tscfg sysctl tree. > > =A0- Update the bpf.4 man page. > > =A0Committed on behalf of Julien Ridoux and Darryl Veitch from the Univer= sity of > =A0Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-F= orward > =A0Clock Synchronization Algorithms" project. > > =A0For more information, see http://www.synclab.org/radclock/ > > =A0In collaboration with: =A0 =A0 =A0 =A0Julien Ridoux (jridoux at unimel= b edu au) > > Modified: > =A0head/share/man/man4/bpf.4 > =A0head/sys/net/bpf.c > =A0head/sys/net/bpf.h > > Modified: head/share/man/man4/bpf.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 > --- head/share/man/man4/bpf.4 =A0 Fri Dec 30 06:24:59 2011 =A0 =A0 =A0 = =A0(r228985) > +++ head/share/man/man4/bpf.4 =A0 Fri Dec 30 08:57:58 2011 =A0 =A0 =A0 = =A0(r228986) > @@ -49,7 +49,7 @@ > =A0.\" > =A0.\" $FreeBSD$ > =A0.\" > -.Dd June 15, 2010 > +.Dd December 30, 2011 > =A0.Dt BPF 4 > =A0.Os > =A0.Sh NAME > @@ -516,61 +516,48 @@ by default. > =A0.It Dv BIOCSTSTAMP > =A0.It Dv BIOCGTSTAMP > =A0.Pq Li u_int > -Set or get format and resolution of the time stamps returned by BPF. > +Set or get the format and resolution of time stamps returned by BPF. > +The per-BPF descriptor configuration provided by the > +.Dv BIOCSTSTAMP > +IOCTL complements the per-interface time stamp configuration detailed in= the > +.Sx CONFIGURATION > +section. > +.Pp > =A0Set to > -.Dv BPF_T_MICROTIME , > -.Dv BPF_T_MICROTIME_FAST , > -.Dv BPF_T_MICROTIME_MONOTONIC , > +.Dv BPF_T_MICROTIME > =A0or > -.Dv BPF_T_MICROTIME_MONOTONIC_FAST > +.Dv BPF_T_MICROTIME_MONOTONIC > =A0to get time stamps in 64-bit > =A0.Vt struct timeval > =A0format. > =A0Set to > -.Dv BPF_T_NANOTIME , > -.Dv BPF_T_NANOTIME_FAST , > -.Dv BPF_T_NANOTIME_MONOTONIC , > +.Dv BPF_T_NANOTIME > =A0or > -.Dv BPF_T_NANOTIME_MONOTONIC_FAST > +.Dv BPF_T_NANOTIME_MONOTONIC > =A0to get time stamps in 64-bit > =A0.Vt struct timespec > =A0format. > =A0Set to > -.Dv BPF_T_BINTIME , > -.Dv BPF_T_BINTIME_FAST , > -.Dv BPF_T_NANOTIME_MONOTONIC , > +.Dv BPF_T_BINTIME > =A0or > -.Dv BPF_T_BINTIME_MONOTONIC_FAST > +.Dv BPF_T_BINTIME_MONOTONIC > =A0to get time stamps in 64-bit > =A0.Vt struct bintime > =A0format. > =A0Set to > =A0.Dv BPF_T_NONE > -to ignore time stamp. > +to not set a time stamp. > +By default, time stamps are initilized to > +.Dv BPF_T_MICROTIME . > +.Pp > =A0All 64-bit time stamp formats are wrapped in > =A0.Vt struct bpf_ts . > =A0The > -.Dv BPF_T_MICROTIME_FAST , > -.Dv BPF_T_NANOTIME_FAST , > -.Dv BPF_T_BINTIME_FAST , > -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , > -.Dv BPF_T_NANOTIME_MONOTONIC_FAST , > -and > -.Dv BPF_T_BINTIME_MONOTONIC_FAST > -are analogs of corresponding formats without _FAST suffix but do not per= form > -a full time counter query, so their accuracy is one timer tick. > -The > =A0.Dv BPF_T_MICROTIME_MONOTONIC , > =A0.Dv BPF_T_NANOTIME_MONOTONIC , > -.Dv BPF_T_BINTIME_MONOTONIC , > -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , > -.Dv BPF_T_NANOTIME_MONOTONIC_FAST , > =A0and > -.Dv BPF_T_BINTIME_MONOTONIC_FAST > +.Dv BPF_T_BINTIME_MONOTONIC > =A0store the time elapsed since kernel boot. > -This setting is initialized to > -.Dv BPF_T_MICROTIME > -by default. > =A0.It Dv BIOCFEEDBACK > =A0.Pq Li u_int > =A0Set packet feedback mode. > @@ -692,14 +679,14 @@ Currently, > =A0.Vt bpf_hdr > =A0is used when the time stamp is set to > =A0.Dv BPF_T_MICROTIME , > -.Dv BPF_T_MICROTIME_FAST , > =A0.Dv BPF_T_MICROTIME_MONOTONIC , > -.Dv BPF_T_MICROTIME_MONOTONIC_FAST , > =A0or > =A0.Dv BPF_T_NONE > -for backward compatibility reasons. =A0Otherwise, > +for backward compatibility reasons. > +Otherwise, > =A0.Vt bpf_xhdr > -is used. =A0However, > +is used. > +However, > =A0.Vt bpf_hdr > =A0may be deprecated in the near future. > =A0Suitable precautions > @@ -952,6 +939,48 @@ array initializers: > =A0.Fn BPF_STMT opcode operand > =A0and > =A0.Fn BPF_JUMP opcode operand true_offset false_offset . > +.Sh CONFIGURATION > +Per-interface BPF time stamp configuration is possible via the > +.Va net.bpf.tscfg > +.Xr sysctl 8 > +tree which provides the following variables: > +.Bl -tag -width " =A0 =A0" -offset indent > +.It Va net.bpf.tscfg.default > +The default time stamp configuration setting used by all BPF attached in= terfaces > +which have not been explicitly changed. > +Valid values are "none", "fast", "normal" and "external". > +The default is "normal". > +.It Va net.bpf.tscfg. > +The time stamp configuration setting used by a specific BPF attached int= erface. > +There will be a separate entry in the > +.Va net.bpf.tscfg > +sysctl tree for each BPF attached interface. > +Valid values are "default", "none", "fast", "normal" and "external". > +The default is "default", which means the system wide default setting sp= ecified > +by the > +.Va net.bpf.tscfg.default > +sysctl is used. > +.El > +.Pp > +The meaning of each per-interface time stamp configuration option is as = follows: > +.Bl -tag -width " =A0 =A0" -offset indent > +.It none > +Do not generate a time stamp for all packets tapped from this interface. > +.It fast > +Generate a time stamp for all packets tapped from this interface by doin= g a fast > +read of the system clock. > +Fast reads have a granularity equivalent to the underlying kernel tick r= ate. > +.It normal > +Generate a time stamp for all packets tapped from this interface by doin= g a full > +read of the system clock. > +Full reads are slower than fast reads, but provide full hardware time co= unter > +granularity for the time stamp. > +.It external > +Something external to BPF is capable of generating time stamps for all p= ackets > +tapped from this interface and BPF should use these external time stamps= . > +Currently unimplemented, but will become useful when drivers for NICs wh= ich > +support hardware packet time stamping add support for this feature. > +.El > =A0.Sh FILES > =A0.Bl -tag -compact -width /dev/bpf > =A0.It Pa /dev/bpf > > Modified: head/sys/net/bpf.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/bpf.c =A0Fri Dec 30 06:24:59 2011 =A0 =A0 =A0 =A0(r22898= 5) > +++ head/sys/net/bpf.c =A0Fri Dec 30 08:57:58 2011 =A0 =A0 =A0 =A0(r22898= 6) > @@ -1,12 +1,17 @@ > =A0/*- > =A0* Copyright (c) 1990, 1991, 1993 > - * =A0 =A0 The Regents of the University of California. =A0All rights re= served. > + * =A0 =A0 The Regents of the University of California. > + * Copyright (c) 2011 The University of Melbourne. > + * All rights reserved. > =A0* > =A0* This code is derived from the Stanford/CMU enet packet filter, > =A0* (net/enet.c) distributed as part of 4.3BSD, and code contributed > =A0* to Berkeley by Steven McCanne and Van Jacobson both of Lawrence > =A0* Berkeley Laboratory. > =A0* > + * Portions of this software were developed by Julien Ridoux at the Univ= ersity > + * of Melbourne under sponsorship from the FreeBSD Foundation. > + * > =A0* Redistribution and use in source and binary forms, with or without > =A0* modification, are permitted provided that the following conditions > =A0* are met: > @@ -55,6 +60,7 @@ __FBSDID("$FreeBSD$"); > =A0#include > =A0#include > =A0#include > +#include > =A0#include > =A0#include > > @@ -112,7 +118,7 @@ struct bpf_hdr32 { > =A0 =A0 =A0 =A0uint16_t =A0 =A0 =A0 =A0bh_hdrlen; =A0 =A0 =A0/* length of= bpf header (this struct > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 plus alignment padding) */ > =A0}; > -#endif > +#endif /* !BURN_BRIDGES */ > > =A0struct bpf_program32 { > =A0 =A0 =A0 =A0u_int bf_len; > @@ -130,7 +136,28 @@ struct bpf_dltlist32 { > =A0#define =A0 =A0 =A0 =A0BIOCGDLTLIST32 =A0_IOWR('B', 121, struct bpf_dl= tlist32) > =A0#define =A0 =A0 =A0 =A0BIOCSETWF32 =A0 =A0 _IOW('B', 123, struct bpf_p= rogram32) > =A0#define =A0 =A0 =A0 =A0BIOCSETFNR32 =A0 =A0_IOW('B', 130, struct bpf_p= rogram32) > -#endif > +#endif /* COMPAT_FREEBSD32 */ > + > +static const char *bpfiftstypes[] =3D { > + =A0 =A0 =A0 "default", > +#define =A0 =A0 =A0 =A0BPF_TSTAMP_DEFAULT =A0 =A0 =A00 > + =A0 =A0 =A0 "none", > +#define =A0 =A0 =A0 =A0BPF_TSTAMP_NONE =A0 =A0 =A0 =A0 1 > + =A0 =A0 =A0 "fast", > +#define =A0 =A0 =A0 =A0BPF_TSTAMP_FAST =A0 =A0 =A0 =A0 2 > + =A0 =A0 =A0 "normal", > +#define =A0 =A0 =A0 =A0BPF_TSTAMP_NORMAL =A0 =A0 =A0 3 > + =A0 =A0 =A0 "external" > +#define =A0 =A0 =A0 =A0BPF_TSTAMP_EXTERNAL =A0 =A0 4 > +}; > +#define =A0 =A0 =A0 =A0NUM_BPFIFTSTYPES =A0 =A0 =A0 =A0(sizeof(bpfiftsty= pes) / sizeof(*bpfiftstypes)) > + > +#define =A0 =A0 =A0 =A0SET_CLOCKCFG_FLAGS(tstype, active, clock, flags) = do { =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 (flags) =3D 0; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > + =A0 =A0 =A0 (clock) =3D SYSCLOCK_FBCK; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > + =A0 =A0 =A0 if ((tstype) & BPF_T_MONOTONIC) =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 (flags) |=3D FBCLOCK_UPTIME; =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > +} while (0) > > =A0/* > =A0* bpf_iflist is a list of BPF interface structures, each corresponding= to a > @@ -162,6 +189,7 @@ static void filt_bpfdetach(struct knote > =A0static int =A0 =A0 filt_bpfread(struct knote *, long); > =A0static void =A0 =A0bpf_drvinit(void *); > =A0static int =A0 =A0 bpf_stats_sysctl(SYSCTL_HANDLER_ARGS); > +static int =A0 =A0 bpf_tscfg_sysctl_handler(SYSCTL_HANDLER_ARGS); > > =A0SYSCTL_NODE(_net, OID_AUTO, bpf, CTLFLAG_RW, 0, "bpf sysctl"); > =A0int bpf_maxinsns =3D BPF_MAXINSNS; > @@ -172,6 +200,12 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_ > =A0 =A0 &bpf_zerocopy_enable, 0, "Enable new zero-copy BPF buffer session= s"); > =A0static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG= _RW, > =A0 =A0 bpf_stats_sysctl, "bpf statistics portal"); > +static SYSCTL_NODE(_net_bpf, OID_AUTO, tscfg, CTLFLAG_RW, NULL, > + =A0 =A0"Per-interface timestamp configuration"); > +static int bpf_default_tstype =3D BPF_TSTAMP_NORMAL; > +SYSCTL_PROC(_net_bpf_tscfg, OID_AUTO, default, > + =A0 =A0CTLTYPE_STRING | CTLFLAG_RW, NULL, 0, bpf_tscfg_sysctl_handler, = "A", > + =A0 =A0"Per-interface system wide default timestamp configuration"); > > =A0static d_open_t =A0 =A0 =A0 =A0bpfopen; > =A0static d_read_t =A0 =A0 =A0 =A0bpfread; > @@ -1759,48 +1793,6 @@ filt_bpfread(struct knote *kn, long hint > =A0 =A0 =A0 =A0return (ready); > =A0} > > -#define =A0 =A0 =A0 =A0BPF_TSTAMP_NONE =A0 =A0 =A0 =A0 0 > -#define =A0 =A0 =A0 =A0BPF_TSTAMP_FAST =A0 =A0 =A0 =A0 1 > -#define =A0 =A0 =A0 =A0BPF_TSTAMP_NORMAL =A0 =A0 =A0 2 > -#define =A0 =A0 =A0 =A0BPF_TSTAMP_EXTERN =A0 =A0 =A0 3 > - > -static int > -bpf_ts_quality(int tstype) > -{ > - > - =A0 =A0 =A0 if (tstype =3D=3D BPF_T_NONE) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (BPF_TSTAMP_NONE); > - =A0 =A0 =A0 if ((tstype & BPF_T_FAST) !=3D 0) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (BPF_TSTAMP_FAST); > - > - =A0 =A0 =A0 return (BPF_TSTAMP_NORMAL); > -} > - > -static int > -bpf_gettime(struct bintime *bt, int tstype, struct mbuf *m) > -{ > - =A0 =A0 =A0 struct m_tag *tag; > - =A0 =A0 =A0 int quality; > - > - =A0 =A0 =A0 quality =3D bpf_ts_quality(tstype); > - =A0 =A0 =A0 if (quality =3D=3D BPF_TSTAMP_NONE) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (quality); > - > - =A0 =A0 =A0 if (m !=3D NULL) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 tag =3D m_tag_locate(m, MTAG_BPF, MTAG_BPF_= TIMESTAMP, NULL); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (tag !=3D NULL) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 *bt =3D *(struct bintime *)= (tag + 1); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return (BPF_TSTAMP_EXTERN); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > - =A0 =A0 =A0 } > - =A0 =A0 =A0 if (quality =3D=3D BPF_TSTAMP_NORMAL) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 binuptime(bt); > - =A0 =A0 =A0 else > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 getbinuptime(bt); > - > - =A0 =A0 =A0 return (quality); > -} > - > =A0/* > =A0* Incoming linkage from device drivers. =A0Process the packet pkt, of = length > =A0* pktlen, which is stored in a contiguous buffer. =A0The packet is par= sed > @@ -1811,14 +1803,23 @@ void > =A0bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) > =A0{ > =A0 =A0 =A0 =A0struct bintime bt; > + =A0 =A0 =A0 struct sysclock_snap cs; > =A0 =A0 =A0 =A0struct bpf_d *d; > + =A0 =A0 =A0 int tstype, whichclock; > + =A0 =A0 =A0 u_int clockflags, slen; > =A0#ifdef BPF_JITTER > =A0 =A0 =A0 =A0bpf_jit_filter *bf; > =A0#endif > - =A0 =A0 =A0 u_int slen; > - =A0 =A0 =A0 int gottime; > > - =A0 =A0 =A0 gottime =3D BPF_TSTAMP_NONE; > + =A0 =A0 =A0 tstype =3D bp->tstype; > + =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAMP_DEFAULT) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 tstype =3D bpf_default_tstype; > + > + =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAMP_NORMAL || tstype =3D=3D BPF_TS= TAMP_FAST) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 sysclock_getsnapshot(&cs, tstype =3D=3D BPF= _TSTAMP_FAST ? 1 : 0); > + =A0 =A0 =A0 else > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 bzero(&bt, sizeof(bt)); > + > =A0 =A0 =A0 =A0BPFIF_LOCK(bp); > =A0 =A0 =A0 =A0LIST_FOREACH(d, &bp->bif_dlist, bd_next) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BPFD_LOCK(d); > @@ -1838,8 +1839,16 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0slen =3D bpf_filter(d->bd_rfilter, pkt, pk= tlen, pktlen); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (slen !=3D 0) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0d->bd_fcount++; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (gottime < bpf_ts_qualit= y(d->bd_tstamp)) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gottime =3D= bpf_gettime(&bt, d->bd_tstamp, NULL); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAM= P_NORMAL || > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 tstype =3D=3D BPF_T= STAMP_FAST) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 whichclock = =3D -1; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SET_CLOCKCF= G_FLAGS(d->bd_tstamp, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cs.= sysclock_active, whichclock, clockflags); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 KASSERT(whi= chclock >=3D 0, ("Bogus BPF tstamp " > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "co= nfiguration: 0x%04x", d->bd_tstamp)); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sysclock_sn= ap2bintime(&cs, &bt, whichclock, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 clo= ckflags); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0#ifdef MAC > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (mac_bpfdesc_check_rece= ive(d, bp->bif_ifp) =3D=3D 0) > =A0#endif > @@ -1862,12 +1871,13 @@ void > =A0bpf_mtap(struct bpf_if *bp, struct mbuf *m) > =A0{ > =A0 =A0 =A0 =A0struct bintime bt; > + =A0 =A0 =A0 struct sysclock_snap cs; > =A0 =A0 =A0 =A0struct bpf_d *d; > + =A0 =A0 =A0 u_int clockflags, pktlen, slen; > + =A0 =A0 =A0 int tstype, whichclock; > =A0#ifdef BPF_JITTER > =A0 =A0 =A0 =A0bpf_jit_filter *bf; > =A0#endif > - =A0 =A0 =A0 u_int pktlen, slen; > - =A0 =A0 =A0 int gottime; > > =A0 =A0 =A0 =A0/* Skip outgoing duplicate packets. */ > =A0 =A0 =A0 =A0if ((m->m_flags & M_PROMISC) !=3D 0 && m->m_pkthdr.rcvif = =3D=3D NULL) { > @@ -1875,9 +1885,22 @@ bpf_mtap(struct bpf_if *bp, struct mbuf > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return; > =A0 =A0 =A0 =A0} > > + =A0 =A0 =A0 tstype =3D bp->tstype; > + =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAMP_DEFAULT) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 tstype =3D bpf_default_tstype; > + > + =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAMP_NORMAL || tstype =3D=3D BPF_TS= TAMP_FAST) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 sysclock_getsnapshot(&cs, tstype =3D=3D BPF= _TSTAMP_FAST ? > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 : 0); > +#ifdef notyet > + =A0 =A0 =A0 else if (tstype =3D=3D BPF_TSTAMP_EXTERNAL) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* XXX: Convert external tstamp to bintime.= */ > +#endif > + =A0 =A0 =A0 else > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 bzero(&bt, sizeof(bt)); > + > =A0 =A0 =A0 =A0pktlen =3D m_length(m, NULL); > > - =A0 =A0 =A0 gottime =3D BPF_TSTAMP_NONE; > =A0 =A0 =A0 =A0BPFIF_LOCK(bp); > =A0 =A0 =A0 =A0LIST_FOREACH(d, &bp->bif_dlist, bd_next) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcv= if, bp->bif_ifp)) > @@ -1894,8 +1917,16 @@ bpf_mtap(struct bpf_if *bp, struct mbuf > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0slen =3D bpf_filter(d->bd_rfilter, (u_char= *)m, pktlen, 0); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (slen !=3D 0) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0d->bd_fcount++; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (gottime < bpf_ts_qualit= y(d->bd_tstamp)) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gottime =3D= bpf_gettime(&bt, d->bd_tstamp, m); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAM= P_NORMAL || > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 tstype =3D=3D BPF_T= STAMP_FAST) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 whichclock = =3D -1; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SET_CLOCKCF= G_FLAGS(d->bd_tstamp, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cs.= sysclock_active, whichclock, clockflags); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 KASSERT(whi= chclock >=3D 0, ("Bogus BPF tstamp " > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "co= nfiguration: 0x%04x", d->bd_tstamp)); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sysclock_sn= ap2bintime(&cs, &bt, whichclock, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 clo= ckflags); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0#ifdef MAC > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (mac_bpfdesc_check_rece= ive(d, bp->bif_ifp) =3D=3D 0) > =A0#endif > @@ -1915,10 +1946,11 @@ void > =A0bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m) > =A0{ > =A0 =A0 =A0 =A0struct bintime bt; > + =A0 =A0 =A0 struct sysclock_snap cs; > =A0 =A0 =A0 =A0struct mbuf mb; > =A0 =A0 =A0 =A0struct bpf_d *d; > - =A0 =A0 =A0 u_int pktlen, slen; > - =A0 =A0 =A0 int gottime; > + =A0 =A0 =A0 u_int clockflags, pktlen, slen; > + =A0 =A0 =A0 int tstype, whichclock; > > =A0 =A0 =A0 =A0/* Skip outgoing duplicate packets. */ > =A0 =A0 =A0 =A0if ((m->m_flags & M_PROMISC) !=3D 0 && m->m_pkthdr.rcvif = =3D=3D NULL) { > @@ -1926,6 +1958,20 @@ bpf_mtap2(struct bpf_if *bp, void *data, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0return; > =A0 =A0 =A0 =A0} > > + =A0 =A0 =A0 tstype =3D bp->tstype; > + =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAMP_DEFAULT) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 tstype =3D bpf_default_tstype; > + > + =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAMP_NORMAL || tstype =3D=3D BPF_TS= TAMP_FAST) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 sysclock_getsnapshot(&cs, tstype =3D=3D BPF= _TSTAMP_FAST ? > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1 : 0); > +#ifdef notyet > + =A0 =A0 =A0 else if (tstype =3D=3D BPF_TSTAMP_EXTERNAL) > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* XXX: Convert extern tstamp to bintime. *= / > +#endif > + =A0 =A0 =A0 else > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 bzero(&bt, sizeof(bt)); > + > =A0 =A0 =A0 =A0pktlen =3D m_length(m, NULL); > =A0 =A0 =A0 =A0/* > =A0 =A0 =A0 =A0 * Craft on-stack mbuf suitable for passing to bpf_filter. > @@ -1937,7 +1983,6 @@ bpf_mtap2(struct bpf_if *bp, void *data, > =A0 =A0 =A0 =A0mb.m_len =3D dlen; > =A0 =A0 =A0 =A0pktlen +=3D dlen; > > - =A0 =A0 =A0 gottime =3D BPF_TSTAMP_NONE; > =A0 =A0 =A0 =A0BPFIF_LOCK(bp); > =A0 =A0 =A0 =A0LIST_FOREACH(d, &bp->bif_dlist, bd_next) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcv= if, bp->bif_ifp)) > @@ -1947,8 +1992,16 @@ bpf_mtap2(struct bpf_if *bp, void *data, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0slen =3D bpf_filter(d->bd_rfilter, (u_char= *)&mb, pktlen, 0); > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (slen !=3D 0) { > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0d->bd_fcount++; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (gottime < bpf_ts_qualit= y(d->bd_tstamp)) > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gottime =3D= bpf_gettime(&bt, d->bd_tstamp, m); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (tstype =3D=3D BPF_TSTAM= P_NORMAL || > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 tstype =3D=3D BPF_T= STAMP_FAST) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 whichclock = =3D -1; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 SET_CLOCKCF= G_FLAGS(d->bd_tstamp, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 cs.= sysclock_active, whichclock, clockflags); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 KASSERT(whi= chclock >=3D 0, ("Bogus BPF tstamp " > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "co= nfiguration: 0x%04x", d->bd_tstamp)); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sysclock_sn= ap2bintime(&cs, &bt, whichclock, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 clo= ckflags); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > =A0#ifdef MAC > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (mac_bpfdesc_check_rece= ive(d, bp->bif_ifp) =3D=3D 0) > =A0#endif > @@ -1962,11 +2015,6 @@ bpf_mtap2(struct bpf_if *bp, void *data, > > =A0#undef BPF_CHECK_DIRECTION > > -#undef BPF_TSTAMP_NONE > -#undef BPF_TSTAMP_FAST > -#undef BPF_TSTAMP_NORMAL > -#undef BPF_TSTAMP_EXTERN > - > =A0static int > =A0bpf_hdrlen(struct bpf_d *d) > =A0{ > @@ -1998,15 +2046,9 @@ bpf_hdrlen(struct bpf_d *d) > =A0static void > =A0bpf_bintime2ts(struct bintime *bt, struct bpf_ts *ts, int tstype) > =A0{ > - =A0 =A0 =A0 struct bintime bt2; > =A0 =A0 =A0 =A0struct timeval tsm; > =A0 =A0 =A0 =A0struct timespec tsn; > > - =A0 =A0 =A0 if ((tstype & BPF_T_MONOTONIC) =3D=3D 0) { > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 bt2 =3D *bt; > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 bintime_add(&bt2, &boottimebin); > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 bt =3D &bt2; > - =A0 =A0 =A0 } > =A0 =A0 =A0 =A0switch (BPF_T_FORMAT(tstype)) { > =A0 =A0 =A0 =A0case BPF_T_MICROTIME: > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bintime2timeval(bt, &tsm); > @@ -2200,6 +2242,64 @@ bpf_freed(struct bpf_d *d) > =A0} > > =A0/* > + * Show or change the per bpf_if or system wide default timestamp config= uration. > + */ > +static int > +bpf_tscfg_sysctl_handler(SYSCTL_HANDLER_ARGS) > +{ > + =A0 =A0 =A0 char tstype_name[16]; > + =A0 =A0 =A0 struct bpf_if *bp; > + =A0 =A0 =A0 int error, tstype; > + > + =A0 =A0 =A0 bp =3D (struct bpf_if *)arg1; > + > + =A0 =A0 =A0 if (req->newptr =3D=3D NULL) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* Return the name of the BPF interface's= timestamp setting, or > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* the system wide default if bp is NULL. > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 strlcpy(tstype_name, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bpfiftstypes[bp ? bp->tstype : bpf_= default_tstype], > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sizeof(tstype_name)); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D sysctl_handle_string(oidp, tstype= _name, > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 sizeof(tstype_name), req); > + =A0 =A0 =A0 } else { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* Change the timestamp configuration for= this BPF interface or > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0* the system wide default setting. > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0*/ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 error =3D EINVAL; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 for (tstype =3D 0; tstype < NUM_BPFIFTSTYPE= S; tstype++) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (strncmp((char *)req->ne= wptr, bpfiftstypes[tstype], > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 strlen(bpfiftstypes= [tstype])) =3D=3D 0) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* User spe= cified type found in bpfiftstypes. */ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (strcmp(= oidp->oid_name, "default") =3D=3D 0) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 /* > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0* Don't allow BPF_TSTAMP_DEFAULT to be > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0* assigned to the > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0* "net.bpf.tscfg.default" OID. > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0*/ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 if (tstype !=3D BPF_TSTAMP_DEFAULT) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 bpf_default_tstype =3D tstype; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 error =3D 0; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 } > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } else { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 /* > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0* Valid tstype for > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0* "net.bpf.tscfg." OID. > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0*/ > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 bp->tstype =3D tstype; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 error =3D 0; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 break; > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 } > + =A0 =A0 =A0 } > + > + =A0 =A0 =A0 return (error); > +} > + > +/* > =A0* Attach an interface to bpf. =A0dlt is the link layer type; hdrlen is= the > =A0* fixed size of the link header (variable length headers not yet suppo= rted). > =A0*/ > @@ -2225,6 +2325,17 @@ bpfattach2(struct ifnet *ifp, u_int dlt, > =A0 =A0 =A0 =A0if (bp =3D=3D NULL) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0panic("bpfattach"); > > + =A0 =A0 =A0 bp->tscfgoid =3D SYSCTL_ADD_PROC(NULL, > + =A0 =A0 =A0 =A0 =A0 SYSCTL_STATIC_CHILDREN(_net_bpf_tscfg), OID_AUTO, i= fp->if_xname, > + =A0 =A0 =A0 =A0 =A0 CTLTYPE_STRING | CTLFLAG_RW, bp, sizeof(bp), > + =A0 =A0 =A0 =A0 =A0 bpf_tscfg_sysctl_handler, "A", > + =A0 =A0 =A0 =A0 =A0 "Interface BPF timestamp configuration"); > + =A0 =A0 =A0 if (bp->tscfgoid =3D=3D NULL) { > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 free(bp, M_BPF); > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 panic("bpfattach tscfgoid"); > + =A0 =A0 =A0 } > + > + =A0 =A0 =A0 bp->tstype =3D BPF_TSTAMP_DEFAULT; > =A0 =A0 =A0 =A0LIST_INIT(&bp->bif_dlist); > =A0 =A0 =A0 =A0bp->bif_ifp =3D ifp; > =A0 =A0 =A0 =A0bp->bif_dlt =3D dlt; > @@ -2278,6 +2389,7 @@ bpfdetach(struct ifnet *ifp) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0BPFD_UNLOCK(d); > =A0 =A0 =A0 =A0} > > + =A0 =A0 =A0 sysctl_remove_oid(bp->tscfgoid, 1, 0); > =A0 =A0 =A0 =A0mtx_destroy(&bp->bif_mtx); > =A0 =A0 =A0 =A0free(bp, M_BPF); > =A0} > > Modified: head/sys/net/bpf.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/net/bpf.h =A0Fri Dec 30 06:24:59 2011 =A0 =A0 =A0 =A0(r22898= 5) > +++ head/sys/net/bpf.h =A0Fri Dec 30 08:57:58 2011 =A0 =A0 =A0 =A0(r22898= 6) > @@ -1,12 +1,17 @@ > =A0/*- > =A0* Copyright (c) 1990, 1991, 1993 > - * =A0 =A0 The Regents of the University of California. =A0All rights re= served. > + * =A0 =A0 The Regents of the University of California. > + * Copyright (c) 2011 The University of Melbourne. > + * All rights reserved. > =A0* > =A0* This code is derived from the Stanford/CMU enet packet filter, > =A0* (net/enet.c) distributed as part of 4.3BSD, and code contributed > =A0* to Berkeley by Steven McCanne and Van Jacobson both of Lawrence > =A0* Berkeley Laboratory. > =A0* > + * Portions of this software were developed by Julien Ridoux at the Univ= ersity > + * of Melbourne under sponsorship from the FreeBSD Foundation. > + * > =A0* Redistribution and use in source and binary forms, with or without > =A0* modification, are permitted provided that the following conditions > =A0* are met: > @@ -166,25 +171,17 @@ enum bpf_direction { > =A0#define =A0 =A0 =A0 =A0BPF_T_NONE =A0 =A0 =A0 =A0 =A0 =A0 =A00x0003 > =A0#define =A0 =A0 =A0 =A0BPF_T_FORMAT_MASK =A0 =A0 =A0 0x0003 > =A0#define =A0 =A0 =A0 =A0BPF_T_NORMAL =A0 =A0 =A0 =A0 =A0 =A00x0000 > -#define =A0 =A0 =A0 =A0BPF_T_FAST =A0 =A0 =A0 =A0 =A0 =A0 =A00x0100 > -#define =A0 =A0 =A0 =A0BPF_T_MONOTONIC =A0 =A0 =A0 =A0 0x0200 > -#define =A0 =A0 =A0 =A0BPF_T_MONOTONIC_FAST =A0 =A0(BPF_T_FAST | BPF_T_M= ONOTONIC) > -#define =A0 =A0 =A0 =A0BPF_T_FLAG_MASK =A0 =A0 =A0 =A0 0x0300 > +#define =A0 =A0 =A0 =A0BPF_T_MONOTONIC =A0 =A0 =A0 =A0 0x0100 > +#define =A0 =A0 =A0 =A0BPF_T_FLAG_MASK =A0 =A0 =A0 =A0 0x0100 > =A0#define =A0 =A0 =A0 =A0BPF_T_FORMAT(t) =A0 =A0 =A0 =A0 ((t) & BPF_T_FO= RMAT_MASK) > =A0#define =A0 =A0 =A0 =A0BPF_T_FLAG(t) =A0 =A0 =A0 =A0 =A0 ((t) & BPF_T_= FLAG_MASK) > =A0#define =A0 =A0 =A0 =A0BPF_T_VALID(t) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\ > =A0 =A0 ((t) =3D=3D BPF_T_NONE || (BPF_T_FORMAT(t) !=3D BPF_T_NONE && =A0= =A0\ > =A0 =A0 ((t) & ~(BPF_T_FORMAT_MASK | BPF_T_FLAG_MASK)) =3D=3D 0)) > > -#define =A0 =A0 =A0 =A0BPF_T_MICROTIME_FAST =A0 =A0 =A0 =A0 =A0 =A0(BPF_= T_MICROTIME | BPF_T_FAST) > -#define =A0 =A0 =A0 =A0BPF_T_NANOTIME_FAST =A0 =A0 =A0 =A0 =A0 =A0 (BPF_= T_NANOTIME | BPF_T_FAST) > -#define =A0 =A0 =A0 =A0BPF_T_BINTIME_FAST =A0 =A0 =A0 =A0 =A0 =A0 =A0(BP= F_T_BINTIME | BPF_T_FAST) > =A0#define =A0 =A0 =A0 =A0BPF_T_MICROTIME_MONOTONIC =A0 =A0 =A0 (BPF_T_MI= CROTIME | BPF_T_MONOTONIC) > =A0#define =A0 =A0 =A0 =A0BPF_T_NANOTIME_MONOTONIC =A0 =A0 =A0 =A0(BPF_T_= NANOTIME | BPF_T_MONOTONIC) > =A0#define =A0 =A0 =A0 =A0BPF_T_BINTIME_MONOTONIC =A0 =A0 =A0 =A0 (BPF_T_= BINTIME | BPF_T_MONOTONIC) > -#define =A0 =A0 =A0 =A0BPF_T_MICROTIME_MONOTONIC_FAST =A0(BPF_T_MICROTIM= E | BPF_T_MONOTONIC_FAST) > -#define =A0 =A0 =A0 =A0BPF_T_NANOTIME_MONOTONIC_FAST =A0 (BPF_T_NANOTIME= | BPF_T_MONOTONIC_FAST) > -#define =A0 =A0 =A0 =A0BPF_T_BINTIME_MONOTONIC_FAST =A0 =A0(BPF_T_BINTIM= E | BPF_T_MONOTONIC_FAST) > > =A0/* > =A0* Structure prepended to each packet. > @@ -1100,6 +1097,8 @@ struct bpf_if { > =A0 =A0 =A0 =A0u_int bif_hdrlen; =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* length of= link header */ > =A0 =A0 =A0 =A0struct ifnet *bif_ifp; =A0 =A0 =A0 =A0 =A0/* corresponding= interface */ > =A0 =A0 =A0 =A0struct mtx =A0 =A0 =A0bif_mtx; =A0 =A0 =A0 =A0/* mutex for= interface */ > + =A0 =A0 =A0 struct sysctl_oid *tscfgoid; =A0 =A0/* timestamp sysctl oid= for interface */ > + =A0 =A0 =A0 int tstype; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* time= stamp setting for interface */ > =A0}; > > =A0void =A0 =A0bpf_bufheld(struct bpf_d *d); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 00:17:13 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1DDF106566B; Sat, 31 Dec 2011 00:17:13 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id A7A1A8FC15; Sat, 31 Dec 2011 00:17:13 +0000 (UTC) Received: from s0106005004e13421.vs.shawcable.net ([70.71.175.212] helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1RgmdM-000E8t-Iz; Fri, 30 Dec 2011 16:17:12 -0800 Message-ID: <4EFE5481.6050707@FreeBSD.org> Date: Fri, 30 Dec 2011 16:17:05 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Gleb Smirnoff References: <201110071343.p97Dh1c9013228@svn.freebsd.org> <4EFE0FC1.6070909@FreeBSD.org> <20111230200249.GF12721@FreeBSD.org> In-Reply-To: <20111230200249.GF12721@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann Subject: Re: svn: head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 00:17:13 -0000 On 12/30/2011 12:02 PM, Gleb Smirnoff wrote: > On Fri, Dec 30, 2011 at 11:23:45AM -0800, Maxim Sobolev wrote: > M> Won't this break whole lot of third-party software, which expects > M> FreeBSD to be slightly different in this regards? Just curious. > > Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix > this software (at least in ports). > > The MFC to stable/9 of r226105 was back out. Well, I am just curious how critical it is to get it resolved and is there any way to avoid ABI breakage. Software compiled for 9.x won't run on 10.x even when fitted with the proper compat libs, as far as I can tell and not all software can be easily recompiled. There are also other places where BSD have subtle differences with almost any other nix flavor out there. Not accepting sun_len = 0 in the unix domain sockets is one of those places that comes to mind. Other systems just do strlen() of sun_path, while BSD does EINVAL. And we've been living with this for decades. -Maxim From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 00:25:17 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE2721065672; Sat, 31 Dec 2011 00:25:17 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF558FC14; Sat, 31 Dec 2011 00:25:17 +0000 (UTC) Received: from s0106005004e13421.vs.shawcable.net ([70.71.175.212] helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1RgmlA-000E9b-Fz; Fri, 30 Dec 2011 16:25:16 -0800 Message-ID: <4EFE5665.1070902@FreeBSD.org> Date: Fri, 30 Dec 2011 16:25:09 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Gleb Smirnoff References: <201110071343.p97Dh1c9013228@svn.freebsd.org> <4EFE0FC1.6070909@FreeBSD.org> <20111230200249.GF12721@FreeBSD.org> <4EFE5481.6050707@FreeBSD.org> In-Reply-To: <4EFE5481.6050707@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Andre Oppermann Subject: Re: svn: head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 00:25:18 -0000 On 12/30/2011 4:17 PM, Maxim Sobolev wrote: >> M> Won't this break whole lot of third-party software, which expects >> M> FreeBSD to be slightly different in this regards? Just curious. >> >> Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix >> this software (at least in ports). >> >> The MFC to stable/9 of r226105 was back out. > > Well, I am just curious how critical it is to get it resolved and is > there any way to avoid ABI breakage. Software compiled for 9.x won't run > on 10.x even when fitted with the proper compat libs, as far as I can > tell and not all software can be easily recompiled. P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on the version of the ELF image (i.e. detect if the binary is < than FreeBSD 10. -Maxim From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 00:44:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDECD106564A; Sat, 31 Dec 2011 00:44:11 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB1E78FC0A; Sat, 31 Dec 2011 00:44:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV0iBHQ038608; Sat, 31 Dec 2011 00:44:11 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV0iBVG038605; Sat, 31 Dec 2011 00:44:11 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310044.pBV0iBVG038605@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 00:44:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229052 - stable/9/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 00:44:12 -0000 Author: yongari Date: Sat Dec 31 00:44:11 2011 New Revision: 229052 URL: http://svn.freebsd.org/changeset/base/229052 Log: MFC r226123: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0. Modified: stable/9/sys/dev/bce/if_bce.c stable/9/sys/dev/bce/if_bcereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Sat Dec 31 00:35:11 2011 (r229051) +++ stable/9/sys/dev/bce/if_bce.c Sat Dec 31 00:44:11 2011 (r229052) @@ -1112,8 +1112,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI " "interrupt.\n", __FUNCTION__); sc->bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; sc->bce_irq_rid = 1; sc->bce_intr = bce_intr; @@ -1730,8 +1729,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid offset = ctx_offset + cid_addr; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_READ_REQ)); @@ -1783,8 +1781,7 @@ bce_ctx_wr(struct bce_softc *sc, u32 cid BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n", __FUNCTION__, cid_addr)); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); @@ -2469,8 +2466,7 @@ bce_init_nvram(struct bce_softc *sc) DBENTER(BCE_VERBOSE_NVRAM); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->bce_flash_info = &flash_5709; goto bce_init_nvram_get_flash_size; } @@ -3224,8 +3220,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all context memory pages. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( @@ -3564,8 +3559,7 @@ bce_dma_alloc(device_t dev) __FUNCTION__, (uintmax_t) sc->stats_block_paddr); /* BCM5709 uses host memory as cache for context memory. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->ctx_pages = 0x2000 / BCM_PAGE_SIZE; if (sc->ctx_pages == 0) sc->ctx_pages = 1; @@ -4206,8 +4200,7 @@ bce_init_rxp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_RXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_RXP_b09FwReleaseMajor; fw.ver_minor = bce_RXP_b09FwReleaseMinor; fw.ver_fix = bce_RXP_b09FwReleaseFix; @@ -4305,8 +4298,7 @@ bce_init_txp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TXP_b09FwReleaseMajor; fw.ver_minor = bce_TXP_b09FwReleaseMinor; fw.ver_fix = bce_TXP_b09FwReleaseFix; @@ -4403,8 +4395,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TPAT_b09FwReleaseMajor; fw.ver_minor = bce_TPAT_b09FwReleaseMinor; fw.ver_fix = bce_TPAT_b09FwReleaseFix; @@ -4501,8 +4492,7 @@ bce_init_cp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_CP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_CP_b09FwReleaseMajor; fw.ver_minor = bce_CP_b09FwReleaseMinor; fw.ver_fix = bce_CP_b09FwReleaseFix; @@ -4599,8 +4589,7 @@ bce_init_com_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_COM_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_COM_b09FwReleaseMajor; fw.ver_minor = bce_COM_b09FwReleaseMinor; fw.ver_fix = bce_COM_b09FwReleaseFix; @@ -4683,8 +4672,7 @@ bce_init_cpus(struct bce_softc *sc) { DBENTER(BCE_VERBOSE_RESET); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(sc) == BCE_CHIP_REV_Ax)) { bce_load_rv2p_fw(sc, bce_xi90_rv2p_proc1, @@ -4732,8 +4720,7 @@ bce_init_ctx(struct bce_softc *sc) rc = 0; DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { retry_cnt = CTX_INIT_RETRY_COUNT; DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n"); @@ -4960,8 +4947,7 @@ bce_reset(struct bce_softc *sc, u32 rese DELAY(5); /* Disable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val &= ~BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4983,8 +4969,7 @@ bce_reset(struct bce_softc *sc, u32 rese val = REG_RD(sc, BCE_MISC_ID); /* Chip reset. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_MISC_COMMAND, BCE_MISC_COMMAND_SW_RESET); REG_RD(sc, BCE_MISC_COMMAND); DELAY(5); @@ -5113,8 +5098,7 @@ bce_chipinit(struct bce_softc *sc) val |= BCE_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; /* Enable bins used on the 5709. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val |= BCE_MQ_CONFIG_BIN_MQ_MODE; if (BCE_CHIP_ID(sc) == BCE_CHIP_ID_5709_A1) val |= BCE_MQ_CONFIG_HALT_DIS; @@ -5268,8 +5252,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val |= BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -5293,8 +5276,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable all remaining blocks in the MAC. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MISC_ENABLE_SET_BITS, BCE_MISC_ENABLE_DEFAULT_XI); else @@ -5565,8 +5547,7 @@ bce_init_tx_context(struct bce_softc *sc DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_SEND | BCE_VERBOSE_CTX); /* Initialize the context ID for an L2 TX chain. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Set the CID type to support an L2 connection. */ val = BCE_L2CTX_TX_TYPE_TYPE_L2_XI | BCE_L2CTX_TX_TYPE_SIZE_L2_XI; @@ -5729,8 +5710,7 @@ bce_init_rx_context(struct bce_softc *sc * when pause frames can be stopped (the high * watermark). */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { u32 lo_water, hi_water; if (sc->bce_flags & BCE_USING_TX_FLOW_CONTROL) { @@ -5764,8 +5744,7 @@ bce_init_rx_context(struct bce_softc *sc CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_CTX_TYPE, val); /* Setup the MQ BIN mapping for l2_ctx_host_bseq. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MQ_MAP_L2_5); REG_WR(sc, BCE_MQ_MAP_L2_5, val | BCE_MQ_MAP_L2_5_ARM); } @@ -5983,8 +5962,7 @@ bce_init_pg_chain(struct bce_softc *sc) } /* Setup the MQ BIN mapping for host_pg_bidx. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MQ_MAP_L2_3, BCE_MQ_MAP_L2_3_DEFAULT); CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_PG_BUF_SIZE, 0); @@ -9912,8 +9890,7 @@ bce_dump_ctx(struct bce_softc *sc, u16 c "consumer index\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_RX_NX_PG_BDIDX)); } else if (cid == TX_CID) { - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { BCE_PRINTF(" 0x%08X - (L2CTX_TX_TYPE_XI) ctx type\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_TX_TYPE_XI)); @@ -10175,8 +10152,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); @@ -10209,8 +10185,7 @@ bce_dump_ftqs(struct bce_softc *sc) BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Input queue to the RV2P Command Scheduler */ cmd = REG_RD(sc, BCE_RV2PCSR_FTQ_CMD); ctl = REG_RD(sc, BCE_RV2PCSR_FTQ_CTL); Modified: stable/9/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/9/sys/dev/bce/if_bcereg.h Sat Dec 31 00:35:11 2011 (r229051) +++ stable/9/sys/dev/bce/if_bcereg.h Sat Dec 31 00:44:11 2011 (r229052) @@ -576,7 +576,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_NUM_5706 0x57060000 #define BCE_CHIP_NUM_5708 0x57080000 #define BCE_CHIP_NUM_5709 0x57090000 -#define BCE_CHIP_NUM_5716 0x57160000 #define BCE_CHIP_REV(sc) (((sc)->bce_chipid) & 0x0000f000) #define BCE_CHIP_REV_Ax 0x00000000 @@ -601,7 +600,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_ID_5709_B1 0x57091010 #define BCE_CHIP_ID_5709_B2 0x57091020 #define BCE_CHIP_ID_5709_C0 0x57092000 -#define BCE_CHIP_ID_5716_C0 0x57162000 #define BCE_CHIP_BOND_ID(sc) (((sc)->bce_chipid) & 0xf) From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 00:46:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B4A9106566C; Sat, 31 Dec 2011 00:46:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5849B8FC12; Sat, 31 Dec 2011 00:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV0k76A038704; Sat, 31 Dec 2011 00:46:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV0k7rj038701; Sat, 31 Dec 2011 00:46:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310046.pBV0k7rj038701@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 00:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229053 - in stable/8/sys: conf dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 00:46:07 -0000 Author: yongari Date: Sat Dec 31 00:46:06 2011 New Revision: 229053 URL: http://svn.freebsd.org/changeset/base/229053 Log: MFC r226123: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0. Modified: stable/8/sys/dev/bce/if_bce.c stable/8/sys/dev/bce/if_bcereg.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/bce/if_bce.c ============================================================================== --- stable/8/sys/dev/bce/if_bce.c Sat Dec 31 00:44:11 2011 (r229052) +++ stable/8/sys/dev/bce/if_bce.c Sat Dec 31 00:46:06 2011 (r229053) @@ -796,8 +796,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI " "interrupt.\n", __FUNCTION__); sc->bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; sc->bce_irq_rid = 1; sc->bce_intr = bce_intr; @@ -1450,8 +1449,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid offset = ctx_offset + cid_addr; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_READ_REQ)); @@ -1503,8 +1501,7 @@ bce_ctx_wr(struct bce_softc *sc, u32 cid BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n", __FUNCTION__, cid_addr)); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); @@ -2189,8 +2186,7 @@ bce_init_nvram(struct bce_softc *sc) DBENTER(BCE_VERBOSE_NVRAM); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->bce_flash_info = &flash_5709; goto bce_init_nvram_get_flash_size; } @@ -2892,8 +2888,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all context memory pages. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( @@ -3232,8 +3227,7 @@ bce_dma_alloc(device_t dev) __FUNCTION__, (uintmax_t) sc->stats_block_paddr); /* BCM5709 uses host memory as cache for context memory. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->ctx_pages = 0x2000 / BCM_PAGE_SIZE; if (sc->ctx_pages == 0) sc->ctx_pages = 1; @@ -3876,8 +3870,7 @@ bce_init_rxp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_RXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_RXP_b09FwReleaseMajor; fw.ver_minor = bce_RXP_b09FwReleaseMinor; fw.ver_fix = bce_RXP_b09FwReleaseFix; @@ -3975,8 +3968,7 @@ bce_init_txp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TXP_b09FwReleaseMajor; fw.ver_minor = bce_TXP_b09FwReleaseMinor; fw.ver_fix = bce_TXP_b09FwReleaseFix; @@ -4073,8 +4065,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TPAT_b09FwReleaseMajor; fw.ver_minor = bce_TPAT_b09FwReleaseMinor; fw.ver_fix = bce_TPAT_b09FwReleaseFix; @@ -4171,8 +4162,7 @@ bce_init_cp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_CP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_CP_b09FwReleaseMajor; fw.ver_minor = bce_CP_b09FwReleaseMinor; fw.ver_fix = bce_CP_b09FwReleaseFix; @@ -4269,8 +4259,7 @@ bce_init_com_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_COM_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_COM_b09FwReleaseMajor; fw.ver_minor = bce_COM_b09FwReleaseMinor; fw.ver_fix = bce_COM_b09FwReleaseFix; @@ -4353,8 +4342,7 @@ bce_init_cpus(struct bce_softc *sc) { DBENTER(BCE_VERBOSE_RESET); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(sc) == BCE_CHIP_REV_Ax)) { bce_load_rv2p_fw(sc, bce_xi90_rv2p_proc1, @@ -4402,8 +4390,7 @@ bce_init_ctx(struct bce_softc *sc) rc = 0; DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { retry_cnt = CTX_INIT_RETRY_COUNT; DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n"); @@ -4630,8 +4617,7 @@ bce_reset(struct bce_softc *sc, u32 rese DELAY(5); /* Disable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val &= ~BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4653,8 +4639,7 @@ bce_reset(struct bce_softc *sc, u32 rese val = REG_RD(sc, BCE_MISC_ID); /* Chip reset. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_MISC_COMMAND, BCE_MISC_COMMAND_SW_RESET); REG_RD(sc, BCE_MISC_COMMAND); DELAY(5); @@ -4783,8 +4768,7 @@ bce_chipinit(struct bce_softc *sc) val |= BCE_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; /* Enable bins used on the 5709. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val |= BCE_MQ_CONFIG_BIN_MQ_MODE; if (BCE_CHIP_ID(sc) == BCE_CHIP_ID_5709_A1) val |= BCE_MQ_CONFIG_HALT_DIS; @@ -4938,8 +4922,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val |= BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4963,8 +4946,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable all remaining blocks in the MAC. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MISC_ENABLE_SET_BITS, BCE_MISC_ENABLE_DEFAULT_XI); else @@ -5241,8 +5223,7 @@ bce_init_tx_context(struct bce_softc *sc DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_SEND | BCE_VERBOSE_CTX); /* Initialize the context ID for an L2 TX chain. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Set the CID type to support an L2 connection. */ val = BCE_L2CTX_TX_TYPE_TYPE_L2_XI | BCE_L2CTX_TX_TYPE_SIZE_L2_XI; @@ -5403,8 +5384,7 @@ bce_init_rx_context(struct bce_softc *sc * when pause frames can be stopped (the high * watermark). */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { u32 lo_water, hi_water; if (sc->bce_flags && BCE_USING_TX_FLOW_CONTROL) { @@ -5438,8 +5418,7 @@ bce_init_rx_context(struct bce_softc *sc CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_CTX_TYPE, val); /* Setup the MQ BIN mapping for l2_ctx_host_bseq. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MQ_MAP_L2_5); REG_WR(sc, BCE_MQ_MAP_L2_5, val | BCE_MQ_MAP_L2_5_ARM); } @@ -5655,8 +5634,7 @@ bce_init_pg_chain(struct bce_softc *sc) } /* Setup the MQ BIN mapping for host_pg_bidx. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MQ_MAP_L2_3, BCE_MQ_MAP_L2_3_DEFAULT); CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_PG_BUF_SIZE, 0); @@ -9476,8 +9454,7 @@ bce_dump_ctx(struct bce_softc *sc, u16 c "consumer index\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_RX_NX_PG_BDIDX)); } else if (cid == TX_CID) { - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { BCE_PRINTF(" 0x%08X - (L2CTX_TX_TYPE_XI) ctx type\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_TX_TYPE_XI)); @@ -9739,8 +9716,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); @@ -9773,8 +9749,7 @@ bce_dump_ftqs(struct bce_softc *sc) BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Input queue to the RV2P Command Scheduler */ cmd = REG_RD(sc, BCE_RV2PCSR_FTQ_CMD); ctl = REG_RD(sc, BCE_RV2PCSR_FTQ_CTL); Modified: stable/8/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/8/sys/dev/bce/if_bcereg.h Sat Dec 31 00:44:11 2011 (r229052) +++ stable/8/sys/dev/bce/if_bcereg.h Sat Dec 31 00:46:06 2011 (r229053) @@ -576,7 +576,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_NUM_5706 0x57060000 #define BCE_CHIP_NUM_5708 0x57080000 #define BCE_CHIP_NUM_5709 0x57090000 -#define BCE_CHIP_NUM_5716 0x57160000 #define BCE_CHIP_REV(sc) (((sc)->bce_chipid) & 0x0000f000) #define BCE_CHIP_REV_Ax 0x00000000 @@ -601,7 +600,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_ID_5709_B1 0x57091010 #define BCE_CHIP_ID_5709_B2 0x57091020 #define BCE_CHIP_ID_5709_C0 0x57092000 -#define BCE_CHIP_ID_5716_C0 0x57162000 #define BCE_CHIP_BOND_ID(sc) (((sc)->bce_chipid) & 0xf) From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 00:47:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FF92106564A; Sat, 31 Dec 2011 00:47:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D0DB8FC1A; Sat, 31 Dec 2011 00:47:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV0lsik038784; Sat, 31 Dec 2011 00:47:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV0lsKU038781; Sat, 31 Dec 2011 00:47:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310047.pBV0lsKU038781@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 00:47:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229054 - stable/7/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 00:47:55 -0000 Author: yongari Date: Sat Dec 31 00:47:54 2011 New Revision: 229054 URL: http://svn.freebsd.org/changeset/base/229054 Log: MFC r226123: BCE_MISC_ID register of BCM5716 returns the same id of BCM5709 so remove explicit checks for BCM5716. The BCM5709 and BCM5716 chips are virtually indistinguishable by software except for the PCI device ID. The two chips differ in that BCM5709 supports TCP/IP and iSCSI offload in Windows while the BCM5716 doesn't. While I'm here remove now unused definition of BCE_CHIP_NUM_5716 and BCE_CHIP_ID_5716_C0. Modified: stable/7/sys/dev/bce/if_bce.c stable/7/sys/dev/bce/if_bcereg.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/bce/if_bce.c ============================================================================== --- stable/7/sys/dev/bce/if_bce.c Sat Dec 31 00:46:06 2011 (r229053) +++ stable/7/sys/dev/bce/if_bce.c Sat Dec 31 00:47:54 2011 (r229054) @@ -796,8 +796,7 @@ bce_attach(device_t dev) DBPRINT(sc, BCE_INFO_LOAD, "%s(): Using MSI " "interrupt.\n", __FUNCTION__); sc->bce_flags |= BCE_USING_MSI_FLAG; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) sc->bce_flags |= BCE_ONE_SHOT_MSI_FLAG; sc->bce_irq_rid = 1; sc->bce_intr = bce_intr; @@ -1450,8 +1449,7 @@ bce_ctx_rd(struct bce_softc *sc, u32 cid offset = ctx_offset + cid_addr; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_READ_REQ)); @@ -1503,8 +1501,7 @@ bce_ctx_wr(struct bce_softc *sc, u32 cid BCE_PRINTF("%s(): Invalid CID address: 0x%08X.\n", __FUNCTION__, cid_addr)); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_CTX_CTX_DATA, ctx_val); REG_WR(sc, BCE_CTX_CTX_CTRL, (offset | BCE_CTX_CTX_CTRL_WRITE_REQ)); @@ -2189,8 +2186,7 @@ bce_init_nvram(struct bce_softc *sc) DBENTER(BCE_VERBOSE_NVRAM); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->bce_flash_info = &flash_5709; goto bce_init_nvram_get_flash_size; } @@ -2892,8 +2888,7 @@ bce_dma_free(struct bce_softc *sc) /* Free, unmap and destroy all context memory pages. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { for (i = 0; i < sc->ctx_pages; i++ ) { if (sc->ctx_block[i] != NULL) { bus_dmamem_free( @@ -3232,8 +3227,7 @@ bce_dma_alloc(device_t dev) __FUNCTION__, (uintmax_t) sc->stats_block_paddr); /* BCM5709 uses host memory as cache for context memory. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { sc->ctx_pages = 0x2000 / BCM_PAGE_SIZE; if (sc->ctx_pages == 0) sc->ctx_pages = 1; @@ -3876,8 +3870,7 @@ bce_init_rxp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_RXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_RXP_b09FwReleaseMajor; fw.ver_minor = bce_RXP_b09FwReleaseMinor; fw.ver_fix = bce_RXP_b09FwReleaseFix; @@ -3975,8 +3968,7 @@ bce_init_txp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TXP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TXP_b09FwReleaseMajor; fw.ver_minor = bce_TXP_b09FwReleaseMinor; fw.ver_fix = bce_TXP_b09FwReleaseFix; @@ -4073,8 +4065,7 @@ bce_init_tpat_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_TPAT_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_TPAT_b09FwReleaseMajor; fw.ver_minor = bce_TPAT_b09FwReleaseMinor; fw.ver_fix = bce_TPAT_b09FwReleaseFix; @@ -4171,8 +4162,7 @@ bce_init_cp_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_CP_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_CP_b09FwReleaseMajor; fw.ver_minor = bce_CP_b09FwReleaseMinor; fw.ver_fix = bce_CP_b09FwReleaseFix; @@ -4269,8 +4259,7 @@ bce_init_com_cpu(struct bce_softc *sc) cpu_reg.spad_base = BCE_COM_SCRATCH; cpu_reg.mips_view_base = 0x8000000; - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { fw.ver_major = bce_COM_b09FwReleaseMajor; fw.ver_minor = bce_COM_b09FwReleaseMinor; fw.ver_fix = bce_COM_b09FwReleaseFix; @@ -4353,8 +4342,7 @@ bce_init_cpus(struct bce_softc *sc) { DBENTER(BCE_VERBOSE_RESET); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { if ((BCE_CHIP_REV(sc) == BCE_CHIP_REV_Ax)) { bce_load_rv2p_fw(sc, bce_xi90_rv2p_proc1, @@ -4402,8 +4390,7 @@ bce_init_ctx(struct bce_softc *sc) rc = 0; DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { retry_cnt = CTX_INIT_RETRY_COUNT; DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n"); @@ -4630,8 +4617,7 @@ bce_reset(struct bce_softc *sc, u32 rese DELAY(5); /* Disable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val &= ~BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4653,8 +4639,7 @@ bce_reset(struct bce_softc *sc, u32 rese val = REG_RD(sc, BCE_MISC_ID); /* Chip reset. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { REG_WR(sc, BCE_MISC_COMMAND, BCE_MISC_COMMAND_SW_RESET); REG_RD(sc, BCE_MISC_COMMAND); DELAY(5); @@ -4783,8 +4768,7 @@ bce_chipinit(struct bce_softc *sc) val |= BCE_MQ_CONFIG_KNL_BYP_BLK_SIZE_256; /* Enable bins used on the 5709. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val |= BCE_MQ_CONFIG_BIN_MQ_MODE; if (BCE_CHIP_ID(sc) == BCE_CHIP_ID_5709_A1) val |= BCE_MQ_CONFIG_HALT_DIS; @@ -4938,8 +4922,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable DMA */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MISC_NEW_CORE_CTL); val |= BCE_MISC_NEW_CORE_CTL_DMA_ENABLE; REG_WR(sc, BCE_MISC_NEW_CORE_CTL, val); @@ -4963,8 +4946,7 @@ bce_blockinit(struct bce_softc *sc) } /* Enable all remaining blocks in the MAC. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MISC_ENABLE_SET_BITS, BCE_MISC_ENABLE_DEFAULT_XI); else @@ -5241,8 +5223,7 @@ bce_init_tx_context(struct bce_softc *sc DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_SEND | BCE_VERBOSE_CTX); /* Initialize the context ID for an L2 TX chain. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Set the CID type to support an L2 connection. */ val = BCE_L2CTX_TX_TYPE_TYPE_L2_XI | BCE_L2CTX_TX_TYPE_SIZE_L2_XI; @@ -5403,8 +5384,7 @@ bce_init_rx_context(struct bce_softc *sc * when pause frames can be stopped (the high * watermark). */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { u32 lo_water, hi_water; if (sc->bce_flags && BCE_USING_TX_FLOW_CONTROL) { @@ -5438,8 +5418,7 @@ bce_init_rx_context(struct bce_softc *sc CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_CTX_TYPE, val); /* Setup the MQ BIN mapping for l2_ctx_host_bseq. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { val = REG_RD(sc, BCE_MQ_MAP_L2_5); REG_WR(sc, BCE_MQ_MAP_L2_5, val | BCE_MQ_MAP_L2_5_ARM); } @@ -5655,8 +5634,7 @@ bce_init_pg_chain(struct bce_softc *sc) } /* Setup the MQ BIN mapping for host_pg_bidx. */ - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) REG_WR(sc, BCE_MQ_MAP_L2_3, BCE_MQ_MAP_L2_3_DEFAULT); CTX_WR(sc, GET_CID_ADDR(RX_CID), BCE_L2CTX_RX_PG_BUF_SIZE, 0); @@ -9476,8 +9454,7 @@ bce_dump_ctx(struct bce_softc *sc, u16 c "consumer index\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_RX_NX_PG_BDIDX)); } else if (cid == TX_CID) { - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { BCE_PRINTF(" 0x%08X - (L2CTX_TX_TYPE_XI) ctx type\n", CTX_RD(sc, GET_CID_ADDR(cid), BCE_L2CTX_TX_TYPE_XI)); @@ -9739,8 +9716,7 @@ bce_dump_ftqs(struct bce_softc *sc) (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_CPQ_VALID_CNT << 8) | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_MGMQ_VALID_CNT); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) + if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) val = val | (BCE_HC_STAT_GEN_SEL_0_GEN_SEL_0_RV2PCSQ_VALID_CNT_XI << 24); @@ -9773,8 +9749,7 @@ bce_dump_ftqs(struct bce_softc *sc) BCE_PRINTF(" CS 0x%08X 0x%08X 0x%08X 0x%08X 0x%08X\n", cmd, ctl, cur_depth, max_depth, valid_cnt); - if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || - (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { + if (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) { /* Input queue to the RV2P Command Scheduler */ cmd = REG_RD(sc, BCE_RV2PCSR_FTQ_CMD); ctl = REG_RD(sc, BCE_RV2PCSR_FTQ_CTL); Modified: stable/7/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/7/sys/dev/bce/if_bcereg.h Sat Dec 31 00:46:06 2011 (r229053) +++ stable/7/sys/dev/bce/if_bcereg.h Sat Dec 31 00:47:54 2011 (r229054) @@ -573,7 +573,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_NUM_5706 0x57060000 #define BCE_CHIP_NUM_5708 0x57080000 #define BCE_CHIP_NUM_5709 0x57090000 -#define BCE_CHIP_NUM_5716 0x57160000 #define BCE_CHIP_REV(sc) (((sc)->bce_chipid) & 0x0000f000) #define BCE_CHIP_REV_Ax 0x00000000 @@ -598,7 +597,6 @@ default: DBPRINT(sc, BCE_INSANE_PHY, #define BCE_CHIP_ID_5709_B1 0x57091010 #define BCE_CHIP_ID_5709_B2 0x57091020 #define BCE_CHIP_ID_5709_C0 0x57092000 -#define BCE_CHIP_ID_5716_C0 0x57162000 #define BCE_CHIP_BOND_ID(sc) (((sc)->bce_chipid) & 0xf) From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 01:07:02 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 588EE106567D; Sat, 31 Dec 2011 01:07:02 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3D1038FC20; Sat, 31 Dec 2011 01:07:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1720i039505; Sat, 31 Dec 2011 01:07:02 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV171xp039486; Sat, 31 Dec 2011 01:07:01 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310107.pBV171xp039486@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:07:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229057 - in stable/9/sys: dev/age dev/alc dev/ale dev/lge dev/msk dev/nfe dev/nge dev/nve dev/re dev/sge dev/sis dev/vge dev/vr dev/vte mips/atheros mips/idt pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 01:07:02 -0000 Author: yongari Date: Sat Dec 31 01:07:01 2011 New Revision: 229057 URL: http://svn.freebsd.org/changeset/base/229057 Log: MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/9/sys/dev/age/if_age.c stable/9/sys/dev/alc/if_alc.c stable/9/sys/dev/ale/if_ale.c stable/9/sys/dev/lge/if_lge.c stable/9/sys/dev/msk/if_msk.c stable/9/sys/dev/nfe/if_nfe.c stable/9/sys/dev/nge/if_nge.c stable/9/sys/dev/nve/if_nve.c stable/9/sys/dev/re/if_re.c stable/9/sys/dev/sge/if_sge.c stable/9/sys/dev/sis/if_sis.c stable/9/sys/dev/vge/if_vge.c stable/9/sys/dev/vr/if_vr.c stable/9/sys/dev/vte/if_vte.c stable/9/sys/mips/atheros/if_arge.c stable/9/sys/mips/idt/if_kr.c stable/9/sys/pci/if_rl.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/age/if_age.c ============================================================================== --- stable/9/sys/dev/age/if_age.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/age/if_age.c Sat Dec 31 01:07:01 2011 (r229057) @@ -282,9 +282,9 @@ age_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->age_miibus); mii_pollstat(mii); - AGE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + AGE_UNLOCK(sc); } /* Modified: stable/9/sys/dev/alc/if_alc.c ============================================================================== --- stable/9/sys/dev/alc/if_alc.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/alc/if_alc.c Sat Dec 31 01:07:01 2011 (r229057) @@ -349,9 +349,9 @@ alc_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->alc_miibus); mii_pollstat(mii); - ALC_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALC_UNLOCK(sc); } static int Modified: stable/9/sys/dev/ale/if_ale.c ============================================================================== --- stable/9/sys/dev/ale/if_ale.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/ale/if_ale.c Sat Dec 31 01:07:01 2011 (r229057) @@ -270,9 +270,9 @@ ale_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->ale_miibus); mii_pollstat(mii); - ALE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALE_UNLOCK(sc); } static int Modified: stable/9/sys/dev/lge/if_lge.c ============================================================================== --- stable/9/sys/dev/lge/if_lge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/lge/if_lge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1430,9 +1430,9 @@ lge_ifmedia_sts(ifp, ifmr) LGE_LOCK(sc); mii = device_get_softc(sc->lge_miibus); mii_pollstat(mii); - LGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + LGE_UNLOCK(sc); return; } Modified: stable/9/sys/dev/msk/if_msk.c ============================================================================== --- stable/9/sys/dev/msk/if_msk.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/msk/if_msk.c Sat Dec 31 01:07:01 2011 (r229057) @@ -995,9 +995,9 @@ msk_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); - MSK_IF_UNLOCK(sc_if); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MSK_IF_UNLOCK(sc_if); } static int Modified: stable/9/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/9/sys/dev/nfe/if_nfe.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/nfe/if_nfe.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2952,10 +2952,10 @@ nfe_ifmedia_sts(struct ifnet *ifp, struc NFE_LOCK(sc); mii = device_get_softc(sc->nfe_miibus); mii_pollstat(mii); - NFE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NFE_UNLOCK(sc); } Modified: stable/9/sys/dev/nge/if_nge.c ============================================================================== --- stable/9/sys/dev/nge/if_nge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/nge/if_nge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2281,9 +2281,9 @@ nge_mediastatus(struct ifnet *ifp, struc NGE_LOCK(sc); mii = device_get_softc(sc->nge_miibus); mii_pollstat(mii); - NGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NGE_UNLOCK(sc); } static int Modified: stable/9/sys/dev/nve/if_nve.c ============================================================================== --- stable/9/sys/dev/nve/if_nve.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/nve/if_nve.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1202,10 +1202,10 @@ nve_ifmedia_sts(struct ifnet *ifp, struc NVE_LOCK(sc); mii = device_get_softc(sc->miibus); mii_pollstat(mii); - NVE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NVE_UNLOCK(sc); return; } Modified: stable/9/sys/dev/re/if_re.c ============================================================================== --- stable/9/sys/dev/re/if_re.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/re/if_re.c Sat Dec 31 01:07:01 2011 (r229057) @@ -3214,9 +3214,9 @@ re_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int Modified: stable/9/sys/dev/sge/if_sge.c ============================================================================== --- stable/9/sys/dev/sge/if_sge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/sge/if_sge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1746,9 +1746,9 @@ sge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - SGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SGE_UNLOCK(sc); } static int Modified: stable/9/sys/dev/sis/if_sis.c ============================================================================== --- stable/9/sys/dev/sis/if_sis.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/sis/if_sis.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2109,9 +2109,9 @@ sis_ifmedia_sts(struct ifnet *ifp, struc SIS_LOCK(sc); mii = device_get_softc(sc->sis_miibus); mii_pollstat(mii); - SIS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SIS_UNLOCK(sc); } static int Modified: stable/9/sys/dev/vge/if_vge.c ============================================================================== --- stable/9/sys/dev/vge/if_vge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/vge/if_vge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2173,9 +2173,9 @@ vge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VGE_UNLOCK(sc); } static void Modified: stable/9/sys/dev/vr/if_vr.c ============================================================================== --- stable/9/sys/dev/vr/if_vr.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/vr/if_vr.c Sat Dec 31 01:07:01 2011 (r229057) @@ -2155,9 +2155,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct return; } mii_pollstat(mii); - VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VR_UNLOCK(sc); } static int Modified: stable/9/sys/dev/vte/if_vte.c ============================================================================== --- stable/9/sys/dev/vte/if_vte.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/dev/vte/if_vte.c Sat Dec 31 01:07:01 2011 (r229057) @@ -284,9 +284,9 @@ vte_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->vte_miibus); mii_pollstat(mii); - VTE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + VTE_UNLOCK(sc); } static int Modified: stable/9/sys/mips/atheros/if_arge.c ============================================================================== --- stable/9/sys/mips/atheros/if_arge.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/mips/atheros/if_arge.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1199,9 +1199,9 @@ arge_ifmedia_sts(struct ifnet *ifp, stru mii = device_get_softc(sc->arge_miibus); ARGE_LOCK(sc); mii_pollstat(mii); - ARGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ARGE_UNLOCK(sc); } struct arge_dmamap_arg { Modified: stable/9/sys/mips/idt/if_kr.c ============================================================================== --- stable/9/sys/mips/idt/if_kr.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/mips/idt/if_kr.c Sat Dec 31 01:07:01 2011 (r229057) @@ -945,9 +945,9 @@ kr_ifmedia_sts(struct ifnet *ifp, struct mii = device_get_softc(sc->kr_miibus); KR_LOCK(sc); mii_pollstat(mii); - KR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + KR_UNLOCK(sc); } struct kr_dmamap_arg { Modified: stable/9/sys/pci/if_rl.c ============================================================================== --- stable/9/sys/pci/if_rl.c Sat Dec 31 01:06:51 2011 (r229056) +++ stable/9/sys/pci/if_rl.c Sat Dec 31 01:07:01 2011 (r229057) @@ -1797,9 +1797,9 @@ rl_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 01:08:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCDA7106566C; Sat, 31 Dec 2011 01:08:31 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B781E8FC14; Sat, 31 Dec 2011 01:08:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV18VaK039602; Sat, 31 Dec 2011 01:08:31 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV18VB2039584; Sat, 31 Dec 2011 01:08:31 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310108.pBV18VB2039584@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229058 - in stable/8/sys: conf dev/age dev/alc dev/ale dev/lge dev/msk dev/nfe dev/nge dev/nve dev/re dev/sge dev/sis dev/vge dev/vr dev/vte mips/atheros mips/idt pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 01:08:32 -0000 Author: yongari Date: Sat Dec 31 01:08:31 2011 New Revision: 229058 URL: http://svn.freebsd.org/changeset/base/229058 Log: MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/8/sys/dev/age/if_age.c stable/8/sys/dev/alc/if_alc.c stable/8/sys/dev/ale/if_ale.c stable/8/sys/dev/lge/if_lge.c stable/8/sys/dev/msk/if_msk.c stable/8/sys/dev/nfe/if_nfe.c stable/8/sys/dev/nge/if_nge.c stable/8/sys/dev/nve/if_nve.c stable/8/sys/dev/re/if_re.c stable/8/sys/dev/sge/if_sge.c stable/8/sys/dev/sis/if_sis.c stable/8/sys/dev/vge/if_vge.c stable/8/sys/dev/vr/if_vr.c stable/8/sys/dev/vte/if_vte.c stable/8/sys/mips/atheros/if_arge.c stable/8/sys/mips/idt/if_kr.c stable/8/sys/pci/if_rl.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/age/if_age.c ============================================================================== --- stable/8/sys/dev/age/if_age.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/age/if_age.c Sat Dec 31 01:08:31 2011 (r229058) @@ -282,9 +282,9 @@ age_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->age_miibus); mii_pollstat(mii); - AGE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + AGE_UNLOCK(sc); } /* Modified: stable/8/sys/dev/alc/if_alc.c ============================================================================== --- stable/8/sys/dev/alc/if_alc.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/alc/if_alc.c Sat Dec 31 01:08:31 2011 (r229058) @@ -349,9 +349,9 @@ alc_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->alc_miibus); mii_pollstat(mii); - ALC_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALC_UNLOCK(sc); } static int Modified: stable/8/sys/dev/ale/if_ale.c ============================================================================== --- stable/8/sys/dev/ale/if_ale.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/ale/if_ale.c Sat Dec 31 01:08:31 2011 (r229058) @@ -270,9 +270,9 @@ ale_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->ale_miibus); mii_pollstat(mii); - ALE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALE_UNLOCK(sc); } static int Modified: stable/8/sys/dev/lge/if_lge.c ============================================================================== --- stable/8/sys/dev/lge/if_lge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/lge/if_lge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1430,9 +1430,9 @@ lge_ifmedia_sts(ifp, ifmr) LGE_LOCK(sc); mii = device_get_softc(sc->lge_miibus); mii_pollstat(mii); - LGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + LGE_UNLOCK(sc); return; } Modified: stable/8/sys/dev/msk/if_msk.c ============================================================================== --- stable/8/sys/dev/msk/if_msk.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/msk/if_msk.c Sat Dec 31 01:08:31 2011 (r229058) @@ -995,9 +995,9 @@ msk_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); - MSK_IF_UNLOCK(sc_if); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MSK_IF_UNLOCK(sc_if); } static int Modified: stable/8/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/8/sys/dev/nfe/if_nfe.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/nfe/if_nfe.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2952,10 +2952,10 @@ nfe_ifmedia_sts(struct ifnet *ifp, struc NFE_LOCK(sc); mii = device_get_softc(sc->nfe_miibus); mii_pollstat(mii); - NFE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NFE_UNLOCK(sc); } Modified: stable/8/sys/dev/nge/if_nge.c ============================================================================== --- stable/8/sys/dev/nge/if_nge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/nge/if_nge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2281,9 +2281,9 @@ nge_mediastatus(struct ifnet *ifp, struc NGE_LOCK(sc); mii = device_get_softc(sc->nge_miibus); mii_pollstat(mii); - NGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NGE_UNLOCK(sc); } static int Modified: stable/8/sys/dev/nve/if_nve.c ============================================================================== --- stable/8/sys/dev/nve/if_nve.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/nve/if_nve.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1202,10 +1202,10 @@ nve_ifmedia_sts(struct ifnet *ifp, struc NVE_LOCK(sc); mii = device_get_softc(sc->miibus); mii_pollstat(mii); - NVE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NVE_UNLOCK(sc); return; } Modified: stable/8/sys/dev/re/if_re.c ============================================================================== --- stable/8/sys/dev/re/if_re.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/re/if_re.c Sat Dec 31 01:08:31 2011 (r229058) @@ -3214,9 +3214,9 @@ re_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int Modified: stable/8/sys/dev/sge/if_sge.c ============================================================================== --- stable/8/sys/dev/sge/if_sge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/sge/if_sge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1746,9 +1746,9 @@ sge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - SGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SGE_UNLOCK(sc); } static int Modified: stable/8/sys/dev/sis/if_sis.c ============================================================================== --- stable/8/sys/dev/sis/if_sis.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/sis/if_sis.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2112,9 +2112,9 @@ sis_ifmedia_sts(struct ifnet *ifp, struc SIS_LOCK(sc); mii = device_get_softc(sc->sis_miibus); mii_pollstat(mii); - SIS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SIS_UNLOCK(sc); } static int Modified: stable/8/sys/dev/vge/if_vge.c ============================================================================== --- stable/8/sys/dev/vge/if_vge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/vge/if_vge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2173,9 +2173,9 @@ vge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VGE_UNLOCK(sc); } static void Modified: stable/8/sys/dev/vr/if_vr.c ============================================================================== --- stable/8/sys/dev/vr/if_vr.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/vr/if_vr.c Sat Dec 31 01:08:31 2011 (r229058) @@ -2155,9 +2155,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct return; } mii_pollstat(mii); - VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VR_UNLOCK(sc); } static int Modified: stable/8/sys/dev/vte/if_vte.c ============================================================================== --- stable/8/sys/dev/vte/if_vte.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/dev/vte/if_vte.c Sat Dec 31 01:08:31 2011 (r229058) @@ -284,9 +284,9 @@ vte_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->vte_miibus); mii_pollstat(mii); - VTE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + VTE_UNLOCK(sc); } static int Modified: stable/8/sys/mips/atheros/if_arge.c ============================================================================== --- stable/8/sys/mips/atheros/if_arge.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/mips/atheros/if_arge.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1112,9 +1112,9 @@ arge_ifmedia_sts(struct ifnet *ifp, stru mii = device_get_softc(sc->arge_miibus); ARGE_LOCK(sc); mii_pollstat(mii); - ARGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ARGE_UNLOCK(sc); } struct arge_dmamap_arg { Modified: stable/8/sys/mips/idt/if_kr.c ============================================================================== --- stable/8/sys/mips/idt/if_kr.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/mips/idt/if_kr.c Sat Dec 31 01:08:31 2011 (r229058) @@ -945,9 +945,9 @@ kr_ifmedia_sts(struct ifnet *ifp, struct mii = device_get_softc(sc->kr_miibus); KR_LOCK(sc); mii_pollstat(mii); - KR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + KR_UNLOCK(sc); } struct kr_dmamap_arg { Modified: stable/8/sys/pci/if_rl.c ============================================================================== --- stable/8/sys/pci/if_rl.c Sat Dec 31 01:07:01 2011 (r229057) +++ stable/8/sys/pci/if_rl.c Sat Dec 31 01:08:31 2011 (r229058) @@ -1797,9 +1797,9 @@ rl_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 01:10:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C8501065677; Sat, 31 Dec 2011 01:10:30 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77C378FC1A; Sat, 31 Dec 2011 01:10:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1AU87039713; Sat, 31 Dec 2011 01:10:30 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1AUeA039697; Sat, 31 Dec 2011 01:10:30 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310110.pBV1AUeA039697@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:10:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229059 - in stable/7/sys: dev/age dev/alc dev/ale dev/lge dev/msk dev/nfe dev/nge dev/nve dev/re dev/sge dev/sis dev/vge dev/vr dev/vte pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 01:10:30 -0000 Author: yongari Date: Sat Dec 31 01:10:29 2011 New Revision: 229059 URL: http://svn.freebsd.org/changeset/base/229059 Log: MFC r226478: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/7/sys/dev/age/if_age.c stable/7/sys/dev/alc/if_alc.c stable/7/sys/dev/ale/if_ale.c stable/7/sys/dev/lge/if_lge.c stable/7/sys/dev/msk/if_msk.c stable/7/sys/dev/nfe/if_nfe.c stable/7/sys/dev/nge/if_nge.c stable/7/sys/dev/nve/if_nve.c stable/7/sys/dev/re/if_re.c stable/7/sys/dev/sge/if_sge.c stable/7/sys/dev/sis/if_sis.c stable/7/sys/dev/vge/if_vge.c stable/7/sys/dev/vr/if_vr.c stable/7/sys/dev/vte/if_vte.c stable/7/sys/pci/if_rl.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/age/if_age.c ============================================================================== --- stable/7/sys/dev/age/if_age.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/age/if_age.c Sat Dec 31 01:10:29 2011 (r229059) @@ -282,9 +282,9 @@ age_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->age_miibus); mii_pollstat(mii); - AGE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + AGE_UNLOCK(sc); } /* Modified: stable/7/sys/dev/alc/if_alc.c ============================================================================== --- stable/7/sys/dev/alc/if_alc.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/alc/if_alc.c Sat Dec 31 01:10:29 2011 (r229059) @@ -349,9 +349,9 @@ alc_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->alc_miibus); mii_pollstat(mii); - ALC_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALC_UNLOCK(sc); } static int Modified: stable/7/sys/dev/ale/if_ale.c ============================================================================== --- stable/7/sys/dev/ale/if_ale.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/ale/if_ale.c Sat Dec 31 01:10:29 2011 (r229059) @@ -270,9 +270,9 @@ ale_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->ale_miibus); mii_pollstat(mii); - ALE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + ALE_UNLOCK(sc); } static int Modified: stable/7/sys/dev/lge/if_lge.c ============================================================================== --- stable/7/sys/dev/lge/if_lge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/lge/if_lge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1433,9 +1433,9 @@ lge_ifmedia_sts(ifp, ifmr) LGE_LOCK(sc); mii = device_get_softc(sc->lge_miibus); mii_pollstat(mii); - LGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + LGE_UNLOCK(sc); return; } Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/msk/if_msk.c Sat Dec 31 01:10:29 2011 (r229059) @@ -995,9 +995,9 @@ msk_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc_if->msk_miibus); mii_pollstat(mii); - MSK_IF_UNLOCK(sc_if); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MSK_IF_UNLOCK(sc_if); } static int Modified: stable/7/sys/dev/nfe/if_nfe.c ============================================================================== --- stable/7/sys/dev/nfe/if_nfe.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/nfe/if_nfe.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2943,10 +2943,10 @@ nfe_ifmedia_sts(struct ifnet *ifp, struc NFE_LOCK(sc); mii = device_get_softc(sc->nfe_miibus); mii_pollstat(mii); - NFE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NFE_UNLOCK(sc); } Modified: stable/7/sys/dev/nge/if_nge.c ============================================================================== --- stable/7/sys/dev/nge/if_nge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/nge/if_nge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2276,9 +2276,9 @@ nge_mediastatus(struct ifnet *ifp, struc NGE_LOCK(sc); mii = device_get_softc(sc->nge_miibus); mii_pollstat(mii); - NGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NGE_UNLOCK(sc); } static int Modified: stable/7/sys/dev/nve/if_nve.c ============================================================================== --- stable/7/sys/dev/nve/if_nve.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/nve/if_nve.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1203,10 +1203,10 @@ nve_ifmedia_sts(struct ifnet *ifp, struc NVE_LOCK(sc); mii = device_get_softc(sc->miibus); mii_pollstat(mii); - NVE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + NVE_UNLOCK(sc); return; } Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/re/if_re.c Sat Dec 31 01:10:29 2011 (r229059) @@ -3208,9 +3208,9 @@ re_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int Modified: stable/7/sys/dev/sge/if_sge.c ============================================================================== --- stable/7/sys/dev/sge/if_sge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/sge/if_sge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1746,9 +1746,9 @@ sge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - SGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SGE_UNLOCK(sc); } static int Modified: stable/7/sys/dev/sis/if_sis.c ============================================================================== --- stable/7/sys/dev/sis/if_sis.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/sis/if_sis.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2108,9 +2108,9 @@ sis_ifmedia_sts(struct ifnet *ifp, struc SIS_LOCK(sc); mii = device_get_softc(sc->sis_miibus); mii_pollstat(mii); - SIS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + SIS_UNLOCK(sc); } static int Modified: stable/7/sys/dev/vge/if_vge.c ============================================================================== --- stable/7/sys/dev/vge/if_vge.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/vge/if_vge.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2174,9 +2174,9 @@ vge_ifmedia_sts(struct ifnet *ifp, struc return; } mii_pollstat(mii); - VGE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VGE_UNLOCK(sc); } static void Modified: stable/7/sys/dev/vr/if_vr.c ============================================================================== --- stable/7/sys/dev/vr/if_vr.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/vr/if_vr.c Sat Dec 31 01:10:29 2011 (r229059) @@ -2147,9 +2147,9 @@ vr_ifmedia_sts(struct ifnet *ifp, struct return; } mii_pollstat(mii); - VR_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + VR_UNLOCK(sc); } static int Modified: stable/7/sys/dev/vte/if_vte.c ============================================================================== --- stable/7/sys/dev/vte/if_vte.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/dev/vte/if_vte.c Sat Dec 31 01:10:29 2011 (r229059) @@ -284,9 +284,9 @@ vte_mediastatus(struct ifnet *ifp, struc mii = device_get_softc(sc->vte_miibus); mii_pollstat(mii); - VTE_UNLOCK(sc); ifmr->ifm_status = mii->mii_media_status; ifmr->ifm_active = mii->mii_media_active; + VTE_UNLOCK(sc); } static int Modified: stable/7/sys/pci/if_rl.c ============================================================================== --- stable/7/sys/pci/if_rl.c Sat Dec 31 01:08:31 2011 (r229058) +++ stable/7/sys/pci/if_rl.c Sat Dec 31 01:10:29 2011 (r229059) @@ -1925,9 +1925,9 @@ rl_ifmedia_sts(struct ifnet *ifp, struct RL_LOCK(sc); mii_pollstat(mii); - RL_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RL_UNLOCK(sc); } static int From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 01:22:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 644581065670; Sat, 31 Dec 2011 01:22:17 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47ACC8FC08; Sat, 31 Dec 2011 01:22:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1MH01040136; Sat, 31 Dec 2011 01:22:17 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1MHT6040130; Sat, 31 Dec 2011 01:22:17 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310122.pBV1MHT6040130@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229060 - stable/9/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 01:22:17 -0000 Author: yongari Date: Sat Dec 31 01:22:16 2011 New Revision: 229060 URL: http://svn.freebsd.org/changeset/base/229060 Log: MFC r226479: Close a race where SIOCGIFMEDIA ioctl get inconsistent link status. Because driver is accessing a common MII structure in mii_pollstat(), updating user supplied structure should be done before dropping a driver lock. Reported by: Karim (fodillemlinkarimi <> gmail dot com) Modified: stable/9/sys/dev/usb/net/if_aue.c stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/net/if_mos.c stable/9/sys/dev/usb/net/if_rue.c stable/9/sys/dev/usb/net/if_udav.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/if_aue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_aue.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_aue.c Sat Dec 31 01:22:16 2011 (r229060) @@ -1032,9 +1032,9 @@ aue_ifmedia_sts(struct ifnet *ifp, struc AUE_LOCK(sc); mii_pollstat(mii); - AUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AUE_UNLOCK(sc); } /* Modified: stable/9/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 01:22:16 2011 (r229060) @@ -452,9 +452,9 @@ axe_ifmedia_sts(struct ifnet *ifp, struc AXE_LOCK(sc); mii_pollstat(mii); - AXE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + AXE_UNLOCK(sc); } static void Modified: stable/9/sys/dev/usb/net/if_mos.c ============================================================================== --- stable/9/sys/dev/usb/net/if_mos.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_mos.c Sat Dec 31 01:22:16 2011 (r229060) @@ -551,10 +551,10 @@ mos_ifmedia_sts(struct ifnet *ifp, struc MOS_LOCK(sc); mii_pollstat(mii); - MOS_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + MOS_UNLOCK(sc); } static void Modified: stable/9/sys/dev/usb/net/if_rue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_rue.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_rue.c Sat Dec 31 01:22:16 2011 (r229060) @@ -889,9 +889,9 @@ rue_ifmedia_sts(struct ifnet *ifp, struc RUE_LOCK(sc); mii_pollstat(mii); - RUE_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + RUE_UNLOCK(sc); } static void Modified: stable/9/sys/dev/usb/net/if_udav.c ============================================================================== --- stable/9/sys/dev/usb/net/if_udav.c Sat Dec 31 01:10:29 2011 (r229059) +++ stable/9/sys/dev/usb/net/if_udav.c Sat Dec 31 01:22:16 2011 (r229060) @@ -751,9 +751,9 @@ udav_ifmedia_status(struct ifnet *ifp, s UDAV_LOCK(sc); mii_pollstat(mii); - UDAV_UNLOCK(sc); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + UDAV_UNLOCK(sc); } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 01:30:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6C47106564A; Sat, 31 Dec 2011 01:30:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 950698FC19; Sat, 31 Dec 2011 01:30:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1UhY5040473; Sat, 31 Dec 2011 01:30:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1Uhf7040471; Sat, 31 Dec 2011 01:30:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310130.pBV1Uhf7040471@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:30:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229061 - stable/9/sys/dev/et X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 01:30:43 -0000 Author: yongari Date: Sat Dec 31 01:30:43 2011 New Revision: 229061 URL: http://svn.freebsd.org/changeset/base/229061 Log: MFC r226480-226481: r226480: Add missing driver lock in media status handler. r226481: Make sure to report media change status to caller. Previously it always reported success. Modified: stable/9/sys/dev/et/if_et.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/et/if_et.c ============================================================================== --- stable/9/sys/dev/et/if_et.c Sat Dec 31 01:22:16 2011 (r229060) +++ stable/9/sys/dev/et/if_et.c Sat Dec 31 01:30:43 2011 (r229061) @@ -518,9 +518,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) PHY_RESET(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int @@ -542,9 +540,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 01:32:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA88E106566C; Sat, 31 Dec 2011 01:32:06 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A88048FC16; Sat, 31 Dec 2011 01:32:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1W6Xf040552; Sat, 31 Dec 2011 01:32:06 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1W6m4040550; Sat, 31 Dec 2011 01:32:06 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310132.pBV1W6m4040550@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229062 - in stable/8/sys: conf dev/et X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 01:32:06 -0000 Author: yongari Date: Sat Dec 31 01:32:06 2011 New Revision: 229062 URL: http://svn.freebsd.org/changeset/base/229062 Log: MFC r226480-226481: r226480: Add missing driver lock in media status handler. r226481: Make sure to report media change status to caller. Previously it always reported success. Modified: stable/8/sys/dev/et/if_et.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/ldscript.mips.octeon1.32 (props changed) stable/8/sys/conf/ldscript.mips.octeon1.64 (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/dev/et/if_et.c ============================================================================== --- stable/8/sys/dev/et/if_et.c Sat Dec 31 01:30:43 2011 (r229061) +++ stable/8/sys/dev/et/if_et.c Sat Dec 31 01:32:06 2011 (r229062) @@ -519,9 +519,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int @@ -543,9 +541,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 01:33:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7527B106564A; Sat, 31 Dec 2011 01:33:25 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 636068FC14; Sat, 31 Dec 2011 01:33:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV1XP0W040636; Sat, 31 Dec 2011 01:33:25 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV1XPiU040634; Sat, 31 Dec 2011 01:33:25 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201112310133.pBV1XPiU040634@svn.freebsd.org> From: Pyun YongHyeon Date: Sat, 31 Dec 2011 01:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229063 - stable/7/sys/dev/et X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 01:33:25 -0000 Author: yongari Date: Sat Dec 31 01:33:25 2011 New Revision: 229063 URL: http://svn.freebsd.org/changeset/base/229063 Log: MFC r226480-226481: r226480: Add missing driver lock in media status handler. r226481: Make sure to report media change status to caller. Previously it always reported success. Modified: stable/7/sys/dev/et/if_et.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/et/if_et.c ============================================================================== --- stable/7/sys/dev/et/if_et.c Sat Dec 31 01:32:06 2011 (r229062) +++ stable/7/sys/dev/et/if_et.c Sat Dec 31 01:33:25 2011 (r229063) @@ -519,9 +519,7 @@ et_ifmedia_upd_locked(struct ifnet *ifp) LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); - mii_mediachg(mii); - - return (0); + return (mii_mediachg(mii)); } static int @@ -543,9 +541,11 @@ et_ifmedia_sts(struct ifnet *ifp, struct struct et_softc *sc = ifp->if_softc; struct mii_data *mii = device_get_softc(sc->sc_miibus); + ET_LOCK(sc); mii_pollstat(mii); ifmr->ifm_active = mii->mii_media_active; ifmr->ifm_status = mii->mii_media_status; + ET_UNLOCK(sc); } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 03:03:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 46FD71065672; Sat, 31 Dec 2011 03:03:00 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34EEE8FC14; Sat, 31 Dec 2011 03:03:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV330GN043580; Sat, 31 Dec 2011 03:03:00 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV330IG043578; Sat, 31 Dec 2011 03:03:00 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112310303.pBV330IG043578@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 03:03:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229065 - stable/8/sys/cam/scsi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 03:03:00 -0000 Author: mdf Date: Sat Dec 31 03:02:59 2011 New Revision: 229065 URL: http://svn.freebsd.org/changeset/base/229065 Log: MFC r228442: Do not use the sometimes-reserved word 'bool' for a variable name. Modified: stable/8/sys/cam/scsi/scsi_xpt.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_xpt.c ============================================================================== --- stable/8/sys/cam/scsi/scsi_xpt.c Sat Dec 31 02:08:51 2011 (r229064) +++ stable/8/sys/cam/scsi/scsi_xpt.c Sat Dec 31 03:02:59 2011 (r229065) @@ -1462,14 +1462,14 @@ scsi_find_quirk(struct cam_ed *device) static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS) { - int error, bool; + int error, val; - bool = cam_srch_hi; - error = sysctl_handle_int(oidp, &bool, 0, req); + val = cam_srch_hi; + error = sysctl_handle_int(oidp, &val, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (bool == 0 || bool == 1) { - cam_srch_hi = bool; + if (val == 0 || val == 1) { + cam_srch_hi = val; return (0); } else { return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 04:38:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB2EF1065670; Sat, 31 Dec 2011 04:38:04 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9A4F8FC0A; Sat, 31 Dec 2011 04:38:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV4c4Z4046742; Sat, 31 Dec 2011 04:38:04 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV4c4t7046739; Sat, 31 Dec 2011 04:38:04 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112310438.pBV4c4t7046739@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 31 Dec 2011 04:38:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229067 - in head: . sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 04:38:05 -0000 Author: obrien Date: Sat Dec 31 04:38:04 2011 New Revision: 229067 URL: http://svn.freebsd.org/changeset/base/229067 Log: Happy 2012 to FreeBSD users in Samoa. Modified: head/COPYRIGHT head/sys/sys/copyright.h Modified: head/COPYRIGHT ============================================================================== --- head/COPYRIGHT Sat Dec 31 04:05:13 2011 (r229066) +++ head/COPYRIGHT Sat Dec 31 04:38:04 2011 (r229067) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: head/sys/sys/copyright.h ============================================================================== --- head/sys/sys/copyright.h Sat Dec 31 04:05:13 2011 (r229066) +++ head/sys/sys/copyright.h Sat Dec 31 04:38:04 2011 (r229067) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 04:42:17 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1CE2106564A; Sat, 31 Dec 2011 04:42:17 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CF90C8FC17; Sat, 31 Dec 2011 04:42:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV4gHwD046917; Sat, 31 Dec 2011 04:42:17 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV4gHeQ046914; Sat, 31 Dec 2011 04:42:17 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112310442.pBV4gHeQ046914@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 31 Dec 2011 04:42:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229068 - in stable/9: . sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 04:42:18 -0000 Author: obrien Date: Sat Dec 31 04:42:17 2011 New Revision: 229068 URL: http://svn.freebsd.org/changeset/base/229068 Log: MFC 229067: Happy 2012 to FreeBSD users in Samoa. Modified: stable/9/COPYRIGHT stable/9/sys/sys/copyright.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/COPYRIGHT ============================================================================== --- stable/9/COPYRIGHT Sat Dec 31 04:38:04 2011 (r229067) +++ stable/9/COPYRIGHT Sat Dec 31 04:42:17 2011 (r229068) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/9/sys/sys/copyright.h ============================================================================== --- stable/9/sys/sys/copyright.h Sat Dec 31 04:38:04 2011 (r229067) +++ stable/9/sys/sys/copyright.h Sat Dec 31 04:42:17 2011 (r229068) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 04:47:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E542106566C; Sat, 31 Dec 2011 04:47:01 +0000 (UTC) (envelope-from obrien@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C34F8FC0C; Sat, 31 Dec 2011 04:47:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV4l1UN047152; Sat, 31 Dec 2011 04:47:01 GMT (envelope-from obrien@svn.freebsd.org) Received: (from obrien@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV4l0PO047149; Sat, 31 Dec 2011 04:47:00 GMT (envelope-from obrien@svn.freebsd.org) Message-Id: <201112310447.pBV4l0PO047149@svn.freebsd.org> From: "David E. O'Brien" Date: Sat, 31 Dec 2011 04:47:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229069 - in stable/8: . sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 04:47:01 -0000 Author: obrien Date: Sat Dec 31 04:47:00 2011 New Revision: 229069 URL: http://svn.freebsd.org/changeset/base/229069 Log: MF9 r229068: Happy 2012 to FreeBSD users in Samoa. Modified: stable/8/COPYRIGHT (contents, props changed) stable/8/sys/sys/copyright.h Directory Properties: stable/8/ (props changed) stable/8/sys/ (props changed) Modified: stable/8/COPYRIGHT ============================================================================== --- stable/8/COPYRIGHT Sat Dec 31 04:42:17 2011 (r229068) +++ stable/8/COPYRIGHT Sat Dec 31 04:47:00 2011 (r229069) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/8/sys/sys/copyright.h ============================================================================== --- stable/8/sys/sys/copyright.h Sat Dec 31 04:42:17 2011 (r229068) +++ stable/8/sys/sys/copyright.h Sat Dec 31 04:47:00 2011 (r229069) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 05:24:21 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80438106564A; Sat, 31 Dec 2011 05:24:21 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6ED488FC08; Sat, 31 Dec 2011 05:24:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV5OLJI048280; Sat, 31 Dec 2011 05:24:21 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV5OLnT048278; Sat, 31 Dec 2011 05:24:21 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112310524.pBV5OLnT048278@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 31 Dec 2011 05:24:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229070 - head/sys/contrib/octeon-sdk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 05:24:21 -0000 Author: gonzo Date: Sat Dec 31 05:24:21 2011 New Revision: 229070 URL: http://svn.freebsd.org/changeset/base/229070 Log: - CAPK-0100 board's USB timer is 12MHz Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sat Dec 31 04:47:00 2011 (r229069) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Sat Dec 31 05:24:21 2011 (r229070) @@ -866,6 +866,9 @@ cvmx_helper_board_usb_clock_types_t __cv case CVMX_BOARD_TYPE_CUST_LANNER_MR320: case CVMX_BOARD_TYPE_CUST_LANNER_MR321X: #endif +#if defined(OCTEON_BOARD_CAPK_0100ND) + case CVMX_BOARD_TYPE_CN3010_EVB_HS5: +#endif return USB_CLOCK_TYPE_CRYSTAL_12; } return USB_CLOCK_TYPE_REF_48; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 05:25:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30BF1065672; Sat, 31 Dec 2011 05:25:42 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B1BE28FC1A; Sat, 31 Dec 2011 05:25:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV5PgOs048352; Sat, 31 Dec 2011 05:25:42 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV5Pgra048350; Sat, 31 Dec 2011 05:25:42 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112310525.pBV5Pgra048350@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 31 Dec 2011 05:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229071 - head/sys/contrib/octeon-sdk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 05:25:42 -0000 Author: gonzo Date: Sat Dec 31 05:25:42 2011 New Revision: 229071 URL: http://svn.freebsd.org/changeset/base/229071 Log: - Properly clean state structure in cvmx_usb_initialize Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-usb.c Sat Dec 31 05:24:21 2011 (r229070) +++ head/sys/contrib/octeon-sdk/cvmx-usb.c Sat Dec 31 05:25:42 2011 (r229071) @@ -654,7 +654,7 @@ cvmx_usb_status_t cvmx_usb_initialize(cv } } - memset(usb, 0, sizeof(usb)); + memset(usb, 0, sizeof(*usb)); usb->init_flags = flags; /* Initialize the USB state structure */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 05:45:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB16E106566C; Sat, 31 Dec 2011 05:45:10 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A99C88FC0C; Sat, 31 Dec 2011 05:45:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV5jAS0048946; Sat, 31 Dec 2011 05:45:10 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV5jAYk048944; Sat, 31 Dec 2011 05:45:10 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112310545.pBV5jAYk048944@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 31 Dec 2011 05:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229072 - head/sys/mips/cavium/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 05:45:10 -0000 Author: gonzo Date: Sat Dec 31 05:45:10 2011 New Revision: 229072 URL: http://svn.freebsd.org/changeset/base/229072 Log: - Pass proper endpoint number (without direction flag) to cvmx_usb_open_pipe Modified: head/sys/mips/cavium/usb/octusb.c Modified: head/sys/mips/cavium/usb/octusb.c ============================================================================== --- head/sys/mips/cavium/usb/octusb.c Sat Dec 31 05:25:42 2011 (r229071) +++ head/sys/mips/cavium/usb/octusb.c Sat Dec 31 05:45:10 2011 (r229072) @@ -162,7 +162,7 @@ octusb_host_alloc_endpoint(struct octusb &sc->sc_port[td->qh->port_index].state, 0, td->qh->dev_addr, - td->qh->ep_num, + td->qh->ep_num & UE_ADDR, octusb_convert_speed(td->qh->dev_speed), td->qh->max_packet_size, octusb_convert_ep_type(td->qh->ep_type), From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 07:02:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60A14106566C; Sat, 31 Dec 2011 07:02:42 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id AA3DF8FC08; Sat, 31 Dec 2011 07:02:41 +0000 (UTC) Received: from lstewart1.loshell.room52.net (ppp59-167-184-191.static.internode.on.net [59.167.184.191]) by lauren.room52.net (Postfix) with ESMTPSA id D97B87E88D; Sat, 31 Dec 2011 18:02:39 +1100 (EST) Message-ID: <4EFEB38F.8010709@freebsd.org> Date: Sat, 31 Dec 2011 18:02:39 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111016 Thunderbird/7.0.1 MIME-Version: 1.0 To: Adrian Chadd References: <201112300857.pBU8vxfP004914@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 Subject: Re: svn commit: r228986 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 07:02:42 -0000 On 12/31/11 11:13, Adrian Chadd wrote: > This just broke wlan. Please consider fixing this patch :) > > > Adrian > > *** Interface: wlan0: start > can't re-use a leaf (wlan0)! > panic: bpfattach tscfgoid > KDB: enter: panic > [ thread pid 166 tid 100048 ]Stopped at kdb_enter+0x4c: lui at,0x8048 > db> > db> bt > Tracing pid 166 tid 100048 td 0x80c37900 > db_trace_thread+30 (?,?,?,?) ra 80074cc0 sp c40075f0 sz 24 > 80074bac+114 (0,?,ffffffff,?) ra 8007427c sp c4007608 sz 32 > 80073ef4+388 (?,?,?,?) ra 80074400 sp c4007628 sz 168 > db_command_loop+70 (?,?,?,?) ra 80076ac4 sp c40076d0 sz 24 > 800769d0+f4 (?,?,?,?) ra 801b7560 sp c40076e8 sz 424 > kdb_trap+110 (?,?,?,?) ra 8035c7ec sp c4007890 sz 48 > trap+bf4 (?,?,?,?) ra 80354560 sp c40078c0 sz 184 > MipsKernGenException+134 (0,4,803c089c,113) ra 801b72d8 sp c4007978 sz 200 > kdb_enter+4c (?,?,?,?) ra 8017f88c sp c4007a40 sz 24 > panic+11c (?,0,80706500,0) ra 802304b8 sp c4007a58 sz 40 > bpfattach2+cc (?,?,?,?) ra 802305e0 sp c4007a80 sz 64 > bpfattach+10 (?,?,?,?) ra 802448ec sp c4007ac0 sz 24 > ether_ifattach+d0 (?,?,?,?) ra 8025f0ac sp c4007ad8 sz 32 > ieee80211_vap_attach+104 (?,?,?,?) ra 8007ffe8 sp c4007af8 sz 96 > 8007f960+688 (?,?,0,?) ra 8026a39c sp c4007b58 sz 88 > 8026a22c+170 (?,?,?,?) ra 802430dc sp c4007bb0 sz 88 > ifc_simple_create+80 (?,?,?,?) ra 80242b04 sp c4007c08 sz 64 > 80242ab0+54 (?,?,?,?) ra 80242d78 sp c4007c48 sz 40 > if_clone_create+a8 (?,?,?,?) ra 8023bdd4 sp c4007c70 sz 40 > ifioctl+3a4 (?,?,80c7f460,80c37900) ra 801d8070 sp c4007c98 sz 144 > soo_ioctl+3b0 (?,?,?,?) ra 801d2804 sp c4007d28 sz 40 > kern_ioctl+248 (?,?,?,?) ra 801d29ac sp c4007d50 sz 64 > sys_ioctl+130 (?,?,?,?) ra 8035c3ec sp c4007d90 sz 56 > trap+7f4 (?,?,?,?) ra 8035475c sp c4007dc8 sz 184 > MipsUserGenException+10c (?,?,?,4061d590) ra 0 sp c4007e80 sz 0 > pid 166 > db> reset I've managed to reproduce this on my wifi enabled laptop with r228986 MFCed to a 9-stable kernel. I can't reproduce the panic with regular interfaces, pseudo interfaces (e.g. lo0 and pflog0) or vlans (which also have a relationship with an underlying physical interface) i.e. this is VAP/net80211 specific as far as I can tell. The problem is that bpfattach2() is being called twice with the same interface name i.e. "wlan0". I added a debug printf and call to kdb_backtrace() after the SYSCTL_ADD_PROC() call in bpfattach2() to see the code paths which are calling into the function. Here's what I see when the kernel runs on my laptop (I've added inline comments between "## ##"): Added tscfg OID for interface wlan0 KDB: stack backtrace: #0 0xffffffff808680ce at kdb_backtrace+0x5e #1 0xffffffff808da5b4 at bpfattach2+0xb4 #2 0xffffffff808fbe06 at ieee80211_vap_setup+0x266 #3 0xffffffff80740205 at wpi_vap_create+0x95 #4 0xffffffff809047fb at wlan_clone_create+0x16b #5 0xffffffff808e6079 at ifc_simple_create+0x89 #6 0xffffffff808e5cc5 at if_clone_createif+0x65 #7 0xffffffff808e4546 at ifioctl+0x306 #8 0xffffffff80879755 at kern_ioctl+0x115 #9 0xffffffff8087998d at sys_ioctl+0xfd #10 0xffffffff80b17d60 at amd64_syscall+0x450 #11 0xffffffff80b03497 at Xfast_syscall+0xf7 ## Here it has successfully added the net.bpf.tscfg.wlan0 sysctl entry for wlan0 ## can't re-use a leaf (wlan0)! ## Here SYSCTL_ADD_PROC() failed because leaf name is already used ## panic: bpfattach tscfgoid cpuid = 1 KDB: stack backtrace: #0 0xffffffff808680ce at kdb_backtrace+0x5e #1 0xffffffff80832c87 at panic+0x187 #2 0xffffffff808da6f6 at bpfattach2+0x1f6 #3 0xffffffff808e72ee at ether_ifattach+0xae #4 0xffffffff808fd0a5 at ieee80211_vap_attach+0xb5 #5 0xffffffff8074023c at wpi_vap_create+0xcc #6 0xffffffff809047fb at wlan_clone_create+0x16b #7 0xffffffff808e6079 at ifc_simple_create+0x89 #8 0xffffffff808e5cc5 at if_clone_createif+0x65 #9 0xffffffff808e4546 at ifioctl+0x306 #10 0xffffffff80879755 at kern_ioctl+0x115 #11 0xffffffff8087998d at sys_ioctl+0xfd #12 0xffffffff80b17d60 at amd64_syscall+0x450 #13 0xffffffff80b03497 at Xfast_syscall+0xf7 So after a bit of digging, ieee80211_vap_setup() calls ieee80211_radiotap_vattach(), which explicitly calls bpfattach2(), and then a subsequent call to ieee80211_vap_attach() indirectly calls into bpfattach2() via the call to ether_ifattach(). This smells like a net80211 bug to me. I'm guessing, but I would suspect ieee80211_vap_setup() shouldn't call ieee80211_radiotap_vattach() and should let ieee80211_vap_attach() handle the BPF attachment via the call to ether_ifattach(). Thoughts? Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 07:05:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E8DF1065670; Sat, 31 Dec 2011 07:05:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 891CF8FC19; Sat, 31 Dec 2011 07:05:13 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so19749346vcb.13 for ; Fri, 30 Dec 2011 23:05:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=xqclYKUFIE2sl+CmSaIDeXnvGoG0Y1oVn+Cg8SI3N4k=; b=N8TL0u5lAKeKVCqM+kHLTzGWapeYNiO2WUEKwJ0Qok1tpUN3EHd9KexPeaX4g8ySsL ZZOjwAM5BAIheM5oqIrBxe5vCuSBRoBpsIf+/9MKqBY8x8frfNsbABz0YN8s0068tQYl dRvWtoTfoqFIZbTFUmqXqIvTHxBil6D704X14= MIME-Version: 1.0 Received: by 10.220.148.201 with SMTP id q9mr4438303vcv.33.1325315112753; Fri, 30 Dec 2011 23:05:12 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Fri, 30 Dec 2011 23:05:12 -0800 (PST) In-Reply-To: <4EFEB38F.8010709@freebsd.org> References: <201112300857.pBU8vxfP004914@svn.freebsd.org> <4EFEB38F.8010709@freebsd.org> Date: Fri, 30 Dec 2011 23:05:12 -0800 X-Google-Sender-Auth: HDOQNVnUrjgxdtsb0Ct-hEfjS94 Message-ID: From: Adrian Chadd To: Lawrence Stewart Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228986 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 07:05:14 -0000 Please file a PR for me? :) Adrian On 30 December 2011 23:02, Lawrence Stewart wrote: > On 12/31/11 11:13, Adrian Chadd wrote: >> >> This just broke wlan. Please consider fixing this patch :) >> >> >> Adrian >> >> *** Interface: wlan0: start >> can't re-use a leaf (wlan0)! >> panic: bpfattach tscfgoid >> KDB: enter: panic >> [ thread pid 166 tid 100048 ]Stopped at =A0 =A0 =A0kdb_enter+0x4c: lui >> at,0x8048 >> db> >> db> =A0bt >> Tracing pid 166 tid 100048 td 0x80c37900 >> db_trace_thread+30 (?,?,?,?) ra 80074cc0 sp c40075f0 sz 24 >> 80074bac+114 (0,?,ffffffff,?) ra 8007427c sp c4007608 sz 32 >> 80073ef4+388 (?,?,?,?) ra 80074400 sp c4007628 sz 168 >> db_command_loop+70 (?,?,?,?) ra 80076ac4 sp c40076d0 sz 24 >> 800769d0+f4 (?,?,?,?) ra 801b7560 sp c40076e8 sz 424 >> kdb_trap+110 (?,?,?,?) ra 8035c7ec sp c4007890 sz 48 >> trap+bf4 (?,?,?,?) ra 80354560 sp c40078c0 sz 184 >> MipsKernGenException+134 (0,4,803c089c,113) ra 801b72d8 sp c4007978 sz 2= 00 >> kdb_enter+4c (?,?,?,?) ra 8017f88c sp c4007a40 sz 24 >> panic+11c (?,0,80706500,0) ra 802304b8 sp c4007a58 sz 40 >> bpfattach2+cc (?,?,?,?) ra 802305e0 sp c4007a80 sz 64 >> bpfattach+10 (?,?,?,?) ra 802448ec sp c4007ac0 sz 24 >> ether_ifattach+d0 (?,?,?,?) ra 8025f0ac sp c4007ad8 sz 32 >> ieee80211_vap_attach+104 (?,?,?,?) ra 8007ffe8 sp c4007af8 sz 96 >> 8007f960+688 (?,?,0,?) ra 8026a39c sp c4007b58 sz 88 >> 8026a22c+170 (?,?,?,?) ra 802430dc sp c4007bb0 sz 88 >> ifc_simple_create+80 (?,?,?,?) ra 80242b04 sp c4007c08 sz 64 >> 80242ab0+54 (?,?,?,?) ra 80242d78 sp c4007c48 sz 40 >> if_clone_create+a8 (?,?,?,?) ra 8023bdd4 sp c4007c70 sz 40 >> ifioctl+3a4 (?,?,80c7f460,80c37900) ra 801d8070 sp c4007c98 sz 144 >> soo_ioctl+3b0 (?,?,?,?) ra 801d2804 sp c4007d28 sz 40 >> kern_ioctl+248 (?,?,?,?) ra 801d29ac sp c4007d50 sz 64 >> sys_ioctl+130 (?,?,?,?) ra 8035c3ec sp c4007d90 sz 56 >> trap+7f4 (?,?,?,?) ra 8035475c sp c4007dc8 sz 184 >> MipsUserGenException+10c (?,?,?,4061d590) ra 0 sp c4007e80 sz 0 >> pid 166 >> db> =A0reset > > > I've managed to reproduce this on my wifi enabled laptop with r228986 MFC= ed > to a 9-stable kernel. I can't reproduce the panic with regular interfaces= , > pseudo interfaces (e.g. lo0 and pflog0) or vlans (which also have a > relationship with an underlying physical interface) i.e. this is > VAP/net80211 specific as far as I can tell. > > The problem is that bpfattach2() is being called twice with the same > interface name i.e. "wlan0". > > I added a debug printf and call to kdb_backtrace() after the > SYSCTL_ADD_PROC() call in bpfattach2() to see the code paths which are > calling into the function. Here's what I see when the kernel runs on my > laptop (I've added inline comments between "## ##"): > > Added tscfg OID for interface wlan0 > KDB: stack backtrace: > #0 0xffffffff808680ce at kdb_backtrace+0x5e > #1 0xffffffff808da5b4 at bpfattach2+0xb4 > #2 0xffffffff808fbe06 at ieee80211_vap_setup+0x266 > #3 0xffffffff80740205 at wpi_vap_create+0x95 > #4 0xffffffff809047fb at wlan_clone_create+0x16b > #5 0xffffffff808e6079 at ifc_simple_create+0x89 > #6 0xffffffff808e5cc5 at if_clone_createif+0x65 > #7 0xffffffff808e4546 at ifioctl+0x306 > #8 0xffffffff80879755 at kern_ioctl+0x115 > #9 0xffffffff8087998d at sys_ioctl+0xfd > #10 0xffffffff80b17d60 at amd64_syscall+0x450 > #11 0xffffffff80b03497 at Xfast_syscall+0xf7 > > ## Here it has successfully added the net.bpf.tscfg.wlan0 sysctl entry fo= r > wlan0 ## > > > can't re-use a leaf (wlan0)! > > ## Here SYSCTL_ADD_PROC() failed because leaf name is already used ## > > panic: bpfattach tscfgoid > cpuid =3D 1 > KDB: stack backtrace: > #0 0xffffffff808680ce at kdb_backtrace+0x5e > #1 0xffffffff80832c87 at panic+0x187 > #2 0xffffffff808da6f6 at bpfattach2+0x1f6 > #3 0xffffffff808e72ee at ether_ifattach+0xae > #4 0xffffffff808fd0a5 at ieee80211_vap_attach+0xb5 > #5 0xffffffff8074023c at wpi_vap_create+0xcc > #6 0xffffffff809047fb at wlan_clone_create+0x16b > #7 0xffffffff808e6079 at ifc_simple_create+0x89 > #8 0xffffffff808e5cc5 at if_clone_createif+0x65 > #9 0xffffffff808e4546 at ifioctl+0x306 > #10 0xffffffff80879755 at kern_ioctl+0x115 > #11 0xffffffff8087998d at sys_ioctl+0xfd > #12 0xffffffff80b17d60 at amd64_syscall+0x450 > #13 0xffffffff80b03497 at Xfast_syscall+0xf7 > > > > So after a bit of digging, ieee80211_vap_setup() calls > ieee80211_radiotap_vattach(), which explicitly calls bpfattach2(), and th= en > a subsequent call to ieee80211_vap_attach() indirectly calls into > bpfattach2() via the call to ether_ifattach(). > > This smells like a net80211 bug to me. I'm guessing, but I would suspect > ieee80211_vap_setup() shouldn't call ieee80211_radiotap_vattach() and sho= uld > let ieee80211_vap_attach() handle the BPF attachment via the call to > ether_ifattach(). > > Thoughts? > > Cheers, > Lawrence From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 07:21:28 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4FD8106566C; Sat, 31 Dec 2011 07:21:28 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D20168FC0A; Sat, 31 Dec 2011 07:21:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBV7LSru051849; Sat, 31 Dec 2011 07:21:28 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBV7LSto051845; Sat, 31 Dec 2011 07:21:28 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201112310721.pBV7LSto051845@svn.freebsd.org> From: Lawrence Stewart Date: Sat, 31 Dec 2011 07:21:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229073 - in head: share/man/man4 sys/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 07:21:29 -0000 Author: lstewart Date: Sat Dec 31 07:21:28 2011 New Revision: 229073 URL: http://svn.freebsd.org/changeset/base/229073 Log: Revert r228986 until it can be reworked to avoid panicing the kernel when the same interface is attached multiple times with different DLTs, as is done in net80211 for example. Reported by: adrian Modified: head/share/man/man4/bpf.4 head/sys/net/bpf.c head/sys/net/bpf.h Modified: head/share/man/man4/bpf.4 ============================================================================== --- head/share/man/man4/bpf.4 Sat Dec 31 05:45:10 2011 (r229072) +++ head/share/man/man4/bpf.4 Sat Dec 31 07:21:28 2011 (r229073) @@ -49,7 +49,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 30, 2011 +.Dd June 15, 2010 .Dt BPF 4 .Os .Sh NAME @@ -516,48 +516,61 @@ by default. .It Dv BIOCSTSTAMP .It Dv BIOCGTSTAMP .Pq Li u_int -Set or get the format and resolution of time stamps returned by BPF. -The per-BPF descriptor configuration provided by the -.Dv BIOCSTSTAMP -IOCTL complements the per-interface time stamp configuration detailed in the -.Sx CONFIGURATION -section. -.Pp +Set or get format and resolution of the time stamps returned by BPF. Set to -.Dv BPF_T_MICROTIME +.Dv BPF_T_MICROTIME , +.Dv BPF_T_MICROTIME_FAST , +.Dv BPF_T_MICROTIME_MONOTONIC , or -.Dv BPF_T_MICROTIME_MONOTONIC +.Dv BPF_T_MICROTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct timeval format. Set to -.Dv BPF_T_NANOTIME +.Dv BPF_T_NANOTIME , +.Dv BPF_T_NANOTIME_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC , or -.Dv BPF_T_NANOTIME_MONOTONIC +.Dv BPF_T_NANOTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct timespec format. Set to -.Dv BPF_T_BINTIME +.Dv BPF_T_BINTIME , +.Dv BPF_T_BINTIME_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC , or -.Dv BPF_T_BINTIME_MONOTONIC +.Dv BPF_T_BINTIME_MONOTONIC_FAST to get time stamps in 64-bit .Vt struct bintime format. Set to .Dv BPF_T_NONE -to not set a time stamp. -By default, time stamps are initilized to -.Dv BPF_T_MICROTIME . -.Pp +to ignore time stamp. All 64-bit time stamp formats are wrapped in .Vt struct bpf_ts . The +.Dv BPF_T_MICROTIME_FAST , +.Dv BPF_T_NANOTIME_FAST , +.Dv BPF_T_BINTIME_FAST , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC_FAST , +and +.Dv BPF_T_BINTIME_MONOTONIC_FAST +are analogs of corresponding formats without _FAST suffix but do not perform +a full time counter query, so their accuracy is one timer tick. +The .Dv BPF_T_MICROTIME_MONOTONIC , .Dv BPF_T_NANOTIME_MONOTONIC , +.Dv BPF_T_BINTIME_MONOTONIC , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , +.Dv BPF_T_NANOTIME_MONOTONIC_FAST , and -.Dv BPF_T_BINTIME_MONOTONIC +.Dv BPF_T_BINTIME_MONOTONIC_FAST store the time elapsed since kernel boot. +This setting is initialized to +.Dv BPF_T_MICROTIME +by default. .It Dv BIOCFEEDBACK .Pq Li u_int Set packet feedback mode. @@ -679,14 +692,14 @@ Currently, .Vt bpf_hdr is used when the time stamp is set to .Dv BPF_T_MICROTIME , +.Dv BPF_T_MICROTIME_FAST , .Dv BPF_T_MICROTIME_MONOTONIC , +.Dv BPF_T_MICROTIME_MONOTONIC_FAST , or .Dv BPF_T_NONE -for backward compatibility reasons. -Otherwise, +for backward compatibility reasons. Otherwise, .Vt bpf_xhdr -is used. -However, +is used. However, .Vt bpf_hdr may be deprecated in the near future. Suitable precautions @@ -939,48 +952,6 @@ array initializers: .Fn BPF_STMT opcode operand and .Fn BPF_JUMP opcode operand true_offset false_offset . -.Sh CONFIGURATION -Per-interface BPF time stamp configuration is possible via the -.Va net.bpf.tscfg -.Xr sysctl 8 -tree which provides the following variables: -.Bl -tag -width " " -offset indent -.It Va net.bpf.tscfg.default -The default time stamp configuration setting used by all BPF attached interfaces -which have not been explicitly changed. -Valid values are "none", "fast", "normal" and "external". -The default is "normal". -.It Va net.bpf.tscfg. -The time stamp configuration setting used by a specific BPF attached interface. -There will be a separate entry in the -.Va net.bpf.tscfg -sysctl tree for each BPF attached interface. -Valid values are "default", "none", "fast", "normal" and "external". -The default is "default", which means the system wide default setting specified -by the -.Va net.bpf.tscfg.default -sysctl is used. -.El -.Pp -The meaning of each per-interface time stamp configuration option is as follows: -.Bl -tag -width " " -offset indent -.It none -Do not generate a time stamp for all packets tapped from this interface. -.It fast -Generate a time stamp for all packets tapped from this interface by doing a fast -read of the system clock. -Fast reads have a granularity equivalent to the underlying kernel tick rate. -.It normal -Generate a time stamp for all packets tapped from this interface by doing a full -read of the system clock. -Full reads are slower than fast reads, but provide full hardware time counter -granularity for the time stamp. -.It external -Something external to BPF is capable of generating time stamps for all packets -tapped from this interface and BPF should use these external time stamps. -Currently unimplemented, but will become useful when drivers for NICs which -support hardware packet time stamping add support for this feature. -.El .Sh FILES .Bl -tag -compact -width /dev/bpf .It Pa /dev/bpf Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Sat Dec 31 05:45:10 2011 (r229072) +++ head/sys/net/bpf.c Sat Dec 31 07:21:28 2011 (r229073) @@ -1,17 +1,12 @@ /*- * Copyright (c) 1990, 1991, 1993 - * The Regents of the University of California. - * Copyright (c) 2011 The University of Melbourne. - * All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * - * Portions of this software were developed by Julien Ridoux at the University - * of Melbourne under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -60,7 +55,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -118,7 +112,7 @@ struct bpf_hdr32 { uint16_t bh_hdrlen; /* length of bpf header (this struct plus alignment padding) */ }; -#endif /* !BURN_BRIDGES */ +#endif struct bpf_program32 { u_int bf_len; @@ -136,28 +130,7 @@ struct bpf_dltlist32 { #define BIOCGDLTLIST32 _IOWR('B', 121, struct bpf_dltlist32) #define BIOCSETWF32 _IOW('B', 123, struct bpf_program32) #define BIOCSETFNR32 _IOW('B', 130, struct bpf_program32) -#endif /* COMPAT_FREEBSD32 */ - -static const char *bpfiftstypes[] = { - "default", -#define BPF_TSTAMP_DEFAULT 0 - "none", -#define BPF_TSTAMP_NONE 1 - "fast", -#define BPF_TSTAMP_FAST 2 - "normal", -#define BPF_TSTAMP_NORMAL 3 - "external" -#define BPF_TSTAMP_EXTERNAL 4 -}; -#define NUM_BPFIFTSTYPES (sizeof(bpfiftstypes) / sizeof(*bpfiftstypes)) - -#define SET_CLOCKCFG_FLAGS(tstype, active, clock, flags) do { \ - (flags) = 0; \ - (clock) = SYSCLOCK_FBCK; \ - if ((tstype) & BPF_T_MONOTONIC) \ - (flags) |= FBCLOCK_UPTIME; \ -} while (0) +#endif /* * bpf_iflist is a list of BPF interface structures, each corresponding to a @@ -189,7 +162,6 @@ static void filt_bpfdetach(struct knote static int filt_bpfread(struct knote *, long); static void bpf_drvinit(void *); static int bpf_stats_sysctl(SYSCTL_HANDLER_ARGS); -static int bpf_tscfg_sysctl_handler(SYSCTL_HANDLER_ARGS); SYSCTL_NODE(_net, OID_AUTO, bpf, CTLFLAG_RW, 0, "bpf sysctl"); int bpf_maxinsns = BPF_MAXINSNS; @@ -200,12 +172,6 @@ SYSCTL_INT(_net_bpf, OID_AUTO, zerocopy_ &bpf_zerocopy_enable, 0, "Enable new zero-copy BPF buffer sessions"); static SYSCTL_NODE(_net_bpf, OID_AUTO, stats, CTLFLAG_MPSAFE | CTLFLAG_RW, bpf_stats_sysctl, "bpf statistics portal"); -static SYSCTL_NODE(_net_bpf, OID_AUTO, tscfg, CTLFLAG_RW, NULL, - "Per-interface timestamp configuration"); -static int bpf_default_tstype = BPF_TSTAMP_NORMAL; -SYSCTL_PROC(_net_bpf_tscfg, OID_AUTO, default, - CTLTYPE_STRING | CTLFLAG_RW, NULL, 0, bpf_tscfg_sysctl_handler, "A", - "Per-interface system wide default timestamp configuration"); static d_open_t bpfopen; static d_read_t bpfread; @@ -1793,6 +1759,48 @@ filt_bpfread(struct knote *kn, long hint return (ready); } +#define BPF_TSTAMP_NONE 0 +#define BPF_TSTAMP_FAST 1 +#define BPF_TSTAMP_NORMAL 2 +#define BPF_TSTAMP_EXTERN 3 + +static int +bpf_ts_quality(int tstype) +{ + + if (tstype == BPF_T_NONE) + return (BPF_TSTAMP_NONE); + if ((tstype & BPF_T_FAST) != 0) + return (BPF_TSTAMP_FAST); + + return (BPF_TSTAMP_NORMAL); +} + +static int +bpf_gettime(struct bintime *bt, int tstype, struct mbuf *m) +{ + struct m_tag *tag; + int quality; + + quality = bpf_ts_quality(tstype); + if (quality == BPF_TSTAMP_NONE) + return (quality); + + if (m != NULL) { + tag = m_tag_locate(m, MTAG_BPF, MTAG_BPF_TIMESTAMP, NULL); + if (tag != NULL) { + *bt = *(struct bintime *)(tag + 1); + return (BPF_TSTAMP_EXTERN); + } + } + if (quality == BPF_TSTAMP_NORMAL) + binuptime(bt); + else + getbinuptime(bt); + + return (quality); +} + /* * Incoming linkage from device drivers. Process the packet pkt, of length * pktlen, which is stored in a contiguous buffer. The packet is parsed @@ -1803,23 +1811,14 @@ void bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { struct bintime bt; - struct sysclock_snap cs; struct bpf_d *d; - int tstype, whichclock; - u_int clockflags, slen; #ifdef BPF_JITTER bpf_jit_filter *bf; #endif + u_int slen; + int gottime; - tstype = bp->tstype; - if (tstype == BPF_TSTAMP_DEFAULT) - tstype = bpf_default_tstype; - - if (tstype == BPF_TSTAMP_NORMAL || tstype == BPF_TSTAMP_FAST) - sysclock_getsnapshot(&cs, tstype == BPF_TSTAMP_FAST ? 1 : 0); - else - bzero(&bt, sizeof(bt)); - + gottime = BPF_TSTAMP_NONE; BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { BPFD_LOCK(d); @@ -1839,16 +1838,8 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); if (slen != 0) { d->bd_fcount++; - if (tstype == BPF_TSTAMP_NORMAL || - tstype == BPF_TSTAMP_FAST) { - whichclock = -1; - SET_CLOCKCFG_FLAGS(d->bd_tstamp, - cs.sysclock_active, whichclock, clockflags); - KASSERT(whichclock >= 0, ("Bogus BPF tstamp " - "configuration: 0x%04x", d->bd_tstamp)); - sysclock_snap2bintime(&cs, &bt, whichclock, - clockflags); - } + if (gottime < bpf_ts_quality(d->bd_tstamp)) + gottime = bpf_gettime(&bt, d->bd_tstamp, NULL); #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif @@ -1871,13 +1862,12 @@ void bpf_mtap(struct bpf_if *bp, struct mbuf *m) { struct bintime bt; - struct sysclock_snap cs; struct bpf_d *d; - u_int clockflags, pktlen, slen; - int tstype, whichclock; #ifdef BPF_JITTER bpf_jit_filter *bf; #endif + u_int pktlen, slen; + int gottime; /* Skip outgoing duplicate packets. */ if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { @@ -1885,22 +1875,9 @@ bpf_mtap(struct bpf_if *bp, struct mbuf return; } - tstype = bp->tstype; - if (tstype == BPF_TSTAMP_DEFAULT) - tstype = bpf_default_tstype; - - if (tstype == BPF_TSTAMP_NORMAL || tstype == BPF_TSTAMP_FAST) - sysclock_getsnapshot(&cs, tstype == BPF_TSTAMP_FAST ? - 1 : 0); -#ifdef notyet - else if (tstype == BPF_TSTAMP_EXTERNAL) - /* XXX: Convert external tstamp to bintime. */ -#endif - else - bzero(&bt, sizeof(bt)); - pktlen = m_length(m, NULL); + gottime = BPF_TSTAMP_NONE; BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) @@ -1917,16 +1894,8 @@ bpf_mtap(struct bpf_if *bp, struct mbuf slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); if (slen != 0) { d->bd_fcount++; - if (tstype == BPF_TSTAMP_NORMAL || - tstype == BPF_TSTAMP_FAST) { - whichclock = -1; - SET_CLOCKCFG_FLAGS(d->bd_tstamp, - cs.sysclock_active, whichclock, clockflags); - KASSERT(whichclock >= 0, ("Bogus BPF tstamp " - "configuration: 0x%04x", d->bd_tstamp)); - sysclock_snap2bintime(&cs, &bt, whichclock, - clockflags); - } + if (gottime < bpf_ts_quality(d->bd_tstamp)) + gottime = bpf_gettime(&bt, d->bd_tstamp, m); #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif @@ -1946,11 +1915,10 @@ void bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m) { struct bintime bt; - struct sysclock_snap cs; struct mbuf mb; struct bpf_d *d; - u_int clockflags, pktlen, slen; - int tstype, whichclock; + u_int pktlen, slen; + int gottime; /* Skip outgoing duplicate packets. */ if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { @@ -1958,20 +1926,6 @@ bpf_mtap2(struct bpf_if *bp, void *data, return; } - tstype = bp->tstype; - if (tstype == BPF_TSTAMP_DEFAULT) - tstype = bpf_default_tstype; - - if (tstype == BPF_TSTAMP_NORMAL || tstype == BPF_TSTAMP_FAST) - sysclock_getsnapshot(&cs, tstype == BPF_TSTAMP_FAST ? - 1 : 0); -#ifdef notyet - else if (tstype == BPF_TSTAMP_EXTERNAL) - /* XXX: Convert extern tstamp to bintime. */ -#endif - else - bzero(&bt, sizeof(bt)); - pktlen = m_length(m, NULL); /* * Craft on-stack mbuf suitable for passing to bpf_filter. @@ -1983,6 +1937,7 @@ bpf_mtap2(struct bpf_if *bp, void *data, mb.m_len = dlen; pktlen += dlen; + gottime = BPF_TSTAMP_NONE; BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif, bp->bif_ifp)) @@ -1992,16 +1947,8 @@ bpf_mtap2(struct bpf_if *bp, void *data, slen = bpf_filter(d->bd_rfilter, (u_char *)&mb, pktlen, 0); if (slen != 0) { d->bd_fcount++; - if (tstype == BPF_TSTAMP_NORMAL || - tstype == BPF_TSTAMP_FAST) { - whichclock = -1; - SET_CLOCKCFG_FLAGS(d->bd_tstamp, - cs.sysclock_active, whichclock, clockflags); - KASSERT(whichclock >= 0, ("Bogus BPF tstamp " - "configuration: 0x%04x", d->bd_tstamp)); - sysclock_snap2bintime(&cs, &bt, whichclock, - clockflags); - } + if (gottime < bpf_ts_quality(d->bd_tstamp)) + gottime = bpf_gettime(&bt, d->bd_tstamp, m); #ifdef MAC if (mac_bpfdesc_check_receive(d, bp->bif_ifp) == 0) #endif @@ -2015,6 +1962,11 @@ bpf_mtap2(struct bpf_if *bp, void *data, #undef BPF_CHECK_DIRECTION +#undef BPF_TSTAMP_NONE +#undef BPF_TSTAMP_FAST +#undef BPF_TSTAMP_NORMAL +#undef BPF_TSTAMP_EXTERN + static int bpf_hdrlen(struct bpf_d *d) { @@ -2046,9 +1998,15 @@ bpf_hdrlen(struct bpf_d *d) static void bpf_bintime2ts(struct bintime *bt, struct bpf_ts *ts, int tstype) { + struct bintime bt2; struct timeval tsm; struct timespec tsn; + if ((tstype & BPF_T_MONOTONIC) == 0) { + bt2 = *bt; + bintime_add(&bt2, &boottimebin); + bt = &bt2; + } switch (BPF_T_FORMAT(tstype)) { case BPF_T_MICROTIME: bintime2timeval(bt, &tsm); @@ -2242,64 +2200,6 @@ bpf_freed(struct bpf_d *d) } /* - * Show or change the per bpf_if or system wide default timestamp configuration. - */ -static int -bpf_tscfg_sysctl_handler(SYSCTL_HANDLER_ARGS) -{ - char tstype_name[16]; - struct bpf_if *bp; - int error, tstype; - - bp = (struct bpf_if *)arg1; - - if (req->newptr == NULL) { - /* - * Return the name of the BPF interface's timestamp setting, or - * the system wide default if bp is NULL. - */ - strlcpy(tstype_name, - bpfiftstypes[bp ? bp->tstype : bpf_default_tstype], - sizeof(tstype_name)); - error = sysctl_handle_string(oidp, tstype_name, - sizeof(tstype_name), req); - } else { - /* - * Change the timestamp configuration for this BPF interface or - * the system wide default setting. - */ - error = EINVAL; - for (tstype = 0; tstype < NUM_BPFIFTSTYPES; tstype++) { - if (strncmp((char *)req->newptr, bpfiftstypes[tstype], - strlen(bpfiftstypes[tstype])) == 0) { - /* User specified type found in bpfiftstypes. */ - if (strcmp(oidp->oid_name, "default") == 0) { - /* - * Don't allow BPF_TSTAMP_DEFAULT to be - * assigned to the - * "net.bpf.tscfg.default" OID. - */ - if (tstype != BPF_TSTAMP_DEFAULT) { - bpf_default_tstype = tstype; - error = 0; - } - } else { - /* - * Valid tstype for - * "net.bpf.tscfg." OID. - */ - bp->tstype = tstype; - error = 0; - } - break; - } - } - } - - return (error); -} - -/* * Attach an interface to bpf. dlt is the link layer type; hdrlen is the * fixed size of the link header (variable length headers not yet supported). */ @@ -2325,17 +2225,6 @@ bpfattach2(struct ifnet *ifp, u_int dlt, if (bp == NULL) panic("bpfattach"); - bp->tscfgoid = SYSCTL_ADD_PROC(NULL, - SYSCTL_STATIC_CHILDREN(_net_bpf_tscfg), OID_AUTO, ifp->if_xname, - CTLTYPE_STRING | CTLFLAG_RW, bp, sizeof(bp), - bpf_tscfg_sysctl_handler, "A", - "Interface BPF timestamp configuration"); - if (bp->tscfgoid == NULL) { - free(bp, M_BPF); - panic("bpfattach tscfgoid"); - } - - bp->tstype = BPF_TSTAMP_DEFAULT; LIST_INIT(&bp->bif_dlist); bp->bif_ifp = ifp; bp->bif_dlt = dlt; @@ -2389,7 +2278,6 @@ bpfdetach(struct ifnet *ifp) BPFD_UNLOCK(d); } - sysctl_remove_oid(bp->tscfgoid, 1, 0); mtx_destroy(&bp->bif_mtx); free(bp, M_BPF); } Modified: head/sys/net/bpf.h ============================================================================== --- head/sys/net/bpf.h Sat Dec 31 05:45:10 2011 (r229072) +++ head/sys/net/bpf.h Sat Dec 31 07:21:28 2011 (r229073) @@ -1,17 +1,12 @@ /*- * Copyright (c) 1990, 1991, 1993 - * The Regents of the University of California. - * Copyright (c) 2011 The University of Melbourne. - * All rights reserved. + * The Regents of the University of California. All rights reserved. * * This code is derived from the Stanford/CMU enet packet filter, * (net/enet.c) distributed as part of 4.3BSD, and code contributed * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence * Berkeley Laboratory. * - * Portions of this software were developed by Julien Ridoux at the University - * of Melbourne under sponsorship from the FreeBSD Foundation. - * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -171,17 +166,25 @@ enum bpf_direction { #define BPF_T_NONE 0x0003 #define BPF_T_FORMAT_MASK 0x0003 #define BPF_T_NORMAL 0x0000 -#define BPF_T_MONOTONIC 0x0100 -#define BPF_T_FLAG_MASK 0x0100 +#define BPF_T_FAST 0x0100 +#define BPF_T_MONOTONIC 0x0200 +#define BPF_T_MONOTONIC_FAST (BPF_T_FAST | BPF_T_MONOTONIC) +#define BPF_T_FLAG_MASK 0x0300 #define BPF_T_FORMAT(t) ((t) & BPF_T_FORMAT_MASK) #define BPF_T_FLAG(t) ((t) & BPF_T_FLAG_MASK) #define BPF_T_VALID(t) \ ((t) == BPF_T_NONE || (BPF_T_FORMAT(t) != BPF_T_NONE && \ ((t) & ~(BPF_T_FORMAT_MASK | BPF_T_FLAG_MASK)) == 0)) +#define BPF_T_MICROTIME_FAST (BPF_T_MICROTIME | BPF_T_FAST) +#define BPF_T_NANOTIME_FAST (BPF_T_NANOTIME | BPF_T_FAST) +#define BPF_T_BINTIME_FAST (BPF_T_BINTIME | BPF_T_FAST) #define BPF_T_MICROTIME_MONOTONIC (BPF_T_MICROTIME | BPF_T_MONOTONIC) #define BPF_T_NANOTIME_MONOTONIC (BPF_T_NANOTIME | BPF_T_MONOTONIC) #define BPF_T_BINTIME_MONOTONIC (BPF_T_BINTIME | BPF_T_MONOTONIC) +#define BPF_T_MICROTIME_MONOTONIC_FAST (BPF_T_MICROTIME | BPF_T_MONOTONIC_FAST) +#define BPF_T_NANOTIME_MONOTONIC_FAST (BPF_T_NANOTIME | BPF_T_MONOTONIC_FAST) +#define BPF_T_BINTIME_MONOTONIC_FAST (BPF_T_BINTIME | BPF_T_MONOTONIC_FAST) /* * Structure prepended to each packet. @@ -1097,8 +1100,6 @@ struct bpf_if { u_int bif_hdrlen; /* length of link header */ struct ifnet *bif_ifp; /* corresponding interface */ struct mtx bif_mtx; /* mutex for interface */ - struct sysctl_oid *tscfgoid; /* timestamp sysctl oid for interface */ - int tstype; /* timestamp setting for interface */ }; void bpf_bufheld(struct bpf_d *d); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 07:52:31 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72B8D106566C; Sat, 31 Dec 2011 07:52:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id C3DDC8FC0A; Sat, 31 Dec 2011 07:52:30 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id pBV7qRCg073108 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 31 Dec 2011 09:52:27 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id pBV7qREM027585; Sat, 31 Dec 2011 09:52:27 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id pBV7qRrQ027584; Sat, 31 Dec 2011 09:52:27 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 31 Dec 2011 09:52:27 +0200 From: Kostik Belousov To: Maxim Sobolev Message-ID: <20111231075227.GX50300@deviant.kiev.zoral.com.ua> References: <201110071343.p97Dh1c9013228@svn.freebsd.org> <4EFE0FC1.6070909@FreeBSD.org> <20111230200249.GF12721@FreeBSD.org> <4EFE5481.6050707@FreeBSD.org> <4EFE5665.1070902@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="52WwYqOHjOVYa1kb" Content-Disposition: inline In-Reply-To: <4EFE5665.1070902@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Andre Oppermann , src-committers@freebsd.org Subject: Re: svn: head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 07:52:31 -0000 --52WwYqOHjOVYa1kb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 30, 2011 at 04:25:09PM -0800, Maxim Sobolev wrote: > On 12/30/2011 4:17 PM, Maxim Sobolev wrote: > >>M> Won't this break whole lot of third-party software, which expects > >>M> FreeBSD to be slightly different in this regards? Just curious. > >> > >>Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix > >>this software (at least in ports). > >> > >>The MFC to stable/9 of r226105 was back out. > > > >Well, I am just curious how critical it is to get it resolved and is > >there any way to avoid ABI breakage. Software compiled for 9.x won't run > >on 10.x even when fitted with the proper compat libs, as far as I can > >tell and not all software can be easily recompiled. >=20 > P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on=20 > the version of the ELF image (i.e. detect if the binary is < than=20 > FreeBSD 10. What exactly do you mean by 'version of the ELF image' ? ABI note tag ? What do you propose to do if older call comes from dso, or a library statically linked in the main binary ? --52WwYqOHjOVYa1kb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk7+vzoACgkQC3+MBN1Mb4gPrACaAzE4D9003W3AvPZWiXUPI3ah 1UgAoKjskNGvbJpIdPlfr0zmEOSr+hME =d+8Z -----END PGP SIGNATURE----- --52WwYqOHjOVYa1kb-- From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 11:43:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 31E441065672; Sat, 31 Dec 2011 11:43:36 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BBC08FC1B; Sat, 31 Dec 2011 11:43:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVBhZU1061077; Sat, 31 Dec 2011 11:43:35 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVBhZJk061074; Sat, 31 Dec 2011 11:43:35 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201112311143.pBVBhZJk061074@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 31 Dec 2011 11:43:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229074 - in stable/7: . sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 11:43:36 -0000 Author: bz Date: Sat Dec 31 11:43:35 2011 New Revision: 229074 URL: http://svn.freebsd.org/changeset/base/229074 Log: MFC r229067 (by obrien): Happy 2012 to FreeBSD users in Samoa. Modified: stable/7/COPYRIGHT (contents, props changed) stable/7/sys/sys/copyright.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/COPYRIGHT ============================================================================== --- stable/7/COPYRIGHT Sat Dec 31 07:21:28 2011 (r229073) +++ stable/7/COPYRIGHT Sat Dec 31 11:43:35 2011 (r229074) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: stable/7/sys/sys/copyright.h ============================================================================== --- stable/7/sys/sys/copyright.h Sat Dec 31 07:21:28 2011 (r229073) +++ stable/7/sys/sys/copyright.h Sat Dec 31 11:43:35 2011 (r229074) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 12:12:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 561E61065675; Sat, 31 Dec 2011 12:12:42 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 415EE8FC08; Sat, 31 Dec 2011 12:12:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCCgfd062095; Sat, 31 Dec 2011 12:12:42 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCCgeB062093; Sat, 31 Dec 2011 12:12:42 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201112311212.pBVCCgeB062093@svn.freebsd.org> From: Stefan Farfeleder Date: Sat, 31 Dec 2011 12:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229075 - head/usr.sbin/bluetooth/hccontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 12:12:42 -0000 Author: stefanf Date: Sat Dec 31 12:12:41 2011 New Revision: 229075 URL: http://svn.freebsd.org/changeset/base/229075 Log: Fix typos in command descriptions. Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c ============================================================================== --- head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Sat Dec 31 11:43:35 2011 (r229074) +++ head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c Sat Dec 31 12:12:41 2011 (r229075) @@ -1633,7 +1633,7 @@ struct hci_command host_controller_baseb "defines the amount of time for the duration of the page scan. \n" \ "The Page_Scan_Window can only be less than or equal to the Page_Scan_Interval.\n\n" \ "\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msec\n" \ -"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msen", +"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msec", &hci_write_page_scan_activity }, { @@ -1655,7 +1655,7 @@ struct hci_command host_controller_baseb "parameter defines the amount of time for the duration of the inquiry scan.\n" \ "The Inquiry_Scan_Window can only be less than or equal to the Inquiry_Scan_Interval.\n\n" \ "\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msec\n" \ -"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msen", +"\t - Range: 0x0012 -- 0x100, Time = N * 0.625 msec", &hci_write_inquiry_scan_activity }, { From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 12:37:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B29D6106566C; Sat, 31 Dec 2011 12:37:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9DD2F8FC0A; Sat, 31 Dec 2011 12:37:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCb7la062925; Sat, 31 Dec 2011 12:37:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCb7v5062923; Sat, 31 Dec 2011 12:37:07 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311237.pBVCb7v5062923@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 12:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229076 - head/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 12:37:07 -0000 Author: dim Date: Sat Dec 31 12:37:07 2011 New Revision: 229076 URL: http://svn.freebsd.org/changeset/base/229076 Log: In sys/dev/hwpmc/hwpmc_amd.c, fix a clang warning about invalid enum conversions. Reviewed by: jkoshy MFC after: 1 week Modified: head/sys/dev/hwpmc/hwpmc_amd.c Modified: head/sys/dev/hwpmc/hwpmc_amd.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_amd.c Sat Dec 31 12:12:41 2011 (r229075) +++ head/sys/dev/hwpmc/hwpmc_amd.c Sat Dec 31 12:37:07 2011 (r229076) @@ -889,7 +889,6 @@ pmc_amd_initialize(void) * field returned by CPUID for instruction family >= 6. */ - class = cputype = -1; name = NULL; switch (cpu_id & 0xF00) { #if defined(__i386__) @@ -906,9 +905,8 @@ pmc_amd_initialize(void) class = PMC_CLASS_K8; name = "K8"; break; - } - if ((int) cputype == -1) { + default: (void) printf("pmc: Unknown AMD CPU.\n"); return NULL; } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 12:45:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D76611065680; Sat, 31 Dec 2011 12:45:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C1FD78FC13; Sat, 31 Dec 2011 12:45:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCjhe8063249; Sat, 31 Dec 2011 12:45:43 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCjh3W063247; Sat, 31 Dec 2011 12:45:43 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311245.pBVCjh3W063247@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 12:45:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229077 - stable/9/lib/libc/resolv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 12:45:44 -0000 Author: dim Date: Sat Dec 31 12:45:43 2011 New Revision: 229077 URL: http://svn.freebsd.org/changeset/base/229077 Log: MFC r228537: Remove meaningless self-assignment in res_send.c, otherwise clang will warn about it. I guess this was originally done to silence a bogus warning by an older version of gcc, but I could not reproduce it with any version of gcc that I have access to. Modified: stable/9/lib/libc/resolv/res_send.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/resolv/res_send.c ============================================================================== --- stable/9/lib/libc/resolv/res_send.c Sat Dec 31 12:37:07 2011 (r229076) +++ stable/9/lib/libc/resolv/res_send.c Sat Dec 31 12:45:43 2011 (r229077) @@ -1102,8 +1102,6 @@ Aerror(const res_state statp, FILE *file char hbuf[NI_MAXHOST]; char sbuf[NI_MAXSERV]; - alen = alen; - if ((statp->options & RES_DEBUG) != 0U) { if (getnameinfo(address, alen, hbuf, sizeof(hbuf), sbuf, sizeof(sbuf), niflags)) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 12:52:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28011106564A; Sat, 31 Dec 2011 12:52:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 122C98FC0A; Sat, 31 Dec 2011 12:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCqISS063502; Sat, 31 Dec 2011 12:52:18 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCqIEF063500; Sat, 31 Dec 2011 12:52:18 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311252.pBVCqIEF063500@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 12:52:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229078 - stable/9/lib/libc/rpc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 12:52:19 -0000 Author: dim Date: Sat Dec 31 12:52:18 2011 New Revision: 229078 URL: http://svn.freebsd.org/changeset/base/229078 Log: MFC r228538: In lib/libc/rpc/crypt_client.c, fix a clang warning about an implicit conversion between enum desdir/desmode from include/rpc/des.h, and enum desdir/desmode from include/rpcsvc/crypt.x. These are actually different enums, with different value names, but by accident the integer representation of the enum values happened to be the same. Modified: stable/9/lib/libc/rpc/crypt_client.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/rpc/crypt_client.c ============================================================================== --- stable/9/lib/libc/rpc/crypt_client.c Sat Dec 31 12:45:43 2011 (r229077) +++ stable/9/lib/libc/rpc/crypt_client.c Sat Dec 31 12:52:18 2011 (r229078) @@ -75,8 +75,8 @@ _des_crypt_call(buf, len, dparms) des_crypt_1_arg.desbuf.desbuf_len = len; des_crypt_1_arg.desbuf.desbuf_val = buf; - des_crypt_1_arg.des_dir = dparms->des_dir; - des_crypt_1_arg.des_mode = dparms->des_mode; + des_crypt_1_arg.des_dir = (dparms->des_dir == ENCRYPT) ? ENCRYPT_DES : DECRYPT_DES; + des_crypt_1_arg.des_mode = (dparms->des_mode == CBC) ? CBC_DES : ECB_DES; bcopy(dparms->des_ivec, des_crypt_1_arg.des_ivec, 8); bcopy(dparms->des_key, des_crypt_1_arg.des_key, 8); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 12:58:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 635D1106564A; Sat, 31 Dec 2011 12:58:22 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D12F8FC13; Sat, 31 Dec 2011 12:58:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVCwM52063737; Sat, 31 Dec 2011 12:58:22 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVCwMGW063735; Sat, 31 Dec 2011 12:58:22 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311258.pBVCwMGW063735@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 12:58:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229079 - stable/9/lib/libc/stdlib X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 12:58:22 -0000 Author: dim Date: Sat Dec 31 12:58:21 2011 New Revision: 229079 URL: http://svn.freebsd.org/changeset/base/229079 Log: MFC r228540: Since clang does not support the tls_model attribute used in malloc.c yet (see LLVM PR 9788), and warns about it, rub it out for now. When clang grows support for this attribute, I will revert this again. Modified: stable/9/lib/libc/stdlib/malloc.c Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdlib/malloc.c ============================================================================== --- stable/9/lib/libc/stdlib/malloc.c Sat Dec 31 12:52:18 2011 (r229078) +++ stable/9/lib/libc/stdlib/malloc.c Sat Dec 31 12:58:21 2011 (r229079) @@ -219,7 +219,11 @@ __FBSDID("$FreeBSD$"); # define LG_QUANTUM 4 # define LG_SIZEOF_PTR 2 # define CPU_SPINWAIT __asm__ volatile("pause") -# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# ifdef __clang__ +# define TLS_MODEL /* clang does not support tls_model yet */ +# else +# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# endif #endif #ifdef __ia64__ # define LG_QUANTUM 4 @@ -240,7 +244,11 @@ __FBSDID("$FreeBSD$"); # define LG_QUANTUM 4 # define LG_SIZEOF_PTR 3 # define CPU_SPINWAIT __asm__ volatile("pause") -# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# ifdef __clang__ +# define TLS_MODEL /* clang does not support tls_model yet */ +# else +# define TLS_MODEL __attribute__((tls_model("initial-exec"))) +# endif #endif #ifdef __arm__ # define LG_QUANTUM 3 From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:07:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 822341065670; Sat, 31 Dec 2011 13:07:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 697338FC13; Sat, 31 Dec 2011 13:07:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVD7AkJ064177; Sat, 31 Dec 2011 13:07:10 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVD79ZL064148; Sat, 31 Dec 2011 13:07:09 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311307.pBVD79ZL064148@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229080 - in stable/9/sys/dev/usb: . controller net serial storage template wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:07:10 -0000 Author: hselasky Date: Sat Dec 31 13:07:09 2011 New Revision: 229080 URL: http://svn.freebsd.org/changeset/base/229080 Log: MFC r227461: Style change. Use memxxx() functions instead of bxxx() functions. Modified: stable/9/sys/dev/usb/controller/at91dci.c stable/9/sys/dev/usb/controller/avr32dci.c stable/9/sys/dev/usb/controller/ehci.c stable/9/sys/dev/usb/controller/ohci.c stable/9/sys/dev/usb/controller/uhci.c stable/9/sys/dev/usb/net/if_kue.c stable/9/sys/dev/usb/net/uhso.c stable/9/sys/dev/usb/serial/ufoma.c stable/9/sys/dev/usb/serial/uftdi.c stable/9/sys/dev/usb/serial/umodem.c stable/9/sys/dev/usb/serial/uplcom.c stable/9/sys/dev/usb/serial/uvisor.c stable/9/sys/dev/usb/storage/umass.c stable/9/sys/dev/usb/storage/urio.c stable/9/sys/dev/usb/storage/ustorage_fs.c stable/9/sys/dev/usb/template/usb_template.c stable/9/sys/dev/usb/usb_busdma.c stable/9/sys/dev/usb/usb_compat_linux.c stable/9/sys/dev/usb/usb_dev.c stable/9/sys/dev/usb/usb_generic.c stable/9/sys/dev/usb/usb_msctest.c stable/9/sys/dev/usb/usb_request.c stable/9/sys/dev/usb/usb_transfer.c stable/9/sys/dev/usb/wlan/if_uath.c stable/9/sys/dev/usb/wlan/if_upgt.c stable/9/sys/dev/usb/wlan/if_urtw.c stable/9/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/controller/at91dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -2123,7 +2123,7 @@ tr_handle_get_port_status: if (sc->sc_flags.status_vbus && sc->sc_flags.status_bus_reset) { /* reset endpoint flags */ - bzero(sc->sc_ep_flags, sizeof(sc->sc_ep_flags)); + memset(sc->sc_ep_flags, 0, sizeof(sc->sc_ep_flags)); } } if (sc->sc_flags.change_suspend) { Modified: stable/9/sys/dev/usb/controller/avr32dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -415,12 +415,11 @@ repeat: buf_res.length = count; } /* receive data */ - bcopy(sc->physdata + + memcpy(buf_res.buffer, sc->physdata + (AVR32_EPTSTA_CURRENT_BANK(temp) << td->bank_shift) + - (td->ep_no << 16) + (td->offset % td->max_packet_size), - buf_res.buffer, buf_res.length) + (td->ep_no << 16) + (td->offset % td->max_packet_size), buf_res.length); /* update counters */ - count -= buf_res.length; + count -= buf_res.length; td->offset += buf_res.length; td->remainder -= buf_res.length; } @@ -491,12 +490,12 @@ repeat: buf_res.length = count; } /* transmit data */ - bcopy(buf_res.buffer, sc->physdata + + memcpy(sc->physdata + (AVR32_EPTSTA_CURRENT_BANK(temp) << td->bank_shift) + (td->ep_no << 16) + (td->offset % td->max_packet_size), - buf_res.length) + buf_res.buffer, buf_res.length); /* update counters */ - count -= buf_res.length; + count -= buf_res.length; td->offset += buf_res.length; td->remainder -= buf_res.length; } Modified: stable/9/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -3369,7 +3369,7 @@ ehci_roothub_exec(struct usb_device *ude break; case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): DPRINTFN(9, "get port status i=%d\n", Modified: stable/9/sys/dev/usb/controller/ohci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/ohci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -2347,7 +2347,7 @@ ohci_roothub_exec(struct usb_device *ude case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): DPRINTFN(9, "get port status i=%d\n", Modified: stable/9/sys/dev/usb/controller/uhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uhci.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/controller/uhci.c Sat Dec 31 13:07:09 2011 (r229080) @@ -2702,7 +2702,7 @@ uhci_roothub_exec(struct usb_device *ude break; case C(UR_GET_STATUS, UT_READ_CLASS_DEVICE): len = 16; - bzero(sc->sc_hub_desc.temp, 16); + memset(sc->sc_hub_desc.temp, 0, 16); break; case C(UR_GET_STATUS, UT_READ_CLASS_OTHER): if (index == 1) Modified: stable/9/sys/dev/usb/net/if_kue.c ============================================================================== --- stable/9/sys/dev/usb/net/if_kue.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/net/if_kue.c Sat Dec 31 13:07:09 2011 (r229080) @@ -380,8 +380,9 @@ kue_setmulti(struct usb_ether *ue) */ if (i == KUE_MCFILTCNT(sc)) break; - bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), - KUE_MCFILT(sc, i), ETHER_ADDR_LEN); + memcpy(KUE_MCFILT(sc, i), + LLADDR((struct sockaddr_dl *)ifma->ifma_addr), + ETHER_ADDR_LEN); i++; } if_maddr_runlock(ifp); Modified: stable/9/sys/dev/usb/net/uhso.c ============================================================================== --- stable/9/sys/dev/usb/net/uhso.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/net/uhso.c Sat Dec 31 13:07:09 2011 (r229080) @@ -1153,7 +1153,7 @@ uhso_mux_read_callback(struct usb_xfer * /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: - bzero(&req, sizeof(struct usb_device_request)); + memset(&req, 0, sizeof(struct usb_device_request)); req.bmRequestType = UT_READ_CLASS_INTERFACE; req.bRequest = UCDC_GET_ENCAPSULATED_RESPONSE; USETW(req.wValue, 0); @@ -1206,7 +1206,7 @@ uhso_mux_write_callback(struct usb_xfer usbd_get_page(pc, 0, &res); - bzero(&req, sizeof(struct usb_device_request)); + memset(&req, 0, sizeof(struct usb_device_request)); req.bmRequestType = UT_WRITE_CLASS_INTERFACE; req.bRequest = UCDC_SEND_ENCAPSULATED_COMMAND; USETW(req.wValue, 0); @@ -1731,7 +1731,7 @@ uhso_if_rxflush(void *arg) * copy the IP-packet into it. */ m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); - bcopy(mtod(m0, uint8_t *), mtod(m, uint8_t *), iplen); + memcpy(mtod(m, uint8_t *), mtod(m0, uint8_t *), iplen); m->m_pkthdr.len = m->m_len = iplen; /* Adjust the size of the original mbuf */ Modified: stable/9/sys/dev/usb/serial/ufoma.c ============================================================================== --- stable/9/sys/dev/usb/serial/ufoma.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/ufoma.c Sat Dec 31 13:07:09 2011 (r229080) @@ -438,7 +438,7 @@ ufoma_attach(device_t dev) goto detach; } sc->sc_modetable[0] = (elements + 1); - bcopy(mad->bMode, &sc->sc_modetable[1], elements); + memcpy(&sc->sc_modetable[1], mad->bMode, elements); sc->sc_currentmode = UMCPC_ACM_MODE_UNLINKED; sc->sc_modetoactivate = mad->bMode[0]; @@ -968,7 +968,7 @@ ufoma_cfg_param(struct ucom_softc *ucom, } DPRINTF("\n"); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/9/sys/dev/usb/serial/uftdi.c ============================================================================== --- stable/9/sys/dev/usb/serial/uftdi.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/uftdi.c Sat Dec 31 13:07:09 2011 (r229080) @@ -560,7 +560,7 @@ static int uftdi_set_parm_soft(struct termios *t, struct uftdi_param_config *cfg, uint8_t type) { - bzero(cfg, sizeof(*cfg)); + memset(cfg, 0, sizeof(*cfg)); switch (type) { case UFTDI_TYPE_SIO: Modified: stable/9/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 13:07:09 2011 (r229080) @@ -536,7 +536,7 @@ umodem_cfg_param(struct ucom_softc *ucom DPRINTF("sc=%p\n", sc); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/9/sys/dev/usb/serial/uplcom.c ============================================================================== --- stable/9/sys/dev/usb/serial/uplcom.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/uplcom.c Sat Dec 31 13:07:09 2011 (r229080) @@ -659,7 +659,7 @@ uplcom_cfg_param(struct ucom_softc *ucom DPRINTF("sc = %p\n", sc); - bzero(&ls, sizeof(ls)); + memset(&ls, 0, sizeof(ls)); USETDW(ls.dwDTERate, t->c_ospeed); Modified: stable/9/sys/dev/usb/serial/uvisor.c ============================================================================== --- stable/9/sys/dev/usb/serial/uvisor.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/serial/uvisor.c Sat Dec 31 13:07:09 2011 (r229080) @@ -311,8 +311,9 @@ uvisor_attach(device_t dev) int error; DPRINTF("sc=%p\n", sc); - bcopy(uvisor_config, uvisor_config_copy, + memcpy(uvisor_config_copy, uvisor_config, sizeof(uvisor_config_copy)); + device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, "uvisor", NULL, MTX_DEF); Modified: stable/9/sys/dev/usb/storage/umass.c ============================================================================== --- stable/9/sys/dev/usb/storage/umass.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/storage/umass.c Sat Dec 31 13:07:09 2011 (r229080) @@ -891,7 +891,7 @@ umass_attach(device_t dev) int32_t err; /* - * NOTE: the softc struct is bzero-ed in device_set_driver. + * NOTE: the softc struct is cleared in device_set_driver. * We can safely call umass_detach without specifically * initializing the struct. */ @@ -1305,11 +1305,13 @@ umass_t_bbb_command_callback(struct usb_ } sc->cbw.bCDBLength = sc->sc_transfer.cmd_len; - bcopy(sc->sc_transfer.cmd_data, sc->cbw.CBWCDB, + memcpy(sc->cbw.CBWCDB, sc->sc_transfer.cmd_data, sc->sc_transfer.cmd_len); - bzero(sc->sc_transfer.cmd_data + sc->sc_transfer.cmd_len, - sizeof(sc->cbw.CBWCDB) - sc->sc_transfer.cmd_len); + memset(sc->sc_transfer.cmd_data + + sc->sc_transfer.cmd_len, 0, + sizeof(sc->cbw.CBWCDB) - + sc->sc_transfer.cmd_len); DIF(UDMASS_BBB, umass_bbb_dump_cbw(sc, &sc->cbw)); @@ -1480,9 +1482,9 @@ umass_t_bbb_status_callback(struct usb_x /* Zero missing parts of the CSW: */ - if (actlen < sizeof(sc->csw)) { - bzero(&sc->csw, sizeof(sc->csw)); - } + if (actlen < sizeof(sc->csw)) + memset(&sc->csw, 0, sizeof(sc->csw)); + pc = usbd_xfer_get_frame(xfer, 0); usbd_copy_out(pc, 0, &sc->csw, actlen); @@ -2755,7 +2757,7 @@ umass_scsi_transform(struct umass_softc if (sc->sc_quirks & NO_TEST_UNIT_READY) { DPRINTF(sc, UDMASS_SCSI, "Converted TEST_UNIT_READY " "to START_UNIT\n"); - bzero(sc->sc_transfer.cmd_data, cmd_len); + memset(sc->sc_transfer.cmd_data, 0, cmd_len); sc->sc_transfer.cmd_data[0] = START_STOP_UNIT; sc->sc_transfer.cmd_data[4] = SSS_START; return (1); @@ -2768,14 +2770,14 @@ umass_scsi_transform(struct umass_softc * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; return (1); } break; } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); } @@ -2810,10 +2812,11 @@ umass_rbc_transform(struct umass_softc * case REQUEST_SENSE: case PREVENT_ALLOW: - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); if ((sc->sc_quirks & RBC_PAD_TO_12) && (cmd_len < 12)) { - bzero(sc->sc_transfer.cmd_data + cmd_len, 12 - cmd_len); + memset(sc->sc_transfer.cmd_data + cmd_len, + 0, 12 - cmd_len); cmd_len = 12; } sc->sc_transfer.cmd_len = cmd_len; @@ -2841,7 +2844,7 @@ umass_ufi_transform(struct umass_softc * sc->sc_transfer.cmd_len = UFI_COMMAND_LENGTH; /* Zero the command data */ - bzero(sc->sc_transfer.cmd_data, UFI_COMMAND_LENGTH); + memset(sc->sc_transfer.cmd_data, 0, UFI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* @@ -2898,7 +2901,7 @@ umass_ufi_transform(struct umass_softc * return (0); /* failure */ } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); /* success */ } @@ -2919,7 +2922,7 @@ umass_atapi_transform(struct umass_softc sc->sc_transfer.cmd_len = ATAPI_COMMAND_LENGTH; /* Zero the command data */ - bzero(sc->sc_transfer.cmd_data, ATAPI_COMMAND_LENGTH); + memset(sc->sc_transfer.cmd_data, 0, ATAPI_COMMAND_LENGTH); switch (cmd_ptr[0]) { /* @@ -2933,7 +2936,7 @@ umass_atapi_transform(struct umass_softc * information. */ if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); sc->sc_transfer.cmd_data[4] = SHORT_INQUIRY_LENGTH; return (1); @@ -2994,7 +2997,7 @@ umass_atapi_transform(struct umass_softc break; } - bcopy(cmd_ptr, sc->sc_transfer.cmd_data, cmd_len); + memcpy(sc->sc_transfer.cmd_data, cmd_ptr, cmd_len); return (1); /* success */ } Modified: stable/9/sys/dev/usb/storage/urio.c ============================================================================== --- stable/9/sys/dev/usb/storage/urio.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/storage/urio.c Sat Dec 31 13:07:09 2011 (r229080) @@ -440,7 +440,7 @@ urio_ioctl(struct usb_fifo *fifo, u_long error = EPERM; goto done; } - bzero(&ur, sizeof(ur)); + memset(&ur, 0, sizeof(ur)); rio_cmd = addr; ur.ucr_request.bmRequestType = rio_cmd->requesttype | UT_READ_VENDOR_DEVICE; @@ -451,7 +451,7 @@ urio_ioctl(struct usb_fifo *fifo, u_long error = EPERM; goto done; } - bzero(&ur, sizeof(ur)); + memset(&ur, 0, sizeof(ur)); rio_cmd = addr; ur.ucr_request.bmRequestType = rio_cmd->requesttype | UT_WRITE_VENDOR_DEVICE; Modified: stable/9/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 13:07:09 2011 (r229080) @@ -355,7 +355,7 @@ ustorage_fs_attach(device_t dev) int unit; /* - * NOTE: the softc struct is bzero-ed in device_set_driver. + * NOTE: the softc struct is cleared in device_set_driver. * We can safely call ustorage_fs_detach without specifically * initializing the struct. */ @@ -371,7 +371,9 @@ ustorage_fs_attach(device_t dev) * further */ ustorage_fs_ramdisk = - malloc(USTORAGE_FS_RAM_SECT << 9, M_USB, M_ZERO | M_WAITOK); + malloc(USTORAGE_FS_RAM_SECT << 9, M_USB, + M_ZERO | M_WAITOK); + if (ustorage_fs_ramdisk == NULL) { return (ENOMEM); } Modified: stable/9/sys/dev/usb/template/usb_template.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 13:07:09 2011 (r229080) @@ -913,7 +913,7 @@ usb_hw_ep_resolve(struct usb_device *ude } ues = udev->bus->scratch[0].hw_ep_scratch; - bzero(ues, sizeof(*ues)); + memset(ues, 0, sizeof(*ues)); ues->ep_max = ues->ep; ues->cd = (void *)desc; @@ -1240,7 +1240,7 @@ usb_temp_setup(struct usb_device *udev, } uts = udev->bus->scratch[0].temp_setup; - bzero(uts, sizeof(*uts)); + memset(uts, 0, sizeof(*uts)); uts->usb_speed = udev->speed; uts->self_powered = udev->flags.self_powered; Modified: stable/9/sys/dev/usb/usb_busdma.c ============================================================================== --- stable/9/sys/dev/usb/usb_busdma.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_busdma.c Sat Dec 31 13:07:09 2011 (r229080) @@ -80,9 +80,9 @@ void usbd_get_page(struct usb_page_cache *pc, usb_frlength_t offset, struct usb_page_search *res) { +#if USB_HAVE_BUSDMA struct usb_page *page; -#if USB_HAVE_BUSDMA if (pc->page_start) { /* Case 1 - something has been loaded into DMA */ @@ -145,7 +145,7 @@ usbd_copy_in(struct usb_page_cache *cach if (buf_res.length > len) { buf_res.length = len; } - bcopy(ptr, buf_res.buffer, buf_res.length); + memcpy(buf_res.buffer, ptr, buf_res.length); offset += buf_res.length; len -= buf_res.length; @@ -267,7 +267,7 @@ usbd_copy_out(struct usb_page_cache *cac if (res.length > len) { res.length = len; } - bcopy(res.buffer, ptr, res.length); + memcpy(ptr, res.buffer, res.length); offset += res.length; len -= res.length; @@ -325,7 +325,7 @@ usbd_frame_zero(struct usb_page_cache *c if (res.length > len) { res.length = len; } - bzero(res.buffer, res.length); + memset(res.buffer, 0, res.length); offset += res.length; len -= res.length; @@ -560,7 +560,7 @@ usb_pc_alloc_mem(struct usb_page_cache * bus_dmamem_free(utag->tag, ptr, map); goto error; } - bzero(ptr, size); + memset(ptr, 0, size); usb_pc_cpu_flush(pc); @@ -797,7 +797,7 @@ usb_dma_tag_setup(struct usb_dma_parent_ struct mtx *mtx, usb_dma_callback_t *func, uint8_t ndmabits, uint8_t nudt) { - bzero(udpt, sizeof(*udpt)); + memset(udpt, 0, sizeof(*udpt)); /* sanity checking */ if ((nudt == 0) || @@ -818,7 +818,7 @@ usb_dma_tag_setup(struct usb_dma_parent_ udpt->dma_bits = ndmabits; while (nudt--) { - bzero(udt, sizeof(*udt)); + memset(udt, 0, sizeof(*udt)); udt->tag_parent = udpt; udt++; } Modified: stable/9/sys/dev/usb/usb_compat_linux.c ============================================================================== --- stable/9/sys/dev/usb/usb_compat_linux.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_compat_linux.c Sat Dec 31 13:07:09 2011 (r229080) @@ -564,7 +564,7 @@ usb_clear_halt(struct usb_device *dev, s type = uhe->desc.bmAttributes & UE_XFERTYPE; addr = uhe->desc.bEndpointAddress; - bzero(cfg, sizeof(cfg)); + memset(cfg, 0, sizeof(cfg)); cfg[0].type = type; cfg[0].endpoint = addr & UE_ADDR; @@ -709,12 +709,12 @@ usb_control_msg(struct usb_device *dev, urb->dev = dev; urb->endpoint = uhe; - bcopy(&req, urb->setup_packet, sizeof(req)); + memcpy(urb->setup_packet, &req, sizeof(req)); if (size && (!(req.bmRequestType & UT_READ))) { /* move the data to a real buffer */ - bcopy(data, USB_ADD_BYTES(urb->setup_packet, - sizeof(req)), size); + memcpy(USB_ADD_BYTES(urb->setup_packet, sizeof(req)), + data, size); } err = usb_start_wait_urb(urb, timeout, &actlen); @@ -789,7 +789,7 @@ usb_setup_endpoint(struct usb_device *de if (bufsize == 0) { return (0); } - bzero(cfg, sizeof(cfg)); + memset(cfg, 0, sizeof(cfg)); if (type == UE_ISOCHRONOUS) { @@ -1251,7 +1251,7 @@ usb_init_urb(struct urb *urb) if (urb == NULL) { return; } - bzero(urb, sizeof(*urb)); + memset(urb, 0, sizeof(*urb)); } /*------------------------------------------------------------------------* Modified: stable/9/sys/dev/usb/usb_dev.c ============================================================================== --- stable/9/sys/dev/usb/usb_dev.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_dev.c Sat Dec 31 13:07:09 2011 (r229080) @@ -1809,8 +1809,8 @@ usb_fifo_free_buffer(struct usb_fifo *f) } /* reset queues */ - bzero(&f->free_q, sizeof(f->free_q)); - bzero(&f->used_q, sizeof(f->used_q)); + memset(&f->free_q, 0, sizeof(f->free_q)); + memset(&f->used_q, 0, sizeof(f->used_q)); } void @@ -1909,7 +1909,7 @@ usb_fifo_put_data_linear(struct usb_fifo io_len = MIN(len, m->cur_data_len); - bcopy(ptr, m->cur_data_ptr, io_len); + memcpy(m->cur_data_ptr, ptr, io_len); m->cur_data_len = io_len; ptr = USB_ADD_BYTES(ptr, io_len); @@ -2052,7 +2052,7 @@ usb_fifo_get_data_linear(struct usb_fifo io_len = MIN(len, m->cur_data_len); - bcopy(m->cur_data_ptr, ptr, io_len); + memcpy(ptr, m->cur_data_ptr, io_len); len -= io_len; ptr = USB_ADD_BYTES(ptr, io_len); Modified: stable/9/sys/dev/usb/usb_generic.c ============================================================================== --- stable/9/sys/dev/usb/usb_generic.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_generic.c Sat Dec 31 13:07:09 2011 (r229080) @@ -240,7 +240,7 @@ ugen_open_pipe_write(struct usb_fifo *f) /* transfers are already opened */ return (0); } - bzero(usb_config, sizeof(usb_config)); + memset(usb_config, 0, sizeof(usb_config)); usb_config[1].type = UE_CONTROL; usb_config[1].endpoint = 0; @@ -308,7 +308,7 @@ ugen_open_pipe_read(struct usb_fifo *f) /* transfers are already opened */ return (0); } - bzero(usb_config, sizeof(usb_config)); + memset(usb_config, 0, sizeof(usb_config)); usb_config[1].type = UE_CONTROL; usb_config[1].endpoint = 0; Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 13:07:09 2011 (r229080) @@ -475,8 +475,8 @@ bbb_command_start(struct bbb_transfer *s sc->data_timeout = (data_timeout + USB_MS_HZ); sc->actlen = 0; sc->cmd_len = cmd_len; - bzero(&sc->cbw.CBWCDB, sizeof(sc->cbw.CBWCDB)); - bcopy(cmd_ptr, &sc->cbw.CBWCDB, cmd_len); + memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB)); + memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len); DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); Modified: stable/9/sys/dev/usb/usb_request.c ============================================================================== --- stable/9/sys/dev/usb/usb_request.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_request.c Sat Dec 31 13:07:09 2011 (r229080) @@ -517,7 +517,7 @@ usbd_do_request_flags(struct usb_device } } else #endif - bcopy(desc, data, length); + memcpy(data, desc, length); } goto done; /* success */ } Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/usb_transfer.c Sat Dec 31 13:07:09 2011 (r229080) @@ -858,7 +858,7 @@ usbd_transfer_setup(struct usb_device *u if (parm.err) { goto done; } - bzero(&parm, sizeof(parm)); + memset(&parm, 0, sizeof(parm)); parm.udev = udev; parm.speed = usbd_get_speed(udev); @@ -982,7 +982,7 @@ usbd_transfer_setup(struct usb_device *u * memory: */ xfer = &dummy; - bzero(&dummy, sizeof(dummy)); + memset(&dummy, 0, sizeof(dummy)); refcount++; } Modified: stable/9/sys/dev/usb/wlan/if_uath.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_uath.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_uath.c Sat Dec 31 13:07:09 2011 (r229080) @@ -710,12 +710,12 @@ uath_cmdsend(struct uath_softc *sc, uint cmd->buflen = roundup2(sizeof(struct uath_cmd_hdr) + ilen, 4); hdr = (struct uath_cmd_hdr *)cmd->buf; - bzero(hdr, sizeof (struct uath_cmd_hdr)); /* XXX not needed */ + memset(hdr, 0, sizeof(struct uath_cmd_hdr)); hdr->len = htobe32(cmd->buflen); hdr->code = htobe32(code); hdr->msgid = cmd->msgid; /* don't care about endianness */ hdr->magic = htobe32((cmd->flags & UATH_CMD_FLAG_MAGIC) ? 1 << 24 : 0); - bcopy(idata, (uint8_t *)(hdr + 1), ilen); + memcpy((uint8_t *)(hdr + 1), idata, ilen); #ifdef UATH_DEBUG if (sc->sc_debug & UATH_DEBUG_CMDS) { @@ -1403,7 +1403,7 @@ uath_dataflush(struct uath_softc *sc) chunk->flags = UATH_CFLAGS_FINAL; chunk->length = htobe16(sizeof (struct uath_tx_desc)); - bzero(desc, sizeof(struct uath_tx_desc)); + memset(desc, 0, sizeof(struct uath_tx_desc)); desc->msglen = htobe32(sizeof(struct uath_tx_desc)); desc->msgid = (sc->sc_msgid++) + 1; /* don't care about endianness */ desc->type = htobe32(WDCMSG_FLUSH); @@ -1482,7 +1482,7 @@ uath_set_chan(struct uath_softc *sc, str #endif struct uath_cmd_reset reset; - bzero(&reset, sizeof reset); + memset(&reset, 0, sizeof(reset)); if (IEEE80211_IS_CHAN_2GHZ(c)) reset.flags |= htobe32(UATH_CHAN_2GHZ); if (IEEE80211_IS_CHAN_5GHZ(c)) @@ -1971,7 +1971,7 @@ uath_create_connection(struct uath_softc struct uath_cmd_create_connection create; ni = ieee80211_ref_node(vap->iv_bss); - bzero(&create, sizeof create); + memset(&create, 0, sizeof(create)); create.connid = htobe32(connid); create.bssid = htobe32(0); /* XXX packed or not? */ @@ -2000,7 +2000,7 @@ uath_set_rates(struct uath_softc *sc, co { struct uath_cmd_rates rates; - bzero(&rates, sizeof rates); + memset(&rates, 0, sizeof(rates)); rates.connid = htobe32(UATH_ID_BSS); /* XXX */ rates.size = htobe32(sizeof(struct uath_cmd_rateset)); /* XXX bounds check rs->rs_nrates */ @@ -2022,7 +2022,7 @@ uath_write_associd(struct uath_softc *sc struct uath_cmd_set_associd associd; ni = ieee80211_ref_node(vap->iv_bss); - bzero(&associd, sizeof associd); + memset(&associd, 0, sizeof(associd)); associd.defaultrateix = htobe32(1); /* XXX */ associd.associd = htobe32(ni->ni_associd); associd.timoffset = htobe32(0x3b); /* XXX */ @@ -2168,7 +2168,7 @@ uath_set_key(struct uath_softc *sc, cons struct uath_cmd_crypto crypto; int i; - bzero(&crypto, sizeof crypto); + memset(&crypto, 0, sizeof(crypto)); crypto.keyidx = htobe32(index); crypto.magic1 = htobe32(1); crypto.size = htobe32(368); @@ -2176,7 +2176,7 @@ uath_set_key(struct uath_softc *sc, cons crypto.flags = htobe32(0x80000068); if (index != UATH_DEFAULT_KEY) crypto.flags |= htobe32(index << 16); - memset(crypto.magic2, 0xff, sizeof crypto.magic2); + memset(crypto.magic2, 0xff, sizeof(crypto.magic2)); /* * Each byte of the key must be XOR'ed with 10101010 before being Modified: stable/9/sys/dev/usb/wlan/if_upgt.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_upgt.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_upgt.c Sat Dec 31 13:07:09 2011 (r229080) @@ -432,7 +432,7 @@ upgt_get_stats(struct upgt_softc *sc) /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -540,7 +540,7 @@ upgt_set_led(struct upgt_softc *sc, int /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -670,7 +670,7 @@ upgt_set_macfilter(struct upgt_softc *sc /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -785,11 +785,11 @@ upgt_setup_rates(struct ieee80211vap *va * will pickup a rate. */ if (ic->ic_curmode == IEEE80211_MODE_11B) - bcopy(rateset_auto_11b, sc->sc_cur_rateset, + memcpy(sc->sc_cur_rateset, rateset_auto_11b, sizeof(sc->sc_cur_rateset)); if (ic->ic_curmode == IEEE80211_MODE_11G || ic->ic_curmode == IEEE80211_MODE_AUTO) - bcopy(rateset_auto_11g, sc->sc_cur_rateset, + memcpy(sc->sc_cur_rateset, rateset_auto_11g, sizeof(sc->sc_cur_rateset)); } else { /* set a fixed rate */ @@ -975,7 +975,7 @@ upgt_set_chan(struct upgt_softc *sc, str /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -998,11 +998,11 @@ upgt_set_chan(struct upgt_softc *sc, str chan->settings = sc->sc_eeprom_freq6_settings; chan->unknown3 = UPGT_CHANNEL_UNKNOWN3; - bcopy(&sc->sc_eeprom_freq3[channel].data, chan->freq3_1, + memcpy(chan->freq3_1, &sc->sc_eeprom_freq3[channel].data, sizeof(chan->freq3_1)); - bcopy(&sc->sc_eeprom_freq4[channel], chan->freq4, + memcpy(chan->freq4, &sc->sc_eeprom_freq4[channel], sizeof(sc->sc_eeprom_freq4[channel])); - bcopy(&sc->sc_eeprom_freq3[channel].data, chan->freq3_2, + memcpy(chan->freq3_2, &sc->sc_eeprom_freq3[channel].data, sizeof(chan->freq3_2)); data_cmd->buflen = sizeof(*mem) + sizeof(*chan); @@ -1331,7 +1331,7 @@ upgt_eeprom_read(struct upgt_softc *sc) /* * Transmit the URB containing the CMD data. */ - bzero(data_cmd->buf, MCLBYTES); + memset(data_cmd->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data_cmd->buf; mem->addr = htole32(sc->sc_memaddr_frame_start + @@ -1423,8 +1423,9 @@ upgt_rxeof(struct usb_xfer *xfer, struct "received EEPROM block (offset=%d, len=%d)\n", eeprom_offset, eeprom_len); - bcopy(data->buf + sizeof(struct upgt_lmac_eeprom) + 4, - sc->sc_eeprom + eeprom_offset, eeprom_len); + memcpy(sc->sc_eeprom + eeprom_offset, + data->buf + sizeof(struct upgt_lmac_eeprom) + 4, + eeprom_len); /* EEPROM data has arrived in time, wakeup. */ wakeup(sc); @@ -1498,7 +1499,7 @@ upgt_rx(struct upgt_softc *sc, uint8_t * return (NULL); } m_adj(m, ETHER_ALIGN); - bcopy(rxdesc->data, mtod(m, char *), pkglen); + memcpy(mtod(m, char *), rxdesc->data, pkglen); /* trim FCS */ m->m_len = m->m_pkthdr.len = pkglen - IEEE80211_CRC_LEN; m->m_pkthdr.rcvif = ifp; @@ -1620,7 +1621,7 @@ upgt_fw_load(struct upgt_softc *sc) goto fail; } data_cmd->buflen = sizeof(start_fwload_cmd); - bcopy(start_fwload_cmd, data_cmd->buf, data_cmd->buflen); + memcpy(data_cmd->buf, start_fwload_cmd, data_cmd->buflen); upgt_bulk_tx(sc, data_cmd); /* send X2 header */ @@ -1631,7 +1632,7 @@ upgt_fw_load(struct upgt_softc *sc) } data_cmd->buflen = sizeof(struct upgt_fw_x2_header); x2 = (struct upgt_fw_x2_header *)data_cmd->buf; - bcopy(UPGT_X2_SIGNATURE, x2->signature, UPGT_X2_SIGNATURE_SIZE); + memcpy(x2->signature, UPGT_X2_SIGNATURE, UPGT_X2_SIGNATURE_SIZE); x2->startaddr = htole32(UPGT_MEMADDR_FIRMWARE_START); x2->len = htole32(fw->datasize); x2->crc = upgt_crc32_le((uint8_t *)data_cmd->buf + @@ -1925,7 +1926,7 @@ upgt_device_reset(struct upgt_softc *sc) UPGT_UNLOCK(sc); return (ENOBUFS); } - bcopy(init_cmd, data->buf, sizeof(init_cmd)); + memcpy(data->buf, init_cmd, sizeof(init_cmd)); data->buflen = sizeof(init_cmd); upgt_bulk_tx(sc, data); usb_pause_mtx(&sc->sc_mtx, 100); @@ -2178,7 +2179,7 @@ upgt_tx_start(struct upgt_softc *sc, str } /* Transmit the URB containing the TX data. */ - bzero(data->buf, MCLBYTES); + memset(data->buf, 0, MCLBYTES); mem = (struct upgt_lmac_mem *)data->buf; mem->addr = htole32(data->addr); txdesc = (struct upgt_lmac_tx_desc *)(mem + 1); @@ -2192,7 +2193,7 @@ upgt_tx_start(struct upgt_softc *sc, str } else { /* data frames */ txdesc->header1.flags = UPGT_H1_FLAGS_TX_DATA; - bcopy(sc->sc_cur_rateset, txdesc->rates, sizeof(txdesc->rates)); + memcpy(txdesc->rates, sc->sc_cur_rateset, sizeof(txdesc->rates)); } txdesc->header1.type = UPGT_H1_TYPE_TX_DATA; txdesc->header1.len = htole16(m->m_pkthdr.len); Modified: stable/9/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 13:07:09 2011 (r229080) @@ -1745,7 +1745,7 @@ urtw_tx_start(struct urtw_softc *sc, str if ((0 == xferlen % 64) || (0 == xferlen % 512)) xferlen += 1; - bzero(data->buf, URTW_TX_MAXSIZE); + memset(data->buf, 0, URTW_TX_MAXSIZE); flags = m0->m_pkthdr.len & 0xfff; flags |= URTW_TX_FLAG_NO_ENC; if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) && Modified: stable/9/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 12:58:21 2011 (r229079) +++ stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 13:07:09 2011 (r229080) @@ -683,7 +683,7 @@ zyd_intr_read_callback(struct usb_xfer * if (i != cnt) continue; /* copy answer into caller-supplied buffer */ - bcopy(cmd->data, rqp->odata, rqp->olen); + memcpy(rqp->odata, cmd->data, rqp->olen); DPRINTF(sc, ZYD_DEBUG_CMD, "command %p complete, data = %*D \n", rqp, rqp->olen, rqp->odata, ":"); @@ -783,7 +783,7 @@ zyd_cmd(struct zyd_softc *sc, uint16_t c return (EINVAL); cmd.code = htole16(code); - bcopy(idata, cmd.data, ilen); + memcpy(cmd.data, idata, ilen); DPRINTF(sc, ZYD_DEBUG_CMD, "sending cmd %p = %*D\n", &rq, ilen, idata, ":"); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:12:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7996F106566B; Sat, 31 Dec 2011 13:12:11 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 597688FC12; Sat, 31 Dec 2011 13:12:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDCBx6064480; Sat, 31 Dec 2011 13:12:11 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDCBja064475; Sat, 31 Dec 2011 13:12:11 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201112311312.pBVDCBja064475@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 31 Dec 2011 13:12:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:12:11 -0000 Author: gabor Date: Sat Dec 31 13:12:10 2011 New Revision: 229081 URL: http://svn.freebsd.org/changeset/base/229081 Log: MFC r228099: - Create links to the xz and lzma versions even if BSD grep is not the default. Nor GNU nor liblzma in base provides such functionality so it may be useful. MFC r228319: - Match GNU behavior of exit code - Rename variable that has a different meaning now Modified: stable/9/usr.bin/grep/Makefile stable/9/usr.bin/grep/grep.c stable/9/usr.bin/grep/grep.h stable/9/usr.bin/grep/util.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/Makefile ============================================================================== --- stable/9/usr.bin/grep/Makefile Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/Makefile Sat Dec 31 13:12:10 2011 (r229081) @@ -25,13 +25,7 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ ${BINDIR}/grep ${BINDIR}/fgrep \ ${BINDIR}/grep ${BINDIR}/zgrep \ ${BINDIR}/grep ${BINDIR}/zegrep \ - ${BINDIR}/grep ${BINDIR}/zfgrep \ - ${BINDIR}/grep ${BINDIR}/xzgrep \ - ${BINDIR}/grep ${BINDIR}/xzegrep \ - ${BINDIR}/grep ${BINDIR}/xzfgrep \ - ${BINDIR}/grep ${BINDIR}/lzgrep \ - ${BINDIR}/grep ${BINDIR}/lzegrep \ - ${BINDIR}/grep ${BINDIR}/lzfgrep + ${BINDIR}/grep ${BINDIR}/zfgrep MLINKS= grep.1 egrep.1 \ grep.1 fgrep.1 \ @@ -46,6 +40,13 @@ MLINKS= grep.1 egrep.1 \ grep.1 lzfgrep.1 .endif +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ + ${BINDIR}/${PROG} ${BINDIR}/lzfgrep + LDADD= -lz -llzma DPADD= ${LIBZ} ${LIBLZMA} Modified: stable/9/usr.bin/grep/grep.c ============================================================================== --- stable/9/usr.bin/grep/grep.c Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/grep.c Sat Dec 31 13:12:10 2011 (r229081) @@ -148,7 +148,7 @@ static inline const char *init_color(con bool first = true; /* flag whether we are processing the first match */ bool prev; /* flag whether or not the previous line matched */ int tail; /* lines left to print */ -bool notfound; /* file not found */ +bool file_err; /* file reading error */ /* * Prints usage information and returns 2. @@ -728,5 +728,5 @@ main(int argc, char *argv[]) /* Find out the correct return value according to the results and the command line option. */ - exit(c ? (notfound ? (qflag ? 0 : 2) : 0) : (notfound ? 2 : 1)); + exit(c ? (file_err ? (qflag ? 0 : 2) : 0) : (file_err ? 2 : 1)); } Modified: stable/9/usr.bin/grep/grep.h ============================================================================== --- stable/9/usr.bin/grep/grep.h Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/grep.h Sat Dec 31 13:12:10 2011 (r229081) @@ -119,7 +119,7 @@ extern char *label; extern const char *color; extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; -extern bool first, matchall, notfound, prev; +extern bool file_err, first, matchall, prev; extern int tail; extern unsigned int dpatterns, fpatterns, patterns; extern struct pat *pattern; Modified: stable/9/usr.bin/grep/util.c ============================================================================== --- stable/9/usr.bin/grep/util.c Sat Dec 31 13:07:09 2011 (r229080) +++ stable/9/usr.bin/grep/util.c Sat Dec 31 13:12:10 2011 (r229081) @@ -130,7 +130,7 @@ grep_tree(char **argv) case FTS_DNR: /* FALLTHROUGH */ case FTS_ERR: - notfound = true; + file_err = true; if(!sflag) warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); break; @@ -195,10 +195,9 @@ procfile(const char *fn) f = grep_open(fn); } if (f == NULL) { + file_err = true; if (!sflag) warn("%s", fn); - if (errno == ENOENT) - notfound = true; return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:12:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9013D106564A; Sat, 31 Dec 2011 13:12:29 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78BFE8FC08; Sat, 31 Dec 2011 13:12:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDCTgY064526; Sat, 31 Dec 2011 13:12:29 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDCT8A064522; Sat, 31 Dec 2011 13:12:29 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311312.pBVDCT8A064522@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:12:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229082 - in stable/9/sys/dev/usb: . serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:12:29 -0000 Author: hselasky Date: Sat Dec 31 13:12:29 2011 New Revision: 229082 URL: http://svn.freebsd.org/changeset/base/229082 Log: MFC r227463, r227383 and r227108: Add support for modem control lines. Add support for GPIO pins. PR: usb/162307 Submitted by: JD Louw Modified: stable/9/sys/dev/usb/serial/uslcom.c stable/9/sys/dev/usb/usb_ioctl.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/serial/uslcom.c ============================================================================== --- stable/9/sys/dev/usb/serial/uslcom.c Sat Dec 31 13:12:10 2011 (r229081) +++ stable/9/sys/dev/usb/serial/uslcom.c Sat Dec 31 13:12:29 2011 (r229082) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "usbdevs.h" #define USB_DEBUG_VAR uslcom_debug @@ -63,49 +64,72 @@ SYSCTL_INT(_hw_usb_uslcom, OID_AUTO, deb #define USLCOM_SET_DATA_BITS(x) ((x) << 8) +/* Request types */ #define USLCOM_WRITE 0x41 #define USLCOM_READ 0xc1 +/* Request codes */ #define USLCOM_UART 0x00 #define USLCOM_BAUD_RATE 0x01 #define USLCOM_DATA 0x03 #define USLCOM_BREAK 0x05 #define USLCOM_CTRL 0x07 +#define USLCOM_RCTRL 0x08 +#define USLCOM_SET_FLOWCTRL 0x13 +#define USLCOM_VENDOR_SPECIFIC 0xff +/* USLCOM_UART values */ #define USLCOM_UART_DISABLE 0x00 #define USLCOM_UART_ENABLE 0x01 +/* USLCOM_CTRL/USLCOM_RCTRL values */ #define USLCOM_CTRL_DTR_ON 0x0001 #define USLCOM_CTRL_DTR_SET 0x0100 #define USLCOM_CTRL_RTS_ON 0x0002 #define USLCOM_CTRL_RTS_SET 0x0200 #define USLCOM_CTRL_CTS 0x0010 #define USLCOM_CTRL_DSR 0x0020 +#define USLCOM_CTRL_RI 0x0040 #define USLCOM_CTRL_DCD 0x0080 +/* USLCOM_BAUD_RATE values */ #define USLCOM_BAUD_REF 0x384000 +/* USLCOM_DATA values */ #define USLCOM_STOP_BITS_1 0x00 #define USLCOM_STOP_BITS_2 0x02 - #define USLCOM_PARITY_NONE 0x00 #define USLCOM_PARITY_ODD 0x10 #define USLCOM_PARITY_EVEN 0x20 -#define USLCOM_PORT_NO 0xFFFF /* XXX think this should be 0 --hps */ +#define USLCOM_PORT_NO 0x0000 +/* USLCOM_BREAK values */ #define USLCOM_BREAK_OFF 0x00 #define USLCOM_BREAK_ON 0x01 +/* USLCOM_SET_FLOWCTRL values - 1st word */ +#define USLCOM_FLOW_DTR_ON 0x00000001 /* DTR static active */ +#define USLCOM_FLOW_CTS_HS 0x00000008 /* CTS handshake */ +/* USLCOM_SET_FLOWCTRL values - 2nd word */ +#define USLCOM_FLOW_RTS_ON 0x00000040 /* RTS static active */ +#define USLCOM_FLOW_RTS_HS 0x00000080 /* RTS handshake */ + +/* USLCOM_VENDOR_SPECIFIC values */ +#define USLCOM_WRITE_LATCH 0x37E1 +#define USLCOM_READ_LATCH 0x00C2 + enum { USLCOM_BULK_DT_WR, USLCOM_BULK_DT_RD, + USLCOM_CTRL_DT_RD, USLCOM_N_TRANSFER, }; struct uslcom_softc { struct ucom_super_softc sc_super_ucom; struct ucom_softc sc_ucom; + struct usb_callout sc_watchdog; struct usb_xfer *sc_xfer[USLCOM_N_TRANSFER]; struct usb_device *sc_udev; @@ -121,12 +145,15 @@ static device_detach_t uslcom_detach; static usb_callback_t uslcom_write_callback; static usb_callback_t uslcom_read_callback; +static usb_callback_t uslcom_control_callback; static void uslcom_open(struct ucom_softc *); static void uslcom_close(struct ucom_softc *); static void uslcom_set_dtr(struct ucom_softc *, uint8_t); static void uslcom_set_rts(struct ucom_softc *, uint8_t); static void uslcom_set_break(struct ucom_softc *, uint8_t); +static int uslcom_ioctl(struct ucom_softc *, uint32_t, caddr_t, int, + struct thread *); static int uslcom_pre_param(struct ucom_softc *, struct termios *); static void uslcom_param(struct ucom_softc *, struct termios *); static void uslcom_get_status(struct ucom_softc *, uint8_t *, uint8_t *); @@ -143,7 +170,7 @@ static const struct usb_config uslcom_co .endpoint = UE_ADDR_ANY, .direction = UE_DIR_OUT, .bufsize = USLCOM_BULK_BUF_SIZE, - .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, + .flags = {.pipe_bof = 1,}, .callback = &uslcom_write_callback, }, @@ -155,6 +182,15 @@ static const struct usb_config uslcom_co .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &uslcom_read_callback, }, + [USLCOM_CTRL_DT_RD] = { + .type = UE_CONTROL, + .endpoint = 0x00, + .direction = UE_DIR_ANY, + .bufsize = sizeof(struct usb_device_request) + 8, + .flags = {.pipe_bof = 1,}, + .callback = &uslcom_control_callback, + .timeout = 1000, /* 1 second timeout */ + }, }; static struct ucom_callback uslcom_callback = { @@ -164,6 +200,7 @@ static struct ucom_callback uslcom_callb .ucom_cfg_set_dtr = &uslcom_set_dtr, .ucom_cfg_set_rts = &uslcom_set_rts, .ucom_cfg_set_break = &uslcom_set_break, + .ucom_ioctl = &uslcom_ioctl, .ucom_cfg_param = &uslcom_param, .ucom_pre_param = &uslcom_pre_param, .ucom_start_read = &uslcom_start_read, @@ -280,6 +317,19 @@ MODULE_DEPEND(uslcom, ucom, 1, 1, 1); MODULE_DEPEND(uslcom, usb, 1, 1, 1); MODULE_VERSION(uslcom, 1); +static void +uslcom_watchdog(void *arg) +{ + struct uslcom_softc *sc = arg; + + mtx_assert(&sc->sc_mtx, MA_OWNED); + + usbd_transfer_start(sc->sc_xfer[USLCOM_CTRL_DT_RD]); + + usb_callout_reset(&sc->sc_watchdog, + hz / 4, &uslcom_watchdog, sc); +} + static int uslcom_probe(device_t dev) { @@ -310,6 +360,7 @@ uslcom_attach(device_t dev) device_set_usb_desc(dev); mtx_init(&sc->sc_mtx, "uslcom", NULL, MTX_DEF); + usb_callout_init_mtx(&sc->sc_watchdog, &sc->sc_mtx, 0); sc->sc_udev = uaa->device; @@ -350,6 +401,8 @@ uslcom_detach(device_t dev) ucom_detach(&sc->sc_super_ucom, &sc->sc_ucom); usbd_transfer_unsetup(sc->sc_xfer, USLCOM_N_TRANSFER); + + usb_callout_drain(&sc->sc_watchdog); mtx_destroy(&sc->sc_mtx); return (0); @@ -371,6 +424,9 @@ uslcom_open(struct ucom_softc *ucom) &req, NULL, 0, 1000)) { DPRINTF("UART enable failed (ignored)\n"); } + + /* start polling status */ + uslcom_watchdog(sc); } static void @@ -379,13 +435,16 @@ uslcom_close(struct ucom_softc *ucom) struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; + /* stop polling status */ + usb_callout_stop(&sc->sc_watchdog); + req.bmRequestType = USLCOM_WRITE; req.bRequest = USLCOM_UART; USETW(req.wValue, USLCOM_UART_DISABLE); USETW(req.wIndex, USLCOM_PORT_NO); USETW(req.wLength, 0); - if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, &req, NULL, 0, 1000)) { DPRINTF("UART disable failed (ignored)\n"); } @@ -452,6 +511,7 @@ uslcom_param(struct ucom_softc *ucom, st { struct uslcom_softc *sc = ucom->sc_parent; struct usb_device_request req; + uint32_t flowctrl[4]; uint16_t data; DPRINTF("\n"); @@ -503,7 +563,28 @@ uslcom_param(struct ucom_softc *ucom, st &req, NULL, 0, 1000)) { DPRINTF("Set format failed (ignored)\n"); } - return; + + if (t->c_cflag & CRTSCTS) { + flowctrl[0] = htole32(USLCOM_FLOW_DTR_ON | USLCOM_FLOW_CTS_HS); + flowctrl[1] = htole32(USLCOM_FLOW_RTS_HS); + flowctrl[2] = 0; + flowctrl[3] = 0; + } else { + flowctrl[0] = htole32(USLCOM_FLOW_DTR_ON); + flowctrl[1] = htole32(USLCOM_FLOW_RTS_ON); + flowctrl[2] = 0; + flowctrl[3] = 0; + } + req.bmRequestType = USLCOM_WRITE; + req.bRequest = USLCOM_SET_FLOWCTRL; + USETW(req.wValue, 0); + USETW(req.wIndex, USLCOM_PORT_NO); + USETW(req.wLength, sizeof(flowctrl)); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, flowctrl, 0, 1000)) { + DPRINTF("Set flowcontrol failed (ignored)\n"); + } } static void @@ -536,6 +617,55 @@ uslcom_set_break(struct ucom_softc *ucom } } +static int +uslcom_ioctl(struct ucom_softc *ucom, uint32_t cmd, caddr_t data, + int flag, struct thread *td) +{ + struct uslcom_softc *sc = ucom->sc_parent; + struct usb_device_request req; + int error = 0; + uint8_t latch; + + DPRINTF("cmd=0x%08x\n", cmd); + + switch (cmd) { + case USB_GET_GPIO: + req.bmRequestType = USLCOM_READ; + req.bRequest = USLCOM_VENDOR_SPECIFIC; + USETW(req.wValue, USLCOM_READ_LATCH); + USETW(req.wIndex, 0); + USETW(req.wLength, sizeof(latch)); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, &latch, 0, 1000)) { + DPRINTF("Get LATCH failed\n"); + error = EIO; + } + *(int *)data = latch; + break; + + case USB_SET_GPIO: + req.bmRequestType = USLCOM_WRITE; + req.bRequest = USLCOM_VENDOR_SPECIFIC; + USETW(req.wValue, USLCOM_WRITE_LATCH); + USETW(req.wIndex, (*(int *)data)); + USETW(req.wLength, 0); + + if (ucom_cfg_do_request(sc->sc_udev, &sc->sc_ucom, + &req, NULL, 0, 1000)) { + DPRINTF("Set LATCH failed\n"); + error = EIO; + } + break; + + default: + DPRINTF("Unknown IOCTL\n"); + error = ENOIOCTL; + break; + } + return (error); +} + static void uslcom_write_callback(struct usb_xfer *xfer, usb_error_t error) { @@ -599,6 +729,59 @@ tr_setup: } static void +uslcom_control_callback(struct usb_xfer *xfer, usb_error_t error) +{ + struct uslcom_softc *sc = usbd_xfer_softc(xfer); + struct usb_page_cache *pc; + struct usb_device_request req; + uint8_t msr = 0; + uint8_t buf; + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + pc = usbd_xfer_get_frame(xfer, 1); + usbd_copy_out(pc, 0, &buf, sizeof(buf)); + if (buf & USLCOM_CTRL_CTS) + msr |= SER_CTS; + if (buf & USLCOM_CTRL_DSR) + msr |= SER_DSR; + if (buf & USLCOM_CTRL_RI) + msr |= SER_RI; + if (buf & USLCOM_CTRL_DCD) + msr |= SER_DCD; + + if (msr != sc->sc_msr) { + DPRINTF("status change msr=0x%02x " + "(was 0x%02x)\n", msr, sc->sc_msr); + sc->sc_msr = msr; + ucom_status_change(&sc->sc_ucom); + } + break; + + case USB_ST_SETUP: + req.bmRequestType = USLCOM_READ; + req.bRequest = USLCOM_RCTRL; + USETW(req.wValue, 0); + USETW(req.wIndex, USLCOM_PORT_NO); + USETW(req.wLength, sizeof(buf)); + + usbd_xfer_set_frames(xfer, 2); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 1, sizeof(buf)); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_transfer_submit(xfer); + break; + + default: /* error */ + if (error != USB_ERR_CANCELLED) + DPRINTF("error=%s\n", usbd_errstr(error)); + break; + } +} + +static void uslcom_start_read(struct ucom_softc *ucom) { struct uslcom_softc *sc = ucom->sc_parent; Modified: stable/9/sys/dev/usb/usb_ioctl.h ============================================================================== --- stable/9/sys/dev/usb/usb_ioctl.h Sat Dec 31 13:12:10 2011 (r229081) +++ stable/9/sys/dev/usb/usb_ioctl.h Sat Dec 31 13:12:29 2011 (r229082) @@ -289,6 +289,10 @@ struct usb_gen_quirk { #define USB_GET_CM_OVER_DATA _IOR ('U', 180, int) #define USB_SET_CM_OVER_DATA _IOW ('U', 181, int) +/* GPIO control */ +#define USB_GET_GPIO _IOR ('U', 182, int) +#define USB_SET_GPIO _IOW ('U', 183, int) + /* USB file system interface */ #define USB_FS_START _IOW ('U', 192, struct usb_fs_start) #define USB_FS_STOP _IOW ('U', 193, struct usb_fs_stop) From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:13:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED539106566B; Sat, 31 Dec 2011 13:13:42 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D41D88FC1D; Sat, 31 Dec 2011 13:13:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDDg9T064604; Sat, 31 Dec 2011 13:13:42 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDDgmw064602; Sat, 31 Dec 2011 13:13:42 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201112311313.pBVDDgmw064602@svn.freebsd.org> From: Gabor Kovesdan Date: Sat, 31 Dec 2011 13:13:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229083 - stable/9/usr.bin/mkesdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:13:43 -0000 Author: gabor Date: Sat Dec 31 13:13:42 2011 New Revision: 229083 URL: http://svn.freebsd.org/changeset/base/229083 Log: MFC r228766: - Remove a GCC-specific compiler flag that was added before to eliminate some warnings but at the moment does not seem to be necessary. Modified: stable/9/usr.bin/mkesdb/Makefile.inc Directory Properties: stable/9/usr.bin/mkesdb/ (props changed) Modified: stable/9/usr.bin/mkesdb/Makefile.inc ============================================================================== --- stable/9/usr.bin/mkesdb/Makefile.inc Sat Dec 31 13:12:29 2011 (r229082) +++ stable/9/usr.bin/mkesdb/Makefile.inc Sat Dec 31 13:13:42 2011 (r229083) @@ -2,5 +2,4 @@ SRCS+= lex.l yacc.y CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mkesdb \ - -I${.CURDIR}/../../lib/libc/iconv \ - --param max-inline-insns-single=64 + -I${.CURDIR}/../../lib/libc/iconv From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:23:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E4AE106566B; Sat, 31 Dec 2011 13:23:05 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 06BDB8FC0A; Sat, 31 Dec 2011 13:23:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDN4jg064945; Sat, 31 Dec 2011 13:23:04 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDN49w064941; Sat, 31 Dec 2011 13:23:04 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311323.pBVDN49w064941@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:23:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229084 - in stable/9/sys/dev/usb: . controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:23:05 -0000 Author: hselasky Date: Sat Dec 31 13:23:04 2011 New Revision: 229084 URL: http://svn.freebsd.org/changeset/base/229084 Log: MFC r227396, r227401, r227541, r227654 and r228493: Relax XHCI timeouts which should fix enumeration issues. Fix definition of XHCI port power bit. Correct size of some USB 3.0 descriptor fields. Reported by: Kohji Okuno, Jan Henrik Sylvester Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhcireg.h stable/9/sys/dev/usb/usb.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Sat Dec 31 13:13:42 2011 (r229083) +++ stable/9/sys/dev/usb/controller/xhci.c Sat Dec 31 13:23:04 2011 (r229084) @@ -292,7 +292,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, oper, XHCI_USBCMD, XHCI_CMD_HCRST); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBCMD) & (XHCI_CMD_HCRST | XHCI_STS_CNR); if (!temp) @@ -453,7 +453,7 @@ xhci_start_controller(struct xhci_softc XHCI_CMD_INTE | XHCI_CMD_HSEE); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH; if (!temp) break; @@ -487,7 +487,7 @@ xhci_halt_controller(struct xhci_softc * XWRITE4(sc, oper, XHCI_USBCMD, 0); for (i = 0; i != 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 100); temp = XREAD4(sc, oper, XHCI_USBSTS) & XHCI_STS_HCH; if (temp) break; @@ -1110,7 +1110,7 @@ xhci_cmd_nop(struct xhci_softc *sc) trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } #endif @@ -1127,7 +1127,7 @@ xhci_cmd_enable_slot(struct xhci_softc * trb.dwTrb2 = 0; trb.dwTrb3 = htole32(XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_ENABLE_SLOT)); - err = xhci_do_command(sc, &trb, 50 /* ms */); + err = xhci_do_command(sc, &trb, 100 /* ms */); if (err) goto done; @@ -1154,7 +1154,7 @@ xhci_cmd_disable_slot(struct xhci_softc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1310,7 +1310,7 @@ xhci_cmd_configure_ep(struct xhci_softc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1328,7 +1328,7 @@ xhci_cmd_evaluate_ctx(struct xhci_softc XHCI_TRB_3_SLOT_SET(slot_id); trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1351,7 +1351,7 @@ xhci_cmd_reset_ep(struct xhci_softc *sc, trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1373,7 +1373,7 @@ xhci_cmd_set_tr_dequeue_ptr(struct xhci_ XHCI_TRB_3_EP_SET(ep_id); trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1396,7 +1396,7 @@ xhci_cmd_stop_ep(struct xhci_softc *sc, trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } static usb_error_t @@ -1414,7 +1414,7 @@ xhci_cmd_reset_dev(struct xhci_softc *sc trb.dwTrb3 = htole32(temp); - return (xhci_do_command(sc, &trb, 50 /* ms */)); + return (xhci_do_command(sc, &trb, 100 /* ms */)); } /*------------------------------------------------------------------------* @@ -2831,7 +2831,7 @@ struct xhci_bos_desc xhci_bosd = { .bLength = sizeof(xhci_bosd.usb2extd), .bDescriptorType = 1, .bDevCapabilityType = 2, - .bmAttributes = 2, + .bmAttributes[0] = 2, }, .usbdcd = { .bLength = sizeof(xhci_bosd.usbdcd), @@ -2841,7 +2841,8 @@ struct xhci_bos_desc xhci_bosd = { HSETW(.wSpeedsSupported, 0x000C), .bFunctionalitySupport = 8, .bU1DevExitLat = 255, /* dummy - not used */ - .bU2DevExitLat = 255, /* dummy - not used */ + .wU2DevExitLat[0] = 0x00, + .wU2DevExitLat[1] = 0x08, }, .cidd = { .bLength = sizeof(xhci_bosd.cidd), Modified: stable/9/sys/dev/usb/controller/xhcireg.h ============================================================================== --- stable/9/sys/dev/usb/controller/xhcireg.h Sat Dec 31 13:13:42 2011 (r229083) +++ stable/9/sys/dev/usb/controller/xhcireg.h Sat Dec 31 13:23:04 2011 (r229084) @@ -115,7 +115,7 @@ #define XHCI_PS_PR 0x00000010 /* RW - port reset */ #define XHCI_PS_PLS_GET(x) (((x) >> 5) & 0xF) /* RW - port link state */ #define XHCI_PS_PLS_SET(x) (((x) & 0xF) << 5) /* RW - port link state */ -#define XHCI_PS_PP 0x00000100 /* RW - port power */ +#define XHCI_PS_PP 0x00000200 /* RW - port power */ #define XHCI_PS_SPEED_GET(x) (((x) >> 10) & 0xF) /* RO - port speed */ #define XHCI_PS_PIC_GET(x) (((x) >> 14) & 0x3) /* RW - port indicator */ #define XHCI_PS_PIC_SET(x) (((x) & 0x3) << 14) /* RW - port indicator */ Modified: stable/9/sys/dev/usb/usb.h ============================================================================== --- stable/9/sys/dev/usb/usb.h Sat Dec 31 13:13:42 2011 (r229083) +++ stable/9/sys/dev/usb/usb.h Sat Dec 31 13:23:04 2011 (r229084) @@ -323,7 +323,7 @@ struct usb_devcap_usb2ext_descriptor { uByte bLength; uByte bDescriptorType; uByte bDevCapabilityType; - uByte bmAttributes; + uDWord bmAttributes; #define USB_V2EXT_LPM 0x02 } __packed; typedef struct usb_devcap_usb2ext_descriptor usb_devcap_usb2ext_descriptor_t; @@ -336,7 +336,7 @@ struct usb_devcap_ss_descriptor { uWord wSpeedsSupported; uByte bFunctionalitySupport; uByte bU1DevExitLat; - uByte bU2DevExitLat; + uWord wU2DevExitLat; } __packed; typedef struct usb_devcap_ss_descriptor usb_devcap_ss_descriptor_t; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:24:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39708106564A; Sat, 31 Dec 2011 13:24:54 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B57F8FC16; Sat, 31 Dec 2011 13:24:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDOrIs065033; Sat, 31 Dec 2011 13:24:53 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDOriM065030; Sat, 31 Dec 2011 13:24:53 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201112311324.pBVDOriM065030@svn.freebsd.org> From: Gavin Atkinson Date: Sat, 31 Dec 2011 13:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229085 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:24:54 -0000 Author: gavin Date: Sat Dec 31 13:24:53 2011 New Revision: 229085 URL: http://svn.freebsd.org/changeset/base/229085 Log: Default to not performing the early-boot memory tests when we detect we are booting inside a VM. There are three reasons to disable this: o It causes the VM host to believe that all the tested pages or RAM are in use. This in turn may force the host to page out pages of RAM belonging to other VMs, or otherwise cause problems with fair resource sharing on the VM cluster. o It adds significant time to the boot process (around 1 second/Gig in testing) o It is unnecessary - the host should have already verified that the memory is functional etc. Note that this simply changes the default when in a VM - it can still be overridden using the hw.memtest.tests tunable. MFC after: 4 weeks Modified: head/sys/amd64/amd64/machdep.c head/sys/i386/i386/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Dec 31 13:23:04 2011 (r229084) +++ head/sys/amd64/amd64/machdep.c Sat Dec 31 13:24:53 2011 (r229085) @@ -1401,10 +1401,13 @@ getmemsize(caddr_t kmdp, u_int64_t first Maxmem = atop(physmem_tunable); /* - * By default keep the memtest enabled. Use a general name so that + * By default enable the memory test on real hardware, and disable + * it if we appear to be running in a VM. This avoids touching all + * pages unnecessarily, which doesn't matter on real hardware but is + * bad for shared VM hosts. Use a general name so that * one could eventually do more with the code than just disable it. */ - memtest = 1; + memtest = (vm_guest > VM_GUEST_NO) ? 0 : 1; TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); /* Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Sat Dec 31 13:23:04 2011 (r229084) +++ head/sys/i386/i386/machdep.c Sat Dec 31 13:24:53 2011 (r229085) @@ -2369,10 +2369,13 @@ physmap_done: Maxmem = atop(physmap[physmap_idx + 1]); /* - * By default keep the memtest enabled. Use a general name so that + * By default enable the memory test on real hardware, and disable + * it if we appear to be running in a VM. This avoids touching all + * pages unnecessarily, which doesn't matter on real hardware but is + * bad for shared VM hosts. Use a general name so that * one could eventually do more with the code than just disable it. */ - memtest = 1; + memtest = (vm_guest > VM_GUEST_NO) ? 0 : 1; TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest); if (atop(physmap[physmap_idx + 1]) != Maxmem && From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:34:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE5D7106566C; Sat, 31 Dec 2011 13:34:42 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ADBA28FC13; Sat, 31 Dec 2011 13:34:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDYgHa065353; Sat, 31 Dec 2011 13:34:42 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDYgSV065349; Sat, 31 Dec 2011 13:34:42 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311334.pBVDYgSV065349@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 13:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229086 - head/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:34:43 -0000 Author: hselasky Date: Sat Dec 31 13:34:42 2011 New Revision: 229086 URL: http://svn.freebsd.org/changeset/base/229086 Log: Add missing change to XHCI driver similar to changes in r228483. MFC after: 0 days 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 Sat Dec 31 13:24:53 2011 (r229085) +++ head/sys/dev/usb/controller/xhci.c Sat Dec 31 13:34:42 2011 (r229086) @@ -550,24 +550,27 @@ xhci_uninit(struct xhci_softc *sc) sx_destroy(&sc->sc_cmd_sx); } -void -xhci_suspend(struct xhci_softc *sc) -{ - /* XXX TODO */ -} - -void -xhci_resume(struct xhci_softc *sc) -{ - /* XXX TODO */ -} - -void -xhci_shutdown(struct xhci_softc *sc) +static void +xhci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) { - DPRINTF("Stopping the XHCI\n"); + struct xhci_softc *sc = XHCI_BUS2SC(bus); - xhci_halt_controller(sc); + switch (state) { + case USB_HW_POWER_SUSPEND: + DPRINTF("Stopping the XHCI\n"); + xhci_halt_controller(sc); + break; + case USB_HW_POWER_SHUTDOWN: + DPRINTF("Stopping the XHCI\n"); + xhci_halt_controller(sc); + break; + case USB_HW_POWER_RESUME: + DPRINTF("Starting the XHCI\n"); + xhci_start_controller(sc); + break; + default: + break; + } } static usb_error_t @@ -3928,4 +3931,5 @@ struct usb_bus_methods xhci_bus_methods .set_address = xhci_set_address, .clear_stall = xhci_ep_clear_stall, .device_state_change = xhci_device_state_change, + .set_hw_power_sleep = xhci_set_hw_power_sleep, }; Modified: head/sys/dev/usb/controller/xhci.h ============================================================================== --- head/sys/dev/usb/controller/xhci.h Sat Dec 31 13:24:53 2011 (r229085) +++ head/sys/dev/usb/controller/xhci.h Sat Dec 31 13:34:42 2011 (r229086) @@ -494,9 +494,6 @@ usb_error_t xhci_halt_controller(struct usb_error_t xhci_init(struct xhci_softc *, device_t); usb_error_t xhci_start_controller(struct xhci_softc *); void xhci_interrupt(struct xhci_softc *); -void xhci_resume(struct xhci_softc *); -void xhci_shutdown(struct xhci_softc *); -void xhci_suspend(struct xhci_softc *); void xhci_uninit(struct xhci_softc *); #endif /* _XHCI_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:35:49 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 611181065670; Sat, 31 Dec 2011 13:35:49 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 0F17F8FC0A; Sat, 31 Dec 2011 13:35:49 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 4057E25D385D; Sat, 31 Dec 2011 13:35:48 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 6CF93BD82D6; Sat, 31 Dec 2011 13:35:47 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id wjWnXc0XTbZb; Sat, 31 Dec 2011 13:35:46 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4FCB5BD82D5; Sat, 31 Dec 2011 13:35:46 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201112311324.pBVDOriM065030@svn.freebsd.org> Date: Sat, 31 Dec 2011 13:35:45 +0000 Content-Transfer-Encoding: 7bit Message-Id: <74F5764C-9E62-4B17-A142-984A9C8ECEF4@FreeBSD.org> References: <201112311324.pBVDOriM065030@svn.freebsd.org> To: Gavin Atkinson X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229085 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:35:49 -0000 On 31. Dec 2011, at 13:24 , Gavin Atkinson wrote: > Author: gavin > Date: Sat Dec 31 13:24:53 2011 > New Revision: 229085 > URL: http://svn.freebsd.org/changeset/base/229085 > > Log: > Default to not performing the early-boot memory tests when we detect we > are booting inside a VM. There are three reasons to disable this: > > o It causes the VM host to believe that all the tested pages or RAM are > in use. This in turn may force the host to page out pages of RAM > belonging to other VMs, or otherwise cause problems with fair resource > sharing on the VM cluster. > o It adds significant time to the boot process (around 1 second/Gig in > testing) Well for that argument the tunable exists... > o It is unnecessary - the host should have already verified that the > memory is functional etc. > > Note that this simply changes the default when in a VM - it can still be > overridden using the hw.memtest.tests tunable. > Thanks a lot for committing this! May I ask for a slightly earlier MFC than 4 weeks? /bz -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:37:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196A8106564A; Sat, 31 Dec 2011 13:37:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDE1B8FC13; Sat, 31 Dec 2011 13:37:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDbPjh065480; Sat, 31 Dec 2011 13:37:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDbPE8065478; Sat, 31 Dec 2011 13:37:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311337.pBVDbPE8065478@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 13:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229087 - stable/9/share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:37:26 -0000 Author: dim Date: Sat Dec 31 13:37:25 2011 New Revision: 229087 URL: http://svn.freebsd.org/changeset/base/229087 Log: MFC r228546: Clang has more warnings enabled by default, and when using -Wall, so if WARNS is set to low values, some of them have to be disabled explicitly. MFC r228551: Disable one more clang warning when WARNS <= 3. MFC r228606: Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang, to selectively work around warnings in programs that don't use flexible array members, but instead define arrays of length 1 at the end of the struct, and then access those beyond their declared bounds. MFC r228617: Disable yet another clang warning when WARNS <= 3. MFC r228675: Disable yet another clang warning (-Wconversion) when WARNS <= 3. MFC r228677: Disable another clang warning (-Wempty-body) when WARNS <= 2. Modified: stable/9/share/mk/bsd.sys.mk Directory Properties: stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Sat Dec 31 13:34:42 2011 (r229086) +++ stable/9/share/mk/bsd.sys.mk Sat Dec 31 13:37:25 2011 (r229087) @@ -57,6 +57,24 @@ CWARNFLAGS += -Wchar-subscripts -Winline CWARNFLAGS += -Wno-uninitialized . endif CWARNFLAGS += -Wno-pointer-sign +# Clang has more warnings enabled by default, and when using -Wall, so if WARNS +# is set to low values, these have to be disabled explicitly. +. if ${CC:T:Mclang} == "clang" +. if ${WARNS} <= 3 +CWARNFLAGS += -Wno-tautological-compare -Wno-unused-value\ + -Wno-parentheses-equality -Wno-unused-function\ + -Wno-conversion +. endif +. if ${WARNS} <= 2 +CWARNFLAGS += -Wno-switch-enum -Wno-empty-body +. endif +. if ${WARNS} <= 1 +CWARNFLAGS += -Wno-parentheses +. endif +. if defined(NO_WARRAY_BOUNDS) +CWARNFLAGS += -Wno-array-bounds +. endif +. endif . endif . if defined(FORMAT_AUDIT) From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:43:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE2F6106564A; Sat, 31 Dec 2011 13:43:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A71EF8FC08; Sat, 31 Dec 2011 13:43:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDhpcp065744; Sat, 31 Dec 2011 13:43:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDhp67065741; Sat, 31 Dec 2011 13:43:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311343.pBVDhp67065741@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 13:43:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229088 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:43:51 -0000 Author: dim Date: Sat Dec 31 13:43:51 2011 New Revision: 229088 URL: http://svn.freebsd.org/changeset/base/229088 Log: MFC r228547: Cast away a clang alignment warning in drti.c's fixsymbol() function. This code only runs on i386 and amd64, so there should be no problems if buf + sec->dofs_offset is not aligned (which is unlikely anyway). Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Dec 31 13:37:25 2011 (r229087) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Dec 31 13:43:51 2011 (r229088) @@ -102,7 +102,7 @@ fixsymbol(Elf *e, Elf_Data *data, size_t int ndx; while (gelf_getsym(data, j++, &sym) != NULL) { - prb = (dof_probe_t *)(buf + sec->dofs_offset); + prb = (dof_probe_t *)(void *)(buf + sec->dofs_offset); for (ndx = nprobes; ndx; ndx--, prb += 1) { funcname = dofstrtab + prb->dofpr_func; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:44:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3838410657F7; Sat, 31 Dec 2011 13:44:11 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2390E8FC0A; Sat, 31 Dec 2011 13:44:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDiAb9065802; Sat, 31 Dec 2011 13:44:10 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDiAN6065799; Sat, 31 Dec 2011 13:44:10 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201112311344.pBVDiAN6065799@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 31 Dec 2011 13:44:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229089 - in releng/9.0: . sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:44:11 -0000 Author: bz Date: Sat Dec 31 13:44:10 2011 New Revision: 229089 URL: http://svn.freebsd.org/changeset/base/229089 Log: MFC r229067 (by obrien): Happy 2012 and may 9.0-RELEASE be a good one. Approved by: re (kib) Modified: releng/9.0/COPYRIGHT (contents, props changed) releng/9.0/sys/sys/copyright.h Directory Properties: releng/9.0/sys/ (props changed) Modified: releng/9.0/COPYRIGHT ============================================================================== --- releng/9.0/COPYRIGHT Sat Dec 31 13:43:51 2011 (r229088) +++ releng/9.0/COPYRIGHT Sat Dec 31 13:44:10 2011 (r229089) @@ -4,7 +4,7 @@ The compilation of software known as FreeBSD is distributed under the following terms: -Copyright (c) 1992-2011 The FreeBSD Project. All rights reserved. +Copyright (c) 1992-2012 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions Modified: releng/9.0/sys/sys/copyright.h ============================================================================== --- releng/9.0/sys/sys/copyright.h Sat Dec 31 13:43:51 2011 (r229088) +++ releng/9.0/sys/sys/copyright.h Sat Dec 31 13:44:10 2011 (r229089) @@ -1,5 +1,5 @@ /*- - * Copyright (C) 1992-2011 The FreeBSD Project. All rights reserved. + * Copyright (C) 1992-2012 The FreeBSD Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,7 @@ /* FreeBSD */ #define COPYRIGHT_FreeBSD \ - "Copyright (c) 1992-2011 The FreeBSD Project.\n" + "Copyright (c) 1992-2012 The FreeBSD Project.\n" /* Foundation */ #define TRADEMARK_Foundation \ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:51:15 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 910E8106566C; Sat, 31 Dec 2011 13:51:15 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD2A8FC14; Sat, 31 Dec 2011 13:51:15 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 2E6D825D37C3; Sat, 31 Dec 2011 13:51:14 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 54810BD82DA; Sat, 31 Dec 2011 13:51:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 59MxzfDJGoS8; Sat, 31 Dec 2011 13:51:11 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CFD0FBD82D9; Sat, 31 Dec 2011 13:51:11 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201112290551.pBT5pnbp041788@svn.freebsd.org> Date: Sat, 31 Dec 2011 13:51:10 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201112290551.pBT5pnbp041788@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r228944 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:51:15 -0000 On 29. Dec 2011, at 05:51 , Adrian Chadd wrote: > Author: adrian > Date: Thu Dec 29 05:51:48 2011 > New Revision: 228944 > URL: http://svn.freebsd.org/changeset/base/228944 >=20 > Log: > Break out the AR71XX config file into _BASE and board specific > bits. >=20 > The ROUERSTATION and RSPRO variants contain: >=20 > * the board specific bits (eg the RTC for RSPRO, later on it'll > include the GPIO/LED definitions); > * the boot specific bits (eg, on-board flash, usb flash, etc). >=20 > For now the AR71XX_BASE file contains the common board config, > drivers and net80211/ath wireless drivers. >=20 > I'll follow this up with config files for the other boards I > have (eg the Ubiquiti LSSR71, as well as some Mikrotik boards > that use the AR71XX and atheros reference boards) which will > be quite easy to do now. >=20 > Added: > head/sys/mips/conf/AR71XX_BASE (contents, props changed) > head/sys/mips/conf/AR71XX_BASE.hints (contents, props changed) > head/sys/mips/conf/ROUTERSTATION (contents, props changed) > head/sys/mips/conf/ROUTERSTATION.hints (contents, props changed) > head/sys/mips/conf/ROUTERSTATION_MFS (contents, props changed) > head/sys/mips/conf/RSPRO (contents, props changed) > head/sys/mips/conf/RSPRO.hints (contents, props changed) > head/sys/mips/conf/RSPRO_MFS (contents, props changed) > head/sys/mips/conf/RSPRO_STANDALONE (contents, props changed) > Deleted: > head/sys/mips/conf/AR71XX > head/sys/mips/conf/AR71XX.hints >=20 > Added: head/sys/mips/conf/ROUTERSTATION > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/mips/conf/ROUTERSTATION Thu Dec 29 05:51:48 2011 = (r228944) > @@ -0,0 +1,24 @@ > +# > +# Ubiquiti Routerstation: Boot from onboard flash > +# > +# $FreeBSD$ > +# > + > +include "UBNT_AR71XX_BASE" That file does not exist causing the build and universe to fail. > +ident "ROUTERSTATION" > +hints "ROUTERSTATION.hints" > + > +# XXX Is there an RTC on the RS? > + > +# GEOM modules > +device geom_redboot # to get access to the SPI flash = partitions > +device geom_uzip # compressed in-memory = filesystem support > +options GEOM_UZIP > + > +# For DOS > +options GEOM_PART_BSD > +options GEOM_PART_MBR > +options MSDOSFS > + > +# Boot path - redboot MFS > +options ROOTDEVNAME=3D\"ufs:redboot/rootfs.uzip\" --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 13:56:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C09E8106564A; Sat, 31 Dec 2011 13:56:32 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA9958FC08; Sat, 31 Dec 2011 13:56:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVDuWW8066235; Sat, 31 Dec 2011 13:56:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVDuWkF066233; Sat, 31 Dec 2011 13:56:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311356.pBVDuWkF066233@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 13:56:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229090 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 13:56:32 -0000 Author: dim Date: Sat Dec 31 13:56:32 2011 New Revision: 229090 URL: http://svn.freebsd.org/changeset/base/229090 Log: MFC r228548: In cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c, use the correct printf format for an unsigned long. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Sat Dec 31 13:44:10 2011 (r229089) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c Sat Dec 31 13:56:32 2011 (r229090) @@ -436,7 +436,7 @@ dt_pid_create_glob_offset_probes(struct char name[sizeof (i) * 2 + 1]; for (i = 0; i < end; i += size) { - (void) snprintf(name, sizeof (name), "%x", i); + (void) snprintf(name, sizeof (name), "%lx", i); if (gmatch(name, pattern)) ftp->ftps_offs[ftp->ftps_noffs++] = i; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:00:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 918D6106566B; Sat, 31 Dec 2011 14:00:23 +0000 (UTC) (envelope-from gleb.kurtsou@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2AFC18FC14; Sat, 31 Dec 2011 14:00:18 +0000 (UTC) Received: by lahl5 with SMTP id l5so7874011lah.13 for ; Sat, 31 Dec 2011 06:00:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ezng8Mw8gawui6Qzo7/Xo2W2CV395B8rIKVhY1zJ+pU=; b=VBEk5qk7tWlIHWNWSn3ezdaXu6LL/IwWoXyya2V6j6fHxbggU4p5NTpsLkGLr0kmEV 57rZjsxvkEAemZXP5S+2NHcAamEapZ41Hkz6lzAtdG/cK9vgjtSwDrdwNci1q8TtjJub Lq/GYu5HEKD0GqIpeWA6ANmrSC0yoz2e3pZPg= Received: by 10.152.128.103 with SMTP id nn7mr34755516lab.48.1325340017382; Sat, 31 Dec 2011 06:00:17 -0800 (PST) Received: from localhost ([78.157.92.5]) by mx.google.com with ESMTPS id mg13sm16205448lab.5.2011.12.31.06.00.16 (version=SSLv3 cipher=OTHER); Sat, 31 Dec 2011 06:00:16 -0800 (PST) Date: Sat, 31 Dec 2011 16:00:27 +0200 From: Gleb Kurtsou To: Gabor Kovesdan Message-ID: <20111231140027.GA3487@reks> References: <201112311312.pBVDCBja064475@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201112311312.pBVDCBja064475@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:00:23 -0000 On (31/12/2011 13:12), Gabor Kovesdan wrote: > Author: gabor > Date: Sat Dec 31 13:12:10 2011 > New Revision: 229081 > URL: http://svn.freebsd.org/changeset/base/229081 > > Log: > MFC r228099: > - Create links to the xz and lzma versions even if BSD grep is not the > default. Nor GNU nor liblzma in base provides such functionality so > it may be useful. > > MFC r228319: > - Match GNU behavior of exit code > - Rename variable that has a different meaning now > > Modified: > stable/9/usr.bin/grep/Makefile > stable/9/usr.bin/grep/grep.c > stable/9/usr.bin/grep/grep.h > stable/9/usr.bin/grep/util.c > Directory Properties: > stable/9/usr.bin/grep/ (props changed) > > Modified: stable/9/usr.bin/grep/Makefile > ============================================================================== > --- stable/9/usr.bin/grep/Makefile Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/Makefile Sat Dec 31 13:12:10 2011 (r229081) > @@ -25,13 +25,7 @@ LINKS= ${BINDIR}/grep ${BINDIR}/egrep \ > ${BINDIR}/grep ${BINDIR}/fgrep \ > ${BINDIR}/grep ${BINDIR}/zgrep \ > ${BINDIR}/grep ${BINDIR}/zegrep \ > - ${BINDIR}/grep ${BINDIR}/zfgrep \ > - ${BINDIR}/grep ${BINDIR}/xzgrep \ > - ${BINDIR}/grep ${BINDIR}/xzegrep \ > - ${BINDIR}/grep ${BINDIR}/xzfgrep \ > - ${BINDIR}/grep ${BINDIR}/lzgrep \ > - ${BINDIR}/grep ${BINDIR}/lzegrep \ > - ${BINDIR}/grep ${BINDIR}/lzfgrep > + ${BINDIR}/grep ${BINDIR}/zfgrep Is there a reason we need all this mess is the first place? 12 grep links under /usr/bin. Why not to make zgrep handle all compression types. Tranparent compression handling in tar was a great success. Thanks, Gleb. > > MLINKS= grep.1 egrep.1 \ > grep.1 fgrep.1 \ > @@ -46,6 +40,13 @@ MLINKS= grep.1 egrep.1 \ > grep.1 lzfgrep.1 > .endif > > +LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \ > + ${BINDIR}/${PROG} ${BINDIR}/xzegrep \ > + ${BINDIR}/${PROG} ${BINDIR}/xzfgrep \ > + ${BINDIR}/${PROG} ${BINDIR}/lzgrep \ > + ${BINDIR}/${PROG} ${BINDIR}/lzegrep \ > + ${BINDIR}/${PROG} ${BINDIR}/lzfgrep > + > LDADD= -lz -llzma > DPADD= ${LIBZ} ${LIBLZMA} > > > Modified: stable/9/usr.bin/grep/grep.c > ============================================================================== > --- stable/9/usr.bin/grep/grep.c Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/grep.c Sat Dec 31 13:12:10 2011 (r229081) > @@ -148,7 +148,7 @@ static inline const char *init_color(con > bool first = true; /* flag whether we are processing the first match */ > bool prev; /* flag whether or not the previous line matched */ > int tail; /* lines left to print */ > -bool notfound; /* file not found */ > +bool file_err; /* file reading error */ > > /* > * Prints usage information and returns 2. > @@ -728,5 +728,5 @@ main(int argc, char *argv[]) > > /* Find out the correct return value according to the > results and the command line option. */ > - exit(c ? (notfound ? (qflag ? 0 : 2) : 0) : (notfound ? 2 : 1)); > + exit(c ? (file_err ? (qflag ? 0 : 2) : 0) : (file_err ? 2 : 1)); > } > > Modified: stable/9/usr.bin/grep/grep.h > ============================================================================== > --- stable/9/usr.bin/grep/grep.h Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/grep.h Sat Dec 31 13:12:10 2011 (r229081) > @@ -119,7 +119,7 @@ extern char *label; > extern const char *color; > extern int binbehave, devbehave, dirbehave, filebehave, grepbehave, linkbehave; > > -extern bool first, matchall, notfound, prev; > +extern bool file_err, first, matchall, prev; > extern int tail; > extern unsigned int dpatterns, fpatterns, patterns; > extern struct pat *pattern; > > Modified: stable/9/usr.bin/grep/util.c > ============================================================================== > --- stable/9/usr.bin/grep/util.c Sat Dec 31 13:07:09 2011 (r229080) > +++ stable/9/usr.bin/grep/util.c Sat Dec 31 13:12:10 2011 (r229081) > @@ -130,7 +130,7 @@ grep_tree(char **argv) > case FTS_DNR: > /* FALLTHROUGH */ > case FTS_ERR: > - notfound = true; > + file_err = true; > if(!sflag) > warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); > break; > @@ -195,10 +195,9 @@ procfile(const char *fn) > f = grep_open(fn); > } > if (f == NULL) { > + file_err = true; > if (!sflag) > warn("%s", fn); > - if (errno == ENOENT) > - notfound = true; > return (0); > } > From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:02:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B94631065672; Sat, 31 Dec 2011 14:02:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99BAF8FC14; Sat, 31 Dec 2011 14:02:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVE2G6s066490; Sat, 31 Dec 2011 14:02:16 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVE2G9s066488; Sat, 31 Dec 2011 14:02:16 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311402.pBVE2G9s066488@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:02:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229091 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:02:16 -0000 Author: dim Date: Sat Dec 31 14:02:16 2011 New Revision: 229091 URL: http://svn.freebsd.org/changeset/base/229091 Log: MFC r228549: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c, use the correct printf format for a key_t (aka long). Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Dec 31 13:56:32 2011 (r229090) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c Sat Dec 31 14:02:16 2011 (r229091) @@ -1106,7 +1106,7 @@ process_obj(dtrace_hdl_t *dtp, const cha static const char dt_prefix[] = "__dtrace"; static const char dt_enabled[] = "enabled"; static const char dt_symprefix[] = "$dtrace"; - static const char dt_symfmt[] = "%s%d.%s"; + static const char dt_symfmt[] = "%s%ld.%s"; int fd, i, ndx, eprobe, mod = 0; Elf *elf = NULL; GElf_Ehdr ehdr; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:04:54 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5293106564A; Sat, 31 Dec 2011 14:04:54 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EE258FC0A; Sat, 31 Dec 2011 14:04:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVE4srX066619; Sat, 31 Dec 2011 14:04:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVE4sei066617; Sat, 31 Dec 2011 14:04:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311404.pBVE4sei066617@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:04:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229092 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:04:54 -0000 Author: dim Date: Sat Dec 31 14:04:54 2011 New Revision: 229092 URL: http://svn.freebsd.org/changeset/base/229092 Log: MFC r228550: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c, the dt_popc() function assumes that either _ILP32 or _LP64 is defined, otherwise it has no suitable implementation. However, the _ILP32 and _LP64 macros come from isa_defs.h, which is not included in this file. Add the include now, to get the macros defined. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Sat Dec 31 14:02:16 2011 (r229091) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c Sat Dec 31 14:04:54 2011 (r229092) @@ -27,6 +27,7 @@ #if defined(sun) #include #endif +#include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:05:45 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE644106564A; Sat, 31 Dec 2011 14:05:45 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 715128FC0A; Sat, 31 Dec 2011 14:05:45 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 8C30225D386E; Sat, 31 Dec 2011 14:05:44 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id B8DB3BD82DD; Sat, 31 Dec 2011 14:05:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id SsXaIASehH6W; Sat, 31 Dec 2011 14:05:42 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 8D762BD82DC; Sat, 31 Dec 2011 14:05:42 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201112302122.pBULMAuS031216@svn.freebsd.org> Date: Sat, 31 Dec 2011 14:05:40 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201112302122.pBULMAuS031216@svn.freebsd.org> To: Marius Strobl X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229032 - head/sys/modules/cfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:05:45 -0000 On 30. Dec 2011, at 21:22 , Marius Strobl wrote: > Author: marius > Date: Fri Dec 30 21:22:10 2011 > New Revision: 229032 > URL: http://svn.freebsd.org/changeset/base/229032 >=20 > Log: > Add header required by cfi_bus_fdt.c. >=20 > Modified: > head/sys/modules/cfi/Makefile >=20 This (most likely) broke at least the arm KB920X config: In file included from @/arm/xscale/ixp425/ixp425var.h:47, from = /scratch/tmp/bz/head.universe/sys/modules/cfi/../../dev/cfi/cfi_bus_ixp4xx= .c:45: @/dev/pci/pcivar.h:219:20: error: pci_if.h: No such file or directory mkdep: compile failed /bz > Modified: head/sys/modules/cfi/Makefile > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/modules/cfi/Makefile Fri Dec 30 21:02:32 2011 = (r229031) > +++ head/sys/modules/cfi/Makefile Fri Dec 30 21:22:10 2011 = (r229032) > @@ -7,10 +7,10 @@ SRCS=3D ${_cfi_bus} cfi_core.c cfi_dev.c > SRCS+=3D bus_if.h device_if.h opt_cfi.h >=20 > .if ${MACHINE} =3D=3D "arm" > -_cfi_bus=3D cfi_bus_fdt.c cfi_bus_ixp4xx.c > +_cfi_bus=3D cfi_bus_fdt.c cfi_bus_ixp4xx.c ofw_bus_if.h > .endif > .if ${MACHINE} =3D=3D "powerpc" > -_cfi_bus=3D cfi_bus_fdt.c > +_cfi_bus=3D cfi_bus_fdt.c ofw_bus_if.h > .endif >=20 > opt_cfi.h: --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:06:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD17C106566B; Sat, 31 Dec 2011 14:06:35 +0000 (UTC) (envelope-from gabor@t-hosting.hu) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 789B88FC0A; Sat, 31 Dec 2011 14:06:35 +0000 (UTC) Received: from server.mypc.hu (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 470EA14E699B; Sat, 31 Dec 2011 15:06:34 +0100 (CET) X-Virus-Scanned: amavisd-new at server.mypc.hu Received: from server.mypc.hu ([127.0.0.1]) by server.mypc.hu (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id W9TXfgNmSUn6; Sat, 31 Dec 2011 15:06:32 +0100 (CET) Received: from [192.168.1.117] (catv-80-98-232-12.catv.broadband.hu [80.98.232.12]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 0D9FE14E697D; Sat, 31 Dec 2011 15:06:31 +0100 (CET) Message-ID: <4EFF16E0.7000206@t-hosting.hu> Date: Sat, 31 Dec 2011 15:06:24 +0100 From: =?UTF-8?B?R8OhYm9yIEvDtnZlc2TDoW4=?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a2) Gecko/20111122 Thunderbird/10.0a2 MIME-Version: 1.0 To: Gleb Kurtsou References: <201112311312.pBVDCBja064475@svn.freebsd.org> <20111231140027.GA3487@reks> In-Reply-To: <20111231140027.GA3487@reks> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Gabor Kovesdan , svn-src-stable-9@freebsd.org Subject: Re: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:06:35 -0000 On 2011.12.31. 15:00, Gleb Kurtsou wrote: >> ${BINDIR}/grep ${BINDIR}/fgrep \ >> > ${BINDIR}/grep ${BINDIR}/zgrep \ >> > ${BINDIR}/grep ${BINDIR}/zegrep \ >> > - ${BINDIR}/grep ${BINDIR}/zfgrep \ >> > - ${BINDIR}/grep ${BINDIR}/xzgrep \ >> > - ${BINDIR}/grep ${BINDIR}/xzegrep \ >> > - ${BINDIR}/grep ${BINDIR}/xzfgrep \ >> > - ${BINDIR}/grep ${BINDIR}/lzgrep \ >> > - ${BINDIR}/grep ${BINDIR}/lzegrep \ >> > - ${BINDIR}/grep ${BINDIR}/lzfgrep >> > + ${BINDIR}/grep ${BINDIR}/zfgrep > Is there a reason we need all this mess is the first place? 12 grep links under > /usr/bin. Why not to make zgrep handle all compression types. Tranparent > compression handling in tar was a great success. > 1, xzgrep comes from archivers/xz so scripts may be using it 2, the rest to follow the naming convention 3, auto-detection is not always trivial Gabor From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:12:14 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CC9D106566C; Sat, 31 Dec 2011 14:12:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 317B38FC14; Sat, 31 Dec 2011 14:12:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVECEAU067027; Sat, 31 Dec 2011 14:12:14 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVECDLl066966; Sat, 31 Dec 2011 14:12:13 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311412.pBVECDLl066966@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229093 - in stable/9/sys: amd64/amd64 arm/econa arm/mv arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 dev/aac dev/acpi_support dev/acpica dev/amr dev/arcmsr dev/bce dev/bfe dev/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:12:14 -0000 Author: hselasky Date: Sat Dec 31 14:12:12 2011 New Revision: 229093 URL: http://svn.freebsd.org/changeset/base/229093 Log: MFC r226173, r227843, r227848 and r227908: Use DEVMETHOD_END to mark end of device methods. Remove superfluous device methods. Add some missing __FBSBID() macros. Modified: stable/9/sys/amd64/amd64/legacy.c stable/9/sys/arm/econa/ehci_ebus.c stable/9/sys/arm/econa/ohci_ec.c stable/9/sys/arm/mv/mv_pci.c stable/9/sys/arm/xscale/i80321/i80321_pci.c stable/9/sys/arm/xscale/i8134x/i81342_pci.c stable/9/sys/arm/xscale/ixp425/ixp425_pci.c stable/9/sys/dev/aac/aac_pci.c stable/9/sys/dev/acpi_support/acpi_wmi.c stable/9/sys/dev/acpica/acpi_cpu.c stable/9/sys/dev/acpica/acpi_isab.c stable/9/sys/dev/acpica/acpi_pcib_acpi.c stable/9/sys/dev/amr/amr_pci.c stable/9/sys/dev/arcmsr/arcmsr.c stable/9/sys/dev/bce/if_bce.c stable/9/sys/dev/bfe/if_bfe.c stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/bm/if_bm.c stable/9/sys/dev/bwn/if_bwn.c stable/9/sys/dev/bxe/if_bxe.c stable/9/sys/dev/cas/if_cas.c stable/9/sys/dev/cxgb/cxgb_main.c stable/9/sys/dev/cxgbe/t4_main.c stable/9/sys/dev/dc/dcphy.c stable/9/sys/dev/dc/if_dc.c stable/9/sys/dev/dc/pnphy.c stable/9/sys/dev/eisa/eisaconf.c stable/9/sys/dev/esp/esp_pci.c stable/9/sys/dev/esp/esp_sbus.c stable/9/sys/dev/et/if_et.c stable/9/sys/dev/fb/fb.c stable/9/sys/dev/firewire/firewire.c stable/9/sys/dev/firewire/fwohci_pci.c stable/9/sys/dev/gem/if_gem_pci.c stable/9/sys/dev/gem/if_gem_sbus.c stable/9/sys/dev/gpio/gpiobus.c stable/9/sys/dev/hifn/hifn7751.c stable/9/sys/dev/hme/if_hme_pci.c stable/9/sys/dev/hme/if_hme_sbus.c stable/9/sys/dev/ichsmb/ichsmb_pci.c stable/9/sys/dev/ida/ida_pci.c stable/9/sys/dev/if_ndis/if_ndis_usb.c stable/9/sys/dev/iicbus/iicbus.c stable/9/sys/dev/iicbus/iicsmb.c stable/9/sys/dev/lge/if_lge.c stable/9/sys/dev/mca/mca_bus.c stable/9/sys/dev/mfi/mfi_pci.c stable/9/sys/dev/mii/acphy.c stable/9/sys/dev/mii/amphy.c stable/9/sys/dev/mii/atphy.c stable/9/sys/dev/mii/axphy.c stable/9/sys/dev/mii/bmtphy.c stable/9/sys/dev/mii/brgphy.c stable/9/sys/dev/mii/ciphy.c stable/9/sys/dev/mii/e1000phy.c stable/9/sys/dev/mii/gentbi.c stable/9/sys/dev/mii/icsphy.c stable/9/sys/dev/mii/ip1000phy.c stable/9/sys/dev/mii/jmphy.c stable/9/sys/dev/mii/lxtphy.c stable/9/sys/dev/mii/mii.c stable/9/sys/dev/mii/mlphy.c stable/9/sys/dev/mii/nsgphy.c stable/9/sys/dev/mii/nsphy.c stable/9/sys/dev/mii/nsphyter.c stable/9/sys/dev/mii/pnaphy.c stable/9/sys/dev/mii/qsphy.c stable/9/sys/dev/mii/rdcphy.c stable/9/sys/dev/mii/rgephy.c stable/9/sys/dev/mii/rlphy.c stable/9/sys/dev/mii/rlswitch.c stable/9/sys/dev/mii/smcphy.c stable/9/sys/dev/mii/tdkphy.c stable/9/sys/dev/mii/tlphy.c stable/9/sys/dev/mii/truephy.c stable/9/sys/dev/mii/ukphy.c stable/9/sys/dev/mii/xmphy.c stable/9/sys/dev/mlx/mlx_pci.c stable/9/sys/dev/mps/mps_pci.c stable/9/sys/dev/msk/if_msk.c stable/9/sys/dev/nfe/if_nfe.c stable/9/sys/dev/nge/if_nge.c stable/9/sys/dev/nve/if_nve.c stable/9/sys/dev/ofw/ofw_iicbus.c stable/9/sys/dev/pccbb/pccbb_isa.c stable/9/sys/dev/pccbb/pccbb_pci.c stable/9/sys/dev/pci/eisa_pci.c stable/9/sys/dev/pci/isa_pci.c stable/9/sys/dev/pci/pci_pci.c stable/9/sys/dev/pcn/if_pcn.c stable/9/sys/dev/ppbus/lpbb.c stable/9/sys/dev/puc/puc_pccard.c stable/9/sys/dev/puc/puc_pci.c stable/9/sys/dev/quicc/quicc_bfe_fdt.c stable/9/sys/dev/re/if_re.c stable/9/sys/dev/rt/if_rt.c stable/9/sys/dev/safe/safe.c stable/9/sys/dev/scc/scc_bfe_ebus.c stable/9/sys/dev/scc/scc_bfe_macio.c stable/9/sys/dev/scc/scc_bfe_quicc.c stable/9/sys/dev/scc/scc_bfe_sbus.c stable/9/sys/dev/sec/sec.c stable/9/sys/dev/sf/if_sf.c stable/9/sys/dev/sfxge/sfxge.c stable/9/sys/dev/sge/if_sge.c stable/9/sys/dev/siba/siba.c stable/9/sys/dev/siba/siba_bwn.c stable/9/sys/dev/siba/siba_cc.c stable/9/sys/dev/siba/siba_pcib.c stable/9/sys/dev/sis/if_sis.c stable/9/sys/dev/sk/if_sk.c stable/9/sys/dev/smbus/smbus.c stable/9/sys/dev/sound/isa/gusc.c stable/9/sys/dev/sound/isa/sbc.c stable/9/sys/dev/sound/pci/csa.c stable/9/sys/dev/sound/pci/fm801.c stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/spibus/spibus.c stable/9/sys/dev/ste/if_ste.c stable/9/sys/dev/stge/if_stge.c stable/9/sys/dev/tl/if_tl.c stable/9/sys/dev/tsec/if_tsec_fdt.c stable/9/sys/dev/twa/tw_osl_freebsd.c stable/9/sys/dev/twe/twe_freebsd.c stable/9/sys/dev/tws/tws.c stable/9/sys/dev/ubsec/ubsec.c stable/9/sys/dev/usb/controller/at91dci_atmelarm.c stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c stable/9/sys/dev/usb/controller/ehci_ixp4xx.c stable/9/sys/dev/usb/controller/ehci_mv.c stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c stable/9/sys/dev/usb/controller/ohci_atmelarm.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/ohci_s3c24x0.c stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/net/if_aue.c stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/net/if_mos.c stable/9/sys/dev/usb/net/if_rue.c stable/9/sys/dev/usb/net/if_udav.c stable/9/sys/dev/usb/net/ruephy.c stable/9/sys/dev/vge/if_vge.c stable/9/sys/dev/vr/if_vr.c stable/9/sys/dev/vte/if_vte.c stable/9/sys/dev/wb/if_wb.c stable/9/sys/dev/xen/pcifront/pcifront.c stable/9/sys/dev/xl/if_xl.c stable/9/sys/dev/xl/xlphy.c stable/9/sys/i386/i386/legacy.c stable/9/sys/isa/vga_isa.c stable/9/sys/mips/adm5120/admpci.c stable/9/sys/mips/atheros/apb.c stable/9/sys/mips/atheros/ar71xx_ehci.c stable/9/sys/mips/atheros/ar71xx_ohci.c stable/9/sys/mips/atheros/ar71xx_pci.c stable/9/sys/mips/atheros/ar724x_pci.c stable/9/sys/mips/atheros/if_arge.c stable/9/sys/mips/cavium/octopci.c stable/9/sys/mips/cavium/usb/octusb_octeon.c stable/9/sys/mips/idt/idtpci.c stable/9/sys/mips/idt/if_kr.c stable/9/sys/mips/malta/gt.c stable/9/sys/mips/malta/gt_pci.c stable/9/sys/mips/nlm/xlp_pci.c stable/9/sys/mips/rmi/dev/nlge/if_nlge.c stable/9/sys/mips/rmi/dev/sec/rmisec.c stable/9/sys/mips/rmi/xlr_pci.c stable/9/sys/mips/rmi/xls_ehci.c stable/9/sys/mips/rt305x/rt305x_dotg.c stable/9/sys/pci/if_rl.c stable/9/sys/pci/intpm.c stable/9/sys/pci/viapm.c stable/9/sys/powerpc/aim/nexus.c stable/9/sys/powerpc/mambo/mambo.c stable/9/sys/powerpc/mpc85xx/nexus.c stable/9/sys/powerpc/mpc85xx/pci_fdt.c stable/9/sys/powerpc/ofw/ofw_cpu.c stable/9/sys/powerpc/ofw/ofw_pcib_pci.c stable/9/sys/powerpc/powermac/cpcht.c stable/9/sys/powerpc/powermac/cuda.c stable/9/sys/powerpc/powermac/grackle.c stable/9/sys/powerpc/powermac/pmu.c stable/9/sys/powerpc/powermac/uninorthpci.c stable/9/sys/powerpc/ps3/ehci_ps3.c stable/9/sys/powerpc/ps3/ohci_ps3.c stable/9/sys/powerpc/ps3/ps3bus.c stable/9/sys/sparc64/central/central.c stable/9/sys/sparc64/ebus/ebus.c stable/9/sys/sparc64/ebus/epic.c stable/9/sys/sparc64/fhc/fhc.c stable/9/sys/sparc64/pci/apb.c stable/9/sys/sparc64/pci/fire.c stable/9/sys/sparc64/pci/ofw_pcib.c stable/9/sys/sparc64/pci/ofw_pcibus.c stable/9/sys/sparc64/pci/psycho.c stable/9/sys/sparc64/pci/sbbc.c stable/9/sys/sparc64/pci/schizo.c stable/9/sys/sparc64/sbus/dma_sbus.c stable/9/sys/sparc64/sbus/sbus.c stable/9/sys/sparc64/sparc64/eeprom.c stable/9/sys/sparc64/sparc64/jbusppm.c stable/9/sys/sparc64/sparc64/nexus.c stable/9/sys/sparc64/sparc64/rtc.c stable/9/sys/sparc64/sparc64/sc_machdep.c stable/9/sys/sparc64/sparc64/schppm.c stable/9/sys/sparc64/sparc64/ssm.c stable/9/sys/sparc64/sparc64/upa.c stable/9/sys/x86/pci/pci_bus.c stable/9/sys/x86/pci/qpi.c stable/9/sys/x86/x86/mptable_pci.c stable/9/sys/xen/xenstore/xenstore.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/amd64/amd64/legacy.c ============================================================================== --- stable/9/sys/amd64/amd64/legacy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/amd64/amd64/legacy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -237,19 +237,17 @@ static device_method_t cpu_methods[] = { /* Bus interface */ DEVMETHOD(bus_add_child, cpu_add_child), DEVMETHOD(bus_read_ivar, cpu_read_ivar), - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_get_resource_list, cpu_get_rlist), DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t cpu_driver = { Modified: stable/9/sys/arm/econa/ehci_ebus.c ============================================================================== --- stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -281,10 +281,7 @@ static device_method_t ehci_methods[] = DEVMETHOD(device_resume, ehci_ebus_resume), DEVMETHOD(device_shutdown, ehci_ebus_shutdown), - /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - - {0, 0} + DEVMETHOD_END }; static driver_t ehci_driver = { Modified: stable/9/sys/arm/econa/ohci_ec.c ============================================================================== --- stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:12:12 2011 (r229093) @@ -222,10 +222,7 @@ static device_method_t ohci_methods[] = DEVMETHOD(device_detach, ohci_ec_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - - {0, 0} + DEVMETHOD_END }; static driver_t ohci_driver = { Modified: stable/9/sys/arm/mv/mv_pci.c ============================================================================== --- stable/9/sys/arm/mv/mv_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/mv/mv_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -171,7 +171,6 @@ static device_method_t mv_pcib_methods[] DEVMETHOD(device_attach, mv_pcib_attach), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, mv_pcib_read_ivar), DEVMETHOD(bus_write_ivar, mv_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, mv_pcib_alloc_resource), @@ -194,7 +193,7 @@ static device_method_t mv_pcib_methods[] DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), - { 0, 0 } + DEVMETHOD_END }; static driver_t mv_pcib_driver = { Modified: stable/9/sys/arm/xscale/i80321/i80321_pci.c ============================================================================== --- stable/9/sys/arm/xscale/i80321/i80321_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/xscale/i80321/i80321_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -373,7 +373,6 @@ static device_method_t i80321_pci_method DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, i80321_read_ivar), DEVMETHOD(bus_write_ivar, i80321_write_ivar), DEVMETHOD(bus_alloc_resource, i80321_pci_alloc_resource), @@ -389,7 +388,7 @@ static device_method_t i80321_pci_method DEVMETHOD(pcib_write_config, i80321_pci_write_config), DEVMETHOD(pcib_route_interrupt, machdep_pci_route_interrupt), - {0, 0} + DEVMETHOD_END }; static driver_t i80321_pci_driver = { Modified: stable/9/sys/arm/xscale/i8134x/i81342_pci.c ============================================================================== --- stable/9/sys/arm/xscale/i8134x/i81342_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/xscale/i8134x/i81342_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -516,7 +516,6 @@ static device_method_t i81342_pci_method DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, i81342_read_ivar), DEVMETHOD(bus_write_ivar, i81342_write_ivar), DEVMETHOD(bus_alloc_resource, i81342_pci_alloc_resource), @@ -532,7 +531,7 @@ static device_method_t i81342_pci_method DEVMETHOD(pcib_write_config, i81342_pci_write_config), DEVMETHOD(pcib_route_interrupt, i81342_pci_route_interrupt), - {0, 0} + DEVMETHOD_END }; static driver_t i81342_pci_driver = { Modified: stable/9/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- stable/9/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -445,7 +445,6 @@ static device_method_t ixppcib_methods[] DEVMETHOD(device_attach, ixppcib_attach), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, ixppcib_read_ivar), DEVMETHOD(bus_write_ivar, ixppcib_write_ivar), DEVMETHOD(bus_setup_intr, ixppcib_setup_intr), @@ -462,7 +461,7 @@ static device_method_t ixppcib_methods[] DEVMETHOD(pcib_write_config, ixppcib_write_config), DEVMETHOD(pcib_route_interrupt, ixppcib_route_interrupt), - {0, 0}, + DEVMETHOD_END }; static driver_t ixppcib_driver = { Modified: stable/9/sys/dev/aac/aac_pci.c ============================================================================== --- stable/9/sys/dev/aac/aac_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/aac/aac_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -68,9 +68,7 @@ static device_method_t aac_methods[] = { DEVMETHOD(device_suspend, aac_suspend), DEVMETHOD(device_resume, aac_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + DEVMETHOD_END }; static driver_t aac_pci_driver = { Modified: stable/9/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- stable/9/sys/dev/acpi_support/acpi_wmi.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpi_support/acpi_wmi.c Sat Dec 31 14:12:12 2011 (r229093) @@ -175,7 +175,6 @@ static device_method_t acpi_wmi_methods[ /* bus interface */ DEVMETHOD(bus_add_child, bus_generic_add_child), - DEVMETHOD(bus_print_child, bus_generic_print_child), /* acpi_wmi interface */ DEVMETHOD(acpi_wmi_provides_guid_string, @@ -189,7 +188,7 @@ static device_method_t acpi_wmi_methods[ DEVMETHOD(acpi_wmi_get_block, acpi_wmi_get_block_method), DEVMETHOD(acpi_wmi_set_block, acpi_wmi_set_block_method), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_wmi_driver = { Modified: stable/9/sys/dev/acpica/acpi_cpu.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cpu.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpica/acpi_cpu.c Sat Dec 31 14:12:12 2011 (r229093) @@ -187,13 +187,12 @@ static device_method_t acpi_cpu_methods[ DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), DEVMETHOD(bus_alloc_resource, bus_generic_rl_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_rl_release_resource), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_cpu_driver = { Modified: stable/9/sys/dev/acpica/acpi_isab.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_isab.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpica/acpi_isab.c Sat Dec 31 14:12:12 2011 (r229093) @@ -68,7 +68,6 @@ static device_method_t acpi_isab_methods DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, acpi_isab_read_ivar), DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), @@ -77,7 +76,7 @@ static device_method_t acpi_isab_methods DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - {0, 0} + DEVMETHOD_END }; static driver_t acpi_isab_driver = { Modified: stable/9/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_pcib_acpi.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/acpica/acpi_pcib_acpi.c Sat Dec 31 14:12:12 2011 (r229093) @@ -106,7 +106,6 @@ static device_method_t acpi_pcib_acpi_me DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, acpi_pcib_read_ivar), DEVMETHOD(bus_write_ivar, acpi_pcib_write_ivar), DEVMETHOD(bus_alloc_resource, acpi_pcib_acpi_alloc_resource), @@ -133,7 +132,7 @@ static device_method_t acpi_pcib_acpi_me DEVMETHOD(pcib_map_msi, acpi_pcib_map_msi), DEVMETHOD(pcib_power_for_sleep, acpi_pcib_power_for_sleep), - {0, 0} + DEVMETHOD_END }; static devclass_t pcib_devclass; Modified: stable/9/sys/dev/amr/amr_pci.c ============================================================================== --- stable/9/sys/dev/amr/amr_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/amr/amr_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -106,9 +106,7 @@ static device_method_t amr_methods[] = { DEVMETHOD(device_suspend, amr_pci_suspend), DEVMETHOD(device_resume, amr_pci_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + DEVMETHOD_END }; static driver_t amr_pci_driver = { Modified: stable/9/sys/dev/arcmsr/arcmsr.c ============================================================================== --- stable/9/sys/dev/arcmsr/arcmsr.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/arcmsr/arcmsr.c Sat Dec 31 14:12:12 2011 (r229093) @@ -70,8 +70,11 @@ ** 1.20.00.21 03/03/2011 Ching Huang if a command timeout, then wait its ccb back before free it ** 1.20.00.22 07/04/2011 Ching Huang Fixed multiple MTX panic ****************************************************************************************** -* $FreeBSD$ */ + +#include +__FBSDID("$FreeBSD$"); + #if 0 #define ARCMSR_DEBUG1 1 #endif @@ -223,9 +226,8 @@ static device_method_t arcmsr_methods[]= DEVMETHOD(device_shutdown, arcmsr_shutdown), DEVMETHOD(device_suspend, arcmsr_suspend), DEVMETHOD(device_resume, arcmsr_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + + DEVMETHOD_END }; static driver_t arcmsr_driver={ Modified: stable/9/sys/dev/bce/if_bce.c ============================================================================== --- stable/9/sys/dev/bce/if_bce.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bce/if_bce.c Sat Dec 31 14:12:12 2011 (r229093) @@ -455,10 +455,6 @@ static device_method_t bce_methods[] = { /* DEVMETHOD(device_resume, bce_resume), */ /* DEVMETHOD(device_quiesce, bce_quiesce), */ - /* Bus interface (bus_if.h) */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface (miibus_if.h) */ DEVMETHOD(miibus_readreg, bce_miibus_read_reg), DEVMETHOD(miibus_writereg, bce_miibus_write_reg), @@ -467,7 +463,7 @@ static device_method_t bce_methods[] = { /* DEVMETHOD(miibus_linkchg, bce_miibus_linkchg), */ /* DEVMETHOD(miibus_mediainit, bce_miibus_mediainit), */ - { 0, 0 } + DEVMETHOD_END }; static driver_t bce_driver = { Modified: stable/9/sys/dev/bfe/if_bfe.c ============================================================================== --- stable/9/sys/dev/bfe/if_bfe.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bfe/if_bfe.c Sat Dec 31 14:12:12 2011 (r229093) @@ -137,16 +137,12 @@ static device_method_t bfe_methods[] = { DEVMETHOD(device_suspend, bfe_suspend), DEVMETHOD(device_resume, bfe_resume), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, bfe_miibus_readreg), DEVMETHOD(miibus_writereg, bfe_miibus_writereg), DEVMETHOD(miibus_statchg, bfe_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t bfe_driver = { Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bge/if_bge.c Sat Dec 31 14:12:12 2011 (r229093) @@ -490,16 +490,12 @@ static device_method_t bge_methods[] = { DEVMETHOD(device_suspend, bge_suspend), DEVMETHOD(device_resume, bge_resume), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, bge_miibus_readreg), DEVMETHOD(miibus_writereg, bge_miibus_writereg), DEVMETHOD(miibus_statchg, bge_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t bge_driver = { Modified: stable/9/sys/dev/bm/if_bm.c ============================================================================== --- stable/9/sys/dev/bm/if_bm.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bm/if_bm.c Sat Dec 31 14:12:12 2011 (r229093) @@ -135,15 +135,12 @@ static device_method_t bm_methods[] = { DEVMETHOD(device_detach, bm_detach), DEVMETHOD(device_shutdown, bm_shutdown), - /* bus interface, for miibus */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, bm_miibus_readreg), DEVMETHOD(miibus_writereg, bm_miibus_writereg), DEVMETHOD(miibus_statchg, bm_miibus_statchg), - { 0, 0 } + + DEVMETHOD_END }; static driver_t bm_macio_driver = { Modified: stable/9/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/9/sys/dev/bwn/if_bwn.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bwn/if_bwn.c Sat Dec 31 14:12:12 2011 (r229093) @@ -14225,7 +14225,7 @@ static device_method_t bwn_methods[] = { DEVMETHOD(device_detach, bwn_detach), DEVMETHOD(device_suspend, bwn_suspend), DEVMETHOD(device_resume, bwn_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t bwn_driver = { "bwn", Modified: stable/9/sys/dev/bxe/if_bxe.c ============================================================================== --- stable/9/sys/dev/bxe/if_bxe.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/bxe/if_bxe.c Sat Dec 31 14:12:12 2011 (r229093) @@ -400,11 +400,7 @@ static device_method_t bxe_methods[] = { DEVMETHOD(device_detach, bxe_detach), DEVMETHOD(device_shutdown, bxe_shutdown), - /* Bus interface (bus_if.h) */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - - KOBJMETHOD_END + DEVMETHOD_END }; Modified: stable/9/sys/dev/cas/if_cas.c ============================================================================== --- stable/9/sys/dev/cas/if_cas.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/cas/if_cas.c Sat Dec 31 14:12:12 2011 (r229093) @@ -2600,16 +2600,12 @@ static device_method_t cas_pci_methods[] /* Use the suspend handler here, it is all that is required. */ DEVMETHOD(device_shutdown, cas_pci_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, cas_mii_readreg), DEVMETHOD(miibus_writereg, cas_mii_writereg), DEVMETHOD(miibus_statchg, cas_mii_statchg), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t cas_pci_driver = { Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sat Dec 31 14:12:12 2011 (r229093) @@ -129,11 +129,7 @@ static device_method_t cxgb_controller_m DEVMETHOD(device_attach, cxgb_controller_attach), DEVMETHOD(device_detach, cxgb_controller_detach), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - - { 0, 0 } + DEVMETHOD_END }; static driver_t cxgb_controller_driver = { Modified: stable/9/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/9/sys/dev/cxgbe/t4_main.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/cxgbe/t4_main.c Sat Dec 31 14:12:12 2011 (r229093) @@ -73,11 +73,7 @@ static device_method_t t4_methods[] = { DEVMETHOD(device_attach, t4_attach), DEVMETHOD(device_detach, t4_detach), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - - { 0, 0 } + DEVMETHOD_END }; static driver_t t4_driver = { "t4nex", Modified: stable/9/sys/dev/dc/dcphy.c ============================================================================== --- stable/9/sys/dev/dc/dcphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/dc/dcphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -95,7 +95,7 @@ static device_method_t dcphy_methods[] = DEVMETHOD(device_attach, dcphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t dcphy_devclass; Modified: stable/9/sys/dev/dc/if_dc.c ============================================================================== --- stable/9/sys/dev/dc/if_dc.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/dc/if_dc.c Sat Dec 31 14:12:12 2011 (r229093) @@ -331,17 +331,13 @@ static device_method_t dc_methods[] = { DEVMETHOD(device_resume, dc_resume), DEVMETHOD(device_shutdown, dc_shutdown), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, dc_miibus_readreg), DEVMETHOD(miibus_writereg, dc_miibus_writereg), DEVMETHOD(miibus_statchg, dc_miibus_statchg), DEVMETHOD(miibus_mediainit, dc_miibus_mediainit), - { 0, 0 } + DEVMETHOD_END }; static driver_t dc_driver = { Modified: stable/9/sys/dev/dc/pnphy.c ============================================================================== --- stable/9/sys/dev/dc/pnphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/dc/pnphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -74,7 +74,7 @@ static device_method_t pnphy_methods[] = DEVMETHOD(device_attach, pnphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t pnphy_devclass; Modified: stable/9/sys/dev/eisa/eisaconf.c ============================================================================== --- stable/9/sys/dev/eisa/eisaconf.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/eisa/eisaconf.c Sat Dec 31 14:12:12 2011 (r229093) @@ -557,7 +557,6 @@ static device_method_t eisa_methods[] = DEVMETHOD(bus_probe_nomatch, eisa_probe_nomatch), DEVMETHOD(bus_read_ivar, eisa_read_ivar), DEVMETHOD(bus_write_ivar, eisa_write_ivar), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_alloc_resource, eisa_alloc_resource), DEVMETHOD(bus_release_resource, eisa_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), @@ -570,7 +569,7 @@ static device_method_t eisa_methods[] = DEVMETHOD(eisa_add_iospace, eisa_add_iospace_m), DEVMETHOD(eisa_add_mspace, eisa_add_mspace_m), - { 0, 0 } + DEVMETHOD_END }; static driver_t eisa_driver = { Modified: stable/9/sys/dev/esp/esp_pci.c ============================================================================== --- stable/9/sys/dev/esp/esp_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/esp/esp_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -146,7 +146,7 @@ static device_method_t esp_pci_methods[] DEVMETHOD(device_suspend, esp_pci_suspend), DEVMETHOD(device_resume, esp_pci_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t esp_pci_driver = { Modified: stable/9/sys/dev/esp/esp_sbus.c ============================================================================== --- stable/9/sys/dev/esp/esp_sbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/esp/esp_sbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -117,7 +117,7 @@ static device_method_t esp_dma_methods[] DEVMETHOD(device_suspend, esp_suspend), DEVMETHOD(device_resume, esp_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t esp_dma_driver = { @@ -136,7 +136,7 @@ static device_method_t esp_sbus_methods[ DEVMETHOD(device_suspend, esp_suspend), DEVMETHOD(device_resume, esp_resume), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t esp_sbus_driver = { Modified: stable/9/sys/dev/et/if_et.c ============================================================================== --- stable/9/sys/dev/et/if_et.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/et/if_et.c Sat Dec 31 14:12:12 2011 (r229093) @@ -170,14 +170,11 @@ static device_method_t et_methods[] = { DEVMETHOD(device_detach, et_detach), DEVMETHOD(device_shutdown, et_shutdown), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - DEVMETHOD(miibus_readreg, et_miibus_readreg), DEVMETHOD(miibus_writereg, et_miibus_writereg), DEVMETHOD(miibus_statchg, et_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t et_driver = { Modified: stable/9/sys/dev/fb/fb.c ============================================================================== --- stable/9/sys/dev/fb/fb.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/fb/fb.c Sat Dec 31 14:12:12 2011 (r229093) @@ -315,8 +315,7 @@ static device_method_t fb_methods[] = { DEVMETHOD(device_probe, fbprobe), DEVMETHOD(device_attach, fbattach), - DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } + DEVMETHOD_END }; static driver_t fb_driver = { Modified: stable/9/sys/dev/firewire/firewire.c ============================================================================== --- stable/9/sys/dev/firewire/firewire.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/firewire/firewire.c Sat Dec 31 14:12:12 2011 (r229093) @@ -30,11 +30,11 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ - * */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -128,9 +128,8 @@ static device_method_t firewire_methods[ /* Bus interface */ DEVMETHOD(bus_add_child, firewire_add_child), - DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } + DEVMETHOD_END }; char *linkspeed[] = { "S100", "S200", "S400", "S800", Modified: stable/9/sys/dev/firewire/fwohci_pci.c ============================================================================== --- stable/9/sys/dev/firewire/fwohci_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/firewire/fwohci_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -30,10 +30,11 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #define BOUNCE_BUFFER_TEST 0 #include @@ -536,9 +537,8 @@ static device_method_t fwohci_methods[] /* Bus interface */ DEVMETHOD(bus_add_child, fwohci_pci_add_child), - DEVMETHOD(bus_print_child, bus_generic_print_child), - { 0, 0 } + DEVMETHOD_END }; static driver_t fwohci_driver = { Modified: stable/9/sys/dev/gem/if_gem_pci.c ============================================================================== --- stable/9/sys/dev/gem/if_gem_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/gem/if_gem_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -82,16 +82,12 @@ static device_method_t gem_pci_methods[] /* Use the suspend handler here, it is all that is required. */ DEVMETHOD(device_shutdown, gem_pci_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, gem_mii_readreg), DEVMETHOD(miibus_writereg, gem_mii_writereg), DEVMETHOD(miibus_statchg, gem_mii_statchg), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t gem_pci_driver = { Modified: stable/9/sys/dev/gem/if_gem_sbus.c ============================================================================== --- stable/9/sys/dev/gem/if_gem_sbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/gem/if_gem_sbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -78,16 +78,12 @@ static device_method_t gem_sbus_methods[ /* Use the suspend handler here, it is all that is required. */ DEVMETHOD(device_shutdown, gem_sbus_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, gem_mii_readreg), DEVMETHOD(miibus_writereg, gem_mii_writereg), DEVMETHOD(miibus_statchg, gem_mii_statchg), - KOBJMETHOD_END + DEVMETHOD_END }; static driver_t gem_sbus_driver = { Modified: stable/9/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -461,7 +461,6 @@ static device_method_t gpiobus_methods[] /* Bus interface */ DEVMETHOD(bus_add_child, gpiobus_add_child), DEVMETHOD(bus_print_child, gpiobus_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_child_pnpinfo_str, gpiobus_child_pnpinfo_str), DEVMETHOD(bus_child_location_str, gpiobus_child_location_str), DEVMETHOD(bus_hinted_child, gpiobus_hinted_child), @@ -478,7 +477,7 @@ static device_method_t gpiobus_methods[] DEVMETHOD(gpiobus_pin_set, gpiobus_pin_set), DEVMETHOD(gpiobus_pin_toggle, gpiobus_pin_toggle), - { 0, 0 } + DEVMETHOD_END }; driver_t gpiobus_driver = { Modified: stable/9/sys/dev/hifn/hifn7751.c ============================================================================== --- stable/9/sys/dev/hifn/hifn7751.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/hifn/hifn7751.c Sat Dec 31 14:12:12 2011 (r229093) @@ -113,16 +113,12 @@ static device_method_t hifn_methods[] = DEVMETHOD(device_resume, hifn_resume), DEVMETHOD(device_shutdown, hifn_shutdown), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* crypto device methods */ DEVMETHOD(cryptodev_newsession, hifn_newsession), DEVMETHOD(cryptodev_freesession,hifn_freesession), DEVMETHOD(cryptodev_process, hifn_process), - { 0, 0 } + DEVMETHOD_END }; static driver_t hifn_driver = { "hifn", Modified: stable/9/sys/dev/hme/if_hme_pci.c ============================================================================== --- stable/9/sys/dev/hme/if_hme_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/hme/if_hme_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -93,16 +93,12 @@ static device_method_t hme_pci_methods[] /* Can just use the suspend method here. */ DEVMETHOD(device_shutdown, hme_pci_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, hme_mii_readreg), DEVMETHOD(miibus_writereg, hme_mii_writereg), DEVMETHOD(miibus_statchg, hme_mii_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t hme_pci_driver = { Modified: stable/9/sys/dev/hme/if_hme_sbus.c ============================================================================== --- stable/9/sys/dev/hme/if_hme_sbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/hme/if_hme_sbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -95,16 +95,12 @@ static device_method_t hme_sbus_methods[ /* Can just use the suspend method here. */ DEVMETHOD(device_shutdown, hme_sbus_suspend), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, hme_mii_readreg), DEVMETHOD(miibus_writereg, hme_mii_writereg), DEVMETHOD(miibus_statchg, hme_mii_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t hme_sbus_driver = { Modified: stable/9/sys/dev/ichsmb/ichsmb_pci.c ============================================================================== --- stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/ichsmb/ichsmb_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -103,9 +103,6 @@ static device_method_t ichsmb_pci_method DEVMETHOD(device_attach, ichsmb_pci_attach), DEVMETHOD(device_detach, ichsmb_detach), - /* Bus methods */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - /* SMBus methods */ DEVMETHOD(smbus_callback, ichsmb_callback), DEVMETHOD(smbus_quick, ichsmb_quick), @@ -118,7 +115,8 @@ static device_method_t ichsmb_pci_method DEVMETHOD(smbus_pcall, ichsmb_pcall), DEVMETHOD(smbus_bwrite, ichsmb_bwrite), DEVMETHOD(smbus_bread, ichsmb_bread), - { 0, 0 } + + DEVMETHOD_END }; static driver_t ichsmb_pci_driver = { Modified: stable/9/sys/dev/ida/ida_pci.c ============================================================================== --- stable/9/sys/dev/ida/ida_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/ida/ida_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -188,9 +188,7 @@ static device_method_t ida_pci_methods[] DEVMETHOD(device_attach, ida_pci_attach), DEVMETHOD(device_detach, ida_detach), - DEVMETHOD(bus_print_child, bus_generic_print_child), - - { 0, 0 } + DEVMETHOD_END }; static driver_t ida_pci_driver = { Modified: stable/9/sys/dev/if_ndis/if_ndis_usb.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis_usb.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/if_ndis/if_ndis_usb.c Sat Dec 31 14:12:12 2011 (r229093) @@ -91,11 +91,9 @@ static device_method_t ndis_methods[] = DEVMETHOD(device_shutdown, ndis_shutdown), /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_get_resource_list, ndis_get_resource_list), - { 0, 0 } + DEVMETHOD_END }; static driver_t ndis_driver = { Modified: stable/9/sys/dev/iicbus/iicbus.c ============================================================================== --- stable/9/sys/dev/iicbus/iicbus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/iicbus/iicbus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -245,7 +245,6 @@ static device_method_t iicbus_methods[] /* bus interface */ DEVMETHOD(bus_add_child, iicbus_add_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_print_child, iicbus_print_child), DEVMETHOD(bus_probe_nomatch, iicbus_probe_nomatch), DEVMETHOD(bus_read_ivar, iicbus_read_ivar), @@ -256,7 +255,7 @@ static device_method_t iicbus_methods[] /* iicbus interface */ DEVMETHOD(iicbus_transfer, iicbus_transfer), - { 0, 0 } + DEVMETHOD_END }; driver_t iicbus_driver = { Modified: stable/9/sys/dev/iicbus/iicsmb.c ============================================================================== --- stable/9/sys/dev/iicbus/iicsmb.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/iicbus/iicsmb.c Sat Dec 31 14:12:12 2011 (r229093) @@ -22,11 +22,11 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ - * */ +#include +__FBSDID("$FreeBSD$"); + /* * I2C to SMB bridge * @@ -106,10 +106,6 @@ static device_method_t iicsmb_methods[] DEVMETHOD(device_attach, iicsmb_attach), DEVMETHOD(device_detach, iicsmb_detach), - /* bus interface */ - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - DEVMETHOD(bus_print_child, bus_generic_print_child), - /* iicbus interface */ DEVMETHOD(iicbus_intr, iicsmb_intr), @@ -125,8 +121,8 @@ static device_method_t iicsmb_methods[] DEVMETHOD(smbus_pcall, iicsmb_pcall), DEVMETHOD(smbus_bwrite, iicsmb_bwrite), DEVMETHOD(smbus_bread, iicsmb_bread), - - { 0, 0 } + + DEVMETHOD_END }; static driver_t iicsmb_driver = { Modified: stable/9/sys/dev/lge/if_lge.c ============================================================================== --- stable/9/sys/dev/lge/if_lge.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/lge/if_lge.c Sat Dec 31 14:12:12 2011 (r229093) @@ -170,16 +170,12 @@ static device_method_t lge_methods[] = { DEVMETHOD(device_detach, lge_detach), DEVMETHOD(device_shutdown, lge_shutdown), - /* bus interface */ - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - /* MII interface */ DEVMETHOD(miibus_readreg, lge_miibus_readreg), DEVMETHOD(miibus_writereg, lge_miibus_writereg), DEVMETHOD(miibus_statchg, lge_miibus_statchg), - { 0, 0 } + DEVMETHOD_END }; static driver_t lge_driver = { Modified: stable/9/sys/dev/mca/mca_bus.c ============================================================================== --- stable/9/sys/dev/mca/mca_bus.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mca/mca_bus.c Sat Dec 31 14:12:12 2011 (r229093) @@ -507,7 +507,6 @@ static device_method_t mca_methods[] = { DEVMETHOD(bus_probe_nomatch, mca_probe_nomatch), DEVMETHOD(bus_read_ivar, mca_read_ivar), DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), @@ -520,7 +519,7 @@ static device_method_t mca_methods[] = { DEVMETHOD(bus_activate_resource,bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - { 0, 0 } + DEVMETHOD_END }; static driver_t mca_driver = { Modified: stable/9/sys/dev/mfi/mfi_pci.c ============================================================================== --- stable/9/sys/dev/mfi/mfi_pci.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mfi/mfi_pci.c Sat Dec 31 14:12:12 2011 (r229093) @@ -92,9 +92,8 @@ static device_method_t mfi_methods[] = { DEVMETHOD(device_detach, mfi_pci_detach), DEVMETHOD(device_suspend, mfi_pci_suspend), DEVMETHOD(device_resume, mfi_pci_resume), - DEVMETHOD(bus_print_child, bus_generic_print_child), - DEVMETHOD(bus_driver_added, bus_generic_driver_added), - { 0, 0 } + + DEVMETHOD_END }; static driver_t mfi_pci_driver = { Modified: stable/9/sys/dev/mii/acphy.c ============================================================================== --- stable/9/sys/dev/mii/acphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/acphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -87,7 +87,7 @@ static device_method_t acphy_methods[] = DEVMETHOD(device_attach, acphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t acphy_devclass; Modified: stable/9/sys/dev/mii/amphy.c ============================================================================== --- stable/9/sys/dev/mii/amphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/amphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -66,7 +66,7 @@ static device_method_t amphy_methods[] = DEVMETHOD(device_attach, amphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t amphy_devclass; Modified: stable/9/sys/dev/mii/atphy.c ============================================================================== --- stable/9/sys/dev/mii/atphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/atphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -59,7 +59,7 @@ static device_method_t atphy_methods[] = DEVMETHOD(device_attach, atphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { NULL, NULL } + DEVMETHOD_END }; static devclass_t atphy_devclass; Modified: stable/9/sys/dev/mii/axphy.c ============================================================================== --- stable/9/sys/dev/mii/axphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/axphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -56,7 +56,7 @@ static device_method_t axphy_methods[] = DEVMETHOD(device_attach, axphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t axphy_devclass; Modified: stable/9/sys/dev/mii/bmtphy.c ============================================================================== --- stable/9/sys/dev/mii/bmtphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/bmtphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -91,8 +91,7 @@ static device_method_t bmtphy_methods[] DEVMETHOD(device_attach, bmtphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - - { 0, 0 } + DEVMETHOD_END }; static devclass_t bmtphy_devclass; Modified: stable/9/sys/dev/mii/brgphy.c ============================================================================== --- stable/9/sys/dev/mii/brgphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/brgphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -82,7 +82,7 @@ static device_method_t brgphy_methods[] DEVMETHOD(device_attach, brgphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t brgphy_devclass; Modified: stable/9/sys/dev/mii/ciphy.c ============================================================================== --- stable/9/sys/dev/mii/ciphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/ciphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -67,7 +67,7 @@ static device_method_t ciphy_methods[] = DEVMETHOD(device_attach, ciphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t ciphy_devclass; Modified: stable/9/sys/dev/mii/e1000phy.c ============================================================================== --- stable/9/sys/dev/mii/e1000phy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/e1000phy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -71,7 +71,7 @@ static device_method_t e1000phy_methods[ DEVMETHOD(device_attach, e1000phy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t e1000phy_devclass; Modified: stable/9/sys/dev/mii/gentbi.c ============================================================================== --- stable/9/sys/dev/mii/gentbi.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/gentbi.c Sat Dec 31 14:12:12 2011 (r229093) @@ -95,7 +95,7 @@ static device_method_t gentbi_methods[] DEVMETHOD(device_attach, gentbi_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - {0, 0} + DEVMETHOD_END }; static devclass_t gentbi_devclass; Modified: stable/9/sys/dev/mii/icsphy.c ============================================================================== --- stable/9/sys/dev/mii/icsphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/icsphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -89,7 +89,7 @@ static device_method_t icsphy_methods[] DEVMETHOD(device_attach, icsphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t icsphy_devclass; Modified: stable/9/sys/dev/mii/ip1000phy.c ============================================================================== --- stable/9/sys/dev/mii/ip1000phy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/ip1000phy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -63,7 +63,7 @@ static device_method_t ip1000phy_methods DEVMETHOD(device_attach, ip1000phy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { 0, 0 } + DEVMETHOD_END }; static devclass_t ip1000phy_devclass; Modified: stable/9/sys/dev/mii/jmphy.c ============================================================================== --- stable/9/sys/dev/mii/jmphy.c Sat Dec 31 14:04:54 2011 (r229092) +++ stable/9/sys/dev/mii/jmphy.c Sat Dec 31 14:12:12 2011 (r229093) @@ -62,7 +62,7 @@ static device_method_t jmphy_methods[] = DEVMETHOD(device_attach, jmphy_attach), DEVMETHOD(device_detach, mii_phy_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - { NULL, NULL } + DEVMETHOD_END *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:13:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4E641065677; Sat, 31 Dec 2011 14:13:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF30A8FC13; Sat, 31 Dec 2011 14:13:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEDBvB067118; Sat, 31 Dec 2011 14:13:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEDB01067116; Sat, 31 Dec 2011 14:13:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311413.pBVEDB01067116@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229094 - stable/9/lib/libipsec X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:13:11 -0000 Author: dim Date: Sat Dec 31 14:13:11 2011 New Revision: 229094 URL: http://svn.freebsd.org/changeset/base/229094 Log: MFC r228552: Define YY_NO_INPUT in lib/libipsec/policy_token.l, so lex's input() function does not get defined needlessly. MFC r228555: In lib/libipsec/policy_token.l, use lex's standard "%option noinput" instead of hand-defining the YY_NO_INPUT macro. Modified: stable/9/lib/libipsec/policy_token.l Directory Properties: stable/9/lib/libipsec/ (props changed) Modified: stable/9/lib/libipsec/policy_token.l ============================================================================== --- stable/9/lib/libipsec/policy_token.l Sat Dec 31 14:12:12 2011 (r229093) +++ stable/9/lib/libipsec/policy_token.l Sat Dec 31 14:13:11 2011 (r229094) @@ -54,6 +54,7 @@ int yylex(void); %option noyywrap %option nounput +%option noinput /* common section */ nl \n From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:21:42 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C772F1065670; Sat, 31 Dec 2011 14:21:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B18528FC14; Sat, 31 Dec 2011 14:21:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVELfYY067449; Sat, 31 Dec 2011 14:21:41 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVELf2H067447; Sat, 31 Dec 2011 14:21:41 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311421.pBVELf2H067447@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:21:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229095 - stable/9/contrib/file X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:21:42 -0000 Author: dim Date: Sat Dec 31 14:21:41 2011 New Revision: 229095 URL: http://svn.freebsd.org/changeset/base/229095 Log: MFC r228553: In contrib/file/softmagic.c, fix a potential format string security problem. (This fix has already been applied upstream, but we do not have the latest version of file in the tree at the moment.) Modified: stable/9/contrib/file/softmagic.c Directory Properties: stable/9/contrib/file/ (props changed) Modified: stable/9/contrib/file/softmagic.c ============================================================================== --- stable/9/contrib/file/softmagic.c Sat Dec 31 14:13:11 2011 (r229094) +++ stable/9/contrib/file/softmagic.c Sat Dec 31 14:21:41 2011 (r229095) @@ -1582,7 +1582,7 @@ mget(struct magic_set *ms, const unsigne case FILE_INDIRECT: if ((ms->flags & (MAGIC_MIME|MAGIC_APPLE)) == 0 && - file_printf(ms, m->desc) == -1) + file_printf(ms, "%s", m->desc) == -1) return -1; if (nbytes < offset) return 0; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:22:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E8471065675; Sat, 31 Dec 2011 14:22:03 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF518FC0C; Sat, 31 Dec 2011 14:22:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEM3Cx067520; Sat, 31 Dec 2011 14:22:03 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEM2KX067506; Sat, 31 Dec 2011 14:22:02 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311422.pBVEM2KX067506@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:22:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229096 - in stable/9/sys: arm/econa dev/usb dev/usb/controller mips/atheros mips/cavium/usb mips/rmi mips/rt305x modules/usb modules/usb/avr32dci powerpc/ps3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:22:03 -0000 Author: hselasky Date: Sat Dec 31 14:22:02 2011 New Revision: 229096 URL: http://svn.freebsd.org/changeset/base/229096 Log: MFC r229086, r228483 and r228640: Implement better support for USB controller suspend and resume. Fix some build issues in avr32dci.c Added: stable/9/sys/modules/usb/avr32dci/ - copied from r228483, head/sys/modules/usb/avr32dci/ Modified: stable/9/sys/arm/econa/ehci_ebus.c stable/9/sys/arm/econa/ohci_ec.c stable/9/sys/dev/usb/controller/at91dci.c stable/9/sys/dev/usb/controller/at91dci.h stable/9/sys/dev/usb/controller/at91dci_atmelarm.c stable/9/sys/dev/usb/controller/atmegadci.c stable/9/sys/dev/usb/controller/atmegadci.h stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c stable/9/sys/dev/usb/controller/avr32dci.c stable/9/sys/dev/usb/controller/avr32dci.h stable/9/sys/dev/usb/controller/ehci.c stable/9/sys/dev/usb/controller/ehci.h stable/9/sys/dev/usb/controller/ehci_ixp4xx.c stable/9/sys/dev/usb/controller/ehci_mv.c stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/musb_otg.c stable/9/sys/dev/usb/controller/musb_otg.h stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c stable/9/sys/dev/usb/controller/ohci.c stable/9/sys/dev/usb/controller/ohci.h stable/9/sys/dev/usb/controller/ohci_atmelarm.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/ohci_s3c24x0.c stable/9/sys/dev/usb/controller/uhci.c stable/9/sys/dev/usb/controller/uhci.h stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/usb_controller.c stable/9/sys/dev/usb/controller/uss820dci.c stable/9/sys/dev/usb/controller/uss820dci.h stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/controller/xhci.h stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/usb_bus.h stable/9/sys/dev/usb/usb_controller.h stable/9/sys/dev/usb/usb_if.m stable/9/sys/mips/atheros/ar71xx_ehci.c stable/9/sys/mips/atheros/ar71xx_ohci.c stable/9/sys/mips/cavium/usb/octusb.c stable/9/sys/mips/cavium/usb/octusb.h stable/9/sys/mips/cavium/usb/octusb_octeon.c stable/9/sys/mips/rmi/xls_ehci.c stable/9/sys/mips/rt305x/rt305x_dotg.c stable/9/sys/modules/usb/Makefile stable/9/sys/powerpc/ps3/ehci_ps3.c stable/9/sys/powerpc/ps3/ohci_ps3.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/arm/econa/ehci_ebus.c ============================================================================== --- stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 14:22:02 2011 (r229096) @@ -75,10 +75,6 @@ __FBSDID("$FreeBSD$"); static device_attach_t ehci_ebus_attach; static device_detach_t ehci_ebus_detach; -static device_shutdown_t ehci_ebus_shutdown; -static device_suspend_t ehci_ebus_suspend; -static device_resume_t ehci_ebus_resume; - static void *ih_err; @@ -86,45 +82,6 @@ static void *ih_err; #define USB_BRIDGE_INTR_MASK 0x214 static int -ehci_ebus_suspend(device_t self) -{ - ehci_softc_t *sc = device_get_softc(self); - int err; - - err = bus_generic_suspend(self); - if (err) - return (err); - ehci_suspend(sc); - return (0); -} - -static int -ehci_ebus_resume(device_t self) -{ - ehci_softc_t *sc = device_get_softc(self); - - ehci_resume(sc); - - bus_generic_resume(self); - - return (0); -} - -static int -ehci_ebus_shutdown(device_t self) -{ - ehci_softc_t *sc = device_get_softc(self); - int err; - - err = bus_generic_shutdown(self); - if (err) - return (err); - ehci_shutdown(sc); - - return (0); -} - -static int ehci_ebus_probe(device_t self) { @@ -277,17 +234,17 @@ static device_method_t ehci_methods[] = DEVMETHOD(device_probe, ehci_ebus_probe), DEVMETHOD(device_attach, ehci_ebus_attach), DEVMETHOD(device_detach, ehci_ebus_detach), - DEVMETHOD(device_suspend, ehci_ebus_suspend), - DEVMETHOD(device_resume, ehci_ebus_resume), - DEVMETHOD(device_shutdown, ehci_ebus_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t ehci_driver = { - "ehci", - ehci_methods, - sizeof(ehci_softc_t), + .name = "ehci", + .methods = ehci_methods, + .size = sizeof(ehci_softc_t), }; static devclass_t ehci_devclass; Modified: stable/9/sys/arm/econa/ohci_ec.c ============================================================================== --- stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 14:22:02 2011 (r229096) @@ -220,15 +220,17 @@ static device_method_t ohci_methods[] = DEVMETHOD(device_probe, ohci_ec_probe), DEVMETHOD(device_attach, ohci_ec_attach), DEVMETHOD(device_detach, ohci_ec_detach), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_suspend, bus_generic_suspend), DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t ohci_driver = { - "ohci", - ohci_methods, - sizeof(struct ec_ohci_softc), + .name = "ohci", + .methods = ohci_methods, + .size = sizeof(struct ec_ohci_softc), }; static devclass_t ohci_devclass; Modified: stable/9/sys/dev/usb/controller/at91dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/at91dci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -1461,16 +1461,16 @@ at91dci_uninit(struct at91dci_softc *sc) USB_BUS_UNLOCK(&sc->sc_bus); } -void +static void at91dci_suspend(struct at91dci_softc *sc) { - return; + /* TODO */ } -void +static void at91dci_resume(struct at91dci_softc *sc) { - return; + /* TODO */ } static void @@ -2306,6 +2306,26 @@ at91dci_ep_init(struct usb_device *udev, } } +static void +at91dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct at91dci_softc *sc = AT9100_DCI_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + at91dci_suspend(sc); + break; + case USB_HW_POWER_SHUTDOWN: + at91dci_uninit(sc); + break; + case USB_HW_POWER_RESUME: + at91dci_resume(sc); + break; + default: + break; + } +} + struct usb_bus_methods at91dci_bus_methods = { .endpoint_init = &at91dci_ep_init, @@ -2316,4 +2336,5 @@ struct usb_bus_methods at91dci_bus_metho .clear_stall = &at91dci_clear_stall, .roothub_exec = &at91dci_roothub_exec, .xfer_poll = &at91dci_do_poll, + .set_hw_power_sleep = &at91dci_set_hw_power_sleep, }; Modified: stable/9/sys/dev/usb/controller/at91dci.h ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/at91dci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -235,8 +235,6 @@ struct at91dci_softc { usb_error_t at91dci_init(struct at91dci_softc *sc); void at91dci_uninit(struct at91dci_softc *sc); -void at91dci_suspend(struct at91dci_softc *sc); -void at91dci_resume(struct at91dci_softc *sc); void at91dci_interrupt(struct at91dci_softc *sc); void at91dci_vbus_interrupt(struct at91dci_softc *sc, uint8_t is_on); Modified: stable/9/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 14:22:02 2011 (r229096) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); static device_probe_t at91_udp_probe; static device_attach_t at91_udp_attach; static device_detach_t at91_udp_detach; -static device_shutdown_t at91_udp_shutdown; struct at91_udp_softc { struct at91dci_softc sc_dci; /* must be first */ @@ -324,35 +323,22 @@ at91_udp_detach(device_t dev) return (0); } -static int -at91_udp_shutdown(device_t dev) -{ - struct at91_udp_softc *sc = device_get_softc(dev); - int err; - - err = bus_generic_shutdown(dev); - if (err) - return (err); - - at91dci_uninit(&sc->sc_dci); - - return (0); -} - static device_method_t at91_udp_methods[] = { /* Device interface */ DEVMETHOD(device_probe, at91_udp_probe), DEVMETHOD(device_attach, at91_udp_attach), DEVMETHOD(device_detach, at91_udp_detach), - DEVMETHOD(device_shutdown, at91_udp_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t at91_udp_driver = { - "at91_udp", - at91_udp_methods, - sizeof(struct at91_udp_softc), + .name = "at91_udp", + .methods = at91_udp_methods, + .size = sizeof(struct at91_udp_softc), }; static devclass_t at91_udp_devclass; Modified: stable/9/sys/dev/usb/controller/atmegadci.c ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/atmegadci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -1351,16 +1351,16 @@ atmegadci_uninit(struct atmegadci_softc USB_BUS_UNLOCK(&sc->sc_bus); } -void +static void atmegadci_suspend(struct atmegadci_softc *sc) { - return; + /* TODO */ } -void +static void atmegadci_resume(struct atmegadci_softc *sc) { - return; + /* TODO */ } static void @@ -2125,6 +2125,26 @@ atmegadci_ep_init(struct usb_device *ude } } +static void +atmegadci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct atmegadci_softc *sc = ATMEGA_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + atmegadci_suspend(sc); + break; + case USB_HW_POWER_SHUTDOWN: + atmegadci_uninit(sc); + break; + case USB_HW_POWER_RESUME: + atmegadci_resume(sc); + break; + default: + break; + } +} + struct usb_bus_methods atmegadci_bus_methods = { .endpoint_init = &atmegadci_ep_init, @@ -2135,4 +2155,5 @@ struct usb_bus_methods atmegadci_bus_met .clear_stall = &atmegadci_clear_stall, .roothub_exec = &atmegadci_roothub_exec, .xfer_poll = &atmegadci_do_poll, + .set_hw_power_sleep = &atmegadci_set_hw_power_sleep, }; Modified: stable/9/sys/dev/usb/controller/atmegadci.h ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/atmegadci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -278,8 +278,6 @@ struct atmegadci_softc { usb_error_t atmegadci_init(struct atmegadci_softc *sc); void atmegadci_uninit(struct atmegadci_softc *sc); -void atmegadci_suspend(struct atmegadci_softc *sc); -void atmegadci_resume(struct atmegadci_softc *sc); void atmegadci_interrupt(struct atmegadci_softc *sc); #endif /* _ATMEGADCI_H_ */ Modified: stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 14:22:02 2011 (r229096) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); static device_probe_t atmegadci_probe; static device_attach_t atmegadci_attach; static device_detach_t atmegadci_detach; -static device_shutdown_t atmegadci_shutdown; struct atmegadci_super_softc { struct atmegadci_softc sc_otg; /* must be first */ @@ -193,35 +192,22 @@ atmegadci_detach(device_t dev) return (0); } -static int -atmegadci_shutdown(device_t dev) -{ - struct atmegadci_super_softc *sc = device_get_softc(dev); - int err; - - err = bus_generic_shutdown(dev); - if (err) - return (err); - - atmegadci_uninit(&sc->sc_otg); - - return (0); -} - static device_method_t atmegadci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, atmegadci_probe), DEVMETHOD(device_attach, atmegadci_attach), DEVMETHOD(device_detach, atmegadci_detach), - DEVMETHOD(device_shutdown, atmegadci_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + DEVMETHOD(device_shutdown, bus_generic_shutdown), DEVMETHOD_END }; static driver_t atmegadci_driver = { - "atmegadci", - atmegadci_methods, - sizeof(struct atmegadci_super_softc), + .name = "atmegadci", + .methods = atmegadci_methods, + .size = sizeof(struct atmegadci_super_softc), }; static devclass_t atmegadci_devclass; Modified: stable/9/sys/dev/usb/controller/avr32dci.c ============================================================================== --- stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/avr32dci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -265,7 +265,7 @@ avr32dci_set_address(struct avr32dci_sof { DPRINTFN(5, "addr=%d\n", addr); - avr32dci_mod_ctrl(sc, AVR32_UDADDR_ADDEN | addr, 0); + avr32dci_mod_ctrl(sc, AVR32_CTRL_DEV_FADDR_EN | addr, 0); } static uint8_t @@ -501,7 +501,7 @@ repeat: } /* allocate FIFO bank */ - AVR32_WRITE_4(sc, AVR32_EPTCLRSTA(td->ep_no), AVR32_EPTSTA_TX_BK_RDY); + AVR32_WRITE_4(sc, AVR32_EPTCTL(td->ep_no), AVR32_EPTCTL_TX_PK_RDY); /* check remainder */ if (td->remainder == 0) { @@ -754,7 +754,7 @@ avr32dci_setup_standard_chain(struct usb uint8_t need_sync; DPRINTFN(9, "addr=%d endpt=%d sumlen=%d speed=%d\n", - xfer->address, UE_GET_ADDR(xfer->endpoint), + xfer->address, UE_GET_ADDR(xfer->endpointno), xfer->sumlen, usbd_get_speed(xfer->xroot->udev)); temp.max_frame_size = xfer->max_frame_size; @@ -773,7 +773,7 @@ avr32dci_setup_standard_chain(struct usb temp.did_stall = !xfer->flags_int.control_stall; sc = AVR32_BUS2SC(xfer->xroot->bus); - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* check if we should prepend a setup message */ @@ -798,7 +798,7 @@ avr32dci_setup_standard_chain(struct usb } if (x != xfer->nframes) { - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &avr32dci_data_tx; need_sync = 1; } else { @@ -872,7 +872,7 @@ avr32dci_setup_standard_chain(struct usb * Send a DATA1 message and invert the current * endpoint direction. */ - if (xfer->endpoint & UE_DIR_IN) { + if (xfer->endpointno & UE_DIR_IN) { temp.func = &avr32dci_data_rx; need_sync = 0; } else { @@ -913,7 +913,8 @@ avr32dci_start_standard_chain(struct usb /* poll one time - will turn on interrupts */ if (avr32dci_xfer_do_fifo(xfer)) { - uint8_t ep_no = xfer->endpoint & UE_ADDR_MASK; + uint8_t ep_no = xfer->endpointno & UE_ADDR; + struct avr32dci_softc *sc = AVR32_BUS2SC(xfer->xroot->bus); avr32dci_mod_ien(sc, AVR32_INT_EPT_INT(ep_no), 0); @@ -1012,7 +1013,7 @@ avr32dci_standard_done(struct usb_xfer * usb_error_t err = 0; DPRINTFN(13, "xfer=%p pipe=%p transfer done\n", - xfer, xfer->pipe); + xfer, xfer->endpoint); /* reset scanner */ @@ -1064,10 +1065,10 @@ avr32dci_device_done(struct usb_xfer *xf USB_BUS_LOCK_ASSERT(&sc->sc_bus, MA_OWNED); DPRINTFN(9, "xfer=%p, pipe=%p, error=%d\n", - xfer, xfer->pipe, error); + xfer, xfer->endpoint, error); if (xfer->flags_int.usb_mode == USB_MODE_DEVICE) { - ep_no = (xfer->endpoint & UE_ADDR); + ep_no = (xfer->endpointno & UE_ADDR); /* disable endpoint interrupt */ avr32dci_mod_ien(sc, 0, AVR32_INT_EPT_INT(ep_no)); @@ -1080,7 +1081,7 @@ avr32dci_device_done(struct usb_xfer *xf static void avr32dci_set_stall(struct usb_device *udev, struct usb_xfer *xfer, - struct usb_endpoint *ep, uint8_t *did_stall) + struct usb_endpoint *pipe, uint8_t *did_stall) { struct avr32dci_softc *sc; uint8_t ep_no; @@ -1166,7 +1167,7 @@ avr32dci_clear_stall_sub(struct avr32dci } static void -avr32dci_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) +avr32dci_clear_stall(struct usb_device *udev, struct usb_endpoint *pipe) { struct avr32dci_softc *sc; struct usb_endpoint_descriptor *ed; @@ -1226,8 +1227,7 @@ avr32dci_init(struct avr32dci_softc *sc) AVR32_INT_ENDRESET, 0); /* reset all endpoints */ -/**INDENT** Warning@1207: Extra ) */ - AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1)); + AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1); /* disable all endpoints */ for (n = 0; n != AVR32_EP_MAX; n++) { @@ -1262,8 +1262,7 @@ avr32dci_uninit(struct avr32dci_softc *s avr32dci_mod_ien(sc, 0, 0xFFFFFFFF); /* reset all endpoints */ -/**INDENT** Warning@1242: Extra ) */ - AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1)); + AVR32_WRITE_4(sc, AVR32_EPTRST, (1 << AVR32_EP_MAX) - 1); /* disable all endpoints */ for (n = 0; n != AVR32_EP_MAX; n++) { @@ -1284,16 +1283,16 @@ avr32dci_uninit(struct avr32dci_softc *s USB_BUS_UNLOCK(&sc->sc_bus); } -void +static void avr32dci_suspend(struct avr32dci_softc *sc) { - return; + /* TODO */ } -void +static void avr32dci_resume(struct avr32dci_softc *sc) { - return; + /* TODO */ } static void @@ -1369,10 +1368,10 @@ avr32dci_device_isoc_fs_enter(struct usb uint8_t ep_no; DPRINTFN(6, "xfer=%p next=%d nframes=%d\n", - xfer, xfer->pipe->isoc_next, xfer->nframes); + xfer, xfer->endpoint->isoc_next, xfer->nframes); /* get the current frame index */ - ep_no = xfer->endpoint & UE_ADDR_MASK; + ep_no = xfer->endpointno & UE_ADDR; nframes = (AVR32_READ_4(sc, AVR32_FNUM) / 8); nframes &= AVR32_FRAME_MASK; @@ -1381,9 +1380,9 @@ avr32dci_device_isoc_fs_enter(struct usb * check if the frame index is within the window where the frames * will be inserted */ - temp = (nframes - xfer->pipe->isoc_next) & AVR32_FRAME_MASK; + temp = (nframes - xfer->endpoint->isoc_next) & AVR32_FRAME_MASK; - if ((xfer->pipe->is_synced == 0) || + if ((xfer->endpoint->is_synced == 0) || (temp < xfer->nframes)) { /* * If there is data underflow or the pipe queue is @@ -1391,15 +1390,15 @@ avr32dci_device_isoc_fs_enter(struct usb * of the current frame position. Else two isochronous * transfers might overlap. */ - xfer->pipe->isoc_next = (nframes + 3) & AVR32_FRAME_MASK; - xfer->pipe->is_synced = 1; - DPRINTFN(3, "start next=%d\n", xfer->pipe->isoc_next); + xfer->endpoint->isoc_next = (nframes + 3) & AVR32_FRAME_MASK; + xfer->endpoint->is_synced = 1; + DPRINTFN(3, "start next=%d\n", xfer->endpoint->isoc_next); } /* * compute how many milliseconds the insertion is ahead of the * current frame position: */ - temp = (xfer->pipe->isoc_next - nframes) & AVR32_FRAME_MASK; + temp = (xfer->endpoint->isoc_next - nframes) & AVR32_FRAME_MASK; /* * pre-compute when the isochronous transfer will be finished: @@ -1409,7 +1408,7 @@ avr32dci_device_isoc_fs_enter(struct usb xfer->nframes; /* compute frame number for next insertion */ - xfer->pipe->isoc_next += xfer->nframes; + xfer->endpoint->isoc_next += xfer->nframes; /* setup TDs */ avr32dci_setup_standard_chain(xfer); @@ -1832,7 +1831,7 @@ tr_handle_clear_port_feature: AVR32_WRITE_4(sc, AVR32_EPTCLRSTA(0), AVR32_EPTSTA_FRCESTALL); /* configure */ - AVR32_WRITE_4(sc, AVR32_EPTCFG(0), AVR32_EPTCFG_TYPE_CONTROL | + AVR32_WRITE_4(sc, AVR32_EPTCFG(0), AVR32_EPTCFG_TYPE_CTRL | AVR32_EPTCFG_NBANK(1) | AVR32_EPTCFG_EPSIZE(6)); temp = AVR32_READ_4(sc, AVR32_EPTCFG(0)); @@ -1974,7 +1973,7 @@ avr32dci_xfer_setup(struct usb_setup_par /* * compute maximum number of TDs */ - if ((xfer->pipe->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) { + if ((xfer->endpoint->edesc->bmAttributes & UE_XFERTYPE) == UE_CONTROL) { ntd = xfer->nframes + 1 /* STATUS */ + 1 /* SYNC 1 */ + 1 /* SYNC 2 */ ; @@ -1997,7 +1996,7 @@ avr32dci_xfer_setup(struct usb_setup_par /* * get profile stuff */ - ep_no = xfer->endpoint & UE_ADDR; + ep_no = xfer->endpointno & UE_ADDR; avr32dci_get_hw_ep_profile(parm->udev, &pf, ep_no); if (pf == NULL) { @@ -2045,7 +2044,7 @@ avr32dci_xfer_unsetup(struct usb_xfer *x static void avr32dci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, - struct usb_endpoint *ep) + struct usb_endpoint *pipe) { struct avr32dci_softc *sc = AVR32_BUS2SC(udev->bus); @@ -2072,6 +2071,26 @@ avr32dci_ep_init(struct usb_device *udev } } +static void +avr32dci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct avr32dci_softc *sc = AVR32_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + avr32dci_suspend(sc); + break; + case USB_HW_POWER_SHUTDOWN: + avr32dci_uninit(sc); + break; + case USB_HW_POWER_RESUME: + avr32dci_resume(sc); + break; + default: + break; + } +} + struct usb_bus_methods avr32dci_bus_methods = { .endpoint_init = &avr32dci_ep_init, @@ -2082,4 +2101,5 @@ struct usb_bus_methods avr32dci_bus_meth .clear_stall = &avr32dci_clear_stall, .roothub_exec = &avr32dci_roothub_exec, .xfer_poll = &avr32dci_do_poll, + .set_hw_power_sleep = &avr32dci_set_hw_power_sleep, }; Modified: stable/9/sys/dev/usb/controller/avr32dci.h ============================================================================== --- stable/9/sys/dev/usb/controller/avr32dci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/avr32dci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -166,6 +166,7 @@ struct avr32dci_td { uint32_t offset; uint32_t remainder; uint16_t max_packet_size; + uint8_t bank_shift; uint8_t error:1; uint8_t alt_next:1; uint8_t short_pkt:1; @@ -246,8 +247,6 @@ struct avr32dci_softc { usb_error_t avr32dci_init(struct avr32dci_softc *sc); void avr32dci_uninit(struct avr32dci_softc *sc); -void avr32dci_suspend(struct avr32dci_softc *sc); -void avr32dci_resume(struct avr32dci_softc *sc); void avr32dci_interrupt(struct avr32dci_softc *sc); void avr32dci_vbus_interrupt(struct avr32dci_softc *sc, uint8_t is_on); Modified: stable/9/sys/dev/usb/controller/ehci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/ehci.c Sat Dec 31 14:22:02 2011 (r229096) @@ -188,7 +188,7 @@ ehci_reset(ehci_softc_t *sc) EOWRITE4(sc, EHCI_USBCMD, EHCI_CMD_HCRESET); for (i = 0; i < 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 128); hcr = EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_HCRESET; if (!hcr) { if (sc->sc_flags & (EHCI_SCFLG_SETMODE | EHCI_SCFLG_BIGEMMIO)) { @@ -212,7 +212,7 @@ ehci_reset(ehci_softc_t *sc) return (0); } } - device_printf(sc->sc_bus.bdev, "reset timeout\n"); + device_printf(sc->sc_bus.bdev, "Reset timeout\n"); return (USB_ERR_IOERROR); } @@ -224,7 +224,7 @@ ehci_hcreset(ehci_softc_t *sc) EOWRITE4(sc, EHCI_USBCMD, 0); /* Halt controller */ for (i = 0; i < 100; i++) { - usb_pause_mtx(NULL, hz / 1000); + usb_pause_mtx(NULL, hz / 128); hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; if (hcr) break; @@ -237,7 +237,60 @@ ehci_hcreset(ehci_softc_t *sc) */ device_printf(sc->sc_bus.bdev, "stop timeout\n"); - return ehci_reset(sc); + return (ehci_reset(sc)); +} + +static int +ehci_init_sub(struct ehci_softc *sc) +{ + struct usb_page_search buf_res; + uint32_t cparams; + uint32_t hcr; + uint8_t i; + + cparams = EREAD4(sc, EHCI_HCCPARAMS); + + DPRINTF("cparams=0x%x\n", cparams); + + if (EHCI_HCC_64BIT(cparams)) { + DPRINTF("HCC uses 64-bit structures\n"); + + /* MUST clear segment register if 64 bit capable */ + EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); + } + + usbd_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res); + EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); + + usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); + EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH); + + /* enable interrupts */ + EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); + + /* turn on controller */ + EOWRITE4(sc, EHCI_USBCMD, + EHCI_CMD_ITC_1 | /* 1 microframes interrupt delay */ + (EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_FLS_M) | + EHCI_CMD_ASE | + EHCI_CMD_PSE | + EHCI_CMD_RS); + + /* Take over port ownership */ + EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF); + + for (i = 0; i < 100; i++) { + usb_pause_mtx(NULL, hz / 128); + hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; + if (!hcr) { + break; + } + } + if (hcr) { + device_printf(sc->sc_bus.bdev, "Run timeout\n"); + return (USB_ERR_IOERROR); + } + return (USB_ERR_NORMAL_COMPLETION); } usb_error_t @@ -246,8 +299,6 @@ ehci_init(ehci_softc_t *sc) struct usb_page_search buf_res; uint32_t version; uint32_t sparams; - uint32_t cparams; - uint32_t hcr; uint16_t i; uint16_t x; uint16_t y; @@ -279,15 +330,6 @@ ehci_init(ehci_softc_t *sc) DPRINTF("sparams=0x%x\n", sparams); sc->sc_noport = EHCI_HCS_N_PORTS(sparams); - cparams = EREAD4(sc, EHCI_HCCPARAMS); - DPRINTF("cparams=0x%x\n", cparams); - - if (EHCI_HCC_64BIT(cparams)) { - DPRINTF("HCC uses 64-bit structures\n"); - - /* MUST clear segment register if 64 bit capable */ - EWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); - } sc->sc_bus.usbrev = USB_REV_2_0; /* Reset the controller */ @@ -464,9 +506,6 @@ ehci_init(ehci_softc_t *sc) [i & (EHCI_VIRTUAL_FRAMELIST_COUNT - 1)]->itd_self; } } - /* setup sync list pointer */ - EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); - usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); if (1) { @@ -511,35 +550,8 @@ ehci_init(ehci_softc_t *sc) } #endif - /* setup async list pointer */ - EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH); - - - /* enable interrupts */ - EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); - - /* turn on controller */ - EOWRITE4(sc, EHCI_USBCMD, - EHCI_CMD_ITC_1 | /* 1 microframes interrupt delay */ - (EOREAD4(sc, EHCI_USBCMD) & EHCI_CMD_FLS_M) | - EHCI_CMD_ASE | - EHCI_CMD_PSE | - EHCI_CMD_RS); - - /* Take over port ownership */ - EOWRITE4(sc, EHCI_CONFIGFLAG, EHCI_CONF_CF); - - for (i = 0; i < 100; i++) { - usb_pause_mtx(NULL, hz / 1000); - hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; - if (!hcr) { - break; - } - } - if (hcr) { - device_printf(sc->sc_bus.bdev, "run timeout\n"); - return (USB_ERR_IOERROR); - } + /* finial setup */ + err = ehci_init_sub(sc); if (!err) { /* catch any lost interrupts */ @@ -573,137 +585,28 @@ ehci_detach(ehci_softc_t *sc) usb_callout_drain(&sc->sc_tmo_poll); } -void +static void ehci_suspend(ehci_softc_t *sc) { - uint32_t cmd; - uint32_t hcr; - uint8_t i; - - USB_BUS_LOCK(&sc->sc_bus); - - for (i = 1; i <= sc->sc_noport; i++) { - cmd = EOREAD4(sc, EHCI_PORTSC(i)); - if (((cmd & EHCI_PS_PO) == 0) && - ((cmd & EHCI_PS_PE) == EHCI_PS_PE)) { - EOWRITE4(sc, EHCI_PORTSC(i), - cmd | EHCI_PS_SUSP); - } - } - - sc->sc_cmd = EOREAD4(sc, EHCI_USBCMD); - - cmd = sc->sc_cmd & ~(EHCI_CMD_ASE | EHCI_CMD_PSE); - EOWRITE4(sc, EHCI_USBCMD, cmd); - - for (i = 0; i < 100; i++) { - hcr = EOREAD4(sc, EHCI_USBSTS) & - (EHCI_STS_ASS | EHCI_STS_PSS); - - if (hcr == 0) { - break; - } - usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); - } - - if (hcr != 0) { - device_printf(sc->sc_bus.bdev, "reset timeout\n"); - } - cmd &= ~EHCI_CMD_RS; - EOWRITE4(sc, EHCI_USBCMD, cmd); - - for (i = 0; i < 100; i++) { - hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; - if (hcr == EHCI_STS_HCH) { - break; - } - usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); - } + DPRINTF("stopping the HC\n"); - if (hcr != EHCI_STS_HCH) { - device_printf(sc->sc_bus.bdev, - "config timeout\n"); - } - USB_BUS_UNLOCK(&sc->sc_bus); + /* reset HC */ + ehci_hcreset(sc); } -void +static void ehci_resume(ehci_softc_t *sc) { - struct usb_page_search buf_res; - uint32_t cmd; - uint32_t hcr; - uint8_t i; - - USB_BUS_LOCK(&sc->sc_bus); + /* reset HC */ + ehci_hcreset(sc); - /* restore things in case the bios doesn't */ - EOWRITE4(sc, EHCI_CTRLDSSEGMENT, 0); - - usbd_get_page(&sc->sc_hw.pframes_pc, 0, &buf_res); - EOWRITE4(sc, EHCI_PERIODICLISTBASE, buf_res.physaddr); - - usbd_get_page(&sc->sc_hw.async_start_pc, 0, &buf_res); - EOWRITE4(sc, EHCI_ASYNCLISTADDR, buf_res.physaddr | EHCI_LINK_QH); - - EOWRITE4(sc, EHCI_USBINTR, sc->sc_eintrs); - - hcr = 0; - for (i = 1; i <= sc->sc_noport; i++) { - cmd = EOREAD4(sc, EHCI_PORTSC(i)); - if (((cmd & EHCI_PS_PO) == 0) && - ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) { - EOWRITE4(sc, EHCI_PORTSC(i), - cmd | EHCI_PS_FPR); - hcr = 1; - } - } - - if (hcr) { - usb_pause_mtx(&sc->sc_bus.bus_mtx, - USB_MS_TO_TICKS(USB_RESUME_WAIT)); - - for (i = 1; i <= sc->sc_noport; i++) { - cmd = EOREAD4(sc, EHCI_PORTSC(i)); - if (((cmd & EHCI_PS_PO) == 0) && - ((cmd & EHCI_PS_SUSP) == EHCI_PS_SUSP)) { - EOWRITE4(sc, EHCI_PORTSC(i), - cmd & ~EHCI_PS_FPR); - } - } - } - EOWRITE4(sc, EHCI_USBCMD, sc->sc_cmd); - - for (i = 0; i < 100; i++) { - hcr = EOREAD4(sc, EHCI_USBSTS) & EHCI_STS_HCH; - if (hcr != EHCI_STS_HCH) { - break; - } - usb_pause_mtx(&sc->sc_bus.bus_mtx, hz / 1000); - } - if (hcr == EHCI_STS_HCH) { - device_printf(sc->sc_bus.bdev, "config timeout\n"); - } - - USB_BUS_UNLOCK(&sc->sc_bus); - - usb_pause_mtx(NULL, - USB_MS_TO_TICKS(USB_RESUME_WAIT)); + /* setup HC */ + ehci_init_sub(sc); /* catch any lost interrupts */ ehci_do_poll(&sc->sc_bus); } -void -ehci_shutdown(ehci_softc_t *sc) -{ - DPRINTF("stopping the HC\n"); - - if (ehci_hcreset(sc)) { - DPRINTF("reset failed!\n"); - } -} - #ifdef USB_DEBUG static void ehci_dump_regs(ehci_softc_t *sc) @@ -3908,8 +3811,24 @@ ehci_device_suspend(struct usb_device *u } USB_BUS_UNLOCK(udev->bus); +} - return; +static void +ehci_set_hw_power_sleep(struct usb_bus *bus, uint32_t state) +{ + struct ehci_softc *sc = EHCI_BUS2SC(bus); + + switch (state) { + case USB_HW_POWER_SUSPEND: + case USB_HW_POWER_SHUTDOWN: + ehci_suspend(sc); + break; + case USB_HW_POWER_RESUME: + ehci_resume(sc); + break; + default: + break; + } } static void @@ -3955,6 +3874,7 @@ struct usb_bus_methods ehci_bus_methods .device_resume = ehci_device_resume, .device_suspend = ehci_device_suspend, .set_hw_power = ehci_set_hw_power, + .set_hw_power_sleep = ehci_set_hw_power_sleep, .roothub_exec = ehci_roothub_exec, .xfer_poll = ehci_do_poll, }; Modified: stable/9/sys/dev/usb/controller/ehci.h ============================================================================== --- stable/9/sys/dev/usb/controller/ehci.h Sat Dec 31 14:21:41 2011 (r229095) +++ stable/9/sys/dev/usb/controller/ehci.h Sat Dec 31 14:22:02 2011 (r229096) @@ -333,8 +333,6 @@ typedef struct ehci_softc { uint32_t sc_terminate_self; /* TD short packet termination pointer */ uint32_t sc_eintrs; - uint32_t sc_cmd; /* shadow of cmd register during - * suspend */ uint16_t sc_intr_stat[EHCI_VIRTUAL_FRAMELIST_COUNT]; uint16_t sc_id_vendor; /* vendor ID for root hub */ @@ -445,9 +443,6 @@ usb_bus_mem_cb_t ehci_iterate_hw_softc; usb_error_t ehci_reset(ehci_softc_t *sc); usb_error_t ehci_init(ehci_softc_t *sc); void ehci_detach(struct ehci_softc *sc); -void ehci_suspend(struct ehci_softc *sc); -void ehci_resume(struct ehci_softc *sc); -void ehci_shutdown(ehci_softc_t *sc); void ehci_interrupt(ehci_softc_t *sc); #endif /* _EHCI_H_ */ Modified: stable/9/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Sat Dec 31 14:21:41 2011 (r229095) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:24:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEFFC106566C; Sat, 31 Dec 2011 14:24:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D8FA78FC08; Sat, 31 Dec 2011 14:24:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEOMWF067656; Sat, 31 Dec 2011 14:24:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEOMws067654; Sat, 31 Dec 2011 14:24:22 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311424.pBVEOMws067654@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:24:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229097 - stable/9/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:24:23 -0000 Author: hselasky Date: Sat Dec 31 14:24:22 2011 New Revision: 229097 URL: http://svn.freebsd.org/changeset/base/229097 Log: MFC r228758: Fix for race against user-space applications trying to change the configuration on USB HUBs. PR: kern/163091 Modified: stable/9/sys/dev/usb/usb_hub.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usb_hub.c ============================================================================== --- stable/9/sys/dev/usb/usb_hub.c Sat Dec 31 14:22:02 2011 (r229096) +++ stable/9/sys/dev/usb/usb_hub.c Sat Dec 31 14:24:22 2011 (r229097) @@ -707,6 +707,13 @@ uhub_explore(struct usb_device *udev) DPRINTF("Device is suspended!\n"); return (0); } + + /* + * Make sure we don't race against user-space applications + * like LibUSB: + */ + usbd_enum_lock(udev); + for (x = 0; x != hub->nports; x++) { up = hub->ports + x; portno = x + 1; @@ -784,6 +791,8 @@ uhub_explore(struct usb_device *udev) up->restartcnt = 0; } + usbd_enum_unlock(udev); + /* initial status checked */ sc->sc_flags |= UHUB_FLAG_DID_EXPLORE; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:27:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 800DD106566B; Sat, 31 Dec 2011 14:27:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 687F28FC13; Sat, 31 Dec 2011 14:27:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVERRWl067807; Sat, 31 Dec 2011 14:27:27 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVERR6x067805; Sat, 31 Dec 2011 14:27:27 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311427.pBVERR6x067805@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14: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 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229098 - stable/9/sys/contrib/ngatm/netnatm/msg X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:27:27 -0000 Author: dim Date: Sat Dec 31 14:27:26 2011 New Revision: 229098 URL: http://svn.freebsd.org/changeset/base/229098 Log: MFC r228554: In sys/contrib/ngatm/netnatm/msg/uni_ie.c, use a more appropriate way to tell the compiler some parameters are purposefully unused. Modified: stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c ============================================================================== --- stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c Sat Dec 31 14:24:22 2011 (r229097) +++ stable/9/sys/contrib/ngatm/netnatm/msg/uni_ie.c Sat Dec 31 14:27:26 2011 (r229098) @@ -47,6 +47,8 @@ #include #include +#define UNUSED(_p) do { (void)(_p); } while (0) + /* * Define internal functions. */ @@ -1321,7 +1323,7 @@ check_cause(struct uni_ie_cause *ie, str return (-1); } if (ie->h.present & UNI_CAUSE_PARAM_P) { - cx = cx; + UNUSED(cx); } return (0); @@ -1656,7 +1658,7 @@ DEF_IE_PRINT(itu, callstate) DEF_IE_CHECK(itu, callstate) { - cx = cx; + UNUSED(cx); switch(ie->state) { default: @@ -1742,7 +1744,7 @@ DEF_IE_PRINT(itu, facility) DEF_IE_CHECK(itu, facility) { - cx = cx; + UNUSED(cx); if(ie->len > UNI_FACILITY_MAXAPDU) return -1; @@ -1811,7 +1813,7 @@ DEF_IE_PRINT(itu, notify) DEF_IE_CHECK(itu, notify) { - cx = cx; + UNUSED(cx); if(ie->len > UNI_NOTIFY_MAXLEN) return -1; @@ -1904,7 +1906,7 @@ DEF_IE_PRINT(net, eetd) DEF_IE_CHECK(itu, eetd) { - cx = cx; + UNUSED(cx); if (!(ie->h.present & UNI_EETD_CUM_P)) return (-1); @@ -2298,7 +2300,7 @@ DEF_IE_PRINT(itu, called) DEF_IE_CHECK(itu, called) { - cx = cx; + UNUSED(cx); if (check_addr(&ie->addr)) return (-1); @@ -2345,7 +2347,7 @@ DEF_IE_PRINT(itu, calledsub) DEF_IE_CHECK(itu, calledsub) { - cx = cx; + UNUSED(cx); if(check_subaddr(&ie->addr)) return -1; @@ -2396,7 +2398,7 @@ DEF_IE_PRINT(itu, calling) DEF_IE_CHECK(itu, calling) { - cx = cx; + UNUSED(cx); if(check_addr(&ie->addr)) return -1; @@ -2459,7 +2461,7 @@ DEF_IE_PRINT(itu, callingsub) DEF_IE_CHECK(itu, callingsub) { - cx = cx; + UNUSED(cx); if(check_subaddr(&ie->addr)) return -1; @@ -2510,7 +2512,7 @@ DEF_IE_PRINT(itu, conned) DEF_IE_CHECK(itu, conned) { - cx = cx; + UNUSED(cx); if(check_addr(&ie->addr)) return -1; @@ -2573,7 +2575,7 @@ DEF_IE_PRINT(itu, connedsub) DEF_IE_CHECK(itu, connedsub) { - cx = cx; + UNUSED(cx); if(check_subaddr(&ie->addr)) return -1; @@ -2627,7 +2629,7 @@ DEF_IE_PRINT(itu, epref) DEF_IE_CHECK(itu, epref) { - cx = cx; + UNUSED(cx); if(ie->epref >= (2<<15)) return -1; @@ -2702,7 +2704,7 @@ DEF_IE_PRINT(itu, epstate) DEF_IE_CHECK(itu, epstate) { - cx = cx; + UNUSED(cx); switch(ie->state) { default: @@ -2895,7 +2897,7 @@ DEF_IE_PRINT(itu, aal) DEF_IE_CHECK(itu, aal) { - cx = cx; + UNUSED(cx); if(ie->type == UNI_AAL_0) { ; @@ -3784,7 +3786,7 @@ DEF_IE_CHECK(itu, mintraffic) { u_int abr; u_int xbr; - cx = cx; + UNUSED(cx); abr = ie->h.present & (UNI_MINTRAFFIC_FABR1_P|UNI_MINTRAFFIC_BABR1_P); xbr = ie->h.present & (UNI_MINTRAFFIC_FPCR0_P|UNI_MINTRAFFIC_BPCR0_P| @@ -3869,7 +3871,7 @@ DEF_IE_PRINT(net, mdcr) DEF_IE_CHECK(net, mdcr) { - cx = cx; + UNUSED(cx); if ((ie->origin != UNI_MDCR_ORIGIN_USER && ie->origin != UNI_MDCR_ORIGIN_NET) || @@ -3965,7 +3967,7 @@ DEF_IE_PRINT(itu, connid) DEF_IE_CHECK(itu, connid) { - cx = cx; + UNUSED(cx); switch(ie->type) { default: return -1; @@ -4075,7 +4077,7 @@ DEF_IE_PRINT(net, qos) DEF_IE_CHECK(itu, qos) { - cx = cx; + UNUSED(cx); switch(ie->fwd) { default: @@ -4096,7 +4098,7 @@ DEF_IE_CHECK(itu, qos) DEF_IE_CHECK(net, qos) { - cx = cx; + UNUSED(cx); switch(ie->fwd) { default: @@ -4205,7 +4207,7 @@ DEF_IE_PRINT(itu, bhli) DEF_IE_CHECK(itu, bhli) { - cx = cx; + UNUSED(cx); switch(ie->type) { default: @@ -4357,7 +4359,7 @@ DEF_IE_PRINT(itu, bearer) #define QTYPE0(C) ((UNI_BEARER_##C << 8) | (1 << 16)) DEF_IE_CHECK(itu, bearer) { - cx = cx; + UNUSED(cx); switch((ie->bclass << 8) | ((ie->h.present & UNI_BEARER_ATC_P) == 0 @@ -4656,7 +4658,7 @@ DEF_IE_PRINT(itu, blli) DEF_IE_CHECK(itu, blli) { - cx = cx; + UNUSED(cx); /* if(ie->h.present & UNI_BLLI_L1_P) ; @@ -5171,7 +5173,7 @@ DEF_IE_PRINT(itu, lshift) DEF_IE_CHECK(itu, lshift) { - cx = cx; ie = ie; + UNUSED(cx); UNUSED(ie); return -1; } @@ -5212,7 +5214,7 @@ DEF_IE_PRINT(itu, nlshift) DEF_IE_CHECK(itu, nlshift) { - cx = cx; ie = ie; + UNUSED(cx); UNUSED(ie); return -1; } @@ -5261,7 +5263,7 @@ DEF_IE_PRINT(itu, scompl) DEF_IE_CHECK(itu, scompl) { - ie = ie; cx = cx; + UNUSED(ie); UNUSED(cx); return 0; } @@ -5398,7 +5400,7 @@ DEF_IE_CHECK(itu, tns) { u_int i; - cx = cx; + UNUSED(cx); if(ie->len == 0 || ie->len > UNI_TNS_MAXLEN) return -1; @@ -5466,7 +5468,7 @@ DEF_IE_PRINT(itu, restart) DEF_IE_CHECK(itu, restart) { - cx = cx; + UNUSED(cx); switch(ie->rclass) { default: @@ -5535,7 +5537,7 @@ DEF_IE_PRINT(itu, uu) DEF_IE_CHECK(itu, uu) { - cx = cx; + UNUSED(cx); if(ie->len > UNI_UU_MAXLEN) return -1; @@ -5754,8 +5756,8 @@ DEF_IE_PRINT(net, abradd) DEF_IE_CHECK(net, abradd) { - cx = cx; - ie = ie; + UNUSED(cx); + UNUSED(ie); return 0; } @@ -6015,7 +6017,7 @@ DEF_IE_PRINT(itu, report) DEF_IE_CHECK(itu, report) { - cx = cx; + UNUSED(cx); switch(ie->report) { @@ -6098,7 +6100,7 @@ DEF_IE_PRINT(net, called_soft) DEF_IE_CHECK(net, calling_soft) { - cx = cx; + UNUSED(cx); if(ie->vpi >= 1 << 12) return -1; @@ -6107,7 +6109,7 @@ DEF_IE_CHECK(net, calling_soft) DEF_IE_CHECK(net, called_soft) { - cx = cx; + UNUSED(cx); switch(ie->sel) { @@ -6357,7 +6359,7 @@ DEF_IE_PRINT(net, crankback) DEF_IE_CHECK(net, crankback) { - cx = cx; + UNUSED(cx); if(ie->level > 104) return -1; @@ -6595,7 +6597,7 @@ DEF_IE_CHECK(net, dtl) { u_int i; - cx = cx; + UNUSED(cx); if(ie->ptr % UNI_DTL_LOGNP_SIZE != 0) return -1; @@ -6703,7 +6705,7 @@ DEF_IE_PRINT(net, lij_callid) DEF_IE_CHECK(net, lij_callid) { - cx = cx; + UNUSED(cx); switch(ie->type) { @@ -6761,7 +6763,7 @@ DEF_IE_PRINT(net, lij_param) DEF_IE_CHECK(net, lij_param) { - cx = cx; + UNUSED(cx); switch(ie->screen) { @@ -6809,7 +6811,7 @@ DEF_IE_PRINT(net, lij_seqno) DEF_IE_CHECK(net, lij_seqno) { - cx = cx; ie = ie; + UNUSED(cx); UNUSED(ie); return 0; } @@ -6888,7 +6890,7 @@ DEF_IE_PRINT(net, cscope) DEF_IE_CHECK(net, cscope) { - cx = cx; + UNUSED(cx); switch(ie->type) { @@ -7018,7 +7020,7 @@ DEF_IE_PRINT(net, exqos) DEF_IE_CHECK(net, exqos) { - cx = cx; + UNUSED(cx); switch(ie->origin) { case UNI_EXQOS_USER: @@ -7130,7 +7132,7 @@ DEF_IE_PRINT(itu, unrec) DEF_IE_CHECK(itu, unrec) { - cx = cx; + UNUSED(cx); if (ie->len > sizeof(ie->data)) return (-1); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:29:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A08C2106564A; Sat, 31 Dec 2011 14:29:01 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A5F88FC18; Sat, 31 Dec 2011 14:29:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVET1hM067915; Sat, 31 Dec 2011 14:29:01 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVET15o067913; Sat, 31 Dec 2011 14:29:01 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311429.pBVET15o067913@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:29:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229099 - stable/9/sys/dev/usb/serial X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:29:01 -0000 Author: hselasky Date: Sat Dec 31 14:29:01 2011 New Revision: 229099 URL: http://svn.freebsd.org/changeset/base/229099 Log: MFC r227285: Add support for new USB modem protocol. PR: usb/159919 Modified: stable/9/sys/dev/usb/serial/umodem.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 14:27:26 2011 (r229098) +++ stable/9/sys/dev/usb/serial/umodem.c Sat Dec 31 14:29:01 2011 (r229099) @@ -127,7 +127,11 @@ static const STRUCT_USB_HOST_ID umodem_d /* Generic Modem class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), - USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, + USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, + /* Huawei Modem class match */ + {USB_IFACE_CLASS(UICLASS_CDC), + USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), + USB_IFACE_PROTOCOL(0xFF)}, /* Kyocera AH-K3001V */ {USB_VPI(USB_VENDOR_KYOCERA, USB_PRODUCT_KYOCERA_AHK3001V, 1)}, {USB_VPI(USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC5720, 1)}, From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:33:16 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66D03106566B; Sat, 31 Dec 2011 14:33:16 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 46CDE8FC0A; Sat, 31 Dec 2011 14:33:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEXGbP068114; Sat, 31 Dec 2011 14:33:16 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEXGOj068112; Sat, 31 Dec 2011 14:33:16 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311433.pBVEXGOj068112@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:33:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229100 - stable/9/sys/dev/usb/controller X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:33:16 -0000 Author: hselasky Date: Sat Dec 31 14:33:15 2011 New Revision: 229100 URL: http://svn.freebsd.org/changeset/base/229100 Log: MFC r228709, r228711 and r228723: - Add missing unlock of USB controller's lock, when doing shutdown, suspend and resume. - Add code to wait for USB shutdown to be executed at system shutdown. - Add sysctl which can be used to skip this waiting. Modified: stable/9/sys/dev/usb/controller/usb_controller.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/controller/usb_controller.c ============================================================================== --- stable/9/sys/dev/usb/controller/usb_controller.c Sat Dec 31 14:29:01 2011 (r229099) +++ stable/9/sys/dev/usb/controller/usb_controller.c Sat Dec 31 14:33:15 2011 (r229100) @@ -87,7 +87,12 @@ SYSCTL_INT(_hw_usb_ctrl, OID_AUTO, debug static int usb_no_boot_wait = 0; TUNABLE_INT("hw.usb.no_boot_wait", &usb_no_boot_wait); SYSCTL_INT(_hw_usb, OID_AUTO, no_boot_wait, CTLFLAG_RDTUN, &usb_no_boot_wait, 0, - "No device enumerate waiting at boot."); + "No USB device enumerate waiting at boot."); + +static int usb_no_shutdown_wait = 0; +TUNABLE_INT("hw.usb.no_shutdown_wait", &usb_no_shutdown_wait); +SYSCTL_INT(_hw_usb, OID_AUTO, no_shutdown_wait, CTLFLAG_RW|CTLFLAG_TUN, &usb_no_shutdown_wait, 0, + "No USB device waiting at system shutdown."); static devclass_t usb_devclass; @@ -277,11 +282,20 @@ usb_shutdown(device_t dev) return (0); } + device_printf(bus->bdev, "Controller shutdown\n"); + USB_BUS_LOCK(bus); usb_proc_msignal(&bus->explore_proc, &bus->shutdown_msg[0], &bus->shutdown_msg[1]); + if (usb_no_shutdown_wait == 0) { + /* wait for shutdown callback to be executed */ + usb_proc_mwait(&bus->explore_proc, + &bus->shutdown_msg[0], &bus->shutdown_msg[1]); + } USB_BUS_UNLOCK(bus); + device_printf(bus->bdev, "Controller shutdown complete\n"); + return (0); } @@ -390,6 +404,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); @@ -410,6 +426,8 @@ usb_bus_suspend(struct usb_proc_msg *pm) (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SUSPEND); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /*------------------------------------------------------------------------* @@ -430,6 +448,8 @@ usb_bus_resume(struct usb_proc_msg *pm) if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + usbd_enum_lock(udev); #if 0 DEVMETHOD(usb_take_controller, NULL); /* dummy */ @@ -457,6 +477,8 @@ usb_bus_resume(struct usb_proc_msg *pm) device_printf(bus->bdev, "Could not configure root HUB\n"); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } /*------------------------------------------------------------------------* @@ -477,6 +499,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm if (udev == NULL || bus->bdev == NULL) return; + USB_BUS_UNLOCK(bus); + bus_generic_shutdown(bus->bdev); usbd_enum_lock(udev); @@ -497,6 +521,8 @@ usb_bus_shutdown(struct usb_proc_msg *pm (bus->methods->set_hw_power_sleep) (bus, USB_HW_POWER_SHUTDOWN); usbd_enum_unlock(udev); + + USB_BUS_LOCK(bus); } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:34:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E96CB106564A; Sat, 31 Dec 2011 14:34:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D29238FC14; Sat, 31 Dec 2011 14:34:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEY7vg068182; Sat, 31 Dec 2011 14:34:07 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEY7ph068179; Sat, 31 Dec 2011 14:34:07 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311434.pBVEY7ph068179@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229101 - stable/9/sys/dev/aic7xxx/aicasm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:34:08 -0000 Author: dim Date: Sat Dec 31 14:34:07 2011 New Revision: 229101 URL: http://svn.freebsd.org/changeset/base/229101 Log: MFC r228556: Add "%option noinput" to aicasm_scan.l and aicasm_macro_scan.l, so no unneeded input functions will be emitted. Spotted by: arundel Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l ============================================================================== --- stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Sat Dec 31 14:33:15 2011 (r229100) +++ stable/9/sys/dev/aic7xxx/aicasm/aicasm_macro_scan.l Sat Dec 31 14:34:07 2011 (r229101) @@ -66,6 +66,8 @@ static char msgbuf[255]; extern int mmlex(void); %} +%option noinput + WORD [A-Za-z_][-A-Za-z_0-9]* SPACE [ \t]+ MCARG [^(), \t]+ Modified: stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l ============================================================================== --- stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l Sat Dec 31 14:33:15 2011 (r229100) +++ stable/9/sys/dev/aic7xxx/aicasm/aicasm_scan.l Sat Dec 31 14:34:07 2011 (r229101) @@ -72,6 +72,8 @@ extern void mm_switch_to_buffer(YY_BUFFE extern void mm_delete_buffer(YY_BUFFER_STATE); %} +%option noinput + PATH ([/]*[-A-Za-z0-9_.])+ WORD [A-Za-z_][-A-Za-z_0-9]* SPACE [ \t]+ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:36:51 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAD61106564A; Sat, 31 Dec 2011 14:36:51 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D50828FC19; Sat, 31 Dec 2011 14:36:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEapBN068340; Sat, 31 Dec 2011 14:36:51 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEapqI068338; Sat, 31 Dec 2011 14:36:51 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311436.pBVEapqI068338@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 14:36:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229102 - stable/9/lib/libpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:36:52 -0000 Author: dim Date: Sat Dec 31 14:36:51 2011 New Revision: 229102 URL: http://svn.freebsd.org/changeset/base/229102 Log: MFC r228557: In lib/libpmc/libpmc.c, struct pmc_cputype_map's pm_cputype field should be of type 'enum pmc_cputype', not 'enum pmc_class'. Modified: stable/9/lib/libpmc/libpmc.c Directory Properties: stable/9/lib/libpmc/ (props changed) Modified: stable/9/lib/libpmc/libpmc.c ============================================================================== --- stable/9/lib/libpmc/libpmc.c Sat Dec 31 14:34:07 2011 (r229101) +++ stable/9/lib/libpmc/libpmc.c Sat Dec 31 14:36:51 2011 (r229102) @@ -289,7 +289,7 @@ static const char * pmc_class_names[] = }; struct pmc_cputype_map { - enum pmc_class pm_cputype; + enum pmc_cputype pm_cputype; const char *pm_name; }; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:37:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D256106566B; Sat, 31 Dec 2011 14:37:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6CA438FC14; Sat, 31 Dec 2011 14:37:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEbqVL068419; Sat, 31 Dec 2011 14:37:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEbqcl068414; Sat, 31 Dec 2011 14:37:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311437.pBVEbqcl068414@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:37:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229103 - stable/9/sys/dev/usb/template X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:37:52 -0000 Author: hselasky Date: Sat Dec 31 14:37:51 2011 New Revision: 229103 URL: http://svn.freebsd.org/changeset/base/229103 Log: MFC 228304: Correct some bInterval USB template descriptor values. Modified: stable/9/sys/dev/usb/template/usb_template.c stable/9/sys/dev/usb/template/usb_template_kbd.c stable/9/sys/dev/usb/template/usb_template_modem.c stable/9/sys/dev/usb/template/usb_template_mouse.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/template/usb_template.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template.c Sat Dec 31 14:37:51 2011 (r229103) @@ -260,7 +260,7 @@ usb_make_endpoint_desc(struct usb_temp_s ed->bInterval = 1; /* 1 ms */ break; default: - ed->bInterval = 8; /* 8*125 us */ + ed->bInterval = 4; /* 1 ms */ break; } break; Modified: stable/9/sys/dev/usb/template/usb_template_kbd.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template_kbd.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template_kbd.c Sat Dec 31 14:37:51 2011 (r229103) @@ -89,9 +89,9 @@ static const struct usb_temp_packet_size }; static const struct usb_temp_interval keyboard_intr_interval = { - .bInterval[USB_SPEED_LOW] = 2, /* ms */ - .bInterval[USB_SPEED_FULL] = 2, - .bInterval[USB_SPEED_HIGH] = 2 * 8, + .bInterval[USB_SPEED_LOW] = 2, /* 2 ms */ + .bInterval[USB_SPEED_FULL] = 2, /* 2 ms */ + .bInterval[USB_SPEED_HIGH] = 5, /* 2 ms */ }; /* The following HID descriptor was dumped from a HP keyboard. */ Modified: stable/9/sys/dev/usb/template/usb_template_modem.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template_modem.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template_modem.c Sat Dec 31 14:37:51 2011 (r229103) @@ -98,9 +98,9 @@ static const struct usb_temp_packet_size }; static const struct usb_temp_interval modem_intr_interval = { - .bInterval[USB_SPEED_LOW] = 10, - .bInterval[USB_SPEED_FULL] = 10, - .bInterval[USB_SPEED_HIGH] = 10 * 8, + .bInterval[USB_SPEED_LOW] = 8, /* 8ms */ + .bInterval[USB_SPEED_FULL] = 8, /* 8ms */ + .bInterval[USB_SPEED_HIGH] = 7, /* 8ms */ }; static const struct usb_temp_endpoint_desc modem_ep_0 = { Modified: stable/9/sys/dev/usb/template/usb_template_mouse.c ============================================================================== --- stable/9/sys/dev/usb/template/usb_template_mouse.c Sat Dec 31 14:36:51 2011 (r229102) +++ stable/9/sys/dev/usb/template/usb_template_mouse.c Sat Dec 31 14:37:51 2011 (r229103) @@ -101,9 +101,9 @@ static const struct usb_temp_packet_size }; static const struct usb_temp_interval mouse_intr_interval = { - .bInterval[USB_SPEED_LOW] = 2, - .bInterval[USB_SPEED_FULL] = 2, - .bInterval[USB_SPEED_HIGH] = 2 * 8, + .bInterval[USB_SPEED_LOW] = 2, /* 2ms */ + .bInterval[USB_SPEED_FULL] = 2, /* 2ms */ + .bInterval[USB_SPEED_HIGH] = 5, /* 2ms */ }; static const struct usb_temp_endpoint_desc mouse_ep_0 = { From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:44:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17362106564A; Sat, 31 Dec 2011 14:44:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 016EF8FC13; Sat, 31 Dec 2011 14:44:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEigHZ068758; Sat, 31 Dec 2011 14:44:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEigCI068756; Sat, 31 Dec 2011 14:44:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201112311444.pBVEigCI068756@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 31 Dec 2011 14:44:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229104 - head/sys/i386/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:44:43 -0000 Author: kib Date: Sat Dec 31 14:44:42 2011 New Revision: 229104 URL: http://svn.freebsd.org/changeset/base/229104 Log: Make the comment in i386/include/ucontext.h identical to the one in amd64/include/ucontext.h. The later is better worded. Requested by: deischen MFC after: 3 days Modified: head/sys/i386/include/ucontext.h Modified: head/sys/i386/include/ucontext.h ============================================================================== --- head/sys/i386/include/ucontext.h Sat Dec 31 14:37:51 2011 (r229103) +++ head/sys/i386/include/ucontext.h Sat Dec 31 14:44:42 2011 (r229104) @@ -33,9 +33,10 @@ typedef struct __mcontext { /* - * The definition of mcontext_t shall match the layout of - * struct sigcontext after the sc_mask member. So that we can - * support sigcontext and ucontext_t at the same time. + * The definition of mcontext_t must match the layout of + * struct sigcontext after the sc_mask member. This is so + * that we can support sigcontext and ucontext_t at the same + * time. */ __register_t mc_onstack; /* XXX - sigcontext compat. */ __register_t mc_gs; /* machine state (struct trapframe) */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:45:44 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 850C11065670; Sat, 31 Dec 2011 14:45:44 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E1EF8FC1F; Sat, 31 Dec 2011 14:45:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEjiRG068853; Sat, 31 Dec 2011 14:45:44 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEji0n068850; Sat, 31 Dec 2011 14:45:44 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311445.pBVEji0n068850@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229105 - stable/9/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:45:44 -0000 Author: hselasky Date: Sat Dec 31 14:45:43 2011 New Revision: 229105 URL: http://svn.freebsd.org/changeset/base/229105 Log: MFC r226709: Allow USB ethernet drivers to define a driver specific attach handler so that a USB ethernet driver can announce interface capabilities and do its own MII attach. Modified: stable/9/sys/dev/usb/net/usb_ethernet.c stable/9/sys/dev/usb/net/usb_ethernet.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/usb_ethernet.c ============================================================================== --- stable/9/sys/dev/usb/net/usb_ethernet.c Sat Dec 31 14:44:42 2011 (r229104) +++ stable/9/sys/dev/usb/net/usb_ethernet.c Sat Dec 31 14:45:43 2011 (r229105) @@ -24,24 +24,32 @@ * SUCH DAMAGE. */ -#include -#include +#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 -#include + +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -197,42 +205,53 @@ ue_attach_post_task(struct usb_proc_msg usb_callout_init_mtx(&ue->ue_watchdog, ue->ue_mtx, 0); sysctl_ctx_init(&ue->ue_sysctl_ctx); + error = 0; ifp = if_alloc(IFT_ETHER); if (ifp == NULL) { device_printf(ue->ue_dev, "could not allocate ifnet\n"); - goto error; + goto fail; } ifp->if_softc = ue; if_initname(ifp, "ue", ue->ue_unit); - ifp->if_mtu = ETHERMTU; - ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; - if (ue->ue_methods->ue_ioctl != NULL) - ifp->if_ioctl = ue->ue_methods->ue_ioctl; - else - ifp->if_ioctl = uether_ioctl; - ifp->if_start = ue_start; - ifp->if_init = ue_init; - IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); - ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; - IFQ_SET_READY(&ifp->if_snd); - ue->ue_ifp = ifp; - - if (ue->ue_methods->ue_mii_upd != NULL && - ue->ue_methods->ue_mii_sts != NULL) { - mtx_lock(&Giant); /* device_xxx() depends on this */ - error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, - ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, - BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); - mtx_unlock(&Giant); - if (error) { - device_printf(ue->ue_dev, "attaching PHYs failed\n"); - goto error; + if (ue->ue_methods->ue_attach_post_sub != NULL) { + ue->ue_ifp = ifp; + error = ue->ue_methods->ue_attach_post_sub(ue); + } else { + ifp->if_mtu = ETHERMTU; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + if (ue->ue_methods->ue_ioctl != NULL) + ifp->if_ioctl = ue->ue_methods->ue_ioctl; + else + ifp->if_ioctl = uether_ioctl; + ifp->if_start = ue_start; + ifp->if_init = ue_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + ue->ue_ifp = ifp; + + if (ue->ue_methods->ue_mii_upd != NULL && + ue->ue_methods->ue_mii_sts != NULL) { + /* device_xxx() depends on this */ + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + ue_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, MII_PHY_ANY, MII_OFFSET_ANY, 0); + mtx_unlock(&Giant); } } + if (error) { + device_printf(ue->ue_dev, "attaching PHYs failed\n"); + goto fail; + } + if_printf(ifp, " on %s\n", device_get_nameunit(ue->ue_dev)); ether_ifattach(ifp, ue->ue_eaddr); + /* Tell upper layer we support VLAN oversized frames. */ + if (ifp->if_capabilities & IFCAP_VLAN_MTU) + ifp->if_hdrlen = sizeof(struct ether_vlan_header); snprintf(num, sizeof(num), "%u", ue->ue_unit); ue->ue_sysctl_oid = SYSCTL_ADD_NODE(&ue->ue_sysctl_ctx, @@ -246,7 +265,7 @@ ue_attach_post_task(struct usb_proc_msg UE_LOCK(ue); return; -error: +fail: free_unr(ueunit, ue->ue_unit); if (ue->ue_ifp != NULL) { if_free(ue->ue_ifp); @@ -307,6 +326,13 @@ uether_is_gone(struct usb_ether *ue) return (usb_proc_is_gone(&ue->ue_tq)); } +void +uether_init(void *arg) +{ + + ue_init(arg); +} + static void ue_init(void *arg) { @@ -352,6 +378,13 @@ ue_stop_task(struct usb_proc_msg *_task) ue->ue_methods->ue_stop(ue); } +void +uether_start(struct ifnet *ifp) +{ + + ue_start(ifp); +} + static void ue_start(struct ifnet *ifp) { @@ -385,6 +418,13 @@ ue_setmulti_task(struct usb_proc_msg *_t ue->ue_methods->ue_setmulti(ue); } +int +uether_ifmedia_upd(struct ifnet *ifp) +{ + + return (ue_ifmedia_upd(ifp)); +} + static int ue_ifmedia_upd(struct ifnet *ifp) { Modified: stable/9/sys/dev/usb/net/usb_ethernet.h ============================================================================== --- stable/9/sys/dev/usb/net/usb_ethernet.h Sat Dec 31 14:44:42 2011 (r229104) +++ stable/9/sys/dev/usb/net/usb_ethernet.h Sat Dec 31 14:45:43 2011 (r229105) @@ -22,6 +22,8 @@ * 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 _USB_ETHERNET_H_ @@ -66,7 +68,7 @@ struct usb_ether_methods { void (*ue_mii_sts)(struct ifnet *, struct ifmediareq *); int (*ue_ioctl)(struct ifnet *, u_long, caddr_t); - + int (*ue_attach_post_sub)(struct usb_ether *); }; struct usb_ether_cfg_task { @@ -110,6 +112,8 @@ struct mii_data *uether_getmii(struct us void *uether_getsc(struct usb_ether *); int uether_ifattach(struct usb_ether *); void uether_ifdetach(struct usb_ether *); +int uether_ifmedia_upd(struct ifnet *); +void uether_init(void *); int uether_ioctl(struct ifnet *, u_long, caddr_t); struct mbuf *uether_newbuf(void); int uether_rxmbuf(struct usb_ether *, struct mbuf *, @@ -119,4 +123,5 @@ int uether_rxbuf(struct usb_ether *, unsigned int, unsigned int); void uether_rxflush(struct usb_ether *); uint8_t uether_is_gone(struct usb_ether *); +void uether_start(struct ifnet *); #endif /* _USB_ETHERNET_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:47:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E9E7106564A; Sat, 31 Dec 2011 14:47:36 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 160748FC14; Sat, 31 Dec 2011 14:47:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVElawr068973; Sat, 31 Dec 2011 14:47:36 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVElZ0W068970; Sat, 31 Dec 2011 14:47:35 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311447.pBVElZ0W068970@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229106 - stable/9/sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:47:36 -0000 Author: hselasky Date: Sat Dec 31 14:47:35 2011 New Revision: 229106 URL: http://svn.freebsd.org/changeset/base/229106 Log: MFC r226743: Implement TX/RX checksum offloading support for ASIX AX88772B controller. Modified: stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/net/if_axereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 14:45:43 2011 (r229105) +++ stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 14:47:35 2011 (r229106) @@ -76,24 +76,30 @@ __FBSDID("$FreeBSD$"); * http://www.asix.com.tw/FrootAttach/datasheet/AX88772_datasheet_Rev10.pdf */ -#include -#include #include -#include -#include #include -#include #include -#include +#include +#include +#include #include +#include +#include +#include #include -#include +#include +#include #include #include -#include -#include -#include -#include + +#include +#include +#include +#include +#include + +#include +#include #include #include @@ -122,6 +128,8 @@ __FBSDID("$FreeBSD$"); */ #define AXE_178_MAX_FRAME_BURST 1 +#define AXE_CSUM_FEATURES (CSUM_IP | CSUM_TCP | CSUM_UDP) + #ifdef USB_DEBUG static int axe_debug = 0; @@ -186,6 +194,7 @@ static uether_fn_t axe_tick; static uether_fn_t axe_setmulti; static uether_fn_t axe_setpromisc; +static int axe_attach_post_sub(struct usb_ether *); static int axe_ifmedia_upd(struct ifnet *); static void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *); static int axe_cmd(struct axe_softc *, int, int, int, void *); @@ -195,6 +204,11 @@ static void axe_ax88772_phywake(struct a static void axe_ax88772a_init(struct axe_softc *); static void axe_ax88772b_init(struct axe_softc *); static int axe_get_phyno(struct axe_softc *, int); +static int axe_ioctl(struct ifnet *, u_long, caddr_t); +static int axe_rx_frame(struct usb_ether *, struct usb_page_cache *, int); +static int axe_rxeof(struct usb_ether *, struct usb_page_cache *, + unsigned int offset, unsigned int, struct axe_csum_hdr *); +static void axe_csum_cfg(struct usb_ether *); static const struct usb_config axe_config[AXE_N_TRANSFER] = { @@ -263,6 +277,7 @@ MODULE_VERSION(axe, 1); static const struct usb_ether_methods axe_ue_methods = { .ue_attach_post = axe_attach_post, + .ue_attach_post_sub = axe_attach_post_sub, .ue_start = axe_start, .ue_init = axe_init, .ue_stop = axe_stop, @@ -301,9 +316,6 @@ axe_miibus_readreg(device_t dev, int phy uint16_t val; int locked; - if (sc->sc_phyno != phy) - return (0); - locked = mtx_owned(&sc->sc_mtx); if (!locked) AXE_LOCK(sc); @@ -335,10 +347,6 @@ axe_miibus_writereg(device_t dev, int ph int locked; val = htole32(val); - - if (sc->sc_phyno != phy) - return (0); - locked = mtx_owned(&sc->sc_mtx); if (!locked) AXE_LOCK(sc); @@ -369,7 +377,7 @@ axe_miibus_statchg(device_t dev) if (mii == NULL || ifp == NULL || (ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) goto done; - + sc->sc_flags &= ~AXE_FLAG_LINK; if ((mii->mii_media_status & (IFM_ACTIVE | IFM_AVALID)) == (IFM_ACTIVE | IFM_AVALID)) { @@ -387,14 +395,23 @@ axe_miibus_statchg(device_t dev) break; } } - + /* Lost link, do nothing. */ if ((sc->sc_flags & AXE_FLAG_LINK) == 0) goto done; - + val = 0; - if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) + if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) { val |= AXE_MEDIA_FULL_DUPLEX; + if (AXE_IS_178_FAMILY(sc)) { + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_TXPAUSE) != 0) + val |= AXE_178_MEDIA_TXFLOW_CONTROL_EN; + if ((IFM_OPTIONS(mii->mii_media_active) & + IFM_ETH_RXPAUSE) != 0) + val |= AXE_178_MEDIA_RXFLOW_CONTROL_EN; + } + } if (AXE_IS_178_FAMILY(sc)) { val |= AXE_178_MEDIA_RX_EN | AXE_178_MEDIA_MAGIC; if ((sc->sc_flags & AXE_FLAG_178) != 0) @@ -842,6 +859,53 @@ axe_attach_post(struct usb_ether *ue) axe_cmd(sc, AXE_CMD_READ_IPG012, 0, 0, sc->sc_ipgs); } +static int +axe_attach_post_sub(struct usb_ether *ue) +{ + struct axe_softc *sc; + struct ifnet *ifp; + u_int adv_pause; + int error; + + sc = uether_getsc(ue); + ifp = ue->ue_ifp; + ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; + ifp->if_start = uether_start; + ifp->if_ioctl = axe_ioctl; + ifp->if_init = uether_init; + IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); + ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; + IFQ_SET_READY(&ifp->if_snd); + + if (AXE_IS_178_FAMILY(sc)) + ifp->if_capabilities |= IFCAP_VLAN_MTU; + if (sc->sc_flags & AXE_FLAG_772B) { + ifp->if_capabilities |= IFCAP_TXCSUM | IFCAP_RXCSUM; + ifp->if_hwassist = AXE_CSUM_FEATURES; + /* + * Checksum offloading of AX88772B also works with VLAN + * tagged frames but there is no way to take advantage + * of the feature because vlan(4) assumes + * IFCAP_VLAN_HWTAGGING is prerequisite condition to + * support checksum offloading with VLAN. VLAN hardware + * tagging support of AX88772B is very limited so it's + * not possible to announce IFCAP_VLAN_HWTAGGING. + */ + } + ifp->if_capenable = ifp->if_capabilities; + if (sc->sc_flags & (AXE_FLAG_772A | AXE_FLAG_772B | AXE_FLAG_178)) + adv_pause = MIIF_DOPAUSE; + else + adv_pause = 0; + mtx_lock(&Giant); + error = mii_attach(ue->ue_dev, &ue->ue_miibus, ifp, + uether_ifmedia_upd, ue->ue_methods->ue_mii_sts, + BMSR_DEFCAPMASK, sc->sc_phyno, MII_OFFSET_ANY, adv_pause); + mtx_unlock(&Giant); + + return (error); +} + /* * Probe for a AX88172 chip. */ @@ -927,52 +991,15 @@ axe_bulk_read_callback(struct usb_xfer * { struct axe_softc *sc = usbd_xfer_softc(xfer); struct usb_ether *ue = &sc->sc_ue; - struct ifnet *ifp = uether_getifp(ue); - struct axe_sframe_hdr hdr; struct usb_page_cache *pc; - int err, pos, len; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - pos = 0; - len = 0; - err = 0; - pc = usbd_xfer_get_frame(xfer, 0); - if (AXE_IS_178_FAMILY(sc)) { - while (pos < actlen) { - if ((pos + sizeof(hdr)) > actlen) { - /* too little data */ - err = EINVAL; - break; - } - usbd_copy_out(pc, pos, &hdr, sizeof(hdr)); - - if ((hdr.len ^ hdr.ilen) != 0xFFFF) { - /* we lost sync */ - err = EINVAL; - break; - } - pos += sizeof(hdr); - - len = le16toh(hdr.len); - if ((pos + len) > actlen) { - /* invalid length */ - err = EINVAL; - break; - } - uether_rxbuf(ue, pc, pos, len); - - pos += len + (len % 2); - } - } else - uether_rxbuf(ue, pc, 0, actlen); - - if (err != 0) - ifp->if_ierrors++; + axe_rx_frame(ue, pc, actlen); /* FALLTHROUGH */ case USB_ST_SETUP: @@ -995,6 +1022,131 @@ tr_setup: } } +static int +axe_rx_frame(struct usb_ether *ue, struct usb_page_cache *pc, int actlen) +{ + struct axe_softc *sc; + struct axe_sframe_hdr hdr; + struct axe_csum_hdr csum_hdr; + int error, len, pos; + + sc = uether_getsc(ue); + pos = 0; + len = 0; + error = 0; + if ((sc->sc_flags & AXE_FLAG_STD_FRAME) != 0) { + while (pos < actlen) { + if ((pos + sizeof(hdr)) > actlen) { + /* too little data */ + error = EINVAL; + break; + } + usbd_copy_out(pc, pos, &hdr, sizeof(hdr)); + + if ((hdr.len ^ hdr.ilen) != sc->sc_lenmask) { + /* we lost sync */ + error = EINVAL; + break; + } + pos += sizeof(hdr); + len = le16toh(hdr.len); + if (pos + len > actlen) { + /* invalid length */ + error = EINVAL; + break; + } + axe_rxeof(ue, pc, pos, len, NULL); + pos += len + (len % 2); + } + } else if ((sc->sc_flags & AXE_FLAG_CSUM_FRAME) != 0) { + while (pos < actlen) { + if ((pos + sizeof(csum_hdr)) > actlen) { + /* too little data */ + error = EINVAL; + break; + } + usbd_copy_out(pc, pos, &csum_hdr, sizeof(csum_hdr)); + + csum_hdr.len = le16toh(csum_hdr.len); + csum_hdr.ilen = le16toh(csum_hdr.ilen); + csum_hdr.cstatus = le16toh(csum_hdr.cstatus); + if ((AXE_CSUM_RXBYTES(csum_hdr.len) ^ + AXE_CSUM_RXBYTES(csum_hdr.ilen)) != + sc->sc_lenmask) { + /* we lost sync */ + error = EINVAL; + break; + } + /* + * Get total transferred frame length including + * checksum header. The length should be multiple + * of 4. + */ + len = sizeof(csum_hdr) + AXE_CSUM_RXBYTES(csum_hdr.len); + len = (len + 3) & ~3; + if (pos + len > actlen) { + /* invalid length */ + error = EINVAL; + break; + } + axe_rxeof(ue, pc, pos + sizeof(csum_hdr), + AXE_CSUM_RXBYTES(csum_hdr.len), &csum_hdr); + pos += len; + } + } else + axe_rxeof(ue, pc, 0, actlen, NULL); + + if (error != 0) + ue->ue_ifp->if_ierrors++; + return (error); +} + +static int +axe_rxeof(struct usb_ether *ue, struct usb_page_cache *pc, unsigned int offset, + unsigned int len, struct axe_csum_hdr *csum_hdr) +{ + struct ifnet *ifp = ue->ue_ifp; + struct mbuf *m; + + if (len < ETHER_HDR_LEN || len > MCLBYTES - ETHER_ALIGN) { + ifp->if_ierrors++; + return (EINVAL); + } + + m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); + if (m == NULL) { + ifp->if_iqdrops++; + return (ENOMEM); + } + m->m_len = m->m_pkthdr.len = MCLBYTES; + m_adj(m, ETHER_ALIGN); + + usbd_copy_out(pc, offset, mtod(m, uint8_t *), len); + + ifp->if_ipackets++; + m->m_pkthdr.rcvif = ifp; + m->m_pkthdr.len = m->m_len = len; + + if (csum_hdr != NULL && csum_hdr->cstatus & AXE_CSUM_HDR_L3_TYPE_IPV4) { + if ((csum_hdr->cstatus & (AXE_CSUM_HDR_L4_CSUM_ERR | + AXE_CSUM_HDR_L3_CSUM_ERR)) == 0) { + m->m_pkthdr.csum_flags |= CSUM_IP_CHECKED | + CSUM_IP_VALID; + if ((csum_hdr->cstatus & AXE_CSUM_HDR_L4_TYPE_MASK) == + AXE_CSUM_HDR_L4_TYPE_TCP || + (csum_hdr->cstatus & AXE_CSUM_HDR_L4_TYPE_MASK) == + AXE_CSUM_HDR_L4_TYPE_UDP) { + m->m_pkthdr.csum_flags |= + CSUM_DATA_VALID | CSUM_PSEUDO_HDR; + m->m_pkthdr.csum_data = 0xffff; + } + } + } + + _IF_ENQUEUE(&ue->ue_rxq, m); + return (0); +} + #if ((AXE_BULK_BUF_SIZE >= 0x10000) || (AXE_BULK_BUF_SIZE < (MCLBYTES+4))) #error "Please update axe_bulk_write_callback()!" #endif @@ -1037,6 +1189,21 @@ tr_setup: if (AXE_IS_178_FAMILY(sc)) { hdr.len = htole16(m->m_pkthdr.len); hdr.ilen = ~hdr.len; + /* + * If upper stack computed checksum, driver + * should tell controller not to insert + * computed checksum for checksum offloading + * enabled controller. + */ + if (ifp->if_capabilities & IFCAP_TXCSUM) { + if ((m->m_pkthdr.csum_flags & + AXE_CSUM_FEATURES) != 0) + hdr.len |= htole16( + AXE_TX_CSUM_PSEUDO_HDR); + else + hdr.len |= htole16( + AXE_TX_CSUM_DIS); + } usbd_copy_in(pc, pos, &hdr, sizeof(hdr)); pos += sizeof(hdr); usbd_m_copy_in(pc, pos, m, 0, m->m_pkthdr.len); @@ -1128,6 +1295,34 @@ axe_start(struct usb_ether *ue) } static void +axe_csum_cfg(struct usb_ether *ue) +{ + struct axe_softc *sc; + struct ifnet *ifp; + uint16_t csum1, csum2; + + sc = uether_getsc(ue); + AXE_LOCK_ASSERT(sc, MA_OWNED); + + if ((sc->sc_flags & AXE_FLAG_772B) != 0) { + ifp = uether_getifp(ue); + csum1 = 0; + csum2 = 0; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + csum1 |= AXE_TXCSUM_IP | AXE_TXCSUM_TCP | + AXE_TXCSUM_UDP; + axe_cmd(sc, AXE_772B_CMD_WRITE_TXCSUM, csum2, csum1, NULL); + csum1 = 0; + csum2 = 0; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + csum1 |= AXE_RXCSUM_IP | AXE_RXCSUM_IPVE | + AXE_RXCSUM_TCP | AXE_RXCSUM_UDP | AXE_RXCSUM_ICMP | + AXE_RXCSUM_IGMP; + axe_cmd(sc, AXE_772B_CMD_WRITE_RXCSUM, csum2, csum1, NULL); + } +} + +static void axe_init(struct usb_ether *ue) { struct axe_softc *sc = uether_getsc(ue); @@ -1144,27 +1339,40 @@ axe_init(struct usb_ether *ue) axe_reset(sc); - /* Set MAC address. */ - if (AXE_IS_178_FAMILY(sc)) + /* Set MAC address and transmitter IPG values. */ + if (AXE_IS_178_FAMILY(sc)) { axe_cmd(sc, AXE_178_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); - else - axe_cmd(sc, AXE_172_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); - - /* Set transmitter IPG values */ - if (AXE_IS_178_FAMILY(sc)) axe_cmd(sc, AXE_178_CMD_WRITE_IPG012, sc->sc_ipgs[2], (sc->sc_ipgs[1] << 8) | (sc->sc_ipgs[0]), NULL); - else { + } else { + axe_cmd(sc, AXE_172_CMD_WRITE_NODEID, 0, 0, IF_LLADDR(ifp)); axe_cmd(sc, AXE_172_CMD_WRITE_IPG0, 0, sc->sc_ipgs[0], NULL); axe_cmd(sc, AXE_172_CMD_WRITE_IPG1, 0, sc->sc_ipgs[1], NULL); axe_cmd(sc, AXE_172_CMD_WRITE_IPG2, 0, sc->sc_ipgs[2], NULL); } - /* AX88772B uses different maximum frame burst configuration. */ - if (sc->sc_flags & AXE_FLAG_772B) + if (AXE_IS_178_FAMILY(sc)) { + sc->sc_flags &= ~(AXE_FLAG_STD_FRAME | AXE_FLAG_CSUM_FRAME); + if ((sc->sc_flags & AXE_FLAG_772B) != 0) + sc->sc_lenmask = AXE_CSUM_HDR_LEN_MASK; + else + sc->sc_lenmask = AXE_HDR_LEN_MASK; + if ((sc->sc_flags & AXE_FLAG_772B) != 0 && + (ifp->if_capenable & IFCAP_RXCSUM) != 0) + sc->sc_flags |= AXE_FLAG_CSUM_FRAME; + else + sc->sc_flags |= AXE_FLAG_STD_FRAME; + } + + /* Configure TX/RX checksum offloading. */ + axe_csum_cfg(ue); + + if (sc->sc_flags & AXE_FLAG_772B) { + /* AX88772B uses different maximum frame burst configuration. */ axe_cmd(sc, AXE_772B_CMD_RXCTL_WRITE_CFG, ax88772b_mfb_table[AX88772B_MFB_16K].threshold, ax88772b_mfb_table[AX88772B_MFB_16K].byte_cnt, NULL); + } /* Enable receiver, set RX mode. */ rxmode = (AXE_RXCMD_MULTICAST | AXE_RXCMD_ENABLE); @@ -1172,11 +1380,17 @@ axe_init(struct usb_ether *ue) if (sc->sc_flags & AXE_FLAG_772B) { /* * Select RX header format type 1. Aligning IP - * header on 4 byte boundary is not needed + * header on 4 byte boundary is not needed when + * checksum offloading feature is not used * because we always copy the received frame in - * RX handler. + * RX handler. When RX checksum offloading is + * active, aligning IP header is required to + * reflect actual frame length including RX + * header size. */ rxmode |= AXE_772B_RXCMD_HDR_TYPE_1; + if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) + rxmode |= AXE_772B_RXCMD_IPHDR_ALIGN; } else { /* * Default Rx buffer size is too small to get @@ -1205,7 +1419,6 @@ axe_init(struct usb_ether *ue) ifp->if_drv_flags |= IFF_DRV_RUNNING; /* Switch to selected media. */ axe_ifmedia_upd(ifp); - axe_start(ue); } static void @@ -1247,3 +1460,45 @@ axe_stop(struct usb_ether *ue) usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_WR]); usbd_transfer_stop(sc->sc_xfer[AXE_BULK_DT_RD]); } + +static int +axe_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) +{ + struct usb_ether *ue = ifp->if_softc; + struct axe_softc *sc; + struct ifreq *ifr; + int error, mask, reinit; + + sc = uether_getsc(ue); + ifr = (struct ifreq *)data; + error = 0; + reinit = 0; + if (cmd == SIOCSIFCAP) { + AXE_LOCK(sc); + mask = ifr->ifr_reqcap ^ ifp->if_capenable; + if ((mask & IFCAP_TXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_TXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_TXCSUM; + if ((ifp->if_capenable & IFCAP_TXCSUM) != 0) + ifp->if_hwassist |= AXE_CSUM_FEATURES; + else + ifp->if_hwassist &= ~AXE_CSUM_FEATURES; + reinit++; + } + if ((mask & IFCAP_RXCSUM) != 0 && + (ifp->if_capabilities & IFCAP_RXCSUM) != 0) { + ifp->if_capenable ^= IFCAP_RXCSUM; + reinit++; + } + if (reinit > 0 && ifp->if_drv_flags & IFF_DRV_RUNNING) + ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + else + reinit = 0; + AXE_UNLOCK(sc); + if (reinit > 0) + uether_init(ue); + } else + error = uether_ioctl(ifp, cmd, data); + + return (error); +} Modified: stable/9/sys/dev/usb/net/if_axereg.h ============================================================================== --- stable/9/sys/dev/usb/net/if_axereg.h Sat Dec 31 14:45:43 2011 (r229105) +++ stable/9/sys/dev/usb/net/if_axereg.h Sat Dec 31 14:47:35 2011 (r229106) @@ -97,6 +97,10 @@ #define AXE_CMD_WRITE_VLAN_CTRL 0x4028 #define AXE_772B_CMD_RXCTL_WRITE_CFG 0x012A +#define AXE_772B_CMD_READ_RXCSUM 0x002B +#define AXE_772B_CMD_WRITE_RXCSUM 0x012C +#define AXE_772B_CMD_READ_TXCSUM 0x002D +#define AXE_772B_CMD_WRITE_TXCSUM 0x012E #define AXE_SW_RESET_CLEAR 0x00 #define AXE_SW_RESET_RR 0x01 @@ -199,6 +203,40 @@ #define AXE_VLAN_CTRL_VID1_MASK 0x00000FFF #define AXE_VLAN_CTRL_VID2_MASK 0x0FFF0000 +#define AXE_RXCSUM_IP 0x0001 +#define AXE_RXCSUM_IPVE 0x0002 +#define AXE_RXCSUM_IPV6E 0x0004 +#define AXE_RXCSUM_TCP 0x0008 +#define AXE_RXCSUM_UDP 0x0010 +#define AXE_RXCSUM_ICMP 0x0020 +#define AXE_RXCSUM_IGMP 0x0040 +#define AXE_RXCSUM_ICMP6 0x0080 +#define AXE_RXCSUM_TCPV6 0x0100 +#define AXE_RXCSUM_UDPV6 0x0200 +#define AXE_RXCSUM_ICMPV6 0x0400 +#define AXE_RXCSUM_IGMPV6 0x0800 +#define AXE_RXCSUM_ICMP6V6 0x1000 +#define AXE_RXCSUM_FOPC 0x8000 + +#define AXE_RXCSUM_64TE 0x0100 +#define AXE_RXCSUM_PPPOE 0x0200 +#define AXE_RXCSUM_RPCE 0x8000 + +#define AXE_TXCSUM_IP 0x0001 +#define AXE_TXCSUM_TCP 0x0002 +#define AXE_TXCSUM_UDP 0x0004 +#define AXE_TXCSUM_ICMP 0x0008 +#define AXE_TXCSUM_IGMP 0x0010 +#define AXE_TXCSUM_ICMP6 0x0020 +#define AXE_TXCSUM_TCPV6 0x0100 +#define AXE_TXCSUM_UDPV6 0x0200 +#define AXE_TXCSUM_ICMPV6 0x0400 +#define AXE_TXCSUM_IGMPV6 0x0800 +#define AXE_TXCSUM_ICMP6V6 0x1000 + +#define AXE_TXCSUM_64TE 0x0001 +#define AXE_TXCSUM_PPPOE 0x0002 + #define AXE_BULK_BUF_SIZE 16384 /* bytes */ #define AXE_CTL_READ 0x01 @@ -227,9 +265,62 @@ struct ax88772b_mfb { struct axe_sframe_hdr { uint16_t len; +#define AXE_HDR_LEN_MASK 0xFFFF + uint16_t ilen; +} __packed; + +#define AXE_TX_CSUM_PSEUDO_HDR 0x4000 +#define AXE_TX_CSUM_DIS 0x8000 + +/* + * When RX checksum offloading is enabled, AX88772B uses new RX header + * format and it's not compatible with previous RX header format. In + * addition, IP header align option should be enabled to get correct + * frame size including RX header. Total transferred size including + * the RX header is multiple of 4 and controller will pad necessary + * bytes if the length is not multiple of 4. + * This driver does not enable partial checksum feature which will + * compute 16bit checksum from 14th byte to the end of the frame. If + * this feature is enabled, computed checksum value is embedded into + * RX header which in turn means it uses different RX header format. + */ +struct axe_csum_hdr { + uint16_t len; +#define AXE_CSUM_HDR_LEN_MASK 0x07FF +#define AXE_CSUM_HDR_CRC_ERR 0x1000 +#define AXE_CSUM_HDR_MII_ERR 0x2000 +#define AXE_CSUM_HDR_RUNT 0x4000 +#define AXE_CSUM_HDR_BMCAST 0x8000 uint16_t ilen; + uint16_t cstatus; +#define AXE_CSUM_HDR_VLAN_MASK 0x0007 +#define AXE_CSUM_HDR_VLAN_STRIP 0x0008 +#define AXE_CSUM_HDR_VLAN_PRI_MASK 0x0070 +#define AXE_CSUM_HDR_L4_CSUM_ERR 0x0100 +#define AXE_CSUM_HDR_L3_CSUM_ERR 0x0200 +#define AXE_CSUM_HDR_L4_TYPE_UDP 0x0400 +#define AXE_CSUM_HDR_L4_TYPE_ICMP 0x0800 +#define AXE_CSUM_HDR_L4_TYPE_IGMP 0x0C00 +#define AXE_CSUM_HDR_L4_TYPE_TCP 0x1000 +#define AXE_CSUM_HDR_L4_TYPE_TCPV6 0x1400 +#define AXE_CSUM_HDR_L4_TYPE_MASK 0x1C00 +#define AXE_CSUM_HDR_L3_TYPE_IPV4 0x2000 +#define AXE_CSUM_HDR_L3_TYPE_IPV6 0x4000 + +#ifdef AXE_APPEND_PARTIAL_CSUM + /* + * These members present only when partial checksum + * offloading is enabled. The checksum value is simple + * 16bit sum of received frame starting at offset 14 of + * the frame to the end of the frame excluding FCS bytes. + */ + uint16_t csum_value; + uint16_t dummy; +#endif } __packed; +#define AXE_CSUM_RXBYTES(x) ((x) & AXE_CSUM_HDR_LEN_MASK) + #define GET_MII(sc) uether_getmii(&(sc)->sc_ue) /* The interrupt endpoint is currently unused by the ASIX part. */ @@ -247,6 +338,8 @@ struct axe_softc { int sc_flags; #define AXE_FLAG_LINK 0x0001 +#define AXE_FLAG_STD_FRAME 0x0010 +#define AXE_FLAG_CSUM_FRAME 0x0020 #define AXE_FLAG_772 0x1000 /* AX88772 */ #define AXE_FLAG_772A 0x2000 /* AX88772A */ #define AXE_FLAG_772B 0x4000 /* AX88772B */ @@ -255,6 +348,7 @@ struct axe_softc { uint8_t sc_ipgs[3]; uint8_t sc_phyaddrs[2]; uint16_t sc_pwrcfg; + uint16_t sc_lenmask; int sc_tx_bufsz; }; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:50:38 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B34CD106564A; Sat, 31 Dec 2011 14:50:38 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D2618FC17; Sat, 31 Dec 2011 14:50:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEocp3069117; Sat, 31 Dec 2011 14:50:38 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEocMK069115; Sat, 31 Dec 2011 14:50:38 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311450.pBVEocMK069115@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:50:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229107 - stable/9/sys/dev/usb/storage X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:50:38 -0000 Author: hselasky Date: Sat Dec 31 14:50:38 2011 New Revision: 229107 URL: http://svn.freebsd.org/changeset/base/229107 Log: MFC r227462: Enable power save mode for the USB storage device driver. Modified: stable/9/sys/dev/usb/storage/ustorage_fs.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/storage/ustorage_fs.c ============================================================================== --- stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 14:47:35 2011 (r229106) +++ stable/9/sys/dev/usb/storage/ustorage_fs.c Sat Dec 31 14:50:38 2011 (r229107) @@ -364,6 +364,9 @@ ustorage_fs_attach(device_t dev) sc->sc_udev = uaa->device; unit = device_get_unit(dev); + /* enable power saving mode */ + usbd_set_power_mode(uaa->device, USB_POWER_MODE_SAVE); + if (unit == 0) { if (ustorage_fs_ramdisk == NULL) { /* From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:54:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B80B81065673; Sat, 31 Dec 2011 14:54:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A11258FC08; Sat, 31 Dec 2011 14:54:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEsU7O069285; Sat, 31 Dec 2011 14:54:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEsUMu069283; Sat, 31 Dec 2011 14:54:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311454.pBVEsUMu069283@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:54:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229108 - stable/9/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:54:30 -0000 Author: hselasky Date: Sat Dec 31 14:54:30 2011 New Revision: 229108 URL: http://svn.freebsd.org/changeset/base/229108 Log: MFC r228494, r228508: Fix for random USB transfer time out. Modified: stable/9/sys/dev/usb/wlan/if_run.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 14:50:38 2011 (r229107) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 14:54:30 2011 (r229108) @@ -2718,7 +2718,6 @@ run_bulk_tx_callbackN(struct usb_xfer *x struct run_endpoint_queue *pq = &sc->sc_epq[index]; struct mbuf *m; usb_frlength_t size; - unsigned int len; int actlen; int sumlen; @@ -2748,7 +2747,8 @@ tr_setup: STAILQ_REMOVE_HEAD(&pq->tx_qh, next); m = data->m; - if (m->m_pkthdr.len > RUN_MAX_TXSZ) { + if ((m->m_pkthdr.len + + sizeof(data->desc) + 3 + 8) > RUN_MAX_TXSZ) { DPRINTF("data overflow, %u bytes\n", m->m_pkthdr.len); @@ -2763,6 +2763,14 @@ tr_setup: size = 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; + /* + * Align end on a 4-byte boundary, pad 8 bytes (CRC + + * 4-byte padding), and be sure to zero those trailing + * bytes: + */ + usbd_frame_zero(pc, size, ((-size) & 3) + 8); + size += ((-size) & 3) + 8; vap = data->ni->ni_vap; if (ieee80211_radiotap_active_vap(vap)) { @@ -2781,13 +2789,10 @@ tr_setup: ieee80211_radiotap_tx(vap, m); } - /* align end on a 4-bytes boundary */ - len = (size + IEEE80211_CRC_LEN + m->m_pkthdr.len + 3) & ~3; - - DPRINTFN(11, "sending frame len=%u xferlen=%u @ index %d\n", - m->m_pkthdr.len, len, index); + DPRINTFN(11, "sending frame len=%u/%u @ index %d\n", + m->m_pkthdr.len, size, index); - usbd_xfer_set_frame_len(xfer, 0, len); + usbd_xfer_set_frame_len(xfer, 0, size); usbd_xfer_set_priv(xfer, data); usbd_transfer_submit(xfer); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:55:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EFF491065673; Sat, 31 Dec 2011 14:55:24 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D64528FC0A; Sat, 31 Dec 2011 14:55:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEtORL069405; Sat, 31 Dec 2011 14:55:24 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEtOkJ069353; Sat, 31 Dec 2011 14:55:24 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112311455.pBVEtOkJ069353@svn.freebsd.org> From: Ed Schouten Date: Sat, 31 Dec 2011 14:55:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229109 - in vendor/compiler-rt/dist: . SDKs SDKs/darwin SDKs/darwin/usr SDKs/darwin/usr/include SDKs/darwin/usr/include/sys SDKs/linux SDKs/linux/usr SDKs/linux/usr/include SDKs/linux/... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:55:25 -0000 Author: ed Date: Sat Dec 31 14:55:23 2011 New Revision: 229109 URL: http://svn.freebsd.org/changeset/base/229109 Log: Import compiler-rt r147390. Added: vendor/compiler-rt/dist/SDKs/ vendor/compiler-rt/dist/SDKs/README.txt vendor/compiler-rt/dist/SDKs/darwin/ vendor/compiler-rt/dist/SDKs/darwin/README.txt vendor/compiler-rt/dist/SDKs/darwin/usr/ vendor/compiler-rt/dist/SDKs/darwin/usr/include/ vendor/compiler-rt/dist/SDKs/darwin/usr/include/limits.h vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdlib.h vendor/compiler-rt/dist/SDKs/darwin/usr/include/string.h vendor/compiler-rt/dist/SDKs/darwin/usr/include/sys/ vendor/compiler-rt/dist/SDKs/darwin/usr/include/sys/stat.h vendor/compiler-rt/dist/SDKs/darwin/usr/include/sys/types.h vendor/compiler-rt/dist/SDKs/linux/ vendor/compiler-rt/dist/SDKs/linux/README.txt vendor/compiler-rt/dist/SDKs/linux/usr/ vendor/compiler-rt/dist/SDKs/linux/usr/include/ vendor/compiler-rt/dist/SDKs/linux/usr/include/endian.h vendor/compiler-rt/dist/SDKs/linux/usr/include/limits.h vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h vendor/compiler-rt/dist/SDKs/linux/usr/include/stdlib.h vendor/compiler-rt/dist/SDKs/linux/usr/include/string.h vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/ vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/mman.h vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/stat.h vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/types.h vendor/compiler-rt/dist/SDKs/linux/usr/include/unistd.h vendor/compiler-rt/dist/lib/asan/ vendor/compiler-rt/dist/lib/asan/Makefile.mk vendor/compiler-rt/dist/lib/asan/Makefile.old vendor/compiler-rt/dist/lib/asan/README.txt vendor/compiler-rt/dist/lib/asan/asan_allocator.cc vendor/compiler-rt/dist/lib/asan/asan_allocator.h vendor/compiler-rt/dist/lib/asan/asan_globals.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.cc vendor/compiler-rt/dist/lib/asan/asan_interceptors.h vendor/compiler-rt/dist/lib/asan/asan_interface.h vendor/compiler-rt/dist/lib/asan/asan_internal.h vendor/compiler-rt/dist/lib/asan/asan_linux.cc vendor/compiler-rt/dist/lib/asan/asan_lock.h vendor/compiler-rt/dist/lib/asan/asan_mac.cc vendor/compiler-rt/dist/lib/asan/asan_mac.h vendor/compiler-rt/dist/lib/asan/asan_malloc_linux.cc vendor/compiler-rt/dist/lib/asan/asan_malloc_mac.cc vendor/compiler-rt/dist/lib/asan/asan_mapping.h vendor/compiler-rt/dist/lib/asan/asan_poisoning.cc vendor/compiler-rt/dist/lib/asan/asan_printf.cc vendor/compiler-rt/dist/lib/asan/asan_rtl.cc vendor/compiler-rt/dist/lib/asan/asan_stack.cc vendor/compiler-rt/dist/lib/asan/asan_stack.h vendor/compiler-rt/dist/lib/asan/asan_stats.cc vendor/compiler-rt/dist/lib/asan/asan_stats.h vendor/compiler-rt/dist/lib/asan/asan_thread.cc vendor/compiler-rt/dist/lib/asan/asan_thread.h vendor/compiler-rt/dist/lib/asan/asan_thread_registry.cc vendor/compiler-rt/dist/lib/asan/asan_thread_registry.h vendor/compiler-rt/dist/lib/asan/mach_override/ vendor/compiler-rt/dist/lib/asan/mach_override/LICENSE.TXT vendor/compiler-rt/dist/lib/asan/mach_override/Makefile.mk vendor/compiler-rt/dist/lib/asan/mach_override/README.txt vendor/compiler-rt/dist/lib/asan/mach_override/mach_override.c vendor/compiler-rt/dist/lib/asan/mach_override/mach_override.h vendor/compiler-rt/dist/lib/asan/scripts/ vendor/compiler-rt/dist/lib/asan/scripts/asan_symbolize.py (contents, props changed) vendor/compiler-rt/dist/lib/asan/sysinfo/ vendor/compiler-rt/dist/lib/asan/sysinfo/LICENSE.TXT vendor/compiler-rt/dist/lib/asan/sysinfo/Makefile.mk vendor/compiler-rt/dist/lib/asan/sysinfo/basictypes.h vendor/compiler-rt/dist/lib/asan/sysinfo/sysinfo.cc vendor/compiler-rt/dist/lib/asan/sysinfo/sysinfo.h vendor/compiler-rt/dist/lib/asan/tests/ vendor/compiler-rt/dist/lib/asan/tests/asan_benchmarks_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_break_optimization.cc vendor/compiler-rt/dist/lib/asan/tests/asan_exceptions_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_globals_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_interface_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_mac_test.h vendor/compiler-rt/dist/lib/asan/tests/asan_mac_test.mm vendor/compiler-rt/dist/lib/asan/tests/asan_noinst_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.cc vendor/compiler-rt/dist/lib/asan/tests/asan_test.ignore vendor/compiler-rt/dist/lib/asan/tests/asan_test_config.h vendor/compiler-rt/dist/lib/asan/tests/asan_test_utils.h vendor/compiler-rt/dist/lib/asan/tests/dlclose-test-so.cc vendor/compiler-rt/dist/lib/asan/tests/dlclose-test.cc vendor/compiler-rt/dist/lib/asan/tests/dlclose-test.tmpl vendor/compiler-rt/dist/lib/asan/tests/global-overflow.cc vendor/compiler-rt/dist/lib/asan/tests/global-overflow.tmpl vendor/compiler-rt/dist/lib/asan/tests/heap-overflow.cc vendor/compiler-rt/dist/lib/asan/tests/heap-overflow.tmpl vendor/compiler-rt/dist/lib/asan/tests/heap-overflow.tmpl.Darwin vendor/compiler-rt/dist/lib/asan/tests/large_func_test.cc vendor/compiler-rt/dist/lib/asan/tests/large_func_test.tmpl vendor/compiler-rt/dist/lib/asan/tests/match_output.py (contents, props changed) vendor/compiler-rt/dist/lib/asan/tests/null_deref.cc vendor/compiler-rt/dist/lib/asan/tests/null_deref.tmpl vendor/compiler-rt/dist/lib/asan/tests/shared-lib-test-so.cc vendor/compiler-rt/dist/lib/asan/tests/shared-lib-test.cc vendor/compiler-rt/dist/lib/asan/tests/shared-lib-test.tmpl vendor/compiler-rt/dist/lib/asan/tests/stack-overflow.cc vendor/compiler-rt/dist/lib/asan/tests/stack-overflow.tmpl vendor/compiler-rt/dist/lib/asan/tests/stack-use-after-return.cc vendor/compiler-rt/dist/lib/asan/tests/stack-use-after-return.disabled vendor/compiler-rt/dist/lib/asan/tests/strncpy-overflow.cc vendor/compiler-rt/dist/lib/asan/tests/strncpy-overflow.tmpl vendor/compiler-rt/dist/lib/asan/tests/test_output.sh (contents, props changed) vendor/compiler-rt/dist/lib/asan/tests/use-after-free.c vendor/compiler-rt/dist/lib/asan/tests/use-after-free.cc vendor/compiler-rt/dist/lib/asan/tests/use-after-free.tmpl vendor/compiler-rt/dist/lib/int_endianness.h vendor/compiler-rt/dist/lib/int_math.h vendor/compiler-rt/dist/lib/int_types.h vendor/compiler-rt/dist/lib/int_util.c vendor/compiler-rt/dist/lib/int_util.h vendor/compiler-rt/dist/lib/mulodi4.c vendor/compiler-rt/dist/lib/mulosi4.c vendor/compiler-rt/dist/lib/muloti4.c vendor/compiler-rt/dist/lib/profile/ vendor/compiler-rt/dist/lib/profile/GCDAProfiling.c vendor/compiler-rt/dist/lib/profile/Makefile.mk vendor/compiler-rt/dist/make/platform/clang_darwin_test_input.c vendor/compiler-rt/dist/make/platform/clang_linux.mk vendor/compiler-rt/dist/test/Unit/mulodi4_test.c vendor/compiler-rt/dist/test/Unit/mulosi4_test.c vendor/compiler-rt/dist/test/Unit/muloti4_test.c Deleted: vendor/compiler-rt/dist/lib/abi.h vendor/compiler-rt/dist/lib/endianness.h Modified: vendor/compiler-rt/dist/.gitignore vendor/compiler-rt/dist/LICENSE.TXT vendor/compiler-rt/dist/Makefile vendor/compiler-rt/dist/README.txt vendor/compiler-rt/dist/lib/Makefile.mk vendor/compiler-rt/dist/lib/absvdi2.c vendor/compiler-rt/dist/lib/absvsi2.c vendor/compiler-rt/dist/lib/absvti2.c vendor/compiler-rt/dist/lib/adddf3.c vendor/compiler-rt/dist/lib/addsf3.c vendor/compiler-rt/dist/lib/addvdi3.c vendor/compiler-rt/dist/lib/addvsi3.c vendor/compiler-rt/dist/lib/addvti3.c vendor/compiler-rt/dist/lib/arm/Makefile.mk vendor/compiler-rt/dist/lib/arm/adddf3vfp.S vendor/compiler-rt/dist/lib/arm/addsf3vfp.S vendor/compiler-rt/dist/lib/arm/divdf3vfp.S vendor/compiler-rt/dist/lib/arm/divsf3vfp.S vendor/compiler-rt/dist/lib/arm/eqdf2vfp.S vendor/compiler-rt/dist/lib/arm/eqsf2vfp.S vendor/compiler-rt/dist/lib/arm/extendsfdf2vfp.S vendor/compiler-rt/dist/lib/arm/fixdfsivfp.S vendor/compiler-rt/dist/lib/arm/fixsfsivfp.S vendor/compiler-rt/dist/lib/arm/fixunsdfsivfp.S vendor/compiler-rt/dist/lib/arm/fixunssfsivfp.S vendor/compiler-rt/dist/lib/arm/floatsidfvfp.S vendor/compiler-rt/dist/lib/arm/floatsisfvfp.S vendor/compiler-rt/dist/lib/arm/floatunssidfvfp.S vendor/compiler-rt/dist/lib/arm/floatunssisfvfp.S vendor/compiler-rt/dist/lib/arm/gedf2vfp.S vendor/compiler-rt/dist/lib/arm/gesf2vfp.S vendor/compiler-rt/dist/lib/arm/gtdf2vfp.S vendor/compiler-rt/dist/lib/arm/gtsf2vfp.S vendor/compiler-rt/dist/lib/arm/ledf2vfp.S vendor/compiler-rt/dist/lib/arm/lesf2vfp.S vendor/compiler-rt/dist/lib/arm/ltdf2vfp.S vendor/compiler-rt/dist/lib/arm/ltsf2vfp.S vendor/compiler-rt/dist/lib/arm/muldf3vfp.S vendor/compiler-rt/dist/lib/arm/mulsf3vfp.S vendor/compiler-rt/dist/lib/arm/nedf2vfp.S vendor/compiler-rt/dist/lib/arm/negdf2vfp.S vendor/compiler-rt/dist/lib/arm/negsf2vfp.S vendor/compiler-rt/dist/lib/arm/nesf2vfp.S vendor/compiler-rt/dist/lib/arm/subdf3vfp.S vendor/compiler-rt/dist/lib/arm/subsf3vfp.S vendor/compiler-rt/dist/lib/arm/truncdfsf2vfp.S vendor/compiler-rt/dist/lib/arm/unorddf2vfp.S vendor/compiler-rt/dist/lib/arm/unordsf2vfp.S vendor/compiler-rt/dist/lib/ashldi3.c vendor/compiler-rt/dist/lib/ashrdi3.c vendor/compiler-rt/dist/lib/assembly.h vendor/compiler-rt/dist/lib/clear_cache.c vendor/compiler-rt/dist/lib/clzdi2.c vendor/compiler-rt/dist/lib/clzsi2.c vendor/compiler-rt/dist/lib/cmpdi2.c vendor/compiler-rt/dist/lib/ctzdi2.c vendor/compiler-rt/dist/lib/ctzsi2.c vendor/compiler-rt/dist/lib/divdc3.c vendor/compiler-rt/dist/lib/divdf3.c vendor/compiler-rt/dist/lib/divdi3.c vendor/compiler-rt/dist/lib/divmoddi4.c vendor/compiler-rt/dist/lib/divmodsi4.c vendor/compiler-rt/dist/lib/divsc3.c vendor/compiler-rt/dist/lib/divsf3.c vendor/compiler-rt/dist/lib/divsi3.c vendor/compiler-rt/dist/lib/divxc3.c vendor/compiler-rt/dist/lib/enable_execute_stack.c vendor/compiler-rt/dist/lib/eprintf.c vendor/compiler-rt/dist/lib/extendsfdf2.c vendor/compiler-rt/dist/lib/ffsdi2.c vendor/compiler-rt/dist/lib/fixdfdi.c vendor/compiler-rt/dist/lib/fixdfsi.c vendor/compiler-rt/dist/lib/fixsfdi.c vendor/compiler-rt/dist/lib/fixsfsi.c vendor/compiler-rt/dist/lib/fixunsdfdi.c vendor/compiler-rt/dist/lib/fixunsdfsi.c vendor/compiler-rt/dist/lib/fixunssfdi.c vendor/compiler-rt/dist/lib/fixunssfsi.c vendor/compiler-rt/dist/lib/floatdidf.c vendor/compiler-rt/dist/lib/floatdisf.c vendor/compiler-rt/dist/lib/floatsidf.c vendor/compiler-rt/dist/lib/floatsisf.c vendor/compiler-rt/dist/lib/floattidf.c vendor/compiler-rt/dist/lib/floattisf.c vendor/compiler-rt/dist/lib/floattixf.c vendor/compiler-rt/dist/lib/floatundidf.c vendor/compiler-rt/dist/lib/floatundisf.c vendor/compiler-rt/dist/lib/floatunsidf.c vendor/compiler-rt/dist/lib/floatunsisf.c vendor/compiler-rt/dist/lib/floatuntidf.c vendor/compiler-rt/dist/lib/floatuntisf.c vendor/compiler-rt/dist/lib/floatuntixf.c vendor/compiler-rt/dist/lib/fp_lib.h vendor/compiler-rt/dist/lib/gcc_personality_v0.c vendor/compiler-rt/dist/lib/i386/Makefile.mk vendor/compiler-rt/dist/lib/int_lib.h vendor/compiler-rt/dist/lib/lshrdi3.c vendor/compiler-rt/dist/lib/moddi3.c vendor/compiler-rt/dist/lib/modsi3.c vendor/compiler-rt/dist/lib/muldc3.c vendor/compiler-rt/dist/lib/muldf3.c vendor/compiler-rt/dist/lib/muldi3.c vendor/compiler-rt/dist/lib/mulsc3.c vendor/compiler-rt/dist/lib/mulsf3.c vendor/compiler-rt/dist/lib/mulvdi3.c vendor/compiler-rt/dist/lib/mulvsi3.c vendor/compiler-rt/dist/lib/mulvti3.c vendor/compiler-rt/dist/lib/mulxc3.c vendor/compiler-rt/dist/lib/negdf2.c vendor/compiler-rt/dist/lib/negsf2.c vendor/compiler-rt/dist/lib/negvdi2.c vendor/compiler-rt/dist/lib/negvsi2.c vendor/compiler-rt/dist/lib/negvti2.c vendor/compiler-rt/dist/lib/paritydi2.c vendor/compiler-rt/dist/lib/paritysi2.c vendor/compiler-rt/dist/lib/popcountdi2.c vendor/compiler-rt/dist/lib/popcountsi2.c vendor/compiler-rt/dist/lib/powidf2.c vendor/compiler-rt/dist/lib/powisf2.c vendor/compiler-rt/dist/lib/ppc/DD.h vendor/compiler-rt/dist/lib/ppc/Makefile.mk vendor/compiler-rt/dist/lib/ppc/divtc3.c vendor/compiler-rt/dist/lib/ppc/fixtfdi.c vendor/compiler-rt/dist/lib/ppc/fixunstfdi.c vendor/compiler-rt/dist/lib/ppc/floatditf.c vendor/compiler-rt/dist/lib/ppc/floatunditf.c vendor/compiler-rt/dist/lib/ppc/multc3.c vendor/compiler-rt/dist/lib/subdf3.c vendor/compiler-rt/dist/lib/subsf3.c vendor/compiler-rt/dist/lib/subvdi3.c vendor/compiler-rt/dist/lib/subvsi3.c vendor/compiler-rt/dist/lib/subvti3.c vendor/compiler-rt/dist/lib/trampoline_setup.c vendor/compiler-rt/dist/lib/truncdfsf2.c vendor/compiler-rt/dist/lib/ucmpdi2.c vendor/compiler-rt/dist/lib/udivdi3.c vendor/compiler-rt/dist/lib/udivmoddi4.c vendor/compiler-rt/dist/lib/udivmodsi4.c vendor/compiler-rt/dist/lib/udivmodti4.c vendor/compiler-rt/dist/lib/udivsi3.c vendor/compiler-rt/dist/lib/umoddi3.c vendor/compiler-rt/dist/lib/umodsi3.c vendor/compiler-rt/dist/lib/x86_64/Makefile.mk vendor/compiler-rt/dist/lib/x86_64/floatdidf.c vendor/compiler-rt/dist/lib/x86_64/floatdisf.c vendor/compiler-rt/dist/lib/x86_64/floatdixf.c vendor/compiler-rt/dist/make/AppleBI.mk vendor/compiler-rt/dist/make/config.mk vendor/compiler-rt/dist/make/lib_info.mk vendor/compiler-rt/dist/make/options.mk vendor/compiler-rt/dist/make/platform/clang_darwin.mk vendor/compiler-rt/dist/make/platform/darwin_bni.mk vendor/compiler-rt/dist/make/platform/darwin_fat.mk vendor/compiler-rt/dist/make/platform/multi_arch.mk vendor/compiler-rt/dist/make/subdir.mk vendor/compiler-rt/dist/www/index.html Modified: vendor/compiler-rt/dist/.gitignore ============================================================================== --- vendor/compiler-rt/dist/.gitignore Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/.gitignore Sat Dec 31 14:55:23 2011 (r229109) @@ -1,4 +1,4 @@ *~ -Debug -Release -Profile +darwin_fat +clang_darwin +multi_arch Modified: vendor/compiler-rt/dist/LICENSE.TXT ============================================================================== --- vendor/compiler-rt/dist/LICENSE.TXT Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/LICENSE.TXT Sat Dec 31 14:55:23 2011 (r229109) @@ -74,3 +74,25 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE F 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. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +sysinfo lib/asan/sysinfo +mach_override lib/asan/mach_override Modified: vendor/compiler-rt/dist/Makefile ============================================================================== --- vendor/compiler-rt/dist/Makefile Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/Makefile Sat Dec 31 14:55:23 2011 (r229109) @@ -164,6 +164,7 @@ define PerPlatformConfigArch_template $(call Set,Tmp.Arch,$(1)) $(call Set,Tmp.ObjPath,$(ProjObjRoot)/$(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch)) $(call Set,Tmp.Functions,$(strip \ + $(AlwaysRequiredModules) \ $(call GetCNAVar,FUNCTIONS,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) $(call Set,Tmp.Optimized,$(strip \ $(call GetCNAVar,OPTIMIZED,$(Tmp.Key),$(Tmp.Config),$(Tmp.Arch)))) @@ -226,7 +227,10 @@ $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.S $ $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$< $(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.c $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" - $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c -o $$@ $$< + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CFLAGS) -o $$@ $$< +$(Tmp.ObjPath)/%.o: $(Tmp.SrcPath)/%.cc $(Tmp.Dependencies) $(Tmp.ObjPath)/.dir + $(Summary) " COMPILE: $(Tmp.Name)/$(Tmp.Config)/$(Tmp.Arch): $$<" + $(Verb) $(Tmp.CC) $(Tmp.CFLAGS) -c $(COMMON_CXXFLAGS) -o $$@ $$< .PRECIOUS: $(Tmp.ObjPath)/.dir endef Modified: vendor/compiler-rt/dist/README.txt ============================================================================== --- vendor/compiler-rt/dist/README.txt Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/README.txt Sat Dec 31 14:55:23 2011 (r229109) @@ -106,6 +106,15 @@ si_int __mulvsi3(si_int a, si_int b); / di_int __mulvdi3(di_int a, di_int b); // a * b ti_int __mulvti3(ti_int a, ti_int b); // a * b + +// Integral arithmetic which returns if overflow + +si_int __mulosi4(si_int a, si_int b, int* overflow); // a * b, overflow set to one if result not in signed range +di_int __mulodi4(di_int a, di_int b, int* overflow); // a * b, overflow set to one if result not in signed range +ti_int __muloti4(ti_int a, ti_int b, int* overflow); // a * b, overflow set to + one if result not in signed range + + // Integral comparison: a < b -> 0 // a == b -> 1 // a > b -> 2 Added: vendor/compiler-rt/dist/SDKs/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/README.txt Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,9 @@ +It is often convenient to be able to build compiler-rt libraries for a certain +platform without having a full SDK or development environment installed. + +This makes it easy for users to build a compiler which can target a number of +different platforms, without having to actively maintain full development +environments for those platforms. + +Since compiler-rt's libraries typically have minimal interaction with the +system, we achieve this by stubbing out the SDKs of certain platforms. Added: vendor/compiler-rt/dist/SDKs/darwin/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/darwin/README.txt Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,3 @@ +The Darwin platforms are all similar enough we roll them into one SDK, and use +preprocessor tricks to get the right definitions for the few things which +diverge between OS X and iOS. Added: vendor/compiler-rt/dist/SDKs/darwin/usr/include/limits.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/limits.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,23 @@ +/* ===-- limits.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __LIMITS_H__ +#define __LIMITS_H__ + +/* This is only here as a landing pad for the include_next from the compiler's + built-in limits.h. */ + +#endif /* __LIMITS_H__ */ Added: vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdio.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,61 @@ +/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDIO_H__ +#define __STDIO_H__ + +typedef struct __sFILE FILE; +typedef __SIZE_TYPE__ size_t; + +/* Determine the appropriate fopen() and fwrite() functions. */ +#if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) +# if defined(__i386) +# define __FOPEN_NAME "_fopen$UNIX2003" +# define __FWRITE_NAME "_fwrite$UNIX2003" +# elif defined(__x86_64__) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# elif defined(__arm) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# else +# error "unrecognized architecture for targetting OS X" +# endif +#elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) +# if defined(__i386) || defined (__x86_64) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# elif defined(__arm) +# define __FOPEN_NAME "_fopen" +# define __FWRITE_NAME "_fwrite" +# else +# error "unrecognized architecture for targetting iOS" +# endif +#else +# error "unrecognized architecture for targetting Darwin" +#endif + +# define stderr __stderrp +extern FILE *__stderrp; + +int fclose(FILE *); +int fflush(FILE *); +FILE *fopen(const char * restrict, const char * restrict) __asm(__FOPEN_NAME); +int fprintf(FILE * restrict, const char * restrict, ...); +size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict) + __asm(__FWRITE_NAME); + +#endif /* __STDIO_H__ */ Added: vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdlib.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/stdlib.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,29 @@ +/* ===-- stdlib.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDLIB_H__ +#define __STDLIB_H__ + +#define NULL ((void *)0) + +typedef __SIZE_TYPE__ size_t; + +void abort(void) __attribute__((__noreturn__)); +void free(void *); +char *getenv(const char *); +void *malloc(size_t); + +#endif /* __STDLIB_H__ */ Added: vendor/compiler-rt/dist/SDKs/darwin/usr/include/string.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/string.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,28 @@ +/* ===-- string.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STRING_H__ +#define __STRING_H__ + +typedef __SIZE_TYPE__ size_t; + +char *strcat(char *, const char *); +char *strcpy(char *, const char *); +char *strdup(const char *); +size_t strlen(const char *); +char *strncpy(char *, const char *, size_t); + +#endif /* __STRING_H__ */ Added: vendor/compiler-rt/dist/SDKs/darwin/usr/include/sys/stat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/sys/stat.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,25 @@ +/* ===-- stat.h - stub SDK header for compiler-rt ---------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __SYS_STAT_H__ +#define __SYS_STAT_H__ + +typedef unsigned short uint16_t; +typedef uint16_t mode_t; + +int mkdir(const char *, mode_t); + +#endif /* __SYS_STAT_H__ */ Added: vendor/compiler-rt/dist/SDKs/darwin/usr/include/sys/types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/darwin/usr/include/sys/types.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,20 @@ +/* ===-- types.h - stub SDK header for compiler-rt --------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __SYS_TYPES_H__ +#define __SYS_TYPES_H__ + +#endif /* __SYS_TYPES_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/README.txt Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,2 @@ +This is a stub SDK for Linux. Currently, this has only been tested on i386 and +x86_64 using the Clang compiler. Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/endian.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/endian.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,29 @@ +/* ===-- endian.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __ENDIAN_H__ +#define __ENDIAN_H__ + +#define __LITTLE_ENDIAN 1234 +#define __BIG_ENDIAN 4321 + +#if defined(__LITTLE_ENDIAN__) || defined(__ORDER_LITTLE_ENDIAN__) +#define __BYTE_ORDER __LITTLE_ENDIAN +#else +#define __BYTE_ORDER __BIG_ENDIAN +#endif + +#endif /* __ENDIAN_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/limits.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/limits.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,23 @@ +/* ===-- limits.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __LIMITS_H__ +#define __LIMITS_H__ + +/* This is only here as a landing pad for the include_next from the compiler's + built-in limits.h. */ + +#endif /* __LIMITS_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/stdio.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,35 @@ +/* ===-- stdio.h - stub SDK header for compiler-rt --------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDIO_H__ +#define __STDIO_H__ + +typedef __SIZE_TYPE__ size_t; + +struct _IO_FILE; +typedef struct _IO_FILE FILE; + +extern struct _IO_FILE *stdin; +extern struct _IO_FILE *stdout; +extern struct _IO_FILE *stderr; + +extern int fclose(FILE *); +extern int fflush(FILE *); +extern FILE *fopen(const char * restrict, const char * restrict); +extern int fprintf(FILE * restrict, const char * restrict, ...); +extern size_t fwrite(const void * restrict, size_t, size_t, FILE * restrict); + +#endif /* __STDIO_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/stdlib.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/stdlib.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,32 @@ +/* ===-- stdlib.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STDLIB_H__ +#define __STDLIB_H__ + +#define NULL ((void *)0) + +typedef __SIZE_TYPE__ size_t; + +void abort(void) __attribute__((__nothrow__)) __attribute__((__noreturn__)); +void free(void *) __attribute__((__nothrow__)); +char *getenv(const char *) __attribute__((__nothrow__)) + __attribute__((__nonnull__(1))); + __attribute__((__warn_unused_result__)); +void *malloc(size_t) __attribute__((__nothrow__)) __attribute((__malloc__)) + __attribute__((__warn_unused_result__)); + +#endif /* __STDLIB_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/string.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/string.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,28 @@ +/* ===-- string.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __STRING_H__ +#define __STRING_H__ + +typedef __SIZE_TYPE__ size_t; + +char *strcat(char *, const char *); +char *strcpy(char *, const char *); +char *strdup(const char *); +size_t strlen(const char *); +char *strncpy(char *, const char *, size_t); + +#endif /* __STRING_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/mman.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/mman.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,29 @@ +/* ===-- limits.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __SYS_MMAN_H__ +#define __SYS_MMAN_H__ + +typedef __SIZE_TYPE__ size_t; + +#define PROT_READ 0x1 +#define PROT_WRITE 0x2 +#define PROT_EXEC 0x4 + +extern int mprotect (void *__addr, size_t __len, int __prot) + __attribute__((__nothrow__)); + +#endif /* __SYS_MMAN_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/stat.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/stat.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,24 @@ +/* ===-- stat.h - stub SDK header for compiler-rt ---------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __SYS_STAT_H__ +#define __SYS_STAT_H__ + +typedef unsigned int mode_t; + +int mkdir(const char *, mode_t); + +#endif /* __SYS_STAT_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/sys/types.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,20 @@ +/* ===-- stat.h - stub SDK header for compiler-rt ---------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __SYS_TYPES_H__ +#define __SYS_TYPES_H__ + +#endif /* __SYS_TYPES_H__ */ Added: vendor/compiler-rt/dist/SDKs/linux/usr/include/unistd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/compiler-rt/dist/SDKs/linux/usr/include/unistd.h Sat Dec 31 14:55:23 2011 (r229109) @@ -0,0 +1,26 @@ +/* ===-- unistd.h - stub SDK header for compiler-rt -------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===-----------------------------------------------------------------------=== + * + * This is a stub SDK header file. This file is not part of the interface of + * this library nor an official version of the appropriate SDK header. It is + * intended only to stub the features of this header required by compiler-rt. + * + * ===-----------------------------------------------------------------------=== + */ + +#ifndef __UNISTD_H__ +#define __UNISTD_H__ + +enum { + _SC_PAGESIZE = 30 +}; + +extern long int sysconf (int __name) __attribute__ ((__nothrow__)); + +#endif /* __UNISTD_H__ */ Modified: vendor/compiler-rt/dist/lib/Makefile.mk ============================================================================== --- vendor/compiler-rt/dist/lib/Makefile.mk Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/Makefile.mk Sat Dec 31 14:55:23 2011 (r229109) @@ -7,8 +7,17 @@ # #===------------------------------------------------------------------------===# -SubDirs := i386 ppc x86_64 arm +ModuleName := builtins +SubDirs := +# Add arch specific optimized implementations. +SubDirs += i386 ppc x86_64 arm + +# Add other submodules. +SubDirs += asan +SubDirs += profile + +# Define the variables for this specific directory. Sources := $(foreach file,$(wildcard $(Dir)/*.c),$(notdir $(file))) ObjNames := $(Sources:%.c=%.o) Implementation := Generic Modified: vendor/compiler-rt/dist/lib/absvdi2.c ============================================================================== --- vendor/compiler-rt/dist/lib/absvdi2.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/absvdi2.c Sat Dec 31 14:55:23 2011 (r229109) @@ -11,10 +11,8 @@ * *===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: absolute value */ Modified: vendor/compiler-rt/dist/lib/absvsi2.c ============================================================================== --- vendor/compiler-rt/dist/lib/absvsi2.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/absvsi2.c Sat Dec 31 14:55:23 2011 (r229109) @@ -11,10 +11,8 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: absolute value */ Modified: vendor/compiler-rt/dist/lib/absvti2.c ============================================================================== --- vendor/compiler-rt/dist/lib/absvti2.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/absvti2.c Sat Dec 31 14:55:23 2011 (r229109) @@ -15,7 +15,6 @@ #if __x86_64 #include "int_lib.h" -#include /* Returns: absolute value */ Modified: vendor/compiler-rt/dist/lib/adddf3.c ============================================================================== --- vendor/compiler-rt/dist/lib/adddf3.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/adddf3.c Sat Dec 31 14:55:23 2011 (r229109) @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#include "abi.h" - #define DOUBLE_PRECISION #include "fp_lib.h" Modified: vendor/compiler-rt/dist/lib/addsf3.c ============================================================================== --- vendor/compiler-rt/dist/lib/addsf3.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/addsf3.c Sat Dec 31 14:55:23 2011 (r229109) @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#include "abi.h" - #define SINGLE_PRECISION #include "fp_lib.h" Modified: vendor/compiler-rt/dist/lib/addvdi3.c ============================================================================== --- vendor/compiler-rt/dist/lib/addvdi3.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/addvdi3.c Sat Dec 31 14:55:23 2011 (r229109) @@ -11,10 +11,8 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: a + b */ Modified: vendor/compiler-rt/dist/lib/addvsi3.c ============================================================================== --- vendor/compiler-rt/dist/lib/addvsi3.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/addvsi3.c Sat Dec 31 14:55:23 2011 (r229109) @@ -11,10 +11,8 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: a + b */ Modified: vendor/compiler-rt/dist/lib/addvti3.c ============================================================================== --- vendor/compiler-rt/dist/lib/addvti3.c Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/addvti3.c Sat Dec 31 14:55:23 2011 (r229109) @@ -15,7 +15,6 @@ #if __x86_64 #include "int_lib.h" -#include /* Returns: a + b */ Modified: vendor/compiler-rt/dist/lib/arm/Makefile.mk ============================================================================== --- vendor/compiler-rt/dist/lib/arm/Makefile.mk Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/Makefile.mk Sat Dec 31 14:55:23 2011 (r229109) @@ -7,6 +7,7 @@ # #===------------------------------------------------------------------------===# +ModuleName := builtins SubDirs := OnlyArchs := armv5 armv6 armv7 Modified: vendor/compiler-rt/dist/lib/arm/adddf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/adddf3vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/adddf3vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -15,10 +15,11 @@ // Adds two double precision floating point numbers using the Darwin // calling convention where double arguments are passsed in GPR pairs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__adddf3vfp) - fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6 - fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7 - faddd d6, d6, d7 - fmrrd r0, r1, d6 // move result back to r0/r1 pair + vmov d6, r0, r1 // move first param from r0/r1 pair into d6 + vmov d7, r2, r3 // move second param from r2/r3 pair into d7 + vadd.f64 d6, d6, d7 + vmov r0, r1, d6 // move result back to r0/r1 pair bx lr Modified: vendor/compiler-rt/dist/lib/arm/addsf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/addsf3vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/addsf3vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -15,10 +15,11 @@ // Adds two single precision floating point numbers using the Darwin // calling convention where single arguments are passsed in GPRs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__addsf3vfp) - fmsr s14, r0 // move first param from r0 into float register - fmsr s15, r1 // move second param from r1 into float register - fadds s14, s14, s15 - fmrs r0, s14 // move result back to r0 + vmov s14, r0 // move first param from r0 into float register + vmov s15, r1 // move second param from r1 into float register + vadd.f32 s14, s14, s15 + vmov r0, s14 // move result back to r0 bx lr Modified: vendor/compiler-rt/dist/lib/arm/divdf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/divdf3vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/divdf3vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -15,10 +15,11 @@ // Divides two double precision floating point numbers using the Darwin // calling convention where double arguments are passsed in GPR pairs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__divdf3vfp) - fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6 - fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7 - fdivd d5, d6, d7 - fmrrd r0, r1, d5 // move result back to r0/r1 pair + vmov d6, r0, r1 // move first param from r0/r1 pair into d6 + vmov d7, r2, r3 // move second param from r2/r3 pair into d7 + vdiv.f64 d5, d6, d7 + vmov r0, r1, d5 // move result back to r0/r1 pair bx lr Modified: vendor/compiler-rt/dist/lib/arm/divsf3vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/divsf3vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/divsf3vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -15,10 +15,11 @@ // Divides two single precision floating point numbers using the Darwin // calling convention where single arguments are passsed like 32-bit ints. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__divsf3vfp) - fmsr s14, r0 // move first param from r0 into float register - fmsr s15, r1 // move second param from r1 into float register - fdivs s13, s14, s15 - fmrs r0, s13 // move result back to r0 + vmov s14, r0 // move first param from r0 into float register + vmov s15, r1 // move second param from r1 into float register + vdiv.f32 s13, s14, s15 + vmov r0, s13 // move result back to r0 bx lr Modified: vendor/compiler-rt/dist/lib/arm/eqdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/eqdf2vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/eqdf2vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr moveq r0, #1 // set result register to 1 if equal movne r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/arm/eqsf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/eqsf2vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/eqsf2vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__eqsf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr moveq r0, #1 // set result register to 1 if equal movne r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/arm/extendsfdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/extendsfdf2vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/extendsfdf2vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision parameter is // passed in a GPR and a double precision result is returned in R0/R1 pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__extendsfdf2vfp) - fmsr s15, r0 // load float register from R0 - fcvtds d7, s15 // convert single to double - fmrrd r0, r1, d7 // return result in r0/r1 pair + vmov s15, r0 // load float register from R0 + vcvt.f64.f32 d7, s15 // convert single to double + vmov r0, r1, d7 // return result in r0/r1 pair bx lr Modified: vendor/compiler-rt/dist/lib/arm/fixdfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/fixdfsivfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/fixdfsivfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a double precision parameter is // passed in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixdfsivfp) - fmdrr d7, r0, r1 // load double register from R0/R1 - ftosizd s15, d7 // convert double to 32-bit int into s15 - fmrs r0, s15 // move s15 to result register + vmov d7, r0, r1 // load double register from R0/R1 + vcvt.s32.f64 s15, d7 // convert double to 32-bit int into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: vendor/compiler-rt/dist/lib/arm/fixsfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/fixsfsivfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/fixsfsivfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision parameter is // passed in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixsfsivfp) - fmsr s15, r0 // load float register from R0 - ftosizs s15, s15 // convert single to 32-bit int into s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // load float register from R0 + vcvt.s32.f32 s15, s15 // convert single to 32-bit int into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: vendor/compiler-rt/dist/lib/arm/fixunsdfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/fixunsdfsivfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/fixunsdfsivfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -17,9 +17,10 @@ // Uses Darwin calling convention where a double precision parameter is // passed in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixunsdfsivfp) - fmdrr d7, r0, r1 // load double register from R0/R1 - ftouizd s15, d7 // convert double to 32-bit int into s15 - fmrs r0, s15 // move s15 to result register + vmov d7, r0, r1 // load double register from R0/R1 + vcvt.u32.f64 s15, d7 // convert double to 32-bit int into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: vendor/compiler-rt/dist/lib/arm/fixunssfsivfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/fixunssfsivfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/fixunssfsivfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -17,9 +17,10 @@ // Uses Darwin calling convention where a single precision parameter is // passed in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixunssfsivfp) - fmsr s15, r0 // load float register from R0 - ftouizs s15, s15 // convert single to 32-bit unsigned into s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // load float register from R0 + vcvt.u32.f32 s15, s15 // convert single to 32-bit unsigned into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: vendor/compiler-rt/dist/lib/arm/floatsidfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/floatsidfvfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/floatsidfvfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a double precision result is // return in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatsidfvfp) - fmsr s15, r0 // move int to float register s15 - fsitod d7, s15 // convert 32-bit int in s15 to double in d7 - fmrrd r0, r1, d7 // move d7 to result register pair r0/r1 + vmov s15, r0 // move int to float register s15 + vcvt.f64.s32 d7, s15 // convert 32-bit int in s15 to double in d7 + vmov r0, r1, d7 // move d7 to result register pair r0/r1 bx lr Modified: vendor/compiler-rt/dist/lib/arm/floatsisfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/floatsisfvfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/floatsisfvfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision result is // return in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatsisfvfp) - fmsr s15, r0 // move int to float register s15 - fsitos s15, s15 // convert 32-bit int in s15 to float in s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // move int to float register s15 + vcvt.f32.s32 s15, s15 // convert 32-bit int in s15 to float in s15 + vmov r0, s15 // move s15 to result register bx lr Modified: vendor/compiler-rt/dist/lib/arm/floatunssidfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/floatunssidfvfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/floatunssidfvfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a double precision result is // return in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatunssidfvfp) - fmsr s15, r0 // move int to float register s15 - fuitod d7, s15 // convert 32-bit int in s15 to double in d7 - fmrrd r0, r1, d7 // move d7 to result register pair r0/r1 + vmov s15, r0 // move int to float register s15 + vcvt.f64.u32 d7, s15 // convert 32-bit int in s15 to double in d7 + vmov r0, r1, d7 // move d7 to result register pair r0/r1 bx lr Modified: vendor/compiler-rt/dist/lib/arm/floatunssisfvfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/floatunssisfvfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/floatunssisfvfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision result is // return in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatunssisfvfp) - fmsr s15, r0 // move int to float register s15 - fuitos s15, s15 // convert 32-bit int in s15 to float in s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // move int to float register s15 + vcvt.f32.u32 s15, s15 // convert 32-bit int in s15 to float in s15 + vmov r0, s15 // move s15 to result register bx lr Modified: vendor/compiler-rt/dist/lib/arm/gedf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/gedf2vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/gedf2vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__gedf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/arm/gesf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/gesf2vfp.S Sat Dec 31 14:54:30 2011 (r229108) +++ vendor/compiler-rt/dist/lib/arm/gesf2vfp.S Sat Dec 31 14:55:23 2011 (r229109) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__gesf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 bx lr Modified: vendor/compiler-rt/dist/lib/arm/gtdf2vfp.S ============================================================================== --- vendor/compiler-rt/dist/lib/arm/gtdf2vfp.S Sat Dec 31 14:54:30 2011 (r229108) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:56:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 530E31065673; Sat, 31 Dec 2011 14:56:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 238CA8FC0A; Sat, 31 Dec 2011 14:56:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEuQu5069493; Sat, 31 Dec 2011 14:56:26 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEuQX4069492; Sat, 31 Dec 2011 14:56:26 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112311456.pBVEuQX4069492@svn.freebsd.org> From: Ed Schouten Date: Sat, 31 Dec 2011 14:56:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229110 - vendor/compiler-rt/compiler-rt-r147390 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:56:27 -0000 Author: ed Date: Sat Dec 31 14:56:26 2011 New Revision: 229110 URL: http://svn.freebsd.org/changeset/base/229110 Log: Tag compiler-rt r147390. Added: vendor/compiler-rt/compiler-rt-r147390/ - copied from r229109, vendor/compiler-rt/dist/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 14:57:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1F60106566B; Sat, 31 Dec 2011 14:57:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B13BE8FC0C; Sat, 31 Dec 2011 14:57:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVEvqdZ069578; Sat, 31 Dec 2011 14:57:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVEvq6G069576; Sat, 31 Dec 2011 14:57:52 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311457.pBVEvq6G069576@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 14:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229111 - stable/9/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 14:57:53 -0000 Author: hselasky Date: Sat Dec 31 14:57:52 2011 New Revision: 229111 URL: http://svn.freebsd.org/changeset/base/229111 Log: MFC r226465 and r226467: Fix an issue with 11g beacon frames which looks to be a limitation on the largest multi-write size. Modified: stable/9/sys/dev/usb/wlan/if_rum.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_rum.c Sat Dec 31 14:56:26 2011 (r229110) +++ stable/9/sys/dev/usb/wlan/if_rum.c Sat Dec 31 14:57:52 2011 (r229111) @@ -1407,20 +1407,27 @@ rum_write_multi(struct rum_softc *sc, ui { struct usb_device_request req; usb_error_t error; + int offset; req.bmRequestType = UT_WRITE_VENDOR_DEVICE; req.bRequest = RT2573_WRITE_MULTI_MAC; USETW(req.wValue, 0); - USETW(req.wIndex, reg); - USETW(req.wLength, len); - error = rum_do_request(sc, &req, buf); - if (error != 0) { - device_printf(sc->sc_dev, - "could not multi write MAC register: %s\n", - usbd_errstr(error)); + /* write at most 64 bytes at a time */ + for (offset = 0; offset < len; offset += 64) { + USETW(req.wIndex, reg + offset); + USETW(req.wLength, MIN(len - offset, 64)); + + error = rum_do_request(sc, &req, (char *)buf + offset); + if (error != 0) { + device_printf(sc->sc_dev, + "could not multi write MAC register: %s\n", + usbd_errstr(error)); + return (error); + } } - return (error); + + return (USB_ERR_NORMAL_COMPLETION); } static void From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:03:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65EAC106566C; Sat, 31 Dec 2011 15:03:30 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 451848FC08; Sat, 31 Dec 2011 15:03:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVF3UQS069824; Sat, 31 Dec 2011 15:03:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVF3UHu069818; Sat, 31 Dec 2011 15:03:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311503.pBVF3UHu069818@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 15:03:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229112 - in stable/9: lib/libsm libexec/mail.local libexec/smrsh usr.bin/vacation usr.sbin/sendmail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:03:30 -0000 Author: dim Date: Sat Dec 31 15:03:29 2011 New Revision: 229112 URL: http://svn.freebsd.org/changeset/base/229112 Log: MFC r228558, r228585, r228588, r228652, r228707: Unfortunately, clang gives warnings about sendmail code that cannot be turned off yet. Since this is contrib code, and we don't really care about the warnings, just make them non-fatal for now. MFC r228590: Fix typos in the comments about clang warnings in several sendmail-related Makefiles. Spotted by: arundel MFC r228708: In usr.bin/vacation/Makefile, fix a typo in the comment about clang warnings. Spotted by: arundel Modified: stable/9/lib/libsm/Makefile stable/9/libexec/mail.local/Makefile stable/9/libexec/smrsh/Makefile stable/9/usr.bin/vacation/Makefile stable/9/usr.sbin/sendmail/Makefile Directory Properties: stable/9/lib/libsm/ (props changed) stable/9/libexec/mail.local/ (props changed) stable/9/libexec/smrsh/ (props changed) stable/9/usr.bin/vacation/ (props changed) stable/9/usr.sbin/sendmail/ (props changed) Modified: stable/9/lib/libsm/Makefile ============================================================================== --- stable/9/lib/libsm/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/lib/libsm/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -18,6 +18,13 @@ CFLAGS+=${SENDMAIL_CFLAGS} WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + LIB= sm SRCS+= sm_os.h Modified: stable/9/libexec/mail.local/Makefile ============================================================================== --- stable/9/libexec/mail.local/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/libexec/mail.local/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -12,6 +12,13 @@ CFLAGS+=-I${SENDMAIL_DIR}/include -I. WARNS?= 2 WFORMAT=0 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/libexec/smrsh/Makefile ============================================================================== --- stable/9/libexec/smrsh/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/libexec/smrsh/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -17,6 +17,13 @@ LDADD= ${LIBSM} WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + SRCS+= sm_os.h CLEANFILES+=sm_os.h Modified: stable/9/usr.bin/vacation/Makefile ============================================================================== --- stable/9/usr.bin/vacation/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/usr.bin/vacation/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -11,6 +11,13 @@ CFLAGS+=-D_FFR_LISTDB -D_FFR_DEBUG WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + LIBSMDIR= ${.OBJDIR}/../../lib/libsm LIBSM= ${LIBSMDIR}/libsm.a Modified: stable/9/usr.sbin/sendmail/Makefile ============================================================================== --- stable/9/usr.sbin/sendmail/Makefile Sat Dec 31 14:57:52 2011 (r229111) +++ stable/9/usr.sbin/sendmail/Makefile Sat Dec 31 15:03:29 2011 (r229112) @@ -45,6 +45,13 @@ CFLAGS+= -DNETINET6 WARNS?= 1 +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives warnings about sendmail code that cannot +# be turned off yet. Since this is contrib code, and we don't really +# care about the warnings, just make them non-fatal for now. +NO_WERROR= +.endif + DPADD= ${LIBUTIL} ${LIBWRAP} LDADD= -lutil -lwrap From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:08:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C34E1065672; Sat, 31 Dec 2011 15:08:34 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 458488FC15; Sat, 31 Dec 2011 15:08:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVF8YOV070045; Sat, 31 Dec 2011 15:08:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVF8Y4I070041; Sat, 31 Dec 2011 15:08:34 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112311508.pBVF8Y4I070041@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Dec 2011 15:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229113 - in stable/9/libexec/rtld-elf: powerpc powerpc64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:08:34 -0000 Author: nwhitehorn Date: Sat Dec 31 15:08:33 2011 New Revision: 229113 URL: http://svn.freebsd.org/changeset/base/229113 Log: MFC r228646: Additional icache paranoia: non-PLT relocations can modify the text segment. It is then important to make sure the icache is synchronized again to prevent (rare) random seg faults and illegal instructions. Modified: stable/9/libexec/rtld-elf/powerpc/reloc.c stable/9/libexec/rtld-elf/powerpc64/reloc.c Directory Properties: stable/9/libexec/rtld-elf/ (props changed) Modified: stable/9/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc/reloc.c Sat Dec 31 15:03:29 2011 (r229112) +++ stable/9/libexec/rtld-elf/powerpc/reloc.c Sat Dec 31 15:08:33 2011 (r229113) @@ -317,6 +317,10 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry done: if (cache != NULL) free(cache); + + /* Synchronize icache for text seg in case we made any changes */ + __syncicache(obj->mapbase, obj->textsize); + return (r); } Modified: stable/9/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- stable/9/libexec/rtld-elf/powerpc64/reloc.c Sat Dec 31 15:03:29 2011 (r229112) +++ stable/9/libexec/rtld-elf/powerpc64/reloc.c Sat Dec 31 15:08:33 2011 (r229113) @@ -313,9 +313,12 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry } r = 0; done: - if (cache) { + if (cache) munmap(cache, bytes); - } + + /* Synchronize icache for text seg in case we made any changes */ + __syncicache(obj->mapbase, obj->textsize); + return (r); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:11:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6AF9106566B; Sat, 31 Dec 2011 15:11:47 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9FC4A8FC14; Sat, 31 Dec 2011 15:11:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFBlYv070221; Sat, 31 Dec 2011 15:11:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFBlco070215; Sat, 31 Dec 2011 15:11:47 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112311511.pBVFBlco070215@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Dec 2011 15:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229114 - stable/9/sys/powerpc/ps3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:11:47 -0000 Author: nwhitehorn Date: Sat Dec 31 15:11:47 2011 New Revision: 229114 URL: http://svn.freebsd.org/changeset/base/229114 Log: MFC r228688,228689: Support infrastructure for X11 on PS3. Submitted by: geoffrey dot levand at mail dot ru Modified: stable/9/sys/powerpc/ps3/ps3-hv-asm.awk stable/9/sys/powerpc/ps3/ps3-hvcall.S stable/9/sys/powerpc/ps3/ps3-hvcall.h stable/9/sys/powerpc/ps3/ps3-hvcall.master stable/9/sys/powerpc/ps3/ps3_syscons.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/powerpc/ps3/ps3-hv-asm.awk ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hv-asm.awk Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hv-asm.awk Sat Dec 31 15:11:47 2011 (r229114) @@ -9,6 +9,7 @@ # $FreeBSD$ BEGIN { + printf("/* $FreeBSD$ */\n\n"); printf("#include \n\n"); printf("#define hc .long 0x44000022\n\n"); } Modified: stable/9/sys/powerpc/ps3/ps3-hvcall.S ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hvcall.S Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hvcall.S Sat Dec 31 15:11:47 2011 (r229114) @@ -1081,13 +1081,25 @@ ASENTRY(lv1_gpu_memory_free) ASENTRY(lv1_gpu_context_allocate) mflr %r0 std %r0,16(%r1) - stdu %r1,-56(%r1) + stdu %r1,-88(%r1) std %r5,48(%r1) + std %r6,56(%r1) + std %r7,64(%r1) + std %r8,72(%r1) + std %r9,80(%r1) li %r11,217 hc extsw %r3,%r3 ld %r11,48(%r1) std %r4,0(%r11) + ld %r11,56(%r1) + std %r5,0(%r11) + ld %r11,64(%r1) + std %r6,0(%r11) + ld %r11,72(%r1) + std %r7,0(%r11) + ld %r11,80(%r1) + std %r8,0(%r11) ld %r1,0(%r1) ld %r0,16(%r1) mtlr %r0 @@ -1144,6 +1156,18 @@ ASENTRY(lv1_gpu_context_intr) mtlr %r0 blr +ASENTRY(lv1_gpu_attribute) + mflr %r0 + std %r0,16(%r1) + stdu %r1,-48(%r1) + li %r11,228 + hc + extsw %r3,%r3 + ld %r1,0(%r1) + ld %r0,16(%r1) + mtlr %r0 + blr + ASENTRY(lv1_get_rtc) mflr %r0 std %r0,16(%r1) Modified: stable/9/sys/powerpc/ps3/ps3-hvcall.h ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hvcall.h Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hvcall.h Sat Dec 31 15:11:47 2011 (r229114) @@ -124,11 +124,12 @@ int lv1_gpu_device_map(uint64_t dev, uin int lv1_gpu_device_unmap(uint64_t dev); int lv1_gpu_memory_allocate(uint64_t ddr_size, uint64_t zero1, uint64_t zero2, uint64_t zero3, uint64_t zero4, uint64_t *handle, uint64_t *ddr_lpar); int lv1_gpu_memory_free(uint64_t handle); -int lv1_gpu_context_allocate(uint64_t handle, uint64_t , uint64_t *zero); +int lv1_gpu_context_allocate(uint64_t handle, uint64_t flags, uint64_t *chandle, uint64_t *lpar_dma_control, uint64_t *lpar_driver_info, uint64_t *lpar_reports, uint64_t *lpar_reports_size); int lv1_gpu_context_free(uint64_t chandle); int lv1_gpu_context_iomap(uint64_t changle, uint64_t gpu_ioif, uint64_t xdr_lpar, uint64_t fbsize, uint64_t ioflags); int lv1_gpu_context_attribute(uint64_t chandle, uint64_t op, uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4); int lv1_gpu_context_intr(uint64_t chandle, uint64_t *v1); +int lv1_gpu_attribute(uint64_t p1, uint64_t p2, uint64_t p3, uint64_t p4, uint64_t p5); int lv1_get_rtc(uint64_t *rtc_val, uint64_t *timebase); int lv1_storage_read(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag); int lv1_storage_write(uint64_t dev, uint64_t region, uint64_t sector, uint64_t nsectors, uint64_t flags, uint64_t buf, uint64_t *dma_tag); Modified: stable/9/sys/powerpc/ps3/ps3-hvcall.master ============================================================================== --- stable/9/sys/powerpc/ps3/ps3-hvcall.master Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3-hvcall.master Sat Dec 31 15:11:47 2011 (r229114) @@ -125,11 +125,12 @@ HVCALL 212 lv1_gpu_device_map dev l HVCALL 213 lv1_gpu_device_unmap dev HVCALL 214 lv1_gpu_memory_allocate ddr_size,zero1,zero2,zero3,zero4 handle,ddr_lpar HVCALL 216 lv1_gpu_memory_free handle -HVCALL 217 lv1_gpu_context_allocate handle, zero chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size +HVCALL 217 lv1_gpu_context_allocate handle,flags chandle,lpar_dma_control,lpar_driver_info,lpar_reports,lpar_reports_size HVCALL 218 lv1_gpu_context_free chandle HVCALL 221 lv1_gpu_context_iomap changle,gpu_ioif,xdr_lpar,fbsize,ioflags HVCALL 225 lv1_gpu_context_attribute chandle,op,p1,p2,p3,p4 HVCALL 227 lv1_gpu_context_intr chandle v1 +HVCALL 228 lv1_gpu_attribute p1,p2,p3,p4,p5 HVCALL 232 lv1_get_rtc UNUSED rtc_val,timebase HVCALL 245 lv1_storage_read dev,region,sector,nsectors,flags,buf dma_tag HVCALL 246 lv1_storage_write dev,region,sector,nsectors,flags,buf dma_tag Modified: stable/9/sys/powerpc/ps3/ps3_syscons.c ============================================================================== --- stable/9/sys/powerpc/ps3/ps3_syscons.c Sat Dec 31 15:08:33 2011 (r229113) +++ stable/9/sys/powerpc/ps3/ps3_syscons.c Sat Dec 31 15:11:47 2011 (r229114) @@ -121,6 +121,13 @@ struct ps3fb_softc { u_char *sc_font; int sc_font_height; + + uint64_t sc_fbhandle; + uint64_t sc_fbcontext; + uint64_t sc_dma_control; + uint64_t sc_driver_info; + uint64_t sc_reports; + uint64_t sc_reports_size; }; static video_switch_t ps3fbvidsw = { @@ -276,8 +283,10 @@ ps3fb_configure(int flags) void ps3fb_remap(void) { + struct ps3fb_softc *sc; vm_offset_t va, fb_paddr; - uint64_t fbhandle, fbcontext; + + sc = &ps3fb_softc; lv1_gpu_close(); lv1_gpu_open(0); @@ -290,12 +299,13 @@ ps3fb_remap(void) 0,L1GPU_DISPLAY_SYNC_VSYNC,0,0); lv1_gpu_context_attribute(0, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_SYNC, 1,L1GPU_DISPLAY_SYNC_VSYNC,0,0); - lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &fbhandle, &fb_paddr); - lv1_gpu_context_allocate(fbhandle, 0, &fbcontext); + lv1_gpu_memory_allocate(PS3FB_SIZE, 0, 0, 0, 0, &sc->sc_fbhandle, &fb_paddr); + lv1_gpu_context_allocate(sc->sc_fbhandle, 0, &sc->sc_fbcontext, &sc->sc_dma_control, + &sc->sc_driver_info, &sc->sc_reports, &sc->sc_reports_size); - lv1_gpu_context_attribute(fbcontext, + lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); - lv1_gpu_context_attribute(fbcontext, + lv1_gpu_context_attribute(sc->sc_fbcontext, L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); for (va = 0; va < PS3FB_SIZE; va += PAGE_SIZE) @@ -405,6 +415,11 @@ ps3fb_set_mode(video_adapter_t *adp, int ps3fb_blank_display(&sc->sc_va, V_DISPLAY_ON); + lv1_gpu_context_attribute(sc->sc_fbcontext, + L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 0, 0, 0, 0); + lv1_gpu_context_attribute(sc->sc_fbcontext, + L1GPU_CONTEXT_ATTRIBUTE_DISPLAY_FLIP, 1, 0, 0, 0); + return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:14:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BBDD106566B; Sat, 31 Dec 2011 15:14:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3BD4E8FC0A; Sat, 31 Dec 2011 15:14:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFE8w2070332; Sat, 31 Dec 2011 15:14:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFE8bQ070329; Sat, 31 Dec 2011 15:14:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311514.pBVFE8bQ070329@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229115 - in stable/9/sys/dev/usb: . wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:14:08 -0000 Author: hselasky Date: Sat Dec 31 15:14:07 2011 New Revision: 229115 URL: http://svn.freebsd.org/changeset/base/229115 Log: MFC r227781: Add new USB IDs. PR: usb/162712, usb/163732 Modified: stable/9/sys/dev/usb/usbdevs stable/9/sys/dev/usb/wlan/if_run.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:11:47 2011 (r229114) +++ stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:14:07 2011 (r229115) @@ -2084,6 +2084,7 @@ product LINKSYS4 RT3070 0x0078 RT3070 product LINKSYS4 WUSB600NV2 0x0079 WUSB600N v2 /* Logitech products */ +product LOGITECH LANW300NU2 0x0166 LAN-W300N/U2 product LOGITECH M2452 0x0203 M2452 keyboard product LOGITECH M4848 0x0301 M4848 mouse product LOGITECH PAGESCAN 0x040f PageScan @@ -2179,6 +2180,7 @@ product MELCO RT2870_1 0x0148 RT2870 product MELCO RT2870_2 0x0150 RT2870 product MELCO WLIUCGN 0x015d WLI-UC-GN product MELCO WLIUCG301N 0x016f WLI-UC-G301N +product MELCO WLIUCGNM 0x01a2 WLI-UC-GNM /* Merlin products */ product MERLIN V620 0x1110 Merlin V620 Modified: stable/9/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 15:11:47 2011 (r229114) +++ stable/9/sys/dev/usb/wlan/if_run.c Sat Dec 31 15:14:07 2011 (r229115) @@ -208,12 +208,14 @@ static const STRUCT_USB_HOST_ID run_devs RUN_DEV(LOGITEC, RT2870_1), RUN_DEV(LOGITEC, RT2870_2), RUN_DEV(LOGITEC, RT2870_3), + RUN_DEV(LOGITECH, LANW300NU2), RUN_DEV(MELCO, RT2870_1), RUN_DEV(MELCO, RT2870_2), RUN_DEV(MELCO, WLIUCAG300N), RUN_DEV(MELCO, WLIUCG300N), RUN_DEV(MELCO, WLIUCG301N), RUN_DEV(MELCO, WLIUCGN), + RUN_DEV(MELCO, WLIUCGNM), RUN_DEV(MOTOROLA4, RT2770), RUN_DEV(MOTOROLA4, RT3070), RUN_DEV(MSI, RT3070_1), From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:15:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACCD11065679; Sat, 31 Dec 2011 15:15:30 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9602F8FC13; Sat, 31 Dec 2011 15:15:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFFUhP070425; Sat, 31 Dec 2011 15:15:30 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFFUhG070422; Sat, 31 Dec 2011 15:15:30 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311515.pBVFFUhG070422@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:15:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229116 - in stable/9/sys/dev/usb: . net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:15:30 -0000 Author: hselasky Date: Sat Dec 31 15:15:30 2011 New Revision: 229116 URL: http://svn.freebsd.org/changeset/base/229116 Log: MFC r228637: Add new USB ID. Modified: stable/9/sys/dev/usb/net/if_axe.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/net/if_axe.c ============================================================================== --- stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 15:14:07 2011 (r229115) +++ stable/9/sys/dev/usb/net/if_axe.c Sat Dec 31 15:15:30 2011 (r229116) @@ -151,6 +151,7 @@ static const STRUCT_USB_HOST_ID axe_devs AXE_DEV(ASIX, AX88772, AXE_FLAG_772), AXE_DEV(ASIX, AX88772A, AXE_FLAG_772A), AXE_DEV(ASIX, AX88772B, AXE_FLAG_772B), + AXE_DEV(ASIX, AX88772B_1, AXE_FLAG_772B), AXE_DEV(ATEN, UC210T, 0), AXE_DEV(BELKIN, F5D5055, AXE_FLAG_178), AXE_DEV(BILLIONTON, USB2AR, 0), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:14:07 2011 (r229115) +++ stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:15:30 2011 (r229116) @@ -1047,6 +1047,7 @@ product ASIX AX88178 0x1780 AX88178 product ASIX AX88772 0x7720 AX88772 product ASIX AX88772A 0x772a AX88772A USB 2.0 10/100 Ethernet product ASIX AX88772B 0x772b AX88772B USB 2.0 10/100 Ethernet +product ASIX AX88772B_1 0x7e2b AX88772B USB 2.0 10/100 Ethernet /* ASUS products */ product ASUS2 USBN11 0x0b05 USB-N11 From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:18:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7839C106566C; Sat, 31 Dec 2011 15:18:52 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 619EA8FC13; Sat, 31 Dec 2011 15:18:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFIqcP070570; Sat, 31 Dec 2011 15:18:52 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFIp9Z070567; Sat, 31 Dec 2011 15:18:51 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311518.pBVFIp9Z070567@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:18:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229117 - in stable/9/sys/dev/usb: . quirk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:18:52 -0000 Author: hselasky Date: Sat Dec 31 15:18:51 2011 New Revision: 229117 URL: http://svn.freebsd.org/changeset/base/229117 Log: MFC r227610 and r228243: Add more quirks for USB mass storage devices. Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Sat Dec 31 15:15:30 2011 (r229116) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Sat Dec 31 15:18:51 2011 (r229117) @@ -148,10 +148,6 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(AIPTEK, POCKETCAM3M, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), - USB_QUIRK(ALCOR, SDCR_6335, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, - UQ_MSC_NO_SYNC_CACHE), - USB_QUIRK(ALCOR, SDCR_6362, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, - UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(ALCOR, UMCR_9361, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(ALCOR, TRANSCEND, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, @@ -252,6 +248,7 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(MICROTECH, DPCM, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI, UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_TEST_UNIT_READY, UQ_MSC_NO_START_STOP), + USB_QUIRK(MICRON, REALSSD, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(MICROTECH, SCSIDB25, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), USB_QUIRK(MICROTECH, SCSIHD50, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, @@ -462,6 +459,7 @@ static struct usb_quirk_entry usb_quirks * Quirks for manufacturers which USB devices does not respond * after issuing non-supported commands: */ + USB_QUIRK(ALCOR, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_TEST_UNIT_READY, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(FEIYA, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(REALTEK, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), USB_QUIRK(INITIO, DUMMY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MATCH_VENDOR_ONLY), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:15:30 2011 (r229116) +++ stable/9/sys/dev/usb/usbdevs Sat Dec 31 15:18:51 2011 (r229117) @@ -317,6 +317,7 @@ vendor ACTLABS 0x061c Act Labs vendor ALARIS 0x0620 Alaris vendor APEX 0x0624 Apex vendor CREATIVE3 0x062a Creative Labs +vendor MICRON 0x0634 Micron Technology vendor VIVITAR 0x0636 Vivitar vendor GUNZE 0x0637 Gunze Electronics USA vendor AVISION 0x0638 Avision @@ -915,8 +916,10 @@ product ALCATEL OT535 0x02df One Touch /* Alcor Micro, Inc. products */ product ALCOR2 KBD_HUB 0x2802 Kbd Hub +product ALCOR DUMMY 0x0000 Dummy product product ALCOR SDCR_6335 0x6335 SD/MMC Card Reader product ALCOR SDCR_6362 0x6362 SD/MMC Card Reader +product ALCOR SDCR_6366 0x6366 SD/MMC Card Reader product ALCOR TRANSCEND 0x6387 Transcend JetFlash Drive product ALCOR MA_KBD_HUB 0x9213 MacAlly Kbd Hub product ALCOR AU9814 0x9215 AU9814 Hub @@ -2224,6 +2227,9 @@ product MSI RT3070_7 0x899a RT3070 product MSI RT2573_3 0xa861 RT2573 product MSI RT2573_4 0xa874 RT2573 +/* Micron products */ +product MICRON REALSSD 0x0655 Real SSD eUSB + /* Microsoft products */ product MICROSOFT SIDEPREC 0x0008 SideWinder Precision Pro product MICROSOFT INTELLIMOUSE 0x0009 IntelliMouse From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:31:35 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90670106566C; Sat, 31 Dec 2011 15:31:35 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 761EE8FC0A; Sat, 31 Dec 2011 15:31:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFVZhk071034; Sat, 31 Dec 2011 15:31:35 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFVYgw070999; Sat, 31 Dec 2011 15:31:34 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311531.pBVFVYgw070999@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229118 - in stable/9/sys: arm/econa arm/xscale/ixp425 dev/ahci dev/ata dev/gpio dev/mvs dev/ppbus dev/ppc dev/siba dev/siis dev/usb dev/usb/controller kern mips/atheros mips/cavium/usb... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:31:35 -0000 Author: hselasky Date: Sat Dec 31 15:31:34 2011 New Revision: 229118 URL: http://svn.freebsd.org/changeset/base/229118 Log: MFC r227701, r227847 and r227849: Move the device_delete_all_children() function from usb_util.c to kern/subr_bus.c. Simplify this function so that it no longer depends on malloc() to execute. Rename device_delete_all_children() into device_delete_children(). Identify a few other places where it makes sense to use device_delete_children(). Modified: stable/9/sys/arm/econa/ehci_ebus.c stable/9/sys/arm/econa/ohci_ec.c stable/9/sys/arm/xscale/ixp425/avila_ata.c stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/ata/ata-disk.c stable/9/sys/dev/ata/ata-pci.c stable/9/sys/dev/gpio/gpiobus.c stable/9/sys/dev/mvs/mvs_pci.c stable/9/sys/dev/mvs/mvs_soc.c stable/9/sys/dev/ppbus/ppbconf.c stable/9/sys/dev/ppc/ppc.c stable/9/sys/dev/siba/siba_core.c stable/9/sys/dev/siis/siis.c stable/9/sys/dev/usb/controller/at91dci_atmelarm.c stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c stable/9/sys/dev/usb/controller/ehci_ixp4xx.c stable/9/sys/dev/usb/controller/ehci_mv.c stable/9/sys/dev/usb/controller/ehci_pci.c stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c stable/9/sys/dev/usb/controller/ohci_atmelarm.c stable/9/sys/dev/usb/controller/ohci_pci.c stable/9/sys/dev/usb/controller/ohci_s3c24x0.c stable/9/sys/dev/usb/controller/uhci_pci.c stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c stable/9/sys/dev/usb/controller/xhci_pci.c stable/9/sys/dev/usb/usb_util.c stable/9/sys/dev/usb/usb_util.h stable/9/sys/kern/subr_bus.c stable/9/sys/mips/atheros/ar71xx_ehci.c stable/9/sys/mips/atheros/ar71xx_ohci.c stable/9/sys/mips/cavium/usb/octusb_octeon.c stable/9/sys/mips/rmi/xls_ehci.c stable/9/sys/mips/rt305x/rt305x_dotg.c stable/9/sys/sys/bus.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/arm/econa/ehci_ebus.c ============================================================================== --- stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/arm/econa/ehci_ebus.c Sat Dec 31 15:31:34 2011 (r229118) @@ -192,7 +192,7 @@ ehci_ebus_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); /* * disable interrupts that might have been switched on in Modified: stable/9/sys/arm/econa/ohci_ec.c ============================================================================== --- stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/arm/econa/ohci_ec.c Sat Dec 31 15:31:34 2011 (r229118) @@ -185,7 +185,7 @@ ohci_ec_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); bus_space_write_4(sc->sc_ohci.sc_io_tag, sc->sc_ohci.sc_io_hdl, OHCI_CONTROL, 0); Modified: stable/9/sys/arm/xscale/ixp425/avila_ata.c ============================================================================== --- stable/9/sys/arm/xscale/ixp425/avila_ata.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/arm/xscale/ixp425/avila_ata.c Sat Dec 31 15:31:34 2011 (r229118) @@ -259,17 +259,11 @@ static int ata_avila_detach(device_t dev) { struct ata_avila_softc *sc = device_get_softc(dev); - device_t *children; - int nc; /* XXX quiesce gpio? */ /* detach & delete all children */ - if (device_get_children(dev, &children, &nc) == 0) { - if (nc > 0) - device_delete_child(dev, children[0]); - free(children, M_TEMP); - } + device_delete_children(dev); bus_teardown_intr(dev, sc->sc_irq, sc->sc_ih); bus_release_resource(dev, SYS_RES_IRQ, sc->sc_rid, sc->sc_irq); Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ahci/ahci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -514,15 +514,11 @@ static int ahci_detach(device_t dev) { struct ahci_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; + int i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupts. */ for (i = 0; i < ctlr->numirqs; i++) { if (ctlr->irqs[i].r_irq) { Modified: stable/9/sys/dev/ata/ata-disk.c ============================================================================== --- stable/9/sys/dev/ata/ata-disk.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ata/ata-disk.c Sat Dec 31 15:31:34 2011 (r229118) @@ -172,8 +172,6 @@ ad_detach(device_t dev) { struct ad_softc *adp = device_get_ivars(dev); struct ata_device *atadev = device_get_softc(dev); - device_t *children; - int nchildren, i; /* check that we have a valid disk to detach */ if (!device_get_ivars(dev)) @@ -183,12 +181,7 @@ ad_detach(device_t dev) callout_drain(&atadev->spindown_timer); /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); /* destroy disk from the system so we don't get any further requests */ disk_destroy(adp->disk); Modified: stable/9/sys/dev/ata/ata-pci.c ============================================================================== --- stable/9/sys/dev/ata/ata-pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ata/ata-pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -136,15 +136,10 @@ int ata_pci_detach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + if (ctlr->r_irq) { bus_teardown_intr(dev, ctlr->r_irq, ctlr->handle); bus_release_resource(dev, SYS_RES_IRQ, ctlr->r_irq_rid, ctlr->r_irq); Modified: stable/9/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/gpio/gpiobus.c Sat Dec 31 15:31:34 2011 (r229118) @@ -219,8 +219,7 @@ static int gpiobus_detach(device_t dev) { struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); - int err, ndevs, i; - device_t *devlist; + int err; KASSERT(mtx_initialized(&sc->sc_mtx), ("gpiobus mutex not initialized")); @@ -228,16 +227,14 @@ gpiobus_detach(device_t dev) if ((err = bus_generic_detach(dev)) != 0) return (err); - if ((err = device_get_children(dev, &devlist, &ndevs)) != 0) - return (err); - for (i = 0; i < ndevs; i++) - device_delete_child(dev, devlist[i]); + + /* detach and delete all children */ + device_delete_children(dev); if (sc->sc_pins_mapped) { free(sc->sc_pins_mapped, M_DEVBUF); sc->sc_pins_mapped = NULL; } - free(devlist, M_TEMP); return (0); } Modified: stable/9/sys/dev/mvs/mvs_pci.c ============================================================================== --- stable/9/sys/dev/mvs/mvs_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/mvs/mvs_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -177,15 +177,10 @@ static int mvs_detach(device_t dev) { struct mvs_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupt. */ if (ctlr->irq.r_irq) { bus_teardown_intr(dev, ctlr->irq.r_irq, Modified: stable/9/sys/dev/mvs/mvs_soc.c ============================================================================== --- stable/9/sys/dev/mvs/mvs_soc.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/mvs/mvs_soc.c Sat Dec 31 15:31:34 2011 (r229118) @@ -173,15 +173,10 @@ static int mvs_detach(device_t dev) { struct mvs_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupt. */ if (ctlr->irq.r_irq) { bus_teardown_intr(dev, ctlr->irq.r_irq, Modified: stable/9/sys/dev/ppbus/ppbconf.c ============================================================================== --- stable/9/sys/dev/ppbus/ppbconf.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ppbus/ppbconf.c Sat Dec 31 15:31:34 2011 (r229118) @@ -422,20 +422,14 @@ ppbus_attach(device_t dev) static int ppbus_detach(device_t dev) { - device_t *children; - int error, nchildren, i; + int error; error = bus_generic_detach(dev); if (error) return (error); /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); return (0); } Modified: stable/9/sys/dev/ppc/ppc.c ============================================================================== --- stable/9/sys/dev/ppc/ppc.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/ppc/ppc.c Sat Dec 31 15:31:34 2011 (r229118) @@ -1851,20 +1851,13 @@ int ppc_detach(device_t dev) { struct ppc_data *ppc = DEVTOSOFTC(dev); - device_t *children; - int nchildren, i; if (ppc->res_irq == 0) { return (ENXIO); } /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); if (ppc->res_irq != 0) { bus_teardown_intr(dev, ppc->res_irq, ppc->intr_cookie); Modified: stable/9/sys/dev/siba/siba_core.c ============================================================================== --- stable/9/sys/dev/siba/siba_core.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/siba/siba_core.c Sat Dec 31 15:31:34 2011 (r229118) @@ -214,16 +214,8 @@ siba_core_attach(struct siba_softc *siba int siba_core_detach(struct siba_softc *siba) { - device_t *devlistp; - int devcnt, error = 0, i; - - error = device_get_children(siba->siba_dev, &devlistp, &devcnt); - if (error != 0) - return (0); - - for ( i = 0 ; i < devcnt ; i++) - device_delete_child(siba->siba_dev, devlistp[i]); - free(devlistp, M_TEMP); + /* detach & delete all children */ + device_delete_children(siba->siba_dev); return (0); } Modified: stable/9/sys/dev/siis/siis.c ============================================================================== --- stable/9/sys/dev/siis/siis.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/siis/siis.c Sat Dec 31 15:31:34 2011 (r229118) @@ -205,15 +205,10 @@ static int siis_detach(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_children(dev); + /* Free interrupts. */ if (ctlr->irq.r_irq) { bus_teardown_intr(dev, ctlr->irq.r_irq, Modified: stable/9/sys/dev/usb/controller/at91dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/at91dci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -270,7 +270,7 @@ at91_udp_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* disable Transceiver */ AT91_UDP_WRITE_4(&sc->sc_dci, AT91_UDP_TXVC, AT91_UDP_TXVC_DIS); Modified: stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/atmegadci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -163,7 +163,7 @@ atmegadci_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/ehci_ixp4xx.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ehci_ixp4xx.c Sat Dec 31 15:31:34 2011 (r229118) @@ -215,7 +215,7 @@ ehci_ixp_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/ehci_mv.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_mv.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ehci_mv.c Sat Dec 31 15:31:34 2011 (r229118) @@ -247,7 +247,7 @@ mv_ehci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); /* * disable interrupts that might have been switched on in mv_ehci_attach Modified: stable/9/sys/dev/usb/controller/ehci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ehci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ehci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -455,7 +455,7 @@ ehci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); pci_disable_busmaster(self); Modified: stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/musb_otg_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -188,7 +188,7 @@ musbotg_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_otg.sc_irq_res && sc->sc_otg.sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/ohci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ohci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -174,7 +174,7 @@ ohci_atmelarm_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* * Put the controller into reset, then disable clocks and do Modified: stable/9/sys/dev/usb/controller/ohci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ohci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -331,7 +331,7 @@ ohci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); pci_disable_busmaster(self); Modified: stable/9/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- stable/9/sys/dev/usb/controller/ohci_s3c24x0.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/ohci_s3c24x0.c Sat Dec 31 15:31:34 2011 (r229118) @@ -156,7 +156,7 @@ ohci_s3c24x0_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* * Put the controller into reset, then disable clocks and do Modified: stable/9/sys/dev/usb/controller/uhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/uhci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/uhci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -387,7 +387,7 @@ uhci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); /* * disable interrupts that might have been switched on in Modified: stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c ============================================================================== --- stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/uss820dci_atmelarm.c Sat Dec 31 15:31:34 2011 (r229118) @@ -177,7 +177,7 @@ uss820_atmelarm_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_irq_res && sc->sc_intr_hdl) { /* Modified: stable/9/sys/dev/usb/controller/xhci_pci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci_pci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/controller/xhci_pci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -202,7 +202,7 @@ xhci_pci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); pci_disable_busmaster(self); Modified: stable/9/sys/dev/usb/usb_util.c ============================================================================== --- stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:31:34 2011 (r229118) @@ -58,31 +58,6 @@ #include /*------------------------------------------------------------------------* - * device_delete_all_children - delete all children of a device - *------------------------------------------------------------------------*/ -#ifndef device_delete_all_children -int -device_delete_all_children(device_t dev) -{ - device_t *devlist; - int devcount; - int error; - - error = device_get_children(dev, &devlist, &devcount); - if (error == 0) { - while (devcount-- > 0) { - error = device_delete_child(dev, devlist[devcount]); - if (error) { - break; - } - } - free(devlist, M_TEMP); - } - return (error); -} -#endif - -/*------------------------------------------------------------------------* * device_set_usb_desc * * This function can be called at probe or attach to set the USB Modified: stable/9/sys/dev/usb/usb_util.h ============================================================================== --- stable/9/sys/dev/usb/usb_util.h Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/dev/usb/usb_util.h Sat Dec 31 15:31:34 2011 (r229118) @@ -27,7 +27,6 @@ #ifndef _USB_UTIL_H_ #define _USB_UTIL_H_ -int device_delete_all_children(device_t dev); uint8_t usb_make_str_desc(void *ptr, uint16_t max_len, const char *s); void usb_printbcd(char *p, uint16_t p_len, uint16_t bcd); void usb_trim_spaces(char *p); Modified: stable/9/sys/kern/subr_bus.c ============================================================================== --- stable/9/sys/kern/subr_bus.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/kern/subr_bus.c Sat Dec 31 15:31:34 2011 (r229118) @@ -1862,7 +1862,7 @@ device_delete_child(device_t dev, device PDEBUG(("%s from %s", DEVICENAME(child), DEVICENAME(dev))); /* remove children first */ - while ( (grandchild = TAILQ_FIRST(&child->children)) ) { + while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) { error = device_delete_child(child, grandchild); if (error) return (error); @@ -1881,6 +1881,39 @@ device_delete_child(device_t dev, device } /** + * @brief Delete all children devices of the given device, if any. + * + * This function deletes all children devices of the given device, if + * any, using the device_delete_child() function for each device it + * finds. If a child device cannot be deleted, this function will + * return an error code. + * + * @param dev the parent device + * + * @retval 0 success + * @retval non-zero a device would not detach + */ +int +device_delete_children(device_t dev) +{ + device_t child; + int error; + + PDEBUG(("Deleting all children of %s", DEVICENAME(dev))); + + error = 0; + + while ((child = TAILQ_FIRST(&dev->children)) != NULL) { + error = device_delete_child(dev, child); + if (error) { + PDEBUG(("Failed deleting %s", DEVICENAME(child))); + break; + } + } + return (error); +} + +/** * @brief Find a device given a unit number * * This is similar to devclass_get_devices() but only searches for Modified: stable/9/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- stable/9/sys/mips/atheros/ar71xx_ehci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/atheros/ar71xx_ehci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -202,7 +202,7 @@ ar71xx_ehci_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { /* Modified: stable/9/sys/mips/atheros/ar71xx_ohci.c ============================================================================== --- stable/9/sys/mips/atheros/ar71xx_ohci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/atheros/ar71xx_ohci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -150,7 +150,7 @@ ar71xx_ohci_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); /* * Put the controller into reset, then disable clocks and do Modified: stable/9/sys/mips/cavium/usb/octusb_octeon.c ============================================================================== --- stable/9/sys/mips/cavium/usb/octusb_octeon.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/cavium/usb/octusb_octeon.c Sat Dec 31 15:31:34 2011 (r229118) @@ -159,7 +159,7 @@ octusb_octeon_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_dci.sc_irq_res && sc->sc_dci.sc_intr_hdl) { /* Modified: stable/9/sys/mips/rmi/xls_ehci.c ============================================================================== --- stable/9/sys/mips/rmi/xls_ehci.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/rmi/xls_ehci.c Sat Dec 31 15:31:34 2011 (r229118) @@ -172,7 +172,7 @@ ehci_xls_detach(device_t self) device_delete_child(self, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(self); + device_delete_children(self); if (sc->sc_irq_res && sc->sc_intr_hdl) { ehci_detach(sc); Modified: stable/9/sys/mips/rt305x/rt305x_dotg.c ============================================================================== --- stable/9/sys/mips/rt305x/rt305x_dotg.c Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/mips/rt305x/rt305x_dotg.c Sat Dec 31 15:31:34 2011 (r229118) @@ -175,7 +175,7 @@ dotg_obio_detach(device_t dev) device_delete_child(dev, bdev); } /* during module unload there are lots of children leftover */ - device_delete_all_children(dev); + device_delete_children(dev); if (sc->sc_dci.sc_irq_res && sc->sc_dci.sc_intr_hdl) { /* Modified: stable/9/sys/sys/bus.h ============================================================================== --- stable/9/sys/sys/bus.h Sat Dec 31 15:18:51 2011 (r229117) +++ stable/9/sys/sys/bus.h Sat Dec 31 15:31:34 2011 (r229118) @@ -424,6 +424,7 @@ device_t device_add_child_ordered(device const char *name, int unit); void device_busy(device_t dev); int device_delete_child(device_t dev, device_t child); +int device_delete_children(device_t dev); int device_attach(device_t dev); int device_detach(device_t dev); void device_disable(device_t dev); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:37:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 513BE106566C; Sat, 31 Dec 2011 15:37:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 304A88FC12; Sat, 31 Dec 2011 15:37:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFbW89071252; Sat, 31 Dec 2011 15:37:32 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFbVRb071249; Sat, 31 Dec 2011 15:37:31 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311537.pBVFbVRb071249@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:37:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229119 - in stable/9/sys: dev/usb kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:37:32 -0000 Author: hselasky Date: Sat Dec 31 15:37:31 2011 New Revision: 229119 URL: http://svn.freebsd.org/changeset/base/229119 Log: MFC r227706, r227748, r227749 and r228234: Simplify the usb_pause_mtx() function by factoring out the generic parts to the kernel's pause() function. The pause() function can now be used when cold != 0. Also assert that the timeout in system ticks must be greater or equal to zero. Modified: stable/9/sys/dev/usb/usb_util.c stable/9/sys/kern/kern_synch.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usb_util.c ============================================================================== --- stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:31:34 2011 (r229118) +++ stable/9/sys/dev/usb/usb_util.c Sat Dec 31 15:37:31 2011 (r229119) @@ -115,33 +115,21 @@ device_set_usb_desc(device_t dev) * * This function will delay the code by the passed number of system * ticks. The passed mutex "mtx" will be dropped while waiting, if - * "mtx" is not NULL. + * "mtx" is different from NULL. *------------------------------------------------------------------------*/ void -usb_pause_mtx(struct mtx *mtx, int _ticks) +usb_pause_mtx(struct mtx *mtx, int timo) { if (mtx != NULL) mtx_unlock(mtx); - if (cold) { - /* convert to milliseconds */ - _ticks = (_ticks * 1000) / hz; - /* convert to microseconds, rounded up */ - _ticks = (_ticks + 1) * 1000; - DELAY(_ticks); - - } else { - - /* - * Add one to the number of ticks so that we don't return - * too early! - */ - _ticks++; - - if (pause("USBWAIT", _ticks)) { - /* ignore */ - } - } + /* + * Add one tick to the timeout so that we don't return too + * early! Note that pause() will assert that the passed + * timeout is positive and non-zero! + */ + pause("USBWAIT", timo + 1); + if (mtx != NULL) mtx_lock(mtx); } Modified: stable/9/sys/kern/kern_synch.c ============================================================================== --- stable/9/sys/kern/kern_synch.c Sat Dec 31 15:31:34 2011 (r229118) +++ stable/9/sys/kern/kern_synch.c Sat Dec 31 15:37:31 2011 (r229119) @@ -325,16 +325,34 @@ msleep_spin(void *ident, struct mtx *mtx } /* - * pause() is like tsleep() except that the intention is to not be - * explicitly woken up by another thread. Instead, the current thread - * simply wishes to sleep until the timeout expires. It is - * implemented using a dummy wait channel. + * pause() delays the calling thread by the given number of system ticks. + * During cold bootup, pause() uses the DELAY() function instead of + * the tsleep() function to do the waiting. The "timo" argument must be + * greater than or equal to zero. A "timo" value of zero is equivalent + * to a "timo" value of one. */ int pause(const char *wmesg, int timo) { + KASSERT(timo >= 0, ("pause: timo must be >= 0")); - KASSERT(timo != 0, ("pause: timeout required")); + /* silently convert invalid timeouts */ + if (timo < 1) + timo = 1; + + if (cold) { + /* + * We delay one HZ at a time to avoid overflowing the + * system specific DELAY() function(s): + */ + while (timo >= hz) { + DELAY(1000000); + timo -= hz; + } + if (timo > 0) + DELAY(timo * tick); + return (0); + } return (tsleep(&pause_wchan, 0, wmesg, timo)); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:42:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F57D106564A; Sat, 31 Dec 2011 15:42:06 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D29B88FC08; Sat, 31 Dec 2011 15:42:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFg5FZ071442; Sat, 31 Dec 2011 15:42:05 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFg5uM071439; Sat, 31 Dec 2011 15:42:05 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311542.pBVFg5uM071439@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:42:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229120 - in stable/9/sys/dev/usb: . wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:42:06 -0000 Author: hselasky Date: Sat Dec 31 15:42:05 2011 New Revision: 229120 URL: http://svn.freebsd.org/changeset/base/229120 Log: MFC r228232 and r228303: Fix clang compile warnings. Modified: stable/9/sys/dev/usb/usb_msctest.c stable/9/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 15:37:31 2011 (r229119) +++ stable/9/sys/dev/usb/usb_msctest.c Sat Dec 31 15:42:05 2011 (r229120) @@ -477,7 +477,7 @@ bbb_command_start(struct bbb_transfer *s sc->cmd_len = cmd_len; memset(&sc->cbw.CBWCDB, 0, sizeof(sc->cbw.CBWCDB)); memcpy(&sc->cbw.CBWCDB, cmd_ptr, cmd_len); - DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, &sc->cbw.CBWCDB, ":"); + DPRINTFN(1, "SCSI cmd = %*D\n", (int)cmd_len, (char *)sc->cbw.CBWCDB, ":"); mtx_lock(&sc->mtx); usbd_transfer_start(sc->xfer[sc->state]); Modified: stable/9/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 15:37:31 2011 (r229119) +++ stable/9/sys/dev/usb/wlan/if_zyd.c Sat Dec 31 15:42:05 2011 (r229120) @@ -686,7 +686,7 @@ zyd_intr_read_callback(struct usb_xfer * memcpy(rqp->odata, cmd->data, rqp->olen); DPRINTF(sc, ZYD_DEBUG_CMD, "command %p complete, data = %*D \n", - rqp, rqp->olen, rqp->odata, ":"); + rqp, rqp->olen, (char *)rqp->odata, ":"); wakeup(rqp); /* wakeup caller */ break; } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:43:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95DFE106564A; Sat, 31 Dec 2011 15:43:55 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7F2128FC12; Sat, 31 Dec 2011 15:43:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFhtFs071542; Sat, 31 Dec 2011 15:43:55 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFht6P071540; Sat, 31 Dec 2011 15:43:55 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311543.pBVFht6P071540@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:43:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229121 - stable/9/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:43:55 -0000 Author: hselasky Date: Sat Dec 31 15:43:55 2011 New Revision: 229121 URL: http://svn.freebsd.org/changeset/base/229121 Log: MFC r228195: Fix checks for error return from urtw_alloc_rx_data_list() and urtw_alloc_tx_data_list(). Modified: stable/9/sys/dev/usb/wlan/if_urtw.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/dev/usb/wlan/if_urtw.c ============================================================================== --- stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 15:42:05 2011 (r229120) +++ stable/9/sys/dev/usb/wlan/if_urtw.c Sat Dec 31 15:43:55 2011 (r229121) @@ -1053,10 +1053,10 @@ urtw_init_locked(void *arg) if (!(sc->sc_flags & URTW_INIT_ONCE)) { ret = urtw_alloc_rx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; ret = urtw_alloc_tx_data_list(sc); - if (error != 0) + if (ret != 0) goto fail; sc->sc_flags |= URTW_INIT_ONCE; } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:46:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F2F81065678; Sat, 31 Dec 2011 15:46:37 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB3008FC27; Sat, 31 Dec 2011 15:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFkaF3071685; Sat, 31 Dec 2011 15:46:36 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFkaQs071678; Sat, 31 Dec 2011 15:46:36 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311546.pBVFkaQs071678@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229122 - stable/9/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:46:37 -0000 Author: hselasky Date: Sat Dec 31 15:46:36 2011 New Revision: 229122 URL: http://svn.freebsd.org/changeset/base/229122 Log: MFC r227404: Add definition of some USB 3.0 descriptors to libusb 1.0 and libusb 2.0. Some header file parts of this patch were taken from a patch submitted by Maya Erez to the LibUSB developers list. Modified: stable/9/lib/libusb/Makefile stable/9/lib/libusb/libusb.3 stable/9/lib/libusb/libusb.h stable/9/lib/libusb/libusb10_desc.c stable/9/lib/libusb/libusb20_desc.c stable/9/lib/libusb/libusb20_desc.h Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/Makefile ============================================================================== --- stable/9/lib/libusb/Makefile Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/Makefile Sat Dec 31 15:46:36 2011 (r229122) @@ -74,6 +74,10 @@ MLINKS += libusb.3 libusb_get_config_des MLINKS += libusb.3 libusb_get_config_descriptor_by_value.3 MLINKS += libusb.3 libusb_free_config_descriptor.3 MLINKS += libusb.3 libusb_get_string_descriptor_ascii.3 +MLINKS += libusb.3 libusb_parse_ss_endpoint_comp.3 +MLINKS += libusb.3 libusb_free_ss_endpoint_comp.3 +MLINKS += libusb.3 libusb_parse_bos_descriptor.3 +MLINKS += libusb.3 libusb_free_bos_descriptor.3 MLINKS += libusb.3 libusb_alloc_transfer.3 MLINKS += libusb.3 libusb_free_transfer.3 MLINKS += libusb.3 libusb_submit_transfer.3 Modified: stable/9/lib/libusb/libusb.3 ============================================================================== --- stable/9/lib/libusb/libusb.3 Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb.3 Sat Dec 31 15:46:36 2011 (r229122) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 16, 2011 +.Dd November 9, 2011 .Dt LIBUSB 3 .Os .Sh NAME @@ -316,6 +316,40 @@ Retrieve a string descriptor in C style Returns the positive number of bytes in the resulting ASCII string on success and a LIBUSB_ERROR code on failure. .Pp +.Ft int +.Fn libusb_parse_ss_endpoint_comp "const void *buf" "int len" "libusb_ss_endpoint_companion_descriptor **ep_comp" +This function parses the USB 3.0 endpoint companion descriptor in host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +Typically these arguments are the extra and extra_length fields of the +endpoint descriptor. +On success the pointer to resulting descriptor is stored at the location given by +.Fa ep_comp. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed USB 3.0 endpoint companion descriptor must be +freed using the libusb_free_ss_endpoint_comp function. +.Pp +.Ft void +.Fn libusb_free_ss_endpoint_comp "libusb_ss_endpoint_companion_descriptor *ep_comp" +This function is NULL safe and frees a parsed USB 3.0 endpoint companion descriptor. +.Pp +.Ft int +.Fn libusb_parse_bos_descriptor "const void *buf" "int len" "libusb_bos_descriptor **bos" +This function parses a Binary Object Store, BOS, descriptor into host endian format pointed to by +.Fa buf +and having a length of +.Fa len. +On success the pointer to resulting descriptor is stored at the location given by +.Fa bos. +Returns zero on success and a LIBUSB_ERROR code on failure. +On success the parsed BOS descriptor must be freed using the +libusb_free_bos_descriptor function. +.Pp +.Ft void +.Fn libusb_free_bos_descriptor "libusb_bos_descriptor *bos" +This function is NULL safe and frees a parsed BOS descriptor. +.Pp .Sh USB ASYNCHRONOUS I/O .Pp .Ft struct libusb_transfer * Modified: stable/9/lib/libusb/libusb.h ============================================================================== --- stable/9/lib/libusb/libusb.h Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb.h Sat Dec 31 15:46:36 2011 (r229122) @@ -63,6 +63,16 @@ enum libusb_descriptor_type { LIBUSB_DT_REPORT = 0x22, LIBUSB_DT_PHYSICAL = 0x23, LIBUSB_DT_HUB = 0x29, + LIBUSB_DT_BOS = 0x0f, + LIBUSB_DT_DEVICE_CAPABILITY = 0x10, + LIBUSB_DT_SS_ENDPOINT_COMPANION = 0x30, +}; + +enum libusb_device_capability_type { + LIBUSB_WIRELESS_USB_DEVICE_CAPABILITY = 0x1, + LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY = 0x2, + LIBUSB_SS_USB_DEVICE_CAPABILITY = 0x3, + LIBUSB_CONTAINER_ID_DEVICE_CAPABILITY = 0x4, }; #define LIBUSB_DT_DEVICE_SIZE 18 @@ -71,6 +81,10 @@ enum libusb_descriptor_type { #define LIBUSB_DT_ENDPOINT_SIZE 7 #define LIBUSB_DT_ENDPOINT_AUDIO_SIZE 9 #define LIBUSB_DT_HUB_NONVAR_SIZE 7 +#define LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE 6 +#define LIBUSB_DT_BOS_SIZE 5 +#define LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE 7 +#define LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE 10 #define LIBUSB_ENDPOINT_ADDRESS_MASK 0x0f #define LIBUSB_ENDPOINT_DIR_MASK 0x80 @@ -230,6 +244,14 @@ typedef struct libusb_endpoint_descripto int extra_length; } libusb_endpoint_descriptor __aligned(sizeof(void *)); +typedef struct libusb_ss_endpoint_companion_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bMaxBurst; + uint8_t bmAttributes; + uint16_t wBytesPerInterval; +} libusb_ss_endpoint_companion_descriptor __aligned(sizeof(void *)); + typedef struct libusb_interface_descriptor { uint8_t bLength; uint8_t bDescriptorType; @@ -264,6 +286,39 @@ typedef struct libusb_config_descriptor int extra_length; } libusb_config_descriptor __aligned(sizeof(void *)); +typedef struct libusb_usb_2_0_device_capability_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint32_t bmAttributes; +#define LIBUSB_USB_2_0_CAPABILITY_LPM_SUPPORT (1 << 1) +} libusb_usb_2_0_device_capability_descriptor __aligned(sizeof(void *)); + +typedef struct libusb_ss_usb_device_capability_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint8_t bDevCapabilityType; + uint8_t bmAttributes; +#define LIBUSB_SS_USB_CAPABILITY_LPM_SUPPORT (1 << 1) + uint16_t wSpeedSupported; +#define LIBUSB_CAPABILITY_LOW_SPEED_OPERATION (1) +#define LIBUSB_CAPABILITY_FULL_SPEED_OPERATION (1 << 1) +#define LIBUSB_CAPABILITY_HIGH_SPEED_OPERATION (1 << 2) +#define LIBUSB_CAPABILITY_5GBPS_OPERATION (1 << 3) + uint8_t bFunctionalitySupport; + uint8_t bU1DevExitLat; + uint16_t wU2DevExitLat; +} libusb_ss_usb_device_capability_descriptor __aligned(sizeof(void *)); + +typedef struct libusb_bos_descriptor { + uint8_t bLength; + uint8_t bDescriptorType; + uint16_t wTotalLength; + uint8_t bNumDeviceCapabilities; + struct libusb_usb_2_0_device_capability_descriptor *usb_2_0_ext_cap; + struct libusb_ss_usb_device_capability_descriptor *ss_usb_cap; +} libusb_bos_descriptor __aligned(sizeof(void *)); + typedef struct libusb_control_setup { uint8_t bmRequestType; uint8_t bRequest; @@ -345,6 +400,10 @@ int libusb_get_config_descriptor_by_valu void libusb_free_config_descriptor(struct libusb_config_descriptor *config); int libusb_get_string_descriptor_ascii(libusb_device_handle * devh, uint8_t desc_index, uint8_t *data, int length); int libusb_get_descriptor(libusb_device_handle * devh, uint8_t desc_type, uint8_t desc_index, uint8_t *data, int length); +int libusb_parse_ss_endpoint_comp(const void *buf, int len, struct libusb_ss_endpoint_companion_descriptor **ep_comp); +void libusb_free_ss_endpoint_comp(struct libusb_ss_endpoint_companion_descriptor *ep_comp); +int libusb_parse_bos_descriptor(const void *buf, int len, struct libusb_bos_descriptor **bos); +void libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos); /* Asynchronous device I/O */ Modified: stable/9/lib/libusb/libusb10_desc.c ============================================================================== --- stable/9/lib/libusb/libusb10_desc.c Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb10_desc.c Sat Dec 31 15:46:36 2011 (r229122) @@ -298,7 +298,7 @@ libusb_get_string_descriptor_ascii(libus uint8_t desc_index, unsigned char *data, int length) { if (pdev == NULL || data == NULL || length < 1) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); if (length > 65535) length = 65535; @@ -318,7 +318,7 @@ libusb_get_descriptor(libusb_device_hand uint8_t desc_index, uint8_t *data, int length) { if (devh == NULL || data == NULL || length < 1) - return (LIBUSB20_ERROR_INVALID_PARAM); + return (LIBUSB_ERROR_INVALID_PARAM); if (length > 65535) length = 65535; @@ -327,3 +327,172 @@ libusb_get_descriptor(libusb_device_hand LIBUSB_REQUEST_GET_DESCRIPTOR, (desc_type << 8) | desc_index, 0, data, length, 1000)); } + +int +libusb_parse_ss_endpoint_comp(const void *buf, int len, + struct libusb_ss_endpoint_companion_descriptor **ep_comp) +{ + if (buf == NULL || ep_comp == NULL || len < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (len > 65535) + len = 65535; + + *ep_comp = NULL; + + while (len != 0) { + uint8_t dlen; + uint8_t dtype; + + dlen = ((const uint8_t *)buf)[0]; + dtype = ((const uint8_t *)buf)[1]; + + if (dlen < 2 || dlen > len) + break; + + if (dlen >= LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE && + dtype == LIBUSB_DT_SS_ENDPOINT_COMPANION) { + struct libusb_ss_endpoint_companion_descriptor *ptr; + + ptr = malloc(sizeof(*ptr)); + if (ptr == NULL) + return (LIBUSB_ERROR_NO_MEM); + + ptr->bLength = LIBUSB_DT_SS_ENDPOINT_COMPANION_SIZE; + ptr->bDescriptorType = dtype; + ptr->bMaxBurst = ((const uint8_t *)buf)[2]; + ptr->bmAttributes = ((const uint8_t *)buf)[3]; + ptr->wBytesPerInterval = ((const uint8_t *)buf)[4] | + (((const uint8_t *)buf)[5] << 8); + + *ep_comp = ptr; + + return (0); /* success */ + } + + buf = ((const uint8_t *)buf) + dlen; + len -= dlen; + } + return (LIBUSB_ERROR_IO); +} + +void +libusb_free_ss_endpoint_comp(struct libusb_ss_endpoint_companion_descriptor *ep_comp) +{ + if (ep_comp == NULL) + return; + + free(ep_comp); +} + +int +libusb_parse_bos_descriptor(const void *buf, int len, + struct libusb_bos_descriptor **bos) +{ + struct libusb_bos_descriptor *ptr; + struct libusb_usb_2_0_device_capability_descriptor *dcap_20; + struct libusb_ss_usb_device_capability_descriptor *ss_cap; + + if (buf == NULL || bos == NULL || len < 1) + return (LIBUSB_ERROR_INVALID_PARAM); + + if (len > 65535) + len = 65535; + + *bos = ptr = NULL; + + while (len != 0) { + uint8_t dlen; + uint8_t dtype; + + dlen = ((const uint8_t *)buf)[0]; + dtype = ((const uint8_t *)buf)[1]; + + if (dlen < 2 || dlen > len) + break; + + if (dlen >= LIBUSB_DT_BOS_SIZE && + dtype == LIBUSB_DT_BOS) { + + ptr = malloc(sizeof(*ptr) + sizeof(*dcap_20) + + sizeof(*ss_cap)); + + if (ptr == NULL) + return (LIBUSB_ERROR_NO_MEM); + + *bos = ptr; + + ptr->bLength = LIBUSB_DT_BOS_SIZE; + ptr->bDescriptorType = dtype; + ptr->wTotalLength = ((const uint8_t *)buf)[2] | + (((const uint8_t *)buf)[3] << 8); + ptr->bNumDeviceCapabilities = ((const uint8_t *)buf)[4]; + ptr->usb_2_0_ext_cap = NULL; + ptr->ss_usb_cap = NULL; + + dcap_20 = (void *)(ptr + 1); + ss_cap = (void *)(dcap_20 + 1); + } + if (dlen >= 3 && + ptr != NULL && + dtype == LIBUSB_DT_DEVICE_CAPABILITY) { + switch (((const uint8_t *)buf)[2]) { + case LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY: + if (ptr->usb_2_0_ext_cap != NULL) + break; + if (dlen < LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE) + break; + + ptr->usb_2_0_ext_cap = dcap_20; + + dcap_20->bLength = LIBUSB_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE; + dcap_20->bDescriptorType = dtype; + dcap_20->bDevCapabilityType = ((const uint8_t *)buf)[2]; + dcap_20->bmAttributes = ((const uint8_t *)buf)[3] | + (((const uint8_t *)buf)[4] << 8) | + (((const uint8_t *)buf)[5] << 16) | + (((const uint8_t *)buf)[6] << 24); + break; + + case LIBUSB_SS_USB_DEVICE_CAPABILITY: + if (ptr->ss_usb_cap != NULL) + break; + if (dlen < LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE) + break; + + ptr->ss_usb_cap = ss_cap; + + ss_cap->bLength = LIBUSB_SS_USB_DEVICE_CAPABILITY_SIZE; + ss_cap->bDescriptorType = dtype; + ss_cap->bDevCapabilityType = ((const uint8_t *)buf)[2]; + ss_cap->bmAttributes = ((const uint8_t *)buf)[3]; + ss_cap->wSpeedSupported = ((const uint8_t *)buf)[4] | + (((const uint8_t *)buf)[5] << 8); + ss_cap->bFunctionalitySupport = ((const uint8_t *)buf)[6]; + ss_cap->bU1DevExitLat = ((const uint8_t *)buf)[7]; + ss_cap->wU2DevExitLat = ((const uint8_t *)buf)[8] | + (((const uint8_t *)buf)[9] << 8); + break; + + default: + break; + } + } + + buf = ((const uint8_t *)buf) + dlen; + len -= dlen; + } + if (ptr != NULL) + return (0); /* success */ + + return (LIBUSB_ERROR_IO); +} + +void +libusb_free_bos_descriptor(struct libusb_bos_descriptor *bos) +{ + if (bos == NULL) + return; + + free(bos); +} Modified: stable/9/lib/libusb/libusb20_desc.c ============================================================================== --- stable/9/lib/libusb/libusb20_desc.c Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb20_desc.c Sat Dec 31 15:46:36 2011 (r229122) @@ -41,6 +41,10 @@ LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_END LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_INTERFACE_DESC); LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_CONFIG_DESC); LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_CONTROL_SETUP); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_SS_ENDPT_COMP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_USB_20_DEVCAP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_SS_USB_DEVCAP_DESC); +LIBUSB20_MAKE_STRUCT_FORMAT(LIBUSB20_BOS_DESCRIPTOR); /*------------------------------------------------------------------------* * libusb20_parse_config_desc Modified: stable/9/lib/libusb/libusb20_desc.h ============================================================================== --- stable/9/lib/libusb/libusb20_desc.h Sat Dec 31 15:43:55 2011 (r229121) +++ stable/9/lib/libusb/libusb20_desc.h Sat Dec 31 15:46:36 2011 (r229122) @@ -264,6 +264,43 @@ LIBUSB20_MAKE_STRUCT(LIBUSB20_CONFIG_DES LIBUSB20_MAKE_STRUCT(LIBUSB20_CONTROL_SETUP); +#define LIBUSB20_SS_ENDPT_COMP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bMaxBurst, ) \ + m(n, UINT8_T, bmAttributes, ) \ + m(n, UINT16_T, wBytesPerInterval, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_SS_ENDPT_COMP_DESC); + +#define LIBUSB20_USB_20_DEVCAP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bDevCapabilityType, ) \ + m(n, UINT32_T, bmAttributes, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_USB_20_DEVCAP_DESC); + +#define LIBUSB20_SS_USB_DEVCAP_DESC(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT8_T, bDevCapabilityType, ) \ + m(n, UINT8_T, bmAttributes, ) \ + m(n, UINT16_T, wSpeedSupported, ) \ + m(n, UINT8_T, bFunctionalitySupport, ) \ + m(n, UINT8_T, bU1DevExitLat, ) \ + m(n, UINT16_T, wU2DevExitLat, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_SS_USB_DEVCAP_DESC); + +#define LIBUSB20_BOS_DESCRIPTOR(m,n) \ + m(n, UINT8_T, bLength, ) \ + m(n, UINT8_T, bDescriptorType, ) \ + m(n, UINT16_T, wTotalLength, ) \ + m(n, UINT8_T, bNumDeviceCapabilities, ) \ + +LIBUSB20_MAKE_STRUCT(LIBUSB20_BOS_DESCRIPTOR); + /* standard USB stuff */ /** \ingroup desc @@ -333,6 +370,24 @@ enum libusb20_descriptor_type { /** Hub descriptor */ LIBUSB20_DT_HUB = 0x29, + + /** Binary Object Store, BOS */ + LIBUSB20_DT_BOS = 0x0f, + + /** Device Capability */ + LIBUSB20_DT_DEVICE_CAPABILITY = 0x10, + + /** SuperSpeed endpoint companion */ + LIBUSB20_DT_SS_ENDPOINT_COMPANION = 0x30, +}; + +/** \ingroup desc + * Device capability types as defined by the USB specification. */ +enum libusb20_device_capability_type { + LIBUSB20_WIRELESS_USB_DEVICE_CAPABILITY = 0x1, + LIBUSB20_USB_2_0_EXTENSION_DEVICE_CAPABILITY = 0x2, + LIBUSB20_SS_USB_DEVICE_CAPABILITY = 0x3, + LIBUSB20_CONTAINER_ID_DEVICE_CAPABILITY = 0x4, }; /* Descriptor sizes per descriptor type */ @@ -342,6 +397,10 @@ enum libusb20_descriptor_type { #define LIBUSB20_DT_ENDPOINT_SIZE 7 #define LIBUSB20_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ #define LIBUSB20_DT_HUB_NONVAR_SIZE 7 +#define LIBUSB20_DT_SS_ENDPOINT_COMPANION_SIZE 6 +#define LIBUSB20_DT_BOS_SIZE 5 +#define LIBUSB20_USB_2_0_EXTENSION_DEVICE_CAPABILITY_SIZE 7 +#define LIBUSB20_SS_USB_DEVICE_CAPABILITY_SIZE 10 #define LIBUSB20_ENDPOINT_ADDRESS_MASK 0x0f /* in bEndpointAddress */ #define LIBUSB20_ENDPOINT_DIR_MASK 0x80 From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:49:04 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB01F1065673; Sat, 31 Dec 2011 15:49:04 +0000 (UTC) (envelope-from stefanf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AF0048FC0C; Sat, 31 Dec 2011 15:49:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFn4t0071816; Sat, 31 Dec 2011 15:49:04 GMT (envelope-from stefanf@svn.freebsd.org) Received: (from stefanf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFn4pl071814; Sat, 31 Dec 2011 15:49:04 GMT (envelope-from stefanf@svn.freebsd.org) Message-Id: <201112311549.pBVFn4pl071814@svn.freebsd.org> From: Stefan Farfeleder Date: Sat, 31 Dec 2011 15:49:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229123 - stable/9/contrib/gcc/config/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:49:04 -0000 Author: stefanf Date: Sat Dec 31 15:49:04 2011 New Revision: 229123 URL: http://svn.freebsd.org/changeset/base/229123 Log: MFC r226430: Adjust posix_memalign() prototype to match what we define in stdlib.h for C++ compilation. Modified: stable/9/contrib/gcc/config/i386/pmm_malloc.h Directory Properties: stable/9/contrib/gcc/ (props changed) Modified: stable/9/contrib/gcc/config/i386/pmm_malloc.h ============================================================================== --- stable/9/contrib/gcc/config/i386/pmm_malloc.h Sat Dec 31 15:46:36 2011 (r229122) +++ stable/9/contrib/gcc/config/i386/pmm_malloc.h Sat Dec 31 15:49:04 2011 (r229123) @@ -34,7 +34,7 @@ #ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); #else -extern "C" int posix_memalign (void **, size_t, size_t) throw (); +extern "C" int posix_memalign (void **, size_t, size_t); #endif static __inline void * From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:49:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54FF21065672; Sat, 31 Dec 2011 15:49:08 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0C48FC08; Sat, 31 Dec 2011 15:49:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFn8CG071853; Sat, 31 Dec 2011 15:49:08 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFn8oc071851; Sat, 31 Dec 2011 15:49:08 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201112311549.pBVFn8oc071851@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 31 Dec 2011 15:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229124 - stable/9/lib/libusb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:49:08 -0000 Author: hselasky Date: Sat Dec 31 15:49:07 2011 New Revision: 229124 URL: http://svn.freebsd.org/changeset/base/229124 Log: MFC r228235 and r228236: Minor code simplification. No functional change. Modified: stable/9/lib/libusb/libusb10.c Directory Properties: stable/9/lib/libusb/ (props changed) Modified: stable/9/lib/libusb/libusb10.c ============================================================================== --- stable/9/lib/libusb/libusb10.c Sat Dec 31 15:49:04 2011 (r229123) +++ stable/9/lib/libusb/libusb10.c Sat Dec 31 15:49:07 2011 (r229124) @@ -417,9 +417,12 @@ libusb_open_device_with_vid_pid(libusb_c if ((i = libusb_get_device_list(ctx, &devs)) < 0) return (NULL); + pdev = NULL; for (j = 0; j < i; j++) { - pdev = devs[j]->os_priv; - pdesc = libusb20_dev_get_device_desc(pdev); + struct libusb20_device *tdev; + + tdev = devs[j]->os_priv; + pdesc = libusb20_dev_get_device_desc(tdev); /* * NOTE: The USB library will automatically swap the * fields in the device descriptor to be of host @@ -427,13 +430,10 @@ libusb_open_device_with_vid_pid(libusb_c */ if (pdesc->idVendor == vendor_id && pdesc->idProduct == product_id) { - if (libusb_open(devs[j], &pdev) < 0) - pdev = NULL; + libusb_open(devs[j], &pdev); break; } } - if (j == i) - pdev = NULL; libusb_free_device_list(devs, 1); DPRINTF(ctx, LIBUSB_DEBUG_FUNCTION, "libusb_open_device_width_vid_pid leave"); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:53:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD10D1065672; Sat, 31 Dec 2011 15:53:34 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9816A8FC16; Sat, 31 Dec 2011 15:53:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFrYCE072039; Sat, 31 Dec 2011 15:53:34 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFrYuu072035; Sat, 31 Dec 2011 15:53:34 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201112311553.pBVFrYuu072035@svn.freebsd.org> From: Marius Strobl Date: Sat, 31 Dec 2011 15:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229125 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:53:34 -0000 Author: marius Date: Sat Dec 31 15:53:34 2011 New Revision: 229125 URL: http://svn.freebsd.org/changeset/base/229125 Log: Fix header pollution, possibly unbreaking the build of cfi_bus_ixp4xx.c as part of cfi.ko. Modified: head/sys/arm/xscale/ixp425/ixdp425_pci.c head/sys/arm/xscale/ixp425/ixp425_pci.c head/sys/arm/xscale/ixp425/ixp425var.h Modified: head/sys/arm/xscale/ixp425/ixdp425_pci.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixdp425_pci.c Sat Dec 31 15:49:07 2011 (r229124) +++ head/sys/arm/xscale/ixp425/ixdp425_pci.c Sat Dec 31 15:53:34 2011 (r229125) @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include + #include #include Modified: head/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 15:49:07 2011 (r229124) +++ head/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 15:53:34 2011 (r229125) @@ -45,9 +45,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include #include #include + #include #include #include Modified: head/sys/arm/xscale/ixp425/ixp425var.h ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425var.h Sat Dec 31 15:49:07 2011 (r229124) +++ head/sys/arm/xscale/ixp425/ixp425var.h Sat Dec 31 15:53:34 2011 (r229125) @@ -44,7 +44,6 @@ #include -#include #include /* NB: cputype is setup by set_cpufuncs */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:56:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD1B6106566B; Sat, 31 Dec 2011 15:56:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B814B8FC14; Sat, 31 Dec 2011 15:56:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVFu0TY072162; Sat, 31 Dec 2011 15:56:00 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVFu0OJ072160; Sat, 31 Dec 2011 15:56:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112311556.pBVFu0OJ072160@svn.freebsd.org> From: Adrian Chadd Date: Sat, 31 Dec 2011 15:56:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229126 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:56:00 -0000 Author: adrian Date: Sat Dec 31 15:56:00 2011 New Revision: 229126 URL: http://svn.freebsd.org/changeset/base/229126 Log: Oops - this was referencing a local file, which I've done away with. Modified: head/sys/mips/conf/ROUTERSTATION Modified: head/sys/mips/conf/ROUTERSTATION ============================================================================== --- head/sys/mips/conf/ROUTERSTATION Sat Dec 31 15:53:34 2011 (r229125) +++ head/sys/mips/conf/ROUTERSTATION Sat Dec 31 15:56:00 2011 (r229126) @@ -4,7 +4,7 @@ # $FreeBSD$ # -include "UBNT_AR71XX_BASE" +include "AR71XX_BASE" ident "ROUTERSTATION" hints "ROUTERSTATION.hints" From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:58:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D0A81065672; Sat, 31 Dec 2011 15:58:22 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 2765D8FC0C; Sat, 31 Dec 2011 15:58:22 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id F368F25D37D1; Sat, 31 Dec 2011 15:58:20 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id E9AA7BD82F4; Sat, 31 Dec 2011 15:58:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id JLUdKXP-KKRG; Sat, 31 Dec 2011 15:58:18 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 7517EBD82F3; Sat, 31 Dec 2011 15:58:18 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201112311553.pBVFrYuu072035@svn.freebsd.org> Date: Sat, 31 Dec 2011 15:58:16 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201112311553.pBVFrYuu072035@svn.freebsd.org> To: Marius Strobl X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229125 - head/sys/arm/xscale/ixp425 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:58:22 -0000 On 31. Dec 2011, at 15:53 , Marius Strobl wrote: > Author: marius > Date: Sat Dec 31 15:53:34 2011 > New Revision: 229125 > URL: http://svn.freebsd.org/changeset/base/229125 >=20 > Log: > Fix header pollution, possibly unbreaking the build of = cfi_bus_ixp4xx.c > as part of cfi.ko. >=20 Thanks > Modified: > head/sys/arm/xscale/ixp425/ixdp425_pci.c > head/sys/arm/xscale/ixp425/ixp425_pci.c > head/sys/arm/xscale/ixp425/ixp425var.h >=20 > Modified: head/sys/arm/xscale/ixp425/ixdp425_pci.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/xscale/ixp425/ixdp425_pci.c Sat Dec 31 15:49:07 2011 = (r229124) > +++ head/sys/arm/xscale/ixp425/ixdp425_pci.c Sat Dec 31 15:53:34 2011 = (r229125) > @@ -43,6 +43,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > + > +#include > + > #include > #include >=20 >=20 > Modified: head/sys/arm/xscale/ixp425/ixp425_pci.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 15:49:07 2011 = (r229124) > +++ head/sys/arm/xscale/ixp425/ixp425_pci.c Sat Dec 31 15:53:34 2011 = (r229125) > @@ -45,9 +45,12 @@ __FBSDID("$FreeBSD$"); > #include > #include >=20 > +#include > + > #include > #include > #include > + > #include > #include > #include >=20 > Modified: head/sys/arm/xscale/ixp425/ixp425var.h > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/arm/xscale/ixp425/ixp425var.h Sat Dec 31 15:49:07 2011 = (r229124) > +++ head/sys/arm/xscale/ixp425/ixp425var.h Sat Dec 31 15:53:34 2011 = (r229125) > @@ -44,7 +44,6 @@ >=20 > #include >=20 > -#include > #include >=20 > /* NB: cputype is setup by set_cpufuncs */ --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:58:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA242106566B; Sat, 31 Dec 2011 15:58:33 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 798008FC0A; Sat, 31 Dec 2011 15:58:33 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id A84C225D3811; Sat, 31 Dec 2011 15:58:32 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 24E87BD82F5; Sat, 31 Dec 2011 15:58:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id xA9mcn4rJ3zG; Sat, 31 Dec 2011 15:58:31 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E07FABD82F3; Sat, 31 Dec 2011 15:58:30 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <201112311556.pBVFu0OJ072160@svn.freebsd.org> Date: Sat, 31 Dec 2011 15:58:30 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <3A152324-2628-471C-B67F-EBDD2E55E370@lists.zabbadoz.net> References: <201112311556.pBVFu0OJ072160@svn.freebsd.org> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229126 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:58:33 -0000 On 31. Dec 2011, at 15:56 , Adrian Chadd wrote: > Author: adrian > Date: Sat Dec 31 15:56:00 2011 > New Revision: 229126 > URL: http://svn.freebsd.org/changeset/base/229126 >=20 > Log: > Oops - this was referencing a local file, which I've done away with. >=20 Thanks! > Modified: > head/sys/mips/conf/ROUTERSTATION >=20 > Modified: head/sys/mips/conf/ROUTERSTATION > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/mips/conf/ROUTERSTATION Sat Dec 31 15:53:34 2011 = (r229125) > +++ head/sys/mips/conf/ROUTERSTATION Sat Dec 31 15:56:00 2011 = (r229126) > @@ -4,7 +4,7 @@ > # $FreeBSD$ > # >=20 > -include "UBNT_AR71XX_BASE" > +include "AR71XX_BASE" > ident "ROUTERSTATION" > hints "ROUTERSTATION.hints" >=20 --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 15:59:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D69C7106564A; Sat, 31 Dec 2011 15:59:33 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 6B2E28FC1E; Sat, 31 Dec 2011 15:59:33 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pBVFxVCQ059330; Sat, 31 Dec 2011 16:59:31 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pBVFxVOH059329; Sat, 31 Dec 2011 16:59:31 +0100 (CET) (envelope-from marius) Date: Sat, 31 Dec 2011 16:59:31 +0100 From: Marius Strobl To: "Bjoern A. Zeeb" Message-ID: <20111231155931.GH90831@alchemy.franken.de> References: <201112302122.pBULMAuS031216@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229032 - head/sys/modules/cfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 15:59:33 -0000 On Sat, Dec 31, 2011 at 02:05:40PM +0000, Bjoern A. Zeeb wrote: > > On 30. Dec 2011, at 21:22 , Marius Strobl wrote: > > > Author: marius > > Date: Fri Dec 30 21:22:10 2011 > > New Revision: 229032 > > URL: http://svn.freebsd.org/changeset/base/229032 > > > > Log: > > Add header required by cfi_bus_fdt.c. > > > > Modified: > > head/sys/modules/cfi/Makefile > > > > This (most likely) broke at least the arm KB920X config: > > In file included from @/arm/xscale/ixp425/ixp425var.h:47, > from /scratch/tmp/bz/head.universe/sys/modules/cfi/../../dev/cfi/cfi_bus_ixp4xx.c:45: > @/dev/pci/pcivar.h:219:20: error: pci_if.h: No such file or directory > mkdep: compile failed > It didn't, the original r228981 just reveals a problem with ixp425var.h. The funny thing is that while it's pretty much clear from your above snippet what's going on I can't reproduce this, also not part of an universe build and apparently also not the tinderbox. I tried to fix this in r229125, however given that I wasn't able to reproduce this problem I'm not sure that will also fix the build for you. Marius From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 16:12:43 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69447106566B; Sat, 31 Dec 2011 16:12:43 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 0393E8FC18; Sat, 31 Dec 2011 16:12:42 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 095722A28E52; Sat, 31 Dec 2011 17:12:42 +0100 (CET) Date: Sat, 31 Dec 2011 17:12:41 +0100 From: Ed Schouten To: Gleb Kurtsou Message-ID: <20111231161241.GX1895@hoeg.nl> References: <201112311312.pBVDCBja064475@svn.freebsd.org> <20111231140027.GA3487@reks> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8f0Rp8CLSOFvlIcd" Content-Disposition: inline In-Reply-To: <20111231140027.GA3487@reks> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Gabor Kovesdan , svn-src-stable-9@freebsd.org Subject: Re: svn commit: r229081 - stable/9/usr.bin/grep X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 16:12:43 -0000 --8f0Rp8CLSOFvlIcd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Gleb Kurtsou , 20111231 15:00: > Is there a reason we need all this mess is the first place? 12 grep links= under > /usr/bin. Why not to make zgrep handle all compression types. Tranparent > compression handling in tar was a great success. +1. --=20 Ed Schouten WWW: http://80386.nl/ --8f0Rp8CLSOFvlIcd Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJO/zR5AAoJEG5e2P40kaK7xxMP/0RhUZuRPpcBq/eVrAhCB685 J2PxBMZUGXvJ+ChTEyJ2uVtH5qsseFbf1h33mq/MmymGPQ4mpLkmVowEw2fGAB0W FeamJkSmofA9Lq7v1jC5r5Xe53LRhPPCjQyVNQx+vsCv0ha85hd6p6cQhDYyr5C8 Q8Uh+2yzH/MUoHbbR70gT4GA/Zui13rECaAj38pGjg5C9iulF6U39MoyCfvSe8C3 NqZ2g8dH0jk0oQqll+Yp/R0cHD3cPC6z1JfTFkk89CXiJOVUQ5OYLL8B8gpvrBP8 86JNG3LM1lUvpoEoit3SiGxdtn1oj5wXjruS6PcKZvgdDDMbcep5NzkIZSEmz3s3 VgRo/TerRK8iiH7RFRjL0LE4K90XUkuTXqBOVMVJnhbspSCKCglmoBNVzxrFLydQ X5e5VhU2ciH99cLOrU2KybIVZwDzDElMLQ5ztby0zhMt6kzWdX/6waQb3BCoftSU MHP2QSHUMj6breLBp6z71iJX1RCndRu7TEYn7bcf9Hm1u99ekSM6Lw4lMEX6L4IU A+4TIjlekkLjOELWRwNC10U9tu/So53yErAguAF1GxiVJfyCzTa902PbjhX+luVP KV2sVOjc+l6l3/4C+EyYsZ3XP7yPMDIGRQ93JWTjCc277fez1l1sNUK6n5FZGktn cRXUCd2FR6eR5RSS4nbW =jr6j -----END PGP SIGNATURE----- --8f0Rp8CLSOFvlIcd-- From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 16:19:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0488B1065675; Sat, 31 Dec 2011 16:19:23 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E38508FC12; Sat, 31 Dec 2011 16:19:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVGJMPG072893; Sat, 31 Dec 2011 16:19:22 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVGJM9A072891; Sat, 31 Dec 2011 16:19:22 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201112311619.pBVGJM9A072891@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 31 Dec 2011 16:19:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229127 - head/sys/netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 16:19:23 -0000 Author: bz Date: Sat Dec 31 16:19:22 2011 New Revision: 229127 URL: http://svn.freebsd.org/changeset/base/229127 Log: Remove a declaration to a non-existent function. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/sys/netinet6/scope6_var.h Modified: head/sys/netinet6/scope6_var.h ============================================================================== --- head/sys/netinet6/scope6_var.h Sat Dec 31 15:56:00 2011 (r229126) +++ head/sys/netinet6/scope6_var.h Sat Dec 31 16:19:22 2011 (r229127) @@ -49,7 +49,6 @@ int scope6_set __P((struct ifnet *, stru int scope6_get __P((struct ifnet *, struct scope6_id *)); void scope6_setdefault __P((struct ifnet *)); int scope6_get_default __P((struct scope6_id *)); -u_int32_t scope6_in6_addrscope __P((struct in6_addr *)); u_int32_t scope6_addr2default __P((struct in6_addr *)); int sa6_embedscope __P((struct sockaddr_in6 *, int)); int sa6_recoverscope __P((struct sockaddr_in6 *)); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 16:26:08 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A74C2106566B; Sat, 31 Dec 2011 16:26:08 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 57B428FC12; Sat, 31 Dec 2011 16:26:08 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 12B6E25D3810; Sat, 31 Dec 2011 16:26:06 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 50BFFBD82F8; Sat, 31 Dec 2011 16:26:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 6xu6+WFh+NO5; Sat, 31 Dec 2011 16:26:05 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1B4A2BD82F6; Sat, 31 Dec 2011 16:26:05 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <20111231155931.GH90831@alchemy.franken.de> Date: Sat, 31 Dec 2011 16:26:04 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201112302122.pBULMAuS031216@svn.freebsd.org> <20111231155931.GH90831@alchemy.franken.de> To: Marius Strobl X-Mailer: Apple Mail (2.1084) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229032 - head/sys/modules/cfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 16:26:08 -0000 On 31. Dec 2011, at 15:59 , Marius Strobl wrote: > On Sat, Dec 31, 2011 at 02:05:40PM +0000, Bjoern A. Zeeb wrote: >>=20 >> On 30. Dec 2011, at 21:22 , Marius Strobl wrote: >>=20 >>> Author: marius >>> Date: Fri Dec 30 21:22:10 2011 >>> New Revision: 229032 >>> URL: http://svn.freebsd.org/changeset/base/229032 >>>=20 >>> Log: >>> Add header required by cfi_bus_fdt.c. >>>=20 >>> Modified: >>> head/sys/modules/cfi/Makefile >>>=20 >>=20 >> This (most likely) broke at least the arm KB920X config: >>=20 >> In file included from @/arm/xscale/ixp425/ixp425var.h:47, >> from = /scratch/tmp/bz/head.universe/sys/modules/cfi/../../dev/cfi/cfi_bus_ixp4xx= .c:45: >> @/dev/pci/pcivar.h:219:20: error: pci_if.h: No such file or directory >> mkdep: compile failed >>=20 >=20 > It didn't, the original r228981 just reveals a problem with = ixp425var.h. > The funny thing is that while it's pretty much clear from your above > snippet what's going on I can't reproduce this, also not part of an > universe build and apparently also not the tinderbox. The tinderbox does not build it if you look at the details;-) The above is from a make universe (or as I want the errors at the end = tinderbox, which is a horrible name foe that feature still): /usr/bin/time make -s -j16 __MAKE_CONF=3D/dev/null SRCCONF=3D/dev/null = tinderbox > I tried to fix > this in r229125, however given that I wasn't able to reproduce this > problem I'm not sure that will also fix the build for you. I'll let you know tomorrow, when the next build has finished. Guten Rutsch! /bz --=20 Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do!= From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 16:32:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09FBF106564A; Sat, 31 Dec 2011 16:32:27 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E5AA48FC13; Sat, 31 Dec 2011 16:32:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVGWQUL073338; Sat, 31 Dec 2011 16:32:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVGWQtC073336; Sat, 31 Dec 2011 16:32:26 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311632.pBVGWQtC073336@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 16:32:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229128 - stable/9/contrib/telnet/libtelnet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 16:32:27 -0000 Author: dim Date: Sat Dec 31 16:32:26 2011 New Revision: 229128 URL: http://svn.freebsd.org/changeset/base/229128 Log: MFC r228559: In contrib/telnet/libtelnet/sra.c, use the correct number of bytes to zero the password buffer. Modified: stable/9/contrib/telnet/libtelnet/sra.c Directory Properties: stable/9/contrib/telnet/ (props changed) Modified: stable/9/contrib/telnet/libtelnet/sra.c ============================================================================== --- stable/9/contrib/telnet/libtelnet/sra.c Sat Dec 31 16:19:22 2011 (r229127) +++ stable/9/contrib/telnet/libtelnet/sra.c Sat Dec 31 16:32:26 2011 (r229128) @@ -303,7 +303,7 @@ sra_reply(Authenticator *ap, unsigned ch goto enc_user; } /* encode password */ - memset(pass,0,sizeof(pass)); + memset(pass,0,256); telnet_gets("Password: ",pass,255,0); pk_encode(pass,xpass,&ck); /* send it off */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 16:48:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C78D106566C; Sat, 31 Dec 2011 16:48:33 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id 738C88FC13; Sat, 31 Dec 2011 16:48:32 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id pBVGmVnY059578; Sat, 31 Dec 2011 17:48:31 +0100 (CET) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id pBVGmVrA059577; Sat, 31 Dec 2011 17:48:31 +0100 (CET) (envelope-from marius) Date: Sat, 31 Dec 2011 17:48:31 +0100 From: Marius Strobl To: "Bjoern A. Zeeb" Message-ID: <20111231164830.GI90831@alchemy.franken.de> References: <201112302122.pBULMAuS031216@svn.freebsd.org> <20111231155931.GH90831@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r229032 - head/sys/modules/cfi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 16:48:33 -0000 On Sat, Dec 31, 2011 at 04:26:04PM +0000, Bjoern A. Zeeb wrote: > > On 31. Dec 2011, at 15:59 , Marius Strobl wrote: > > > On Sat, Dec 31, 2011 at 02:05:40PM +0000, Bjoern A. Zeeb wrote: > >> > >> On 30. Dec 2011, at 21:22 , Marius Strobl wrote: > >> > >>> Author: marius > >>> Date: Fri Dec 30 21:22:10 2011 > >>> New Revision: 229032 > >>> URL: http://svn.freebsd.org/changeset/base/229032 > >>> > >>> Log: > >>> Add header required by cfi_bus_fdt.c. > >>> > >>> Modified: > >>> head/sys/modules/cfi/Makefile > >>> > >> > >> This (most likely) broke at least the arm KB920X config: > >> > >> In file included from @/arm/xscale/ixp425/ixp425var.h:47, > >> from /scratch/tmp/bz/head.universe/sys/modules/cfi/../../dev/cfi/cfi_bus_ixp4xx.c:45: > >> @/dev/pci/pcivar.h:219:20: error: pci_if.h: No such file or directory > >> mkdep: compile failed > >> > > > > It didn't, the original r228981 just reveals a problem with ixp425var.h. > > The funny thing is that while it's pretty much clear from your above > > snippet what's going on I can't reproduce this, also not part of an > > universe build and apparently also not the tinderbox. > > The tinderbox does not build it if you look at the details;-) I was referring to the absence of any new breakage report by the tinderbox after r229032, which IMO should have occurred by now. > > The above is from a make universe (or as I want the errors at the end tinderbox, > which is a horrible name foe that feature still): > > /usr/bin/time make -s -j16 __MAKE_CONF=/dev/null SRCCONF=/dev/null tinderbox > > > > > I tried to fix > > this in r229125, however given that I wasn't able to reproduce this > > problem I'm not sure that will also fix the build for you. > > I'll let you know tomorrow, when the next build has finished. > > Guten Rutsch! > Dir auch! Gruesse aus Leipzig, Marius From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 17:14:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8C0F106564A; Sat, 31 Dec 2011 17:14:56 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C2F938FC17; Sat, 31 Dec 2011 17:14:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVHEumE074692; Sat, 31 Dec 2011 17:14:56 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVHEuFR074690; Sat, 31 Dec 2011 17:14:56 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311714.pBVHEuFR074690@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 17:14:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229129 - stable/9/lib/libthread_db X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 17:14:57 -0000 Author: dim Date: Sat Dec 31 17:14:56 2011 New Revision: 229129 URL: http://svn.freebsd.org/changeset/base/229129 Log: MFC r228578 In lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrect warnings about alignment, so turn -Wcast-align off for now. Modified: stable/9/lib/libthread_db/Makefile Directory Properties: stable/9/lib/libthread_db/ (props changed) Modified: stable/9/lib/libthread_db/Makefile ============================================================================== --- stable/9/lib/libthread_db/Makefile Sat Dec 31 16:32:26 2011 (r229128) +++ stable/9/lib/libthread_db/Makefile Sat Dec 31 17:14:56 2011 (r229129) @@ -16,4 +16,10 @@ SYM_MAPS+=${.CURDIR}/Symbol.map SYMBOL_MAPS=${SYM_MAPS} VERSION_DEF=${.CURDIR}/../libc/Versions.def +.if ${CC:T:Mclang} == "clang" +# Unfortunately, clang gives an incorrect warning about alignment in +# arch/i386/libpthread_md.c, so turn that off for now. +NO_WCAST_ALIGN= +.endif + .include From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 17:56:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4915D106564A; Sat, 31 Dec 2011 17:56:06 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 332D08FC08; Sat, 31 Dec 2011 17:56:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVHu68c075892; Sat, 31 Dec 2011 17:56:06 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVHu5N3075890; Sat, 31 Dec 2011 17:56:06 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201112311756.pBVHu5N3075890@svn.freebsd.org> From: Peter Holm Date: Sat, 31 Dec 2011 17:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229130 - stable/9/sys/fs/tmpfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 17:56:06 -0000 Author: pho Date: Sat Dec 31 17:56:05 2011 New Revision: 229130 URL: http://svn.freebsd.org/changeset/base/229130 Log: MFC: r226987 Added missing cache purge of from argument for rename(). Modified: stable/9/sys/fs/tmpfs/tmpfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) Modified: stable/9/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/9/sys/fs/tmpfs/tmpfs_vnops.c Sat Dec 31 17:14:56 2011 (r229129) +++ stable/9/sys/fs/tmpfs/tmpfs_vnops.c Sat Dec 31 17:56:05 2011 (r229130) @@ -1138,6 +1138,7 @@ tmpfs_rename(struct vop_rename_args *v) * really reclaimed. */ tmpfs_free_dirent(VFS_TO_TMPFS(tvp->v_mount), de, TRUE); } + cache_purge(fvp); error = 0; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 18:09:32 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FBF4106566C; Sat, 31 Dec 2011 18:09:32 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78F748FC08; Sat, 31 Dec 2011 18:09:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVI9W7k076430; Sat, 31 Dec 2011 18:09:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVI9Wgu076427; Sat, 31 Dec 2011 18:09:32 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201112311809.pBVI9Wgu076427@svn.freebsd.org> From: Nathan Whitehorn Date: Sat, 31 Dec 2011 18:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229131 - in stable/9: lib/clang share/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 18:09:32 -0000 Author: nwhitehorn Date: Sat Dec 31 18:09:31 2011 New Revision: 229131 URL: http://svn.freebsd.org/changeset/base/229131 Log: MFC r227775: Connect LLVM/clang to the build on powerpc64. After the binutils 2.17.50 import, it works without issue. Modified: stable/9/lib/clang/clang.build.mk stable/9/share/mk/bsd.own.mk Directory Properties: stable/9/lib/clang/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/lib/clang/clang.build.mk ============================================================================== --- stable/9/lib/clang/clang.build.mk Sat Dec 31 17:56:05 2011 (r229130) +++ stable/9/lib/clang/clang.build.mk Sat Dec 31 18:09:31 2011 (r229131) @@ -9,7 +9,7 @@ CFLAGS+=-I${LLVM_SRCS}/include -I${CLANG -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS #-DNDEBUG # Correct for gcc miscompilation when compiling on PPC with -O2 -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" CFLAGS+= -O1 .endif Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Sat Dec 31 17:56:05 2011 (r229130) +++ stable/9/share/mk/bsd.own.mk Sat Dec 31 18:09:31 2011 (r229131) @@ -428,14 +428,14 @@ __T=${TARGET_ARCH} .else __T=${MACHINE_ARCH} .endif -# Clang is only for x86 and 32-bit powerpc right now, by default. -.if ${__T} == "amd64" || ${__T} == "i386" || ${__T} == "powerpc" +# Clang is only for x86 and powerpc right now, by default. +.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=CLANG .else __DEFAULT_NO_OPTIONS+=CLANG .endif -# FDT is needed only for arm and powerpc (and not powerpc64) -.if ${__T} == "arm" || ${__T} == "armeb" || ${__T} == "powerpc" +# FDT is needed only for arm and powerpc +.if ${__T:Marm*} || ${__T:Mpowerpc*} __DEFAULT_YES_OPTIONS+=FDT .else __DEFAULT_NO_OPTIONS+=FDT From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 18:41:30 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 62B091065672; Sat, 31 Dec 2011 18:41:30 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 495E48FC1C; Sat, 31 Dec 2011 18:41:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVIfUju077425; Sat, 31 Dec 2011 18:41:30 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVIfUsl077423; Sat, 31 Dec 2011 18:41:30 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112311841.pBVIfUsl077423@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 18:41:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229132 - stable/7/sys/cam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 18:41:30 -0000 Author: mdf Date: Sat Dec 31 18:41:29 2011 New Revision: 229132 URL: http://svn.freebsd.org/changeset/base/229132 Log: MFC r228442: Do not use the sometimes-reserved word 'bool' for a variable name. This is a direct commit since the file name has changed. Modified: stable/7/sys/cam/cam_xpt.c Modified: stable/7/sys/cam/cam_xpt.c ============================================================================== --- stable/7/sys/cam/cam_xpt.c Sat Dec 31 18:09:31 2011 (r229131) +++ stable/7/sys/cam/cam_xpt.c Sat Dec 31 18:41:29 2011 (r229132) @@ -6439,14 +6439,14 @@ xpt_find_quirk(struct cam_ed *device) static int sysctl_cam_search_luns(SYSCTL_HANDLER_ARGS) { - int error, bool; + int error, val; - bool = cam_srch_hi; - error = sysctl_handle_int(oidp, &bool, 0, req); + val = cam_srch_hi; + error = sysctl_handle_int(oidp, &val, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (bool == 0 || bool == 1) { - cam_srch_hi = bool; + if (val == 0 || val == 1) { + cam_srch_hi = val; return (0); } else { return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 18:49:46 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEF85106564A; Sat, 31 Dec 2011 18:49:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A7C918FC13; Sat, 31 Dec 2011 18:49:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVInk5r077713; Sat, 31 Dec 2011 18:49:46 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVInkw3077711; Sat, 31 Dec 2011 18:49:46 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311849.pBVInkw3077711@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 18:49:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229133 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 18:49:46 -0000 Author: dim Date: Sat Dec 31 18:49:46 2011 New Revision: 229133 URL: http://svn.freebsd.org/changeset/base/229133 Log: MFC r228579: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c, some uint64_t values are snprintf'd using %llx. On amd64, uint64_t is typedef'd as unsigned long, so cast the values to u_longlong_t, as is done similarly in the rest of the file. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Dec 31 18:41:29 2011 (r229132) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Dec 31 18:49:46 2011 (r229133) @@ -873,7 +873,7 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE * if (pc > sym.st_value) { (void) snprintf(c, sizeof (c), "%s`%s+0x%llx", dts.dts_object, dts.dts_name, - pc - sym.st_value); + (u_longlong_t)(pc - sym.st_value)); } else { (void) snprintf(c, sizeof (c), "%s`%s", dts.dts_object, dts.dts_name); @@ -886,9 +886,10 @@ dt_print_stack(dtrace_hdl_t *dtp, FILE * */ if (dtrace_lookup_by_addr(dtp, pc, NULL, &dts) == 0) { (void) snprintf(c, sizeof (c), "%s`0x%llx", - dts.dts_object, pc); + dts.dts_object, (u_longlong_t)pc); } else { - (void) snprintf(c, sizeof (c), "0x%llx", pc); + (void) snprintf(c, sizeof (c), "0x%llx", + (u_longlong_t)pc); } } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 18:53:11 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC7E8106566C; Sat, 31 Dec 2011 18:53:11 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A5A318FC0C; Sat, 31 Dec 2011 18:53:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVIrBOx077864; Sat, 31 Dec 2011 18:53:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVIrBFK077862; Sat, 31 Dec 2011 18:53:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311853.pBVIrBFK077862@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 18:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229134 - stable/9/cddl/contrib/opensolaris/lib/libdtrace/common X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 18:53:11 -0000 Author: dim Date: Sat Dec 31 18:53:11 2011 New Revision: 229134 URL: http://svn.freebsd.org/changeset/base/229134 Log: MFC r228580: In cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c, some uint64_t values are snprintf'd using %llx. On amd64, uint64_t is typedef'd as unsigned long, so cast the values to u_longlong_t, as is done similarly in the rest of the file. Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Dec 31 18:49:46 2011 (r229133) +++ stable/9/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Dec 31 18:53:11 2011 (r229134) @@ -335,7 +335,8 @@ dt_handle_cpudrop(dtrace_hdl_t *dtp, pro } (void) snprintf(s, size, "%llu %sdrop%s on CPU %d\n", - howmany, what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ", + (u_longlong_t)howmany, + what == DTRACEDROP_PRINCIPAL ? "" : "aggregation ", howmany > 1 ? "s" : "", cpu); if (dtp->dt_drophdlr == NULL) @@ -427,7 +428,8 @@ dt_handle_status(dtrace_hdl_t *dtp, dtra size = sizeof (str); } - (void) snprintf(s, size, "%llu %s%s%s\n", nval - oval, + (void) snprintf(s, size, "%llu %s%s%s\n", + (u_longlong_t)(nval - oval), _dt_droptab[i].dtdrt_str, (nval - oval > 1) ? "s" : "", _dt_droptab[i].dtdrt_msg != NULL ? _dt_droptab[i].dtdrt_msg : ""); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:01:50 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0983B1065677; Sat, 31 Dec 2011 19:01:50 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E3CA38FC17; Sat, 31 Dec 2011 19:01:49 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJ1nnN078238; Sat, 31 Dec 2011 19:01:49 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJ1nwW078177; Sat, 31 Dec 2011 19:01:49 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201112311901.pBVJ1nwW078177@svn.freebsd.org> From: Ed Schouten Date: Sat, 31 Dec 2011 19:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229135 - in head: contrib/compiler-rt contrib/compiler-rt/lib contrib/compiler-rt/lib/arm contrib/compiler-rt/lib/ppc contrib/compiler-rt/lib/x86_64 lib/libcompiler_rt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:01:50 -0000 Author: ed Date: Sat Dec 31 19:01:48 2011 New Revision: 229135 URL: http://svn.freebsd.org/changeset/base/229135 Log: Upgrade libcompiler_rt to upstream revision 147390. This version of libcompiler_rt adds support for __mulo[sdt]i4(), which computes a multiply and its overflow flag. There are also a lot of cleanup fixes to headers that don't really affect us. Updating to this revision should make it a bit easier to contribute changes back to the LLVM developers. Added: head/contrib/compiler-rt/lib/int_endianness.h - copied unchanged from r229109, vendor/compiler-rt/dist/lib/int_endianness.h head/contrib/compiler-rt/lib/int_math.h - copied unchanged from r229109, vendor/compiler-rt/dist/lib/int_math.h head/contrib/compiler-rt/lib/int_types.h - copied unchanged from r229109, vendor/compiler-rt/dist/lib/int_types.h head/contrib/compiler-rt/lib/int_util.c - copied unchanged from r229109, vendor/compiler-rt/dist/lib/int_util.c head/contrib/compiler-rt/lib/int_util.h - copied unchanged from r229109, vendor/compiler-rt/dist/lib/int_util.h head/contrib/compiler-rt/lib/mulodi4.c - copied unchanged from r229109, vendor/compiler-rt/dist/lib/mulodi4.c head/contrib/compiler-rt/lib/mulosi4.c - copied unchanged from r229109, vendor/compiler-rt/dist/lib/mulosi4.c head/contrib/compiler-rt/lib/muloti4.c - copied unchanged from r229109, vendor/compiler-rt/dist/lib/muloti4.c Deleted: head/contrib/compiler-rt/lib/abi.h head/contrib/compiler-rt/lib/apple_versioning.c head/contrib/compiler-rt/lib/endianness.h Modified: head/contrib/compiler-rt/LICENSE.TXT head/contrib/compiler-rt/README.txt head/contrib/compiler-rt/lib/absvdi2.c head/contrib/compiler-rt/lib/absvsi2.c head/contrib/compiler-rt/lib/absvti2.c head/contrib/compiler-rt/lib/adddf3.c head/contrib/compiler-rt/lib/addsf3.c head/contrib/compiler-rt/lib/addvdi3.c head/contrib/compiler-rt/lib/addvsi3.c head/contrib/compiler-rt/lib/addvti3.c head/contrib/compiler-rt/lib/arm/adddf3vfp.S head/contrib/compiler-rt/lib/arm/addsf3vfp.S head/contrib/compiler-rt/lib/arm/divdf3vfp.S head/contrib/compiler-rt/lib/arm/divsf3vfp.S head/contrib/compiler-rt/lib/arm/eqdf2vfp.S head/contrib/compiler-rt/lib/arm/eqsf2vfp.S head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S head/contrib/compiler-rt/lib/arm/fixdfsivfp.S head/contrib/compiler-rt/lib/arm/fixsfsivfp.S head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S head/contrib/compiler-rt/lib/arm/floatsidfvfp.S head/contrib/compiler-rt/lib/arm/floatsisfvfp.S head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S head/contrib/compiler-rt/lib/arm/gedf2vfp.S head/contrib/compiler-rt/lib/arm/gesf2vfp.S head/contrib/compiler-rt/lib/arm/gtdf2vfp.S head/contrib/compiler-rt/lib/arm/gtsf2vfp.S head/contrib/compiler-rt/lib/arm/ledf2vfp.S head/contrib/compiler-rt/lib/arm/lesf2vfp.S head/contrib/compiler-rt/lib/arm/ltdf2vfp.S head/contrib/compiler-rt/lib/arm/ltsf2vfp.S head/contrib/compiler-rt/lib/arm/muldf3vfp.S head/contrib/compiler-rt/lib/arm/mulsf3vfp.S head/contrib/compiler-rt/lib/arm/nedf2vfp.S head/contrib/compiler-rt/lib/arm/negdf2vfp.S head/contrib/compiler-rt/lib/arm/negsf2vfp.S head/contrib/compiler-rt/lib/arm/nesf2vfp.S head/contrib/compiler-rt/lib/arm/subdf3vfp.S head/contrib/compiler-rt/lib/arm/subsf3vfp.S head/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S head/contrib/compiler-rt/lib/arm/unorddf2vfp.S head/contrib/compiler-rt/lib/arm/unordsf2vfp.S head/contrib/compiler-rt/lib/ashldi3.c head/contrib/compiler-rt/lib/ashrdi3.c head/contrib/compiler-rt/lib/assembly.h head/contrib/compiler-rt/lib/clear_cache.c head/contrib/compiler-rt/lib/clzdi2.c head/contrib/compiler-rt/lib/clzsi2.c head/contrib/compiler-rt/lib/cmpdi2.c head/contrib/compiler-rt/lib/ctzdi2.c head/contrib/compiler-rt/lib/ctzsi2.c head/contrib/compiler-rt/lib/divdc3.c head/contrib/compiler-rt/lib/divdf3.c head/contrib/compiler-rt/lib/divdi3.c head/contrib/compiler-rt/lib/divmoddi4.c head/contrib/compiler-rt/lib/divmodsi4.c head/contrib/compiler-rt/lib/divsc3.c head/contrib/compiler-rt/lib/divsf3.c head/contrib/compiler-rt/lib/divsi3.c head/contrib/compiler-rt/lib/divxc3.c head/contrib/compiler-rt/lib/enable_execute_stack.c head/contrib/compiler-rt/lib/eprintf.c head/contrib/compiler-rt/lib/extendsfdf2.c head/contrib/compiler-rt/lib/ffsdi2.c head/contrib/compiler-rt/lib/fixdfdi.c head/contrib/compiler-rt/lib/fixdfsi.c head/contrib/compiler-rt/lib/fixsfdi.c head/contrib/compiler-rt/lib/fixsfsi.c head/contrib/compiler-rt/lib/fixunsdfdi.c head/contrib/compiler-rt/lib/fixunsdfsi.c head/contrib/compiler-rt/lib/fixunssfdi.c head/contrib/compiler-rt/lib/fixunssfsi.c head/contrib/compiler-rt/lib/floatdidf.c head/contrib/compiler-rt/lib/floatdisf.c head/contrib/compiler-rt/lib/floatsidf.c head/contrib/compiler-rt/lib/floatsisf.c head/contrib/compiler-rt/lib/floattidf.c head/contrib/compiler-rt/lib/floattisf.c head/contrib/compiler-rt/lib/floattixf.c head/contrib/compiler-rt/lib/floatundidf.c head/contrib/compiler-rt/lib/floatundisf.c head/contrib/compiler-rt/lib/floatunsidf.c head/contrib/compiler-rt/lib/floatunsisf.c head/contrib/compiler-rt/lib/floatuntidf.c head/contrib/compiler-rt/lib/floatuntisf.c head/contrib/compiler-rt/lib/floatuntixf.c head/contrib/compiler-rt/lib/fp_lib.h head/contrib/compiler-rt/lib/gcc_personality_v0.c head/contrib/compiler-rt/lib/int_lib.h head/contrib/compiler-rt/lib/lshrdi3.c head/contrib/compiler-rt/lib/moddi3.c head/contrib/compiler-rt/lib/modsi3.c head/contrib/compiler-rt/lib/muldc3.c head/contrib/compiler-rt/lib/muldf3.c head/contrib/compiler-rt/lib/muldi3.c head/contrib/compiler-rt/lib/mulsc3.c head/contrib/compiler-rt/lib/mulsf3.c head/contrib/compiler-rt/lib/mulvdi3.c head/contrib/compiler-rt/lib/mulvsi3.c head/contrib/compiler-rt/lib/mulvti3.c head/contrib/compiler-rt/lib/mulxc3.c head/contrib/compiler-rt/lib/negdf2.c head/contrib/compiler-rt/lib/negsf2.c head/contrib/compiler-rt/lib/negvdi2.c head/contrib/compiler-rt/lib/negvsi2.c head/contrib/compiler-rt/lib/negvti2.c head/contrib/compiler-rt/lib/paritydi2.c head/contrib/compiler-rt/lib/paritysi2.c head/contrib/compiler-rt/lib/popcountdi2.c head/contrib/compiler-rt/lib/popcountsi2.c head/contrib/compiler-rt/lib/powidf2.c head/contrib/compiler-rt/lib/powisf2.c head/contrib/compiler-rt/lib/ppc/DD.h head/contrib/compiler-rt/lib/ppc/divtc3.c head/contrib/compiler-rt/lib/ppc/fixtfdi.c head/contrib/compiler-rt/lib/ppc/fixunstfdi.c head/contrib/compiler-rt/lib/ppc/floatditf.c head/contrib/compiler-rt/lib/ppc/floatunditf.c head/contrib/compiler-rt/lib/ppc/multc3.c head/contrib/compiler-rt/lib/subdf3.c head/contrib/compiler-rt/lib/subsf3.c head/contrib/compiler-rt/lib/subvdi3.c head/contrib/compiler-rt/lib/subvsi3.c head/contrib/compiler-rt/lib/subvti3.c head/contrib/compiler-rt/lib/trampoline_setup.c head/contrib/compiler-rt/lib/truncdfsf2.c head/contrib/compiler-rt/lib/ucmpdi2.c head/contrib/compiler-rt/lib/udivdi3.c head/contrib/compiler-rt/lib/udivmoddi4.c head/contrib/compiler-rt/lib/udivmodsi4.c head/contrib/compiler-rt/lib/udivmodti4.c head/contrib/compiler-rt/lib/udivsi3.c head/contrib/compiler-rt/lib/umoddi3.c head/contrib/compiler-rt/lib/umodsi3.c head/contrib/compiler-rt/lib/x86_64/floatdidf.c head/contrib/compiler-rt/lib/x86_64/floatdisf.c head/contrib/compiler-rt/lib/x86_64/floatdixf.c head/lib/libcompiler_rt/Makefile Directory Properties: head/contrib/compiler-rt/ (props changed) Modified: head/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- head/contrib/compiler-rt/LICENSE.TXT Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/LICENSE.TXT Sat Dec 31 19:01:48 2011 (r229135) @@ -74,3 +74,25 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE F 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. + +============================================================================== +Copyrights and Licenses for Third Party Software Distributed with LLVM: +============================================================================== +The LLVM software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the LLVM Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- +sysinfo lib/asan/sysinfo +mach_override lib/asan/mach_override Modified: head/contrib/compiler-rt/README.txt ============================================================================== --- head/contrib/compiler-rt/README.txt Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/README.txt Sat Dec 31 19:01:48 2011 (r229135) @@ -106,6 +106,15 @@ si_int __mulvsi3(si_int a, si_int b); / di_int __mulvdi3(di_int a, di_int b); // a * b ti_int __mulvti3(ti_int a, ti_int b); // a * b + +// Integral arithmetic which returns if overflow + +si_int __mulosi4(si_int a, si_int b, int* overflow); // a * b, overflow set to one if result not in signed range +di_int __mulodi4(di_int a, di_int b, int* overflow); // a * b, overflow set to one if result not in signed range +ti_int __muloti4(ti_int a, ti_int b, int* overflow); // a * b, overflow set to + one if result not in signed range + + // Integral comparison: a < b -> 0 // a == b -> 1 // a > b -> 2 Modified: head/contrib/compiler-rt/lib/absvdi2.c ============================================================================== --- head/contrib/compiler-rt/lib/absvdi2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/absvdi2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,10 +11,8 @@ * *===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: absolute value */ Modified: head/contrib/compiler-rt/lib/absvsi2.c ============================================================================== --- head/contrib/compiler-rt/lib/absvsi2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/absvsi2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,10 +11,8 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: absolute value */ Modified: head/contrib/compiler-rt/lib/absvti2.c ============================================================================== --- head/contrib/compiler-rt/lib/absvti2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/absvti2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -15,7 +15,6 @@ #if __x86_64 #include "int_lib.h" -#include /* Returns: absolute value */ Modified: head/contrib/compiler-rt/lib/adddf3.c ============================================================================== --- head/contrib/compiler-rt/lib/adddf3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/adddf3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#include "abi.h" - #define DOUBLE_PRECISION #include "fp_lib.h" Modified: head/contrib/compiler-rt/lib/addsf3.c ============================================================================== --- head/contrib/compiler-rt/lib/addsf3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/addsf3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -12,8 +12,6 @@ // //===----------------------------------------------------------------------===// -#include "abi.h" - #define SINGLE_PRECISION #include "fp_lib.h" Modified: head/contrib/compiler-rt/lib/addvdi3.c ============================================================================== --- head/contrib/compiler-rt/lib/addvdi3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/addvdi3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,10 +11,8 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: a + b */ Modified: head/contrib/compiler-rt/lib/addvsi3.c ============================================================================== --- head/contrib/compiler-rt/lib/addvsi3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/addvsi3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,10 +11,8 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" -#include /* Returns: a + b */ Modified: head/contrib/compiler-rt/lib/addvti3.c ============================================================================== --- head/contrib/compiler-rt/lib/addvti3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/addvti3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -15,7 +15,6 @@ #if __x86_64 #include "int_lib.h" -#include /* Returns: a + b */ Modified: head/contrib/compiler-rt/lib/arm/adddf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/adddf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/adddf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,10 +15,11 @@ // Adds two double precision floating point numbers using the Darwin // calling convention where double arguments are passsed in GPR pairs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__adddf3vfp) - fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6 - fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7 - faddd d6, d6, d7 - fmrrd r0, r1, d6 // move result back to r0/r1 pair + vmov d6, r0, r1 // move first param from r0/r1 pair into d6 + vmov d7, r2, r3 // move second param from r2/r3 pair into d7 + vadd.f64 d6, d6, d7 + vmov r0, r1, d6 // move result back to r0/r1 pair bx lr Modified: head/contrib/compiler-rt/lib/arm/addsf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/addsf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/addsf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,10 +15,11 @@ // Adds two single precision floating point numbers using the Darwin // calling convention where single arguments are passsed in GPRs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__addsf3vfp) - fmsr s14, r0 // move first param from r0 into float register - fmsr s15, r1 // move second param from r1 into float register - fadds s14, s14, s15 - fmrs r0, s14 // move result back to r0 + vmov s14, r0 // move first param from r0 into float register + vmov s15, r1 // move second param from r1 into float register + vadd.f32 s14, s14, s15 + vmov r0, s14 // move result back to r0 bx lr Modified: head/contrib/compiler-rt/lib/arm/divdf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/divdf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/divdf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,10 +15,11 @@ // Divides two double precision floating point numbers using the Darwin // calling convention where double arguments are passsed in GPR pairs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__divdf3vfp) - fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6 - fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7 - fdivd d5, d6, d7 - fmrrd r0, r1, d5 // move result back to r0/r1 pair + vmov d6, r0, r1 // move first param from r0/r1 pair into d6 + vmov d7, r2, r3 // move second param from r2/r3 pair into d7 + vdiv.f64 d5, d6, d7 + vmov r0, r1, d5 // move result back to r0/r1 pair bx lr Modified: head/contrib/compiler-rt/lib/arm/divsf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/divsf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/divsf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,10 +15,11 @@ // Divides two single precision floating point numbers using the Darwin // calling convention where single arguments are passsed like 32-bit ints. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__divsf3vfp) - fmsr s14, r0 // move first param from r0 into float register - fmsr s15, r1 // move second param from r1 into float register - fdivs s13, s14, s15 - fmrs r0, s13 // move result back to r0 + vmov s14, r0 // move first param from r0 into float register + vmov s15, r1 // move second param from r1 into float register + vdiv.f32 s13, s14, s15 + vmov r0, s13 // move result back to r0 bx lr Modified: head/contrib/compiler-rt/lib/arm/eqdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/eqdf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/eqdf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr moveq r0, #1 // set result register to 1 if equal movne r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/eqsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/eqsf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/eqsf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__eqsf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr moveq r0, #1 // set result register to 1 if equal movne r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/extendsfdf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision parameter is // passed in a GPR and a double precision result is returned in R0/R1 pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__extendsfdf2vfp) - fmsr s15, r0 // load float register from R0 - fcvtds d7, s15 // convert single to double - fmrrd r0, r1, d7 // return result in r0/r1 pair + vmov s15, r0 // load float register from R0 + vcvt.f64.f32 d7, s15 // convert single to double + vmov r0, r1, d7 // return result in r0/r1 pair bx lr Modified: head/contrib/compiler-rt/lib/arm/fixdfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixdfsivfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/fixdfsivfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a double precision parameter is // passed in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixdfsivfp) - fmdrr d7, r0, r1 // load double register from R0/R1 - ftosizd s15, d7 // convert double to 32-bit int into s15 - fmrs r0, s15 // move s15 to result register + vmov d7, r0, r1 // load double register from R0/R1 + vcvt.s32.f64 s15, d7 // convert double to 32-bit int into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: head/contrib/compiler-rt/lib/arm/fixsfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixsfsivfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/fixsfsivfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision parameter is // passed in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixsfsivfp) - fmsr s15, r0 // load float register from R0 - ftosizs s15, s15 // convert single to 32-bit int into s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // load float register from R0 + vcvt.s32.f32 s15, s15 // convert single to 32-bit int into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/fixunsdfsivfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -17,9 +17,10 @@ // Uses Darwin calling convention where a double precision parameter is // passed in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixunsdfsivfp) - fmdrr d7, r0, r1 // load double register from R0/R1 - ftouizd s15, d7 // convert double to 32-bit int into s15 - fmrs r0, s15 // move s15 to result register + vmov d7, r0, r1 // load double register from R0/R1 + vcvt.u32.f64 s15, d7 // convert double to 32-bit int into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/fixunssfsivfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -17,9 +17,10 @@ // Uses Darwin calling convention where a single precision parameter is // passed in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__fixunssfsivfp) - fmsr s15, r0 // load float register from R0 - ftouizs s15, s15 // convert single to 32-bit unsigned into s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // load float register from R0 + vcvt.u32.f32 s15, s15 // convert single to 32-bit unsigned into s15 + vmov r0, s15 // move s15 to result register bx lr Modified: head/contrib/compiler-rt/lib/arm/floatsidfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatsidfvfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/floatsidfvfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a double precision result is // return in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatsidfvfp) - fmsr s15, r0 // move int to float register s15 - fsitod d7, s15 // convert 32-bit int in s15 to double in d7 - fmrrd r0, r1, d7 // move d7 to result register pair r0/r1 + vmov s15, r0 // move int to float register s15 + vcvt.f64.s32 d7, s15 // convert 32-bit int in s15 to double in d7 + vmov r0, r1, d7 // move d7 to result register pair r0/r1 bx lr Modified: head/contrib/compiler-rt/lib/arm/floatsisfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatsisfvfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/floatsisfvfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision result is // return in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatsisfvfp) - fmsr s15, r0 // move int to float register s15 - fsitos s15, s15 // convert 32-bit int in s15 to float in s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // move int to float register s15 + vcvt.f32.s32 s15, s15 // convert 32-bit int in s15 to float in s15 + vmov r0, s15 // move s15 to result register bx lr Modified: head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/floatunssidfvfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a double precision result is // return in GPR register pair. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatunssidfvfp) - fmsr s15, r0 // move int to float register s15 - fuitod d7, s15 // convert 32-bit int in s15 to double in d7 - fmrrd r0, r1, d7 // move d7 to result register pair r0/r1 + vmov s15, r0 // move int to float register s15 + vcvt.f64.u32 d7, s15 // convert 32-bit int in s15 to double in d7 + vmov r0, r1, d7 // move d7 to result register pair r0/r1 bx lr Modified: head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/floatunssisfvfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a single precision result is // return in a GPR.. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__floatunssisfvfp) - fmsr s15, r0 // move int to float register s15 - fuitos s15, s15 // convert 32-bit int in s15 to float in s15 - fmrs r0, s15 // move s15 to result register + vmov s15, r0 // move int to float register s15 + vcvt.f32.u32 s15, s15 // convert 32-bit int in s15 to float in s15 + vmov r0, s15 // move s15 to result register bx lr Modified: head/contrib/compiler-rt/lib/arm/gedf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gedf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/gedf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__gedf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/gesf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gesf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/gesf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__gesf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr movge r0, #1 // set result register to 1 if greater than or equal movlt r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/gtdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gtdf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/gtdf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__gtdf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr movgt r0, #1 // set result register to 1 if equal movle r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/gtsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/gtsf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/gtsf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__gtsf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr movgt r0, #1 // set result register to 1 if equal movle r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/ledf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/ledf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/ledf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__ledf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr movls r0, #1 // set result register to 1 if equal movhi r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/lesf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/lesf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/lesf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__lesf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr movls r0, #1 // set result register to 1 if equal movhi r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/ltdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/ltdf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/ltdf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__ltdf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr movmi r0, #1 // set result register to 1 if equal movpl r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/ltsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/ltsf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/ltsf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__ltsf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr movmi r0, #1 // set result register to 1 if equal movpl r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/muldf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/muldf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/muldf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,10 +15,11 @@ // Multiplies two double precision floating point numbers using the Darwin // calling convention where double arguments are passsed in GPR pairs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__muldf3vfp) - fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6 - fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7 - fmuld d6, d6, d7 - fmrrd r0, r1, d6 // move result back to r0/r1 pair + vmov d6, r0, r1 // move first param from r0/r1 pair into d6 + vmov d7, r2, r3 // move second param from r2/r3 pair into d7 + vmul.f64 d6, d6, d7 + vmov r0, r1, d6 // move result back to r0/r1 pair bx lr Modified: head/contrib/compiler-rt/lib/arm/mulsf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/mulsf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/mulsf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,10 +15,11 @@ // Multiplies two single precision floating point numbers using the Darwin // calling convention where single arguments are passsed like 32-bit ints. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__mulsf3vfp) - fmsr s14, r0 // move first param from r0 into float register - fmsr s15, r1 // move second param from r1 into float register - fmuls s13, s14, s15 - fmrs r0, s13 // move result back to r0 + vmov s14, r0 // move first param from r0 into float register + vmov s15, r1 // move second param from r1 into float register + vmul.f32 s13, s14, s15 + vmov r0, s13 // move result back to r0 bx lr Modified: head/contrib/compiler-rt/lib/arm/nedf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/nedf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/nedf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__nedf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr movne r0, #1 // set result register to 0 if unequal moveq r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/negdf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/negdf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/negdf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,6 +15,7 @@ // Returns the negation a double precision floating point numbers using the // Darwin calling convention where double arguments are passsed in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__negdf2vfp) eor r1, r1, #-2147483648 // flip sign bit on double in r0/r1 pair Modified: head/contrib/compiler-rt/lib/arm/negsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/negsf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/negsf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,6 +15,7 @@ // Returns the negation of a single precision floating point numbers using the // Darwin calling convention where single arguments are passsed like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__negsf2vfp) eor r0, r0, #-2147483648 // flip sign bit on float in r0 Modified: head/contrib/compiler-rt/lib/arm/nesf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/nesf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/nesf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__nesf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr movne r0, #1 // set result register to 1 if unequal moveq r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/subdf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/subdf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/subdf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -15,10 +15,11 @@ // Returns difference between two double precision floating point numbers using // the Darwin calling convention where double arguments are passsed in GPR pairs // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__subdf3vfp) - fmdrr d6, r0, r1 // move first param from r0/r1 pair into d6 - fmdrr d7, r2, r3 // move second param from r2/r3 pair into d7 - fsubd d6, d6, d7 - fmrrd r0, r1, d6 // move result back to r0/r1 pair + vmov d6, r0, r1 // move first param from r0/r1 pair into d6 + vmov d7, r2, r3 // move second param from r2/r3 pair into d7 + vsub.f64 d6, d6, d7 + vmov r0, r1, d6 // move result back to r0/r1 pair bx lr Modified: head/contrib/compiler-rt/lib/arm/subsf3vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/subsf3vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/subsf3vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,10 +16,11 @@ // using the Darwin calling convention where single arguments are passsed // like 32-bit ints. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__subsf3vfp) - fmsr s14, r0 // move first param from r0 into float register - fmsr s15, r1 // move second param from r1 into float register - fsubs s14, s14, s15 - fmrs r0, s14 // move result back to r0 + vmov s14, r0 // move first param from r0 into float register + vmov s15, r1 // move second param from r1 into float register + vsub.f32 s14, s14, s15 + vmov r0, s14 // move result back to r0 bx lr Modified: head/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/truncdfsf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,9 +16,10 @@ // Uses Darwin calling convention where a double precision parameter is // passed in a R0/R1 pair and a signle precision result is returned in R0. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__truncdfsf2vfp) - fmdrr d7, r0, r1 // load double from r0/r1 pair - fcvtsd s15, d7 // convert double to single (trucate precision) - fmrs r0, s15 // return result in r0 + vmov d7, r0, r1 // load double from r0/r1 pair + vcvt.f32.f64 s15, d7 // convert double to single (trucate precision) + vmov r0, s15 // return result in r0 bx lr Modified: head/contrib/compiler-rt/lib/arm/unorddf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/unorddf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/unorddf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where double precision arguments are passsed // like in GPR pairs. // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__unorddf2vfp) - fmdrr d6, r0, r1 // load r0/r1 pair in double register - fmdrr d7, r2, r3 // load r2/r3 pair in double register - fcmpd d6, d7 - fmstat + vmov d6, r0, r1 // load r0/r1 pair in double register + vmov d7, r2, r3 // load r2/r3 pair in double register + vcmp.f64 d6, d7 + vmrs apsr_nzcv, fpscr movvs r0, #1 // set result register to 1 if "overflow" (any NaNs) movvc r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/arm/unordsf2vfp.S ============================================================================== --- head/contrib/compiler-rt/lib/arm/unordsf2vfp.S Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/arm/unordsf2vfp.S Sat Dec 31 19:01:48 2011 (r229135) @@ -16,12 +16,13 @@ // Uses Darwin calling convention where single precision arguments are passsed // like 32-bit ints // + .syntax unified .align 2 DEFINE_COMPILERRT_FUNCTION(__unordsf2vfp) - fmsr s14, r0 // move from GPR 0 to float register - fmsr s15, r1 // move from GPR 1 to float register - fcmps s14, s15 - fmstat + vmov s14, r0 // move from GPR 0 to float register + vmov s15, r1 // move from GPR 1 to float register + vcmp.f32 s14, s15 + vmrs apsr_nzcv, fpscr movvs r0, #1 // set result register to 1 if "overflow" (any NaNs) movvc r0, #0 bx lr Modified: head/contrib/compiler-rt/lib/ashldi3.c ============================================================================== --- head/contrib/compiler-rt/lib/ashldi3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/ashldi3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/ashrdi3.c ============================================================================== --- head/contrib/compiler-rt/lib/ashrdi3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/ashrdi3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/assembly.h ============================================================================== --- head/contrib/compiler-rt/lib/assembly.h Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/assembly.h Sat Dec 31 19:01:48 2011 (r229135) @@ -35,15 +35,16 @@ #define SYMBOL_NAME(name) GLUE(__USER_LABEL_PREFIX__, name) #ifdef VISIBILITY_HIDDEN -#define DEFINE_COMPILERRT_FUNCTION(name) \ - .globl SYMBOL_NAME(name) SEPARATOR \ - HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR \ - SYMBOL_NAME(name): +#define DECLARE_SYMBOL_VISIBILITY(name) \ + HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR #else +#define DECLARE_SYMBOL_VISIBILITY(name) +#endif + #define DEFINE_COMPILERRT_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ + DECLARE_SYMBOL_VISIBILITY(name) \ SYMBOL_NAME(name): -#endif #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name) \ .globl SYMBOL_NAME(name) SEPARATOR \ Modified: head/contrib/compiler-rt/lib/clear_cache.c ============================================================================== --- head/contrib/compiler-rt/lib/clear_cache.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/clear_cache.c Sat Dec 31 19:01:48 2011 (r229135) @@ -9,7 +9,6 @@ */ #include "int_lib.h" -#include #if __APPLE__ #include Modified: head/contrib/compiler-rt/lib/clzdi2.c ============================================================================== --- head/contrib/compiler-rt/lib/clzdi2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/clzdi2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/clzsi2.c ============================================================================== --- head/contrib/compiler-rt/lib/clzsi2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/clzsi2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/cmpdi2.c ============================================================================== --- head/contrib/compiler-rt/lib/cmpdi2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/cmpdi2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/ctzdi2.c ============================================================================== --- head/contrib/compiler-rt/lib/ctzdi2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/ctzdi2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/ctzsi2.c ============================================================================== --- head/contrib/compiler-rt/lib/ctzsi2.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/ctzsi2.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/divdc3.c ============================================================================== --- head/contrib/compiler-rt/lib/divdc3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/divdc3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -13,8 +13,7 @@ */ #include "int_lib.h" -#include -#include +#include "int_math.h" /* Returns: the quotient of (a + ib) / (c + id) */ @@ -22,35 +21,37 @@ double _Complex __divdc3(double __a, double __b, double __c, double __d) { int __ilogbw = 0; - double __logbw = logb(fmax(fabs(__c), fabs(__d))); - if (isfinite(__logbw)) + double __logbw = crt_logb(crt_fmax(crt_fabs(__c), crt_fabs(__d))); + if (crt_isfinite(__logbw)) { __ilogbw = (int)__logbw; - __c = scalbn(__c, -__ilogbw); - __d = scalbn(__d, -__ilogbw); + __c = crt_scalbn(__c, -__ilogbw); + __d = crt_scalbn(__d, -__ilogbw); } double __denom = __c * __c + __d * __d; double _Complex z; - __real__ z = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw); - __imag__ z = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw); - if (isnan(__real__ z) && isnan(__imag__ z)) + __real__ z = crt_scalbn((__a * __c + __b * __d) / __denom, -__ilogbw); + __imag__ z = crt_scalbn((__b * __c - __a * __d) / __denom, -__ilogbw); + if (crt_isnan(__real__ z) && crt_isnan(__imag__ z)) { - if ((__denom == 0.0) && (!isnan(__a) || !isnan(__b))) + if ((__denom == 0.0) && (!crt_isnan(__a) || !crt_isnan(__b))) { - __real__ z = copysign(INFINITY, __c) * __a; - __imag__ z = copysign(INFINITY, __c) * __b; + __real__ z = crt_copysign(CRT_INFINITY, __c) * __a; + __imag__ z = crt_copysign(CRT_INFINITY, __c) * __b; } - else if ((isinf(__a) || isinf(__b)) && isfinite(__c) && isfinite(__d)) + else if ((crt_isinf(__a) || crt_isinf(__b)) && + crt_isfinite(__c) && crt_isfinite(__d)) { - __a = copysign(isinf(__a) ? 1.0 : 0.0, __a); - __b = copysign(isinf(__b) ? 1.0 : 0.0, __b); - __real__ z = INFINITY * (__a * __c + __b * __d); - __imag__ z = INFINITY * (__b * __c - __a * __d); + __a = crt_copysign(crt_isinf(__a) ? 1.0 : 0.0, __a); + __b = crt_copysign(crt_isinf(__b) ? 1.0 : 0.0, __b); + __real__ z = CRT_INFINITY * (__a * __c + __b * __d); + __imag__ z = CRT_INFINITY * (__b * __c - __a * __d); } - else if (isinf(__logbw) && __logbw > 0.0 && isfinite(__a) && isfinite(__b)) + else if (crt_isinf(__logbw) && __logbw > 0.0 && + crt_isfinite(__a) && crt_isfinite(__b)) { - __c = copysign(isinf(__c) ? 1.0 : 0.0, __c); - __d = copysign(isinf(__d) ? 1.0 : 0.0, __d); + __c = crt_copysign(crt_isinf(__c) ? 1.0 : 0.0, __c); + __d = crt_copysign(crt_isinf(__d) ? 1.0 : 0.0, __d); __real__ z = 0.0 * (__a * __c + __b * __d); __imag__ z = 0.0 * (__b * __c - __a * __d); } Modified: head/contrib/compiler-rt/lib/divdf3.c ============================================================================== --- head/contrib/compiler-rt/lib/divdf3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/divdf3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -15,7 +15,6 @@ // underflow with correct rounding. // //===----------------------------------------------------------------------===// -#include "abi.h" #define DOUBLE_PRECISION #include "fp_lib.h" Modified: head/contrib/compiler-rt/lib/divdi3.c ============================================================================== --- head/contrib/compiler-rt/lib/divdi3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/divdi3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/divmoddi4.c ============================================================================== --- head/contrib/compiler-rt/lib/divmoddi4.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/divmoddi4.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/divmodsi4.c ============================================================================== --- head/contrib/compiler-rt/lib/divmodsi4.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/divmodsi4.c Sat Dec 31 19:01:48 2011 (r229135) @@ -11,7 +11,6 @@ * * ===----------------------------------------------------------------------=== */ -#include "abi.h" #include "int_lib.h" Modified: head/contrib/compiler-rt/lib/divsc3.c ============================================================================== --- head/contrib/compiler-rt/lib/divsc3.c Sat Dec 31 18:53:11 2011 (r229134) +++ head/contrib/compiler-rt/lib/divsc3.c Sat Dec 31 19:01:48 2011 (r229135) @@ -13,8 +13,7 @@ */ #include "int_lib.h" -#include -#include +#include "int_math.h" /* Returns: the quotient of (a + ib) / (c + id) */ @@ -22,35 +21,37 @@ float _Complex __divsc3(float __a, float __b, float __c, float __d) { int __ilogbw = 0; - float __logbw = logbf(fmaxf(fabsf(__c), fabsf(__d))); - if (isfinite(__logbw)) + float __logbw = crt_logbf(crt_fmaxf(crt_fabsf(__c), crt_fabsf(__d))); + if (crt_isfinite(__logbw)) { __ilogbw = (int)__logbw; - __c = scalbnf(__c, -__ilogbw); - __d = scalbnf(__d, -__ilogbw); + __c = crt_scalbnf(__c, -__ilogbw); + __d = crt_scalbnf(__d, -__ilogbw); } float __denom = __c * __c + __d * __d; float _Complex z; - __real__ z = scalbnf((__a * __c + __b * __d) / __denom, -__ilogbw); - __imag__ z = scalbnf((__b * __c - __a * __d) / __denom, -__ilogbw); - if (isnan(__real__ z) && isnan(__imag__ z)) + __real__ z = crt_scalbnf((__a * __c + __b * __d) / __denom, -__ilogbw); + __imag__ z = crt_scalbnf((__b * __c - __a * __d) / __denom, -__ilogbw); + if (crt_isnan(__real__ z) && crt_isnan(__imag__ z)) { - if ((__denom == 0) && (!isnan(__a) || !isnan(__b))) + if ((__denom == 0) && (!crt_isnan(__a) || !crt_isnan(__b))) { - __real__ z = copysignf(INFINITY, __c) * __a; - __imag__ z = copysignf(INFINITY, __c) * __b; + __real__ z = crt_copysignf(CRT_INFINITY, __c) * __a; + __imag__ z = crt_copysignf(CRT_INFINITY, __c) * __b; } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:19:19 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9448106566B; Sat, 31 Dec 2011 19:19:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C36678FC1F; Sat, 31 Dec 2011 19:19:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJJJX9078770; Sat, 31 Dec 2011 19:19:19 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJJJ4E078768; Sat, 31 Dec 2011 19:19:19 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311919.pBVJJJ4E078768@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229136 - stable/9/libexec/bootpd/bootpgw X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:19:20 -0000 Author: dim Date: Sat Dec 31 19:19:19 2011 New Revision: 229136 URL: http://svn.freebsd.org/changeset/base/229136 Log: MFC r228581: In libexec/bootpd/bootpgw/bootpgw.c, add a cast for the remaining minutes of activity, to avoid a warning on platforms where time_t is a 32-bit integer. Modified: stable/9/libexec/bootpd/bootpgw/bootpgw.c Directory Properties: stable/9/libexec/bootpd/ (props changed) Modified: stable/9/libexec/bootpd/bootpgw/bootpgw.c ============================================================================== --- stable/9/libexec/bootpd/bootpgw/bootpgw.c Sat Dec 31 19:01:48 2011 (r229135) +++ stable/9/libexec/bootpd/bootpgw/bootpgw.c Sat Dec 31 19:19:19 2011 (r229136) @@ -452,7 +452,7 @@ main(argc, argv) } if (!(readfds & (1 << s))) { report(LOG_INFO, "exiting after %ld minutes of inactivity", - actualtimeout.tv_sec / 60); + (long)(actualtimeout.tv_sec / 60)); exit(0); } ra_len = sizeof(recv_addr); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:26:24 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD7BB106566C; Sat, 31 Dec 2011 19:26:24 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A6DB98FC1B; Sat, 31 Dec 2011 19:26:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJQONq079025; Sat, 31 Dec 2011 19:26:24 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJQOOo079023; Sat, 31 Dec 2011 19:26:24 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311926.pBVJQOOo079023@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229137 - stable/9/libexec/getty X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:26:24 -0000 Author: dim Date: Sat Dec 31 19:26:24 2011 New Revision: 229137 URL: http://svn.freebsd.org/changeset/base/229137 Log: MFC r228582: In libexec/getty/chat.c, replace && with & in chat_send(). The intent is to test if the CHATDEBUG_SEND bit is set in the chat_debug global. Modified: stable/9/libexec/getty/chat.c Directory Properties: stable/9/libexec/getty/ (props changed) Modified: stable/9/libexec/getty/chat.c ============================================================================== --- stable/9/libexec/getty/chat.c Sat Dec 31 19:19:19 2011 (r229136) +++ stable/9/libexec/getty/chat.c Sat Dec 31 19:26:24 2011 (r229137) @@ -388,7 +388,7 @@ chat_send(char const *str) { int r = 0; - if (chat_debug && CHATDEBUG_SEND) + if (chat_debug & CHATDEBUG_SEND) syslog(LOG_DEBUG, "chat_send '%s'", cleanstr(str, strlen(str))); if (*str) { From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:28:55 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0EE2C106564A; Sat, 31 Dec 2011 19:28:55 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC9D28FC0A; Sat, 31 Dec 2011 19:28:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJSseQ079139; Sat, 31 Dec 2011 19:28:54 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJSsW7079137; Sat, 31 Dec 2011 19:28:54 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311928.pBVJSsW7079137@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229138 - stable/9/libexec/bootpd/tools/bootptest X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:28:55 -0000 Author: dim Date: Sat Dec 31 19:28:54 2011 New Revision: 229138 URL: http://svn.freebsd.org/changeset/base/229138 Log: MFC r228584: In libexec/bootpd/tools/bootptest/print-bootp.c, use the correct printf length modifier for the difference between two pointers. Modified: stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Directory Properties: stable/9/libexec/bootpd/ (props changed) Modified: stable/9/libexec/bootpd/tools/bootptest/print-bootp.c ============================================================================== --- stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Sat Dec 31 19:26:24 2011 (r229137) +++ stable/9/libexec/bootpd/tools/bootptest/print-bootp.c Sat Dec 31 19:28:54 2011 (r229138) @@ -310,7 +310,7 @@ rfc1048_print(bp, length) len = *bp++; if (bp + len > ep) { /* truncated option */ - printf(" |(%d>%d)", len, ep - bp); + printf(" |(%d>%td)", len, ep - bp); return; } /* Print the option value(s). */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:34:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E4F3106566B; Sat, 31 Dec 2011 19:34:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2865C8FC12; Sat, 31 Dec 2011 19:34:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJYQQQ079363; Sat, 31 Dec 2011 19:34:26 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJYPeA079361; Sat, 31 Dec 2011 19:34:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311934.pBVJYPeA079361@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229139 - stable/9/libexec/pppoed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:34:26 -0000 Author: dim Date: Sat Dec 31 19:34:25 2011 New Revision: 229139 URL: http://svn.freebsd.org/changeset/base/229139 Log: MFC r228586: In libexec/pppoed/pppoed.c, use the correct printf length modifier for a size_t. Modified: stable/9/libexec/pppoed/pppoed.c Directory Properties: stable/9/libexec/pppoed/ (props changed) Modified: stable/9/libexec/pppoed/pppoed.c ============================================================================== --- stable/9/libexec/pppoed/pppoed.c Sat Dec 31 19:28:54 2011 (r229138) +++ stable/9/libexec/pppoed/pppoed.c Sat Dec 31 19:34:25 2011 (r229139) @@ -570,8 +570,8 @@ main(int argc, char *argv[]) } exec = (char *)alloca(sizeof DEFAULT_EXEC_PREFIX + strlen(label)); if (exec == NULL) { - fprintf(stderr, "%s: Cannot allocate %d bytes\n", prog, - (int)(sizeof DEFAULT_EXEC_PREFIX) + strlen(label)); + fprintf(stderr, "%s: Cannot allocate %zu bytes\n", prog, + sizeof DEFAULT_EXEC_PREFIX + strlen(label)); return EX_OSERR; } strcpy(exec, DEFAULT_EXEC_PREFIX); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:36:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15F8F106566B; Sat, 31 Dec 2011 19:36:12 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3B3B8FC19; Sat, 31 Dec 2011 19:36:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJaBb6079464; Sat, 31 Dec 2011 19:36:11 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJaB4N079462; Sat, 31 Dec 2011 19:36:11 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311936.pBVJaB4N079462@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:36:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229140 - stable/9/libexec/rbootd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:36:12 -0000 Author: dim Date: Sat Dec 31 19:36:11 2011 New Revision: 229140 URL: http://svn.freebsd.org/changeset/base/229140 Log: MFC r228587: In libexec/rbootd/utils.c, use the correct printf length modifiers for u_int32_t and size_t. Modified: stable/9/libexec/rbootd/utils.c Directory Properties: stable/9/libexec/rbootd/ (props changed) Modified: stable/9/libexec/rbootd/utils.c ============================================================================== --- stable/9/libexec/rbootd/utils.c Sat Dec 31 19:34:25 2011 (r229139) +++ stable/9/libexec/rbootd/utils.c Sat Dec 31 19:36:11 2011 (r229140) @@ -82,8 +82,8 @@ static const char rcsid[] = void DispPkt(RMPCONN *rconn, int direct) { - static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%lx SessID:%x Vers:%u"; - static const char ReadFmt[] = "\t\tRetCode:%u Offset:%lx SessID:%x\n"; + static const char BootFmt[] = "\t\tRetCode:%u SeqNo:%x SessID:%x Vers:%u"; + static const char ReadFmt[] = "\t\tRetCode:%u Offset:%x SessID:%x\n"; struct tm *tmp; struct rmp_packet *rmp; @@ -166,7 +166,7 @@ DispPkt(RMPCONN *rconn, int direct) GETWORD(rmp->r_rrpl.rmp_offset, t); (void) fprintf(DbgFp, ReadFmt, rmp->r_rrpl.rmp_retcode, t, ntohs(rmp->r_rrpl.rmp_session)); - (void) fprintf(DbgFp, "\t\tNoOfBytesSent: %d\n", + (void) fprintf(DbgFp, "\t\tNoOfBytesSent: %zu\n", rconn->rmplen - RMPREADSIZE(0)); break; case RMP_BOOT_DONE: /* boot complete */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:42:53 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D74106566B; Sat, 31 Dec 2011 19:42:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3EF0A8FC1B; Sat, 31 Dec 2011 19:42:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJgrMN079689; Sat, 31 Dec 2011 19:42:53 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJgrY0079687; Sat, 31 Dec 2011 19:42:53 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311942.pBVJgrY0079687@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:42:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229141 - stable/9/contrib/telnet/telnetd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:42:53 -0000 Author: dim Date: Sat Dec 31 19:42:52 2011 New Revision: 229141 URL: http://svn.freebsd.org/changeset/base/229141 Log: MFC r228589: In contrib/telnet/telnetd/utility.c, fix a few warnings about format strings not being literals. Modified: stable/9/contrib/telnet/telnetd/utility.c Directory Properties: stable/9/contrib/telnet/ (props changed) Modified: stable/9/contrib/telnet/telnetd/utility.c ============================================================================== --- stable/9/contrib/telnet/telnetd/utility.c Sat Dec 31 19:36:11 2011 (r229140) +++ stable/9/contrib/telnet/telnetd/utility.c Sat Dec 31 19:42:52 2011 (r229141) @@ -847,22 +847,22 @@ printsub(char direction, unsigned char * for (i = 2; i < length; i++ ) { switch (pointer[i]) { case NEW_ENV_VAR: - output_data("\" VAR " + noquote); + output_data("%s", "\" VAR " + noquote); noquote = 2; break; case NEW_ENV_VALUE: - output_data("\" VALUE " + noquote); + output_data("%s", "\" VALUE " + noquote); noquote = 2; break; case ENV_ESC: - output_data("\" ESC " + noquote); + output_data("%s", "\" ESC " + noquote); noquote = 2; break; case ENV_USERVAR: - output_data("\" USERVAR " + noquote); + output_data("%s", "\" USERVAR " + noquote); noquote = 2; break; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:46:07 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EA00106566C; Sat, 31 Dec 2011 19:46:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07B2E8FC08; Sat, 31 Dec 2011 19:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJk6pr079895; Sat, 31 Dec 2011 19:46:06 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJk6uO079891; Sat, 31 Dec 2011 19:46:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311946.pBVJk6uO079891@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229142 - stable/9/libexec/ypxfr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:46:07 -0000 Author: dim Date: Sat Dec 31 19:46:06 2011 New Revision: 229142 URL: http://svn.freebsd.org/changeset/base/229142 Log: MFC r228600: Fix the incompatible enum conversions in libexec/ypxfr in another, more messy way, so as to not disrupt other yp programs: just add casts to convert the incompatible enums, as the numerical values are the same (either by accident, design, or the phase of the moon at that time). Modified: stable/9/libexec/ypxfr/ypxfr_getmap.c stable/9/libexec/ypxfr/ypxfr_main.c stable/9/libexec/ypxfr/ypxfr_misc.c Directory Properties: stable/9/libexec/ypxfr/ (props changed) Modified: stable/9/libexec/ypxfr/ypxfr_getmap.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_getmap.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_getmap.c Sat Dec 31 19:46:06 2011 (r229142) @@ -73,7 +73,7 @@ ypxfr_get_map(char *map, char *domain, c if ((clnt = clnt_create(host, YPPROG, YPVERS, "tcp")) == NULL) { yp_error("%s", clnt_spcreateerror("failed to \ create tcp handle")); - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; return(1); } @@ -91,7 +91,7 @@ create tcp handle")); return(0); if (status != YP_TRUE) { - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; return(1); } Modified: stable/9/libexec/ypxfr/ypxfr_main.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_main.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_main.c Sat Dec 31 19:46:06 2011 (r229142) @@ -88,7 +88,7 @@ ypxfr_exit(ypxfrstat retval, char *temp) exit(1); } - ypxfr_resp.status = retval; + ypxfr_resp.status = (yppush_status)retval; if (yppushproc_xfrresp_1(&ypxfr_resp, clnt) == NULL) { yp_error("%s", clnt_sperror(clnt, "callback failed")); @@ -329,7 +329,7 @@ the local domain name isn't set"); ypxfr_use_yplib)) == NULL) { yp_error("failed to find master of %s in domain %s: %s", ypxfr_mapname, ypxfr_source_domain, - ypxfrerr_string(yp_errno)); + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_MADDR,NULL); } } @@ -358,7 +358,8 @@ the local domain name isn't set"); ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", ypxfr_mapname, yp_errno == YPXFR_SUCC ? - "map has order 0" : ypxfrerr_string(yp_errno)); + "map has order 0" : + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,NULL); } @@ -533,7 +534,8 @@ leave: ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", ypxfr_mapname, yp_errno == YPXFR_SUCC ? - "map has order 0" : ypxfrerr_string(yp_errno)); + "map has order 0" : + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); } Modified: stable/9/libexec/ypxfr/ypxfr_misc.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_misc.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_misc.c Sat Dec 31 19:46:06 2011 (r229142) @@ -130,14 +130,14 @@ ypxfr_get_master(char *domain, char *map if ((res = yp_master(domain, map, &master))) { switch (res) { case YPERR_DOMAIN: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YPERR_MAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YPERR_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(NULL); @@ -154,7 +154,7 @@ ypxfr_get_master(char *domain, char *map if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) { yp_error("%s",clnt_spcreateerror("failed to \ create udp handle to ypserv")); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(NULL); } @@ -164,21 +164,21 @@ create udp handle to ypserv")); yp_error("%s",clnt_sperror(clnt,"YPPROC_MASTER \ failed")); clnt_destroy(clnt); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(NULL); } clnt_destroy(clnt); if (resp->stat != YP_TRUE) { switch (resp->stat) { case YP_NODOM: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YP_NOMAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YP_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(NULL); @@ -198,14 +198,14 @@ ypxfr_get_order(char *domain, char *map, if ((res = yp_order(domain, map, &order))) { switch (res) { case YPERR_DOMAIN: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YPERR_MAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YPERR_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(0); @@ -219,7 +219,7 @@ ypxfr_get_order(char *domain, char *map, if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) { yp_error("%s",clnt_spcreateerror("couldn't create \ udp handle to ypserv")); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(0); } req.map = map; @@ -228,21 +228,21 @@ udp handle to ypserv")); yp_error("%s", clnt_sperror(clnt, "YPPROC_ORDER \ failed")); clnt_destroy(clnt); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(0); } clnt_destroy(clnt); if (resp->stat != YP_TRUE) { switch (resp->stat) { case YP_NODOM: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YP_NOMAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YP_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(0); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:48:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CCB33106566B; Sat, 31 Dec 2011 19:48:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 634FE8FC08; Sat, 31 Dec 2011 19:48:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJm5nQ079997; Sat, 31 Dec 2011 19:48:05 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJm5Qs079994; Sat, 31 Dec 2011 19:48:05 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311948.pBVJm5Qs079994@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:48:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229143 - stable/9/bin/ed X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:48:05 -0000 Author: dim Date: Sat Dec 31 19:48:04 2011 New Revision: 229143 URL: http://svn.freebsd.org/changeset/base/229143 Log: MFC r228595: Fix some obtuse fprintf tricks in bin/ed. Modified: stable/9/bin/ed/io.c stable/9/bin/ed/main.c Directory Properties: stable/9/bin/ed/ (props changed) Modified: stable/9/bin/ed/io.c ============================================================================== --- stable/9/bin/ed/io.c Sat Dec 31 19:46:06 2011 (r229142) +++ stable/9/bin/ed/io.c Sat Dec 31 19:48:04 2011 (r229143) @@ -53,7 +53,8 @@ read_file(char *fn, long n) errmsg = "cannot close input file"; return ERR; } - fprintf(stdout, !scripted ? "%lu\n" : "", size); + if (!scripted) + fprintf(stdout, "%lu\n", size); return current_addr - n; } @@ -161,7 +162,8 @@ write_file(char *fn, const char *mode, l errmsg = "cannot close output file"; return ERR; } - fprintf(stdout, !scripted ? "%lu\n" : "", size); + if (!scripted) + fprintf(stdout, "%lu\n", size); return n ? m - n + 1 : 0; } Modified: stable/9/bin/ed/main.c ============================================================================== --- stable/9/bin/ed/main.c Sat Dec 31 19:46:06 2011 (r229142) +++ stable/9/bin/ed/main.c Sat Dec 31 19:48:04 2011 (r229143) @@ -192,9 +192,10 @@ top: fputs("?\n", stderr); errmsg = "warning: file modified"; if (!isatty(0)) { - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : - "", lineno, errmsg); + if (garrulous) + fprintf(stderr, + "script, line %d: %s\n", + lineno, errmsg); quit(2); } clearerr(stdin); @@ -225,27 +226,26 @@ top: fputs("?\n", stderr); /* give warning */ errmsg = "warning: file modified"; if (!isatty(0)) { - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : - "", lineno, errmsg); + if (garrulous) + fprintf(stderr, "script, line %d: %s\n", + lineno, errmsg); quit(2); } break; case FATAL: - if (!isatty(0)) - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : "", - lineno, errmsg); - else - fprintf(stderr, garrulous ? "%s\n" : "", - errmsg); + if (!isatty(0)) { + if (garrulous) + fprintf(stderr, "script, line %d: %s\n", + lineno, errmsg); + } else if (garrulous) + fprintf(stderr, "%s\n", errmsg); quit(3); default: fputs("?\n", stderr); if (!isatty(0)) { - fprintf(stderr, garrulous ? - "script, line %d: %s\n" : "", - lineno, errmsg); + if (garrulous) + fprintf(stderr, "script, line %d: %s\n", + lineno, errmsg); quit(2); } break; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:50:52 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9DC81065675; Sat, 31 Dec 2011 19:50:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 909208FC14; Sat, 31 Dec 2011 19:50:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJoqWk080128; Sat, 31 Dec 2011 19:50:52 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJoqfD080126; Sat, 31 Dec 2011 19:50:52 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311950.pBVJoqfD080126@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:50:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229144 - stable/9/games/factor X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:50:52 -0000 Author: dim Date: Sat Dec 31 19:50:52 2011 New Revision: 229144 URL: http://svn.freebsd.org/changeset/base/229144 Log: MFC r228596: In games/factor/factor.c, fix a warning about a format string not being a literal. Modified: stable/9/games/factor/factor.c Directory Properties: stable/9/games/factor/ (props changed) Modified: stable/9/games/factor/factor.c ============================================================================== --- stable/9/games/factor/factor.c Sat Dec 31 19:48:04 2011 (r229143) +++ stable/9/games/factor/factor.c Sat Dec 31 19:50:52 2011 (r229144) @@ -322,7 +322,7 @@ BN_print_dec_fp(FILE *fp, const BIGNUM * buf = BN_bn2dec(num); if (buf == NULL) return; /* XXX do anything here? */ - fprintf(fp, buf); + fprintf(fp, "%s", buf); free(buf); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:50:56 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA7321065670; Sat, 31 Dec 2011 19:50:55 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C4B8D8FC16; Sat, 31 Dec 2011 19:50:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJotCg080168; Sat, 31 Dec 2011 19:50:55 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJotmk080164; Sat, 31 Dec 2011 19:50:55 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112311950.pBVJotmk080164@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 19:50:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229145 - stable/9/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:50:56 -0000 Author: mdf Date: Sat Dec 31 19:50:55 2011 New Revision: 229145 URL: http://svn.freebsd.org/changeset/base/229145 Log: MFC r228441: Consistently use types in e1000 driver code: - Two struct members eee_disable are used in a function that expects an int *, so declare them int, not bool. - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - igb_tso_setup() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool/true/false if the symbols already exist. Modified: stable/9/sys/dev/e1000/e1000_hw.h stable/9/sys/dev/e1000/e1000_osdep.h stable/9/sys/dev/e1000/if_igb.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/e1000/e1000_hw.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:50:55 2011 (r229145) @@ -889,13 +889,13 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_82575 { bool sgmii_active; bool global_device_reset; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_vf { Modified: stable/9/sys/dev/e1000/e1000_osdep.h ============================================================================== --- stable/9/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:50:55 2011 (r229145) @@ -73,9 +73,11 @@ #define STATIC static #define FALSE 0 -#define false FALSE #define TRUE 1 +#ifndef __bool_true_false_are_defined +#define false FALSE #define true TRUE +#endif #define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ #define PCI_COMMAND_REGISTER PCIR_COMMAND @@ -96,7 +98,9 @@ typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define __le16 u16 #define __le32 u32 Modified: stable/9/sys/dev/e1000/if_igb.c ============================================================================== --- stable/9/sys/dev/e1000/if_igb.c Sat Dec 31 19:50:52 2011 (r229144) +++ stable/9/sys/dev/e1000/if_igb.c Sat Dec 31 19:50:55 2011 (r229145) @@ -225,7 +225,7 @@ static __inline void igb_rx_input(struct static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); -static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); +static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); static bool igb_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void igb_set_promisc(struct adapter *); static void igb_disable_promisc(struct adapter *); @@ -348,7 +348,7 @@ SYSCTL_INT(_hw_igb, OID_AUTO, max_interr ** into the header and thus use no cluster. Its ** a very workload dependent type feature. */ -static bool igb_header_split = FALSE; +static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); SYSCTL_INT(_hw_igb, OID_AUTO, header_split, CTLFLAG_RDTUN, &igb_header_split, 0, "Enable receive mbuf header split"); @@ -3396,7 +3396,7 @@ igb_free_transmit_buffers(struct tx_ring * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen) { struct adapter *adapter = txr->adapter; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:53:00 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFDFA106564A; Sat, 31 Dec 2011 19:53:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A8DC18FC0A; Sat, 31 Dec 2011 19:53:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJr0lS080296; Sat, 31 Dec 2011 19:53:00 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJr09C080294; Sat, 31 Dec 2011 19:53:00 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311953.pBVJr09C080294@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:53:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229146 - stable/9/cddl/contrib/opensolaris/tools/ctf/cvt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:53:00 -0000 Author: dim Date: Sat Dec 31 19:53:00 2011 New Revision: 229146 URL: http://svn.freebsd.org/changeset/base/229146 Log: MFC r228597: In cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c, a size_t is passed to fprintf as a field width. It should be an int instead, so cast it. Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c Sat Dec 31 19:50:55 2011 (r229145) +++ stable/9/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c Sat Dec 31 19:53:00 2011 (r229146) @@ -228,7 +228,7 @@ usage(void) "\n" " Note: if -L labelenv is specified and labelenv is not set in\n" " the environment, a default value is used.\n", - progname, progname, strlen(progname), " ", + progname, progname, (int)strlen(progname), " ", progname, progname); } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:55:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32CD9106564A; Sat, 31 Dec 2011 19:55:20 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1C90B8FC15; Sat, 31 Dec 2011 19:55:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJtJGB080430; Sat, 31 Dec 2011 19:55:19 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJtJDp080426; Sat, 31 Dec 2011 19:55:19 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112311955.pBVJtJDp080426@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 19:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229147 - stable/8/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:55:20 -0000 Author: mdf Date: Sat Dec 31 19:55:19 2011 New Revision: 229147 URL: http://svn.freebsd.org/changeset/base/229147 Log: MFC r228441: Consistently use types in e1000 driver code: - Two struct members eee_disable are used in a function that expects an int *, so declare them int, not bool. - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - igb_tso_setup() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool/true/false if the symbols already exist. Modified: stable/8/sys/dev/e1000/e1000_hw.h stable/8/sys/dev/e1000/e1000_osdep.h stable/8/sys/dev/e1000/if_igb.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/e1000/e1000_hw.h ============================================================================== --- stable/8/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:53:00 2011 (r229146) +++ stable/8/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:55:19 2011 (r229147) @@ -889,13 +889,13 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_82575 { bool sgmii_active; bool global_device_reset; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_vf { Modified: stable/8/sys/dev/e1000/e1000_osdep.h ============================================================================== --- stable/8/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:53:00 2011 (r229146) +++ stable/8/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:55:19 2011 (r229147) @@ -73,9 +73,11 @@ #define STATIC static #define FALSE 0 -#define false FALSE #define TRUE 1 +#ifndef __bool_true_false_are_defined +#define false FALSE #define true TRUE +#endif #define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ #define PCI_COMMAND_REGISTER PCIR_COMMAND @@ -96,7 +98,9 @@ typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define __le16 u16 #define __le32 u32 Modified: stable/8/sys/dev/e1000/if_igb.c ============================================================================== --- stable/8/sys/dev/e1000/if_igb.c Sat Dec 31 19:53:00 2011 (r229146) +++ stable/8/sys/dev/e1000/if_igb.c Sat Dec 31 19:55:19 2011 (r229147) @@ -224,7 +224,7 @@ static __inline void igb_rx_input(struct static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); -static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); +static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); static bool igb_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void igb_set_promisc(struct adapter *); static void igb_disable_promisc(struct adapter *); @@ -334,7 +334,7 @@ TUNABLE_INT("hw.igb.max_interrupt_rate", ** into the header and thus use no cluster. Its ** a very workload dependent type feature. */ -static bool igb_header_split = FALSE; +static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); /* @@ -3361,7 +3361,7 @@ igb_free_transmit_buffers(struct tx_ring * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen) { struct adapter *adapter = txr->adapter; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:56:26 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AADD1065672; Sat, 31 Dec 2011 19:56:26 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23FE98FC0C; Sat, 31 Dec 2011 19:56:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJuPp8080504; Sat, 31 Dec 2011 19:56:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJuPTG080502; Sat, 31 Dec 2011 19:56:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311956.pBVJuPTG080502@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:56:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229148 - stable/9/cddl/contrib/opensolaris/cmd/dtrace X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:56:26 -0000 Author: dim Date: Sat Dec 31 19:56:25 2011 New Revision: 229148 URL: http://svn.freebsd.org/changeset/base/229148 Log: MFC r228598: In cddl/contrib/opensolaris/cmd/dtrace/dtrace.c, fix some obtuse snprintf tricks. Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Directory Properties: stable/9/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Dec 31 19:55:19 2011 (r229147) +++ stable/9/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Dec 31 19:56:25 2011 (r229148) @@ -671,9 +671,12 @@ link_prog(dtrace_cmd_t *dcp) p[0] = '\0'; /* strip .d suffix */ (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), "%s.o", basename(dcp->dc_arg)); + } else if (g_cmdc > 1) { + (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), + "d.out.%td", dcp - g_cmdv); } else { (void) snprintf(dcp->dc_ofile, sizeof (dcp->dc_ofile), - g_cmdc > 1 ? "%s.%d" : "%s", "d.out", (int)(dcp - g_cmdv)); + "d.out"); } if (dtrace_program_link(g_dtp, dcp->dc_prog, DTRACE_D_PROBES, From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 19:58:25 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A21BB106566C; Sat, 31 Dec 2011 19:58:25 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CAF18FC0C; Sat, 31 Dec 2011 19:58:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJwPH6080617; Sat, 31 Dec 2011 19:58:25 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJwPHI080615; Sat, 31 Dec 2011 19:58:25 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311958.pBVJwPHI080615@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229149 - stable/9/gnu/usr.bin/binutils/libbinutils X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 19:58:25 -0000 Author: dim Date: Sat Dec 31 19:58:25 2011 New Revision: 229149 URL: http://svn.freebsd.org/changeset/base/229149 Log: MFC r228601: Define YY_NO_INPUT when building libbinutils, to prevent warnings about unused input() functions emitted by lex. Modified: stable/9/gnu/usr.bin/binutils/libbinutils/Makefile Directory Properties: stable/9/gnu/usr.bin/binutils/libbinutils/ (props changed) Modified: stable/9/gnu/usr.bin/binutils/libbinutils/Makefile ============================================================================== --- stable/9/gnu/usr.bin/binutils/libbinutils/Makefile Sat Dec 31 19:56:25 2011 (r229148) +++ stable/9/gnu/usr.bin/binutils/libbinutils/Makefile Sat Dec 31 19:58:25 2011 (r229149) @@ -25,6 +25,7 @@ SRCS+= arlex.l \ CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\" CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\" CFLAGS+= -D_GNU_SOURCE +CFLAGS+= -DYY_NO_INPUT CFLAGS+= -I${SRCDIR}/binutils CFLAGS+= -I${SRCDIR}/bfd INTERNALLIB= From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:01:10 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43514106564A; Sat, 31 Dec 2011 20:01:10 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF528FC12; Sat, 31 Dec 2011 20:01:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVK1AOK080771; Sat, 31 Dec 2011 20:01:10 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVK1924080767; Sat, 31 Dec 2011 20:01:09 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312001.pBVK1924080767@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:01:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229150 - stable/7/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:01:10 -0000 Author: mdf Date: Sat Dec 31 20:01:09 2011 New Revision: 229150 URL: http://svn.freebsd.org/changeset/base/229150 Log: MFC r228441: Consistently use types in e1000 driver code: - Two struct members eee_disable are used in a function that expects an int *, so declare them int, not bool. - igb_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - igb_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - igb_tso_setup() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool/true/false if the symbols already exist. Modified: stable/7/sys/dev/e1000/e1000_hw.h stable/7/sys/dev/e1000/e1000_osdep.h stable/7/sys/dev/e1000/if_igb.c Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/e1000/e1000_hw.h ============================================================================== --- stable/7/sys/dev/e1000/e1000_hw.h Sat Dec 31 19:58:25 2011 (r229149) +++ stable/7/sys/dev/e1000/e1000_hw.h Sat Dec 31 20:01:09 2011 (r229150) @@ -880,7 +880,7 @@ struct e1000_dev_spec_ich8lan { E1000_MUTEX nvm_mutex; E1000_MUTEX swflag_mutex; bool nvm_k1_enabled; - bool eee_disable; + int eee_disable; }; struct e1000_dev_spec_82575 { Modified: stable/7/sys/dev/e1000/e1000_osdep.h ============================================================================== --- stable/7/sys/dev/e1000/e1000_osdep.h Sat Dec 31 19:58:25 2011 (r229149) +++ stable/7/sys/dev/e1000/e1000_osdep.h Sat Dec 31 20:01:09 2011 (r229150) @@ -73,9 +73,11 @@ #define STATIC static #define FALSE 0 -#define false FALSE #define TRUE 1 +#ifndef __bool_true_false_are_defined +#define false FALSE #define true TRUE +#endif #define CMD_MEM_WRT_INVALIDATE 0x0010 /* BIT_4 */ #define PCI_COMMAND_REGISTER PCIR_COMMAND @@ -96,7 +98,9 @@ typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define __le16 u16 #define __le32 u32 Modified: stable/7/sys/dev/e1000/if_igb.c ============================================================================== --- stable/7/sys/dev/e1000/if_igb.c Sat Dec 31 19:58:25 2011 (r229149) +++ stable/7/sys/dev/e1000/if_igb.c Sat Dec 31 20:01:09 2011 (r229150) @@ -205,7 +205,7 @@ static __inline void igb_rx_input(struct static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); -static int igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); +static bool igb_tx_ctx_setup(struct tx_ring *, struct mbuf *); static bool igb_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void igb_set_promisc(struct adapter *); static void igb_disable_promisc(struct adapter *); @@ -315,7 +315,7 @@ TUNABLE_INT("hw.igb.max_interrupt_rate", ** into the header and thus use no cluster. Its ** a very workload dependent type feature. */ -static bool igb_header_split = FALSE; +static int igb_header_split = FALSE; TUNABLE_INT("hw.igb.hdr_split", &igb_header_split); /* @@ -3107,7 +3107,7 @@ igb_free_transmit_buffers(struct tx_ring * Setup work for hardware segmentation offload (TSO) * **********************************************************************/ -static boolean_t +static bool igb_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *hdrlen) { struct adapter *adapter = txr->adapter; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:01:41 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C1491065670; Sat, 31 Dec 2011 20:01:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B1C58FC18; Sat, 31 Dec 2011 20:01:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVK1eqZ080822; Sat, 31 Dec 2011 20:01:40 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVK1eGm080820; Sat, 31 Dec 2011 20:01:40 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112312001.pBVK1eGm080820@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 20:01:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229151 - stable/9/sbin/camcontrol X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:01:41 -0000 Author: dim Date: Sat Dec 31 20:01:40 2011 New Revision: 229151 URL: http://svn.freebsd.org/changeset/base/229151 Log: MFC r228602: In sbin/camcontrol/camcontrol.c, fix a few warnings about format strings not being literals. Modified: stable/9/sbin/camcontrol/camcontrol.c Directory Properties: stable/9/sbin/camcontrol/ (props changed) Modified: stable/9/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/9/sbin/camcontrol/camcontrol.c Sat Dec 31 20:01:09 2011 (r229150) +++ stable/9/sbin/camcontrol/camcontrol.c Sat Dec 31 20:01:40 2011 (r229151) @@ -2506,7 +2506,7 @@ scsicmd(struct cam_device *device, int a if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4469,7 +4469,7 @@ smpcmd(struct cam_device *device, int ar if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4587,7 +4587,7 @@ try_long: if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4892,7 +4892,7 @@ smpphycontrol(struct cam_device *device, if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -4974,7 +4974,7 @@ smpmaninfo(struct cam_device *device, in if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -5371,7 +5371,7 @@ smpphylist(struct cam_device *device, in if (((retval = cam_send_ccb(device, ccb)) < 0) || ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP)) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); @@ -5451,7 +5451,7 @@ smpphylist(struct cam_device *device, in if (((retval = cam_send_ccb(device, ccb)) < 0) || (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && (disresponse->function_result != SMP_FR_PHY_VACANT))) { - const char *warnstr = "error sending command"; + const char warnstr[] = "error sending command"; if (retval < 0) warn(warnstr); From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:06:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69B2A1065673; Sat, 31 Dec 2011 20:06:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 535B28FC13; Sat, 31 Dec 2011 20:06:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVK6dIq081029; Sat, 31 Dec 2011 20:06:39 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVK6dNp081027; Sat, 31 Dec 2011 20:06:39 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112312006.pBVK6dNp081027@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 20:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229152 - stable/9/sbin/fsdb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:06:39 -0000 Author: dim Date: Sat Dec 31 20:06:38 2011 New Revision: 229152 URL: http://svn.freebsd.org/changeset/base/229152 Log: MFC r228603: In sbin/fsdb/fsdbutil.c, work around a clang false positive with printf format warnings and conditional operators. (See LLVM PR 11313 for more information.) MFC r228693: Revert r228603, and add the workaround to sbin/fsdb/Makefile instead. Modified: stable/9/sbin/fsdb/Makefile Directory Properties: stable/9/sbin/fsdb/ (props changed) Modified: stable/9/sbin/fsdb/Makefile ============================================================================== --- stable/9/sbin/fsdb/Makefile Sat Dec 31 20:01:40 2011 (r229151) +++ stable/9/sbin/fsdb/Makefile Sat Dec 31 20:06:38 2011 (r229152) @@ -9,6 +9,10 @@ SRCS= fsdb.c fsdbutil.c \ pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c CFLAGS+= -I${.CURDIR}/../fsck_ffs WARNS?= 2 +.if ${CC:T:Mclang} == "clang" +# Work around a problem with format string warnings and ntohs macros. +NO_WFORMAT= +.endif LDADD= -ledit -ltermcap DPADD= ${LIBEDIT} ${LIBTERMCAP} .PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:12:27 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 226FA1065670; Sat, 31 Dec 2011 20:12:27 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 028EF8FC0A; Sat, 31 Dec 2011 20:12:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKCQPF081272; Sat, 31 Dec 2011 20:12:26 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKCQoL081268; Sat, 31 Dec 2011 20:12:26 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312012.pBVKCQoL081268@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:12:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229153 - stable/9/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:12:27 -0000 Author: mdf Date: Sat Dec 31 20:12:26 2011 New Revision: 229153 URL: http://svn.freebsd.org/changeset/base/229153 Log: MFC r228440: Consistently use types in ixgbe driver code: - {ixgbe,ixv}_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - {ixgbe,ixv}_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - {ixgbe,ixv}_tso_setup() returns a bool, so declare it bool, not boolean_t. - {ixgbe,ixv}_txeof() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool if the symbol already exists. Modified: stable/9/sys/dev/ixgbe/ixgbe.c stable/9/sys/dev/ixgbe/ixgbe_osdep.h stable/9/sys/dev/ixgbe/ixv.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:06:38 2011 (r229152) +++ stable/9/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:12:26 2011 (r229153) @@ -265,7 +265,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixg * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixgbe_header_split = FALSE; +static int ixgbe_header_split = FALSE; TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split); /* @@ -3017,7 +3017,7 @@ ixgbe_free_transmit_buffers(struct tx_ri * **********************************************************************/ -static boolean_t +static bool ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -3135,7 +3135,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -3299,7 +3299,7 @@ ixgbe_atr(struct tx_ring *txr, struct mb * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixgbe_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; Modified: stable/9/sys/dev/ixgbe/ixgbe_osdep.h ============================================================================== --- stable/9/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:06:38 2011 (r229152) +++ stable/9/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:12:26 2011 (r229153) @@ -95,7 +95,9 @@ typedef uint16_t u16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define le16_to_cpu Modified: stable/9/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/9/sys/dev/ixgbe/ixv.c Sat Dec 31 20:06:38 2011 (r229152) +++ stable/9/sys/dev/ixgbe/ixv.c Sat Dec 31 20:12:26 2011 (r229153) @@ -207,7 +207,7 @@ TUNABLE_INT("hw.ixv.flow_control", &ixv_ * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixv_header_split = FALSE; +static int ixv_header_split = FALSE; TUNABLE_INT("hw.ixv.hdr_split", &ixv_header_split); /* @@ -2374,7 +2374,7 @@ ixv_free_transmit_buffers(struct tx_ring * **********************************************************************/ -static boolean_t +static bool ixv_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -2497,7 +2497,7 @@ ixv_tx_ctx_setup(struct tx_ring *txr, st * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixv_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -2586,7 +2586,7 @@ ixv_tso_setup(struct tx_ring *txr, struc * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixv_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:15:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01BB01065675; Sat, 31 Dec 2011 20:15:47 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D6A398FC08; Sat, 31 Dec 2011 20:15:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKFkXR081431; Sat, 31 Dec 2011 20:15:46 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKFkpd081427; Sat, 31 Dec 2011 20:15:46 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312015.pBVKFkpd081427@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:15:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229154 - stable/8/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:15:47 -0000 Author: mdf Date: Sat Dec 31 20:15:46 2011 New Revision: 229154 URL: http://svn.freebsd.org/changeset/base/229154 Log: MFC r228440: Consistently use types in ixgbe driver code: - {ixgbe,ixv}_header_split is passed to TUNABLE_INT, so delcare it int, not bool. - {ixgbe,ixv}_tx_ctx_setup() returns a boolean value, so declare it bool, not int. - {ixgbe,ixv}_tso_setup() returns a bool, so declare it bool, not boolean_t. - {ixgbe,ixv}_txeof() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool if the symbol already exists. Modified: stable/8/sys/dev/ixgbe/ixgbe.c stable/8/sys/dev/ixgbe/ixgbe_osdep.h stable/8/sys/dev/ixgbe/ixv.c Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:12:26 2011 (r229153) +++ stable/8/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:15:46 2011 (r229154) @@ -264,7 +264,7 @@ TUNABLE_INT("hw.ixgbe.enable_msix", &ixg * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixgbe_header_split = FALSE; +static int ixgbe_header_split = FALSE; TUNABLE_INT("hw.ixgbe.hdr_split", &ixgbe_header_split); /* @@ -2990,7 +2990,7 @@ ixgbe_free_transmit_buffers(struct tx_ri * **********************************************************************/ -static boolean_t +static bool ixgbe_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -3108,7 +3108,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -3272,7 +3272,7 @@ ixgbe_atr(struct tx_ring *txr, struct mb * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixgbe_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; Modified: stable/8/sys/dev/ixgbe/ixgbe_osdep.h ============================================================================== --- stable/8/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:12:26 2011 (r229153) +++ stable/8/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:15:46 2011 (r229154) @@ -95,7 +95,9 @@ typedef uint16_t u16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define le16_to_cpu Modified: stable/8/sys/dev/ixgbe/ixv.c ============================================================================== --- stable/8/sys/dev/ixgbe/ixv.c Sat Dec 31 20:12:26 2011 (r229153) +++ stable/8/sys/dev/ixgbe/ixv.c Sat Dec 31 20:15:46 2011 (r229154) @@ -206,7 +206,7 @@ TUNABLE_INT("hw.ixv.flow_control", &ixv_ * it can be a performance win in some workloads, but * in others it actually hurts, its off by default. */ -static bool ixv_header_split = FALSE; +static int ixv_header_split = FALSE; TUNABLE_INT("hw.ixv.hdr_split", &ixv_header_split); /* @@ -2336,7 +2336,7 @@ ixv_free_transmit_buffers(struct tx_ring * **********************************************************************/ -static boolean_t +static bool ixv_tx_ctx_setup(struct tx_ring *txr, struct mbuf *mp) { struct adapter *adapter = txr->adapter; @@ -2459,7 +2459,7 @@ ixv_tx_ctx_setup(struct tx_ring *txr, st * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixv_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -2548,7 +2548,7 @@ ixv_tso_setup(struct tx_ring *txr, struc * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixv_txeof(struct tx_ring *txr) { struct adapter *adapter = txr->adapter; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:26:06 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D9D1106566C; Sat, 31 Dec 2011 20:26:06 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E0CA18FC08; Sat, 31 Dec 2011 20:26:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKQ5V9081826; Sat, 31 Dec 2011 20:26:05 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKQ5TF081823; Sat, 31 Dec 2011 20:26:05 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312026.pBVKQ5TF081823@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:26:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229155 - stable/7/sys/dev/ixgbe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:26:06 -0000 Author: mdf Date: Sat Dec 31 20:26:05 2011 New Revision: 229155 URL: http://svn.freebsd.org/changeset/base/229155 Log: MFC r228440: Consistently use types in ixgbe driver code: - ixgbe_tso_setup() returns a bool, so declare it bool, not boolean_t. - ixgbe_txeof() returns a bool, so declare it bool, not boolean_t. - Do not re-define bool if the symbol already exists. Note this is a partial MFC since ixgbe_tx_ctx_setup() returns more than TRUE/FALSE on stable/7 and ixgbe_header_split tunable does not exist. Modified: stable/7/sys/dev/ixgbe/ixgbe.c stable/7/sys/dev/ixgbe/ixgbe_osdep.h Directory Properties: stable/7/sys/ (props changed) Modified: stable/7/sys/dev/ixgbe/ixgbe.c ============================================================================== --- stable/7/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:15:46 2011 (r229154) +++ stable/7/sys/dev/ixgbe/ixgbe.c Sat Dec 31 20:26:05 2011 (r229155) @@ -152,7 +152,7 @@ static void ixgbe_dma_free(struct ad static void ixgbe_add_rx_process_limit(struct adapter *, const char *, const char *, int *, int); static int ixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *); -static boolean_t ixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *); +static bool ixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *); static void ixgbe_set_ivar(struct adapter *, u16, u8, s8); static void ixgbe_configure_ivars(struct adapter *); static u8 * ixgbe_mc_array_itr(struct ixgbe_hw *, u8 **, u32 *); @@ -3043,7 +3043,7 @@ ixgbe_tx_ctx_setup(struct tx_ring *txr, * adapters using advanced tx descriptors * **********************************************************************/ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { struct adapter *adapter = txr->adapter; @@ -3126,7 +3126,7 @@ ixgbe_tso_setup(struct tx_ring *txr, str #else /* For 6.2 RELEASE */ /* This makes it easy to keep the code common */ -static boolean_t +static bool ixgbe_tso_setup(struct tx_ring *txr, struct mbuf *mp, u32 *paylen) { return (FALSE); @@ -3140,7 +3140,7 @@ ixgbe_tso_setup(struct tx_ring *txr, str * tx_buffer is put back on the free queue. * **********************************************************************/ -static boolean_t +static bool ixgbe_txeof(struct tx_ring *txr) { struct adapter * adapter = txr->adapter; Modified: stable/7/sys/dev/ixgbe/ixgbe_osdep.h ============================================================================== --- stable/7/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:15:46 2011 (r229154) +++ stable/7/sys/dev/ixgbe/ixgbe_osdep.h Sat Dec 31 20:26:05 2011 (r229155) @@ -92,7 +92,9 @@ typedef uint16_t u16; typedef uint32_t u32; typedef int32_t s32; typedef uint64_t u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif #define le16_to_cpu From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:27:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 930F7106564A; Sat, 31 Dec 2011 20:27:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C8408FC0C; Sat, 31 Dec 2011 20:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKRaNL081918; Sat, 31 Dec 2011 20:27:36 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKRa01081916; Sat, 31 Dec 2011 20:27:36 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112312027.pBVKRa01081916@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 20:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229156 - stable/9/sbin/routed/rtquery X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:27:36 -0000 Author: dim Date: Sat Dec 31 20:27:36 2011 New Revision: 229156 URL: http://svn.freebsd.org/changeset/base/229156 Log: MFC r228607: Use NO_WARRAY_BOUNDS for sbin/routed/rtquery. Modified: stable/9/sbin/routed/rtquery/Makefile Directory Properties: stable/9/sbin/routed/rtquery/ (props changed) Modified: stable/9/sbin/routed/rtquery/Makefile ============================================================================== --- stable/9/sbin/routed/rtquery/Makefile Sat Dec 31 20:26:05 2011 (r229155) +++ stable/9/sbin/routed/rtquery/Makefile Sat Dec 31 20:27:36 2011 (r229156) @@ -7,5 +7,6 @@ MAN= rtquery.8 LDADD= -lmd DPADD= ${LIBMD} WARNS?= 3 +NO_WARRAY_BOUNDS= .include From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:42:34 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7810106566B; Sat, 31 Dec 2011 20:42:34 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B877C8FC0C; Sat, 31 Dec 2011 20:42:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKgY31082435; Sat, 31 Dec 2011 20:42:34 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKgYZ1082428; Sat, 31 Dec 2011 20:42:34 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312042.pBVKgYZ1082428@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229157 - in stable/9/sys: dev/cxgbe dev/drm dev/speaker dev/tws dev/vxge ofed/include/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:42:35 -0000 Author: mdf Date: Sat Dec 31 20:42:34 2011 New Revision: 229157 URL: http://svn.freebsd.org/changeset/base/229157 Log: MFC r228443: Do not define bool/true/false if the symbols already exist. Modified: stable/9/sys/dev/cxgbe/osdep.h stable/9/sys/dev/drm/i915_drv.h stable/9/sys/dev/speaker/spkr.c stable/9/sys/dev/tws/tws.h stable/9/sys/dev/vxge/vxge-osdep.h stable/9/sys/ofed/include/linux/types.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/9/sys/dev/cxgbe/osdep.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/cxgbe/osdep.h Sat Dec 31 20:42:34 2011 (r229157) @@ -70,9 +70,11 @@ typedef uint64_t __be64; #error "Must set BYTE_ORDER" #endif +#ifndef __bool_true_false_are_defined typedef boolean_t bool; #define false FALSE #define true TRUE +#endif #define mdelay(x) DELAY((x) * 1000) #define udelay(x) DELAY(x) Modified: stable/9/sys/dev/drm/i915_drv.h ============================================================================== --- stable/9/sys/dev/drm/i915_drv.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/drm/i915_drv.h Sat Dec 31 20:42:34 2011 (r229157) @@ -560,7 +560,7 @@ extern void opregion_enable_asle(struct LOCK_TEST_WITH_RETURN(dev, file_priv); \ } while (0) -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) && !defined(__bool_true_false_are_defined) typedef boolean_t bool; #endif Modified: stable/9/sys/dev/speaker/spkr.c ============================================================================== --- stable/9/sys/dev/speaker/spkr.c Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/speaker/spkr.c Sat Dec 31 20:42:34 2011 (r229157) @@ -130,7 +130,9 @@ rest(int centisecs) * except possibly at physical block boundaries. */ +#ifndef __bool_true_false_are_defined typedef int bool; +#endif #define TRUE 1 #define FALSE 0 Modified: stable/9/sys/dev/tws/tws.h ============================================================================== --- stable/9/sys/dev/tws/tws.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/tws/tws.h Sat Dec 31 20:42:34 2011 (r229157) @@ -205,7 +205,11 @@ struct tws_init_connect_info { /* ------------ boolean types ------------------- */ +#ifndef __bool_true_false_are_defined typedef enum _boolean { false, true } boolean; +#else +#define boolean bool +#endif enum err { SUCCESS, FAILURE }; /* ----------- per instance data ---------------- */ Modified: stable/9/sys/dev/vxge/vxge-osdep.h ============================================================================== --- stable/9/sys/dev/vxge/vxge-osdep.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/dev/vxge/vxge-osdep.h Sat Dec 31 20:42:34 2011 (r229157) @@ -161,7 +161,9 @@ typedef uint16_t u16; typedef int32_t s32; typedef uint32_t u32; typedef unsigned long long int u64; +#ifndef __bool_true_false_are_defined typedef boolean_t bool; +#endif typedef bus_addr_t dma_addr_t; typedef struct mtx spinlock_t; typedef struct resource *pci_irq_h; Modified: stable/9/sys/ofed/include/linux/types.h ============================================================================== --- stable/9/sys/ofed/include/linux/types.h Sat Dec 31 20:27:36 2011 (r229156) +++ stable/9/sys/ofed/include/linux/types.h Sat Dec 31 20:42:34 2011 (r229157) @@ -39,9 +39,11 @@ typedef __u32 __le32; typedef __u32 __be32; typedef __u64 __le64; typedef __u64 __be64; +#ifndef __bool_true_false_are_defined typedef _Bool bool; #define true TRUE #define false FALSE +#endif typedef unsigned long kernel_ulong_t; typedef unsigned int uint; From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:46:36 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A29D5106564A; Sat, 31 Dec 2011 20:46:36 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 715708FC08; Sat, 31 Dec 2011 20:46:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVKkauP082678; Sat, 31 Dec 2011 20:46:36 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVKkaQp082673; Sat, 31 Dec 2011 20:46:36 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201112312046.pBVKkaQp082673@svn.freebsd.org> From: Matthew D Fleming Date: Sat, 31 Dec 2011 20:46:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229158 - in stable/8/sys/dev: cxgbe drm speaker tws X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:46:36 -0000 Author: mdf Date: Sat Dec 31 20:46:35 2011 New Revision: 229158 URL: http://svn.freebsd.org/changeset/base/229158 Log: MFC r228443: Do not define bool/true/false if the symbols already exist. Note that the ofed and dev/vxge parts of r228443 are not in stable/8. Modified: stable/8/sys/dev/cxgbe/osdep.h stable/8/sys/dev/drm/i915_drv.h stable/8/sys/dev/speaker/spkr.c stable/8/sys/dev/tws/tws.h Directory Properties: stable/8/sys/ (props changed) Modified: stable/8/sys/dev/cxgbe/osdep.h ============================================================================== --- stable/8/sys/dev/cxgbe/osdep.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/cxgbe/osdep.h Sat Dec 31 20:46:35 2011 (r229158) @@ -70,9 +70,11 @@ typedef uint64_t __be64; #error "Must set BYTE_ORDER" #endif +#ifndef __bool_true_false_are_defined typedef boolean_t bool; #define false FALSE #define true TRUE +#endif #define mdelay(x) DELAY((x) * 1000) #define udelay(x) DELAY(x) Modified: stable/8/sys/dev/drm/i915_drv.h ============================================================================== --- stable/8/sys/dev/drm/i915_drv.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/drm/i915_drv.h Sat Dec 31 20:46:35 2011 (r229158) @@ -560,7 +560,7 @@ extern void opregion_enable_asle(struct LOCK_TEST_WITH_RETURN(dev, file_priv); \ } while (0) -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) && !defined(__bool_true_false_are_defined) typedef boolean_t bool; #endif Modified: stable/8/sys/dev/speaker/spkr.c ============================================================================== --- stable/8/sys/dev/speaker/spkr.c Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/speaker/spkr.c Sat Dec 31 20:46:35 2011 (r229158) @@ -130,7 +130,9 @@ rest(int centisecs) * except possibly at physical block boundaries. */ +#ifndef __bool_true_false_are_defined typedef int bool; +#endif #define TRUE 1 #define FALSE 0 Modified: stable/8/sys/dev/tws/tws.h ============================================================================== --- stable/8/sys/dev/tws/tws.h Sat Dec 31 20:42:34 2011 (r229157) +++ stable/8/sys/dev/tws/tws.h Sat Dec 31 20:46:35 2011 (r229158) @@ -205,7 +205,11 @@ struct tws_init_connect_info { /* ------------ boolean types ------------------- */ +#ifndef __bool_true_false_are_defined typedef enum _boolean { false, true } boolean; +#else +#define boolean bool +#endif enum err { SUCCESS, FAILURE }; /* ----------- per instance data ---------------- */ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 20:58:39 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C3F4106564A; Sat, 31 Dec 2011 20:58:39 +0000 (UTC) (envelope-from sobomax@sippysoft.com) Received: from mail.sippysoft.com (mail.sippysoft.com [4.59.13.245]) by mx1.freebsd.org (Postfix) with ESMTP id 393EF8FC12; Sat, 31 Dec 2011 20:58:39 +0000 (UTC) Received: from s0106005004e13421.vs.shawcable.net ([70.71.175.212] helo=[192.168.1.79]) by mail.sippysoft.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1Rh60j-000HDl-RD; Sat, 31 Dec 2011 12:58:38 -0800 Message-ID: <4EFF7775.8010906@FreeBSD.org> Date: Sat, 31 Dec 2011 12:58:29 -0800 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: Kostik Belousov References: <201110071343.p97Dh1c9013228@svn.freebsd.org> <4EFE0FC1.6070909@FreeBSD.org> <20111230200249.GF12721@FreeBSD.org> <4EFE5481.6050707@FreeBSD.org> <4EFE5665.1070902@FreeBSD.org> <20111231075227.GX50300@deviant.kiev.zoral.com.ua> In-Reply-To: <20111231075227.GX50300@deviant.kiev.zoral.com.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: sobomax@sippysoft.com X-ssp-trusted: yes Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , Andre Oppermann , src-committers@freebsd.org Subject: Re: svn: head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 20:58:39 -0000 On 12/30/2011 11:52 PM, Kostik Belousov wrote: > On Fri, Dec 30, 2011 at 04:25:09PM -0800, Maxim Sobolev wrote: >> > On 12/30/2011 4:17 PM, Maxim Sobolev wrote: >>>> > >>M> Won't this break whole lot of third-party software, which expects >>>> > >>M> FreeBSD to be slightly different in this regards? Just curious. >>>> > >> >>>> > >>Yes it does. And until FreeBSD 10.0-RELEASE there is time to fix >>>> > >>this software (at least in ports). >>>> > >> >>>> > >>The MFC to stable/9 of r226105 was back out. >>> > > >>> > >Well, I am just curious how critical it is to get it resolved and is >>> > >there any way to avoid ABI breakage. Software compiled for 9.x won't run >>> > >on 10.x even when fitted with the proper compat libs, as far as I can >>> > >tell and not all software can be easily recompiled. >> > >> > P.S. It should be trivial to put some COMPAT_8/COMPAT_9 shims based on >> > the version of the ELF image (i.e. detect if the binary is< than >> > FreeBSD 10. > What exactly do you mean by 'version of the ELF image' ? ABI note tag ? > What do you propose to do if older call comes from dso, or a library > statically linked in the main binary ? Well, 9.x binary would be linked to 9.x library and vice versa. So I don't see any problems either way. [ssp-root@jood1 /home/ssp]$ file /bin/sh /bin/sh: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 8.2 (802510), stripped Technically yes, 10.x binary can open 9.x DSO and we won't know, but I don't think this situation would happen in real life. -Maxim From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 22:35:47 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4502E106564A; Sat, 31 Dec 2011 22:35:47 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FBED8FC1B; Sat, 31 Dec 2011 22:35:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVMZlrg085979; Sat, 31 Dec 2011 22:35:47 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVMZll5085971; Sat, 31 Dec 2011 22:35:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112312235.pBVMZll5085971@svn.freebsd.org> From: Adrian Chadd Date: Sat, 31 Dec 2011 22:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229159 - in vendor/xz-embedded: . dist dist/linux dist/linux/Documentation dist/linux/include dist/linux/include/linux dist/linux/include/linux/decompress dist/linux/lib dist/linux/lib... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 22:35:47 -0000 Author: adrian Date: Sat Dec 31 22:35:46 2011 New Revision: 229159 URL: http://svn.freebsd.org/changeset/base/229159 Log: Import xz-embedded from git. This is from commit hash '48f4588342f4a4e0182a6740e25675fd8e6c6295'. Added: vendor/xz-embedded/ vendor/xz-embedded/dist/ vendor/xz-embedded/dist/COPYING vendor/xz-embedded/dist/README vendor/xz-embedded/dist/linux/ vendor/xz-embedded/dist/linux/Documentation/ vendor/xz-embedded/dist/linux/Documentation/xz.txt vendor/xz-embedded/dist/linux/include/ vendor/xz-embedded/dist/linux/include/linux/ vendor/xz-embedded/dist/linux/include/linux/decompress/ vendor/xz-embedded/dist/linux/include/linux/decompress/unxz.h vendor/xz-embedded/dist/linux/include/linux/xz.h vendor/xz-embedded/dist/linux/lib/ vendor/xz-embedded/dist/linux/lib/decompress_unxz.c vendor/xz-embedded/dist/linux/lib/xz/ vendor/xz-embedded/dist/linux/lib/xz/Kconfig vendor/xz-embedded/dist/linux/lib/xz/Makefile vendor/xz-embedded/dist/linux/lib/xz/xz_crc32.c vendor/xz-embedded/dist/linux/lib/xz/xz_dec_bcj.c vendor/xz-embedded/dist/linux/lib/xz/xz_dec_lzma2.c vendor/xz-embedded/dist/linux/lib/xz/xz_dec_stream.c vendor/xz-embedded/dist/linux/lib/xz/xz_dec_syms.c vendor/xz-embedded/dist/linux/lib/xz/xz_dec_test.c vendor/xz-embedded/dist/linux/lib/xz/xz_lzma2.h vendor/xz-embedded/dist/linux/lib/xz/xz_private.h vendor/xz-embedded/dist/linux/lib/xz/xz_stream.h vendor/xz-embedded/dist/linux/scripts/ vendor/xz-embedded/dist/linux/scripts/xz_wrap.sh (contents, props changed) vendor/xz-embedded/dist/userspace/ vendor/xz-embedded/dist/userspace/Makefile vendor/xz-embedded/dist/userspace/boottest.c vendor/xz-embedded/dist/userspace/buftest.c vendor/xz-embedded/dist/userspace/xz_config.h vendor/xz-embedded/dist/userspace/xzminidec.c Added: vendor/xz-embedded/dist/COPYING ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz-embedded/dist/COPYING Sat Dec 31 22:35:46 2011 (r229159) @@ -0,0 +1,10 @@ + +Licensing of XZ Embedded +======================== + + All the files in this package have been written by Lasse Collin + and/or Igor Pavlov. All these files have been put into the + public domain. You can do whatever you want with these files. + + As usual, this software is provided "as is", without any warranty. + Added: vendor/xz-embedded/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz-embedded/dist/README Sat Dec 31 22:35:46 2011 (r229159) @@ -0,0 +1,127 @@ + +XZ Embedded +=========== + + XZ Embedded is a relatively small, limited implementation of the .xz + file format. Currently only decoding is implemented. + + XZ Embedded was written for use in the Linux kernel, but the code can + be easily used in other environments too, including regular userspace + applications. + + This README contains information that is useful only when the copy + of XZ Embedded isn't part of the Linux kernel tree. You should also + read linux/Documentation/xz.txt even if you aren't using XZ Embedded + as part of Linux; information in that file is not repeated in this + README. + +Compiling the Linux kernel module + + The xz_dec module depends on crc32 module, so make sure that you have + it enabled (CONFIG_CRC32). + + Building the xz_dec and xz_dec_test modules without support for BCJ + filters: + + cd linux/lib/xz + make -C /path/to/kernel/source \ + KCPPFLAGS=-I"$(pwd)/../../include" M="$(pwd)" \ + CONFIG_XZ_DEC=m CONFIG_XZ_DEC_TEST=m + + Building the xz_dec and xz_dec_test modules with support for BCJ + filters: + + cd linux/lib/xz + make -C /path/to/kernel/source \ + KCPPFLAGS=-I"$(pwd)/../../include" M="$(pwd)" \ + CONFIG_XZ_DEC=m CONFIG_XZ_DEC_TEST=m CONFIG_XZ_DEC_BCJ=y \ + CONFIG_XZ_DEC_X86=y CONFIG_XZ_DEC_POWERPC=y \ + CONFIG_XZ_DEC_IA64=y CONFIG_XZ_DEC_ARM=y \ + CONFIG_XZ_DEC_ARMTHUMB=y CONFIG_XZ_DEC_SPARC=y + + If you want only one or a few of the BCJ filters, omit the appropriate + variables. CONFIG_XZ_DEC_BCJ=y is always required to build the support + code shared between all BCJ filters. + + Most people don't need the xz_dec_test module. You can skip building + it by omitting CONFIG_XZ_DEC_TEST=m from the make command line. + +Compiler requirements + + XZ Embedded should compile as either GNU-C89 (used in the Linux + kernel) or with any C99 compiler. Getting the code to compile with + non-GNU C89 compiler or a C++ compiler should be quite easy as + long as there is a data type for unsigned 64-bit integer (or the + code is modified not to support large files, which needs some more + care than just using 32-bit integer instead of 64-bit). + + If you use GCC, try to use a recent version. For example, on x86-32, + xz_dec_lzma2.c compiled with GCC 3.3.6 is 15-25 % slower than when + compiled with GCC 4.3.3. + +Embedding into userspace applications + + To embed the XZ decoder, copy the following files into a single + directory in your source code tree: + + linux/include/linux/xz.h + linux/lib/xz/xz_crc32.c + linux/lib/xz/xz_dec_lzma2.c + linux/lib/xz/xz_dec_stream.c + linux/lib/xz/xz_lzma2.h + linux/lib/xz/xz_private.h + linux/lib/xz/xz_stream.h + userspace/xz_config.h + + Alternatively, xz.h may be placed into a different directory but then + that directory must be in the compiler include path when compiling + the .c files. + + Your code should use only the functions declared in xz.h. The rest of + the .h files are meant only for internal use in XZ Embedded. + + You may want to modify xz_config.h to be more suitable for your build + environment. Probably you should at least skim through it even if the + default file works as is. + +BCJ filter support + + If you want support for one or more BCJ filters, you need to copy also + linux/lib/xz/xz_dec_bcj.c into your application, and use appropriate + #defines in xz_config.h or in compiler flags. You don't need these + #defines in the code that just uses XZ Embedded via xz.h, but having + them always #defined doesn't hurt either. + + #define Instruction set BCJ filter endianness + XZ_DEC_X86 x86-32 or x86-64 Little endian only + XZ_DEC_POWERPC PowerPC Big endian only + XZ_DEC_IA64 Itanium (IA-64) Big or little endian + XZ_DEC_ARM ARM Little endian only + XZ_DEC_ARMTHUMB ARM-Thumb Little endian only + XZ_DEC_SPARC SPARC Big or little endian + + While some architectures are (partially) bi-endian, the endianness + setting doesn't change the endianness of the instructions on all + architectures. That's why Itanium and SPARC filters work for both big + and little endian executables (Itanium has little endian instructions + and SPARC has big endian instructions). + + There currently is no filter for little endian PowerPC or big endian + ARM or ARM-Thumb. Implementing filters for them can be considered if + there is a need for such filters in real-world applications. + +Notes about shared libraries + + If you are including XZ Embedded into a shared library, you very + probably should rename the xz_* functions to prevent symbol + conflicts in case your library is linked against some other library + or application that also has XZ Embedded in it (which may even be + a different version of XZ Embedded). TODO: Provide an easy way + to do this. + + Please don't create a shared library of XZ Embedded itself unless + it is fine to rebuild everything depending on that shared library + everytime you upgrade to a newer version of XZ Embedded. There are + no API or ABI stability guarantees between different versions of + XZ Embedded. + Added: vendor/xz-embedded/dist/linux/Documentation/xz.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz-embedded/dist/linux/Documentation/xz.txt Sat Dec 31 22:35:46 2011 (r229159) @@ -0,0 +1,122 @@ + +XZ data compression in Linux +============================ + +Introduction + + XZ is a general purpose data compression format with high compression + ratio and relatively fast decompression. The primary compression + algorithm (filter) is LZMA2. Additional filters can be used to improve + compression ratio even further. E.g. Branch/Call/Jump (BCJ) filters + improve compression ratio of executable data. + + The XZ decompressor in Linux is called XZ Embedded. It supports + the LZMA2 filter and optionally also BCJ filters. CRC32 is supported + for integrity checking. The home page of XZ Embedded is at + , where you can find the + latest version and also information about using the code outside + the Linux kernel. + + For userspace, XZ Utils provide a zlib-like compression library + and a gzip-like command line tool. XZ Utils can be downloaded from + . + +XZ related components in the kernel + + The xz_dec module provides XZ decompressor with single-call (buffer + to buffer) and multi-call (stateful) APIs. The usage of the xz_dec + module is documented in include/linux/xz.h. + + The xz_dec_test module is for testing xz_dec. xz_dec_test is not + useful unless you are hacking the XZ decompressor. xz_dec_test + allocates a char device major dynamically to which one can write + .xz files from userspace. The decompressed output is thrown away. + Keep an eye on dmesg to see diagnostics printed by xz_dec_test. + See the xz_dec_test source code for the details. + + For decompressing the kernel image, initramfs, and initrd, there + is a wrapper function in lib/decompress_unxz.c. Its API is the + same as in other decompress_*.c files, which is defined in + include/linux/decompress/generic.h. + + scripts/xz_wrap.sh is a wrapper for the xz command line tool found + from XZ Utils. The wrapper sets compression options to values suitable + for compressing the kernel image. + + For kernel makefiles, two commands are provided for use with + $(call if_needed). The kernel image should be compressed with + $(call if_needed,xzkern) which will use a BCJ filter and a big LZMA2 + dictionary. It will also append a four-byte trailer containing the + uncompressed size of the file, which is needed by the boot code. + Other things should be compressed with $(call if_needed,xzmisc) + which will use no BCJ filter and 1 MiB LZMA2 dictionary. + +Notes on compression options + + Since the XZ Embedded supports only streams with no integrity check or + CRC32, make sure that you don't use some other integrity check type + when encoding files that are supposed to be decoded by the kernel. With + liblzma, you need to use either LZMA_CHECK_NONE or LZMA_CHECK_CRC32 + when encoding. With the xz command line tool, use --check=none or + --check=crc32. + + Using CRC32 is strongly recommended unless there is some other layer + which will verify the integrity of the uncompressed data anyway. + Double checking the integrity would probably be waste of CPU cycles. + Note that the headers will always have a CRC32 which will be validated + by the decoder; you can only change the integrity check type (or + disable it) for the actual uncompressed data. + + In userspace, LZMA2 is typically used with dictionary sizes of several + megabytes. The decoder needs to have the dictionary in RAM, thus big + dictionaries cannot be used for files that are intended to be decoded + by the kernel. 1 MiB is probably the maximum reasonable dictionary + size for in-kernel use (maybe more is OK for initramfs). The presets + in XZ Utils may not be optimal when creating files for the kernel, + so don't hesitate to use custom settings. Example: + + xz --check=crc32 --lzma2=dict=512KiB inputfile + + An exception to above dictionary size limitation is when the decoder + is used in single-call mode. Decompressing the kernel itself is an + example of this situation. In single-call mode, the memory usage + doesn't depend on the dictionary size, and it is perfectly fine to + use a big dictionary: for maximum compression, the dictionary should + be at least as big as the uncompressed data itself. + +Future plans + + Creating a limited XZ encoder may be considered if people think it is + useful. LZMA2 is slower to compress than e.g. Deflate or LZO even at + the fastest settings, so it isn't clear if LZMA2 encoder is wanted + into the kernel. + + Support for limited random-access reading is planned for the + decompression code. I don't know if it could have any use in the + kernel, but I know that it would be useful in some embedded projects + outside the Linux kernel. + +Conformance to the .xz file format specification + + There are a couple of corner cases where things have been simplified + at expense of detecting errors as early as possible. These should not + matter in practice all, since they don't cause security issues. But + it is good to know this if testing the code e.g. with the test files + from XZ Utils. + +Reporting bugs + + Before reporting a bug, please check that it's not fixed already + at upstream. See to get the + latest code. + + Report bugs to or visit #tukaani on + Freenode and talk to Larhzu. I don't actively read LKML or other + kernel-related mailing lists, so if there's something I should know, + you should email to me personally or use IRC. + + Don't bother Igor Pavlov with questions about the XZ implementation + in the kernel or about XZ Utils. While these two implementations + include essential code that is directly based on Igor Pavlov's code, + these implementations aren't maintained nor supported by him. + Added: vendor/xz-embedded/dist/linux/include/linux/decompress/unxz.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz-embedded/dist/linux/include/linux/decompress/unxz.h Sat Dec 31 22:35:46 2011 (r229159) @@ -0,0 +1,19 @@ +/* + * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd + * + * Author: Lasse Collin + * + * This file has been put into the public domain. + * You can do whatever you want with this file. + */ + +#ifndef DECOMPRESS_UNXZ_H +#define DECOMPRESS_UNXZ_H + +int unxz(unsigned char *in, int in_size, + int (*fill)(void *dest, unsigned int size), + int (*flush)(void *src, unsigned int size), + unsigned char *out, int *in_used, + void (*error)(char *x)); + +#endif Added: vendor/xz-embedded/dist/linux/include/linux/xz.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz-embedded/dist/linux/include/linux/xz.h Sat Dec 31 22:35:46 2011 (r229159) @@ -0,0 +1,273 @@ +/* + * XZ decompressor + * + * Authors: Lasse Collin + * Igor Pavlov + * + * This file has been put into the public domain. + * You can do whatever you want with this file. + */ + +#ifndef XZ_H +#define XZ_H + +#ifdef __KERNEL__ +# include +# include +#else +# include +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* In Linux, this is used to make extern functions static when needed. */ +#ifndef XZ_EXTERN +# define XZ_EXTERN extern +#endif + +/** + * enum xz_mode - Operation mode + * + * @XZ_SINGLE: Single-call mode. This uses less RAM than + * than multi-call modes, because the LZMA2 + * dictionary doesn't need to be allocated as + * part of the decoder state. All required data + * structures are allocated at initialization, + * so xz_dec_run() cannot return XZ_MEM_ERROR. + * @XZ_PREALLOC: Multi-call mode with preallocated LZMA2 + * dictionary buffer. All data structures are + * allocated at initialization, so xz_dec_run() + * cannot return XZ_MEM_ERROR. + * @XZ_DYNALLOC: Multi-call mode. The LZMA2 dictionary is + * allocated once the required size has been + * parsed from the stream headers. If the + * allocation fails, xz_dec_run() will return + * XZ_MEM_ERROR. + * + * It is possible to enable support only for a subset of the above + * modes at compile time by defining XZ_DEC_SINGLE, XZ_DEC_PREALLOC, + * or XZ_DEC_DYNALLOC. The xz_dec kernel module is always compiled + * with support for all operation modes, but the preboot code may + * be built with fewer features to minimize code size. + */ +enum xz_mode { + XZ_SINGLE, + XZ_PREALLOC, + XZ_DYNALLOC +}; + +/** + * enum xz_ret - Return codes + * @XZ_OK: Everything is OK so far. More input or more + * output space is required to continue. This + * return code is possible only in multi-call mode + * (XZ_PREALLOC or XZ_DYNALLOC). + * @XZ_STREAM_END: Operation finished successfully. + * @XZ_UNSUPPORTED_CHECK: Integrity check type is not supported. Decoding + * is still possible in multi-call mode by simply + * calling xz_dec_run() again. + * Note that this return value is used only if + * XZ_DEC_ANY_CHECK was defined at build time, + * which is not used in the kernel. Unsupported + * check types return XZ_OPTIONS_ERROR if + * XZ_DEC_ANY_CHECK was not defined at build time. + * @XZ_MEM_ERROR: Allocating memory failed. This return code is + * possible only if the decoder was initialized + * with XZ_DYNALLOC. The amount of memory that was + * tried to be allocated was no more than the + * dict_max argument given to xz_dec_init(). + * @XZ_MEMLIMIT_ERROR: A bigger LZMA2 dictionary would be needed than + * allowed by the dict_max argument given to + * xz_dec_init(). This return value is possible + * only in multi-call mode (XZ_PREALLOC or + * XZ_DYNALLOC); the single-call mode (XZ_SINGLE) + * ignores the dict_max argument. + * @XZ_FORMAT_ERROR: File format was not recognized (wrong magic + * bytes). + * @XZ_OPTIONS_ERROR: This implementation doesn't support the requested + * compression options. In the decoder this means + * that the header CRC32 matches, but the header + * itself specifies something that we don't support. + * @XZ_DATA_ERROR: Compressed data is corrupt. + * @XZ_BUF_ERROR: Cannot make any progress. Details are slightly + * different between multi-call and single-call + * mode; more information below. + * + * In multi-call mode, XZ_BUF_ERROR is returned when two consecutive calls + * to XZ code cannot consume any input and cannot produce any new output. + * This happens when there is no new input available, or the output buffer + * is full while at least one output byte is still pending. Assuming your + * code is not buggy, you can get this error only when decoding a compressed + * stream that is truncated or otherwise corrupt. + * + * In single-call mode, XZ_BUF_ERROR is returned only when the output buffer + * is too small or the compressed input is corrupt in a way that makes the + * decoder produce more output than the caller expected. When it is + * (relatively) clear that the compressed input is truncated, XZ_DATA_ERROR + * is used instead of XZ_BUF_ERROR. + */ +enum xz_ret { + XZ_OK, + XZ_STREAM_END, + XZ_UNSUPPORTED_CHECK, + XZ_MEM_ERROR, + XZ_MEMLIMIT_ERROR, + XZ_FORMAT_ERROR, + XZ_OPTIONS_ERROR, + XZ_DATA_ERROR, + XZ_BUF_ERROR +}; + +/** + * struct xz_buf - Passing input and output buffers to XZ code + * @in: Beginning of the input buffer. This may be NULL if and only + * if in_pos is equal to in_size. + * @in_pos: Current position in the input buffer. This must not exceed + * in_size. + * @in_size: Size of the input buffer + * @out: Beginning of the output buffer. This may be NULL if and only + * if out_pos is equal to out_size. + * @out_pos: Current position in the output buffer. This must not exceed + * out_size. + * @out_size: Size of the output buffer + * + * Only the contents of the output buffer from out[out_pos] onward, and + * the variables in_pos and out_pos are modified by the XZ code. + */ +struct xz_buf { + const uint8_t *in; + size_t in_pos; + size_t in_size; + + uint8_t *out; + size_t out_pos; + size_t out_size; +}; + +/** + * struct xz_dec - Opaque type to hold the XZ decoder state + */ +struct xz_dec; + +/** + * xz_dec_init() - Allocate and initialize a XZ decoder state + * @mode: Operation mode + * @dict_max: Maximum size of the LZMA2 dictionary (history buffer) for + * multi-call decoding. This is ignored in single-call mode + * (mode == XZ_SINGLE). LZMA2 dictionary is always 2^n bytes + * or 2^n + 2^(n-1) bytes (the latter sizes are less common + * in practice), so other values for dict_max don't make sense. + * In the kernel, dictionary sizes of 64 KiB, 128 KiB, 256 KiB, + * 512 KiB, and 1 MiB are probably the only reasonable values, + * except for kernel and initramfs images where a bigger + * dictionary can be fine and useful. + * + * Single-call mode (XZ_SINGLE): xz_dec_run() decodes the whole stream at + * once. The caller must provide enough output space or the decoding will + * fail. The output space is used as the dictionary buffer, which is why + * there is no need to allocate the dictionary as part of the decoder's + * internal state. + * + * Because the output buffer is used as the workspace, streams encoded using + * a big dictionary are not a problem in single-call mode. It is enough that + * the output buffer is big enough to hold the actual uncompressed data; it + * can be smaller than the dictionary size stored in the stream headers. + * + * Multi-call mode with preallocated dictionary (XZ_PREALLOC): dict_max bytes + * of memory is preallocated for the LZMA2 dictionary. This way there is no + * risk that xz_dec_run() could run out of memory, since xz_dec_run() will + * never allocate any memory. Instead, if the preallocated dictionary is too + * small for decoding the given input stream, xz_dec_run() will return + * XZ_MEMLIMIT_ERROR. Thus, it is important to know what kind of data will be + * decoded to avoid allocating excessive amount of memory for the dictionary. + * + * Multi-call mode with dynamically allocated dictionary (XZ_DYNALLOC): + * dict_max specifies the maximum allowed dictionary size that xz_dec_run() + * may allocate once it has parsed the dictionary size from the stream + * headers. This way excessive allocations can be avoided while still + * limiting the maximum memory usage to a sane value to prevent running the + * system out of memory when decompressing streams from untrusted sources. + * + * On success, xz_dec_init() returns a pointer to struct xz_dec, which is + * ready to be used with xz_dec_run(). If memory allocation fails, + * xz_dec_init() returns NULL. + */ +XZ_EXTERN struct xz_dec *xz_dec_init(enum xz_mode mode, uint32_t dict_max); + +/** + * xz_dec_run() - Run the XZ decoder + * @s: Decoder state allocated using xz_dec_init() + * @b: Input and output buffers + * + * The possible return values depend on build options and operation mode. + * See enum xz_ret for details. + * + * Note that if an error occurs in single-call mode (return value is not + * XZ_STREAM_END), b->in_pos and b->out_pos are not modified and the + * contents of the output buffer from b->out[b->out_pos] onward are + * undefined. This is true even after XZ_BUF_ERROR, because with some filter + * chains, there may be a second pass over the output buffer, and this pass + * cannot be properly done if the output buffer is truncated. Thus, you + * cannot give the single-call decoder a too small buffer and then expect to + * get that amount valid data from the beginning of the stream. You must use + * the multi-call decoder if you don't want to uncompress the whole stream. + */ +XZ_EXTERN enum xz_ret xz_dec_run(struct xz_dec *s, struct xz_buf *b); + +/** + * xz_dec_reset() - Reset an already allocated decoder state + * @s: Decoder state allocated using xz_dec_init() + * + * This function can be used to reset the multi-call decoder state without + * freeing and reallocating memory with xz_dec_end() and xz_dec_init(). + * + * In single-call mode, xz_dec_reset() is always called in the beginning of + * xz_dec_run(). Thus, explicit call to xz_dec_reset() is useful only in + * multi-call mode. + */ +XZ_EXTERN void xz_dec_reset(struct xz_dec *s); + +/** + * xz_dec_end() - Free the memory allocated for the decoder state + * @s: Decoder state allocated using xz_dec_init(). If s is NULL, + * this function does nothing. + */ +XZ_EXTERN void xz_dec_end(struct xz_dec *s); + +/* + * Standalone build (userspace build or in-kernel build for boot time use) + * needs a CRC32 implementation. For normal in-kernel use, kernel's own + * CRC32 module is used instead, and users of this module don't need to + * care about the functions below. + */ +#ifndef XZ_INTERNAL_CRC32 +# ifdef __KERNEL__ +# define XZ_INTERNAL_CRC32 0 +# else +# define XZ_INTERNAL_CRC32 1 +# endif +#endif + +#if XZ_INTERNAL_CRC32 +/* + * This must be called before any other xz_* function to initialize + * the CRC32 lookup table. + */ +XZ_EXTERN void xz_crc32_init(void); + +/* + * Update CRC32 value using the polynomial from IEEE-802.3. To start a new + * calculation, the third argument must be zero. To continue the calculation, + * the previously returned value is passed as the third argument. + */ +XZ_EXTERN uint32_t xz_crc32(const uint8_t *buf, size_t size, uint32_t crc); +#endif + +#ifdef __cplusplus +} +#endif + +#endif Added: vendor/xz-embedded/dist/linux/lib/decompress_unxz.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz-embedded/dist/linux/lib/decompress_unxz.c Sat Dec 31 22:35:46 2011 (r229159) @@ -0,0 +1,397 @@ +/* + * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd + * + * Author: Lasse Collin + * + * This file has been put into the public domain. + * You can do whatever you want with this file. + */ + +/* + * Important notes about in-place decompression + * + * At least on x86, the kernel is decompressed in place: the compressed data + * is placed to the end of the output buffer, and the decompressor overwrites + * most of the compressed data. There must be enough safety margin to + * guarantee that the write position is always behind the read position. + * + * The safety margin for XZ with LZMA2 or BCJ+LZMA2 is calculated below. + * Note that the margin with XZ is bigger than with Deflate (gzip)! + * + * The worst case for in-place decompression is that the beginning of + * the file is compressed extremely well, and the rest of the file is + * uncompressible. Thus, we must look for worst-case expansion when the + * compressor is encoding uncompressible data. + * + * The structure of the .xz file in case of a compresed kernel is as follows. + * Sizes (as bytes) of the fields are in parenthesis. + * + * Stream Header (12) + * Block Header: + * Block Header (8-12) + * Compressed Data (N) + * Block Padding (0-3) + * CRC32 (4) + * Index (8-20) + * Stream Footer (12) + * + * Normally there is exactly one Block, but let's assume that there are + * 2-4 Blocks just in case. Because Stream Header and also Block Header + * of the first Block don't make the decompressor produce any uncompressed + * data, we can ignore them from our calculations. Block Headers of possible + * additional Blocks have to be taken into account still. With these + * assumptions, it is safe to assume that the total header overhead is + * less than 128 bytes. + * + * Compressed Data contains LZMA2 or BCJ+LZMA2 encoded data. Since BCJ + * doesn't change the size of the data, it is enough to calculate the + * safety margin for LZMA2. + * + * LZMA2 stores the data in chunks. Each chunk has a header whose size is + * a maximum of 6 bytes, but to get round 2^n numbers, let's assume that + * the maximum chunk header size is 8 bytes. After the chunk header, there + * may be up to 64 KiB of actual payload in the chunk. Often the payload is + * quite a bit smaller though; to be safe, let's assume that an average + * chunk has only 32 KiB of payload. + * + * The maximum uncompressed size of the payload is 2 MiB. The minimum + * uncompressed size of the payload is in practice never less than the + * payload size itself. The LZMA2 format would allow uncompressed size + * to be less than the payload size, but no sane compressor creates such + * files. LZMA2 supports storing uncompressible data in uncompressed form, + * so there's never a need to create payloads whose uncompressed size is + * smaller than the compressed size. + * + * The assumption, that the uncompressed size of the payload is never + * smaller than the payload itself, is valid only when talking about + * the payload as a whole. It is possible that the payload has parts where + * the decompressor consumes more input than it produces output. Calculating + * the worst case for this would be tricky. Instead of trying to do that, + * let's simply make sure that the decompressor never overwrites any bytes + * of the payload which it is currently reading. + * + * Now we have enough information to calculate the safety margin. We need + * - 128 bytes for the .xz file format headers; + * - 8 bytes per every 32 KiB of uncompressed size (one LZMA2 chunk header + * per chunk, each chunk having average payload size of 32 KiB); and + * - 64 KiB (biggest possible LZMA2 chunk payload size) to make sure that + * the decompressor never overwrites anything from the LZMA2 chunk + * payload it is currently reading. + * + * We get the following formula: + * + * safety_margin = 128 + uncompressed_size * 8 / 32768 + 65536 + * = 128 + (uncompressed_size >> 12) + 65536 + * + * For comparision, according to arch/x86/boot/compressed/misc.c, the + * equivalent formula for Deflate is this: + * + * safety_margin = 18 + (uncompressed_size >> 12) + 32768 + * + * Thus, when updating Deflate-only in-place kernel decompressor to + * support XZ, the fixed overhead has to be increased from 18+32768 bytes + * to 128+65536 bytes. + */ + +/* + * STATIC is defined to "static" if we are being built for kernel + * decompression (pre-boot code). will define + * STATIC to empty if it wasn't already defined. Since we will need to + * know later if we are being used for kernel decompression, we define + * XZ_PREBOOT here. + */ +#ifdef STATIC +# define XZ_PREBOOT +#endif +#ifdef __KERNEL__ +# include +#endif +#define XZ_EXTERN STATIC + +#ifndef XZ_PREBOOT +# include +# include +#else +/* + * Use the internal CRC32 code instead of kernel's CRC32 module, which + * is not available in early phase of booting. + */ +#define XZ_INTERNAL_CRC32 1 + +/* + * For boot time use, we enable only the BCJ filter of the current + * architecture or none if no BCJ filter is available for the architecture. + */ +#ifdef CONFIG_X86 +# define XZ_DEC_X86 +#endif +#ifdef CONFIG_PPC +# define XZ_DEC_POWERPC +#endif +#ifdef CONFIG_ARM +# define XZ_DEC_ARM +#endif +#ifdef CONFIG_IA64 +# define XZ_DEC_IA64 +#endif +#ifdef CONFIG_SPARC +# define XZ_DEC_SPARC +#endif + +/* + * This will get the basic headers so that memeq() and others + * can be defined. + */ +#include "xz/xz_private.h" + +/* + * Replace the normal allocation functions with the versions from + * . vfree() needs to support vfree(NULL) + * when XZ_DYNALLOC is used, but the pre-boot free() doesn't support it. + * Workaround it here because the other decompressors don't need it. + */ +#undef kmalloc +#undef kfree +#undef vmalloc +#undef vfree +#define kmalloc(size, flags) malloc(size) +#define kfree(ptr) free(ptr) +#define vmalloc(size) malloc(size) +#define vfree(ptr) do { if (ptr != NULL) free(ptr); } while (0) + +/* + * FIXME: Not all basic memory functions are provided in architecture-specific + * files (yet). We define our own versions here for now, but this should be + * only a temporary solution. + * + * memeq and memzero are not used much and any remotely sane implementation + * is fast enough. memcpy/memmove speed matters in multi-call mode, but + * the kernel image is decompressed in single-call mode, in which only + * memcpy speed can matter and only if there is a lot of uncompressible data + * (LZMA2 stores uncompressible chunks in uncompressed form). Thus, the + * functions below should just be kept small; it's probably not worth + * optimizing for speed. + */ + +#ifndef memeq +static bool memeq(const void *a, const void *b, size_t size) +{ + const uint8_t *x = a; + const uint8_t *y = b; + size_t i; + + for (i = 0; i < size; ++i) + if (x[i] != y[i]) + return false; + + return true; +} +#endif + +#ifndef memzero +static void memzero(void *buf, size_t size) +{ + uint8_t *b = buf; + uint8_t *e = b + size; + + while (b != e) + *b++ = '\0'; +} +#endif + +#ifndef memmove +/* Not static to avoid a conflict with the prototype in the Linux headers. */ +void *memmove(void *dest, const void *src, size_t size) +{ + uint8_t *d = dest; + const uint8_t *s = src; + size_t i; + + if (d < s) { + for (i = 0; i < size; ++i) + d[i] = s[i]; + } else if (d > s) { + i = size; + while (i-- > 0) + d[i] = s[i]; + } + + return dest; +} +#endif + +/* + * Since we need memmove anyway, would use it as memcpy too. + * Commented out for now to avoid breaking things. + */ +/* +#ifndef memcpy +# define memcpy memmove +#endif +*/ + +#include "xz/xz_crc32.c" +#include "xz/xz_dec_stream.c" +#include "xz/xz_dec_lzma2.c" +#include "xz/xz_dec_bcj.c" + +#endif /* XZ_PREBOOT */ + +/* Size of the input and output buffers in multi-call mode */ +#define XZ_IOBUF_SIZE 4096 + +/* + * This function implements the API defined in . + * + * This wrapper will automatically choose single-call or multi-call mode + * of the native XZ decoder API. The single-call mode can be used only when + * both input and output buffers are available as a single chunk, i.e. when + * fill() and flush() won't be used. + */ +STATIC int INIT unxz(unsigned char *in, int in_size, + int (*fill)(void *dest, unsigned int size), + int (*flush)(void *src, unsigned int size), + unsigned char *out, int *in_used, + void (*error)(char *x)) +{ + struct xz_buf b; + struct xz_dec *s; + enum xz_ret ret; + bool must_free_in = false; + +#if XZ_INTERNAL_CRC32 + xz_crc32_init(); +#endif + + if (in_used != NULL) + *in_used = 0; + + if (fill == NULL && flush == NULL) + s = xz_dec_init(XZ_SINGLE, 0); + else + s = xz_dec_init(XZ_DYNALLOC, (uint32_t)-1); + + if (s == NULL) + goto error_alloc_state; + + if (flush == NULL) { + b.out = out; + b.out_size = (size_t)-1; + } else { + b.out_size = XZ_IOBUF_SIZE; + b.out = malloc(XZ_IOBUF_SIZE); + if (b.out == NULL) + goto error_alloc_out; + } + + if (in == NULL) { + must_free_in = true; + in = malloc(XZ_IOBUF_SIZE); + if (in == NULL) + goto error_alloc_in; + } + + b.in = in; + b.in_pos = 0; + b.in_size = in_size; + b.out_pos = 0; + + if (fill == NULL && flush == NULL) { + ret = xz_dec_run(s, &b); + } else { + do { + if (b.in_pos == b.in_size && fill != NULL) { + if (in_used != NULL) + *in_used += b.in_pos; + + b.in_pos = 0; + + in_size = fill(in, XZ_IOBUF_SIZE); + if (in_size < 0) { + /* + * This isn't an optimal error code + * but it probably isn't worth making + * a new one either. + */ + ret = XZ_BUF_ERROR; + break; + } + + b.in_size = in_size; + } + + ret = xz_dec_run(s, &b); + + if (flush != NULL && (b.out_pos == b.out_size + || (ret != XZ_OK && b.out_pos > 0))) { + /* + * Setting ret here may hide an error + * returned by xz_dec_run(), but probably + * it's not too bad. + */ + if (flush(b.out, b.out_pos) != (int)b.out_pos) + ret = XZ_BUF_ERROR; + + b.out_pos = 0; + } + } while (ret == XZ_OK); + + if (must_free_in) + free(in); + + if (flush != NULL) + free(b.out); + } + + if (in_used != NULL) + *in_used += b.in_pos; + + xz_dec_end(s); + + switch (ret) { + case XZ_STREAM_END: + return 0; + + case XZ_MEM_ERROR: + /* This can occur only in multi-call mode. */ + error("XZ decompressor ran out of memory"); + break; + + case XZ_FORMAT_ERROR: + error("Input is not in the XZ format (wrong magic bytes)"); + break; + + case XZ_OPTIONS_ERROR: + error("Input was encoded with settings that are not " + "supported by this XZ decoder"); + break; + + case XZ_DATA_ERROR: + case XZ_BUF_ERROR: + error("XZ-compressed data is corrupt"); + break; + + default: + error("Bug in the XZ decompressor"); + break; + } + + return -1; + +error_alloc_in: + if (flush != NULL) + free(b.out); + +error_alloc_out: + xz_dec_end(s); + +error_alloc_state: + error("XZ decompressor ran out of memory"); + return -1; +} + +/* + * This macro is used by architecture-specific files to decompress + * the kernel image. + */ +#define decompress unxz Added: vendor/xz-embedded/dist/linux/lib/xz/Kconfig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/xz-embedded/dist/linux/lib/xz/Kconfig Sat Dec 31 22:35:46 2011 (r229159) @@ -0,0 +1,59 @@ +config XZ_DEC + tristate "XZ decompression support" + select CRC32 + help + LZMA2 compression algorithm and BCJ filters are supported using + the .xz file format as the container. For integrity checking, + CRC32 is supported. See Documentation/xz.txt for more information. + +config XZ_DEC_X86 + bool "x86 BCJ filter decoder" if EXPERT + default y + depends on XZ_DEC + select XZ_DEC_BCJ + +config XZ_DEC_POWERPC + bool "PowerPC BCJ filter decoder" if EXPERT + default y + depends on XZ_DEC + select XZ_DEC_BCJ + +config XZ_DEC_IA64 + bool "IA-64 BCJ filter decoder" if EXPERT + default y + depends on XZ_DEC + select XZ_DEC_BCJ + +config XZ_DEC_ARM + bool "ARM BCJ filter decoder" if EXPERT + default y + depends on XZ_DEC + select XZ_DEC_BCJ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 22:37:12 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D675F106564A; Sat, 31 Dec 2011 22:37:12 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA8B08FC0C; Sat, 31 Dec 2011 22:37:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVMbCb7086061; Sat, 31 Dec 2011 22:37:12 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVMbC1B086060; Sat, 31 Dec 2011 22:37:12 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112312237.pBVMbC1B086060@svn.freebsd.org> From: Adrian Chadd Date: Sat, 31 Dec 2011 22:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229160 - vendor/xz-embedded/48f4588342f4a4e0182a6740e25675fd8e6c6295 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 22:37:12 -0000 Author: adrian Date: Sat Dec 31 22:37:12 2011 New Revision: 229160 URL: http://svn.freebsd.org/changeset/base/229160 Log: Tag git revision 48f4588342f4a4e0182a6740e25675fd8e6c6295. Added: vendor/xz-embedded/48f4588342f4a4e0182a6740e25675fd8e6c6295/ - copied from r229159, vendor/xz-embedded/dist/ From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 23:21:37 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3340E106566C; Sat, 31 Dec 2011 23:21:37 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0761A8FC16; Sat, 31 Dec 2011 23:21:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVNLaot087504; Sat, 31 Dec 2011 23:21:36 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVNLa8l087502; Sat, 31 Dec 2011 23:21:36 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201112312321.pBVNLa8l087502@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 31 Dec 2011 23:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229161 - head/sys/mips/cavium X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 23:21:37 -0000 Author: gonzo Date: Sat Dec 31 23:21:36 2011 New Revision: 229161 URL: http://svn.freebsd.org/changeset/base/229161 Log: - struct clocktime sets different ranges for DOW and month comparing to struct timeval. for clocktime they should be 1..7 and 1..12 respectively - CAPK-0100ND uses RTC without centruy bit (DS1307) so set it 21st Modified: head/sys/mips/cavium/octeon_ds1337.c Modified: head/sys/mips/cavium/octeon_ds1337.c ============================================================================== --- head/sys/mips/cavium/octeon_ds1337.c Sat Dec 31 22:37:12 2011 (r229160) +++ head/sys/mips/cavium/octeon_ds1337.c Sat Dec 31 23:21:36 2011 (r229161) @@ -81,9 +81,9 @@ static int validate_ct_struct(struct clo CT_CHECK(ct->min < 0 || ct->min > 59, "minute"); CT_CHECK(ct->hour < 0 || ct->hour > 23, "hour"); CT_CHECK(ct->day < 1 || ct->day > 31, "day"); - CT_CHECK(ct->dow < 0 || ct->dow > 6, "day of week"); - CT_CHECK(ct->mon < 0 || ct->mon > 11, "month"); - CT_CHECK(ct->year < 0 || ct->year > 200,"year"); + CT_CHECK(ct->dow < 1 || ct->dow > 7, "day of week"); + CT_CHECK(ct->mon < 1 || ct->mon > 12, "month"); + CT_CHECK(ct->year > 2037,"year"); return rc; } @@ -124,10 +124,17 @@ uint32_t cvmx_rtc_ds1337_read(void) { ct.hour = (ct.hour + 12) % 24; } - ct.dow = (reg[3] & 0x7) - 1; /* Day of week field is 0..6 */ + ct.dow = (reg[3] & 0x7); /* Day of week field is 1..7 */ ct.day = bcd2bin(reg[4] & 0x3f); - ct.mon = bcd2bin(reg[5] & 0x1f) - 1; /* Month field is 0..11 */ - ct.year = ((reg[5] & 0x80) ? 100 : 0) + bcd2bin(reg[6]); + ct.mon = bcd2bin(reg[5] & 0x1f); /* Month field is 1..12 */ +#if defined(OCTEON_BOARD_CAPK_0100ND) + /* + * CAPK-0100ND uses DS1307 that does not have century bit + */ + ct.year = 2000 + bcd2bin(reg[6]); +#else + ct.year = ((reg[5] & 0x80) ? 2000 : 1900) + bcd2bin(reg[6]); +#endif if (validate_ct_struct(&ct)) @@ -166,11 +173,11 @@ int cvmx_rtc_ds1337_write(uint32_t time) reg[0] = bin2bcd(ct.sec); reg[1] = bin2bcd(ct.min); - reg[2] = bin2bcd(ct.hour); /* Force 0..23 format even if using AM/PM */ - reg[3] = bin2bcd(ct.dow + 1); + reg[2] = bin2bcd(ct.hour); /* Force 0..23 format even if using AM/PM */ + reg[3] = bin2bcd(ct.dow); reg[4] = bin2bcd(ct.day); - reg[5] = bin2bcd(ct.mon + 1); - if (ct.year >= 100) /* Set century bit*/ + reg[5] = bin2bcd(ct.mon); + if (ct.year >= 2000) /* Set century bit*/ { reg[5] |= 0x80; } From owner-svn-src-all@FreeBSD.ORG Sat Dec 31 23:41:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14E7C106566C; Sat, 31 Dec 2011 23:41:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03C658FC16; Sat, 31 Dec 2011 23:41:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVNfJlK088094; Sat, 31 Dec 2011 23:41:19 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVNfJ0B088092; Sat, 31 Dec 2011 23:41:19 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112312341.pBVNfJ0B088092@svn.freebsd.org> From: Adrian Chadd Date: Sat, 31 Dec 2011 23:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229162 - head/sys/mips/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages 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, 31 Dec 2011 23:41:20 -0000 Author: adrian Date: Sat Dec 31 23:41:19 2011 New Revision: 229162 URL: http://svn.freebsd.org/changeset/base/229162 Log: This particular work around isn't required any longer, now that the 11n radio backends are also added into the RF linker set. This saves around 7k from the kernel binary. Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Sat Dec 31 23:21:36 2011 (r229161) +++ head/sys/mips/conf/AR91XX_BASE Sat Dec 31 23:41:19 2011 (r229162) @@ -72,10 +72,6 @@ option ATH_ENABLE_11N device ath_ar5212 device ath_ar5416 device ath_ar9130 -# This is needed so at least one RF backend is present, or the current -# HAL setup won't compile. Remove this once the 11n chip RF backends -# are converted over to be in the linker set. -device ath_rf5111 options AH_DEBUG option AH_SUPPORT_AR5416