From owner-svn-src-projects@freebsd.org Sun Jan 7 18:33:20 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77B09E7A15D for ; Sun, 7 Jan 2018 18:33:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51DF97275C; Sun, 7 Jan 2018 18:33:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A24E624E18; Sun, 7 Jan 2018 18:33:19 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w07IXJIw097508; Sun, 7 Jan 2018 18:33:19 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w07IXJC7097507; Sun, 7 Jan 2018 18:33:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801071833.w07IXJC7097507@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 7 Jan 2018 18:33:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327680 - projects/clang600-import/contrib/libc++/include X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/libc++/include X-SVN-Commit-Revision: 327680 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jan 2018 18:33:20 -0000 Author: dim Date: Sun Jan 7 18:33:19 2018 New Revision: 327680 URL: https://svnweb.freebsd.org/changeset/base/327680 Log: Pull in r321963 from upstream libc++ trunk (by me): Add pre-C++11 is_constructible wrappers for 3 arguments Summary: After rL319736 for D28253 (which fixes PR28929), gcc cannot compile anymore in pre-C+11 modes, complaining: In file included from /usr/include/c++/v1/memory:648:0, from test.cpp:1: /usr/include/c++/v1/memory: In static member function 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::make_shared(_A0&, _A1&, _A2&)': /usr/include/c++/v1/memory:4365:5: error: wrong number of template arguments (4, should be at least 1) static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in make_shared" ); ^ In file included from /usr/include/c++/v1/memory:649:0, from test.cpp:1: /usr/include/c++/v1/type_traits:3198:29: note: provided for 'template struct std::__1::is_constructible' struct _LIBCPP_TEMPLATE_VIS is_constructible ^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/v1/memory:648:0, from test.cpp:1: /usr/include/c++/v1/memory:4365:5: error: template argument 1 is invalid static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in make_shared" ); ^ /usr/include/c++/v1/memory: In static member function 'static std::__1::shared_ptr<_Tp> std::__1::shared_ptr<_Tp>::allocate_shared(const _Alloc&, _A0&, _A1&, _A2&)': /usr/include/c++/v1/memory:4444:5: error: wrong number of template arguments (4, should be at least 1) static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in allocate_shared" ); ^ In file included from /usr/include/c++/v1/memory:649:0, from test.cpp:1: /usr/include/c++/v1/type_traits:3198:29: note: provided for 'template struct std::__1::is_constructible' struct _LIBCPP_TEMPLATE_VIS is_constructible ^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/v1/memory:648:0, from test.cpp:1: /usr/include/c++/v1/memory:4444:5: error: template argument 1 is invalid static_assert((is_constructible<_Tp, _A0, _A1, _A2>::value), "Can't construct object in allocate_shared" ); ^ This is also reported in https://bugs.freebsd.org/224946 (FreeBSD is apparently one of the very few projects that regularly builds programs against libc++ with gcc). The reason is that the static assertions are invoking is_constructible with three arguments, while gcc does not have the built-in is_constructible feature, and the pre-C++11 is_constructible wrappers in only provide up to two arguments. I have added additional wrappers for three arguments, modified the is_constructible entry point to take three arguments instead, and added a simple test to is_constructible.pass.cpp. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: krytarowski, cfe-commits, emaste Differential Revision: https://reviews.llvm.org/D41805 This should allow gcc to compile the libc++ 6.0.0 header without problems, in pre-C++11 mode. Reported by: jbeich PR: 224946 Modified: projects/clang600-import/contrib/libc++/include/type_traits Modified: projects/clang600-import/contrib/libc++/include/type_traits ============================================================================== --- projects/clang600-import/contrib/libc++/include/type_traits Sun Jan 7 18:07:22 2018 (r327679) +++ projects/clang600-import/contrib/libc++/include/type_traits Sun Jan 7 18:33:19 2018 (r327680) @@ -3172,6 +3172,14 @@ template false_type __is_constructible2_test(__any, _A0&, _A1&); +template +decltype((_Tp(_VSTD::declval<_A0>(), _VSTD::declval<_A1>(), _VSTD::declval<_A2>()), true_type())) +__is_constructible3_test(_Tp&, _A0&, _A1&, _A2&); + +template +false_type +__is_constructible3_test(__any, _A0&, _A1&, _A2&); + template struct __is_constructible0_imp // false, _Tp is not a scalar : public common_type @@ -3196,6 +3204,14 @@ struct __is_constructible2_imp // false, _Tp is not a >::type {}; +template +struct __is_constructible3_imp // false, _Tp is not a scalar + : public common_type + < + decltype(__is_constructible3_test(declval<_Tp&>(), declval<_A0>(), declval<_A1>(), declval<_A2>())) + >::type + {}; + // handle scalars and reference types // Scalars are default constructible, references are not @@ -3215,6 +3231,11 @@ struct __is_constructible2_imp : public false_type {}; +template +struct __is_constructible3_imp + : public false_type + {}; + // Treat scalars and reference types separately template @@ -3235,6 +3256,12 @@ struct __is_constructible2_void_check _Tp, _A0, _A1> {}; +template +struct __is_constructible3_void_check + : public __is_constructible3_imp::value || is_reference<_Tp>::value, + _Tp, _A0, _A1, _A2> + {}; + // If any of T or Args is void, is_constructible should be false template @@ -3252,17 +3279,24 @@ struct __is_constructible2_void_check +struct __is_constructible3_void_check + : public false_type + {}; + // is_constructible entry point template + class _A1 = __is_construct::__nat, + class _A2 = __is_construct::__nat> struct _LIBCPP_TEMPLATE_VIS is_constructible - : public __is_constructible2_void_check::value + : public __is_constructible3_void_check::value || is_abstract<_Tp>::value || is_function<_Tp>::value || is_void<_A0>::value - || is_void<_A1>::value, - _Tp, _A0, _A1> + || is_void<_A1>::value + || is_void<_A2>::value, + _Tp, _A0, _A1, _A2> {}; template @@ -3282,6 +3316,16 @@ struct _LIBCPP_TEMPLATE_VIS is_constructible<_Tp, _A0, _Tp, _A0> {}; +template +struct _LIBCPP_TEMPLATE_VIS is_constructible<_Tp, _A0, _A1, __is_construct::__nat> + : public __is_constructible2_void_check::value + || is_abstract<_Tp>::value + || is_function<_Tp>::value + || is_void<_A0>::value + || is_void<_A1>::value, + _Tp, _A0, _A1> + {}; + // Array types are default constructible if their element type // is default constructible @@ -3300,6 +3344,11 @@ struct __is_constructible2_imp +struct __is_constructible3_imp + : public false_type + {}; + // Incomplete array types are not constructible template @@ -3314,6 +3363,11 @@ struct __is_constructible1_imp template struct __is_constructible2_imp + : public false_type + {}; + +template +struct __is_constructible3_imp : public false_type {}; From owner-svn-src-projects@freebsd.org Mon Jan 8 18:42:41 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92FABE7DC76 for ; Mon, 8 Jan 2018 18:42:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC3D6C1F4; Mon, 8 Jan 2018 18:42:41 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B814E3C14; Mon, 8 Jan 2018 18:42:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w08Igeeu033365; Mon, 8 Jan 2018 18:42:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w08IgeGb033364; Mon, 8 Jan 2018 18:42:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801081842.w08IgeGb033364@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 8 Jan 2018 18:42:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327702 - projects/clang600-import/usr.sbin/acpi/acpidb X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/usr.sbin/acpi/acpidb X-SVN-Commit-Revision: 327702 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 18:42:41 -0000 Author: dim Date: Mon Jan 8 18:42:40 2018 New Revision: 327702 URL: https://svnweb.freebsd.org/changeset/base/327702 Log: Add explanatory comment for r327622: clang 6.0.0 and higher warn about the ACPI_ROOT_OBJECT and ACPI_TO_POINTER macros from acpica's actypes.h header, that they use arithmetic on a null pointer treated as a cast from integer to pointer, which is a GNU extension. We turn off the warning, because this is in contributed code. Requested by: rakuco Modified: projects/clang600-import/usr.sbin/acpi/acpidb/Makefile Modified: projects/clang600-import/usr.sbin/acpi/acpidb/Makefile ============================================================================== --- projects/clang600-import/usr.sbin/acpi/acpidb/Makefile Mon Jan 8 16:36:33 2018 (r327701) +++ projects/clang600-import/usr.sbin/acpi/acpidb/Makefile Mon Jan 8 18:42:40 2018 (r327702) @@ -81,6 +81,12 @@ LIBADD= pthread .include +# clang 6.0.0 and higher warn about the ACPI_ROOT_OBJECT and +# ACPI_TO_POINTER macros from sys/contrib/dev/acpica/include/actypes.h, +# that they use arithmetic on a null pointer treated as a cast from +# integer to pointer, which is a GNU extension. +# +# Turn off the warning, because this is in contributed code. .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 60000 CWARNFLAGS+= -Wno-null-pointer-arithmetic .endif From owner-svn-src-projects@freebsd.org Tue Jan 9 17:37:10 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A86F3E65DE8 for ; Tue, 9 Jan 2018 17:37:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8347763546; Tue, 9 Jan 2018 17:37:10 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D59761A026; Tue, 9 Jan 2018 17:37:09 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w09Hb92b012562; Tue, 9 Jan 2018 17:37:09 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09Hb94l012559; Tue, 9 Jan 2018 17:37:09 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801091737.w09Hb94l012559@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Jan 2018 17:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327732 - projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 327732 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 17:37:10 -0000 Author: dim Date: Tue Jan 9 17:37:09 2018 New Revision: 327732 URL: https://svnweb.freebsd.org/changeset/base/327732 Log: Pull in r321986 from upstream lld trunk (by James Henderson): [ELF] Compress debug sections after assignAddresses and support custom layout Previously, in r320472, I moved the calculation of section offsets and sizes for compressed debug sections into maybeCompress, which happens before assignAddresses, so that the compression had the required information. However, I failed to take account of relocations that patch such sections. This had two effects: 1. A race condition existed when a debug section referred to a different debug section (see PR35788). 2. References to symbols in non-debug sections would be patched incorrectly. This is because the addresses of such symbols are not calculated until after assignAddresses (this was a partial regression caused by r320472, but they could still have been broken before, in the event that a custom layout was used in a linker script). assignAddresses does not need to know about the output section size of non-allocatable sections, because they do not affect the value of Dot. This means that there is no longer a reason not to support custom layout of compressed debug sections, as far as I'm aware. These two points allow for delaying when maybeCompress can be called, removing the need for the loop I previously added to calculate the section size, and therefore the race condition. Furthermore, by delaying, we fix the issues of relocations getting incorrect symbol values, because they have now all been finalized. This should fix thread race conditions when linking parts of ruby24. Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp projects/clang600-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp Tue Jan 9 16:42:24 2018 (r327731) +++ projects/clang600-import/contrib/llvm/tools/lld/ELF/LinkerScript.cpp Tue Jan 9 17:37:09 2018 (r327732) @@ -669,11 +669,6 @@ void LinkerScript::assignOffsets(OutputSection *Sec) { switchTo(Sec); - // We do not support custom layout for compressed debug sectons. - // At this point we already know their size and have compressed content. - if (Ctx->OutSec->Flags & SHF_COMPRESSED) - return; - // The Size previously denoted how many InputSections had been added to this // section, and was used for sorting SHF_LINK_ORDER sections. Reset it to // compute the actual size value. Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp Tue Jan 9 16:42:24 2018 (r327731) +++ projects/clang600-import/contrib/llvm/tools/lld/ELF/OutputSections.cpp Tue Jan 9 17:37:09 2018 (r327732) @@ -183,15 +183,6 @@ template void OutputSection::maybeCompres !Name.startswith(".debug_")) return; - // Calculate the section offsets and size pre-compression. - Size = 0; - for (BaseCommand *Cmd : SectionCommands) - if (auto *ISD = dyn_cast(Cmd)) - for (InputSection *IS : ISD->Sections) { - IS->OutSecOff = alignTo(Size, IS->Alignment); - this->Size = IS->OutSecOff + IS->getSize(); - } - // Create a section header. ZDebugHeader.resize(sizeof(Elf_Chdr)); auto *Hdr = reinterpret_cast(ZDebugHeader.data()); Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp Tue Jan 9 16:42:24 2018 (r327731) +++ projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp Tue Jan 9 17:37:09 2018 (r327732) @@ -427,13 +427,14 @@ template void Writer::run() { if (errorCount()) return; + Script->assignAddresses(); + // If -compressed-debug-sections is specified, we need to compress // .debug_* sections. Do it right now because it changes the size of // output sections. parallelForEach(OutputSections, [](OutputSection *Sec) { Sec->maybeCompress(); }); - Script->assignAddresses(); Script->allocateHeaders(Phdrs); // Remove empty PT_LOAD to avoid causing the dynamic linker to try to mmap a From owner-svn-src-projects@freebsd.org Tue Jan 9 17:38:44 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3464E65ED1 for ; Tue, 9 Jan 2018 17:38:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F8A46364B; Tue, 9 Jan 2018 17:38:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6FFC1A027; Tue, 9 Jan 2018 17:38:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w09HchZB012651; Tue, 9 Jan 2018 17:38:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09HchMQ012650; Tue, 9 Jan 2018 17:38:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801091738.w09HchMQ012650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Jan 2018 17:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327733 - projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 327733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 17:38:44 -0000 Author: dim Date: Tue Jan 9 17:38:43 2018 New Revision: 327733 URL: https://svnweb.freebsd.org/changeset/base/327733 Log: Pull in r322041 from upstream lld trunk (by Rui Ueyama): Do not use parallelForEach to call maybeCompress(). Currently LLVM's paralellForEach has a problem with reentracy. That caused https://bugs.llvm.org/show_bug.cgi?id=35788 (lld somtimes hangs while linking Ruby 2.4) because maybeCompress calls writeTo which uses paralellForEach. This patch is to avoid using paralellForEach to call maybeCompress to workaround the issue. This should fix potential hangs when linking parts of ruby24. Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp Tue Jan 9 17:37:09 2018 (r327732) +++ projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp Tue Jan 9 17:38:43 2018 (r327733) @@ -432,8 +432,8 @@ template void Writer::run() { // If -compressed-debug-sections is specified, we need to compress // .debug_* sections. Do it right now because it changes the size of // output sections. - parallelForEach(OutputSections, - [](OutputSection *Sec) { Sec->maybeCompress(); }); + for (OutputSection *Sec : OutputSections) + Sec->maybeCompress(); Script->allocateHeaders(Phdrs); From owner-svn-src-projects@freebsd.org Tue Jan 9 17:41:36 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FE6EE66089 for ; Tue, 9 Jan 2018 17:41:36 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F004D63AF3; Tue, 9 Jan 2018 17:41:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3C6FF1A082; Tue, 9 Jan 2018 17:41:35 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w09HfZCe013562; Tue, 9 Jan 2018 17:41:35 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09HfZid013561; Tue, 9 Jan 2018 17:41:35 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801091741.w09HfZid013561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Jan 2018 17:41:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327734 - projects/clang600-import/contrib/llvm/lib/CodeGen X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm/lib/CodeGen X-SVN-Commit-Revision: 327734 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 17:41:36 -0000 Author: dim Date: Tue Jan 9 17:41:34 2018 New Revision: 327734 URL: https://svnweb.freebsd.org/changeset/base/327734 Log: Pull in r322056 from upstream llvm trunk (by Serguei Katkov): [CGP] Fix Complex addressing mode for offset If the offset is differ in two addressing mode we can continue only if ScaleReg is not set due to we will use it as merge of different offsets. It should fix PR35799 and PR35805. Reviewers: john.brawn, reames Reviewed By: reames Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41227 This should fix "ScaledReg == nullptr" assertions when building the graphics/xpx, mail/alpine and editors/pico-alpine ports. Reported by: jbeich PR: 224866, 224995 Modified: projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Modified: projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Tue Jan 9 17:38:43 2018 (r327733) +++ projects/clang600-import/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp Tue Jan 9 17:41:34 2018 (r327734) @@ -2700,8 +2700,13 @@ class AddressingModeCombiner { (public) // we still need to collect it due to original value is different. // And later we will need all original values as anchors during // finding the common Phi node. + // We also must reject the case when base offset is different and + // scale reg is not null, we cannot handle this case due to merge of + // different offsets will be used as ScaleReg. if (DifferentField != ExtAddrMode::MultipleFields && - DifferentField != ExtAddrMode::ScaleField) { + DifferentField != ExtAddrMode::ScaleField && + (DifferentField != ExtAddrMode::BaseOffsField || + !NewAddrMode.ScaledReg)) { AddrModes.emplace_back(NewAddrMode); return true; } From owner-svn-src-projects@freebsd.org Fri Jan 12 18:16:53 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23D9AE74003 for ; Fri, 12 Jan 2018 18:16:53 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F3157782EA; Fri, 12 Jan 2018 18:16:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 386B2272E9; Fri, 12 Jan 2018 18:16:52 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0CIGpfM067895; Fri, 12 Jan 2018 18:16:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0CIGprK067894; Fri, 12 Jan 2018 18:16:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801121816.w0CIGprK067894@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 12 Jan 2018 18:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327884 - projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 327884 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 18:16:53 -0000 Author: dim Date: Fri Jan 12 18:16:51 2018 New Revision: 327884 URL: https://svnweb.freebsd.org/changeset/base/327884 Log: Pull in r322264 from upstream lld trunk (by me): Fix thread race between SectionPiece's OutputOff and Live members Summary: As reported in bug 35788, rL316280 reintroduces a race between two members of SectionPiece, which share the same 64 bit memory location. To fix the race, check the hash before checking the Live member, as suggested by Rafael. Reviewers: ruiu, rafael Reviewed By: ruiu Subscribers: smeenai, emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D41884 Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp Fri Jan 12 17:36:19 2018 (r327883) +++ projects/clang600-import/contrib/llvm/tools/lld/ELF/SyntheticSections.cpp Fri Jan 12 18:16:51 2018 (r327884) @@ -2435,10 +2435,8 @@ void MergeNoTailSection::finalizeContents() { parallelForEachN(0, Concurrency, [&](size_t ThreadId) { for (MergeInputSection *Sec : Sections) { for (size_t I = 0, E = Sec->Pieces.size(); I != E; ++I) { - if (!Sec->Pieces[I].Live) - continue; size_t ShardId = getShardId(Sec->Pieces[I].Hash); - if ((ShardId & (Concurrency - 1)) == ThreadId) + if ((ShardId & (Concurrency - 1)) == ThreadId && Sec->Pieces[I].Live) Sec->Pieces[I].OutputOff = Shards[ShardId].add(Sec->getData(I)); } } From owner-svn-src-projects@freebsd.org Fri Jan 12 18:19:16 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF6F1E74310 for ; Fri, 12 Jan 2018 18:19:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 68E6C785DA; Fri, 12 Jan 2018 18:19:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 853E0272F9; Fri, 12 Jan 2018 18:19:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0CIJFkq068025; Fri, 12 Jan 2018 18:19:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0CIJFMN068023; Fri, 12 Jan 2018 18:19:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801121819.w0CIJFMN068023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 12 Jan 2018 18:19:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327885 - in projects/clang600-import/contrib/llvm: include/llvm/Transforms/Vectorize lib/Transforms/Vectorize X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang600-import/contrib/llvm: include/llvm/Transforms/Vectorize lib/Transforms/Vectorize X-SVN-Commit-Revision: 327885 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 18:19:16 -0000 Author: dim Date: Fri Jan 12 18:19:14 2018 New Revision: 327885 URL: https://svnweb.freebsd.org/changeset/base/327885 Log: Pull in r321994 from upstream llvm trunk (by Alexey Bataev): [SLP] Fix PR35777: Incorrect handling of aggregate values. Summary: Fixes the bug with incorrect handling of InsertValue|InsertElement instrucions in SLP vectorizer. Currently, we may use incorrect ExtractElement instructions as the operands of the original InsertValue|InsertElement instructions. Reviewers: mkuper, hfinkel, RKSimon, spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41767 This should fix "Invalid InsertValueInst operands!" errors when building certain parts of editors/libreoffice. Reported by: jbeich PR: 225086 Modified: projects/clang600-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h projects/clang600-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Modified: projects/clang600-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h ============================================================================== --- projects/clang600-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h Fri Jan 12 18:16:51 2018 (r327884) +++ projects/clang600-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h Fri Jan 12 18:19:14 2018 (r327885) @@ -95,14 +95,9 @@ struct SLPVectorizerPass : public PassInfoMixin VL, slpvectorizer::BoUpSLP &R, - ArrayRef BuildVector = None, - bool AllowReorder = false, - bool NeedExtraction = false); + bool AllowReorder = false); /// \brief Try to vectorize a chain that may start at the operands of \p I. bool tryToVectorize(Instruction *I, slpvectorizer::BoUpSLP &R); Modified: projects/clang600-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp ============================================================================== --- projects/clang600-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Jan 12 18:16:51 2018 (r327884) +++ projects/clang600-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Fri Jan 12 18:19:14 2018 (r327885) @@ -4417,13 +4417,11 @@ bool SLPVectorizerPass::tryToVectorizePair(Value *A, V if (!A || !B) return false; Value *VL[] = { A, B }; - return tryToVectorizeList(VL, R, None, true); + return tryToVectorizeList(VL, R, true); } bool SLPVectorizerPass::tryToVectorizeList(ArrayRef VL, BoUpSLP &R, - ArrayRef BuildVector, - bool AllowReorder, - bool NeedExtraction) { + bool AllowReorder) { if (VL.size() < 2) return false; @@ -4517,12 +4515,7 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef Ops = VL.slice(I, OpsWidth); - ArrayRef EmptyArray; - ArrayRef BuildVectorSlice; - if (!BuildVector.empty()) - BuildVectorSlice = BuildVector.slice(I, OpsWidth); - - R.buildTree(Ops, NeedExtraction ? EmptyArray : BuildVectorSlice); + R.buildTree(Ops); // TODO: check if we can allow reordering for more cases. if (AllowReorder && R.shouldReorder()) { // Conceptually, there is nothing actually preventing us from trying to @@ -4530,7 +4523,6 @@ bool SLPVectorizerPass::tryToVectorizeList(ArrayRef (insertelt undef (opd0) 0) (opd1) 2)) - if (!BuildVectorSlice.empty()) { - // The insert point is the last build vector instruction. The - // vectorized root will precede it. This guarantees that we get an - // instruction. The vectorized tree could have been constant folded. - Instruction *InsertAfter = cast(BuildVectorSlice.back()); - unsigned VecIdx = 0; - for (auto &V : BuildVectorSlice) { - IRBuilder Builder(InsertAfter->getParent(), - ++BasicBlock::iterator(InsertAfter)); - Instruction *I = cast(V); - assert(isa(I) || isa(I)); - Instruction *Extract = - cast(Builder.CreateExtractElement( - VectorizedRoot, Builder.getInt32(VecIdx++))); - I->setOperand(1, Extract); - I->moveAfter(Extract); - InsertAfter = I; - } - } + R.vectorizeTree(); // Move to the next bundle. I += VF - 1; NextInst = I + 1; @@ -5495,11 +5463,9 @@ class HorizontalReduction { (private) /// /// Returns true if it matches static bool findBuildVector(InsertElementInst *LastInsertElem, - SmallVectorImpl &BuildVector, SmallVectorImpl &BuildVectorOpds) { Value *V = nullptr; do { - BuildVector.push_back(LastInsertElem); BuildVectorOpds.push_back(LastInsertElem->getOperand(1)); V = LastInsertElem->getOperand(0); if (isa(V)) @@ -5508,7 +5474,6 @@ static bool findBuildVector(InsertElementInst *LastIns if (!LastInsertElem || !LastInsertElem->hasOneUse()) return false; } while (true); - std::reverse(BuildVector.begin(), BuildVector.end()); std::reverse(BuildVectorOpds.begin(), BuildVectorOpds.end()); return true; } @@ -5517,11 +5482,9 @@ static bool findBuildVector(InsertElementInst *LastIns /// /// \return true if it matches. static bool findBuildAggregate(InsertValueInst *IV, - SmallVectorImpl &BuildVector, SmallVectorImpl &BuildVectorOpds) { Value *V; do { - BuildVector.push_back(IV); BuildVectorOpds.push_back(IV->getInsertedValueOperand()); V = IV->getAggregateOperand(); if (isa(V)) @@ -5530,7 +5493,6 @@ static bool findBuildAggregate(InsertValueInst *IV, if (!IV || !IV->hasOneUse()) return false; } while (true); - std::reverse(BuildVector.begin(), BuildVector.end()); std::reverse(BuildVectorOpds.begin(), BuildVectorOpds.end()); return true; } @@ -5706,27 +5668,25 @@ bool SLPVectorizerPass::vectorizeInsertValueInst(Inser if (!R.canMapToVector(IVI->getType(), DL)) return false; - SmallVector BuildVector; SmallVector BuildVectorOpds; - if (!findBuildAggregate(IVI, BuildVector, BuildVectorOpds)) + if (!findBuildAggregate(IVI, BuildVectorOpds)) return false; DEBUG(dbgs() << "SLP: array mappable to vector: " << *IVI << "\n"); // Aggregate value is unlikely to be processed in vector register, we need to // extract scalars into scalar registers, so NeedExtraction is set true. - return tryToVectorizeList(BuildVectorOpds, R, BuildVector, false, true); + return tryToVectorizeList(BuildVectorOpds, R); } bool SLPVectorizerPass::vectorizeInsertElementInst(InsertElementInst *IEI, BasicBlock *BB, BoUpSLP &R) { - SmallVector BuildVector; SmallVector BuildVectorOpds; - if (!findBuildVector(IEI, BuildVector, BuildVectorOpds)) + if (!findBuildVector(IEI, BuildVectorOpds)) return false; // Vectorize starting with the build vector operands ignoring the BuildVector // instructions for the purpose of scheduling and user extraction. - return tryToVectorizeList(BuildVectorOpds, R, BuildVector); + return tryToVectorizeList(BuildVectorOpds, R); } bool SLPVectorizerPass::vectorizeCmpInst(CmpInst *CI, BasicBlock *BB, @@ -5804,8 +5764,8 @@ bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBl // is done when there are exactly two elements since tryToVectorizeList // asserts that there are only two values when AllowReorder is true. bool AllowReorder = NumElts == 2; - if (NumElts > 1 && tryToVectorizeList(makeArrayRef(IncIt, NumElts), R, - None, AllowReorder)) { + if (NumElts > 1 && + tryToVectorizeList(makeArrayRef(IncIt, NumElts), R, AllowReorder)) { // Success start over because instructions might have been changed. HaveVectorizedPhiNodes = true; Changed = true; From owner-svn-src-projects@freebsd.org Fri Jan 12 18:23:40 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C29AE74720 for ; Fri, 12 Jan 2018 18:23:40 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1CE078A78; Fri, 12 Jan 2018 18:23:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 006AB27497; Fri, 12 Jan 2018 18:23:39 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0CINcaR071915; Fri, 12 Jan 2018 18:23:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0CINabH071890; Fri, 12 Jan 2018 18:23:36 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801121823.w0CINabH071890@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 12 Jan 2018 18:23:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327886 - in projects/clang600-import: . bin/cat cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env cddl/contrib/opensolaris/lib/libdtrace/common cddl/usr.sbin/dtrace/tests/common/... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang600-import: . bin/cat cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env cddl/contrib/opensolaris/lib/libdtrace/common cddl/usr.sbin/dtrace/tests/common/env contrib/subversion/su... X-SVN-Commit-Revision: 327886 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 18:23:40 -0000 Author: dim Date: Fri Jan 12 18:23:35 2018 New Revision: 327886 URL: https://svnweb.freebsd.org/changeset/base/327886 Log: Merge ^/head r327624 through r327885. Added: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh - copied unchanged from r327885, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh.out - copied unchanged from r327885, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh.out projects/clang600-import/lib/libcasper/services/cap_dns/cap_dns.3 - copied unchanged from r327885, head/lib/libcasper/services/cap_dns/cap_dns.3 projects/clang600-import/sys/arm/arm/gic_acpi.c - copied unchanged from r327885, head/sys/arm/arm/gic_acpi.c projects/clang600-import/sys/arm64/arm64/cpu_errata.c - copied unchanged from r327885, head/sys/arm64/arm64/cpu_errata.c projects/clang600-import/sys/arm64/arm64/gic_v3_acpi.c - copied unchanged from r327885, head/sys/arm64/arm64/gic_v3_acpi.c projects/clang600-import/sys/contrib/zstd/lib/freebsd/ - copied from r327885, head/sys/contrib/zstd/lib/freebsd/ projects/clang600-import/sys/dev/acpica/acpi_bus_if.m - copied unchanged from r327885, head/sys/dev/acpica/acpi_bus_if.m projects/clang600-import/sys/i386/i386/prof_machdep.c - copied unchanged from r327885, head/sys/i386/i386/prof_machdep.c projects/clang600-import/sys/kern/subr_compressor.c - copied unchanged from r327885, head/sys/kern/subr_compressor.c projects/clang600-import/sys/powerpc/powernv/ - copied from r327885, head/sys/powerpc/powernv/ projects/clang600-import/sys/sys/compressor.h - copied unchanged from r327885, head/sys/sys/compressor.h projects/clang600-import/tests/sys/geom/class/eli/attach_test.sh - copied unchanged from r327885, head/tests/sys/geom/class/eli/attach_test.sh projects/clang600-import/tests/sys/geom/class/eli/configure_test.sh - copied unchanged from r327885, head/tests/sys/geom/class/eli/configure_test.sh projects/clang600-import/tests/sys/geom/class/eli/detach_test.sh - copied unchanged from r327885, head/tests/sys/geom/class/eli/detach_test.sh projects/clang600-import/tests/sys/geom/class/eli/integrity_test.sh - copied unchanged from r327885, head/tests/sys/geom/class/eli/integrity_test.sh projects/clang600-import/tests/sys/geom/class/mirror/sync_error.sh - copied unchanged from r327885, head/tests/sys/geom/class/mirror/sync_error.sh projects/clang600-import/usr.bin/awk/tests/ - copied from r327885, head/usr.bin/awk/tests/ projects/clang600-import/usr.bin/clang/lld/ld.lld.1 - copied unchanged from r327885, head/usr.bin/clang/lld/ld.lld.1 projects/clang600-import/usr.bin/vmstat/tests/ - copied from r327885, head/usr.bin/vmstat/tests/ Deleted: projects/clang600-import/sys/i386/isa/ projects/clang600-import/sys/kern/kern_gzio.c projects/clang600-import/sys/sys/digiio.h projects/clang600-import/sys/sys/gzio.h projects/clang600-import/tests/sys/geom/class/eli/attach_d_test.sh projects/clang600-import/tests/sys/geom/class/eli/configure_b_B_test.sh projects/clang600-import/tests/sys/geom/class/eli/detach_l_test.sh projects/clang600-import/tests/sys/geom/class/eli/init_B_test.sh projects/clang600-import/tests/sys/geom/class/eli/init_J_test.sh projects/clang600-import/tests/sys/geom/class/eli/init_a_test.sh projects/clang600-import/tests/sys/geom/class/eli/init_alias_test.sh projects/clang600-import/tests/sys/geom/class/eli/init_i_P_test.sh projects/clang600-import/tests/sys/geom/class/eli/integrity_copy_test.sh projects/clang600-import/tests/sys/geom/class/eli/integrity_data_test.sh projects/clang600-import/tests/sys/geom/class/eli/integrity_hmac_test.sh projects/clang600-import/tests/sys/geom/class/eli/nokey_test.sh projects/clang600-import/tests/sys/geom/class/eli/onetime_a_test.sh projects/clang600-import/tests/sys/geom/class/eli/onetime_d_test.sh projects/clang600-import/tests/sys/geom/class/eli/readonly_test.sh projects/clang600-import/usr.sbin/digictl/ Modified: projects/clang600-import/Makefile.inc1 projects/clang600-import/Makefile.libcompat projects/clang600-import/ObsoleteFiles.inc projects/clang600-import/UPDATING projects/clang600-import/bin/cat/cat.c projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/env/Makefile projects/clang600-import/contrib/subversion/subversion/svn/util.c projects/clang600-import/etc/mtree/BSD.tests.dist projects/clang600-import/etc/rc.d/ntpd projects/clang600-import/include/stdlib.h projects/clang600-import/lib/libcasper/services/cap_dns/Makefile projects/clang600-import/sbin/camcontrol/camcontrol.c projects/clang600-import/sbin/dhclient/parse.c projects/clang600-import/sbin/ldconfig/ldconfig.8 projects/clang600-import/share/man/man4/aw_sid.4 projects/clang600-import/share/man/man4/smp.4 projects/clang600-import/share/man/man5/core.5 projects/clang600-import/share/man/man5/src.conf.5 projects/clang600-import/share/man/man9/Makefile projects/clang600-import/share/man/man9/malloc.9 projects/clang600-import/share/mk/src.opts.mk projects/clang600-import/share/mk/src.sys.obj.mk projects/clang600-import/stand/common/reloc_elf.c projects/clang600-import/stand/efi/boot1/Makefile projects/clang600-import/stand/efi/boot1/boot1.c projects/clang600-import/stand/efi/include/efi.h projects/clang600-import/stand/libsa/net.h projects/clang600-import/stand/libsa/stand.h projects/clang600-import/stand/mips/beri/boot2/boot2.c projects/clang600-import/stand/mips/beri/common/sdcard.c projects/clang600-import/stand/mips/beri/loader/exec.c projects/clang600-import/sys/amd64/amd64/cpu_switch.S projects/clang600-import/sys/amd64/amd64/exception.S projects/clang600-import/sys/amd64/amd64/genassym.c projects/clang600-import/sys/amd64/amd64/machdep.c projects/clang600-import/sys/amd64/amd64/mp_machdep.c projects/clang600-import/sys/amd64/amd64/support.S projects/clang600-import/sys/amd64/include/md_var.h projects/clang600-import/sys/amd64/vmm/amd/svm.c projects/clang600-import/sys/amd64/vmm/amd/svm_softc.h projects/clang600-import/sys/arm/allwinner/aw_sid.c projects/clang600-import/sys/arm/allwinner/if_awg.c projects/clang600-import/sys/arm/arm/generic_timer.c projects/clang600-import/sys/arm/arm/gic.c projects/clang600-import/sys/arm64/arm64/gic_v3.c projects/clang600-import/sys/arm64/arm64/gic_v3_var.h projects/clang600-import/sys/arm64/arm64/gicv3_its.c projects/clang600-import/sys/arm64/arm64/locore.S projects/clang600-import/sys/arm64/arm64/machdep.c projects/clang600-import/sys/arm64/arm64/mp_machdep.c projects/clang600-import/sys/arm64/arm64/nexus.c projects/clang600-import/sys/arm64/arm64/pmap.c projects/clang600-import/sys/arm64/arm64/swtch.S projects/clang600-import/sys/arm64/arm64/trap.c projects/clang600-import/sys/arm64/include/cpu.h projects/clang600-import/sys/arm64/include/pcpu.h projects/clang600-import/sys/arm64/include/pmap.h projects/clang600-import/sys/cam/ata/ata_da.c projects/clang600-import/sys/cam/cam_periph.c projects/clang600-import/sys/cam/cam_periph.h projects/clang600-import/sys/cam/cam_xpt.c projects/clang600-import/sys/cam/nvme/nvme_da.c projects/clang600-import/sys/cam/nvme/nvme_xpt.c projects/clang600-import/sys/cam/scsi/scsi_da.c projects/clang600-import/sys/cam/scsi/scsi_low.c projects/clang600-import/sys/cam/scsi/scsi_low.h projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/clang600-import/sys/compat/cloudabi32/cloudabi32_sock.c projects/clang600-import/sys/compat/cloudabi64/cloudabi64_sock.c projects/clang600-import/sys/compat/linuxkpi/common/include/linux/slab.h projects/clang600-import/sys/conf/files projects/clang600-import/sys/conf/files.arm64 projects/clang600-import/sys/conf/files.i386 projects/clang600-import/sys/conf/files.mips projects/clang600-import/sys/conf/files.powerpc projects/clang600-import/sys/conf/files.riscv projects/clang600-import/sys/conf/kern.pre.mk projects/clang600-import/sys/conf/options.powerpc projects/clang600-import/sys/contrib/ipfilter/netinet/ip_state.c projects/clang600-import/sys/contrib/vchiq/interface/compat/vchi_bsd.h projects/clang600-import/sys/crypto/aesni/aesni.c projects/clang600-import/sys/ddb/db_textdump.c projects/clang600-import/sys/dev/acpica/acpi.c projects/clang600-import/sys/dev/acpica/acpi_resource.c projects/clang600-import/sys/dev/acpica/acpivar.h projects/clang600-import/sys/dev/amdsbwd/amdsbwd.c projects/clang600-import/sys/dev/bhnd/bcma/bcma_erom.c projects/clang600-import/sys/dev/bhnd/nvram/bhnd_nvram_private.h projects/clang600-import/sys/dev/bhnd/siba/siba_erom.c projects/clang600-import/sys/dev/bxe/bxe.c projects/clang600-import/sys/dev/bxe/ecore_sp.h projects/clang600-import/sys/dev/cxgbe/t4_sge.c projects/clang600-import/sys/dev/e1000/e1000_82575.h projects/clang600-import/sys/dev/e1000/e1000_ich8lan.c projects/clang600-import/sys/dev/e1000/e1000_regs.h projects/clang600-import/sys/dev/e1000/if_em.c projects/clang600-import/sys/dev/extres/syscon/syscon_generic.c projects/clang600-import/sys/dev/iicbus/ds13rtc.c projects/clang600-import/sys/dev/ixl/if_ixlv.c projects/clang600-import/sys/dev/ixl/ixl_pf_iov.c projects/clang600-import/sys/dev/ixl/ixl_pf_main.c projects/clang600-import/sys/dev/md/md.c projects/clang600-import/sys/dev/mlx4/cq.h projects/clang600-import/sys/dev/mlx4/mlx4_core/mlx4_fw.c projects/clang600-import/sys/dev/mlx4/mlx4_core/mlx4_mcg.c projects/clang600-import/sys/dev/mlx4/mlx4_en/mlx4_en_tx.c projects/clang600-import/sys/dev/mlx4/mlx4_ib/mlx4_ib.h projects/clang600-import/sys/dev/mlx4/mlx4_ib/mlx4_ib_qp.c projects/clang600-import/sys/dev/mlx4/qp.h projects/clang600-import/sys/dev/mlx5/device.h projects/clang600-import/sys/dev/mlx5/qp.h projects/clang600-import/sys/dev/psci/psci.c projects/clang600-import/sys/dev/psci/psci.h projects/clang600-import/sys/dev/usb/usbdevs projects/clang600-import/sys/fs/nullfs/null_vfsops.c projects/clang600-import/sys/geom/mirror/g_mirror.c projects/clang600-import/sys/geom/mirror/g_mirror.h projects/clang600-import/sys/geom/mirror/g_mirror_ctl.c projects/clang600-import/sys/i386/bios/apm.c projects/clang600-import/sys/i386/conf/GENERIC projects/clang600-import/sys/i386/conf/NOTES projects/clang600-import/sys/i386/i386/support.s projects/clang600-import/sys/kern/imgact_elf.c projects/clang600-import/sys/kern/kern_malloc.c projects/clang600-import/sys/kern/kern_mutex.c projects/clang600-import/sys/kern/kern_shutdown.c projects/clang600-import/sys/kern/kern_sig.c projects/clang600-import/sys/kern/subr_bus.c projects/clang600-import/sys/kern/sys_socket.c projects/clang600-import/sys/kern/vfs_aio.c projects/clang600-import/sys/kern/vfs_mount.c projects/clang600-import/sys/kern/vfs_subr.c projects/clang600-import/sys/mips/mips/exception.S projects/clang600-import/sys/mips/mips/locore.S projects/clang600-import/sys/mips/mips/swtch.S projects/clang600-import/sys/mips/mips/trap.c projects/clang600-import/sys/modules/bhnd/Makefile projects/clang600-import/sys/modules/dtrace/Makefile projects/clang600-import/sys/modules/gpio/gpiobus/Makefile projects/clang600-import/sys/modules/sdhci_acpi/Makefile projects/clang600-import/sys/modules/sdhci_pci/Makefile projects/clang600-import/sys/modules/sgx/Makefile projects/clang600-import/sys/netpfil/ipfw/dn_heap.c projects/clang600-import/sys/netpfil/ipfw/dn_sched_fq_codel.c projects/clang600-import/sys/netpfil/ipfw/dn_sched_fq_pie.c projects/clang600-import/sys/netpfil/pf/pf_ioctl.c projects/clang600-import/sys/opencrypto/crypto.c projects/clang600-import/sys/opencrypto/cryptodev.c projects/clang600-import/sys/opencrypto/cryptodev.h projects/clang600-import/sys/powerpc/conf/GENERIC64 projects/clang600-import/sys/powerpc/include/spr.h projects/clang600-import/sys/powerpc/powermac/uninorthpci.c projects/clang600-import/sys/powerpc/powermac/uninorthvar.h projects/clang600-import/sys/sys/conf.h projects/clang600-import/sys/sys/imgact.h projects/clang600-import/sys/sys/malloc.h projects/clang600-import/sys/sys/param.h projects/clang600-import/sys/ufs/ffs/ffs_softdep.c projects/clang600-import/sys/ufs/ffs/ffs_vfsops.c projects/clang600-import/sys/ufs/ufs/ufs_dirhash.c projects/clang600-import/sys/vm/vm_glue.c projects/clang600-import/sys/vm/vm_unix.c projects/clang600-import/tests/sys/geom/class/eli/Makefile projects/clang600-import/tests/sys/geom/class/eli/conf.sh projects/clang600-import/tests/sys/geom/class/eli/delkey_test.sh projects/clang600-import/tests/sys/geom/class/eli/init_test.sh projects/clang600-import/tests/sys/geom/class/eli/kill_test.sh projects/clang600-import/tests/sys/geom/class/eli/onetime_test.sh projects/clang600-import/tests/sys/geom/class/eli/resize_test.sh projects/clang600-import/tests/sys/geom/class/eli/setkey_test.sh projects/clang600-import/tests/sys/geom/class/mirror/Makefile projects/clang600-import/tests/sys/netpfil/pf/pft_ping.py projects/clang600-import/tools/tools/crypto/cryptotest.c projects/clang600-import/usr.bin/awk/Makefile projects/clang600-import/usr.bin/clang/lld/Makefile projects/clang600-import/usr.bin/patch/inp.c projects/clang600-import/usr.bin/vmstat/Makefile projects/clang600-import/usr.sbin/Makefile projects/clang600-import/usr.sbin/efibootmgr/efibootmgr.c Directory Properties: projects/clang600-import/ (props changed) projects/clang600-import/cddl/ (props changed) projects/clang600-import/cddl/contrib/opensolaris/ (props changed) projects/clang600-import/contrib/subversion/ (props changed) projects/clang600-import/sys/cddl/contrib/opensolaris/ (props changed) projects/clang600-import/sys/contrib/ipfilter/ (props changed) projects/clang600-import/sys/contrib/zstd/ (props changed) projects/clang600-import/tests/sys/geom/class/mirror/10_test.sh (props changed) projects/clang600-import/tests/sys/geom/class/mirror/11_test.sh (props changed) projects/clang600-import/tests/sys/geom/class/mirror/12_test.sh (props changed) projects/clang600-import/tests/sys/geom/class/mirror/13_test.sh (props changed) Modified: projects/clang600-import/Makefile.inc1 ============================================================================== --- projects/clang600-import/Makefile.inc1 Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/Makefile.inc1 Fri Jan 12 18:23:35 2018 (r327886) @@ -144,7 +144,7 @@ TEST_SYSTEM_COMPILER_VARS= \ WANT_COMPILER_FREEBSD_VERSION WANT_COMPILER_FREEBSD_VERSION_FILE \ CC COMPILER_TYPE COMPILER_FEATURES COMPILER_VERSION \ COMPILER_FREEBSD_VERSION \ - LINKER_TYPE LINKER_VERSION + LINKER_TYPE LINKER_FEATURES LINKER_VERSION test-system-compiler: .PHONY .for v in ${TEST_SYSTEM_COMPILER_VARS} ${_+_}@printf "%-35s= %s\n" "${v}" "${${v}}" @@ -178,6 +178,7 @@ _COMPILER_METADATA_VARS= COMPILER_VERSION \ COMPILER_FEATURES \ COMPILER_FREEBSD_VERSION \ LINKER_VERSION \ + LINKER_FEATURES \ LINKER_TYPE compiler-metadata.mk: .PHONY .META @: > ${.TARGET} Modified: projects/clang600-import/Makefile.libcompat ============================================================================== --- projects/clang600-import/Makefile.libcompat Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/Makefile.libcompat Fri Jan 12 18:23:35 2018 (r327886) @@ -35,10 +35,19 @@ LIB32WMAKEFLAGS= \ OBJCOPY="${XOBJCOPY}" .elif ${TARGET_ARCH:Mmips64*} != "" +.if ${WANT_COMPILER_TYPE} == clang || \ + (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == clang) +.if ${TARGET_ARCH:Mmips64el*} != "" +LIB32CPUFLAGS= -target mipsel-unknown-freebsd12.0 +.else +LIB32CPUFLAGS= -target mips-unknown-freebsd12.0 +.endif +.else .if empty(TARGET_CPUTYPE) LIB32CPUFLAGS= -march=mips3 .else LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} +.endif .endif LIB32CPUFLAGS+= -mabi=32 LIB32WMAKEENV= MACHINE=mips MACHINE_ARCH=mips Modified: projects/clang600-import/ObsoleteFiles.inc ============================================================================== --- projects/clang600-import/ObsoleteFiles.inc Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/ObsoleteFiles.inc Fri Jan 12 18:23:35 2018 (r327886) @@ -155,6 +155,27 @@ OLD_FILES+=usr/lib/clang/5.0.1/lib/freebsd/libclang_rt OLD_DIRS+=usr/lib/clang/5.0.1/lib/freebsd OLD_DIRS+=usr/lib/clang/5.0.1/lib OLD_DIRS+=usr/lib/clang/5.0.1 +# 20180109: Remove vestiges of digi(4) driver +OLD_FILES+=usr/include/sys/digiio.h +OLD_FILES+=usr/sbin/digictl +OLD_FILES+=usr/share/man/man8/digictl.8.gz +# 20180107: Convert remaining geli(8) tests to ATF +OLD_FILES+=tests/sys/geom/class/eli/nokey_test.sh +OLD_FILES+=tests/sys/geom/class/eli/readonly_test.sh +# 20180106: Convert most geli(8) tests to ATF +OLD_FILES+=tests/sys/geom/class/eli/attach_d_test.sh +OLD_FILES+=tests/sys/geom/class/eli/configure_b_B_test.sh +OLD_FILES+=tests/sys/geom/class/eli/detach_l_test.sh +OLD_FILES+=tests/sys/geom/class/eli/init_B_test.sh +OLD_FILES+=tests/sys/geom/class/eli/init_J_test.sh +OLD_FILES+=tests/sys/geom/class/eli/init_a_test.sh +OLD_FILES+=tests/sys/geom/class/eli/init_alias_test.sh +OLD_FILES+=tests/sys/geom/class/eli/init_i_P_test.sh +OLD_FILES+=tests/sys/geom/class/eli/integrity_copy_test.sh +OLD_FILES+=tests/sys/geom/class/eli/integrity_data_test.sh +OLD_FILES+=tests/sys/geom/class/eli/integrity_hmac_test.sh +OLD_FILES+=tests/sys/geom/class/eli/onetime_a_test.sh +OLD_FILES+=tests/sys/geom/class/eli/onetime_d_test.sh # 20171230: Remove /etc/skel from mtree OLD_DIRS+=/etc/skel # 20171208: Remove basename_r(3) Modified: projects/clang600-import/UPDATING ============================================================================== --- projects/clang600-import/UPDATING Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/UPDATING Fri Jan 12 18:23:35 2018 (r327886) @@ -51,6 +51,20 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: ****************************** SPECIAL WARNING: ****************************** +20180110: + LLVM's lld linker is now used as the FreeBSD/amd64 bootstrap linker. + This means it is used to link the kernel and userland libraries and + executables, but is not yet installed as /usr/bin/ld by default. + + To revert to ld.bfd as the bootstrap linker, in /etc/src.conf set + WITHOUT_LLD_BOOTSTRAP=yes + +20180110: + On i386, pmtimer has been removed. Its functionality has been folded + into apm. It was a no-op on ACPI in current for a while now (but was still + needed on i386 in FreeBSD 11 and earlier). Users may need to remove it + from kernel config files. + 20180104: The use of RSS hash from the network card aka flowid has been disabled by default for lagg(4) as it's currently incompatible with @@ -195,7 +209,7 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: will create the recovery information. If you have a filesystem created prior to this change and wish to have a recovery block created for your filesystem, you can do so by running fsck in - forground mode (i.e., do not use the -p or -y options). As it + foreground mode (i.e., do not use the -p or -y options). As it starts, fsck will ask ``SAVE DATA TO FIND ALTERNATE SUPERBLOCKS'' to which you should answer yes. @@ -1855,7 +1869,7 @@ COMMON ITEMS: do an upgrade to the new branch. This is the best-tested upgrade path, and has the highest probability of being successful. Please try this approach if you encounter problems with a major version upgrade. Since - the stable 4.x branch point, one has generally been able to upgade from + the stable 4.x branch point, one has generally been able to upgrade from anywhere in the most recent stable branch to head / current (or even the last couple of stable branches). See the top of this file when there's an exception. @@ -1993,7 +2007,7 @@ COMMON ITEMS: for potential gotchas. The -U option is also useful to consider. See mergemaster(8) for more information. - [5] Usually this step is a noop. However, from time to time + [5] Usually this step is a no-op. However, from time to time you may need to do this if you get unknown user in the following step. It never hurts to do it all the time. You may need to install a new mergemaster (cd src/usr.sbin/mergemaster && make Modified: projects/clang600-import/bin/cat/cat.c ============================================================================== --- projects/clang600-import/bin/cat/cat.c Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/bin/cat/cat.c Fri Jan 12 18:23:35 2018 (r327886) @@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include Copied: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh (from r327885, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh Fri Jan 12 18:23:35 2018 (r327886, copy of r327885, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh) @@ -0,0 +1,34 @@ +# +# CDDL HEADER START +# +# This file and its contents are supplied under the terms of the +# Common Development and Distribution License ("CDDL"), version 1.0. +# You may only use this file in accordance with the terms of version +# 1.0 of the CDDL. +# +# A full copy of the text of the CDDL should have accompanied this +# source. A copy of the CDDL is also available via the Internet at +# http://www.illumos.org/license/CDDL. +# +# CDDL HEADER END +# + +# +# Copyright (c) 2012 by Delphix. All rights reserved. +# + +# +# Reset an environment variable we already know to be set. +# Regression test for FreeBSD r327794. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 + +$dtrace -q -Z -n doogle -xsetenv=PATH=/foo -c '/usr/bin/printenv PATH' + +exit $? Copied: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh.out (from r327885, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh.out) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh.out Fri Jan 12 18:23:35 2018 (r327886, copy of r327885, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/env/tst.setenv3.ksh.out) @@ -0,0 +1,2 @@ +/foo + Modified: projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c ============================================================================== --- projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c Fri Jan 12 18:23:35 2018 (r327886) @@ -415,7 +415,7 @@ dt_opt_setenv(dtrace_hdl_t *dtp, const char *arg, uint { char **p; char *var; - int i; + int nvars; /* * We can't effectively set environment variables from #pragma lines @@ -430,7 +430,7 @@ dt_opt_setenv(dtrace_hdl_t *dtp, const char *arg, uint if (!option && strchr(arg, '=') != NULL) return (dt_set_errno(dtp, EDT_BADOPTVAL)); - for (i = 1, p = dtp->dt_proc_env; *p != NULL; i++, p++) + for (nvars = 0, p = dtp->dt_proc_env; *p != NULL; nvars++, p++) continue; for (p = dtp->dt_proc_env; *p != NULL; p++) { @@ -439,9 +439,9 @@ dt_opt_setenv(dtrace_hdl_t *dtp, const char *arg, uint var = *p + strlen(*p); if (strncmp(*p, arg, var - *p) == 0) { dt_free(dtp, *p); - *p = dtp->dt_proc_env[i - 1]; - dtp->dt_proc_env[i - 1] = NULL; - i--; + *p = dtp->dt_proc_env[nvars - 1]; + dtp->dt_proc_env[nvars - 1] = NULL; + nvars--; } } @@ -449,17 +449,18 @@ dt_opt_setenv(dtrace_hdl_t *dtp, const char *arg, uint if ((var = strdup(arg)) == NULL) return (dt_set_errno(dtp, EDT_NOMEM)); - if ((p = dt_alloc(dtp, sizeof (char *) * (i + 1))) == NULL) { + nvars++; + if ((p = dt_alloc(dtp, sizeof(char *) * (nvars + 1))) == NULL) { dt_free(dtp, var); return (dt_set_errno(dtp, EDT_NOMEM)); } - bcopy(dtp->dt_proc_env, p, sizeof (char *) * i); + bcopy(dtp->dt_proc_env, p, sizeof(char *) * nvars); dt_free(dtp, dtp->dt_proc_env); dtp->dt_proc_env = p; - dtp->dt_proc_env[i - 1] = var; - dtp->dt_proc_env[i] = NULL; + dtp->dt_proc_env[nvars - 1] = var; + dtp->dt_proc_env[nvars] = NULL; } return (0); Modified: projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/env/Makefile ============================================================================== --- projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/env/Makefile Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/env/Makefile Fri Jan 12 18:23:35 2018 (r327886) @@ -15,6 +15,8 @@ ${PACKAGE}FILES= \ tst.setenv1.ksh.out \ tst.setenv2.ksh \ tst.setenv2.ksh.out \ + tst.setenv3.ksh \ + tst.setenv3.ksh.out \ tst.unsetenv1.ksh \ tst.unsetenv1.ksh.out \ tst.unsetenv2.ksh \ Modified: projects/clang600-import/contrib/subversion/subversion/svn/util.c ============================================================================== --- projects/clang600-import/contrib/subversion/subversion/svn/util.c Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/contrib/subversion/subversion/svn/util.c Fri Jan 12 18:23:35 2018 (r327886) @@ -352,6 +352,7 @@ static const char *prefixes[] = { "Relnotes:", "Security:", "Sponsored by:", + "Pull Request:", "Differential Revision:", }; @@ -443,6 +444,7 @@ svn_cl__get_log_message(const char **log_msg, if (sponsored_by != NULL) svn_stringbuf_appendcstr(default_msg, sponsored_by); svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); + svn_stringbuf_appendcstr(default_msg, "Pull Request:\t" APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "Differential Revision:\t" APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, EDITOR_EOF_PREFIX); svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); @@ -458,6 +460,7 @@ svn_cl__get_log_message(const char **log_msg, svn_stringbuf_appendcstr(default_msg, "> Relnotes: Set to 'yes' for mention in release notes." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Security: Vulnerability reference (one per line) or description." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Sponsored by: If the change was sponsored by an organization." APR_EOL_STR); + svn_stringbuf_appendcstr(default_msg, "> Pull Request: https://github.com/freebsd/freebsd/pull/### (*full* GitHub URL needed)." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed)." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, "> Empty fields above will be automatically removed." APR_EOL_STR); svn_stringbuf_appendcstr(default_msg, APR_EOL_STR); Modified: projects/clang600-import/etc/mtree/BSD.tests.dist ============================================================================== --- projects/clang600-import/etc/mtree/BSD.tests.dist Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/etc/mtree/BSD.tests.dist Fri Jan 12 18:23:35 2018 (r327886) @@ -536,6 +536,8 @@ usr.bin apply .. + awk + .. basename .. bmake @@ -733,6 +735,8 @@ uuencode .. uniq + .. + vmstat .. xargs .. Modified: projects/clang600-import/etc/rc.d/ntpd ============================================================================== --- projects/clang600-import/etc/rc.d/ntpd Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/etc/rc.d/ntpd Fri Jan 12 18:23:35 2018 (r327886) @@ -144,9 +144,9 @@ ntpd_fetch_leapfile() { done ntp_ver_no_tmp=$(get_ntp_leapfile_ver $ntp_tmp_leapfile) ntp_expiry_tmp=$(get_ntp_leapfile_expiry $ntp_tmp_leapfile) - if [ "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" -o \ - "$ntp_ver_no_tmp" -eq "$ntp_ver_no_db" -a \ - "$ntp_expiry_tmp" -gt "$ntp_expiry_db" ]; then + if [ "$ntp_expiry_tmp" -gt "$ntp_expiry_db" -o \ + "$ntp_expiry_tmp" -eq "$ntp_expiry_db" -a \ + "$ntp_ver_no_tmp" -gt "$ntp_ver_no_db" ]; then $verbose using $url as $ntp_db_leapfile mv $ntp_tmp_leapfile $ntp_db_leapfile else Modified: projects/clang600-import/include/stdlib.h ============================================================================== --- projects/clang600-import/include/stdlib.h Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/include/stdlib.h Fri Jan 12 18:23:35 2018 (r327886) @@ -304,7 +304,7 @@ int radixsort(const unsigned char **, int, const unsi unsigned); void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) __alloc_size(3); -void *reallocf(void *, size_t) __alloc_size(2); +void *reallocf(void *, size_t) __result_use_check __alloc_size(2); int rpmatch(const char *); void setprogname(const char *); int sradixsort(const unsigned char **, int, const unsigned char *, Modified: projects/clang600-import/lib/libcasper/services/cap_dns/Makefile ============================================================================== --- projects/clang600-import/lib/libcasper/services/cap_dns/Makefile Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/lib/libcasper/services/cap_dns/Makefile Fri Jan 12 18:23:35 2018 (r327886) @@ -24,4 +24,14 @@ CFLAGS+=-I${.CURDIR} HAS_TESTS= SUBDIR.${MK_TESTS}+= tests +MAN+= cap_dns.3 + +MLINKS+=cap_dns.3 libcap_dns.3 +MLINKS+=cap_dns.3 cap_gethostbyname.3 +MLINKS+=cap_dns.3 cap_gethostbyname2.3 +MLINKS+=cap_dns.3 cap_gethostbyaddr.3 +MLINKS+=cap_dns.3 cap_getnameinfo.3 +MLINKS+=cap_dns.3 cap_dns_type_limit.3 +MLINKS+=cap_dns.3 cap_dns_family_limit.3 + .include Copied: projects/clang600-import/lib/libcasper/services/cap_dns/cap_dns.3 (from r327885, head/lib/libcasper/services/cap_dns/cap_dns.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang600-import/lib/libcasper/services/cap_dns/cap_dns.3 Fri Jan 12 18:23:35 2018 (r327886, copy of r327885, head/lib/libcasper/services/cap_dns/cap_dns.3) @@ -0,0 +1,205 @@ +.\" Copyright (c) 2018 Mariusz Zaborski +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 10, 2018 +.Dt CAP_DNS 3 +.Os +.Sh NAME +.Nm cap_gethostbyname , +.Nm cap_gethostbyname2 , +.Nm cap_gethostbyaddr , +.Nm cap_getnameinfo , +.Nm cap_dns_type_limit , +.Nm cap_dns_family_limit +.Nd "library for getting network host entry in capability mode" +.Sh LIBRARY +.Lb libcap_dns +.Sh SYNOPSIS +.In sys/nv.h +.In libcasper.h +.In casper/cap_dns.h +.Ft "struct hostent *" +.Fn cap_gethostbyname "const cap_channel_t *chan" "const char *name" +.Ft "struct hostent *" +.Fn cap_gethostbyname2 "const cap_channel_t *chan" "const char *name" "int af" +.Ft "struct hostent *" +.Fn cap_gethostbyaddr "const cap_channel_t *chan" "const void *addr" "socklen_t len" "int af" +.Ft "int" +.Fn cap_getnameinfo "const cap_channel_t *chan" "const void *name" "int namelen" +.Ft "int" +.Fn cap_dns_type_limit "cap_channel_t *chan" "const char * const *types" "size_t ntypes" +.Ft "int" +.Fn cap_dns_family_limit "const cap_channel_t *chan" "const int *families" "size_t nfamilies" +.Sh DESCRIPTION +The functions +.Fn cap_gethostbyname , +.Fn cap_gethostbyname2 , +.Fn cep_gethostbyaddr +and +.Fn cap_getnameinfo +are respectively equivalent to +.Xr gethostbyname 2 , +.Xr gethostbyname2 2 , +.Xr gethostbyaddr 2 +and +.Xr getnameinfo 2 +except that the connection to the +.Nm system.dns +service needs to be provided. +.Pp +The +.Fn cap_dns_type_limit +function limits the functions allowed in the service. +The +.Fa types +variable can be set to +.Dv ADDR +or +.Dv NAME . +See the +.Sx LIMITS +section for more details. +The +.Fa ntpyes +variable contains the number of +.Fa types +provided. +.Pp +The +.Fn cap_dns_family_limit +functions allows to limit address families. +For details see +.Sx LIMITS . +The +.Fa nfamilies +variable contains the number of +.Fa families +provided. +.Sh LIMITS +The preferred way of setting limits is to use the +.Fn cap_dns_type_limit +and +.Fn cap_dns_family_limit +functions, but the limits of service can be set also using +.Xr cap_limit_set 3 . +The nvlist for that function can contain the following values and types: +.Bl -ohang -offset indent +.It type ( NV_TYPE_STRING ) +The +.Va type +can have two values: +.Dv ADDR +or +.Dv NAME . +The +.Dv ADDR +means that functions +.Fn cap_gethostbyname , +.Fn cap_gethostbyname2 +and +.Fn cap_gethostbyaddr +are allowed. +In case when +.Va type +is set to +.Dv NAME +the +.Fn cap_getnameinfo +function is allowed. +.It family ( NV_TYPE_NUMBER ) +The +.Va family +limits service to one of the address families (e.g. +.Dv AF_INET , AF_INET6 , +etc.). +.Sh EXAMPLES +The following example first opens a capability to casper and then uses this +capability to create the +.Nm system.dns +casper service and uses it to resolve an IP address. +.Bd -literal +cap_channel_t *capcas, *capdns; +const char *typelimit = "ADDR"; +int familylimit; +const char *ipstr = "127.0.0.1"; +struct in_addr ip; +struct hostent *hp; + +/* Open capability to Casper. */ +capcas = cap_init(); +if (capcas == NULL) + err(1, "Unable to contact Casper"); + +/* Enter capability mode sandbox. */ +if (cap_enter() < 0 && errno != ENOSYS) + err(1, "Unable to enter capability mode"); + +/* Use Casper capability to create capability to the system.dns service. */ +capdns = cap_service_open(capcas, "system.dns"); +if (capdns == NULL) + err(1, "Unable to open system.dns service"); + +/* Close Casper capability, we don't need it anymore. */ +cap_close(capcas); + +/* Limit system.dns to reverse DNS lookups. */ +if (cap_dns_type_limit(capdns, &typelimit, 1) < 0) + err(1, "Unable to limit access to the system.dns service"); + +/* Limit system.dns to reserve IPv4 addresses */ +familylimit = AF_INET; +if (cap_dns_family_limit(capdns, &familylimit, 1) < 0) + err(1, "Unable to limit access to the system.dns service"); + +/* Convert IP address in C-string to in_addr. */ +if (!inet_aton(ipstr, &ip)) + errx(1, "Unable to parse IP address %s.", ipstr); + +/* Find hostname for the given IP address. */ +hp = cap_gethostbyaddr(capdns, (const void *)&ip, sizeof(ip), AF_INET); +if (hp == NULL) + errx(1, "No name associated with %s.", ipstr); + +printf("Name associated with %s is %s.\\n", ipstr, hp->h_name); +.Ed +.Sh SEE ALSO +.Xr cap_enter 2 , +.Xr err 3 , +.Xr gethostbyaddr 3 , +.Xr gethostbyname 3 , +.Xr gethostbyname2 3 , +.Xr getnameinfo 3, +.Xr nv 3 , +.Xr capsicum 4 +.Sh AUTHORS +The +.Nm cap_dns +service was implemented by +.An Pawel Jakub Dawidek Aq Mt pawel@dawidek.net +under sponsorship from the FreeBSD Foundation. +.Pp +This manual page was written by +.An Mariusz Zaborski Aq Mt oshogbo@FreeBSD.org . Modified: projects/clang600-import/sbin/camcontrol/camcontrol.c ============================================================================== --- projects/clang600-import/sbin/camcontrol/camcontrol.c Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/sbin/camcontrol/camcontrol.c Fri Jan 12 18:23:35 2018 (r327886) @@ -275,6 +275,12 @@ camcontrol_optret getoption(struct camcontrol_opts *ta static int getdevlist(struct cam_device *device); #endif /* MINIMALISTIC */ static int getdevtree(int argc, char **argv, char *combinedopt); +static int print_dev_scsi(struct device_match_result *dev_result, char *tmpstr); +static int print_dev_ata(struct device_match_result *dev_result, char *tmpstr); +static int print_dev_semb(struct device_match_result *dev_result, char *tmpstr); +static int print_dev_mmcsd(struct device_match_result *dev_result, + char *tmpstr); +static int print_dev_nvme(struct device_match_result *dev_result, char *tmpstr); #ifndef MINIMALISTIC static int testunitready(struct cam_device *device, int task_attr, int retry_count, int timeout, int quiet); @@ -554,8 +560,7 @@ getdevtree(int argc, char **argv, char *combinedopt) } case DEV_MATCH_DEVICE: { struct device_match_result *dev_result; - char vendor[16], product[48], revision[16]; - char fw[5], tmpstr[256]; + char tmpstr[256]; if (busonly == 1) break; @@ -572,57 +577,36 @@ getdevtree(int argc, char **argv, char *combinedopt) skip_device = 0; if (dev_result->protocol == PROTO_SCSI) { - cam_strvis(vendor, dev_result->inq_data.vendor, - sizeof(dev_result->inq_data.vendor), - sizeof(vendor)); - cam_strvis(product, - dev_result->inq_data.product, - sizeof(dev_result->inq_data.product), - sizeof(product)); - cam_strvis(revision, - dev_result->inq_data.revision, - sizeof(dev_result->inq_data.revision), - sizeof(revision)); - sprintf(tmpstr, "<%s %s %s>", vendor, product, - revision); + if (print_dev_scsi(dev_result, + &tmpstr[0]) != 0) { + skip_device = 1; + break; + } } else if (dev_result->protocol == PROTO_ATA || dev_result->protocol == PROTO_SATAPM) { - cam_strvis(product, - dev_result->ident_data.model, - sizeof(dev_result->ident_data.model), - sizeof(product)); - cam_strvis(revision, - dev_result->ident_data.revision, - sizeof(dev_result->ident_data.revision), - sizeof(revision)); - sprintf(tmpstr, "<%s %s>", product, - revision); - } else if (dev_result->protocol == PROTO_MMCSD) { - if (strlen(dev_result->mmc_ident_data.model) > 0) { - sprintf(tmpstr, "<%s>", dev_result->mmc_ident_data.model); - } else { - sprintf(tmpstr, "<%s card>", - dev_result->mmc_ident_data.card_features & CARD_FEATURE_SDIO ? "SDIO" : "unknown"); + if (print_dev_ata(dev_result, + &tmpstr[0]) != 0) { + skip_device = 1; + break; } + } else if (dev_result->protocol == PROTO_MMCSD){ + if (print_dev_mmcsd(dev_result, + &tmpstr[0]) != 0) { + skip_device = 1; + break; + } } else if (dev_result->protocol == PROTO_SEMB) { - struct sep_identify_data *sid; - - sid = (struct sep_identify_data *) - &dev_result->ident_data; - cam_strvis(vendor, sid->vendor_id, - sizeof(sid->vendor_id), - sizeof(vendor)); - cam_strvis(product, sid->product_id, - sizeof(sid->product_id), - sizeof(product)); - cam_strvis(revision, sid->product_rev, - sizeof(sid->product_rev), - sizeof(revision)); - cam_strvis(fw, sid->firmware_rev, - sizeof(sid->firmware_rev), - sizeof(fw)); - sprintf(tmpstr, "<%s %s %s %s>", - vendor, product, revision, fw); + if (print_dev_semb(dev_result, + &tmpstr[0]) != 0) { + skip_device = 1; + break; + } + } else if (dev_result->protocol == PROTO_NVME) { + if (print_dev_nvme(dev_result, + &tmpstr[0]) != 0) { + skip_device = 1; + break; + } } else { sprintf(tmpstr, "<>"); } @@ -676,6 +660,122 @@ getdevtree(int argc, char **argv, char *combinedopt) close(fd); return (error); +} + +static int +print_dev_scsi(struct device_match_result *dev_result, char *tmpstr) +{ + char vendor[16], product[48], revision[16]; + + cam_strvis(vendor, dev_result->inq_data.vendor, + sizeof(dev_result->inq_data.vendor), sizeof(vendor)); + cam_strvis(product, dev_result->inq_data.product, + sizeof(dev_result->inq_data.product), sizeof(product)); + cam_strvis(revision, dev_result->inq_data.revision, + sizeof(dev_result->inq_data.revision), sizeof(revision)); + sprintf(tmpstr, "<%s %s %s>", vendor, product, revision); + + return (0); +} + +static int +print_dev_ata(struct device_match_result *dev_result, char *tmpstr) +{ + char product[48], revision[16]; + + cam_strvis(product, dev_result->ident_data.model, + sizeof(dev_result->ident_data.model), sizeof(product)); + cam_strvis(revision, dev_result->ident_data.revision, + sizeof(dev_result->ident_data.revision), sizeof(revision)); + sprintf(tmpstr, "<%s %s>", product, revision); + + return (0); +} + +static int +print_dev_semb(struct device_match_result *dev_result, char *tmpstr) +{ + struct sep_identify_data *sid; + char vendor[16], product[48], revision[16], fw[5]; + + sid = (struct sep_identify_data *)&dev_result->ident_data; + cam_strvis(vendor, sid->vendor_id, + sizeof(sid->vendor_id), sizeof(vendor)); + cam_strvis(product, sid->product_id, + sizeof(sid->product_id), sizeof(product)); + cam_strvis(revision, sid->product_rev, + sizeof(sid->product_rev), sizeof(revision)); + cam_strvis(fw, sid->firmware_rev, + sizeof(sid->firmware_rev), sizeof(fw)); + sprintf(tmpstr, "<%s %s %s %s>", vendor, product, revision, fw); + + return (0); +} + +static int +print_dev_mmcsd(struct device_match_result *dev_result, char *tmpstr) +{ + + if (strlen(dev_result->mmc_ident_data.model) > 0) { + sprintf(tmpstr, "<%s>", dev_result->mmc_ident_data.model); + } else { + sprintf(tmpstr, "<%s card>", + dev_result->mmc_ident_data.card_features & + CARD_FEATURE_SDIO ? "SDIO" : "unknown"); + } + return (0); +} + +static int +print_dev_nvme(struct device_match_result *dev_result, char *tmpstr) +{ + union ccb *ccb; + struct ccb_dev_advinfo *advi; + struct cam_device *dev; + struct nvme_controller_data cdata; + char vendor[64], product[64]; + + dev = cam_open_btl(dev_result->path_id, dev_result->target_id, + dev_result->target_lun, O_RDWR, NULL); + if (dev == NULL) { + warnx("%s", cam_errbuf); + return (1); + } + + ccb = cam_getccb(dev); + if (ccb == NULL) { + warnx("couldn't allocate CCB"); + cam_close_device(dev); + return (1); + } + + advi = &ccb->cdai; + advi->ccb_h.flags = CAM_DIR_IN; + advi->ccb_h.func_code = XPT_DEV_ADVINFO; + advi->flags = CDAI_FLAG_NONE; + advi->buftype = CDAI_TYPE_NVME_CNTRL; + advi->bufsiz = sizeof(struct nvme_controller_data); + advi->buf = (uint8_t *)&cdata; + + if (cam_send_ccb(dev, ccb) < 0) { + warn("error sending CAMIOCOMMAND ioctl"); + cam_freeccb(ccb); + cam_close_device(dev); + return(1); + } + if (advi->ccb_h.status != CAM_REQ_CMP) { + warnx("got CAM error %#x", advi->ccb_h.status); + cam_freeccb(ccb); + cam_close_device(dev); + return(1); + } + cam_strvis(vendor, cdata.mn, sizeof(cdata.mn), sizeof(vendor)); + cam_strvis(product, cdata.fr, sizeof(cdata.fr), sizeof(product)); + sprintf(tmpstr, "<%s %s>", vendor, product); + + cam_freeccb(ccb); + cam_close_device(dev); + return (0); } #ifndef MINIMALISTIC Modified: projects/clang600-import/sbin/dhclient/parse.c ============================================================================== --- projects/clang600-import/sbin/dhclient/parse.c Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/sbin/dhclient/parse.c Fri Jan 12 18:23:35 2018 (r327886) @@ -45,6 +45,8 @@ #include __FBSDID("$FreeBSD$"); +#include + #include "dhcpd.h" #include "dhctoken.h" Modified: projects/clang600-import/sbin/ldconfig/ldconfig.8 ============================================================================== --- projects/clang600-import/sbin/ldconfig/ldconfig.8 Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/sbin/ldconfig/ldconfig.8 Fri Jan 12 18:23:35 2018 (r327886) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 19, 2013 +.Dd January 6, 2018 .Dt LDCONFIG 8 .Os .Sh NAME @@ -58,7 +58,9 @@ the overhead that would otherwise result from the dire operations the dynamic linker would have to perform to load the required shared libraries. .Pp -Files named on the command line are expected to contain directories +Alternatively, +.Ar files +may be specified; these are expected to contain directories to scan for shared libraries. Each directory's pathname must start on a new line. @@ -157,9 +159,10 @@ file. In particular, the .Ev LD_LIBRARY_PATH is not used to search for libraries. -Thus, the role of ldconfig is dual. -In -addition to building a set of hints for quick lookup, it also serves to +Thus, the role of +.Nm +is dual. +In addition to building a set of hints for quick lookup, it also serves to specify the trusted collection of directories from which shared objects can be safely loaded. .Sh FILES Modified: projects/clang600-import/share/man/man4/aw_sid.4 ============================================================================== --- projects/clang600-import/share/man/man4/aw_sid.4 Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/share/man/man4/aw_sid.4 Fri Jan 12 18:23:35 2018 (r327886) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 2, 2018 +.Dd January 6, 2018 .Dt AW_SID 4 .Os .Sh NAME @@ -52,6 +52,8 @@ allwinner,sun7i-a20-sid allwinner,sun50i-a64-sid .It allwinner,sun8i-a83t-sid +.It +allwinner,sun8i-h3-sid .El .Sh SYSCTL VARIABLES The following read-only variables are available via Modified: projects/clang600-import/share/man/man4/smp.4 ============================================================================== --- projects/clang600-import/share/man/man4/smp.4 Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/share/man/man4/smp.4 Fri Jan 12 18:23:35 2018 (r327886) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 7, 2008 +.Dd January 6, 2018 .Dt SMP 4 .Os .Sh NAME @@ -56,6 +56,11 @@ i386 also requires The .Xr mptable 1 command may be used to view the status of multi-processor support. +.Pp +.Nm +support can be disabled by setting the loader tunable +.Va kern.smp.disabled +to 1. .Pp The number of CPUs detected by the system is available in the read-only sysctl variable Modified: projects/clang600-import/share/man/man5/core.5 ============================================================================== --- projects/clang600-import/share/man/man5/core.5 Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/share/man/man5/core.5 Fri Jan 12 18:23:35 2018 (r327886) @@ -28,7 +28,7 @@ .\" @(#)core.5 8.3 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd October 5, 2015 +.Dd January 8, 2018 .Dt CORE 5 .Os .Sh NAME @@ -67,8 +67,8 @@ generating it). .Pp The following format specifiers may be used in the .Va kern.corefile -sysctl to insert additional information into the resulting core file -name: +sysctl to insert additional information into the resulting core +filename: .Bl -tag -width "1234567890" -compact -offset "12345" .It Em \&%H Machine hostname. @@ -108,17 +108,17 @@ is included in the kernel configuration file: GZIO .El .Pp -When the GZIO option is included, the following sysctls control whether core -files will be compressed: -.Bl -tag -width "kern.compress_user_cores_gzlevel" -compact -offset "12345" -.It Em kern.compress_user_cores_gzlevel -Gzip compression level. -Defaults to 6. +The following sysctl control core file compression: +.Bl -tag -width "kern.compress_user_cores_level" -compact -offset "12345" .It Em kern.compress_user_cores -Actually compress user cores. -Compressed core files will have a suffix of +Enable compression of user cores. +A value of 1 configures gzip compression. +gzip-compressed core files will have a suffix of .Ql .gz -appended to them. +appended to their filenames. +.It Em kern.compress_user_cores_level +Compression level. +Defaults to 6. .El .Sh NOTES Corefiles are written with open file descriptor information as an ELF note. @@ -153,6 +153,7 @@ command can be used: .Dl sysctl kern.corefile=/var/coredumps/\&%U/\&%N.core .Sh SEE ALSO .Xr gdb 1 , +.Xr gzip 1 , .Xr kgdb 1 , .Xr setrlimit 2 , .Xr sigaction 2 , Modified: projects/clang600-import/share/man/man5/src.conf.5 ============================================================================== --- projects/clang600-import/share/man/man5/src.conf.5 Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/share/man/man5/src.conf.5 Fri Jan 12 18:23:35 2018 (r327886) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd November 2, 2017 +.Dd January 11, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -970,12 +970,12 @@ To be able to build the system, either Binutils or LLD enabled unless an alternate linker is provided via XLD. .Pp This is a default setting on -amd64/amd64, arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLD_BOOTSTRAP Set to build the LLD linker during the bootstrap phase of the build. .Pp This is a default setting on -arm64/aarch64. +amd64/amd64, arm64/aarch64 and i386/i386. .It Va WITHOUT_LLD_IS_LD Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp @@ -996,6 +996,11 @@ Set to use LLVM's libunwind stack unwinder (instead of .Pp This is a default setting on amd64/amd64, arm64/aarch64, i386/i386, riscv/riscv64 and riscv/riscv64sf. +.It Va WITH_LOADER_FIREWIRE +Enable firewire support in /boot/loader and /boot/zfsloader on x86. +This option is a nop on all other platforms. +.It Va WITHOUT_LOADER_GELI +Disable inclusion of GELI crypto support in the boot chain binaries. .It Va WITHOUT_LOCALES Set to not build localization files; see .Xr locale 1 . Modified: projects/clang600-import/share/man/man9/Makefile ============================================================================== --- projects/clang600-import/share/man/man9/Makefile Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/share/man/man9/Makefile Fri Jan 12 18:23:35 2018 (r327886) @@ -1262,6 +1262,7 @@ MLINKS+=make_dev.9 destroy_dev.9 \ make_dev.9 make_dev_p.9 \ make_dev.9 make_dev_s.9 MLINKS+=malloc.9 free.9 \ + malloc.9 mallocarray.9 \ malloc.9 MALLOC_DECLARE.9 \ malloc.9 MALLOC_DEFINE.9 \ malloc.9 realloc.9 \ Modified: projects/clang600-import/share/man/man9/malloc.9 ============================================================================== --- projects/clang600-import/share/man/man9/malloc.9 Fri Jan 12 18:19:14 2018 (r327885) +++ projects/clang600-import/share/man/man9/malloc.9 Fri Jan 12 18:23:35 2018 (r327886) @@ -29,7 +29,7 @@ .\" $NetBSD: malloc.9,v 1.3 1996/11/11 00:05:11 lukem Exp $ .\" $FreeBSD$ .\" -.Dd November 19, 2015 +.Dd January 10, 2018 .Dt MALLOC 9 .Os .Sh NAME @@ -45,6 +45,8 @@ .In sys/malloc.h .Ft void * .Fn malloc "unsigned long size" "struct malloc_type *type" "int flags" +.Ft void * +.Fn mallocarray "size_t nmemb" "size_t size" "struct malloc_type *type" "int flags" .Ft void .Fn free "void *addr" "struct malloc_type *type" .Ft void * @@ -64,6 +66,14 @@ object whose size is specified by .Fa size . .Pp The +.Fn mallocarray +function allocates uninitialized memory in kernel address space for an +array of +.Fa nmemb +entries whose size is specified by +.Fa size . +.Pp +The .Fn free function releases memory at address .Fa addr @@ -144,6 +154,7 @@ If the request cannot be immediately fulfilled, the cu to sleep to wait for resources to be released by other processes. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Fri Jan 12 18:44:29 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 926E1E7578A for ; Fri, 12 Jan 2018 18:44:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6E0337994C; Fri, 12 Jan 2018 18:44:29 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 91BD3277C8; Fri, 12 Jan 2018 18:44:28 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0CIiSVs080573; Fri, 12 Jan 2018 18:44:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0CIiSA0080572; Fri, 12 Jan 2018 18:44:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801121844.w0CIiSA0080572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 12 Jan 2018 18:44:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327887 - projects/clang600-import/contrib/llvm X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm X-SVN-Commit-Revision: 327887 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jan 2018 18:44:29 -0000 Author: dim Date: Fri Jan 12 18:44:28 2018 New Revision: 327887 URL: https://svnweb.freebsd.org/changeset/base/327887 Log: Hit Subversion over the head with a big cluestick. Modified: Directory Properties: projects/clang600-import/contrib/llvm/ (props changed) From owner-svn-src-projects@freebsd.org Sat Jan 13 13:53:06 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D55B7E6643D for ; Sat, 13 Jan 2018 13:53:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AFF502AE8; Sat, 13 Jan 2018 13:53:06 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EE3A013BE5; Sat, 13 Jan 2018 13:53:05 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0DDr5IW067148; Sat, 13 Jan 2018 13:53:05 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0DDr5Pr067146; Sat, 13 Jan 2018 13:53:05 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801131353.w0DDr5Pr067146@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 13 Jan 2018 13:53:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327918 - in projects/clang600-import: lib/clang/liblldb usr.bin/clang/llvm-extract X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang600-import: lib/clang/liblldb usr.bin/clang/llvm-extract X-SVN-Commit-Revision: 327918 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 13:53:06 -0000 Author: dim Date: Sat Jan 13 13:53:05 2018 New Revision: 327918 URL: https://svnweb.freebsd.org/changeset/base/327918 Log: Build llvm-extract with -lz, and add a few objects to liblldb, both of which turn out to be needed when you don't use -ffunction-sections. Reported by: Shawn Webb Modified: projects/clang600-import/lib/clang/liblldb/Makefile projects/clang600-import/usr.bin/clang/llvm-extract/Makefile Modified: projects/clang600-import/lib/clang/liblldb/Makefile ============================================================================== --- projects/clang600-import/lib/clang/liblldb/Makefile Sat Jan 13 11:59:49 2018 (r327917) +++ projects/clang600-import/lib/clang/liblldb/Makefile Sat Jan 13 13:53:05 2018 (r327918) @@ -19,6 +19,7 @@ SRCS+= API/SBAttachInfo.cpp SRCS+= API/SBBlock.cpp SRCS+= API/SBBreakpoint.cpp SRCS+= API/SBBreakpointLocation.cpp +SRCS+= API/SBBreakpointOptionCommon.cpp SRCS+= API/SBBroadcaster.cpp SRCS+= API/SBCommandInterpreter.cpp SRCS+= API/SBCommandReturnObject.cpp @@ -47,6 +48,7 @@ SRCS+= API/SBModule.cpp SRCS+= API/SBModuleSpec.cpp SRCS+= API/SBPlatform.cpp SRCS+= API/SBProcess.cpp +SRCS+= API/SBProcessInfo.cpp SRCS+= API/SBQueue.cpp SRCS+= API/SBQueueItem.cpp SRCS+= API/SBSection.cpp Modified: projects/clang600-import/usr.bin/clang/llvm-extract/Makefile ============================================================================== --- projects/clang600-import/usr.bin/clang/llvm-extract/Makefile Sat Jan 13 11:59:49 2018 (r327917) +++ projects/clang600-import/usr.bin/clang/llvm-extract/Makefile Sat Jan 13 13:53:05 2018 (r327918) @@ -5,4 +5,6 @@ PROG_CXX= llvm-extract SRCDIR= tools/llvm-extract SRCS+= llvm-extract.cpp +LIBADD+= z + .include "../llvm.prog.mk" From owner-svn-src-projects@freebsd.org Sat Jan 13 17:53:00 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 33A32E76070 for ; Sat, 13 Jan 2018 17:53:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CFA1A6F580; Sat, 13 Jan 2018 17:52:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1D0A01645E; Sat, 13 Jan 2018 17:52:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0DHqwXc067899; Sat, 13 Jan 2018 17:52:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0DHqtjc067864; Sat, 13 Jan 2018 17:52:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801131752.w0DHqtjc067864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 13 Jan 2018 17:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327931 - in projects/clang600-import: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety cddl/contrib/opensolaris/lib/libdtrace/common cddl/usr.sbin/dtrace/tests/common/safet... X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: in projects/clang600-import: . cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety cddl/contrib/opensolaris/lib/libdtrace/common cddl/usr.sbin/dtrace/tests/common/safety contrib/gcc lib/libc/sy... X-SVN-Commit-Revision: 327931 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 17:53:00 -0000 Author: dim Date: Sat Jan 13 17:52:55 2018 New Revision: 327931 URL: https://svnweb.freebsd.org/changeset/base/327931 Log: Merge ^/head r327886 through r327930. Added: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d - copied unchanged from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d - copied unchanged from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d projects/clang600-import/sys/powerpc/mpc85xx/mpc85xx_cache.c - copied unchanged from r327930, head/sys/powerpc/mpc85xx/mpc85xx_cache.c projects/clang600-import/sys/sys/_domainset.h - copied unchanged from r327930, head/sys/sys/_domainset.h projects/clang600-import/sys/sys/domainset.h - copied unchanged from r327930, head/sys/sys/domainset.h projects/clang600-import/sys/vm/vm_domainset.c - copied unchanged from r327930, head/sys/vm/vm_domainset.c projects/clang600-import/sys/vm/vm_domainset.h - copied unchanged from r327930, head/sys/vm/vm_domainset.h Deleted: projects/clang600-import/sys/dev/fdt/fdt_powerpc.c projects/clang600-import/sys/kern/kern_numa.c projects/clang600-import/sys/sys/_vm_domain.h projects/clang600-import/sys/vm/vm_domain.c projects/clang600-import/sys/vm/vm_domain.h Modified: projects/clang600-import/Makefile.inc1 projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile projects/clang600-import/contrib/gcc/unwind-dw2.c projects/clang600-import/lib/libc/sys/Symbol.map projects/clang600-import/lib/libmemstat/memstat_uma.c projects/clang600-import/lib/libpmc/libpmc.c projects/clang600-import/share/man/man5/src.conf.5 projects/clang600-import/share/mk/src.opts.mk projects/clang600-import/sys/amd64/amd64/uma_machdep.c projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c projects/clang600-import/sys/arm/arm/machdep_ptrace.c projects/clang600-import/sys/arm64/arm64/busdma_machdep.c projects/clang600-import/sys/arm64/arm64/uma_machdep.c projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c projects/clang600-import/sys/compat/freebsd32/syscalls.master projects/clang600-import/sys/conf/files projects/clang600-import/sys/conf/files.powerpc projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c projects/clang600-import/sys/ddb/db_run.c projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h projects/clang600-import/sys/dev/mmc/host/dwmmc_hisi.c projects/clang600-import/sys/dev/mmc/mmc.c projects/clang600-import/sys/dev/mmc/mmcsd.c projects/clang600-import/sys/dev/ofw/ofw_fdt.c projects/clang600-import/sys/dev/sdhci/sdhci.c projects/clang600-import/sys/dev/wbwd/wbwd.c projects/clang600-import/sys/i386/i386/pmap.c projects/clang600-import/sys/kern/init_main.c projects/clang600-import/sys/kern/init_sysent.c projects/clang600-import/sys/kern/kern_cpuset.c projects/clang600-import/sys/kern/kern_exit.c projects/clang600-import/sys/kern/kern_fork.c projects/clang600-import/sys/kern/kern_malloc.c projects/clang600-import/sys/kern/kern_mbuf.c projects/clang600-import/sys/kern/kern_rwlock.c projects/clang600-import/sys/kern/kern_sx.c projects/clang600-import/sys/kern/kern_thr.c projects/clang600-import/sys/kern/kern_thread.c projects/clang600-import/sys/kern/makesyscalls.sh projects/clang600-import/sys/kern/sched_4bsd.c projects/clang600-import/sys/kern/sched_ule.c projects/clang600-import/sys/kern/subr_busdma_bufalloc.c projects/clang600-import/sys/kern/subr_kdb.c projects/clang600-import/sys/kern/subr_vmem.c projects/clang600-import/sys/kern/syscalls.c projects/clang600-import/sys/kern/syscalls.master projects/clang600-import/sys/kern/systrace_args.c projects/clang600-import/sys/kern/vfs_bio.c projects/clang600-import/sys/mips/mips/busdma_machdep.c projects/clang600-import/sys/mips/mips/uma_machdep.c projects/clang600-import/sys/netinet/libalias/alias_mod.h projects/clang600-import/sys/netinet/libalias/alias_sctp.c projects/clang600-import/sys/netpfil/ipfw/dn_sched_fq_codel.c projects/clang600-import/sys/powerpc/aim/mmu_oea64.c projects/clang600-import/sys/powerpc/aim/slb.c projects/clang600-import/sys/powerpc/ofw/ofw_machdep.c projects/clang600-import/sys/powerpc/powerpc/busdma_machdep.c projects/clang600-import/sys/powerpc/powerpc/uma_machdep.c projects/clang600-import/sys/riscv/riscv/uma_machdep.c projects/clang600-import/sys/sparc64/sparc64/vm_machdep.c projects/clang600-import/sys/sys/bus_dma.h projects/clang600-import/sys/sys/busdma_bufalloc.h projects/clang600-import/sys/sys/cpuset.h projects/clang600-import/sys/sys/malloc.h projects/clang600-import/sys/sys/proc.h projects/clang600-import/sys/sys/syscall.h projects/clang600-import/sys/sys/syscall.mk projects/clang600-import/sys/sys/syscallsubr.h projects/clang600-import/sys/sys/sysproto.h projects/clang600-import/sys/vm/uma.h projects/clang600-import/sys/vm/uma_core.c projects/clang600-import/sys/vm/uma_int.h projects/clang600-import/sys/vm/vm_extern.h projects/clang600-import/sys/vm/vm_fault.c projects/clang600-import/sys/vm/vm_init.c projects/clang600-import/sys/vm/vm_kern.c projects/clang600-import/sys/vm/vm_object.c projects/clang600-import/sys/vm/vm_object.h projects/clang600-import/sys/vm/vm_page.c projects/clang600-import/sys/vm/vm_page.h projects/clang600-import/sys/vm/vm_phys.c projects/clang600-import/sys/vm/vm_phys.h projects/clang600-import/sys/vm/vm_reserv.c projects/clang600-import/sys/x86/acpica/srat.c projects/clang600-import/sys/x86/include/busdma_impl.h projects/clang600-import/sys/x86/iommu/busdma_dmar.c projects/clang600-import/sys/x86/x86/busdma_bounce.c projects/clang600-import/sys/x86/x86/busdma_machdep.c projects/clang600-import/usr.bin/cpuset/cpuset.c projects/clang600-import/usr.bin/numactl/numactl.c projects/clang600-import/usr.bin/truss/syscall.h projects/clang600-import/usr.bin/truss/syscalls.c projects/clang600-import/usr.sbin/bsdinstall/partedit/gpart_ops.c Directory Properties: projects/clang600-import/ (props changed) projects/clang600-import/cddl/ (props changed) projects/clang600-import/cddl/contrib/opensolaris/ (props changed) projects/clang600-import/contrib/gcc/ (props changed) projects/clang600-import/sys/cddl/contrib/opensolaris/ (props changed) projects/clang600-import/sys/contrib/ipfilter/ (props changed) Modified: projects/clang600-import/Makefile.inc1 ============================================================================== --- projects/clang600-import/Makefile.inc1 Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/Makefile.inc1 Sat Jan 13 17:52:55 2018 (r327931) @@ -537,6 +537,7 @@ BSARGS= DESTDIR= \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ MK_LLDB=no MK_TESTS=no \ + MK_LLD=${MK_LLD_BOOTSTRAP} \ MK_INCLUDES=yes BMAKE= \ Copied: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d (from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d Sat Jan 13 17:52:55 2018 (r327931, copy of r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jailname.d) @@ -0,0 +1,44 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2018 Domagoj Stolfa . + * + * This software was developed by BAE Systems, the University of Cambridge + * Computer Laboratory, and Memorial University under DARPA/AFRL contract + * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing + * (TC) research program. + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * collect jailname at every fbt probe and at every firing of a + * high-frequency profile probe + */ + +fbt::: +{ + @a[jailname] = count(); +} + +profile-4999hz +{ + @a[jailname] = count(); +} + +tick-1sec +/n++ == 10/ +{ + exit(0); +} Copied: projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d (from r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang600-import/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d Sat Jan 13 17:52:55 2018 (r327931, copy of r327930, head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/safety/tst.jid.d) @@ -0,0 +1,44 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ + +/* + * Copyright 2018 Domagoj Stolfa . + * + * This software was developed by BAE Systems, the University of Cambridge + * Computer Laboratory, and Memorial University under DARPA/AFRL contract + * FA8650-15-C-7558 ("CADETS"), as part of the DARPA Transparent Computing + * (TC) research program. + * + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +/* + * ASSERTION: + * collect jid at every fbt probe and at every firing of a + * high-frequency profile probe + */ + +fbt::: +{ + @a[jid] = count(); +} + +profile-4999hz +{ + @a[jid] = count(); +} + +tick-1sec +/n++ == 10/ +{ + exit(0); +} Modified: projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Sat Jan 13 17:52:55 2018 (r327931) @@ -313,6 +313,12 @@ static const dt_ident_t _dtrace_globals[] = { DT_VERS_1_5, &dt_idops_func, "string(int, void *)" }, { "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "uint_t" }, +#ifdef __FreeBSD__ +{ "jailname", DT_IDENT_SCALAR, 0, DIF_VAR_JAILNAME, + DT_ATTR_STABCMN, DT_VERS_1_13, &dt_idops_type, "string" }, +{ "jid", DT_IDENT_SCALAR, 0, DIF_VAR_JID, DT_ATTR_STABCMN, DT_VERS_1_13, + &dt_idops_type, "int" }, +#endif { "json", DT_IDENT_FUNC, 0, DIF_SUBR_JSON, DT_ATTR_STABCMN, DT_VERS_1_11, &dt_idops_func, "string(const char *, const char *)" }, { "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0, @@ -528,10 +534,8 @@ static const dt_ident_t _dtrace_globals[] = { { "walltimestamp", DT_IDENT_SCALAR, 0, DIF_VAR_WALLTIMESTAMP, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "int64_t" }, -#ifdef illumos { "zonename", DT_IDENT_SCALAR, 0, DIF_VAR_ZONENAME, DT_ATTR_STABCMN, DT_VERS_1_0, &dt_idops_type, "string" }, -#endif #ifndef illumos { "cpu", DT_IDENT_SCALAR, 0, DIF_VAR_CPU, Modified: projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile ============================================================================== --- projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/cddl/usr.sbin/dtrace/tests/common/safety/Makefile Sat Jan 13 17:52:55 2018 (r327931) @@ -19,6 +19,8 @@ ${PACKAGE}FILES= \ tst.gid.d \ tst.hton.d \ tst.index.d \ + tst.jailname.d \ + tst.jid.d \ tst.msgdsize.d \ tst.msgsize.d \ tst.null.d \ Modified: projects/clang600-import/contrib/gcc/unwind-dw2.c ============================================================================== --- projects/clang600-import/contrib/gcc/unwind-dw2.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/contrib/gcc/unwind-dw2.c Sat Jan 13 17:52:55 2018 (r327931) @@ -1393,16 +1393,7 @@ uw_advance_context (struct _Unwind_Context *context, _ static inline void init_dwarf_reg_size_table (void) { -/* - * ARM64TODO: http://llvm.org/pr22997 - * llvm 3.6 doesn't support __builtin_init_dwarf_reg_size_table on AArch64. - */ -#ifdef __aarch64__ - printf("Unimplemented: init_dwarf_reg_size_table\n"); - abort(); -#else __builtin_init_dwarf_reg_size_table (dwarf_reg_size_table); -#endif } static void Modified: projects/clang600-import/lib/libc/sys/Symbol.map ============================================================================== --- projects/clang600-import/lib/libc/sys/Symbol.map Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/lib/libc/sys/Symbol.map Sat Jan 13 17:52:55 2018 (r327931) @@ -398,6 +398,8 @@ FBSD_1.5 { mknodat; stat; statfs; + cpuset_getdomain; + cpuset_setdomain; }; FBSDprivate_1.0 { @@ -1022,4 +1024,8 @@ FBSDprivate_1.0 { gssd_syscall; __libc_interposing_slot; __libc_sigwait; + _cpuset_getdomain; + __sys_cpuset_getdomain; + _cpuset_setdomain; + __sys_cpuset_setdomain; }; Modified: projects/clang600-import/lib/libmemstat/memstat_uma.c ============================================================================== --- projects/clang600-import/lib/libmemstat/memstat_uma.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/lib/libmemstat/memstat_uma.c Sat Jan 13 17:52:55 2018 (r327931) @@ -55,6 +55,8 @@ static struct nlist namelist[] = { { .n_name = "_mp_maxid" }, #define X_ALL_CPUS 2 { .n_name = "_all_cpus" }, +#define X_VM_NDOMAINS 3 + { .n_name = "_vm_ndomains" }, { .n_name = "" }, }; @@ -297,11 +299,12 @@ memstat_kvm_uma(struct memory_type_list *list, void *k { LIST_HEAD(, uma_keg) uma_kegs; struct memory_type *mtp; + struct uma_zone_domain uzd; struct uma_bucket *ubp, ub; struct uma_cache *ucp, *ucp_array; struct uma_zone *uzp, uz; struct uma_keg *kzp, kz; - int hint_dontsearch, i, mp_maxid, ret; + int hint_dontsearch, i, mp_maxid, ndomains, ret; char name[MEMTYPE_MAXNAME]; cpuset_t all_cpus; long cpusetsize; @@ -323,6 +326,12 @@ memstat_kvm_uma(struct memory_type_list *list, void *k list->mtl_error = ret; return (-1); } + ret = kread_symbol(kvm, X_VM_NDOMAINS, &ndomains, + sizeof(ndomains), 0); + if (ret != 0) { + list->mtl_error = ret; + return (-1); + } ret = kread_symbol(kvm, X_UMA_KEGS, &uma_kegs, sizeof(uma_kegs), 0); if (ret != 0) { list->mtl_error = ret; @@ -447,10 +456,17 @@ skip_percpu: kz.uk_ipers; mtp->mt_byteslimit = mtp->mt_countlimit * mtp->mt_size; mtp->mt_count = mtp->mt_numallocs - mtp->mt_numfrees; - for (ubp = LIST_FIRST(&uz.uz_buckets); ubp != - NULL; ubp = LIST_NEXT(&ub, ub_link)) { - ret = kread(kvm, ubp, &ub, sizeof(ub), 0); - mtp->mt_zonefree += ub.ub_cnt; + for (i = 0; i < ndomains; i++) { + ret = kread(kvm, &uz.uz_domain[i], &uzd, + sizeof(uzd), 0); + for (ubp = + LIST_FIRST(&uzd.uzd_buckets); + ubp != NULL; + ubp = LIST_NEXT(&ub, ub_link)) { + ret = kread(kvm, ubp, &ub, + sizeof(ub), 0); + mtp->mt_zonefree += ub.ub_cnt; + } } if (!((kz.uk_flags & UMA_ZONE_SECONDARY) && LIST_FIRST(&kz.uk_zones) != uzp)) { Modified: projects/clang600-import/lib/libpmc/libpmc.c ============================================================================== --- projects/clang600-import/lib/libpmc/libpmc.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/lib/libpmc/libpmc.c Sat Jan 13 17:52:55 2018 (r327931) @@ -3270,7 +3270,8 @@ pmc_init(void) cpu_info.pm_npmc = op_cpu_info.pm_npmc; cpu_info.pm_nclass = op_cpu_info.pm_nclass; for (n = 0; n < cpu_info.pm_nclass; n++) - cpu_info.pm_classes[n] = op_cpu_info.pm_classes[n]; + memcpy(&cpu_info.pm_classes[n], &op_cpu_info.pm_classes[n], + sizeof(cpu_info.pm_classes[n])); pmc_class_table = malloc(PMC_CLASS_TABLE_SIZE * sizeof(struct pmc_class_descr *)); Modified: projects/clang600-import/share/man/man5/src.conf.5 ============================================================================== --- projects/clang600-import/share/man/man5/src.conf.5 Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/share/man/man5/src.conf.5 Sat Jan 13 17:52:55 2018 (r327931) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd January 11, 2018 +.Dd January 12, 2018 .Dt SRC.CONF 5 .Os .Sh NAME @@ -970,12 +970,12 @@ To be able to build the system, either Binutils or LLD enabled unless an alternate linker is provided via XLD. .Pp This is a default setting on -arm/arm, arm/armeb, arm/armv6, arm/armv7, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. +arm/arm, arm/armeb, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64, powerpc/powerpcspe, riscv/riscv64, riscv/riscv64sf and sparc64/sparc64. .It Va WITH_LLD_BOOTSTRAP Set to build the LLD linker during the bootstrap phase of the build. .Pp This is a default setting on -amd64/amd64, arm64/aarch64 and i386/i386. +amd64/amd64 and arm64/aarch64. .It Va WITHOUT_LLD_IS_LD Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. .Pp Modified: projects/clang600-import/share/mk/src.opts.mk ============================================================================== --- projects/clang600-import/share/mk/src.opts.mk Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/share/mk/src.opts.mk Sat Jan 13 17:52:55 2018 (r327931) @@ -253,7 +253,7 @@ __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif .if ${__T} == "aarch64" __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP LLD_IS_LD -.elif ${__T} == "amd64" || ${__T} == "i386" +.elif ${__T} == "amd64" __DEFAULT_YES_OPTIONS+=LLD_BOOTSTRAP __DEFAULT_NO_OPTIONS+=LLD_IS_LD .else Modified: projects/clang600-import/sys/amd64/amd64/uma_machdep.c ============================================================================== --- projects/clang600-import/sys/amd64/amd64/uma_machdep.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/amd64/amd64/uma_machdep.c Sat Jan 13 17:52:55 2018 (r327931) @@ -44,14 +44,15 @@ __FBSDID("$FreeBSD$"); #include void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, + int wait) { vm_page_t m; vm_paddr_t pa; void *va; *flags = UMA_SLAB_PRIV; - m = vm_page_alloc(NULL, 0, + m = vm_page_alloc_domain(NULL, 0, domain, malloc2vm_flags(wait) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) return (NULL); Modified: projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c ============================================================================== --- projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/arm/allwinner/a83t/a83t_padconf.c Sat Jan 13 17:52:55 2018 (r327931) @@ -71,24 +71,24 @@ static const struct allwinner_pins a83t_pins[] = { { "PC17", 2, 17, { "gpio_in", "gpio_out", "nand" } }, { "PC18", 2, 18, { "gpio_in", "gpio_out", "nand" } }, - { "PD2", 3, 2, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD3", 3, 3, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD4", 3, 4, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD5", 3, 5, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD6", 3, 6, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD7", 3, 7, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD10", 3, 10, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD11", 3, 11, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD12", 3, 12, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD13", 3, 13, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD14", 3, 14, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD15", 3, 15, { "gpio_in", "gpio_out", "lcd", NULL, "emac" } }, - { "PD18", 3, 18, { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } }, - { "PD19", 3, 19, { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } }, - { "PD20", 3, 20, { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } }, - { "PD21", 3, 21, { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } }, - { "PD22", 3, 22, { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } }, - { "PD23", 3, 23, { "gpio_in", "gpio_out", "lcd", "lvds", "emac" } }, + { "PD2", 3, 2, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD3", 3, 3, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD4", 3, 4, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD5", 3, 5, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD6", 3, 6, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD7", 3, 7, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD10", 3, 10, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD11", 3, 11, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD12", 3, 12, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD13", 3, 13, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD14", 3, 14, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD15", 3, 15, { "gpio_in", "gpio_out", "lcd", NULL, "gmac" } }, + { "PD18", 3, 18, { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } }, + { "PD19", 3, 19, { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } }, + { "PD20", 3, 20, { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } }, + { "PD21", 3, 21, { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } }, + { "PD22", 3, 22, { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } }, + { "PD23", 3, 23, { "gpio_in", "gpio_out", "lcd", "lvds", "gmac" } }, { "PD24", 3, 24, { "gpio_in", "gpio_out", "lcd", "lvds" } }, { "PD25", 3, 25, { "gpio_in", "gpio_out", "lcd", "lvds" } }, { "PD26", 3, 26, { "gpio_in", "gpio_out", "lcd", "lvds" } }, Modified: projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c ============================================================================== --- projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/arm/arm/busdma_machdep-v4.c Sat Jan 13 17:52:55 2018 (r327931) @@ -500,6 +500,13 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al } int +bus_dma_tag_set_domain(bus_dma_tag_t dmat, int domain) +{ + + return (0); +} + +int bus_dma_tag_destroy(bus_dma_tag_t dmat) { bus_dma_tag_t dmat_copy; Modified: projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/arm/arm/busdma_machdep-v6.c Sat Jan 13 17:52:55 2018 (r327931) @@ -563,6 +563,13 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t al } int +bus_dma_tag_set_domain(bus_dma_tag_t dmat, int domain) +{ + + return (0); +} + +int bus_dma_tag_destroy(bus_dma_tag_t dmat) { bus_dma_tag_t dmat_copy; Modified: projects/clang600-import/sys/arm/arm/machdep_ptrace.c ============================================================================== --- projects/clang600-import/sys/arm/arm/machdep_ptrace.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/arm/arm/machdep_ptrace.c Sat Jan 13 17:52:55 2018 (r327931) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: projects/clang600-import/sys/arm64/arm64/busdma_machdep.c ============================================================================== --- projects/clang600-import/sys/arm64/arm64/busdma_machdep.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/arm64/arm64/busdma_machdep.c Sat Jan 13 17:52:55 2018 (r327931) @@ -223,3 +223,9 @@ bus_dma_tag_destroy(bus_dma_tag_t dmat) return (tc->impl->tag_destroy(dmat)); } +int +bus_dma_tag_set_domain(bus_dma_tag_t dmat, int domain) +{ + + return (0); +} Modified: projects/clang600-import/sys/arm64/arm64/uma_machdep.c ============================================================================== --- projects/clang600-import/sys/arm64/arm64/uma_machdep.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/arm64/arm64/uma_machdep.c Sat Jan 13 17:52:55 2018 (r327931) @@ -42,14 +42,15 @@ __FBSDID("$FreeBSD$"); #include void * -uma_small_alloc(uma_zone_t zone, vm_size_t bytes, u_int8_t *flags, int wait) +uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags, + int wait) { vm_page_t m; vm_paddr_t pa; void *va; *flags = UMA_SLAB_PRIV; - m = vm_page_alloc(NULL, 0, + m = vm_page_alloc_domain(NULL, 0, domain, malloc2vm_flags(wait) | VM_ALLOC_NOOBJ | VM_ALLOC_WIRED); if (m == NULL) return (NULL); Modified: projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Sat Jan 13 17:52:55 2018 (r327931) @@ -3654,6 +3654,24 @@ dtrace_dif_variable(dtrace_mstate_t *mstate, dtrace_st return (dtrace_dif_varstr( (uintptr_t)curthread->t_procp->p_zone->zone_name, state, mstate)); +#elif defined(__FreeBSD__) + /* + * On FreeBSD, we introduce compatibility to zonename by falling through + * into jailname. + */ + case DIF_VAR_JAILNAME: + if (!dtrace_priv_kernel(state)) + return (0); + + return (dtrace_dif_varstr( + (uintptr_t)curthread->t_procp->p_ucred->cr_prison->pr_name, + state, mstate)); + + case DIF_VAR_JID: + if (!dtrace_priv_kernel(state)) + return (0); + + return ((uint64_t)curthread->t_procp->p_ucred->cr_prison->pr_id); #else return (0); #endif Modified: projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h ============================================================================== --- projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Sat Jan 13 17:52:55 2018 (r327931) @@ -254,6 +254,8 @@ typedef enum dtrace_probespec { #define DIF_VAR_GID 0x011f /* process group ID */ #define DIF_VAR_ERRNO 0x0120 /* thread errno */ #define DIF_VAR_EXECARGS 0x0121 /* process arguments */ +#define DIF_VAR_JID 0x0122 /* process jail id */ +#define DIF_VAR_JAILNAME 0x0123 /* process jail name */ #ifndef illumos #define DIF_VAR_CPU 0x0200 Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/compat/freebsd32/freebsd32_misc.c Sat Jan 13 17:52:55 2018 (r327931) @@ -3017,6 +3017,24 @@ freebsd32_cpuset_setaffinity(struct thread *td, } int +freebsd32_cpuset_getdomain(struct thread *td, + struct freebsd32_cpuset_getdomain_args *uap) +{ + + return (kern_cpuset_getdomain(td, uap->level, uap->which, + PAIR32TO64(id_t,uap->id), uap->domainsetsize, uap->mask, uap->policy)); +} + +int +freebsd32_cpuset_setdomain(struct thread *td, + struct freebsd32_cpuset_setdomain_args *uap) +{ + + return (kern_cpuset_setdomain(td, uap->level, uap->which, + PAIR32TO64(id_t,uap->id), uap->domainsetsize, uap->mask, uap->policy)); +} + +int freebsd32_nmount(struct thread *td, struct freebsd32_nmount_args /* { struct iovec *iovp; Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/compat/freebsd32/freebsd32_proto.h Sat Jan 13 17:52:55 2018 (r327931) @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -693,6 +694,24 @@ struct freebsd32_kevent_args { char nevents_l_[PADL_(int)]; int nevents; char nevents_r_[PADR_(int)]; char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)]; }; +struct freebsd32_cpuset_getdomain_args { + char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)]; + char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; + char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; + char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; + char domainsetsize_l_[PADL_(size_t)]; size_t domainsetsize; char domainsetsize_r_[PADR_(size_t)]; + char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)]; + char policy_l_[PADL_(int *)]; int * policy; char policy_r_[PADR_(int *)]; +}; +struct freebsd32_cpuset_setdomain_args { + char level_l_[PADL_(cpulevel_t)]; cpulevel_t level; char level_r_[PADR_(cpulevel_t)]; + char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; + char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; + char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; + char domainsetsize_l_[PADL_(size_t)]; size_t domainsetsize; char domainsetsize_r_[PADR_(size_t)]; + char mask_l_[PADL_(domainset_t *)]; domainset_t * mask; char mask_r_[PADR_(domainset_t *)]; + char policy_l_[PADL_(int)]; int policy; char policy_r_[PADR_(int)]; +}; #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) #define PAD64_REQUIRED #endif @@ -823,6 +842,8 @@ int freebsd32_fstatat(struct thread *, struct freebsd3 int freebsd32_fhstat(struct thread *, struct freebsd32_fhstat_args *); int freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *); int freebsd32_kevent(struct thread *, struct freebsd32_kevent_args *); +int freebsd32_cpuset_getdomain(struct thread *, struct freebsd32_cpuset_getdomain_args *); +int freebsd32_cpuset_setdomain(struct thread *, struct freebsd32_cpuset_setdomain_args *); #ifdef COMPAT_43 @@ -1370,6 +1391,8 @@ int freebsd11_freebsd32_mknodat(struct thread *, struc #define FREEBSD32_SYS_AUE_freebsd32_fhstat AUE_FHSTAT #define FREEBSD32_SYS_AUE_freebsd32_getdirentries AUE_GETDIRENTRIES #define FREEBSD32_SYS_AUE_freebsd32_kevent AUE_KEVENT +#define FREEBSD32_SYS_AUE_freebsd32_cpuset_getdomain AUE_NULL +#define FREEBSD32_SYS_AUE_freebsd32_cpuset_setdomain AUE_NULL #undef PAD_ #undef PADL_ Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/compat/freebsd32/freebsd32_syscall.h Sat Jan 13 17:52:55 2018 (r327931) @@ -455,8 +455,6 @@ #define FREEBSD32_SYS_freebsd32_ppoll 545 #define FREEBSD32_SYS_freebsd32_futimens 546 #define FREEBSD32_SYS_freebsd32_utimensat 547 -#define FREEBSD32_SYS_numa_getaffinity 548 -#define FREEBSD32_SYS_numa_setaffinity 549 #define FREEBSD32_SYS_fdatasync 550 #define FREEBSD32_SYS_freebsd32_fstat 551 #define FREEBSD32_SYS_freebsd32_fstatat 552 @@ -468,4 +466,6 @@ #define FREEBSD32_SYS_fhstatfs 558 #define FREEBSD32_SYS_mknodat 559 #define FREEBSD32_SYS_freebsd32_kevent 560 -#define FREEBSD32_SYS_MAXSYSCALL 561 +#define FREEBSD32_SYS_freebsd32_cpuset_getdomain 561 +#define FREEBSD32_SYS_freebsd32_cpuset_setdomain 562 +#define FREEBSD32_SYS_MAXSYSCALL 563 Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/compat/freebsd32/freebsd32_syscalls.c Sat Jan 13 17:52:55 2018 (r327931) @@ -580,8 +580,8 @@ const char *freebsd32_syscallnames[] = { "freebsd32_ppoll", /* 545 = freebsd32_ppoll */ "freebsd32_futimens", /* 546 = freebsd32_futimens */ "freebsd32_utimensat", /* 547 = freebsd32_utimensat */ - "numa_getaffinity", /* 548 = numa_getaffinity */ - "numa_setaffinity", /* 549 = numa_setaffinity */ + "#548", /* 548 = numa_getaffinity */ + "#549", /* 549 = numa_setaffinity */ "fdatasync", /* 550 = fdatasync */ "freebsd32_fstat", /* 551 = freebsd32_fstat */ "freebsd32_fstatat", /* 552 = freebsd32_fstatat */ @@ -593,4 +593,6 @@ const char *freebsd32_syscallnames[] = { "fhstatfs", /* 558 = fhstatfs */ "mknodat", /* 559 = mknodat */ "freebsd32_kevent", /* 560 = freebsd32_kevent */ + "freebsd32_cpuset_getdomain", /* 561 = freebsd32_cpuset_getdomain */ + "freebsd32_cpuset_setdomain", /* 562 = freebsd32_cpuset_setdomain */ }; Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/compat/freebsd32/freebsd32_sysent.c Sat Jan 13 17:52:55 2018 (r327931) @@ -629,8 +629,8 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = freebsd32_ppoll */ { AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 546 = freebsd32_futimens */ { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ - { AS(numa_getaffinity_args), (sy_call_t *)sys_numa_getaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 548 = numa_getaffinity */ - { AS(numa_setaffinity_args), (sy_call_t *)sys_numa_setaffinity, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 549 = numa_setaffinity */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 548 = numa_getaffinity */ + { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 549 = numa_setaffinity */ { AS(fdatasync_args), (sy_call_t *)sys_fdatasync, AUE_FSYNC, NULL, 0, 0, 0, SY_THR_STATIC }, /* 550 = fdatasync */ { AS(freebsd32_fstat_args), (sy_call_t *)freebsd32_fstat, AUE_FSTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 551 = freebsd32_fstat */ { AS(freebsd32_fstatat_args), (sy_call_t *)freebsd32_fstatat, AUE_FSTATAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 552 = freebsd32_fstatat */ @@ -642,4 +642,6 @@ struct sysent freebsd32_sysent[] = { { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 558 = fhstatfs */ { AS(mknodat_args), (sy_call_t *)sys_mknodat, AUE_MKNODAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 559 = mknodat */ { AS(freebsd32_kevent_args), (sy_call_t *)freebsd32_kevent, AUE_KEVENT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 560 = freebsd32_kevent */ + { AS(freebsd32_cpuset_getdomain_args), (sy_call_t *)freebsd32_cpuset_getdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 561 = freebsd32_cpuset_getdomain */ + { AS(freebsd32_cpuset_setdomain_args), (sy_call_t *)freebsd32_cpuset_setdomain, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 562 = freebsd32_cpuset_setdomain */ }; Modified: projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/compat/freebsd32/freebsd32_systrace_args.c Sat Jan 13 17:52:55 2018 (r327931) @@ -3150,24 +3150,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 4; break; } - /* numa_getaffinity */ - case 548: { - struct numa_getaffinity_args *p = params; - iarg[0] = p->which; /* cpuwhich_t */ - iarg[1] = p->id; /* id_t */ - uarg[2] = (intptr_t) p->policy; /* struct vm_domain_policy * */ - *n_args = 3; - break; - } - /* numa_setaffinity */ - case 549: { - struct numa_setaffinity_args *p = params; - iarg[0] = p->which; /* cpuwhich_t */ - iarg[1] = p->id; /* id_t */ - uarg[2] = (intptr_t) p->policy; /* const struct vm_domain_policy * */ - *n_args = 3; - break; - } /* fdatasync */ case 550: { struct fdatasync_args *p = params; @@ -3266,6 +3248,32 @@ systrace_args(int sysnum, void *params, uint64_t *uarg *n_args = 6; break; } + /* freebsd32_cpuset_getdomain */ + case 561: { + struct freebsd32_cpuset_getdomain_args *p = params; + iarg[0] = p->level; /* cpulevel_t */ + iarg[1] = p->which; /* cpuwhich_t */ + uarg[2] = p->id1; /* uint32_t */ + uarg[3] = p->id2; /* uint32_t */ + uarg[4] = p->domainsetsize; /* size_t */ + uarg[5] = (intptr_t) p->mask; /* domainset_t * */ + uarg[6] = (intptr_t) p->policy; /* int * */ + *n_args = 7; + break; + } + /* freebsd32_cpuset_setdomain */ + case 562: { + struct freebsd32_cpuset_setdomain_args *p = params; + iarg[0] = p->level; /* cpulevel_t */ + iarg[1] = p->which; /* cpuwhich_t */ + uarg[2] = p->id1; /* uint32_t */ + uarg[3] = p->id2; /* uint32_t */ + uarg[4] = p->domainsetsize; /* size_t */ + uarg[5] = (intptr_t) p->mask; /* domainset_t * */ + iarg[6] = p->policy; /* int */ + *n_args = 7; + break; + } default: *n_args = 0; break; @@ -8563,38 +8571,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; - /* numa_getaffinity */ - case 548: - switch(ndx) { - case 0: - p = "cpuwhich_t"; - break; - case 1: - p = "id_t"; - break; - case 2: - p = "userland struct vm_domain_policy *"; - break; - default: - break; - }; - break; - /* numa_setaffinity */ - case 549: - switch(ndx) { - case 0: - p = "cpuwhich_t"; - break; - case 1: - p = "id_t"; - break; - case 2: - p = "userland const struct vm_domain_policy *"; - break; - default: - break; - }; - break; /* fdatasync */ case 550: switch(ndx) { @@ -8768,6 +8744,62 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *d break; }; break; + /* freebsd32_cpuset_getdomain */ + case 561: + switch(ndx) { + case 0: + p = "cpulevel_t"; + break; + case 1: + p = "cpuwhich_t"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "uint32_t"; + break; + case 4: + p = "size_t"; + break; + case 5: + p = "userland domainset_t *"; + break; + case 6: + p = "userland int *"; + break; + default: + break; + }; + break; + /* freebsd32_cpuset_setdomain */ + case 562: + switch(ndx) { + case 0: + p = "cpulevel_t"; + break; + case 1: + p = "cpuwhich_t"; + break; + case 2: + p = "uint32_t"; + break; + case 3: + p = "uint32_t"; + break; + case 4: + p = "size_t"; + break; + case 5: + p = "userland domainset_t *"; + break; + case 6: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -10554,16 +10586,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char * if (ndx == 0 || ndx == 1) p = "int"; break; - /* numa_getaffinity */ - case 548: - if (ndx == 0 || ndx == 1) - p = "int"; - break; - /* numa_setaffinity */ - case 549: - if (ndx == 0 || ndx == 1) - p = "int"; - break; /* fdatasync */ case 550: if (ndx == 0 || ndx == 1) @@ -10616,6 +10638,16 @@ systrace_return_setargdesc(int sysnum, int ndx, char * break; /* freebsd32_kevent */ case 560: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* freebsd32_cpuset_getdomain */ + case 561: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* freebsd32_cpuset_setdomain */ + case 562: if (ndx == 0 || ndx == 1) p = "int"; break; Modified: projects/clang600-import/sys/compat/freebsd32/syscalls.master ============================================================================== --- projects/clang600-import/sys/compat/freebsd32/syscalls.master Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/compat/freebsd32/syscalls.master Sat Jan 13 17:52:55 2018 (r327931) @@ -1086,12 +1086,8 @@ 547 AUE_FUTIMESAT STD { int freebsd32_utimensat(int fd, \ char *path, \ struct timespec *times, int flag); } -548 AUE_NULL NOPROTO { int numa_getaffinity(cpuwhich_t which, \ - id_t id, \ - struct vm_domain_policy *policy); } -549 AUE_NULL NOPROTO { int numa_setaffinity(cpuwhich_t which, \ - id_t id, \ - const struct vm_domain_policy *policy); } +548 AUE_NULL UNIMPL numa_getaffinity +549 AUE_NULL UNIMPL numa_setaffinity 550 AUE_FSYNC NOPROTO { int fdatasync(int fd); } 551 AUE_FSTAT STD { int freebsd32_fstat(int fd, \ struct stat32 *ub); } @@ -1119,4 +1115,13 @@ struct kevent32 *eventlist, \ int nevents, \ const struct timespec32 *timeout); } +561 AUE_NULL STD { int freebsd32_cpuset_getdomain(cpulevel_t level, \ + cpuwhich_t which, uint32_t id1, uint32_t id2, \ + size_t domainsetsize, domainset_t *mask, \ + int *policy); } +562 AUE_NULL STD { int freebsd32_cpuset_setdomain(cpulevel_t level, \ + cpuwhich_t which, uint32_t id1, uint32_t id2, \ + size_t domainsetsize, domainset_t *mask, \ + int policy); } + ; vim: syntax=off Modified: projects/clang600-import/sys/conf/files ============================================================================== --- projects/clang600-import/sys/conf/files Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/conf/files Sat Jan 13 17:52:55 2018 (r327931) @@ -3787,7 +3787,6 @@ kern/kern_module.c standard kern/kern_mtxpool.c standard kern/kern_mutex.c standard kern/kern_ntptime.c standard -kern/kern_numa.c standard kern/kern_osd.c standard kern/kern_physio.c standard kern/kern_pmc.c standard @@ -4837,7 +4836,7 @@ vm/swap_pager.c standard vm/uma_core.c standard vm/uma_dbg.c standard vm/memguard.c optional DEBUG_MEMGUARD -vm/vm_domain.c standard +vm/vm_domainset.c standard vm/vm_fault.c standard vm/vm_glue.c standard vm/vm_init.c standard Modified: projects/clang600-import/sys/conf/files.powerpc ============================================================================== --- projects/clang600-import/sys/conf/files.powerpc Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/conf/files.powerpc Sat Jan 13 17:52:55 2018 (r327931) @@ -31,7 +31,6 @@ dev/adb/adb_if.m optional adb dev/adb/adb_buttons.c optional adb dev/agp/agp_apple.c optional agp powermac dev/fb/fb.c optional sc -dev/fdt/fdt_powerpc.c optional fdt # ofwbus depends on simplebus. dev/fdt/simplebus.c optional aim | fdt dev/hwpmc/hwpmc_e500.c optional hwpmc @@ -146,6 +145,7 @@ powerpc/mpc85xx/i2c.c optional iicbus fdt powerpc/mpc85xx/isa.c optional mpc85xx isa powerpc/mpc85xx/lbc.c optional mpc85xx powerpc/mpc85xx/mpc85xx.c optional mpc85xx +powerpc/mpc85xx/mpc85xx_cache.c optional mpc85xx powerpc/mpc85xx/mpc85xx_gpio.c optional mpc85xx gpio powerpc/mpc85xx/platform_mpc85xx.c optional mpc85xx powerpc/mpc85xx/pci_mpc85xx.c optional pci mpc85xx Modified: projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c ============================================================================== --- projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c Sat Jan 13 17:52:55 2018 (r327931) @@ -2136,7 +2136,7 @@ ipf_p_ftp_eprt6(softf, fin, ip, nat, ftp, dlen) SNPRINTF(s, left, "%x:%x", a >> 16, a & 0xffff); left -= strlen(s); s += strlen(s); - sprintf(s, "|%d|\r\n", port); + SNPRINTF(s, left, "|%d|\r\n", port); #else (void) sprintf(s, "EPRT %c2%c", delim, delim); s += strlen(s); Modified: projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c ============================================================================== --- projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/contrib/ipfilter/netinet/radix_ipf.c Sat Jan 13 17:52:55 2018 (r327931) @@ -103,7 +103,6 @@ buildnodes(addr, mask, nodes) ipf_rdx_node_t nodes[2]; { u_32_t maskbits; - u_32_t lastbits; u_32_t lastmask; u_32_t *last; int masklen; @@ -117,7 +116,6 @@ buildnodes(addr, mask, nodes) masklen = last - (u_32_t *)mask; lastmask = *last; } - lastbits = maskbits & 0x1f; bzero(&nodes[0], sizeof(ipf_rdx_node_t) * 2); nodes[0].maskbitcount = maskbits; Modified: projects/clang600-import/sys/ddb/db_run.c ============================================================================== --- projects/clang600-import/sys/ddb/db_run.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/ddb/db_run.c Sat Jan 13 17:52:55 2018 (r327931) @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include Modified: projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/dev/acpica/acpi_pcib_acpi.c Sat Jan 13 17:52:55 2018 (r327931) @@ -60,6 +60,7 @@ ACPI_MODULE_NAME("PCI_ACPI") struct acpi_hpcib_softc { device_t ap_dev; ACPI_HANDLE ap_handle; + bus_dma_tag_t ap_dma_tag; int ap_flags; uint32_t ap_osc_ctl; @@ -108,6 +109,7 @@ static int acpi_pcib_acpi_release_resource(device_t d #endif static int acpi_pcib_request_feature(device_t pcib, device_t dev, enum pci_feature feature); +static bus_dma_tag_t acpi_pcib_get_dma_tag(device_t bus, device_t child); static device_method_t acpi_pcib_acpi_methods[] = { /* Device interface */ @@ -136,6 +138,7 @@ static device_method_t acpi_pcib_acpi_methods[] = { DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_get_cpus, acpi_pcib_get_cpus), + DEVMETHOD(bus_get_dma_tag, acpi_pcib_get_dma_tag), /* pcib interface */ DEVMETHOD(pcib_maxslots, pcib_maxslots), @@ -366,6 +369,7 @@ acpi_pcib_acpi_attach(device_t dev) rman_res_t start; int rid; #endif + int error, domain; uint8_t busno; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -537,15 +541,33 @@ acpi_pcib_acpi_attach(device_t dev) acpi_pcib_fetch_prt(dev, &sc->ap_prt); + error = bus_dma_tag_create(bus_get_dma_tag(dev), 1, + 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, + NULL, NULL, BUS_SPACE_MAXSIZE, BUS_SPACE_UNRESTRICTED, + BUS_SPACE_MAXSIZE, 0, NULL, NULL, &sc->ap_dma_tag); + if (error != 0) + goto errout; + error = bus_get_domain(dev, &domain); + if (error == 0) + error = bus_dma_tag_set_domain(sc->ap_dma_tag, domain); + /* Don't fail to attach if the domain can't be queried or set. */ + error = 0; + bus_generic_probe(dev); if (device_add_child(dev, "pci", -1) == NULL) { - device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) - pcib_host_res_free(dev, &sc->ap_host_res); -#endif - return (ENXIO); + bus_dma_tag_destroy(sc->ap_dma_tag); + sc->ap_dma_tag = NULL; + error = ENXIO; + goto errout; } return (bus_generic_attach(dev)); + +errout: + device_printf(device_get_parent(dev), "couldn't attach pci bus\n"); +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + pcib_host_res_free(dev, &sc->ap_host_res); +#endif + return (error); } /* @@ -752,4 +774,14 @@ acpi_pcib_request_feature(device_t pcib, device_t dev, } return (acpi_pcib_osc(sc, osc_ctl)); +} + +static bus_dma_tag_t +acpi_pcib_get_dma_tag(device_t bus, device_t child) +{ + struct acpi_hpcib_softc *sc; + + sc = device_get_softc(bus); + + return (sc->ap_dma_tag); } Modified: projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h ============================================================================== --- projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Sat Jan 13 17:47:34 2018 (r327930) +++ projects/clang600-import/sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h Sat Jan 13 17:52:55 2018 (r327931) @@ -899,8 +899,6 @@ typedef int (*c4iw_handler_func)(struct c4iw_dev *dev, int c4iw_ep_redirect(void *ctx, struct dst_entry *old, struct dst_entry *new, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Jan 13 17:56:48 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CF47E76439 for ; Sat, 13 Jan 2018 17:56:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1975E6F957; Sat, 13 Jan 2018 17:56:48 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 48A5416465; Sat, 13 Jan 2018 17:56:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0DHulsp068173; Sat, 13 Jan 2018 17:56:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0DHul52068172; Sat, 13 Jan 2018 17:56:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801131756.w0DHul52068172@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 13 Jan 2018 17:56:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327933 - projects/clang600-import/contrib/llvm/tools/clang X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm/tools/clang X-SVN-Commit-Revision: 327933 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 17:56:48 -0000 Author: dim Date: Sat Jan 13 17:56:46 2018 New Revision: 327933 URL: https://svnweb.freebsd.org/changeset/base/327933 Log: And another whack with the cluestick for Subversion. Modified: Directory Properties: projects/clang600-import/contrib/llvm/tools/clang/ (props changed)