From owner-svn-src-stable-9@FreeBSD.ORG Sun Mar 8 22:39:20 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5884BF42; Sun, 8 Mar 2015 22:39:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38AB0120; Sun, 8 Mar 2015 22:39:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t28MdKMB095736; Sun, 8 Mar 2015 22:39:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t28MdJff095734; Sun, 8 Mar 2015 22:39:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503082239.t28MdJff095734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 8 Mar 2015 22:39:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279794 - stable/9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Mar 2015 22:39:20 -0000 Author: dim Date: Sun Mar 8 22:39:19 2015 New Revision: 279794 URL: https://svnweb.freebsd.org/changeset/base/279794 Log: MFC r247527 (by brooks): Provide slightly more helpful feedback when we can't figure out what compiler the user is using. PR: misc/173914 MFC r265829 (by imp): Support, to the extent we generate proper command lines, compiling with clang 3.3. Useful for test building -current on a -stable system in individual directories. Potentially useful if we ever want to support, say, gcc 4.8 or 4.9's new warnings when building with an external toolchain (but such support not yet committed). Document the bsd.compiler.mk interface. MFC r266587 (by imp): Allow CC to not actually exist. During the ports INDEX run, all the Makefiles are evaluated without building things. In a normal build, the prerequisites would be built, and CC would be an actual thing. In an INDEX build, though, they don't exists. Redirect stderr to get rid of annoying messages, and assume that the compiler version is 0 if the actual compiler can't tell us. Do this in preference to guessing based on numbers because gcc410 might be 4.10, or 4.1.0 and without carefully crafted special knowledge we differentiate between them easily (also ming-gcc has no clues at all). Elsewhere, don't trust the compiler version if it is 0. MFC r273405 (by bapt): When using an external toolchain note that gcc 4.8+ supports C++11 Submitted by: imp MFC r275557 (by ngie): Fix typos in comments and wrap to <80 columns MFC r275588 (by ngie): ${CC} --version doesn't need to be queried if both COMPILER_TYPE and COMPILER_VERSION are known MFC r275589 (by ngie): The previous commit should have been a logical or not a logical "and" Pointyhat to: me Modified: stable/9/share/mk/bsd.compiler.mk stable/9/share/mk/bsd.sys.mk (contents, props changed) Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) Modified: stable/9/share/mk/bsd.compiler.mk ============================================================================== --- stable/9/share/mk/bsd.compiler.mk Sun Mar 8 22:39:01 2015 (r279793) +++ stable/9/share/mk/bsd.compiler.mk Sun Mar 8 22:39:19 2015 (r279794) @@ -1,26 +1,52 @@ # $FreeBSD$ +# Setup variables for the compiler +# +# COMPILER_TYPE is the major type of compiler. Currently gcc and clang support +# automatic detection. Other compiler types can be shoe-horned in, but require +# explicit setting of the compiler type. The compiler type can also be set +# explicitly if, say, you install gcc as clang... +# +# COMPILER_VERSION is a numeric constant equal to: +# major * 10000 + minor * 100 + tiny +# It too can be overriden on the command line. When testing it, be sure to +# make sure that you are limiting the test to a specific compiler. Testing +# against 30300 for gcc likely isn't what you wanted (since versions of gcc +# prior to 4.2 likely have no prayer of working). +# +# COMPILER_FEATURES will contain one or more of the following, based on +# compiler support for that feature: +# +# - c++11 : supports full (or nearly full) C++11 programming environment. +# +# This file may be included multiple times, but only has effect the first time. +# + +.if !defined(COMPILER_TYPE) || !defined(COMPILER_VERSION) +_v!= ${CC} --version 2>/dev/null || echo 0.0.0 .if !defined(COMPILER_TYPE) -. if ${CC:T:Mgcc*} +. if ${CC:T:M*gcc*} COMPILER_TYPE:= gcc -. elif ${CC:T:Mclang} +. elif ${CC:T:M*clang*} COMPILER_TYPE:= clang -. else -_COMPILER_VERSION!= ${CC} --version -. if ${_COMPILER_VERSION:Mgcc} +. elif ${_v:Mgcc} COMPILER_TYPE:= gcc -. elif ${_COMPILER_VERSION:M\(GCC\)} +. elif ${_v:M\(GCC\)} COMPILER_TYPE:= gcc -. elif ${_COMPILER_VERSION:Mclang} +. elif ${_v:Mclang} COMPILER_TYPE:= clang -. else -.error Unable to determine compiler type for ${CC} -. endif -. undef _COMPILER_VERSION +. else +.error Unable to determine compiler type for ${CC}. Consider setting COMPILER_TYPE. . endif .endif +.if !defined(COMPILER_VERSION) +COMPILER_VERSION!=echo ${_v:M[1-9].[0-9]*} | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}' +.endif +.undef _v +.endif -.if ${COMPILER_TYPE} == "clang" +.if ${COMPILER_TYPE} == "clang" || \ + (${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800) COMPILER_FEATURES= c++11 .else COMPILER_FEATURES= Modified: stable/9/share/mk/bsd.sys.mk ============================================================================== --- stable/9/share/mk/bsd.sys.mk Sun Mar 8 22:39:01 2015 (r279793) +++ stable/9/share/mk/bsd.sys.mk Sun Mar 8 22:39:19 2015 (r279794) @@ -65,7 +65,10 @@ CWARNFLAGS+= -Wno-pointer-sign # is set to low values, these have to be disabled explicitly. .if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD) .if ${WARNS} <= 6 -CWARNFLAGS+= -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable +CWARNFLAGS+= -Wno-empty-body -Wno-string-plus-int +.if ${COMPILER_VERSION} > 30300 +CWARNFLAGS+= -Wno-unused-const-variable +.endif .endif # WARNS <= 6 .if ${WARNS} <= 3 CWARNFLAGS+= -Wno-tautological-compare -Wno-unused-value\ From owner-svn-src-stable-9@FreeBSD.ORG Sun Mar 8 22:50:47 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81951340; Sun, 8 Mar 2015 22:50:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5162320C; Sun, 8 Mar 2015 22:50:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t28MokFY001539; Sun, 8 Mar 2015 22:50:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t28MokoH001537; Sun, 8 Mar 2015 22:50:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503082250.t28MokoH001537@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 8 Mar 2015 22:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279796 - in stable: 10/sys/boot/i386/boot2 10/sys/boot/pc98/boot2 9/sys/boot/i386/boot2 9/sys/boot/pc98/boot2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Mar 2015 22:50:47 -0000 Author: dim Date: Sun Mar 8 22:50:45 2015 New Revision: 279796 URL: https://svnweb.freebsd.org/changeset/base/279796 Log: MFC r279598: When compiling boot2 with gcc on i386 and pc98, only use the custom flag -mno-align-long-strings when compiling with base gcc. This is checked by comparing the version number against 4.2.1, which is not exactly right, but good enough. (There is no other way to check whether we are using the non-standard gcc in base, as far as I know.) Reported by: rodrigc Modified: stable/9/sys/boot/i386/boot2/Makefile stable/9/sys/boot/pc98/boot2/Makefile Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/boot/i386/boot2/Makefile stable/10/sys/boot/pc98/boot2/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/boot/i386/boot2/Makefile ============================================================================== --- stable/9/sys/boot/i386/boot2/Makefile Sun Mar 8 22:49:34 2015 (r279795) +++ stable/9/sys/boot/i386/boot2/Makefile Sun Mar 8 22:50:45 2015 (r279796) @@ -42,8 +42,10 @@ CFLAGS= -Os \ CFLAGS.gcc+= -fno-guess-branch-probability \ -fno-unit-at-a-time \ - -mno-align-long-strings \ --param max-inline-insns-single=100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 +CFLAGS.gcc+= -mno-align-long-strings +.endif LD_FLAGS=-static -N --gc-sections Modified: stable/9/sys/boot/pc98/boot2/Makefile ============================================================================== --- stable/9/sys/boot/pc98/boot2/Makefile Sun Mar 8 22:49:34 2015 (r279795) +++ stable/9/sys/boot/pc98/boot2/Makefile Sun Mar 8 22:50:45 2015 (r279796) @@ -27,7 +27,6 @@ CFLAGS= -Os \ -fno-guess-branch-probability \ -fomit-frame-pointer \ -fno-unit-at-a-time \ - -mno-align-long-strings \ -mrtd \ -mregparm=3 \ -D${BOOT2_UFS} \ @@ -45,6 +44,9 @@ CFLAGS= -Os \ -Winline CFLAGS.gcc+= --param max-inline-insns-single=100 +.if ${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} <= 40201 +CFLAGS.gcc+= -mno-align-long-strings +.endif # Set machine type to PC98_SYSTEM_PARAMETER #CFLAGS+= -DSET_MACHINE_TYPE From owner-svn-src-stable-9@FreeBSD.ORG Tue Mar 10 05:20:41 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7AF24692; Tue, 10 Mar 2015 05:20:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65E64E2E; Tue, 10 Mar 2015 05:20:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2A5KfqM090561; Tue, 10 Mar 2015 05:20:41 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2A5Kfkl090560; Tue, 10 Mar 2015 05:20:41 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201503100520.t2A5Kfkl090560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Tue, 10 Mar 2015 05:20:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279838 - stable/9/sys/conf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2015 05:20:41 -0000 Author: peter Date: Tue Mar 10 05:20:40 2015 New Revision: 279838 URL: https://svnweb.freebsd.org/changeset/base/279838 Log: MFC r254340 Some objects - such as *_genassym.o are not hooked into SRCS OBJS or anything else, yet have a dependency on symlinks such as machine/ This causes occasional build failures with -j Modified: stable/9/sys/conf/kern.post.mk Modified: stable/9/sys/conf/kern.post.mk ============================================================================== --- stable/9/sys/conf/kern.post.mk Tue Mar 10 02:33:51 2015 (r279837) +++ stable/9/sys/conf/kern.post.mk Tue Mar 10 05:20:40 2015 (r279838) @@ -209,7 +209,7 @@ _ILINKS+= x86 # Ensure that the link exists without depending on it when it exists. .for _link in ${_ILINKS} .if !exists(${.OBJDIR}/${_link}) -${SRCS}: ${_link} +${SRCS} ${CLEAN:M*.o}: ${_link} .endif .endfor From owner-svn-src-stable-9@FreeBSD.ORG Tue Mar 10 14:18:28 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AD21362; Tue, 10 Mar 2015 14:18:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9751237; Tue, 10 Mar 2015 14:18:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2AEIRCQ045705; Tue, 10 Mar 2015 14:18:27 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2AEIRfT045704; Tue, 10 Mar 2015 14:18:27 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503101418.t2AEIRfT045704@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 10 Mar 2015 14:18:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279848 - in stable: 10/sys/kern 9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2015 14:18:28 -0000 Author: jhb Date: Tue Mar 10 14:18:26 2015 New Revision: 279848 URL: https://svnweb.freebsd.org/changeset/base/279848 Log: MFC 277712: Change the default VFS timestamp precision from seconds to microseconds. Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/kern/vfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Tue Mar 10 13:06:54 2015 (r279847) +++ stable/9/sys/kern/vfs_subr.c Tue Mar 10 14:18:26 2015 (r279848) @@ -614,7 +614,7 @@ vfs_getnewfsid(struct mount *mp) */ enum { TSP_SEC, TSP_HZ, TSP_USEC, TSP_NSEC }; -static int timestamp_precision = TSP_SEC; +static int timestamp_precision = TSP_USEC; SYSCTL_INT(_vfs, OID_AUTO, timestamp_precision, CTLFLAG_RW, ×tamp_precision, 0, "File timestamp precision (0: seconds, " "1: sec + ns accurate to 1/HZ, 2: sec + ns truncated to ms, " From owner-svn-src-stable-9@FreeBSD.ORG Wed Mar 11 07:22:14 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3D7ABB0; Wed, 11 Mar 2015 07:22:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE60BCFA; Wed, 11 Mar 2015 07:22:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2B7MEnq033589; Wed, 11 Mar 2015 07:22:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2B7MEJd033586; Wed, 11 Mar 2015 07:22:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503110722.t2B7MEJd033586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 11 Mar 2015 07:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279874 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 07:22:15 -0000 Author: dim Date: Wed Mar 11 07:22:13 2015 New Revision: 279874 URL: https://svnweb.freebsd.org/changeset/base/279874 Log: MFC r279757: Pull in r228344 from upstream libc++ trunk (by Eric Fiselier): Get tests running with warnings. Fix warnings in headers and tests This fixes a number of -Wunused-local-typedef warnings in libc++ headers. MFC r279758: Fix another -Wunused-local-typedef warning in libc++, in include/__tree. Modified: stable/9/contrib/libc++/include/__bit_reference stable/9/contrib/libc++/include/__tree stable/9/contrib/libc++/include/algorithm Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/libc++/include/__bit_reference stable/10/contrib/libc++/include/__tree stable/10/contrib/libc++/include/algorithm Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/libc++/include/__bit_reference ============================================================================== --- stable/9/contrib/libc++/include/__bit_reference Wed Mar 11 06:06:24 2015 (r279873) +++ stable/9/contrib/libc++/include/__bit_reference Wed Mar 11 07:22:13 2015 (r279874) @@ -906,7 +906,6 @@ rotate(__bit_iterator<_Cp, false> __firs { typedef __bit_iterator<_Cp, false> _I1; typedef typename _I1::difference_type difference_type; - typedef typename _I1::__storage_type __storage_type; difference_type __d1 = __middle - __first; difference_type __d2 = __last - __middle; _I1 __r = __first + __d2; Modified: stable/9/contrib/libc++/include/__tree ============================================================================== --- stable/9/contrib/libc++/include/__tree Wed Mar 11 06:06:24 2015 (r279873) +++ stable/9/contrib/libc++/include/__tree Wed Mar 11 07:22:13 2015 (r279874) @@ -2069,7 +2069,6 @@ template typename __tree<_Tp, _Compare, _Allocator>::size_type __tree<_Tp, _Compare, _Allocator>::__count_multi(const _Key& __k) const { - typedef pair _Pp; __node_const_pointer __result = __end_node(); __node_const_pointer __rt = __root(); while (__rt != nullptr) Modified: stable/9/contrib/libc++/include/algorithm ============================================================================== --- stable/9/contrib/libc++/include/algorithm Wed Mar 11 06:06:24 2015 (r279873) +++ stable/9/contrib/libc++/include/algorithm Wed Mar 11 07:22:13 2015 (r279874) @@ -4365,8 +4365,6 @@ __buffered_inplace_merge(_BidirectionalI typename iterator_traits<_BidirectionalIterator>::value_type* __buff) { typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; - typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; - typedef typename iterator_traits<_BidirectionalIterator>::pointer pointer; __destruct_n __d(0); unique_ptr __h2(__buff, __d); if (__len1 <= __len2) @@ -4400,7 +4398,6 @@ __inplace_merge(_BidirectionalIterator _ typename iterator_traits<_BidirectionalIterator>::difference_type __len2, typename iterator_traits<_BidirectionalIterator>::value_type* __buff, ptrdiff_t __buff_size) { - typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; while (true) { @@ -4799,7 +4796,6 @@ void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, typename iterator_traits<_RandomAccessIterator>::difference_type __len) { - typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; if (__len > 1) { From owner-svn-src-stable-9@FreeBSD.ORG Thu Mar 12 09:16:53 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23FC8C3; Thu, 12 Mar 2015 09:16:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E71E8B7; Thu, 12 Mar 2015 09:16:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2C9GqIE077521; Thu, 12 Mar 2015 09:16:52 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2C9Gp1R077515; Thu, 12 Mar 2015 09:16:51 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503120916.t2C9Gp1R077515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 12 Mar 2015 09:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279912 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 09:16:53 -0000 Author: ae Date: Thu Mar 12 09:16:50 2015 New Revision: 279912 URL: https://svnweb.freebsd.org/changeset/base/279912 Log: MFC r279588: Fix deadlock in IPv6 PCB code. When several threads are trying to send datagram to the same destination, but fragmentation is disabled and datagram size exceeds link MTU, ip6_output() calls pfctlinput2(PRC_MSGSIZE). It does notify all sockets wanted to know MTU to this destination. And since all threads hold PCB lock while sending, taking the lock for each PCB in the in6_pcbnotify() leads to deadlock. RFC 3542 p.11.3 suggests notify all application wanted to receive IPV6_PATHMTU ancillary data for each ICMPv6 packet too big message. But it doesn't require this, when we don't receive ICMPv6 message. Change ip6_notify_pmtu() function to be able use it directly from ip6_output() to notify only one socket, and to notify all sockets when ICMPv6 packet too big message received. MFC r279684: tcp6_ctlinput() doesn't pass MTU value to in6_pcbnotify(). Check cmdarg isn't NULL before dereference, this check was in the ip6_notify_pmtu() before r279588. PR: 197059 Sponsored by: Yandex LLC Modified: stable/9/sys/netinet6/in6_pcb.c stable/9/sys/netinet6/ip6_input.c stable/9/sys/netinet6/ip6_output.c stable/9/sys/netinet6/ip6_var.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6_pcb.c ============================================================================== --- stable/9/sys/netinet6/in6_pcb.c Thu Mar 12 09:04:19 2015 (r279911) +++ stable/9/sys/netinet6/in6_pcb.c Thu Mar 12 09:16:50 2015 (r279912) @@ -624,18 +624,12 @@ in6_pcbnotify(struct inpcbinfo *pcbinfo, /* * If the error designates a new path MTU for a destination * and the application (associated with this socket) wanted to - * know the value, notify. Note that we notify for all - * disconnected sockets if the corresponding application - * wanted. This is because some UDP applications keep sending - * sockets disconnected. + * know the value, notify. * XXX: should we avoid to notify the value to TCP sockets? */ - if (cmd == PRC_MSGSIZE && (inp->inp_flags & IN6P_MTU) != 0 && - (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) || - IN6_ARE_ADDR_EQUAL(&inp->in6p_faddr, &sa6_dst->sin6_addr))) { + if (cmd == PRC_MSGSIZE && cmdarg != NULL) ip6_notify_pmtu(inp, (struct sockaddr_in6 *)dst, - (u_int32_t *)cmdarg); - } + *(u_int32_t *)cmdarg); /* * Detect if we should notify the error. If no source and Modified: stable/9/sys/netinet6/ip6_input.c ============================================================================== --- stable/9/sys/netinet6/ip6_input.c Thu Mar 12 09:04:19 2015 (r279911) +++ stable/9/sys/netinet6/ip6_input.c Thu Mar 12 09:16:50 2015 (r279912) @@ -1603,24 +1603,28 @@ ip6_savecontrol(struct inpcb *in6p, stru #undef IS2292 void -ip6_notify_pmtu(struct inpcb *in6p, struct sockaddr_in6 *dst, u_int32_t *mtu) +ip6_notify_pmtu(struct inpcb *inp, struct sockaddr_in6 *dst, u_int32_t mtu) { struct socket *so; struct mbuf *m_mtu; struct ip6_mtuinfo mtuctl; - so = in6p->inp_socket; - - if (mtu == NULL) + KASSERT(inp != NULL, ("%s: inp == NULL", __func__)); + /* + * Notify the error by sending IPV6_PATHMTU ancillary data if + * application wanted to know the MTU value. + * NOTE: we notify disconnected sockets, because some udp + * applications keep sending sockets disconnected. + * NOTE: our implementation doesn't notify connected sockets that has + * foreign address that is different than given destination addresses + * (this is permitted by RFC 3542). + */ + if ((inp->inp_flags & IN6P_MTU) == 0 || ( + !IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_faddr) && + !IN6_ARE_ADDR_EQUAL(&inp->in6p_faddr, &dst->sin6_addr))) return; -#ifdef DIAGNOSTIC - if (so == NULL) /* I believe this is impossible */ - panic("ip6_notify_pmtu: socket is NULL"); -#endif - - bzero(&mtuctl, sizeof(mtuctl)); /* zero-clear for safety */ - mtuctl.ip6m_mtu = *mtu; + mtuctl.ip6m_mtu = mtu; mtuctl.ip6m_addr = *dst; if (sa6_recoverscope(&mtuctl.ip6m_addr)) return; @@ -1629,14 +1633,13 @@ ip6_notify_pmtu(struct inpcb *in6p, stru IPV6_PATHMTU, IPPROTO_IPV6)) == NULL) return; + so = inp->inp_socket; if (sbappendaddr(&so->so_rcv, (struct sockaddr *)dst, NULL, m_mtu) == 0) { m_freem(m_mtu); /* XXX: should count statistics */ } else sorwakeup(so); - - return; } #ifdef PULLDOWN_TEST Modified: stable/9/sys/netinet6/ip6_output.c ============================================================================== --- stable/9/sys/netinet6/ip6_output.c Thu Mar 12 09:04:19 2015 (r279911) +++ stable/9/sys/netinet6/ip6_output.c Thu Mar 12 09:16:50 2015 (r279912) @@ -996,19 +996,12 @@ passout: * Even if the DONTFRAG option is specified, we cannot send the * packet when the data length is larger than the MTU of the * outgoing interface. - * Notify the error by sending IPV6_PATHMTU ancillary data as - * well as returning an error code (the latter is not described - * in the API spec.) + * Notify the error by sending IPV6_PATHMTU ancillary data if + * application wanted to know the MTU value. Also return an + * error code (this is not described in the API spec). */ - u_int32_t mtu32; - struct ip6ctlparam ip6cp; - - mtu32 = (u_int32_t)mtu; - bzero(&ip6cp, sizeof(ip6cp)); - ip6cp.ip6c_cmdarg = (void *)&mtu32; - pfctlinput2(PRC_MSGSIZE, (struct sockaddr *)&ro_pmtu->ro_dst, - (void *)&ip6cp); - + if (inp != NULL) + ip6_notify_pmtu(inp, &dst_sa, (u_int32_t)mtu); error = EMSGSIZE; goto bad; } Modified: stable/9/sys/netinet6/ip6_var.h ============================================================================== --- stable/9/sys/netinet6/ip6_var.h Thu Mar 12 09:04:19 2015 (r279911) +++ stable/9/sys/netinet6/ip6_var.h Thu Mar 12 09:16:50 2015 (r279912) @@ -406,8 +406,7 @@ int ip6_process_hopopts(struct mbuf *, u struct mbuf **ip6_savecontrol_v4(struct inpcb *, struct mbuf *, struct mbuf **, int *); void ip6_savecontrol(struct inpcb *, struct mbuf *, struct mbuf **); -void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *, - u_int32_t *); +void ip6_notify_pmtu(struct inpcb *, struct sockaddr_in6 *, u_int32_t); int ip6_sysctl(int *, u_int, void *, size_t *, void *, size_t); void ip6_forward(struct mbuf *, int); From owner-svn-src-stable-9@FreeBSD.ORG Thu Mar 12 15:08:25 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76F86E0; Thu, 12 Mar 2015 15:08:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47F33779; Thu, 12 Mar 2015 15:08:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2CF8Pae046667; Thu, 12 Mar 2015 15:08:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2CF8PBC046666; Thu, 12 Mar 2015 15:08:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503121508.t2CF8PBC046666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 12 Mar 2015 15:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279921 - in stable: 10/sys/amd64/amd64 9/sys/amd64/amd64 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 15:08:25 -0000 Author: jhb Date: Thu Mar 12 15:08:23 2015 New Revision: 279921 URL: https://svnweb.freebsd.org/changeset/base/279921 Log: MFC 277713: If the boot-time memory test is enabled, output a dot ('.') for each GB of RAM tested so people watching the console can see that the machine is making progress and not hung. PR: 196650 Modified: stable/9/sys/amd64/amd64/machdep.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/amd64/amd64/machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/amd64/amd64/machdep.c ============================================================================== --- stable/9/sys/amd64/amd64/machdep.c Thu Mar 12 14:55:33 2015 (r279920) +++ stable/9/sys/amd64/amd64/machdep.c Thu Mar 12 15:08:23 2015 (r279921) @@ -1367,6 +1367,8 @@ add_smap_entry(struct bios_smap *smap, v return (1); } +#define PAGES_PER_GB (1024 * 1024 * 1024 / PAGE_SIZE) + /* * Populate the (physmap) array with base/bound pairs describing the * available physical memory in the system, then test this memory and @@ -1387,6 +1389,7 @@ getmemsize(caddr_t kmdp, u_int64_t first struct bios_smap *smapbase, *smap, *smapend; u_int32_t smapsize; quad_t dcons_addr, dcons_size; + int page_counter; bzero(physmap, sizeof(physmap)); basemem = 0; @@ -1501,6 +1504,9 @@ getmemsize(caddr_t kmdp, u_int64_t first * physmap is in bytes, so when converting to page boundaries, * round up the start address and round down the end address. */ + page_counter = 0; + if (memtest != 0) + printf("Testing system memory"); for (i = 0; i <= physmap_idx; i += 2) { vm_paddr_t end; @@ -1531,6 +1537,14 @@ getmemsize(caddr_t kmdp, u_int64_t first goto skip_memtest; /* + * Print a "." every GB to show we're making + * progress. + */ + page_counter++; + if ((page_counter % PAGES_PER_GB) == 0) + printf("."); + + /* * map page into kernel: valid, read/write,non-cacheable */ *pte = pa | PG_V | PG_RW | PG_N; @@ -1617,6 +1631,8 @@ do_next: } *pte = 0; invltlb(); + if (memtest != 0) + printf("\n"); /* * XXX From owner-svn-src-stable-9@FreeBSD.ORG Thu Mar 12 15:48:26 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DBF5A88; Thu, 12 Mar 2015 15:48:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7831CCB4; Thu, 12 Mar 2015 15:48:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2CFmQvS066805; Thu, 12 Mar 2015 15:48:26 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2CFmQnC066804; Thu, 12 Mar 2015 15:48:26 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503121548.t2CFmQnC066804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 12 Mar 2015 15:48:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279924 - in stable: 10/sys/dev/uart 9/sys/dev/uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 15:48:26 -0000 Author: jhb Date: Thu Mar 12 15:48:25 2015 New Revision: 279924 URL: https://svnweb.freebsd.org/changeset/base/279924 Log: MFC 278292: Add the device ID for the AMT serial port on my Thinkpad T400. Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Thu Mar 12 15:25:22 2015 (r279923) +++ stable/9/sys/dev/uart/uart_bus_pci.c Thu Mar 12 15:48:25 2015 (r279924) @@ -121,6 +121,7 @@ static const struct pci_id pci_ns8250_id { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, +{ 0x8086, 0x2a47, 0xffff, 0, "Mobile 4 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, From owner-svn-src-stable-9@FreeBSD.ORG Fri Mar 13 17:45:36 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71C699D7; Fri, 13 Mar 2015 17:45:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 445A0B43; Fri, 13 Mar 2015 17:45:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2DHjaEW013863; Fri, 13 Mar 2015 17:45:36 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2DHjZwK013861; Fri, 13 Mar 2015 17:45:35 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503131745.t2DHjZwK013861@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 13 Mar 2015 17:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279958 - in stable: 10/share/mk 9/share/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2015 17:45:36 -0000 Author: jhb Date: Fri Mar 13 17:45:34 2015 New Revision: 279958 URL: https://svnweb.freebsd.org/changeset/base/279958 Log: MFC 278682: Make the extra dependencies in DPADD be dependencies of PROG_FULL and SHLIB_NAME_FULL so that the full binary is relinked when a dependency changes. Right now the existing full binary is left as-is and only the objcopy to remove debug symbols is run. Modified: stable/9/share/mk/bsd.lib.mk stable/9/share/mk/bsd.prog.mk Directory Properties: stable/9/share/mk/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/mk/bsd.lib.mk stable/10/share/mk/bsd.prog.mk Directory Properties: stable/10/ (props changed) Modified: stable/9/share/mk/bsd.lib.mk ============================================================================== --- stable/9/share/mk/bsd.lib.mk Fri Mar 13 16:43:52 2015 (r279957) +++ stable/9/share/mk/bsd.lib.mk Fri Mar 13 17:45:34 2015 (r279958) @@ -275,7 +275,7 @@ _EXTRADEPEND: mv $$TMP ${DEPENDFILE} .if !defined(NO_EXTRADEPEND) && defined(SHLIB_NAME) .if defined(DPADD) && !empty(DPADD) - echo ${SHLIB_NAME}: ${DPADD} >> ${DEPENDFILE} + echo ${SHLIB_NAME_FULL}: ${DPADD} >> ${DEPENDFILE} .endif .endif Modified: stable/9/share/mk/bsd.prog.mk ============================================================================== --- stable/9/share/mk/bsd.prog.mk Fri Mar 13 16:43:52 2015 (r279957) +++ stable/9/share/mk/bsd.prog.mk Fri Mar 13 17:45:34 2015 (r279958) @@ -168,15 +168,15 @@ CLEANFILES+= ${OBJS} _EXTRADEPEND: .if defined(LDFLAGS) && !empty(LDFLAGS:M-nostdlib) .if defined(DPADD) && !empty(DPADD) - echo ${PROG}: ${DPADD} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${DPADD} >> ${DEPENDFILE} .endif .else - echo ${PROG}: ${LIBC} ${DPADD} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${LIBC} ${DPADD} >> ${DEPENDFILE} .if defined(PROG_CXX) && !defined(EARLY_BUILD) .if !empty(CXXFLAGS:M-stdlib=libc++) - echo ${PROG}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${LIBCPLUSPLUS} >> ${DEPENDFILE} .else - echo ${PROG}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} + echo ${PROG_FULL}: ${LIBSTDCPLUSPLUS} >> ${DEPENDFILE} .endif .endif .endif From owner-svn-src-stable-9@FreeBSD.ORG Fri Mar 13 20:10:13 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32FEFF38; Fri, 13 Mar 2015 20:10:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C7C7EBB; Fri, 13 Mar 2015 20:10:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2DKADFv080107; Fri, 13 Mar 2015 20:10:13 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2DKABi3080099; Fri, 13 Mar 2015 20:10:11 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503132010.t2DKABi3080099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 13 Mar 2015 20:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279964 - in stable: 8/sys/dev/ipmi 9/sys/dev/ipmi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Mar 2015 20:10:13 -0000 Author: jhb Date: Fri Mar 13 20:10:09 2015 New Revision: 279964 URL: https://svnweb.freebsd.org/changeset/base/279964 Log: MFC 278321: Use direct hardware access for internal requests for KCS and SMIC. In particular, updates to the watchdog should no longer sleep. - Add a new IPMI_IO_LOCK for low-level I/O access. Use this for kcs_polled_request() and smic_polled_request(). - Add a new backend callback "ipmi_driver_request" to handle a driver request. The new callback performs the request sychronously for KCS and SMIC. SSIF still defers the work to the worker thread since the worker thread sleeps during request processing anyway. - Allocate driver requests on the stack rather than using malloc(). Modified: stable/9/sys/dev/ipmi/ipmi.c stable/9/sys/dev/ipmi/ipmi_kcs.c stable/9/sys/dev/ipmi/ipmi_smic.c stable/9/sys/dev/ipmi/ipmi_ssif.c stable/9/sys/dev/ipmi/ipmivars.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/8/sys/dev/ipmi/ipmi.c stable/8/sys/dev/ipmi/ipmi_kcs.c stable/8/sys/dev/ipmi/ipmi_smic.c stable/8/sys/dev/ipmi/ipmi_ssif.c stable/8/sys/dev/ipmi/ipmivars.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/ipmi/ (props changed) Modified: stable/9/sys/dev/ipmi/ipmi.c ============================================================================== --- stable/9/sys/dev/ipmi/ipmi.c Fri Mar 13 20:08:35 2015 (r279963) +++ stable/9/sys/dev/ipmi/ipmi.c Fri Mar 13 20:10:09 2015 (r279964) @@ -49,6 +49,23 @@ __FBSDID("$FreeBSD$"); #include #endif +/* + * Driver request structures are allocated on the stack via alloca() to + * avoid calling malloc(), especially for the watchdog handler. + * To avoid too much stack growth, a previously allocated structure can + * be reused via IPMI_INIT_DRIVER_REQUEST(), but the caller should ensure + * that there is adequate reply/request space in the original allocation. + */ +#define IPMI_INIT_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \ + bzero((req), sizeof(struct ipmi_request)); \ + ipmi_init_request((req), NULL, 0, (addr), (cmd), (reqlen), (replylen)) + +#define IPMI_ALLOC_DRIVER_REQUEST(req, addr, cmd, reqlen, replylen) \ + (req) = __builtin_alloca(sizeof(struct ipmi_request) + \ + (reqlen) + (replylen)); \ + IPMI_INIT_DRIVER_REQUEST((req), (addr), (cmd), (reqlen), \ + (replylen)) + #ifdef IPMB static int ipmi_ipmb_checksum(u_char, int); static int ipmi_ipmb_send_message(device_t, u_char, u_char, u_char, @@ -181,8 +198,8 @@ ipmi_dtor(void *arg) */ dev->ipmi_closing = 1; while (dev->ipmi_requests > 0) { - msleep(&dev->ipmi_requests, &sc->ipmi_lock, PWAIT, - "ipmidrain", 0); + msleep(&dev->ipmi_requests, &sc->ipmi_requests_lock, + PWAIT, "ipmidrain", 0); ipmi_purge_completed_requests(dev); } } @@ -215,7 +232,7 @@ ipmi_ipmb_send_message(device_t dev, u_c u_char slave_addr = 0x52; int error; - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_SEND_MSG, data_len + 8, 0); req->ir_request[0] = channel; req->ir_request[1] = slave_addr; @@ -231,7 +248,6 @@ ipmi_ipmb_send_message(device_t dev, u_c ipmi_submit_driver_request(sc, req); error = req->ir_error; - ipmi_free_request(req); return (error); } @@ -243,7 +259,7 @@ ipmi_handle_attn(struct ipmi_softc *sc) int error; device_printf(sc->ipmi_dev, "BMC has a message\n"); - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_MSG_FLAGS, 0, 1); ipmi_submit_driver_request(sc, req); @@ -257,9 +273,7 @@ ipmi_handle_attn(struct ipmi_softc *sc) "watchdog about to go off"); } if (req->ir_reply[0] & IPMI_MSG_AVAILABLE) { - ipmi_free_request(req); - - req = ipmi_alloc_driver_request( + IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_MSG, 0, 16); @@ -268,7 +282,6 @@ ipmi_handle_attn(struct ipmi_softc *sc) } } error = req->ir_error; - ipmi_free_request(req); return (error); } @@ -478,15 +491,11 @@ ipmi_ioctl(struct cdev *cdev, u_long cmd * Request management. */ -/* Allocate a new request with request and reply buffers. */ -struct ipmi_request * -ipmi_alloc_request(struct ipmi_device *dev, long msgid, uint8_t addr, - uint8_t command, size_t requestlen, size_t replylen) +static __inline void +ipmi_init_request(struct ipmi_request *req, struct ipmi_device *dev, long msgid, + uint8_t addr, uint8_t command, size_t requestlen, size_t replylen) { - struct ipmi_request *req; - req = malloc(sizeof(struct ipmi_request) + requestlen + replylen, - M_IPMI, M_WAITOK | M_ZERO); req->ir_owner = dev; req->ir_msgid = msgid; req->ir_addr = addr; @@ -499,6 +508,18 @@ ipmi_alloc_request(struct ipmi_device *d req->ir_reply = (char *)&req[1] + requestlen; req->ir_replybuflen = replylen; } +} + +/* Allocate a new request with request and reply buffers. */ +struct ipmi_request * +ipmi_alloc_request(struct ipmi_device *dev, long msgid, uint8_t addr, + uint8_t command, size_t requestlen, size_t replylen) +{ + struct ipmi_request *req; + + req = malloc(sizeof(struct ipmi_request) + requestlen + replylen, + M_IPMI, M_WAITOK | M_ZERO); + ipmi_init_request(req, dev, msgid, addr, command, requestlen, replylen); return (req); } @@ -533,21 +554,13 @@ ipmi_complete_request(struct ipmi_softc } } -/* Enqueue an internal driver request and wait until it is completed. */ +/* Perform an internal driver request. */ int ipmi_submit_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo) { - int error; - IPMI_LOCK(sc); - error = sc->ipmi_enqueue_request(sc, req); - if (error == 0) - error = msleep(req, &sc->ipmi_lock, 0, "ipmireq", timo); - if (error == 0) - error = req->ir_error; - IPMI_UNLOCK(sc); - return (error); + return (sc->ipmi_driver_request(sc, req, timo)); } /* @@ -564,7 +577,7 @@ ipmi_dequeue_request(struct ipmi_softc * IPMI_LOCK_ASSERT(sc); while (!sc->ipmi_detaching && TAILQ_EMPTY(&sc->ipmi_pending_requests)) - cv_wait(&sc->ipmi_request_added, &sc->ipmi_lock); + cv_wait(&sc->ipmi_request_added, &sc->ipmi_requests_lock); if (sc->ipmi_detaching) return (NULL); @@ -598,7 +611,7 @@ ipmi_set_watchdog(struct ipmi_softc *sc, if (sec > 0xffff / 10) return (EINVAL); - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_SET_WDOG, 6, 0); if (sec) { @@ -622,9 +635,7 @@ ipmi_set_watchdog(struct ipmi_softc *sc, if (error) device_printf(sc->ipmi_dev, "Failed to set watchdog\n"); else if (sec) { - ipmi_free_request(req); - - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_RESET_WDOG, 0, 0); error = ipmi_submit_driver_request(sc, req, 0); @@ -633,7 +644,6 @@ ipmi_set_watchdog(struct ipmi_softc *sc, "Failed to reset watchdog\n"); } - ipmi_free_request(req); return (error); /* dump_watchdog(sc); @@ -677,7 +687,8 @@ ipmi_startup(void *arg) dev = sc->ipmi_dev; /* Initialize interface-independent state. */ - mtx_init(&sc->ipmi_lock, device_get_nameunit(dev), "ipmi", MTX_DEF); + mtx_init(&sc->ipmi_requests_lock, "ipmi requests", NULL, MTX_DEF); + mtx_init(&sc->ipmi_io_lock, "ipmi io", NULL, MTX_DEF); cv_init(&sc->ipmi_request_added, "ipmireq"); TAILQ_INIT(&sc->ipmi_pending_requests); @@ -690,28 +701,24 @@ ipmi_startup(void *arg) } /* Send a GET_DEVICE_ID request. */ - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_ALLOC_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_DEVICE_ID, 0, 15); error = ipmi_submit_driver_request(sc, req, MAX_TIMEOUT); if (error == EWOULDBLOCK) { device_printf(dev, "Timed out waiting for GET_DEVICE_ID\n"); - ipmi_free_request(req); return; } else if (error) { device_printf(dev, "Failed GET_DEVICE_ID: %d\n", error); - ipmi_free_request(req); return; } else if (req->ir_compcode != 0) { device_printf(dev, "Bad completion code for GET_DEVICE_ID: %d\n", req->ir_compcode); - ipmi_free_request(req); return; } else if (req->ir_replylen < 5) { device_printf(dev, "Short reply for GET_DEVICE_ID: %d\n", req->ir_replylen); - ipmi_free_request(req); return; } @@ -721,9 +728,7 @@ ipmi_startup(void *arg) req->ir_reply[2] & 0x7f, req->ir_reply[3] >> 4, req->ir_reply[3] & 0x0f, req->ir_reply[4] & 0x0f, req->ir_reply[4] >> 4); - ipmi_free_request(req); - - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_CLEAR_FLAGS, 1, 0); ipmi_submit_driver_request(sc, req, 0); @@ -735,25 +740,21 @@ ipmi_startup(void *arg) if (req->ir_compcode == 0xc1) { device_printf(dev, "Clear flags illegal\n"); } - ipmi_free_request(req); for (i = 0; i < 8; i++) { - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_CHANNEL_INFO, 1, 0); req->ir_request[0] = i; ipmi_submit_driver_request(sc, req, 0); - if (req->ir_compcode != 0) { - ipmi_free_request(req); + if (req->ir_compcode != 0) break; - } - ipmi_free_request(req); } device_printf(dev, "Number of channels %d\n", i); /* probe for watchdog */ - req = ipmi_alloc_driver_request(IPMI_ADDR(IPMI_APP_REQUEST, 0), + IPMI_INIT_DRIVER_REQUEST(req, IPMI_ADDR(IPMI_APP_REQUEST, 0), IPMI_GET_WDOG, 0, 0); ipmi_submit_driver_request(sc, req, 0); @@ -764,7 +765,6 @@ ipmi_startup(void *arg) sc->ipmi_watchdog_tag = EVENTHANDLER_REGISTER(watchdog_list, ipmi_wd_event, sc, 0); } - ipmi_free_request(req); sc->ipmi_cdev = make_dev(&ipmi_cdevsw, device_get_unit(dev), UID_ROOT, GID_OPERATOR, 0660, "ipmi%d", device_get_unit(dev)); @@ -831,14 +831,16 @@ ipmi_detach(device_t dev) sc->ipmi_detaching = 1; if (sc->ipmi_kthread) { cv_broadcast(&sc->ipmi_request_added); - msleep(sc->ipmi_kthread, &sc->ipmi_lock, 0, "ipmi_wait", 0); + msleep(sc->ipmi_kthread, &sc->ipmi_requests_lock, 0, + "ipmi_wait", 0); } IPMI_UNLOCK(sc); if (sc->ipmi_irq) bus_teardown_intr(dev, sc->ipmi_irq_res, sc->ipmi_irq); ipmi_release_resources(dev); - mtx_destroy(&sc->ipmi_lock); + mtx_destroy(&sc->ipmi_io_lock); + mtx_destroy(&sc->ipmi_requests_lock); return (0); } Modified: stable/9/sys/dev/ipmi/ipmi_kcs.c ============================================================================== --- stable/9/sys/dev/ipmi/ipmi_kcs.c Fri Mar 13 20:08:35 2015 (r279963) +++ stable/9/sys/dev/ipmi/ipmi_kcs.c Fri Mar 13 20:10:09 2015 (r279964) @@ -321,6 +321,8 @@ kcs_polled_request(struct ipmi_softc *sc u_char *cp, data; int i, state; + IPMI_IO_LOCK(sc); + /* Send the request. */ if (!kcs_start_write(sc)) { device_printf(sc->ipmi_dev, "KCS: Failed to start write\n"); @@ -444,6 +446,7 @@ kcs_polled_request(struct ipmi_softc *sc } i++; } + IPMI_IO_UNLOCK(sc); req->ir_replylen = i; #ifdef KCS_DEBUG device_printf(sc->ipmi_dev, "KCS: READ finished (%d bytes)\n", i); @@ -457,6 +460,7 @@ kcs_polled_request(struct ipmi_softc *sc return (1); fail: kcs_error(sc); + IPMI_IO_UNLOCK(sc); return (0); } @@ -490,6 +494,21 @@ kcs_startup(struct ipmi_softc *sc) device_get_nameunit(sc->ipmi_dev))); } +static int +kcs_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo) +{ + int i, ok; + + ok = 0; + for (i = 0; i < 3 && !ok; i++) + ok = kcs_polled_request(sc, req); + if (ok) + req->ir_error = 0; + else + req->ir_error = EIO; + return (req->ir_error); +} + int ipmi_kcs_attach(struct ipmi_softc *sc) { @@ -498,6 +517,7 @@ ipmi_kcs_attach(struct ipmi_softc *sc) /* Setup function pointers. */ sc->ipmi_startup = kcs_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; + sc->ipmi_driver_request = kcs_driver_request; /* See if we can talk to the controller. */ status = INB(sc, KCS_CTL_STS); Modified: stable/9/sys/dev/ipmi/ipmi_smic.c ============================================================================== --- stable/9/sys/dev/ipmi/ipmi_smic.c Fri Mar 13 20:08:35 2015 (r279963) +++ stable/9/sys/dev/ipmi/ipmi_smic.c Fri Mar 13 20:10:09 2015 (r279964) @@ -363,8 +363,11 @@ smic_loop(void *arg) IPMI_LOCK(sc); while ((req = ipmi_dequeue_request(sc)) != NULL) { ok = 0; - for (i = 0; i < 3 && !ok; i++) + for (i = 0; i < 3 && !ok; i++) { + IPMI_IO_LOCK(sc); ok = smic_polled_request(sc, req); + IPMI_IO_UNLOCK(sc); + } if (ok) req->ir_error = 0; else @@ -383,6 +386,24 @@ smic_startup(struct ipmi_softc *sc) "%s: smic", device_get_nameunit(sc->ipmi_dev))); } +static int +smic_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo) +{ + int i, ok; + + ok = 0; + for (i = 0; i < 3 && !ok; i++) { + IPMI_IO_LOCK(sc); + ok = smic_polled_request(sc, req); + IPMI_IO_UNLOCK(sc); + } + if (ok) + req->ir_error = 0; + else + req->ir_error = EIO; + return (req->ir_error); +} + int ipmi_smic_attach(struct ipmi_softc *sc) { @@ -391,6 +412,7 @@ ipmi_smic_attach(struct ipmi_softc *sc) /* Setup function pointers. */ sc->ipmi_startup = smic_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; + sc->ipmi_driver_request = smic_driver_request; /* See if we can talk to the controller. */ flags = INB(sc, SMIC_FLAGS); Modified: stable/9/sys/dev/ipmi/ipmi_ssif.c ============================================================================== --- stable/9/sys/dev/ipmi/ipmi_ssif.c Fri Mar 13 20:08:35 2015 (r279963) +++ stable/9/sys/dev/ipmi/ipmi_ssif.c Fri Mar 13 20:10:09 2015 (r279964) @@ -359,6 +359,22 @@ ssif_startup(struct ipmi_softc *sc) "%s: ssif", device_get_nameunit(sc->ipmi_dev))); } +static int +ssif_driver_request(struct ipmi_softc *sc, struct ipmi_request *req, int timo) +{ + int error; + + IPMI_LOCK(sc); + error = ipmi_polled_enqueue_request(sc, req); + if (error == 0) + error = msleep(req, &sc->ipmi_requests_lock, 0, "ipmireq", + timo); + if (error == 0) + error = req->ir_error; + IPMI_UNLOCK(sc); + return (error); +} + int ipmi_ssif_attach(struct ipmi_softc *sc, device_t smbus, int smbus_address) { @@ -370,6 +386,7 @@ ipmi_ssif_attach(struct ipmi_softc *sc, /* Setup function pointers. */ sc->ipmi_startup = ssif_startup; sc->ipmi_enqueue_request = ipmi_polled_enqueue_request; + sc->ipmi_driver_request = ssif_driver_request; return (0); } Modified: stable/9/sys/dev/ipmi/ipmivars.h ============================================================================== --- stable/9/sys/dev/ipmi/ipmivars.h Fri Mar 13 20:08:35 2015 (r279963) +++ stable/9/sys/dev/ipmi/ipmivars.h Fri Mar 13 20:10:09 2015 (r279964) @@ -95,6 +95,7 @@ struct ipmi_softc { } _iface; int ipmi_io_rid; int ipmi_io_type; + struct mtx ipmi_io_lock; struct resource *ipmi_io_res[MAX_RES]; int ipmi_io_spacing; int ipmi_irq_rid; @@ -107,12 +108,13 @@ struct ipmi_softc { eventhandler_tag ipmi_watchdog_tag; int ipmi_watchdog_active; struct intr_config_hook ipmi_ich; - struct mtx ipmi_lock; + struct mtx ipmi_requests_lock; struct cv ipmi_request_added; struct proc *ipmi_kthread; driver_intr_t *ipmi_intr; int (*ipmi_startup)(struct ipmi_softc *); int (*ipmi_enqueue_request)(struct ipmi_softc *, struct ipmi_request *); + int (*ipmi_driver_request)(struct ipmi_softc *, struct ipmi_request *, int); }; #define ipmi_ssif_smbus_address _iface.ssif.smbus_address @@ -183,12 +185,13 @@ struct ipmi_ipmb { #define IPMI_ADDR(netfn, lun) ((netfn) << 2 | (lun)) #define IPMI_REPLY_ADDR(addr) ((addr) + 0x4) -#define IPMI_LOCK(sc) mtx_lock(&(sc)->ipmi_lock) -#define IPMI_UNLOCK(sc) mtx_unlock(&(sc)->ipmi_lock) -#define IPMI_LOCK_ASSERT(sc) mtx_assert(&(sc)->ipmi_lock, MA_OWNED) - -#define ipmi_alloc_driver_request(addr, cmd, reqlen, replylen) \ - ipmi_alloc_request(NULL, 0, (addr), (cmd), (reqlen), (replylen)) +#define IPMI_LOCK(sc) mtx_lock(&(sc)->ipmi_requests_lock) +#define IPMI_UNLOCK(sc) mtx_unlock(&(sc)->ipmi_requests_lock) +#define IPMI_LOCK_ASSERT(sc) mtx_assert(&(sc)->ipmi_requests_lock, MA_OWNED) + +#define IPMI_IO_LOCK(sc) mtx_lock(&(sc)->ipmi_io_lock) +#define IPMI_IO_UNLOCK(sc) mtx_unlock(&(sc)->ipmi_io_lock) +#define IPMI_IO_LOCK_ASSERT(sc) mtx_assert(&(sc)->ipmi_io_lock, MA_OWNED) #if __FreeBSD_version < 601105 #define bus_read_1(r, o) \ From owner-svn-src-stable-9@FreeBSD.ORG Sat Mar 14 14:44:04 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 79ACF36C; Sat, 14 Mar 2015 14:44:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64DACA61; Sat, 14 Mar 2015 14:44:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2EEi483007341; Sat, 14 Mar 2015 14:44:04 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2EEi4p1007340; Sat, 14 Mar 2015 14:44:04 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503141444.t2EEi4p1007340@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 14 Mar 2015 14:44:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279990 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2015 14:44:04 -0000 Author: ae Date: Sat Mar 14 14:44:03 2015 New Revision: 279990 URL: https://svnweb.freebsd.org/changeset/base/279990 Log: MFC r279730: lla_lookup() can directly call llentry_free() for static entries and the last one requires to hold afdata's wlock. PR: 197096 Modified: stable/9/sys/netinet/if_ether.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/if_ether.c ============================================================================== --- stable/9/sys/netinet/if_ether.c Sat Mar 14 14:38:25 2015 (r279989) +++ stable/9/sys/netinet/if_ether.c Sat Mar 14 14:44:03 2015 (r279990) @@ -154,10 +154,10 @@ arp_ifscrub(struct ifnet *ifp, uint32_t addr4.sin_len = sizeof(addr4); addr4.sin_family = AF_INET; addr4.sin_addr.s_addr = addr; - IF_AFDATA_RLOCK(ifp); + IF_AFDATA_WLOCK(ifp); lla_lookup(LLTABLE(ifp), (LLE_DELETE | LLE_IFADDR), (struct sockaddr *)&addr4); - IF_AFDATA_RUNLOCK(ifp); + IF_AFDATA_WUNLOCK(ifp); } #endif From owner-svn-src-stable-9@FreeBSD.ORG Sat Mar 14 14:46:10 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA4424B3; Sat, 14 Mar 2015 14:46:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5174A76; Sat, 14 Mar 2015 14:46:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2EEkA2B007755; Sat, 14 Mar 2015 14:46:10 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2EEkAtj007754; Sat, 14 Mar 2015 14:46:10 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503141446.t2EEkAtj007754@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 14 Mar 2015 14:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r279991 - stable/9/sys/netipsec X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2015 14:46:11 -0000 Author: ae Date: Sat Mar 14 14:46:10 2015 New Revision: 279991 URL: https://svnweb.freebsd.org/changeset/base/279991 Log: MFC r279735: Remove extra '&'. sin6 is already a pointer. PR: 195011 Modified: stable/9/sys/netipsec/key.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netipsec/key.c ============================================================================== --- stable/9/sys/netipsec/key.c Sat Mar 14 14:44:03 2015 (r279990) +++ stable/9/sys/netipsec/key.c Sat Mar 14 14:46:10 2015 (r279991) @@ -3965,7 +3965,7 @@ key_ismyaddr6(sin6) IN6_IFADDR_RLOCK(); TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { - if (key_sockaddrcmp((struct sockaddr *)&sin6, + if (key_sockaddrcmp((struct sockaddr *)sin6, (struct sockaddr *)&ia->ia_addr, 0) == 0) { IN6_IFADDR_RUNLOCK(); return 1; From owner-svn-src-stable-9@FreeBSD.ORG Sat Mar 14 21:07:38 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EE9053A; Sat, 14 Mar 2015 21:07:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89472E2; Sat, 14 Mar 2015 21:07:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2EL7chX088281; Sat, 14 Mar 2015 21:07:38 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2EL7cqD088280; Sat, 14 Mar 2015 21:07:38 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503142107.t2EL7cqD088280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 14 Mar 2015 21:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280003 - stable/9/tools/regression/usr.bin/env X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2015 21:07:38 -0000 Author: jilles Date: Sat Mar 14 21:07:37 2015 New Revision: 280003 URL: https://svnweb.freebsd.org/changeset/base/280003 Log: MFC r279722: env: Fix testsuite for additional variables set by sh. Modified: stable/9/tools/regression/usr.bin/env/regress-env.rgdata Directory Properties: stable/9/tools/regression/usr.bin/env/ (props changed) Modified: stable/9/tools/regression/usr.bin/env/regress-env.rgdata ============================================================================== --- stable/9/tools/regression/usr.bin/env/regress-env.rgdata Sat Mar 14 20:40:04 2015 (r280002) +++ stable/9/tools/regression/usr.bin/env/regress-env.rgdata Sat Mar 14 21:07:37 2015 (r280003) @@ -235,9 +235,9 @@ gblenv=OUTSIDEVAR=OutsideValue script:/bin/echo "=== set ===" script:# drop some environment variables that 'sh' itself sets, and script:# then have 'set' print out all remaining environment variables. - script:# (can't unset OPTIND, so we use grep to get rid of that) - script:unset -v IFS PS1 PS2 PPID - script:set | grep -v '^OPTIND=' | sort + script:# (can't unset OPTIND/PWD, so we use grep to get rid of those) + script:unset -v IFS PS1 PS2 PS4 PPID + script:set | grep -Ev '^(OPTIND|PWD)=' | sort stdout:=== set === stdout:PATH=/bin:/usr/bin:/Not stdout:TESTVAR=SbValue