From owner-svn-src-projects@FreeBSD.ORG Mon Mar 9 21:31:38 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 598ECDEF; Mon, 9 Mar 2015 21:31:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 443288C; Mon, 9 Mar 2015 21:31:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t29LVcAi056420; Mon, 9 Mar 2015 21:31:38 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t29LVceb056418; Mon, 9 Mar 2015 21:31:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503092131.t29LVceb056418@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Mar 2015 21:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279823 - projects/clang360-import/contrib/llvm/patches 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.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2015 21:31:38 -0000 Author: dim Date: Mon Mar 9 21:31:37 2015 New Revision: 279823 URL: https://svnweb.freebsd.org/changeset/base/279823 Log: Update README for the 3.6.0 release. Modified: projects/clang360-import/contrib/llvm/patches/README.TXT Modified: projects/clang360-import/contrib/llvm/patches/README.TXT ============================================================================== --- projects/clang360-import/contrib/llvm/patches/README.TXT Mon Mar 9 20:43:14 2015 (r279822) +++ projects/clang360-import/contrib/llvm/patches/README.TXT Mon Mar 9 21:31:37 2015 (r279823) @@ -1,11 +1,11 @@ This is a set of individual patches, which contain all the customizations to llvm/clang currently in the FreeBSD base system. These can be applied in -alphabetical order to a pristine llvm/clang 3.6.0 RC4 source tree, for example -by doing: +alphabetical order to a pristine llvm/clang 3.6.0 source tree, for example by +doing: -svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc4 llvm-3.6.0-rc4 -svn co https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc4 llvm-3.6.0-rc4/tools/clang -cd llvm-3.6.0-rc4 +svn co https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/final llvm-3.6.0 +svn co https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/final llvm-3.6.0/tools/clang +cd llvm-3.6.0 for p in /usr/src/contrib/llvm/patches/patch-*.diff; do patch -p0 -f -F0 -E -i $p -s || break done From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 04:47:48 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1261413C; Wed, 11 Mar 2015 04:47:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2820BC0; Wed, 11 Mar 2015 04:47:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2B4llOe059986; Wed, 11 Mar 2015 04:47:47 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2B4ll3F059984; Wed, 11 Mar 2015 04:47:47 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503110447.t2B4ll3F059984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 11 Mar 2015 04:47:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279870 - in projects/cxl_iscsi/sys/modules/cxgbe: . cxgbei 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.18-1 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: Wed, 11 Mar 2015 04:47:48 -0000 Author: np Date: Wed Mar 11 04:47:46 2015 New Revision: 279870 URL: https://svnweb.freebsd.org/changeset/base/279870 Log: Improved compliance with style.Makefile(5). Modified: projects/cxl_iscsi/sys/modules/cxgbe/Makefile projects/cxl_iscsi/sys/modules/cxgbe/cxgbei/Makefile Modified: projects/cxl_iscsi/sys/modules/cxgbe/Makefile ============================================================================== --- projects/cxl_iscsi/sys/modules/cxgbe/Makefile Wed Mar 11 00:01:39 2015 (r279869) +++ projects/cxl_iscsi/sys/modules/cxgbe/Makefile Wed Mar 11 04:47:46 2015 (r279870) @@ -11,11 +11,11 @@ SUBDIR+= t4_firmware SUBDIR+= t5_firmware SUBDIR+= ${_tom} SUBDIR+= ${_iw_cxgbe} -SUBDIR+= ${_cxgbei} +SUBDIR+= ${_cxgbei} .if ${MACHINE_CPUARCH} == "amd64" _tom= tom -_cxgbei= cxgbei +_cxgbei= cxgbei .if ${MK_OFED} != "no" || defined(ALL_MODULES) _iw_cxgbe= iw_cxgbe .endif Modified: projects/cxl_iscsi/sys/modules/cxgbe/cxgbei/Makefile ============================================================================== --- projects/cxl_iscsi/sys/modules/cxgbe/cxgbei/Makefile Wed Mar 11 00:01:39 2015 (r279869) +++ projects/cxl_iscsi/sys/modules/cxgbe/cxgbei/Makefile Wed Mar 11 04:47:46 2015 (r279870) @@ -1,20 +1,19 @@ # $FreeBSD$ -CXGBEI = ${.CURDIR}/../../../dev/cxgbe/cxgbei CXGBE = ${.CURDIR}/../../../dev/cxgbe -.PATH: ${CXGBEI} ${CXGBE}/common +.PATH: ${CXGBE}/cxgbei KMOD= cxgbei -SRCS= cxgbei.c -SRCS+= cxgbei_ulp2_ddp.c -SRCS+= icl_cxgbei.c -SRCS+= bus_if.h -SRCS+= device_if.h -SRCS+= opt_inet.h -SRCS+= opt_inet6.h -SRCS+= opt_ofed.h -SRCS+= pci_if.h +SRCS= cxgbei.c +SRCS+= cxgbei_ulp2_ddp.c +SRCS+= icl_cxgbei.c +SRCS+= bus_if.h +SRCS+= device_if.h +SRCS+= opt_inet.h +SRCS+= opt_inet6.h +SRCS+= opt_ofed.h +SRCS+= pci_if.h SRCS+= opt_cam.h SRCS+= icl_conn_if.h From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 04:49:32 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AFF0235; Wed, 11 Mar 2015 04:49:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D8EDBCC; Wed, 11 Mar 2015 04:49:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2B4nVYR060223; Wed, 11 Mar 2015 04:49:31 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2B4nVRZ060217; Wed, 11 Mar 2015 04:49:31 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503110449.t2B4nVRZ060217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 11 Mar 2015 04:49:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279871 - projects/cxl_iscsi/sys/dev/cxgbe/cxgbei 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.18-1 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: Wed, 11 Mar 2015 04:49:32 -0000 Author: np Date: Wed Mar 11 04:49:30 2015 New Revision: 279871 URL: https://svnweb.freebsd.org/changeset/base/279871 Log: Add FBSDID, and include opt_inet and opt_inet6 in all C files. Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Mar 11 04:47:46 2015 (r279870) +++ projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c Wed Mar 11 04:49:30 2015 (r279871) @@ -28,7 +28,11 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "opt_inet.h" +#include "opt_inet6.h" #include #include Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c Wed Mar 11 04:47:46 2015 (r279870) +++ projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c Wed Mar 11 04:49:30 2015 (r279871) @@ -27,7 +27,12 @@ * SUCH DAMAGE. */ +#include +__FBSDID("$FreeBSD$"); + #include "opt_inet.h" +#include "opt_inet6.h" + #include #include #include Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/icl_cxgbei.c ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Wed Mar 11 04:47:46 2015 (r279870) +++ projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/icl_cxgbei.c Wed Mar 11 04:49:30 2015 (r279871) @@ -35,6 +35,9 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_inet.h" +#include "opt_inet6.h" + #include #include #include From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 05:54:15 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 033C67B3; Wed, 11 Mar 2015 05:54:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E36CB1D5; Wed, 11 Mar 2015 05:54:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2B5sEsO091820; Wed, 11 Mar 2015 05:54:14 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2B5sEIO091819; Wed, 11 Mar 2015 05:54:14 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503110554.t2B5sEIO091819@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 11 Mar 2015 05:54:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279872 - projects/cxl_iscsi/sys/dev/iscsi 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.18-1 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: Wed, 11 Mar 2015 05:54:15 -0000 Author: np Date: Wed Mar 11 05:54:14 2015 New Revision: 279872 URL: https://svnweb.freebsd.org/changeset/base/279872 Log: Add a field to struct icl_conn for per-connection offload driver state. Modified: projects/cxl_iscsi/sys/dev/iscsi/icl.h Modified: projects/cxl_iscsi/sys/dev/iscsi/icl.h ============================================================================== --- projects/cxl_iscsi/sys/dev/iscsi/icl.h Wed Mar 11 04:49:30 2015 (r279871) +++ projects/cxl_iscsi/sys/dev/iscsi/icl.h Wed Mar 11 05:54:14 2015 (r279872) @@ -123,6 +123,7 @@ struct icl_conn { * User (initiator or provider) private fields. */ void *ic_prv0; + void *ic_ofld_prv0; }; struct icl_conn *icl_new_conn(const char *offload, const char *name, From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 06:06:25 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F152493B; Wed, 11 Mar 2015 06:06:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD4902EA; Wed, 11 Mar 2015 06:06:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2B66Pfr096815; Wed, 11 Mar 2015 06:06:25 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2B66PGa096813; Wed, 11 Mar 2015 06:06:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503110606.t2B66PGa096813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Wed, 11 Mar 2015 06:06:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279873 - projects/cxl_iscsi/sys/dev/cxgbe 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.18-1 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: Wed, 11 Mar 2015 06:06:26 -0000 Author: np Date: Wed Mar 11 06:06:24 2015 New Revision: 279873 URL: https://svnweb.freebsd.org/changeset/base/279873 Log: t4_iscsi_init sets up global chip registers. Make sure it doesn't give the impression that it's doing something port or ifnet specific. Modified: projects/cxl_iscsi/sys/dev/cxgbe/offload.h projects/cxl_iscsi/sys/dev/cxgbe/t4_main.c Modified: projects/cxl_iscsi/sys/dev/cxgbe/offload.h ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/offload.h Wed Mar 11 05:54:14 2015 (r279872) +++ projects/cxl_iscsi/sys/dev/cxgbe/offload.h Wed Mar 11 06:06:24 2015 (r279873) @@ -156,7 +156,7 @@ int t4_register_uld(struct uld_info *); int t4_unregister_uld(struct uld_info *); int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); -void t4_iscsi_init(struct ifnet *, unsigned int, const unsigned int *); +void t4_iscsi_init(struct adapter *, u_int, const u_int *); int uld_active(struct adapter *, int); #endif #endif Modified: projects/cxl_iscsi/sys/dev/cxgbe/t4_main.c ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/t4_main.c Wed Mar 11 05:54:14 2015 (r279872) +++ projects/cxl_iscsi/sys/dev/cxgbe/t4_main.c Wed Mar 11 06:06:24 2015 (r279873) @@ -8190,11 +8190,8 @@ t4_ioctl(struct cdev *dev, unsigned long #ifdef TCP_OFFLOAD void -t4_iscsi_init(struct ifnet *ifp, unsigned int tag_mask, - const unsigned int *pgsz_order) +t4_iscsi_init(struct adapter *sc, u_int tag_mask, const u_int *pgsz_order) { - struct port_info *pi = ifp->if_softc; - struct adapter *sc = pi->adapter; t4_write_reg(sc, A_ULP_RX_ISCSI_TAGMASK, tag_mask); t4_write_reg(sc, A_ULP_RX_ISCSI_PSZ, V_HPZ0(pgsz_order[0]) | From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 10:43:16 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D659DB05; Wed, 11 Mar 2015 10:43:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A928C759; Wed, 11 Mar 2015 10:43:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2BAhFoK028287; Wed, 11 Mar 2015 10:43:15 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2BAhFCF028283; Wed, 11 Mar 2015 10:43:15 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503111043.t2BAhFCF028283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 11 Mar 2015 10:43:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279882 - in projects/ifnet/sys/dev: bge msk xl 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.18-1 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: Wed, 11 Mar 2015 10:43:16 -0000 Author: glebius Date: Wed Mar 11 10:43:14 2015 New Revision: 279882 URL: https://svnweb.freebsd.org/changeset/base/279882 Log: For now use consistent softc lock in drivers transmit methods, due to a theoretical race condition. Note that the condition exists in all drbr(9) based drivers in head, but never was evidenced. Nevertheless, leave this branch for KPI redesign instead of performance experiments. Discussed with: jhb Modified: projects/ifnet/sys/dev/bge/if_bge.c projects/ifnet/sys/dev/msk/if_msk.c projects/ifnet/sys/dev/xl/if_xl.c Modified: projects/ifnet/sys/dev/bge/if_bge.c ============================================================================== --- projects/ifnet/sys/dev/bge/if_bge.c Wed Mar 11 09:54:03 2015 (r279881) +++ projects/ifnet/sys/dev/bge/if_bge.c Wed Mar 11 10:43:14 2015 (r279882) @@ -5398,8 +5398,7 @@ bge_transmit(if_t ifp, struct mbuf *m) return (error); sc = if_getsoftc(ifp, IF_DRIVER_SOFTC); - if (BGE_TRYLOCK(sc) == 0) - return (0); + BGE_LOCK(sc); error = bge_start_locked(sc); BGE_UNLOCK(sc); return (error); Modified: projects/ifnet/sys/dev/msk/if_msk.c ============================================================================== --- projects/ifnet/sys/dev/msk/if_msk.c Wed Mar 11 09:54:03 2015 (r279881) +++ projects/ifnet/sys/dev/msk/if_msk.c Wed Mar 11 10:43:14 2015 (r279882) @@ -2894,8 +2894,7 @@ msk_transmit(if_t ifp, struct mbuf *m) return (error); sc_if = if_getsoftc(ifp, IF_DRIVER_SOFTC); - if (MSK_IF_TRYLOCK(sc_if) == 0) - return (0); + MSK_IF_LOCK(sc_if); error = msk_start(sc_if); MSK_IF_UNLOCK(sc_if); return (error); Modified: projects/ifnet/sys/dev/xl/if_xl.c ============================================================================== --- projects/ifnet/sys/dev/xl/if_xl.c Wed Mar 11 09:54:03 2015 (r279881) +++ projects/ifnet/sys/dev/xl/if_xl.c Wed Mar 11 10:43:14 2015 (r279882) @@ -2414,8 +2414,7 @@ xl_transmit(if_t ifp, struct mbuf *m) return (error); sc = if_getsoftc(ifp, IF_DRIVER_SOFTC); - if (XL_TRY_LOCK(sc) == 0) - return (0); + XL_LOCK(sc); if (sc->xl_type == XL_TYPE_905B) xl_start_90xB_locked(sc); else From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 11:17:18 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5158F31C; Wed, 11 Mar 2015 11:17:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38688A71; Wed, 11 Mar 2015 11:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2BBHIZR042952; Wed, 11 Mar 2015 11:17:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2BBHAM3042918; Wed, 11 Mar 2015 11:17:10 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503111117.t2BBHAM3042918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 11 Mar 2015 11:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279883 - in projects/ifnet: . cddl/contrib/dtracetoolkit/Proc cddl/contrib/opensolaris/common/ctf cddl/contrib/opensolaris/tools/ctf/cvt contrib/libc++/include contrib/tzdata 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.18-1 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: Wed, 11 Mar 2015 11:17:18 -0000 Author: glebius Date: Wed Mar 11 11:17:09 2015 New Revision: 279883 URL: https://svnweb.freebsd.org/changeset/base/279883 Log: Merge head r257698 through r279882. Added: projects/ifnet/lib/libpmc/pmc.haswellxeon.3 - copied unchanged from r279882, head/lib/libpmc/pmc.haswellxeon.3 projects/ifnet/lib/libstand/powerpc/syncicache.c - copied unchanged from r279882, head/lib/libstand/powerpc/syncicache.c projects/ifnet/share/dtrace/tcpconn - copied unchanged from r279882, head/share/dtrace/tcpconn projects/ifnet/share/dtrace/tcpstate - copied unchanged from r279882, head/share/dtrace/tcpstate projects/ifnet/share/dtrace/tcptrack - copied unchanged from r279882, head/share/dtrace/tcptrack projects/ifnet/share/dtrace/udptrack - copied unchanged from r279882, head/share/dtrace/udptrack projects/ifnet/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c - copied unchanged from r279882, head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c projects/ifnet/sys/boot/powerpc/ofw/ofwfdt.c - copied unchanged from r279882, head/sys/boot/powerpc/ofw/ofwfdt.c projects/ifnet/sys/dev/uart/uart_cpu_fdt.h - copied unchanged from r279882, head/sys/dev/uart/uart_cpu_fdt.h projects/ifnet/sys/dev/usb/controller/dwc_otg_fdt.h - copied unchanged from r279882, head/sys/dev/usb/controller/dwc_otg_fdt.h projects/ifnet/sys/modules/dtb/am335x/ - copied from r279882, head/sys/modules/dtb/am335x/ projects/ifnet/sys/sys/gzio.h - copied unchanged from r279882, head/sys/sys/gzio.h projects/ifnet/usr.bin/procstat/procstat_cs.c - copied unchanged from r279882, head/usr.bin/procstat/procstat_cs.c Modified: projects/ifnet/UPDATING projects/ifnet/cddl/contrib/dtracetoolkit/Proc/pidpersec.d projects/ifnet/cddl/contrib/opensolaris/common/ctf/ctf_create.c projects/ifnet/cddl/contrib/opensolaris/tools/ctf/cvt/output.c projects/ifnet/contrib/libc++/include/__bit_reference projects/ifnet/contrib/libc++/include/__tree projects/ifnet/contrib/libc++/include/algorithm projects/ifnet/contrib/tzdata/antarctica projects/ifnet/contrib/tzdata/asia projects/ifnet/contrib/tzdata/backward projects/ifnet/contrib/tzdata/europe projects/ifnet/contrib/tzdata/leap-seconds.list projects/ifnet/contrib/tzdata/northamerica projects/ifnet/contrib/tzdata/southamerica projects/ifnet/contrib/tzdata/zone.tab projects/ifnet/contrib/tzdata/zone1970.tab projects/ifnet/lib/libc/gen/getpwent.c projects/ifnet/lib/libc/net/sctp_sys_calls.c projects/ifnet/lib/libc/powerpc/gen/_setjmp.S projects/ifnet/lib/libc/powerpc/gen/setjmp.S projects/ifnet/lib/libc/powerpc/gen/sigsetjmp.S projects/ifnet/lib/libc/powerpc64/gen/_setjmp.S projects/ifnet/lib/libc/powerpc64/gen/setjmp.S projects/ifnet/lib/libc/powerpc64/gen/sigsetjmp.S projects/ifnet/lib/libc/sys/cap_ioctls_limit.2 projects/ifnet/lib/libgpio/gpio.3 projects/ifnet/lib/libgpio/gpio.c projects/ifnet/lib/libgpio/libgpio.h projects/ifnet/lib/libnv/tests/dnv_tests.cc projects/ifnet/lib/libnv/tests/nv_tests.cc projects/ifnet/lib/libpmc/libpmc.c projects/ifnet/lib/libpmc/pmc.3 projects/ifnet/lib/libpmc/pmc.haswell.3 projects/ifnet/lib/libpmc/pmc.ivybridge.3 projects/ifnet/lib/libpmc/pmc.ivybridgexeon.3 projects/ifnet/lib/libpmc/pmc.sandybridge.3 projects/ifnet/lib/libpmc/pmc.sandybridgexeon.3 projects/ifnet/lib/libstand/Makefile projects/ifnet/lib/libstand/powerpc/_setjmp.S projects/ifnet/lib/libthr/thread/thr_private.h projects/ifnet/lib/msun/man/j0.3 projects/ifnet/lib/msun/src/e_j0.c projects/ifnet/lib/msun/src/e_j0f.c projects/ifnet/lib/msun/src/e_j1.c projects/ifnet/lib/msun/src/e_j1f.c projects/ifnet/lib/msun/src/e_jn.c projects/ifnet/lib/msun/src/e_jnf.c projects/ifnet/sbin/ifconfig/af_inet6.c projects/ifnet/sbin/ifconfig/af_nd6.c projects/ifnet/sbin/ifconfig/ifconfig.8 projects/ifnet/share/dtrace/Makefile projects/ifnet/share/man/man4/Makefile projects/ifnet/share/man/man4/ds3231.4 projects/ifnet/share/man/man5/core.5 projects/ifnet/share/man/man9/SDT.9 projects/ifnet/share/man/man9/VOP_VPTOCNP.9 projects/ifnet/share/misc/committers-src.dot projects/ifnet/sys/amd64/amd64/mp_machdep.c projects/ifnet/sys/amd64/vmm/io/vatpic.c projects/ifnet/sys/arm/arm/cpufunc_asm_armv7.S projects/ifnet/sys/arm/arm/cpuinfo.c projects/ifnet/sys/arm/arm/genassym.c projects/ifnet/sys/arm/arm/physmem.c projects/ifnet/sys/arm/at91/uart_bus_at91usart.c projects/ifnet/sys/arm/at91/uart_cpu_at91usart.c projects/ifnet/sys/arm/at91/uart_dev_at91usart.c projects/ifnet/sys/arm/broadcom/bcm2835/bcm2835_fb.c projects/ifnet/sys/arm/broadcom/bcm2835/bcm2835_fbd.c projects/ifnet/sys/arm/broadcom/bcm2835/files.bcm2835 projects/ifnet/sys/arm/conf/ARMADAXP projects/ifnet/sys/arm/conf/BEAGLEBONE projects/ifnet/sys/arm/conf/CUBIEBOARD projects/ifnet/sys/arm/conf/CUBIEBOARD2 projects/ifnet/sys/arm/conf/DB-78XXX projects/ifnet/sys/arm/conf/DB-88F5XXX projects/ifnet/sys/arm/conf/DB-88F6XXX projects/ifnet/sys/arm/conf/DOCKSTAR projects/ifnet/sys/arm/conf/DREAMPLUG-1001 projects/ifnet/sys/arm/conf/EXYNOS5.common projects/ifnet/sys/arm/conf/PANDABOARD projects/ifnet/sys/arm/conf/SHEEVAPLUG projects/ifnet/sys/arm/conf/TS7800 projects/ifnet/sys/arm/conf/VYBRID projects/ifnet/sys/arm/conf/ZEDBOARD projects/ifnet/sys/arm/freescale/vybrid/vf_uart.c projects/ifnet/sys/arm/include/cpu-v6.h projects/ifnet/sys/arm/include/cpuinfo.h projects/ifnet/sys/arm/samsung/exynos/exynos_uart.c projects/ifnet/sys/arm/samsung/s3c2xx0/uart_bus_s3c2410.c projects/ifnet/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c projects/ifnet/sys/arm/ti/aintc.c projects/ifnet/sys/arm/ti/am335x/am335x_dmtimer.c projects/ifnet/sys/arm/ti/omap4/omap4_prcm_clks.c projects/ifnet/sys/arm/xilinx/uart_dev_cdnc.c projects/ifnet/sys/arm/xilinx/zy7_devcfg.c projects/ifnet/sys/arm/xilinx/zy7_slcr.c projects/ifnet/sys/arm/xilinx/zy7_slcr.h projects/ifnet/sys/boot/amd64/boot1.efi/boot1.c projects/ifnet/sys/boot/libstand32/Makefile projects/ifnet/sys/boot/ofw/common/main.c projects/ifnet/sys/boot/ofw/libofw/elf_freebsd.c projects/ifnet/sys/boot/ofw/libofw/openfirm.c projects/ifnet/sys/boot/ofw/libofw/openfirm.h projects/ifnet/sys/boot/ofw/libofw/ppc64_elf_freebsd.c projects/ifnet/sys/boot/powerpc/ofw/Makefile projects/ifnet/sys/boot/powerpc/ofw/metadata.c projects/ifnet/sys/boot/sparc64/loader/metadata.c projects/ifnet/sys/cam/scsi/scsi_da.c projects/ifnet/sys/cddl/dev/dtrace/arm/dtrace_subr.c projects/ifnet/sys/conf/Makefile.powerpc projects/ifnet/sys/conf/NOTES projects/ifnet/sys/conf/options projects/ifnet/sys/dev/acpica/acpi.c projects/ifnet/sys/dev/bge/if_bge.c projects/ifnet/sys/dev/cadence/if_cgem.c projects/ifnet/sys/dev/cxgbe/t4_netmap.c projects/ifnet/sys/dev/etherswitch/arswitch/arswitch.c projects/ifnet/sys/dev/etherswitch/arswitch/arswitch_8327.c projects/ifnet/sys/dev/etherswitch/arswitch/arswitch_phy.c projects/ifnet/sys/dev/etherswitch/arswitch/arswitch_phy.h projects/ifnet/sys/dev/etherswitch/arswitch/arswitch_reg.c projects/ifnet/sys/dev/etherswitch/arswitch/arswitch_vlans.c projects/ifnet/sys/dev/etherswitch/arswitch/arswitch_vlans.h projects/ifnet/sys/dev/etherswitch/arswitch/arswitchreg.h projects/ifnet/sys/dev/etherswitch/arswitch/arswitchvar.h projects/ifnet/sys/dev/fb/fbd.c projects/ifnet/sys/dev/gpio/gpiobus.c projects/ifnet/sys/dev/gpio/gpiobus_if.m projects/ifnet/sys/dev/gpio/gpiobusvar.h projects/ifnet/sys/dev/gpio/gpioc.c projects/ifnet/sys/dev/gpio/ofw_gpiobus.c projects/ifnet/sys/dev/hwpmc/hwpmc_core.c projects/ifnet/sys/dev/hwpmc/pmc_events.h projects/ifnet/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c projects/ifnet/sys/dev/iicbus/ds3231.c projects/ifnet/sys/dev/iicbus/lm75.c projects/ifnet/sys/dev/ixgbe/ixgbe.c projects/ifnet/sys/dev/ixl/i40e_adminq_cmd.h projects/ifnet/sys/dev/ixl/i40e_common.c projects/ifnet/sys/dev/ixl/i40e_prototype.h projects/ifnet/sys/dev/ixl/i40e_type.h projects/ifnet/sys/dev/ixl/if_ixl.c projects/ifnet/sys/dev/ixl/if_ixlv.c projects/ifnet/sys/dev/ixl/ixl.h projects/ifnet/sys/dev/ixl/ixl_pf.h projects/ifnet/sys/dev/ixl/ixl_txrx.c projects/ifnet/sys/dev/ixl/ixlv.h projects/ifnet/sys/dev/ixl/ixlvc.c projects/ifnet/sys/dev/mps/mps_sas.c projects/ifnet/sys/dev/pci/pci_iov.c projects/ifnet/sys/dev/uart/uart.h projects/ifnet/sys/dev/uart/uart_bus_fdt.c projects/ifnet/sys/dev/uart/uart_cpu_fdt.c projects/ifnet/sys/dev/uart/uart_dev_imx.c projects/ifnet/sys/dev/uart/uart_dev_lpc.c projects/ifnet/sys/dev/uart/uart_dev_msm.c projects/ifnet/sys/dev/uart/uart_dev_ns8250.c projects/ifnet/sys/dev/uart/uart_dev_pl011.c projects/ifnet/sys/dev/uart/uart_dev_ti8250.c projects/ifnet/sys/dev/uart/uart_subr.c projects/ifnet/sys/dev/usb/controller/dwc_otg_fdt.c projects/ifnet/sys/dev/usb/input/uhid.c projects/ifnet/sys/dev/usb/quirk/usb_quirk.c projects/ifnet/sys/dev/usb/serial/u3g.c projects/ifnet/sys/dev/usb/serial/usb_serial.c projects/ifnet/sys/dev/usb/serial/usb_serial.h projects/ifnet/sys/dev/usb/usbdevs projects/ifnet/sys/dev/usb/video/udl.c projects/ifnet/sys/dev/vt/hw/fb/vt_fb.c projects/ifnet/sys/dev/vt/hw/ofwfb/ofwfb.c projects/ifnet/sys/dev/wpi/if_wpi.c projects/ifnet/sys/i386/i386/mp_machdep.c projects/ifnet/sys/kern/imgact_elf.c projects/ifnet/sys/kern/kern_gzio.c projects/ifnet/sys/kern/kern_sig.c projects/ifnet/sys/kern/kern_tc.c projects/ifnet/sys/kern/link_elf.c projects/ifnet/sys/kern/subr_bus.c projects/ifnet/sys/mips/atheros/if_arge.c projects/ifnet/sys/mips/conf/AP135.hints projects/ifnet/sys/modules/Makefile projects/ifnet/sys/modules/dtrace/dtraceall/dtraceall.c projects/ifnet/sys/net/zlib.h projects/ifnet/sys/netinet/if_ether.c projects/ifnet/sys/netinet/sctp.h projects/ifnet/sys/netinet/sctp_cc_functions.c projects/ifnet/sys/netinet/sctp_input.c projects/ifnet/sys/netinet/sctp_pcb.c projects/ifnet/sys/netinet/sctp_pcb.h projects/ifnet/sys/netinet/sctp_peeloff.c projects/ifnet/sys/netinet/sctp_structs.h projects/ifnet/sys/netinet/sctp_timer.c projects/ifnet/sys/netinet/sctp_usrreq.c projects/ifnet/sys/netinet/sctputil.c projects/ifnet/sys/netinet/tcp_usrreq.c projects/ifnet/sys/netinet6/in6.c projects/ifnet/sys/netinet6/in6_pcb.c projects/ifnet/sys/netinet6/nd6.h projects/ifnet/sys/netinet6/nd6_nbr.c projects/ifnet/sys/netipsec/key.c projects/ifnet/sys/ofed/drivers/net/mlx4/en_netdev.c projects/ifnet/sys/powerpc/aim/locore32.S projects/ifnet/sys/powerpc/aim/machdep.c projects/ifnet/sys/powerpc/aim/trap_subr32.S projects/ifnet/sys/powerpc/aim/trap_subr64.S projects/ifnet/sys/powerpc/booke/locore.S projects/ifnet/sys/powerpc/booke/pmap.c projects/ifnet/sys/powerpc/booke/trap_subr.S projects/ifnet/sys/powerpc/ofw/ofwcall32.S projects/ifnet/sys/powerpc/powermac/platform_powermac.c projects/ifnet/sys/powerpc/powerpc/elf32_machdep.c projects/ifnet/sys/powerpc/powerpc/swtch32.S projects/ifnet/sys/powerpc/powerpc/syncicache.c projects/ifnet/sys/powerpc/ps3/ps3_syscons.c projects/ifnet/sys/sys/buf.h projects/ifnet/sys/sys/bus.h projects/ifnet/sys/sys/elf_common.h projects/ifnet/sys/sys/gpio.h projects/ifnet/sys/sys/param.h projects/ifnet/sys/sys/timepps.h projects/ifnet/sys/vm/vm_object.c projects/ifnet/sys/vm/vm_pager.c projects/ifnet/sys/vm/vm_reserv.c projects/ifnet/sys/vm/vnode_pager.c projects/ifnet/tools/regression/usr.bin/env/regress-env.rgdata projects/ifnet/tools/regression/usr.bin/env/regress-sb.rb projects/ifnet/usr.bin/ctlstat/ctlstat.8 projects/ifnet/usr.bin/env/envopts.c projects/ifnet/usr.bin/m4/misc.c projects/ifnet/usr.bin/procstat/Makefile projects/ifnet/usr.bin/procstat/procstat.1 projects/ifnet/usr.bin/procstat/procstat.c projects/ifnet/usr.bin/procstat/procstat.h projects/ifnet/usr.bin/rlogin/rlogin.c projects/ifnet/usr.bin/touch/touch.1 projects/ifnet/usr.bin/w/w.c projects/ifnet/usr.sbin/autofs/automount.c projects/ifnet/usr.sbin/autofs/automountd.8 projects/ifnet/usr.sbin/autofs/automountd.c projects/ifnet/usr.sbin/autofs/common.c projects/ifnet/usr.sbin/autofs/common.h projects/ifnet/usr.sbin/autofs/popen.c projects/ifnet/usr.sbin/bhyve/pci_virtio_block.c projects/ifnet/usr.sbin/gpioctl/gpioctl.8 projects/ifnet/usr.sbin/gpioctl/gpioctl.c Directory Properties: projects/ifnet/ (props changed) projects/ifnet/cddl/ (props changed) projects/ifnet/cddl/contrib/opensolaris/ (props changed) projects/ifnet/contrib/libc++/ (props changed) projects/ifnet/contrib/tzdata/ (props changed) projects/ifnet/lib/libc/ (props changed) projects/ifnet/sbin/ (props changed) projects/ifnet/share/ (props changed) projects/ifnet/share/man/man4/ (props changed) projects/ifnet/sys/ (props changed) projects/ifnet/sys/amd64/vmm/ (props changed) projects/ifnet/sys/boot/ (props changed) projects/ifnet/sys/boot/powerpc/ofw/ (props changed) projects/ifnet/sys/conf/ (props changed) projects/ifnet/sys/dev/hyperv/ (props changed) projects/ifnet/usr.bin/procstat/ (props changed) projects/ifnet/usr.sbin/bhyve/ (props changed) Modified: projects/ifnet/UPDATING ============================================================================== --- projects/ifnet/UPDATING Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/UPDATING Wed Mar 11 11:17:09 2015 (r279883) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150307: + The 32-bit PowerPC kernel has been changed to a position-independent + executable. This can only be booted with a version of loader(8) + newer than January 31, 2015, so make sure to update both world and + kernel before rebooting. + 20150217: If you are running a -CURRENT kernel since r273872 (Oct 30th, 2014), but before r278950, the RNG was not seeded properly. Immediately Modified: projects/ifnet/cddl/contrib/dtracetoolkit/Proc/pidpersec.d ============================================================================== --- projects/ifnet/cddl/contrib/dtracetoolkit/Proc/pidpersec.d Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/cddl/contrib/dtracetoolkit/Proc/pidpersec.d Wed Mar 11 11:17:09 2015 (r279883) @@ -41,7 +41,7 @@ dtrace:::BEGIN { - printf("%-22s %8s %6s\n", "TIME", "LASTPID", "PID/s"); + printf("%-22s %6s\n", "TIME", "PID/s"); pids = 0; } @@ -52,6 +52,6 @@ proc:::exec-success profile:::tick-1sec { - printf("%-22Y %8d %6d\n", walltimestamp, `mpid, pids); + printf("%-22Y %6d\n", walltimestamp, pids); pids = 0; } Modified: projects/ifnet/cddl/contrib/opensolaris/common/ctf/ctf_create.c ============================================================================== --- projects/ifnet/cddl/contrib/opensolaris/common/ctf/ctf_create.c Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/cddl/contrib/opensolaris/common/ctf/ctf_create.c Wed Mar 11 11:17:09 2015 (r279883) @@ -583,10 +583,10 @@ ctf_discard(ctf_file_t *fp) return (0); /* no update required */ for (dtd = ctf_list_prev(&fp->ctf_dtdefs); dtd != NULL; dtd = ntd) { - if (dtd->dtd_type <= fp->ctf_dtoldid) + ntd = ctf_list_prev(dtd); + if (CTF_TYPE_TO_INDEX(dtd->dtd_type) <= fp->ctf_dtoldid) continue; /* skip types that have been committed */ - ntd = ctf_list_prev(dtd); ctf_dtd_delete(fp, dtd); } @@ -1313,10 +1313,13 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_fil * unless dst_type is a forward declaration and src_type is a struct, * union, or enum (i.e. the definition of the previous forward decl). */ - if (dst_type != CTF_ERR && dst_kind != kind && ( - dst_kind != CTF_K_FORWARD || (kind != CTF_K_ENUM && - kind != CTF_K_STRUCT && kind != CTF_K_UNION))) - return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + if (dst_type != CTF_ERR && dst_kind != kind) { + if (dst_kind != CTF_K_FORWARD || (kind != CTF_K_ENUM && + kind != CTF_K_STRUCT && kind != CTF_K_UNION)) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + else + dst_type = CTF_ERR; + } /* * If the non-empty name was not found in the appropriate hash, search @@ -1328,7 +1331,7 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_fil */ if (dst_type == CTF_ERR && name[0] != '\0') { for (dtd = ctf_list_prev(&dst_fp->ctf_dtdefs); dtd != NULL && - dtd->dtd_type > dst_fp->ctf_dtoldid; + CTF_TYPE_TO_INDEX(dtd->dtd_type) > dst_fp->ctf_dtoldid; dtd = ctf_list_prev(dtd)) { if (CTF_INFO_KIND(dtd->dtd_data.ctt_info) == kind && dtd->dtd_name != NULL && Modified: projects/ifnet/cddl/contrib/opensolaris/tools/ctf/cvt/output.c ============================================================================== --- projects/ifnet/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Wed Mar 11 11:17:09 2015 (r279883) @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Routines for preparing tdata trees for conversion into CTF data, and * for placing the resulting data into an output file. Modified: projects/ifnet/contrib/libc++/include/__bit_reference ============================================================================== --- projects/ifnet/contrib/libc++/include/__bit_reference Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/libc++/include/__bit_reference Wed Mar 11 11:17:09 2015 (r279883) @@ -906,7 +906,6 @@ rotate(__bit_iterator<_Cp, false> __firs { typedef __bit_iterator<_Cp, false> _I1; typedef typename _I1::difference_type difference_type; - typedef typename _I1::__storage_type __storage_type; difference_type __d1 = __middle - __first; difference_type __d2 = __last - __middle; _I1 __r = __first + __d2; Modified: projects/ifnet/contrib/libc++/include/__tree ============================================================================== --- projects/ifnet/contrib/libc++/include/__tree Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/libc++/include/__tree Wed Mar 11 11:17:09 2015 (r279883) @@ -2069,7 +2069,6 @@ template typename __tree<_Tp, _Compare, _Allocator>::size_type __tree<_Tp, _Compare, _Allocator>::__count_multi(const _Key& __k) const { - typedef pair _Pp; __node_const_pointer __result = __end_node(); __node_const_pointer __rt = __root(); while (__rt != nullptr) Modified: projects/ifnet/contrib/libc++/include/algorithm ============================================================================== --- projects/ifnet/contrib/libc++/include/algorithm Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/libc++/include/algorithm Wed Mar 11 11:17:09 2015 (r279883) @@ -4365,8 +4365,6 @@ __buffered_inplace_merge(_BidirectionalI typename iterator_traits<_BidirectionalIterator>::value_type* __buff) { typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; - typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; - typedef typename iterator_traits<_BidirectionalIterator>::pointer pointer; __destruct_n __d(0); unique_ptr __h2(__buff, __d); if (__len1 <= __len2) @@ -4400,7 +4398,6 @@ __inplace_merge(_BidirectionalIterator _ typename iterator_traits<_BidirectionalIterator>::difference_type __len2, typename iterator_traits<_BidirectionalIterator>::value_type* __buff, ptrdiff_t __buff_size) { - typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type; typedef typename iterator_traits<_BidirectionalIterator>::difference_type difference_type; while (true) { @@ -4799,7 +4796,6 @@ void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, typename iterator_traits<_RandomAccessIterator>::difference_type __len) { - typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type; typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type; if (__len > 1) { Modified: projects/ifnet/contrib/tzdata/antarctica ============================================================================== --- projects/ifnet/contrib/tzdata/antarctica Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/antarctica Wed Mar 11 11:17:09 2015 (r279883) @@ -47,8 +47,8 @@ Rule ChileAQ 2009 only - Mar Sun>=9 3:00 Rule ChileAQ 2010 only - Apr Sun>=1 3:00u 0 - Rule ChileAQ 2011 only - May Sun>=2 3:00u 0 - Rule ChileAQ 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule ChileAQ 2012 max - Apr Sun>=23 3:00u 0 - -Rule ChileAQ 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule ChileAQ 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule ChileAQ 2012 2014 - Sep Sun>=2 4:00u 1:00 S # Argentina - year-round bases # Belgrano II, Confin Coast, -770227-0343737, since 1972-02-05 @@ -354,9 +354,10 @@ Zone Antarctica/Rothera 0 - zzz 1976 Dec # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Antarctica/Palmer 0 - zzz 1965 - -4:00 ArgAQ AR%sT 1969 Oct 5 + -4:00 ArgAQ AR%sT 1969 Oct 5 -3:00 ArgAQ AR%sT 1982 May - -4:00 ChileAQ CL%sT + -4:00 ChileAQ CL%sT 2015 Apr 26 3:00u + -3:00 - CLT # # # McMurdo Station, Ross Island, since 1955-12 Modified: projects/ifnet/contrib/tzdata/asia ============================================================================== --- projects/ifnet/contrib/tzdata/asia Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/asia Wed Mar 11 11:17:09 2015 (r279883) @@ -145,10 +145,7 @@ Zone Asia/Baku 3:19:24 - LMT 1924 May 2 4:00 Azer AZ%sT # Bahrain -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Bahrain 3:22:20 - LMT 1920 # Manamah - 4:00 - GST 1972 Jun - 3:00 - AST +# See Asia/Qatar. # Bangladesh # From Alexander Krivenyshev (2009-05-13): @@ -1731,9 +1728,7 @@ Zone Asia/Pyongyang 8:23:00 - LMT 1908 A ############################################################################### # Kuwait -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Kuwait 3:11:56 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. # Laos # See Asia/Bangkok. @@ -1954,12 +1949,7 @@ Zone Asia/Kathmandu 5:41:16 - LMT 1920 5:45 - NPT # Nepal Time # Oman - -# Milne says 3:54:24 was the meridian of the Muscat Tidal Observatory. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Muscat 3:54:24 - LMT 1920 - 4:00 - GST +# See Asia/Dubai. # Pakistan @@ -2453,6 +2443,7 @@ Zone Asia/Manila -15:56:00 - LMT 1844 De Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha 4:00 - GST 1972 Jun 3:00 - AST +Link Asia/Qatar Asia/Bahrain # Saudi Arabia # @@ -2479,6 +2470,8 @@ Zone Asia/Qatar 3:26:08 - LMT 1920 # # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14 3:00 - AST +Link Asia/Riyadh Asia/Aden # Yemen +Link Asia/Riyadh Asia/Kuwait # Singapore # taken from Mok Ly Yng (2003-10-30) @@ -2767,6 +2760,7 @@ Zone Asia/Ashgabat 3:53:32 - LMT 1924 Ma # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Dubai 3:41:12 - LMT 1920 4:00 - GST +Link Asia/Dubai Asia/Muscat # Oman # Uzbekistan # Byalokoz 1919 says Uzbekistan was 4:27:53. @@ -2851,10 +2845,4 @@ Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 7:00 - ICT # Yemen - -# Milne says 2:59:54 was the meridian of the saluting battery at Aden, -# and that Yemen was at 1:55:56, the meridian of the Hagia Sophia. - -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Asia/Aden 2:59:54 - LMT 1950 - 3:00 - AST +# See Asia/Riyadh. Modified: projects/ifnet/contrib/tzdata/backward ============================================================================== --- projects/ifnet/contrib/tzdata/backward Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/backward Wed Mar 11 11:17:09 2015 (r279883) @@ -5,7 +5,7 @@ # and their old names. Many names changed in late 1993. # Link TARGET LINK-NAME -Link Africa/Asmara Africa/Asmera +Link Africa/Nairobi Africa/Asmera Link Africa/Abidjan Africa/Timbuktu Link America/Argentina/Catamarca America/Argentina/ComodRivadavia Link America/Adak America/Atka Modified: projects/ifnet/contrib/tzdata/europe ============================================================================== --- projects/ifnet/contrib/tzdata/europe Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/europe Wed Mar 11 11:17:09 2015 (r279883) @@ -1407,35 +1407,32 @@ Zone Europe/Budapest 1:16:20 - LMT 1890 # might be a reference to the Julian calendar as opposed to Gregorian, or it # might mean something else (???). # -# From Paul Eggert (2006-03-22): -# The Iceland Almanak, Shanks & Pottenger, and Whitman disagree on many points. -# We go with the Almanak, except for one claim from Shanks & Pottenger, namely -# that Reykavik was 21W57 from 1837 to 1908, local mean time before that. +# From Paul Eggert (2014-11-22): +# The information below is taken from the 1988 Almanak; see +# http://www.almanak.hi.is/klukkan.html # # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -Rule Iceland 1917 1918 - Feb 19 23:00 1:00 S +Rule Iceland 1917 1919 - Feb 19 23:00 1:00 S Rule Iceland 1917 only - Oct 21 1:00 0 - -Rule Iceland 1918 only - Nov 16 1:00 0 - +Rule Iceland 1918 1919 - Nov 16 1:00 0 - +Rule Iceland 1921 only - Mar 19 23:00 1:00 S +Rule Iceland 1921 only - Jun 23 1:00 0 - Rule Iceland 1939 only - Apr 29 23:00 1:00 S -Rule Iceland 1939 only - Nov 29 2:00 0 - +Rule Iceland 1939 only - Oct 29 2:00 0 - Rule Iceland 1940 only - Feb 25 2:00 1:00 S -Rule Iceland 1940 only - Nov 3 2:00 0 - -Rule Iceland 1941 only - Mar 2 1:00s 1:00 S -Rule Iceland 1941 only - Nov 2 1:00s 0 - -Rule Iceland 1942 only - Mar 8 1:00s 1:00 S -Rule Iceland 1942 only - Oct 25 1:00s 0 - +Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 - +Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 S # 1943-1946 - first Sunday in March until first Sunday in winter Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 S -Rule Iceland 1943 1948 - Oct Sun>=22 1:00s 0 - +Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 - # 1947-1967 - first Sunday in April until first Sunday in winter Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 S -# 1949 Oct transition delayed by 1 week +# 1949 and 1967 Oct transitions delayed by 1 week Rule Iceland 1949 only - Oct 30 1:00s 0 - Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 - Rule Iceland 1967 only - Oct 29 1:00s 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 - -1:27:48 - RMT 1908 # Reykjavik Mean Time? +Zone Atlantic/Reykjavik -1:28 - LMT 1908 -1:00 Iceland IS%sT 1968 Apr 7 1:00s 0:00 - GMT Modified: projects/ifnet/contrib/tzdata/leap-seconds.list ============================================================================== --- projects/ifnet/contrib/tzdata/leap-seconds.list Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/leap-seconds.list Wed Mar 11 11:17:09 2015 (r279883) @@ -47,7 +47,7 @@ # and can be ignored for many purposes. These differences # are tabulated in Circular T, which is published monthly # by the International Bureau of Weights and Measures -# (BIPM). See www.bipm.fr for more information. +# (BIPM). See www.bipm.org for more information. # # 3. The current definition of the relationship between UTC # and TAI dates from 1 January 1972. A number of different @@ -127,6 +127,15 @@ # with, since the difficulty of unambiguously representing the epoch # during the leap second does not arise. # +# Some systems implement leap seconds by amortizing the leap second +# over the last few minutes of the day. The frequency of the local +# clock is decreased (or increased) to realize the positive (or +# negative) leap second. This method removes the time step described +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# defintion of UTC. +# # Questions or comments to: # Judah Levine # Time and Frequency Division @@ -134,7 +143,7 @@ # Boulder, Colorado # Judah.Levine@nist.gov # -# Last Update of leap second values: 11 January 2012 +# Last Update of leap second values: 5 January 2015 # # The following line shows this last update date in NTP timestamp # format. This is the date on which the most recent change to @@ -142,7 +151,7 @@ # be identified by the unique pair of characters in the first two # columns as shown below. # -#$ 3535228800 +#$ 3629404800 # # The NTP timestamps are in units of seconds since the NTP epoch, # which is 1 January 1900, 00:00:00. The Modified Julian Day number @@ -190,10 +199,10 @@ # current -- the update time stamp, the data and the name of the file # will not change. # -# Updated through IERS Bulletin C48 -# File expires on: 28 June 2015 +# Updated through IERS Bulletin C49 +# File expires on: 28 December 2015 # -#@ 3644438400 +#@ 3660249600 # 2272060800 10 # 1 Jan 1972 2287785600 11 # 1 Jul 1972 @@ -221,6 +230,7 @@ 3345062400 33 # 1 Jan 2006 3439756800 34 # 1 Jan 2009 3550089600 35 # 1 Jul 2012 +3644697600 36 # 1 Jul 2015 # # the following special comment contains the # hash value of the data in this file computed @@ -236,4 +246,4 @@ # the hash line is also ignored in the # computation. # -#h a4862ccd c6f43c6 964f3604 85944a26 b5cfad4e +#h 45e70fa7 a9df2033 f4a49ab0 ec648273 7b6c22c Modified: projects/ifnet/contrib/tzdata/northamerica ============================================================================== --- projects/ifnet/contrib/tzdata/northamerica Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/northamerica Wed Mar 11 11:17:09 2015 (r279883) @@ -124,7 +124,7 @@ Rule US 1918 1919 - Mar lastSun 2:00 1:0 Rule US 1918 1919 - Oct lastSun 2:00 0 S Rule US 1942 only - Feb 9 2:00 1:00 W # War Rule US 1945 only - Aug 14 23:00u 1:00 P # Peace -Rule US 1945 only - Sep 30 2:00 0 S +Rule US 1945 only - Sep lastSun 2:00 0 S Rule US 1967 2006 - Oct lastSun 2:00 0 S Rule US 1967 1973 - Apr lastSun 2:00 1:00 D Rule US 1974 only - Jan 6 2:00 1:00 D @@ -2124,11 +2124,11 @@ Zone America/Dawson -9:17:40 - LMT 1900 # Mexico -# From Paul Eggert (2001-03-05): +# From Paul Eggert (2014-12-07): # The Investigation and Analysis Service of the # Mexican Library of Congress (MLoC) has published a # history of Mexican local time (in Spanish) -# http://www.cddhcu.gob.mx/bibliot/publica/inveyana/polisoc/horver/ +# http://www.diputados.gob.mx/bibliot/publica/inveyana/polisoc/horver/index.htm # # Here are the discrepancies between Shanks & Pottenger (S&P) and the MLoC. # (In all cases we go with the MLoC.) @@ -2297,6 +2297,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # efecto desde las dos horas del segundo domingo de marzo y concluirá a # las dos horas del primer domingo de noviembre. +# From Steffen Thorsen (2014-12-08), translated by Gwillim Law: +# The Mexican state of Quintana Roo will likely change to EST in 2015. +# +# http://www.unioncancun.mx/articulo/2014/12/04/medio-ambiente/congreso-aprueba-una-hora-mas-de-sol-en-qroo +# "With this change, the time conflict that has existed between the municipios +# of Quintana Roo and the municipio of Felipe Carrillo Puerto may come to an +# end. The latter declared itself in rebellion 15 years ago when a time change +# was initiated in Mexico, and since then it has refused to change its time +# zone along with the rest of the country." +# +# From Steffen Thorsen (2015-01-14), translated by Gwillim Law: +# http://sipse.com/novedades/confirman-aplicacion-de-nueva-zona-horaria-para-quintana-roo-132331.html +# "...the new time zone will come into effect at two o'clock on the first Sunday +# of February, when we will have to advance the clock one hour from its current +# time..." +# +# Also, the new zone will not use DST. + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Jun 25 0:00 0 S @@ -2317,7 +2335,8 @@ Rule Mexico 2002 max - Oct lastSun 2:00 Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56 -6:00 - CST 1981 Dec 23 -5:00 Mexico E%sT 1998 Aug 2 2:00 - -6:00 Mexico C%sT + -6:00 Mexico C%sT 2015 Feb 1 2:00 + -5:00 - EST # Campeche, Yucatán; represented by Mérida Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32 -6:00 - CST 1981 Dec 23 Modified: projects/ifnet/contrib/tzdata/southamerica ============================================================================== --- projects/ifnet/contrib/tzdata/southamerica Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/southamerica Wed Mar 11 11:17:09 2015 (r279883) @@ -1206,6 +1206,11 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf +# From Juan Correa (2015-01-28): +# ... today the Ministry of Energy announced that Chile will drop DST, will keep +# "summer time" (UTC -3 / UTC -5) all year round.... +# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html + # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1247,8 +1252,8 @@ Rule Chile 2009 only - Mar Sun>=9 3:00u Rule Chile 2010 only - Apr Sun>=1 3:00u 0 - Rule Chile 2011 only - May Sun>=2 3:00u 0 - Rule Chile 2011 only - Aug Sun>=16 4:00u 1:00 S -Rule Chile 2012 max - Apr Sun>=23 3:00u 0 - -Rule Chile 2012 max - Sep Sun>=2 4:00u 1:00 S +Rule Chile 2012 2015 - Apr Sun>=23 3:00u 0 - +Rule Chile 2012 2014 - Sep Sun>=2 4:00u 1:00 S # IATA SSIM anomalies: (1992-02) says 1992-03-14; # (1996-09) says 1998-03-08. Ignore these. # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -1259,11 +1264,13 @@ Zone America/Santiago -4:42:46 - LMT 189 -4:00 - CLT 1919 Jul 1 # Chile Time -4:42:46 - SMT 1927 Sep 1 # Santiago Mean Time -5:00 Chile CL%sT 1947 May 22 # Chile Time - -4:00 Chile CL%sT + -4:00 Chile CL%sT 2015 Apr 26 3:00u + -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 21:00 # Easter Time - -6:00 Chile EAS%sT + -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -6:00 Chile EAS%sT 2015 Apr 26 3:00u + -5:00 - EAST # # Salas y Gómez Island is uninhabited. # Other Chilean locations, including Juan Fernández Is, Desventuradas Is, Modified: projects/ifnet/contrib/tzdata/zone.tab ============================================================================== --- projects/ifnet/contrib/tzdata/zone.tab Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/zone.tab Wed Mar 11 11:17:09 2015 (r279883) @@ -274,7 +274,7 @@ MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MW -1547+03500 Africa/Blantyre MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatan MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border Modified: projects/ifnet/contrib/tzdata/zone1970.tab ============================================================================== --- projects/ifnet/contrib/tzdata/zone1970.tab Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/contrib/tzdata/zone1970.tab Wed Mar 11 11:17:09 2015 (r279883) @@ -234,7 +234,7 @@ MT +3554+01431 Europe/Malta MU -2010+05730 Indian/Mauritius MV +0410+07330 Indian/Maldives MX +1924-09909 America/Mexico_City Central Time - most locations -MX +2105-08646 America/Cancun Central Time - Quintana Roo +MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo MX +2058-08937 America/Merida Central Time - Campeche, Yucatán MX +2540-10019 America/Monterrey Mexican Central Time - Coahuila, Durango, Nuevo León, Tamaulipas away from US border MX +2550-09730 America/Matamoros US Central Time - Coahuila, Durango, Nuevo León, Tamaulipas near US border Modified: projects/ifnet/lib/libc/gen/getpwent.c ============================================================================== --- projects/ifnet/lib/libc/gen/getpwent.c Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/gen/getpwent.c Wed Mar 11 11:17:09 2015 (r279883) @@ -1942,7 +1942,7 @@ docompat: break; } fin: - if (!stayopen && st->db != NULL) { + if (st->db != NULL && !stayopen) { (void)st->db->close(st->db); st->db = NULL; } Modified: projects/ifnet/lib/libc/net/sctp_sys_calls.c ============================================================================== --- projects/ifnet/lib/libc/net/sctp_sys_calls.c Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/net/sctp_sys_calls.c Wed Mar 11 11:17:09 2015 (r279883) @@ -383,6 +383,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_PR_ASSOC_STATUS: ((struct sctp_prstatus *)arg)->sprstat_assoc_id = id; break; + case SCTP_MAX_CWND: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; default: break; } Modified: projects/ifnet/lib/libc/powerpc/gen/_setjmp.S ============================================================================== --- projects/ifnet/lib/libc/powerpc/gen/_setjmp.S Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/powerpc/gen/_setjmp.S Wed Mar 11 11:17:09 2015 (r279883) @@ -56,12 +56,54 @@ ENTRY(_setjmp) mr %r10,%r1 mr %r9,%r2 stmw %r9,20(%r3) + + /* FPRs */ + stfd %f14,92+0*8(%r3) + stfd %f15,92+1*8(%r3) + stfd %f16,92+2*8(%r3) + stfd %f17,92+3*8(%r3) + stfd %f18,92+4*8(%r3) + stfd %f19,92+5*8(%r3) + stfd %f20,92+6*8(%r3) + stfd %f21,92+7*8(%r3) + stfd %f22,92+8*8(%r3) + stfd %f23,92+9*8(%r3) + stfd %f24,92+10*8(%r3) + stfd %f25,92+11*8(%r3) + stfd %f26,92+12*8(%r3) + stfd %f27,92+13*8(%r3) + stfd %f28,93+13*8(%r3) + stfd %f29,93+14*8(%r3) + stfd %f30,93+15*8(%r3) + stfd %f31,93+16*8(%r3) + li %r3,0 blr END(_setjmp) ENTRY(_longjmp) lmw %r9,20(%r3) + + /* FPRs */ + lfd %f14,92+0*8(%r3) + lfd %f15,92+1*8(%r3) + lfd %f16,92+2*8(%r3) + lfd %f17,92+3*8(%r3) + lfd %f18,92+4*8(%r3) + lfd %f19,92+5*8(%r3) + lfd %f20,92+6*8(%r3) + lfd %f21,92+7*8(%r3) + lfd %f22,92+8*8(%r3) + lfd %f23,92+9*8(%r3) + lfd %f24,92+10*8(%r3) + lfd %f25,92+11*8(%r3) + lfd %f26,92+12*8(%r3) + lfd %f27,92+13*8(%r3) + lfd %f28,93+13*8(%r3) + lfd %f29,93+14*8(%r3) + lfd %f30,93+15*8(%r3) + lfd %f31,93+16*8(%r3) + mtlr %r11 mtcr %r12 mr %r1,%r10 Modified: projects/ifnet/lib/libc/powerpc/gen/setjmp.S ============================================================================== --- projects/ifnet/lib/libc/powerpc/gen/setjmp.S Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/powerpc/gen/setjmp.S Wed Mar 11 11:17:09 2015 (r279883) @@ -66,6 +66,27 @@ ENTRY(setjmp) mr %r10,%r1 /* r10 <- stackptr */ mr %r9,%r2 /* r9 <- global ptr */ stmw %r9,20(%r6) + + /* FPRs */ + stfd %f14,92+0*8(%r6) + stfd %f15,92+1*8(%r6) + stfd %f16,92+2*8(%r6) + stfd %f17,92+3*8(%r6) + stfd %f18,92+4*8(%r6) + stfd %f19,92+5*8(%r6) + stfd %f20,92+6*8(%r6) + stfd %f21,92+7*8(%r6) + stfd %f22,92+8*8(%r6) + stfd %f23,92+9*8(%r6) + stfd %f24,92+10*8(%r6) + stfd %f25,92+11*8(%r6) + stfd %f26,92+12*8(%r6) + stfd %f27,92+13*8(%r6) + stfd %f28,93+13*8(%r6) + stfd %f29,93+14*8(%r6) + stfd %f30,93+15*8(%r6) + stfd %f31,93+16*8(%r6) + li %r3,0 /* return (0) */ blr END(setjmp) @@ -73,6 +94,27 @@ END(setjmp) WEAK_REFERENCE(CNAME(__longjmp), longjmp) ENTRY(__longjmp) lmw %r9,20(%r3) /* restore regs */ + + /* FPRs */ + lfd %f14,92+0*8(%r3) + lfd %f15,92+1*8(%r3) + lfd %f16,92+2*8(%r3) + lfd %f17,92+3*8(%r3) + lfd %f18,92+4*8(%r3) + lfd %f19,92+5*8(%r3) + lfd %f20,92+6*8(%r3) + lfd %f21,92+7*8(%r3) + lfd %f22,92+8*8(%r3) + lfd %f23,92+9*8(%r3) + lfd %f24,92+10*8(%r3) + lfd %f25,92+11*8(%r3) + lfd %f26,92+12*8(%r3) + lfd %f27,92+13*8(%r3) + lfd %f28,93+13*8(%r3) + lfd %f29,93+14*8(%r3) + lfd %f30,93+15*8(%r3) + lfd %f31,93+16*8(%r3) + mr %r6,%r4 /* save val param */ mtlr %r11 /* r11 -> link reg */ mtcr %r12 /* r12 -> condition reg */ Modified: projects/ifnet/lib/libc/powerpc/gen/sigsetjmp.S ============================================================================== --- projects/ifnet/lib/libc/powerpc/gen/sigsetjmp.S Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/powerpc/gen/sigsetjmp.S Wed Mar 11 11:17:09 2015 (r279883) @@ -71,12 +71,54 @@ ENTRY(sigsetjmp) mr %r10,%r1 mr %r9,%r2 stmw %r9,20(%r6) + + /* FPRs */ + stfd %f14,92+0*8(%r6) + stfd %f15,92+1*8(%r6) + stfd %f16,92+2*8(%r6) + stfd %f17,92+3*8(%r6) + stfd %f18,92+4*8(%r6) + stfd %f19,92+5*8(%r6) + stfd %f20,92+6*8(%r6) + stfd %f21,92+7*8(%r6) + stfd %f22,92+8*8(%r6) + stfd %f23,92+9*8(%r6) + stfd %f24,92+10*8(%r6) + stfd %f25,92+11*8(%r6) + stfd %f26,92+12*8(%r6) + stfd %f27,92+13*8(%r6) + stfd %f28,93+13*8(%r6) + stfd %f29,93+14*8(%r6) + stfd %f30,93+15*8(%r6) + stfd %f31,93+16*8(%r6) + li %r3,0 blr END(sigsetjmp) ENTRY(siglongjmp) lmw %r9,20(%r3) + + /* FPRs */ + lfd %f14,92+0*8(%r3) + lfd %f15,92+1*8(%r3) + lfd %f16,92+2*8(%r3) + lfd %f17,92+3*8(%r3) + lfd %f18,92+4*8(%r3) + lfd %f19,92+5*8(%r3) + lfd %f20,92+6*8(%r3) + lfd %f21,92+7*8(%r3) + lfd %f22,92+8*8(%r3) + lfd %f23,92+9*8(%r3) + lfd %f24,92+10*8(%r3) + lfd %f25,92+11*8(%r3) + lfd %f26,92+12*8(%r3) + lfd %f27,92+13*8(%r3) + lfd %f28,93+13*8(%r3) + lfd %f29,93+14*8(%r3) + lfd %f30,93+15*8(%r3) + lfd %f31,93+16*8(%r3) + lwz %r7,0(%r3) mr %r6,%r4 mtlr %r11 Modified: projects/ifnet/lib/libc/powerpc64/gen/_setjmp.S ============================================================================== --- projects/ifnet/lib/libc/powerpc64/gen/_setjmp.S Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/powerpc64/gen/_setjmp.S Wed Mar 11 11:17:09 2015 (r279883) @@ -56,23 +56,41 @@ ENTRY(_setjmp) mr %r10,%r1 mr %r9,%r2 std %r9,40 + 0*8(%r3) + stfd %f14,40 + 23*8(%r3) std %r10,40 + 1*8(%r3) + stfd %f15,40 + 24*8(%r3) std %r11,40 + 2*8(%r3) + stfd %f16,40 + 25*8(%r3) std %r12,40 + 3*8(%r3) + stfd %f17,40 + 26*8(%r3) std %r13,40 + 4*8(%r3) + stfd %f18,40 + 27*8(%r3) std %r14,40 + 5*8(%r3) + stfd %f19,40 + 28*8(%r3) std %r15,40 + 6*8(%r3) + stfd %f20,40 + 29*8(%r3) std %r16,40 + 7*8(%r3) + stfd %f21,40 + 30*8(%r3) std %r17,40 + 8*8(%r3) + stfd %f22,40 + 31*8(%r3) std %r18,40 + 9*8(%r3) + stfd %f23,40 + 32*8(%r3) std %r19,40 + 10*8(%r3) + stfd %f24,40 + 33*8(%r3) std %r20,40 + 11*8(%r3) + stfd %f25,40 + 34*8(%r3) std %r21,40 + 12*8(%r3) + stfd %f26,40 + 35*8(%r3) std %r22,40 + 13*8(%r3) + stfd %f27,40 + 36*8(%r3) std %r23,40 + 14*8(%r3) + stfd %f28,40 + 37*8(%r3) std %r24,40 + 15*8(%r3) + stfd %f29,40 + 38*8(%r3) std %r25,40 + 16*8(%r3) + stfd %f30,40 + 39*8(%r3) std %r26,40 + 17*8(%r3) + stfd %f31,40 + 40*8(%r3) std %r27,40 + 18*8(%r3) std %r28,40 + 19*8(%r3) std %r29,40 + 20*8(%r3) @@ -84,23 +102,41 @@ END(_setjmp) ENTRY(_longjmp) ld %r9,40 + 0*8(%r3) + lfd %f14,40 + 23*8(%r3) ld %r10,40 + 1*8(%r3) + lfd %f15,40 + 24*8(%r3) ld %r11,40 + 2*8(%r3) + lfd %f16,40 + 25*8(%r3) ld %r12,40 + 3*8(%r3) + lfd %f17,40 + 26*8(%r3) ld %r14,40 + 5*8(%r3) + lfd %f18,40 + 27*8(%r3) ld %r15,40 + 6*8(%r3) + lfd %f19,40 + 28*8(%r3) ld %r16,40 + 7*8(%r3) + lfd %f20,40 + 29*8(%r3) ld %r17,40 + 8*8(%r3) + lfd %f21,40 + 30*8(%r3) ld %r18,40 + 9*8(%r3) + lfd %f22,40 + 31*8(%r3) ld %r19,40 + 10*8(%r3) + lfd %f23,40 + 32*8(%r3) ld %r20,40 + 11*8(%r3) + lfd %f24,40 + 33*8(%r3) ld %r21,40 + 12*8(%r3) + lfd %f25,40 + 34*8(%r3) ld %r22,40 + 13*8(%r3) + lfd %f26,40 + 35*8(%r3) ld %r23,40 + 14*8(%r3) + lfd %f27,40 + 36*8(%r3) ld %r24,40 + 15*8(%r3) + lfd %f28,40 + 37*8(%r3) ld %r25,40 + 16*8(%r3) + lfd %f29,40 + 38*8(%r3) ld %r26,40 + 17*8(%r3) + lfd %f30,40 + 39*8(%r3) ld %r27,40 + 18*8(%r3) + lfd %f31,40 + 40*8(%r3) ld %r28,40 + 19*8(%r3) ld %r29,40 + 20*8(%r3) ld %r30,40 + 21*8(%r3) Modified: projects/ifnet/lib/libc/powerpc64/gen/setjmp.S ============================================================================== --- projects/ifnet/lib/libc/powerpc64/gen/setjmp.S Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/powerpc64/gen/setjmp.S Wed Mar 11 11:17:09 2015 (r279883) @@ -67,29 +67,49 @@ ENTRY(setjmp) mr %r9,%r2 /* r9 <- global ptr */ std %r9,40 + 0*8(%r6) + stfd %f14,40 + 23*8(%r6) std %r10,40 + 1*8(%r6) + stfd %f15,40 + 24*8(%r6) std %r11,40 + 2*8(%r6) + stfd %f16,40 + 25*8(%r6) std %r12,40 + 3*8(%r6) + stfd %f17,40 + 26*8(%r6) std %r13,40 + 4*8(%r6) + stfd %f18,40 + 27*8(%r6) std %r14,40 + 5*8(%r6) + stfd %f19,40 + 28*8(%r6) std %r15,40 + 6*8(%r6) + stfd %f20,40 + 29*8(%r6) std %r16,40 + 7*8(%r6) + stfd %f21,40 + 30*8(%r6) std %r17,40 + 8*8(%r6) + stfd %f22,40 + 31*8(%r6) std %r18,40 + 9*8(%r6) + stfd %f23,40 + 32*8(%r6) std %r19,40 + 10*8(%r6) + stfd %f24,40 + 33*8(%r6) std %r20,40 + 11*8(%r6) + stfd %f25,40 + 34*8(%r6) std %r21,40 + 12*8(%r6) + stfd %f26,40 + 35*8(%r6) std %r22,40 + 13*8(%r6) + stfd %f27,40 + 36*8(%r6) std %r23,40 + 14*8(%r6) + stfd %f28,40 + 37*8(%r6) std %r24,40 + 15*8(%r6) + stfd %f29,40 + 38*8(%r6) std %r25,40 + 16*8(%r6) + stfd %f30,40 + 39*8(%r6) std %r26,40 + 17*8(%r6) + stfd %f31,40 + 40*8(%r6) std %r27,40 + 18*8(%r6) std %r28,40 + 19*8(%r6) std %r29,40 + 20*8(%r6) std %r30,40 + 21*8(%r6) std %r31,40 + 22*8(%r6) + /* XXX Altivec regs */ + li %r3,0 /* return (0) */ blr END(setjmp) @@ -97,23 +117,41 @@ END(setjmp) WEAK_REFERENCE(__longjmp, longjmp) ENTRY(__longjmp) ld %r9,40 + 0*8(%r3) + lfd %f14,40 + 23*8(%r3) ld %r10,40 + 1*8(%r3) + lfd %f15,40 + 24*8(%r3) ld %r11,40 + 2*8(%r3) + lfd %f16,40 + 25*8(%r3) ld %r12,40 + 3*8(%r3) + lfd %f17,40 + 26*8(%r3) ld %r14,40 + 5*8(%r3) + lfd %f18,40 + 27*8(%r3) ld %r15,40 + 6*8(%r3) + lfd %f19,40 + 28*8(%r3) ld %r16,40 + 7*8(%r3) + lfd %f20,40 + 29*8(%r3) ld %r17,40 + 8*8(%r3) + lfd %f21,40 + 30*8(%r3) ld %r18,40 + 9*8(%r3) + lfd %f22,40 + 31*8(%r3) ld %r19,40 + 10*8(%r3) + lfd %f23,40 + 32*8(%r3) ld %r20,40 + 11*8(%r3) + lfd %f24,40 + 33*8(%r3) ld %r21,40 + 12*8(%r3) + lfd %f25,40 + 34*8(%r3) ld %r22,40 + 13*8(%r3) + lfd %f26,40 + 35*8(%r3) ld %r23,40 + 14*8(%r3) + lfd %f27,40 + 36*8(%r3) ld %r24,40 + 15*8(%r3) + lfd %f28,40 + 37*8(%r3) ld %r25,40 + 16*8(%r3) + lfd %f29,40 + 38*8(%r3) ld %r26,40 + 17*8(%r3) + lfd %f30,40 + 39*8(%r3) ld %r27,40 + 18*8(%r3) + lfd %f31,40 + 40*8(%r3) ld %r28,40 + 19*8(%r3) ld %r29,40 + 20*8(%r3) ld %r30,40 + 21*8(%r3) Modified: projects/ifnet/lib/libc/powerpc64/gen/sigsetjmp.S ============================================================================== --- projects/ifnet/lib/libc/powerpc64/gen/sigsetjmp.S Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/powerpc64/gen/sigsetjmp.S Wed Mar 11 11:17:09 2015 (r279883) @@ -72,23 +72,41 @@ ENTRY(sigsetjmp) mr %r9,%r2 std %r9,40 + 0*8(%r6) + stfd %f14,40 + 23*8(%r6) std %r10,40 + 1*8(%r6) + stfd %f15,40 + 24*8(%r6) std %r11,40 + 2*8(%r6) + stfd %f16,40 + 25*8(%r6) std %r12,40 + 3*8(%r6) + stfd %f17,40 + 26*8(%r6) std %r13,40 + 4*8(%r6) + stfd %f18,40 + 27*8(%r6) std %r14,40 + 5*8(%r6) + stfd %f19,40 + 28*8(%r6) std %r15,40 + 6*8(%r6) + stfd %f20,40 + 29*8(%r6) std %r16,40 + 7*8(%r6) + stfd %f21,40 + 30*8(%r6) std %r17,40 + 8*8(%r6) + stfd %f22,40 + 31*8(%r6) std %r18,40 + 9*8(%r6) + stfd %f23,40 + 32*8(%r6) std %r19,40 + 10*8(%r6) + stfd %f24,40 + 33*8(%r6) std %r20,40 + 11*8(%r6) + stfd %f25,40 + 34*8(%r6) std %r21,40 + 12*8(%r6) + stfd %f26,40 + 35*8(%r6) std %r22,40 + 13*8(%r6) + stfd %f27,40 + 36*8(%r6) std %r23,40 + 14*8(%r6) + stfd %f28,40 + 37*8(%r6) std %r24,40 + 15*8(%r6) + stfd %f29,40 + 38*8(%r6) std %r25,40 + 16*8(%r6) + stfd %f30,40 + 39*8(%r6) std %r26,40 + 17*8(%r6) + stfd %f31,40 + 40*8(%r6) std %r27,40 + 18*8(%r6) std %r28,40 + 19*8(%r6) std %r29,40 + 20*8(%r6) @@ -101,23 +119,41 @@ END(sigsetjmp) ENTRY(siglongjmp) ld %r9,40 + 0*8(%r3) + lfd %f14,40 + 23*8(%r3) ld %r10,40 + 1*8(%r3) + lfd %f15,40 + 24*8(%r3) ld %r11,40 + 2*8(%r3) + lfd %f16,40 + 25*8(%r3) ld %r12,40 + 3*8(%r3) + lfd %f17,40 + 26*8(%r3) ld %r14,40 + 5*8(%r3) + lfd %f18,40 + 27*8(%r3) ld %r15,40 + 6*8(%r3) + lfd %f19,40 + 28*8(%r3) ld %r16,40 + 7*8(%r3) + lfd %f20,40 + 29*8(%r3) ld %r17,40 + 8*8(%r3) + lfd %f21,40 + 30*8(%r3) ld %r18,40 + 9*8(%r3) + lfd %f22,40 + 31*8(%r3) ld %r19,40 + 10*8(%r3) + lfd %f23,40 + 32*8(%r3) ld %r20,40 + 11*8(%r3) + lfd %f24,40 + 33*8(%r3) ld %r21,40 + 12*8(%r3) + lfd %f25,40 + 34*8(%r3) ld %r22,40 + 13*8(%r3) + lfd %f26,40 + 35*8(%r3) ld %r23,40 + 14*8(%r3) + lfd %f27,40 + 36*8(%r3) ld %r24,40 + 15*8(%r3) + lfd %f28,40 + 37*8(%r3) ld %r25,40 + 16*8(%r3) + lfd %f29,40 + 38*8(%r3) ld %r26,40 + 17*8(%r3) + lfd %f30,40 + 39*8(%r3) ld %r27,40 + 18*8(%r3) + lfd %f31,40 + 40*8(%r3) ld %r28,40 + 19*8(%r3) ld %r29,40 + 20*8(%r3) ld %r30,40 + 21*8(%r3) Modified: projects/ifnet/lib/libc/sys/cap_ioctls_limit.2 ============================================================================== --- projects/ifnet/lib/libc/sys/cap_ioctls_limit.2 Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libc/sys/cap_ioctls_limit.2 Wed Mar 11 11:17:09 2015 (r279883) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 27, 2014 +.Dd March 6, 2015 .Dt CAP_IOCTLS_LIMIT 2 .Os .Sh NAME @@ -61,6 +61,8 @@ argument specifies the number of element There can be up to .Va 256 elements in the array. +Including an element that has been previously revoked will generate an error. +After a successful call only those listed in the array may be used. .Pp The list of allowed ioctl commands for a given file descriptor can be obtained with the @@ -92,7 +94,7 @@ system call was never called for this fi .Fn cap_ioctls_get system call will return .Dv CAP_IOCTLS_ALL -and won't modify the buffer pointed to by the +and will not modify the buffer pointed to by the .Fa cmds argument. .Sh RETURN VALUES Modified: projects/ifnet/lib/libgpio/gpio.3 ============================================================================== --- projects/ifnet/lib/libgpio/gpio.3 Wed Mar 11 10:43:14 2015 (r279882) +++ projects/ifnet/lib/libgpio/gpio.3 Wed Mar 11 11:17:09 2015 (r279883) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 2014 +.Dd March 8, 2015 .Dt GPIO 3 .Os .Sh NAME @@ -43,41 +43,43 @@ .Ft void .Fn gpio_close "gpio_handle_t handle" .Ft int *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 13:07:12 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEA4FE6; Wed, 11 Mar 2015 13:07:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9C6293A; Wed, 11 Mar 2015 13:07:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2BD7C23094879; Wed, 11 Mar 2015 13:07:12 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2BD7CPH094878; Wed, 11 Mar 2015 13:07:12 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503111307.t2BD7CPH094878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 11 Mar 2015 13:07:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279885 - projects/ifnet/sys/netinet6 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.18-1 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: Wed, 11 Mar 2015 13:07:12 -0000 Author: glebius Date: Wed Mar 11 13:07:11 2015 New Revision: 279885 URL: https://svnweb.freebsd.org/changeset/base/279885 Log: if_drv_flags are no more. Modified: projects/ifnet/sys/netinet6/nd6_nbr.c Modified: projects/ifnet/sys/netinet6/nd6_nbr.c ============================================================================== --- projects/ifnet/sys/netinet6/nd6_nbr.c Wed Mar 11 12:57:07 2015 (r279884) +++ projects/ifnet/sys/netinet6/nd6_nbr.c Wed Mar 11 13:07:11 2015 (r279885) @@ -1431,8 +1431,7 @@ nd6_dad_timer(struct dadq *dp) /* Stop DAD if the interface is down even after dad_maxtry attempts. */ if ((dp->dad_ns_tcount > V_dad_maxtry) && - (((ifp->if_flags & IFF_UP) == 0) || - ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0))) { + ((ifp->if_flags & IFF_UP) == 0)) { nd6log((LOG_INFO, "%s: could not run DAD, driver problem?\n", if_name(ifa->ifa_ifp))); goto err; From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 14:54:18 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67F345C3; Wed, 11 Mar 2015 14:54:18 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3F508953; Wed, 11 Mar 2015 14:54:18 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3407CB94E; Wed, 11 Mar 2015 10:54:17 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r277122 - projects/ifnet/sys/dev/msk Date: Wed, 11 Mar 2015 10:08:30 -0400 Message-ID: <44632162.sBlScnaX0r@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150306024101.GT17947@FreeBSD.org> References: <201501130902.t0D927NE077024@svn.freebsd.org> <20150114144358.GD15484@FreeBSD.org> <20150306024101.GT17947@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 11 Mar 2015 10:54:17 -0400 (EDT) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 11 Mar 2015 14:54:18 -0000 On Friday, March 06, 2015 05:41:01 AM Gleb Smirnoff wrote: > On Wed, Jan 14, 2015 at 05:43:58PM +0300, Gleb Smirnoff wrote: > T> On Wed, Jan 14, 2015 at 09:33:04AM -0500, John Baldwin wrote: > T> J> I posted some ideas about how to handle this in a thread several years > T> J> ago on net@ with various alternatives. In that case I was focused on > T> J> buf_ring and I settled on an approach where a draining thread marked the > T> J> queue as "busy" while it was draining it and cleared that flag before > T> J> checking the head of the queue. The enqueue process returned a > T> J> different errno value (EINPROGRESS or some such) if it queued a packet > T> J> into a "busy" queue and the transmit routines were changed to 1) always > T> J> enqueue the packet, and 2) if EINPROGRESS wasn't returned, use a > T> J> blocking mtx_lock and start transmitting. > T> J> > T> J> However, even this model has some downsides in that one thread might be > T> J> stuck transmitting packets queued by other threads and never pop back > T> J> out to userland to service its associated application (a kind of > T> J> starvation of the user side of the thread). Note that the mtx_trylock > T> J> approach has the same problem. It might be nice to have a sort of limit > T> J> on the number of packets a thread is willing to enqueue, but then you > T> J> have the problem of ensuring any packets still on the queue when it hits > T> J> its limit aren't also delayed indefinitely. > T> > T> Thanks, I will try to code that. > > John, can you please look at this patch? It is against projects/ifnet. > > The idea is that if_snd_enqueue() tells us whether we grabbed to queue and > own it or not. If we grabbed it, we go processing it to the end. However, > we keep accounting on how many packets we processed there. If other > producer notices that we processed too much, it will preempt the queue. > > Looks like a design that matches your demands. However, extra code needs > to be put into drivers foo_start() functions, since now we need to disown > the queue if we stop processing it for some reason different to queue getting > empty. I think this patch is not a bad approach. It resembles the last thing I posted to net@ except that you have added the burst length cap which is a nice addition. Of course, this uses a lock to do so which buf_ring tries to avoid. (I also eventually would love to have a way to move the enqueue out of drivers entirely still where there is a callback for "drain this queue" that only gets called in the !EBUSY case. I can't recall if that is compatible with your stacking approach, but it would make it harder for drivers to get this wrong if we can avoid duplicating it N times.) -- John Baldwin From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 14:54:19 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2EF6F5C5; Wed, 11 Mar 2015 14:54:19 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0716B954; Wed, 11 Mar 2015 14:54:19 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 178AEB97B; Wed, 11 Mar 2015 10:54:18 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r279882 - in projects/ifnet/sys/dev: bge msk xl Date: Wed, 11 Mar 2015 09:55:56 -0400 Message-ID: <7233313.sLAkjvMmOW@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201503111043.t2BAhFCF028283@svn.freebsd.org> References: <201503111043.t2BAhFCF028283@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 11 Mar 2015 10:54:18 -0400 (EDT) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 11 Mar 2015 14:54:19 -0000 On Wednesday, March 11, 2015 10:43:15 AM Gleb Smirnoff wrote: > Author: glebius > Date: Wed Mar 11 10:43:14 2015 > New Revision: 279882 > URL: https://svnweb.freebsd.org/changeset/base/279882 > > Log: > For now use consistent softc lock in drivers transmit methods, due to a > theoretical race condition. Note that the condition exists in all > drbr(9) based drivers in head, but never was evidenced. Nevertheless, > leave this branch for KPI redesign instead of performance experiments. > > Discussed with: jhb To be clear, I certainly saw this race trigger in a production environment on a very quiet interface used for timing by transmitting multicast packets once a second. Every once in a while a ping from a monitoring system would coincide with the periodic transmit causing the trylock to fail (the ping locked the transmit ring to send the echo reply). This caused the timing multicast packet to be delayed for a full second until the next timing packet was sent. Just dropping the trylocks is indeed the simplest solution to this problem. -- John Baldwin From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 15:10:32 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AD6D262; Wed, 11 Mar 2015 15:10:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0673CBED; Wed, 11 Mar 2015 15:10:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2BFAV1o055799; Wed, 11 Mar 2015 15:10:31 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2BFAVYT055797; Wed, 11 Mar 2015 15:10:31 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503111510.t2BFAVYT055797@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 11 Mar 2015 15:10:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279887 - projects/ifnet/sys/dev/bge 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.18-1 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: Wed, 11 Mar 2015 15:10:32 -0000 Author: glebius Date: Wed Mar 11 15:10:30 2015 New Revision: 279887 URL: https://svnweb.freebsd.org/changeset/base/279887 Log: Revert r279786, that leaked in with merge from head. It is not applicable to this branch. New API doesn't require memory allocation at all to traverse through multicast addresses. Modified: projects/ifnet/sys/dev/bge/if_bge.c Modified: projects/ifnet/sys/dev/bge/if_bge.c ============================================================================== --- projects/ifnet/sys/dev/bge/if_bge.c Wed Mar 11 14:25:23 2015 (r279886) +++ projects/ifnet/sys/dev/bge/if_bge.c Wed Mar 11 15:10:30 2015 (r279887) @@ -1667,7 +1667,6 @@ bge_setmulti(struct bge_softc *sc) if (sc->bge_if_flags & (IFF_ALLMULTI | IFF_PROMISC)) { for (i = 0; i < 4; i++) CSR_WRITE_4(sc, BGE_MAR0 + (i * 4), 0xFFFFFFFF); - free(mta, M_DEVBUF); return; } From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 15:17:38 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23E395FD; Wed, 11 Mar 2015 15:17:38 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F806C95; Wed, 11 Mar 2015 15:17:37 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2BFHZPm018425 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 11 Mar 2015 18:17:35 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2BFHZpj018424; Wed, 11 Mar 2015 18:17:35 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 11 Mar 2015 18:17:35 +0300 From: Gleb Smirnoff To: John Baldwin Subject: Re: svn commit: r277122 - projects/ifnet/sys/dev/msk Message-ID: <20150311151735.GE17947@FreeBSD.org> References: <201501130902.t0D927NE077024@svn.freebsd.org> <20150114144358.GD15484@FreeBSD.org> <20150306024101.GT17947@FreeBSD.org> <44632162.sBlScnaX0r@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44632162.sBlScnaX0r@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 11 Mar 2015 15:17:38 -0000 On Wed, Mar 11, 2015 at 10:08:30AM -0400, John Baldwin wrote: J> > John, can you please look at this patch? It is against projects/ifnet. J> > J> > The idea is that if_snd_enqueue() tells us whether we grabbed to queue and J> > own it or not. If we grabbed it, we go processing it to the end. However, J> > we keep accounting on how many packets we processed there. If other J> > producer notices that we processed too much, it will preempt the queue. J> > J> > Looks like a design that matches your demands. However, extra code needs J> > to be put into drivers foo_start() functions, since now we need to disown J> > the queue if we stop processing it for some reason different to queue getting J> > empty. J> J> I think this patch is not a bad approach. It resembles the last thing I J> posted to net@ except that you have added the burst length cap which is a J> nice addition. Of course, this uses a lock to do so which buf_ring tries to J> avoid. J> J> (I also eventually would love to have a way to move the enqueue out of drivers J> entirely still where there is a callback for "drain this queue" that only J> gets called in the !EBUSY case. I can't recall if that is compatible with your J> stacking approach, but it would make it harder for drivers to get this wrong J> if we can avoid duplicating it N times.) I really wish to avoid duplicating code in regular drivers foo_transmit and foo_start, but this doesn't seem easy for me. Typical foo_transmit looks like: if ((error = if_snd_enqueue(ifp, m)) != 0) return (error); * LOCK(sc); * if (sc->link_not_active || sc->resources_not_allocated) return; * while (sc->tx_count <= DRIVER_CONST && (m = if_snd_dequeue(ifp)) != NULL) { * if (driver_encap(sc, m, ...) != 0) { if_snd_prepend(ifp, m); break; } count++ } if (count) { * /* TX unit programming */ } * UNLOCK(sc); All lines marked with * are somewhat unique in drivers. So, cycle looks a like, but always differ in details. Right now I don't have ideas how to collapse that to a generic method. If anyone has, please share! :) -- Totus tuus, Glebius. From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 15:27:49 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 44D49DE8; Wed, 11 Mar 2015 15:27:49 +0000 (UTC) Received: from mail-ig0-x232.google.com (mail-ig0-x232.google.com [IPv6:2607:f8b0:4001:c05::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 11B86DF5; Wed, 11 Mar 2015 15:27:49 +0000 (UTC) Received: by igal13 with SMTP id l13so40953336iga.5; Wed, 11 Mar 2015 08:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1Ui8JHZKH5+GF3pyLCMswEGTuXAXwyH5BcjZqJABLdc=; b=XMX9ozw47VUosDGeKt7Sr2LAbVDbjDMOhuf7cBo/97K5FmRMm6pwZCNt0JbzMqJneE vjAhjmKKXp4zW7isgYkEgciyd+LVfgJYi1RZpmnrSguB8H6j2e68nUgsH+vxG6vajuV5 9lN9pqIn2FHnRSYUfV0fLnDa6uQg8k0hE5Hu50HXZXx8CIi+nE2+ccmbwyuknEgNyhde 52r01iOlhmjVtY1zUpe+5Ez0B2iPTWM5ZiDKsIKcifXdudfcCWc1oUW0jBNgaW/pJSLC 1Q7wmql5uZilkDAWG3OXrAX2FftbWyn11XaVPBwY2ak+rvRDKjSgx80ARy95FqaDBGyW HEXA== MIME-Version: 1.0 X-Received: by 10.107.136.206 with SMTP id s75mr31055242ioi.8.1426087668499; Wed, 11 Mar 2015 08:27:48 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Wed, 11 Mar 2015 08:27:48 -0700 (PDT) In-Reply-To: <20150311151735.GE17947@FreeBSD.org> References: <201501130902.t0D927NE077024@svn.freebsd.org> <20150114144358.GD15484@FreeBSD.org> <20150306024101.GT17947@FreeBSD.org> <44632162.sBlScnaX0r@ralph.baldwin.cx> <20150311151735.GE17947@FreeBSD.org> Date: Wed, 11 Mar 2015 08:27:48 -0700 X-Google-Sender-Auth: jsDvS2PrqL3KJfXVRphobl8WtW0 Message-ID: Subject: Re: svn commit: r277122 - projects/ifnet/sys/dev/msk From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-projects@freebsd.org, "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 11 Mar 2015 15:27:49 -0000 Hi, Please don't - if_transmit in (correct) wifi drivers is typically slightly different. :P -adrian From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 15:35:30 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5EB5111; Wed, 11 Mar 2015 15:35:30 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F684EF1; Wed, 11 Mar 2015 15:35:28 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2BFZPux018538 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 11 Mar 2015 18:35:25 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2BFZPVr018537; Wed, 11 Mar 2015 18:35:25 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 11 Mar 2015 18:35:25 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r277122 - projects/ifnet/sys/dev/msk Message-ID: <20150311153525.GF17947@FreeBSD.org> References: <201501130902.t0D927NE077024@svn.freebsd.org> <20150114144358.GD15484@FreeBSD.org> <20150306024101.GT17947@FreeBSD.org> <44632162.sBlScnaX0r@ralph.baldwin.cx> <20150311151735.GE17947@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-projects@freebsd.org, "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 11 Mar 2015 15:35:30 -0000 On Wed, Mar 11, 2015 at 08:27:48AM -0700, Adrian Chadd wrote: A> Please don't - if_transmit in (correct) wifi drivers is typically A> slightly different. :P I expected that :) May be this level of cut-n-paste we should just find acceptable. btw, what about looking at projects/ifnet and trying to convert a 802.11 driver to it? :) -- Totus tuus, Glebius. From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 15:42:22 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94847572; Wed, 11 Mar 2015 15:42:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7F3B6FD5; Wed, 11 Mar 2015 15:42:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2BFgMXq073456; Wed, 11 Mar 2015 15:42:22 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2BFgMIH073454; Wed, 11 Mar 2015 15:42:22 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503111542.t2BFgMIH073454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 11 Mar 2015 15:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279890 - projects/ifnet/sys/dev/e1000 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.18-1 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: Wed, 11 Mar 2015 15:42:22 -0000 Author: glebius Date: Wed Mar 11 15:42:21 2015 New Revision: 279890 URL: https://svnweb.freebsd.org/changeset/base/279890 Log: Convert igb(4) to new ifnet(9) KPI. Sponsored by: Nginx, Inc. Sponsored by: Netflix Modified: projects/ifnet/sys/dev/e1000/if_igb.c projects/ifnet/sys/dev/e1000/if_igb.h Modified: projects/ifnet/sys/dev/e1000/if_igb.c ============================================================================== --- projects/ifnet/sys/dev/e1000/if_igb.c Wed Mar 11 15:40:29 2015 (r279889) +++ projects/ifnet/sys/dev/e1000/if_igb.c Wed Mar 11 15:42:21 2015 (r279890) @@ -44,9 +44,7 @@ #include #include -#ifndef IGB_LEGACY_TX #include -#endif #include #include #include @@ -66,20 +64,14 @@ #include #include -#include #include #include -#include -#include #include #include #ifdef RSS #include #endif -#include -#include - #include #include #include @@ -194,22 +186,16 @@ static int igb_detach(device_t); static int igb_shutdown(device_t); static int igb_suspend(device_t); static int igb_resume(device_t); -#ifndef IGB_LEGACY_TX -static int igb_mq_start(struct ifnet *, struct mbuf *); -static int igb_mq_start_locked(struct ifnet *, struct tx_ring *); -static void igb_qflush(struct ifnet *); +static int igb_mq_start(if_t, struct mbuf *); +static int igb_mq_start_locked(if_t, struct tx_ring *); +static void igb_qflush(if_t); static void igb_deferred_mq_start(void *, int); -#else -static void igb_start(struct ifnet *); -static void igb_start_locked(struct tx_ring *, struct ifnet *ifp); -#endif -static int igb_ioctl(struct ifnet *, u_long, caddr_t); +static int igb_ioctl(if_t, u_long, void *, struct thread *); static uint64_t igb_get_counter(if_t, ift_counter); -static void igb_init(void *); -static void igb_init_locked(struct adapter *); +static void igb_init(struct adapter *); static void igb_stop(void *); -static void igb_media_status(struct ifnet *, struct ifmediareq *); -static int igb_media_change(struct ifnet *); +static void igb_media_status(if_t, struct ifmediareq *); +static int igb_media_change(if_t); static void igb_identify_hardware(struct adapter *); static int igb_allocate_pci_resources(struct adapter *); static int igb_allocate_msix(struct adapter *); @@ -218,7 +204,7 @@ static int igb_setup_msix(struct adapter static void igb_free_pci_resources(struct adapter *); static void igb_local_timer(void *); static void igb_reset(struct adapter *); -static int igb_setup_interface(device_t, struct adapter *); +static void igb_setup_interface(device_t, struct adapter *); static int igb_allocate_queues(struct adapter *); static void igb_configure_queues(struct adapter *); @@ -243,8 +229,8 @@ static void igb_update_stats_counters(st static bool igb_txeof(struct tx_ring *); static __inline void igb_rx_discard(struct rx_ring *, int); -static __inline void igb_rx_input(struct rx_ring *, - struct ifnet *, struct mbuf *, u32); +static __inline void igb_rx_input(struct rx_ring *, struct adapter *, + struct mbuf *, u32); static bool igb_rxeof(struct igb_queue *, int, int *); static void igb_rx_checksum(u32, struct mbuf *, u32); @@ -258,8 +244,8 @@ static void igb_set_multi(struct adapter static void igb_update_link_status(struct adapter *); static void igb_refresh_mbufs(struct rx_ring *, int); -static void igb_register_vlan(void *, struct ifnet *, u16); -static void igb_unregister_vlan(void *, struct ifnet *, u16); +static void igb_register_vlan(void *, if_t, u16); +static void igb_unregister_vlan(void *, if_t, u16); static void igb_setup_vlan_hw_support(struct adapter *); static int igb_xmit(struct tx_ring *, struct mbuf **); @@ -296,7 +282,7 @@ static int igb_sysctl_dmac(SYSCTL_HANDLE static int igb_sysctl_eee(SYSCTL_HANDLER_ARGS); #ifdef DEVICE_POLLING -static poll_handler_t igb_poll; +static int igb_poll(if_t, enum poll_cmd, int); #endif /* POLLING */ /********************************************************************* @@ -318,6 +304,22 @@ static driver_t igb_driver = { "igb", igb_methods, sizeof(struct adapter), }; +static struct ifdriver igb_ifdrv = { + .ifdrv_ops = { + .ifop_origin = IFOP_ORIGIN_DRIVER, + .ifop_ioctl = igb_ioctl, + .ifop_get_counter = igb_get_counter, + .ifop_transmit = igb_mq_start, + .ifop_qflush = igb_qflush, +#ifdef DEVICE_POLLING + .ifop_poll = igb_poll, +#endif + }, + .ifdrv_name = "igb", + .ifdrv_type = IFT_ETHER, + .ifdrv_hdrlen = sizeof(struct ether_vlan_header), +}; + static devclass_t igb_devclass; DRIVER_MODULE(igb, pci, igb_driver, igb_devclass, 0, 0); MODULE_DEPEND(igb, pci, 1, 1, 1); @@ -362,14 +364,12 @@ static int igb_max_interrupt_rate = 8000 SYSCTL_INT(_hw_igb, OID_AUTO, max_interrupt_rate, CTLFLAG_RDTUN, &igb_max_interrupt_rate, 0, "Maximum interrupts per second"); -#ifndef IGB_LEGACY_TX /* -** Tuneable number of buffers in the buf-ring (drbr_xxx) +** Tuneable number of buffers in the buf-ring */ static int igb_buf_ring_size = IGB_BR_SIZE; SYSCTL_INT(_hw_igb, OID_AUTO, buf_ring_size, CTLFLAG_RDTUN, &igb_buf_ring_size, 0, "Size of the bufring"); -#endif /* ** Header split causes the packet header to @@ -657,10 +657,6 @@ igb_attach(device_t dev) goto err_late; } - /* Setup OS specific network interface */ - if (igb_setup_interface(dev, adapter) != 0) - goto err_late; - /* Now get a good starting state */ igb_reset(adapter); @@ -695,8 +691,7 @@ igb_attach(device_t dev) igb_add_hw_stats(adapter); /* Tell the stack that the interface is not active */ - adapter->ifp->if_drv_flags &= ~IFF_DRV_RUNNING; - adapter->ifp->if_drv_flags |= IFF_DRV_OACTIVE; + adapter->flags &= ~IGB_RUNNING; adapter->led_dev = led_create(igb_led_func, adapter, device_get_nameunit(dev)); @@ -711,6 +706,9 @@ igb_attach(device_t dev) if (error) goto err_late; + /* Setup OS specific network interface */ + igb_setup_interface(dev, adapter); + #ifdef DEV_NETMAP igb_netmap_attach(adapter); #endif /* DEV_NETMAP */ @@ -725,8 +723,6 @@ err_late: igb_release_hw_control(adapter); err_pci: igb_free_pci_resources(adapter); - if (adapter->ifp != NULL) - if_free(adapter->ifp); free(adapter->mta, M_DEVBUF); IGB_CORE_LOCK_DESTROY(adapter); @@ -747,26 +743,19 @@ static int igb_detach(device_t dev) { struct adapter *adapter = device_get_softc(dev); - struct ifnet *ifp = adapter->ifp; INIT_DEBUGOUT("igb_detach: begin"); - /* Make sure VLANS are not using driver */ - if (adapter->ifp->if_vlantrunk != NULL) { - device_printf(dev,"Vlan in use, detach first\n"); - return (EBUSY); + if (adapter->ifp) { +#ifdef DEV_NETMAP + netmap_detach(adapter->ifp); +#endif /* DEV_NETMAP */ + if_detach(adapter->ifp); } - ether_ifdetach(adapter->ifp); - if (adapter->led_dev != NULL) led_destroy(adapter->led_dev); -#ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) - ether_poll_deregister(ifp); -#endif - IGB_CORE_LOCK(adapter); adapter->in_detach = 1; igb_stop(adapter); @@ -792,12 +781,8 @@ igb_detach(device_t dev) callout_drain(&adapter->timer); -#ifdef DEV_NETMAP - netmap_detach(adapter->ifp); -#endif /* DEV_NETMAP */ igb_free_pci_resources(adapter); bus_generic_detach(dev); - if_free(ifp); igb_free_transmit_structures(adapter); igb_free_receive_structures(adapter); @@ -852,25 +837,20 @@ igb_resume(device_t dev) { struct adapter *adapter = device_get_softc(dev); struct tx_ring *txr = adapter->tx_rings; - struct ifnet *ifp = adapter->ifp; + if_t ifp = adapter->ifp; IGB_CORE_LOCK(adapter); - igb_init_locked(adapter); + igb_init(adapter); igb_init_manageability(adapter); - if ((ifp->if_flags & IFF_UP) && - (ifp->if_drv_flags & IFF_DRV_RUNNING) && adapter->link_active) { + if ((adapter->if_flags & IFF_UP) && + (adapter->flags & IGB_RUNNING) && adapter->link_active) { for (int i = 0; i < adapter->num_queues; i++, txr++) { IGB_TX_LOCK(txr); -#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && - !drbr_empty(ifp, txr->br)) + !buf_ring_empty(txr->br)) igb_mq_start_locked(ifp, txr); -#else - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - igb_start_locked(txr, ifp); -#endif IGB_TX_UNLOCK(txr); } } @@ -880,95 +860,15 @@ igb_resume(device_t dev) } -#ifdef IGB_LEGACY_TX - -/********************************************************************* - * Transmit entry point - * - * igb_start is called by the stack to initiate a transmit. - * The driver will remain in this routine as long as there are - * packets to transmit and transmit resources are available. - * In case resources are not available stack is notified and - * the packet is requeued. - **********************************************************************/ - -static void -igb_start_locked(struct tx_ring *txr, struct ifnet *ifp) -{ - struct adapter *adapter = ifp->if_softc; - struct mbuf *m_head; - - IGB_TX_LOCK_ASSERT(txr); - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) - return; - if (!adapter->link_active) - return; - - /* Call cleanup if number of TX descriptors low */ - if (txr->tx_avail <= IGB_TX_CLEANUP_THRESHOLD) - igb_txeof(txr); - - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - if (txr->tx_avail <= IGB_MAX_SCATTER) { - txr->queue_status |= IGB_QUEUE_DEPLETED; - break; - } - IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); - if (m_head == NULL) - break; - /* - * Encapsulation can modify our pointer, and or make it - * NULL on failure. In that event, we can't requeue. - */ - if (igb_xmit(txr, &m_head)) { - if (m_head != NULL) - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - if (txr->tx_avail <= IGB_MAX_SCATTER) - txr->queue_status |= IGB_QUEUE_DEPLETED; - break; - } - - /* Send a copy of the frame to the BPF listener */ - ETHER_BPF_MTAP(ifp, m_head); - - /* Set watchdog on */ - txr->watchdog_time = ticks; - txr->queue_status |= IGB_QUEUE_WORKING; - } -} - -/* - * Legacy TX driver routine, called from the - * stack, always uses tx[0], and spins for it. - * Should not be used with multiqueue tx - */ -static void -igb_start(struct ifnet *ifp) -{ - struct adapter *adapter = ifp->if_softc; - struct tx_ring *txr = adapter->tx_rings; - - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { - IGB_TX_LOCK(txr); - igb_start_locked(txr, ifp); - IGB_TX_UNLOCK(txr); - } - return; -} - -#else /* ~IGB_LEGACY_TX */ - /* ** Multiqueue Transmit Entry: ** quick turnaround to the stack ** */ static int -igb_mq_start(struct ifnet *ifp, struct mbuf *m) +igb_mq_start(if_t ifp, struct mbuf *m) { - struct adapter *adapter = ifp->if_softc; + struct adapter *adapter = if_getsoftc(ifp, IF_DRIVER_SOFTC); struct igb_queue *que; struct tx_ring *txr; int i, err = 0; @@ -1002,7 +902,7 @@ igb_mq_start(struct ifnet *ifp, struct m txr = &adapter->tx_rings[i]; que = &adapter->queues[i]; - err = drbr_enqueue(ifp, txr->br, m); + err = buf_ring_enqueue(txr->br, m); if (err) return (err); if (IGB_TX_TRYLOCK(txr)) { @@ -1015,7 +915,7 @@ igb_mq_start(struct ifnet *ifp, struct m } static int -igb_mq_start_locked(struct ifnet *ifp, struct tx_ring *txr) +igb_mq_start_locked(if_t ifp, struct tx_ring *txr) { struct adapter *adapter = txr->adapter; struct mbuf *next; @@ -1023,34 +923,31 @@ igb_mq_start_locked(struct ifnet *ifp, s IGB_TX_LOCK_ASSERT(txr); - if (((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) || + if (((adapter->flags & IGB_RUNNING) == 0) || adapter->link_active == 0) return (ENETDOWN); /* Process the queue */ - while ((next = drbr_peek(ifp, txr->br)) != NULL) { + while ((next = buf_ring_peek(txr->br)) != NULL) { if ((err = igb_xmit(txr, &next)) != 0) { if (next == NULL) { /* It was freed, move forward */ - drbr_advance(ifp, txr->br); + buf_ring_advance_sc(txr->br); } else { /* * Still have one left, it may not be * the same since the transmit function * may have changed it. */ - drbr_putback(ifp, txr->br, next); + buf_ring_putback_sc(txr->br, next); } break; } - drbr_advance(ifp, txr->br); + buf_ring_advance_sc(txr->br); enq++; - if_inc_counter(ifp, IFCOUNTER_OBYTES, next->m_pkthdr.len); - if (next->m_flags & M_MCAST) - if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); - ETHER_BPF_MTAP(ifp, next); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if_mtap(ifp, next, NULL, 0); + if ((adapter->flags & IGB_RUNNING) == 0) break; } if (enq > 0) { @@ -1073,10 +970,10 @@ igb_deferred_mq_start(void *arg, int pen { struct tx_ring *txr = arg; struct adapter *adapter = txr->adapter; - struct ifnet *ifp = adapter->ifp; + if_t ifp = adapter->ifp; IGB_TX_LOCK(txr); - if (!drbr_empty(ifp, txr->br)) + if (!buf_ring_empty(txr->br)) igb_mq_start_locked(ifp, txr); IGB_TX_UNLOCK(txr); } @@ -1085,9 +982,9 @@ igb_deferred_mq_start(void *arg, int pen ** Flush all ring buffers */ static void -igb_qflush(struct ifnet *ifp) +igb_qflush(if_t ifp) { - struct adapter *adapter = ifp->if_softc; + struct adapter *adapter = if_getsoftc(ifp, IF_DRIVER_SOFTC); struct tx_ring *txr = adapter->tx_rings; struct mbuf *m; @@ -1097,9 +994,7 @@ igb_qflush(struct ifnet *ifp) m_freem(m); IGB_TX_UNLOCK(txr); } - if_qflush(ifp); } -#endif /* ~IGB_LEGACY_TX */ /********************************************************************* * Ioctl entry point @@ -1111,94 +1006,56 @@ igb_qflush(struct ifnet *ifp) **********************************************************************/ static int -igb_ioctl(struct ifnet *ifp, u_long command, caddr_t data) +igb_ioctl(if_t ifp, u_long command, void *data, struct thread *td) { - struct adapter *adapter = ifp->if_softc; + struct adapter *adapter = if_getsoftc(ifp, IF_DRIVER_SOFTC); struct ifreq *ifr = (struct ifreq *)data; -#if defined(INET) || defined(INET6) - struct ifaddr *ifa = (struct ifaddr *)data; -#endif - bool avoid_reset = FALSE; + uint32_t oflags, mask; int error = 0; if (adapter->in_detach) return (error); switch (command) { - case SIOCSIFADDR: -#ifdef INET - if (ifa->ifa_addr->sa_family == AF_INET) - avoid_reset = TRUE; -#endif -#ifdef INET6 - if (ifa->ifa_addr->sa_family == AF_INET6) - avoid_reset = TRUE; -#endif - /* - ** Calling init results in link renegotiation, - ** so we avoid doing it when possible. - */ - if (avoid_reset) { - ifp->if_flags |= IFF_UP; - if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) - igb_init(adapter); -#ifdef INET - if (!(ifp->if_flags & IFF_NOARP)) - arp_ifinit(ifp, ifa); -#endif - } else - error = ether_ioctl(ifp, command, data); - break; case SIOCSIFMTU: - { - int max_frame_size; - IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFMTU (Set Interface MTU)"); - + if (ifr->ifr_mtu > 9234 - ETHER_HDR_LEN - ETHER_CRC_LEN) + return (EINVAL); IGB_CORE_LOCK(adapter); - max_frame_size = 9234; - if (ifr->ifr_mtu > max_frame_size - ETHER_HDR_LEN - - ETHER_CRC_LEN) { - IGB_CORE_UNLOCK(adapter); - error = EINVAL; - break; - } - - ifp->if_mtu = ifr->ifr_mtu; adapter->max_frame_size = - ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; - igb_init_locked(adapter); + ifr->ifr_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN; + igb_init(adapter); IGB_CORE_UNLOCK(adapter); break; - } case SIOCSIFFLAGS: IOCTL_DEBUGOUT("ioctl rcv'd:\ SIOCSIFFLAGS (Set Interface Flags)"); IGB_CORE_LOCK(adapter); - if (ifp->if_flags & IFF_UP) { - if ((ifp->if_drv_flags & IFF_DRV_RUNNING)) { - if ((ifp->if_flags ^ adapter->if_flags) & + oflags = adapter->if_flags; + adapter->if_flags = ifr->ifr_flags; + if (adapter->if_flags & IFF_UP) { + if ((adapter->flags & IGB_RUNNING)) { + if ((oflags ^ adapter->if_flags) & (IFF_PROMISC | IFF_ALLMULTI)) { igb_disable_promisc(adapter); igb_set_promisc(adapter); } } else - igb_init_locked(adapter); + igb_init(adapter); } else - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (adapter->flags & IGB_RUNNING) igb_stop(adapter); - adapter->if_flags = ifp->if_flags; IGB_CORE_UNLOCK(adapter); break; case SIOCADDMULTI: case SIOCDELMULTI: IOCTL_DEBUGOUT("ioctl rcv'd: SIOC(ADD|DEL)MULTI"); - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (adapter->flags & IGB_RUNNING) { IGB_CORE_LOCK(adapter); igb_disable_intr(adapter); igb_set_multi(adapter); #ifdef DEVICE_POLLING - if (!(ifp->if_capenable & IFCAP_POLLING)) + if (!(adapter->if_capenable & IFCAP_POLLING)) #endif igb_enable_intr(adapter); IGB_CORE_UNLOCK(adapter); @@ -1220,68 +1077,36 @@ igb_ioctl(struct ifnet *ifp, u_long comm error = ifmedia_ioctl(ifp, ifr, &adapter->media, command); break; case SIOCSIFCAP: - { - int mask, reinit; - IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFCAP (Set Capabilities)"); - reinit = 0; - mask = ifr->ifr_reqcap ^ ifp->if_capenable; + mask = ifr->ifr_reqcap ^ ifr->ifr_curcap; + IGB_CORE_LOCK(adapter); #ifdef DEVICE_POLLING if (mask & IFCAP_POLLING) { - if (ifr->ifr_reqcap & IFCAP_POLLING) { - error = ether_poll_register(igb_poll, ifp); - if (error) - return (error); - IGB_CORE_LOCK(adapter); + if (ifr->ifr_reqcap & IFCAP_POLLING) igb_disable_intr(adapter); - ifp->if_capenable |= IFCAP_POLLING; - IGB_CORE_UNLOCK(adapter); - } else { - error = ether_poll_deregister(ifp); - /* Enable interrupt even in error case */ - IGB_CORE_LOCK(adapter); + else igb_enable_intr(adapter); - ifp->if_capenable &= ~IFCAP_POLLING; - IGB_CORE_UNLOCK(adapter); - } } #endif - if (mask & IFCAP_HWCSUM) { - ifp->if_capenable ^= IFCAP_HWCSUM; - reinit = 1; - } - if (mask & IFCAP_TSO4) { - ifp->if_capenable ^= IFCAP_TSO4; - reinit = 1; - } - if (mask & IFCAP_TSO6) { - ifp->if_capenable ^= IFCAP_TSO6; - reinit = 1; - } - if (mask & IFCAP_VLAN_HWTAGGING) { - ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; - reinit = 1; - } - if (mask & IFCAP_VLAN_HWFILTER) { - ifp->if_capenable ^= IFCAP_VLAN_HWFILTER; - reinit = 1; - } - if (mask & IFCAP_VLAN_HWTSO) { - ifp->if_capenable ^= IFCAP_VLAN_HWTSO; - reinit = 1; - } - if (mask & IFCAP_LRO) { - ifp->if_capenable ^= IFCAP_LRO; - reinit = 1; + ifr->ifr_hwassist = 0; + if (ifr->ifr_reqcap & IFCAP_TXCSUM) { + ifr->ifr_hwassist |= (CSUM_TCP | CSUM_UDP); + if (adapter->hw.mac.type == e1000_82576) + ifr->ifr_hwassist |= CSUM_SCTP; } - if (reinit && (ifp->if_drv_flags & IFF_DRV_RUNNING)) + if (ifr->ifr_reqcap & IFCAP_TSO) + ifr->ifr_hwassist |= CSUM_TSO; + + adapter->if_capenable = ifr->ifr_reqcap; + if ((mask & (IFCAP_HWCSUM | IFCAP_TSO4 | IFCAP_TSO6 | + IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWFILTER | + IFCAP_VLAN_HWTSO | IFCAP_LRO)) && + (adapter->flags & IGB_RUNNING)) igb_init(adapter); - VLAN_CAPABILITIES(ifp); + IGB_CORE_UNLOCK(adapter); break; - } - default: - error = ether_ioctl(ifp, command, data); + error = EOPNOTSUPP; break; } @@ -1292,18 +1117,13 @@ igb_ioctl(struct ifnet *ifp, u_long comm /********************************************************************* * Init entry point * - * This routine is used in two ways. It is used by the stack as - * init entry point in network interface structure. It is also used - * by the driver as a hw/sw initialization routine to get to a - * consistent state. - * - * return 0 on success, positive on failure + * It is used by the driver as a hw/sw initialization routine to get + * to a consistent state. **********************************************************************/ static void -igb_init_locked(struct adapter *adapter) +igb_init(struct adapter *adapter) { - struct ifnet *ifp = adapter->ifp; device_t dev = adapter->dev; INIT_DEBUGOUT("igb_init: begin"); @@ -1314,8 +1134,7 @@ igb_init_locked(struct adapter *adapter) callout_stop(&adapter->timer); /* Get the latest mac address, User can use a LAA */ - bcopy(IF_LLADDR(adapter->ifp), adapter->hw.mac.addr, - ETHER_ADDR_LEN); + bcopy(if_lladdr(adapter->ifp), adapter->hw.mac.addr, ETHER_ADDR_LEN); /* Put the address into the Receive Address Array */ e1000_rar_set(&adapter->hw, adapter->hw.mac.addr, 0); @@ -1325,19 +1144,6 @@ igb_init_locked(struct adapter *adapter) E1000_WRITE_REG(&adapter->hw, E1000_VET, ETHERTYPE_VLAN); - /* Set hardware offload abilities */ - ifp->if_hwassist = 0; - if (ifp->if_capenable & IFCAP_TXCSUM) { - ifp->if_hwassist |= (CSUM_TCP | CSUM_UDP); -#if __FreeBSD_version >= 800000 - if (adapter->hw.mac.type == e1000_82576) - ifp->if_hwassist |= CSUM_SCTP; -#endif - } - - if (ifp->if_capenable & IFCAP_TSO) - ifp->if_hwassist |= CSUM_TSO; - /* Configure for OS presence */ igb_init_manageability(adapter); @@ -1367,14 +1173,13 @@ igb_init_locked(struct adapter *adapter) igb_initialize_receive_units(adapter); /* Enable VLAN support */ - if (ifp->if_capenable & IFCAP_VLAN_HWTAGGING) + if (adapter->if_capenable & IFCAP_VLAN_HWTAGGING) igb_setup_vlan_hw_support(adapter); /* Don't lose promiscuous settings */ igb_set_promisc(adapter); - ifp->if_drv_flags |= IFF_DRV_RUNNING; - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + adapter->flags |= IGB_RUNNING; callout_reset(&adapter->timer, hz, igb_local_timer, adapter); e1000_clear_hw_cntrs_base_generic(&adapter->hw); @@ -1389,7 +1194,7 @@ igb_init_locked(struct adapter *adapter) * Only enable interrupts if we are not polling, make sure * they are off otherwise. */ - if (ifp->if_capenable & IFCAP_POLLING) + if (adapter->if_capenable & IFCAP_POLLING) igb_disable_intr(adapter); else #endif /* DEVICE_POLLING */ @@ -1408,40 +1213,24 @@ igb_init_locked(struct adapter *adapter) } static void -igb_init(void *arg) -{ - struct adapter *adapter = arg; - - IGB_CORE_LOCK(adapter); - igb_init_locked(adapter); - IGB_CORE_UNLOCK(adapter); -} - - -static void igb_handle_que(void *context, int pending) { struct igb_queue *que = context; struct adapter *adapter = que->adapter; struct tx_ring *txr = que->txr; - struct ifnet *ifp = adapter->ifp; + if_t ifp = adapter->ifp; - if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + if (adapter->flags & IGB_RUNNING) { bool more; more = igb_rxeof(que, adapter->rx_process_limit, NULL); IGB_TX_LOCK(txr); igb_txeof(txr); -#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && - !drbr_empty(ifp, txr->br)) + !buf_ring_empty(txr->br)) igb_mq_start_locked(ifp, txr); -#else - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - igb_start_locked(txr, ifp); -#endif IGB_TX_UNLOCK(txr); /* Do we need another? */ if (more) { @@ -1451,7 +1240,7 @@ igb_handle_que(void *context, int pendin } #ifdef DEVICE_POLLING - if (ifp->if_capenable & IFCAP_POLLING) + if (adapter->if_capenable & IFCAP_POLLING) return; #endif /* Reenable this interrupt */ @@ -1476,23 +1265,18 @@ static void igb_handle_link_locked(struct adapter *adapter) { struct tx_ring *txr = adapter->tx_rings; - struct ifnet *ifp = adapter->ifp; + if_t ifp = adapter->ifp; IGB_CORE_LOCK_ASSERT(adapter); adapter->hw.mac.get_link_status = 1; igb_update_link_status(adapter); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) && adapter->link_active) { + if ((adapter->flags & IGB_RUNNING) && adapter->link_active) { for (int i = 0; i < adapter->num_queues; i++, txr++) { IGB_TX_LOCK(txr); -#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && - !drbr_empty(ifp, txr->br)) + !buf_ring_empty(txr->br)) igb_mq_start_locked(ifp, txr); -#else - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - igb_start_locked(txr, ifp); -#endif IGB_TX_UNLOCK(txr); } } @@ -1543,16 +1327,10 @@ igb_irq_fast(void *arg) } #ifdef DEVICE_POLLING -#if __FreeBSD_version >= 800000 -#define POLL_RETURN_COUNT(a) (a) static int -#else -#define POLL_RETURN_COUNT(a) -static void -#endif -igb_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +igb_poll(if_t ifp, enum poll_cmd cmd, int count) { - struct adapter *adapter = ifp->if_softc; + struct adapter *adapter = if_getsoftc(ifp, IF_DRIVER_SOFTC); struct igb_queue *que; struct tx_ring *txr; u32 reg_icr, rx_done = 0; @@ -1560,9 +1338,9 @@ igb_poll(struct ifnet *ifp, enum poll_cm bool more; IGB_CORE_LOCK(adapter); - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { + if ((adapter->flags & IGB_RUNNING) == 0) { IGB_CORE_UNLOCK(adapter); - return POLL_RETURN_COUNT(rx_done); + return (rx_done); } if (cmd == POLL_AND_CHECK_STATUS) { @@ -1586,17 +1364,12 @@ igb_poll(struct ifnet *ifp, enum poll_cm do { more = igb_txeof(txr); } while (loop-- && more); -#ifndef IGB_LEGACY_TX - if (!drbr_empty(ifp, txr->br)) + if (!buf_ring_empty(txr->br)) igb_mq_start_locked(ifp, txr); -#else - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - igb_start_locked(txr, ifp); -#endif IGB_TX_UNLOCK(txr); } - return POLL_RETURN_COUNT(rx_done); + return (rx_done); } #endif /* DEVICE_POLLING */ @@ -1610,14 +1383,14 @@ igb_msix_que(void *arg) { struct igb_queue *que = arg; struct adapter *adapter = que->adapter; - struct ifnet *ifp = adapter->ifp; + if_t ifp = adapter->ifp; struct tx_ring *txr = que->txr; struct rx_ring *rxr = que->rxr; u32 newitr = 0; bool more_rx; /* Ignore spurious interrupts */ - if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) + if ((adapter->flags & IGB_RUNNING) == 0) return; E1000_WRITE_REG(&adapter->hw, E1000_EIMC, que->eims); @@ -1625,15 +1398,10 @@ igb_msix_que(void *arg) IGB_TX_LOCK(txr); igb_txeof(txr); -#ifndef IGB_LEGACY_TX /* Process the stack queue only if not depleted */ if (((txr->queue_status & IGB_QUEUE_DEPLETED) == 0) && - !drbr_empty(ifp, txr->br)) + !buf_ring_empty(txr->br)) igb_mq_start_locked(ifp, txr); -#else - if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) - igb_start_locked(txr, ifp); -#endif IGB_TX_UNLOCK(txr); more_rx = igb_rxeof(que, adapter->rx_process_limit, NULL); @@ -1735,9 +1503,9 @@ spurious: * **********************************************************************/ static void -igb_media_status(struct ifnet *ifp, struct ifmediareq *ifmr) +igb_media_status(if_t ifp, struct ifmediareq *ifmr) { - struct adapter *adapter = ifp->if_softc; + struct adapter *adapter = if_getsoftc(ifp, IF_DRIVER_SOFTC); INIT_DEBUGOUT("igb_media_status: begin"); @@ -1794,9 +1562,9 @@ igb_media_status(struct ifnet *ifp, stru * **********************************************************************/ static int -igb_media_change(struct ifnet *ifp) +igb_media_change(if_t ifp) { - struct adapter *adapter = ifp->if_softc; + struct adapter *adapter = if_getsoftc(ifp, IF_DRIVER_SOFTC); struct ifmedia *ifm = &adapter->media; INIT_DEBUGOUT("igb_media_change: begin"); @@ -1836,7 +1604,7 @@ igb_media_change(struct ifnet *ifp) device_printf(adapter->dev, "Unsupported media type\n"); } - igb_init_locked(adapter); + igb_init(adapter); IGB_CORE_UNLOCK(adapter); return (0); @@ -1990,10 +1758,10 @@ retry: return (0); } + static void igb_set_promisc(struct adapter *adapter) { - struct ifnet *ifp = adapter->ifp; struct e1000_hw *hw = &adapter->hw; u32 reg; @@ -2003,10 +1771,10 @@ igb_set_promisc(struct adapter *adapter) } reg = E1000_READ_REG(hw, E1000_RCTL); - if (ifp->if_flags & IFF_PROMISC) { + if (adapter->if_flags & IFF_PROMISC) { reg |= (E1000_RCTL_UPE | E1000_RCTL_MPE); E1000_WRITE_REG(hw, E1000_RCTL, reg); - } else if (ifp->if_flags & IFF_ALLMULTI) { + } else if (adapter->if_flags & IFF_ALLMULTI) { reg |= E1000_RCTL_MPE; reg &= ~E1000_RCTL_UPE; E1000_WRITE_REG(hw, E1000_RCTL, reg); @@ -2014,10 +1782,20 @@ igb_set_promisc(struct adapter *adapter) } static void +igb_count_maddr(void *arg, struct sockaddr *maddr) +{ + struct sockaddr_dl *sdl = (struct sockaddr_dl *)maddr; + int *mcnt = arg; + + if (sdl->sdl_family == AF_LINK) + (*mcnt)++; +} + +static void igb_disable_promisc(struct adapter *adapter) { struct e1000_hw *hw = &adapter->hw; - struct ifnet *ifp = adapter->ifp; + if_t ifp = adapter->ifp; u32 reg; int mcnt = 0; @@ -2026,29 +1804,11 @@ igb_disable_promisc(struct adapter *adap return; } reg = E1000_READ_REG(hw, E1000_RCTL); - reg &= (~E1000_RCTL_UPE); - if (ifp->if_flags & IFF_ALLMULTI) + reg &= (~E1000_RCTL_UPE); + if (adapter->if_flags & IFF_ALLMULTI) mcnt = MAX_NUM_MULTICAST_ADDRESSES; - else { - struct ifmultiaddr *ifma; -#if __FreeBSD_version < 800000 - IF_ADDR_LOCK(ifp); -#else - if_maddr_rlock(ifp); -#endif - TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { - if (ifma->ifma_addr->sa_family != AF_LINK) - continue; - if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) - break; - mcnt++; - } -#if __FreeBSD_version < 800000 - IF_ADDR_UNLOCK(ifp); -#else - if_maddr_runlock(ifp); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 16:59:43 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFDC6DF0; Wed, 11 Mar 2015 16:59:42 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B2453B7D; Wed, 11 Mar 2015 16:59:42 +0000 (UTC) Received: by igdh15 with SMTP id h15so41756254igd.4; Wed, 11 Mar 2015 09:59:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=xWAJMW6njf8AaD2I94HhAQmY1uGIY4X8l6rTkK4DNCc=; b=fPyxR5KMTYD0gwKmwy9NTrV09rc3W/zctO2te29fe0UmFC8IS5bii9skCf5TEvLC9U pO24MDXUPqZR9585fpgggM4NJpDiTjAYiHd3qgsWzLVBo9ViUUQRD7ttkJhyiK/9R11X jJN3xZAuegFNfj6lacRk5Z5h0oOaSzvhm0tJPLtvYlww4f+P/iILgLfrKrsFxJ4AtcJs E+EzkalVmcu0xuj9W2ZcKG/JIntnt1UiVWibhkr7IJ4gj4DZKGiy8eiU0NFAg+lwW6d2 w8oWKjTEw6t1NGRx4V+7c4ZNxefhiBzr9OnBP7hup8szy4moNvtrgih+KX4il9sz8PeU ojqQ== MIME-Version: 1.0 X-Received: by 10.107.155.13 with SMTP id d13mr65939597ioe.29.1426093181979; Wed, 11 Mar 2015 09:59:41 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Wed, 11 Mar 2015 09:59:41 -0700 (PDT) In-Reply-To: <20150311153525.GF17947@FreeBSD.org> References: <201501130902.t0D927NE077024@svn.freebsd.org> <20150114144358.GD15484@FreeBSD.org> <20150306024101.GT17947@FreeBSD.org> <44632162.sBlScnaX0r@ralph.baldwin.cx> <20150311151735.GE17947@FreeBSD.org> <20150311153525.GF17947@FreeBSD.org> Date: Wed, 11 Mar 2015 09:59:41 -0700 X-Google-Sender-Auth: 001-6Qj8owRrcjXaGLs8yFzS9yE Message-ID: Subject: Re: svn commit: r277122 - projects/ifnet/sys/dev/msk From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-projects@freebsd.org, "src-committers@freebsd.org" , John Baldwin X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 11 Mar 2015 16:59:43 -0000 On 11 March 2015 at 08:35, Gleb Smirnoff wrote: > On Wed, Mar 11, 2015 at 08:27:48AM -0700, Adrian Chadd wrote: > A> Please don't - if_transmit in (correct) wifi drivers is typically > A> slightly different. :P > > I expected that :) > > May be this level of cut-n-paste we should just find acceptable. > > btw, what about looking at projects/ifnet and trying to convert > a 802.11 driver to it? :) Because the really problematic stuff in net80211/(drivers) to be taken care first, far before I worry about things like ifnet API. :) -adrian From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 17:27:34 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB6AD51C; Wed, 11 Mar 2015 17:27:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2C63EB4; Wed, 11 Mar 2015 17:27:33 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 22558B91F; Wed, 11 Mar 2015 13:27:31 -0400 (EDT) From: John Baldwin To: Gleb Smirnoff Subject: Re: svn commit: r277122 - projects/ifnet/sys/dev/msk Date: Wed, 11 Mar 2015 13:07:29 -0400 Message-ID: <1823344.ReAEVtmWLW@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <20150311151735.GE17947@FreeBSD.org> References: <201501130902.t0D927NE077024@svn.freebsd.org> <44632162.sBlScnaX0r@ralph.baldwin.cx> <20150311151735.GE17947@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 11 Mar 2015 13:27:31 -0400 (EDT) Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 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: Wed, 11 Mar 2015 17:27:34 -0000 On Wednesday, March 11, 2015 06:17:35 PM Gleb Smirnoff wrote: > On Wed, Mar 11, 2015 at 10:08:30AM -0400, John Baldwin wrote: > J> > John, can you please look at this patch? It is against projects/ifnet. > J> > > J> > The idea is that if_snd_enqueue() tells us whether we grabbed to queue and > J> > own it or not. If we grabbed it, we go processing it to the end. However, > J> > we keep accounting on how many packets we processed there. If other > J> > producer notices that we processed too much, it will preempt the queue. > J> > > J> > Looks like a design that matches your demands. However, extra code needs > J> > to be put into drivers foo_start() functions, since now we need to disown > J> > the queue if we stop processing it for some reason different to queue getting > J> > empty. > J> > J> I think this patch is not a bad approach. It resembles the last thing I > J> posted to net@ except that you have added the burst length cap which is a > J> nice addition. Of course, this uses a lock to do so which buf_ring tries to > J> avoid. > J> > J> (I also eventually would love to have a way to move the enqueue out of drivers > J> entirely still where there is a callback for "drain this queue" that only > J> gets called in the !EBUSY case. I can't recall if that is compatible with your > J> stacking approach, but it would make it harder for drivers to get this wrong > J> if we can avoid duplicating it N times.) > > I really wish to avoid duplicating code in regular drivers foo_transmit > and foo_start, but this doesn't seem easy for me. > > Typical foo_transmit looks like: > > > if ((error = if_snd_enqueue(ifp, m)) != 0) > return (error); ^^^^^^ It's this part that it would be nice to not duplicate. With buf_ring that became quite a bit more complicated than just one line. I'm not sure yet how you are intending to handle buf_ring, but ideally I'd like the stack to know about transmit rings and to do this enqueuing (and the EBUSY check your patch would add) outside of the driver, and only call down to the driver when there is work to do for a queue. The remainder below this is actually very close to the old if_start method. > > * LOCK(sc); > * if (sc->link_not_active || sc->resources_not_allocated) > return; > * while (sc->tx_count <= DRIVER_CONST && > (m = if_snd_dequeue(ifp)) != NULL) { > * if (driver_encap(sc, m, ...) != 0) { > if_snd_prepend(ifp, m); > break; > } > count++ > } > if (count) { > * /* TX unit programming */ > } > * UNLOCK(sc); > > All lines marked with * are somewhat unique in drivers. So, cycle looks > a like, but always differ in details. Right now I don't have ideas how to > collapse that to a generic method. If anyone has, please share! :) > > -- John Baldwin From owner-svn-src-projects@FreeBSD.ORG Wed Mar 11 19:04:08 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D2BBF0E; Wed, 11 Mar 2015 19:04:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8468AC9B; Wed, 11 Mar 2015 19:04:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2BJ48Sa069436; Wed, 11 Mar 2015 19:04:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2BJ426g069408; Wed, 11 Mar 2015 19:04:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503111904.t2BJ426g069408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 11 Mar 2015 19:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279893 - in projects/clang360-import: cddl/contrib/dtracetoolkit/Proc cddl/contrib/opensolaris/common/ctf cddl/contrib/opensolaris/tools/ctf/cvt lib/libc/net lib/libc/powerpc/gen lib/l... 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.18-1 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: Wed, 11 Mar 2015 19:04:08 -0000 Author: dim Date: Wed Mar 11 19:04:01 2015 New Revision: 279893 URL: https://svnweb.freebsd.org/changeset/base/279893 Log: Merge ^/head r279759 through r279892. Added: projects/clang360-import/lib/libpmc/pmc.haswellxeon.3 - copied unchanged from r279892, head/lib/libpmc/pmc.haswellxeon.3 projects/clang360-import/lib/libstand/powerpc/syncicache.c - copied unchanged from r279892, head/lib/libstand/powerpc/syncicache.c projects/clang360-import/share/dtrace/udptrack - copied unchanged from r279892, head/share/dtrace/udptrack projects/clang360-import/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c - copied unchanged from r279892, head/sys/arm/broadcom/bcm2835/bcm283x_dwc_fdt.c projects/clang360-import/sys/boot/powerpc/ofw/ofwfdt.c - copied unchanged from r279892, head/sys/boot/powerpc/ofw/ofwfdt.c projects/clang360-import/sys/dev/usb/controller/dwc_otg_fdt.h - copied unchanged from r279892, head/sys/dev/usb/controller/dwc_otg_fdt.h projects/clang360-import/sys/kern/uipc_mbufhash.c - copied unchanged from r279892, head/sys/kern/uipc_mbufhash.c projects/clang360-import/sys/modules/dtb/am335x/ - copied from r279892, head/sys/modules/dtb/am335x/ projects/clang360-import/sys/sys/gzio.h - copied unchanged from r279892, head/sys/sys/gzio.h projects/clang360-import/usr.bin/procstat/procstat_cs.c - copied unchanged from r279892, head/usr.bin/procstat/procstat_cs.c Deleted: projects/clang360-import/sys/ofed/drivers/net/mlx4/utils.c projects/clang360-import/sys/ofed/drivers/net/mlx4/utils.h Modified: projects/clang360-import/cddl/contrib/dtracetoolkit/Proc/pidpersec.d projects/clang360-import/cddl/contrib/opensolaris/common/ctf/ctf_create.c projects/clang360-import/cddl/contrib/opensolaris/tools/ctf/cvt/output.c projects/clang360-import/lib/libc/net/sctp_sys_calls.c projects/clang360-import/lib/libc/powerpc/gen/_setjmp.S projects/clang360-import/lib/libc/powerpc/gen/setjmp.S projects/clang360-import/lib/libc/powerpc/gen/sigsetjmp.S projects/clang360-import/lib/libc/powerpc64/gen/_setjmp.S projects/clang360-import/lib/libc/powerpc64/gen/setjmp.S projects/clang360-import/lib/libc/powerpc64/gen/sigsetjmp.S projects/clang360-import/lib/libgpio/gpio.3 projects/clang360-import/lib/libgpio/gpio.c projects/clang360-import/lib/libgpio/libgpio.h projects/clang360-import/lib/libnv/tests/dnv_tests.cc projects/clang360-import/lib/libnv/tests/nv_tests.cc projects/clang360-import/lib/libpmc/libpmc.c projects/clang360-import/lib/libpmc/pmc.3 projects/clang360-import/lib/libpmc/pmc.haswell.3 projects/clang360-import/lib/libpmc/pmc.ivybridge.3 projects/clang360-import/lib/libpmc/pmc.ivybridgexeon.3 projects/clang360-import/lib/libpmc/pmc.sandybridge.3 projects/clang360-import/lib/libpmc/pmc.sandybridgexeon.3 projects/clang360-import/lib/libstand/Makefile projects/clang360-import/lib/libstand/powerpc/_setjmp.S projects/clang360-import/lib/libthr/thread/thr_private.h projects/clang360-import/lib/msun/man/j0.3 projects/clang360-import/lib/msun/src/e_j0.c projects/clang360-import/lib/msun/src/e_j0f.c projects/clang360-import/lib/msun/src/e_j1.c projects/clang360-import/lib/msun/src/e_j1f.c projects/clang360-import/lib/msun/src/e_jn.c projects/clang360-import/lib/msun/src/e_jnf.c projects/clang360-import/share/dtrace/Makefile projects/clang360-import/share/dtrace/tcpstate projects/clang360-import/share/man/man5/core.5 projects/clang360-import/share/man/man9/SDT.9 projects/clang360-import/share/man/man9/VOP_VPTOCNP.9 projects/clang360-import/share/misc/committers-src.dot projects/clang360-import/sys/arm/arm/cpufunc_asm_armv7.S projects/clang360-import/sys/arm/arm/cpuinfo.c projects/clang360-import/sys/arm/arm/genassym.c projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_fb.c projects/clang360-import/sys/arm/broadcom/bcm2835/bcm2835_fbd.c projects/clang360-import/sys/arm/broadcom/bcm2835/files.bcm2835 projects/clang360-import/sys/arm/conf/ARMADAXP projects/clang360-import/sys/arm/conf/BEAGLEBONE projects/clang360-import/sys/arm/conf/CUBIEBOARD projects/clang360-import/sys/arm/conf/CUBIEBOARD2 projects/clang360-import/sys/arm/conf/DB-78XXX projects/clang360-import/sys/arm/conf/DB-88F5XXX projects/clang360-import/sys/arm/conf/DB-88F6XXX projects/clang360-import/sys/arm/conf/DOCKSTAR projects/clang360-import/sys/arm/conf/DREAMPLUG-1001 projects/clang360-import/sys/arm/conf/EXYNOS5.common projects/clang360-import/sys/arm/conf/PANDABOARD projects/clang360-import/sys/arm/conf/SHEEVAPLUG projects/clang360-import/sys/arm/conf/TS7800 projects/clang360-import/sys/arm/conf/VYBRID projects/clang360-import/sys/arm/conf/ZEDBOARD projects/clang360-import/sys/arm/include/cpu-v6.h projects/clang360-import/sys/arm/include/cpuinfo.h projects/clang360-import/sys/arm/ti/aintc.c projects/clang360-import/sys/arm/ti/am335x/am335x_dmtimer.c projects/clang360-import/sys/arm/ti/omap4/omap4_prcm_clks.c projects/clang360-import/sys/boot/libstand32/Makefile projects/clang360-import/sys/boot/ofw/common/main.c projects/clang360-import/sys/boot/ofw/libofw/elf_freebsd.c projects/clang360-import/sys/boot/ofw/libofw/openfirm.c projects/clang360-import/sys/boot/ofw/libofw/openfirm.h projects/clang360-import/sys/boot/ofw/libofw/ppc64_elf_freebsd.c projects/clang360-import/sys/boot/powerpc/ofw/Makefile projects/clang360-import/sys/boot/powerpc/ofw/metadata.c projects/clang360-import/sys/boot/sparc64/loader/metadata.c projects/clang360-import/sys/conf/NOTES projects/clang360-import/sys/conf/files projects/clang360-import/sys/conf/options projects/clang360-import/sys/dev/bge/if_bge.c projects/clang360-import/sys/dev/cadence/if_cgem.c projects/clang360-import/sys/dev/cxgbe/tom/t4_ddp.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_8327.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_phy.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_phy.h projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_reg.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_vlans.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_vlans.h projects/clang360-import/sys/dev/etherswitch/arswitch/arswitchreg.h projects/clang360-import/sys/dev/etherswitch/arswitch/arswitchvar.h projects/clang360-import/sys/dev/gpio/gpiobus.c projects/clang360-import/sys/dev/gpio/gpiobus_if.m projects/clang360-import/sys/dev/gpio/gpiobusvar.h projects/clang360-import/sys/dev/gpio/gpioc.c projects/clang360-import/sys/dev/gpio/ofw_gpiobus.c projects/clang360-import/sys/dev/hwpmc/hwpmc_core.c projects/clang360-import/sys/dev/hwpmc/pmc_events.h projects/clang360-import/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c projects/clang360-import/sys/dev/iicbus/ds3231.c projects/clang360-import/sys/dev/iicbus/lm75.c projects/clang360-import/sys/dev/ixgbe/ixgbe.c projects/clang360-import/sys/dev/ixl/i40e_adminq_cmd.h projects/clang360-import/sys/dev/ixl/i40e_common.c projects/clang360-import/sys/dev/ixl/i40e_prototype.h projects/clang360-import/sys/dev/ixl/i40e_type.h projects/clang360-import/sys/dev/ixl/if_ixl.c projects/clang360-import/sys/dev/ixl/if_ixlv.c projects/clang360-import/sys/dev/ixl/ixl.h projects/clang360-import/sys/dev/ixl/ixl_pf.h projects/clang360-import/sys/dev/ixl/ixl_txrx.c projects/clang360-import/sys/dev/ixl/ixlv.h projects/clang360-import/sys/dev/ixl/ixlvc.c projects/clang360-import/sys/dev/pci/pci_iov.c projects/clang360-import/sys/dev/usb/controller/dwc_otg_fdt.c projects/clang360-import/sys/dev/usb/input/uhid.c projects/clang360-import/sys/dev/usb/serial/usb_serial.c projects/clang360-import/sys/dev/vt/hw/ofwfb/ofwfb.c projects/clang360-import/sys/dev/wpi/if_wpi.c projects/clang360-import/sys/kern/imgact_elf.c projects/clang360-import/sys/kern/kern_gzio.c projects/clang360-import/sys/kern/kern_sig.c projects/clang360-import/sys/kern/subr_bus.c projects/clang360-import/sys/mips/atheros/if_arge.c projects/clang360-import/sys/mips/conf/AP135.hints projects/clang360-import/sys/modules/Makefile projects/clang360-import/sys/modules/mlxen/Makefile projects/clang360-import/sys/net/ieee8023ad_lacp.c projects/clang360-import/sys/net/if_lagg.c projects/clang360-import/sys/net/if_lagg.h projects/clang360-import/sys/net/zlib.h projects/clang360-import/sys/netinet/sctp.h projects/clang360-import/sys/netinet/sctp_cc_functions.c projects/clang360-import/sys/netinet/sctp_input.c projects/clang360-import/sys/netinet/sctp_os_bsd.h projects/clang360-import/sys/netinet/sctp_pcb.c projects/clang360-import/sys/netinet/sctp_pcb.h projects/clang360-import/sys/netinet/sctp_peeloff.c projects/clang360-import/sys/netinet/sctp_structs.h projects/clang360-import/sys/netinet/sctp_timer.c projects/clang360-import/sys/netinet/sctp_usrreq.c projects/clang360-import/sys/netinet/sctputil.c projects/clang360-import/sys/netinet/tcp_usrreq.c projects/clang360-import/sys/ofed/drivers/net/mlx4/en_netdev.c projects/clang360-import/sys/ofed/drivers/net/mlx4/en_tx.c projects/clang360-import/sys/powerpc/powermac/platform_powermac.c projects/clang360-import/sys/powerpc/powerpc/syncicache.c projects/clang360-import/sys/sys/bus.h projects/clang360-import/sys/sys/gpio.h projects/clang360-import/sys/sys/mbuf.h projects/clang360-import/sys/vm/vm_reserv.c projects/clang360-import/sys/vm/vnode_pager.c projects/clang360-import/tools/regression/usr.bin/env/regress-env.rgdata projects/clang360-import/tools/regression/usr.bin/env/regress-sb.rb projects/clang360-import/usr.bin/ctlstat/ctlstat.8 projects/clang360-import/usr.bin/env/envopts.c projects/clang360-import/usr.bin/m4/misc.c projects/clang360-import/usr.bin/procstat/Makefile projects/clang360-import/usr.bin/procstat/procstat.1 projects/clang360-import/usr.bin/procstat/procstat.c projects/clang360-import/usr.bin/procstat/procstat.h projects/clang360-import/usr.bin/touch/touch.1 projects/clang360-import/usr.bin/w/w.c projects/clang360-import/usr.sbin/autofs/automount.c projects/clang360-import/usr.sbin/autofs/automountd.8 projects/clang360-import/usr.sbin/autofs/automountd.c projects/clang360-import/usr.sbin/autofs/common.c projects/clang360-import/usr.sbin/autofs/common.h projects/clang360-import/usr.sbin/autofs/popen.c projects/clang360-import/usr.sbin/gpioctl/gpioctl.8 projects/clang360-import/usr.sbin/gpioctl/gpioctl.c Directory Properties: projects/clang360-import/ (props changed) projects/clang360-import/cddl/ (props changed) projects/clang360-import/cddl/contrib/opensolaris/ (props changed) projects/clang360-import/lib/libc/ (props changed) projects/clang360-import/share/ (props changed) projects/clang360-import/sys/ (props changed) projects/clang360-import/sys/boot/ (props changed) projects/clang360-import/sys/boot/powerpc/ofw/ (props changed) projects/clang360-import/sys/conf/ (props changed) projects/clang360-import/sys/dev/hyperv/ (props changed) projects/clang360-import/usr.bin/procstat/ (props changed) Modified: projects/clang360-import/cddl/contrib/dtracetoolkit/Proc/pidpersec.d ============================================================================== --- projects/clang360-import/cddl/contrib/dtracetoolkit/Proc/pidpersec.d Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/cddl/contrib/dtracetoolkit/Proc/pidpersec.d Wed Mar 11 19:04:01 2015 (r279893) @@ -41,7 +41,7 @@ dtrace:::BEGIN { - printf("%-22s %8s %6s\n", "TIME", "LASTPID", "PID/s"); + printf("%-22s %6s\n", "TIME", "PID/s"); pids = 0; } @@ -52,6 +52,6 @@ proc:::exec-success profile:::tick-1sec { - printf("%-22Y %8d %6d\n", walltimestamp, `mpid, pids); + printf("%-22Y %6d\n", walltimestamp, pids); pids = 0; } Modified: projects/clang360-import/cddl/contrib/opensolaris/common/ctf/ctf_create.c ============================================================================== --- projects/clang360-import/cddl/contrib/opensolaris/common/ctf/ctf_create.c Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/cddl/contrib/opensolaris/common/ctf/ctf_create.c Wed Mar 11 19:04:01 2015 (r279893) @@ -583,10 +583,10 @@ ctf_discard(ctf_file_t *fp) return (0); /* no update required */ for (dtd = ctf_list_prev(&fp->ctf_dtdefs); dtd != NULL; dtd = ntd) { - if (dtd->dtd_type <= fp->ctf_dtoldid) + ntd = ctf_list_prev(dtd); + if (CTF_TYPE_TO_INDEX(dtd->dtd_type) <= fp->ctf_dtoldid) continue; /* skip types that have been committed */ - ntd = ctf_list_prev(dtd); ctf_dtd_delete(fp, dtd); } @@ -1313,10 +1313,13 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_fil * unless dst_type is a forward declaration and src_type is a struct, * union, or enum (i.e. the definition of the previous forward decl). */ - if (dst_type != CTF_ERR && dst_kind != kind && ( - dst_kind != CTF_K_FORWARD || (kind != CTF_K_ENUM && - kind != CTF_K_STRUCT && kind != CTF_K_UNION))) - return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + if (dst_type != CTF_ERR && dst_kind != kind) { + if (dst_kind != CTF_K_FORWARD || (kind != CTF_K_ENUM && + kind != CTF_K_STRUCT && kind != CTF_K_UNION)) + return (ctf_set_errno(dst_fp, ECTF_CONFLICT)); + else + dst_type = CTF_ERR; + } /* * If the non-empty name was not found in the appropriate hash, search @@ -1328,7 +1331,7 @@ ctf_add_type(ctf_file_t *dst_fp, ctf_fil */ if (dst_type == CTF_ERR && name[0] != '\0') { for (dtd = ctf_list_prev(&dst_fp->ctf_dtdefs); dtd != NULL && - dtd->dtd_type > dst_fp->ctf_dtoldid; + CTF_TYPE_TO_INDEX(dtd->dtd_type) > dst_fp->ctf_dtoldid; dtd = ctf_list_prev(dtd)) { if (CTF_INFO_KIND(dtd->dtd_data.ctt_info) == kind && dtd->dtd_name != NULL && Modified: projects/clang360-import/cddl/contrib/opensolaris/tools/ctf/cvt/output.c ============================================================================== --- projects/clang360-import/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Wed Mar 11 19:04:01 2015 (r279893) @@ -23,8 +23,6 @@ * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Routines for preparing tdata trees for conversion into CTF data, and * for placing the resulting data into an output file. Modified: projects/clang360-import/lib/libc/net/sctp_sys_calls.c ============================================================================== --- projects/clang360-import/lib/libc/net/sctp_sys_calls.c Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libc/net/sctp_sys_calls.c Wed Mar 11 19:04:01 2015 (r279893) @@ -383,6 +383,9 @@ sctp_opt_info(int sd, sctp_assoc_t id, i case SCTP_PR_ASSOC_STATUS: ((struct sctp_prstatus *)arg)->sprstat_assoc_id = id; break; + case SCTP_MAX_CWND: + ((struct sctp_assoc_value *)arg)->assoc_id = id; + break; default: break; } Modified: projects/clang360-import/lib/libc/powerpc/gen/_setjmp.S ============================================================================== --- projects/clang360-import/lib/libc/powerpc/gen/_setjmp.S Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libc/powerpc/gen/_setjmp.S Wed Mar 11 19:04:01 2015 (r279893) @@ -56,12 +56,54 @@ ENTRY(_setjmp) mr %r10,%r1 mr %r9,%r2 stmw %r9,20(%r3) + + /* FPRs */ + stfd %f14,92+0*8(%r3) + stfd %f15,92+1*8(%r3) + stfd %f16,92+2*8(%r3) + stfd %f17,92+3*8(%r3) + stfd %f18,92+4*8(%r3) + stfd %f19,92+5*8(%r3) + stfd %f20,92+6*8(%r3) + stfd %f21,92+7*8(%r3) + stfd %f22,92+8*8(%r3) + stfd %f23,92+9*8(%r3) + stfd %f24,92+10*8(%r3) + stfd %f25,92+11*8(%r3) + stfd %f26,92+12*8(%r3) + stfd %f27,92+13*8(%r3) + stfd %f28,93+13*8(%r3) + stfd %f29,93+14*8(%r3) + stfd %f30,93+15*8(%r3) + stfd %f31,93+16*8(%r3) + li %r3,0 blr END(_setjmp) ENTRY(_longjmp) lmw %r9,20(%r3) + + /* FPRs */ + lfd %f14,92+0*8(%r3) + lfd %f15,92+1*8(%r3) + lfd %f16,92+2*8(%r3) + lfd %f17,92+3*8(%r3) + lfd %f18,92+4*8(%r3) + lfd %f19,92+5*8(%r3) + lfd %f20,92+6*8(%r3) + lfd %f21,92+7*8(%r3) + lfd %f22,92+8*8(%r3) + lfd %f23,92+9*8(%r3) + lfd %f24,92+10*8(%r3) + lfd %f25,92+11*8(%r3) + lfd %f26,92+12*8(%r3) + lfd %f27,92+13*8(%r3) + lfd %f28,93+13*8(%r3) + lfd %f29,93+14*8(%r3) + lfd %f30,93+15*8(%r3) + lfd %f31,93+16*8(%r3) + mtlr %r11 mtcr %r12 mr %r1,%r10 Modified: projects/clang360-import/lib/libc/powerpc/gen/setjmp.S ============================================================================== --- projects/clang360-import/lib/libc/powerpc/gen/setjmp.S Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libc/powerpc/gen/setjmp.S Wed Mar 11 19:04:01 2015 (r279893) @@ -66,6 +66,27 @@ ENTRY(setjmp) mr %r10,%r1 /* r10 <- stackptr */ mr %r9,%r2 /* r9 <- global ptr */ stmw %r9,20(%r6) + + /* FPRs */ + stfd %f14,92+0*8(%r6) + stfd %f15,92+1*8(%r6) + stfd %f16,92+2*8(%r6) + stfd %f17,92+3*8(%r6) + stfd %f18,92+4*8(%r6) + stfd %f19,92+5*8(%r6) + stfd %f20,92+6*8(%r6) + stfd %f21,92+7*8(%r6) + stfd %f22,92+8*8(%r6) + stfd %f23,92+9*8(%r6) + stfd %f24,92+10*8(%r6) + stfd %f25,92+11*8(%r6) + stfd %f26,92+12*8(%r6) + stfd %f27,92+13*8(%r6) + stfd %f28,93+13*8(%r6) + stfd %f29,93+14*8(%r6) + stfd %f30,93+15*8(%r6) + stfd %f31,93+16*8(%r6) + li %r3,0 /* return (0) */ blr END(setjmp) @@ -73,6 +94,27 @@ END(setjmp) WEAK_REFERENCE(CNAME(__longjmp), longjmp) ENTRY(__longjmp) lmw %r9,20(%r3) /* restore regs */ + + /* FPRs */ + lfd %f14,92+0*8(%r3) + lfd %f15,92+1*8(%r3) + lfd %f16,92+2*8(%r3) + lfd %f17,92+3*8(%r3) + lfd %f18,92+4*8(%r3) + lfd %f19,92+5*8(%r3) + lfd %f20,92+6*8(%r3) + lfd %f21,92+7*8(%r3) + lfd %f22,92+8*8(%r3) + lfd %f23,92+9*8(%r3) + lfd %f24,92+10*8(%r3) + lfd %f25,92+11*8(%r3) + lfd %f26,92+12*8(%r3) + lfd %f27,92+13*8(%r3) + lfd %f28,93+13*8(%r3) + lfd %f29,93+14*8(%r3) + lfd %f30,93+15*8(%r3) + lfd %f31,93+16*8(%r3) + mr %r6,%r4 /* save val param */ mtlr %r11 /* r11 -> link reg */ mtcr %r12 /* r12 -> condition reg */ Modified: projects/clang360-import/lib/libc/powerpc/gen/sigsetjmp.S ============================================================================== --- projects/clang360-import/lib/libc/powerpc/gen/sigsetjmp.S Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libc/powerpc/gen/sigsetjmp.S Wed Mar 11 19:04:01 2015 (r279893) @@ -71,12 +71,54 @@ ENTRY(sigsetjmp) mr %r10,%r1 mr %r9,%r2 stmw %r9,20(%r6) + + /* FPRs */ + stfd %f14,92+0*8(%r6) + stfd %f15,92+1*8(%r6) + stfd %f16,92+2*8(%r6) + stfd %f17,92+3*8(%r6) + stfd %f18,92+4*8(%r6) + stfd %f19,92+5*8(%r6) + stfd %f20,92+6*8(%r6) + stfd %f21,92+7*8(%r6) + stfd %f22,92+8*8(%r6) + stfd %f23,92+9*8(%r6) + stfd %f24,92+10*8(%r6) + stfd %f25,92+11*8(%r6) + stfd %f26,92+12*8(%r6) + stfd %f27,92+13*8(%r6) + stfd %f28,93+13*8(%r6) + stfd %f29,93+14*8(%r6) + stfd %f30,93+15*8(%r6) + stfd %f31,93+16*8(%r6) + li %r3,0 blr END(sigsetjmp) ENTRY(siglongjmp) lmw %r9,20(%r3) + + /* FPRs */ + lfd %f14,92+0*8(%r3) + lfd %f15,92+1*8(%r3) + lfd %f16,92+2*8(%r3) + lfd %f17,92+3*8(%r3) + lfd %f18,92+4*8(%r3) + lfd %f19,92+5*8(%r3) + lfd %f20,92+6*8(%r3) + lfd %f21,92+7*8(%r3) + lfd %f22,92+8*8(%r3) + lfd %f23,92+9*8(%r3) + lfd %f24,92+10*8(%r3) + lfd %f25,92+11*8(%r3) + lfd %f26,92+12*8(%r3) + lfd %f27,92+13*8(%r3) + lfd %f28,93+13*8(%r3) + lfd %f29,93+14*8(%r3) + lfd %f30,93+15*8(%r3) + lfd %f31,93+16*8(%r3) + lwz %r7,0(%r3) mr %r6,%r4 mtlr %r11 Modified: projects/clang360-import/lib/libc/powerpc64/gen/_setjmp.S ============================================================================== --- projects/clang360-import/lib/libc/powerpc64/gen/_setjmp.S Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libc/powerpc64/gen/_setjmp.S Wed Mar 11 19:04:01 2015 (r279893) @@ -56,23 +56,41 @@ ENTRY(_setjmp) mr %r10,%r1 mr %r9,%r2 std %r9,40 + 0*8(%r3) + stfd %f14,40 + 23*8(%r3) std %r10,40 + 1*8(%r3) + stfd %f15,40 + 24*8(%r3) std %r11,40 + 2*8(%r3) + stfd %f16,40 + 25*8(%r3) std %r12,40 + 3*8(%r3) + stfd %f17,40 + 26*8(%r3) std %r13,40 + 4*8(%r3) + stfd %f18,40 + 27*8(%r3) std %r14,40 + 5*8(%r3) + stfd %f19,40 + 28*8(%r3) std %r15,40 + 6*8(%r3) + stfd %f20,40 + 29*8(%r3) std %r16,40 + 7*8(%r3) + stfd %f21,40 + 30*8(%r3) std %r17,40 + 8*8(%r3) + stfd %f22,40 + 31*8(%r3) std %r18,40 + 9*8(%r3) + stfd %f23,40 + 32*8(%r3) std %r19,40 + 10*8(%r3) + stfd %f24,40 + 33*8(%r3) std %r20,40 + 11*8(%r3) + stfd %f25,40 + 34*8(%r3) std %r21,40 + 12*8(%r3) + stfd %f26,40 + 35*8(%r3) std %r22,40 + 13*8(%r3) + stfd %f27,40 + 36*8(%r3) std %r23,40 + 14*8(%r3) + stfd %f28,40 + 37*8(%r3) std %r24,40 + 15*8(%r3) + stfd %f29,40 + 38*8(%r3) std %r25,40 + 16*8(%r3) + stfd %f30,40 + 39*8(%r3) std %r26,40 + 17*8(%r3) + stfd %f31,40 + 40*8(%r3) std %r27,40 + 18*8(%r3) std %r28,40 + 19*8(%r3) std %r29,40 + 20*8(%r3) @@ -84,23 +102,41 @@ END(_setjmp) ENTRY(_longjmp) ld %r9,40 + 0*8(%r3) + lfd %f14,40 + 23*8(%r3) ld %r10,40 + 1*8(%r3) + lfd %f15,40 + 24*8(%r3) ld %r11,40 + 2*8(%r3) + lfd %f16,40 + 25*8(%r3) ld %r12,40 + 3*8(%r3) + lfd %f17,40 + 26*8(%r3) ld %r14,40 + 5*8(%r3) + lfd %f18,40 + 27*8(%r3) ld %r15,40 + 6*8(%r3) + lfd %f19,40 + 28*8(%r3) ld %r16,40 + 7*8(%r3) + lfd %f20,40 + 29*8(%r3) ld %r17,40 + 8*8(%r3) + lfd %f21,40 + 30*8(%r3) ld %r18,40 + 9*8(%r3) + lfd %f22,40 + 31*8(%r3) ld %r19,40 + 10*8(%r3) + lfd %f23,40 + 32*8(%r3) ld %r20,40 + 11*8(%r3) + lfd %f24,40 + 33*8(%r3) ld %r21,40 + 12*8(%r3) + lfd %f25,40 + 34*8(%r3) ld %r22,40 + 13*8(%r3) + lfd %f26,40 + 35*8(%r3) ld %r23,40 + 14*8(%r3) + lfd %f27,40 + 36*8(%r3) ld %r24,40 + 15*8(%r3) + lfd %f28,40 + 37*8(%r3) ld %r25,40 + 16*8(%r3) + lfd %f29,40 + 38*8(%r3) ld %r26,40 + 17*8(%r3) + lfd %f30,40 + 39*8(%r3) ld %r27,40 + 18*8(%r3) + lfd %f31,40 + 40*8(%r3) ld %r28,40 + 19*8(%r3) ld %r29,40 + 20*8(%r3) ld %r30,40 + 21*8(%r3) Modified: projects/clang360-import/lib/libc/powerpc64/gen/setjmp.S ============================================================================== --- projects/clang360-import/lib/libc/powerpc64/gen/setjmp.S Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libc/powerpc64/gen/setjmp.S Wed Mar 11 19:04:01 2015 (r279893) @@ -67,29 +67,49 @@ ENTRY(setjmp) mr %r9,%r2 /* r9 <- global ptr */ std %r9,40 + 0*8(%r6) + stfd %f14,40 + 23*8(%r6) std %r10,40 + 1*8(%r6) + stfd %f15,40 + 24*8(%r6) std %r11,40 + 2*8(%r6) + stfd %f16,40 + 25*8(%r6) std %r12,40 + 3*8(%r6) + stfd %f17,40 + 26*8(%r6) std %r13,40 + 4*8(%r6) + stfd %f18,40 + 27*8(%r6) std %r14,40 + 5*8(%r6) + stfd %f19,40 + 28*8(%r6) std %r15,40 + 6*8(%r6) + stfd %f20,40 + 29*8(%r6) std %r16,40 + 7*8(%r6) + stfd %f21,40 + 30*8(%r6) std %r17,40 + 8*8(%r6) + stfd %f22,40 + 31*8(%r6) std %r18,40 + 9*8(%r6) + stfd %f23,40 + 32*8(%r6) std %r19,40 + 10*8(%r6) + stfd %f24,40 + 33*8(%r6) std %r20,40 + 11*8(%r6) + stfd %f25,40 + 34*8(%r6) std %r21,40 + 12*8(%r6) + stfd %f26,40 + 35*8(%r6) std %r22,40 + 13*8(%r6) + stfd %f27,40 + 36*8(%r6) std %r23,40 + 14*8(%r6) + stfd %f28,40 + 37*8(%r6) std %r24,40 + 15*8(%r6) + stfd %f29,40 + 38*8(%r6) std %r25,40 + 16*8(%r6) + stfd %f30,40 + 39*8(%r6) std %r26,40 + 17*8(%r6) + stfd %f31,40 + 40*8(%r6) std %r27,40 + 18*8(%r6) std %r28,40 + 19*8(%r6) std %r29,40 + 20*8(%r6) std %r30,40 + 21*8(%r6) std %r31,40 + 22*8(%r6) + /* XXX Altivec regs */ + li %r3,0 /* return (0) */ blr END(setjmp) @@ -97,23 +117,41 @@ END(setjmp) WEAK_REFERENCE(__longjmp, longjmp) ENTRY(__longjmp) ld %r9,40 + 0*8(%r3) + lfd %f14,40 + 23*8(%r3) ld %r10,40 + 1*8(%r3) + lfd %f15,40 + 24*8(%r3) ld %r11,40 + 2*8(%r3) + lfd %f16,40 + 25*8(%r3) ld %r12,40 + 3*8(%r3) + lfd %f17,40 + 26*8(%r3) ld %r14,40 + 5*8(%r3) + lfd %f18,40 + 27*8(%r3) ld %r15,40 + 6*8(%r3) + lfd %f19,40 + 28*8(%r3) ld %r16,40 + 7*8(%r3) + lfd %f20,40 + 29*8(%r3) ld %r17,40 + 8*8(%r3) + lfd %f21,40 + 30*8(%r3) ld %r18,40 + 9*8(%r3) + lfd %f22,40 + 31*8(%r3) ld %r19,40 + 10*8(%r3) + lfd %f23,40 + 32*8(%r3) ld %r20,40 + 11*8(%r3) + lfd %f24,40 + 33*8(%r3) ld %r21,40 + 12*8(%r3) + lfd %f25,40 + 34*8(%r3) ld %r22,40 + 13*8(%r3) + lfd %f26,40 + 35*8(%r3) ld %r23,40 + 14*8(%r3) + lfd %f27,40 + 36*8(%r3) ld %r24,40 + 15*8(%r3) + lfd %f28,40 + 37*8(%r3) ld %r25,40 + 16*8(%r3) + lfd %f29,40 + 38*8(%r3) ld %r26,40 + 17*8(%r3) + lfd %f30,40 + 39*8(%r3) ld %r27,40 + 18*8(%r3) + lfd %f31,40 + 40*8(%r3) ld %r28,40 + 19*8(%r3) ld %r29,40 + 20*8(%r3) ld %r30,40 + 21*8(%r3) Modified: projects/clang360-import/lib/libc/powerpc64/gen/sigsetjmp.S ============================================================================== --- projects/clang360-import/lib/libc/powerpc64/gen/sigsetjmp.S Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libc/powerpc64/gen/sigsetjmp.S Wed Mar 11 19:04:01 2015 (r279893) @@ -72,23 +72,41 @@ ENTRY(sigsetjmp) mr %r9,%r2 std %r9,40 + 0*8(%r6) + stfd %f14,40 + 23*8(%r6) std %r10,40 + 1*8(%r6) + stfd %f15,40 + 24*8(%r6) std %r11,40 + 2*8(%r6) + stfd %f16,40 + 25*8(%r6) std %r12,40 + 3*8(%r6) + stfd %f17,40 + 26*8(%r6) std %r13,40 + 4*8(%r6) + stfd %f18,40 + 27*8(%r6) std %r14,40 + 5*8(%r6) + stfd %f19,40 + 28*8(%r6) std %r15,40 + 6*8(%r6) + stfd %f20,40 + 29*8(%r6) std %r16,40 + 7*8(%r6) + stfd %f21,40 + 30*8(%r6) std %r17,40 + 8*8(%r6) + stfd %f22,40 + 31*8(%r6) std %r18,40 + 9*8(%r6) + stfd %f23,40 + 32*8(%r6) std %r19,40 + 10*8(%r6) + stfd %f24,40 + 33*8(%r6) std %r20,40 + 11*8(%r6) + stfd %f25,40 + 34*8(%r6) std %r21,40 + 12*8(%r6) + stfd %f26,40 + 35*8(%r6) std %r22,40 + 13*8(%r6) + stfd %f27,40 + 36*8(%r6) std %r23,40 + 14*8(%r6) + stfd %f28,40 + 37*8(%r6) std %r24,40 + 15*8(%r6) + stfd %f29,40 + 38*8(%r6) std %r25,40 + 16*8(%r6) + stfd %f30,40 + 39*8(%r6) std %r26,40 + 17*8(%r6) + stfd %f31,40 + 40*8(%r6) std %r27,40 + 18*8(%r6) std %r28,40 + 19*8(%r6) std %r29,40 + 20*8(%r6) @@ -101,23 +119,41 @@ END(sigsetjmp) ENTRY(siglongjmp) ld %r9,40 + 0*8(%r3) + lfd %f14,40 + 23*8(%r3) ld %r10,40 + 1*8(%r3) + lfd %f15,40 + 24*8(%r3) ld %r11,40 + 2*8(%r3) + lfd %f16,40 + 25*8(%r3) ld %r12,40 + 3*8(%r3) + lfd %f17,40 + 26*8(%r3) ld %r14,40 + 5*8(%r3) + lfd %f18,40 + 27*8(%r3) ld %r15,40 + 6*8(%r3) + lfd %f19,40 + 28*8(%r3) ld %r16,40 + 7*8(%r3) + lfd %f20,40 + 29*8(%r3) ld %r17,40 + 8*8(%r3) + lfd %f21,40 + 30*8(%r3) ld %r18,40 + 9*8(%r3) + lfd %f22,40 + 31*8(%r3) ld %r19,40 + 10*8(%r3) + lfd %f23,40 + 32*8(%r3) ld %r20,40 + 11*8(%r3) + lfd %f24,40 + 33*8(%r3) ld %r21,40 + 12*8(%r3) + lfd %f25,40 + 34*8(%r3) ld %r22,40 + 13*8(%r3) + lfd %f26,40 + 35*8(%r3) ld %r23,40 + 14*8(%r3) + lfd %f27,40 + 36*8(%r3) ld %r24,40 + 15*8(%r3) + lfd %f28,40 + 37*8(%r3) ld %r25,40 + 16*8(%r3) + lfd %f29,40 + 38*8(%r3) ld %r26,40 + 17*8(%r3) + lfd %f30,40 + 39*8(%r3) ld %r27,40 + 18*8(%r3) + lfd %f31,40 + 40*8(%r3) ld %r28,40 + 19*8(%r3) ld %r29,40 + 20*8(%r3) ld %r30,40 + 21*8(%r3) Modified: projects/clang360-import/lib/libgpio/gpio.3 ============================================================================== --- projects/clang360-import/lib/libgpio/gpio.3 Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libgpio/gpio.3 Wed Mar 11 19:04:01 2015 (r279893) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 17, 2014 +.Dd March 8, 2015 .Dt GPIO 3 .Os .Sh NAME @@ -43,41 +43,43 @@ .Ft void .Fn gpio_close "gpio_handle_t handle" .Ft int -.Fn gpio_pin_list "gpio_handle_t handle, gpio_config_t **pcfgs" +.Fn gpio_pin_list "gpio_handle_t handle" "gpio_config_t **pcfgs" .Ft int -.Fn gpio_pin_config "gpio_handle_t handle, gpio_config *cfg" +.Fn gpio_pin_config "gpio_handle_t handle" "gpio_config_t *cfg" .Ft int -.Fn gpio_pin_set_flags "gpio_handle_t handle, gpio_config_t *cfg" +.Fn gpio_pin_set_name "gpio_handle_t handle" "gpio_pin_t pin" "char *name" +.Ft int +.Fn gpio_pin_set_flags "gpio_handle_t handle" "gpio_config_t *cfg" .Ft gpio_value_t -.Fn gpio_pin_get "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_get "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_set "gpio_handle_t handle, gpio_pin_t pin, gpio_value_t value" +.Fn gpio_pin_set "gpio_handle_t handle" "gpio_pin_t pin" "gpio_value_t value" .Ft int -.Fn gpio_pin_toggle "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_toggle "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_low "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_low "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_high "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_high "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_input "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_input "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_output "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_output "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_opendrain "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_opendrain "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_pushpull "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_pushpull "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_tristate "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_tristate "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_pullup "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_pullup "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_pulldown "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_pulldown "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_invin "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_invin "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_invout "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_invout "gpio_handle_t handle" "gpio_pin_t pin" .Ft int -.Fn gpio_pin_pulsate "gpio_handle_t handle, gpio_pin_t pin" +.Fn gpio_pin_pulsate "gpio_handle_t handle" "gpio_pin_t pin" .Sh DESCRIPTION The .Nm libgpio @@ -99,7 +101,7 @@ This function takes a pointer to a which is dynamically allocated. This pointer should be freed with .Xr free 3 -when it's no longer necessary. +when it is no longer necessary. .Pp The function .Fn gpio_pin_config @@ -111,6 +113,10 @@ variable which is part of the structure. .Pp The function +.Fn gpio_pin_set_name +sets the name used to describe a pin. +.Pp +The function .Fn gpio_pin_set_flags configures a pin with the flags passed in by the .Ft gpio_config_t Modified: projects/clang360-import/lib/libgpio/gpio.c ============================================================================== --- projects/clang360-import/lib/libgpio/gpio.c Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libgpio/gpio.c Wed Mar 11 19:04:01 2015 (r279893) @@ -119,6 +119,22 @@ gpio_pin_config(gpio_handle_t handle, gp } int +gpio_pin_set_name(gpio_handle_t handle, gpio_pin_t pin, char *name) +{ + struct gpio_pin gppin; + + if (name == NULL) + return (-1); + bzero(&gppin, sizeof(gppin)); + gppin.gp_pin = pin; + strlcpy(gppin.gp_name, name, GPIOMAXNAME); + if (ioctl(handle, GPIOSETNAME, &gppin) < 0) + return (-1); + + return (0); +} + +int gpio_pin_set_flags(gpio_handle_t handle, gpio_config_t *cfg) { struct gpio_pin gppin; Modified: projects/clang360-import/lib/libgpio/libgpio.h ============================================================================== --- projects/clang360-import/lib/libgpio/libgpio.h Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libgpio/libgpio.h Wed Mar 11 19:04:01 2015 (r279893) @@ -71,6 +71,11 @@ int gpio_pin_list(gpio_handle_t, gpio_c */ int gpio_pin_config(gpio_handle_t, gpio_config_t *); /* + * Sets the GPIO pin name. The pin number and pin name to be set are passed + * as parameters. + */ +int gpio_pin_set_name(gpio_handle_t, gpio_pin_t, char *); +/* * Sets the GPIO flags on a specific GPIO pin. The pin number and the flags * to be set are passed through the gpio_config_t structure. */ Modified: projects/clang360-import/lib/libnv/tests/dnv_tests.cc ============================================================================== --- projects/clang360-import/lib/libnv/tests/dnv_tests.cc Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libnv/tests/dnv_tests.cc Wed Mar 11 19:04:01 2015 (r279893) @@ -450,7 +450,7 @@ ATF_TEST_CASE_BODY(dnvlist_take_nvlist__ nvl = nvlist_create(0); actual_val = dnvlist_take_nvlist(nvl, "123", NULL); - ATF_REQUIRE_EQ(actual_val, NULL); + ATF_REQUIRE_EQ(actual_val, static_cast(NULL)); free(actual_val); nvlist_destroy(nvl); Modified: projects/clang360-import/lib/libnv/tests/nv_tests.cc ============================================================================== --- projects/clang360-import/lib/libnv/tests/nv_tests.cc Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libnv/tests/nv_tests.cc Wed Mar 11 19:04:01 2015 (r279893) @@ -54,7 +54,7 @@ ATF_TEST_CASE_BODY(nvlist_create__is_emp ATF_REQUIRE(nvlist_empty(nvl)); it = NULL; - ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -85,7 +85,7 @@ ATF_TEST_CASE_BODY(nvlist_add_null__sing it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NULL); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -118,7 +118,7 @@ ATF_TEST_CASE_BODY(nvlist_add_bool__sing it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_BOOL); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -153,7 +153,7 @@ ATF_TEST_CASE_BODY(nvlist_add_number__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NUMBER); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -191,7 +191,7 @@ ATF_TEST_CASE_BODY(nvlist_add_string__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_STRING); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); } @@ -237,7 +237,7 @@ ATF_TEST_CASE_BODY(nvlist_add_nvlist__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NVLIST); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(sublist); nvlist_destroy(nvl); @@ -303,7 +303,7 @@ ATF_TEST_CASE_BODY(nvlist_add_binary__si it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_BINARY); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type,&it), static_cast(NULL)); nvlist_destroy(nvl); free(value); @@ -352,7 +352,7 @@ ATF_TEST_CASE_BODY(nvlist_clone__nonempt it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(clone, &type, &it), key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NUMBER); - ATF_REQUIRE_EQ(nvlist_next(clone, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(clone, &type, &it), static_cast(NULL)); nvlist_destroy(clone); nvlist_destroy(nvl); @@ -400,13 +400,13 @@ verify_test_nvlist(const nvlist_t *nvl) ATF_REQUIRE_EQ(strcmp(nvlist_next(value, &type, &it), test_string_key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_STRING); - ATF_REQUIRE_EQ(nvlist_next(value, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(value, &type, &it), static_cast(NULL)); it = NULL; ATF_REQUIRE_EQ(strcmp(nvlist_next(nvl, &type, &it), test_subnvlist_key), 0); ATF_REQUIRE_EQ(type, NV_TYPE_NVLIST); - ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), NULL); + ATF_REQUIRE_EQ(nvlist_next(nvl, &type, &it), static_cast(NULL)); } ATF_TEST_CASE_WITHOUT_HEAD(nvlist_clone__nested_nvlist); Modified: projects/clang360-import/lib/libpmc/libpmc.c ============================================================================== --- projects/clang360-import/lib/libpmc/libpmc.c Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libpmc/libpmc.c Wed Mar 11 19:04:01 2015 (r279893) @@ -325,7 +325,7 @@ PMC_CLASS_TABLE_DESC(core2, IAP, core2, PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); -PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell, iap); +PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell_xeon, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); Modified: projects/clang360-import/lib/libpmc/pmc.3 ============================================================================== --- projects/clang360-import/lib/libpmc/pmc.3 Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libpmc/pmc.3 Wed Mar 11 19:04:01 2015 (r279893) @@ -527,6 +527,7 @@ API is .Xr pmc.core2 3 , .Xr pmc.haswell 3 , .Xr pmc.haswelluc 3 , +.Xr pmc.haswellxeon 3 , .Xr pmc.iaf 3 , .Xr pmc.ivybridge 3 , .Xr pmc.ivybridgexeon 3 , Modified: projects/clang360-import/lib/libpmc/pmc.haswell.3 ============================================================================== --- projects/clang360-import/lib/libpmc/pmc.haswell.3 Wed Mar 11 17:35:07 2015 (r279892) +++ projects/clang360-import/lib/libpmc/pmc.haswell.3 Wed Mar 11 19:04:01 2015 (r279893) @@ -529,73 +529,60 @@ instruction. .It Li ILD_STALL.IQ_FULL .Pq Event 87H , Umask 04H Stall cycles due to IQ is full. -.It Li BR_INST_EXEC.COND -.Pq Event 88H , Umask 01H -Qualify conditional near branch instructions -executed, but not necessarily retired. +.It Li BR_INST_EXEC.NONTAKEN_COND +.Pq Event 88H , Umask 41H +Count conditional near branch instructions that were executed (but not +necessarily retired) and not taken. +.It Li BR_INST_EXEC.TAKEN_COND +.Pq Event 88H , Umask 81H +Count conditional near branch instructions that were executed (but not +necessarily retired) and taken. .It Li BR_INST_EXEC.DIRECT_JMP -.Pq Event 88H , Umask 02H -Qualify all unconditional near branch instructions -excluding calls and indirect branches. +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and +indirect branches. .It Li BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 88H , Umask 04H -Qualify executed indirect near branch instructions -that are not calls nor returns. +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor +returns. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return -mnemonic. +.Pq Event 88H , Umask 88H +Count indirect near branches that have a return mnemonic. .It Li BR_INST_EXEC.DIRECT_NEAR_CALL -.Pq Event 88H , Umask 10H -Qualify unconditional near call branch instructions, -excluding non call branch, executed. +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call +branch, executed. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register and -memory indirect, executed. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -.It Li BR_INST_EXEC.TAKEN -.Pq Event 88H , Umask 80H -Qualify taken near branches executed. Must combine -with 01H,02H, 04H, 08H, 10H, 20H. +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, +executed. .It Li BR_INST_EXEC.ALL_BRANCHES .Pq Event 88H , Umask FFH -Counts all near executed branches (not necessarily -retired). -.It Li BR_MISP_EXEC.COND -.Pq Event 89H , Umask 01H -Qualify conditional near branch instructions -mispredicted. +Counts all near executed branches (not necessarily retired). +.It Li BR_MISP_EXEC.NONTAKEN_COND +.Pq Event 89H , Umask 41H +Count conditional near branch instructions mispredicted as nontaken. +.It Li BR_MISP_EXEC.TAKEN_COND +.Pq Event 89H , Umask 81H +Count conditional near branch instructions mispredicted as taken. .It Li BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET -.Pq Event 89H , Umask 04H -Qualify mispredicted indirect near branch -instructions that are not calls nor returns. +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls +nor returns. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that -have a return mnemonic. +.Pq Event 89H , Umask 88H +Count mispredicted indirect near branches that have a return mnemonic. .It Li BR_MISP_EXEC.DIRECT_NEAR_CALL -.Pq Event 89H , Umask 10H -Qualify mispredicted unconditional near call branch -instructions, excluding non call branch, executed. +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding +non call branch, executed. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including -both register and memory indirect, executed. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches -executed. -.It Li BR_MISP_EXEC.TAKEN -.Pq Event 89H , Umask 80H -Qualify mispredicted taken near branches executed. -Must combine with 01H,02H, 04H, 08H, 10H, 20H. +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory +indirect, executed. .It Li BR_MISP_EXEC.ALL_BRANCHES .Pq Event 89H , Umask FFH -Counts all near executed branches (not necessarily -retired). +Counts all mispredicted near executed branches (not necessarily retired). .It Li IDQ_UOPS_NOT_DELIVERED.CORE .Pq Event 9CH , Umask 01H Count number of non-delivered uops to RAT per @@ -821,30 +808,24 @@ Count cases of saving new LBR records by Randomly sampled loads whose latency is above a user defined threshold. A small fraction of the overall loads are sampled due to randomization. -.It Li MEM_UOP_RETIRED.LOADS -.Pq Event D0H , Umask 01H -Qualify retired memory uops that are loads. Combine Supports PEBS and -with umask 10H, 20H, 40H, 80H. -.It Li MEM_UOP_RETIRED.STORES -.Pq Event D0H , Umask 02H -Qualify retired memory uops that are stores. -Combine with umask 10H, 20H, 40H, 80H. -.It Li MEM_UOP_RETIRED.STLB_MISS -.Pq Event D0H , Umask 10H -Qualify retired memory uops with STLB miss. Must -combine with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.LOCK -.Pq Event D0H , Umask 20H -Qualify retired memory uops with lock. Must combine Supports PEBS and -with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.SPLIT -.Pq Event D0H , Umask 40H -Qualify retired memory uops with line split. Must -combine with umask 01H, 02H, to produce counts. -.It Li MEM_UOP_RETIRED.ALL -.Pq Event D0H , Umask 80H -Qualify any retired memory uops. Must combine with Supports PEBS and -umask 01H, 02H, to produce counts. +.It Li MEM_UOPS_RETIRED.STLB_MISS_LOADS +.Pq Event D0H , Umask 11H +Count retired load uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.STLB_MISS_STORES +.Pq Event D0H , Umask 12H +Count retired store uops that missed the STLB. +.It Li MEM_UOPS_RETIRED.SPLIT_LOADS +.Pq Event D0H , Umask 41H +Count retired load uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.SPLIT_STORES +.Pq Event D0H , Umask 42H +Count retired store uops that were split across a cache line. +.It Li MEM_UOPS_RETIRED.ALL_LOADS +.Pq Event D0H , Umask 81H +Count all retired load uops. +.It Li MEM_UOPS_RETIRED.ALL_STORES +.Pq Event D0H , Umask 82H +Count all retired store uops. .It Li MEM_LOAD_UOPS_RETIRED.L1_HIT .Pq Event D1H , Umask 01H Retired load uops with L1 cache hits as data sources. Copied: projects/clang360-import/lib/libpmc/pmc.haswellxeon.3 (from r279892, head/lib/libpmc/pmc.haswellxeon.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/lib/libpmc/pmc.haswellxeon.3 Wed Mar 11 19:04:01 2015 (r279893, copy of r279892, head/lib/libpmc/pmc.haswellxeon.3) @@ -0,0 +1,956 @@ +.\" +.\" Copyright (c) 2013 Hiren Panchasara +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd 21 November, 2014 +.Dt PMC.HASWELLXEON 3 +.Os +.Sh NAME +.Nm pmc.haswellxeon +.Nd measurement events for +.Tn Intel +.Tn Haswell Xeon +family CPUs +.Sh LIBRARY +.Lb libpmc +.Sh SYNOPSIS +.In pmc.h +.Sh DESCRIPTION +.Tn Intel +.Tn "Haswell" +CPUs contain PMCs conforming to version 2 of the +.Tn Intel +performance measurement architecture. +These CPUs may contain up to two classes of PMCs: +.Bl -tag -width "Li PMC_CLASS_IAP" +.It Li PMC_CLASS_IAF +Fixed-function counters that count only one hardware event per counter. +.It Li PMC_CLASS_IAP +Programmable counters that may be configured to count one of a defined +set of hardware events. +.El +.Pp *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Mar 12 01:30:38 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E5BD7D2; Thu, 12 Mar 2015 01:30:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08624CDB; Thu, 12 Mar 2015 01:30:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2C1UcVT059100; Thu, 12 Mar 2015 01:30:38 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2C1Ubvb059097; Thu, 12 Mar 2015 01:30:37 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503120130.t2C1Ubvb059097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 12 Mar 2015 01:30:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279897 - in projects/cxl_iscsi/sys/dev/cxgbe: . cxgbei tom 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.18-1 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, 12 Mar 2015 01:30:38 -0000 Author: np Date: Thu Mar 12 01:30:36 2015 New Revision: 279897 URL: https://svnweb.freebsd.org/changeset/base/279897 Log: First round of code cleanup and reorganization. This is mostly code on the slow path. Changes to the fast path will follow later. - Use the standard ULD registration and activation mechanism offered by if_cxgbe. This eliminates all the code that managed the list of offload_device structures. This simplifies the CPL dispatch too by eliminating t4tom_cpl_handler_register_flag and associated code. - Remove all unused or write-only fields from various structures (iscsi_socket, offload_device, cxgbei_ulp2_ddp_info, ulp_iscsi_info) - Eliminate the two line wrappers around malloc/free. While here, switch to using M_CXGBE for all allocations. - Simplify the page size settings in the chip (for iSCSI). This ULD "owns" these settings so it should simply write the values that it wants to the A_ULP_RX_ISCSI_TAGMASK and A_ULP_RX_ISCSI_PSZ registers. This eliminates the globals ddp_page_order[], ddp_page_shift[], page_idx and all related code. - Maintain the per-adapter ULD state in one data structure instead of two. This consolidates struct offload_device and struct cxgbei_ulp2_ddp_info and into struct cxgbei_data, which is stored in adapter->iscsi_softc. - Leave socket->so_emuldata alone, it exists for a different purpose (which is definitely not iSCSI). Store the per-socket offload state in a new field in struct icl_conn instead. (The new field exists only in this project branch and hasn't been reviewed for inclusion into head yet). - Switch to the system version of mbufq. - Tidy up the CPL/callback dispatch from if_cxgbe/t4_tom into cxgbei. The tid/toepcb is always available (t4_tom has looked it up) so it's a waste of time looking it up again. Deleted: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/mbufq.h Modified: projects/cxl_iscsi/sys/dev/cxgbe/adapter.h projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.h projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.h projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/icl_cxgbei.c projects/cxl_iscsi/sys/dev/cxgbe/tom/t4_cpl_io.c projects/cxl_iscsi/sys/dev/cxgbe/tom/t4_ddp.c projects/cxl_iscsi/sys/dev/cxgbe/tom/t4_tom.h Modified: projects/cxl_iscsi/sys/dev/cxgbe/adapter.h ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/adapter.h Thu Mar 12 01:05:54 2015 (r279896) +++ projects/cxl_iscsi/sys/dev/cxgbe/adapter.h Thu Mar 12 01:30:36 2015 (r279897) @@ -750,7 +750,7 @@ struct adapter { void *tom_softc; /* (struct tom_data *) */ struct tom_tunables tt; void *iwarp_softc; /* (struct c4iw_dev *) */ - void *iscsi_softc; + void *iscsi_softc; /* (struct cxgbei_data *) */ #endif struct l2t_data *l2t; /* L2 table */ struct tid_info tids; Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Mar 12 01:05:54 2015 (r279896) +++ projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Mar 12 01:30:36 2015 (r279897) @@ -135,17 +135,10 @@ find_ulp_mbuf_cb(struct mbuf *m) * The location of the pagepod entry is encoded into ddp tag which is used as * the base for ITT/TTT. */ -#define T4_DDP -#ifdef T4_DDP + /* * functions to program the pagepod in h/w */ -static void * -t4_tdev2ddp(void *tdev) -{ - struct adapter *sc = ((struct toedev *)tdev)->tod_softc; - return (sc->iscsi_softc); -} static void inline ppod_set(struct pagepod *ppod, struct cxgbei_ulp2_pagepod_hdr *hdr, @@ -193,27 +186,27 @@ ulp_mem_io_set_hdr(struct adapter *sc, i #define PCIE_MEMWIN_MAX_NPPODS 16 /* 1024/PPOD_SIZE */ static int -ppod_write_idata(struct cxgbei_ulp2_ddp_info *ddp, +ppod_write_idata(struct cxgbei_data *ci, struct cxgbei_ulp2_pagepod_hdr *hdr, unsigned int idx, unsigned int npods, struct cxgbei_ulp2_gather_list *gl, unsigned int gl_pidx, struct toepcb *toep) { - unsigned int dlen = PPOD_SIZE * npods; - unsigned int pm_addr = idx * PPOD_SIZE + ddp->llimit; - unsigned int wr_len = roundup(sizeof(struct ulp_mem_io) + - sizeof(struct ulptx_idata) + dlen, 16); + u_int dlen = PPOD_SIZE * npods; + u_int pm_addr = idx * PPOD_SIZE + ci->llimit; + u_int wr_len = roundup(sizeof(struct ulp_mem_io) + + sizeof(struct ulptx_idata) + dlen, 16); struct ulp_mem_io *req; struct ulptx_idata *idata; struct pagepod *ppod; - unsigned int i; + u_int i; struct wrqe *wr; struct adapter *sc = toep->port->adapter; wr = alloc_wrqe(wr_len, toep->ctrlq); if (wr == NULL) { - printf("%s: alloc wrqe failed\n", __func__); - return ENOMEM; + CXGBE_UNIMPLEMENTED("ppod_write_idata: alloc_wrqe failure"); + return (ENOMEM); } req = wrtod(wr); @@ -233,25 +226,16 @@ ppod_write_idata(struct cxgbei_ulp2_ddp_ return 0; } -static int -t4_ddp_set_map(struct cxgbei_ulp2_ddp_info *ddp, - void *isockp, struct cxgbei_ulp2_pagepod_hdr *hdr, - unsigned int idx, unsigned int npods, - struct cxgbei_ulp2_gather_list *gl, int reply) +int +t4_ddp_set_map(struct cxgbei_data *ci, void *isockp, + struct cxgbei_ulp2_pagepod_hdr *hdr, u_int idx, u_int npods, + struct cxgbei_ulp2_gather_list *gl, int reply) { - iscsi_socket *isock = (iscsi_socket *)isockp; - struct socket *sk; - struct toepcb *toep; - struct tcpcb *tp; + struct iscsi_socket *isock = (struct iscsi_socket *)isockp; + struct toepcb *toep = isock->toep; int err; unsigned int pidx = 0, w_npods = 0, cnt; - if (isock == NULL) - return EINVAL; - sk = isock->sock; - tp = so_sototcpcb(sk); - toep = tp->t_toe; - /* * on T4, if we use a mix of IMMD and DSGL with ULP_MEM_WRITE, * the order would not be garanteed, so we will stick with IMMD @@ -266,7 +250,7 @@ t4_ddp_set_map(struct cxgbei_ulp2_ddp_in cnt = npods - w_npods; if (cnt > ULPMEM_IDATA_MAX_NPPODS) cnt = ULPMEM_IDATA_MAX_NPPODS; - err = ppod_write_idata(ddp, hdr, idx, cnt, gl, + err = ppod_write_idata(ci, hdr, idx, cnt, gl, pidx, toep); if (err) { printf("%s: ppod_write_idata failed\n", __func__); @@ -276,126 +260,29 @@ t4_ddp_set_map(struct cxgbei_ulp2_ddp_in return err; } -static void -t4_ddp_clear_map(struct cxgbei_ulp2_ddp_info *ddp, - struct cxgbei_ulp2_gather_list *gl, - unsigned int tag, unsigned int idx, unsigned int npods, - iscsi_socket *isock) +void +t4_ddp_clear_map(struct cxgbei_data *ci, struct cxgbei_ulp2_gather_list *gl, + u_int tag, u_int idx, u_int npods, struct iscsi_socket *isock) { - struct socket *sk; - struct toepcb *toep; - struct tcpcb *tp; + struct toepcb *toep = isock->toep; int err = -1; - - sk = isock->sock; - tp = so_sototcpcb(sk); - toep = tp->t_toe; - - /* send via immediate data */ - unsigned int pidx = 0; - unsigned int w_npods = 0; - unsigned int cnt; + u_int pidx = 0; + u_int w_npods = 0; + u_int cnt; for (; w_npods < npods; idx += cnt, w_npods += cnt, pidx += PPOD_PAGES) { cnt = npods - w_npods; if (cnt > ULPMEM_IDATA_MAX_NPPODS) cnt = ULPMEM_IDATA_MAX_NPPODS; - err = ppod_write_idata(ddp, NULL, idx, cnt, gl, 0, toep); + err = ppod_write_idata(ci, NULL, idx, cnt, gl, 0, toep); if (err) break; } } -#endif - -/* - * cxgbei device management - * maintains a list of the cxgbei devices - */ -typedef struct offload_device { - SLIST_ENTRY(offload_device) link; - unsigned char d_version; - unsigned char d_tx_hdrlen; /* CPL_TX_DATA, < 256 */ - unsigned char d_ulp_rx_datagap; /* for coalesced iscsi msg */ - unsigned char filler; - - unsigned int d_flag; - unsigned int d_payload_tmax; - unsigned int d_payload_rmax; - - struct cxgbei_ulp2_tag_format d_tag_format; - void *d_tdev; - void *d_pdev; - void* (*tdev2ddp)(void *tdev); -}offload_device; - -SLIST_HEAD(, offload_device) odev_list; - -static void t4_unregister_cpl_handler_with_tom(struct adapter *sc); -static offload_device * -offload_device_new(void *tdev) -{ - offload_device *odev = NULL; - odev = malloc(sizeof(struct offload_device), - M_CXGBE, M_NOWAIT | M_ZERO); - if (odev) { - odev->d_tdev = tdev; - SLIST_INSERT_HEAD(&odev_list, odev, link); - } - - return odev; -} - -static offload_device * -offload_device_find(struct toedev *tdev) -{ - offload_device *odev = NULL; - - if (!SLIST_EMPTY(&odev_list)) { - SLIST_FOREACH(odev, &odev_list, link) { - if (odev->d_tdev == tdev) - break; - } - } - return odev; -} - -static void -cxgbei_odev_cleanup(offload_device *odev) -{ - struct toedev *tdev = odev->d_tdev; - struct adapter *sc = (struct adapter *)tdev->tod_softc; - - /* de-register ULP CPL handlers with TOM */ - t4_unregister_cpl_handler_with_tom(sc); - if (odev->d_flag & ODEV_FLAG_ULP_DDP_ENABLED) { - if (sc->iscsi_softc) - cxgbei_ulp2_ddp_cleanup( - (struct cxgbei_ulp2_ddp_info **)&sc->iscsi_softc); - } - return; -} - -static void -offload_device_remove() -{ - offload_device *odev = NULL, *next = NULL; - - if (SLIST_EMPTY(&odev_list)) - return; - - for (odev = SLIST_FIRST(&odev_list); odev != NULL; odev = next) { - SLIST_REMOVE(&odev_list, odev, offload_device, link); - next = SLIST_NEXT(odev, link); - cxgbei_odev_cleanup(odev); - free(odev, M_CXGBE); - } - - return; -} static int -cxgbei_map_sg(cxgbei_sgl *sgl, struct ccb_scsiio *csio) +cxgbei_map_sg(struct cxgbei_sgl *sgl, struct ccb_scsiio *csio) { unsigned int data_len = csio->dxfer_len; unsigned int sgoffset = (uint64_t)csio->data_ptr & PAGE_MASK; @@ -430,7 +317,7 @@ cxgbei_map_sg(cxgbei_sgl *sgl, struct cc } static int -cxgbei_map_sg_tgt(cxgbei_sgl *sgl, union ctl_io *io) +cxgbei_map_sg_tgt(struct cxgbei_sgl *sgl, union ctl_io *io) { unsigned int data_len, sgoffset, nsge; unsigned char *sgaddr; @@ -486,34 +373,19 @@ cxgbei_map_sg_tgt(cxgbei_sgl *sgl, union } static int -t4_sk_ddp_tag_reserve(iscsi_socket *isock, unsigned int xferlen, - cxgbei_sgl *sgl, unsigned int sgcnt, - unsigned int *ddp_tag) +t4_sk_ddp_tag_reserve(struct cxgbei_data *ci, struct iscsi_socket *isock, + u_int xferlen, struct cxgbei_sgl *sgl, u_int sgcnt, u_int *ddp_tag) { - offload_device *odev = isock->s_odev; - struct toedev *tdev = odev->d_tdev; struct cxgbei_ulp2_gather_list *gl; int err = -EINVAL; - struct adapter *sc = tdev->tod_softc; - struct cxgbei_ulp2_ddp_info *ddp; + struct toepcb *toep = isock->toep; - ddp = (struct cxgbei_ulp2_ddp_info *)sc->iscsi_softc; - if (ddp == NULL) - return ENOMEM; - - gl = cxgbei_ulp2_ddp_make_gl_from_iscsi_sgvec(xferlen, sgl, sgcnt, - odev->d_tdev, 0); + gl = cxgbei_ulp2_ddp_make_gl_from_iscsi_sgvec(xferlen, sgl, sgcnt, ci, 0); if (gl) { - err = cxgbei_ulp2_ddp_tag_reserve(odev->tdev2ddp(tdev), - isock, - isock->s_tid, - &odev->d_tag_format, - ddp_tag, gl, - 0, 0); + err = cxgbei_ulp2_ddp_tag_reserve(ci, isock, toep->tid, + &ci->tag_format, ddp_tag, gl, 0, 0); if (err) { - CTR1(KTR_CXGBE, - "%s: ddp_tag_reserve failed\n", __func__); - cxgbei_ulp2_ddp_release_gl(gl, odev->d_tdev); + cxgbei_ulp2_ddp_release_gl(ci, gl); } } @@ -525,17 +397,17 @@ cxgbei_task_reserve_itt(struct icl_conn struct ccb_scsiio *scmd, unsigned int *itt) { int xferlen = scmd->dxfer_len; - cxgbei_task_data *tdata = NULL; - cxgbei_sgl *sge = NULL; - struct socket *so = ic->ic_socket; - iscsi_socket *isock = (iscsi_socket *)(so)->so_emuldata; + struct cxgbei_task_data *tdata = NULL; + struct cxgbei_sgl *sge = NULL; + struct iscsi_socket *isock = ic->ic_ofld_prv0; + struct toepcb *toep = isock->toep; + struct adapter *sc = td_adapter(toep->td); + struct cxgbei_data *ci = sc->iscsi_softc; int err = -1; - offload_device *odev = isock->s_odev; - tdata = (cxgbei_task_data *)*prv; - if ((xferlen == 0) || (tdata == NULL)) { + tdata = (struct cxgbei_task_data *)*prv; + if (xferlen == 0 || tdata == NULL) goto out; - } if (xferlen < DDP_THRESHOLD) goto out; @@ -551,10 +423,10 @@ cxgbei_task_reserve_itt(struct icl_conn CTR3(KTR_CXGBE, "%s: *itt:0x%x sc_ddp_tag:0x%x\n", __func__, *itt, tdata->sc_ddp_tag); - if (cxgbei_ulp2_sw_tag_usable(&odev->d_tag_format, + if (cxgbei_ulp2_sw_tag_usable(&ci->tag_format, tdata->sc_ddp_tag)) { - err = t4_sk_ddp_tag_reserve(isock, scmd->dxfer_len, sge, - tdata->nsge, &tdata->sc_ddp_tag); + err = t4_sk_ddp_tag_reserve(ci, isock, scmd->dxfer_len, + sge, tdata->nsge, &tdata->sc_ddp_tag); } else { CTR3(KTR_CXGBE, "%s: itt:0x%x sc_ddp_tag:0x%x not usable\n", @@ -564,7 +436,7 @@ cxgbei_task_reserve_itt(struct icl_conn out: if (err < 0) tdata->sc_ddp_tag = - cxgbei_ulp2_set_non_ddp_tag(&odev->d_tag_format, *itt); + cxgbei_ulp2_set_non_ddp_tag(&ci->tag_format, *itt); return tdata->sc_ddp_tag; } @@ -573,15 +445,16 @@ static unsigned int cxgbei_task_reserve_ttt(struct icl_conn *ic, void **prv, union ctl_io *io, unsigned int *ttt) { - struct socket *so = ic->ic_socket; - iscsi_socket *isock = (iscsi_socket *)(so)->so_emuldata; - cxgbei_task_data *tdata = NULL; - offload_device *odev = isock->s_odev; + struct iscsi_socket *isock = ic->ic_ofld_prv0; + struct toepcb *toep = isock->toep; + struct adapter *sc = td_adapter(toep->td); + struct cxgbei_data *ci = sc->iscsi_softc; + struct cxgbei_task_data *tdata = NULL; int xferlen, err = -1; - cxgbei_sgl *sge = NULL; + struct cxgbei_sgl *sge = NULL; xferlen = (io->scsiio.kern_data_len - io->scsiio.ext_data_filled); - tdata = (cxgbei_task_data *)*prv; + tdata = (struct cxgbei_task_data *)*prv; if ((xferlen == 0) || (tdata == NULL)) goto out; if (xferlen < DDP_THRESHOLD) @@ -594,9 +467,9 @@ cxgbei_task_reserve_ttt(struct icl_conn sge = tdata->sgl; tdata->sc_ddp_tag = *ttt; - if (cxgbei_ulp2_sw_tag_usable(&odev->d_tag_format, tdata->sc_ddp_tag)) { - err = t4_sk_ddp_tag_reserve(isock, xferlen, sge, tdata->nsge, - &tdata->sc_ddp_tag); + if (cxgbei_ulp2_sw_tag_usable(&ci->tag_format, tdata->sc_ddp_tag)) { + err = t4_sk_ddp_tag_reserve(ci, isock, xferlen, sge, + tdata->nsge, &tdata->sc_ddp_tag); } else { CTR2(KTR_CXGBE, "%s: sc_ddp_tag:0x%x not usable\n", __func__, tdata->sc_ddp_tag); @@ -604,102 +477,95 @@ cxgbei_task_reserve_ttt(struct icl_conn out: if (err < 0) tdata->sc_ddp_tag = - cxgbei_ulp2_set_non_ddp_tag(&odev->d_tag_format, *ttt); + cxgbei_ulp2_set_non_ddp_tag(&ci->tag_format, *ttt); return tdata->sc_ddp_tag; } static int -t4_sk_ddp_tag_release(iscsi_socket *isock, unsigned int ddp_tag) +t4_sk_ddp_tag_release(struct iscsi_socket *isock, unsigned int ddp_tag) { - offload_device *odev = isock->s_odev; - struct toedev *tdev = odev->d_tdev; + struct toepcb *toep = isock->toep; + struct adapter *sc = td_adapter(toep->td); + struct cxgbei_data *ci = sc->iscsi_softc; - cxgbei_ulp2_ddp_tag_release(odev->tdev2ddp(tdev), ddp_tag, isock); - return 0; -} -#ifdef T4_DDP -static struct cxgbei_ulp2_ddp_info * -t4_ddp_init(struct ifnet *dev, struct toedev *tdev) -{ - struct cxgbei_ulp2_ddp_info *ddp; - struct adapter *sc = tdev->tod_softc; - struct ulp_iscsi_info uinfo; - - memset(&uinfo, 0, sizeof(struct ulp_iscsi_info)); - uinfo.llimit = sc->vres.iscsi.start; - uinfo.ulimit = sc->vres.iscsi.start + sc->vres.iscsi.size - 1; - uinfo.max_rxsz = uinfo.max_txsz = - G_MAXRXDATA(t4_read_reg(sc, A_TP_PARA_REG2)); - - if (sc->vres.iscsi.size == 0) { - printf("%s: iSCSI capabilities not enabled.\n", __func__); - return NULL; - } - printf("T4, ddp 0x%x ~ 0x%x, size %u, iolen %u, ulpddp:0x%p\n", - uinfo.llimit, uinfo.ulimit, sc->vres.iscsi.size, - uinfo.max_rxsz, sc->iscsi_softc); - - cxgbei_ulp2_ddp_init((void *)tdev, - (struct cxgbei_ulp2_ddp_info **)&sc->iscsi_softc, - &uinfo); - ddp = (struct cxgbei_ulp2_ddp_info *)sc->iscsi_softc; - if (ddp) { - unsigned int pgsz_order[4]; - int i; - - for (i = 0; i < 4; i++) - pgsz_order[i] = uinfo.pgsz_factor[i]; + cxgbei_ulp2_ddp_tag_release(ci, ddp_tag, isock); - t4_iscsi_init(dev, uinfo.tagmask, pgsz_order); - - ddp->ddp_set_map = t4_ddp_set_map; - ddp->ddp_clear_map = t4_ddp_clear_map; - } - return ddp; + return (0); } -#endif -static struct socket * -cpl_find_sock(struct adapter *sc, unsigned int hwtid) +static int +cxgbei_ddp_init(struct adapter *sc, struct cxgbei_data *ci) { - struct socket *sk; - struct toepcb *toep = lookup_tid(sc, hwtid); - struct inpcb *inp = toep->inp; + int nppods, bits, max_sz, rc; + static const u_int pgsz_order[] = {0, 1, 2, 3}; - INP_WLOCK(inp); - sk = inp->inp_socket; - INP_WUNLOCK(inp); - if (sk == NULL) - CTR2(KTR_CXGBE, - "%s: T4 CPL tid 0x%x, sk NULL.\n", __func__, hwtid); - return sk; + MPASS(sc->vres.iscsi.size > 0); + + ci->llimit = sc->vres.iscsi.start; + ci->ulimit = sc->vres.iscsi.start + sc->vres.iscsi.size - 1; + max_sz = G_MAXRXDATA(t4_read_reg(sc, A_TP_PARA_REG2)); + + nppods = sc->vres.iscsi.size >> IPPOD_SIZE_SHIFT; + if (nppods <= 1024) + return (ENXIO); + + bits = fls(nppods); + if (bits > IPPOD_IDX_MAX_SIZE) + bits = IPPOD_IDX_MAX_SIZE; + nppods = (1 << (bits - 1)) - 1; + + rc = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR, + BUS_SPACE_MAXADDR, NULL, NULL, UINT32_MAX , 8, BUS_SPACE_MAXSIZE, + BUS_DMA_ALLOCNOW, NULL, NULL, &ci->ulp_ddp_tag); + if (rc != 0) { + device_printf(sc->dev, "%s: failed to create DMA tag: %u.\n", + __func__, rc); + return (rc); + } + + ci->colors = malloc(nppods * sizeof(char), M_CXGBE, M_NOWAIT | M_ZERO); + ci->gl_map = malloc(nppods * sizeof(struct cxgbei_ulp2_gather_list *), + M_CXGBE, M_NOWAIT | M_ZERO); + if (ci->colors == NULL || ci->gl_map == NULL) { + bus_dma_tag_destroy(ci->ulp_ddp_tag); + free(ci->colors, M_CXGBE); + free(ci->gl_map, M_CXGBE); + return (ENOMEM); + } + + mtx_init(&ci->map_lock, "ddp lock", NULL, MTX_DEF | MTX_DUPOK); + ci->max_txsz = ci->max_rxsz = min(max_sz, ULP2_MAX_PKT_SIZE); + ci->nppods = nppods; + ci->idx_last = nppods; + ci->idx_bits = bits; + ci->idx_mask = (1 << bits) - 1; + ci->rsvd_tag_mask = (1 << (bits + IPPOD_IDX_SHIFT)) - 1; + + ci->tag_format.sw_bits = bits; + ci->tag_format.rsvd_bits = bits; + ci->tag_format.rsvd_shift = IPPOD_IDX_SHIFT; + ci->tag_format.rsvd_mask = ci->idx_mask; + + t4_iscsi_init(sc, ci->idx_mask << IPPOD_IDX_SHIFT, pgsz_order); + + return (rc); } static void -process_rx_iscsi_hdr(struct socket *sk, struct mbuf *m) +process_rx_iscsi_hdr(struct toepcb *toep, struct mbuf *m) { - struct tcpcb *tp = so_sototcpcb(sk); - struct toepcb *toep = tp->t_toe; - struct cpl_iscsi_hdr *cpl = mtod(m, struct cpl_iscsi_hdr *); struct ulp_mbuf_cb *cb, *lcb; struct mbuf *lmbuf; - unsigned char *byte; - iscsi_socket *isock = (iscsi_socket *)(sk)->so_emuldata; - unsigned int hlen, dlen, plen; + u_char *byte; + struct iscsi_socket *isock = toep->ulpcb; + struct tcpcb *tp = intotcpcb(toep->inp); + u_int hlen, dlen, plen; - if (isock == NULL) - goto err_out; - - if (toep == NULL) - goto err_out; - if ((m->m_flags & M_PKTHDR) == 0) { - printf("%s: m:%p no M_PKTHDR can't allocate m_tag\n", - __func__, m); - goto err_out; - } + MPASS(isock != NULL); + M_ASSERTPKTHDR(m); - mtx_lock(&isock->iscsi_rcv_mbufq.lock); + mtx_lock(&isock->iscsi_rcvq_lock); /* allocate m_tag to hold ulp info */ cb = get_ulp_mbuf_cb(m); @@ -715,7 +581,6 @@ process_rx_iscsi_hdr(struct socket *sk, /* figure out if this is the pdu header or data */ cb->ulp_mode = ULP_MODE_ISCSI; if (isock->mbuf_ulp_lhdr == NULL) { - iscsi_socket *isock = (iscsi_socket *)(sk)->so_emuldata; isock->mbuf_ulp_lhdr = lmbuf = m; lcb = cb; @@ -761,15 +626,13 @@ process_rx_iscsi_hdr(struct socket *sk, m->m_len += 4 - (m->m_len % 4); } } - mbufq_tail(&isock->iscsi_rcv_mbufq, m); - mtx_unlock(&isock->iscsi_rcv_mbufq.lock); + mbufq_enqueue(&isock->iscsi_rcvq, m); + mtx_unlock(&isock->iscsi_rcvq_lock); return; err_out1: - mtx_unlock(&isock->iscsi_rcv_mbufq.lock); -err_out: + mtx_unlock(&isock->iscsi_rcvq_lock); m_freem(m); - return; } /* hand over received PDU to iscsi_initiator */ @@ -787,7 +650,7 @@ iscsi_conn_receive_pdu(struct iscsi_sock panic("%s: failed to alloc icl_pdu\n", __func__); return; } - m = mbufq_peek(&isock->iscsi_rcv_mbufq); + m = mbufq_first(&isock->iscsi_rcvq); if (m) { cb = find_ulp_mbuf_cb(m); if (cb == NULL) { @@ -798,22 +661,22 @@ iscsi_conn_receive_pdu(struct iscsi_sock goto err_out; } /* BHS */ - mbufq_dequeue(&isock->iscsi_rcv_mbufq); + mbufq_dequeue(&isock->iscsi_rcvq); data_len = cb->ulp.iscsi.pdulen; - CTR5(KTR_CXGBE, "%s: response:%p m:%p m_len:%d data_len:%d\n", + CTR5(KTR_CXGBE, "%s: response:%p m:%p m_len:%d data_len:%d", __func__, response, m, m->m_len, data_len); response->ip_bhs_mbuf = m; response->ip_bhs = mtod(response->ip_bhs_mbuf, struct iscsi_bhs *); /* data */ if (cb->flags & SBUF_ULP_FLAG_DATA_RCVD) { - m = mbufq_peek(&isock->iscsi_rcv_mbufq); + m = mbufq_first(&isock->iscsi_rcvq); if (m == NULL) { CTR1(KTR_CXGBE, "%s:No Data\n", __func__); goto err_out; } - mbufq_dequeue(&isock->iscsi_rcv_mbufq); + mbufq_dequeue(&isock->iscsi_rcvq); response->ip_data_mbuf = m; response->ip_data_len += response->ip_data_mbuf->m_len; } else { @@ -829,26 +692,22 @@ err_out: } static void -process_rx_data_ddp(struct socket *sk, void *m) +process_rx_data_ddp(struct toepcb *toep, const struct cpl_rx_data_ddp *cpl) { - struct cpl_rx_data_ddp *cpl = (struct cpl_rx_data_ddp *)m; - struct tcpcb *tp = so_sototcpcb(sk); - struct toepcb *toep = tp->t_toe; - struct inpcb *inp = toep->inp; struct mbuf *lmbuf; struct ulp_mbuf_cb *lcb, *lcb1; unsigned int val, pdulen; - iscsi_socket *isock = (iscsi_socket *)(sk)->so_emuldata; + struct iscsi_socket *isock = toep->ulpcb; + struct inpcb *inp = toep->inp; - if (isock == NULL) - return; + MPASS(isock != NULL); if (isock->mbuf_ulp_lhdr == NULL) { panic("%s: tid 0x%x, rcv RX_DATA_DDP w/o pdu header.\n", - __func__, toep->tid); + __func__, toep->tid); return; } - mtx_lock(&isock->iscsi_rcv_mbufq.lock); + mtx_lock(&isock->iscsi_rcvq_lock); lmbuf = isock->mbuf_ulp_lhdr; if (lmbuf->m_nextpkt) { lcb1 = find_ulp_mbuf_cb(lmbuf->m_nextpkt); @@ -857,7 +716,7 @@ process_rx_data_ddp(struct socket *sk, v lcb = find_ulp_mbuf_cb(isock->mbuf_ulp_lhdr); if (lcb == NULL) { CTR2(KTR_CXGBE, "%s: mtag NULL lmbuf :%p\n", __func__, lmbuf); - mtx_unlock(&isock->iscsi_rcv_mbufq.lock); + mtx_unlock(&isock->iscsi_rcvq_lock); return; } lcb->flags |= SBUF_ULP_FLAG_STATUS_RCVD; @@ -914,251 +773,143 @@ process_rx_data_ddp(struct socket *sk, v #endif iscsi_conn_receive_pdu(isock); - mtx_unlock(&isock->iscsi_rcv_mbufq.lock); + mtx_unlock(&isock->iscsi_rcvq_lock); /* update rx credits */ INP_WLOCK(inp); - SOCK_LOCK(sk); + /* XXXNP: does this want the so_rcv lock? (happens to be the same) */ + SOCK_LOCK(inp->inp_socket); toep->sb_cc += pdulen; - SOCK_UNLOCK(sk); - CTR4(KTR_CXGBE, "sk:%p sb_cc 0x%x, rcv_nxt 0x%x rcv_wnd:0x%lx.\n", - sk, toep->sb_cc, tp->rcv_nxt, tp->rcv_wnd); - t4_rcvd(&toep->td->tod, tp); + SOCK_UNLOCK(inp->inp_socket); + t4_rcvd(&toep->td->tod, intotcpcb(inp)); INP_WUNLOCK(inp); return; } static void -drop_fw_acked_ulp_data(struct socket *sk, struct toepcb *toep, int len) +drop_fw_acked_ulp_data(struct toepcb *toep, int len) { struct mbuf *m, *next; struct ulp_mbuf_cb *cb; - iscsi_socket *isock = (iscsi_socket *)(sk)->so_emuldata; struct icl_pdu *req; + struct iscsi_socket *isock = toep->ulpcb; - if (len == 0 || (isock == NULL)) - return; + MPASS(len > 0); - mtx_lock(&isock->ulp2_wrq.lock); + mtx_lock(&isock->ulp2_wrq_lock); while (len > 0) { m = mbufq_dequeue(&isock->ulp2_wrq); - if(m == NULL) break; + MPASS(m != NULL); /* excess credits */ - for(next = m; next !=NULL; next = next->m_next) + for (next = m; next != NULL; next = next->m_next) { + MPASS(len >= next->m_len); /* excess credits */ len -= next->m_len; + } cb = find_ulp_mbuf_cb(m); - - if (cb && isock && cb->pdu) { + if (cb && cb->pdu) { req = (struct icl_pdu *)cb->pdu; req->ip_bhs_mbuf = NULL; icl_pdu_free(req); } m_freem(m); } - mtx_unlock(&isock->ulp2_wrq.lock); - return; -} - -static void -process_fw4_ack(struct socket *sk, int *plen) -{ - struct tcpcb *tp = so_sototcpcb(sk); - struct toepcb *toep = tp->t_toe; - - drop_fw_acked_ulp_data(sk, toep, *plen); - - return; -} - -static int -do_set_tcb_rpl(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) -{ - return 0; + mtx_unlock(&isock->ulp2_wrq_lock); } static int do_rx_iscsi_hdr(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { - struct socket *sk; struct adapter *sc = iq->adapter; - struct cpl_iscsi_hdr *cpl = mtod(m, struct cpl_iscsi_hdr *); - sk = cpl_find_sock(sc, GET_TID(cpl)); - - if (sk == NULL) - return CPL_RET_UNKNOWN_TID | CPL_RET_BUF_DONE; + struct cpl_iscsi_hdr *cpl = mtod(m, struct cpl_iscsi_hdr *); /* XXXNP */ + u_int tid = GET_TID(cpl); + struct toepcb *toep = lookup_tid(sc, tid); - process_rx_iscsi_hdr(sk, m); - return 0; -} + process_rx_iscsi_hdr(toep, m); -static int -do_rx_data_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) -{ - return 0; + return (0); } static int do_rx_iscsi_ddp(struct sge_iq *iq, const struct rss_header *rss, struct mbuf *m) { - struct socket *sk; - struct adapter *sc; - const struct cpl_rx_iscsi_ddp *cpl = (const void *)(rss + 1); - - if (iq == NULL) - return 0; - sc = iq->adapter; - if (sc == NULL) - return 0; + struct adapter *sc = iq->adapter; + const struct cpl_rx_data_ddp *cpl = (const void *)(rss + 1); + u_int tid = GET_TID(cpl); + struct toepcb *toep = lookup_tid(sc, tid); - sk = cpl_find_sock(sc, GET_TID(cpl)); - if (sk == NULL) - return CPL_RET_UNKNOWN_TID | CPL_RET_BUF_DONE; + process_rx_data_ddp(toep, cpl); - process_rx_data_ddp(sk, (void *)cpl); - return 0; + return (0); } + static int -t4_ulp_mbuf_push(struct socket *so, struct mbuf *m) +t4_ulp_mbuf_push(struct iscsi_socket *isock, struct mbuf *m) { - struct tcpcb *tp = so_sototcpcb(so); - struct toepcb *toep = tp->t_toe; - struct inpcb *inp = so_sotoinpcb(so); - iscsi_socket *isock = (iscsi_socket *)(so)->so_emuldata;; - - if (isock == NULL) { - m_freem(m); - return EINVAL; - } + struct toepcb *toep = isock->toep; /* append mbuf to ULP queue */ - mtx_lock(&isock->ulp2_writeq.lock); - mbufq_tail(&isock->ulp2_writeq, m); - mtx_unlock(&isock->ulp2_writeq.lock); + mtx_lock(&isock->ulp2_writeq_lock); + mbufq_enqueue(&isock->ulp2_writeq, m); + mtx_unlock(&isock->ulp2_writeq_lock); - INP_WLOCK(inp); + INP_WLOCK(toep->inp); t4_ulp_push_frames(toep->td->tod.tod_softc, toep, 0); - INP_WUNLOCK(inp); - return 0; + INP_WUNLOCK(toep->inp); + + return (0); } static struct mbuf * -iscsi_queue_handler_callback(struct socket *sk, unsigned int cmd, int *qlen) +get_writeq_len(struct toepcb *toep, int *qlen) { - iscsi_socket *isock; - struct mbuf *m0 = NULL; + struct iscsi_socket *isock = toep->ulpcb; - if (sk == NULL) - return NULL; - isock = (iscsi_socket *)(sk)->so_emuldata; - if (isock == NULL) - return NULL; - - switch (cmd) { - case 0:/* PEEK */ - m0 = mbufq_peek(&isock->ulp2_writeq); - break; - case 1:/* QUEUE_LEN */ - *qlen = mbufq_len(&isock->ulp2_writeq); - m0 = mbufq_peek(&isock->ulp2_writeq); - break; - case 2:/* DEQUEUE */ - mtx_lock(&isock->ulp2_writeq.lock); - m0 = mbufq_dequeue(&isock->ulp2_writeq); - mtx_unlock(&isock->ulp2_writeq.lock); - - mtx_lock(&isock->ulp2_wrq.lock); - mbufq_tail(&isock->ulp2_wrq, m0); - mtx_unlock(&isock->ulp2_wrq.lock); - - m0 = mbufq_peek(&isock->ulp2_writeq); - break; - } - return m0; + *qlen = mbufq_len(&isock->ulp2_writeq); + return (mbufq_first(&isock->ulp2_writeq)); } -static void -iscsi_cpl_handler_callback(struct tom_data *td, struct socket *sk, - void *m, unsigned int op) +static struct mbuf * +do_writeq_next(struct toepcb *toep) { - if ((sk == NULL) || (sk->so_emuldata == NULL)) - return; + struct iscsi_socket *isock = toep->ulpcb; + struct mbuf *m; - switch (op) { - case CPL_ISCSI_HDR: - process_rx_iscsi_hdr(sk, m); - break; - case CPL_RX_DATA_DDP: - process_rx_data_ddp(sk, m); - break; - case CPL_SET_TCB_RPL: - break; - case CPL_FW4_ACK: - process_fw4_ack(sk, m); - break; - default: - CTR2(KTR_CXGBE, "sk 0x%p, op 0x%x from TOM, NOT supported.\n", - sk, op); - break; - } + mtx_lock(&isock->ulp2_writeq_lock); + m = mbufq_dequeue(&isock->ulp2_writeq); + mtx_unlock(&isock->ulp2_writeq_lock); + + mtx_lock(&isock->ulp2_wrq_lock); + mbufq_enqueue(&isock->ulp2_wrq, m); + mtx_unlock(&isock->ulp2_wrq_lock); + + return (mbufq_first(&isock->ulp2_writeq)); } static void t4_register_cpl_handler_with_tom(struct adapter *sc) { - t4tom_register_cpl_iscsi_callback(iscsi_cpl_handler_callback); - t4tom_register_queue_iscsi_callback(iscsi_queue_handler_callback); + t4_register_cpl_handler(sc, CPL_ISCSI_HDR, do_rx_iscsi_hdr); t4_register_cpl_handler(sc, CPL_ISCSI_DATA, do_rx_iscsi_hdr); - t4tom_cpl_handler_register_flag |= - 1 << TOM_CPL_ISCSI_HDR_REGISTERED_BIT; - - if (!t4tom_cpl_handler_registered(sc, CPL_SET_TCB_RPL)) { - t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, do_set_tcb_rpl); - t4tom_cpl_handler_register_flag |= - 1 << TOM_CPL_SET_TCB_RPL_REGISTERED_BIT; - CTR0(KTR_CXGBE, "register t4 cpl handler CPL_SET_TCB_RPL.\n"); - } - t4_register_cpl_handler(sc, CPL_RX_ISCSI_DDP, do_rx_iscsi_ddp); - - if (!t4tom_cpl_handler_registered(sc, CPL_RX_DATA_DDP)) { - t4_register_cpl_handler(sc, CPL_RX_DATA_DDP, do_rx_data_ddp); - t4tom_cpl_handler_register_flag |= - 1 << TOM_CPL_RX_DATA_DDP_REGISTERED_BIT; - CTR0(KTR_CXGBE, "register t4 cpl handler CPL_RX_DATA_DDP.\n"); - } } static void t4_unregister_cpl_handler_with_tom(struct adapter *sc) { - /* de-register CPL handles */ - t4tom_register_cpl_iscsi_callback(NULL); - t4tom_register_queue_iscsi_callback(NULL); - if (t4tom_cpl_handler_register_flag & - (1 << TOM_CPL_ISCSI_HDR_REGISTERED_BIT)) { - t4_register_cpl_handler(sc, CPL_ISCSI_HDR, NULL); - t4_register_cpl_handler(sc, CPL_ISCSI_DATA, NULL); - } - if (t4tom_cpl_handler_register_flag & - (1 << TOM_CPL_SET_TCB_RPL_REGISTERED_BIT)) - t4_register_cpl_handler(sc, CPL_SET_TCB_RPL, NULL); + + t4_register_cpl_handler(sc, CPL_ISCSI_HDR, NULL); + t4_register_cpl_handler(sc, CPL_ISCSI_DATA, NULL); t4_register_cpl_handler(sc, CPL_RX_ISCSI_DDP, NULL); - if (t4tom_cpl_handler_register_flag & - (1 << TOM_CPL_RX_DATA_DDP_REGISTERED_BIT)) - t4_register_cpl_handler(sc, CPL_RX_DATA_DDP, NULL); } static int -send_set_tcb_field(struct socket *sk, u16 word, u64 mask, u64 val, - int no_reply) +send_set_tcb_field(struct toepcb * toep, uint16_t word, uint64_t mask, + uint64_t val, int no_reply) { struct wrqe *wr; struct cpl_set_tcb_field *req; - struct inpcb *inp = sotoinpcb(sk); - struct tcpcb *tp = intotcpcb(inp); - struct toepcb *toep = tp->t_toe; wr = alloc_wrqe(sizeof(*req), toep->ctrlq); if (wr == NULL) @@ -1173,58 +924,23 @@ send_set_tcb_field(struct socket *sk, u1 req->val = htobe64(val); t4_wrq_tx(toep->td->tod.tod_softc, wr); - return 0; + + return (0); } static int -cxgbei_set_ulp_mode(struct socket *so, struct toepcb *toep, - unsigned char hcrc, unsigned char dcrc) +cxgbei_set_ulp_mode(struct toepcb *toep, u_char hcrc, u_char dcrc) { - int rv = 0, val = 0; + int val = 0; - toep->ulp_mode = ULP_MODE_ISCSI; if (hcrc) val |= ULP_CRC_HEADER; if (dcrc) val |= ULP_CRC_DATA; val <<= 4; val |= ULP_MODE_ISCSI; - rv = send_set_tcb_field(so, 0, 0xfff, val, 0); - return rv; -} -static offload_device * -add_cxgbei_dev(struct ifnet *dev, struct toedev *tdev) -{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Thu Mar 12 06:25:43 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23E5E708; Thu, 12 Mar 2015 06:25:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E922235; Thu, 12 Mar 2015 06:25:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2C6PgAG096340; Thu, 12 Mar 2015 06:25:42 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2C6PglQ096338; Thu, 12 Mar 2015 06:25:42 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503120625.t2C6PglQ096338@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 12 Mar 2015 06:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279900 - projects/cxl_iscsi/sys/dev/cxgbe/cxgbei 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.18-1 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, 12 Mar 2015 06:25:43 -0000 Author: np Date: Thu Mar 12 06:25:41 2015 New Revision: 279900 URL: https://svnweb.freebsd.org/changeset/base/279900 Log: Messages logged via CTR should not be terminated with \n. Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Mar 12 03:57:19 2015 (r279899) +++ projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei.c Thu Mar 12 06:25:41 2015 (r279900) @@ -414,14 +414,14 @@ cxgbei_task_reserve_itt(struct icl_conn if ((scmd->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) { tdata->nsge = cxgbei_map_sg(tdata->sgl, scmd); if (tdata->nsge == 0) { - CTR1(KTR_CXGBE, "%s: map_sg failed\n", __func__); + CTR1(KTR_CXGBE, "%s: map_sg failed", __func__); return 0; } sge = tdata->sgl; tdata->sc_ddp_tag = *itt; - CTR3(KTR_CXGBE, "%s: *itt:0x%x sc_ddp_tag:0x%x\n", + CTR3(KTR_CXGBE, "%s: *itt:0x%x sc_ddp_tag:0x%x", __func__, *itt, tdata->sc_ddp_tag); if (cxgbei_ulp2_sw_tag_usable(&ci->tag_format, tdata->sc_ddp_tag)) { @@ -429,7 +429,7 @@ cxgbei_task_reserve_itt(struct icl_conn sge, tdata->nsge, &tdata->sc_ddp_tag); } else { CTR3(KTR_CXGBE, - "%s: itt:0x%x sc_ddp_tag:0x%x not usable\n", + "%s: itt:0x%x sc_ddp_tag:0x%x not usable", __func__, *itt, tdata->sc_ddp_tag); } } @@ -461,7 +461,7 @@ cxgbei_task_reserve_ttt(struct icl_conn goto out; tdata->nsge = cxgbei_map_sg_tgt(tdata->sgl, io); if (tdata->nsge == 0) { - CTR1(KTR_CXGBE, "%s: map_sg failed\n", __func__); + CTR1(KTR_CXGBE, "%s: map_sg failed", __func__); return 0; } sge = tdata->sgl; @@ -471,7 +471,7 @@ cxgbei_task_reserve_ttt(struct icl_conn err = t4_sk_ddp_tag_reserve(ci, isock, xferlen, sge, tdata->nsge, &tdata->sc_ddp_tag); } else { - CTR2(KTR_CXGBE, "%s: sc_ddp_tag:0x%x not usable\n", + CTR2(KTR_CXGBE, "%s: sc_ddp_tag:0x%x not usable", __func__, tdata->sc_ddp_tag); } out: @@ -589,7 +589,7 @@ process_rx_iscsi_hdr(struct toepcb *toep /* we only update tp->rcv_nxt once per pdu */ if (cb->seq != tp->rcv_nxt) { CTR3(KTR_CXGBE, - "tid 0x%x, CPL_ISCSI_HDR, BAD seq got 0x%x exp 0x%x.\n", + "tid 0x%x, CPL_ISCSI_HDR, BAD seq got 0x%x exp 0x%x.", toep->tid, cb->seq, tp->rcv_nxt); goto err_out1; } @@ -606,7 +606,7 @@ process_rx_iscsi_hdr(struct toepcb *toep tp->rcv_nxt += lcb->ulp.iscsi.pdulen; if (tp->rcv_wnd <= lcb->ulp.iscsi.pdulen) - CTR3(KTR_CXGBE, "%s: Neg rcv_wnd:0x%lx pdulen:0x%x\n", + CTR3(KTR_CXGBE, "%s: Neg rcv_wnd:0x%lx pdulen:0x%x", __func__, tp->rcv_wnd, lcb->ulp.iscsi.pdulen); tp->rcv_wnd -= lcb->ulp.iscsi.pdulen; tp->t_rcvtime = ticks; @@ -673,7 +673,7 @@ iscsi_conn_receive_pdu(struct iscsi_sock if (cb->flags & SBUF_ULP_FLAG_DATA_RCVD) { m = mbufq_first(&isock->iscsi_rcvq); if (m == NULL) { - CTR1(KTR_CXGBE, "%s:No Data\n", __func__); + CTR1(KTR_CXGBE, "%s:No Data", __func__); goto err_out; } mbufq_dequeue(&isock->iscsi_rcvq); @@ -715,7 +715,7 @@ process_rx_data_ddp(struct toepcb *toep, } lcb = find_ulp_mbuf_cb(isock->mbuf_ulp_lhdr); if (lcb == NULL) { - CTR2(KTR_CXGBE, "%s: mtag NULL lmbuf :%p\n", __func__, lmbuf); + CTR2(KTR_CXGBE, "%s: mtag NULL lmbuf :%p", __func__, lmbuf); mtx_unlock(&isock->iscsi_rcvq_lock); return; } @@ -723,9 +723,9 @@ process_rx_data_ddp(struct toepcb *toep, isock->mbuf_ulp_lhdr = NULL; if (ntohs(cpl->len) != lcb->ulp.iscsi.pdulen) { - CTR3(KTR_CXGBE, "tid 0x%x, RX_DATA_DDP pdulen %u != %u.\n", + CTR3(KTR_CXGBE, "tid 0x%x, RX_DATA_DDP pdulen %u != %u.", toep->tid, ntohs(cpl->len), lcb->ulp.iscsi.pdulen); - CTR4(KTR_CXGBE, "%s: lmbuf:%p lcb:%p lcb->flags:0x%x\n", + CTR4(KTR_CXGBE, "%s: lmbuf:%p lcb:%p lcb->flags:0x%x", __func__, lmbuf, lcb, lcb->flags); } Modified: projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c ============================================================================== --- projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c Thu Mar 12 03:57:19 2015 (r279899) +++ projects/cxl_iscsi/sys/dev/cxgbe/cxgbei/cxgbei_ulp2_ddp.c Thu Mar 12 06:25:41 2015 (r279900) @@ -208,7 +208,7 @@ cxgbei_ulp2_ddp_make_gl_from_iscsi_sgvec int i = 1, j = 0; if (xferlen <= DDP_THRESHOLD) { - CTR2(KTR_CXGBE, "xfer %u < threshold %u, no ddp.\n", + CTR2(KTR_CXGBE, "xfer %u < threshold %u, no ddp.", xferlen, DDP_THRESHOLD); return NULL; } @@ -224,7 +224,7 @@ cxgbei_ulp2_ddp_make_gl_from_iscsi_sgvec gl->offset = sgoffset; gl->pages[0] = sgpage; CTR6(KTR_CXGBE, - "%s: xferlen:0x%x len:0x%x off:0x%x sg_addr:%p npages:%d\n", + "%s: xferlen:0x%x len:0x%x off:0x%x sg_addr:%p npages:%d", __func__, xferlen, gl->length, gl->offset, sg->sg_addr, npages); for (i = 1, sg = sg_next(sg); i < sgcnt; i++, sg = sg_next(sg)) { @@ -323,13 +323,13 @@ cxgbei_ulp2_ddp_tag_reserve(struct cxgbe } } if (rc) { - CTR3(KTR_CXGBE, "xferlen %u, gl %u, npods %u NO DDP.\n", + CTR3(KTR_CXGBE, "xferlen %u, gl %u, npods %u NO DDP.", gl->length, gl->nelem, npods); return (rc); } tag = cxgbei_ulp2_ddp_tag_base(idx, ci->colors, tformat, sw_tag); - CTR4(KTR_CXGBE, "%s: sw_tag:0x%x idx:0x%x tag:0x%x\n", + CTR4(KTR_CXGBE, "%s: sw_tag:0x%x idx:0x%x tag:0x%x", __func__, sw_tag, idx, tag); hdr.rsvd = 0; @@ -367,7 +367,7 @@ cxgbei_ulp2_ddp_tag_release(struct cxgbe MPASS(isock != NULL); idx = (tag >> IPPOD_IDX_SHIFT) & ci->idx_mask; - CTR3(KTR_CXGBE, "tag:0x%x idx:0x%x nppods:0x%x\n", + CTR3(KTR_CXGBE, "tag:0x%x idx:0x%x nppods:0x%x", tag, idx, ci->nppods); if (idx < ci->nppods) { struct cxgbei_ulp2_gather_list *gl = ci->gl_map[idx]; @@ -375,18 +375,18 @@ cxgbei_ulp2_ddp_tag_release(struct cxgbe if (!gl || !gl->nelem) { CTR4(KTR_CXGBE, - "release 0x%x, idx 0x%x, gl 0x%p, %u.\n", + "release 0x%x, idx 0x%x, gl 0x%p, %u.", tag, idx, gl, gl ? gl->nelem : 0); return; } npods = (gl->nelem + IPPOD_PAGES_MAX - 1) >> IPPOD_PAGES_SHIFT; - CTR3(KTR_CXGBE, "ddp tag 0x%x, release idx 0x%x, npods %u.\n", + CTR3(KTR_CXGBE, "ddp tag 0x%x, release idx 0x%x, npods %u.", tag, idx, npods); t4_ddp_clear_map(ci, gl, tag, idx, npods, isock); ddp_unmark_entries(ci, idx, npods); cxgbei_ulp2_ddp_release_gl(ci, gl); } else - CTR3(KTR_CXGBE, "ddp tag 0x%x, idx 0x%x > max 0x%x.\n", + CTR3(KTR_CXGBE, "ddp tag 0x%x, idx 0x%x > max 0x%x.", tag, idx, ci->nppods); } From owner-svn-src-projects@FreeBSD.ORG Sat Mar 14 13:08:08 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D95977AE; Sat, 14 Mar 2015 13:08:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0C2FF07; Sat, 14 Mar 2015 13:08:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2ED881R059269; Sat, 14 Mar 2015 13:08:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2ED817a059230; Sat, 14 Mar 2015 13:08:01 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503141308.t2ED817a059230@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Mar 2015 13:08:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279985 - in projects/clang360-import: . contrib/bmake contrib/compiler-rt/lib/builtins contrib/jemalloc/include/jemalloc contrib/libxo/libxo etc etc/autofs etc/defaults lib/libc/posix1... 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.18-1 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, 14 Mar 2015 13:08:09 -0000 Author: dim Date: Sat Mar 14 13:08:00 2015 New Revision: 279985 URL: https://svnweb.freebsd.org/changeset/base/279985 Log: Merge ^/head r279893 through r279984. Added: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfdi.c - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fixtfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfsi.c - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fixtfsi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfti.c - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fixtfti.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfdi.c - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fixunstfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfsi.c - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fixunstfsi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfti.c - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fixunstfti.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc projects/clang360-import/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc - copied unchanged from r279984, head/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc projects/clang360-import/etc/autofs/special_noauto - copied unchanged from r279984, head/etc/autofs/special_noauto projects/clang360-import/sys/mips/conf/TL-WR1043NDv2 - copied unchanged from r279984, head/sys/mips/conf/TL-WR1043NDv2 projects/clang360-import/sys/mips/conf/TL-WR1043NDv2.hints - copied unchanged from r279984, head/sys/mips/conf/TL-WR1043NDv2.hints Deleted: projects/clang360-import/sys/amd64/vmm/vmm_ipi.c projects/clang360-import/sys/amd64/vmm/vmm_ipi.h projects/clang360-import/sys/amd64/vmm/vmm_support.S projects/clang360-import/sys/gnu/dts/arm/alphascale-asm9260-devkit.dts projects/clang360-import/sys/gnu/dts/arm/alphascale-asm9260.dtsi projects/clang360-import/sys/gnu/dts/arm/axm5516-amarillo.dts projects/clang360-import/sys/gnu/dts/arm/axm55xx.dtsi projects/clang360-import/sys/gnu/dts/arm/exynos5250-snow.dts projects/clang360-import/sys/gnu/dts/arm/exynos5420-peach-pit.dts projects/clang360-import/sys/gnu/dts/arm/exynos5800-peach-pi.dts projects/clang360-import/sys/gnu/dts/arm/mmp2-brownstone.dts projects/clang360-import/sys/gnu/dts/arm/mmp2.dtsi projects/clang360-import/sys/gnu/dts/arm/pxa168-aspenite.dts projects/clang360-import/sys/gnu/dts/arm/pxa168.dtsi projects/clang360-import/sys/gnu/dts/arm/pxa910-dkb.dts projects/clang360-import/sys/gnu/dts/arm/pxa910.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-apq8064-cm-qs600.dts projects/clang360-import/sys/gnu/dts/arm/qcom-apq8064-ifc6410.dts projects/clang360-import/sys/gnu/dts/arm/qcom-apq8064-v2.0.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-apq8064.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-apq8074-dragonboard.dts projects/clang360-import/sys/gnu/dts/arm/qcom-apq8084-ifc6540.dts projects/clang360-import/sys/gnu/dts/arm/qcom-apq8084-mtp.dts projects/clang360-import/sys/gnu/dts/arm/qcom-apq8084.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-ipq8064-ap148.dts projects/clang360-import/sys/gnu/dts/arm/qcom-ipq8064-v1.0.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-ipq8064.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-msm8660-surf.dts projects/clang360-import/sys/gnu/dts/arm/qcom-msm8660.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-msm8960-cdp.dts projects/clang360-import/sys/gnu/dts/arm/qcom-msm8960.dtsi projects/clang360-import/sys/gnu/dts/arm/qcom-msm8974-sony-xperia-honami.dts projects/clang360-import/sys/gnu/dts/arm/qcom-msm8974.dtsi projects/clang360-import/sys/gnu/dts/arm/s3c6400.dtsi projects/clang360-import/sys/gnu/dts/arm/s3c6410-mini6410.dts projects/clang360-import/sys/gnu/dts/arm/s3c6410-smdk6410.dts projects/clang360-import/sys/gnu/dts/arm/s3c6410.dtsi projects/clang360-import/sys/gnu/dts/arm/s3c64xx-pinctrl.dtsi projects/clang360-import/sys/gnu/dts/arm/s3c64xx.dtsi projects/clang360-import/sys/gnu/dts/arm/socfpga.dtsi projects/clang360-import/sys/gnu/dts/arm/socfpga_arria10.dtsi projects/clang360-import/sys/gnu/dts/arm/socfpga_arria10_socdk.dts projects/clang360-import/sys/gnu/dts/arm/socfpga_arria5.dtsi projects/clang360-import/sys/gnu/dts/arm/socfpga_arria5_socdk.dts projects/clang360-import/sys/gnu/dts/arm/socfpga_cyclone5.dtsi projects/clang360-import/sys/gnu/dts/arm/socfpga_cyclone5_socdk.dts projects/clang360-import/sys/gnu/dts/arm/socfpga_cyclone5_sockit.dts projects/clang360-import/sys/gnu/dts/arm/socfpga_cyclone5_socrates.dts projects/clang360-import/sys/gnu/dts/arm/socfpga_vt.dts projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/alphascale,asm9260.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/lsi,axm5516-clks.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/marvell,mmp2.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa168.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/marvell,pxa910.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/maxim,max77686.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/maxim,max77802.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-apq8084.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-ipq806x.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8660.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8960.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,gcc-msm8974.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-ipq806x.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,lcc-msm8960.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-apq8084.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8960.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/qcom,mmcc-msm8974.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/rockchip,rk808.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/clock/samsung,s3c64xx-clock.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/iio/ projects/clang360-import/sys/gnu/dts/include/dt-bindings/pinctrl/qcom,pmic-gpio.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/pinctrl/qcom,pmic-mpp.h projects/clang360-import/sys/gnu/dts/include/dt-bindings/regulator/ projects/clang360-import/sys/gnu/dts/include/dt-bindings/reset/ projects/clang360-import/sys/gnu/dts/include/dt-bindings/soc/ Modified: projects/clang360-import/Makefile.inc1 projects/clang360-import/contrib/bmake/meta.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfsi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfti.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfsi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfti.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfsi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfti.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfsi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfti.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfsi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfti.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfdi.c projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfti.c projects/clang360-import/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h projects/clang360-import/contrib/libxo/libxo/xo.h projects/clang360-import/etc/auto_master projects/clang360-import/etc/autofs/Makefile projects/clang360-import/etc/defaults/periodic.conf projects/clang360-import/lib/libc/posix1e/acl_calc_mask.c projects/clang360-import/lib/libc/posix1e/acl_strip.c projects/clang360-import/lib/libcompiler_rt/Makefile projects/clang360-import/lib/libproc/proc_sym.c projects/clang360-import/lib/libstand/Makefile projects/clang360-import/lib/libstand/dosfs.c projects/clang360-import/sbin/geom/class/part/gpart.8 projects/clang360-import/sbin/ifconfig/ifconfig.c projects/clang360-import/sbin/ipfw/ipfw.8 projects/clang360-import/sbin/ipfw/ipfw2.c projects/clang360-import/sbin/ipfw/tables.c projects/clang360-import/share/doc/psd/title/Title projects/clang360-import/share/doc/smm/title/Title projects/clang360-import/share/doc/usd/title/Title projects/clang360-import/share/examples/bhyve/vmrun.sh projects/clang360-import/share/man/man5/periodic.conf.5 projects/clang360-import/share/man/man9/mbuf.9 projects/clang360-import/share/mk/bsd.mkopt.mk projects/clang360-import/share/mk/bsd.obj.mk projects/clang360-import/share/mk/sys.mk projects/clang360-import/sys/amd64/amd64/apic_vector.S projects/clang360-import/sys/amd64/include/smp.h projects/clang360-import/sys/amd64/vmm/intel/ept.c projects/clang360-import/sys/amd64/vmm/intel/vmx.c projects/clang360-import/sys/amd64/vmm/io/vlapic.c projects/clang360-import/sys/amd64/vmm/vmm.c projects/clang360-import/sys/amd64/vmm/vmm_lapic.c projects/clang360-import/sys/arm/include/in_cksum.h projects/clang360-import/sys/boot/amd64/Makefile.inc projects/clang360-import/sys/boot/amd64/efi/Makefile projects/clang360-import/sys/boot/amd64/efi/conf.c projects/clang360-import/sys/boot/amd64/efi/copy.c projects/clang360-import/sys/boot/efi/libefi/Makefile projects/clang360-import/sys/boot/efi/libefi/libefi.c projects/clang360-import/sys/boot/ficl/Makefile projects/clang360-import/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c projects/clang360-import/sys/conf/kern.opts.mk projects/clang360-import/sys/dev/ahci/ahci.h projects/clang360-import/sys/dev/ata/ata-all.h projects/clang360-import/sys/dev/cxgbe/t4_main.c projects/clang360-import/sys/dev/drm2/drm_pci.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_8327.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_vlans.c projects/clang360-import/sys/dev/etherswitch/arswitch/arswitch_vlans.h projects/clang360-import/sys/dev/etherswitch/arswitch/arswitchvar.h projects/clang360-import/sys/dev/hwpmc/hwpmc_core.c projects/clang360-import/sys/dev/hwpmc/hwpmc_logging.c projects/clang360-import/sys/dev/mii/rgephy.c projects/clang360-import/sys/dev/mii/rgephyreg.h projects/clang360-import/sys/dev/mvs/mvs.h projects/clang360-import/sys/dev/siis/siis.h projects/clang360-import/sys/geom/mirror/g_mirror.c projects/clang360-import/sys/geom/part/g_part.c projects/clang360-import/sys/geom/part/g_part.h projects/clang360-import/sys/geom/part/g_part_gpt.c projects/clang360-import/sys/i386/isa/npx.c projects/clang360-import/sys/mips/conf/QCA955X_BASE projects/clang360-import/sys/modules/vmm/Makefile projects/clang360-import/sys/net/if.c projects/clang360-import/sys/netinet/ip_fw.h projects/clang360-import/sys/netpfil/ipfw/ip_fw2.c projects/clang360-import/sys/netpfil/ipfw/ip_fw_pfil.c projects/clang360-import/sys/netpfil/ipfw/ip_fw_private.h projects/clang360-import/sys/netpfil/ipfw/ip_fw_table_value.c projects/clang360-import/sys/netpfil/pf/pf.c projects/clang360-import/sys/powerpc/aim/mmu_oea64.c projects/clang360-import/sys/powerpc/include/slb.h projects/clang360-import/sys/powerpc/include/ucontext.h projects/clang360-import/sys/powerpc/powerpc/exec_machdep.c projects/clang360-import/sys/powerpc/pseries/mmu_phyp.c projects/clang360-import/sys/powerpc/pseries/phyp_llan.c projects/clang360-import/sys/sys/gpt.h projects/clang360-import/sys/x86/include/apicvar.h projects/clang360-import/sys/x86/x86/local_apic.c projects/clang360-import/sys/x86/xen/xen_apic.c projects/clang360-import/usr.bin/Makefile projects/clang360-import/usr.bin/xlint/Makefile.inc projects/clang360-import/usr.sbin/autofs/auto_master.5 projects/clang360-import/usr.sbin/autofs/automount.c projects/clang360-import/usr.sbin/autofs/automountd.c projects/clang360-import/usr.sbin/autofs/common.c projects/clang360-import/usr.sbin/autofs/common.h projects/clang360-import/usr.sbin/bhyve/ahci.h projects/clang360-import/usr.sbin/bhyve/block_if.c projects/clang360-import/usr.sbin/bhyve/block_if.h projects/clang360-import/usr.sbin/bhyve/pci_ahci.c projects/clang360-import/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: projects/clang360-import/ (props changed) projects/clang360-import/contrib/bmake/ (props changed) projects/clang360-import/contrib/compiler-rt/ (props changed) projects/clang360-import/etc/ (props changed) projects/clang360-import/lib/libc/ (props changed) projects/clang360-import/sbin/ (props changed) projects/clang360-import/sbin/ipfw/ (props changed) projects/clang360-import/share/ (props changed) projects/clang360-import/sys/ (props changed) projects/clang360-import/sys/amd64/vmm/ (props changed) projects/clang360-import/sys/boot/ (props changed) projects/clang360-import/sys/cddl/contrib/opensolaris/ (props changed) projects/clang360-import/sys/conf/ (props changed) projects/clang360-import/sys/gnu/dts/ (props changed) projects/clang360-import/sys/gnu/dts/arm/ (props changed) projects/clang360-import/sys/gnu/dts/include/ (props changed) projects/clang360-import/sys/modules/vmm/ (props changed) projects/clang360-import/usr.sbin/bhyve/ (props changed) Modified: projects/clang360-import/Makefile.inc1 ============================================================================== --- projects/clang360-import/Makefile.inc1 Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/Makefile.inc1 Sat Mar 14 13:08:00 2015 (r279985) @@ -318,6 +318,19 @@ LOCALBASE?= /usr/local CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} .endif + +# If we do not have a bootstrap binutils (because the in-tree one does not +# support the target architecture), provide a default cross-binutils prefix. +# This allows aarch64 builds, for example, to automatically use the +# aarch64-binutils port or package. +.if !empty(BROKEN_OPTIONS:MBINUTILS_BOOTSTRAP) && \ + !defined(CROSS_BINUTILS_PREFIX) +CROSS_BINUTILS_PREFIX=/usr/local/${TARGET_ARCH}-freebsd/bin/ +.if !exists(${CROSS_BINUTILS_PREFIX}) +.error In-tree binutils does not support the ${TARGET_ARCH} architecture. Install the ${TARGET_ARCH}-binutils port or package or set CROSS_BINUTILS_PREFIX. +.endif +.endif + XCOMPILERS= CC CXX CPP .for COMPILER in ${XCOMPILERS} .if defined(CROSS_COMPILER_PREFIX) @@ -1484,7 +1497,6 @@ cross-tools: .MAKE ${_binutils} \ ${_elftctools} \ ${_cc} \ - usr.bin/xlint/lint1 usr.bin/xlint/lint2 usr.bin/xlint/xlint \ ${_btxld} \ ${_crunchide} \ ${_kgzip} \ Modified: projects/clang360-import/contrib/bmake/meta.c ============================================================================== --- projects/clang360-import/contrib/bmake/meta.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/bmake/meta.c Sat Mar 14 13:08:00 2015 (r279985) @@ -169,7 +169,7 @@ filemon_read(FILE *mfp, int fd) if ((fp = fdopen(fd, "r")) == NULL) err(1, "Could not read build monitor file '%d'", fd); - fprintf(mfp, "-- filemon acquired metadata --\n"); + fprintf(mfp, "\n-- filemon acquired metadata --\n"); while (fgets(buf, sizeof(buf), fp)) { fprintf(mfp, "%s", buf); Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfdi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfdi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfdi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -6,40 +6,17 @@ * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixdfdi for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== */ -#include "int_lib.h" - -/* Returns: convert a to a signed long long, rounding toward zero. */ - -/* Assumption: double is a IEEE 64 bit floating point type - * su_int is a 32 bit integral type - * value in double is representable in di_int (no range checking performed) - */ - -/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ - +#define DOUBLE_PRECISION +#include "fp_lib.h" ARM_EABI_FNALIAS(d2lz, fixdfdi) +typedef di_int fixint_t; +typedef du_int fixuint_t; +#include "fp_fixint_impl.inc" + COMPILER_RT_ABI di_int -__fixdfdi(double a) -{ - double_bits fb; - fb.f = a; - int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023; - if (e < 0) - return 0; - di_int s = (si_int)(fb.u.s.high & 0x80000000) >> 31; - dwords r; - r.s.high = (fb.u.s.high & 0x000FFFFF) | 0x00100000; - r.s.low = fb.u.s.low; - if (e > 52) - r.all <<= (e - 52); - else - r.all >>= (52 - e); - return (r.all ^ s) - s; -} +__fixdfdi(fp_t a) { + return __fixint(a); +} Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfsi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfsi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfsi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -1,50 +1,22 @@ -//===-- lib/fixdfsi.c - Double-precision -> integer conversion ----*- C -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements double-precision to integer conversion for the -// compiler-rt library. No range checking is performed; the behavior of this -// conversion is undefined for out of range values in the C standard. -// -//===----------------------------------------------------------------------===// +/* ===-- fixdfsi.c - Implement __fixdfsi -----------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ #define DOUBLE_PRECISION #include "fp_lib.h" - -#include "int_lib.h" +typedef si_int fixint_t; +typedef su_int fixuint_t; +#include "fp_fixint_impl.inc" ARM_EABI_FNALIAS(d2iz, fixdfsi) -COMPILER_RT_ABI int +COMPILER_RT_ABI si_int __fixdfsi(fp_t a) { - - // Break a into sign, exponent, significand - const rep_t aRep = toRep(a); - const rep_t aAbs = aRep & absMask; - const int sign = aRep & signBit ? -1 : 1; - const int exponent = (aAbs >> significandBits) - exponentBias; - const rep_t significand = (aAbs & significandMask) | implicitBit; - - // If 0 < exponent < significandBits, right shift to get the result. - if ((unsigned int)exponent < significandBits) { - return sign * (significand >> (significandBits - exponent)); - } - - // If exponent is negative, the result is zero. - else if (exponent < 0) { - return 0; - } - - // If significandBits < exponent, left shift to get the result. This shift - // may end up being larger than the type width, which incurs undefined - // behavior, but the conversion itself is undefined in that case, so - // whatever the compiler decides to do is fine. - else { - return sign * (significand << (exponent - significandBits)); - } + return __fixint(a); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfti.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfti.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixdfti.c Sat Mar 14 13:08:00 2015 (r279985) @@ -6,40 +6,21 @@ * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixdfti for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== */ #include "int_lib.h" #ifdef CRT_HAS_128BIT +#define DOUBLE_PRECISION +#include "fp_lib.h" -/* Returns: convert a to a signed long long, rounding toward zero. */ - -/* Assumption: double is a IEEE 64 bit floating point type - * su_int is a 32 bit integral type - * value in double is representable in ti_int (no range checking performed) - */ - -/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ +typedef ti_int fixint_t; +typedef tu_int fixuint_t; +#include "fp_fixint_impl.inc" COMPILER_RT_ABI ti_int -__fixdfti(double a) -{ - double_bits fb; - fb.f = a; - int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023; - if (e < 0) - return 0; - ti_int s = (si_int)(fb.u.s.high & 0x80000000) >> 31; - ti_int r = 0x0010000000000000uLL | (0x000FFFFFFFFFFFFFuLL & fb.u.all); - if (e > 52) - r <<= (e - 52); - else - r >>= (52 - e); - return (r ^ s) - s; +__fixdfti(fp_t a) { + return __fixint(a); } #endif /* CRT_HAS_128BIT */ Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfdi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfdi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfdi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -1,43 +1,23 @@ /* ===-- fixsfdi.c - Implement __fixsfdi -----------------------------------=== * - * The LLVM Compiler Infrastructure + * The LLVM Compiler Infrastructure * * This file is dual licensed under the MIT and the University of Illinois Open * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixsfdi for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== - */ - -#include "int_lib.h" - -/* Returns: convert a to a signed long long, rounding toward zero. */ - -/* Assumption: float is a IEEE 32 bit floating point type - * su_int is a 32 bit integral type - * value in float is representable in di_int (no range checking performed) */ -/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */ +#define SINGLE_PRECISION +#include "fp_lib.h" ARM_EABI_FNALIAS(f2lz, fixsfdi) +typedef di_int fixint_t; +typedef du_int fixuint_t; +#include "fp_fixint_impl.inc" + COMPILER_RT_ABI di_int -__fixsfdi(float a) -{ - float_bits fb; - fb.f = a; - int e = ((fb.u & 0x7F800000) >> 23) - 127; - if (e < 0) - return 0; - di_int s = (si_int)(fb.u & 0x80000000) >> 31; - di_int r = (fb.u & 0x007FFFFF) | 0x00800000; - if (e > 23) - r <<= (e - 23); - else - r >>= (23 - e); - return (r ^ s) - s; +__fixsfdi(fp_t a) { + return __fixint(a); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfsi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfsi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfsi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -1,47 +1,22 @@ -//===-- lib/fixsfsi.c - Single-precision -> integer conversion ----*- C -*-===// -// -// The LLVM Compiler Infrastructure -// -// This file is dual licensed under the MIT and the University of Illinois Open -// Source Licenses. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file implements single-precision to integer conversion for the -// compiler-rt library. No range checking is performed; the behavior of this -// conversion is undefined for out of range values in the C standard. -// -//===----------------------------------------------------------------------===// +/* ===-- fixsfsi.c - Implement __fixsfsi -----------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ #define SINGLE_PRECISION #include "fp_lib.h" +typedef si_int fixint_t; +typedef su_int fixuint_t; +#include "fp_fixint_impl.inc" ARM_EABI_FNALIAS(f2iz, fixsfsi) -COMPILER_RT_ABI int +COMPILER_RT_ABI si_int __fixsfsi(fp_t a) { - // Break a into sign, exponent, significand - const rep_t aRep = toRep(a); - const rep_t aAbs = aRep & absMask; - const int sign = aRep & signBit ? -1 : 1; - const int exponent = (aAbs >> significandBits) - exponentBias; - const rep_t significand = (aAbs & significandMask) | implicitBit; - - // If 0 < exponent < significandBits, right shift to get the result. - if ((unsigned int)exponent < significandBits) { - return sign * (significand >> (significandBits - exponent)); - } - - // If exponent is negative, the result is zero. - else if (exponent < 0) { - return 0; - } - - // If significandBits < exponent, left shift to get the result. This shift - // may end up being larger than the type width, which incurs undefined - // behavior, but the conversion itself is undefined in that case, so - // whatever the compiler decides to do is fine. - else { - return sign * (significand << (exponent - significandBits)); - } + return __fixint(a); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfti.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfti.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixsfti.c Sat Mar 14 13:08:00 2015 (r279985) @@ -6,40 +6,21 @@ * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixsfti for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== */ #include "int_lib.h" #ifdef CRT_HAS_128BIT +#define SINGLE_PRECISION +#include "fp_lib.h" -/* Returns: convert a to a signed long long, rounding toward zero. */ - -/* Assumption: float is a IEEE 32 bit floating point type - * su_int is a 32 bit integral type - * value in float is representable in ti_int (no range checking performed) - */ - -/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */ +typedef ti_int fixint_t; +typedef tu_int fixuint_t; +#include "fp_fixint_impl.inc" COMPILER_RT_ABI ti_int -__fixsfti(float a) -{ - float_bits fb; - fb.f = a; - int e = ((fb.u & 0x7F800000) >> 23) - 127; - if (e < 0) - return 0; - ti_int s = (si_int)(fb.u & 0x80000000) >> 31; - ti_int r = (fb.u & 0x007FFFFF) | 0x00800000; - if (e > 23) - r <<= (e - 23); - else - r >>= (23 - e); - return (r ^ s) - s; +__fixsfti(fp_t a) { + return __fixint(a); } #endif /* CRT_HAS_128BIT */ Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfdi.c (from r279984, head/contrib/compiler-rt/lib/builtins/fixtfdi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfdi.c Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fixtfdi.c) @@ -0,0 +1,23 @@ +/* ===-- fixtfdi.c - Implement __fixtfdi -----------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +typedef di_int fixint_t; +typedef du_int fixuint_t; +#include "fp_fixint_impl.inc" + +COMPILER_RT_ABI di_int +__fixtfdi(fp_t a) { + return __fixint(a); +} +#endif Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfsi.c (from r279984, head/contrib/compiler-rt/lib/builtins/fixtfsi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfsi.c Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fixtfsi.c) @@ -0,0 +1,23 @@ +/* ===-- fixtfsi.c - Implement __fixtfsi -----------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +typedef si_int fixint_t; +typedef su_int fixuint_t; +#include "fp_fixint_impl.inc" + +COMPILER_RT_ABI si_int +__fixtfsi(fp_t a) { + return __fixint(a); +} +#endif Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfti.c (from r279984, head/contrib/compiler-rt/lib/builtins/fixtfti.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixtfti.c Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fixtfti.c) @@ -0,0 +1,23 @@ +/* ===-- fixtfti.c - Implement __fixtfti -----------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +typedef ti_int fixint_t; +typedef tu_int fixuint_t; +#include "fp_fixint_impl.inc" + +COMPILER_RT_ABI ti_int +__fixtfti(fp_t a) { + return __fixint(a); +} +#endif Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfdi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -6,42 +6,16 @@ * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixunsdfdi for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== - */ - -#include "int_lib.h" - -/* Returns: convert a to a unsigned long long, rounding toward zero. - * Negative values all become zero. - */ - -/* Assumption: double is a IEEE 64 bit floating point type - * du_int is a 64 bit integral type - * value in double is representable in du_int or is negative - * (no range checking performed) */ -/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ +#define DOUBLE_PRECISION +#include "fp_lib.h" +typedef du_int fixuint_t; +#include "fp_fixuint_impl.inc" ARM_EABI_FNALIAS(d2ulz, fixunsdfdi) COMPILER_RT_ABI du_int -__fixunsdfdi(double a) -{ - double_bits fb; - fb.f = a; - int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023; - if (e < 0 || (fb.u.s.high & 0x80000000)) - return 0; - udwords r; - r.s.high = (fb.u.s.high & 0x000FFFFF) | 0x00100000; - r.s.low = fb.u.s.low; - if (e > 52) - r.all <<= (e - 52); - else - r.all >>= (52 - e); - return r.all; +__fixunsdfdi(fp_t a) { + return __fixuint(a); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfsi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfsi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfsi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -6,39 +6,16 @@ * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixunsdfsi for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== - */ - -#include "int_lib.h" - -/* Returns: convert a to a unsigned int, rounding toward zero. - * Negative values all become zero. - */ - -/* Assumption: double is a IEEE 64 bit floating point type - * su_int is a 32 bit integral type - * value in double is representable in su_int or is negative - * (no range checking performed) */ -/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ +#define DOUBLE_PRECISION +#include "fp_lib.h" +typedef su_int fixuint_t; +#include "fp_fixuint_impl.inc" ARM_EABI_FNALIAS(d2uiz, fixunsdfsi) COMPILER_RT_ABI su_int -__fixunsdfsi(double a) -{ - double_bits fb; - fb.f = a; - int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023; - if (e < 0 || (fb.u.s.high & 0x80000000)) - return 0; - return ( - 0x80000000u | - ((fb.u.s.high & 0x000FFFFF) << 11) | - (fb.u.s.low >> 21) - ) >> (31 - e); +__fixunsdfsi(fp_t a) { + return __fixuint(a); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfti.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfti.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsdfti.c Sat Mar 14 13:08:00 2015 (r279985) @@ -6,42 +6,18 @@ * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixunsdfti for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== */ #include "int_lib.h" #ifdef CRT_HAS_128BIT - -/* Returns: convert a to a unsigned long long, rounding toward zero. - * Negative values all become zero. - */ - -/* Assumption: double is a IEEE 64 bit floating point type - * tu_int is a 64 bit integral type - * value in double is representable in tu_int or is negative - * (no range checking performed) - */ - -/* seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm */ +#define DOUBLE_PRECISION +#include "fp_lib.h" +typedef tu_int fixuint_t; +#include "fp_fixuint_impl.inc" COMPILER_RT_ABI tu_int -__fixunsdfti(double a) -{ - double_bits fb; - fb.f = a; - int e = ((fb.u.s.high & 0x7FF00000) >> 20) - 1023; - if (e < 0 || (fb.u.s.high & 0x80000000)) - return 0; - tu_int r = 0x0010000000000000uLL | (fb.u.all & 0x000FFFFFFFFFFFFFuLL); - if (e > 52) - r <<= (e - 52); - else - r >>= (52 - e); - return r; +__fixunsdftti(fp_t a) { + return __fixuint(a); } - #endif /* CRT_HAS_128BIT */ Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfdi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfdi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfdi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -6,39 +6,16 @@ * Source Licenses. See LICENSE.TXT for details. * * ===----------------------------------------------------------------------=== - * - * This file implements __fixunssfdi for the compiler_rt library. - * - * ===----------------------------------------------------------------------=== - */ - -#include "int_lib.h" -/* Returns: convert a to a unsigned long long, rounding toward zero. - * Negative values all become zero. - */ - -/* Assumption: float is a IEEE 32 bit floating point type - * du_int is a 64 bit integral type - * value in float is representable in du_int or is negative - * (no range checking performed) */ -/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */ +#define SINGLE_PRECISION +#include "fp_lib.h" +typedef du_int fixuint_t; +#include "fp_fixuint_impl.inc" ARM_EABI_FNALIAS(f2ulz, fixunssfdi) COMPILER_RT_ABI du_int -__fixunssfdi(float a) -{ - float_bits fb; - fb.f = a; - int e = ((fb.u & 0x7F800000) >> 23) - 127; - if (e < 0 || (fb.u & 0x80000000)) - return 0; - du_int r = (fb.u & 0x007FFFFF) | 0x00800000; - if (e > 23) - r <<= (e - 23); - else - r >>= (23 - e); - return r; +__fixunssfdi(fp_t a) { + return __fixuint(a); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfsi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfsi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfsi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -12,34 +12,14 @@ * ===----------------------------------------------------------------------=== */ -#include "int_lib.h" - -/* Returns: convert a to a unsigned int, rounding toward zero. - * Negative values all become zero. - */ - -/* Assumption: float is a IEEE 32 bit floating point type - * su_int is a 32 bit integral type - * value in float is representable in su_int or is negative - * (no range checking performed) - */ - -/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */ +#define SINGLE_PRECISION +#include "fp_lib.h" +typedef su_int fixuint_t; +#include "fp_fixuint_impl.inc" ARM_EABI_FNALIAS(f2uiz, fixunssfsi) COMPILER_RT_ABI su_int -__fixunssfsi(float a) -{ - float_bits fb; - fb.f = a; - int e = ((fb.u & 0x7F800000) >> 23) - 127; - if (e < 0 || (fb.u & 0x80000000)) - return 0; - su_int r = (fb.u & 0x007FFFFF) | 0x00800000; - if (e > 23) - r <<= (e - 23); - else - r >>= (23 - e); - return r; +__fixunssfsi(fp_t a) { + return __fixuint(a); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfti.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfti.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunssfti.c Sat Mar 14 13:08:00 2015 (r279985) @@ -12,36 +12,12 @@ * ===----------------------------------------------------------------------=== */ -#include "int_lib.h" - -#ifdef CRT_HAS_128BIT - -/* Returns: convert a to a unsigned long long, rounding toward zero. - * Negative values all become zero. - */ - -/* Assumption: float is a IEEE 32 bit floating point type - * tu_int is a 64 bit integral type - * value in float is representable in tu_int or is negative - * (no range checking performed) - */ - -/* seee eeee emmm mmmm mmmm mmmm mmmm mmmm */ +#if defined(CRT_HAS_128BIT) +typedef tu_int fixuint_t; +#include "fp_fixuint_impl.inc" COMPILER_RT_ABI tu_int -__fixunssfti(float a) -{ - float_bits fb; - fb.f = a; - int e = ((fb.u & 0x7F800000) >> 23) - 127; - if (e < 0 || (fb.u & 0x80000000)) - return 0; - tu_int r = (fb.u & 0x007FFFFF) | 0x00800000; - if (e > 23) - r <<= (e - 23); - else - r >>= (23 - e); - return r; +__fixunssfti(fp_t a) { + return __fixuint(a); } - -#endif /* CRT_HAS_128BIT */ +#endif Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfdi.c (from r279984, head/contrib/compiler-rt/lib/builtins/fixunstfdi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfdi.c Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fixunstfdi.c) @@ -0,0 +1,22 @@ +/* ===-- fixunstfdi.c - Implement __fixunstfdi -----------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +typedef du_int fixuint_t; +#include "fp_fixuint_impl.inc" + +COMPILER_RT_ABI du_int +__fixunstfdi(fp_t a) { + return __fixuint(a); +} +#endif Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfsi.c (from r279984, head/contrib/compiler-rt/lib/builtins/fixunstfsi.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfsi.c Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fixunstfsi.c) @@ -0,0 +1,22 @@ +/* ===-- fixunstfsi.c - Implement __fixunstfsi -----------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +typedef su_int fixuint_t; +#include "fp_fixuint_impl.inc" + +COMPILER_RT_ABI su_int +__fixunstfsi(fp_t a) { + return __fixuint(a); +} +#endif Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfti.c (from r279984, head/contrib/compiler-rt/lib/builtins/fixunstfti.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunstfti.c Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fixunstfti.c) @@ -0,0 +1,22 @@ +/* ===-- fixunstfsi.c - Implement __fixunstfsi -----------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + */ + +#define QUAD_PRECISION +#include "fp_lib.h" + +#if defined(CRT_HAS_128BIT) && defined(CRT_LDBL_128BIT) +typedef tu_int fixuint_t; +#include "fp_fixuint_impl.inc" + +COMPILER_RT_ABI tu_int +__fixunstfti(fp_t a) { + return __fixuint(a); +} +#endif Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfdi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfdi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfdi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -38,6 +38,8 @@ __fixunsxfdi(long double a) int e = (fb.u.high.s.low & 0x00007FFF) - 16383; if (e < 0 || (fb.u.high.s.low & 0x00008000)) return 0; + if ((unsigned)e > sizeof(du_int) * CHAR_BIT) + return ~(du_int)0; return fb.u.low.all >> (63 - e); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfsi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfsi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfsi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -23,7 +23,6 @@ /* Assumption: long double is an intel 80 bit floating point type padded with 6 bytes * su_int is a 32 bit integral type * value in long double is representable in su_int or is negative - * (no range checking performed) */ /* gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee | @@ -38,6 +37,8 @@ __fixunsxfsi(long double a) int e = (fb.u.high.s.low & 0x00007FFF) - 16383; if (e < 0 || (fb.u.high.s.low & 0x00008000)) return 0; + if ((unsigned)e > sizeof(su_int) * CHAR_BIT) + return ~(su_int)0; return fb.u.low.s.high >> (31 - e); } Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfti.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfti.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixunsxfti.c Sat Mar 14 13:08:00 2015 (r279985) @@ -21,9 +21,8 @@ */ /* Assumption: long double is an intel 80 bit floating point type padded with 6 bytes - * tu_int is a 64 bit integral type + * tu_int is a 128 bit integral type * value in long double is representable in tu_int or is negative - * (no range checking performed) */ /* gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee | @@ -38,6 +37,8 @@ __fixunsxfti(long double a) int e = (fb.u.high.s.low & 0x00007FFF) - 16383; if (e < 0 || (fb.u.high.s.low & 0x00008000)) return 0; + if ((unsigned)e > sizeof(tu_int) * CHAR_BIT) + return ~(tu_int)0; tu_int r = fb.u.low.all; if (e > 63) r <<= (e - 63); Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfdi.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfdi.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfdi.c Sat Mar 14 13:08:00 2015 (r279985) @@ -19,7 +19,7 @@ /* Returns: convert a to a signed long long, rounding toward zero. */ /* Assumption: long double is an intel 80 bit floating point type padded with 6 bytes - * su_int is a 32 bit integral type + * di_int is a 64 bit integral type * value in long double is representable in di_int (no range checking performed) */ @@ -30,11 +30,15 @@ COMPILER_RT_ABI di_int __fixxfdi(long double a) { + const di_int di_max = (di_int)((~(du_int)0) / 2); + const di_int di_min = -di_max - 1; long_double_bits fb; fb.f = a; int e = (fb.u.high.s.low & 0x00007FFF) - 16383; if (e < 0) return 0; + if ((unsigned)e >= sizeof(di_int) * CHAR_BIT) + return a > 0 ? di_max : di_min; di_int s = -(si_int)((fb.u.high.s.low & 0x00008000) >> 15); di_int r = fb.u.low.all; r = (du_int)r >> (63 - e); Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfti.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfti.c Sat Mar 14 13:04:39 2015 (r279984) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fixxfti.c Sat Mar 14 13:08:00 2015 (r279985) @@ -19,8 +19,8 @@ /* Returns: convert a to a signed long long, rounding toward zero. */ /* Assumption: long double is an intel 80 bit floating point type padded with 6 bytes - * su_int is a 32 bit integral type - * value in long double is representable in ti_int (no range checking performed) + * ti_int is a 128 bit integral type + * value in long double is representable in ti_int */ /* gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee | @@ -30,6 +30,8 @@ COMPILER_RT_ABI ti_int __fixxfti(long double a) { + const ti_int ti_max = (ti_int)((~(tu_int)0) / 2); + const ti_int ti_min = -ti_max - 1; long_double_bits fb; fb.f = a; int e = (fb.u.high.s.low & 0x00007FFF) - 16383; @@ -37,6 +39,8 @@ __fixxfti(long double a) return 0; ti_int s = -(si_int)((fb.u.high.s.low & 0x00008000) >> 15); ti_int r = fb.u.low.all; + if ((unsigned)e >= sizeof(ti_int) * CHAR_BIT) + return a > 0 ? ti_max : ti_min; if (e > 63) r <<= (e - 63); else Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc (from r279984, head/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fp_fixint_impl.inc) @@ -0,0 +1,41 @@ +//===-- lib/fixdfsi.c - Double-precision -> integer conversion ----*- C -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements float to integer conversion for the +// compiler-rt library. +// +//===----------------------------------------------------------------------===// + +#include "fp_lib.h" + +static inline fixint_t __fixint(fp_t a) { + const fixint_t fixint_max = (fixint_t)((~(fixuint_t)0) / 2); + const fixint_t fixint_min = -fixint_max - 1; + // Break a into sign, exponent, significand + const rep_t aRep = toRep(a); + const rep_t aAbs = aRep & absMask; + const fixint_t sign = aRep & signBit ? -1 : 1; + const int exponent = (aAbs >> significandBits) - exponentBias; + const rep_t significand = (aAbs & significandMask) | implicitBit; + + // If exponent is negative, the result is zero. + if (exponent < 0) + return 0; + + // If the value is too large for the integer type, saturate. + if ((unsigned)exponent >= sizeof(fixint_t) * CHAR_BIT) + return sign == 1 ? fixint_max : fixint_min; + + // If 0 <= exponent < significandBits, right shift to get the result. + // Otherwise, shift left. + if (exponent < significandBits) + return sign * (significand >> (significandBits - exponent)); + else + return sign * ((fixint_t)significand << (exponent - significandBits)); +} Copied: projects/clang360-import/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc (from r279984, head/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc Sat Mar 14 13:08:00 2015 (r279985, copy of r279984, head/contrib/compiler-rt/lib/builtins/fp_fixuint_impl.inc) @@ -0,0 +1,39 @@ +//===-- lib/fixdfsi.c - Double-precision -> integer conversion ----*- C -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements float to unsigned integer conversion for the +// compiler-rt library. +// +//===----------------------------------------------------------------------===// + +#include "fp_lib.h" + +static inline fixuint_t __fixuint(fp_t a) { + // Break a into sign, exponent, significand + const rep_t aRep = toRep(a); + const rep_t aAbs = aRep & absMask; + const int sign = aRep & signBit ? -1 : 1; + const int exponent = (aAbs >> significandBits) - exponentBias; + const rep_t significand = (aAbs & significandMask) | implicitBit; + + // If either the value or the exponent is negative, the result is zero. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-projects@FreeBSD.ORG Sat Mar 14 17:25:21 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5B1C6FB; Sat, 14 Mar 2015 17:25:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCD99B52; Sat, 14 Mar 2015 17:25:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2EHPLEu083684; Sat, 14 Mar 2015 17:25:21 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2EHPIum083664; Sat, 14 Mar 2015 17:25:18 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503141725.t2EHPIum083664@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Mar 2015 17:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279995 - in projects/clang360-import: sbin/restore share/man/man9 sys/conf sys/dev/cxgb sys/dev/cxgbe sys/kern sys/sys sys/vm usr.sbin/bhyve 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.18-1 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, 14 Mar 2015 17:25:22 -0000 Author: dim Date: Sat Mar 14 17:25:17 2015 New Revision: 279995 URL: https://svnweb.freebsd.org/changeset/base/279995 Log: Merge ^/head r279985 through r279994. Modified: projects/clang360-import/sbin/restore/dirs.c projects/clang360-import/sbin/restore/tape.c projects/clang360-import/share/man/man9/sbuf.9 projects/clang360-import/sys/conf/files.i386 projects/clang360-import/sys/dev/cxgb/cxgb_sge.c projects/clang360-import/sys/dev/cxgbe/t4_main.c projects/clang360-import/sys/kern/kern_descrip.c projects/clang360-import/sys/kern/kern_malloc.c projects/clang360-import/sys/kern/kern_proc.c projects/clang360-import/sys/kern/kern_sysctl.c projects/clang360-import/sys/kern/subr_sbuf.c projects/clang360-import/sys/sys/sbuf.h projects/clang360-import/sys/vm/uma_core.c projects/clang360-import/usr.sbin/bhyve/pci_ahci.c Directory Properties: projects/clang360-import/ (props changed) projects/clang360-import/sbin/ (props changed) projects/clang360-import/share/ (props changed) projects/clang360-import/sys/ (props changed) projects/clang360-import/sys/conf/ (props changed) projects/clang360-import/usr.sbin/bhyve/ (props changed) Modified: projects/clang360-import/sbin/restore/dirs.c ============================================================================== --- projects/clang360-import/sbin/restore/dirs.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sbin/restore/dirs.c Sat Mar 14 17:25:17 2015 (r279995) @@ -80,8 +80,8 @@ static struct inotab *inotab[HASHSIZE]; */ struct modeinfo { ino_t ino; - struct timeval ctimep[2]; - struct timeval mtimep[2]; + struct timespec ctimep[2]; + struct timespec mtimep[2]; mode_t mode; uid_t uid; gid_t gid; @@ -656,8 +656,8 @@ setdirmodes(int flags) else (void) chown(cp, node.uid, node.gid); (void) chmod(cp, node.mode); - utimes(cp, node.ctimep); - utimes(cp, node.mtimep); + utimensat(AT_FDCWD, cp, node.ctimep, 0); + utimensat(AT_FDCWD, cp, node.mtimep, 0); (void) chflags(cp, node.flags); } ep->e_flags &= ~NEW; @@ -746,13 +746,13 @@ allocinotab(struct context *ctxp, long s return (itp); node.ino = ctxp->ino; node.mtimep[0].tv_sec = ctxp->atime_sec; - node.mtimep[0].tv_usec = ctxp->atime_nsec / 1000; + node.mtimep[0].tv_nsec = ctxp->atime_nsec; node.mtimep[1].tv_sec = ctxp->mtime_sec; - node.mtimep[1].tv_usec = ctxp->mtime_nsec / 1000; + node.mtimep[1].tv_nsec = ctxp->mtime_nsec; node.ctimep[0].tv_sec = ctxp->atime_sec; - node.ctimep[0].tv_usec = ctxp->atime_nsec / 1000; + node.ctimep[0].tv_nsec = ctxp->atime_nsec; node.ctimep[1].tv_sec = ctxp->birthtime_sec; - node.ctimep[1].tv_usec = ctxp->birthtime_nsec / 1000; + node.ctimep[1].tv_nsec = ctxp->birthtime_nsec; node.extsize = ctxp->extsize; node.mode = ctxp->mode; node.flags = ctxp->file_flags; Modified: projects/clang360-import/sbin/restore/tape.c ============================================================================== --- projects/clang360-import/sbin/restore/tape.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sbin/restore/tape.c Sat Mar 14 17:25:17 2015 (r279995) @@ -569,20 +569,20 @@ extractfile(char *name) gid_t gid; mode_t mode; int extsize; - struct timeval mtimep[2], ctimep[2]; + struct timespec mtimep[2], ctimep[2]; struct entry *ep; char *buf; curfile.name = name; curfile.action = USING; mtimep[0].tv_sec = curfile.atime_sec; - mtimep[0].tv_usec = curfile.atime_nsec / 1000; + mtimep[0].tv_nsec = curfile.atime_nsec; mtimep[1].tv_sec = curfile.mtime_sec; - mtimep[1].tv_usec = curfile.mtime_nsec / 1000; + mtimep[1].tv_nsec = curfile.mtime_nsec; ctimep[0].tv_sec = curfile.atime_sec; - ctimep[0].tv_usec = curfile.atime_nsec / 1000; + ctimep[0].tv_nsec = curfile.atime_nsec; ctimep[1].tv_sec = curfile.birthtime_sec; - ctimep[1].tv_usec = curfile.birthtime_nsec / 1000; + ctimep[1].tv_nsec = curfile.birthtime_nsec; extsize = curfile.extsize; uid = getuid(); if (uid == 0) @@ -628,8 +628,10 @@ extractfile(char *name) set_extattr_link(name, buf, extsize); (void) lchown(name, uid, gid); (void) lchmod(name, mode); - (void) lutimes(name, ctimep); - (void) lutimes(name, mtimep); + (void) utimensat(AT_FDCWD, name, ctimep, + AT_SYMLINK_NOFOLLOW); + (void) utimensat(AT_FDCWD, name, mtimep, + AT_SYMLINK_NOFOLLOW); (void) lchflags(name, flags); return (GOOD); } @@ -658,8 +660,8 @@ extractfile(char *name) } (void) chown(name, uid, gid); (void) chmod(name, mode); - (void) utimes(name, ctimep); - (void) utimes(name, mtimep); + (void) utimensat(AT_FDCWD, name, ctimep, 0); + (void) utimensat(AT_FDCWD, name, mtimep, 0); (void) chflags(name, flags); return (GOOD); @@ -688,8 +690,8 @@ extractfile(char *name) } (void) chown(name, uid, gid); (void) chmod(name, mode); - (void) utimes(name, ctimep); - (void) utimes(name, mtimep); + (void) utimensat(AT_FDCWD, name, ctimep, 0); + (void) utimensat(AT_FDCWD, name, mtimep, 0); (void) chflags(name, flags); return (GOOD); @@ -714,8 +716,8 @@ extractfile(char *name) set_extattr_fd(ofile, name, buf, extsize); (void) fchown(ofile, uid, gid); (void) fchmod(ofile, mode); - (void) futimes(ofile, ctimep); - (void) futimes(ofile, mtimep); + (void) futimens(ofile, ctimep); + (void) futimens(ofile, mtimep); (void) fchflags(ofile, flags); (void) close(ofile); return (GOOD); Modified: projects/clang360-import/share/man/man9/sbuf.9 ============================================================================== --- projects/clang360-import/share/man/man9/sbuf.9 Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/share/man/man9/sbuf.9 Sat Mar 14 17:25:17 2015 (r279995) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 11, 2013 +.Dd March 14, 2015 .Dt SBUF 9 .Os .Sh NAME @@ -34,6 +34,9 @@ .Nm sbuf_new_auto , .Nm sbuf_new_for_sysctl , .Nm sbuf_clear , +.Nm sbuf_get_flags , +.Nm sbuf_set_flags , +.Nm sbuf_clear_flags , .Nm sbuf_setpos , .Nm sbuf_bcat , .Nm sbuf_bcopyin , @@ -67,6 +70,12 @@ .Ft void .Fn sbuf_clear "struct sbuf *s" .Ft int +.Fn sbuf_get_flags "struct sbuf *s" +.Ft void +.Fn sbuf_set_flags "struct sbuf *s" "int flags" +.Ft void +.Fn sbuf_clear_flags "struct sbuf *s" "int flags" +.Ft int .Fn sbuf_setpos "struct sbuf *s" "int pos" .Ft int .Fn sbuf_bcat "struct sbuf *s" "const void *buf" "size_t len" @@ -159,6 +168,8 @@ Attempting to extend the sbuf beyond thi .It Dv SBUF_AUTOEXTEND This indicates that the storage buffer may be extended as necessary, so long as resources allow, to hold additional data. +.It Dv SBUF_INCLUDENUL +This causes the final nulterm byte to be counted in the length of the data. .El .Pp Note that if @@ -211,6 +222,18 @@ function invalidates the contents of the and resets its position to zero. .Pp The +.Fn sbuf_get_flags +function returns the current user flags. +The +.Fn sbuf_set_flags +and +.Fn sbuf_get_flags +functions set or clear one or more user flags, respectively. +The user flags are described under the +.Fn sbuf_new +function. +.Pp +The .Fn sbuf_setpos function sets the .Fa sbuf Ns 's Modified: projects/clang360-import/sys/conf/files.i386 ============================================================================== --- projects/clang360-import/sys/conf/files.i386 Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/conf/files.i386 Sat Mar 14 17:25:17 2015 (r279995) @@ -118,12 +118,12 @@ crypto/aesni/aeskeys_i386.S optional aes crypto/aesni/aesni.c optional aesni aesni_ghash.o optional aesni \ dependency "$S/crypto/aesni/aesni_ghash.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes -mpclmul ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_ghash.o" aesni_wrap.o optional aesni \ dependency "$S/crypto/aesni/aesni_wrap.c" \ - compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -mmmx -msse -msse4 -maes ${.IMPSRC}" \ no-implicit-rule \ clean "aesni_wrap.o" crypto/des/arch/i386/des_enc.S optional crypto | ipsec | netsmb Modified: projects/clang360-import/sys/dev/cxgb/cxgb_sge.c ============================================================================== --- projects/clang360-import/sys/dev/cxgb/cxgb_sge.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/dev/cxgb/cxgb_sge.c Sat Mar 14 17:25:17 2015 (r279995) @@ -3149,9 +3149,6 @@ t3_dump_rspq(SYSCTL_HANDLER_ARGS) } err = sbuf_finish(sb); - /* Output a trailing NUL. */ - if (err == 0) - err = SYSCTL_OUT(req, "", 1); sbuf_delete(sb); return (err); } @@ -3219,9 +3216,6 @@ t3_dump_txq_eth(SYSCTL_HANDLER_ARGS) } err = sbuf_finish(sb); - /* Output a trailing NUL. */ - if (err == 0) - err = SYSCTL_OUT(req, "", 1); sbuf_delete(sb); return (err); } @@ -3279,9 +3273,6 @@ t3_dump_txq_ctrl(SYSCTL_HANDLER_ARGS) } err = sbuf_finish(sb); - /* Output a trailing NUL. */ - if (err == 0) - err = SYSCTL_OUT(req, "", 1); sbuf_delete(sb); return (err); } Modified: projects/clang360-import/sys/dev/cxgbe/t4_main.c ============================================================================== --- projects/clang360-import/sys/dev/cxgbe/t4_main.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/dev/cxgbe/t4_main.c Sat Mar 14 17:25:17 2015 (r279995) @@ -5083,12 +5083,11 @@ sysctl_int_array(SYSCTL_HANDLER_ARGS) int rc, *i; struct sbuf sb; - sbuf_new(&sb, NULL, 32, SBUF_AUTOEXTEND); + sbuf_new_for_sysctl(&sb, NULL, 64, req); for (i = arg1; arg2; arg2 -= sizeof(int), i++) sbuf_printf(&sb, "%d ", *i); sbuf_trim(&sb); - sbuf_finish(&sb); - rc = sysctl_handle_string(oidp, sbuf_data(&sb), sbuf_len(&sb), req); + rc = sbuf_finish(&sb); sbuf_delete(&sb); return (rc); } Modified: projects/clang360-import/sys/kern/kern_descrip.c ============================================================================== --- projects/clang360-import/sys/kern/kern_descrip.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/kern/kern_descrip.c Sat Mar 14 17:25:17 2015 (r279995) @@ -3296,6 +3296,7 @@ sysctl_kern_proc_filedesc(SYSCTL_HANDLER name = (int *)arg1; sbuf_new_for_sysctl(&sb, NULL, FILEDESC_SBUF_SIZE, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); if (error != 0) { sbuf_delete(&sb); @@ -3490,6 +3491,7 @@ sysctl_kern_proc_cwd(SYSCTL_HANDLER_ARGS name = (int *)arg1; sbuf_new_for_sysctl(&sb, NULL, sizeof(struct kinfo_file), req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); if (error != 0) { sbuf_delete(&sb); Modified: projects/clang360-import/sys/kern/kern_malloc.c ============================================================================== --- projects/clang360-import/sys/kern/kern_malloc.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/kern/kern_malloc.c Sat Mar 14 17:25:17 2015 (r279995) @@ -918,6 +918,7 @@ sysctl_kern_malloc_stats(SYSCTL_HANDLER_ if (error != 0) return (error); sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + sbuf_clear_flags(&sbuf, SBUF_INCLUDENUL); mtx_lock(&malloc_mtx); /* Modified: projects/clang360-import/sys/kern/kern_proc.c ============================================================================== --- projects/clang360-import/sys/kern/kern_proc.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/kern/kern_proc.c Sat Mar 14 17:25:17 2015 (r279995) @@ -1273,6 +1273,7 @@ sysctl_out_proc(struct proc *p, struct s pid = p->p_pid; sbuf_new_for_sysctl(&sb, (char *)&ki, sizeof(ki), req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = kern_proc_out(p, &sb, flags); error2 = sbuf_finish(&sb); sbuf_delete(&sb); @@ -1934,6 +1935,7 @@ sysctl_kern_proc_auxv(SYSCTL_HANDLER_ARG return (0); } sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = proc_getauxv(curthread, p, &sb); error2 = sbuf_finish(&sb); PRELE(p); @@ -2421,6 +2423,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR name = (int *)arg1; sbuf_new_for_sysctl(&sb, NULL, sizeof(struct kinfo_vmentry), req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = pget((pid_t)name[0], PGET_CANDEBUG | PGET_NOTWEXIT, &p); if (error != 0) { sbuf_delete(&sb); Modified: projects/clang360-import/sys/kern/kern_sysctl.c ============================================================================== --- projects/clang360-import/sys/kern/kern_sysctl.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/kern/kern_sysctl.c Sat Mar 14 17:25:17 2015 (r279995) @@ -1807,7 +1807,7 @@ sbuf_new_for_sysctl(struct sbuf *s, char struct sysctl_req *req) { - s = sbuf_new(s, buf, length, SBUF_FIXEDLEN); + s = sbuf_new(s, buf, length, SBUF_FIXEDLEN | SBUF_INCLUDENUL); sbuf_set_drain(s, sbuf_sysctl_drain, req); return (s); } Modified: projects/clang360-import/sys/kern/subr_sbuf.c ============================================================================== --- projects/clang360-import/sys/kern/subr_sbuf.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/kern/subr_sbuf.c Sat Mar 14 17:25:17 2015 (r279995) @@ -262,6 +262,28 @@ sbuf_uionew(struct sbuf *s, struct uio * } #endif +int +sbuf_get_flags(struct sbuf *s) +{ + + return (s->s_flags & SBUF_USRFLAGMSK); +} + +void +sbuf_clear_flags(struct sbuf *s, int flags) +{ + + s->s_flags &= ~(flags & SBUF_USRFLAGMSK); +} + +void +sbuf_set_flags(struct sbuf *s, int flags) +{ + + + s->s_flags |= (flags & SBUF_USRFLAGMSK); +} + /* * Clear an sbuf and reset its position. */ @@ -697,11 +719,13 @@ sbuf_finish(struct sbuf *s) assert_sbuf_integrity(s); assert_sbuf_state(s, 0); + s->s_buf[s->s_len] = '\0'; + if (s->s_flags & SBUF_INCLUDENUL) + s->s_len++; if (s->s_drain_func != NULL) { while (s->s_len > 0 && s->s_error == 0) s->s_error = sbuf_drain(s); } - s->s_buf[s->s_len] = '\0'; SBUF_SETFLAG(s, SBUF_FINISHED); #ifdef _KERNEL return (s->s_error); @@ -743,6 +767,10 @@ sbuf_len(struct sbuf *s) if (s->s_error != 0) return (-1); + + /* If finished, nulterm is already in len, else add one. */ + if ((s->s_flags & (SBUF_INCLUDENUL | SBUF_FINISHED)) == SBUF_INCLUDENUL) + return (s->s_len + 1); return (s->s_len); } Modified: projects/clang360-import/sys/sys/sbuf.h ============================================================================== --- projects/clang360-import/sys/sys/sbuf.h Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/sys/sbuf.h Sat Mar 14 17:25:17 2015 (r279995) @@ -48,6 +48,7 @@ struct sbuf { ssize_t s_len; /* current length of string */ #define SBUF_FIXEDLEN 0x00000000 /* fixed length buffer (default) */ #define SBUF_AUTOEXTEND 0x00000001 /* automatically extend buffer */ +#define SBUF_INCLUDENUL 0x00000002 /* nulterm byte is counted in len */ #define SBUF_USRFLAGMSK 0x0000ffff /* mask of flags the user may specify */ #define SBUF_DYNAMIC 0x00010000 /* s_buf must be freed */ #define SBUF_FINISHED 0x00020000 /* set by sbuf_finish() */ @@ -64,6 +65,9 @@ __BEGIN_DECLS struct sbuf *sbuf_new(struct sbuf *, char *, int, int); #define sbuf_new_auto() \ sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND) +int sbuf_get_flags(struct sbuf *); +void sbuf_clear_flags(struct sbuf *, int); +void sbuf_set_flags(struct sbuf *, int); void sbuf_clear(struct sbuf *); int sbuf_setpos(struct sbuf *, ssize_t); int sbuf_bcat(struct sbuf *, const void *, size_t); Modified: projects/clang360-import/sys/vm/uma_core.c ============================================================================== --- projects/clang360-import/sys/vm/uma_core.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/sys/vm/uma_core.c Sat Mar 14 17:25:17 2015 (r279995) @@ -3451,6 +3451,7 @@ sysctl_vm_zone_stats(SYSCTL_HANDLER_ARGS if (error != 0) return (error); sbuf_new_for_sysctl(&sbuf, NULL, 128, req); + sbuf_clear_flags(&sbuf, SBUF_INCLUDENUL); count = 0; rw_rlock(&uma_rwlock); Modified: projects/clang360-import/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- projects/clang360-import/usr.sbin/bhyve/pci_ahci.c Sat Mar 14 17:19:48 2015 (r279994) +++ projects/clang360-import/usr.sbin/bhyve/pci_ahci.c Sat Mar 14 17:25:17 2015 (r279995) @@ -794,6 +794,17 @@ write_prdt(struct ahci_port *p, int slot } static void +ahci_checksum(uint8_t *buf, int size) +{ + int i; + uint8_t sum = 0; + + for (i = 0; i < size - 1; i++) + sum += buf[i]; + buf[size - 1] = 0x100 - sum; +} + +static void ahci_handle_read_log(struct ahci_port *p, int slot, uint8_t *cfis) { struct ahci_cmd_hdr *hdr; @@ -809,6 +820,7 @@ ahci_handle_read_log(struct ahci_port *p memset(buf, 0, sizeof(buf)); memcpy(buf, p->err_cfis, sizeof(p->err_cfis)); + ahci_checksum(buf, sizeof(buf)); if (cfis[2] == ATA_READ_LOG_EXT) ahci_write_fis_piosetup(p); @@ -914,6 +926,8 @@ handle_identify(struct ahci_port *p, int buf[119] = (ATA_SUPPORT_RWLOGDMAEXT | 1 << 14); buf[120] = (ATA_SUPPORT_RWLOGDMAEXT | 1 << 14); buf[222] = 0x1020; + buf[255] = 0x00a5; + ahci_checksum((uint8_t *)buf, sizeof(buf)); ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); @@ -962,6 +976,8 @@ handle_atapi_identify(struct ahci_port * if (p->xfermode & ATA_UDMA0) buf[88] |= (1 << ((p->xfermode & 7) + 8)); buf[222] = 0x1020; + buf[255] = 0x00a5; + ahci_checksum((uint8_t *)buf, sizeof(buf)); ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); From owner-svn-src-projects@FreeBSD.ORG Sat Mar 14 18:38:08 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A75EF3E1; Sat, 14 Mar 2015 18:38:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 928931A8; Sat, 14 Mar 2015 18:38:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2EIc8v6017550; Sat, 14 Mar 2015 18:38:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2EIc86n017549; Sat, 14 Mar 2015 18:38:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503141838.t2EIc86n017549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Mar 2015 18:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r279998 - projects/clang360-import/contrib/compiler-rt/lib/builtins 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.18-1 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, 14 Mar 2015 18:38:08 -0000 Author: dim Date: Sat Mar 14 18:38:07 2015 New Revision: 279998 URL: https://svnweb.freebsd.org/changeset/base/279998 Log: For now, disable the __clear_cache implementation for mips in compiler-rt, since we do not yet have the required syscall. Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/clear_cache.c Modified: projects/clang360-import/contrib/compiler-rt/lib/builtins/clear_cache.c ============================================================================== --- projects/clang360-import/contrib/compiler-rt/lib/builtins/clear_cache.c Sat Mar 14 18:11:24 2015 (r279997) +++ projects/clang360-import/contrib/compiler-rt/lib/builtins/clear_cache.c Sat Mar 14 18:38:07 2015 (r279998) @@ -22,7 +22,7 @@ #include #endif -#if defined(__mips__) +#if defined(__mips__) && !defined(__FreeBSD__) #include #include #if defined(__ANDROID__) && defined(__LP64__) @@ -109,7 +109,7 @@ void __clear_cache(void *start, void *en #else compilerrt_abort(); #endif -#elif defined(__mips__) +#elif defined(__mips__) && !defined(__FreeBSD__) const uintptr_t start_int = (uintptr_t) start; const uintptr_t end_int = (uintptr_t) end; #if defined(__ANDROID__) && defined(__LP64__) From owner-svn-src-projects@FreeBSD.ORG Sat Mar 14 19:22:21 2015 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0CD1B2C; Sat, 14 Mar 2015 19:22:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C25B57ED; Sat, 14 Mar 2015 19:22:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2EJMK8w040526; Sat, 14 Mar 2015 19:22:20 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2EJMGxR040494; Sat, 14 Mar 2015 19:22:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503141922.t2EJMGxR040494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Mar 2015 19:22:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r280001 - in projects/clang360-import/usr.bin/clang: bugpoint clang llc lli llvm-ar llvm-as llvm-bcanalyzer llvm-diff llvm-dis llvm-extract llvm-link llvm-nm llvm-symbolizer opt tblgen 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.18-1 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, 14 Mar 2015 19:22:21 -0000 Author: dim Date: Sat Mar 14 19:22:15 2015 New Revision: 280001 URL: https://svnweb.freebsd.org/changeset/base/280001 Log: Regenerated llvm/clang manpages. Modified: projects/clang360-import/usr.bin/clang/bugpoint/bugpoint.1 projects/clang360-import/usr.bin/clang/clang/clang.1 projects/clang360-import/usr.bin/clang/llc/llc.1 projects/clang360-import/usr.bin/clang/lli/lli.1 projects/clang360-import/usr.bin/clang/llvm-ar/llvm-ar.1 projects/clang360-import/usr.bin/clang/llvm-as/llvm-as.1 projects/clang360-import/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 projects/clang360-import/usr.bin/clang/llvm-diff/llvm-diff.1 projects/clang360-import/usr.bin/clang/llvm-dis/llvm-dis.1 projects/clang360-import/usr.bin/clang/llvm-extract/llvm-extract.1 projects/clang360-import/usr.bin/clang/llvm-link/llvm-link.1 projects/clang360-import/usr.bin/clang/llvm-nm/llvm-nm.1 projects/clang360-import/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 projects/clang360-import/usr.bin/clang/opt/opt.1 projects/clang360-import/usr.bin/clang/tblgen/tblgen.1 Modified: projects/clang360-import/usr.bin/clang/bugpoint/bugpoint.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/bugpoint/bugpoint.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/bugpoint/bugpoint.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "BUGPOINT" "1" "2015-01-10" "3.5" "LLVM" +.TH "BUGPOINT" "1" "2015-03-14" "3.6" "LLVM" .SH NAME bugpoint \- automatic test case reduction tool . Modified: projects/clang360-import/usr.bin/clang/clang/clang.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/clang/clang.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/clang/clang.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd November 18, 2013 +.Dd February 25, 2015 .Dt CLANG 1 .Os .Sh NAME @@ -175,7 +175,7 @@ a number of cross compilers, or may only .It Sy -arch Em architecture Specify the architecture to build for. .It Sy -mmacosx-version-min Ns = Ns Em version -When building for Mac OS/X, specify the minimum version supported by your +When building for Mac OS X, specify the minimum version supported by your application. .It Sy -miphoneos-version-min When building for iPhone OS, specify the minimum version supported by your @@ -230,8 +230,22 @@ Currently equivalent to .It Sy -g Generate debug information. Note that Clang debug information works best at .Sy -O0 . -At higher optimization levels, only line number information is -currently available. +.It Sy -fstandalone-debug Sy -fno-standalone-debug +Clang supports a number of optimizations to reduce the size of debug +information in the binary. They work based on the assumption that the +debug type information can be spread out over multiple compilation +units. For instance, Clang will not emit type definitions for types +that are not needed by a module and could be replaced with a forward +declaration. Further, Clang will only emit type info for a dynamic +C++ class in the module that contains the vtable for the class. +.Pp +The +.Sy -fstandalone-debug +option turns off these optimizations. This +is useful when working with 3rd-party libraries that don't come with +debug information. This is the default on Darwin. Note that Clang +will never emit type information for types that are not referenced at +all by the program. .It Sy -fexceptions Enable generation of unwind information, this allows exceptions to be thrown through Clang compiled stack frames. This is on by default in x86-64. @@ -262,7 +276,7 @@ to the linker depending on the stage sel .Ss Driver Options .Bl -tag -width Ds .It Sy -### -Print the commands to run for this compilation. +Print (but do not run) the commands to run for this compilation. .It Sy --help Display available options. .It Sy -Qunused-arguments Modified: projects/clang360-import/usr.bin/clang/llc/llc.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llc/llc.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llc/llc.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLC" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLC" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llc \- LLVM static compiler . Modified: projects/clang360-import/usr.bin/clang/lli/lli.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/lli/lli.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/lli/lli.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLI" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLI" "1" "2015-03-14" "3.6" "LLVM" .SH NAME lli \- directly execute programs from LLVM bitcode . Modified: projects/clang360-import/usr.bin/clang/llvm-ar/llvm-ar.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-ar/llvm-ar.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-ar/llvm-ar.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-AR" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-AR" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-ar \- LLVM archiver . Modified: projects/clang360-import/usr.bin/clang/llvm-as/llvm-as.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-as/llvm-as.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-as/llvm-as.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-AS" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-AS" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-as \- LLVM assembler . Modified: projects/clang360-import/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-bcanalyzer/llvm-bcanalyzer.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-BCANALYZER" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-BCANALYZER" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-bcanalyzer \- LLVM bitcode analyzer . Modified: projects/clang360-import/usr.bin/clang/llvm-diff/llvm-diff.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-diff/llvm-diff.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-diff/llvm-diff.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-DIFF" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-DIFF" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-diff \- LLVM structural 'diff' . Modified: projects/clang360-import/usr.bin/clang/llvm-dis/llvm-dis.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-dis/llvm-dis.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-dis/llvm-dis.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-DIS" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-DIS" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-dis \- LLVM disassembler . Modified: projects/clang360-import/usr.bin/clang/llvm-extract/llvm-extract.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-extract/llvm-extract.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-extract/llvm-extract.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-EXTRACT" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-EXTRACT" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-extract \- extract a function from an LLVM module . Modified: projects/clang360-import/usr.bin/clang/llvm-link/llvm-link.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-link/llvm-link.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-link/llvm-link.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-LINK" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-LINK" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-link \- LLVM bitcode linker . Modified: projects/clang360-import/usr.bin/clang/llvm-nm/llvm-nm.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-nm/llvm-nm.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-nm/llvm-nm.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-NM" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-NM" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-nm \- list LLVM bitcode and object file's symbol table . Modified: projects/clang360-import/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/llvm-symbolizer/llvm-symbolizer.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "LLVM-SYMBOLIZER" "1" "2015-01-10" "3.5" "LLVM" +.TH "LLVM-SYMBOLIZER" "1" "2015-03-14" "3.6" "LLVM" .SH NAME llvm-symbolizer \- convert addresses into source code locations . @@ -126,6 +126,13 @@ You can also specify architecture by wri input (see example above). If architecture is not specified in either way, address will not be symbolized. Defaults to empty string. .UNINDENT +.INDENT 0.0 +.TP +.B \-dsym\-hint= +(Darwin\-only flag). If the debug info for a binary isn\(aqt present in the default +location, look for the debug info at the .dSYM path provided via the +\fB\-dsym\-hint\fP flag. This flag can be used multiple times. +.UNINDENT .SH EXIT STATUS .sp \fBllvm\-symbolizer\fP returns 0. Other exit codes imply internal program error. Modified: projects/clang360-import/usr.bin/clang/opt/opt.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/opt/opt.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/opt/opt.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "OPT" "1" "2015-01-10" "3.5" "LLVM" +.TH "OPT" "1" "2015-03-14" "3.6" "LLVM" .SH NAME opt \- LLVM optimizer . @@ -93,34 +93,14 @@ order in which they are executed (within .UNINDENT .INDENT 0.0 .TP -.B \-std\-compile\-opts -This is short hand for a standard list of \fIcompile time optimization\fP passes. -It might be useful for other front end compilers as well. To discover the -full set of options available, use the following command: -.INDENT 7.0 -.INDENT 3.5 -.sp -.nf -.ft C -llvm\-as < /dev/null | opt \-std\-compile\-opts \-disable\-output \-debug\-pass=Arguments -.ft P -.fi -.UNINDENT -.UNINDENT -.UNINDENT -.INDENT 0.0 -.TP .B \-disable\-inlining -This option is only meaningful when \fI\%\-std\-compile\-opts\fP is given. It -simply removes the inlining pass from the standard list. +This option simply removes the inlining pass from the standard list. .UNINDENT .INDENT 0.0 .TP .B \-disable\-opt -This option is only meaningful when \fI\%\-std\-compile\-opts\fP is given. It -disables most, but not all, of the \fI\%\-std\-compile\-opts\fP\&. The ones that -remain are \fI\-verify\fP, \fI\-lower\-setjmp\fP, and -\fI\-funcresolve\fP\&. +This option is only meaningful when \fI\-std\-link\-opts\fP is given. It +disables most passes. .UNINDENT .INDENT 0.0 .TP @@ -135,9 +115,7 @@ but it ensures that stripping of debug i This option causes opt to add a verify pass after every pass otherwise specified on the command line (including \fI\-verify\fP). This is useful for cases where it is suspected that a pass is creating an invalid module but -it is not clear which pass is doing it. The combination of -\fI\%\-std\-compile\-opts\fP and \fI\%\-verify\-each\fP can quickly track down -this kind of problem. +it is not clear which pass is doing it. .UNINDENT .INDENT 0.0 .TP Modified: projects/clang360-import/usr.bin/clang/tblgen/tblgen.1 ============================================================================== --- projects/clang360-import/usr.bin/clang/tblgen/tblgen.1 Sat Mar 14 18:46:33 2015 (r280000) +++ projects/clang360-import/usr.bin/clang/tblgen/tblgen.1 Sat Mar 14 19:22:15 2015 (r280001) @@ -1,7 +1,7 @@ .\" $FreeBSD$ .\" Man page generated from reStructuredText. . -.TH "TBLGEN" "1" "2015-01-10" "3.5" "LLVM" +.TH "TBLGEN" "1" "2015-03-14" "3.6" "LLVM" .SH NAME tblgen \- Target Description To C++ Code Generator .