From owner-svn-src-projects@freebsd.org Sun Feb 19 14:54:00 2017 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 BBE57CE5912 for ; Sun, 19 Feb 2017 14:54:00 +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 mx1.freebsd.org (Postfix) with ESMTPS id 8922917E8; Sun, 19 Feb 2017 14:54:00 +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 v1JErxib040542; Sun, 19 Feb 2017 14:53:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1JErxAd040541; Sun, 19 Feb 2017 14:53:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702191453.v1JErxAd040541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 19 Feb 2017 14:53:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r313942 - projects/clang400-import/lib/libc++ X-SVN-Group: projects 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.23 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, 19 Feb 2017 14:54:00 -0000 Author: dim Date: Sun Feb 19 14:53:59 2017 New Revision: 313942 URL: https://svnweb.freebsd.org/changeset/base/313942 Log: Belatedly add variant.cpp to libc++. This completes the support for the upcoming C++17 std::variant template. Modified: projects/clang400-import/lib/libc++/Makefile Modified: projects/clang400-import/lib/libc++/Makefile ============================================================================== --- projects/clang400-import/lib/libc++/Makefile Sun Feb 19 13:15:33 2017 (r313941) +++ projects/clang400-import/lib/libc++/Makefile Sun Feb 19 14:53:59 2017 (r313942) @@ -44,6 +44,7 @@ SRCS+= thread.cpp SRCS+= typeinfo.cpp SRCS+= utility.cpp SRCS+= valarray.cpp +SRCS+= variant.cpp CXXRT_SRCS+= auxhelper.cc CXXRT_SRCS+= dynamic_cast.cc From owner-svn-src-projects@freebsd.org Thu Feb 23 07:46:01 2017 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 ECC0DCEA909 for ; Thu, 23 Feb 2017 07:46:01 +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 mx1.freebsd.org (Postfix) with ESMTPS id 8A8671672; Thu, 23 Feb 2017 07:46:01 +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 v1N7k0lK033811; Thu, 23 Feb 2017 07:46:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1N7jxfv033788; Thu, 23 Feb 2017 07:45:59 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702230745.v1N7jxfv033788@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 07:45:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r314130 - in projects/clang400-import: . contrib/blacklist/bin contrib/blacklist/libexec contrib/libucl contrib/libucl/include contrib/libucl/lua contrib/libucl/src contrib/mdocml contr... X-SVN-Group: projects 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.23 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: Thu, 23 Feb 2017 07:46:02 -0000 Author: dim Date: Thu Feb 23 07:45:58 2017 New Revision: 314130 URL: https://svnweb.freebsd.org/changeset/base/314130 Log: Merge ^/head r313896 through r314128. Added: projects/clang400-import/contrib/mdocml/catman.8 - copied unchanged from r314128, head/contrib/mdocml/catman.8 projects/clang400-import/contrib/mdocml/catman.c - copied unchanged from r314128, head/contrib/mdocml/catman.c projects/clang400-import/contrib/mdocml/man.options.1 - copied unchanged from r314128, head/contrib/mdocml/man.options.1 projects/clang400-import/contrib/mdocml/mandocd.8 - copied unchanged from r314128, head/contrib/mdocml/mandocd.8 projects/clang400-import/contrib/mdocml/mandocd.c - copied unchanged from r314128, head/contrib/mdocml/mandocd.c projects/clang400-import/contrib/mdocml/test-O_DIRECTORY.c - copied unchanged from r314128, head/contrib/mdocml/test-O_DIRECTORY.c projects/clang400-import/contrib/mdocml/test-cmsg.c - copied unchanged from r314128, head/contrib/mdocml/test-cmsg.c projects/clang400-import/contrib/mdocml/test-recvmsg.c - copied unchanged from r314128, head/contrib/mdocml/test-recvmsg.c projects/clang400-import/contrib/openpam/m4/ - copied from r314128, head/contrib/openpam/m4/ projects/clang400-import/contrib/openpam/misc/Makefile.am - copied unchanged from r314128, head/contrib/openpam/misc/Makefile.am projects/clang400-import/contrib/openpam/misc/Makefile.in - copied unchanged from r314128, head/contrib/openpam/misc/Makefile.in projects/clang400-import/contrib/openpam/misc/coverage.sh.in - copied unchanged from r314128, head/contrib/openpam/misc/coverage.sh.in projects/clang400-import/contrib/openpam/misc/coverity.sh.in - copied unchanged from r314128, head/contrib/openpam/misc/coverity.sh.in projects/clang400-import/contrib/openpam/modules/pam_return/ - copied from r314128, head/contrib/openpam/modules/pam_return/ projects/clang400-import/contrib/openpam/t/t_openpam_dispatch.c - copied unchanged from r314128, head/contrib/openpam/t/t_openpam_dispatch.c projects/clang400-import/contrib/openpam/t/t_pam_conv.c - copied unchanged from r314128, head/contrib/openpam/t/t_pam_conv.c projects/clang400-import/contrib/openpam/t/t_pam_conv.h - copied unchanged from r314128, head/contrib/openpam/t/t_pam_conv.h projects/clang400-import/share/man/man4/cfumass.4 - copied unchanged from r314128, head/share/man/man4/cfumass.4 projects/clang400-import/sys/compat/linuxkpi/common/include/linux/bottom_half.h - copied unchanged from r314128, head/sys/compat/linuxkpi/common/include/linux/bottom_half.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/rculist.h - copied unchanged from r314128, head/sys/compat/linuxkpi/common/include/linux/rculist.h projects/clang400-import/sys/compat/linuxkpi/common/src/linux_current.c - copied unchanged from r314128, head/sys/compat/linuxkpi/common/src/linux_current.c projects/clang400-import/sys/compat/linuxkpi/common/src/linux_kthread.c - copied unchanged from r314128, head/sys/compat/linuxkpi/common/src/linux_kthread.c projects/clang400-import/sys/compat/linuxkpi/common/src/linux_page.c - copied unchanged from r314128, head/sys/compat/linuxkpi/common/src/linux_page.c projects/clang400-import/sys/compat/linuxkpi/common/src/linux_rcu.c - copied unchanged from r314128, head/sys/compat/linuxkpi/common/src/linux_rcu.c projects/clang400-import/sys/compat/linuxkpi/common/src/linux_tasklet.c - copied unchanged from r314128, head/sys/compat/linuxkpi/common/src/linux_tasklet.c projects/clang400-import/sys/contrib/dev/iwm/iwm-7265D-17.fw.uu - copied unchanged from r314128, head/sys/contrib/dev/iwm/iwm-7265D-17.fw.uu projects/clang400-import/sys/dev/iwm/if_iwm_7000.c - copied unchanged from r314128, head/sys/dev/iwm/if_iwm_7000.c projects/clang400-import/sys/dev/iwm/if_iwm_8000.c - copied unchanged from r314128, head/sys/dev/iwm/if_iwm_8000.c projects/clang400-import/sys/dev/iwm/if_iwm_config.h - copied unchanged from r314128, head/sys/dev/iwm/if_iwm_config.h projects/clang400-import/sys/dev/usb/storage/cfumass.c - copied unchanged from r314128, head/sys/dev/usb/storage/cfumass.c projects/clang400-import/sys/mips/conf/std.BERI - copied unchanged from r314128, head/sys/mips/conf/std.BERI projects/clang400-import/sys/modules/geom/geom_flashmap/ - copied from r314128, head/sys/modules/geom/geom_flashmap/ projects/clang400-import/sys/modules/iwmfw/iwm7265Dfw/ - copied from r314128, head/sys/modules/iwmfw/iwm7265Dfw/ projects/clang400-import/sys/modules/usb/cfumass/ - copied from r314128, head/sys/modules/usb/cfumass/ projects/clang400-import/sys/powerpc/mikrotik/rb_led.c - copied unchanged from r314128, head/sys/powerpc/mikrotik/rb_led.c projects/clang400-import/sys/x86/x86/x86_mem.c - copied unchanged from r314128, head/sys/x86/x86/x86_mem.c projects/clang400-import/tests/sys/geom/eli/ - copied from r314128, head/tests/sys/geom/eli/ Deleted: projects/clang400-import/contrib/openpam/pamgdb.in projects/clang400-import/contrib/openpam/t/t.h projects/clang400-import/contrib/openpam/t/t_file.c projects/clang400-import/contrib/openpam/t/t_main.c projects/clang400-import/lib/libpam/libpam/tests/ projects/clang400-import/sys/amd64/amd64/amd64_mem.c projects/clang400-import/sys/i386/i386/i686_mem.c projects/clang400-import/sys/mips/conf/BERI_TEMPLATE Modified: projects/clang400-import/Makefile.inc1 projects/clang400-import/ObsoleteFiles.inc projects/clang400-import/UPDATING projects/clang400-import/contrib/blacklist/bin/blacklistd.c projects/clang400-import/contrib/blacklist/libexec/blacklistd-helper projects/clang400-import/contrib/libucl/ChangeLog.md projects/clang400-import/contrib/libucl/README.md projects/clang400-import/contrib/libucl/configure.ac projects/clang400-import/contrib/libucl/include/ucl.h projects/clang400-import/contrib/libucl/lua/lua_ucl.c projects/clang400-import/contrib/libucl/src/ucl_emitter_utils.c projects/clang400-import/contrib/libucl/src/ucl_internal.h projects/clang400-import/contrib/libucl/src/ucl_parser.c projects/clang400-import/contrib/libucl/src/ucl_util.c projects/clang400-import/contrib/mdocml/INSTALL projects/clang400-import/contrib/mdocml/LICENSE projects/clang400-import/contrib/mdocml/Makefile projects/clang400-import/contrib/mdocml/Makefile.depend projects/clang400-import/contrib/mdocml/NEWS projects/clang400-import/contrib/mdocml/TODO projects/clang400-import/contrib/mdocml/apropos.1 projects/clang400-import/contrib/mdocml/cgi.c projects/clang400-import/contrib/mdocml/chars.c projects/clang400-import/contrib/mdocml/compat_fts.c projects/clang400-import/contrib/mdocml/configure projects/clang400-import/contrib/mdocml/configure.local.example projects/clang400-import/contrib/mdocml/dba.c projects/clang400-import/contrib/mdocml/dbm_map.c projects/clang400-import/contrib/mdocml/eqn_term.c projects/clang400-import/contrib/mdocml/gmdiff projects/clang400-import/contrib/mdocml/html.c projects/clang400-import/contrib/mdocml/html.h projects/clang400-import/contrib/mdocml/libmandoc.h projects/clang400-import/contrib/mdocml/libmdoc.h projects/clang400-import/contrib/mdocml/main.c projects/clang400-import/contrib/mdocml/man.1 projects/clang400-import/contrib/mdocml/man_html.c projects/clang400-import/contrib/mdocml/man_term.c projects/clang400-import/contrib/mdocml/manconf.h projects/clang400-import/contrib/mdocml/mandoc.1 projects/clang400-import/contrib/mdocml/mandoc.css projects/clang400-import/contrib/mdocml/mandoc.h projects/clang400-import/contrib/mdocml/mandoc_aux.h projects/clang400-import/contrib/mdocml/mandoc_char.7 projects/clang400-import/contrib/mdocml/mandoc_html.3 projects/clang400-import/contrib/mdocml/mandocdb.c projects/clang400-import/contrib/mdocml/manpath.c projects/clang400-import/contrib/mdocml/mdoc.7 projects/clang400-import/contrib/mdocml/mdoc.c projects/clang400-import/contrib/mdocml/mdoc_html.c projects/clang400-import/contrib/mdocml/mdoc_macro.c projects/clang400-import/contrib/mdocml/mdoc_man.c projects/clang400-import/contrib/mdocml/mdoc_term.c projects/clang400-import/contrib/mdocml/mdoc_validate.c projects/clang400-import/contrib/mdocml/preconv.c projects/clang400-import/contrib/mdocml/read.c projects/clang400-import/contrib/mdocml/roff.c projects/clang400-import/contrib/mdocml/roff.h projects/clang400-import/contrib/mdocml/tag.c projects/clang400-import/contrib/mdocml/tbl_html.c projects/clang400-import/contrib/mdocml/term_ps.c projects/clang400-import/contrib/mdocml/tree.c projects/clang400-import/contrib/openpam/CREDITS projects/clang400-import/contrib/openpam/HISTORY projects/clang400-import/contrib/openpam/LICENSE projects/clang400-import/contrib/openpam/Makefile.am projects/clang400-import/contrib/openpam/Makefile.in projects/clang400-import/contrib/openpam/README projects/clang400-import/contrib/openpam/RELNOTES projects/clang400-import/contrib/openpam/TODO projects/clang400-import/contrib/openpam/aclocal.m4 projects/clang400-import/contrib/openpam/autogen.sh projects/clang400-import/contrib/openpam/bin/Makefile.am projects/clang400-import/contrib/openpam/bin/Makefile.in projects/clang400-import/contrib/openpam/bin/openpam_dump_policy/Makefile.am projects/clang400-import/contrib/openpam/bin/openpam_dump_policy/Makefile.in projects/clang400-import/contrib/openpam/bin/openpam_dump_policy/openpam_dump_policy.c projects/clang400-import/contrib/openpam/bin/pamtest/Makefile.am projects/clang400-import/contrib/openpam/bin/pamtest/Makefile.in projects/clang400-import/contrib/openpam/bin/pamtest/pamtest.1 projects/clang400-import/contrib/openpam/bin/su/Makefile.am projects/clang400-import/contrib/openpam/bin/su/Makefile.in projects/clang400-import/contrib/openpam/bin/su/su.1 projects/clang400-import/contrib/openpam/compile projects/clang400-import/contrib/openpam/config.guess projects/clang400-import/contrib/openpam/config.h.in projects/clang400-import/contrib/openpam/config.sub projects/clang400-import/contrib/openpam/configure projects/clang400-import/contrib/openpam/configure.ac projects/clang400-import/contrib/openpam/depcomp projects/clang400-import/contrib/openpam/doc/Makefile.in projects/clang400-import/contrib/openpam/doc/man/Makefile.am projects/clang400-import/contrib/openpam/doc/man/Makefile.in projects/clang400-import/contrib/openpam/doc/man/openpam.3 projects/clang400-import/contrib/openpam/doc/man/openpam_borrow_cred.3 projects/clang400-import/contrib/openpam/doc/man/openpam_free_data.3 projects/clang400-import/contrib/openpam/doc/man/openpam_free_envlist.3 projects/clang400-import/contrib/openpam/doc/man/openpam_get_feature.3 projects/clang400-import/contrib/openpam/doc/man/openpam_get_option.3 projects/clang400-import/contrib/openpam/doc/man/openpam_log.3 projects/clang400-import/contrib/openpam/doc/man/openpam_nullconv.3 projects/clang400-import/contrib/openpam/doc/man/openpam_readline.3 projects/clang400-import/contrib/openpam/doc/man/openpam_readlinev.3 projects/clang400-import/contrib/openpam/doc/man/openpam_readword.3 projects/clang400-import/contrib/openpam/doc/man/openpam_restore_cred.3 projects/clang400-import/contrib/openpam/doc/man/openpam_set_feature.3 projects/clang400-import/contrib/openpam/doc/man/openpam_set_option.3 projects/clang400-import/contrib/openpam/doc/man/openpam_straddch.3 projects/clang400-import/contrib/openpam/doc/man/openpam_subst.3 projects/clang400-import/contrib/openpam/doc/man/openpam_ttyconv.3 projects/clang400-import/contrib/openpam/doc/man/pam.3 projects/clang400-import/contrib/openpam/doc/man/pam.conf.5 projects/clang400-import/contrib/openpam/doc/man/pam_acct_mgmt.3 projects/clang400-import/contrib/openpam/doc/man/pam_authenticate.3 projects/clang400-import/contrib/openpam/doc/man/pam_chauthtok.3 projects/clang400-import/contrib/openpam/doc/man/pam_close_session.3 projects/clang400-import/contrib/openpam/doc/man/pam_conv.3 projects/clang400-import/contrib/openpam/doc/man/pam_end.3 projects/clang400-import/contrib/openpam/doc/man/pam_error.3 projects/clang400-import/contrib/openpam/doc/man/pam_get_authtok.3 projects/clang400-import/contrib/openpam/doc/man/pam_get_data.3 projects/clang400-import/contrib/openpam/doc/man/pam_get_item.3 projects/clang400-import/contrib/openpam/doc/man/pam_get_user.3 projects/clang400-import/contrib/openpam/doc/man/pam_getenv.3 projects/clang400-import/contrib/openpam/doc/man/pam_getenvlist.3 projects/clang400-import/contrib/openpam/doc/man/pam_info.3 projects/clang400-import/contrib/openpam/doc/man/pam_open_session.3 projects/clang400-import/contrib/openpam/doc/man/pam_prompt.3 projects/clang400-import/contrib/openpam/doc/man/pam_putenv.3 projects/clang400-import/contrib/openpam/doc/man/pam_set_data.3 projects/clang400-import/contrib/openpam/doc/man/pam_set_item.3 projects/clang400-import/contrib/openpam/doc/man/pam_setcred.3 projects/clang400-import/contrib/openpam/doc/man/pam_setenv.3 projects/clang400-import/contrib/openpam/doc/man/pam_sm_acct_mgmt.3 projects/clang400-import/contrib/openpam/doc/man/pam_sm_authenticate.3 projects/clang400-import/contrib/openpam/doc/man/pam_sm_chauthtok.3 projects/clang400-import/contrib/openpam/doc/man/pam_sm_close_session.3 projects/clang400-import/contrib/openpam/doc/man/pam_sm_open_session.3 projects/clang400-import/contrib/openpam/doc/man/pam_sm_setcred.3 projects/clang400-import/contrib/openpam/doc/man/pam_start.3 projects/clang400-import/contrib/openpam/doc/man/pam_strerror.3 projects/clang400-import/contrib/openpam/doc/man/pam_verror.3 projects/clang400-import/contrib/openpam/doc/man/pam_vinfo.3 projects/clang400-import/contrib/openpam/doc/man/pam_vprompt.3 projects/clang400-import/contrib/openpam/include/Makefile.in projects/clang400-import/contrib/openpam/include/security/Makefile.am projects/clang400-import/contrib/openpam/include/security/Makefile.in projects/clang400-import/contrib/openpam/include/security/openpam.h projects/clang400-import/contrib/openpam/include/security/openpam_version.h projects/clang400-import/contrib/openpam/include/security/pam_appl.h projects/clang400-import/contrib/openpam/install-sh projects/clang400-import/contrib/openpam/lib/Makefile.am projects/clang400-import/contrib/openpam/lib/Makefile.in projects/clang400-import/contrib/openpam/lib/libpam/Makefile.am projects/clang400-import/contrib/openpam/lib/libpam/Makefile.in projects/clang400-import/contrib/openpam/lib/libpam/openpam_configure.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_ctype.h projects/clang400-import/contrib/openpam/lib/libpam/openpam_dispatch.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_dlfunc.h projects/clang400-import/contrib/openpam/lib/libpam/openpam_features.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_findenv.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_impl.h projects/clang400-import/contrib/openpam/lib/libpam/openpam_load.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_readlinev.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_readword.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_strlset.c projects/clang400-import/contrib/openpam/lib/libpam/openpam_strlset.h projects/clang400-import/contrib/openpam/lib/libpam/openpam_ttyconv.c projects/clang400-import/contrib/openpam/lib/libpam/pam_end.c projects/clang400-import/contrib/openpam/lib/libpam/pam_get_authtok.c projects/clang400-import/contrib/openpam/lib/libpam/pam_get_data.c projects/clang400-import/contrib/openpam/lib/libpam/pam_get_item.c projects/clang400-import/contrib/openpam/lib/libpam/pam_get_user.c projects/clang400-import/contrib/openpam/lib/libpam/pam_getenv.c projects/clang400-import/contrib/openpam/lib/libpam/pam_getenvlist.c projects/clang400-import/contrib/openpam/lib/libpam/pam_putenv.c projects/clang400-import/contrib/openpam/lib/libpam/pam_set_data.c projects/clang400-import/contrib/openpam/lib/libpam/pam_set_item.c projects/clang400-import/contrib/openpam/lib/libpam/pam_setenv.c projects/clang400-import/contrib/openpam/ltmain.sh projects/clang400-import/contrib/openpam/misc/gendoc.pl projects/clang400-import/contrib/openpam/missing projects/clang400-import/contrib/openpam/mkpkgng.in projects/clang400-import/contrib/openpam/modules/Makefile.am projects/clang400-import/contrib/openpam/modules/Makefile.in projects/clang400-import/contrib/openpam/modules/pam_deny/Makefile.am projects/clang400-import/contrib/openpam/modules/pam_deny/Makefile.in projects/clang400-import/contrib/openpam/modules/pam_permit/Makefile.am projects/clang400-import/contrib/openpam/modules/pam_permit/Makefile.in projects/clang400-import/contrib/openpam/modules/pam_unix/Makefile.am projects/clang400-import/contrib/openpam/modules/pam_unix/Makefile.in projects/clang400-import/contrib/openpam/modules/pam_unix/pam_unix.c projects/clang400-import/contrib/openpam/t/Makefile.am projects/clang400-import/contrib/openpam/t/Makefile.in projects/clang400-import/contrib/openpam/t/t_openpam_ctype.c projects/clang400-import/contrib/openpam/t/t_openpam_readlinev.c projects/clang400-import/contrib/openpam/t/t_openpam_readword.c projects/clang400-import/contrib/openpam/test-driver projects/clang400-import/contrib/traceroute/traceroute.c projects/clang400-import/crypto/openssh/auth.c projects/clang400-import/etc/devd.conf projects/clang400-import/etc/mtree/BSD.tests.dist projects/clang400-import/include/complex.h projects/clang400-import/lib/libc/sys/kenv.2 projects/clang400-import/lib/libcxxrt/Version.map projects/clang400-import/lib/libfetch/common.c projects/clang400-import/lib/libfetch/fetch.c projects/clang400-import/lib/libfetch/fetch.h projects/clang400-import/lib/libpam/libpam/Makefile projects/clang400-import/libexec/rtld-elf/mips/reloc.c projects/clang400-import/sbin/fsck/fsck.c projects/clang400-import/sbin/ifconfig/ifbridge.c projects/clang400-import/sbin/ifconfig/ifieee80211.c projects/clang400-import/sbin/kldload/kldload.c projects/clang400-import/sbin/mdconfig/mdconfig.c projects/clang400-import/sbin/savecore/savecore.c projects/clang400-import/share/doc/pjdfstest/README projects/clang400-import/share/man/man4/Makefile projects/clang400-import/share/man/man4/adv.4 projects/clang400-import/share/man/man4/ahc.4 projects/clang400-import/share/man/man4/ctl.4 projects/clang400-import/share/man/man4/iwmfw.4 projects/clang400-import/share/man/man4/man4.i386/aic.4 projects/clang400-import/share/man/man4/scsi.4 projects/clang400-import/share/man/man4/umass.4 projects/clang400-import/share/man/man4/usb_template.4 projects/clang400-import/share/man/man4/usfs.4 projects/clang400-import/share/misc/pci_vendors projects/clang400-import/sys/amd64/amd64/db_disasm.c projects/clang400-import/sys/amd64/amd64/pmap.c projects/clang400-import/sys/amd64/include/pcpu.h projects/clang400-import/sys/amd64/linux/linux_dummy.c projects/clang400-import/sys/amd64/linux/linux_machdep.c projects/clang400-import/sys/amd64/linux32/linux32_dummy.c projects/clang400-import/sys/arm/arm/pmap-v6.c projects/clang400-import/sys/arm/freescale/imx/imx_gpio.c projects/clang400-import/sys/arm/ti/ti_sdhci.c projects/clang400-import/sys/boot/common/md.c projects/clang400-import/sys/boot/efi/libefi/efinet.c projects/clang400-import/sys/boot/fdt/fdt_overlay.c projects/clang400-import/sys/boot/ficl/ficl.c projects/clang400-import/sys/boot/geli/Makefile projects/clang400-import/sys/boot/kshim/bsd_kernel.c projects/clang400-import/sys/boot/mips/beri/boot2/Makefile projects/clang400-import/sys/boot/ofw/libofw/ofw_memory.c projects/clang400-import/sys/boot/sparc64/loader/main.c projects/clang400-import/sys/boot/userboot/userboot/userboot_disk.c projects/clang400-import/sys/boot/zfs/zfs.c projects/clang400-import/sys/boot/zfs/zfsimpl.c projects/clang400-import/sys/cam/ctl/ctl_tpc.c projects/clang400-import/sys/cam/ctl/scsi_ctl.c projects/clang400-import/sys/cam/scsi/scsi_low.c projects/clang400-import/sys/cddl/boot/zfs/zfsimpl.h projects/clang400-import/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ctldir.h projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c projects/clang400-import/sys/compat/linprocfs/linprocfs.c projects/clang400-import/sys/compat/linux/linux_mmap.c projects/clang400-import/sys/compat/linux/linux_signal.c projects/clang400-import/sys/compat/linux/linux_socket.c projects/clang400-import/sys/compat/linux/linux_socket.h projects/clang400-import/sys/compat/linux/linux_stats.c projects/clang400-import/sys/compat/linuxkpi/common/include/linux/bitops.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/compat.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/file.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/gfp.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/interrupt.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/jiffies.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/kdev_t.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/kernel.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/kthread.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/rcupdate.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/rwlock.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/rwsem.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/scatterlist.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/sched.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/semaphore.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/spinlock.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/srcu.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/types.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/wait.h projects/clang400-import/sys/compat/linuxkpi/common/src/linux_compat.c projects/clang400-import/sys/compat/linuxkpi/common/src/linux_pci.c projects/clang400-import/sys/conf/files projects/clang400-import/sys/conf/files.amd64 projects/clang400-import/sys/conf/files.i386 projects/clang400-import/sys/conf/files.powerpc projects/clang400-import/sys/conf/kern.post.mk projects/clang400-import/sys/conf/kmod.mk projects/clang400-import/sys/dev/advansys/advansys.c projects/clang400-import/sys/dev/agp/agp.c projects/clang400-import/sys/dev/aha/aha.c projects/clang400-import/sys/dev/ahci/ahci.c projects/clang400-import/sys/dev/al_eth/al_eth.c projects/clang400-import/sys/dev/al_eth/al_init_eth_lm.c projects/clang400-import/sys/dev/an/if_an.c projects/clang400-import/sys/dev/arcmsr/arcmsr.c projects/clang400-import/sys/dev/ata/ata-all.c projects/clang400-import/sys/dev/bce/if_bce.c projects/clang400-import/sys/dev/beri/virtio/virtio_block.c projects/clang400-import/sys/dev/bhnd/cores/chipc/chipc_slicer.c projects/clang400-import/sys/dev/bhnd/cores/chipc/chipc_slicer.h projects/clang400-import/sys/dev/bhnd/cores/usb/bhnd_usb.c projects/clang400-import/sys/dev/buslogic/bt.c projects/clang400-import/sys/dev/buslogic/bt_pci.c projects/clang400-import/sys/dev/ce/if_ce.c projects/clang400-import/sys/dev/cm/smc90cx6.c projects/clang400-import/sys/dev/cp/if_cp.c projects/clang400-import/sys/dev/ctau/ctddk.c projects/clang400-import/sys/dev/ctau/if_ct.c projects/clang400-import/sys/dev/cx/cxddk.c projects/clang400-import/sys/dev/cx/if_cx.c projects/clang400-import/sys/dev/de/if_de.c projects/clang400-import/sys/dev/e1000/if_em.c projects/clang400-import/sys/dev/ed/if_ed.c projects/clang400-import/sys/dev/etherswitch/mtkswitch/mtkswitch_rt3050.c projects/clang400-import/sys/dev/extres/clk/clk_div.c projects/clang400-import/sys/dev/fatm/if_fatm.c projects/clang400-import/sys/dev/fdt/fdt_slicer.c projects/clang400-import/sys/dev/fe/if_fe.c projects/clang400-import/sys/dev/ffec/if_ffecreg.h projects/clang400-import/sys/dev/firewire/if_fwip.c projects/clang400-import/sys/dev/hptiop/hptiop.c projects/clang400-import/sys/dev/hptmv/entry.c projects/clang400-import/sys/dev/hptmv/gui_lib.c projects/clang400-import/sys/dev/hptmv/hptproc.c projects/clang400-import/sys/dev/hptmv/ioctl.c projects/clang400-import/sys/dev/iicbus/if_ic.c projects/clang400-import/sys/dev/isp/isp_freebsd.c projects/clang400-import/sys/dev/isp/isp_freebsd.h projects/clang400-import/sys/dev/isp/isp_pci.c projects/clang400-import/sys/dev/isp/isp_target.c projects/clang400-import/sys/dev/iwi/if_iwi.c projects/clang400-import/sys/dev/iwm/if_iwm.c projects/clang400-import/sys/dev/iwm/if_iwm_pcie_trans.c projects/clang400-import/sys/dev/iwm/if_iwm_util.c projects/clang400-import/sys/dev/iwm/if_iwm_util.h projects/clang400-import/sys/dev/iwm/if_iwmreg.h projects/clang400-import/sys/dev/iwm/if_iwmvar.h projects/clang400-import/sys/dev/iwn/if_iwn.c projects/clang400-import/sys/dev/jedec_ts/jedec_ts.c projects/clang400-import/sys/dev/le/am7990.c projects/clang400-import/sys/dev/le/am79900.c projects/clang400-import/sys/dev/le/lance.c projects/clang400-import/sys/dev/md/md.c projects/clang400-import/sys/dev/mvs/mvs.c projects/clang400-import/sys/dev/mwl/if_mwl.c projects/clang400-import/sys/dev/nand/nfc_rb.c projects/clang400-import/sys/dev/ncr/ncr.c projects/clang400-import/sys/dev/netmap/netmap_freebsd.c projects/clang400-import/sys/dev/netmap/netmap_mem2.c projects/clang400-import/sys/dev/nvme/nvme_sim.c projects/clang400-import/sys/dev/ofw/ofw_bus_subr.c projects/clang400-import/sys/dev/patm/if_patm_tx.c projects/clang400-import/sys/dev/pccard/pccard.c projects/clang400-import/sys/dev/pms/RefTisa/sallsdk/spc/sainit.c projects/clang400-import/sys/dev/pms/RefTisa/tisa/sassata/common/tdioctl.c projects/clang400-import/sys/dev/pms/freebsd/driver/ini/src/agtiapi.c projects/clang400-import/sys/dev/ppbus/if_plip.c projects/clang400-import/sys/dev/ppbus/ppbconf.c projects/clang400-import/sys/dev/ppc/ppc.c projects/clang400-import/sys/dev/qlxgbe/ql_os.c projects/clang400-import/sys/dev/ral/rt2661.c projects/clang400-import/sys/dev/sbni/if_sbni_isa.c projects/clang400-import/sys/dev/sdhci/sdhci_fdt_gpio.c projects/clang400-import/sys/dev/siis/siis.c projects/clang400-import/sys/dev/sn/if_sn.c projects/clang400-import/sys/dev/sym/sym_hipd.c projects/clang400-import/sys/dev/trm/trm.c projects/clang400-import/sys/dev/usb/wlan/if_zyd.c projects/clang400-import/sys/dev/vmware/vmxnet3/if_vmxvar.h projects/clang400-import/sys/dev/vx/if_vx.c projects/clang400-import/sys/dev/xen/timer/timer.c projects/clang400-import/sys/fs/devfs/devfs_vnops.c projects/clang400-import/sys/fs/ext2fs/ext2_htree.c projects/clang400-import/sys/geom/eli/g_eli.h projects/clang400-import/sys/geom/eli/g_eli_hmac.c projects/clang400-import/sys/geom/eli/pkcs5v2.c projects/clang400-import/sys/geom/geom_flashmap.c projects/clang400-import/sys/i386/i386/pmap.c projects/clang400-import/sys/i386/linux/linux_dummy.c projects/clang400-import/sys/kern/kern_fork.c projects/clang400-import/sys/kern/kern_mutex.c projects/clang400-import/sys/kern/kern_proc.c projects/clang400-import/sys/kern/kern_rmlock.c projects/clang400-import/sys/kern/kern_rwlock.c projects/clang400-import/sys/kern/kern_sig.c projects/clang400-import/sys/kern/kern_sx.c projects/clang400-import/sys/kern/kern_thr.c projects/clang400-import/sys/kern/makesyscalls.sh projects/clang400-import/sys/kern/subr_syscall.c projects/clang400-import/sys/kern/subr_terminal.c projects/clang400-import/sys/kern/sys_process.c projects/clang400-import/sys/kern/uipc_mqueue.c projects/clang400-import/sys/kern/vfs_default.c projects/clang400-import/sys/kern/vfs_vnops.c projects/clang400-import/sys/libkern/iconv_xlat16.c projects/clang400-import/sys/mips/atheros/ar531x/apb.c projects/clang400-import/sys/mips/conf/BERI_DE4_BASE projects/clang400-import/sys/mips/conf/BERI_NETFPGA_MDROOT projects/clang400-import/sys/mips/conf/BERI_SIM_BASE projects/clang400-import/sys/mips/conf/BERI_SOCKIT projects/clang400-import/sys/mips/conf/std.MALTA projects/clang400-import/sys/mips/include/pcpu.h projects/clang400-import/sys/mips/mips/machdep.c projects/clang400-import/sys/modules/dtb/imx6/Makefile projects/clang400-import/sys/modules/geom/Makefile projects/clang400-import/sys/modules/iwmfw/Makefile projects/clang400-import/sys/modules/linux/Makefile projects/clang400-import/sys/modules/linux64/Makefile projects/clang400-import/sys/modules/linuxkpi/Makefile projects/clang400-import/sys/modules/mem/Makefile projects/clang400-import/sys/modules/svr4/Makefile projects/clang400-import/sys/modules/usb/Makefile projects/clang400-import/sys/modules/vmm/Makefile projects/clang400-import/sys/net/if_fddisubr.c projects/clang400-import/sys/net/if_iso88025subr.c projects/clang400-import/sys/net/iflib.c projects/clang400-import/sys/net/netisr.c projects/clang400-import/sys/net80211/_ieee80211.h projects/clang400-import/sys/net80211/ieee80211_freebsd.h projects/clang400-import/sys/net80211/ieee80211_hostap.c projects/clang400-import/sys/net80211/ieee80211_node.c projects/clang400-import/sys/net80211/ieee80211_output.c projects/clang400-import/sys/netipsec/udpencap.c projects/clang400-import/sys/netpfil/ipfw/ip_fw_sockopt.c projects/clang400-import/sys/powerpc/booke/pmap.c projects/clang400-import/sys/powerpc/include/cpufunc.h projects/clang400-import/sys/powerpc/include/pcpu.h projects/clang400-import/sys/powerpc/mikrotik/platform_rb.c projects/clang400-import/sys/sparc64/include/pcpu.h projects/clang400-import/sys/sys/bufobj.h projects/clang400-import/sys/sys/cdefs.h projects/clang400-import/sys/sys/lock.h projects/clang400-import/sys/sys/mutex.h projects/clang400-import/sys/sys/param.h projects/clang400-import/sys/sys/proc.h projects/clang400-import/sys/sys/signalvar.h projects/clang400-import/sys/sys/slicer.h projects/clang400-import/sys/sys/sx.h projects/clang400-import/sys/x86/x86/mca.c projects/clang400-import/tests/sys/geom/Makefile projects/clang400-import/tests/sys/kern/Makefile projects/clang400-import/tests/sys/kern/ptrace_test.c projects/clang400-import/tests/sys/netinet/fibs_test.sh projects/clang400-import/tests/sys/pjdfstest/tests/conf projects/clang400-import/tools/tools/net80211/wlanstats/main.c projects/clang400-import/usr.bin/grep/file.c projects/clang400-import/usr.bin/grep/grep.1 projects/clang400-import/usr.bin/lam/lam.c projects/clang400-import/usr.bin/sockstat/sockstat.c projects/clang400-import/usr.bin/timeout/timeout.1 projects/clang400-import/usr.sbin/bsdinstall/scripts/hardening projects/clang400-import/usr.sbin/makefs/cd9660.c projects/clang400-import/usr.sbin/makefs/cd9660.h projects/clang400-import/usr.sbin/makefs/cd9660/cd9660_debug.c projects/clang400-import/usr.sbin/makefs/cd9660/cd9660_eltorito.c projects/clang400-import/usr.sbin/makefs/cd9660/cd9660_write.c projects/clang400-import/usr.sbin/makefs/cd9660/iso9660_rrip.c projects/clang400-import/usr.sbin/makefs/cd9660/iso9660_rrip.h projects/clang400-import/usr.sbin/traceroute/Makefile Directory Properties: projects/clang400-import/ (props changed) projects/clang400-import/contrib/libucl/ (props changed) projects/clang400-import/contrib/mdocml/ (props changed) projects/clang400-import/contrib/openpam/ (props changed) projects/clang400-import/crypto/openssh/ (props changed) projects/clang400-import/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang400-import/Makefile.inc1 ============================================================================== --- projects/clang400-import/Makefile.inc1 Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/Makefile.inc1 Thu Feb 23 07:45:58 2017 (r314130) @@ -1499,11 +1499,11 @@ sign-packages: _pkgbootstrap .PHONY # Run test suite on installed world. # checkworld: .PHONY - @if [ ! -x ${LOCALBASE}/bin/kyua ]; then \ + @if [ ! -x "${LOCALBASE}/bin/kyua" ]; then \ echo "You need kyua (devel/kyua) to run the test suite." | /usr/bin/fmt; \ exit 1; \ fi - ${_+_}${LOCALBASE}/bin/kyua test -k ${TESTSBASE}/Kyuafile + ${_+_}PATH="$$PATH:${LOCALBASE}/bin" kyua test -k ${TESTSBASE}/Kyuafile # # @@ -1512,7 +1512,7 @@ checkworld: .PHONY # Build the API documentation with doxygen # doxygen: .PHONY - @if [ ! -x ${LOCALBASE}/bin/doxygen ]; then \ + @if [ ! -x "${LOCALBASE}/bin/doxygen" ]; then \ echo "You need doxygen (devel/doxygen) to generate the API documentation of the kernel." | /usr/bin/fmt; \ exit 1; \ fi @@ -1625,6 +1625,7 @@ _nmtree= lib/libnetbsd \ ${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd .endif +# r246097: log addition login.conf.db, passwd, pwd.db, and spwd.db with cat -l .if ${BOOTSTRAPPING} < 1000027 _cat= bin/cat .endif @@ -2518,16 +2519,35 @@ CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREF INSTALL="sh ${.CURDIR}/tools/install.sh" CDENV= ${CDBENV} \ TOOLS_PREFIX=${XDTP} -CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \ - --sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \ - -B${XDDESTDIR}/usr/bin -B${XDDESTDIR}/usr/lib -CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CFLAGS}" \ + +.if ${WANT_COMPILER_TYPE} == gcc || \ + (defined(X_COMPILER_TYPE) && ${X_COMPILER_TYPE} == gcc) +# GCC requires -isystem and -L when using a cross-compiler. --sysroot +# won't set header path and -L is used to ensure the base library path +# is added before the port PREFIX library path. +CD2CFLAGS+= -isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib +# GCC requires -B to find /usr/lib/crti.o when using a cross-compiler +# combined with --sysroot. +CD2CFLAGS+= -B${XDDESTDIR}/usr/lib +# Force using libc++ for external GCC. +# XXX: This should be checking MK_GNUCXX == no +.if ${X_COMPILER_VERSION} >= 40800 +CD2CXXFLAGS+= -isystem ${XDDESTDIR}/usr/include/c++/v1 -std=c++11 \ + -nostdinc++ +.endif +.endif +CD2CFLAGS+= --sysroot=${XDDESTDIR}/ +CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CXXFLAGS} ${CD2CFLAGS}" \ CPP="${CPP} ${CD2CFLAGS}" \ MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN} CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDDESTDIR}/usr/bin:${PATH} ${MAKE} ${NOFUN} +.if ${MK_META_MODE} != "no" +# Don't rebuild build-tools targets during normal build. +CD2MAKE+= BUILD_TOOLS_META=.NOMETA_CMP +.endif XDDESTDIR=${DESTDIR}/${XDTP} .if !defined(OSREL) OSREL!= uname -r | sed -e 's/[-(].*//' @@ -2547,7 +2567,8 @@ _xb-worldtmp: .PHONY _xb-bootstrap-tools: .PHONY .for _tool in \ ${_clang_tblgen} \ - ${_gperf} + ${_gperf} \ + ${_yacc} ${_+_}@${ECHODIR} "===> ${_tool} (obj,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ obj; \ Modified: projects/clang400-import/ObsoleteFiles.inc ============================================================================== --- projects/clang400-import/ObsoleteFiles.inc Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/ObsoleteFiles.inc Thu Feb 23 07:45:58 2017 (r314130) @@ -151,6 +151,12 @@ OLD_FILES+=usr/lib/clang/3.9.1/lib/freeb OLD_DIRS+=usr/lib/clang/3.9.1/lib/freebsd OLD_DIRS+=usr/lib/clang/3.9.1/lib OLD_DIRS+=usr/lib/clang/3.9.1 +# 20170219: OpenPAM RADULA upgrade removed the libpam tests +OLD_FILES+=usr/tests/lib/libpam/Kyuafile +OLD_FILES+=usr/tests/lib/libpam/t_openpam_ctype +OLD_FILES+=usr/tests/lib/libpam/t_openpam_readlinev +OLD_FILES+=usr/tests/lib/libpam/t_openpam_readword +OLD_DIRS+=usr/test/lib/libpam # 20170206: remove bdes(1) OLD_FILES+=usr/bin/bdes OLD_FILES+=usr/lib/debug/usr/bin/bdes.debug Modified: projects/clang400-import/UPDATING ============================================================================== --- projects/clang400-import/UPDATING Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/UPDATING Thu Feb 23 07:45:58 2017 (r314130) @@ -56,6 +56,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 Please see the 20141231 entry below for information about prerequisites and upgrading, if you are not already using clang 3.5.0 or higher. +20170221: + The code that provides support for ZFS .zfs/ directory functionality + has been reimplemented. It's not possible now to create a snapshot + by mkdir under .zfs/snapshot/. That should be the only user visible + change. + 20170216: EISA bus support has been removed. The WITH_EISA option is no longer valid. Modified: projects/clang400-import/contrib/blacklist/bin/blacklistd.c ============================================================================== --- projects/clang400-import/contrib/blacklist/bin/blacklistd.c Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/blacklist/bin/blacklistd.c Thu Feb 23 07:45:58 2017 (r314130) @@ -207,7 +207,7 @@ process(bl_t bl) if (debug) { char b1[128], b2[128]; - (*lfun)(LOG_DEBUG, "%s: db state info for %s: count=%d/%d " + (*lfun)(LOG_DEBUG, "%s: initial db state for %s: count=%d/%d " "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, fmttime(b1, sizeof(b1), dbi.last), fmttime(b2, sizeof(b2), ts.tv_sec)); @@ -246,15 +246,24 @@ process(bl_t bl) case BL_DELETE: if (dbi.last == 0) goto out; + dbi.count = 0; dbi.last = 0; break; default: (*lfun)(LOG_ERR, "unknown message %d", bi->bi_type); } - if (state_put(state, &c, &dbi) == -1) - goto out; + state_put(state, &c, &dbi); + out: close(bi->bi_fd); + + if (debug) { + char b1[128], b2[128]; + (*lfun)(LOG_DEBUG, "%s: final db state for %s: count=%d/%d " + "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, + fmttime(b1, sizeof(b1), dbi.last), + fmttime(b2, sizeof(b2), ts.tv_sec)); + } } static void @@ -393,7 +402,7 @@ rules_restore(void) int main(int argc, char *argv[]) { - int c, tout, flags, flush, restore; + int c, tout, flags, flush, restore, ret; const char *spath, *blsock; setprogname(argv[0]); @@ -512,7 +521,10 @@ main(int argc, char *argv[]) readconf = 0; conf_parse(configfile); } - switch (poll(pfd, (nfds_t)nfd, tout)) { + ret = poll(pfd, (nfds_t)nfd, tout); + if (debug) + (*lfun)(LOG_DEBUG, "received %d from poll()", ret); + switch (ret) { case -1: if (errno == EINTR) continue; Modified: projects/clang400-import/contrib/blacklist/libexec/blacklistd-helper ============================================================================== --- projects/clang400-import/contrib/blacklist/libexec/blacklistd-helper Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/blacklist/libexec/blacklistd-helper Thu Feb 23 07:45:58 2017 (r314130) @@ -63,8 +63,11 @@ add) tname="port$6" /sbin/ipfw table $tname create type addr 2>/dev/null /sbin/ipfw -q table $tname add "$addr/$mask" - /sbin/ipfw -q add $rule drop $3 from "table("$tname")" to \ - any dst-port $6 && echo OK + # if rule number $rule does not already exist, create it + /sbin/ipfw show $rule >/dev/null 2>&1 || \ + /sbin/ipfw add $rule drop $3 from \ + table"("$tname")" to any dst-port $6 >/dev/null && \ + echo OK ;; npf) /sbin/npfctl rule "$2" add block in final $proto from \ Modified: projects/clang400-import/contrib/libucl/ChangeLog.md ============================================================================== --- projects/clang400-import/contrib/libucl/ChangeLog.md Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/ChangeLog.md Thu Feb 23 07:45:58 2017 (r314130) @@ -35,7 +35,7 @@ ### Libucl 0.7.3 -- Fixed a bug with macroes that come after an empty object +- Fixed a bug with macros that come after an empty object - Fixed a bug in include processing when an incorrect variable has been destroyed (use-after-free) ### Libucl 0.8.0 Modified: projects/clang400-import/contrib/libucl/README.md ============================================================================== --- projects/clang400-import/contrib/libucl/README.md Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/README.md Thu Feb 23 07:45:58 2017 (r314130) @@ -1,6 +1,8 @@ # LIBUCL -[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl)[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138)[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) +[![Build Status](https://travis-ci.org/vstakhov/libucl.svg?branch=master)](https://travis-ci.org/vstakhov/libucl) +[![Coverity](https://scan.coverity.com/projects/4138/badge.svg)](https://scan.coverity.com/projects/4138) +[![Coverage Status](https://coveralls.io/repos/github/vstakhov/libucl/badge.svg?branch=master)](https://coveralls.io/github/vstakhov/libucl?branch=master) **Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* @@ -217,8 +219,8 @@ Multiline comments may be nested: UCL supports external macros both multiline and single line ones: ```nginx -.macro "sometext"; -.macro { +.macro_name "sometext"; +.macro_name { Some long text .... }; @@ -229,12 +231,12 @@ arguments themselves are the UCL object options: ```nginx -.macro(param=value) "something"; -.macro(param={key=value}) "something"; -.macro(.include "params.conf") "something"; -.macro(#this is multiline macro +.macro_name(param=value) "something"; +.macro_name(param={key=value}) "something"; +.macro_name(.include "params.conf") "something"; +.macro_name(#this is multiline macro param = [value1, value2]) "something"; -.macro(key="()") "something"; +.macro_name(key="()") "something"; ``` UCL also provide a convenient `include` macro to load content from another files Modified: projects/clang400-import/contrib/libucl/configure.ac ============================================================================== --- projects/clang400-import/contrib/libucl/configure.ac Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/configure.ac Thu Feb 23 07:45:58 2017 (r314130) @@ -39,6 +39,7 @@ AC_CHECK_HEADERS_ONCE([stdarg.h]) AC_CHECK_HEADERS_ONCE([stdbool.h]) AC_CHECK_HEADERS_ONCE([stdint.h]) AC_CHECK_HEADERS_ONCE([string.h]) +AC_CHECK_HEADERS_ONCE([strings.h]) AC_CHECK_HEADERS_ONCE([unistd.h]) AC_CHECK_HEADERS_ONCE([ctype.h]) AC_CHECK_HEADERS_ONCE([errno.h]) Modified: projects/clang400-import/contrib/libucl/include/ucl.h ============================================================================== --- projects/clang400-import/contrib/libucl/include/ucl.h Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/include/ucl.h Thu Feb 23 07:45:58 2017 (r314130) @@ -154,7 +154,8 @@ typedef enum ucl_parser_flags { UCL_PARSER_NO_TIME = (1 << 2), /**< Do not parse time and treat time values as strings */ UCL_PARSER_NO_IMPLICIT_ARRAYS = (1 << 3), /** Create explicit arrays instead of implicit ones */ UCL_PARSER_SAVE_COMMENTS = (1 << 4), /** Save comments in the parser context */ - UCL_PARSER_DISABLE_MACRO = (1 << 5) /** Treat macros as comments */ + UCL_PARSER_DISABLE_MACRO = (1 << 5), /** Treat macros as comments */ + UCL_PARSER_NO_FILEVARS = (1 << 6) /** Do not set file vars */ } ucl_parser_flags_t; /** @@ -205,7 +206,8 @@ enum ucl_duplicate_strategy { enum ucl_parse_type { UCL_PARSE_UCL = 0, /**< Default ucl format */ UCL_PARSE_MSGPACK, /**< Message pack input format */ - UCL_PARSE_CSEXP /**< Canonical S-expressions */ + UCL_PARSE_CSEXP, /**< Canonical S-expressions */ + UCL_PARSE_AUTO /**< Try to detect parse type */ }; /** @@ -227,7 +229,7 @@ typedef struct ucl_object_s { const char *key; /**< Key of an object */ struct ucl_object_s *next; /**< Array handle */ struct ucl_object_s *prev; /**< Array handle */ - uint32_t keylen; /**< Lenght of a key */ + uint32_t keylen; /**< Length of a key */ uint32_t len; /**< Size of an object */ uint32_t ref; /**< Reference count */ uint16_t flags; /**< Object flags */ @@ -831,10 +833,29 @@ UCL_EXTERN ucl_object_iter_t ucl_object_ * Get the next object from the `obj`. This fucntion iterates over arrays, objects * and implicit arrays * @param iter safe iterator + * @param expand_values expand explicit arrays and objects * @return the next object in sequence */ UCL_EXTERN const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t iter, bool expand_values); +/** + * Iteration type enumerator + */ +enum ucl_iterate_type { + UCL_ITERATE_EXPLICIT = 1 << 0, /**< Iterate just explicit arrays and objects */ + UCL_ITERATE_IMPLICIT = 1 << 1, /**< Iterate just implicit arrays */ + UCL_ITERATE_BOTH = (1 << 0) | (1 << 1), /**< Iterate both explicit and implicit arrays*/ +}; + +/** + * Get the next object from the `obj`. This fucntion iterates over arrays, objects + * and implicit arrays if needed + * @param iter safe iterator + * @param + * @return the next object in sequence + */ +UCL_EXTERN const ucl_object_t* ucl_object_iterate_full (ucl_object_iter_t iter, + enum ucl_iterate_type type); /** * Free memory associated with the safe iterator @@ -1016,6 +1037,7 @@ UCL_EXTERN bool ucl_parser_add_string_pr * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @return true if chunk has been added and false in case of error */ UCL_EXTERN bool ucl_parser_add_file (struct ucl_parser *parser, @@ -1025,6 +1047,7 @@ UCL_EXTERN bool ucl_parser_add_file (str * Load and add data from a file * @param parser parser structure * @param filename the name of file + * @param err if *err is NULL it is set to parser error * @param priority the desired priority of a chunk (only 4 least significant bits * are considered for this parameter) * @return true if chunk has been added and false in case of error @@ -1069,6 +1092,21 @@ UCL_EXTERN bool ucl_parser_add_fd_priori int fd, unsigned priority); /** + * Load and add data from a file descriptor + * @param parser parser structure + * @param filename the name of file + * @param err if *err is NULL it is set to parser error + * @param priority the desired priority of a chunk (only 4 least significant bits + * are considered for this parameter) + * @param strat Merge strategy to use while parsing this file + * @param parse_type Parser type to use while parsing this file + * @return true if chunk has been added and false in case of error + */ +UCL_EXTERN bool ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type); + +/** * Provide a UCL_ARRAY of paths to search for include files. The object is * copied so caller must unref the object. * @param parser parser structure Modified: projects/clang400-import/contrib/libucl/lua/lua_ucl.c ============================================================================== --- projects/clang400-import/contrib/libucl/lua/lua_ucl.c Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/lua/lua_ucl.c Thu Feb 23 07:45:58 2017 (r314130) @@ -29,7 +29,6 @@ #include "ucl_internal.h" #include "lua_ucl.h" #include -#include /*** * @module ucl @@ -187,6 +186,8 @@ ucl_object_lua_push_array (lua_State *L, lua_rawseti (L, -2, i); i ++; } + + ucl_object_iterate_free (it); } else { /* Optimize allocation by preallocation of table */ @@ -482,7 +483,7 @@ static int lua_ucl_parser_init (lua_State *L) { struct ucl_parser *parser, **pparser; - int flags = 0; + int flags = UCL_PARSER_NO_FILEVARS; if (lua_gettop (L) >= 1) { flags = lua_tonumber (L, 1); @@ -524,6 +525,27 @@ lua_ucl_push_opaque (lua_State *L, ucl_o lua_setmetatable (L, -2); } +static inline enum ucl_parse_type +lua_ucl_str_to_parse_type (const char *str) +{ + enum ucl_parse_type type = UCL_PARSE_UCL; + + if (str != NULL) { + if (strcasecmp (str, "msgpack") == 0) { + type = UCL_PARSE_MSGPACK; + } + else if (strcasecmp (str, "sexp") == 0 || + strcasecmp (str, "csexp") == 0) { + type = UCL_PARSE_CSEXP; + } + else if (strcasecmp (str, "auto") == 0) { + type = UCL_PARSE_AUTO; + } + } + + return type; +} + /*** * @method parser:parse_file(name) * Parse UCL object from file. @@ -579,13 +601,19 @@ lua_ucl_parser_parse_string (lua_State * struct ucl_parser *parser; const char *string; size_t llen; + enum ucl_parse_type type = UCL_PARSE_UCL; int ret = 2; parser = lua_ucl_parser_get (L, 1); string = luaL_checklstring (L, 2, &llen); + if (lua_type (L, 3) == LUA_TSTRING) { + type = lua_ucl_str_to_parse_type (lua_tostring (L, 3)); + } + if (parser != NULL && string != NULL) { - if (ucl_parser_add_chunk (parser, (const unsigned char *)string, llen)) { + if (ucl_parser_add_chunk_full (parser, (const unsigned char *)string, + llen, 0, UCL_DUPLICATE_APPEND, type)) { lua_pushboolean (L, true); ret = 1; } @@ -761,6 +789,28 @@ lua_ucl_object_unwrap (lua_State *L) return 1; } +static inline enum ucl_emitter +lua_ucl_str_to_emit_type (const char *strtype) +{ + enum ucl_emitter format = UCL_EMIT_JSON_COMPACT; + + if (strcasecmp (strtype, "json") == 0) { + format = UCL_EMIT_JSON; + } + else if (strcasecmp (strtype, "json-compact") == 0) { + format = UCL_EMIT_JSON_COMPACT; + } + else if (strcasecmp (strtype, "yaml") == 0) { + format = UCL_EMIT_YAML; + } + else if (strcasecmp (strtype, "config") == 0 || + strcasecmp (strtype, "ucl") == 0) { + format = UCL_EMIT_CONFIG; + } + + return format; +} + /*** * @method object:tostring(type) * Unwraps opaque ucl object to string (json by default). Optionally you can @@ -787,19 +837,7 @@ lua_ucl_object_tostring (lua_State *L) if (lua_type (L, 2) == LUA_TSTRING) { const char *strtype = lua_tostring (L, 2); - if (strcasecmp (strtype, "json") == 0) { - format = UCL_EMIT_JSON; - } - else if (strcasecmp (strtype, "json-compact") == 0) { - format = UCL_EMIT_JSON_COMPACT; - } - else if (strcasecmp (strtype, "yaml") == 0) { - format = UCL_EMIT_YAML; - } - else if (strcasecmp (strtype, "config") == 0 || - strcasecmp (strtype, "ucl") == 0) { - format = UCL_EMIT_CONFIG; - } + format = lua_ucl_str_to_emit_type (strtype); } } @@ -1088,6 +1126,9 @@ lua_ucl_to_format (lua_State *L) strcasecmp (strtype, "ucl") == 0) { format = UCL_EMIT_CONFIG; } + else if (strcasecmp (strtype, "msgpack") == 0) { + format = UCL_EMIT_MSGPACK; + } } } Modified: projects/clang400-import/contrib/libucl/src/ucl_emitter_utils.c ============================================================================== --- projects/clang400-import/contrib/libucl/src/ucl_emitter_utils.c Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/src/ucl_emitter_utils.c Thu Feb 23 07:45:58 2017 (r314130) @@ -102,7 +102,7 @@ ucl_elt_string_write_json (const char *s func->ucl_emitter_append_character ('"', 1, func->ud); while (size) { - if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE)) { + if (ucl_test_character (*p, UCL_CHARACTER_JSON_UNSAFE|UCL_CHARACTER_DENIED)) { if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } @@ -128,6 +128,10 @@ ucl_elt_string_write_json (const char *s case '"': func->ucl_emitter_append_len ("\\\"", 2, func->ud); break; + default: + /* Emit unicode unknown character */ + func->ucl_emitter_append_len ("\\uFFFD", 5, func->ud); + break; } len = 0; c = ++p; @@ -138,9 +142,11 @@ ucl_elt_string_write_json (const char *s } size --; } + if (len > 0) { func->ucl_emitter_append_len (c, len, func->ud); } + func->ucl_emitter_append_character ('"', 1, func->ud); } Modified: projects/clang400-import/contrib/libucl/src/ucl_internal.h ============================================================================== --- projects/clang400-import/contrib/libucl/src/ucl_internal.h Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/src/ucl_internal.h Thu Feb 23 07:45:58 2017 (r314130) @@ -87,6 +87,9 @@ #ifdef HAVE_STRING_H #include #endif +#ifdef HAVE_STRINGS_H +#include +#endif #include "utlist.h" #include "utstring.h" @@ -127,19 +130,19 @@ enum ucl_parser_state { }; enum ucl_character_type { - UCL_CHARACTER_DENIED = 0, - UCL_CHARACTER_KEY = 1, - UCL_CHARACTER_KEY_START = 1 << 1, - UCL_CHARACTER_WHITESPACE = 1 << 2, - UCL_CHARACTER_WHITESPACE_UNSAFE = 1 << 3, - UCL_CHARACTER_VALUE_END = 1 << 4, - UCL_CHARACTER_VALUE_STR = 1 << 5, - UCL_CHARACTER_VALUE_DIGIT = 1 << 6, - UCL_CHARACTER_VALUE_DIGIT_START = 1 << 7, - UCL_CHARACTER_ESCAPE = 1 << 8, - UCL_CHARACTER_KEY_SEP = 1 << 9, - UCL_CHARACTER_JSON_UNSAFE = 1 << 10, - UCL_CHARACTER_UCL_UNSAFE = 1 << 11 + UCL_CHARACTER_DENIED = (1 << 0), + UCL_CHARACTER_KEY = (1 << 1), + UCL_CHARACTER_KEY_START = (1 << 2), + UCL_CHARACTER_WHITESPACE = (1 << 3), + UCL_CHARACTER_WHITESPACE_UNSAFE = (1 << 4), + UCL_CHARACTER_VALUE_END = (1 << 5), + UCL_CHARACTER_VALUE_STR = (1 << 6), + UCL_CHARACTER_VALUE_DIGIT = (1 << 7), + UCL_CHARACTER_VALUE_DIGIT_START = (1 << 8), + UCL_CHARACTER_ESCAPE = (1 << 9), + UCL_CHARACTER_KEY_SEP = (1 << 10), + UCL_CHARACTER_JSON_UNSAFE = (1 << 11), + UCL_CHARACTER_UCL_UNSAFE = (1 << 12) }; struct ucl_macro { @@ -568,4 +571,6 @@ bool ucl_parser_process_object_element ( */ bool ucl_parse_msgpack (struct ucl_parser *parser); +bool ucl_parse_csexp (struct ucl_parser *parser); + #endif /* UCL_INTERNAL_H_ */ Modified: projects/clang400-import/contrib/libucl/src/ucl_parser.c ============================================================================== --- projects/clang400-import/contrib/libucl/src/ucl_parser.c Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/src/ucl_parser.c Thu Feb 23 07:45:58 2017 (r314130) @@ -2469,8 +2469,10 @@ ucl_parser_new (int flags) parser->comments = ucl_object_typed_new (UCL_OBJECT); } - /* Initial assumption about filevars */ - ucl_parser_set_filevars (parser, NULL, false); + if (!(flags & UCL_PARSER_NO_FILEVARS)) { + /* Initial assumption about filevars */ + ucl_parser_set_filevars (parser, NULL, false); + } return parser; } @@ -2617,6 +2619,19 @@ ucl_parser_add_chunk_full (struct ucl_pa return false; } + if (parse_type == UCL_PARSE_AUTO && len > 0) { + /* We need to detect parse type by the first symbol */ + if ((*data & 0x80) == 0x80 && (*data >= 0xdc && *data <= 0xdf)) { + parse_type = UCL_PARSE_MSGPACK; + } + else if (*data == '(') { + parse_type = UCL_PARSE_CSEXP; + } + else { + parse_type = UCL_PARSE_UCL; + } + } + chunk->begin = data; chunk->remain = len; chunk->pos = chunk->begin; @@ -2643,6 +2658,8 @@ ucl_parser_add_chunk_full (struct ucl_pa return ucl_state_machine (parser); case UCL_PARSE_MSGPACK: return ucl_parse_msgpack (parser); + case UCL_PARSE_CSEXP: + return ucl_parse_csexp (parser); } } else { Modified: projects/clang400-import/contrib/libucl/src/ucl_util.c ============================================================================== --- projects/clang400-import/contrib/libucl/src/ucl_util.c Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/libucl/src/ucl_util.c Thu Feb 23 07:45:58 2017 (r314130) @@ -26,11 +26,17 @@ #include "ucl_internal.h" #include "ucl_chartable.h" #include "kvec.h" +#include #include #include /* for snprintf */ #ifndef _WIN32 #include +#include +#else +#ifndef NBBY +#define NBBY 8 +#endif #endif #ifdef HAVE_LIBGEN_H @@ -81,11 +87,6 @@ typedef kvec_t(ucl_object_t *) ucl_array #define MAP_FAILED ((void *) -1) #endif -#ifdef _WIN32 -#include -#define NBBY CHAR_BIT -#endif - static void *ucl_mmap(char *addr, size_t length, int prot, int access, int fd, off_t offset) { void *map = NULL; @@ -1854,9 +1855,11 @@ ucl_parser_add_file (struct ucl_parser * UCL_PARSE_UCL); } + bool -ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, - unsigned priority) +ucl_parser_add_fd_full (struct ucl_parser *parser, int fd, + unsigned priority, enum ucl_duplicate_strategy strat, + enum ucl_parse_type parse_type) { unsigned char *buf; size_t len; @@ -1882,7 +1885,8 @@ ucl_parser_add_fd_priority (struct ucl_p } parser->cur_file = NULL; len = st.st_size; - ret = ucl_parser_add_chunk_priority (parser, buf, len, priority); + ret = ucl_parser_add_chunk_full (parser, buf, len, priority, strat, + parse_type); if (len > 0) { ucl_munmap (buf, len); @@ -1892,6 +1896,18 @@ ucl_parser_add_fd_priority (struct ucl_p } bool +ucl_parser_add_fd_priority (struct ucl_parser *parser, int fd, + unsigned priority) +{ + if (parser == NULL) { + return false; + } + + return ucl_parser_add_fd_full(parser, fd, parser->default_priority, + UCL_DUPLICATE_APPEND, UCL_PARSE_UCL); +} + +bool ucl_parser_add_fd (struct ucl_parser *parser, int fd) { if (parser == NULL) { @@ -2488,6 +2504,10 @@ ucl_object_iterate_reset (ucl_object_ite UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + rit->impl_it = obj; rit->expl_it = NULL; @@ -2497,6 +2517,13 @@ ucl_object_iterate_reset (ucl_object_ite const ucl_object_t* ucl_object_iterate_safe (ucl_object_iter_t it, bool expand_values) { + return ucl_object_iterate_full (it, expand_values ? UCL_ITERATE_BOTH : + UCL_ITERATE_IMPLICIT); +} + +const ucl_object_t* +ucl_object_iterate_full (ucl_object_iter_t it, enum ucl_iterate_type type) +{ struct ucl_object_safe_iter *rit = UCL_SAFE_ITER (it); const ucl_object_t *ret = NULL; @@ -2509,21 +2536,23 @@ ucl_object_iterate_safe (ucl_object_iter if (rit->impl_it->type == UCL_OBJECT || rit->impl_it->type == UCL_ARRAY) { ret = ucl_object_iterate (rit->impl_it, &rit->expl_it, true); - if (ret == NULL) { + if (ret == NULL && (type & UCL_ITERATE_IMPLICIT)) { /* Need to switch to another implicit object in chain */ rit->impl_it = rit->impl_it->next; rit->expl_it = NULL; - return ucl_object_iterate_safe (it, expand_values); + + return ucl_object_iterate_safe (it, type); } } else { /* Just iterate over the implicit array */ ret = rit->impl_it; rit->impl_it = rit->impl_it->next; - if (expand_values) { + + if (type & UCL_ITERATE_EXPLICIT) { /* We flatten objects if need to expand values */ if (ret->type == UCL_OBJECT || ret->type == UCL_ARRAY) { - return ucl_object_iterate_safe (it, expand_values); + return ucl_object_iterate_safe (it, type); } } } @@ -2538,6 +2567,10 @@ ucl_object_iterate_free (ucl_object_iter UCL_SAFE_ITER_CHECK (rit); + if (rit->expl_it != NULL) { + UCL_FREE (sizeof (*rit->expl_it), rit->expl_it); + } + UCL_FREE (sizeof (*rit), it); } Modified: projects/clang400-import/contrib/mdocml/INSTALL ============================================================================== --- projects/clang400-import/contrib/mdocml/INSTALL Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/mdocml/INSTALL Thu Feb 23 07:45:58 2017 (r314130) @@ -1,4 +1,4 @@ -$Id: INSTALL,v 1.17 2016/07/19 22:40:33 schwarze Exp $ +$Id: INSTALL,v 1.18 2017/02/08 12:24:10 schwarze Exp $ About mdocml, the portable mandoc distribution ---------------------------------------------- @@ -16,7 +16,7 @@ tech@ mailing list, too. Enjoy using the mandoc toolset! -Ingo Schwarze, Karlsruhe, July 2016 +Ingo Schwarze, Karlsruhe, February 2017 Installation @@ -31,15 +31,21 @@ Regarding how packages and ports are mai system, please consult your operating system documentation. To install mandoc manually, the following steps are needed: -1. If you want to build the CGI program, man.cgi(8), too, run the -command "echo BUILD_CGI=1 > configure.local". Then run "cp -cgi.h.examples cgi.h" and edit cgi.h as desired. +1. If you want to build the CGI program, man.cgi(8), too, +run the command "echo BUILD_CGI=1 >> configure.local". +Then run "cp cgi.h.example cgi.h" and edit cgi.h as desired. + +2. If you also want to build the new catman(8) utility, run the +command "echo BUILD_CATMAN=1 >> configure.local". Note that it +is unlikely to be a drop-in replacement providing the same +functionality as your system's "catman", if your operating +system contains one. -2. Define MANPATH_DEFAULT in configure.local +3. Define MANPATH_DEFAULT in configure.local if /usr/share/man:/usr/X11R6/man:/usr/local/man is not appropriate for your operating system. -3. Run "./configure". +4. Run "./configure". This script attempts autoconfiguration of mandoc for your system. Read both its standard output and the file "Makefile.local" it generates. If anything looks wrong or different from what you @@ -49,27 +55,31 @@ result seems right to you. On Solaris 10 and earlier, you may have to run "ksh ./configure" because the native /bin/sh lacks some POSIX features. -4. Run "make". +5. Run "make". Any POSIX-compatible make, in particular both BSD make and GNU make, should work. If the build fails, look at "configure.local.example" and go back to step 2. -5. Run "make -n install" and check whether everything will be +6. Run "make -n install" and check whether everything will be installed to the intended places. Otherwise, put some *DIR or *NM* -variables into "configure.local" and go back to step 3. +variables into "configure.local" and go back to step 4. -6. Run "sudo make install". If you intend to build a binary +7. Optionally run the regression suite. +Basically, that amounts to "cd regress && ./regress.pl". +But you should probably look at "./mandoc -l regress/regress.pl.1" +first. + +8. Run "sudo make install". If you intend to build a binary package using some kind of fake root mechanism, you may need a command like "make DESTDIR=... install". Read the *-install targets in the "Makefile" to understand how DESTDIR is used. -7. Run the command "sudo -makewhatis" to build mandoc.db(5) databases in all the directory -trees configured in step 6. Whenever installing new manual pages, -re-run makewhatis(8) to update the databases, or apropos(1) will -not find the new pages. +9. Run the command "sudo makewhatis" to build mandoc.db(5) databases +in all the directory trees configured in step 6. Whenever installing +new manual pages, re-run makewhatis(8) to update the databases, or +apropos(1) will not find the new pages. -8. To set up a man.cgi(8) server, read its manual page. +10. To set up a man.cgi(8) server, read its manual page. Note that some man(7) pages may contain low-level roff(7) markup that mandoc does not yet understand. On some BSD systems using @@ -87,9 +97,10 @@ The following libraries are required: 2. The fts(3) directory traversion functions. If your system does not have them, the bundled compatibility version -will be used, so you need not worry in that case. But be careful: the -glibc version of fts(3) is known to be broken on 32bit platforms, -see . +will be used, so you need not worry in that case. But be careful: old +glibc versions of fts(3) were known to be broken on 32bit platforms, +see . +That was presumably fixed in glibc-2.23. If you run into that problem, set "HAVE_FTS=0" in configure.local. 3. Marc Espie's ohash(3) library. Modified: projects/clang400-import/contrib/mdocml/LICENSE ============================================================================== --- projects/clang400-import/contrib/mdocml/LICENSE Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/mdocml/LICENSE Thu Feb 23 07:45:58 2017 (r314130) @@ -1,4 +1,4 @@ -$Id: LICENSE,v 1.13 2016/10/18 14:15:33 schwarze Exp $ +$Id: LICENSE,v 1.14 2017/02/08 12:24:10 schwarze Exp $ With the exceptions noted below, all code and documentation contained in the mdocml toolkit is protected by the Copyright @@ -10,6 +10,7 @@ Copyright (c) 2009, 2010, 2011, 2012 Joe Copyright (c) 2013 Franco Fichtner Copyright (c) 2014 Baptiste Daroussin Copyright (c) 2016 Ed Maste +Copyright (c) 2017 Michael Stapelberg Copyright (c) 1999, 2004 Marc Espie Copyright (c) 1998, 2004, 2010 Todd C. Miller Copyright (c) 2008 Otto Moerbeek Modified: projects/clang400-import/contrib/mdocml/Makefile ============================================================================== --- projects/clang400-import/contrib/mdocml/Makefile Thu Feb 23 07:42:49 2017 (r314129) +++ projects/clang400-import/contrib/mdocml/Makefile Thu Feb 23 07:45:58 2017 (r314130) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.493 2016/11/19 15:24:51 schwarze Exp $ +# $Id: Makefile,v 1.504 2017/02/18 15:29:39 schwarze Exp $ # # Copyright (c) 2010, 2011, 2012 Kristaps Dzonsons -# Copyright (c) 2011, 2013-2016 Ingo Schwarze +# Copyright (c) 2011, 2013-2017 Ingo Schwarze # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -15,11 +15,12 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -VERSION = 1.14.0 +VERSION = 1.14.1 # === LIST OF FILES ==================================================== TESTSRCS = test-be32toh.c \ + test-cmsg.c \ test-dirent-namlen.c \ test-EFTYPE.c \ test-err.c \ @@ -30,10 +31,12 @@ TESTSRCS = test-be32toh.c \ test-mkdtemp.c \ test-nanosleep.c \ test-ntohl.c \ + test-O_DIRECTORY.c \ test-ohash.c \ test-PATH_MAX.c \ test-pledge.c \ test-progname.c \ + test-recvmsg.c \ test-reallocarray.c \ test-rewb-bsd.c \ test-rewb-sysv.c \ @@ -49,6 +52,7 @@ TESTSRCS = test-be32toh.c \ test-wchar.c SRCS = att.c \ + catman.c \ cgi.c \ chars.c \ compat_err.c \ @@ -89,6 +93,7 @@ SRCS = att.c \ mandoc.c \ mandoc_aux.c \ mandoc_ohash.c \ + mandocd.c \ mandocdb.c \ manpage.c \ manpath.c \ @@ -128,6 +133,7 @@ DISTFILES = INSTALL \ NEWS \ TODO \ apropos.1 \ + catman.8 \ cgi.h.example \ compat_fts.h \ compat_ohash.h \ @@ -156,6 +162,7 @@ DISTFILES = INSTALL \ man.cgi.8 \ man.conf.5 \ man.h \ + man.options.1 \ manconf.h \ mandoc.1 \ mandoc.3 \ @@ -169,6 +176,7 @@ DISTFILES = INSTALL \ mandoc_html.3 \ mandoc_malloc.3 \ mandoc_ohash.h \ + mandocd.8 \ mansearch.3 \ mansearch.h \ mchars_alloc.3 \ @@ -280,6 +288,12 @@ CGI_OBJS = $(MANDOC_HTML_OBJS) \ cgi.o \ out.o +MANDOCD_OBJS = $(MANDOC_HTML_OBJS) \ + $(MANDOC_TERM_OBJS) \ + mandocd.o \ + out.o \ + tag.o + MANPAGE_OBJS = $(DBM_OBJS) \ manpage.o \ manpath.o @@ -298,6 +312,7 @@ WWW_MANS = apropos.1.html \ man.1.html \ mandoc.1.html \ soelim.1.html \ + man.cgi.3.html \ mandoc.3.html \ mandoc_escape.3.html \ mandoc_headers.3.html \ @@ -311,11 +326,12 @@ WWW_MANS = apropos.1.html \ eqn.7.html \ man.7.html \ mandoc_char.7.html \ + mandocd.8.html \ mdoc.7.html \ roff.7.html \ tbl.7.html \ + catman.8.html \ makewhatis.8.html \ - man.cgi.3.html \ man.cgi.8.html \ man.h.html \ manconf.h.html \ @@ -334,11 +350,7 @@ include Makefile.local # === DEPENDENCY HANDLING ============================================== -all: base-build $(BUILD_TARGETS) Makefile.local - -base-build: mandoc demandoc soelim - -cgi-build: man.cgi +all: mandoc demandoc soelim $(BUILD_TARGETS) Makefile.local install: base-install $(INSTALL_TARGETS) @@ -360,13 +372,14 @@ clean: rm -f libmandoc.a $(LIBMANDOC_OBJS) $(COMPAT_OBJS) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Thu Feb 23 19:25:31 2017 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 F30D2CEB29E for ; Thu, 23 Feb 2017 19:25:31 +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 mx1.freebsd.org (Postfix) with ESMTPS id BE1F71D40; Thu, 23 Feb 2017 19:25:31 +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 v1NJPVw9025124; Thu, 23 Feb 2017 19:25:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJPTSu025111; Thu, 23 Feb 2017 19:25:29 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231925.v1NJPTSu025111@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r314177 - in projects/clang400-import: contrib/llvm/lib/CodeGen/AsmPrinter contrib/llvm/lib/Target/AArch64 contrib/llvm/lib/Target/ARM contrib/llvm/lib/Transforms/Scalar contrib/llvm/to... X-SVN-Group: projects 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.23 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: Thu, 23 Feb 2017 19:25:32 -0000 Author: dim Date: Thu Feb 23 19:25:29 2017 New Revision: 314177 URL: https://svnweb.freebsd.org/changeset/base/314177 Log: Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch r296002, and update build glue. Modified: projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/LICM.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp projects/clang400-import/lib/clang/include/clang/Basic/Version.inc projects/clang400-import/lib/clang/include/lld/Config/Version.inc Directory Properties: projects/clang400-import/contrib/compiler-rt/ (props changed) projects/clang400-import/contrib/libc++/ (props changed) projects/clang400-import/contrib/llvm/ (props changed) projects/clang400-import/contrib/llvm/tools/clang/ (props changed) projects/clang400-import/contrib/llvm/tools/lld/ (props changed) projects/clang400-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -522,22 +522,19 @@ DIE *DwarfCompileUnit::constructVariable } // .. else use frame index. - if (DV.getFrameIndex().empty()) + if (!DV.hasFrameIndexExprs()) return VariableDie; - auto Expr = DV.getExpression().begin(); DIELoc *Loc = new (DIEValueAllocator) DIELoc; DIEDwarfExpression DwarfExpr(*Asm, *this, *Loc); - for (auto FI : DV.getFrameIndex()) { + for (auto &Fragment : DV.getFrameIndexExprs()) { unsigned FrameReg = 0; const TargetFrameLowering *TFI = Asm->MF->getSubtarget().getFrameLowering(); - int Offset = TFI->getFrameIndexReference(*Asm->MF, FI, FrameReg); - assert(Expr != DV.getExpression().end() && "Wrong number of expressions"); - DwarfExpr.addFragmentOffset(*Expr); + int Offset = TFI->getFrameIndexReference(*Asm->MF, Fragment.FI, FrameReg); + DwarfExpr.addFragmentOffset(Fragment.Expr); DwarfExpr.AddMachineRegIndirect(*Asm->MF->getSubtarget().getRegisterInfo(), FrameReg, Offset); - DwarfExpr.AddExpression(*Expr); - ++Expr; + DwarfExpr.AddExpression(Fragment.Expr); } addBlock(*VariableDie, dwarf::DW_AT_location, DwarfExpr.finalize()); Modified: projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -199,6 +199,15 @@ const DIType *DbgVariable::getType() con return Ty; } +ArrayRef DbgVariable::getFrameIndexExprs() const { + std::sort(FrameIndexExprs.begin(), FrameIndexExprs.end(), + [](const FrameIndexExpr &A, const FrameIndexExpr &B) -> bool { + return A.Expr->getFragmentInfo()->OffsetInBits < + B.Expr->getFragmentInfo()->OffsetInBits; + }); + return FrameIndexExprs; +} + static const DwarfAccelTable::Atom TypeAtoms[] = { DwarfAccelTable::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4), DwarfAccelTable::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2), Modified: projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h ============================================================================== --- projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h Thu Feb 23 19:25:29 2017 (r314177) @@ -54,7 +54,7 @@ class MachineModuleInfo; /// /// Variables can be created from allocas, in which case they're generated from /// the MMI table. Such variables can have multiple expressions and frame -/// indices. The \a Expr and \a FrameIndices array must match. +/// indices. /// /// Variables can be created from \c DBG_VALUE instructions. Those whose /// location changes over time use \a DebugLocListIndex, while those with a @@ -64,11 +64,16 @@ class MachineModuleInfo; class DbgVariable { const DILocalVariable *Var; /// Variable Descriptor. const DILocation *IA; /// Inlined at location. - SmallVector Expr; /// Complex address. DIE *TheDIE = nullptr; /// Variable DIE. unsigned DebugLocListIndex = ~0u; /// Offset in DebugLocs. const MachineInstr *MInsn = nullptr; /// DBG_VALUE instruction. - SmallVector FrameIndex; /// Frame index. + + struct FrameIndexExpr { + int FI; + const DIExpression *Expr; + }; + mutable SmallVector + FrameIndexExprs; /// Frame index + expression. public: /// Construct a DbgVariable. @@ -80,21 +85,18 @@ public: /// Initialize from the MMI table. void initializeMMI(const DIExpression *E, int FI) { - assert(Expr.empty() && "Already initialized?"); - assert(FrameIndex.empty() && "Already initialized?"); + assert(FrameIndexExprs.empty() && "Already initialized?"); assert(!MInsn && "Already initialized?"); assert((!E || E->isValid()) && "Expected valid expression"); assert(~FI && "Expected valid index"); - Expr.push_back(E); - FrameIndex.push_back(FI); + FrameIndexExprs.push_back({FI, E}); } /// Initialize from a DBG_VALUE instruction. void initializeDbgValue(const MachineInstr *DbgValue) { - assert(Expr.empty() && "Already initialized?"); - assert(FrameIndex.empty() && "Already initialized?"); + assert(FrameIndexExprs.empty() && "Already initialized?"); assert(!MInsn && "Already initialized?"); assert(Var == DbgValue->getDebugVariable() && "Wrong variable"); @@ -103,16 +105,15 @@ public: MInsn = DbgValue; if (auto *E = DbgValue->getDebugExpression()) if (E->getNumElements()) - Expr.push_back(E); + FrameIndexExprs.push_back({0, E}); } // Accessors. const DILocalVariable *getVariable() const { return Var; } const DILocation *getInlinedAt() const { return IA; } - ArrayRef getExpression() const { return Expr; } const DIExpression *getSingleExpression() const { - assert(MInsn && Expr.size() <= 1); - return Expr.size() ? Expr[0] : nullptr; + assert(MInsn && FrameIndexExprs.size() <= 1); + return FrameIndexExprs.size() ? FrameIndexExprs[0].Expr : nullptr; } void setDIE(DIE &D) { TheDIE = &D; } DIE *getDIE() const { return TheDIE; } @@ -120,7 +121,9 @@ public: unsigned getDebugLocListIndex() const { return DebugLocListIndex; } StringRef getName() const { return Var->getName(); } const MachineInstr *getMInsn() const { return MInsn; } - ArrayRef getFrameIndex() const { return FrameIndex; } + /// Get the FI entries, sorted by fragment offset. + ArrayRef getFrameIndexExprs() const; + bool hasFrameIndexExprs() const { return !FrameIndexExprs.empty(); } void addMMIEntry(const DbgVariable &V) { assert(DebugLocListIndex == ~0U && !MInsn && "not an MMI entry"); @@ -128,16 +131,15 @@ public: assert(V.Var == Var && "conflicting variable"); assert(V.IA == IA && "conflicting inlined-at location"); - assert(!FrameIndex.empty() && "Expected an MMI entry"); - assert(!V.FrameIndex.empty() && "Expected an MMI entry"); - assert(Expr.size() == FrameIndex.size() && "Mismatched expressions"); - assert(V.Expr.size() == V.FrameIndex.size() && "Mismatched expressions"); - - Expr.append(V.Expr.begin(), V.Expr.end()); - FrameIndex.append(V.FrameIndex.begin(), V.FrameIndex.end()); - assert(all_of(Expr, [](const DIExpression *E) { - return E && E->isFragment(); - }) && "conflicting locations for variable"); + assert(!FrameIndexExprs.empty() && "Expected an MMI entry"); + assert(!V.FrameIndexExprs.empty() && "Expected an MMI entry"); + + FrameIndexExprs.append(V.FrameIndexExprs.begin(), V.FrameIndexExprs.end()); + assert(all_of(FrameIndexExprs, + [](FrameIndexExpr &FIE) { + return FIE.Expr && FIE.Expr->isFragment(); + }) && + "conflicting locations for variable"); } // Translate tag to proper Dwarf tag. @@ -167,11 +169,11 @@ public: bool hasComplexAddress() const { assert(MInsn && "Expected DBG_VALUE, not MMI variable"); - assert(FrameIndex.empty() && "Expected DBG_VALUE, not MMI variable"); - assert( - (Expr.empty() || (Expr.size() == 1 && Expr.back()->getNumElements())) && - "Invalid Expr for DBG_VALUE"); - return !Expr.empty(); + assert((FrameIndexExprs.empty() || + (FrameIndexExprs.size() == 1 && + FrameIndexExprs[0].Expr->getNumElements())) && + "Invalid Expr for DBG_VALUE"); + return !FrameIndexExprs.empty(); } bool isBlockByrefVariable() const; const DIType *getType() const; Modified: projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -853,9 +853,11 @@ AArch64LoadStoreOpt::promoteLoadFromStor .addImm(Imms); } } - StoreI->clearRegisterKills(StRt, TRI); - (void)BitExtMI; + // Clear kill flags between store and load. + for (MachineInstr &MI : make_range(StoreI->getIterator(), + BitExtMI->getIterator())) + MI.clearRegisterKills(StRt, TRI); DEBUG(dbgs() << "Promoting load by replacing :\n "); DEBUG(StoreI->print(dbgs())); Modified: projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -1225,16 +1225,36 @@ bool ARMExpandPseudo::ExpandMI(MachineBa } case ARM::tTPsoft: case ARM::TPsoft: { + const bool Thumb = Opcode == ARM::tTPsoft; + MachineInstrBuilder MIB; - if (Opcode == ARM::tTPsoft) + if (STI->genLongCalls()) { + MachineFunction *MF = MBB.getParent(); + MachineConstantPool *MCP = MF->getConstantPool(); + unsigned PCLabelID = AFI->createPICLabelUId(); + MachineConstantPoolValue *CPV = + ARMConstantPoolSymbol::Create(MF->getFunction()->getContext(), + "__aeabi_read_tp", PCLabelID, 0); + unsigned Reg = MI.getOperand(0).getReg(); MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), - TII->get( ARM::tBL)) - .addImm((unsigned)ARMCC::AL).addReg(0) - .addExternalSymbol("__aeabi_read_tp", 0); - else + TII->get(Thumb ? ARM::tLDRpci : ARM::LDRi12), Reg) + .addConstantPoolIndex(MCP->getConstantPoolIndex(CPV, 4)); + if (!Thumb) + MIB.addImm(0); + MIB.addImm(static_cast(ARMCC::AL)).addReg(0); + MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), - TII->get( ARM::BL)) - .addExternalSymbol("__aeabi_read_tp", 0); + TII->get(Thumb ? ARM::tBLXr : ARM::BLX)); + if (Thumb) + MIB.addImm(static_cast(ARMCC::AL)).addReg(0); + MIB.addReg(Reg, RegState::Kill); + } else { + MIB = BuildMI(MBB, MBBI, MI.getDebugLoc(), + TII->get(Thumb ? ARM::tBL : ARM::BL)); + if (Thumb) + MIB.addImm(static_cast(ARMCC::AL)).addReg(0); + MIB.addExternalSymbol("__aeabi_read_tp", 0); + } MIB->setMemRefs(MI.memoperands_begin(), MI.memoperands_end()); TransferImpOps(MI, MIB, MIB); Modified: projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -3027,17 +3027,20 @@ static SDValue promoteToConstantPool(con return DAG.getNode(ARMISD::Wrapper, dl, MVT::i32, CPAddr); } +static bool isReadOnly(const GlobalValue *GV) { + if (const GlobalAlias *GA = dyn_cast(GV)) + GV = GA->getBaseObject(); + return (isa(GV) && cast(GV)->isConstant()) || + isa(GV); +} + SDValue ARMTargetLowering::LowerGlobalAddressELF(SDValue Op, SelectionDAG &DAG) const { EVT PtrVT = getPointerTy(DAG.getDataLayout()); SDLoc dl(Op); const GlobalValue *GV = cast(Op)->getGlobal(); const TargetMachine &TM = getTargetMachine(); - if (const GlobalAlias *GA = dyn_cast(GV)) - GV = GA->getBaseObject(); - bool IsRO = - (isa(GV) && cast(GV)->isConstant()) || - isa(GV); + bool IsRO = isReadOnly(GV); // promoteToConstantPool only if not generating XO text section if (TM.shouldAssumeDSOLocal(*GV->getParent(), GV) && !Subtarget->genExecuteOnly()) Modified: projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/LICM.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/LICM.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/LICM.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -1196,10 +1196,7 @@ LoopInvariantCodeMotion::collectAliasInf auto mergeLoop = [&](Loop *L) { // Loop over the body of this loop, looking for calls, invokes, and stores. - // Because subloops have already been incorporated into AST, we skip blocks - // in subloops. for (BasicBlock *BB : L->blocks()) - if (LI->getLoopFor(BB) == L) // Ignore blocks in subloops. CurAST->add(*BB); // Incorporate the specified basic block }; Modified: projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -4705,7 +4705,6 @@ void CGOpenMPRuntime::emitCancellationPo auto *Result = CGF.EmitRuntimeCall( createRuntimeFunction(OMPRTL__kmpc_cancellationpoint), Args); // if (__kmpc_cancellationpoint()) { - // __kmpc_cancel_barrier(); // exit from construct; // } auto *ExitBB = CGF.createBasicBlock(".cancel.exit"); @@ -4713,8 +4712,6 @@ void CGOpenMPRuntime::emitCancellationPo auto *Cmp = CGF.Builder.CreateIsNotNull(Result); CGF.Builder.CreateCondBr(Cmp, ExitBB, ContBB); CGF.EmitBlock(ExitBB); - // __kmpc_cancel_barrier(); - emitBarrierCall(CGF, Loc, OMPD_unknown, /*EmitChecks=*/false); // exit from construct; auto CancelDest = CGF.getOMPCancelDestination(OMPRegionInfo->getDirectiveKind()); @@ -4743,7 +4740,6 @@ void CGOpenMPRuntime::emitCancelCall(Cod auto *Result = CGF.EmitRuntimeCall( RT.createRuntimeFunction(OMPRTL__kmpc_cancel), Args); // if (__kmpc_cancel()) { - // __kmpc_cancel_barrier(); // exit from construct; // } auto *ExitBB = CGF.createBasicBlock(".cancel.exit"); @@ -4751,8 +4747,6 @@ void CGOpenMPRuntime::emitCancelCall(Cod auto *Cmp = CGF.Builder.CreateIsNotNull(Result); CGF.Builder.CreateCondBr(Cmp, ExitBB, ContBB); CGF.EmitBlock(ExitBB); - // __kmpc_cancel_barrier(); - RT.emitBarrierCall(CGF, Loc, OMPD_unknown, /*EmitChecks=*/false); // exit from construct; auto CancelDest = CGF.getOMPCancelDestination(OMPRegionInfo->getDirectiveKind()); Modified: projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -8937,6 +8937,10 @@ void openbsd::Linker::ConstructJob(Compi if (Args.hasArg(options::OPT_pg)) CmdArgs.push_back( Args.MakeArgString(getToolChain().GetFilePath("gcrt0.o"))); + else if (Args.hasArg(options::OPT_static) && + !Args.hasArg(options::OPT_nopie)) + CmdArgs.push_back( + Args.MakeArgString(getToolChain().GetFilePath("rcrt0.o"))); else CmdArgs.push_back( Args.MakeArgString(getToolChain().GetFilePath("crt0.o"))); Modified: projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp Thu Feb 23 19:25:29 2017 (r314177) @@ -3154,7 +3154,7 @@ getCCForDeclaratorChunk(Sema &S, Declara if (Attr->getKind() == AttributeList::AT_OpenCLKernel) { llvm::Triple::ArchType arch = S.Context.getTargetInfo().getTriple().getArch(); if (arch == llvm::Triple::spir || arch == llvm::Triple::spir64 || - arch == llvm::Triple::amdgcn) { + arch == llvm::Triple::amdgcn || arch == llvm::Triple::r600) { CC = CC_OpenCLKernel; } break; Modified: projects/clang400-import/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- projects/clang400-import/lib/clang/include/clang/Basic/Version.inc Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/lib/clang/include/clang/Basic/Version.inc Thu Feb 23 19:25:29 2017 (r314177) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "295380" +#define SVN_REVISION "296002" Modified: projects/clang400-import/lib/clang/include/lld/Config/Version.inc ============================================================================== --- projects/clang400-import/lib/clang/include/lld/Config/Version.inc Thu Feb 23 19:21:47 2017 (r314176) +++ projects/clang400-import/lib/clang/include/lld/Config/Version.inc Thu Feb 23 19:25:29 2017 (r314177) @@ -4,5 +4,5 @@ #define LLD_VERSION_STRING "4.0.0" #define LLD_VERSION_MAJOR 4 #define LLD_VERSION_MINOR 0 -#define LLD_REVISION_STRING "295380" +#define LLD_REVISION_STRING "296002" #define LLD_REPOSITORY_STRING "FreeBSD" From owner-svn-src-projects@freebsd.org Thu Feb 23 19:32:27 2017 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 C4D2ACEB47C for ; Thu, 23 Feb 2017 19:32:27 +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 mx1.freebsd.org (Postfix) with ESMTPS id 5B5C01F2; Thu, 23 Feb 2017 19:32:27 +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 v1NJWQSN029175; Thu, 23 Feb 2017 19:32:26 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1NJWPnQ029149; Thu, 23 Feb 2017 19:32:25 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702231932.v1NJWPnQ029149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Feb 2017 19:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r314178 - in projects/clang400-import: cddl/contrib/opensolaris/lib/libctf/common cddl/contrib/opensolaris/lib/libdtrace/common contrib/ofed/libcxgb4/src etc lib/libcompiler_rt sys/comp... X-SVN-Group: projects 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.23 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: Thu, 23 Feb 2017 19:32:27 -0000 Author: dim Date: Thu Feb 23 19:32:25 2017 New Revision: 314178 URL: https://svnweb.freebsd.org/changeset/base/314178 Log: Merge ^/head r314129 through r314177. Modified: projects/clang400-import/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c projects/clang400-import/contrib/ofed/libcxgb4/src/dev.c projects/clang400-import/contrib/ofed/libcxgb4/src/qp.c projects/clang400-import/contrib/ofed/libcxgb4/src/t4.h projects/clang400-import/contrib/ofed/libcxgb4/src/t4_chip_type.h projects/clang400-import/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h projects/clang400-import/contrib/ofed/libcxgb4/src/t4_regs.h projects/clang400-import/contrib/ofed/libcxgb4/src/verbs.c projects/clang400-import/etc/devd.conf projects/clang400-import/lib/libcompiler_rt/Makefile projects/clang400-import/sys/compat/linux/linux_misc.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/bitops.h projects/clang400-import/sys/dev/bktr/bktr_core.c projects/clang400-import/sys/dev/ce/ceddk.c projects/clang400-import/sys/dev/cxgbe/iw_cxgbe/device.c projects/clang400-import/sys/dev/cxgbe/iw_cxgbe/mem.c projects/clang400-import/sys/dev/cxgbe/iw_cxgbe/provider.c projects/clang400-import/sys/dev/rt/if_rt.c projects/clang400-import/sys/dev/vxge/vxge.c projects/clang400-import/sys/dev/vxge/vxgehal/vxgehal-config.c projects/clang400-import/sys/dev/xen/gntdev/gntdev.c projects/clang400-import/sys/dev/xen/netback/netback.c projects/clang400-import/sys/dev/xen/netback/netback_unit_tests.c projects/clang400-import/sys/modules/iwm/Makefile projects/clang400-import/sys/netinet/tcp_output.c projects/clang400-import/sys/ofed/drivers/infiniband/core/uverbs_main.c projects/clang400-import/usr.bin/vi/catalog/Makefile projects/clang400-import/usr.sbin/camdd/camdd.c projects/clang400-import/usr.sbin/rtadvd/config.c Directory Properties: projects/clang400-import/ (props changed) projects/clang400-import/cddl/ (props changed) projects/clang400-import/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang400-import/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c ============================================================================== --- projects/clang400-import/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Thu Feb 23 19:32:25 2017 (r314178) @@ -346,6 +346,7 @@ ctf_fdopen(int fd, int *errp) if ((sp32 = malloc(nbytes)) == NULL || pread64(fd, sp32, nbytes, hdr.e64.e_shoff) != nbytes) { free(sp); + free(sp32); return (ctf_set_open_errno(errp, errno)); } Modified: projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c ============================================================================== --- projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c Thu Feb 23 19:32:25 2017 (r314178) @@ -931,9 +931,11 @@ dt_provmod_open(dt_provmod_t **provmod, * reallocate it. We normally won't need to do this * because providers aren't being loaded all the time. */ - if ((p = realloc(p_providers,len)) == NULL) + if ((p = realloc(p_providers,len)) == NULL) { + free(p_providers); /* How do we report errors here? */ return; + } p_providers = p; } else break; @@ -1148,8 +1150,10 @@ dt_vopen(int version, int flags, int *er (void) fcntl(ftfd, F_SETFD, FD_CLOEXEC); alloc: - if ((dtp = malloc(sizeof (dtrace_hdl_t))) == NULL) + if ((dtp = malloc(sizeof (dtrace_hdl_t))) == NULL) { + dt_provmod_destroy(&provmod); return (set_open_errno(dtp, errp, EDT_NOMEM)); + } bzero(dtp, sizeof (dtrace_hdl_t)); dtp->dt_oflags = flags; Modified: projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c ============================================================================== --- projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/cddl/contrib/opensolaris/lib/libdtrace/common/dt_strtab.c Thu Feb 23 19:32:25 2017 (r314178) @@ -256,8 +256,10 @@ dt_strtab_insert(dt_strtab_t *sp, const * Now copy the string data into our buffer list, and then update * the global counts of strings and bytes. Return str's byte offset. */ - if (dt_strtab_copyin(sp, str, len + 1) == -1) + if (dt_strtab_copyin(sp, str, len + 1) == -1) { + free(hp); return (-1L); + } sp->str_nstrs++; sp->str_size += len + 1; Modified: projects/clang400-import/contrib/ofed/libcxgb4/src/dev.c ============================================================================== --- projects/clang400-import/contrib/ofed/libcxgb4/src/dev.c Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/contrib/ofed/libcxgb4/src/dev.c Thu Feb 23 19:32:25 2017 (r314178) @@ -145,10 +145,10 @@ static struct ibv_context *c4iw_alloc_co context->ibv_ctx.ops = c4iw_ctx_ops; switch (rhp->chip_version) { + case CHELSIO_T6: case CHELSIO_T5: - PDBG("%s T5/T4 device\n", __FUNCTION__); case CHELSIO_T4: - PDBG("%s T4 device\n", __FUNCTION__); + PDBG("%s T%d device\n", __FUNCTION__, rhp->chip_version); context->ibv_ctx.ops.async_event = c4iw_async_event; context->ibv_ctx.ops.post_send = c4iw_post_send; context->ibv_ctx.ops.post_recv = c4iw_post_receive; @@ -390,29 +390,26 @@ static struct ibv_device *cxgb4_driver_i int abi_version) { char devstr[IBV_SYSFS_PATH_MAX], ibdev[16], value[128], *cp; - char t5nexstr[IBV_SYSFS_PATH_MAX]; + char dev_str[IBV_SYSFS_PATH_MAX]; struct c4iw_dev *dev; unsigned vendor, device, fw_maj, fw_min; int i; - char devnum=0; + char devnum; char ib_param[16]; #ifndef __linux__ if (ibv_read_sysfs_file(uverbs_sys_path, "ibdev", ibdev, sizeof ibdev) < 0) return NULL; - /* - * Extract the non-numeric part of ibdev - * say "t5nex0" -> devname=="t5nex", devnum=0 - */ - if (strstr(ibdev,"t5nex")) { - devnum = atoi(ibdev+strlen("t5nex")); - sprintf(t5nexstr, "/dev/t5nex/%d", devnum); + + if (ibdev[0] == 't' && ibdev[1] >= '4' && ibdev[1] <= '6' && + strstr(&ibdev[2], "nex") && (devnum = atoi(&ibdev[5])) >= 0) { + snprintf(dev_str, sizeof(dev_str), "/dev/t%cnex/%d", ibdev[1], + devnum); } else return NULL; - if (ibv_read_sysfs_file(t5nexstr, "\%pnpinfo", - value, sizeof value) < 0) + if (ibv_read_sysfs_file(dev_str, "\%pnpinfo", value, sizeof value) < 0) return NULL; else { if (strstr(value,"vendor=")) { @@ -449,7 +446,7 @@ found: #ifndef __linux__ - if (ibv_read_sysfs_file(t5nexstr, "firmware_version", + if (ibv_read_sysfs_file(dev_str, "firmware_version", value, sizeof value) < 0) return NULL; #else Modified: projects/clang400-import/contrib/ofed/libcxgb4/src/qp.c ============================================================================== --- projects/clang400-import/contrib/ofed/libcxgb4/src/qp.c Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/contrib/ofed/libcxgb4/src/qp.c Thu Feb 23 19:32:25 2017 (r314178) @@ -393,7 +393,7 @@ int c4iw_post_send(struct ibv_qp *ibqp, idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); } - t4_ring_sq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_sq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.sq.queue[qhp->wq.sq.size].status.host_wq_pidx = \ (qhp->wq.sq.wq_pidx); @@ -457,7 +457,7 @@ int c4iw_post_receive(struct ibv_qp *ibq num_wrs--; } - t4_ring_rq_db(&qhp->wq, idx, dev_is_t5(qhp->rhp), + t4_ring_rq_db(&qhp->wq, idx, dev_is_t4(qhp->rhp), len16, wqe); qhp->wq.rq.queue[qhp->wq.rq.size].status.host_wq_pidx = \ (qhp->wq.rq.wq_pidx); Modified: projects/clang400-import/contrib/ofed/libcxgb4/src/t4.h ============================================================================== --- projects/clang400-import/contrib/ofed/libcxgb4/src/t4.h Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/contrib/ofed/libcxgb4/src/t4.h Thu Feb 23 19:32:25 2017 (r314178) @@ -484,11 +484,11 @@ static void copy_wqe_to_udb(volatile u32 extern int ma_wr; extern int t5_en_wc; -static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_sq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->sq.pidx = %d; len16=%d\n", __func__, wq->sq.pidx, len16); @@ -517,11 +517,11 @@ static inline void t4_ring_sq_db(struct writel(V_QID(wq->sq.qid & wq->qid_mask) | V_PIDX(inc), wq->sq.udb); } -static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t5, u8 len16, +static inline void t4_ring_rq_db(struct t4_wq *wq, u16 inc, u8 t4, u8 len16, union t4_recv_wr *wqe) { wc_wmb(); - if (t5) { + if (!t4) { if (t5_en_wc && inc == 1 && wq->sq.wc_reg_available) { PDBG("%s: WC wq->rq.pidx = %d; len16=%d\n", __func__, wq->rq.pidx, len16); Modified: projects/clang400-import/contrib/ofed/libcxgb4/src/t4_chip_type.h ============================================================================== --- projects/clang400-import/contrib/ofed/libcxgb4/src/t4_chip_type.h Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/contrib/ofed/libcxgb4/src/t4_chip_type.h Thu Feb 23 19:32:25 2017 (r314178) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2016 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -30,6 +30,8 @@ #define CHELSIO_T4_FPGA 0xa #define CHELSIO_T5 0x5 #define CHELSIO_T5_FPGA 0xb +#define CHELSIO_T6 0x6 +#define CHELSIO_T6_FPGA 0xc /* * Translate a PCI Device ID to a base Chelsio Chip Version -- CHELSIO_T4, @@ -43,11 +45,25 @@ * Finally: This will of course need to be expanded as future chips are * developed. */ -#define CHELSIO_PCI_ID_CHIP_VERSION(__DeviceID) \ - (CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4 || \ - CHELSIO_PCI_ID_VER(__DeviceID) == CHELSIO_T4_FPGA \ - ? CHELSIO_T4 \ - : CHELSIO_T5) +static inline unsigned int +CHELSIO_PCI_ID_CHIP_VERSION(unsigned int DeviceID) +{ + switch (CHELSIO_PCI_ID_VER(DeviceID)) { + case CHELSIO_T4: + case CHELSIO_T4_FPGA: + return CHELSIO_T4; + + case CHELSIO_T5: + case CHELSIO_T5_FPGA: + return CHELSIO_T5; + + case CHELSIO_T6: + case CHELSIO_T6_FPGA: + return CHELSIO_T6; + } + + return 0; +} /* * Internally we code the Chelsio T4 Family "Chip Code" as a tuple: @@ -72,9 +88,13 @@ enum chip_type { T4_LAST_REV = T4_A2, T5_A0 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), - T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 0), + T5_A1 = CHELSIO_CHIP_CODE(CHELSIO_T5, 1), T5_FIRST_REV = T5_A0, T5_LAST_REV = T5_A1, + + T6_A0 = CHELSIO_CHIP_CODE(CHELSIO_T6, 0), + T6_FIRST_REV = T6_A0, + T6_LAST_REV = T6_A0, }; static inline int is_t4(enum chip_type chip) @@ -88,6 +108,11 @@ static inline int is_t5(enum chip_type c return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T5); } +static inline int is_t6(enum chip_type chip) +{ + return (CHELSIO_CHIP_VERSION(chip) == CHELSIO_T6); +} + static inline int is_fpga(enum chip_type chip) { return chip & CHELSIO_CHIP_FPGA; Modified: projects/clang400-import/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h ============================================================================== --- projects/clang400-import/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/contrib/ofed/libcxgb4/src/t4_pci_id_tbl.h Thu Feb 23 19:32:25 2017 (r314178) @@ -1,7 +1,7 @@ /* - * This file is part of the Chelsio T4 Ethernet driver. + * This file is part of the Chelsio T4/T5/T6 Ethernet driver. * - * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. + * Copyright (C) 2003-2017 Chelsio Communications. All rights reserved. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or @@ -44,7 +44,6 @@ * -- If defined, indicates that the OS Driver has support for Bypass * -- Adapters. */ -#ifdef CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN /* * Some sanity checks ... @@ -96,10 +95,13 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_ENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_ENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_ENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ #else CH_PCI_ID_TABLE_FENTRY(0xa000), /* PE10K FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb000), /* PF0 T5 PE10K5 FPGA */ CH_PCI_ID_TABLE_FENTRY(0xb001), /* PF0 T5 PE10K FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc006), /* PF0 T6 PE10K6 FPGA */ + CH_PCI_ID_TABLE_FENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -108,6 +110,7 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN #if ((CH_PCI_DEVICE_ID_FUNCTION == 5) || (CH_PCI_DEVICE_ID_FUNCTION == 6)) CH_PCI_ID_TABLE_ENTRY(0xa001), /* PF1 PE10K FPGA FCOE */ CH_PCI_ID_TABLE_ENTRY(0xa002), /* PE10K FPGA iSCSI */ + CH_PCI_ID_TABLE_ENTRY(0xc106), /* PF1 T6 PE10K6 FPGA */ #endif /* @@ -166,10 +169,50 @@ CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN CH_PCI_ID_TABLE_FENTRY(0x5013), /* T580-chr */ CH_PCI_ID_TABLE_FENTRY(0x5014), /* T580-so */ CH_PCI_ID_TABLE_FENTRY(0x5015), /* T502-bt */ + CH_PCI_ID_TABLE_FENTRY(0x5016), /* T580-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5017), /* T520-OCP-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5018), /* T540-BT */ CH_PCI_ID_TABLE_FENTRY(0x5080), /* Custom T540-cr */ CH_PCI_ID_TABLE_FENTRY(0x5081), /* Custom T540-LL-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5082), /* Custom T504-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5083), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5084), /* Custom T580-cr */ + CH_PCI_ID_TABLE_FENTRY(0x5085), /* Custom 3x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5086), /* Custom 2x T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5087), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5088), /* Custom T570-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5089), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5090), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5091), /* Custom T522-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5092), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5093), /* Custom SECA */ + CH_PCI_ID_TABLE_FENTRY(0x5094), /* Custom T540-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5095), /* Custom T540-CR-SO */ + CH_PCI_ID_TABLE_FENTRY(0x5096), /* Custom T580-CR */ + CH_PCI_ID_TABLE_FENTRY(0x5097), /* Custom T520-KR */ + CH_PCI_ID_TABLE_FENTRY(0x5098), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x5099), /* Custom 2x40G QSFP */ + CH_PCI_ID_TABLE_FENTRY(0x509A), /* Custom T520-CR */ + CH_PCI_ID_TABLE_FENTRY(0x509B), /* Custom T540-CR LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509c), /* Custom T520-CR SFP+ LOM */ + CH_PCI_ID_TABLE_FENTRY(0x509d), /* Custom T540-CR SFP+ */ + + /* T6 adapter */ + CH_PCI_ID_TABLE_FENTRY(0x6000), + CH_PCI_ID_TABLE_FENTRY(0x6001), + CH_PCI_ID_TABLE_FENTRY(0x6002), + CH_PCI_ID_TABLE_FENTRY(0x6003), + CH_PCI_ID_TABLE_FENTRY(0x6004), + CH_PCI_ID_TABLE_FENTRY(0x6005), + CH_PCI_ID_TABLE_FENTRY(0x6006), + CH_PCI_ID_TABLE_FENTRY(0x6007), + CH_PCI_ID_TABLE_FENTRY(0x6008), + CH_PCI_ID_TABLE_FENTRY(0x6009), + CH_PCI_ID_TABLE_FENTRY(0x600d), + CH_PCI_ID_TABLE_FENTRY(0x6010), + CH_PCI_ID_TABLE_FENTRY(0x6011), + CH_PCI_ID_TABLE_FENTRY(0x6014), + CH_PCI_ID_TABLE_FENTRY(0x6015), CH_PCI_DEVICE_ID_TABLE_DEFINE_END; -#endif /* CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN */ - #endif /* __T4_PCI_ID_TBL_H__ */ Modified: projects/clang400-import/contrib/ofed/libcxgb4/src/t4_regs.h ============================================================================== --- projects/clang400-import/contrib/ofed/libcxgb4/src/t4_regs.h Thu Feb 23 19:25:29 2017 (r314177) +++ projects/clang400-import/contrib/ofed/libcxgb4/src/t4_regs.h Thu Feb 23 19:32:25 2017 (r314178) @@ -1,4 +1,8 @@ /* This file is automatically generated --- changes will be lost */ +/* Generation Date : Fri Oct 28 19:22:40 IST 2016 */ +/* Directory name: t4_reg.txt, Changeset: */ +/* Directory name: t5_reg.txt, Changeset: 6938:9111c5bdce6e */ +/* Directory name: t6_reg.txt, Changeset: 4252:437fb8972e44 */ #define MYPF_BASE 0x1b000 #define MYPF_REG(reg_addr) (MYPF_BASE + (reg_addr)) @@ -339,9 +343,141 @@ #define EDC_H_ECC_ERR_DATA_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) #define NUM_EDC_H_ECC_ERR_DATA_INSTANCES 16 +#define SGE_DEBUG1_DBP_THREAD(idx) (A_SGE_DEBUG1_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG1_DBP_THREAD_INSTANCES 4 + +#define SGE_DEBUG0_DBP_THREAD(idx) (A_SGE_DEBUG0_DBP_THREAD + (idx) * 4) +#define NUM_SGE_DEBUG0_DBP_THREAD_INSTANCES 5 + +#define SGE_WC_EGRS_BAR2_OFF_PF(idx) (A_SGE_WC_EGRS_BAR2_OFF_PF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_PF_INSTANCES 8 + +#define SGE_WC_EGRS_BAR2_OFF_VF(idx) (A_SGE_WC_EGRS_BAR2_OFF_VF + (idx) * 4) +#define NUM_SGE_WC_EGRS_BAR2_OFF_VF_INSTANCES 8 + +#define PCIE_T6_DMA_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_DMA_INSTANCES 2 + +#define PCIE_T6_CMD_REG(reg_addr, idx) ((reg_addr) + (idx) * 16) +#define NUM_PCIE_T6_CMD_INSTANCES 1 + +#define PCIE_VF_256_INT_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_PCIE_VF_256_INT_INSTANCES 128 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_DA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_DA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_DA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_L(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_L + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_L_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_MAC_SA_H(idx) (A_MPS_CLS_REQUEST_TRACE_MAC_SA_H + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_MAC_SA_H_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_PORT_VLAN(idx) (A_MPS_CLS_REQUEST_TRACE_PORT_VLAN + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_PORT_VLAN_INSTANCES 8 + +#define MPS_CLS_REQUEST_TRACE_ENCAP(idx) (A_MPS_CLS_REQUEST_TRACE_ENCAP + (idx) * 32) +#define NUM_MPS_CLS_REQUEST_TRACE_ENCAP_INSTANCES 8 + +#define MPS_CLS_RESULT_TRACE(idx) (A_MPS_CLS_RESULT_TRACE + (idx) * 4) +#define NUM_MPS_CLS_RESULT_TRACE_INSTANCES 8 + +#define MPS_CLS_DIPIPV4_ID_TABLE(idx) (A_MPS_CLS_DIPIPV4_ID_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_ID_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV4_MASK_TABLE(idx) (A_MPS_CLS_DIPIPV4_MASK_TABLE + (idx) * 8) +#define NUM_MPS_CLS_DIPIPV4_MASK_TABLE_INSTANCES 4 + +#define MPS_CLS_DIPIPV6ID_0_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_1_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_2_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6ID_3_TABLE(idx) (A_MPS_CLS_DIPIPV6ID_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6ID_3_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_0_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_0_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_0_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_1_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_1_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_1_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_2_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_2_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_2_TABLE_INSTANCES 2 + +#define MPS_CLS_DIPIPV6MASK_3_TABLE(idx) (A_MPS_CLS_DIPIPV6MASK_3_TABLE + (idx) * 32) +#define NUM_MPS_CLS_DIPIPV6MASK_3_TABLE_INSTANCES 2 + +#define MPS_RX_HASH_LKP_TABLE(idx) (A_MPS_RX_HASH_LKP_TABLE + (idx) * 4) +#define NUM_MPS_RX_HASH_LKP_TABLE_INSTANCES 4 + +#define LE_DB_DBG_MATCH_DATA_MASK(idx) (A_LE_DB_DBG_MATCH_DATA_MASK + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_MASK_INSTANCES 8 + +#define LE_DB_DBG_MATCH_DATA(idx) (A_LE_DB_DBG_MATCH_DATA + (idx) * 4) +#define NUM_LE_DB_DBG_MATCH_DATA_INSTANCES 8 + +#define LE_DB_DBGI_REQ_DATA_T6(idx) (A_LE_DB_DBGI_REQ_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_DATA_T6_INSTANCES 11 + +#define LE_DB_DBGI_REQ_MASK_T6(idx) (A_LE_DB_DBGI_REQ_MASK + (idx) * 4) +#define NUM_LE_DB_DBGI_REQ_MASK_T6_INSTANCES 11 + +#define LE_DB_DBGI_RSP_DATA_T6(idx) (A_LE_DB_DBGI_RSP_DATA + (idx) * 4) +#define NUM_LE_DB_DBGI_RSP_DATA_T6_INSTANCES 11 + +#define LE_DB_ACTIVE_MASK_IPV6_T6(idx) (A_LE_DB_ACTIVE_MASK_IPV6 + (idx) * 4) +#define NUM_LE_DB_ACTIVE_MASK_IPV6_T6_INSTANCES 8 + +#define LE_HASH_MASK_GEN_IPV4T6(idx) (A_LE_HASH_MASK_GEN_IPV4T5 + (idx) * 4) +#define NUM_LE_HASH_MASK_GEN_IPV4T6_INSTANCES 8 + +#define T6_LE_HASH_MASK_GEN_IPV6T5(idx) (A_T6_LE_HASH_MASK_GEN_IPV6T5 + (idx) * 4) +#define NUM_T6_LE_HASH_MASK_GEN_IPV6T5_INSTANCES 8 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV4_INSTANCES 3 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV4(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV4 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV4_INSTANCES 2 + +#define LE_DB_PSV_FILTER_MASK_TUP_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_TUP_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_TUP_IPV6_INSTANCES 9 + +#define LE_DB_PSV_FILTER_MASK_FLT_IPV6(idx) (A_LE_DB_PSV_FILTER_MASK_FLT_IPV6 + (idx) * 4) +#define NUM_LE_DB_PSV_FILTER_MASK_FLT_IPV6_INSTANCES 2 + +#define LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6(idx) (A_LE_DB_SECOND_GEN_HASH_MASK_IPV4 + (idx) * 4) +#define NUM_LE_DB_SECOND_GEN_HASH_MASK_IPV4_T6_INSTANCES 8 + +#define MC_DDRPHY_DP18_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 512) +#define NUM_MC_DDRPHY_DP18_T6_INSTANCES 9 + +#define MC_CE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_CE_ERR_DATA_T6_INSTANCES 16 + +#define MC_UE_ERR_DATA_T6_REG(reg_addr, idx) ((reg_addr) + (idx) * 4) +#define NUM_MC_UE_ERR_DATA_T6_INSTANCES 16 + +#define CIM_CTL_MAILBOX_VF_STATUS_T6(idx) (A_CIM_CTL_MAILBOX_VF_STATUS + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VF_STATUS_T6_INSTANCES 8 + +#define CIM_CTL_MAILBOX_VFN_CTL_T6(idx) (A_CIM_CTL_MAILBOX_VFN_CTL + (idx) * 4) +#define NUM_CIM_CTL_MAILBOX_VFN_CTL_T6_INSTANCES 256 + #define EDC_STRIDE (EDC_1_BASE_ADDR - EDC_0_BASE_ADDR) #define EDC_REG(reg, idx) (reg + EDC_STRIDE * idx) +#define EDC_T5_STRIDE (EDC_T51_BASE_ADDR - EDC_T50_BASE_ADDR) +#define EDC_T5_REG(reg, idx) (reg + EDC_T5_STRIDE * idx) + /* registers for module SGE */ #define SGE_BASE_ADDR 0x1000 @@ -372,6 +508,10 @@ #define V_PIDX_T5(x) ((x) << S_PIDX_T5) #define G_PIDX_T5(x) (((x) >> S_PIDX_T5) & M_PIDX_T5) +#define S_SYNC_T6 14 +#define V_SYNC_T6(x) ((x) << S_SYNC_T6) +#define F_SYNC_T6 V_SYNC_T6(1U) + #define A_SGE_PF_GTS 0x4 #define S_INGRESSQID 16 @@ -764,6 +904,14 @@ #define V_PERR_PC_CHPI_RSP2(x) ((x) << S_PERR_PC_CHPI_RSP2) #define F_PERR_PC_CHPI_RSP2 V_PERR_PC_CHPI_RSP2(1U) +#define S_PERR_PC_RSP 23 +#define V_PERR_PC_RSP(x) ((x) << S_PERR_PC_RSP) +#define F_PERR_PC_RSP V_PERR_PC_RSP(1U) + +#define S_PERR_PC_REQ 22 +#define V_PERR_PC_REQ(x) ((x) << S_PERR_PC_REQ) +#define F_PERR_PC_REQ V_PERR_PC_REQ(1U) + #define A_SGE_INT_ENABLE1 0x1028 #define A_SGE_PERR_ENABLE1 0x102c #define A_SGE_INT_CAUSE2 0x1030 @@ -908,6 +1056,26 @@ #define V_PERR_PC_DBP2(x) ((x) << S_PERR_PC_DBP2) #define F_PERR_PC_DBP2 V_PERR_PC_DBP2(1U) +#define S_DEQ_LL_PERR 21 +#define V_DEQ_LL_PERR(x) ((x) << S_DEQ_LL_PERR) +#define F_DEQ_LL_PERR V_DEQ_LL_PERR(1U) + +#define S_ENQ_PERR 20 +#define V_ENQ_PERR(x) ((x) << S_ENQ_PERR) +#define F_ENQ_PERR V_ENQ_PERR(1U) + +#define S_DEQ_OUT_PERR 19 +#define V_DEQ_OUT_PERR(x) ((x) << S_DEQ_OUT_PERR) +#define F_DEQ_OUT_PERR V_DEQ_OUT_PERR(1U) + +#define S_BUF_PERR 18 +#define V_BUF_PERR(x) ((x) << S_BUF_PERR) +#define F_BUF_PERR V_BUF_PERR(1U) + +#define S_PERR_DB_FIFO 3 +#define V_PERR_DB_FIFO(x) ((x) << S_PERR_DB_FIFO) +#define F_PERR_DB_FIFO V_PERR_DB_FIFO(1U) + #define A_SGE_INT_ENABLE2 0x1034 #define A_SGE_PERR_ENABLE2 0x1038 #define A_SGE_INT_CAUSE3 0x103c @@ -1040,6 +1208,14 @@ #define V_ERR_INV_CTXT0(x) ((x) << S_ERR_INV_CTXT0) #define F_ERR_INV_CTXT0 V_ERR_INV_CTXT0(1U) +#define S_DBP_TBUF_FULL 8 +#define V_DBP_TBUF_FULL(x) ((x) << S_DBP_TBUF_FULL) +#define F_DBP_TBUF_FULL V_DBP_TBUF_FULL(1U) + +#define S_FATAL_WRE_LEN 7 +#define V_FATAL_WRE_LEN(x) ((x) << S_FATAL_WRE_LEN) +#define F_FATAL_WRE_LEN V_FATAL_WRE_LEN(1U) + #define A_SGE_INT_ENABLE3 0x1040 #define A_SGE_FL_BUFFER_SIZE0 0x1044 @@ -1048,21 +1224,116 @@ #define V_SIZE(x) ((x) << S_SIZE) #define G_SIZE(x) (((x) >> S_SIZE) & M_SIZE) +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE1 0x1048 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE2 0x104c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE3 0x1050 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE4 0x1054 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE5 0x1058 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE6 0x105c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE7 0x1060 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE8 0x1064 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE9 0x1068 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE10 0x106c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE11 0x1070 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE12 0x1074 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE13 0x1078 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE14 0x107c + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_FL_BUFFER_SIZE15 0x1080 + +#define S_T6_SIZE 4 +#define M_T6_SIZE 0xfffffU +#define V_T6_SIZE(x) ((x) << S_T6_SIZE) +#define G_T6_SIZE(x) (((x) >> S_T6_SIZE) & M_T6_SIZE) + #define A_SGE_DBQ_CTXT_BADDR 0x1084 #define S_BASEADDR 3 @@ -1117,6 +1388,15 @@ #define V_CREDITCNTPACKING(x) ((x) << S_CREDITCNTPACKING) #define G_CREDITCNTPACKING(x) (((x) >> S_CREDITCNTPACKING) & M_CREDITCNTPACKING) +#define S_NULLPTR 20 +#define M_NULLPTR 0xfU +#define V_NULLPTR(x) ((x) << S_NULLPTR) +#define G_NULLPTR(x) (((x) >> S_NULLPTR) & M_NULLPTR) + +#define S_NULLPTREN 19 +#define V_NULLPTREN(x) ((x) << S_NULLPTREN) +#define F_NULLPTREN V_NULLPTREN(1U) + #define A_SGE_CONM_CTRL 0x1094 #define S_EGRTHRESHOLD 8 @@ -1142,6 +1422,16 @@ #define V_EGRTHRESHOLDPACKING(x) ((x) << S_EGRTHRESHOLDPACKING) #define G_EGRTHRESHOLDPACKING(x) (((x) >> S_EGRTHRESHOLDPACKING) & M_EGRTHRESHOLDPACKING) +#define S_T6_EGRTHRESHOLDPACKING 16 +#define M_T6_EGRTHRESHOLDPACKING 0xffU +#define V_T6_EGRTHRESHOLDPACKING(x) ((x) << S_T6_EGRTHRESHOLDPACKING) +#define G_T6_EGRTHRESHOLDPACKING(x) (((x) >> S_T6_EGRTHRESHOLDPACKING) & M_T6_EGRTHRESHOLDPACKING) + +#define S_T6_EGRTHRESHOLD 8 +#define M_T6_EGRTHRESHOLD 0xffU +#define V_T6_EGRTHRESHOLD(x) ((x) << S_T6_EGRTHRESHOLD) +#define G_T6_EGRTHRESHOLD(x) (((x) >> S_T6_EGRTHRESHOLD) & M_T6_EGRTHRESHOLD) + #define A_SGE_TIMESTAMP_LO 0x1098 #define A_SGE_TIMESTAMP_HI 0x109c @@ -1217,6 +1507,21 @@ #define V_LP_COUNT_T5(x) ((x) << S_LP_COUNT_T5) #define G_LP_COUNT_T5(x) (((x) >> S_LP_COUNT_T5) & M_LP_COUNT_T5) +#define S_VFIFO_CNT 15 +#define M_VFIFO_CNT 0x1ffffU +#define V_VFIFO_CNT(x) ((x) << S_VFIFO_CNT) +#define G_VFIFO_CNT(x) (((x) >> S_VFIFO_CNT) & M_VFIFO_CNT) + +#define S_COAL_CTL_FIFO_CNT 8 +#define M_COAL_CTL_FIFO_CNT 0x3fU +#define V_COAL_CTL_FIFO_CNT(x) ((x) << S_COAL_CTL_FIFO_CNT) +#define G_COAL_CTL_FIFO_CNT(x) (((x) >> S_COAL_CTL_FIFO_CNT) & M_COAL_CTL_FIFO_CNT) + +#define S_MERGE_FIFO_CNT 0 +#define M_MERGE_FIFO_CNT 0x3fU +#define V_MERGE_FIFO_CNT(x) ((x) << S_MERGE_FIFO_CNT) +#define G_MERGE_FIFO_CNT(x) (((x) >> S_MERGE_FIFO_CNT) & M_MERGE_FIFO_CNT) + #define A_SGE_DOORBELL_CONTROL 0x10a8 #define S_HINTDEPTHCTL 27 @@ -1286,6 +1591,32 @@ #define V_DROPPED_DB(x) ((x) << S_DROPPED_DB) #define F_DROPPED_DB V_DROPPED_DB(1U) +#define S_T6_DROP_TIMEOUT 7 +#define M_T6_DROP_TIMEOUT 0x3fU +#define V_T6_DROP_TIMEOUT(x) ((x) << S_T6_DROP_TIMEOUT) +#define G_T6_DROP_TIMEOUT(x) (((x) >> S_T6_DROP_TIMEOUT) & M_T6_DROP_TIMEOUT) + +#define S_INVONDBSYNC 6 +#define V_INVONDBSYNC(x) ((x) << S_INVONDBSYNC) +#define F_INVONDBSYNC V_INVONDBSYNC(1U) + +#define S_INVONGTSSYNC 5 +#define V_INVONGTSSYNC(x) ((x) << S_INVONGTSSYNC) +#define F_INVONGTSSYNC V_INVONGTSSYNC(1U) + +#define S_DB_DBG_EN 4 +#define V_DB_DBG_EN(x) ((x) << S_DB_DBG_EN) +#define F_DB_DBG_EN V_DB_DBG_EN(1U) + +#define S_GTS_DBG_TIMER_REG 1 +#define M_GTS_DBG_TIMER_REG 0x7U +#define V_GTS_DBG_TIMER_REG(x) ((x) << S_GTS_DBG_TIMER_REG) +#define G_GTS_DBG_TIMER_REG(x) (((x) >> S_GTS_DBG_TIMER_REG) & M_GTS_DBG_TIMER_REG) + +#define S_GTS_DBG_EN 0 +#define V_GTS_DBG_EN(x) ((x) << S_GTS_DBG_EN) +#define F_GTS_DBG_EN V_GTS_DBG_EN(1U) + #define A_SGE_DROPPED_DOORBELL 0x10ac #define A_SGE_DOORBELL_THROTTLE_CONTROL 0x10b0 @@ -1331,6 +1662,11 @@ #define V_LL_READ_WAIT_DISABLE(x) ((x) << S_LL_READ_WAIT_DISABLE) #define F_LL_READ_WAIT_DISABLE V_LL_READ_WAIT_DISABLE(1U) +#define S_TSCALE 28 +#define M_TSCALE 0xfU +#define V_TSCALE(x) ((x) << S_TSCALE) +#define G_TSCALE(x) (((x) >> S_TSCALE) & M_TSCALE) + #define A_SGE_TIMER_VALUE_0_AND_1 0x10b8 #define S_TIMERVALUE0 16 @@ -1397,6 +1733,39 @@ #define V_MAXRSPCNT1(x) ((x) << S_MAXRSPCNT1) #define G_MAXRSPCNT1(x) (((x) >> S_MAXRSPCNT1) & M_MAXRSPCNT1) +#define A_SGE_GK_CONTROL 0x10c4 + +#define S_EN_FLM_FIFTH 29 +#define V_EN_FLM_FIFTH(x) ((x) << S_EN_FLM_FIFTH) +#define F_EN_FLM_FIFTH V_EN_FLM_FIFTH(1U) + +#define S_FL_PROG_THRESH 20 +#define M_FL_PROG_THRESH 0x1ffU +#define V_FL_PROG_THRESH(x) ((x) << S_FL_PROG_THRESH) +#define G_FL_PROG_THRESH(x) (((x) >> S_FL_PROG_THRESH) & M_FL_PROG_THRESH) + +#define S_COAL_ALL_THREAD 19 +#define V_COAL_ALL_THREAD(x) ((x) << S_COAL_ALL_THREAD) +#define F_COAL_ALL_THREAD V_COAL_ALL_THREAD(1U) + +#define S_EN_PSHB 18 +#define V_EN_PSHB(x) ((x) << S_EN_PSHB) +#define F_EN_PSHB V_EN_PSHB(1U) + +#define S_EN_DB_FIFTH 17 +#define V_EN_DB_FIFTH(x) ((x) << S_EN_DB_FIFTH) +#define F_EN_DB_FIFTH V_EN_DB_FIFTH(1U) + +#define S_DB_PROG_THRESH 8 +#define M_DB_PROG_THRESH 0x1ffU +#define V_DB_PROG_THRESH(x) ((x) << S_DB_PROG_THRESH) +#define G_DB_PROG_THRESH(x) (((x) >> S_DB_PROG_THRESH) & M_DB_PROG_THRESH) + +#define S_100NS_TIMER 0 +#define M_100NS_TIMER 0xffU +#define V_100NS_TIMER(x) ((x) << S_100NS_TIMER) +#define G_100NS_TIMER(x) (((x) >> S_100NS_TIMER) & M_100NS_TIMER) + #define A_SGE_PD_RSP_CREDIT23 0x10c8 #define S_RSPCREDITEN2 31 @@ -1427,6 +1796,23 @@ #define V_MAXRSPCNT3(x) ((x) << S_MAXRSPCNT3) #define G_MAXRSPCNT3(x) (((x) >> S_MAXRSPCNT3) & M_MAXRSPCNT3) +#define A_SGE_GK_CONTROL2 0x10c8 + +#define S_DBQ_TIMER_TICK 16 +#define M_DBQ_TIMER_TICK 0xffffU +#define V_DBQ_TIMER_TICK(x) ((x) << S_DBQ_TIMER_TICK) +#define G_DBQ_TIMER_TICK(x) (((x) >> S_DBQ_TIMER_TICK) & M_DBQ_TIMER_TICK) + +#define S_FL_MERGE_CNT_THRESH 8 +#define M_FL_MERGE_CNT_THRESH 0xfU +#define V_FL_MERGE_CNT_THRESH(x) ((x) << S_FL_MERGE_CNT_THRESH) +#define G_FL_MERGE_CNT_THRESH(x) (((x) >> S_FL_MERGE_CNT_THRESH) & M_FL_MERGE_CNT_THRESH) + +#define S_MERGE_CNT_THRESH 0 +#define M_MERGE_CNT_THRESH 0x3fU +#define V_MERGE_CNT_THRESH(x) ((x) << S_MERGE_CNT_THRESH) +#define G_MERGE_CNT_THRESH(x) (((x) >> S_MERGE_CNT_THRESH) & M_MERGE_CNT_THRESH) + #define A_SGE_DEBUG_INDEX 0x10cc #define A_SGE_DEBUG_DATA_HIGH 0x10d0 #define A_SGE_DEBUG_DATA_LOW 0x10d4 @@ -1553,6 +1939,30 @@ #define V_ERR_RX_CPL_PACKET_SIZE0(x) ((x) << S_ERR_RX_CPL_PACKET_SIZE0) #define F_ERR_RX_CPL_PACKET_SIZE0 V_ERR_RX_CPL_PACKET_SIZE0(1U) +#define S_ERR_ISHIFT_UR1 31 +#define V_ERR_ISHIFT_UR1(x) ((x) << S_ERR_ISHIFT_UR1) +#define F_ERR_ISHIFT_UR1 V_ERR_ISHIFT_UR1(1U) + +#define S_ERR_ISHIFT_UR0 30 +#define V_ERR_ISHIFT_UR0(x) ((x) << S_ERR_ISHIFT_UR0) +#define F_ERR_ISHIFT_UR0 V_ERR_ISHIFT_UR0(1U) + +#define S_ERR_TH3_MAX_FETCH 14 +#define V_ERR_TH3_MAX_FETCH(x) ((x) << S_ERR_TH3_MAX_FETCH) +#define F_ERR_TH3_MAX_FETCH V_ERR_TH3_MAX_FETCH(1U) + +#define S_ERR_TH2_MAX_FETCH 13 +#define V_ERR_TH2_MAX_FETCH(x) ((x) << S_ERR_TH2_MAX_FETCH) +#define F_ERR_TH2_MAX_FETCH V_ERR_TH2_MAX_FETCH(1U) + +#define S_ERR_TH1_MAX_FETCH 12 +#define V_ERR_TH1_MAX_FETCH(x) ((x) << S_ERR_TH1_MAX_FETCH) +#define F_ERR_TH1_MAX_FETCH V_ERR_TH1_MAX_FETCH(1U) + +#define S_ERR_TH0_MAX_FETCH 11 +#define V_ERR_TH0_MAX_FETCH(x) ((x) << S_ERR_TH0_MAX_FETCH) +#define F_ERR_TH0_MAX_FETCH V_ERR_TH0_MAX_FETCH(1U) + #define A_SGE_INT_ENABLE4 0x10e0 #define A_SGE_STAT_TOTAL 0x10e4 #define A_SGE_STAT_MATCH 0x10e8 @@ -1587,6 +1997,11 @@ #define V_STATSOURCE_T5(x) ((x) << S_STATSOURCE_T5) #define G_STATSOURCE_T5(x) (((x) >> S_STATSOURCE_T5) & M_STATSOURCE_T5) +#define S_T6_STATMODE 0 +#define M_T6_STATMODE 0xfU +#define V_T6_STATMODE(x) ((x) << S_T6_STATMODE) +#define G_T6_STATMODE(x) (((x) >> S_T6_STATMODE) & M_T6_STATMODE) + #define A_SGE_HINT_CFG 0x10f0 #define S_HINTSALLOWEDNOHDR 6 @@ -1660,6 +2075,7 @@ #define V_MINTAG0(x) ((x) << S_MINTAG0) #define G_MINTAG0(x) (((x) >> S_MINTAG0) & M_MINTAG0) +#define A_SGE_IDMA0_DROP_CNT 0x1104 #define A_SGE_SHARED_TAG_POOL_CFG 0x1108 #define S_TAGPOOLTOTAL 0 @@ -1667,6 +2083,7 @@ #define V_TAGPOOLTOTAL(x) ((x) << S_TAGPOOLTOTAL) #define G_TAGPOOLTOTAL(x) (((x) >> S_TAGPOOLTOTAL) & M_TAGPOOLTOTAL) +#define A_SGE_IDMA1_DROP_CNT 0x1108 #define A_SGE_INT_CAUSE5 0x110c #define S_ERR_T_RXCRC 31 @@ -1963,6 +2380,90 @@ #define V_EDMA0_SLEEP_REQ(x) ((x) << S_EDMA0_SLEEP_REQ) #define F_EDMA0_SLEEP_REQ V_EDMA0_SLEEP_REQ(1U) +#define A_SGE_INT_CAUSE6 0x1128 + +#define S_ERR_DB_SYNC 21 +#define V_ERR_DB_SYNC(x) ((x) << S_ERR_DB_SYNC) +#define F_ERR_DB_SYNC V_ERR_DB_SYNC(1U) + +#define S_ERR_GTS_SYNC 20 +#define V_ERR_GTS_SYNC(x) ((x) << S_ERR_GTS_SYNC) +#define F_ERR_GTS_SYNC V_ERR_GTS_SYNC(1U) + +#define S_FATAL_LARGE_COAL 19 +#define V_FATAL_LARGE_COAL(x) ((x) << S_FATAL_LARGE_COAL) +#define F_FATAL_LARGE_COAL V_FATAL_LARGE_COAL(1U) + +#define S_PL_BAR2_FRM_ERR 18 +#define V_PL_BAR2_FRM_ERR(x) ((x) << S_PL_BAR2_FRM_ERR) +#define F_PL_BAR2_FRM_ERR V_PL_BAR2_FRM_ERR(1U) + +#define S_SILENT_DROP_TX_COAL 17 +#define V_SILENT_DROP_TX_COAL(x) ((x) << S_SILENT_DROP_TX_COAL) +#define F_SILENT_DROP_TX_COAL V_SILENT_DROP_TX_COAL(1U) + +#define S_ERR_INV_CTXT4 16 +#define V_ERR_INV_CTXT4(x) ((x) << S_ERR_INV_CTXT4) +#define F_ERR_INV_CTXT4 V_ERR_INV_CTXT4(1U) + +#define S_ERR_BAD_DB_PIDX4 15 +#define V_ERR_BAD_DB_PIDX4(x) ((x) << S_ERR_BAD_DB_PIDX4) +#define F_ERR_BAD_DB_PIDX4 V_ERR_BAD_DB_PIDX4(1U) + +#define S_ERR_BAD_UPFL_INC_CREDIT4 14 +#define V_ERR_BAD_UPFL_INC_CREDIT4(x) ((x) << S_ERR_BAD_UPFL_INC_CREDIT4) +#define F_ERR_BAD_UPFL_INC_CREDIT4 V_ERR_BAD_UPFL_INC_CREDIT4(1U) + +#define S_FATAL_TAG_MISMATCH 13 +#define V_FATAL_TAG_MISMATCH(x) ((x) << S_FATAL_TAG_MISMATCH) +#define F_FATAL_TAG_MISMATCH V_FATAL_TAG_MISMATCH(1U) + +#define S_FATAL_ENQ_CTL_RDY 12 +#define V_FATAL_ENQ_CTL_RDY(x) ((x) << S_FATAL_ENQ_CTL_RDY) +#define F_FATAL_ENQ_CTL_RDY V_FATAL_ENQ_CTL_RDY(1U) + +#define S_ERR_PC_RSP_LEN3 11 +#define V_ERR_PC_RSP_LEN3(x) ((x) << S_ERR_PC_RSP_LEN3) +#define F_ERR_PC_RSP_LEN3 V_ERR_PC_RSP_LEN3(1U) + +#define S_ERR_PC_RSP_LEN2 10 +#define V_ERR_PC_RSP_LEN2(x) ((x) << S_ERR_PC_RSP_LEN2) +#define F_ERR_PC_RSP_LEN2 V_ERR_PC_RSP_LEN2(1U) + +#define S_ERR_PC_RSP_LEN1 9 +#define V_ERR_PC_RSP_LEN1(x) ((x) << S_ERR_PC_RSP_LEN1) +#define F_ERR_PC_RSP_LEN1 V_ERR_PC_RSP_LEN1(1U) + +#define S_ERR_PC_RSP_LEN0 8 +#define V_ERR_PC_RSP_LEN0(x) ((x) << S_ERR_PC_RSP_LEN0) +#define F_ERR_PC_RSP_LEN0 V_ERR_PC_RSP_LEN0(1U) + +#define S_FATAL_ENQ2LL_VLD 7 +#define V_FATAL_ENQ2LL_VLD(x) ((x) << S_FATAL_ENQ2LL_VLD) +#define F_FATAL_ENQ2LL_VLD V_FATAL_ENQ2LL_VLD(1U) + +#define S_FATAL_LL_EMPTY 6 +#define V_FATAL_LL_EMPTY(x) ((x) << S_FATAL_LL_EMPTY) +#define F_FATAL_LL_EMPTY V_FATAL_LL_EMPTY(1U) + +#define S_FATAL_OFF_WDENQ 5 +#define V_FATAL_OFF_WDENQ(x) ((x) << S_FATAL_OFF_WDENQ) +#define F_FATAL_OFF_WDENQ V_FATAL_OFF_WDENQ(1U) + +#define S_FATAL_DEQ_DRDY 3 +#define M_FATAL_DEQ_DRDY 0x3U +#define V_FATAL_DEQ_DRDY(x) ((x) << S_FATAL_DEQ_DRDY) +#define G_FATAL_DEQ_DRDY(x) (((x) >> S_FATAL_DEQ_DRDY) & M_FATAL_DEQ_DRDY) + +#define S_FATAL_OUTP_DRDY 1 +#define M_FATAL_OUTP_DRDY 0x3U +#define V_FATAL_OUTP_DRDY(x) ((x) << S_FATAL_OUTP_DRDY) +#define G_FATAL_OUTP_DRDY(x) (((x) >> S_FATAL_OUTP_DRDY) & M_FATAL_OUTP_DRDY) + +#define S_FATAL_DEQ 0 +#define V_FATAL_DEQ(x) ((x) << S_FATAL_DEQ) +#define F_FATAL_DEQ V_FATAL_DEQ(1U) + #define A_SGE_DOORBELL_THROTTLE_THRESHOLD 0x112c #define S_THROTTLE_THRESHOLD_FL 16 @@ -1980,6 +2481,7 @@ #define V_THROTTLE_THRESHOLD_LP(x) ((x) << S_THROTTLE_THRESHOLD_LP) #define G_THROTTLE_THRESHOLD_LP(x) (((x) >> S_THROTTLE_THRESHOLD_LP) & M_THROTTLE_THRESHOLD_LP) +#define A_SGE_INT_ENABLE6 0x112c #define A_SGE_DBP_FETCH_THRESHOLD 0x1130 #define S_DBP_FETCH_THRESHOLD_FL 21 @@ -2037,6 +2539,11 @@ #define V_DBVFIFO_SIZE(x) ((x) << S_DBVFIFO_SIZE) #define G_DBVFIFO_SIZE(x) (((x) >> S_DBVFIFO_SIZE) & M_DBVFIFO_SIZE) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Feb 25 15:00:59 2017 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 CB1BBCEC359 for ; Sat, 25 Feb 2017 15:00: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 mx1.freebsd.org (Postfix) with ESMTPS id 98937642; Sat, 25 Feb 2017 15:00: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 v1PF0wx5094156; Sat, 25 Feb 2017 15:00:58 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PF0via094145; Sat, 25 Feb 2017 15:00:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251500.v1PF0via094145@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 15:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r314269 - in projects/clang400-import: contrib/llvm/include/llvm/Transforms/Vectorize contrib/llvm/lib/Target/AMDGPU contrib/llvm/lib/Transforms/Scalar contrib/llvm/lib/Transforms/Vecto... X-SVN-Group: projects 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.23 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, 25 Feb 2017 15:00:59 -0000 Author: dim Date: Sat Feb 25 15:00:57 2017 New Revision: 314269 URL: https://svnweb.freebsd.org/changeset/base/314269 Log: Merge llvm, clang, compiler-rt, libc++, lld and lldb release_40 branch r296202, and update build glue. Modified: projects/clang400-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/VOP1Instructions.td projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp projects/clang400-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp projects/clang400-import/lib/clang/include/clang/Basic/Version.inc projects/clang400-import/lib/clang/include/lld/Config/Version.inc Directory Properties: projects/clang400-import/contrib/compiler-rt/ (props changed) projects/clang400-import/contrib/libc++/ (props changed) projects/clang400-import/contrib/llvm/ (props changed) projects/clang400-import/contrib/llvm/tools/clang/ (props changed) projects/clang400-import/contrib/llvm/tools/lld/ (props changed) projects/clang400-import/contrib/llvm/tools/lldb/ (props changed) Modified: projects/clang400-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h ============================================================================== --- projects/clang400-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h Sat Feb 25 15:00:57 2017 (r314269) @@ -92,12 +92,6 @@ private: /// collected in GEPs. bool vectorizeGEPIndices(BasicBlock *BB, slpvectorizer::BoUpSLP &R); - /// Try to find horizontal reduction or otherwise vectorize a chain of binary - /// operators. - bool vectorizeRootInstruction(PHINode *P, Value *V, BasicBlock *BB, - slpvectorizer::BoUpSLP &R, - TargetTransformInfo *TTI); - /// \brief Scan the basic block and look for patterns that are likely to start /// a vectorization chain. bool vectorizeChainsInBlock(BasicBlock *BB, slpvectorizer::BoUpSLP &R); Modified: projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td Sat Feb 25 15:00:57 2017 (r314269) @@ -997,6 +997,11 @@ def : Pat < >; def : Pat < + (i1 (trunc i16:$a)), + (V_CMP_EQ_U32_e64 (S_AND_B32 (i32 1), $a), (i32 1)) +>; + +def : Pat < (i1 (trunc i64:$a)), (V_CMP_EQ_U32_e64 (S_AND_B32 (i32 1), (i32 (EXTRACT_SUBREG $a, sub0))), (i32 1)) Modified: projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/VOP1Instructions.td ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/VOP1Instructions.td Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/lib/Target/AMDGPU/VOP1Instructions.td Sat Feb 25 15:00:57 2017 (r314269) @@ -607,12 +607,6 @@ def : Pat< (COPY $src) >; -def : Pat< - (i1 (trunc i16:$src)), - (COPY $src) ->; - - def : Pat < (i16 (trunc i64:$src)), (EXTRACT_SUBREG $src, sub0) Modified: projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp Sat Feb 25 15:00:57 2017 (r314269) @@ -41,6 +41,8 @@ STATISTIC(NumSDivs, "Number of sdiv STATISTIC(NumAShrs, "Number of ashr converted to lshr"); STATISTIC(NumSRems, "Number of srem converted to urem"); +static cl::opt DontProcessAdds("cvp-dont-process-adds", cl::init(true)); + namespace { class CorrelatedValuePropagation : public FunctionPass { public: @@ -405,6 +407,9 @@ static bool processAShr(BinaryOperator * static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) { typedef OverflowingBinaryOperator OBO; + if (DontProcessAdds) + return false; + if (AddOp->getType()->isVectorTy() || hasLocalDefs(AddOp)) return false; Modified: projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp Sat Feb 25 15:00:57 2017 (r314269) @@ -1521,8 +1521,8 @@ Value *ReassociatePass::OptimizeAdd(Inst if (ConstantInt *CI = dyn_cast(Factor)) { if (CI->isNegative() && !CI->isMinValue(true)) { Factor = ConstantInt::get(CI->getContext(), -CI->getValue()); - assert(!Duplicates.count(Factor) && - "Shouldn't have two constant factors, missed a canonicalize"); + if (!Duplicates.insert(Factor).second) + continue; unsigned Occ = ++FactorOccurrences[Factor]; if (Occ > MaxOcc) { MaxOcc = Occ; @@ -1534,8 +1534,8 @@ Value *ReassociatePass::OptimizeAdd(Inst APFloat F(CF->getValueAPF()); F.changeSign(); Factor = ConstantFP::get(CF->getContext(), F); - assert(!Duplicates.count(Factor) && - "Shouldn't have two constant factors, missed a canonicalize"); + if (!Duplicates.insert(Factor).second) + continue; unsigned Occ = ++FactorOccurrences[Factor]; if (Occ > MaxOcc) { MaxOcc = Occ; Modified: projects/clang400-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp Sat Feb 25 15:00:57 2017 (r314269) @@ -4026,40 +4026,36 @@ bool SLPVectorizerPass::tryToVectorize(B if (!V) return false; - Value *P = V->getParent(); - - // Vectorize in current basic block only. - auto *Op0 = dyn_cast(V->getOperand(0)); - auto *Op1 = dyn_cast(V->getOperand(1)); - if (!Op0 || !Op1 || Op0->getParent() != P || Op1->getParent() != P) - return false; - // Try to vectorize V. - if (tryToVectorizePair(Op0, Op1, R)) + if (tryToVectorizePair(V->getOperand(0), V->getOperand(1), R)) return true; - auto *A = dyn_cast(Op0); - auto *B = dyn_cast(Op1); + BinaryOperator *A = dyn_cast(V->getOperand(0)); + BinaryOperator *B = dyn_cast(V->getOperand(1)); // Try to skip B. if (B && B->hasOneUse()) { - auto *B0 = dyn_cast(B->getOperand(0)); - auto *B1 = dyn_cast(B->getOperand(1)); - if (B0 && B0->getParent() == P && tryToVectorizePair(A, B0, R)) + BinaryOperator *B0 = dyn_cast(B->getOperand(0)); + BinaryOperator *B1 = dyn_cast(B->getOperand(1)); + if (tryToVectorizePair(A, B0, R)) { return true; - if (B1 && B1->getParent() == P && tryToVectorizePair(A, B1, R)) + } + if (tryToVectorizePair(A, B1, R)) { return true; + } } // Try to skip A. if (A && A->hasOneUse()) { - auto *A0 = dyn_cast(A->getOperand(0)); - auto *A1 = dyn_cast(A->getOperand(1)); - if (A0 && A0->getParent() == P && tryToVectorizePair(A0, B, R)) + BinaryOperator *A0 = dyn_cast(A->getOperand(0)); + BinaryOperator *A1 = dyn_cast(A->getOperand(1)); + if (tryToVectorizePair(A0, B, R)) { return true; - if (A1 && A1->getParent() == P && tryToVectorizePair(A1, B, R)) + } + if (tryToVectorizePair(A1, B, R)) { return true; + } } - return false; + return 0; } /// \brief Generate a shuffle mask to be used in a reduction tree. @@ -4511,143 +4507,29 @@ static Value *getReductionValue(const Do return nullptr; } -namespace { -/// Tracks instructons and its children. -class WeakVHWithLevel final : public CallbackVH { - /// Operand index of the instruction currently beeing analized. - unsigned Level = 0; - /// Is this the instruction that should be vectorized, or are we now - /// processing children (i.e. operands of this instruction) for potential - /// vectorization? - bool IsInitial = true; - -public: - explicit WeakVHWithLevel() = default; - WeakVHWithLevel(Value *V) : CallbackVH(V){}; - /// Restart children analysis each time it is repaced by the new instruction. - void allUsesReplacedWith(Value *New) override { - setValPtr(New); - Level = 0; - IsInitial = true; - } - /// Check if the instruction was not deleted during vectorization. - bool isValid() const { return !getValPtr(); } - /// Is the istruction itself must be vectorized? - bool isInitial() const { return IsInitial; } - /// Try to vectorize children. - void clearInitial() { IsInitial = false; } - /// Are all children processed already? - bool isFinal() const { - assert(getValPtr() && - (isa(getValPtr()) && - cast(getValPtr())->getNumOperands() >= Level)); - return getValPtr() && - cast(getValPtr())->getNumOperands() == Level; - } - /// Get next child operation. - Value *nextOperand() { - assert(getValPtr() && isa(getValPtr()) && - cast(getValPtr())->getNumOperands() > Level); - return cast(getValPtr())->getOperand(Level++); - } - virtual ~WeakVHWithLevel() = default; -}; -} // namespace - /// \brief Attempt to reduce a horizontal reduction. /// If it is legal to match a horizontal reduction feeding -/// the phi node P with reduction operators Root in a basic block BB, then check -/// if it can be done. +/// the phi node P with reduction operators BI, then check if it +/// can be done. /// \returns true if a horizontal reduction was matched and reduced. /// \returns false if a horizontal reduction was not matched. -static bool canBeVectorized( - PHINode *P, Instruction *Root, BasicBlock *BB, BoUpSLP &R, - TargetTransformInfo *TTI, - const function_ref Vectorize) { +static bool canMatchHorizontalReduction(PHINode *P, BinaryOperator *BI, + BoUpSLP &R, TargetTransformInfo *TTI, + unsigned MinRegSize) { if (!ShouldVectorizeHor) return false; - if (!Root) + HorizontalReduction HorRdx(MinRegSize); + if (!HorRdx.matchAssociativeReduction(P, BI)) return false; - if (Root->getParent() != BB) - return false; - SmallVector Stack(1, Root); - SmallSet VisitedInstrs; - bool Res = false; - while (!Stack.empty()) { - Value *V = Stack.back(); - if (!V) { - Stack.pop_back(); - continue; - } - auto *Inst = dyn_cast(V); - if (!Inst || isa(Inst)) { - Stack.pop_back(); - continue; - } - if (Stack.back().isInitial()) { - Stack.back().clearInitial(); - if (auto *BI = dyn_cast(Inst)) { - HorizontalReduction HorRdx(R.getMinVecRegSize()); - if (HorRdx.matchAssociativeReduction(P, BI)) { - // If there is a sufficient number of reduction values, reduce - // to a nearby power-of-2. Can safely generate oversized - // vectors and rely on the backend to split them to legal sizes. - HorRdx.ReduxWidth = - std::max((uint64_t)4, PowerOf2Floor(HorRdx.numReductionValues())); - - if (HorRdx.tryToReduce(R, TTI)) { - Res = true; - P = nullptr; - continue; - } - } - if (P) { - Inst = dyn_cast(BI->getOperand(0)); - if (Inst == P) - Inst = dyn_cast(BI->getOperand(1)); - if (!Inst) { - P = nullptr; - continue; - } - } - } - P = nullptr; - if (Vectorize(dyn_cast(Inst), R)) { - Res = true; - continue; - } - } - if (Stack.back().isFinal()) { - Stack.pop_back(); - continue; - } + // If there is a sufficient number of reduction values, reduce + // to a nearby power-of-2. Can safely generate oversized + // vectors and rely on the backend to split them to legal sizes. + HorRdx.ReduxWidth = + std::max((uint64_t)4, PowerOf2Floor(HorRdx.numReductionValues())); - if (auto *NextV = dyn_cast(Stack.back().nextOperand())) - if (NextV->getParent() == BB && VisitedInstrs.insert(NextV).second && - Stack.size() < RecursionMaxDepth) - Stack.push_back(NextV); - } - return Res; -} - -bool SLPVectorizerPass::vectorizeRootInstruction(PHINode *P, Value *V, - BasicBlock *BB, BoUpSLP &R, - TargetTransformInfo *TTI) { - if (!V) - return false; - auto *I = dyn_cast(V); - if (!I) - return false; - - if (!isa(I)) - P = nullptr; - // Try to match and vectorize a horizontal reduction. - return canBeVectorized(P, I, BB, R, TTI, - [this](BinaryOperator *BI, BoUpSLP &R) -> bool { - return tryToVectorize(BI, R); - }); + return HorRdx.tryToReduce(R, TTI); } bool SLPVectorizerPass::vectorizeChainsInBlock(BasicBlock *BB, BoUpSLP &R) { @@ -4717,42 +4599,67 @@ bool SLPVectorizerPass::vectorizeChainsI if (P->getNumIncomingValues() != 2) return Changed; + Value *Rdx = getReductionValue(DT, P, BB, LI); + + // Check if this is a Binary Operator. + BinaryOperator *BI = dyn_cast_or_null(Rdx); + if (!BI) + continue; + // Try to match and vectorize a horizontal reduction. - if (vectorizeRootInstruction(P, getReductionValue(DT, P, BB, LI), BB, R, - TTI)) { + if (canMatchHorizontalReduction(P, BI, R, TTI, R.getMinVecRegSize())) { + Changed = true; + it = BB->begin(); + e = BB->end(); + continue; + } + + Value *Inst = BI->getOperand(0); + if (Inst == P) + Inst = BI->getOperand(1); + + if (tryToVectorize(dyn_cast(Inst), R)) { + // We would like to start over since some instructions are deleted + // and the iterator may become invalid value. Changed = true; it = BB->begin(); e = BB->end(); continue; } + continue; } - if (ShouldStartVectorizeHorAtStore) { - if (StoreInst *SI = dyn_cast(it)) { - // Try to match and vectorize a horizontal reduction. - if (vectorizeRootInstruction(nullptr, SI->getValueOperand(), BB, R, - TTI)) { - Changed = true; - it = BB->begin(); - e = BB->end(); - continue; + if (ShouldStartVectorizeHorAtStore) + if (StoreInst *SI = dyn_cast(it)) + if (BinaryOperator *BinOp = + dyn_cast(SI->getValueOperand())) { + if (canMatchHorizontalReduction(nullptr, BinOp, R, TTI, + R.getMinVecRegSize()) || + tryToVectorize(BinOp, R)) { + Changed = true; + it = BB->begin(); + e = BB->end(); + continue; + } } - } - } // Try to vectorize horizontal reductions feeding into a return. - if (ReturnInst *RI = dyn_cast(it)) { - if (RI->getNumOperands() != 0) { - // Try to match and vectorize a horizontal reduction. - if (vectorizeRootInstruction(nullptr, RI->getOperand(0), BB, R, TTI)) { - Changed = true; - it = BB->begin(); - e = BB->end(); - continue; + if (ReturnInst *RI = dyn_cast(it)) + if (RI->getNumOperands() != 0) + if (BinaryOperator *BinOp = + dyn_cast(RI->getOperand(0))) { + DEBUG(dbgs() << "SLP: Found a return to vectorize.\n"); + if (canMatchHorizontalReduction(nullptr, BinOp, R, TTI, + R.getMinVecRegSize()) || + tryToVectorizePair(BinOp->getOperand(0), BinOp->getOperand(1), + R)) { + Changed = true; + it = BB->begin(); + e = BB->end(); + continue; + } } - } - } // Try to vectorize trees that start at compare instructions. if (CmpInst *CI = dyn_cast(it)) { @@ -4765,14 +4672,16 @@ bool SLPVectorizerPass::vectorizeChainsI continue; } - for (int I = 0; I < 2; ++I) { - if (vectorizeRootInstruction(nullptr, CI->getOperand(I), BB, R, TTI)) { - Changed = true; - // We would like to start over since some instructions are deleted - // and the iterator may become invalid value. - it = BB->begin(); - e = BB->end(); - break; + for (int i = 0; i < 2; ++i) { + if (BinaryOperator *BI = dyn_cast(CI->getOperand(i))) { + if (tryToVectorizePair(BI->getOperand(0), BI->getOperand(1), R)) { + Changed = true; + // We would like to start over since some instructions are deleted + // and the iterator may become invalid value. + it = BB->begin(); + e = BB->end(); + break; + } } } continue; Modified: projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp Sat Feb 25 15:00:57 2017 (r314269) @@ -4697,7 +4697,9 @@ void CGOpenMPRuntime::emitCancellationPo // global_tid, kmp_int32 cncl_kind); if (auto *OMPRegionInfo = dyn_cast_or_null(CGF.CapturedStmtInfo)) { - if (OMPRegionInfo->hasCancel()) { + // For 'cancellation point taskgroup', the task region info may not have a + // cancel. This may instead happen in another adjacent task. + if (CancelRegion == OMPD_taskgroup || OMPRegionInfo->hasCancel()) { llvm::Value *Args[] = { emitUpdateLocation(CGF, Loc), getThreadID(CGF, Loc), CGF.Builder.getInt32(getCancellationKind(CancelRegion))}; Modified: projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp Sat Feb 25 15:00:57 2017 (r314269) @@ -286,12 +286,12 @@ static void DefineFastIntType(unsigned T /// Get the value the ATOMIC_*_LOCK_FREE macro should have for a type with /// the specified properties. -static const char *getLockFreeValue(unsigned TypeWidth, unsigned InlineWidth) { +static const char *getLockFreeValue(unsigned TypeWidth, unsigned TypeAlign, + unsigned InlineWidth) { // Fully-aligned, power-of-2 sizes no larger than the inline // width will be inlined as lock-free operations. - // Note: we do not need to check alignment since _Atomic(T) is always - // appropriately-aligned in clang. - if ((TypeWidth & (TypeWidth - 1)) == 0 && TypeWidth <= InlineWidth) + if (TypeWidth == TypeAlign && (TypeWidth & (TypeWidth - 1)) == 0 && + TypeWidth <= InlineWidth) return "2"; // "always lock free" // We cannot be certain what operations the lib calls might be // able to implement as lock-free on future processors. @@ -881,6 +881,7 @@ static void InitializePredefinedMacros(c #define DEFINE_LOCK_FREE_MACRO(TYPE, Type) \ Builder.defineMacro("__GCC_ATOMIC_" #TYPE "_LOCK_FREE", \ getLockFreeValue(TI.get##Type##Width(), \ + TI.get##Type##Align(), \ InlineWidthBits)); DEFINE_LOCK_FREE_MACRO(BOOL, Bool); DEFINE_LOCK_FREE_MACRO(CHAR, Char); @@ -893,6 +894,7 @@ static void InitializePredefinedMacros(c DEFINE_LOCK_FREE_MACRO(LLONG, LongLong); Builder.defineMacro("__GCC_ATOMIC_POINTER_LOCK_FREE", getLockFreeValue(TI.getPointerWidth(0), + TI.getPointerAlign(0), InlineWidthBits)); #undef DEFINE_LOCK_FREE_MACRO } Modified: projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp ============================================================================== --- projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp Sat Feb 25 15:00:57 2017 (r314269) @@ -179,7 +179,8 @@ void WalkAST::VisitCXXMemberCallExpr(Cal } // Get the callee. - const CXXMethodDecl *MD = dyn_cast(CE->getDirectCallee()); + const CXXMethodDecl *MD = + dyn_cast_or_null(CE->getDirectCallee()); if (MD && MD->isVirtual() && !callIsNonVirtual && !MD->hasAttr() && !MD->getParent()->hasAttr()) ReportVirtualCall(CE, MD->isPure()); Modified: projects/clang400-import/lib/clang/include/clang/Basic/Version.inc ============================================================================== --- projects/clang400-import/lib/clang/include/clang/Basic/Version.inc Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/lib/clang/include/clang/Basic/Version.inc Sat Feb 25 15:00:57 2017 (r314269) @@ -8,4 +8,4 @@ #define CLANG_VENDOR "FreeBSD " -#define SVN_REVISION "296002" +#define SVN_REVISION "296202" Modified: projects/clang400-import/lib/clang/include/lld/Config/Version.inc ============================================================================== --- projects/clang400-import/lib/clang/include/lld/Config/Version.inc Sat Feb 25 14:50:53 2017 (r314268) +++ projects/clang400-import/lib/clang/include/lld/Config/Version.inc Sat Feb 25 15:00:57 2017 (r314269) @@ -4,5 +4,5 @@ #define LLD_VERSION_STRING "4.0.0" #define LLD_VERSION_MAJOR 4 #define LLD_VERSION_MINOR 0 -#define LLD_REVISION_STRING "296002" +#define LLD_REVISION_STRING "296202" #define LLD_REPOSITORY_STRING "FreeBSD" From owner-svn-src-projects@freebsd.org Sat Feb 25 15:04:23 2017 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 32B4ACEC65D for ; Sat, 25 Feb 2017 15:04:23 +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 mx1.freebsd.org (Postfix) with ESMTPS id BE029A43; Sat, 25 Feb 2017 15:04:22 +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 v1PF4LZa097129; Sat, 25 Feb 2017 15:04:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PF4JET097109; Sat, 25 Feb 2017 15:04:19 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702251504.v1PF4JET097109@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 15:04:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r314270 - in projects/clang400-import: contrib/netbsd-tests/lib/librt include lib/libc/gen lib/libc/include lib/libcam lib/libefivar rescue/rescue sbin/ifconfig sbin/nvmecontrol share/m... X-SVN-Group: projects 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.23 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, 25 Feb 2017 15:04:23 -0000 Author: dim Date: Sat Feb 25 15:04:19 2017 New Revision: 314270 URL: https://svnweb.freebsd.org/changeset/base/314270 Log: Merge ^/head r314178 through r314269. Added: projects/clang400-import/sys/dev/iwm/if_iwm_fw.c - copied unchanged from r314269, head/sys/dev/iwm/if_iwm_fw.c projects/clang400-import/sys/dev/iwm/if_iwm_fw.h - copied unchanged from r314269, head/sys/dev/iwm/if_iwm_fw.h Deleted: projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/sys/gfs.h Modified: projects/clang400-import/contrib/netbsd-tests/lib/librt/t_sem.c projects/clang400-import/include/semaphore.h projects/clang400-import/lib/libc/gen/Makefile.inc projects/clang400-import/lib/libc/gen/Symbol.map projects/clang400-import/lib/libc/gen/sem_new.c projects/clang400-import/lib/libc/gen/sem_timedwait.3 projects/clang400-import/lib/libc/include/namespace.h projects/clang400-import/lib/libc/include/un-namespace.h projects/clang400-import/lib/libcam/scsi_cmdparse.c projects/clang400-import/lib/libefivar/efivar.c projects/clang400-import/rescue/rescue/Makefile projects/clang400-import/sbin/ifconfig/ifieee80211.c projects/clang400-import/sbin/nvmecontrol/logpage.c projects/clang400-import/sbin/nvmecontrol/nvmecontrol.8 projects/clang400-import/sbin/nvmecontrol/nvmecontrol.c projects/clang400-import/sbin/nvmecontrol/nvmecontrol.h projects/clang400-import/share/man/man3/pthread_testcancel.3 projects/clang400-import/share/man/man4/Makefile projects/clang400-import/sys/amd64/linux/linux_dummy.c projects/clang400-import/sys/amd64/linux32/linux.h projects/clang400-import/sys/amd64/linux32/linux32_dummy.c projects/clang400-import/sys/amd64/linux32/linux32_machdep.c projects/clang400-import/sys/arm/at91/at91sam9260.c projects/clang400-import/sys/arm/mv/mv_pci.c projects/clang400-import/sys/arm/nvidia/tegra_pcie.c projects/clang400-import/sys/arm/versatile/versatile_pci.c projects/clang400-import/sys/arm/xscale/i8134x/i81342_pci.c projects/clang400-import/sys/arm/xscale/ixp425/ixp425_pci.c projects/clang400-import/sys/boot/geli/pwgets.c projects/clang400-import/sys/cam/ctl/ctl.c projects/clang400-import/sys/cam/ctl/ctl_frontend.c projects/clang400-import/sys/cam/ctl/ctl_private.h projects/clang400-import/sys/cam/ctl/scsi_ctl.c projects/clang400-import/sys/cddl/compat/opensolaris/kern/opensolaris_lookup.c projects/clang400-import/sys/cddl/compat/opensolaris/sys/pathname.h projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c projects/clang400-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c projects/clang400-import/sys/compat/linux/linux_file.c projects/clang400-import/sys/compat/linuxkpi/common/include/linux/bitops.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/device.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/srcu.h projects/clang400-import/sys/compat/linuxkpi/common/include/linux/string.h projects/clang400-import/sys/conf/files projects/clang400-import/sys/dev/acpica/acpi_cpu.c projects/clang400-import/sys/dev/acpica/acpi_pcib_acpi.c projects/clang400-import/sys/dev/hyperv/pcib/vmbus_pcib.c projects/clang400-import/sys/dev/isp/isp_freebsd.c projects/clang400-import/sys/dev/iwm/if_iwm.c projects/clang400-import/sys/dev/iwm/if_iwm_debug.h projects/clang400-import/sys/dev/iwm/if_iwmreg.h projects/clang400-import/sys/dev/iwm/if_iwmvar.h projects/clang400-import/sys/dev/iwn/if_iwn.c projects/clang400-import/sys/dev/iwn/if_iwnvar.h projects/clang400-import/sys/dev/ofw/ofwpci.c projects/clang400-import/sys/dev/pci/pci_host_generic_fdt.c projects/clang400-import/sys/dev/pci/pci_if.m projects/clang400-import/sys/dev/pci/pci_pci.c projects/clang400-import/sys/dev/pci/pcib_if.m projects/clang400-import/sys/dev/pci/pcib_private.h projects/clang400-import/sys/dev/uart/uart_dev_snps.c projects/clang400-import/sys/dev/usb/storage/cfumass.c projects/clang400-import/sys/dev/xen/pcifront/pcifront.c projects/clang400-import/sys/fs/nfsserver/nfs_nfsdkrpc.c projects/clang400-import/sys/i386/linux/linux_dummy.c projects/clang400-import/sys/kern/kern_clocksource.c projects/clang400-import/sys/kern/kern_exit.c projects/clang400-import/sys/kern/kern_mutex.c projects/clang400-import/sys/kern/kern_pmc.c projects/clang400-import/sys/kern/kern_thread.c projects/clang400-import/sys/kern/kern_umtx.c projects/clang400-import/sys/kern/subr_trap.c projects/clang400-import/sys/mips/adm5120/admpci.c projects/clang400-import/sys/mips/atheros/ar71xx_pci.c projects/clang400-import/sys/mips/atheros/ar724x_pci.c projects/clang400-import/sys/mips/atheros/qca955x_pci.c projects/clang400-import/sys/mips/cavium/octopci.c projects/clang400-import/sys/mips/conf/BERI_DE4_BASE projects/clang400-import/sys/mips/conf/BERI_DE4_SDROOT projects/clang400-import/sys/mips/conf/BERI_SIM_BASE projects/clang400-import/sys/mips/idt/idtpci.c projects/clang400-import/sys/mips/malta/gt_pci.c projects/clang400-import/sys/mips/mediatek/mtk_pcie.c projects/clang400-import/sys/mips/nlm/xlp_pci.c projects/clang400-import/sys/mips/rmi/xlr_pci.c projects/clang400-import/sys/mips/rt305x/rt305x_pci.c projects/clang400-import/sys/mips/sibyte/sb_zbpci.c projects/clang400-import/sys/modules/iwm/Makefile projects/clang400-import/sys/modules/zfs/Makefile projects/clang400-import/sys/powerpc/ofw/ofw_pcib_pci.c projects/clang400-import/sys/powerpc/powermac/cpcht.c projects/clang400-import/sys/sparc64/pci/apb.c projects/clang400-import/sys/sparc64/pci/fire.c projects/clang400-import/sys/sparc64/pci/ofw_pcib.c projects/clang400-import/sys/sparc64/pci/psycho.c projects/clang400-import/sys/sparc64/pci/schizo.c projects/clang400-import/sys/sys/proc.h projects/clang400-import/sys/sys/systm.h projects/clang400-import/sys/ufs/ffs/ffs_softdep.c projects/clang400-import/sys/vm/vm_fault.c projects/clang400-import/sys/x86/pci/pci_bus.c projects/clang400-import/sys/x86/x86/mp_x86.c projects/clang400-import/sys/x86/x86/tsc.c projects/clang400-import/sys/x86/x86/x86_mem.c projects/clang400-import/tools/build/mk/OptionalObsoleteFiles.inc projects/clang400-import/usr.sbin/efivar/efivar.c projects/clang400-import/usr.sbin/syslogd/Makefile projects/clang400-import/usr.sbin/syslogd/syslogd.c Directory Properties: projects/clang400-import/ (props changed) projects/clang400-import/contrib/netbsd-tests/ (props changed) projects/clang400-import/sys/cddl/contrib/opensolaris/ (props changed) Modified: projects/clang400-import/contrib/netbsd-tests/lib/librt/t_sem.c ============================================================================== --- projects/clang400-import/contrib/netbsd-tests/lib/librt/t_sem.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/contrib/netbsd-tests/lib/librt/t_sem.c Sat Feb 25 15:04:19 2017 (r314270) @@ -60,18 +60,24 @@ __COPYRIGHT("@(#) Copyright (c) 2008, 20 The NetBSD Foundation, inc. All rights reserved."); __RCSID("$NetBSD: t_sem.c,v 1.3 2017/01/14 20:58:20 christos Exp $"); +#include #include #include #include #include +#include #include +#include #include #include #define NCHILDREN 10 +#define SEM_REQUIRE(x) \ + ATF_REQUIRE_EQ_MSG(x, 0, "%s", strerror(errno)) + ATF_TC_WITH_CLEANUP(basic); ATF_TC_HEAD(basic, tc) { @@ -118,6 +124,7 @@ ATF_TC_HEAD(child, tc) { atf_tc_set_md_var(tc, "descr", "Checks using semaphores to synchronize " "parent with multiple child processes"); + atf_tc_set_md_var(tc, "timeout", "5"); } ATF_TC_BODY(child, tc) { @@ -153,7 +160,7 @@ ATF_TC_BODY(child, tc) } for (i = 0; i < NCHILDREN; i++) { - sleep(1); + usleep(100000); printf("main loop %d: posting...\n", j); ATF_REQUIRE_EQ(sem_post(sem_a), 0); } @@ -173,11 +180,151 @@ ATF_TC_CLEANUP(child, tc) (void)sem_unlink("/sem_a"); } +static inline void +timespec_add_ms(struct timespec *ts, int ms) +{ + ts->tv_nsec += ms * 1000*1000; + if (ts->tv_nsec > 1000*1000*1000) { + ts->tv_sec++; + ts->tv_nsec -= 1000*1000*1000; + } +} + +volatile sig_atomic_t got_sigalrm = 0; + +static void +sigalrm_handler(int sig __unused) +{ + got_sigalrm = 1; +} + +ATF_TC(timedwait); +ATF_TC_HEAD(timedwait, tc) +{ + atf_tc_set_md_var(tc, "descr", "Tests sem_timedwait(3)" +#ifdef __FreeBSD__ + " and sem_clockwait_np(3)" +#endif + ); + atf_tc_set_md_var(tc, "timeout", "20"); +} +ATF_TC_BODY(timedwait, tc) +{ + struct timespec ts; + sem_t sem; + int result; + + SEM_REQUIRE(sem_init(&sem, 0, 0)); + SEM_REQUIRE(sem_post(&sem)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_REALTIME, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + SEM_REQUIRE(sem_timedwait(&sem, &ts)); + ATF_REQUIRE_ERRNO(ETIMEDOUT, sem_timedwait(&sem, &ts)); + ts.tv_sec--; + ATF_REQUIRE_ERRNO(ETIMEDOUT, sem_timedwait(&sem, &ts)); + SEM_REQUIRE(sem_post(&sem)); + SEM_REQUIRE(sem_timedwait(&sem, &ts)); + + /* timespec validation, in the past */ + ts.tv_nsec += 1000*1000*1000; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + ts.tv_nsec = -1; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + /* timespec validation, in the future */ + ATF_REQUIRE_MSG(clock_gettime(CLOCK_REALTIME, &ts) == 0, + "%s", strerror(errno)); + ts.tv_sec++; + ts.tv_nsec = 1000*1000*1000; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + ts.tv_nsec = -1; + ATF_REQUIRE_ERRNO(EINVAL, sem_timedwait(&sem, &ts)); + + /* EINTR */ + struct sigaction act = { + .sa_handler = sigalrm_handler, + .sa_flags = 0 /* not SA_RESTART */ + }; + ATF_REQUIRE_MSG(sigemptyset(&act.sa_mask) == 0, + "%s", strerror(errno)); + ATF_REQUIRE_MSG(sigaction(SIGALRM, &act, NULL) == 0, + "%s", strerror(errno)); + struct itimerval it = { + .it_value.tv_usec = 50*1000 + }; + ATF_REQUIRE_MSG(setitimer(ITIMER_REAL, &it, NULL) == 0, + "%s", strerror(errno)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_REALTIME, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + ATF_REQUIRE_ERRNO(EINTR, sem_timedwait(&sem, &ts)); + ATF_REQUIRE_MSG(got_sigalrm, "did not get SIGALRM"); + +#ifdef __FreeBSD__ + /* CLOCK_MONOTONIC, absolute */ + SEM_REQUIRE(sem_post(&sem)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_MONOTONIC, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + SEM_REQUIRE(sem_clockwait_np(&sem, CLOCK_MONOTONIC, TIMER_ABSTIME, + &ts, NULL)); + ATF_REQUIRE_ERRNO(ETIMEDOUT, + sem_clockwait_np(&sem, CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, NULL)); + + /* CLOCK_MONOTONIC, relative */ + SEM_REQUIRE(sem_post(&sem)); + ts.tv_sec = 0; + ts.tv_nsec = 100*1000*1000; + SEM_REQUIRE(sem_clockwait_np(&sem, CLOCK_MONOTONIC, 0, + &ts, NULL)); + ATF_REQUIRE_ERRNO(ETIMEDOUT, + sem_clockwait_np(&sem, CLOCK_MONOTONIC, 0, &ts, NULL)); + + /* absolute does not update remaining time on EINTR */ + struct timespec remain = {42, 1000*1000*1000}; + got_sigalrm = 0; + it.it_value.tv_usec = 50*1000; + ATF_REQUIRE_MSG(setitimer(ITIMER_REAL, &it, NULL) == 0, + "%s", strerror(errno)); + ATF_REQUIRE_MSG(clock_gettime(CLOCK_MONOTONIC, &ts) == 0, + "%s", strerror(errno)); + timespec_add_ms(&ts, 100); + ATF_REQUIRE_ERRNO(EINTR, sem_clockwait_np(&sem, CLOCK_MONOTONIC, + TIMER_ABSTIME, &ts, &remain)); + ATF_REQUIRE_MSG(got_sigalrm, "did not get SIGALRM"); + ATF_REQUIRE_MSG(remain.tv_sec == 42 && remain.tv_nsec == 1000*1000*1000, + "an absolute clockwait modified the remaining time on EINTR"); + + /* relative updates remaining time on EINTR */ + remain.tv_sec = 42; + remain.tv_nsec = 1000*1000*1000; + got_sigalrm = 0; + it.it_value.tv_usec = 50*1000; + ATF_REQUIRE_MSG(setitimer(ITIMER_REAL, &it, NULL) == 0, + "%s", strerror(errno)); + ts.tv_sec = 0; + ts.tv_nsec = 100*1000*1000; + ATF_REQUIRE_ERRNO(EINTR, sem_clockwait_np(&sem, CLOCK_MONOTONIC, 0, &ts, + &remain)); + ATF_REQUIRE_MSG(got_sigalrm, "did not get SIGALRM"); + /* + * If this nsec comparison turns out to be unreliable due to timing, + * it could simply check that nsec < 100 ms. + */ + ATF_REQUIRE_MSG(remain.tv_sec == 0 && + remain.tv_nsec >= 25*1000*1000 && + remain.tv_nsec <= 75*1000*1000, + "the remaining time was not as expected when a relative clockwait" + " got EINTR" ); +#endif +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, basic); ATF_TP_ADD_TC(tp, child); + ATF_TP_ADD_TC(tp, timedwait); return atf_no_error(); } Modified: projects/clang400-import/include/semaphore.h ============================================================================== --- projects/clang400-import/include/semaphore.h Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/include/semaphore.h Sat Feb 25 15:04:19 2017 (r314270) @@ -59,6 +59,10 @@ int sem_init(sem_t *, int, unsigned int sem_t *sem_open(const char *, int, ...); int sem_post(sem_t *); int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict); +#if __BSD_VISIBLE +int sem_clockwait_np(sem_t * __restrict, __clockid_t, int, + const struct timespec *, struct timespec *); +#endif int sem_trywait(sem_t *); int sem_unlink(const char *); int sem_wait(sem_t *); Modified: projects/clang400-import/lib/libc/gen/Makefile.inc ============================================================================== --- projects/clang400-import/lib/libc/gen/Makefile.inc Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libc/gen/Makefile.inc Sat Feb 25 15:04:19 2017 (r314270) @@ -463,6 +463,7 @@ MLINKS+=scandir.3 alphasort.3 MLINKS+=sem_open.3 sem_close.3 \ sem_open.3 sem_unlink.3 MLINKS+=sem_wait.3 sem_trywait.3 +MLINKS+=sem_timedwait.3 sem_clockwait_np.3 MLINKS+=send.2 sendmmsg.2 MLINKS+=setjmp.3 _longjmp.3 \ setjmp.3 _setjmp.3 \ Modified: projects/clang400-import/lib/libc/gen/Symbol.map ============================================================================== --- projects/clang400-import/lib/libc/gen/Symbol.map Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libc/gen/Symbol.map Sat Feb 25 15:04:19 2017 (r314270) @@ -415,6 +415,7 @@ FBSD_1.4 { FBSD_1.5 { basename; dirname; + sem_clockwait_np; }; FBSDprivate_1.0 { Modified: projects/clang400-import/lib/libc/gen/sem_new.c ============================================================================== --- projects/clang400-import/lib/libc/gen/sem_new.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libc/gen/sem_new.c Sat Feb 25 15:04:19 2017 (r314270) @@ -56,6 +56,7 @@ __weak_reference(_sem_init, sem_init); __weak_reference(_sem_open, sem_open); __weak_reference(_sem_post, sem_post); __weak_reference(_sem_timedwait, sem_timedwait); +__weak_reference(_sem_clockwait_np, sem_clockwait_np); __weak_reference(_sem_trywait, sem_trywait); __weak_reference(_sem_unlink, sem_unlink); __weak_reference(_sem_wait, sem_wait); @@ -345,23 +346,34 @@ usem_wake(struct _usem2 *sem) } static __inline int -usem_wait(struct _usem2 *sem, const struct timespec *abstime) +usem_wait(struct _usem2 *sem, clockid_t clock_id, int flags, + const struct timespec *rqtp, struct timespec *rmtp) { - struct _umtx_time *tm_p, timeout; + struct { + struct _umtx_time timeout; + struct timespec remain; + } tms; + void *tm_p; size_t tm_size; + int retval; - if (abstime == NULL) { + if (rqtp == NULL) { tm_p = NULL; tm_size = 0; } else { - timeout._clockid = CLOCK_REALTIME; - timeout._flags = UMTX_ABSTIME; - timeout._timeout = *abstime; - tm_p = &timeout; - tm_size = sizeof(timeout); + tms.timeout._clockid = clock_id; + tms.timeout._flags = (flags & TIMER_ABSTIME) ? UMTX_ABSTIME : 0; + tms.timeout._timeout = *rqtp; + tm_p = &tms; + tm_size = sizeof(tms); + } + retval = _umtx_op(sem, UMTX_OP_SEM2_WAIT, 0, (void *)tm_size, tm_p); + if (retval == -1 && errno == EINTR && (flags & TIMER_ABSTIME) == 0 && + rqtp != NULL && rmtp != NULL) { + *rmtp = tms.remain; } - return _umtx_op(sem, UMTX_OP_SEM2_WAIT, 0, - (void *)tm_size, __DECONST(void*, tm_p)); + + return (retval); } int @@ -381,8 +393,8 @@ _sem_trywait(sem_t *sem) } int -_sem_timedwait(sem_t * __restrict sem, - const struct timespec * __restrict abstime) +_sem_clockwait_np(sem_t * __restrict sem, clockid_t clock_id, int flags, + const struct timespec *rqtp, struct timespec *rmtp) { int val, retval; @@ -393,7 +405,8 @@ _sem_timedwait(sem_t * __restrict sem, _pthread_testcancel(); for (;;) { while (USEM_COUNT(val = sem->_kern._count) > 0) { - if (atomic_cmpset_acq_int(&sem->_kern._count, val, val - 1)) + if (atomic_cmpset_acq_int(&sem->_kern._count, val, + val - 1)) return (0); } @@ -406,20 +419,28 @@ _sem_timedwait(sem_t * __restrict sem, * The timeout argument is only supposed to * be checked if the thread would have blocked. */ - if (abstime != NULL) { - if (abstime->tv_nsec >= 1000000000 || abstime->tv_nsec < 0) { + if (rqtp != NULL) { + if (rqtp->tv_nsec >= 1000000000 || rqtp->tv_nsec < 0) { errno = EINVAL; return (-1); } } _pthread_cancel_enter(1); - retval = usem_wait(&sem->_kern, abstime); + retval = usem_wait(&sem->_kern, clock_id, flags, rqtp, rmtp); _pthread_cancel_leave(0); } return (retval); } int +_sem_timedwait(sem_t * __restrict sem, + const struct timespec * __restrict abstime) +{ + return (_sem_clockwait_np(sem, CLOCK_REALTIME, TIMER_ABSTIME, abstime, + NULL)); +}; + +int _sem_wait(sem_t *sem) { return _sem_timedwait(sem, NULL); Modified: projects/clang400-import/lib/libc/gen/sem_timedwait.3 ============================================================================== --- projects/clang400-import/lib/libc/gen/sem_timedwait.3 Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libc/gen/sem_timedwait.3 Sat Feb 25 15:04:19 2017 (r314270) @@ -34,11 +34,12 @@ .\" .\" $FreeBSD$ .\" -.Dd August 17, 2016 +.Dd February 23, 2017 .Dt SEM_TIMEDWAIT 3 .Os .Sh NAME -.Nm sem_timedwait +.Nm sem_timedwait , +.Nm sem_clockwait_np .Nd "lock a semaphore" .Sh LIBRARY .Lb libc @@ -46,6 +47,8 @@ .In semaphore.h .Ft int .Fn sem_timedwait "sem_t * restrict sem" "const struct timespec * restrict abs_timeout" +.Ft int +.Fn sem_clockwait_np "sem_t * restrict sem" "clockid_t clock_id" "int flags" "const struct timespec * rqtp" "struct timespec * rmtp" .Sh DESCRIPTION The .Fn sem_timedwait @@ -77,10 +80,40 @@ clock. The validity of the .Fa abs_timeout is not checked if the semaphore can be locked immediately. -.Sh RETURN VALUES +.Pp The -.Fn sem_timedwait -function returns zero if the calling process successfully performed the +.Fn sem_clockwait_np +function is a more flexible variant of +.Fn sem_timedwait . +The +.Fa clock_id +parameter specifies the reference clock. +If the +.Fa flags +parameter contains +.Dv TIMER_ABSTIME , +then the requested timeout +.Pq Fa rqtp +is an absolute timeout; otherwise, +the timeout is relative. +If this function fails with +.Er EINTR +and the timeout is relative, +a non-NULL +.Fa rmtp +will be updated to contain the amount of time remaining in the interval +.Po +the requested time minus the time actually slept +.Pc . +An absolute timeout has no effect on +.Fa rmtp . +A single structure can be used for both +.Fa rqtp +and +.Fa rmtp . +.Sh RETURN VALUES +These +functions return zero if the calling process successfully performed the semaphore lock operation on the semaphore designated by .Fa sem . If the call was unsuccessful, the state of the semaphore is unchanged, @@ -88,9 +121,7 @@ and the function returns a value of \-1 .Va errno to indicate the error. .Sh ERRORS -The -.Fn sem_timedwait -function will fail if: +These functions will fail if: .Bl -tag -width Er .It Bq Er EINVAL The @@ -114,6 +145,18 @@ The .Fn sem_timedwait function conforms to .St -p1003.1-2004 . +The +.Fn sem_clockwait_np +function is not specified by any standard; +it exists only on +.Fx +at the time of this writing. .Sh HISTORY -The function first appeared in +The +.Fn sem_timedwait +function first appeared in .Fx 5.0 . +The +.Fn sem_clockwait_np +function first appeared in +.Fx 12.0 . Modified: projects/clang400-import/lib/libc/include/namespace.h ============================================================================== --- projects/clang400-import/lib/libc/include/namespace.h Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libc/include/namespace.h Sat Feb 25 15:04:19 2017 (r314270) @@ -217,6 +217,7 @@ #define sem_open _sem_open #define sem_post _sem_post #define sem_timedwait _sem_timedwait +#define sem_clockwait_np _sem_clockwait_np #define sem_trywait _sem_trywait #define sem_unlink _sem_unlink #define sem_wait _sem_wait Modified: projects/clang400-import/lib/libc/include/un-namespace.h ============================================================================== --- projects/clang400-import/lib/libc/include/un-namespace.h Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libc/include/un-namespace.h Sat Feb 25 15:04:19 2017 (r314270) @@ -198,6 +198,7 @@ #undef sem_open #undef sem_post #undef sem_timedwait +#undef sem_clockwait_np #undef sem_trywait #undef sem_unlink #undef sem_wait Modified: projects/clang400-import/lib/libcam/scsi_cmdparse.c ============================================================================== --- projects/clang400-import/lib/libcam/scsi_cmdparse.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libcam/scsi_cmdparse.c Sat Feb 25 15:04:19 2017 (r314270) @@ -128,14 +128,14 @@ do_buff_decode(u_int8_t *buff, size_t le *(va_arg(*ap, int *)) = (ARG); \ assigned++; \ } \ - field_name[0] = 0; \ + field_name[0] = '\0'; \ suppress = 0; \ } while (0) u_char bits = 0; /* For bit fields */ int shift = 0; /* Bits already shifted out */ suppress = 0; - field_name[0] = 0; + field_name[0] = '\0'; while (!done) { switch(letter = *fmt) { @@ -169,9 +169,9 @@ do_buff_decode(u_int8_t *buff, size_t le fmt++; } - if (fmt) + if (*fmt != '\0') fmt++; /* Skip '}' */ - field_name[i] = 0; + field_name[i] = '\0'; break; } @@ -255,7 +255,7 @@ do_buff_decode(u_int8_t *buff, size_t le break; } if (!suppress) { - if (arg_put) + if (arg_put != NULL) (*arg_put)(puthook, (letter == 't' ? 'b' : letter), &buff[ind], width, field_name); @@ -268,7 +268,7 @@ do_buff_decode(u_int8_t *buff, size_t le for (p = dest + width - 1; p >= dest && *p == ' '; p--) - *p = 0; + *p = '\0'; } } assigned++; @@ -379,22 +379,22 @@ next_field(const char **pp, char *fmt, i field_size = 8; /* Default to byte field type... */ *fmt = 'i'; field_width = 1; /* 1 byte wide */ - if (name) - *name = 0; + if (name != NULL) + *name = '\0'; state = BETWEEN_FIELDS; while (state != DONE) { switch(state) { case BETWEEN_FIELDS: - if (*p == 0) + if (*p == '\0') state = DONE; else if (isspace(*p)) p++; else if (*p == '#') { while (*p && *p != '\n') p++; - if (p) + if (*p != '\0') p++; } else if (*p == '{') { int i = 0; @@ -410,7 +410,7 @@ next_field(const char **pp, char *fmt, i } if(name && i < n_name) - name[i] = 0; + name[i] = '\0'; if (*p == '}') p++; @@ -530,7 +530,7 @@ next_field(const char **pp, char *fmt, i if (is_error) { *error_p = 1; - return 0; + return (0); } *error_p = 0; @@ -568,7 +568,7 @@ do_encode(u_char *buff, size_t vec_max, if (suppress) value = 0; else - value = arg_get ? + value = arg_get != NULL ? (*arg_get)(gethook, field_name) : va_arg(*ap, int); } @@ -659,9 +659,9 @@ do_encode(u_char *buff, size_t vec_max, *used = ind; if (error) - return -1; + return (-1); - return encoded; + return (encoded); } int @@ -672,8 +672,8 @@ csio_decode(struct ccb_scsiio *csio, con va_start(ap, fmt); - retval = do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, 0, 0, - fmt, &ap); + retval = do_buff_decode(csio->data_ptr, (size_t)csio->dxfer_len, + NULL, NULL, fmt, &ap); va_end(ap); @@ -705,7 +705,7 @@ buff_decode(u_int8_t *buff, size_t len, va_start(ap, fmt); - retval = do_buff_decode(buff, len, 0, 0, fmt, &ap); + retval = do_buff_decode(buff, len, NULL, NULL, fmt, &ap); va_end(ap); @@ -723,7 +723,7 @@ buff_decode_visit(u_int8_t *buff, size_t * the arg_put function. */ if (arg_put == NULL) - return(-1); + return (-1); return (do_buff_decode(buff, len, arg_put, puthook, fmt, NULL)); } @@ -779,20 +779,20 @@ csio_build_visit(struct ccb_scsiio *csio int retval; if (csio == NULL) - return(0); + return (0); /* * We need something to encode, but we can't get it without the * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); bzero(csio, sizeof(struct ccb_scsiio)); if ((retval = do_encode(csio->cdb_io.cdb_bytes, SCSI_MAX_CDBLEN, &cmdlen, arg_get, gethook, cmd_spec, NULL)) == -1) - return(retval); + return (retval); cam_fill_csio(csio, /* retries */ retry_count, @@ -805,7 +805,7 @@ csio_build_visit(struct ccb_scsiio *csio /* cdb_len */ cmdlen, /* timeout */ timeout ? timeout : 5000); - return(retval); + return (retval); } int @@ -819,7 +819,8 @@ csio_encode(struct ccb_scsiio *csio, con va_start(ap, fmt); - retval = do_encode(csio->data_ptr, csio->dxfer_len, 0, 0, 0, fmt, &ap); + retval = do_encode(csio->data_ptr, csio->dxfer_len, NULL, NULL, NULL, + fmt, &ap); va_end(ap); @@ -836,9 +837,9 @@ buff_encode_visit(u_int8_t *buff, size_t * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); - return (do_encode(buff, len, 0, arg_get, gethook, fmt, NULL)); + return (do_encode(buff, len, NULL, arg_get, gethook, fmt, NULL)); } int @@ -851,8 +852,8 @@ csio_encode_visit(struct ccb_scsiio *csi * arg_get function. */ if (arg_get == NULL) - return(-1); + return (-1); - return (do_encode(csio->data_ptr, csio->dxfer_len, 0, arg_get, + return (do_encode(csio->data_ptr, csio->dxfer_len, NULL, arg_get, gethook, fmt, NULL)); } Modified: projects/clang400-import/lib/libefivar/efivar.c ============================================================================== --- projects/clang400-import/lib/libefivar/efivar.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/lib/libefivar/efivar.c Sat Feb 25 15:04:19 2017 (r314270) @@ -132,10 +132,7 @@ rv_to_linux_rv(int rv) { if (rv == 0) rv = 1; - else if (errno == ENOENT) { - rv = 0; - errno = 0; - } else + else rv = -errno; return (rv); } @@ -266,6 +263,11 @@ errout: /* XXX The linux interface expects name to be a static buffer -- fix or leak memory? */ done: + if (errno == ENOENT) { + errno = 0; + return 0; + } + return (rv_to_linux_rv(rv)); } Modified: projects/clang400-import/rescue/rescue/Makefile ============================================================================== --- projects/clang400-import/rescue/rescue/Makefile Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/rescue/rescue/Makefile Sat Feb 25 15:04:19 2017 (r314270) @@ -90,7 +90,7 @@ CRUNCH_SUPPRESS_LINK_-tcsh= 1 # CRUNCH_SRCDIRS+= sbin CRUNCH_PROGS_sbin= badsect \ - camcontrol ccdconfig clri devfs dmesg dump \ + camcontrol clri devfs dmesg dump \ dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \ fsirand gbde geom ifconfig init \ kldconfig kldload kldstat kldunload ldconfig \ @@ -98,13 +98,17 @@ CRUNCH_PROGS_sbin= badsect \ mount_msdosfs mount_nfs mount_nullfs \ mount_udf mount_unionfs newfs \ newfs_msdos nos-tun ping reboot \ - restore rcorder route routed rtquery rtsol savecore \ - spppcontrol swapon sysctl tunefs umount + restore rcorder route rtsol savecore \ + shutdown spppcontrol swapon sysctl tunefs umount .if ${MK_ATM} != "no" CRUNCH_PROGS_sbin+= atmconfig .endif +.if ${MK_CCD} != "no" +CRUNCH_PROGS_sbin+= ccdconfig +.endif + .if ${MK_INET6_SUPPORT} != "no" CRUNCH_PROGS_sbin+= ping6 .endif @@ -112,6 +116,11 @@ CRUNCH_PROGS_sbin+= ping6 .if ${MK_IPFILTER} != "no" CRUNCH_PROGS_sbin+= ipf .endif + +.if ${MK_ROUTED} != "no" +CRUNCH_PROGS_sbin+= routed rtquery +.endif + .if ${MK_ZFS} != "no" CRUNCH_PROGS_sbin+= zfs CRUNCH_PROGS_sbin+= zpool @@ -166,6 +175,7 @@ CRUNCH_ALIAS_restore= rrestore CRUNCH_ALIAS_dump= rdump CRUNCH_ALIAS_fsck_ffs= fsck_4.2bsd fsck_ufs CRUNCH_ALIAS_geom= glabel gpart +CRUNCH_ALIAS_shutdown= poweroff # dhclient has historically been troublesome... CRUNCH_PROGS_sbin+= dhclient Modified: projects/clang400-import/sbin/ifconfig/ifieee80211.c ============================================================================== --- projects/clang400-import/sbin/ifconfig/ifieee80211.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/sbin/ifconfig/ifieee80211.c Sat Feb 25 15:04:19 2017 (r314270) @@ -3160,6 +3160,14 @@ printwpsie(const char *tag, const u_int8 uint16_t tlv_type = BE_READ_2(ie); uint16_t tlv_len = BE_READ_2(ie + 2); + /* some devices broadcast invalid WPS frames */ + if (tlv_len > len) { + printf("bad frame length tlv_type=0x%02x " + "tlv_len=%d len=%d", tlv_type, tlv_len, + len); + break; + } + ie += 4, len -= 4; switch (tlv_type) { Modified: projects/clang400-import/sbin/nvmecontrol/logpage.c ============================================================================== --- projects/clang400-import/sbin/nvmecontrol/logpage.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/sbin/nvmecontrol/logpage.c Sat Feb 25 15:04:19 2017 (r314270) @@ -369,7 +369,7 @@ print_intel_write_lat_log(void *buf, uin } /* - * Table 19. 5.4 SMART Attributes + * Table 19. 5.4 SMART Attributes. Samsung also implements this and some extra data not documented. */ static void print_intel_add_smart(void *buf, uint32_t size __unused) @@ -714,13 +714,13 @@ print_hgst_info_temp_history(void *buf, printf(" %-30s: %d C\n", "Minimum Temperature", *walker++); min = le32dec(walker); walker += 4; - printf(" %-30s: %d:%02d:00\n", "Max Temperture Time", min / 60, min % 60); + printf(" %-30s: %d:%02d:00\n", "Max Temperature Time", min / 60, min % 60); min = le32dec(walker); walker += 4; - printf(" %-30s: %d:%02d:00\n", "Over Temperture Duration", min / 60, min % 60); + printf(" %-30s: %d:%02d:00\n", "Over Temperature Duration", min / 60, min % 60); min = le32dec(walker); walker += 4; - printf(" %-30s: %d:%02d:00\n", "Min Temperture Time", min / 60, min % 60); + printf(" %-30s: %d:%02d:00\n", "Min Temperature Time", min / 60, min % 60); } static void @@ -835,34 +835,39 @@ print_hgst_info_log(void *buf, uint32_t /* * Table of log page printer / sizing. * - * This includes Intel specific pages that are widely implemented. Not - * sure how best to switch between different vendors. + * This includes Intel specific pages that are widely implemented. + * Make sure you keep all the pages of one vendor together so -v help + * lists all the vendors pages. */ static struct logpage_function { uint8_t log_page; const char *vendor; + const char *name; print_fn_t print_fn; size_t size; } logfuncs[] = { - {NVME_LOG_ERROR, NULL, print_log_error, - 0}, - {NVME_LOG_HEALTH_INFORMATION, NULL, print_log_health, - sizeof(struct nvme_health_information_page)}, - {NVME_LOG_FIRMWARE_SLOT, NULL, print_log_firmware, - sizeof(struct nvme_firmware_page)}, - {HGST_INFO_LOG, "hgst", print_hgst_info_log, - DEFAULT_SIZE}, - {HGST_INFO_LOG, "wdc", print_hgst_info_log, - DEFAULT_SIZE}, - {INTEL_LOG_TEMP_STATS, "intel", print_intel_temp_stats, - sizeof(struct intel_log_temp_stats)}, - {INTEL_LOG_READ_LAT_LOG, "intel", print_intel_read_lat_log, - DEFAULT_SIZE}, - {INTEL_LOG_WRITE_LAT_LOG, "intel", print_intel_write_lat_log, - DEFAULT_SIZE}, - {INTEL_LOG_ADD_SMART, "intel", print_intel_add_smart, - DEFAULT_SIZE}, - {0, NULL, NULL, 0}, + {NVME_LOG_ERROR, NULL, "Drive Error Log", + print_log_error, 0}, + {NVME_LOG_HEALTH_INFORMATION, NULL, "Health/SMART Data", + print_log_health, sizeof(struct nvme_health_information_page)}, + {NVME_LOG_FIRMWARE_SLOT, NULL, "Firmware Information", + print_log_firmware, sizeof(struct nvme_firmware_page)}, + {HGST_INFO_LOG, "hgst", "Detailed Health/SMART", + print_hgst_info_log, DEFAULT_SIZE}, + {HGST_INFO_LOG, "wds", "Detailed Health/SMART", + print_hgst_info_log, DEFAULT_SIZE}, + {INTEL_LOG_TEMP_STATS, "intel", "Temperature Stats", + print_intel_temp_stats, sizeof(struct intel_log_temp_stats)}, + {INTEL_LOG_READ_LAT_LOG, "intel", "Read Latencies", + print_intel_read_lat_log, DEFAULT_SIZE}, + {INTEL_LOG_WRITE_LAT_LOG, "intel", "Write Latencies", + print_intel_write_lat_log, DEFAULT_SIZE}, + {INTEL_LOG_ADD_SMART, "intel", "Extra Health/SMART Data", + print_intel_add_smart, DEFAULT_SIZE}, + {INTEL_LOG_ADD_SMART, "samsung", "Extra Health/SMART Data", + print_intel_add_smart, DEFAULT_SIZE}, + + {0, NULL, NULL, NULL, 0}, }; static void @@ -873,6 +878,23 @@ logpage_usage(void) exit(1); } +static void +logpage_help(void) +{ + struct logpage_function *f; + const char *v; + + fprintf(stderr, "\n"); + fprintf(stderr, "%-8s %-10s %s\n", "Page", "Vendor","Page Name"); + fprintf(stderr, "-------- ---------- ----------\n"); + for (f = logfuncs; f->log_page > 0; f++) { + v = f->vendor == NULL ? "-" : f->vendor; + fprintf(stderr, "0x%02x %-10s %s\n", f->log_page, v, f->name); + } + + exit(1); +} + void logpage(int argc, char *argv[]) { @@ -894,6 +916,9 @@ logpage(int argc, char *argv[]) binflag = true; break; case 'p': + if (strcmp(optarg, "help") == 0) + logpage_help(); + /* TODO: Add human-readable ASCII page IDs */ log_page = strtol(optarg, &p, 0); if (p != NULL && *p != '\0') { @@ -908,6 +933,8 @@ logpage(int argc, char *argv[]) hexflag = true; break; case 'v': + if (strcmp(optarg, "help") == 0) + logpage_help(); vendor = optarg; break; } Modified: projects/clang400-import/sbin/nvmecontrol/nvmecontrol.8 ============================================================================== --- projects/clang400-import/sbin/nvmecontrol/nvmecontrol.8 Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/sbin/nvmecontrol/nvmecontrol.8 Sat Feb 25 15:04:19 2017 (r314270) @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 4, 2017 +.Dd February 24, 2017 .Dt NVMECONTROL 8 .Os .Sh NAME @@ -108,6 +108,15 @@ Page 0xc1 is read latency stats for inte Page 0xc2 is write latency stats for intel. Page 0xc5 is temperature stats for intel. Page 0xca is advanced smart information for intel. +.Pp +Specifying +.Fl p +.Ic help +will list all valid vendors and pages. +.Fl x +will print the page as hex. +.Fl b +will print the binary data for the page. .Ss wdc The various wdc command retrieve log data from the wdc/hgst drives. The Modified: projects/clang400-import/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- projects/clang400-import/sbin/nvmecontrol/nvmecontrol.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/sbin/nvmecontrol/nvmecontrol.c Sat Feb 25 15:04:19 2017 (r314270) @@ -75,6 +75,11 @@ dispatch(int argc, char *argv[], struct { struct nvme_function *f = tbl; + if (argv[1] == NULL) { + gen_usage(tbl); + return; + } + while (f->name != NULL) { if (strcmp(argv[1], f->name) == 0) f->fn(argc-1, &argv[1]); Modified: projects/clang400-import/sbin/nvmecontrol/nvmecontrol.h ============================================================================== --- projects/clang400-import/sbin/nvmecontrol/nvmecontrol.h Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/sbin/nvmecontrol/nvmecontrol.h Sat Feb 25 15:04:19 2017 (r314270) @@ -58,7 +58,7 @@ struct nvme_function { " nvmecontrol reset \n" #define LOGPAGE_USAGE \ -" nvmecontrol logpage <-p page_id> [-x] \n" \ +" nvmecontrol logpage <-p page_id> [-b] [-v vendor] [-x] \n" \ #define FIRMWARE_USAGE \ " nvmecontrol firmware [-s slot] [-f path_to_firmware] [-a] \n" Modified: projects/clang400-import/share/man/man3/pthread_testcancel.3 ============================================================================== --- projects/clang400-import/share/man/man3/pthread_testcancel.3 Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/share/man/man3/pthread_testcancel.3 Sat Feb 25 15:04:19 2017 (r314270) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd August 16, 2016 +.Dd February 17, 2017 .Dt PTHREAD_TESTCANCEL 3 .Os .Sh NAME @@ -120,9 +120,9 @@ is The .Fn kevent function is a cancellation point if it is potentially blocking, -i.e. when the +such as when the .Fa nevents -argument is non-zero. +argument is non-zero. .It Fn mq_receive .It Fn mq_send .It Fn mq_timedreceive @@ -146,6 +146,7 @@ argument is non-zero. .It Fn recvmsg .It Fn select .It Fn sem_timedwait +.It Fn sem_clockwait_np .It Fn sem_wait .It Fn send .It Fn sendmsg Modified: projects/clang400-import/share/man/man4/Makefile ============================================================================== --- projects/clang400-import/share/man/man4/Makefile Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/share/man/man4/Makefile Sat Feb 25 15:04:19 2017 (r314270) @@ -104,6 +104,7 @@ MAN= aac.4 \ cfi.4 \ cfumass.4 \ ch.4 \ + chromebook_platform.4 \ ciss.4 \ cloudabi.4 \ cm.4 \ @@ -241,6 +242,7 @@ MAN= aac.4 \ ixgbe.4 \ ixl.4 \ ixlv.4 \ + jedec_ts.4 \ jme.4 \ joy.4 \ kbdmux.4 \ Modified: projects/clang400-import/sys/amd64/linux/linux_dummy.c ============================================================================== --- projects/clang400-import/sys/amd64/linux/linux_dummy.c Sat Feb 25 15:00:57 2017 (r314269) +++ projects/clang400-import/sys/amd64/linux/linux_dummy.c Sat Feb 25 15:04:19 2017 (r314270) @@ -110,9 +110,6 @@ DUMMY(timerfd_gettime); /* linux 2.6.27: */ DUMMY(signalfd4); DUMMY(inotify_init1); -/* linux 2.6.30: */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@freebsd.org Sat Feb 25 22:58:30 2017 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 31F4BCED9AE for ; Sat, 25 Feb 2017 22:58:30 +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 mx1.freebsd.org (Postfix) with ESMTPS id CE81E7D5; Sat, 25 Feb 2017 22:58:29 +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 v1PMwS4H080963; Sat, 25 Feb 2017 22:58:28 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PMwStZ080962; Sat, 25 Feb 2017 22:58:28 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702252258.v1PMwStZ080962@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 22:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r314284 - in projects/clang400-import: contrib/compiler-rt contrib/dma sys/contrib/dev/acpica X-SVN-Group: projects 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.23 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, 25 Feb 2017 22:58:30 -0000 Author: dim Date: Sat Feb 25 22:58:28 2017 New Revision: 314284 URL: https://svnweb.freebsd.org/changeset/base/314284 Log: Fixup some mergeinfo, which svn has managed to omit. Modified: Directory Properties: projects/clang400-import/contrib/compiler-rt/ (props changed) projects/clang400-import/contrib/dma/ (props changed) projects/clang400-import/sys/contrib/dev/acpica/ (props changed) From owner-svn-src-projects@freebsd.org Sat Feb 25 23:06:12 2017 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 5DCF7CEDD74 for ; Sat, 25 Feb 2017 23:06:12 +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 mx1.freebsd.org (Postfix) with ESMTPS id 119F6DB5; Sat, 25 Feb 2017 23:06:11 +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 v1PN6B5V084853; Sat, 25 Feb 2017 23:06:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1PN6B4r084852; Sat, 25 Feb 2017 23:06:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702252306.v1PN6B4r084852@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 25 Feb 2017 23:06:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r314285 - in projects/clang400-import: contrib/dma sys/contrib/dev/acpica X-SVN-Group: projects 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.23 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, 25 Feb 2017 23:06:12 -0000 Author: dim Date: Sat Feb 25 23:06:10 2017 New Revision: 314285 URL: https://svnweb.freebsd.org/changeset/base/314285 Log: More mergeinfo fixing-up. Modified: Directory Properties: projects/clang400-import/contrib/dma/ (props changed) projects/clang400-import/sys/contrib/dev/acpica/ (props changed)