From owner-svn-src-stable@freebsd.org Sun Jun 18 11:46:18 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E273DD8F143; Sun, 18 Jun 2017 11:46:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B18F868BB3; Sun, 18 Jun 2017 11:46:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IBkHq1017392; Sun, 18 Jun 2017 11:46:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IBkHJI017391; Sun, 18 Jun 2017 11:46:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181146.v5IBkHJI017391@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 11:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320066 - stable/11/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 11:46:19 -0000 Author: hselasky Date: Sun Jun 18 11:46:17 2017 New Revision: 320066 URL: https://svnweb.freebsd.org/changeset/base/320066 Log: MFC r319972: Use static device numbering instead of dynamic one when creating mlx4en network interfaces. This prevents infinite unit number growth typically when the mlx4en driver is used inside virtual machines which support runtime PCI attach and detach. Approved by: re (gjb) Sponsored by: Mellanox Technologies Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 00:08:38 2017 (r320065) +++ stable/11/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:46:17 2017 (r320066) @@ -54,7 +54,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv); -static int mlx4_en_unit; #ifdef CONFIG_NET_RX_BUSY_POLL /* must be called with local_bh_disable()d */ @@ -2052,7 +2051,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int return -ENOMEM; } dev->if_softc = priv; - if_initname(dev, "mlxen", atomic_fetchadd_int(&mlx4_en_unit, 1)); + if_initname(dev, "mlxen", (device_get_unit( + mdev->pdev->dev.bsddev) * MLX4_MAX_PORTS) + port - 1); dev->if_mtu = ETHERMTU; dev->if_init = mlx4_en_open; dev->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; From owner-svn-src-stable@freebsd.org Sun Jun 18 11:48:41 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1DC7D8F29B; Sun, 18 Jun 2017 11:48:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0C0F68DDD; Sun, 18 Jun 2017 11:48:41 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IBmev0017528; Sun, 18 Jun 2017 11:48:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IBmeWI017527; Sun, 18 Jun 2017 11:48:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181148.v5IBmeWI017527@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 11:48:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320067 - stable/10/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 11:48:42 -0000 Author: hselasky Date: Sun Jun 18 11:48:40 2017 New Revision: 320067 URL: https://svnweb.freebsd.org/changeset/base/320067 Log: MFC r319972: Use static device numbering instead of dynamic one when creating mlx4en network interfaces. This prevents infinite unit number growth typically when the mlx4en driver is used inside virtual machines which support runtime PCI attach and detach. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:46:17 2017 (r320066) +++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:48:40 2017 (r320067) @@ -54,7 +54,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv); -static int mlx4_en_unit; #ifdef CONFIG_NET_RX_BUSY_POLL /* must be called with local_bh_disable()d */ @@ -2053,7 +2052,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int return -ENOMEM; } dev->if_softc = priv; - if_initname(dev, "mlxen", atomic_fetchadd_int(&mlx4_en_unit, 1)); + if_initname(dev, "mlxen", (device_get_unit( + mdev->pdev->dev.bsddev) * MLX4_MAX_PORTS) + port - 1); dev->if_mtu = ETHERMTU; dev->if_init = mlx4_en_open; dev->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; From owner-svn-src-stable@freebsd.org Sun Jun 18 11:50:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4512BD8F356; Sun, 18 Jun 2017 11:50:10 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 121CF68F6A; Sun, 18 Jun 2017 11:50:09 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IBo9b4017664; Sun, 18 Jun 2017 11:50:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IBo9WT017663; Sun, 18 Jun 2017 11:50:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181150.v5IBo9WT017663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 11:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r320068 - stable/9/sys/ofed/drivers/net/mlx4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 11:50:10 -0000 Author: hselasky Date: Sun Jun 18 11:50:09 2017 New Revision: 320068 URL: https://svnweb.freebsd.org/changeset/base/320068 Log: MFC r319972: Use static device numbering instead of dynamic one when creating mlx4en network interfaces. This prevents infinite unit number growth typically when the mlx4en driver is used inside virtual machines which support runtime PCI attach and detach. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:48:40 2017 (r320067) +++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c Sun Jun 18 11:50:09 2017 (r320068) @@ -54,7 +54,6 @@ static void mlx4_en_sysctl_stat(struct mlx4_en_priv *priv); static void mlx4_en_sysctl_conf(struct mlx4_en_priv *priv); -static int mlx4_en_unit; #ifdef CONFIG_NET_RX_BUSY_POLL /* must be called with local_bh_disable()d */ @@ -2055,7 +2054,8 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int return -ENOMEM; } dev->if_softc = priv; - if_initname(dev, "mlxen", atomic_fetchadd_int(&mlx4_en_unit, 1)); + if_initname(dev, "mlxen", (device_get_unit( + mdev->pdev->dev.bsddev) * MLX4_MAX_PORTS) + port - 1); dev->if_mtu = ETHERMTU; dev->if_init = mlx4_en_open; dev->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST; From owner-svn-src-stable@freebsd.org Sun Jun 18 17:20:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CABB4D8A601; Sun, 18 Jun 2017 17:20:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86F37759BE; Sun, 18 Jun 2017 17:20:49 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5IHKmAB053020; Sun, 18 Jun 2017 17:20:48 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5IHKm8i053018; Sun, 18 Jun 2017 17:20:48 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201706181720.v5IHKm8i053018@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 18 Jun 2017 17:20:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320073 - stable/11/sys/contrib/octeon-sdk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 17:20:49 -0000 Author: jhibbits Date: Sun Jun 18 17:20:48 2017 New Revision: 320073 URL: https://svnweb.freebsd.org/changeset/base/320073 Log: MFC r317928 Add necessary bits to get FreeBSD booting on the Unifi Security Gateway Summary: The Ubiquiti Unifi Security Gateway is virtually identical to the EdgeRouter Lite, with a smaller PCB and apparently a different board identifier. Simply adding the new board identifier alongside the ERL identifier, FreeBSD boots successfully, and can access the needed peripherals. Approved by: re(bdrewery) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h ============================================================================== --- stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h Sun Jun 18 16:43:57 2017 (r320072) +++ stable/11/sys/contrib/octeon-sdk/cvmx-app-init.h Sun Jun 18 17:20:48 2017 (r320073) @@ -311,6 +311,7 @@ enum cvmx_board_types_enum { #endif #if defined(OCTEON_VENDOR_UBIQUITI) CVMX_BOARD_TYPE_CUST_UBIQUITI_E100=20002, + CVMX_BOARD_TYPE_CUST_UBIQUITI_USG= 20004, #endif #if defined(OCTEON_VENDOR_RADISYS) CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE=20002, @@ -457,6 +458,7 @@ static inline const char *cvmx_board_type_to_string(en #endif #if defined(OCTEON_VENDOR_UBIQUITI) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) #endif #if defined(OCTEON_VENDOR_RADISYS) ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) Modified: stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun Jun 18 16:43:57 2017 (r320072) +++ stable/11/sys/contrib/octeon-sdk/cvmx-helper-board.c Sun Jun 18 17:20:48 2017 (r320073) @@ -598,6 +598,7 @@ int cvmx_helper_board_get_mii_address(int ipd_port) #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: if (ipd_port > 2) return -1; return (7 - ipd_port); @@ -1499,7 +1500,8 @@ int __cvmx_helper_board_hardware_enable(int interface) } } #if defined(OCTEON_VENDOR_UBIQUITI) - else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100) + else if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_E100 || + cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_UBIQUITI_USG) { /* Configure ASX cloks for all ports on interface 0. */ if (interface == 0) @@ -1590,6 +1592,7 @@ cvmx_helper_board_usb_clock_types_t __cvmx_helper_boar #endif #if defined(OCTEON_VENDOR_UBIQUITI) case CVMX_BOARD_TYPE_CUST_UBIQUITI_E100: + case CVMX_BOARD_TYPE_CUST_UBIQUITI_USG: #endif #if defined(OCTEON_BOARD_CAPK_0100ND) case CVMX_BOARD_TYPE_CN3010_EVB_HS5: From owner-svn-src-stable@freebsd.org Sun Jun 18 18:09:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7496AD8AF00; Sun, 18 Jun 2017 18:09:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4110B77205; Sun, 18 Jun 2017 18:09:32 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5II9VuH074933; Sun, 18 Jun 2017 18:09:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5II9VSD074932; Sun, 18 Jun 2017 18:09:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201706181809.v5II9VSD074932@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jun 2017 18:09:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320075 - stable/11/sys/fs/cuse X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 18:09:32 -0000 Author: hselasky Date: Sun Jun 18 18:09:31 2017 New Revision: 320075 URL: https://svnweb.freebsd.org/changeset/base/320075 Log: MFC r319355: Minor code optimisation. Avoid locking the global CUSE lock when the polling flags are zero. Approved by: re (kib) Modified: stable/11/sys/fs/cuse/cuse.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/fs/cuse/cuse.c ============================================================================== --- stable/11/sys/fs/cuse/cuse.c Sun Jun 18 17:26:54 2017 (r320074) +++ stable/11/sys/fs/cuse/cuse.c Sun Jun 18 18:09:31 2017 (r320075) @@ -1507,8 +1507,8 @@ cuse_client_kqfilter_poll(struct cdev *dev, struct cus /* get the latest polling state from the server */ temp = cuse_client_poll(dev, POLLIN | POLLOUT, NULL); - cuse_lock(); if (temp & (POLLIN | POLLOUT)) { + cuse_lock(); if (temp & POLLIN) pcc->cflags |= CUSE_CLI_KNOTE_NEED_READ; if (temp & POLLOUT) @@ -1516,8 +1516,8 @@ cuse_client_kqfilter_poll(struct cdev *dev, struct cus /* make sure the "knote" gets woken up */ cuse_server_wakeup_locked(pcc->server); + cuse_unlock(); } - cuse_unlock(); } } From owner-svn-src-stable@freebsd.org Sun Jun 18 21:46:55 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B08B4D8F0EC; Sun, 18 Jun 2017 21:46:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74A4C7DACC; Sun, 18 Jun 2017 21:46:55 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ILks37065711; Sun, 18 Jun 2017 21:46:54 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ILks7Z065710; Sun, 18 Jun 2017 21:46:54 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706182146.v5ILks7Z065710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 18 Jun 2017 21:46:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320084 - stable/11/usr.bin/patch X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:46:55 -0000 Author: pfg Date: Sun Jun 18 21:46:54 2017 New Revision: 320084 URL: https://svnweb.freebsd.org/changeset/base/320084 Log: MFC r319676: patch: if reading fails, do not go into infinite loop asking for a filename. This can happen if no tty is available. Obtained from: OpenBSD (CVS rev 1.54) Approved by: re (marius) Modified: stable/11/usr.bin/patch/pch.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/patch/pch.c ============================================================================== --- stable/11/usr.bin/patch/pch.c Sun Jun 18 21:03:53 2017 (r320083) +++ stable/11/usr.bin/patch/pch.c Sun Jun 18 21:46:54 2017 (r320084) @@ -216,8 +216,10 @@ there_is_another_patch(void) filearg[0] = fetchname(buf, &exists, 0); } if (!exists) { - ask("No file found--skip this patch? [n] "); - if (*buf != 'y') + int def_skip = *bestguess == '\0'; + ask("No file found--skip this patch? [%c] ", + def_skip ? 'y' : 'n'); + if (*buf == 'n' || (!def_skip && *buf != 'y')) continue; if (verbose) say("Skipping patch...\n"); From owner-svn-src-stable@freebsd.org Sun Jun 18 21:48:34 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38B9DD8F1BA; Sun, 18 Jun 2017 21:48:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08AEB7DC0A; Sun, 18 Jun 2017 21:48:33 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ILmXgG065865; Sun, 18 Jun 2017 21:48:33 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ILmXJ5065864; Sun, 18 Jun 2017 21:48:33 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201706182148.v5ILmXJ5065864@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 18 Jun 2017 21:48:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320086 - stable/10/usr.bin/patch X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2017 21:48:34 -0000 Author: pfg Date: Sun Jun 18 21:48:33 2017 New Revision: 320086 URL: https://svnweb.freebsd.org/changeset/base/320086 Log: MFC r319676: patch: if reading fails, do not go into infinite loop asking for a filename. This can happen if no tty is available. Obtained from: OpenBSD (CVS rev 1.54) Modified: stable/10/usr.bin/patch/pch.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/patch/pch.c ============================================================================== --- stable/10/usr.bin/patch/pch.c Sun Jun 18 21:48:31 2017 (r320085) +++ stable/10/usr.bin/patch/pch.c Sun Jun 18 21:48:33 2017 (r320086) @@ -216,8 +216,10 @@ there_is_another_patch(void) filearg[0] = fetchname(buf, &exists, 0); } if (!exists) { - ask("No file found--skip this patch? [n] "); - if (*buf != 'y') + int def_skip = *bestguess == '\0'; + ask("No file found--skip this patch? [%c] ", + def_skip ? 'y' : 'n'); + if (*buf == 'n' || (!def_skip && *buf != 'y')) continue; if (verbose) say("Skipping patch...\n"); From owner-svn-src-stable@freebsd.org Mon Jun 19 03:07:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 737A9D93A02; Mon, 19 Jun 2017 03:07:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DD48788; Mon, 19 Jun 2017 03:07:01 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5J370gZ095805; Mon, 19 Jun 2017 03:07:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J370fi095802; Mon, 19 Jun 2017 03:07:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201706190307.v5J370fi095802@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 19 Jun 2017 03:07:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320088 - in stable/11/usr.sbin/bsdinstall: partedit scripts X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 03:07:01 -0000 Author: emaste Date: Mon Jun 19 03:07:00 2017 New Revision: 320088 URL: https://svnweb.freebsd.org/changeset/base/320088 Log: bsdinstall: use consistent EFI configuration across platforms MFC r320007: - increase arm64 EFI partition to 200M, as x86 - use EFI_BOOTPART_SIZE and EFI_BOOTPART_PATH macros on x86 - increase ZFS EFI partition to 200M MFC r320008: bsdinstall: correct comment after r320007 PR: 201898 Approved by: re (kib) Relnotes: Yes Sponsored by: The FreeBSD Foundation Modified: stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c stable/11/usr.sbin/bsdinstall/scripts/zfsboot Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c Sun Jun 18 21:53:17 2017 (r320087) +++ stable/11/usr.sbin/bsdinstall/partedit/partedit_arm64.c Mon Jun 19 03:07:00 2017 (r320088) @@ -34,8 +34,8 @@ #include "partedit.h" -/* EFI partition size in KB */ -#define EFI_BOOTPART_SIZE (50 * 1024) +/* EFI partition size in bytes */ +#define EFI_BOOTPART_SIZE (200 * 1024 * 1024) #define EFI_BOOTPART_PATH "/boot/boot1.efifat" const char * @@ -73,7 +73,7 @@ bootpart_size(const char *scheme) if (strcmp(scheme, "GPT") != 0) return (0); - return ((EFI_BOOTPART_SIZE) * 1024); + return (EFI_BOOTPART_SIZE); } const char * Modified: stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c ============================================================================== --- stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c Sun Jun 18 21:53:17 2017 (r320087) +++ stable/11/usr.sbin/bsdinstall/partedit/partedit_x86.c Mon Jun 19 03:07:00 2017 (r320088) @@ -32,6 +32,10 @@ #include "partedit.h" +/* EFI partition size in bytes */ +#define EFI_BOOTPART_SIZE (200 * 1024 * 1024) +#define EFI_BOOTPART_PATH "/boot/boot1.efifat" + static const char * x86_bootmethod(void) { @@ -99,7 +103,7 @@ bootpart_size(const char *scheme) if (strcmp(x86_bootmethod(), "BIOS") == 0) return (512*1024); else - return (200*1024*1024); + return (EFI_BOOTPART_SIZE); return (0); } @@ -137,7 +141,7 @@ partcode_path(const char *part_type, const char *fs_ty if (strcmp(part_type, "GPT") == 0) { if (strcmp(x86_bootmethod(), "UEFI") == 0) - return ("/boot/boot1.efifat"); + return (EFI_BOOTPART_PATH); else if (strcmp(fs_type, "zfs") == 0) return ("/boot/gptzfsboot"); else Modified: stable/11/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- stable/11/usr.sbin/bsdinstall/scripts/zfsboot Sun Jun 18 21:53:17 2017 (r320087) +++ stable/11/usr.sbin/bsdinstall/scripts/zfsboot Mon Jun 19 03:07:00 2017 (r320088) @@ -848,7 +848,7 @@ zfs_create_diskpart() f_eval_catch $funcname gpart \ "$GPART_ADD_ALIGN_LABEL_WITH_SIZE" \ - "$align_small" efiboot$index efi 800k $disk || + "$align_small" efiboot$index efi 200M $disk || return $FAILURE f_eval_catch $funcname gpart "$GPART_BOOTCODE_PARTONLY" \ /boot/boot1.efifat 1 $disk || From owner-svn-src-stable@freebsd.org Mon Jun 19 05:01:52 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DC47FD957AC; Mon, 19 Jun 2017 05:01:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA75F3CB1; Mon, 19 Jun 2017 05:01:52 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5J51psQ042555; Mon, 19 Jun 2017 05:01:51 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J51p8n042554; Mon, 19 Jun 2017 05:01:51 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706190501.v5J51p8n042554@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 19 Jun 2017 05:01:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320089 - stable/11/contrib/ipfilter/man X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 05:01:53 -0000 Author: cy Date: Mon Jun 19 05:01:51 2017 New Revision: 320089 URL: https://svnweb.freebsd.org/changeset/base/320089 Log: MFC r319962: Correct example directory location. Submitted by: olivier@ Approved by: re@ (kib@) Modified: stable/11/contrib/ipfilter/man/ipf.5 Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/ipfilter/man/ipf.5 ============================================================================== --- stable/11/contrib/ipfilter/man/ipf.5 Mon Jun 19 03:07:00 2017 (r320088) +++ stable/11/contrib/ipfilter/man/ipf.5 Mon Jun 19 05:01:51 2017 (r320089) @@ -1693,6 +1693,6 @@ environment. /dev/ipf /etc/ipf.conf .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipf(8), ipfstat(8), ippool.conf(5), ippool(8) From owner-svn-src-stable@freebsd.org Mon Jun 19 05:02:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9805DD95807; Mon, 19 Jun 2017 05:02:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 666F23E96; Mon, 19 Jun 2017 05:02:28 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5J52RHF045787; Mon, 19 Jun 2017 05:02:27 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J52RRC045786; Mon, 19 Jun 2017 05:02:27 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201706190502.v5J52RRC045786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 19 Jun 2017 05:02:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320090 - stable/10/contrib/ipfilter/man X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 05:02:28 -0000 Author: cy Date: Mon Jun 19 05:02:27 2017 New Revision: 320090 URL: https://svnweb.freebsd.org/changeset/base/320090 Log: MFC r319962: Correct example directory location. Submitted by: olivier@ Modified: stable/10/contrib/ipfilter/man/ipf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ipfilter/man/ipf.5 ============================================================================== --- stable/10/contrib/ipfilter/man/ipf.5 Mon Jun 19 05:01:51 2017 (r320089) +++ stable/10/contrib/ipfilter/man/ipf.5 Mon Jun 19 05:02:27 2017 (r320090) @@ -1693,6 +1693,6 @@ environment. /dev/ipf /etc/ipf.conf .br -/usr/share/examples/ipf Directory with examples. +/usr/share/examples/ipfilter Directory with examples. .SH SEE ALSO ipf(8), ipfstat(8), ippool.conf(5), ippool(8) From owner-svn-src-stable@freebsd.org Mon Jun 19 06:48:23 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0647BD970AD; Mon, 19 Jun 2017 06:48:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C874C66644; Mon, 19 Jun 2017 06:48:22 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5J6mLGa086848; Mon, 19 Jun 2017 06:48:21 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J6mLVK086847; Mon, 19 Jun 2017 06:48:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706190648.v5J6mLVK086847@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jun 2017 06:48:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320092 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 06:48:23 -0000 Author: kib Date: Mon Jun 19 06:48:21 2017 New Revision: 320092 URL: https://svnweb.freebsd.org/changeset/base/320092 Log: MFC r320034: Start a new sentence on the new line. Approved by: re (delphij) Modified: stable/11/lib/libc/sys/kqueue.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/kqueue.2 ============================================================================== --- stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 06:30:04 2017 (r320091) +++ stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 06:48:21 2017 (r320092) @@ -544,7 +544,8 @@ is in nanoseconds. .Pp If .Va fflags -is not set, the default is milliseconds. On return, +is not set, the default is milliseconds. +On return, .Va fflags contains the events which triggered the filter. .It Dv EVFILT_USER From owner-svn-src-stable@freebsd.org Mon Jun 19 07:15:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 997E6D976D1; Mon, 19 Jun 2017 07:15:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63FFD671DA; Mon, 19 Jun 2017 07:15:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5J7FlpQ098906; Mon, 19 Jun 2017 07:15:47 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5J7Flke098905; Mon, 19 Jun 2017 07:15:47 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706190715.v5J7Flke098905@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jun 2017 07:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320094 - stable/11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 07:15:48 -0000 Author: kib Date: Mon Jun 19 07:15:47 2017 New Revision: 320094 URL: https://svnweb.freebsd.org/changeset/base/320094 Log: MFC r320035: Move the description of kern.kq_calloutmax sysctl into a new paragraph for better presentation. Approved by: re (delphij) Modified: stable/11/lib/libc/sys/kqueue.2 Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/sys/kqueue.2 ============================================================================== --- stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 07:02:52 2017 (r320093) +++ stable/11/lib/libc/sys/kqueue.2 Mon Jun 19 07:15:47 2017 (r320094) @@ -523,10 +523,6 @@ On return, contains the number of times the timeout has expired since the last call to .Fn kevent . This filter automatically sets the EV_CLEAR flag internally. -There is a system wide limit on the number of timers -which is controlled by the -.Va kern.kq_calloutmax -sysctl. .Bl -tag -width "Dv NOTE_USECONDS" .It Dv NOTE_SECONDS .Va data @@ -548,6 +544,11 @@ is not set, the default is milliseconds. On return, .Va fflags contains the events which triggered the filter. +.Pp +There is a system wide limit on the number of timers +which is controlled by the +.Va kern.kq_calloutmax +sysctl. .It Dv EVFILT_USER Establishes a user event identified by .Va ident From owner-svn-src-stable@freebsd.org Mon Jun 19 13:25:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBB80D9CE46; Mon, 19 Jun 2017 13:25:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A905974863; Mon, 19 Jun 2017 13:25:48 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JDPlUH050077; Mon, 19 Jun 2017 13:25:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JDPl9A050076; Mon, 19 Jun 2017 13:25:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706191325.v5JDPl9A050076@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Jun 2017 13:25:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320096 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 13:25:49 -0000 Author: gjb Date: Mon Jun 19 13:25:47 2017 New Revision: 320096 URL: https://svnweb.freebsd.org/changeset/base/320096 Log: Document r320088, default EFI partition size change. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 12:33:22 2017 (r320095) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 13:25:47 2017 (r320096) @@ -837,6 +837,11 @@ EFI loader has been updated to support TFTPFS, providing netboot support without requiring an NFS server. + + The + default EFI partition created by + &man.bsdinstall.8; has been increased from 800kb to + 200Mb. From owner-svn-src-stable@freebsd.org Mon Jun 19 13:26:40 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D04ED9CEB2; Mon, 19 Jun 2017 13:26:40 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEE7D74997; Mon, 19 Jun 2017 13:26:39 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JDQdhK050153; Mon, 19 Jun 2017 13:26:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JDQd7p050152; Mon, 19 Jun 2017 13:26:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706191326.v5JDQd7p050152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Jun 2017 13:26:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320097 - stable/11/sys/x86/x86 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 13:26:40 -0000 Author: gjb Date: Mon Jun 19 13:26:38 2017 New Revision: 320097 URL: https://svnweb.freebsd.org/changeset/base/320097 Log: MFC r319942 (jhb): Don't try to assign interrupts to a CPU on single-CPU systems. All interrupts are routed to the sole CPU in that case implicitly. This is a regression in EARLY_AP_STARTUP. Previously the 'assign_cpu' variable was only set when a multi-CPU system finished booting, so its value both meant that interrupts could be assigned and that there was more than one CPU. PR: 219882 Approved by: re (kib) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/x86/x86/intr_machdep.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/x86/x86/intr_machdep.c ============================================================================== --- stable/11/sys/x86/x86/intr_machdep.c Mon Jun 19 13:25:47 2017 (r320096) +++ stable/11/sys/x86/x86/intr_machdep.c Mon Jun 19 13:26:38 2017 (r320097) @@ -315,7 +315,9 @@ intr_assign_cpu(void *arg, int cpu) #ifdef EARLY_AP_STARTUP MPASS(mp_ncpus == 1 || smp_started); - if (cpu != NOCPU) { + + /* Nothing to do if there is only a single CPU. */ + if (mp_ncpus > 1 && cpu != NOCPU) { #else /* * Don't do anything during early boot. We will pick up the @@ -503,6 +505,8 @@ intr_next_cpu(void) #ifdef EARLY_AP_STARTUP MPASS(mp_ncpus == 1 || smp_started); + if (mp_ncpus == 1) + return (PCPU_GET(apic_id)); #else /* Leave all interrupts on the BSP during boot. */ if (!assign_cpu) From owner-svn-src-stable@freebsd.org Mon Jun 19 14:30:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F167D9DAFC; Mon, 19 Jun 2017 14:30:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41D5776267; Mon, 19 Jun 2017 14:30:02 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JEU1EO075212; Mon, 19 Jun 2017 14:30:01 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JEU1k7075210; Mon, 19 Jun 2017 14:30:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706191430.v5JEU1k7075210@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 19 Jun 2017 14:30:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320098 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 14:30:02 -0000 Author: gjb Date: Mon Jun 19 14:30:01 2017 New Revision: 320098 URL: https://svnweb.freebsd.org/changeset/base/320098 Log: Fix units in the r320088 entry. [1] While here, move to a more appropriate section. Submitted by: rpokala [1] Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 13:26:38 2017 (r320097) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jun 19 14:30:01 2017 (r320098) @@ -373,6 +373,11 @@ The installer, &man.bsdinstall.8;, has been updated to include support for hidden wireless networks when configuring the &man.wlan.4; interface. + + The + default EFI partition created by + &man.bsdinstall.8; has been increased from 800KB to + 200MB. @@ -837,11 +842,6 @@ EFI loader has been updated to support TFTPFS, providing netboot support without requiring an NFS server. - - The - default EFI partition created by - &man.bsdinstall.8; has been increased from 800kb to - 200Mb. From owner-svn-src-stable@freebsd.org Mon Jun 19 14:45:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70B96D9E02C; Mon, 19 Jun 2017 14:45:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4092376BA2; Mon, 19 Jun 2017 14:45:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JEjKVS082983; Mon, 19 Jun 2017 14:45:20 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JEjKHE082982; Mon, 19 Jun 2017 14:45:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191445.v5JEjKHE082982@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 14:45:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320099 - stable/11/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 14:45:21 -0000 Author: avg Date: Mon Jun 19 14:45:20 2017 New Revision: 320099 URL: https://svnweb.freebsd.org/changeset/base/320099 Log: MFC r318867: fix vmxnet3 crash when LRO is enabled The crash can occur when all of the following conditions are true: - a packet consists of multiple segments (requires LRO enabled) - there has been a failure to allocate an mbuf for the packet and the packet has to be dropped - a host (vmware) still owned at least one segment of the packet, so the driver had to wait for another interrupt to proceed to discarding the remaining segment(s) Reviewed by: rstone Approved by: re (gjb) Sponsored by: Panzura Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 14:30:01 2017 (r320098) +++ stable/11/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 14:45:20 2017 (r320099) @@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue *rxq) } else { KASSERT(rxd->btype == VMXNET3_BTYPE_BODY, ("%s: non start of frame w/o body buffer", __func__)); + + if (m_head == NULL && m_tail == NULL) { + /* + * This is a continuation of a packet that we + * started to drop, but could not drop entirely + * because this segment was still owned by the + * host. So, drop the remainder now. + */ + vmxnet3_rxq_eof_discard(rxq, rxr, idx); + if (!rxcd->eop) + vmxnet3_rxq_discard_chain(rxq); + goto nextp; + } + KASSERT(m_head != NULL, ("%s: frame not started?", __func__)); From owner-svn-src-stable@freebsd.org Mon Jun 19 14:50:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36A85D9E3A9; Mon, 19 Jun 2017 14:50:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02D4376E3E; Mon, 19 Jun 2017 14:50:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JEoRhM083210; Mon, 19 Jun 2017 14:50:27 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JEoQb2083206; Mon, 19 Jun 2017 14:50:26 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191450.v5JEoQb2083206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 14:50:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320100 - in stable/10/sys: dev/hwpmc sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 14:50:28 -0000 Author: avg Date: Mon Jun 19 14:50:26 2017 New Revision: 320100 URL: https://svnweb.freebsd.org/changeset/base/320100 Log: MFC 281102: hwpmc: add initial Intel Broadwell support. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 14:50:26 2017 (r320100) @@ -578,7 +578,8 @@ struct iap_event_descr { #define IAP_F_HW (1 << 10) /* CPU: Haswell */ #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ #define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ -#define IAP_F_FM (1 << 13) /* Fixed mask */ +#define IAP_F_BW (1 << 13) /* CPU: Broadwell */ +#define IAP_F_FM (1 << 14) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -2063,6 +2064,7 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, if (iap_event_corei7_ok_on_counter(ev, ri) == 0) return (EINVAL); break; + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_SANDYBRIDGE_XEON: case PMC_CPU_INTEL_IVYBRIDGE: @@ -2094,6 +2096,9 @@ iap_allocate_pmc(int cpu, int ri, struct pmc *pm, break; case PMC_CPU_INTEL_ATOM_SILVERMONT: cpuflag = IAP_F_CAS; + break; + case PMC_CPU_INTEL_BROADWELL: + cpuflag = IAP_F_BW; break; case PMC_CPU_INTEL_CORE: cpuflag = IAP_F_CC; Modified: stable/10/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/dev/hwpmc/hwpmc_intel.c Mon Jun 19 14:50:26 2017 (r320100) @@ -179,6 +179,10 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_IVYBRIDGE_XEON; nclasses = 3; break; + case 0x3D: + cputype = PMC_CPU_INTEL_BROADWELL; + nclasses = 3; + break; case 0x3F: /* Per Intel document 325462-045US 09/2014. */ case 0x46: /* Per Intel document 325462-045US 09/2014. */ /* Should 46 be XEON. probably its own? */ @@ -227,6 +231,7 @@ pmc_intel_initialize(void) */ case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -295,6 +300,7 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_WESTMERE: + case PMC_CPU_INTEL_BROADWELL: error = pmc_uncore_initialize(pmc_mdep, ncpus); break; default: @@ -319,6 +325,7 @@ pmc_intel_finalize(struct pmc_mdep *md) #if defined(__i386__) || defined(__amd64__) case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -360,6 +367,7 @@ pmc_intel_finalize(struct pmc_mdep *md) */ #if defined(__i386__) || defined(__amd64__) switch (md->pmd_cputype) { + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_COREI7: case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 14:50:26 2017 (r320100) @@ -1540,6 +1540,11 @@ __PMC_EV_ALIAS("BACLEARS.RETURN", IAP_EVENT_E6H_0 __PMC_EV_ALIAS("BACLEARS.COND", IAP_EVENT_E6H_10H) \ __PMC_EV_ALIAS("MS_DECODED.MS_ENTRY", IAP_EVENT_E7H_01H) +/* + * Aliases for Broadwell PMC events. + */ +#define __PMC_EV_ALIAS_BROADWELL() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() /* * Aliases for Core PMC events. @@ -4231,6 +4236,11 @@ __PMC_EV(UCP, EVENT_86H_01H) #define PMC_EV_UCP_FIRST PMC_EV_UCP_EVENT_00H_01H #define PMC_EV_UCP_LAST PMC_EV_UCP_EVENT_86H_01H + +/* + * Aliases for Broadwell uncore PMC events + */ +#define __PMC_EV_ALIAS_BROADWELLUC() #define __PMC_EV_ALIAS_COREI7UC() \ __PMC_EV_ALIAS("GQ_CYCLES_FULL.READ_TRACKER", UCP_EVENT_00H_01H) \ Modified: stable/10/sys/sys/pmc.h ============================================================================== --- stable/10/sys/sys/pmc.h Mon Jun 19 14:45:20 2017 (r320099) +++ stable/10/sys/sys/pmc.h Mon Jun 19 14:50:26 2017 (r320100) @@ -95,6 +95,7 @@ __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ From owner-svn-src-stable@freebsd.org Mon Jun 19 15:00:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57580D9E6D9; Mon, 19 Jun 2017 15:00:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2EF1F772F9; Mon, 19 Jun 2017 15:00:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JF07Xb087519; Mon, 19 Jun 2017 15:00:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF0663087516; Mon, 19 Jun 2017 15:00:06 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191500.v5JF0663087516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:00:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320101 - in stable/10/sys: dev/hwpmc sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:00:08 -0000 Author: avg Date: Mon Jun 19 15:00:06 2017 New Revision: 320101 URL: https://svnweb.freebsd.org/changeset/base/320101 Log: MFC r277524: style(9) cleanup in hwpmc Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 14:50:26 2017 (r320100) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:00:06 2017 (r320101) @@ -685,7 +685,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), @@ -715,9 +716,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -831,7 +835,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX), IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -972,7 +977,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | + IAP_F_HWX), IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), @@ -1013,10 +1019,14 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1119,9 +1129,9 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), - IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(7BH, 0x7B, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1372,7 +1382,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_CAS), IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_CAS), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | + IAP_F_HWX), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 14:50:26 2017 (r320100) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:00:06 2017 (r320101) @@ -2739,7 +2739,7 @@ __PMC_EV_ALIAS("PAGE_WALKER_LOADS.ITLB_MEMORY", IAP_EV __PMC_EV_ALIAS("TLB_FLUSH.DTLB_THREAD", IAP_EVENT_BDH_01H) \ __PMC_EV_ALIAS("TLB_FLUSH.STLB_ANY", IAP_EVENT_BDH_20H) \ __PMC_EV_ALIAS("INST_RETIRED.ANY_P", IAP_EVENT_C0H_00H) \ -__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ +__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.AVX_TO_SSE", IAP_EVENT_C1H_08H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.SSE_TO_AVX", IAP_EVENT_C1H_10H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.ANY_WB_ASSIST", IAP_EVENT_C1H_40H) \ @@ -2968,7 +2968,7 @@ __PMC_EV_ALIAS("PAGE_WALKER_LOADS.ITLB_MEMORY", IAP_EV __PMC_EV_ALIAS("TLB_FLUSH.DTLB_THREAD", IAP_EVENT_BDH_01H) \ __PMC_EV_ALIAS("TLB_FLUSH.STLB_ANY", IAP_EVENT_BDH_20H) \ __PMC_EV_ALIAS("INST_RETIRED.ANY_P", IAP_EVENT_C0H_00H) \ -__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ +__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.AVX_TO_SSE", IAP_EVENT_C1H_08H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.SSE_TO_AVX", IAP_EVENT_C1H_10H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.ANY_WB_ASSIST", IAP_EVENT_C1H_40H) \ Modified: stable/10/sys/sys/pmc.h ============================================================================== --- stable/10/sys/sys/pmc.h Mon Jun 19 14:50:26 2017 (r320100) +++ stable/10/sys/sys/pmc.h Mon Jun 19 15:00:06 2017 (r320101) @@ -94,7 +94,7 @@ __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ - __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ __PMC_CPU(INTEL_BROADWELL, 0x96, "Intel Broadwell") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ From owner-svn-src-stable@freebsd.org Mon Jun 19 15:03:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3297DD9E855; Mon, 19 Jun 2017 15:03:49 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC436776D9; Mon, 19 Jun 2017 15:03:48 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JF3mVS091179; Mon, 19 Jun 2017 15:03:48 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF3lNp091178; Mon, 19 Jun 2017 15:03:47 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201706191503.v5JF3lNp091178@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 19 Jun 2017 15:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320102 - stable/11/sys/dev/e1000 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:03:49 -0000 Author: sbruno Date: Mon Jun 19 15:03:47 2017 New Revision: 320102 URL: https://svnweb.freebsd.org/changeset/base/320102 Log: Direct commit to stable/11 to correctly setting the EIAC and IMS registers to the same values when processing interrupts. This reverts a change made in r286831 that was not fully reverted in r311979 This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219 PR: 211219 Submitted by: Franco Fitchner Approved by: re (marius) Modified: stable/11/sys/dev/e1000/if_em.c Modified: stable/11/sys/dev/e1000/if_em.c ============================================================================== --- stable/11/sys/dev/e1000/if_em.c Mon Jun 19 15:00:06 2017 (r320101) +++ stable/11/sys/dev/e1000/if_em.c Mon Jun 19 15:03:47 2017 (r320102) @@ -5115,7 +5115,7 @@ em_enable_intr(struct adapter *adapter) if (hw->mac.type == e1000_82574) { E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); - ims_mask |= adapter->ims; + ims_mask |= EM_MSIX_MASK; } E1000_WRITE_REG(hw, E1000_IMS, ims_mask); } From owner-svn-src-stable@freebsd.org Mon Jun 19 15:04:40 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1AB3D9E909; Mon, 19 Jun 2017 15:04:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD5E3778C7; Mon, 19 Jun 2017 15:04:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JF4dbB091262; Mon, 19 Jun 2017 15:04:39 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF4dgq091261; Mon, 19 Jun 2017 15:04:39 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191504.v5JF4dgq091261@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:04:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320103 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:04:41 -0000 Author: avg Date: Mon Jun 19 15:04:39 2017 New Revision: 320103 URL: https://svnweb.freebsd.org/changeset/base/320103 Log: MFC r279830: Fix various bugs in Haswell counter definitions Modified: stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:03:47 2017 (r320102) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:04:39 2017 (r320103) @@ -2590,7 +2590,7 @@ __PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05 __PMC_EV_ALIAS("LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", IAP_EVENT_07H_01H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H)\ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_4K", IAP_EVENT_08H_02H) \ -__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K", \ +__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M", \ IAP_EVENT_08H_04H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_0EH) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_DURATION", IAP_EVENT_08H_10H) \ @@ -2646,8 +2646,8 @@ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED", IAP_EVENT_58H_08H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.INT_ELIMINATED", IAP_EVENT_58H_01H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_ELIMINATED", IAP_EVENT_58H_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_02H) \ __PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD", \ IAP_EVENT_60H_01H) \ @@ -2819,7 +2819,7 @@ __PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05 __PMC_EV_ALIAS("LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", IAP_EVENT_07H_01H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H)\ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_4K", IAP_EVENT_08H_02H) \ -__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K", \ +__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M", \ IAP_EVENT_08H_04H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_0EH) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_DURATION", IAP_EVENT_08H_10H) \ @@ -2875,8 +2875,8 @@ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED", IAP_EVENT_58H_08H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.INT_ELIMINATED", IAP_EVENT_58H_01H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_ELIMINATED", IAP_EVENT_58H_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_02H) \ __PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H) \ __PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD", \ IAP_EVENT_60H_01H) \ From owner-svn-src-stable@freebsd.org Mon Jun 19 15:06:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86F34D9E9FA; Mon, 19 Jun 2017 15:06:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 552B877B3D; Mon, 19 Jun 2017 15:06:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JF6b0E091545; Mon, 19 Jun 2017 15:06:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF6bBf091544; Mon, 19 Jun 2017 15:06:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191506.v5JF6bBf091544@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320104 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:06:38 -0000 Author: avg Date: Mon Jun 19 15:06:37 2017 New Revision: 320104 URL: https://svnweb.freebsd.org/changeset/base/320104 Log: MFC r279831: Fix pmc unit restrictions to match documentation Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:04:39 2017 (r320103) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:06:37 2017 (r320104) @@ -1974,15 +1974,15 @@ iap_event_sb_sbx_ib_ibx_ok_on_counter(enum pmc_event p break; /* Events valid only on counter 1. */ case PMC_EV_IAP_EVENT_C0H_01H: - mask = 0x1; + mask = 0x2; break; /* Events valid only on counter 2. */ case PMC_EV_IAP_EVENT_48H_01H: case PMC_EV_IAP_EVENT_A2H_02H: + case PMC_EV_IAP_EVENT_A3H_08H: mask = 0x4; break; /* Events valid only on counter 3. */ - case PMC_EV_IAP_EVENT_A3H_08H: case PMC_EV_IAP_EVENT_BBH_01H: case PMC_EV_IAP_EVENT_CDH_01H: case PMC_EV_IAP_EVENT_CDH_02H: From owner-svn-src-stable@freebsd.org Mon Jun 19 15:09:38 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0009D9EA80; Mon, 19 Jun 2017 15:09:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A0E477C9A; Mon, 19 Jun 2017 15:09:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JF9bRj091705; Mon, 19 Jun 2017 15:09:37 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JF9bIB091703; Mon, 19 Jun 2017 15:09:37 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191509.v5JF9bIB091703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:09:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320105 - stable/10/lib/libpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:09:38 -0000 Author: avg Date: Mon Jun 19 15:09:37 2017 New Revision: 320105 URL: https://svnweb.freebsd.org/changeset/base/320105 Log: MFC r279829: Add manpage for Haswell Xeon pmc implementation Added: stable/10/lib/libpmc/pmc.haswellxeon.3 - copied unchanged from r279829, head/lib/libpmc/pmc.haswellxeon.3 Modified: stable/10/lib/libpmc/pmc.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/pmc.3 ============================================================================== --- stable/10/lib/libpmc/pmc.3 Mon Jun 19 15:06:37 2017 (r320104) +++ stable/10/lib/libpmc/pmc.3 Mon Jun 19 15:09:37 2017 (r320105) @@ -525,6 +525,7 @@ API is .Xr pmc.atom 3 , .Xr pmc.core 3 , .Xr pmc.core2 3 , +.Xr pmc.haswellxeon 3 , .Xr pmc.iaf 3 , .Xr pmc.k7 3 , .Xr pmc.k8 3 , Copied: stable/10/lib/libpmc/pmc.haswellxeon.3 (from r279829, head/lib/libpmc/pmc.haswellxeon.3) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:09:37 2017 (r320105, copy of r279829, head/lib/libpmc/pmc.haswellxeon.3) @@ -0,0 +1,975 @@ +.\" +.\" 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 +The number of PMCs available in each class and their widths need to be +determined at run time by calling +.Xr pmc_cpuinfo 3 . +.Pp +Intel Haswell Xeon PMCs are documented in +.Rs +.%B "Intel(R) 64 and IA-32 Architectures Software Developer's Manual" +.%T "Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B and 3C" +.%N "Order Number: 325462-052US" +.%D September 2014 +.%Q "Intel Corporation" +.Re +.Ss HASWELL FIXED FUNCTION PMCS +These PMCs and their supported events are documented in +.Xr pmc.iaf 3 . +.Ss HASWELL PROGRAMMABLE PMCS +The programmable PMCs support the following capabilities: +.Bl -column "PMC_CAP_INTERRUPT" "Support" +.It Em Capability Ta Em Support +.It PMC_CAP_CASCADE Ta \&No +.It PMC_CAP_EDGE Ta Yes +.It PMC_CAP_INTERRUPT Ta Yes +.It PMC_CAP_INVERT Ta Yes +.It PMC_CAP_READ Ta Yes +.It PMC_CAP_PRECISE Ta \&No +.It PMC_CAP_SYSTEM Ta Yes +.It PMC_CAP_TAGGING Ta \&No +.It PMC_CAP_THRESHOLD Ta Yes +.It PMC_CAP_USER Ta Yes +.It PMC_CAP_WRITE Ta Yes +.El +.Ss Event Qualifiers +Event specifiers for these PMCs support the following common +qualifiers: +.Bl -tag -width indent +.It Li rsp= Ns Ar value +Configure the Off-core Response bits. +.Bl -tag -width indent +.It Li DMND_DATA_RD +Counts the number of demand and DCU prefetch data reads of full +and partial cachelines as well as demand data page table entry +cacheline reads. Does not count L2 data read prefetches or +instruction fetches. +.It Li REQ_DMND_RFO +Counts the number of demand and DCU prefetch reads for ownership (RFO) +requests generated by a write to data cacheline. Does not count L2 RFO +prefetches. +.It Li REQ_DMND_IFETCH +Counts the number of demand and DCU prefetch instruction cacheline reads. +Does not count L2 code read prefetches. +.It Li REQ_WB +Counts the number of writeback (modified to exclusive) transactions. +.It Li REQ_PF_DATA_RD +Counts the number of data cacheline reads generated by L2 prefetchers. +.It Li REQ_PF_RFO +Counts the number of RFO requests generated by L2 prefetchers. +.It Li REQ_PF_IFETCH +Counts the number of code reads generated by L2 prefetchers. +.It Li REQ_PF_LLC_DATA_RD +L2 prefetcher to L3 for loads. +.It Li REQ_PF_LLC_RFO +RFO requests generated by L2 prefetcher +.It Li REQ_PF_LLC_IFETCH +L2 prefetcher to L3 for instruction fetches. +.It Li REQ_BUS_LOCKS +Bus lock and split lock requests. +.It Li REQ_STRM_ST +Streaming store requests. +.It Li REQ_OTHER +Any other request that crosses IDI, including I/O. +.It Li RES_ANY +Catch all value for any response types. +.It Li RES_SUPPLIER_NO_SUPP +No Supplier Information available. +.It Li RES_SUPPLIER_LLC_HITM +M-state initial lookup stat in L3. +.It Li RES_SUPPLIER_LLC_HITE +E-state. +.It Li RES_SUPPLIER_LLC_HITS +S-state. +.It Li RES_SUPPLIER_LLC_HITF +F-state. +.It Li RES_SUPPLIER_LOCAL +Local DRAM Controller. +.It Li RES_SNOOP_SNP_NONE +No details on snoop-related information. +.It Li RES_SNOOP_SNP_NO_NEEDED +No snoop was needed to satisfy the request. +.It Li RES_SNOOP_SNP_MISS +A snoop was needed and it missed all snooped caches: +-For LLC Hit, ReslHitl was returned by all cores +-For LLC Miss, Rspl was returned by all sockets and data was returned from +DRAM. +.It Li RES_SNOOP_HIT_NO_FWD +A snoop was needed and it hits in at least one snooped cache. Hit denotes a +cache-line was valid before snoop effect. This includes: +-Snoop Hit w/ Invalidation (LLC Hit, RFO) +-Snoop Hit, Left Shared (LLC Hit/Miss, IFetch/Data_RD) +-Snoop Hit w/ Invalidation and No Forward (LLC Miss, RFO Hit S) +In the LLC Miss case, data is returned from DRAM. +.It Li RES_SNOOP_HIT_FWD +A snoop was needed and data was forwarded from a remote socket. +This includes: +-Snoop Forward Clean, Left Shared (LLC Hit/Miss, IFetch/Data_RD/RFT). +.It Li RES_SNOOP_HITM +A snoop was needed and it HitM-ed in local or remote cache. HitM denotes a +cache-line was in modified state before effect as a results of snoop. This +includes: +-Snoop HitM w/ WB (LLC miss, IFetch/Data_RD) +-Snoop Forward Modified w/ Invalidation (LLC Hit/Miss, RFO) +-Snoop MtoS (LLC Hit, IFetch/Data_RD). +.It Li RES_NON_DRAM +Target was non-DRAM system address. This includes MMIO transactions. +.El +.It Li cmask= Ns Ar value +Configure the PMC to increment only if the number of configured +events measured in a cycle is greater than or equal to +.Ar value . +.It Li edge +Configure the PMC to count the number of de-asserted to asserted +transitions of the conditions expressed by the other qualifiers. +If specified, the counter will increment only once whenever a +condition becomes true, irrespective of the number of clocks during +which the condition remains true. +.It Li inv +Invert the sense of comparison when the +.Dq Li cmask +qualifier is present, making the counter increment when the number of +events per cycle is less than the value specified by the +.Dq Li cmask +qualifier. +.It Li os +Configure the PMC to count events happening at processor privilege +level 0. +.It Li usr +Configure the PMC to count events occurring at privilege levels 1, 2 +or 3. +.El +.Pp +If neither of the +.Dq Li os +or +.Dq Li usr +qualifiers are specified, the default is to enable both. +.Ss Event Specifiers (Programmable PMCs) +Haswell programmable PMCs support the following events: +.Bl -tag -width indent +.It Li LD_BLOCKS.STORE_FORWARD +.Pq Event 03H , Umask 02H +Loads blocked by overlapping with store buffer that +cannot be forwarded. +.It Li MISALIGN_MEM_REF.LOADS +.Pq Event 05H , Umask 01H +Speculative cache-line split load uops dispatched to +L1D. +.It Li MISALIGN_MEM_REF.STORES +.Pq Event 05H , Umask 02H +Speculative cache-line split Store-address uops +dispatched to L1D. +.It Li LD_BLOCKS_PARTIAL.ADDRESS_ALIAS +.Pq Event 07H , Umask 01H +False dependencies in MOB due to partial compare +on address. +.It Li DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK +.Pq Event 08H , Umask 01H +Misses in all TLB levels that cause a page walk of any +page size. +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED_4K +.Pq Event 08H , Umask 02H +Completed page walks due to demand load misses +that caused 4K page walks in any TLB levels. +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K +.Pq Event 08H , Umask 02H +Completed page walks due to demand load misses +that caused 2M/4M page walks in any TLB levels. +.It Li DTLB_LOAD_MISSES.WALK_COMPLETED +.Pq Event 08H , Umask 0EH +Completed page walks in any TLB of any page size +due to demand load misses +.It Li DTLB_LOAD_MISSES.WALK_DURATION +.Pq Event 08H , Umask 10H +Cycle PMH is busy with a walk. +.It Li DTLB_LOAD_MISSES.STLB_HIT_4K +.Pq Event 08H , Umask 20H +Load misses that missed DTLB but hit STLB (4K). +.It Li DTLB_LOAD_MISSES.STLB_HIT_2M +.Pq Event 08H , Umask 40H +Load misses that missed DTLB but hit STLB (2M). +.It Li DTLB_LOAD_MISSES.STLB_HIT +.Pq Event 08H , Umask 60H +Number of cache load STLB hits. No page walk. +.It Li DTLB_LOAD_MISSES.PDE_CACHE_MISS +.Pq Event 08H , Umask 80H +DTLB demand load misses with low part of linear-to- +physical address translation missed +.It Li INT_MISC.RECOVERY_CYCLES +.Pq Event 0DH , Umask 03H +Cycles waiting to recover after Machine Clears +except JEClear. Set Cmask= 1. +.It Li UOPS_ISSUED.ANY +.Pq Event 0EH , Umask 01H +ncrements each cycle the # of Uops issued by the +RAT to RS. +Set Cmask = 1, Inv = 1, Any= 1to count stalled cycles +of this core. +.It Li UOPS_ISSUED.FLAGS_MERGE +.Pq Event 0EH , Umask 10H +Number of flags-merge uops allocated. Such uops +adds delay. +.It Li UOPS_ISSUED.SLOW_LEA +.Pq Event 0EH , Umask 20H +Number of slow LEA or similar uops allocated. Such +uop has 3 sources (e.g. 2 sources + immediate) +regardless if as a result of LEA instruction or not. +.It Li UOPS_ISSUED.SiNGLE_MUL +.Pq Event 0EH , Umask 40H +Number of multiply packed/scalar single precision +uops allocated. +.It Li L2_RQSTS.DEMAND_DATA_RD_MISS +.Pq Event 24H , Umask 21H +Demand Data Read requests that missed L2, no +rejects. +.It Li L2_RQSTS.DEMAND_DATA_RD_HIT +.Pq Event 24H , Umask 41H +Demand Data Read requests that hit L2 cache. +.It Li L2_RQSTS.ALL_DEMAND_DATA_RD +.Pq Event 24H , Umask E1H +Counts any demand and L1 HW prefetch data load +requests to L2. +.It Li L2_RQSTS.RFO_HIT +.Pq Event 24H , Umask 42H +Counts the number of store RFO requests that hit +the L2 cache. +.It Li L2_RQSTS.RFO_MISS +.Pq Event 24H , Umask 22H +Counts the number of store RFO requests that miss +the L2 cache. +.It Li L2_RQSTS.ALL_RFO +.Pq Event 24H , Umask E2H +Counts all L2 store RFO requests. +.It Li L2_RQSTS.CODE_RD_HIT +.Pq Event 24H , Umask 44H +Number of instruction fetches that hit the L2 cache. +.It Li L2_RQSTS.CODE_RD_MISS +.Pq Event 24H , Umask 24H +Number of instruction fetches that missed the L2 +cache. +.It Li L2_RQSTS.ALL_DEMAND_MISS +.Pq Event 24H , Umask 27H +Demand requests that miss L2 cache. +.It Li L2_RQSTS.ALL_DEMAND_REFERENCES +.Pq Event 24H , Umask E7H +Demand requests to L2 cache. +.It Li L2_RQSTS.ALL_CODE_RD +.Pq Event 24H , Umask E4H +Counts all L2 code requests. +.It Li L2_RQSTS.L2_PF_HIT +.Pq Event 24H , Umask 50H +Counts all L2 HW prefetcher requests that hit L2. +.It Li L2_RQSTS.L2_PF_MISS +.Pq Event 24H , Umask 30H +Counts all L2 HW prefetcher requests that missed +L2. +.It Li L2_RQSTS.ALL_PF +.Pq Event 24H , Umask F8H +Counts all L2 HW prefetcher requests. +.It Li L2_RQSTS.MISS +.Pq Event 24H , Umask 3FH +All requests that missed L2. +.It Li L2_RQSTS.REFERENCES +.Pq Event 24H , Umask FFH +All requests to L2 cache. +.It Li L2_DEMAND_RQSTS.WB_HIT +.Pq Event 27H , Umask 50H +Not rejected writebacks that hit L2 cache +.It Li LONGEST_LAT_CACHE.REFERENCE +.Pq Event 2EH , Umask 4FH +This event counts requests originating from the core +that reference a cache line in the last level cache. +.It Li LONGEST_LAT_CACHE.MISS +.Pq Event 2EH , Umask 41H +This event counts each cache miss condition for +references to the last level cache. +.It Li CPU_CLK_UNHALTED.THREAD_P +.Pq Event 3CH , Umask 00H +Counts the number of thread cycles while the thread +is not in a halt state. The thread enters the halt state +when it is running the HLT instruction. The core +frequency may change from time to time due to +power or thermal throttling. +.It Li CPU_CLK_THREAD_UNHALTED.REF_XCLK +.Pq Event 3CH , Umask 01H +Increments at the frequency of XCLK (100 MHz) +when not halted. +.It Li L1D_PEND_MISS.PENDING +.Pq Event 48H , Umask 01H +Increments the number of outstanding L1D misses +every cycle. Set Cmaks = 1 and Edge =1 to count +occurrences. +.It Li DTLB_STORE_MISSES.MISS_CAUSES_A_WALK +.Pq Event 49H , Umask 01H +Miss in all TLB levels causes an page walk of any +page size (4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_COMPLETED_4K +.Pq Event 49H , Umask 02H +Completed page walks due to store misses in one or +more TLB levels of 4K page structure. +.It Li DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M +.Pq Event 49H , Umask 04H +Completed page walks due to store misses in one or +more TLB levels of 2M/4M page structure. +.It Li DTLB_STORE_MISSES.WALK_COMPLETED +.Pq Event 49H , Umask 0EH +Completed page walks due to store miss in any TLB +levels of any page size (4K/2M/4M/1G). +.It Li DTLB_STORE_MISSES.WALK_DURATION +.Pq Event 49H , Umask 10H +Cycles PMH is busy with this walk. +.It Li DTLB_STORE_MISSES.STLB_HIT_4K +.Pq Event 49H , Umask 20H +Store misses that missed DTLB but hit STLB (4K). +.It Li DTLB_STORE_MISSES.STLB_HIT_2M +.Pq Event 49H , Umask 40H +Store misses that missed DTLB but hit STLB (2M). +.It Li DTLB_STORE_MISSES.STLB_HIT +.Pq Event 49H , Umask 60H +Store operations that miss the first TLB level but hit +the second and do not cause page walks. +.It Li DTLB_STORE_MISSES.PDE_CACHE_MISS +.Pq Event 49H , Umask 80H +DTLB store misses with low part of linear-to-physical +address translation missed. +.It Li LOAD_HIT_PRE.SW_PF +.Pq Event 4CH , Umask 01H +Non-SW-prefetch load dispatches that hit fill buffer +allocated for S/W prefetch. +.It Li LOAD_HIT_PRE.HW_PF +.Pq Event 4CH , Umask 02H +Non-SW-prefetch load dispatches that hit fill buffer +allocated for H/W prefetch. +.It Li L1D.REPLACEMENT +.Pq Event 51H , Umask 01H +Counts the number of lines brought into the L1 data +cache. +.It Li MOVE_ELIMINATION.INT_NOT_ELIMINATED +.Pq Event 58H , Umask 04H +Number of integer Move Elimination candidate uops +that were not eliminated. +.It Li MOVE_ELIMINATION.SMID_NOT_ELIMINATED +.Pq Event 58H , Umask 08H +Number of SIMD Move Elimination candidate uops +that were not eliminated. +.It Li MOVE_ELIMINATION.INT_ELIMINATED +.Pq Event 58H , Umask 01H +Unhalted core cycles when the thread is in ring 0. +.It Li MOVE_ELIMINATION.SMID_ELIMINATED +.Pq Event 58H , Umask 02H +Number of SIMD Move Elimination candidate uops +that were eliminated. +.It Li CPL_CYCLES.RING0 +.Pq Event 5CH , Umask 02H +Unhalted core cycles when the thread is in ring 0. +.It Li CPL_CYCLES.RING123 +.Pq Event 5CH , Umask 01H +Unhalted core cycles when the thread is not in ring 0. +.It Li RS_EVENTS.EMPTY_CYCLES +.Pq Event 5EH , Umask 01H +Cycles the RS is empty for the thread. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD +.Pq Event 60H , Umask 01H +Offcore outstanding Demand Data Read transactions +in SQ to uncore. Set Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CORE_RD +.Pq Event 60H , Umask 02H +Offcore outstanding Demand code Read transactions +in SQ to uncore. Set Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO +.Pq Event 60H , Umask 04H +Offcore outstanding RFO store transactions in SQ to +uncore. Set Cmask=1 to count cycles. +.It Li OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD +.Pq Event 60H , Umask 08H +Offcore outstanding cacheable data read +transactions in SQ to uncore. Set Cmask=1 to count +cycles. +.It Li LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION +.Pq Event 63H , Umask 01H +Cycles in which the L1D and L2 are locked, due to a +UC lock or split lock. +.It Li LOCK_CYCLES.CACHE_LOCK_DURATION +.Pq Event 63H , Umask 02H +Cycles in which the L1D is locked. +.It Li IDQ.EMPTY +.Pq Event 79H , Umask 02H +Counts cycles the IDQ is empty. +.It Li IDQ.MITE_UOPS +.Pq Event 79H , Umask 04H +Increment each cycle # of uops delivered to IDQ from +MITE path. +Set Cmask = 1 to count cycles. +.It Li IDQ.DSB_UOPS +.Pq Event 79H , Umask 08H +Increment each cycle. # of uops delivered to IDQ +from DSB path. +Set Cmask = 1 to count cycles. +.It Li IDQ.MS_DSB_UOPS +.Pq Event 79H , Umask 10H +Increment each cycle # of uops delivered to IDQ +when MS_busy by DSB. Set Cmask = 1 to count +cycles. Add Edge=1 to count # of delivery. +.It Li IDQ.MS_MITE_UOPS +.Pq Event 79H , Umask 20H +ncrement each cycle # of uops delivered to IDQ +when MS_busy by MITE. Set Cmask = 1 to count +cycles. +.It Li IDQ.MS_UOPS +.Pq Event 79H , Umask 30H +Increment each cycle # of uops delivered to IDQ from +MS by either DSB or MITE. Set Cmask = 1 to count +cycles. +.It Li IDQ.ALL_DSB_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered at least one uops. Set +Cmask = 1. +.It Li IDQ.ALL_DSB_CYCLES_4_UOPS +.Pq Event 79H , Umask 18H +Counts cycles DSB is delivered four uops. Set Cmask +=4. +.It Li IDQ.ALL_MITE_CYCLES_ANY_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered at least one uops. Set +Cmask = 1. +.It Li IDQ.ALL_MITE_CYCLES_4_UOPS +.Pq Event 79H , Umask 24H +Counts cycles MITE is delivered four uops. Set Cmask +=4. +.It Li IDQ.MITE_ALL_UOPS +.Pq Event 79H , Umask 3CH +# of uops delivered to IDQ from any path. +.It Li ICACHE.MISSES +.Pq Event 80H , Umask 02H +Number of Instruction Cache, Streaming Buffer and +Victim Cache Misses. Includes UC accesses. +.It Li ITLB_MISSES.MISS_CAUSES_A_WALK +.Pq Event 85H , Umask 01H +Misses in ITLB that causes a page walk of any page +size. +.It Li ITLB_MISSES.WALK_COMPLETED_4K +.Pq Event 85H , Umask 02H +Completed page walks due to misses in ITLB 4K page +entries. +.It Li TLB_MISSES.WALK_COMPLETED_2M_4M +.Pq Event 85H , Umask 04H +Completed page walks due to misses in ITLB 2M/4M +page entries. +.It Li ITLB_MISSES.WALK_COMPLETED +.Pq Event 85H , Umask 0EH +Completed page walks in ITLB of any page size. +.It Li ITLB_MISSES.WALK_DURATION +.Pq Event 85H , Umask 10H +Cycle PMH is busy with a walk. +.It Li ITLB_MISSES.STLB_HIT_4K +.Pq Event 85H , Umask 20H +ITLB misses that hit STLB (4K). +.It Li ITLB_MISSES.STLB_HIT_2M +.Pq Event 85H , Umask 40H +ITLB misses that hit STLB (2K). +.It Li ITLB_MISSES.STLB_HIT +.Pq Event 85H , Umask 60H +TLB misses that hit STLB. No page walk. +.It Li ILD_STALL.LCP +.Pq Event 87H , Umask 01H +Stalls caused by changing prefix length of the +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.DIRECT_JMP +.Pq Event 88H , Umask 02H +Qualify 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. +.It Li BR_INST_EXEC.RETURN_NEAR +.Pq Event 88H , Umask 08H +Qualify 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. +.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. +.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. +.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. +.It Li BR_MISP_EXEC.RETURN_NEAR +.Pq Event 89H , Umask 08H +Qualify 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. +.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. +.It Li BR_MISP_EXEC.ALL_BRANCHES +.Pq Event 89H , Umask FFH +Counts all 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 +thread. +.It Li UOPS_EXECUTED_PORT.PORT_0 +.Pq Event A1H , Umask 01H +Cycles which a Uop is dispatched on port 0 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_1 +.Pq Event A1H , Umask 02H +Cycles which a Uop is dispatched on port 1 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_2 +.Pq Event A1H , Umask 04H +Cycles which a Uop is dispatched on port 2 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_3 +.Pq Event A1H , Umask 08H +Cycles which a Uop is dispatched on port 3 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_4 +.Pq Event A1H , Umask 10H +Cycles which a Uop is dispatched on port 4 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_5 +.Pq Event A1H , Umask 20H +Cycles which a Uop is dispatched on port 5 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_6 +.Pq Event A1H , Umask 40H +Cycles which a Uop is dispatched on port 6 in this +thread. +.It Li UOPS_EXECUTED_PORT.PORT_7 +.Pq Event A1H , Umask 80H +Cycles which a Uop is dispatched on port 7 in this +thread. +.It Li RESOURCE_STALLS.ANY +.Pq Event A2H , Umask 01H +Cycles Allocation is stalled due to Resource Related +reason. +.It Li RESOURCE_STALLS.RS +.Pq Event A2H , Umask 04H +Cycles stalled due to no eligible RS entry available. +.It Li RESOURCE_STALLS.SB +.Pq Event A2H , Umask 08H +Cycles stalled due to no store buffers available (not +including draining form sync). +.It Li RESOURCE_STALLS.ROB +.Pq Event A2H , Umask 10H +Cycles stalled due to re-order buffer full. +.It Li CYCLE_ACTIVITY.CYCLES_L2_PENDING +.Pq Event A3H , Umask 01H +Cycles with pending L2 miss loads. Set Cmask=2 to +count cycle. +.It Li CYCLE_ACTIVITY.CYCLES_LDM_PENDING +.Pq Event A3H , Umask 02H +Cycles with pending memory loads. Set Cmask=2 to +count cycle. +.It Li CYCLE_ACTIVITY.STALLS_L2_PENDING +.Pq Event A3H , Umask 05H +Number of loads missed L2. +.It Li CYCLE_ACTIVITY.CYCLES_L1D_PENDING +.Pq Event A3H , Umask 08H +Cycles with pending L1 cache miss loads. Set +Cmask=8 to count cycle. +.It Li ITLB.ITLB_FLUSH +.Pq Event AEH , Umask 01H +Counts the number of ITLB flushes, includes +4k/2M/4M pages. +.It Li OFFCORE_REQUESTS.DEMAND_DATA_RD +.Pq Event B0H , Umask 01H +Demand data read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_CODE_RD +.Pq Event B0H , Umask 02H +Demand code read requests sent to uncore. +.It Li OFFCORE_REQUESTS.DEMAND_RFO +.Pq Event B0H , Umask 04H +Demand RFO read requests sent to uncore, including +regular RFOs, locks, ItoM. +.It Li OFFCORE_REQUESTS.ALL_DATA_RD +.Pq Event B0H , Umask 08H +Data read requests sent to uncore (demand and +prefetch). +.It Li UOPS_EXECUTED.CORE +.Pq Event B1H , Umask 02H +Counts total number of uops to be executed per-core +each cycle. +.It Li OFF_CORE_RESPONSE_0 +.Pq Event B7H , Umask 01H +Requires MSR 01A6H +.It Li OFF_CORE_RESPONSE_1 +.Pq Event BBH , Umask 01H +Requires MSR 01A7H +.It Li PAGE_WALKER_LOADS.DTLB_L1 +.Pq Event BCH , Umask 11H +Number of DTLB page walker loads that hit in the +L1+FB. +.It Li PAGE_WALKER_LOADS.ITLB_L1 +.Pq Event BCH , Umask 21H +Number of ITLB page walker loads that hit in the +L1+FB. +.It Li PAGE_WALKER_LOADS.DTLB_L2 +.Pq Event BCH , Umask 12H +Number of DTLB page walker loads that hit in the L2. +.It Li PAGE_WALKER_LOADS.ITLB_L2 +.Pq Event BCH , Umask 22H +Number of ITLB page walker loads that hit in the L2. +.It Li PAGE_WALKER_LOADS.DTLB_L3 +.Pq Event BCH , Umask 14H +Number of DTLB page walker loads that hit in the L3. +.It Li PAGE_WALKER_LOADS.ITLB_L3 +.Pq Event BCH , Umask 24H +Number of ITLB page walker loads that hit in the L3. +.It Li PAGE_WALKER_LOADS.DTLB_MEMORY +.Pq Event BCH , Umask 18H +Number of DTLB page walker loads from memory. +.It Li PAGE_WALKER_LOADS.ITLB_MEMORY +.Pq Event BCH , Umask 28H +Number of ITLB page walker loads from memory. +.It Li TLB_FLUSH.DTLB_THREAD +.Pq Event BDH , Umask 01H +DTLB flush attempts of the thread-specific entries. +.It Li TLB_FLUSH.STLB_ANY +.Pq Event BDH , Umask 20H +Count number of STLB flush attempts. +.It Li INST_RETIRED.ANY_P +.Pq Event C0H , Umask 00H +Number of instructions at retirement. +.It Li INST_RETIRED.ALL +.Pq Event C0H , Umask 01H +Precise instruction retired event with HW to reduce +effect of PEBS shadow in IP distribution. +.It Li OTHER_ASSISTS.AVX_TO_SSE +.Pq Event C1H , Umask 08H +Number of transitions from AVX-256 to legacy SSE +when penalty applicable. +.It Li OTHER_ASSISTS.SSE_TO_AVX +.Pq Event C1H , Umask 10H +Number of transitions from SSE to AVX-256 when +penalty applicable. +.It Li OTHER_ASSISTS.ANY_WB_ASSIST +.Pq Event C1H , Umask 40H +Number of microcode assists invoked by HW upon +uop writeback. +.It Li UOPS_RETIRED.ALL +.Pq Event C2H , Umask 01H +Counts the number of micro-ops retired, Use +cmask=1 and invert to count active cycles or stalled +cycles. +.It Li UOPS_RETIRED.RETIRE_SLOTS +.Pq Event C2H , Umask 02H +Counts the number of retirement slots used each +cycle. +.It Li MACHINE_CLEARS.MEMORY_ORDERING +.Pq Event C3H , Umask 02H +Counts the number of machine clears due to memory +order conflicts. +.It Li MACHINE_CLEARS.SMC +.Pq Event C3H , Umask 04H +Number of self-modifying-code machine clears +detected. +.It Li MACHINE_CLEARS.MASKMOV +.Pq Event C3H , Umask 20H +Counts the number of executed AVX masked load +operations that refer to an illegal address range with +the mask bits set to 0. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 00H +Branch instructions at retirement. +.It Li BR_INST_RETIRED.CONDITIONAL +.Pq Event C4H , Umask 01H +Counts the number of conditional branch instructions Supports PEBS +retired. +.It Li BR_INST_RETIRED.NEAR_CALL +.Pq Event C4H , Umask 02H +Direct and indirect near call instructions retired. +.It Li BR_INST_RETIRED.ALL_BRANCHES +.Pq Event C4H , Umask 04H +Counts the number of branch instructions retired. +.It Li BR_INST_RETIRED.NEAR_RETURN +.Pq Event C4H , Umask 08H +Counts the number of near return instructions +retired. +.It Li BR_INST_RETIRED.NOT_TAKEN +.Pq Event C4H , Umask 10H +Counts the number of not taken branch instructions +retired. + It Li BR_INST_RETIRED.NEAR_TAKEN +.Pq Event C4H , Umask 20H +Number of near taken branches retired. +.It Li BR_INST_RETIRED.FAR_BRANCH +.Pq Event C4H , Umask 40H +Number of far branches retired. +.It Li BR_MISP_RETIRED.ALL_BRANCHES +.Pq Event C5H , Umask 00H +Mispredicted branch instructions at retirement +.It Li BR_MISP_RETIRED.CONDITIONAL +.Pq Event C5H , Umask 01H +Mispredicted conditional branch instructions retired. +.It Li BR_MISP_RETIRED.CONDITIONAL +.Pq Event C5H , Umask 04H +Mispredicted macro branch instructions retired. +.It Li FP_ASSIST.X87_OUTPUT +.Pq Event CAH , Umask 02H +Number of X87 FP assists due to Output values. +.It Li FP_ASSIST.X87_INPUT +.Pq Event CAH , Umask 04H +Number of X87 FP assists due to input values. +.It Li FP_ASSIST.SIMD_OUTPUT +.Pq Event CAH , Umask 08H +Number of SIMD FP assists due to Output values. +.It Li FP_ASSIST.SIMD_INPUT +.Pq Event CAH , Umask 10H +Number of SIMD FP assists due to input values. +.It Li FP_ASSIST.ANY +.Pq Event CAH , Umask 1EH +Cycles with any input/output SSE* or FP assists. +.It Li ROB_MISC_EVENTS.LBR_INSERTS +.Pq Event CCH , Umask 20H +Count cases of saving new LBR records by hardware. +.It Li MEM_TRANS_RETIRED.LOAD_LATENCY +.Pq Event CDH , Umask 01H +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_LOAD_UOPS_RETIRED.L1_HIT +.Pq Event D1H , Umask 01H +Retired load uops with L1 cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.L2_HIT +.Pq Event D1H , Umask 02H +Retired load uops with L2 cache hits as data sources. +.It Li MEM_LOAD_UOPS_RETIRED.LLC_HIT +.Pq Event D1H , Umask 04H +Retired load uops with LLC cache hits as data +sources. +.It Li MEM_LOAD_UOPS_RETIRED.L2_MISS +.Pq Event D1H , Umask 10H +Retired load uops missed L2. Unknown data source +excluded. +.It Li MEM_LOAD_UOPS_RETIRED.HIT_LFB +.Pq Event D1H , Umask 40H +Retired load uops which data sources were load uops +missed L1 but hit FB due to preceding miss to the +same cache line with data not ready. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_MISS +.Pq Event D2H , Umask 01H +Retired load uops which data sources were LLC hit +and cross-core snoop missed in on-pkg core cache. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HIT +.Pq Event D2H , Umask 02H +Retired load uops which data sources were LLC and +cross-core snoop hits in on-pkg core cache. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_HITM +.Pq Event D2H , Umask 04H +Retired load uops which data sources were HitM +responses from shared LLC. +.It Li MEM_LOAD_UOPS_LLC_HIT_RETIRED.XSNP_NONE +.Pq Event D2H , Umask 08H +Retired load uops which data sources were hits in +LLC without snoops required. +.It Li MEM_LOAD_UOPS_LLC_MISS_RETIRED.LOCAL_DRAM +.Pq Event D3H , Umask 01H +Retired load uops which data sources missed LLC but +serviced from local dram. +.It Li BACLEARS.ANY +.Pq Event E6H , Umask 1FH +Number of front end re-steers due to BPU +misprediction. +.It Li L2_TRANS.DEMAND_DATA_RD +.Pq Event F0H , Umask 01H +Demand Data Read requests that access L2 cache. +.It Li L2_TRANS.RFO +.Pq Event F0H , Umask 02H +RFO requests that access L2 cache. +.It Li L2_TRANS.CODE_RD +.Pq Event F0H , Umask 04H +L2 cache accesses when fetching instructions. +.It Li L2_TRANS.ALL_PF +.Pq Event F0H , Umask 08H +Any MLC or LLC HW prefetch accessing L2, including +rejects. +.It Li L2_TRANS.L1D_WB +.Pq Event F0H , Umask 10H +L1D writebacks that access L2 cache. +.It Li L2_TRANS.L2_FILL +.Pq Event F0H , Umask 20H +L2 fill requests that access L2 cache. +.It Li L2_TRANS.L2_WB +.Pq Event F0H , Umask 40H +L2 writebacks that access L2 cache. +.It Li L2_TRANS.ALL_REQUESTS +.Pq Event F0H , Umask 80H +Transactions accessing L2 pipe. +.It Li L2_LINES_IN.I +.Pq Event F1H , Umask 01H +L2 cache lines in I state filling L2. +.It Li L2_LINES_IN.S +.Pq Event F1H , Umask 02H +L2 cache lines in S state filling L2. +.It Li L2_LINES_IN.E +.Pq Event F1H , Umask 04H +L2 cache lines in E state filling L2. +.It Li L2_LINES_IN.ALL +.Pq Event F1H , Umask 07H +L2 cache lines filling L2. +.It Li L2_LINES_OUT.DEMAND_CLEAN +.Pq Event F2H , Umask 05H +Clean L2 cache lines evicted by demand. +.It Li L2_LINES_OUT.DEMAND_DIRTY +.Pq Event F2H , Umask 06H +Dirty L2 cache lines evicted by demand. +.El +.Sh SEE ALSO +.Xr pmc 3 , +.Xr pmc.atom 3 , +.Xr pmc.core 3 , +.Xr pmc.iaf 3 , +.Xr pmc.ucf 3 , +.Xr pmc.k7 3 , +.Xr pmc.k8 3 , +.Xr pmc.p4 3 , +.Xr pmc.p5 3 , +.Xr pmc.p6 3 , +.Xr pmc.corei7 3 , +.Xr pmc.corei7uc 3 , +.Xr pmc.haswell 3 , +.Xr pmc.haswelluc 3 , +.Xr pmc.ivybridge 3 , +.Xr pmc.ivybridgexeon 3 , +.Xr pmc.sandybridge 3 , +.Xr pmc.sandybridgeuc 3 , +.Xr pmc.sandybridgexeon 3 , +.Xr pmc.westmere 3 , +.Xr pmc.westmereuc 3 , +.Xr pmc.soft 3 , +.Xr pmc.tsc 3 , +.Xr pmc_cpuinfo 3 , +.Xr pmclog 3 , +.Xr hwpmc 4 +.Sh HISTORY +Support for the Haswell Xeon microarchitecture first appeared in +.Fx 10.2 . +.Sh AUTHORS +The +.Lb libpmc +library was written by +.An "Joseph Koshy" +.Aq jkoshy@FreeBSD.org . +The support for the Haswell Xeon +microarchitecture was written by +.An "Randall Stewart" +.Aq rrs@FreeBSD.org . From owner-svn-src-stable@freebsd.org Mon Jun 19 15:13:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 43F46D9EBFC; Mon, 19 Jun 2017 15:13:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D575C78050; Mon, 19 Jun 2017 15:13:21 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFDLUV095432; Mon, 19 Jun 2017 15:13:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFDKEw095424; Mon, 19 Jun 2017 15:13:20 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191513.v5JFDKEw095424@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:13:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320106 - in stable/10: lib/libpmc sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:13:22 -0000 Author: avg Date: Mon Jun 19 15:13:20 2017 New Revision: 320106 URL: https://svnweb.freebsd.org/changeset/base/320106 Log: MFC r279832: Fix Sandy Bridge+ hwpmc branch counters Modified: stable/10/lib/libpmc/pmc.haswell.3 stable/10/lib/libpmc/pmc.haswellxeon.3 stable/10/lib/libpmc/pmc.ivybridge.3 stable/10/lib/libpmc/pmc.ivybridgexeon.3 stable/10/lib/libpmc/pmc.sandybridge.3 stable/10/lib/libpmc/pmc.sandybridgexeon.3 stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/pmc.haswell.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -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 Modified: stable/10/lib/libpmc/pmc.haswellxeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -530,73 +530,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 Modified: stable/10/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -449,80 +449,60 @@ Stalls caused by changing prefix length of the instruc .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. -Must combine with umask 40H, 80H. +.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 +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and indirect branches. -Must combine with umask 80H. .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 +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.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 +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register and memory indirect, +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -Applicable to umask 01H only. -.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. .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. -Must combine with umask 40H, 80H. +.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 +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.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 +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including both register and memory +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches executed. -Applicable to umask 01H only. -.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. .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 thread. Modified: stable/10/lib/libpmc/pmc.ivybridgexeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -449,80 +449,60 @@ Stalls caused by changing prefix length of the instruc .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. -Must combine with umask 40H, 80H. +.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 +.Pq Event 88H , Umask 82H +Count all unconditional near branch instructions excluding calls and indirect branches. -Must combine with umask 80H. .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 +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H , Umask 08H -Qualify indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.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 +.Pq Event 88H , Umask 90H +Count unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_INST_EXEC.INDIRECT_NEAR_CALL -.Pq Event 88H , Umask 20H -Qualify indirect near calls, including both register and memory indirect, +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H , Umask 40H -Qualify non-taken near branches executed. -Applicable to umask 01H only. -.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. .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. -Must combine with umask 40H, 80H. +.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 +.Pq Event 89H , Umask 84H +Count mispredicted indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H. .It Li BR_MISP_EXEC.RETURN_NEAR -.Pq Event 89H , Umask 08H -Qualify mispredicted indirect near branches that have a return mnemonic. -Must combine with umask 80H. +.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 +.Pq Event 89H , Umask 90H +Count mispredicted unconditional near call branch instructions, excluding non call branch, executed. -Must combine with umask 80H. .It Li BR_MISP_EXEC.INDIRECT_NEAR_CALL -.Pq Event 89H , Umask 20H -Qualify mispredicted indirect near calls, including both register and memory +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H. -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H , Umask 40H -Qualify mispredicted non-taken near branches executed. -Applicable to umask 01H only. -.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. .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 thread. Modified: stable/10/lib/libpmc/pmc.sandybridge.3 ============================================================================== --- stable/10/lib/libpmc/pmc.sandybridge.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.sandybridge.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -497,80 +497,60 @@ Stalls caused by changing prefix length of the instruc .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. -Must combine with umask 40H, 80H +.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. -Must combine with umask 80H +.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 +.Pq Event 88H , Umask 84H +Count executed indirect near branch instructions that are not calls nor returns. -Must combine with umask 80H .It Li BR_INST_EXEC.RETURN_NEAR -.Pq Event 88H, Umask 08H -Qualify indirect near branches that have a return mnemonic. -Must combine with umask 80H +.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. -Must combine with umask 80H +.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, +.Pq Event 88H , Umask A0H +Count indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H -.It Li BR_INST_EXEC.NONTAKEN -.Pq Event 88H, Umask 40H -Qualify non-taken near branches executed. -Applicable to umask 01H only -.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 -.It Li BR_INST_EXE.ALL_BRANCHES -.Pq Event 88H, Umask FFH +.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. -Must combine with umask 40H, 80H +.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. -Must combine with umask 80H +.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. -Must combine with umask 80H +.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. -Must combine with umask 80H +.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 +.Pq Event 89H , Umask A0H +Count mispredicted indirect near calls, including both register and memory indirect, executed. -Must combine with umask 80H -.It Li BR_MISP_EXEC.NONTAKEN -.Pq Event 89H, Umask 40H -Qualify mispredicted non-taken near branches executed. -Applicable to umask 01H only -.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 .It Li BR_MISP_EXEC.ALL_BRANCHES -.Pq Event 89H, Umask FFH -Counts all near executed branches (not necessarily retired). +.Pq Event 89H , Umask FFH +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 thread. Modified: stable/10/lib/libpmc/pmc.sandybridgexeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.sandybridgexeon.3 Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/lib/libpmc/pmc.sandybridgexeon.3 Mon Jun 19 15:13:20 2017 (r320106) @@ -543,73 +543,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. -.It Li BR_INST_EXE.ALL_BRANCHES +.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 Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:13:20 2017 (r320106) @@ -1193,46 +1193,57 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_80H, 0x88, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(88H_41H, 0x88, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_81H, 0x88, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_82H, 0x88, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_84H, 0x88, 0x84, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_88H, 0x88, 0x88, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_90H, 0x88, 0x90, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_A0H, 0x88, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_FFH, 0x88, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_80H, 0x89, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(89H_41H, 0x89, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_81H, 0x89, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_82H, 0x89, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_84H, 0x89, 0x84, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_88H, 0x89, 0x88, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_90H, 0x89, 0x90, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_A0H, 0x89, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_FFH, 0x89, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:09:37 2017 (r320105) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:13:20 2017 (r320106) @@ -856,7 +856,14 @@ __PMC_EV(IAP, EVENT_88H_10H) \ __PMC_EV(IAP, EVENT_88H_20H) \ __PMC_EV(IAP, EVENT_88H_30H) \ __PMC_EV(IAP, EVENT_88H_40H) \ +__PMC_EV(IAP, EVENT_88H_41H) \ __PMC_EV(IAP, EVENT_88H_80H) \ +__PMC_EV(IAP, EVENT_88H_81H) \ +__PMC_EV(IAP, EVENT_88H_82H) \ +__PMC_EV(IAP, EVENT_88H_84H) \ +__PMC_EV(IAP, EVENT_88H_88H) \ +__PMC_EV(IAP, EVENT_88H_90H) \ +__PMC_EV(IAP, EVENT_88H_A0H) \ __PMC_EV(IAP, EVENT_88H_7FH) \ __PMC_EV(IAP, EVENT_88H_FFH) \ __PMC_EV(IAP, EVENT_89H_00H) \ @@ -869,7 +876,14 @@ __PMC_EV(IAP, EVENT_89H_10H) \ __PMC_EV(IAP, EVENT_89H_20H) \ __PMC_EV(IAP, EVENT_89H_30H) \ __PMC_EV(IAP, EVENT_89H_40H) \ +__PMC_EV(IAP, EVENT_89H_41H) \ __PMC_EV(IAP, EVENT_89H_80H) \ +__PMC_EV(IAP, EVENT_89H_81H) \ +__PMC_EV(IAP, EVENT_89H_82H) \ +__PMC_EV(IAP, EVENT_89H_84H) \ +__PMC_EV(IAP, EVENT_89H_88H) \ +__PMC_EV(IAP, EVENT_89H_90H) \ +__PMC_EV(IAP, EVENT_89H_A0H) \ __PMC_EV(IAP, EVENT_89H_7FH) \ __PMC_EV(IAP, EVENT_89H_FFH) \ __PMC_EV(IAP, EVENT_8AH_00H) \ @@ -2682,24 +2696,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_2M", IAP_EVENT_85 __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_60H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_EXECUTED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -2911,24 +2923,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_2M", IAP_EVENT_85 __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_60H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_EXECUTED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -3137,24 +3147,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_10H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_DISPATCHED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -3368,24 +3376,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_10H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_A0H) \ __PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN_COND", IAP_EVENT_89H_41H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN_COND", IAP_EVENT_89H_81H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ + IAP_EVENT_89H_84H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_88H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_90H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_A0H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ __PMC_EV_ALIAS("UOPS_DISPATCHED_PORT.PORT_0", IAP_EVENT_A1H_01H) \ @@ -3604,24 +3610,22 @@ __PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_ __PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_10H) \ __PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ __PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN_COND", IAP_EVENT_88H_41H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN_COND", IAP_EVENT_88H_81H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_82H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ - IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ -__PMC_EV_ALIAS("BR_INST_EXE.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ + IAP_EVENT_88H_84H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_88H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_90H) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Jun 19 15:16:48 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D4B32D9ECC0; Mon, 19 Jun 2017 15:16:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2C42781E5; Mon, 19 Jun 2017 15:16:48 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFGluv095608; Mon, 19 Jun 2017 15:16:47 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFGl66095607; Mon, 19 Jun 2017 15:16:47 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191516.v5JFGl66095607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:16:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320107 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:16:48 -0000 Author: avg Date: Mon Jun 19 15:16:47 2017 New Revision: 320107 URL: https://svnweb.freebsd.org/changeset/base/320107 Log: MFC r279834: Support architectural events on Haswell/Ivy Bridge Modified: stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:13:20 2017 (r320106) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:16:47 2017 (r320107) @@ -2597,6 +2597,7 @@ __PMC_EV_ALIAS("SIMD_INT_64.SHUFFLE_MOVE", IAP_EVENT_F * Aliases for Haswell core PMC events */ #define __PMC_EV_ALIAS_HASWELL_XEON() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ @@ -2824,6 +2825,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_ #define __PMC_EV_ALIAS_HASWELL() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ @@ -3051,6 +3053,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.DEMAND_DIRTY", IAP_EVENT_ #define __PMC_EV_ALIAS_IVYBRIDGE() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ @@ -3281,6 +3284,7 @@ __PMC_EV_ALIAS("L2_LINES_OUT.PF_DIRTY", IAP_EVENT_F2H_ * Aliases for Ivy Bridge Xeon PMC events (325462-045US January 2013) */ #define __PMC_EV_ALIAS_IVYBRIDGE_XEON() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ __PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS.NO_SR", IAP_EVENT_03H_08H) \ __PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ From owner-svn-src-stable@freebsd.org Mon Jun 19 15:20:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF8CBD9EDAD; Mon, 19 Jun 2017 15:20:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88C85784DF; Mon, 19 Jun 2017 15:20:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFKUoZ095867; Mon, 19 Jun 2017 15:20:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFKU0C095861; Mon, 19 Jun 2017 15:20:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191520.v5JFKU0C095861@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:20:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320109 - in stable/10: lib/libpmc sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:20:31 -0000 Author: avg Date: Mon Jun 19 15:20:30 2017 New Revision: 320109 URL: https://svnweb.freebsd.org/changeset/base/320109 Log: MFC r279835: Fix Ivy Bridge+ MEM_UOPS_RETIRED counters Modified: stable/10/lib/libpmc/pmc.haswell.3 stable/10/lib/libpmc/pmc.haswellxeon.3 stable/10/lib/libpmc/pmc.ivybridge.3 stable/10/lib/libpmc/pmc.ivybridgexeon.3 stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/pmc_events.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/pmc.haswell.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.haswell.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -808,30 +808,24 @@ Count cases of saving new LBR records by hardware. 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. Modified: stable/10/lib/libpmc/pmc.haswellxeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.haswellxeon.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -809,30 +809,24 @@ Count cases of saving new LBR records by hardware. 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. Modified: stable/10/lib/libpmc/pmc.ivybridge.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.ivybridge.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -706,31 +706,24 @@ Specify threshold in MSR 0x3F6. .Pq Event CDH , Umask 02H Sample stores and collect precise store operation via PEBS record. PMC3 only. -.It Li MEM_UOP_RETIRED.LOADS -.Pq Event D0H , Umask 01H -Qualify retired memory uops that are loads. Combine with umask 10H, 20H, -40H, 80H. -Supports PEBS. -.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 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 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. Modified: stable/10/lib/libpmc/pmc.ivybridgexeon.3 ============================================================================== --- stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/lib/libpmc/pmc.ivybridgexeon.3 Mon Jun 19 15:20:30 2017 (r320109) @@ -718,31 +718,24 @@ Specify threshold in MSR 0x3F6. .Pq Event CDH , Umask 02H Sample stores and collect precise store operation via PEBS record. PMC3 only. -.It Li MEM_UOP_RETIRED.LOADS -.Pq Event D0H , Umask 01H -Qualify retired memory uops that are loads. Combine with umask 10H, 20H, -40H, 80H. -Supports PEBS. -.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 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 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. Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:20:30 2017 (r320109) @@ -1602,29 +1602,21 @@ static struct iap_event_descr iap_events[] = { /* Sandy Bridge / Sandy Bridge Xeon - 11, 12, 21, 41, 42, 81, 82 */ IAPDESCR(D0H_00H, 0xD0, 0x00, IAP_F_FM | IAP_F_CC), - IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAPDESCR(D0H_01H, 0xD0, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(D0H_11H, 0xD0, 0x11, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_12H, 0xD0, 0x12, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D0H_21H, 0xD0, 0x21, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_40H, 0xD0, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), /* Not in spec but in linux and Vtune guide */ - IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), /* Not in spec but in linux and Vtune guide */ - IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX), /* Not in spec but in linux and Vtune guide */ - IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX | - IAP_F_IB | IAP_F_IBX), /* Not in spec but in linux and Vtune guide */ + IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D0H_82H, 0xD0, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | Modified: stable/10/sys/dev/hwpmc/pmc_events.h ============================================================================== --- stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:17:17 2017 (r320108) +++ stable/10/sys/dev/hwpmc/pmc_events.h Mon Jun 19 15:20:30 2017 (r320109) @@ -2780,14 +2780,12 @@ __PMC_EV_ALIAS("FP_ASSIST.SIMD_INPUT", IAP_EVENT_CAH_1 __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ @@ -3008,14 +3006,12 @@ __PMC_EV_ALIAS("FP_ASSIST.SIMD_INPUT", IAP_EVENT_CAH_1 __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ @@ -3234,15 +3230,12 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ @@ -3464,15 +3457,12 @@ __PMC_EV_ALIAS("FP_ASSIST.ANY", IAP_EVENT_CAH_1EH) \ __PMC_EV_ALIAS("ROB_MISC_EVENTS.LBR_INSERTS", IAP_EVENT_CCH_20H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.LOAD_LATENCY", IAP_EVENT_CDH_01H) \ __PMC_EV_ALIAS("MEM_TRANS_RETIRED.PRECISE_STORE", IAP_EVENT_CDH_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOADS", IAP_EVENT_D0H_01H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STORES", IAP_EVENT_D0H_02H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.STLB_MISS", IAP_EVENT_D0H_10H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.LOCK", IAP_EVENT_D0H_20H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT", IAP_EVENT_D0H_40H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL", IAP_EVENT_D0H_80H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ -__PMC_EV_ALIAS("MEM_UOP_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_LOADS", IAP_EVENT_D0H_11H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.STLB_MISS_STORES", IAP_EVENT_D0H_12H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_LOADS", IAP_EVENT_D0H_41H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.SPLIT_STORES", IAP_EVENT_D0H_42H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_LOADS", IAP_EVENT_D0H_81H) \ +__PMC_EV_ALIAS("MEM_UOPS_RETIRED.ALL_STORES", IAP_EVENT_D0H_82H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L1_HIT", IAP_EVENT_D1H_01H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.L2_HIT", IAP_EVENT_D1H_02H) \ __PMC_EV_ALIAS("MEM_LOAD_UOPS_RETIRED.LLC_HIT", IAP_EVENT_D1H_04H) \ From owner-svn-src-stable@freebsd.org Mon Jun 19 15:22:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B48CCD9EF5D; Mon, 19 Jun 2017 15:22:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8297F78856; Mon, 19 Jun 2017 15:22:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFM5qZ095991; Mon, 19 Jun 2017 15:22:05 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFM5Qh095990; Mon, 19 Jun 2017 15:22:05 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191522.v5JFM5Qh095990@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:22:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320110 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:22:06 -0000 Author: avg Date: Mon Jun 19 15:22:05 2017 New Revision: 320110 URL: https://svnweb.freebsd.org/changeset/base/320110 Log: MFC r279836: Add missing counter definitions Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:20:30 2017 (r320109) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:22:05 2017 (r320110) @@ -1131,6 +1131,10 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1277,7 +1281,8 @@ static struct iap_event_descr iap_events[] = { IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_IB | IAP_F_IBX), + IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ From owner-svn-src-stable@freebsd.org Mon Jun 19 15:23:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B86D9F00A; Mon, 19 Jun 2017 15:23:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 141B0789FB; Mon, 19 Jun 2017 15:23:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFN862000177; Mon, 19 Jun 2017 15:23:08 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFN8tp000176; Mon, 19 Jun 2017 15:23:08 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191523.v5JFN8tp000176@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:23:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320111 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:23:09 -0000 Author: avg Date: Mon Jun 19 15:23:07 2017 New Revision: 320111 URL: https://svnweb.freebsd.org/changeset/base/320111 Log: MFC r279939: hwpmc: Fix event number to match enum name Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:22:05 2017 (r320110) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:23:07 2017 (r320111) @@ -1656,9 +1656,9 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(D3H_03H, 0xD0, 0x3, IAP_F_IBX ), + IAPDESCR(D3H_03H, 0xD3, 0x03, IAP_F_IBX), IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), /* Not defined for IBX */ - IAPDESCR(D3H_0CH, 0xD0, 0x0, IAP_F_IBX ), + IAPDESCR(D3H_0CH, 0xD3, 0x0C, IAP_F_IBX), IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX ), IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX ), From owner-svn-src-stable@freebsd.org Mon Jun 19 15:24:39 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37796D9F076; Mon, 19 Jun 2017 15:24:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1142F78B43; Mon, 19 Jun 2017 15:24:38 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFOcMI000277; Mon, 19 Jun 2017 15:24:38 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFOcrm000276; Mon, 19 Jun 2017 15:24:38 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191524.v5JFOcrm000276@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:24:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320112 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:24:39 -0000 Author: avg Date: Mon Jun 19 15:24:37 2017 New Revision: 320112 URL: https://svnweb.freebsd.org/changeset/base/320112 Log: MFC r281101: Remove whitespace [in hwpmc] Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:23:07 2017 (r320111) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:24:37 2017 (r320112) @@ -414,7 +414,7 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); msr = rdmsr(IA_GLOBAL_CTRL) & ~IAF_GLOBAL_CTRL_MASK; - wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); @@ -491,7 +491,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value_t v) /* Turn off fixed counters */ msr = rdmsr(IAF_CTRL) & ~IAF_CTRL_MASK; - wrmsr(IAF_CTRL, msr); + wrmsr(IAF_CTRL, msr); wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); @@ -709,7 +709,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1321,7 +1321,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | + IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), @@ -1471,7 +1471,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(C3H_02H, 0xC3, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | @@ -1628,10 +1628,10 @@ static struct iap_event_descr iap_events[] = { IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_04H, 0xD1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), - IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | + IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1721,7 +1721,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), - IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | + IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), @@ -1885,7 +1885,7 @@ iap_is_event_architectural(enum pmc_event pe, enum pmc return (EV_IS_NOTARCH); } - return (((core_architectural_events & (1 << ae)) == 0) ? + return (((core_architectural_events & (1 << ae)) == 0) ? EV_IS_ARCH_NOTSUPP : EV_IS_ARCH_SUPP); } From owner-svn-src-stable@freebsd.org Mon Jun 19 15:34:09 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EDC1D9F26D; Mon, 19 Jun 2017 15:34:09 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D062A790ED; Mon, 19 Jun 2017 15:34:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFY7vq004353; Mon, 19 Jun 2017 15:34:07 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFY7ME004350; Mon, 19 Jun 2017 15:34:07 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191534.v5JFY7ME004350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:34:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320113 - in stable/10: lib/libpmc sys/dev/hwpmc sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:34:09 -0000 Author: avg Date: Mon Jun 19 15:34:07 2017 New Revision: 320113 URL: https://svnweb.freebsd.org/changeset/base/320113 Log: MFC r291494: Add support for Intel Skylake and Intel Broadwell PMC's. Modified: stable/10/lib/libpmc/libpmc.c stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/libpmc.c ============================================================================== --- stable/10/lib/libpmc/libpmc.c Mon Jun 19 15:24:37 2017 (r320112) +++ stable/10/lib/libpmc/libpmc.c Mon Jun 19 15:34:07 2017 (r320113) @@ -205,7 +205,21 @@ static const struct pmc_event_descr haswell_xeon_event __PMC_EV_ALIAS_HASWELL_XEON() }; +static const struct pmc_event_descr broadwell_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELL() +}; +static const struct pmc_event_descr broadwell_xeon_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELL_XEON() +}; + +static const struct pmc_event_descr skylake_event_table[] = +{ + __PMC_EV_ALIAS_SKYLAKE() +}; + static const struct pmc_event_descr ivybridge_event_table[] = { __PMC_EV_ALIAS_IVYBRIDGE() @@ -246,6 +260,11 @@ static const struct pmc_event_descr haswelluc_event_ta __PMC_EV_ALIAS_HASWELLUC() }; +static const struct pmc_event_descr broadwelluc_event_table[] = +{ + __PMC_EV_ALIAS_BROADWELLUC() +}; + static const struct pmc_event_descr sandybridgeuc_event_table[] = { __PMC_EV_ALIAS_SANDYBRIDGEUC() @@ -274,6 +293,9 @@ PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_ PMC_MDEP_TABLE(nehalem_ex, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(haswell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(haswell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(broadwell, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(broadwell_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); +PMC_MDEP_TABLE(skylake, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); PMC_MDEP_TABLE(ivybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(ivybridge_xeon, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC); PMC_MDEP_TABLE(sandybridge, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); @@ -320,6 +342,9 @@ 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(broadwell, IAP, broadwell, iap); +PMC_CLASS_TABLE_DESC(broadwell_xeon, IAP, broadwell_xeon, iap); +PMC_CLASS_TABLE_DESC(skylake, IAP, skylake, 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); @@ -329,6 +354,7 @@ PMC_CLASS_TABLE_DESC(westmere_ex, IAP, westmere_ex, ia PMC_CLASS_TABLE_DESC(ucf, UCF, ucf, ucf); PMC_CLASS_TABLE_DESC(corei7uc, UCP, corei7uc, ucp); PMC_CLASS_TABLE_DESC(haswelluc, UCP, haswelluc, ucp); +PMC_CLASS_TABLE_DESC(broadwelluc, UCP, broadwelluc, ucp); PMC_CLASS_TABLE_DESC(sandybridgeuc, UCP, sandybridgeuc, ucp); PMC_CLASS_TABLE_DESC(westmereuc, UCP, westmereuc, ucp); #endif @@ -636,6 +662,12 @@ static struct pmc_event_alias core2_aliases_without_ia #define haswell_aliases_without_iaf core2_aliases_without_iaf #define haswell_xeon_aliases core2_aliases #define haswell_xeon_aliases_without_iaf core2_aliases_without_iaf +#define broadwell_aliases core2_aliases +#define broadwell_aliases_without_iaf core2_aliases_without_iaf +#define broadwell_xeon_aliases core2_aliases +#define broadwell_xeon_aliases_without_iaf core2_aliases_without_iaf +#define skylake_aliases core2_aliases +#define skylake_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_aliases core2_aliases #define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_xeon_aliases core2_aliases @@ -796,6 +828,7 @@ static struct pmc_masks iap_rsp_mask_sb_sbx_ib[] = { NULLMASK }; +/* Broadwell is defined to use the same mask as Haswell */ static struct pmc_masks iap_rsp_mask_haswell[] = { PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), PMCMASK(REQ_DMND_RFO, (1ULL << 1)), @@ -811,6 +844,10 @@ static struct pmc_masks iap_rsp_mask_haswell[] = { PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), PMCMASK(RES_SUPPLIER_LLC_HITF, (1ULL << 21)), PMCMASK(RES_SUPPLIER_LOCAL, (1ULL << 22)), + /* + * For processor type 06_45H 22 is L4_HIT_LOCAL_L4 + * and 23, 24 and 25 are also defined. + */ PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)), PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), @@ -821,6 +858,33 @@ static struct pmc_masks iap_rsp_mask_haswell[] = { NULLMASK }; +static struct pmc_masks iap_rsp_mask_skylake[] = { + PMCMASK(REQ_DMND_DATA_RD, (1ULL << 0)), + PMCMASK(REQ_DMND_RFO, (1ULL << 1)), + PMCMASK(REQ_DMND_IFETCH, (1ULL << 2)), + PMCMASK(REQ_PF_DATA_RD, (1ULL << 7)), + PMCMASK(REQ_PF_RFO, (1ULL << 8)), + PMCMASK(REQ_STRM_ST, (1ULL << 11)), + PMCMASK(REQ_OTHER, (1ULL << 15)), + PMCMASK(RES_ANY, (1ULL << 16)), + PMCMASK(RES_SUPPLIER_SUPP, (1ULL << 17)), + PMCMASK(RES_SUPPLIER_LLC_HITM, (1ULL << 18)), + PMCMASK(RES_SUPPLIER_LLC_HITE, (1ULL << 19)), + PMCMASK(RES_SUPPLIER_LLC_HITS, (1ULL << 20)), + PMCMASK(RES_SUPPLIER_L4_HIT, (1ULL << 22)), + PMCMASK(RES_SUPPLIER_DRAM, (1ULL << 26)), + PMCMASK(RES_SUPPLIER_SPL_HIT, (1ULL << 30)), + PMCMASK(RES_SNOOP_SNP_NONE, (1ULL << 31)), + PMCMASK(RES_SNOOP_SNP_NO_NEEDED,(1ULL << 32)), + PMCMASK(RES_SNOOP_SNP_MISS, (1ULL << 33)), + PMCMASK(RES_SNOOP_HIT_NO_FWD, (1ULL << 34)), + PMCMASK(RES_SNOOP_HIT_FWD, (1ULL << 35)), + PMCMASK(RES_SNOOP_HITM, (1ULL << 36)), + PMCMASK(RES_NON_DRAM, (1ULL << 37)), + NULLMASK +}; + + static int iap_allocate_pmc(enum pmc_event pe, char *ctrspec, struct pmc_op_pmcallocate *pmc_config) @@ -912,6 +976,20 @@ iap_allocate_pmc(enum pmc_event pe, char *ctrspec, n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); } else return (-1); + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL || + cpu_info.pm_cputype == PMC_CPU_INTEL_BROADWELL_XEON) { + /* Broadwell is defined to use same mask as haswell */ + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); + } else + return (-1); + + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_SKYLAKE) { + if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { + n = pmc_parse_mask(iap_rsp_mask_skylake, p, &rsp); + } else + return (-1); + } else return (-1); @@ -2803,6 +2881,18 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = haswell_xeon_event_table; count = PMC_EVENT_TABLE_SIZE(haswell_xeon); break; + case PMC_CPU_INTEL_BROADWELL: + ev = broadwell_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + ev = broadwell_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + ev = skylake_event_table; + count = PMC_EVENT_TABLE_SIZE(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -2848,6 +2938,10 @@ pmc_event_names_of_class(enum pmc_class cl, const char ev = haswelluc_event_table; count = PMC_EVENT_TABLE_SIZE(haswelluc); break; + case PMC_CPU_INTEL_BROADWELL: + ev = broadwelluc_event_table; + count = PMC_EVENT_TABLE_SIZE(broadwelluc); + break; case PMC_CPU_INTEL_SANDYBRIDGE: ev = sandybridgeuc_event_table; count = PMC_EVENT_TABLE_SIZE(sandybridgeuc); @@ -3133,6 +3227,17 @@ pmc_init(void) case PMC_CPU_INTEL_HASWELL_XEON: PMC_MDEP_INIT_INTEL_V2(haswell_xeon); break; + case PMC_CPU_INTEL_BROADWELL: + pmc_class_table[n++] = &ucf_class_table_descr; + pmc_class_table[n++] = &broadwelluc_class_table_descr; + PMC_MDEP_INIT_INTEL_V2(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + PMC_MDEP_INIT_INTEL_V2(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + PMC_MDEP_INIT_INTEL_V2(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3302,7 +3407,18 @@ _pmc_name_of_event(enum pmc_event pe, enum pmc_cputype ev = haswell_xeon_event_table; evfence = haswell_xeon_event_table + PMC_EVENT_TABLE_SIZE(haswell_xeon); break; - + case PMC_CPU_INTEL_BROADWELL: + ev = broadwell_event_table; + evfence = broadwell_event_table + PMC_EVENT_TABLE_SIZE(broadwell); + break; + case PMC_CPU_INTEL_BROADWELL_XEON: + ev = broadwell_xeon_event_table; + evfence = broadwell_xeon_event_table + PMC_EVENT_TABLE_SIZE(broadwell_xeon); + break; + case PMC_CPU_INTEL_SKYLAKE: + ev = skylake_event_table; + evfence = skylake_event_table + PMC_EVENT_TABLE_SIZE(skylake); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:24:37 2017 (r320112) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:34:07 2017 (r320113) @@ -579,7 +579,9 @@ struct iap_event_descr { #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ #define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ #define IAP_F_BW (1 << 13) /* CPU: Broadwell */ -#define IAP_F_FM (1 << 14) /* Fixed mask */ +#define IAP_F_BWX (1 << 14) /* CPU: Broadwell Xeon */ +#define IAP_F_SL (1 << 15) /* CPU: Skylake */ +#define IAP_F_FM (1 << 18) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -623,11 +625,12 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | IAP_F_CAS), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | - IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), @@ -648,9 +651,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | + IAP_F_BWX), IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O | IAP_F_CAS), IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | @@ -664,7 +669,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_03H, 0x07, 0x03, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(07H_06H, 0x07, 0x06, IAP_F_FM | IAP_F_CA), @@ -672,9 +677,11 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX), IAPDESCR(08H_01H, 0x08, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_02H, 0x08, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(08H_04H, 0x08, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), @@ -682,11 +689,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_07H, 0x08, 0x07, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), - IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(08H_10H, 0x08, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), @@ -705,23 +712,25 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0BH_10H, 0x0B, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(0CH_01H, 0x0C, 0x01, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | - IAP_F_WM), + IAP_F_WM | IAP_F_SL), IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), - IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | - IAP_F_IB | IAP_F_IBX | IAP_F_HWX), + IAPDESCR(0DH_03H, 0x0D, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | + IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(0DH_80H, 0x0D, 0x00, IAP_F_FM | IAP_F_SL), IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -771,7 +780,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(17H_01H, 0x17, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | @@ -798,7 +808,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX ), IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -812,29 +822,40 @@ static struct iap_event_descr iap_events[] = { IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), + IAPDESCR(24H_38H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_3FH, 0x24, 0x00, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_D8H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), + IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), + IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_EFH, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), @@ -867,7 +888,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(27H_80H, 0x27, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_E0H, 0x27, 0xE0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -895,10 +916,10 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(2EH_02H, 0x2E, 0x02, IAP_F_FM | IAP_F_WM), IAPDESCR(2EH_41H, 0x2E, 0x41, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(2EH_4FH, 0x2E, 0x4F, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -914,11 +935,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_CAS | IAP_F_HWX), - IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), + IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_SL), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -959,22 +980,24 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(48H_00H, 0x48, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(48H_01H, 0x48, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_SL), IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | - IAP_F_HW | IAP_F_HWX), + IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(49H_10H, 0x49, 0x1, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | @@ -988,9 +1011,9 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(4CH_00H, 0x4C, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(4CH_01H, 0x4C, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(4CH_02H, 0x4C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1004,10 +1027,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(4FH_02H, 0x4F, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_04H, 0x4F, 0x04, IAP_F_FM | IAP_F_I7O), IAPDESCR(4FH_08H, 0x4F, 0x08, IAP_F_FM | IAP_F_I7O), - IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), + IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(51H_01H, 0x51, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(51H_02H, 0x51, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(51H_04H, 0x51, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1020,15 +1044,15 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(59H_20H, 0x59, 0x1, IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_80H, 0x59, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1038,27 +1062,32 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(5BH_4FH, 0x5B, 0x4F, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(5CH_01H, 0x5C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX | IAP_F_IB), IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_02H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_04H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_08H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(60H_10H, 0x7, 0x00, IAP_F_SL), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), + IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(62H, 0x62, IAP_M_AGENT, IAP_F_ALLCPUSCORE2), @@ -1068,9 +1097,11 @@ static struct iap_event_descr iap_events[] = { IAP_F_CA | IAP_F_CC2), IAPDESCR(63H, 0x63, IAP_M_CORE, IAP_F_CC), IAPDESCR(63H_01H, 0x63, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX ), IAPDESCR(63H_02H, 0x63, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -1112,29 +1143,27 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(78H, 0x78, IAP_M_CORE | IAP_M_SNOOPTYPE, IAP_F_CA | IAP_F_CC2), IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(79H_04H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(79H_08H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | IAP_F_BWX), + IAPDESCR(79H_10H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_18H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(79H_20H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_24H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_30H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | - IAP_F_HWX), + IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1151,10 +1180,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(80H_01H, 0x80, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), IAPDESCR(80H_02H, 0x80, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(80H_03H, 0x80, 0x03, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_CAS), - IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | + IAP_F_IBX | IAP_F_SL), /* SL may have a spec bug two with same entry no cmask */ IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1167,20 +1197,23 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(82H_12H, 0x82, 0x12, IAP_F_FM | IAP_F_CC2), IAPDESCR(82H_40H, 0x82, 0x40, IAP_F_FM | IAP_F_CC2), - IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O), - IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2), + IAPDESCR(83H_01H, 0x83, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SL), + IAPDESCR(83H_02H, 0x83, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SL), IAPDESCR(85H_00H, 0x85, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(85H_01H, 0x85, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(85H_02H, 0x85, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(85H_04H, 0x85, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(85H_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_60H, 0x85, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(85H_80H, 0x85, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7O), @@ -1189,7 +1222,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(87H_00H, 0x87, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(87H_01H, 0x87, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(87H_02H, 0x87, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(87H_04H, 0x87, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1197,18 +1231,19 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(87H_0FH, 0x87, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(88H_00H, 0x88, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_01H, 0x88, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_02H, 0x88, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_04H, 0x88, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_07H, 0x88, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_08H, 0x88, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_10H, 0x88, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_20H, 0x88, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_30H, 0x88, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_40H, 0x88, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_41H, 0x88, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(88H_80H, 0x88, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_81H, 0x88, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_82H, 0x88, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1222,21 +1257,22 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(88H_A0H, 0x88, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_FFH, 0x88, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_00H, 0x89, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_01H, 0x89, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_02H, 0x89, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_04H, 0x89, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_07H, 0x89, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_08H, 0x89, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_10H, 0x89, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_20H, 0x89, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_30H, 0x89, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_40H, 0x89, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_41H, 0x89, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(89H_80H, 0x89, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_81H, 0x89, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_82H, 0x89, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1250,7 +1286,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(89H_A0H, 0x89, 0xA0, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_FFH, 0x89, 0xFF, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -1268,43 +1304,53 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A0H_00H, 0xA0, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(A1H_01H, 0xA1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_02H, 0xA1, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_04H, 0xA1, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_0CH, 0xA1, 0x0C, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_10H, 0xA1, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_20H, 0xA1, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | /* No desc in IB for this*/ - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_30H, 0xA1, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(A1H_40H, 0xA1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A1H_80H, 0xA1, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_02H, 0xA2, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_04H, 0xA2, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(A2H_08H, 0xA2, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(A2H_10H, 0xA2, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX), IAPDESCR(A2H_20H, 0xA2, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(A2H_40H, 0xA2, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1312,17 +1358,30 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB), - IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX), - IAPDESCR(A3H_0CH, 0xA3, 0x08, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(A3H_01H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_SL), + IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL), + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | + IAP_F_SL), + IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL), + IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), + IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), + IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), + IAPDESCR(A6H_02H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_04H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_08H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_10H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_40H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + + IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM ), IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | - IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | + IAP_F_SL), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -1332,35 +1391,40 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(ABH_01H, 0xAB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(ABH_02H, 0xAB, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(ACH_02H, 0xAC, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAPDESCR(ACH_02H, 0xAC, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_SL), IAPDESCR(ACH_08H, 0xAC, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(ACH_0AH, 0xAC, 0x0A, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(AEH_01H, 0xAE, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_00H, 0xB0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B0H_01H, 0xB0, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_02H, 0xB0, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_04H, 0xB0, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B0H_08H, 0xB0, 0x08, IAP_F_FM | IAP_F_WM | IAP_F_I7O | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(B0H_10H, 0xB0, 0x10, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SL), IAPDESCR(B0H_20H, 0xB0, 0x20, IAP_F_FM | IAP_F_I7O), IAPDESCR(B0H_40H, 0xB0, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O), + IAPDESCR(B0H_80H, 0xB0, 0x80, IAP_F_FM | IAP_F_CA | IAP_F_WM | IAP_F_I7O | IAP_F_SL), IAPDESCR(B1H_00H, 0xB1, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(B1H_01H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(B1H_02H, 0xB1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(B1H_02H, 0xB1, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B1H_04H, 0xB1, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_08H, 0xB1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(B1H_10H, 0xB1, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1399,7 +1463,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | - IAP_F_HWX), + IAP_F_HWX |IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1410,19 +1474,20 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(BAH_02H, 0xBA, 0x02, IAP_F_FM | IAP_F_I7O), IAPDESCR(BBH_01H, 0xBB, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), + IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(BCH_28H, 0xBC, 0x28, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(BDH_01H, 0xBD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), /* spec bug SL? */ IAPDESCR(BDH_20H, 0xBD, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1430,12 +1495,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | - IAP_F_CAS | IAP_F_HWX), - IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), + IAPDESCR(C0H_01H, 0xC0, 0x0a, IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_BW | IAP_F_BWX), IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C0H_08H, 0xC0, 0x08, IAP_F_FM | IAP_F_CC2E), @@ -1444,22 +1509,23 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C1H_01H, 0xC1, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C1H_02H, 0xC1, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(C1H_08H, 0xC1, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_10H, 0xC1, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_20H, 0xC1, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(C1H_3FH, 0xC1, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(C2H_01H, 0xC2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C2H_02H, 0xC2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C2H_04H, 0xC2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), IAPDESCR(C2H_07H, 0xC2, 0x07, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1469,41 +1535,41 @@ static struct iap_event_descr iap_events[] = { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Mon Jun 19 15:35:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 806A4D9F34A; Mon, 19 Jun 2017 15:35:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CBE579362; Mon, 19 Jun 2017 15:35:42 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFZfpC004648; Mon, 19 Jun 2017 15:35:41 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFZf3t004647; Mon, 19 Jun 2017 15:35:41 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191535.v5JFZf3t004647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320114 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:35:42 -0000 Author: avg Date: Mon Jun 19 15:35:41 2017 New Revision: 320114 URL: https://svnweb.freebsd.org/changeset/base/320114 Log: MFC r292070: More fixes in the various intel processors, fixing missing IAP_F_FM's... Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:34:07 2017 (r320113) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:35:41 2017 (r320114) @@ -634,20 +634,20 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(03H_10H, 0x03, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | IAP_F_SBX | IAP_F_CAS), IAPDESCR(03H_20H, 0x03, 0x20, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_CAS), - IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_CAS), + IAPDESCR(03H_40H, 0x03, 0x40, IAP_F_FM | IAP_F_CAS), + IAPDESCR(03H_80H, 0x03, 0x80, IAP_F_FM | IAP_F_CAS), IAPDESCR(04H_00H, 0x04, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CAS), IAPDESCR(04H_01H, 0x04, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O | IAP_F_CAS), IAPDESCR(04H_02H, 0x04, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_CAS), + IAPDESCR(04H_04H, 0x04, 0x04, IAP_F_FM | IAP_F_CAS), IAPDESCR(04H_07H, 0x04, 0x07, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(04H_08H, 0x04, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), - IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_CAS), - IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_CAS), - IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_CAS), - IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_CAS), + IAPDESCR(04H_10H, 0x04, 0x10, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_20H, 0x04, 0x20, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_40H, 0x04, 0x40, IAP_F_FM | IAP_F_CAS), + IAPDESCR(04H_80H, 0x04, 0x80, IAP_F_FM | IAP_F_CAS), IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | @@ -690,7 +690,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_08H, 0x08, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(08H_09H, 0x08, 0x09, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(08H_10H, 0x08, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), @@ -700,7 +700,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(08H_81H, 0x08, 0x81, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(08H_82H, 0x08, 0x82, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(08H_84H, 0x08, 0x84, IAP_F_FM | IAP_F_IB | IAP_F_IBX), - IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_IB | IAP_F_IBX), + IAPDESCR(08H_88H, 0x08, 0x88, IAP_F_FM | IAP_F_IB | IAP_F_IBX), IAPDESCR(09H_01H, 0x09, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(09H_02H, 0x09, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), @@ -719,7 +719,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(0DH_03H, 0x0D, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(0DH_80H, 0x0D, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(0DH_80H, 0x0D, 0x80, IAP_F_FM | IAP_F_SL), IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | @@ -830,8 +830,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(24H_38H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), - IAPDESCR(24H_3FH, 0x24, 0x00, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), + IAPDESCR(24H_38H, 0x24, 0x38, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW | IAP_F_HWX | @@ -845,7 +845,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_D8H, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_D8H, 0x24, 0xD8, IAP_F_FM | IAP_F_SL), IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | @@ -853,7 +853,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(24H_EFH, 0x24, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(24H_EFH, 0x24, 0xEF, IAP_F_FM | IAP_F_SL), IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | @@ -923,8 +923,8 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(30H_00H, 0x30, 0x00, IAP_F_CAS), - IAPDESCR(31H_00H, 0x31, 0x00, IAP_F_CAS), + IAPDESCR(30H_00H, 0x30, 0x00, IAP_F_FM | IAP_F_CAS), + IAPDESCR(31H_00H, 0x31, 0x00, IAP_F_FM | IAP_F_CAS), IAPDESCR(32H, 0x32, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_CC), IAPDESCR(32H, 0x32, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), @@ -993,7 +993,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(49H_10H, 0x49, 0x1, IAP_F_FM | IAP_F_I7 | IAP_F_WM | + IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX | @@ -1052,7 +1052,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(59H_20H, 0x59, 0x1, IAP_F_SB | IAP_F_SBX), + IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_80H, 0x59, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1069,22 +1069,22 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ - IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX | IAP_F_IB), + IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB ), /* IB not in manual */ + IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_FM | IAP_F_IBX | IAP_F_IB), IAPDESCR(60H, 0x60, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(60H_01H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_02H, 0x60, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | + IAPDESCR(60H_02H, 0x60, 0x02, IAP_F_FM | IAP_F_WM | IAP_F_I7O | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_04H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAPDESCR(60H_04H, 0x60, 0x04, IAP_F_FM |IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_08H, 0x60, 0x01, IAP_F_FM |IAP_F_I7O | + IAPDESCR(60H_08H, 0x60, 0x08, IAP_F_FM |IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(60H_10H, 0x7, 0x00, IAP_F_SL), + IAPDESCR(60H_10H, 0x60, 0x10, IAP_F_FM | IAP_F_SL), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1114,7 +1114,6 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(67H, 0x67, IAP_M_AGENT | IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(67H, 0x67, IAP_M_AGENT, IAP_F_CC), - IAPDESCR(68H, 0x68, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(69H, 0x69, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(6AH, 0x6A, IAP_M_AGENT | IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -1144,22 +1143,22 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(79H_02H, 0x79, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(79H_04H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_04H, 0x79, 0x04, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_08H, 0x79, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_08H, 0x79, 0x08, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL | IAP_F_BW | IAP_F_BWX), - IAPDESCR(79H_10H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_10H, 0x79, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_18H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_20H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_24H, 0x79, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | + IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(79H_30H, 0x79, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | @@ -1243,7 +1242,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(88H_41H, 0x88, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_7FH, 0x88, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(88H_80H, 0x88, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(88H_80H, 0x88, 0x80, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(88H_81H, 0x88, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(88H_82H, 0x88, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1272,7 +1271,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(89H_41H, 0x89, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_7FH, 0x89, 0x7F, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(89H_80H, 0x89, 0x0, IAP_F_FM | IAP_F_BW | IAP_F_BWX), + IAPDESCR(89H_80H, 0x89, 0x80, IAP_F_FM | IAP_F_BW | IAP_F_BWX), IAPDESCR(89H_81H, 0x89, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(89H_82H, 0x89, 0x82, IAP_F_FM | IAP_F_SB | IAP_F_IB | @@ -1358,25 +1357,25 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(A2H_80H, 0xA2, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(A3H_01H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAPDESCR(A3H_01H, 0xA3, 0x01, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | + IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_SL), IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_SL), IAPDESCR(A3H_06H, 0xA3, 0x06, IAP_F_FM | IAP_F_SL), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | + IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | IAP_F_HW | IAP_F_IB | IAP_F_HWX | IAP_F_SL), IAPDESCR(A3H_0CH, 0xA3, 0x0C, IAP_F_FM | IAP_F_HW | IAP_F_HW | IAP_F_SL), IAPDESCR(A3H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), IAPDESCR(A3H_14H, 0xA3, 0x14, IAP_F_FM | IAP_F_SL), IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SL), - IAPDESCR(A6H_02H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_04H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_08H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_10H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), - IAPDESCR(A6H_40H, 0xA3, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_10H, 0xA3, 0x10, IAP_F_FM | IAP_F_SL), + IAPDESCR(A6H_40H, 0xA3, 0x40, IAP_F_FM | IAP_F_SL), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM ), IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | @@ -1459,7 +1458,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(B4H_04H, 0xB4, 0x04, IAP_F_FM | IAP_F_WM), IAPDESCR(B6H_01H, 0xB6, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_CAS), + IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_FM | IAP_F_CAS), IAPDESCR(B7H_01H, 0xB7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | @@ -1496,7 +1495,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C0H_00H, 0xC0, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(C0H_01H, 0xC0, 0x0a, IAP_F_CA | IAP_F_CC2 | + IAPDESCR(C0H_01H, 0xC0, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1514,9 +1513,9 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), IAPDESCR(C1H_20H, 0xC1, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(C1H_3FH, 0xC1, 0x00, IAP_F_FM | IAP_F_SL), + IAPDESCR(C1H_3FH, 0xC1, 0x3F, IAP_F_FM | IAP_F_SL), IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_IB | IAP_F_IBX), + IAPDESCR(C1H_80H, 0xC1, 0x80, IAP_F_FM |IAP_F_IB | IAP_F_IBX), IAPDESCR(C1H_FEH, 0xC1, 0xFE, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C2H_00H, 0xC2, 0x00, IAP_F_FM | IAP_F_CC), @@ -1542,7 +1541,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C3H_04H, 0xC3, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(C3H_08H, 0xC3, 0x08, IAP_F_CAS), + IAPDESCR(C3H_08H, 0xC3, 0x08, IAP_F_FM | IAP_F_CAS), IAPDESCR(C3H_10H, 0xC3, 0x10, IAP_F_FM | IAP_F_I7O), IAPDESCR(C3H_20H, 0xC3, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), @@ -1570,14 +1569,14 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), IAPDESCR(C4H_40H, 0xC4, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_CAS), - IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_CAS), - IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_CAS), - IAPDESCR(C4H_F7H, 0xC4, 0xF7, IAP_F_CAS), - IAPDESCR(C4H_F9H, 0xC4, 0xF9, IAP_F_CAS), - IAPDESCR(C4H_FBH, 0xC4, 0xFB, IAP_F_CAS), - IAPDESCR(C4H_FDH, 0xC4, 0xFD, IAP_F_CAS), - IAPDESCR(C4H_FEH, 0xC4, 0xFE, IAP_F_CAS), + IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_F7H, 0xC4, 0xF7, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_F9H, 0xC4, 0xF9, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_FBH, 0xC4, 0xFB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_FDH, 0xC4, 0xFD, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C4H_FEH, 0xC4, 0xFE, IAP_F_FM | IAP_F_CAS), IAPDESCR(C5H_00H, 0xC5, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | @@ -1593,14 +1592,14 @@ static struct iap_event_descr iap_events[] = { IAP_F_SBX | IAP_F_IBX), IAPDESCR(C5H_20H, 0xC5, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_SL), - IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_CAS), - IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_CAS), - IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_CAS), - IAPDESCR(C5H_F7H, 0xC5, 0xF7, IAP_F_CAS), - IAPDESCR(C5H_F9H, 0xC5, 0xF9, IAP_F_CAS), - IAPDESCR(C5H_FBH, 0xC5, 0xFB, IAP_F_CAS), - IAPDESCR(C5H_FDH, 0xC5, 0xFD, IAP_F_CAS), - IAPDESCR(C5H_FEH, 0xC5, 0xFE, IAP_F_CAS), + IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_F7H, 0xC5, 0xF7, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_F9H, 0xC5, 0xF9, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_FBH, 0xC5, 0xFB, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_FDH, 0xC5, 0xFD, IAP_F_FM | IAP_F_CAS), + IAPDESCR(C5H_FEH, 0xC5, 0xFE, IAP_F_FM | IAP_F_CAS), IAPDESCR(C6H_00H, 0xC6, 0x00, IAP_F_FM | IAP_F_CC), /* For SL C6_01 needs EV_SEL? 0x11, 0x12, 0x13, 0x14, 0x15? */ @@ -1619,7 +1618,7 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(C7H_10H, 0xC7, 0x10, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SL), IAPDESCR(C7H_1FH, 0xC7, 0x1F, IAP_F_FM | IAP_F_CA | IAP_F_CC2), - IAPDESCR(C7H_20H, 0xC7, 0x0, IAP_F_FM | IAP_F_SL), + IAPDESCR(C7H_20H, 0xC7, 0x20, IAP_F_FM | IAP_F_SL), IAPDESCR(C8H_00H, 0xC8, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(C8H_20H, 0xC8, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1639,11 +1638,11 @@ static struct iap_event_descr iap_events[] = { IAP_F_BW | IAP_F_BWX), IAPDESCR(CAH_10H, 0xCA, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(CAH_1EH, 0xCA, 0x1, IAP_F_FM | IAP_F_SB | IAP_F_IB | + IAPDESCR(CAH_1EH, 0xCA, 0x1E, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX | IAP_F_SL), - IAPDESCR(CAH_20H, 0xCA, 0x0, IAP_F_FM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX), - IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_CAS), - IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_CAS), + IAPDESCR(CAH_20H, 0xCA, 0x20, IAP_F_FM | IAP_F_CAS | IAP_F_BW | IAP_F_BWX), + IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_FM | IAP_F_CAS), + IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_FM | IAP_F_CAS), IAPDESCR(CBH_01H, 0xCB, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_CAS | IAP_F_SL), @@ -1655,7 +1654,7 @@ static struct iap_event_descr iap_events[] = { IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_10H, 0xCB, 0x10, IAP_F_FM | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), - IAPDESCR(CBH_1FH, 0xCB, 0x1F, IAP_F_CAS), + IAPDESCR(CBH_1FH, 0xCB, 0x1F, IAP_F_FM | IAP_F_CAS), IAPDESCR(CBH_40H, 0xCB, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CBH_80H, 0xCB, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1734,11 +1733,11 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_BW | IAP_F_BWX), - IAPDESCR(D3H_03H, 0xD3, 0x03, IAP_F_IBX), + IAPDESCR(D3H_03H, 0xD3, 0x03, IAP_F_FM | IAP_F_IBX), IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), /* Not defined for IBX */ - IAPDESCR(D3H_0CH, 0xD3, 0x0C, IAP_F_IBX), - IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX ), - IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX ), + IAPDESCR(D3H_0CH, 0xD3, 0x0C, IAP_F_FM | IAP_F_IBX), + IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_FM | IAP_F_IBX ), + IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_FM | IAP_F_IBX ), IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM), @@ -1797,12 +1796,12 @@ static struct iap_event_descr iap_events[] = { IAPDESCR(E6H_01H, 0xE6, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SBX | IAP_F_CAS | IAP_F_SL), IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), - IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), + IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_FM | IAP_F_CAS), + IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_FM | IAP_F_CAS), IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), + IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_FM | IAP_F_CAS), IAPDESCR(E8H_01H, 0xE8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E8H_02H, 0xE8, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), From owner-svn-src-stable@freebsd.org Mon Jun 19 15:38:23 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B78A2D9F40C; Mon, 19 Jun 2017 15:38:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85EB079514; Mon, 19 Jun 2017 15:38:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFcMFh004834; Mon, 19 Jun 2017 15:38:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFcMDn004833; Mon, 19 Jun 2017 15:38:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191538.v5JFcMDn004833@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:38:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320115 - stable/10/sys/dev/hwpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:38:23 -0000 Author: avg Date: Mon Jun 19 15:38:22 2017 New Revision: 320115 URL: https://svnweb.freebsd.org/changeset/base/320115 Log: MFC r311224: Fix PMC architecture check to handle later IPAs including Skylake Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:35:41 2017 (r320114) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Mon Jun 19 15:38:22 2017 (r320115) @@ -2857,7 +2857,7 @@ pmc_core_initialize(struct pmc_mdep *md, int maxcpu, i PMCDBG3(MDP,INI,1,"core-init cputype=%d ncpu=%d ipa-version=%d", core_cputype, maxcpu, ipa_version); - if (ipa_version < 1 || ipa_version > 3 || + if (ipa_version < 1 || ipa_version > 4 || (core_cputype != PMC_CPU_INTEL_CORE && ipa_version == 1)) { /* Unknown PMC architecture. */ printf("hwpc_core: unknown PMC architecture: %d\n", From owner-svn-src-stable@freebsd.org Mon Jun 19 15:41:41 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0FFB5D9F4E4; Mon, 19 Jun 2017 15:41:41 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D43447984D; Mon, 19 Jun 2017 15:41:40 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFfeXl007113; Mon, 19 Jun 2017 15:41:40 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFfe1v007112; Mon, 19 Jun 2017 15:41:40 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706191541.v5JFfe1v007112@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Mon, 19 Jun 2017 15:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320116 - stable/10/sys/dev/vmware/vmxnet3 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:41:41 -0000 Author: avg Date: Mon Jun 19 15:41:39 2017 New Revision: 320116 URL: https://svnweb.freebsd.org/changeset/base/320116 Log: MFC r318867: fix vmxnet3 crash when LRO is enabled Sponsored by: Panzura Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/vmware/vmxnet3/if_vmx.c ============================================================================== --- stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 15:38:22 2017 (r320115) +++ stable/10/sys/dev/vmware/vmxnet3/if_vmx.c Mon Jun 19 15:41:39 2017 (r320116) @@ -2194,6 +2194,20 @@ vmxnet3_rxq_eof(struct vmxnet3_rxqueue *rxq) } else { KASSERT(rxd->btype == VMXNET3_BTYPE_BODY, ("%s: non start of frame w/o body buffer", __func__)); + + if (m_head == NULL && m_tail == NULL) { + /* + * This is a continuation of a packet that we + * started to drop, but could not drop entirely + * because this segment was still owned by the + * host. So, drop the remainder now. + */ + vmxnet3_rxq_eof_discard(rxq, rxr, idx); + if (!rxcd->eop) + vmxnet3_rxq_discard_chain(rxq); + goto nextp; + } + KASSERT(m_head != NULL, ("%s: frame not started?", __func__)); From owner-svn-src-stable@freebsd.org Mon Jun 19 15:56:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 941ADD9FB64; Mon, 19 Jun 2017 15:56:04 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63EA07A0BF; Mon, 19 Jun 2017 15:56:04 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5JFu344012664; Mon, 19 Jun 2017 15:56:03 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5JFu3tu012663; Mon, 19 Jun 2017 15:56:03 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201706191556.v5JFu3tu012663@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 19 Jun 2017 15:56:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320117 - stable/10/sys/dev/e1000 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 15:56:04 -0000 Author: sbruno Date: Mon Jun 19 15:56:03 2017 New Revision: 320117 URL: https://svnweb.freebsd.org/changeset/base/320117 Log: Direct commit to stable/10 to correctly setting the EIAC and IMS registers to the same values when processing interrupts. This resolves PR https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211219 PR: 211219 Submitted by: Franco Fitchner Modified: stable/10/sys/dev/e1000/if_em.c Modified: stable/10/sys/dev/e1000/if_em.c ============================================================================== --- stable/10/sys/dev/e1000/if_em.c Mon Jun 19 15:41:39 2017 (r320116) +++ stable/10/sys/dev/e1000/if_em.c Mon Jun 19 15:56:03 2017 (r320117) @@ -5158,7 +5158,7 @@ em_enable_intr(struct adapter *adapter) if (hw->mac.type == e1000_82574) { E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK); - ims_mask |= adapter->ims; + ims_mask |= EM_MSIX_MASK; } E1000_WRITE_REG(hw, E1000_IMS, ims_mask); } From owner-svn-src-stable@freebsd.org Mon Jun 19 22:38:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29860DA62EA for ; Mon, 19 Jun 2017 22:38:00 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-vk0-x22e.google.com (mail-vk0-x22e.google.com [IPv6:2607:f8b0:400c:c05::22e]) (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 D6D3B2684 for ; Mon, 19 Jun 2017 22:37:59 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-vk0-x22e.google.com with SMTP id y70so60270181vky.3 for ; Mon, 19 Jun 2017 15:37:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZWniBZJM86/s2QcywCqWjkANXcJb4hYKKWR/LDF49vo=; b=Cdv8iWkbYwWqC4H8M9po8B9tTtomEVRKKHBjGNInH2iRhoTO5zQqbOFJ/uEBd2CrX5 5OfQUM1ucMmjpbKPNe+JC+Ww8utQ/B9NT9O7nalfnfZmCREF1yIWZ/ACdmAPc1NAIqih F+nHigrVi4BhBDQiN+CivwEl6IMVolGMRL3wNVggdsLYqVMhi6HJdfRtzHJEl9YJeS5a 3jcW9Ano2ig0BTOo6bnQDcGohzcGF8TGIXGqAilqB/g3cyPT16L2qmL1h6yx9B8EOx3X x4cfpr6ofCmBg1AuPITlSsg9f7Mue8A+S2xzKt35UD9S5wQD2OnYGo0Ky2QTH5F2ITgL JqDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZWniBZJM86/s2QcywCqWjkANXcJb4hYKKWR/LDF49vo=; b=FXWg3RAOMlbXBgitUz5zz9ehvOfG3RvEOXDNVgSBSJ9zOZ8nt1ikBJ4clrQhbq41MW muuOupEcesmh46Z+Rg7qib3qdHLGj3bWzKKwHcGM6qIurhGNgzy7wpJtg0TwDBUEtO4r vTB6dDmFEgAriiETfzxM638fTLgCw7W9SjmVGIVkKby3d/YwitwfSH6+1Zg6ddRuthxw ywqmL2E0yXdQaHtxWnOKJ/0AXki5rnfs8zHatg5mB1ZLPehBSyUVYjaskKiYlzOkqZFz kADC8O6JKnMXREUuXglH2YGOVUh2JISx6dAB6oDL1APNpVqyl2n9a0q+/soOld6W4nnH X/XQ== X-Gm-Message-State: AKS2vOxiMenBDyvj7wERQGk7yDSrg00seAcPizFWigslG0AjNe8YaAxl HBSnk0+0u8z9c79IMX/8RYce0S1Vwpvi X-Received: by 10.31.69.138 with SMTP id s132mr15543476vka.13.1497911878961; Mon, 19 Jun 2017 15:37:58 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.36.195 with HTTP; Mon, 19 Jun 2017 15:37:58 -0700 (PDT) In-Reply-To: <5514A07B.70302@FreeBSD.org> References: <201503242000.t2OK0Cbg065573@svn.freebsd.org> <5514A07B.70302@FreeBSD.org> From: Oliver Pinter Date: Tue, 20 Jun 2017 00:37:58 +0200 Message-ID: Subject: Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy To: John Baldwin , avg@freebsd.org Cc: Randall Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jun 2017 22:38:00 -0000 On 3/27/15, John Baldwin wrote: > On 3/24/15 1:00 PM, Randall Stewart wrote: >> Author: rrs >> Date: Tue Mar 24 20:00:11 2015 >> New Revision: 280455 >> URL: https://svnweb.freebsd.org/changeset/base/280455 >> >> Log: >> MFC of r277177 and r279894 with the fixes for the PMC for Haswell. >> >> Sponsored by: Netflix Inc. >> >> Added: >> stable/10/usr.sbin/pmcstudy/ >> - copied from r277177, head/usr.sbin/pmcstudy/ >> Modified: >> stable/10/lib/libpmc/libpmc.c >> stable/10/sys/amd64/conf/GENERIC Hi! The MFC of 279833 was missing from this commit. I'm CCing avg@, since he made a big bunch of hwpmc related MFCs yesterday. > > The change to GENERIC looks like it slipped in by accident? Neither of the > commits to HEAD enabled hwpmc in GENERIC AFAICT. > > -- > John Baldwin > _______________________________________________ > svn-src-stable-10@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 > To unsubscribe, send any mail to > "svn-src-stable-10-unsubscribe@freebsd.org" > From owner-svn-src-stable@freebsd.org Tue Jun 20 05:57:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADBC2D9093C; Tue, 20 Jun 2017 05:57:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86B2175118; Tue, 20 Jun 2017 05:57:29 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5K5vSZU061276; Tue, 20 Jun 2017 05:57:28 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K5vS9Z061274; Tue, 20 Jun 2017 05:57:28 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201706200557.v5K5vS9Z061274@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Tue, 20 Jun 2017 05:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320134 - stable/11/sys/net X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 05:57:29 -0000 Author: ae Date: Tue Jun 20 05:57:28 2017 New Revision: 320134 URL: https://svnweb.freebsd.org/changeset/base/320134 Log: MFC r319895: Resurrect RTF_RNH_LOCKED flag and restore ability to call rtalloc1_fib() with acquired RIB lock. This fixes a possible panic due to trying to acquire RIB rlock when it is already exclusive locked. PR: 215963, 215122 Sponsored by: Yandex LLC Approved by: re (delphij) Modified: stable/11/sys/net/route.c stable/11/sys/net/route.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/net/route.c ============================================================================== --- stable/11/sys/net/route.c Tue Jun 20 04:58:12 2017 (r320133) +++ stable/11/sys/net/route.c Tue Jun 20 05:57:28 2017 (r320134) @@ -454,18 +454,23 @@ rtalloc1_fib(struct sockaddr *dst, int report, u_long /* * Look up the address in the table for that Address Family */ - RIB_RLOCK(rh); + if ((ignflags & RTF_RNH_LOCKED) == 0) + RIB_RLOCK(rh); +#ifdef INVARIANTS + else + RIB_LOCK_ASSERT(rh); +#endif rn = rh->rnh_matchaddr(dst, &rh->head); if (rn && ((rn->rn_flags & RNF_ROOT) == 0)) { newrt = RNTORT(rn); RT_LOCK(newrt); RT_ADDREF(newrt); - RIB_RUNLOCK(rh); + if ((ignflags & RTF_RNH_LOCKED) == 0) + RIB_RUNLOCK(rh); return (newrt); - } else + } else if ((ignflags & RTF_RNH_LOCKED) == 0) RIB_RUNLOCK(rh); - /* * Either we hit the root or could not find any match, * which basically means: "cannot get there from here". @@ -748,7 +753,9 @@ ifa_ifwithroute(int flags, const struct sockaddr *dst, if (ifa == NULL) ifa = ifa_ifwithnet(gateway, 0, fibnum); if (ifa == NULL) { - struct rtentry *rt = rtalloc1_fib(gateway, 0, 0, fibnum); + struct rtentry *rt; + + rt = rtalloc1_fib(gateway, 0, flags, fibnum); if (rt == NULL) return (NULL); /* @@ -1838,8 +1845,13 @@ rtrequest1_fib_change(struct rib_head *rnh, struct rt_ info->rti_info[RTAX_IFP] != NULL || (info->rti_info[RTAX_IFA] != NULL && !sa_equal(info->rti_info[RTAX_IFA], rt->rt_ifa->ifa_addr))) { - + /* + * XXX: Temporarily set RTF_RNH_LOCKED flag in the rti_flags + * to avoid rlock in the ifa_ifwithroute(). + */ + info->rti_flags |= RTF_RNH_LOCKED; error = rt_getifa_fib(info, fibnum); + info->rti_flags &= ~RTF_RNH_LOCKED; if (info->rti_ifa != NULL) free_ifa = 1; Modified: stable/11/sys/net/route.h ============================================================================== --- stable/11/sys/net/route.h Tue Jun 20 04:58:12 2017 (r320133) +++ stable/11/sys/net/route.h Tue Jun 20 05:57:28 2017 (r320134) @@ -189,7 +189,7 @@ struct rtentry { /* 0x8000000 and up unassigned */ #define RTF_STICKY 0x10000000 /* always route dst->src */ -#define RTF_RNH_LOCKED 0x40000000 /* unused */ +#define RTF_RNH_LOCKED 0x40000000 /* radix node head is locked */ #define RTF_GWFLAG_COMPAT 0x80000000 /* a compatibility bit for interacting with existing routing apps */ From owner-svn-src-stable@freebsd.org Tue Jun 20 08:01:14 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C280ED923C2; Tue, 20 Jun 2017 08:01:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E449780CA; Tue, 20 Jun 2017 08:01:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5K81DS6012509; Tue, 20 Jun 2017 08:01:13 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5K81DZ0012508; Tue, 20 Jun 2017 08:01:13 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201706200801.v5K81DZ0012508@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 20 Jun 2017 08:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320137 - stable/10/lib/libpmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 08:01:14 -0000 Author: avg Date: Tue Jun 20 08:01:13 2017 New Revision: 320137 URL: https://svnweb.freebsd.org/changeset/base/320137 Log: MFC r279833: Use the correct event table for Haswell Xeon events Modified: stable/10/lib/libpmc/libpmc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/libpmc.c ============================================================================== --- stable/10/lib/libpmc/libpmc.c Tue Jun 20 07:25:38 2017 (r320136) +++ stable/10/lib/libpmc/libpmc.c Tue Jun 20 08:01:13 2017 (r320137) @@ -341,7 +341,7 @@ PMC_CLASS_TABLE_DESC(core2, IAP, core2, iap); 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(broadwell, IAP, broadwell, iap); PMC_CLASS_TABLE_DESC(broadwell_xeon, IAP, broadwell_xeon, iap); PMC_CLASS_TABLE_DESC(skylake, IAP, skylake, iap); From owner-svn-src-stable@freebsd.org Tue Jun 20 08:03:17 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2FE09D92534; Tue, 20 Jun 2017 08:03:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 763E3782D8; Tue, 20 Jun 2017 08:03:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA17596; Tue, 20 Jun 2017 11:03:06 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1dNE7u-000NPq-Ny; Tue, 20 Jun 2017 11:03:06 +0300 Subject: Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy To: Oliver Pinter , John Baldwin Cc: Randall Stewart , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-stable@FreeBSD.org, svn-src-stable-10@FreeBSD.org References: <201503242000.t2OK0Cbg065573@svn.freebsd.org> <5514A07B.70302@FreeBSD.org> From: Andriy Gapon Message-ID: <322387f5-c7ae-9646-bb7b-6ac6e5478fd9@FreeBSD.org> Date: Tue, 20 Jun 2017 11:02:10 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 08:03:17 -0000 On 20/06/2017 01:37, Oliver Pinter wrote: > On 3/27/15, John Baldwin wrote: >> On 3/24/15 1:00 PM, Randall Stewart wrote: >>> Author: rrs >>> Date: Tue Mar 24 20:00:11 2015 >>> New Revision: 280455 >>> URL: https://svnweb.freebsd.org/changeset/base/280455 >>> >>> Log: >>> MFC of r277177 and r279894 with the fixes for the PMC for Haswell. >>> >>> Sponsored by: Netflix Inc. >>> >>> Added: >>> stable/10/usr.sbin/pmcstudy/ >>> - copied from r277177, head/usr.sbin/pmcstudy/ >>> Modified: >>> stable/10/lib/libpmc/libpmc.c >>> stable/10/sys/amd64/conf/GENERIC > > Hi! > > The MFC of 279833 was missing from this commit. I'm CCing avg@, since > he made a big bunch of hwpmc related MFCs yesterday. I've just merged that commit. Thank you all. >> >> The change to GENERIC looks like it slipped in by accident? Neither of the >> commits to HEAD enabled hwpmc in GENERIC AFAICT. -- Andriy Gapon From owner-svn-src-stable@freebsd.org Tue Jun 20 12:40:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E2B41D97C89; Tue, 20 Jun 2017 12:40:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFF89800F2; Tue, 20 Jun 2017 12:40:26 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KCePcf023686; Tue, 20 Jun 2017 12:40:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KCePoR023685; Tue, 20 Jun 2017 12:40:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706201240.v5KCePoR023685@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Jun 2017 12:40:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320144 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 12:40:27 -0000 Author: kib Date: Tue Jun 20 12:40:25 2017 New Revision: 320144 URL: https://svnweb.freebsd.org/changeset/base/320144 Log: MFC r319916: Remove stray return. Approved by: re (marius) Modified: stable/11/sys/kern/subr_prf.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/subr_prf.c ============================================================================== --- stable/11/sys/kern/subr_prf.c Tue Jun 20 12:31:58 2017 (r320143) +++ stable/11/sys/kern/subr_prf.c Tue Jun 20 12:40:25 2017 (r320144) @@ -377,7 +377,6 @@ log_console(struct uio *uio) msgbuftrigger = 1; free(uio, M_IOV); free(consbuffer, M_TEMP); - return; } int From owner-svn-src-stable@freebsd.org Tue Jun 20 15:03:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AB614D9A9FC; Tue, 20 Jun 2017 15:03:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B2E41A08; Tue, 20 Jun 2017 15:03:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KF2xw8088506; Tue, 20 Jun 2017 15:02:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KF2xVt088505; Tue, 20 Jun 2017 15:02:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706201502.v5KF2xVt088505@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 20 Jun 2017 15:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320147 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:03:00 -0000 Author: kib Date: Tue Jun 20 15:02:59 2017 New Revision: 320147 URL: https://svnweb.freebsd.org/changeset/base/320147 Log: MFC r319916: Remove stray return. Modified: stable/10/sys/kern/subr_prf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_prf.c ============================================================================== --- stable/10/sys/kern/subr_prf.c Tue Jun 20 14:35:19 2017 (r320146) +++ stable/10/sys/kern/subr_prf.c Tue Jun 20 15:02:59 2017 (r320147) @@ -374,7 +374,6 @@ log_console(struct uio *uio) msgbuftrigger = 1; free(uio, M_IOV); free(consbuffer, M_TEMP); - return; } int From owner-svn-src-stable@freebsd.org Tue Jun 20 15:10:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56D47D9AB11; Tue, 20 Jun 2017 15:10:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 263451D87; Tue, 20 Jun 2017 15:10:15 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KFAEIF089064; Tue, 20 Jun 2017 15:10:14 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KFAE9g089063; Tue, 20 Jun 2017 15:10:14 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706201510.v5KFAE9g089063@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 20 Jun 2017 15:10:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320148 - stable/11/usr.bin/netstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:10:15 -0000 Author: jhb Date: Tue Jun 20 15:10:14 2017 New Revision: 320148 URL: https://svnweb.freebsd.org/changeset/base/320148 Log: MFC 318996: Add descriptions for AES-GCM IPSec authentication (AH) counters. Approved by: re (gjb) Sponsored by: Chelsio Communications Modified: stable/11/usr.bin/netstat/ipsec.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/netstat/ipsec.c ============================================================================== --- stable/11/usr.bin/netstat/ipsec.c Tue Jun 20 15:02:59 2017 (r320147) +++ stable/11/usr.bin/netstat/ipsec.c Tue Jun 20 15:10:14 2017 (r320148) @@ -141,6 +141,15 @@ static struct val2str ipsec_ahnames[] = { #ifdef SADB_X_AALG_AES_XCBC_MAC { SADB_X_AALG_AES_XCBC_MAC, "aes-xcbc-mac", }, #endif +#ifdef SADB_X_AALG_AES128GMAC + { SADB_X_AALG_AES128GMAC, "aes-gmac-128", }, +#endif +#ifdef SADB_X_AALG_AES192GMAC + { SADB_X_AALG_AES192GMAC, "aes-gmac-192", }, +#endif +#ifdef SADB_X_AALG_AES256GMAC + { SADB_X_AALG_AES256GMAC, "aes-gmac-256", }, +#endif { -1, NULL }, }; From owner-svn-src-stable@freebsd.org Tue Jun 20 15:55:16 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AC287D9BE0B; Tue, 20 Jun 2017 15:55:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7975A64130; Tue, 20 Jun 2017 15:55:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KFtFx8009668; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KFtFWE009666; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706201555.v5KFtFWE009666@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 20 Jun 2017 15:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320150 - in stable: 10 10/lib/libc/sys 11 11/lib/libc/sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:55:16 -0000 Author: jhb Date: Tue Jun 20 15:55:15 2017 New Revision: 320150 URL: https://svnweb.freebsd.org/changeset/base/320150 Log: MFC 319490: Remove stale cap_rights_get(2) manpage. The documentation moved to section 3 several years ago, but 'man cap_rights_get' pulls up cap_rights_limit(2) (which is MLINKed to cap_rights_get.2) instead of cap_rights_get(3). Approved by: re (gjb) Modified: stable/11/ObsoleteFiles.inc stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/ObsoleteFiles.inc stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/11/ObsoleteFiles.inc ============================================================================== --- stable/11/ObsoleteFiles.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/11/ObsoleteFiles.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170620: remove stale manpage +OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz # 20170531: remove pcap-int.h OLD_FILES+=usr/include/pcap-int.h # 20170402: new libc++ import which bumps version from 3.9.1 to 4.0.0. Modified: stable/11/lib/libc/sys/Makefile.inc ============================================================================== --- stable/11/lib/libc/sys/Makefile.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/11/lib/libc/sys/Makefile.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -337,7 +337,6 @@ MLINKS+=brk.2 sbrk.2 MLINKS+=cap_enter.2 cap_getmode.2 MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 MLINKS+=cap_ioctls_limit.2 cap_ioctls_get.2 -MLINKS+=cap_rights_limit.2 cap_rights_get.2 MLINKS+=chdir.2 fchdir.2 MLINKS+=chflags.2 chflagsat.2 \ chflags.2 fchflags.2 \ From owner-svn-src-stable@freebsd.org Tue Jun 20 15:55:16 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B858D9BE07; Tue, 20 Jun 2017 15:55:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28EFF6412F; Tue, 20 Jun 2017 15:55:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KFtFEh009661; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KFtFVr009659; Tue, 20 Jun 2017 15:55:15 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706201555.v5KFtFVr009659@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 20 Jun 2017 15:55:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320150 - in stable: 10 10/lib/libc/sys 11 11/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 15:55:16 -0000 Author: jhb Date: Tue Jun 20 15:55:15 2017 New Revision: 320150 URL: https://svnweb.freebsd.org/changeset/base/320150 Log: MFC 319490: Remove stale cap_rights_get(2) manpage. The documentation moved to section 3 several years ago, but 'man cap_rights_get' pulls up cap_rights_limit(2) (which is MLINKed to cap_rights_get.2) instead of cap_rights_get(3). Approved by: re (gjb) Modified: stable/10/ObsoleteFiles.inc stable/10/lib/libc/sys/Makefile.inc Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/11/ObsoleteFiles.inc stable/11/lib/libc/sys/Makefile.inc Directory Properties: stable/11/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/10/ObsoleteFiles.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20170620: remove stale manpage +OLD_FILES+=usr/share/man/man2/cap_rights_get.2.gz # 20170322: rename to _test to match the FreeBSD test suite name scheme OLD_FILES+=usr/tests/usr.bin/col/col OLD_FILES+=usr/tests/usr.sbin/pw/pw_config Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Tue Jun 20 15:51:09 2017 (r320149) +++ stable/10/lib/libc/sys/Makefile.inc Tue Jun 20 15:55:15 2017 (r320150) @@ -340,7 +340,6 @@ MLINKS+=brk.2 sbrk.2 MLINKS+=cap_enter.2 cap_getmode.2 MLINKS+=cap_fcntls_limit.2 cap_fcntls_get.2 MLINKS+=cap_ioctls_limit.2 cap_ioctls_get.2 -MLINKS+=cap_rights_limit.2 cap_rights_get.2 MLINKS+=chdir.2 fchdir.2 MLINKS+=chflags.2 chflagsat.2 \ chflags.2 fchflags.2 \ From owner-svn-src-stable@freebsd.org Tue Jun 20 16:13:13 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F7E1D9C35D; Tue, 20 Jun 2017 16:13:13 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25A8F64DAB; Tue, 20 Jun 2017 16:13:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v5KGDBJv089742; Tue, 20 Jun 2017 09:13:11 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v5KGDBuv089741; Tue, 20 Jun 2017 09:13:11 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201706201613.v5KGDBuv089741@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320099 - stable/11/sys/dev/vmware/vmxnet3 In-Reply-To: <201706191445.v5JEjKHE082982@repo.freebsd.org> To: Andriy Gapon Date: Tue, 20 Jun 2017 09:13:11 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:13:13 -0000 > Author: avg > Date: Mon Jun 19 14:45:20 2017 > New Revision: 320099 > URL: https://svnweb.freebsd.org/changeset/base/320099 > > Log: > MFC r318867: fix vmxnet3 crash when LRO is enabled > > The crash can occur when all of the following conditions are true: > - a packet consists of multiple segments (requires LRO enabled) > - there has been a failure to allocate an mbuf for the packet and > the packet has to be dropped > - a host (vmware) still owned at least one segment of the packet, > so the driver had to wait for another interrupt to proceed to > discarding the remaining segment(s) > > Reviewed by: rstone > Approved by: re (gjb) > Sponsored by: Panzura Does this same bug exist in 10.x? If so does it make since to merge this back to 10.x? -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Tue Jun 20 16:14:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F7AAD9C3F8; Tue, 20 Jun 2017 16:14:59 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C0B664EF6; Tue, 20 Jun 2017 16:14:58 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id v5KGEvsv089755; Tue, 20 Jun 2017 09:14:57 -0700 (PDT) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id v5KGEvrY089754; Tue, 20 Jun 2017 09:14:57 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201706201614.v5KGEvrY089754@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r320116 - stable/10/sys/dev/vmware/vmxnet3 In-Reply-To: <201706191541.v5JFfe1v007112@repo.freebsd.org> To: Andriy Gapon Date: Tue, 20 Jun 2017 09:14:57 -0700 (PDT) CC: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 16:14:59 -0000 [ Charset UTF-8 unsupported, converting... ] > Author: avg > Date: Mon Jun 19 15:41:39 2017 > New Revision: 320116 > URL: https://svnweb.freebsd.org/changeset/base/320116 > > Log: > MFC r318867: fix vmxnet3 crash when LRO is enabled > > Sponsored by: Panzura Ignore my other email, I see it does and you did, thank you! -- Rod Grimes rgrimes@freebsd.org From owner-svn-src-stable@freebsd.org Tue Jun 20 17:03:07 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD45BD9D2C8; Tue, 20 Jun 2017 17:03:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86E4766B70; Tue, 20 Jun 2017 17:03:07 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KH3648038867; Tue, 20 Jun 2017 17:03:06 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KH36Z1038866; Tue, 20 Jun 2017 17:03:06 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706201703.v5KH36Z1038866@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 20 Jun 2017 17:03:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320154 - stable/10/sys/dev/md X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 17:03:07 -0000 Author: markj Date: Tue Jun 20 17:03:06 2017 New Revision: 320154 URL: https://svnweb.freebsd.org/changeset/base/320154 Log: MFC r319932: Fix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs. Modified: stable/10/sys/dev/md/md.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/md/md.c ============================================================================== --- stable/10/sys/dev/md/md.c Tue Jun 20 16:55:30 2017 (r320153) +++ stable/10/sys/dev/md/md.c Tue Jun 20 17:03:06 2017 (r320154) @@ -963,6 +963,16 @@ unmapped_step: return (error); } +static void +md_swap_page_free(vm_page_t m) +{ + + vm_page_xunbusy(m); + vm_page_lock(m); + vm_page_free(m); + vm_page_unlock(m); +} + static int mdstart_swap(struct md_s *sc, struct bio *bp) { @@ -1034,14 +1044,16 @@ mdstart_swap(struct md_s *sc, struct bio *bp) cpu_flush_dcache(p, len); } } else if (bp->bio_cmd == BIO_WRITE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(sc->object, &m, 1, 0); - else + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) rv = VM_PAGER_OK; + else + rv = vm_pager_get_pages(sc->object, &m, 1, 0); if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } + } else if (rv == VM_PAGER_FAIL) + pmap_zero_page(m); + if ((bp->bio_flags & BIO_UNMAPPED) != 0) { pmap_copy_pages(bp->bio_ma, ma_offs, &m, offs, len); @@ -1051,33 +1063,39 @@ mdstart_swap(struct md_s *sc, struct bio *bp) } else { physcopyin(p, VM_PAGE_TO_PHYS(m) + offs, len); } + m->valid = VM_PAGE_BITS_ALL; + vm_page_dirty(m); + vm_pager_page_unswapped(m); } else if (bp->bio_cmd == BIO_DELETE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) - rv = vm_pager_get_pages(sc->object, &m, 1, 0); - else + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) rv = VM_PAGER_OK; + else + rv = vm_pager_get_pages(sc->object, &m, 1, 0); if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } - if (len != PAGE_SIZE) { - pmap_zero_page_area(m, offs, len); - vm_page_clear_dirty(m, offs, len); - m->valid = VM_PAGE_BITS_ALL; - } else + } else if (rv == VM_PAGER_FAIL) { + md_swap_page_free(m); + m = NULL; + } else { + /* Page is valid. */ + if (len != PAGE_SIZE) { + pmap_zero_page_area(m, offs, len); + vm_page_dirty(m); + } vm_pager_page_unswapped(m); + if (len == PAGE_SIZE) { + md_swap_page_free(m); + m = NULL; + } + } } - vm_page_xunbusy(m); - vm_page_lock(m); - if (bp->bio_cmd == BIO_DELETE && len == PAGE_SIZE) - vm_page_free(m); - else + if (m != NULL) { + vm_page_xunbusy(m); + vm_page_lock(m); vm_page_activate(m); - vm_page_unlock(m); - if (bp->bio_cmd == BIO_WRITE) { - vm_page_dirty(m); - vm_pager_page_unswapped(m); + vm_page_unlock(m); } /* Actions on further pages start at offset 0 */ From owner-svn-src-stable@freebsd.org Tue Jun 20 17:38:27 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61466D9DBF8; Tue, 20 Jun 2017 17:38:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25AE367BC6; Tue, 20 Jun 2017 17:38:27 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KHcQ5a051183; Tue, 20 Jun 2017 17:38:26 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KHcQPm051182; Tue, 20 Jun 2017 17:38:26 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706201738.v5KHcQPm051182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Tue, 20 Jun 2017 17:38:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320155 - stable/11/sys/dev/md X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 17:38:27 -0000 Author: markj Date: Tue Jun 20 17:38:25 2017 New Revision: 320155 URL: https://svnweb.freebsd.org/changeset/base/320155 Log: MFC r319932: Fix handling of subpage BIO_WRITE and BIO_DELETE requests on swap MDs. Approved by: re (gjb) Modified: stable/11/sys/dev/md/md.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/md/md.c ============================================================================== --- stable/11/sys/dev/md/md.c Tue Jun 20 17:03:06 2017 (r320154) +++ stable/11/sys/dev/md/md.c Tue Jun 20 17:38:25 2017 (r320155) @@ -969,6 +969,16 @@ unmapped_step: return (error); } +static void +md_swap_page_free(vm_page_t m) +{ + + vm_page_xunbusy(m); + vm_page_lock(m); + vm_page_free(m); + vm_page_unlock(m); +} + static int mdstart_swap(struct md_s *sc, struct bio *bp) { @@ -1041,15 +1051,17 @@ mdstart_swap(struct md_s *sc, struct bio *bp) cpu_flush_dcache(p, len); } } else if (bp->bio_cmd == BIO_WRITE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) + rv = VM_PAGER_OK; + else rv = vm_pager_get_pages(sc->object, &m, 1, NULL, NULL); - else - rv = VM_PAGER_OK; if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } + } else if (rv == VM_PAGER_FAIL) + pmap_zero_page(m); + if ((bp->bio_flags & BIO_UNMAPPED) != 0) { pmap_copy_pages(bp->bio_ma, ma_offs, &m, offs, len); @@ -1059,34 +1071,40 @@ mdstart_swap(struct md_s *sc, struct bio *bp) } else { physcopyin(p, VM_PAGE_TO_PHYS(m) + offs, len); } + m->valid = VM_PAGE_BITS_ALL; + vm_page_dirty(m); + vm_pager_page_unswapped(m); } else if (bp->bio_cmd == BIO_DELETE) { - if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) + if (len == PAGE_SIZE || m->valid == VM_PAGE_BITS_ALL) + rv = VM_PAGER_OK; + else rv = vm_pager_get_pages(sc->object, &m, 1, NULL, NULL); - else - rv = VM_PAGER_OK; if (rv == VM_PAGER_ERROR) { vm_page_xunbusy(m); break; - } - if (len != PAGE_SIZE) { - pmap_zero_page_area(m, offs, len); - vm_page_clear_dirty(m, offs, len); - m->valid = VM_PAGE_BITS_ALL; - } else + } else if (rv == VM_PAGER_FAIL) { + md_swap_page_free(m); + m = NULL; + } else { + /* Page is valid. */ + if (len != PAGE_SIZE) { + pmap_zero_page_area(m, offs, len); + vm_page_dirty(m); + } vm_pager_page_unswapped(m); + if (len == PAGE_SIZE) { + md_swap_page_free(m); + m = NULL; + } + } } - vm_page_xunbusy(m); - vm_page_lock(m); - if (bp->bio_cmd == BIO_DELETE && len == PAGE_SIZE) - vm_page_free(m); - else + if (m != NULL) { + vm_page_xunbusy(m); + vm_page_lock(m); vm_page_activate(m); - vm_page_unlock(m); - if (bp->bio_cmd == BIO_WRITE) { - vm_page_dirty(m); - vm_pager_page_unswapped(m); + vm_page_unlock(m); } /* Actions on further pages start at offset 0 */ From owner-svn-src-stable@freebsd.org Tue Jun 20 18:52:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B7F11D9F68E; Tue, 20 Jun 2017 18:52:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CBE36EB71; Tue, 20 Jun 2017 18:52:37 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KIqaZ0083331; Tue, 20 Jun 2017 18:52:36 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KIqZ7f083322; Tue, 20 Jun 2017 18:52:35 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706201852.v5KIqZ7f083322@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 20 Jun 2017 18:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320162 - stable/10/sys/dev/qlnx/qlnxe X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 18:52:37 -0000 Author: davidcs Date: Tue Jun 20 18:52:35 2017 New Revision: 320162 URL: https://svnweb.freebsd.org/changeset/base/320162 Log: MFC r319964 Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0 Add support for pci deviceID 0x8070 for QLE41xxx product line which supports 10GbE/25GbE/40GbE Modified: stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h stable/10/sys/dev/qlnx/qlnxe/common_hsi.h stable/10/sys/dev/qlnx/qlnxe/ecore.h stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_values.h stable/10/sys/dev/qlnx/qlnxe/ecore_dcbx.c stable/10/sys/dev/qlnx/qlnxe/ecore_dcbx.h stable/10/sys/dev/qlnx/qlnxe/ecore_dev.c stable/10/sys/dev/qlnx/qlnxe/ecore_dev_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_gtt_reg_addr.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_common.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h stable/10/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h stable/10/sys/dev/qlnx/qlnxe/ecore_hw.c stable/10/sys/dev/qlnx/qlnxe/ecore_hw.h stable/10/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c stable/10/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h stable/10/sys/dev/qlnx/qlnxe/ecore_init_ops.c stable/10/sys/dev/qlnx/qlnxe/ecore_init_ops.h stable/10/sys/dev/qlnx/qlnxe/ecore_init_values.h stable/10/sys/dev/qlnx/qlnxe/ecore_int.c stable/10/sys/dev/qlnx/qlnxe/ecore_int.h stable/10/sys/dev/qlnx/qlnxe/ecore_int_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_iov_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_iro.h stable/10/sys/dev/qlnx/qlnxe/ecore_iro_values.h stable/10/sys/dev/qlnx/qlnxe/ecore_iscsi.h stable/10/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_l2.c stable/10/sys/dev/qlnx/qlnxe/ecore_l2.h stable/10/sys/dev/qlnx/qlnxe/ecore_l2_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_ll2.h stable/10/sys/dev/qlnx/qlnxe/ecore_ll2_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_mcp.c stable/10/sys/dev/qlnx/qlnxe/ecore_mcp.h stable/10/sys/dev/qlnx/qlnxe/ecore_mcp_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_ooo.h stable/10/sys/dev/qlnx/qlnxe/ecore_proto_if.h stable/10/sys/dev/qlnx/qlnxe/ecore_roce.h stable/10/sys/dev/qlnx/qlnxe/ecore_roce_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_rt_defs.h stable/10/sys/dev/qlnx/qlnxe/ecore_sp_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_sp_commands.c stable/10/sys/dev/qlnx/qlnxe/ecore_sp_commands.h stable/10/sys/dev/qlnx/qlnxe/ecore_spq.c stable/10/sys/dev/qlnx/qlnxe/ecore_sriov.h stable/10/sys/dev/qlnx/qlnxe/ecore_vf.h stable/10/sys/dev/qlnx/qlnxe/ecore_vf_api.h stable/10/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h stable/10/sys/dev/qlnx/qlnxe/eth_common.h stable/10/sys/dev/qlnx/qlnxe/fcoe_common.h stable/10/sys/dev/qlnx/qlnxe/iscsi_common.h stable/10/sys/dev/qlnx/qlnxe/mcp_private.h stable/10/sys/dev/qlnx/qlnxe/mcp_public.h stable/10/sys/dev/qlnx/qlnxe/mfw_hsi.h stable/10/sys/dev/qlnx/qlnxe/nvm_cfg.h stable/10/sys/dev/qlnx/qlnxe/nvm_map.h stable/10/sys/dev/qlnx/qlnxe/pcics_reg_driver.h stable/10/sys/dev/qlnx/qlnxe/qlnx_def.h stable/10/sys/dev/qlnx/qlnxe/qlnx_os.c stable/10/sys/dev/qlnx/qlnxe/qlnx_ver.h stable/10/sys/dev/qlnx/qlnxe/rdma_common.h stable/10/sys/dev/qlnx/qlnxe/reg_addr.h stable/10/sys/dev/qlnx/qlnxe/spad_layout.h stable/10/sys/dev/qlnx/qlnxe/storage_common.h stable/10/sys/dev/qlnx/qlnxe/tcp_common.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 18:52:35 2017 (r320162) @@ -34,12 +34,17 @@ #include "ecore_status.h" #include +#if __FreeBSD_version >= 1200000 +#include +#else #if __FreeBSD_version >= 1100090 #include #else #include #endif +#endif +#define OSAL_NUM_CPUS() mp_ncpus /* * prototypes of freebsd specific functions required by ecore */ @@ -60,6 +65,7 @@ extern int qlnx_pci_find_capability(void *ecore_dev, i extern uint32_t qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr); extern void qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value); +extern void qlnx_direct_reg_wr64(void *p_hwfn, void *reg_addr, uint64_t value); extern uint32_t qlnx_reg_rd32(void *p_hwfn, uint32_t reg_addr); extern void qlnx_reg_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value); @@ -129,6 +135,8 @@ rounddown_pow_of_two(unsigned long x) #endif /* #ifndef QLNX_RDMA */ +#define OSAL_UNUSED + #define OSAL_CPU_TO_BE64(val) htobe64(val) #define OSAL_BE64_TO_CPU(val) be64toh(val) @@ -199,6 +207,8 @@ typedef struct osal_list_t #define REG_WR(hwfn, addr, val) qlnx_reg_wr32(hwfn, addr, val) #define REG_WR16(hwfn, addr, val) qlnx_reg_wr16(hwfn, addr, val) #define DIRECT_REG_WR(p_hwfn, addr, value) qlnx_direct_reg_wr32(p_hwfn, addr, value) +#define DIRECT_REG_WR64(p_hwfn, addr, value) \ + qlnx_direct_reg_wr64(p_hwfn, addr, value) #define DIRECT_REG_RD(p_hwfn, addr) qlnx_direct_reg_rd32(p_hwfn, addr) #define REG_RD(hwfn, addr) qlnx_reg_rd32(hwfn, addr) #define DOORBELL(hwfn, addr, value) \ Modified: stable/10/sys/dev/qlnx/qlnxe/common_hsi.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 18:52:35 2017 (r320162) @@ -88,7 +88,7 @@ #define CORE_SPQE_PAGE_SIZE_BYTES 4096 /* - * Usually LL2 queues are opened in pairs TX-RX. + * Usually LL2 queues are opened in pairs – TX-RX. * There is a hard restriction on number of RX queues (limited by Tstorm RAM) and TX counters (Pstorm RAM). * Number of TX queues is almost unlimited. * The constants are different so as to allow asymmetric LL2 connections @@ -99,13 +99,13 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// -// Include firmware version number only- do not add constants here to avoid redundunt compilations +// Include firmware verison number only- do not add constants here to avoid redundunt compilations /////////////////////////////////////////////////////////////////////////////////////////////////// #define FW_MAJOR_VERSION 8 -#define FW_MINOR_VERSION 18 -#define FW_REVISION_VERSION 14 +#define FW_MINOR_VERSION 30 +#define FW_REVISION_VERSION 0 #define FW_ENGINEERING_VERSION 0 /***********************/ @@ -113,60 +113,60 @@ /***********************/ /* PCI functions */ -#define MAX_NUM_PORTS_K2 (4) #define MAX_NUM_PORTS_BB (2) -#define MAX_NUM_PORTS (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS_K2 (4) +#define MAX_NUM_PORTS_E5 (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS (MAX_NUM_PORTS_E5) -#define MAX_NUM_PFS_K2 (16) #define MAX_NUM_PFS_BB (8) -#define MAX_NUM_PFS (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS_K2 (16) +#define MAX_NUM_PFS_E5 (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS (MAX_NUM_PFS_E5) #define MAX_NUM_OF_PFS_IN_CHIP (16) /* On both engines */ #define MAX_NUM_VFS_BB (120) #define MAX_NUM_VFS_K2 (192) -#define E4_MAX_NUM_VFS (MAX_NUM_VFS_K2) -#define E5_MAX_NUM_VFS (240) -#define COMMON_MAX_NUM_VFS (E5_MAX_NUM_VFS) +#define MAX_NUM_VFS_E4 (MAX_NUM_VFS_K2) +#define MAX_NUM_VFS_E5 (240) +#define COMMON_MAX_NUM_VFS (MAX_NUM_VFS_E5) #define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB) #define MAX_NUM_FUNCTIONS_K2 (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2) -#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS_E4) /* in both BB and K2, the VF number starts from 16. so for arrays containing all */ /* possible PFs and VFs - we need a constant for this size */ #define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB) #define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2) -#define MAX_FUNCTION_NUMBER (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_FUNCTION_NUMBER_E4 (MAX_NUM_PFS + MAX_NUM_VFS_E4) +#define MAX_FUNCTION_NUMBER_E5 (MAX_NUM_PFS + MAX_NUM_VFS_E5) +#define COMMON_MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS_E5) #define MAX_NUM_VPORTS_K2 (208) #define MAX_NUM_VPORTS_BB (160) -#define MAX_NUM_VPORTS (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E4 (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E5 (256) +#define COMMON_MAX_NUM_VPORTS (MAX_NUM_VPORTS_E5) #define MAX_NUM_L2_QUEUES_K2 (320) #define MAX_NUM_L2_QUEUES_BB (256) #define MAX_NUM_L2_QUEUES (MAX_NUM_L2_QUEUES_K2) /* Traffic classes in network-facing blocks (PBF, BTB, NIG, BRB, PRS and QM) */ -// 4-Port K2. #define NUM_PHYS_TCS_4PORT_K2 (4) +#define NUM_PHYS_TCS_4PORT_E5 (6) #define NUM_OF_PHYS_TCS (8) - +#define PURE_LB_TC NUM_OF_PHYS_TCS #define NUM_TCS_4PORT_K2 (NUM_PHYS_TCS_4PORT_K2 + 1) +#define NUM_TCS_4PORT_E5 (NUM_PHYS_TCS_4PORT_E5 + 1) #define NUM_OF_TCS (NUM_OF_PHYS_TCS + 1) -#define LB_TC (NUM_OF_PHYS_TCS) - /* Num of possible traffic priority values */ #define NUM_OF_PRIO (8) -#define MAX_NUM_VOQS_K2 (NUM_TCS_4PORT_K2 * MAX_NUM_PORTS_K2) -#define MAX_NUM_VOQS_BB (NUM_OF_TCS * MAX_NUM_PORTS_BB) -#define MAX_NUM_VOQS (MAX_NUM_VOQS_K2) -#define MAX_PHYS_VOQS (NUM_OF_PHYS_TCS * MAX_NUM_PORTS_BB) - /* CIDs */ -#define E4_NUM_OF_CONNECTION_TYPES (8) -#define E5_NUM_OF_CONNECTION_TYPES (16) +#define NUM_OF_CONNECTION_TYPES_E4 (8) +#define NUM_OF_CONNECTION_TYPES_E5 (16) #define NUM_OF_TASK_TYPES (8) #define NUM_OF_LCIDS (320) #define NUM_OF_LTIDS (320) @@ -375,11 +375,13 @@ /* number of TX queues in the QM */ #define MAX_QM_TX_QUEUES_K2 512 #define MAX_QM_TX_QUEUES_BB 448 +#define MAX_QM_TX_QUEUES_E5 MAX_QM_TX_QUEUES_K2 #define MAX_QM_TX_QUEUES MAX_QM_TX_QUEUES_K2 /* number of Other queues in the QM */ #define MAX_QM_OTHER_QUEUES_BB 64 #define MAX_QM_OTHER_QUEUES_K2 128 +#define MAX_QM_OTHER_QUEUES_E5 MAX_QM_OTHER_QUEUES_K2 #define MAX_QM_OTHER_QUEUES MAX_QM_OTHER_QUEUES_K2 /* number of queues in a PF queue group */ @@ -413,7 +415,9 @@ #define CAU_FSM_ETH_TX 1 /* Number of Protocol Indices per Status Block */ -#define PIS_PER_SB 12 +#define PIS_PER_SB_E4 12 +#define PIS_PER_SB_E5 8 +#define MAX_PIS_PER_SB OSAL_MAX_T(u8, PIS_PER_SB_E4, PIS_PER_SB_E5) #define CAU_HC_STOPPED_STATE 3 /* fsm is stopped or not valid for this sb */ @@ -427,7 +431,8 @@ #define MAX_SB_PER_PATH_K2 (368) #define MAX_SB_PER_PATH_BB (288) -#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_K2 +#define MAX_SB_PER_PATH_E5 (512) +#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_E5 #define MAX_SB_PER_PF_MIMD 129 #define MAX_SB_PER_PF_SIMD 64 @@ -588,7 +593,7 @@ // ILT Records #define PXP_NUM_ILT_RECORDS_BB 7600 #define PXP_NUM_ILT_RECORDS_K2 11000 -#define MAX_NUM_ILT_RECORDS MAX(PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) +#define MAX_NUM_ILT_RECORDS OSAL_MAX_T(u16, PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) // Host Interface @@ -633,7 +638,8 @@ /******************/ /* Number of PBF command queue lines. Each line is 32B. */ -#define PBF_MAX_CMD_LINES 3328 +#define PBF_MAX_CMD_LINES_E4 3328 +#define PBF_MAX_CMD_LINES_E5 5280 /* Number of BTB blocks. Each block is 256B. */ #define BTB_MAX_BLOCKS 1440 @@ -737,8 +743,8 @@ union rdma_eqe_data */ struct malicious_vf_eqe_data { - u8 vfId /* Malicious VF ID */; - u8 errId /* Malicious VF error */; + u8 vf_id /* Malicious VF ID */; + u8 err_id /* Malicious VF error */; __le16 reserved[3]; }; @@ -747,7 +753,7 @@ struct malicious_vf_eqe_data */ struct initial_cleanup_eqe_data { - u8 vfId /* VF ID */; + u8 vf_id /* VF ID */; u8 reserved[7]; }; @@ -1059,7 +1065,7 @@ struct db_rdma_dpm_data { __le16 icid /* internal CID */; __le16 prod_val /* aggregated value to update */; - struct db_rdma_dpm_params params /* parameters passed to RDMA firmware */; + struct db_rdma_dpm_params params /* parametes passed to RDMA firmware */; }; @@ -1113,25 +1119,25 @@ enum igu_seg_access /* - * Enumeration for L3 type field of parsing_and_err_flags_union. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) + * Enumeration for L3 type field of parsing_and_err_flags. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) */ enum l3_type { - e_l3Type_unknown, - e_l3Type_ipv4, - e_l3Type_ipv6, + e_l3_type_unknown, + e_l3_type_ipv4, + e_l3_type_ipv6, MAX_L3_TYPE }; /* - * Enumeration for l4Protocol field of parsing_and_err_flags_union. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. + * Enumeration for l4Protocol field of parsing_and_err_flags. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. */ enum l4_protocol { - e_l4Protocol_none, - e_l4Protocol_tcp, - e_l4Protocol_udp, + e_l4_protocol_none, + e_l4_protocol_tcp, + e_l4_protocol_udp, MAX_L4_PROTOCOL }; @@ -1146,11 +1152,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT 0 #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK 0x3 /* L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. (use enum l4_protocol) */ #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT 2 -#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4 fragment. */ +#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4/IPv6 fragment. */ #define PARSING_AND_ERR_FLAGS_IPV4FRAG_SHIFT 4 -#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* Set if VLAN tag exists. Invalid if tunnel type are IP GRE or IP GENEVE. */ +#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* corresponds to the same 8021q tag that is selected for 8021q-tag fiel. This flag should be set if the tag appears in the packet, regardless of its value. */ #define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_SHIFT 5 -#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_SHIFT 6 #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_MASK 0x1 /* Set for PTP packet. */ #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_SHIFT 7 @@ -1162,11 +1168,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L4CHKSMERROR_SHIFT 10 #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_MASK 0x1 /* Set if GRE/VXLAN/GENEVE tunnel detected. */ #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_SHIFT 11 -#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* Set if VLAN tag exists in tunnel header. */ +#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* This flag should be set if the tag appears in the packet tunnel header, regardless of its value.. */ #define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_SHIFT 12 #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_MASK 0x1 /* Set if either tunnel-ipv4-version-mismatch or tunnel-ipv4-hdr-len-error or tunnel-ipv4-cksm is set or tunneling ipv6 ver mismatch */ #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_SHIFT 13 -#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* Set if GRE or VXLAN/GENEVE UDP checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_SHIFT 14 #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_MASK 0x1 /* Set if tunnel L4 checksum validation failed. Valid only if tunnel L4 checksum was calculated. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_SHIFT 15 @@ -1419,21 +1425,42 @@ enum rss_hash_type /* * status block structure */ -struct status_block +struct status_block_e4 { - __le16 pi_array[PIS_PER_SB]; + __le16 pi_array[PIS_PER_SB_E4]; __le32 sb_num; -#define STATUS_BLOCK_SB_NUM_MASK 0x1FF -#define STATUS_BLOCK_SB_NUM_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD_MASK 0x7F -#define STATUS_BLOCK_ZERO_PAD_SHIFT 9 -#define STATUS_BLOCK_ZERO_PAD2_MASK 0xFFFF -#define STATUS_BLOCK_ZERO_PAD2_SHIFT 16 +#define STATUS_BLOCK_E4_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E4_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E4_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E4_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E4_ZERO_PAD2_SHIFT 16 __le32 prod_index; -#define STATUS_BLOCK_PROD_INDEX_MASK 0xFFFFFF -#define STATUS_BLOCK_PROD_INDEX_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD3_MASK 0xFF -#define STATUS_BLOCK_ZERO_PAD3_SHIFT 24 +#define STATUS_BLOCK_E4_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E4_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E4_ZERO_PAD3_SHIFT 24 +}; + + +/* + * status block structure + */ +struct status_block_e5 +{ + __le16 pi_array[PIS_PER_SB_E5]; + __le32 sb_num; +#define STATUS_BLOCK_E5_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E5_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E5_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E5_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E5_ZERO_PAD2_SHIFT 16 + __le32 prod_index; +#define STATUS_BLOCK_E5_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E5_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E5_ZERO_PAD3_SHIFT 24 }; Modified: stable/10/sys/dev/qlnx/qlnxe/ecore.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 18:52:35 2017 (r320162) @@ -39,8 +39,8 @@ #include "mcp_public.h" #define ECORE_MAJOR_VERSION 8 -#define ECORE_MINOR_VERSION 18 -#define ECORE_REVISION_VERSION 13 +#define ECORE_MINOR_VERSION 30 +#define ECORE_REVISION_VERSION 0 #define ECORE_ENGINEERING_VERSION 0 #define ECORE_VERSION \ @@ -110,13 +110,13 @@ do { \ #define GET_FIELD(value, name) \ (((value) >> (name##_SHIFT)) & name##_MASK) -#define ECORE_MFW_GET_FIELD(name, field) \ - (((name) & (field ## _MASK)) >> (field ## _SHIFT)) +#define GET_MFW_FIELD(name, field) \ + (((name) & (field ## _MASK)) >> (field ## _OFFSET)) -#define ECORE_MFW_SET_FIELD(name, field, value) \ +#define SET_MFW_FIELD(name, field, value) \ do { \ - (name) &= ~((field ## _MASK) << (field ## _SHIFT)); \ - (name) |= (((value) << (field ## _SHIFT)) & (field ## _MASK)); \ + (name) &= ~((field ## _MASK) << (field ## _OFFSET)); \ + (name) |= (((value) << (field ## _OFFSET)) & (field ## _MASK)); \ } while (0) static OSAL_INLINE u32 DB_ADDR(u32 cid, u32 DEMS) @@ -401,6 +401,11 @@ enum ecore_wol_support { ECORE_WOL_SUPPORT_PME, }; +enum ecore_db_rec_exec { + DB_REC_DRY_RUN, + DB_REC_REAL_DEAL, +}; + struct ecore_hw_info { /* PCI personality */ enum ecore_pci_personality personality; @@ -450,10 +455,7 @@ struct ecore_hw_info { #ifndef ETH_ALEN #define ETH_ALEN 6 /* @@@ TBD - define somewhere else for Windows */ #endif - unsigned char hw_mac_addr[ETH_ALEN]; - u64 node_wwn; /* For FCoE only */ - u64 port_wwn; /* For FCoE only */ u16 num_iscsi_conns; u16 num_fcoe_conns; @@ -537,6 +539,12 @@ struct ecore_qm_info { u8 num_pf_rls; }; +struct ecore_db_recovery_info { + osal_list_t list; + osal_spinlock_t lock; + u32 db_recovery_counter; +}; + struct storm_stats { u32 address; u32 len; @@ -605,6 +613,11 @@ struct ecore_hwfn { struct ecore_ptt *p_main_ptt; struct ecore_ptt *p_dpc_ptt; + /* PTP will be used only by the leading funtion. + * Usage of all PTP-apis should be synchronized as result. + */ + struct ecore_ptt *p_ptp_ptt; + struct ecore_sb_sp_info *p_sp_sb; struct ecore_sb_attn_info *p_sb_attn; @@ -661,6 +674,9 @@ struct ecore_hwfn { /* L2-related */ struct ecore_l2_info *p_l2_info; + + /* Mechanism for recovering from doorbell drop */ + struct ecore_db_recovery_info db_recovery_info; }; enum ecore_mf_mode { @@ -694,7 +710,7 @@ struct ecore_dev { #define ECORE_IS_AH(dev) ((dev)->type == ECORE_DEV_TYPE_AH) #define ECORE_IS_K2(dev) ECORE_IS_AH(dev) -#define ECORE_IS_E5(dev) false +#define ECORE_IS_E5(dev) ((dev)->type == ECORE_DEV_TYPE_E5) #define ECORE_E5_MISSING_CODE OSAL_BUILD_BUG_ON(false) @@ -703,6 +719,7 @@ struct ecore_dev { #define ECORE_DEV_ID_MASK 0xff00 #define ECORE_DEV_ID_MASK_BB 0x1600 #define ECORE_DEV_ID_MASK_AH 0x8000 +#define ECORE_DEV_ID_MASK_E5 0x8100 u16 chip_num; #define CHIP_NUM_MASK 0xffff @@ -746,7 +763,7 @@ struct ecore_dev { #define CHIP_BOND_ID_SHIFT 0 u8 num_engines; - u8 num_ports_in_engines; + u8 num_ports_in_engine; u8 num_funcs_in_port; u8 path_id; @@ -836,6 +853,9 @@ struct ecore_dev { : MAX_SB_PER_PATH_K2) #define NUM_OF_ENG_PFS(dev) (ECORE_IS_BB(dev) ? MAX_NUM_PFS_BB \ : MAX_NUM_PFS_K2) + +#define CRC8_TABLE_SIZE 256 + /** * @brief ecore_concrete_to_sw_fid - get the sw function id from * the concrete value. @@ -844,8 +864,7 @@ struct ecore_dev { * * @return OSAL_INLINE u8 */ -static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct ecore_dev *p_dev, - u32 concrete_fid) +static OSAL_INLINE u8 ecore_concrete_to_sw_fid(u32 concrete_fid) { u8 vfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_VFID); u8 pfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID); @@ -860,8 +879,8 @@ static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct return sw_fid; } -#define PURE_LB_TC 8 #define PKT_LB_TC 9 +#define MAX_NUM_VOQS_E4 20 int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate); void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev, @@ -873,6 +892,7 @@ int ecore_configure_pf_min_bandwidth(struct ecore_dev void ecore_clean_wfq_db(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); int ecore_device_num_engines(struct ecore_dev *p_dev); int ecore_device_num_ports(struct ecore_dev *p_dev); +int ecore_device_get_port_id(struct ecore_dev *p_dev); void ecore_set_fw_mac_addr(__le16 *fw_msb, __le16 *fw_mid, __le16 *fw_lsb, u8 *mac); @@ -892,6 +912,13 @@ u16 ecore_get_cm_pq_idx_mcos(struct ecore_hwfn *p_hwfn u16 ecore_get_cm_pq_idx_vf(struct ecore_hwfn *p_hwfn, u16 vf); u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u8 qpid); +const char *ecore_hw_get_resc_name(enum ecore_resources res_id); + +/* doorbell recovery mechanism */ +void ecore_db_recovery_dp(struct ecore_hwfn *p_hwfn); +void ecore_db_recovery_execute(struct ecore_hwfn *p_hwfn, + enum ecore_db_rec_exec); + /* amount of resources used in qm init */ u8 ecore_init_qm_get_num_tcs(struct ecore_hwfn *p_hwfn); u16 ecore_init_qm_get_num_vfs(struct ecore_hwfn *p_hwfn); @@ -900,7 +927,5 @@ u16 ecore_init_qm_get_num_vports(struct ecore_hwfn *p_ u16 ecore_init_qm_get_num_pqs(struct ecore_hwfn *p_hwfn); #define ECORE_LEADING_HWFN(dev) (&dev->hwfns[0]) - -const char *ecore_hw_get_resc_name(enum ecore_resources res_id); #endif /* __ECORE_H */ Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 18:52:35 2017 (r320162) @@ -214,6 +214,11 @@ static OSAL_INLINE u32 ecore_chain_get_cons_idx_u32(st return p_chain->u.chain32.cons_idx; } +/* FIXME: + * Should create OSALs for the below definitions. + * For Linux, replace them with the existing U16_MAX and U32_MAX, and handle + * kernel versions that lack them. + */ #define ECORE_U16_MAX ((u16)~0U) #define ECORE_U32_MAX ((u32)~0U) Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 18:52:35 2017 (r320162) @@ -72,17 +72,7 @@ __FBSDID("$FreeBSD$"); #define TM_ELEM_SIZE 4 /* ILT constants */ -/* If for some reason, HW P size is modified to be less than 32K, - * special handling needs to be made for CDU initialization - */ -#ifdef CONFIG_ECORE_ROCE -/* For RoCE we configure to 64K to cover for RoCE max tasks 256K purpose. Can be - * optimized with resource management scheme - */ #define ILT_DEFAULT_HW_P_SIZE 4 -#else -#define ILT_DEFAULT_HW_P_SIZE 3 -#endif #define ILT_PAGE_IN_BYTES(hw_p_size) (1U << ((hw_p_size) + 12)) #define ILT_CFG_REG(cli, reg) PSWRQ2_REG_##cli##_##reg##_RT_OFFSET @@ -97,22 +87,22 @@ __FBSDID("$FreeBSD$"); /* connection context union */ union conn_context { - struct core_conn_context core_ctx; - struct eth_conn_context eth_ctx; - struct iscsi_conn_context iscsi_ctx; - struct fcoe_conn_context fcoe_ctx; - struct roce_conn_context roce_ctx; + struct e4_core_conn_context core_ctx; + struct e4_eth_conn_context eth_ctx; + struct e4_iscsi_conn_context iscsi_ctx; + struct e4_fcoe_conn_context fcoe_ctx; + struct e4_roce_conn_context roce_ctx; }; /* TYPE-0 task context - iSCSI, FCOE */ union type0_task_context { - struct iscsi_task_context iscsi_ctx; - struct fcoe_task_context fcoe_ctx; + struct e4_iscsi_task_context iscsi_ctx; + struct e4_fcoe_task_context fcoe_ctx; }; /* TYPE-1 task context - ROCE */ union type1_task_context { - struct rdma_task_context roce_ctx; + struct e4_rdma_task_context roce_ctx; }; struct src_ent { @@ -274,12 +264,10 @@ struct ecore_cxt_mngr { }; /* check if resources/configuration is required according to protocol type */ -static bool src_proto(struct ecore_hwfn *p_hwfn, - enum protocol_type type) +static bool src_proto(enum protocol_type type) { return type == PROTOCOLID_ISCSI || type == PROTOCOLID_FCOE || - type == PROTOCOLID_TOE || type == PROTOCOLID_IWARP; } @@ -319,14 +307,13 @@ struct ecore_src_iids { u32 per_vf_cids; }; -static void ecore_cxt_src_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_src_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_src_iids *iids) { u32 i; for (i = 0; i < MAX_CONN_TYPES; i++) { - if (!src_proto(p_hwfn, i)) + if (!src_proto(i)) continue; iids->pf_cids += p_mngr->conn_cfg[i].cid_count; @@ -346,8 +333,7 @@ struct ecore_tm_iids { u32 per_vf_tids; }; -static void ecore_cxt_tm_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_tm_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_tm_iids *iids) { bool tm_vf_required = false; @@ -454,6 +440,20 @@ static struct ecore_tid_seg *ecore_cxt_tid_seg_info(st return OSAL_NULL; } +static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + p_mgr->srq_count = num_srqs; +} + +u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + return p_mgr->srq_count; +} + /* set the iids (cid/tid) count per protocol */ static void ecore_cxt_set_proto_cid_count(struct ecore_hwfn *p_hwfn, enum protocol_type type, @@ -779,7 +779,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); ecore_cxt_qm_iids(p_hwfn, &qm_iids); - total = ecore_qm_pf_mem_size(p_hwfn->rel_pf_id, qm_iids.cids, + total = ecore_qm_pf_mem_size(qm_iids.cids, qm_iids.vf_cids, qm_iids.tids, p_hwfn->qm_info.num_pqs, p_hwfn->qm_info.num_vf_pqs); @@ -797,7 +797,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* SRC */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_SRC]); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); /* Both the PF and VFs searcher connections are stored in the per PF * database. Thus sum the PF searcher cids and all the VFs searcher @@ -822,7 +822,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* TM PF */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_TM]); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); total = tm_iids.pf_cids + tm_iids.pf_tids_total; if (total) { p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); @@ -952,7 +952,7 @@ static enum _ecore_status_t ecore_cxt_src_t2_alloc(str if (!p_src->active) return ECORE_SUCCESS; - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; total_size = conn_num * sizeof(struct src_ent); @@ -1287,7 +1287,7 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore clients[ILT_CLI_TSDM].last.reg = ILT_CFG_REG(TSDM, LAST_ILT); clients[ILT_CLI_TSDM].p_size.reg = ILT_CFG_REG(TSDM, P_SIZE); - /* default ILT page size for all clients is 32K */ + /* default ILT page size for all clients is 64K */ for (i = 0; i < ILT_CLI_MAX; i++) p_mngr->clients[i].p_size.val = ILT_DEFAULT_HW_P_SIZE; @@ -1299,7 +1299,9 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore p_mngr->vf_count = p_hwfn->p_dev->p_iov_info->total_vfs; /* Initialize the dynamic ILT allocation mutex */ +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_ALLOC(p_hwfn, &p_mngr->mutex); +#endif OSAL_MUTEX_INIT(&p_mngr->mutex); /* Set the cxt mangr pointer priori to further allocations */ @@ -1347,7 +1349,9 @@ void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn) ecore_cid_map_free(p_hwfn); ecore_cxt_src_t2_free(p_hwfn); ecore_ilt_shadow_free(p_hwfn); +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_DEALLOC(&p_hwfn->p_cxt_mngr->mutex); +#endif OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_cxt_mngr); p_hwfn->p_cxt_mngr = OSAL_NULL; @@ -1555,7 +1559,7 @@ static void ecore_cdu_init_pf(struct ecore_hwfn *p_hwf } } -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { struct ecore_qm_info *qm_info = &p_hwfn->qm_info; struct ecore_qm_iids iids; @@ -1563,9 +1567,8 @@ void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) OSAL_MEM_ZERO(&iids, sizeof(iids)); ecore_cxt_qm_iids(p_hwfn, &iids); - ecore_qm_pf_rt_init(p_hwfn, p_hwfn->p_main_ptt, p_hwfn->port_id, + ecore_qm_pf_rt_init(p_hwfn, p_ptt, p_hwfn->port_id, p_hwfn->rel_pf_id, qm_info->max_phys_tcs_per_port, - p_hwfn->first_on_engine, iids.cids, iids.vf_cids, iids.tids, qm_info->start_pq, qm_info->num_pqs - qm_info->num_vf_pqs, @@ -1749,7 +1752,7 @@ static void ecore_ilt_init_pf(struct ecore_hwfn *p_hwf if (p_shdw[line].p_virt != OSAL_NULL) { SET_FIELD(ilt_hw_entry, ILT_ENTRY_VALID, 1ULL); SET_FIELD(ilt_hw_entry, ILT_ENTRY_PHY_ADDR, - (p_shdw[line].p_phys >> 12)); + (unsigned long long)(p_shdw[line].p_phys >> 12)); DP_VERBOSE( p_hwfn, ECORE_MSG_ILT, @@ -1771,7 +1774,7 @@ static void ecore_src_init_pf(struct ecore_hwfn *p_hwf struct ecore_src_iids src_iids; OSAL_MEM_ZERO(&src_iids, sizeof(src_iids)); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; if (!conn_num) return; @@ -1817,7 +1820,7 @@ static void ecore_tm_init_pf(struct ecore_hwfn *p_hwfn u8 i; OSAL_MEM_ZERO(&tm_iids, sizeof(tm_iids)); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); /* @@@TBD No pre-scan for now */ @@ -1908,9 +1911,11 @@ static void ecore_prs_init_common(struct ecore_hwfn *p static void ecore_prs_init_pf(struct ecore_hwfn *p_hwfn) { struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_conn_type_cfg *p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + struct ecore_conn_type_cfg *p_fcoe; struct ecore_tid_seg *p_tid; + p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + /* If FCoE is active set the MAX OX_ID (tid) in the Parser */ if (!p_fcoe->cid_count) return; @@ -1934,9 +1939,9 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf ecore_prs_init_common(p_hwfn); } -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { - ecore_qm_init_pf(p_hwfn); + ecore_qm_init_pf(p_hwfn, p_ptt); ecore_cm_init_pf(p_hwfn); ecore_dq_init_pf(p_hwfn); ecore_cdu_init_pf(p_hwfn); @@ -2119,20 +2124,6 @@ enum _ecore_status_t ecore_cxt_get_cid_info(struct eco return ECORE_SUCCESS; } -static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - p_mgr->srq_count = num_srqs; -} - -u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - return p_mgr->srq_count; -} - static void ecore_rdma_set_pf_params(struct ecore_hwfn *p_hwfn, struct ecore_rdma_pf_params *p_params, u32 num_tasks) @@ -2143,7 +2134,7 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn /* Override personality with rdma flavor */ num_srqs = OSAL_MIN_T(u32, ECORE_RDMA_MAX_SRQS, p_params->num_srqs); - /* The only case RDMA personality can be overridden is if NVRAM is + /* The only case RDMA personality can be overriden is if NVRAM is * configured with ETH_RDMA or if no rdma protocol was requested */ switch (p_params->rdma_protocol) { @@ -2170,8 +2161,12 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn switch (p_hwfn->hw_info.personality) { case ECORE_PCI_ETH_IWARP: - num_qps = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); - num_cons = num_qps; + /* Each QP requires one connection */ + num_cons = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); +#ifdef CONFIG_ECORE_IWARP /* required for the define */ + /* additional connections required for passive tcp handling */ + num_cons += ECORE_IWARP_PREALLOC_CNT; +#endif proto = PROTOCOLID_IWARP; p_params->roce_edpm_mode = false; break; @@ -2576,14 +2571,14 @@ enum _ecore_status_t ecore_cxt_get_task_ctx(struct eco u8 ctx_type, void **pp_task_ctx) { - struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_ilt_client_cfg *p_cli; - struct ecore_ilt_cli_blk *p_seg; - struct ecore_tid_seg *p_seg_info; - u32 proto, seg; - u32 total_lines; - u32 tid_size, ilt_idx; - u32 num_tids_per_block; + struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; + struct ecore_ilt_client_cfg *p_cli; + struct ecore_tid_seg *p_seg_info; + struct ecore_ilt_cli_blk *p_seg; + u32 num_tids_per_block; + u32 tid_size, ilt_idx; + u32 total_lines; + u32 proto, seg; /* Verify the personality */ switch (p_hwfn->hw_info.personality) { Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 18:52:35 2017 (r320162) @@ -28,7 +28,6 @@ * */ - #ifndef _ECORE_CID_ #define _ECORE_CID_ @@ -130,15 +129,17 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf * @brief ecore_cxt_hw_init_pf - Initailze ILT and DQ, PF phase, per path. * * @param p_hwfn + * @param p_ptt */ -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief ecore_qm_init_pf - Initailze the QM PF phase, per path * * @param p_hwfn + * @param p_ptt */ -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief Reconfigures QM pf on the fly Modified: stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c ============================================================================== --- stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 18:38:51 2017 (r320161) +++ stable/10/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 18:52:35 2017 (r320162) @@ -31,7 +31,6 @@ #include __FBSDID("$FreeBSD$"); - #include "bcm_osal.h" #include "ecore.h" #include "ecore_hw.h" @@ -62,9 +61,6 @@ enum mem_groups { MEM_GROUP_IOR, MEM_GROUP_RAM, MEM_GROUP_BTB_RAM, - MEM_GROUP_RDIF_CTX, - MEM_GROUP_TDIF_CTX, - MEM_GROUP_CFC_MEM, MEM_GROUP_CONN_CFC_MEM, MEM_GROUP_TASK_CFC_MEM, MEM_GROUP_CAU_PI, @@ -73,6 +69,9 @@ enum mem_groups { MEM_GROUP_PBUF, MEM_GROUP_MULD_MEM, MEM_GROUP_BTB_MEM, + MEM_GROUP_RDIF_CTX, + MEM_GROUP_TDIF_CTX, + MEM_GROUP_CFC_MEM, MEM_GROUP_IGU_MEM, MEM_GROUP_IGU_MSIX, MEM_GROUP_CAU_SB, @@ -95,9 +94,6 @@ static const char* s_mem_group_names[] = { "IOR", "RAM", "BTB_RAM", - "RDIF_CTX", - "TDIF_CTX", - "CFC_MEM", "CONN_CFC_MEM", "TASK_CFC_MEM", "CAU_PI", @@ -106,6 +102,9 @@ static const char* s_mem_group_names[] = { "PBUF", "MULD_MEM", "BTB_MEM", + "RDIF_CTX", + "TDIF_CTX", + "CFC_MEM", "IGU_MEM", "IGU_MSIX", "CAU_SB", @@ -161,7 +160,7 @@ static u32 cond12(const u32 *r, const u32 *imm) { return (r[0] != r[1] && r[2] > imm[0]); } -static u32 cond3(const u32 *r, const u32 *imm) { +static u32 cond3(const u32 *r, const u32 OSAL_UNUSED *imm) { return (r[0] != r[1]); } @@ -256,7 +255,7 @@ struct storm_defs { /* Block constant definitions */ struct block_defs { const char *name; - bool has_dbg_bus[MAX_CHIP_IDS]; + bool exists[MAX_CHIP_IDS]; bool associated_to_storm; /* Valid only if associated_to_storm is true */ @@ -280,8 +279,8 @@ struct block_defs { /* Reset register definitions */ struct reset_reg_defs { u32 addr; - u32 unreset_val; bool exists[MAX_CHIP_IDS]; + u32 unreset_val[MAX_CHIP_IDS]; }; /* Debug Bus Constraint operation constant definitions */ @@ -311,8 +310,8 @@ struct rss_mem_defs { const char *mem_name; const char *type_name; u32 addr; + u32 entry_width; u32 num_entries[MAX_CHIP_IDS]; - u32 entry_width[MAX_CHIP_IDS]; }; struct vfc_ram_defs { @@ -550,7 +549,7 @@ static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFE static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFER_TYPE] = { /* BIN_BUF_DBG_MODE_TREE */ - { (const u32 *)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, + { (const u32*)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, /* BIN_BUF_DBG_DUMP_REG */ { dump_reg, OSAL_ARRAY_SIZE(dump_reg) }, @@ -615,7 +614,7 @@ static struct chip_defs s_chip_defs[MAX_CHIP_IDS] = { /* FPGA */ { MAX_NUM_PORTS_BB, MAX_NUM_PFS_BB, MAX_NUM_VFS_BB } } }, - { "k2", + { "ah", /* ASIC */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue Jun 20 19:16:08 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7FB6D9FCC3; Tue, 20 Jun 2017 19:16:08 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98BFF6F8F5; Tue, 20 Jun 2017 19:16:08 +0000 (UTC) (envelope-from davidcs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KJG7if091775; Tue, 20 Jun 2017 19:16:07 GMT (envelope-from davidcs@FreeBSD.org) Received: (from davidcs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJG7Tk091767; Tue, 20 Jun 2017 19:16:07 GMT (envelope-from davidcs@FreeBSD.org) Message-Id: <201706201916.v5KJG7Tk091767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: davidcs set sender to davidcs@FreeBSD.org using -f From: David C Somayajulu Date: Tue, 20 Jun 2017 19:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320164 - stable/11/sys/dev/qlnx/qlnxe X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:16:09 -0000 Author: davidcs Date: Tue Jun 20 19:16:06 2017 New Revision: 320164 URL: https://svnweb.freebsd.org/changeset/base/320164 Log: MFC r319964 Upgrade STORMFW to 8.30.0.0 and ecore version to 8.30.0.0 Add support for pci deviceID 0x8070 for QLE41xxx product line which supports 10GbE/25GbE/40GbE Approved by: re(gjb) Modified: stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h stable/11/sys/dev/qlnx/qlnxe/common_hsi.h stable/11/sys/dev/qlnx/qlnxe/ecore.h stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.h stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_values.h stable/11/sys/dev/qlnx/qlnxe/ecore_dcbx.c stable/11/sys/dev/qlnx/qlnxe/ecore_dcbx.h stable/11/sys/dev/qlnx/qlnxe/ecore_dev.c stable/11/sys/dev/qlnx/qlnxe/ecore_dev_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_fcoe_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_gtt_reg_addr.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_common.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_debug_tools.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_eth.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_fcoe.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_iscsi.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_iwarp.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_rdma.h stable/11/sys/dev/qlnx/qlnxe/ecore_hsi_roce.h stable/11/sys/dev/qlnx/qlnxe/ecore_hw.c stable/11/sys/dev/qlnx/qlnxe/ecore_hw.h stable/11/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.c stable/11/sys/dev/qlnx/qlnxe/ecore_init_fw_funcs.h stable/11/sys/dev/qlnx/qlnxe/ecore_init_ops.c stable/11/sys/dev/qlnx/qlnxe/ecore_init_ops.h stable/11/sys/dev/qlnx/qlnxe/ecore_init_values.h stable/11/sys/dev/qlnx/qlnxe/ecore_int.c stable/11/sys/dev/qlnx/qlnxe/ecore_int.h stable/11/sys/dev/qlnx/qlnxe/ecore_int_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_iov_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_iro.h stable/11/sys/dev/qlnx/qlnxe/ecore_iro_values.h stable/11/sys/dev/qlnx/qlnxe/ecore_iscsi.h stable/11/sys/dev/qlnx/qlnxe/ecore_iscsi_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_l2.c stable/11/sys/dev/qlnx/qlnxe/ecore_l2.h stable/11/sys/dev/qlnx/qlnxe/ecore_l2_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_ll2.h stable/11/sys/dev/qlnx/qlnxe/ecore_ll2_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_mcp.c stable/11/sys/dev/qlnx/qlnxe/ecore_mcp.h stable/11/sys/dev/qlnx/qlnxe/ecore_mcp_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_ooo.h stable/11/sys/dev/qlnx/qlnxe/ecore_proto_if.h stable/11/sys/dev/qlnx/qlnxe/ecore_roce.h stable/11/sys/dev/qlnx/qlnxe/ecore_roce_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_rt_defs.h stable/11/sys/dev/qlnx/qlnxe/ecore_sp_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_sp_commands.c stable/11/sys/dev/qlnx/qlnxe/ecore_sp_commands.h stable/11/sys/dev/qlnx/qlnxe/ecore_spq.c stable/11/sys/dev/qlnx/qlnxe/ecore_sriov.h stable/11/sys/dev/qlnx/qlnxe/ecore_vf.h stable/11/sys/dev/qlnx/qlnxe/ecore_vf_api.h stable/11/sys/dev/qlnx/qlnxe/ecore_vfpf_if.h stable/11/sys/dev/qlnx/qlnxe/eth_common.h stable/11/sys/dev/qlnx/qlnxe/fcoe_common.h stable/11/sys/dev/qlnx/qlnxe/iscsi_common.h stable/11/sys/dev/qlnx/qlnxe/mcp_private.h stable/11/sys/dev/qlnx/qlnxe/mcp_public.h stable/11/sys/dev/qlnx/qlnxe/mfw_hsi.h stable/11/sys/dev/qlnx/qlnxe/nvm_cfg.h stable/11/sys/dev/qlnx/qlnxe/nvm_map.h stable/11/sys/dev/qlnx/qlnxe/pcics_reg_driver.h stable/11/sys/dev/qlnx/qlnxe/qlnx_def.h stable/11/sys/dev/qlnx/qlnxe/qlnx_os.c stable/11/sys/dev/qlnx/qlnxe/qlnx_ver.h stable/11/sys/dev/qlnx/qlnxe/rdma_common.h stable/11/sys/dev/qlnx/qlnxe/reg_addr.h stable/11/sys/dev/qlnx/qlnxe/spad_layout.h stable/11/sys/dev/qlnx/qlnxe/storage_common.h stable/11/sys/dev/qlnx/qlnxe/tcp_common.h Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/bcm_osal.h Tue Jun 20 19:16:06 2017 (r320164) @@ -34,12 +34,17 @@ #include "ecore_status.h" #include +#if __FreeBSD_version >= 1200000 +#include +#else #if __FreeBSD_version >= 1100090 #include #else #include #endif +#endif +#define OSAL_NUM_CPUS() mp_ncpus /* * prototypes of freebsd specific functions required by ecore */ @@ -60,6 +65,7 @@ extern int qlnx_pci_find_capability(void *ecore_dev, i extern uint32_t qlnx_direct_reg_rd32(void *p_hwfn, uint32_t *reg_addr); extern void qlnx_direct_reg_wr32(void *p_hwfn, void *reg_addr, uint32_t value); +extern void qlnx_direct_reg_wr64(void *p_hwfn, void *reg_addr, uint64_t value); extern uint32_t qlnx_reg_rd32(void *p_hwfn, uint32_t reg_addr); extern void qlnx_reg_wr32(void *p_hwfn, uint32_t reg_addr, uint32_t value); @@ -129,6 +135,8 @@ rounddown_pow_of_two(unsigned long x) #endif /* #ifndef QLNX_RDMA */ +#define OSAL_UNUSED + #define OSAL_CPU_TO_BE64(val) htobe64(val) #define OSAL_BE64_TO_CPU(val) be64toh(val) @@ -199,6 +207,8 @@ typedef struct osal_list_t #define REG_WR(hwfn, addr, val) qlnx_reg_wr32(hwfn, addr, val) #define REG_WR16(hwfn, addr, val) qlnx_reg_wr16(hwfn, addr, val) #define DIRECT_REG_WR(p_hwfn, addr, value) qlnx_direct_reg_wr32(p_hwfn, addr, value) +#define DIRECT_REG_WR64(p_hwfn, addr, value) \ + qlnx_direct_reg_wr64(p_hwfn, addr, value) #define DIRECT_REG_RD(p_hwfn, addr) qlnx_direct_reg_rd32(p_hwfn, addr) #define REG_RD(hwfn, addr) qlnx_reg_rd32(hwfn, addr) #define DOORBELL(hwfn, addr, value) \ Modified: stable/11/sys/dev/qlnx/qlnxe/common_hsi.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/common_hsi.h Tue Jun 20 19:16:06 2017 (r320164) @@ -88,7 +88,7 @@ #define CORE_SPQE_PAGE_SIZE_BYTES 4096 /* - * Usually LL2 queues are opened in pairs TX-RX. + * Usually LL2 queues are opened in pairs – TX-RX. * There is a hard restriction on number of RX queues (limited by Tstorm RAM) and TX counters (Pstorm RAM). * Number of TX queues is almost unlimited. * The constants are different so as to allow asymmetric LL2 connections @@ -99,13 +99,13 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// -// Include firmware version number only- do not add constants here to avoid redundunt compilations +// Include firmware verison number only- do not add constants here to avoid redundunt compilations /////////////////////////////////////////////////////////////////////////////////////////////////// #define FW_MAJOR_VERSION 8 -#define FW_MINOR_VERSION 18 -#define FW_REVISION_VERSION 14 +#define FW_MINOR_VERSION 30 +#define FW_REVISION_VERSION 0 #define FW_ENGINEERING_VERSION 0 /***********************/ @@ -113,60 +113,60 @@ /***********************/ /* PCI functions */ -#define MAX_NUM_PORTS_K2 (4) #define MAX_NUM_PORTS_BB (2) -#define MAX_NUM_PORTS (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS_K2 (4) +#define MAX_NUM_PORTS_E5 (MAX_NUM_PORTS_K2) +#define MAX_NUM_PORTS (MAX_NUM_PORTS_E5) -#define MAX_NUM_PFS_K2 (16) #define MAX_NUM_PFS_BB (8) -#define MAX_NUM_PFS (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS_K2 (16) +#define MAX_NUM_PFS_E5 (MAX_NUM_PFS_K2) +#define MAX_NUM_PFS (MAX_NUM_PFS_E5) #define MAX_NUM_OF_PFS_IN_CHIP (16) /* On both engines */ #define MAX_NUM_VFS_BB (120) #define MAX_NUM_VFS_K2 (192) -#define E4_MAX_NUM_VFS (MAX_NUM_VFS_K2) -#define E5_MAX_NUM_VFS (240) -#define COMMON_MAX_NUM_VFS (E5_MAX_NUM_VFS) +#define MAX_NUM_VFS_E4 (MAX_NUM_VFS_K2) +#define MAX_NUM_VFS_E5 (240) +#define COMMON_MAX_NUM_VFS (MAX_NUM_VFS_E5) #define MAX_NUM_FUNCTIONS_BB (MAX_NUM_PFS_BB + MAX_NUM_VFS_BB) #define MAX_NUM_FUNCTIONS_K2 (MAX_NUM_PFS_K2 + MAX_NUM_VFS_K2) -#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_NUM_FUNCTIONS (MAX_NUM_PFS + MAX_NUM_VFS_E4) /* in both BB and K2, the VF number starts from 16. so for arrays containing all */ /* possible PFs and VFs - we need a constant for this size */ #define MAX_FUNCTION_NUMBER_BB (MAX_NUM_PFS + MAX_NUM_VFS_BB) #define MAX_FUNCTION_NUMBER_K2 (MAX_NUM_PFS + MAX_NUM_VFS_K2) -#define MAX_FUNCTION_NUMBER (MAX_NUM_PFS + E4_MAX_NUM_VFS) +#define MAX_FUNCTION_NUMBER_E4 (MAX_NUM_PFS + MAX_NUM_VFS_E4) +#define MAX_FUNCTION_NUMBER_E5 (MAX_NUM_PFS + MAX_NUM_VFS_E5) +#define COMMON_MAX_FUNCTION_NUMBER (MAX_NUM_PFS + MAX_NUM_VFS_E5) #define MAX_NUM_VPORTS_K2 (208) #define MAX_NUM_VPORTS_BB (160) -#define MAX_NUM_VPORTS (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E4 (MAX_NUM_VPORTS_K2) +#define MAX_NUM_VPORTS_E5 (256) +#define COMMON_MAX_NUM_VPORTS (MAX_NUM_VPORTS_E5) #define MAX_NUM_L2_QUEUES_K2 (320) #define MAX_NUM_L2_QUEUES_BB (256) #define MAX_NUM_L2_QUEUES (MAX_NUM_L2_QUEUES_K2) /* Traffic classes in network-facing blocks (PBF, BTB, NIG, BRB, PRS and QM) */ -// 4-Port K2. #define NUM_PHYS_TCS_4PORT_K2 (4) +#define NUM_PHYS_TCS_4PORT_E5 (6) #define NUM_OF_PHYS_TCS (8) - +#define PURE_LB_TC NUM_OF_PHYS_TCS #define NUM_TCS_4PORT_K2 (NUM_PHYS_TCS_4PORT_K2 + 1) +#define NUM_TCS_4PORT_E5 (NUM_PHYS_TCS_4PORT_E5 + 1) #define NUM_OF_TCS (NUM_OF_PHYS_TCS + 1) -#define LB_TC (NUM_OF_PHYS_TCS) - /* Num of possible traffic priority values */ #define NUM_OF_PRIO (8) -#define MAX_NUM_VOQS_K2 (NUM_TCS_4PORT_K2 * MAX_NUM_PORTS_K2) -#define MAX_NUM_VOQS_BB (NUM_OF_TCS * MAX_NUM_PORTS_BB) -#define MAX_NUM_VOQS (MAX_NUM_VOQS_K2) -#define MAX_PHYS_VOQS (NUM_OF_PHYS_TCS * MAX_NUM_PORTS_BB) - /* CIDs */ -#define E4_NUM_OF_CONNECTION_TYPES (8) -#define E5_NUM_OF_CONNECTION_TYPES (16) +#define NUM_OF_CONNECTION_TYPES_E4 (8) +#define NUM_OF_CONNECTION_TYPES_E5 (16) #define NUM_OF_TASK_TYPES (8) #define NUM_OF_LCIDS (320) #define NUM_OF_LTIDS (320) @@ -375,11 +375,13 @@ /* number of TX queues in the QM */ #define MAX_QM_TX_QUEUES_K2 512 #define MAX_QM_TX_QUEUES_BB 448 +#define MAX_QM_TX_QUEUES_E5 MAX_QM_TX_QUEUES_K2 #define MAX_QM_TX_QUEUES MAX_QM_TX_QUEUES_K2 /* number of Other queues in the QM */ #define MAX_QM_OTHER_QUEUES_BB 64 #define MAX_QM_OTHER_QUEUES_K2 128 +#define MAX_QM_OTHER_QUEUES_E5 MAX_QM_OTHER_QUEUES_K2 #define MAX_QM_OTHER_QUEUES MAX_QM_OTHER_QUEUES_K2 /* number of queues in a PF queue group */ @@ -413,7 +415,9 @@ #define CAU_FSM_ETH_TX 1 /* Number of Protocol Indices per Status Block */ -#define PIS_PER_SB 12 +#define PIS_PER_SB_E4 12 +#define PIS_PER_SB_E5 8 +#define MAX_PIS_PER_SB OSAL_MAX_T(u8, PIS_PER_SB_E4, PIS_PER_SB_E5) #define CAU_HC_STOPPED_STATE 3 /* fsm is stopped or not valid for this sb */ @@ -427,7 +431,8 @@ #define MAX_SB_PER_PATH_K2 (368) #define MAX_SB_PER_PATH_BB (288) -#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_K2 +#define MAX_SB_PER_PATH_E5 (512) +#define MAX_TOT_SB_PER_PATH MAX_SB_PER_PATH_E5 #define MAX_SB_PER_PF_MIMD 129 #define MAX_SB_PER_PF_SIMD 64 @@ -588,7 +593,7 @@ // ILT Records #define PXP_NUM_ILT_RECORDS_BB 7600 #define PXP_NUM_ILT_RECORDS_K2 11000 -#define MAX_NUM_ILT_RECORDS MAX(PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) +#define MAX_NUM_ILT_RECORDS OSAL_MAX_T(u16, PXP_NUM_ILT_RECORDS_BB,PXP_NUM_ILT_RECORDS_K2) // Host Interface @@ -633,7 +638,8 @@ /******************/ /* Number of PBF command queue lines. Each line is 32B. */ -#define PBF_MAX_CMD_LINES 3328 +#define PBF_MAX_CMD_LINES_E4 3328 +#define PBF_MAX_CMD_LINES_E5 5280 /* Number of BTB blocks. Each block is 256B. */ #define BTB_MAX_BLOCKS 1440 @@ -737,8 +743,8 @@ union rdma_eqe_data */ struct malicious_vf_eqe_data { - u8 vfId /* Malicious VF ID */; - u8 errId /* Malicious VF error */; + u8 vf_id /* Malicious VF ID */; + u8 err_id /* Malicious VF error */; __le16 reserved[3]; }; @@ -747,7 +753,7 @@ struct malicious_vf_eqe_data */ struct initial_cleanup_eqe_data { - u8 vfId /* VF ID */; + u8 vf_id /* VF ID */; u8 reserved[7]; }; @@ -1059,7 +1065,7 @@ struct db_rdma_dpm_data { __le16 icid /* internal CID */; __le16 prod_val /* aggregated value to update */; - struct db_rdma_dpm_params params /* parameters passed to RDMA firmware */; + struct db_rdma_dpm_params params /* parametes passed to RDMA firmware */; }; @@ -1113,25 +1119,25 @@ enum igu_seg_access /* - * Enumeration for L3 type field of parsing_and_err_flags_union. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) + * Enumeration for L3 type field of parsing_and_err_flags. L3Type: 0 - unknown (not ip) ,1 - Ipv4, 2 - Ipv6 (this field can be filled according to the last-ethertype) */ enum l3_type { - e_l3Type_unknown, - e_l3Type_ipv4, - e_l3Type_ipv6, + e_l3_type_unknown, + e_l3_type_ipv4, + e_l3_type_ipv6, MAX_L3_TYPE }; /* - * Enumeration for l4Protocol field of parsing_and_err_flags_union. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. + * Enumeration for l4Protocol field of parsing_and_err_flags. L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. */ enum l4_protocol { - e_l4Protocol_none, - e_l4Protocol_tcp, - e_l4Protocol_udp, + e_l4_protocol_none, + e_l4_protocol_tcp, + e_l4_protocol_udp, MAX_L4_PROTOCOL }; @@ -1146,11 +1152,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L3TYPE_SHIFT 0 #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_MASK 0x3 /* L4-protocol 0 - none, 1 - TCP, 2- UDP. if the packet is IPv4 fragment, and its not the first fragment, the protocol-type should be set to none. (use enum l4_protocol) */ #define PARSING_AND_ERR_FLAGS_L4PROTOCOL_SHIFT 2 -#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4 fragment. */ +#define PARSING_AND_ERR_FLAGS_IPV4FRAG_MASK 0x1 /* Set if the packet is IPv4/IPv6 fragment. */ #define PARSING_AND_ERR_FLAGS_IPV4FRAG_SHIFT 4 -#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* Set if VLAN tag exists. Invalid if tunnel type are IP GRE or IP GENEVE. */ +#define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_MASK 0x1 /* corresponds to the same 8021q tag that is selected for 8021q-tag fiel. This flag should be set if the tag appears in the packet, regardless of its value. */ #define PARSING_AND_ERR_FLAGS_TAG8021QEXIST_SHIFT 5 -#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_MASK 0x1 /* Set if L4 checksum was calculated. taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_L4CHKSMWASCALCULATED_SHIFT 6 #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_MASK 0x1 /* Set for PTP packet. */ #define PARSING_AND_ERR_FLAGS_TIMESYNCPKT_SHIFT 7 @@ -1162,11 +1168,11 @@ struct parsing_and_err_flags #define PARSING_AND_ERR_FLAGS_L4CHKSMERROR_SHIFT 10 #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_MASK 0x1 /* Set if GRE/VXLAN/GENEVE tunnel detected. */ #define PARSING_AND_ERR_FLAGS_TUNNELEXIST_SHIFT 11 -#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* Set if VLAN tag exists in tunnel header. */ +#define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_MASK 0x1 /* This flag should be set if the tag appears in the packet tunnel header, regardless of its value.. */ #define PARSING_AND_ERR_FLAGS_TUNNEL8021QTAGEXIST_SHIFT 12 #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_MASK 0x1 /* Set if either tunnel-ipv4-version-mismatch or tunnel-ipv4-hdr-len-error or tunnel-ipv4-cksm is set or tunneling ipv6 ver mismatch */ #define PARSING_AND_ERR_FLAGS_TUNNELIPHDRERROR_SHIFT 13 -#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* Set if GRE or VXLAN/GENEVE UDP checksum was calculated. */ +#define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_MASK 0x1 /* taken from the EOP descriptor. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMWASCALCULATED_SHIFT 14 #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_MASK 0x1 /* Set if tunnel L4 checksum validation failed. Valid only if tunnel L4 checksum was calculated. */ #define PARSING_AND_ERR_FLAGS_TUNNELL4CHKSMERROR_SHIFT 15 @@ -1419,21 +1425,42 @@ enum rss_hash_type /* * status block structure */ -struct status_block +struct status_block_e4 { - __le16 pi_array[PIS_PER_SB]; + __le16 pi_array[PIS_PER_SB_E4]; __le32 sb_num; -#define STATUS_BLOCK_SB_NUM_MASK 0x1FF -#define STATUS_BLOCK_SB_NUM_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD_MASK 0x7F -#define STATUS_BLOCK_ZERO_PAD_SHIFT 9 -#define STATUS_BLOCK_ZERO_PAD2_MASK 0xFFFF -#define STATUS_BLOCK_ZERO_PAD2_SHIFT 16 +#define STATUS_BLOCK_E4_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E4_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E4_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E4_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E4_ZERO_PAD2_SHIFT 16 __le32 prod_index; -#define STATUS_BLOCK_PROD_INDEX_MASK 0xFFFFFF -#define STATUS_BLOCK_PROD_INDEX_SHIFT 0 -#define STATUS_BLOCK_ZERO_PAD3_MASK 0xFF -#define STATUS_BLOCK_ZERO_PAD3_SHIFT 24 +#define STATUS_BLOCK_E4_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E4_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E4_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E4_ZERO_PAD3_SHIFT 24 +}; + + +/* + * status block structure + */ +struct status_block_e5 +{ + __le16 pi_array[PIS_PER_SB_E5]; + __le32 sb_num; +#define STATUS_BLOCK_E5_SB_NUM_MASK 0x1FF +#define STATUS_BLOCK_E5_SB_NUM_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD_MASK 0x7F +#define STATUS_BLOCK_E5_ZERO_PAD_SHIFT 9 +#define STATUS_BLOCK_E5_ZERO_PAD2_MASK 0xFFFF +#define STATUS_BLOCK_E5_ZERO_PAD2_SHIFT 16 + __le32 prod_index; +#define STATUS_BLOCK_E5_PROD_INDEX_MASK 0xFFFFFF +#define STATUS_BLOCK_E5_PROD_INDEX_SHIFT 0 +#define STATUS_BLOCK_E5_ZERO_PAD3_MASK 0xFF +#define STATUS_BLOCK_E5_ZERO_PAD3_SHIFT 24 }; Modified: stable/11/sys/dev/qlnx/qlnxe/ecore.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore.h Tue Jun 20 19:16:06 2017 (r320164) @@ -39,8 +39,8 @@ #include "mcp_public.h" #define ECORE_MAJOR_VERSION 8 -#define ECORE_MINOR_VERSION 18 -#define ECORE_REVISION_VERSION 13 +#define ECORE_MINOR_VERSION 30 +#define ECORE_REVISION_VERSION 0 #define ECORE_ENGINEERING_VERSION 0 #define ECORE_VERSION \ @@ -110,13 +110,13 @@ do { \ #define GET_FIELD(value, name) \ (((value) >> (name##_SHIFT)) & name##_MASK) -#define ECORE_MFW_GET_FIELD(name, field) \ - (((name) & (field ## _MASK)) >> (field ## _SHIFT)) +#define GET_MFW_FIELD(name, field) \ + (((name) & (field ## _MASK)) >> (field ## _OFFSET)) -#define ECORE_MFW_SET_FIELD(name, field, value) \ +#define SET_MFW_FIELD(name, field, value) \ do { \ - (name) &= ~((field ## _MASK) << (field ## _SHIFT)); \ - (name) |= (((value) << (field ## _SHIFT)) & (field ## _MASK)); \ + (name) &= ~((field ## _MASK) << (field ## _OFFSET)); \ + (name) |= (((value) << (field ## _OFFSET)) & (field ## _MASK)); \ } while (0) static OSAL_INLINE u32 DB_ADDR(u32 cid, u32 DEMS) @@ -401,6 +401,11 @@ enum ecore_wol_support { ECORE_WOL_SUPPORT_PME, }; +enum ecore_db_rec_exec { + DB_REC_DRY_RUN, + DB_REC_REAL_DEAL, +}; + struct ecore_hw_info { /* PCI personality */ enum ecore_pci_personality personality; @@ -450,10 +455,7 @@ struct ecore_hw_info { #ifndef ETH_ALEN #define ETH_ALEN 6 /* @@@ TBD - define somewhere else for Windows */ #endif - unsigned char hw_mac_addr[ETH_ALEN]; - u64 node_wwn; /* For FCoE only */ - u64 port_wwn; /* For FCoE only */ u16 num_iscsi_conns; u16 num_fcoe_conns; @@ -537,6 +539,12 @@ struct ecore_qm_info { u8 num_pf_rls; }; +struct ecore_db_recovery_info { + osal_list_t list; + osal_spinlock_t lock; + u32 db_recovery_counter; +}; + struct storm_stats { u32 address; u32 len; @@ -605,6 +613,11 @@ struct ecore_hwfn { struct ecore_ptt *p_main_ptt; struct ecore_ptt *p_dpc_ptt; + /* PTP will be used only by the leading funtion. + * Usage of all PTP-apis should be synchronized as result. + */ + struct ecore_ptt *p_ptp_ptt; + struct ecore_sb_sp_info *p_sp_sb; struct ecore_sb_attn_info *p_sb_attn; @@ -661,6 +674,9 @@ struct ecore_hwfn { /* L2-related */ struct ecore_l2_info *p_l2_info; + + /* Mechanism for recovering from doorbell drop */ + struct ecore_db_recovery_info db_recovery_info; }; enum ecore_mf_mode { @@ -694,7 +710,7 @@ struct ecore_dev { #define ECORE_IS_AH(dev) ((dev)->type == ECORE_DEV_TYPE_AH) #define ECORE_IS_K2(dev) ECORE_IS_AH(dev) -#define ECORE_IS_E5(dev) false +#define ECORE_IS_E5(dev) ((dev)->type == ECORE_DEV_TYPE_E5) #define ECORE_E5_MISSING_CODE OSAL_BUILD_BUG_ON(false) @@ -703,6 +719,7 @@ struct ecore_dev { #define ECORE_DEV_ID_MASK 0xff00 #define ECORE_DEV_ID_MASK_BB 0x1600 #define ECORE_DEV_ID_MASK_AH 0x8000 +#define ECORE_DEV_ID_MASK_E5 0x8100 u16 chip_num; #define CHIP_NUM_MASK 0xffff @@ -746,7 +763,7 @@ struct ecore_dev { #define CHIP_BOND_ID_SHIFT 0 u8 num_engines; - u8 num_ports_in_engines; + u8 num_ports_in_engine; u8 num_funcs_in_port; u8 path_id; @@ -836,6 +853,9 @@ struct ecore_dev { : MAX_SB_PER_PATH_K2) #define NUM_OF_ENG_PFS(dev) (ECORE_IS_BB(dev) ? MAX_NUM_PFS_BB \ : MAX_NUM_PFS_K2) + +#define CRC8_TABLE_SIZE 256 + /** * @brief ecore_concrete_to_sw_fid - get the sw function id from * the concrete value. @@ -844,8 +864,7 @@ struct ecore_dev { * * @return OSAL_INLINE u8 */ -static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct ecore_dev *p_dev, - u32 concrete_fid) +static OSAL_INLINE u8 ecore_concrete_to_sw_fid(u32 concrete_fid) { u8 vfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_VFID); u8 pfid = GET_FIELD(concrete_fid, PXP_CONCRETE_FID_PFID); @@ -860,8 +879,8 @@ static OSAL_INLINE u8 ecore_concrete_to_sw_fid(struct return sw_fid; } -#define PURE_LB_TC 8 #define PKT_LB_TC 9 +#define MAX_NUM_VOQS_E4 20 int ecore_configure_vport_wfq(struct ecore_dev *p_dev, u16 vp_id, u32 rate); void ecore_configure_vp_wfq_on_link_change(struct ecore_dev *p_dev, @@ -873,6 +892,7 @@ int ecore_configure_pf_min_bandwidth(struct ecore_dev void ecore_clean_wfq_db(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); int ecore_device_num_engines(struct ecore_dev *p_dev); int ecore_device_num_ports(struct ecore_dev *p_dev); +int ecore_device_get_port_id(struct ecore_dev *p_dev); void ecore_set_fw_mac_addr(__le16 *fw_msb, __le16 *fw_mid, __le16 *fw_lsb, u8 *mac); @@ -892,6 +912,13 @@ u16 ecore_get_cm_pq_idx_mcos(struct ecore_hwfn *p_hwfn u16 ecore_get_cm_pq_idx_vf(struct ecore_hwfn *p_hwfn, u16 vf); u16 ecore_get_cm_pq_idx_rl(struct ecore_hwfn *p_hwfn, u8 qpid); +const char *ecore_hw_get_resc_name(enum ecore_resources res_id); + +/* doorbell recovery mechanism */ +void ecore_db_recovery_dp(struct ecore_hwfn *p_hwfn); +void ecore_db_recovery_execute(struct ecore_hwfn *p_hwfn, + enum ecore_db_rec_exec); + /* amount of resources used in qm init */ u8 ecore_init_qm_get_num_tcs(struct ecore_hwfn *p_hwfn); u16 ecore_init_qm_get_num_vfs(struct ecore_hwfn *p_hwfn); @@ -900,7 +927,5 @@ u16 ecore_init_qm_get_num_vports(struct ecore_hwfn *p_ u16 ecore_init_qm_get_num_pqs(struct ecore_hwfn *p_hwfn); #define ECORE_LEADING_HWFN(dev) (&dev->hwfns[0]) - -const char *ecore_hw_get_resc_name(enum ecore_resources res_id); #endif /* __ECORE_H */ Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_chain.h Tue Jun 20 19:16:06 2017 (r320164) @@ -214,6 +214,11 @@ static OSAL_INLINE u32 ecore_chain_get_cons_idx_u32(st return p_chain->u.chain32.cons_idx; } +/* FIXME: + * Should create OSALs for the below definitions. + * For Linux, replace them with the existing U16_MAX and U32_MAX, and handle + * kernel versions that lack them. + */ #define ECORE_U16_MAX ((u16)~0U) #define ECORE_U32_MAX ((u32)~0U) Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.c Tue Jun 20 19:16:06 2017 (r320164) @@ -72,17 +72,7 @@ __FBSDID("$FreeBSD$"); #define TM_ELEM_SIZE 4 /* ILT constants */ -/* If for some reason, HW P size is modified to be less than 32K, - * special handling needs to be made for CDU initialization - */ -#ifdef CONFIG_ECORE_ROCE -/* For RoCE we configure to 64K to cover for RoCE max tasks 256K purpose. Can be - * optimized with resource management scheme - */ #define ILT_DEFAULT_HW_P_SIZE 4 -#else -#define ILT_DEFAULT_HW_P_SIZE 3 -#endif #define ILT_PAGE_IN_BYTES(hw_p_size) (1U << ((hw_p_size) + 12)) #define ILT_CFG_REG(cli, reg) PSWRQ2_REG_##cli##_##reg##_RT_OFFSET @@ -97,22 +87,22 @@ __FBSDID("$FreeBSD$"); /* connection context union */ union conn_context { - struct core_conn_context core_ctx; - struct eth_conn_context eth_ctx; - struct iscsi_conn_context iscsi_ctx; - struct fcoe_conn_context fcoe_ctx; - struct roce_conn_context roce_ctx; + struct e4_core_conn_context core_ctx; + struct e4_eth_conn_context eth_ctx; + struct e4_iscsi_conn_context iscsi_ctx; + struct e4_fcoe_conn_context fcoe_ctx; + struct e4_roce_conn_context roce_ctx; }; /* TYPE-0 task context - iSCSI, FCOE */ union type0_task_context { - struct iscsi_task_context iscsi_ctx; - struct fcoe_task_context fcoe_ctx; + struct e4_iscsi_task_context iscsi_ctx; + struct e4_fcoe_task_context fcoe_ctx; }; /* TYPE-1 task context - ROCE */ union type1_task_context { - struct rdma_task_context roce_ctx; + struct e4_rdma_task_context roce_ctx; }; struct src_ent { @@ -274,12 +264,10 @@ struct ecore_cxt_mngr { }; /* check if resources/configuration is required according to protocol type */ -static bool src_proto(struct ecore_hwfn *p_hwfn, - enum protocol_type type) +static bool src_proto(enum protocol_type type) { return type == PROTOCOLID_ISCSI || type == PROTOCOLID_FCOE || - type == PROTOCOLID_TOE || type == PROTOCOLID_IWARP; } @@ -319,14 +307,13 @@ struct ecore_src_iids { u32 per_vf_cids; }; -static void ecore_cxt_src_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_src_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_src_iids *iids) { u32 i; for (i = 0; i < MAX_CONN_TYPES; i++) { - if (!src_proto(p_hwfn, i)) + if (!src_proto(i)) continue; iids->pf_cids += p_mngr->conn_cfg[i].cid_count; @@ -346,8 +333,7 @@ struct ecore_tm_iids { u32 per_vf_tids; }; -static void ecore_cxt_tm_iids(struct ecore_hwfn *p_hwfn, - struct ecore_cxt_mngr *p_mngr, +static void ecore_cxt_tm_iids(struct ecore_cxt_mngr *p_mngr, struct ecore_tm_iids *iids) { bool tm_vf_required = false; @@ -454,6 +440,20 @@ static struct ecore_tid_seg *ecore_cxt_tid_seg_info(st return OSAL_NULL; } +static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + p_mgr->srq_count = num_srqs; +} + +u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) +{ + struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; + + return p_mgr->srq_count; +} + /* set the iids (cid/tid) count per protocol */ static void ecore_cxt_set_proto_cid_count(struct ecore_hwfn *p_hwfn, enum protocol_type type, @@ -779,7 +779,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); ecore_cxt_qm_iids(p_hwfn, &qm_iids); - total = ecore_qm_pf_mem_size(p_hwfn->rel_pf_id, qm_iids.cids, + total = ecore_qm_pf_mem_size(qm_iids.cids, qm_iids.vf_cids, qm_iids.tids, p_hwfn->qm_info.num_pqs, p_hwfn->qm_info.num_vf_pqs); @@ -797,7 +797,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* SRC */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_SRC]); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); /* Both the PF and VFs searcher connections are stored in the per PF * database. Thus sum the PF searcher cids and all the VFs searcher @@ -822,7 +822,7 @@ enum _ecore_status_t ecore_cxt_cfg_ilt_compute(struct /* TM PF */ p_cli = ecore_cxt_set_cli(&p_mngr->clients[ILT_CLI_TM]); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); total = tm_iids.pf_cids + tm_iids.pf_tids_total; if (total) { p_blk = ecore_cxt_set_blk(&p_cli->pf_blks[0]); @@ -952,7 +952,7 @@ static enum _ecore_status_t ecore_cxt_src_t2_alloc(str if (!p_src->active) return ECORE_SUCCESS; - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; total_size = conn_num * sizeof(struct src_ent); @@ -1287,7 +1287,7 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore clients[ILT_CLI_TSDM].last.reg = ILT_CFG_REG(TSDM, LAST_ILT); clients[ILT_CLI_TSDM].p_size.reg = ILT_CFG_REG(TSDM, P_SIZE); - /* default ILT page size for all clients is 32K */ + /* default ILT page size for all clients is 64K */ for (i = 0; i < ILT_CLI_MAX; i++) p_mngr->clients[i].p_size.val = ILT_DEFAULT_HW_P_SIZE; @@ -1299,7 +1299,9 @@ enum _ecore_status_t ecore_cxt_mngr_alloc(struct ecore p_mngr->vf_count = p_hwfn->p_dev->p_iov_info->total_vfs; /* Initialize the dynamic ILT allocation mutex */ +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_ALLOC(p_hwfn, &p_mngr->mutex); +#endif OSAL_MUTEX_INIT(&p_mngr->mutex); /* Set the cxt mangr pointer priori to further allocations */ @@ -1347,7 +1349,9 @@ void ecore_cxt_mngr_free(struct ecore_hwfn *p_hwfn) ecore_cid_map_free(p_hwfn); ecore_cxt_src_t2_free(p_hwfn); ecore_ilt_shadow_free(p_hwfn); +#ifdef CONFIG_ECORE_LOCK_ALLOC OSAL_MUTEX_DEALLOC(&p_hwfn->p_cxt_mngr->mutex); +#endif OSAL_FREE(p_hwfn->p_dev, p_hwfn->p_cxt_mngr); p_hwfn->p_cxt_mngr = OSAL_NULL; @@ -1555,7 +1559,7 @@ static void ecore_cdu_init_pf(struct ecore_hwfn *p_hwf } } -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { struct ecore_qm_info *qm_info = &p_hwfn->qm_info; struct ecore_qm_iids iids; @@ -1563,9 +1567,8 @@ void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn) OSAL_MEM_ZERO(&iids, sizeof(iids)); ecore_cxt_qm_iids(p_hwfn, &iids); - ecore_qm_pf_rt_init(p_hwfn, p_hwfn->p_main_ptt, p_hwfn->port_id, + ecore_qm_pf_rt_init(p_hwfn, p_ptt, p_hwfn->port_id, p_hwfn->rel_pf_id, qm_info->max_phys_tcs_per_port, - p_hwfn->first_on_engine, iids.cids, iids.vf_cids, iids.tids, qm_info->start_pq, qm_info->num_pqs - qm_info->num_vf_pqs, @@ -1749,7 +1752,7 @@ static void ecore_ilt_init_pf(struct ecore_hwfn *p_hwf if (p_shdw[line].p_virt != OSAL_NULL) { SET_FIELD(ilt_hw_entry, ILT_ENTRY_VALID, 1ULL); SET_FIELD(ilt_hw_entry, ILT_ENTRY_PHY_ADDR, - (p_shdw[line].p_phys >> 12)); + (unsigned long long)(p_shdw[line].p_phys >> 12)); DP_VERBOSE( p_hwfn, ECORE_MSG_ILT, @@ -1771,7 +1774,7 @@ static void ecore_src_init_pf(struct ecore_hwfn *p_hwf struct ecore_src_iids src_iids; OSAL_MEM_ZERO(&src_iids, sizeof(src_iids)); - ecore_cxt_src_iids(p_hwfn, p_mngr, &src_iids); + ecore_cxt_src_iids(p_mngr, &src_iids); conn_num = src_iids.pf_cids + src_iids.per_vf_cids * p_mngr->vf_count; if (!conn_num) return; @@ -1817,7 +1820,7 @@ static void ecore_tm_init_pf(struct ecore_hwfn *p_hwfn u8 i; OSAL_MEM_ZERO(&tm_iids, sizeof(tm_iids)); - ecore_cxt_tm_iids(p_hwfn, p_mngr, &tm_iids); + ecore_cxt_tm_iids(p_mngr, &tm_iids); /* @@@TBD No pre-scan for now */ @@ -1908,9 +1911,11 @@ static void ecore_prs_init_common(struct ecore_hwfn *p static void ecore_prs_init_pf(struct ecore_hwfn *p_hwfn) { struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_conn_type_cfg *p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + struct ecore_conn_type_cfg *p_fcoe; struct ecore_tid_seg *p_tid; + p_fcoe = &p_mngr->conn_cfg[PROTOCOLID_FCOE]; + /* If FCoE is active set the MAX OX_ID (tid) in the Parser */ if (!p_fcoe->cid_count) return; @@ -1934,9 +1939,9 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf ecore_prs_init_common(p_hwfn); } -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn) +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt) { - ecore_qm_init_pf(p_hwfn); + ecore_qm_init_pf(p_hwfn, p_ptt); ecore_cm_init_pf(p_hwfn); ecore_dq_init_pf(p_hwfn); ecore_cdu_init_pf(p_hwfn); @@ -2119,20 +2124,6 @@ enum _ecore_status_t ecore_cxt_get_cid_info(struct eco return ECORE_SUCCESS; } -static void ecore_cxt_set_srq_count(struct ecore_hwfn *p_hwfn, u32 num_srqs) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - p_mgr->srq_count = num_srqs; -} - -u32 ecore_cxt_get_srq_count(struct ecore_hwfn *p_hwfn) -{ - struct ecore_cxt_mngr *p_mgr = p_hwfn->p_cxt_mngr; - - return p_mgr->srq_count; -} - static void ecore_rdma_set_pf_params(struct ecore_hwfn *p_hwfn, struct ecore_rdma_pf_params *p_params, u32 num_tasks) @@ -2143,7 +2134,7 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn /* Override personality with rdma flavor */ num_srqs = OSAL_MIN_T(u32, ECORE_RDMA_MAX_SRQS, p_params->num_srqs); - /* The only case RDMA personality can be overridden is if NVRAM is + /* The only case RDMA personality can be overriden is if NVRAM is * configured with ETH_RDMA or if no rdma protocol was requested */ switch (p_params->rdma_protocol) { @@ -2170,8 +2161,12 @@ static void ecore_rdma_set_pf_params(struct ecore_hwfn switch (p_hwfn->hw_info.personality) { case ECORE_PCI_ETH_IWARP: - num_qps = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); - num_cons = num_qps; + /* Each QP requires one connection */ + num_cons = OSAL_MIN_T(u32, IWARP_MAX_QPS, p_params->num_qps); +#ifdef CONFIG_ECORE_IWARP /* required for the define */ + /* additional connections required for passive tcp handling */ + num_cons += ECORE_IWARP_PREALLOC_CNT; +#endif proto = PROTOCOLID_IWARP; p_params->roce_edpm_mode = false; break; @@ -2576,14 +2571,14 @@ enum _ecore_status_t ecore_cxt_get_task_ctx(struct eco u8 ctx_type, void **pp_task_ctx) { - struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; - struct ecore_ilt_client_cfg *p_cli; - struct ecore_ilt_cli_blk *p_seg; - struct ecore_tid_seg *p_seg_info; - u32 proto, seg; - u32 total_lines; - u32 tid_size, ilt_idx; - u32 num_tids_per_block; + struct ecore_cxt_mngr *p_mngr = p_hwfn->p_cxt_mngr; + struct ecore_ilt_client_cfg *p_cli; + struct ecore_tid_seg *p_seg_info; + struct ecore_ilt_cli_blk *p_seg; + u32 num_tids_per_block; + u32 tid_size, ilt_idx; + u32 total_lines; + u32 proto, seg; /* Verify the personality */ switch (p_hwfn->hw_info.personality) { Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_cxt.h Tue Jun 20 19:16:06 2017 (r320164) @@ -28,7 +28,6 @@ * */ - #ifndef _ECORE_CID_ #define _ECORE_CID_ @@ -130,15 +129,17 @@ void ecore_cxt_hw_init_common(struct ecore_hwfn *p_hwf * @brief ecore_cxt_hw_init_pf - Initailze ILT and DQ, PF phase, per path. * * @param p_hwfn + * @param p_ptt */ -void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_cxt_hw_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief ecore_qm_init_pf - Initailze the QM PF phase, per path * * @param p_hwfn + * @param p_ptt */ -void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn); +void ecore_qm_init_pf(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt); /** * @brief Reconfigures QM pf on the fly Modified: stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c ============================================================================== --- stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 19:00:55 2017 (r320163) +++ stable/11/sys/dev/qlnx/qlnxe/ecore_dbg_fw_funcs.c Tue Jun 20 19:16:06 2017 (r320164) @@ -31,7 +31,6 @@ #include __FBSDID("$FreeBSD$"); - #include "bcm_osal.h" #include "ecore.h" #include "ecore_hw.h" @@ -62,9 +61,6 @@ enum mem_groups { MEM_GROUP_IOR, MEM_GROUP_RAM, MEM_GROUP_BTB_RAM, - MEM_GROUP_RDIF_CTX, - MEM_GROUP_TDIF_CTX, - MEM_GROUP_CFC_MEM, MEM_GROUP_CONN_CFC_MEM, MEM_GROUP_TASK_CFC_MEM, MEM_GROUP_CAU_PI, @@ -73,6 +69,9 @@ enum mem_groups { MEM_GROUP_PBUF, MEM_GROUP_MULD_MEM, MEM_GROUP_BTB_MEM, + MEM_GROUP_RDIF_CTX, + MEM_GROUP_TDIF_CTX, + MEM_GROUP_CFC_MEM, MEM_GROUP_IGU_MEM, MEM_GROUP_IGU_MSIX, MEM_GROUP_CAU_SB, @@ -95,9 +94,6 @@ static const char* s_mem_group_names[] = { "IOR", "RAM", "BTB_RAM", - "RDIF_CTX", - "TDIF_CTX", - "CFC_MEM", "CONN_CFC_MEM", "TASK_CFC_MEM", "CAU_PI", @@ -106,6 +102,9 @@ static const char* s_mem_group_names[] = { "PBUF", "MULD_MEM", "BTB_MEM", + "RDIF_CTX", + "TDIF_CTX", + "CFC_MEM", "IGU_MEM", "IGU_MSIX", "CAU_SB", @@ -161,7 +160,7 @@ static u32 cond12(const u32 *r, const u32 *imm) { return (r[0] != r[1] && r[2] > imm[0]); } -static u32 cond3(const u32 *r, const u32 *imm) { +static u32 cond3(const u32 *r, const u32 OSAL_UNUSED *imm) { return (r[0] != r[1]); } @@ -256,7 +255,7 @@ struct storm_defs { /* Block constant definitions */ struct block_defs { const char *name; - bool has_dbg_bus[MAX_CHIP_IDS]; + bool exists[MAX_CHIP_IDS]; bool associated_to_storm; /* Valid only if associated_to_storm is true */ @@ -280,8 +279,8 @@ struct block_defs { /* Reset register definitions */ struct reset_reg_defs { u32 addr; - u32 unreset_val; bool exists[MAX_CHIP_IDS]; + u32 unreset_val[MAX_CHIP_IDS]; }; /* Debug Bus Constraint operation constant definitions */ @@ -311,8 +310,8 @@ struct rss_mem_defs { const char *mem_name; const char *type_name; u32 addr; + u32 entry_width; u32 num_entries[MAX_CHIP_IDS]; - u32 entry_width[MAX_CHIP_IDS]; }; struct vfc_ram_defs { @@ -550,7 +549,7 @@ static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFE static struct dbg_array s_dbg_arrays[MAX_BIN_DBG_BUFFER_TYPE] = { /* BIN_BUF_DBG_MODE_TREE */ - { (const u32 *)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, + { (const u32*)dbg_modes_tree_buf, OSAL_ARRAY_SIZE(dbg_modes_tree_buf)}, /* BIN_BUF_DBG_DUMP_REG */ { dump_reg, OSAL_ARRAY_SIZE(dump_reg) }, @@ -615,7 +614,7 @@ static struct chip_defs s_chip_defs[MAX_CHIP_IDS] = { /* FPGA */ { MAX_NUM_PORTS_BB, MAX_NUM_PFS_BB, MAX_NUM_VFS_BB } } }, - { "k2", + { "ah", /* ASIC */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@freebsd.org Tue Jun 20 19:59:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD627DA0F45; Tue, 20 Jun 2017 19:59:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A800D714C9; Tue, 20 Jun 2017 19:59:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KJxvPs008284; Tue, 20 Jun 2017 19:59:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KJxvtI008283; Tue, 20 Jun 2017 19:59:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201706201959.v5KJxvtI008283@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 20 Jun 2017 19:59:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320168 - stable/10/sys/geom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 19:59:59 -0000 Author: marius Date: Tue Jun 20 19:59:57 2017 New Revision: 320168 URL: https://svnweb.freebsd.org/changeset/base/320168 Log: The GEOM KPI in stable/10 requires Giant to be unacquired (a requirement dropped in r300287). So wrap calling into GEOM in {DROP,PICKUP}_GIANT(), similar to what as been done prio to r300288. This fixes a "Giant owned" panic with r318159 in place and INVARIANTS enabled. Reported by: Oliver Pinter Modified: stable/10/sys/geom/geom_flashmap.c Modified: stable/10/sys/geom/geom_flashmap.c ============================================================================== --- stable/10/sys/geom/geom_flashmap.c Tue Jun 20 19:45:02 2017 (r320167) +++ stable/10/sys/geom/geom_flashmap.c Tue Jun 20 19:59:57 2017 (r320168) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -230,10 +231,12 @@ g_flashmap_load(device_t dev, struct g_provider *pp, f void flash_register_slicer(flash_slicer_t slicer, u_int type, bool force) { + DROP_GIANT(); g_topology_lock(); if (g_flashmap_slicers[type].slicer == NULL || force == TRUE) g_flashmap_slicers[type].slicer = slicer; g_topology_unlock(); + PICKUP_GIANT(); } static struct g_class g_flashmap_class = { From owner-svn-src-stable@freebsd.org Tue Jun 20 20:19:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21A5FDA1387; Tue, 20 Jun 2017 20:19:59 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E564F71E69; Tue, 20 Jun 2017 20:19:58 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5KKJwF1016508; Tue, 20 Jun 2017 20:19:58 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5KKJv39016506; Tue, 20 Jun 2017 20:19:57 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201706202019.v5KKJv39016506@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 20 Jun 2017 20:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320169 - stable/11/usr.bin/procstat X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 20:19:59 -0000 Author: brooks Date: Tue Jun 20 20:19:57 2017 New Revision: 320169 URL: https://svnweb.freebsd.org/changeset/base/320169 Log: MFC r318968: Add missing usage and getopt(3) options - Add the missing option 'n' to the getopt(3) string - Add the missing options 'libxo' and 'N' to the usage message - Add the missing options 'M' and 'N' to the man-page Submitted by: Keegan Drake H.P. Differential Revision: https://reviews.freebsd.org/D10915 Approved by: re (gjb) Modified: stable/11/usr.bin/procstat/procstat.1 stable/11/usr.bin/procstat/procstat.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/procstat/procstat.1 ============================================================================== --- stable/11/usr.bin/procstat/procstat.1 Tue Jun 20 19:59:57 2017 (r320168) +++ stable/11/usr.bin/procstat/procstat.1 Tue Jun 20 20:19:57 2017 (r320169) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 11, 2017 +.Dd June 20, 2017 .Dt PROCSTAT 1 .Os .Sh NAME @@ -35,6 +35,8 @@ .Nm .Op Fl -libxo .Op Fl CHhn +.Op Fl M Ar core +.Op Fl N Ar system .Op Fl w Ar interval .Op Fl b | c | e | f | i | j | k | l | r | s | S | t | v | x .Op Fl a | Ar pid | Ar core ... Modified: stable/11/usr.bin/procstat/procstat.c ============================================================================== --- stable/11/usr.bin/procstat/procstat.c Tue Jun 20 19:59:57 2017 (r320168) +++ stable/11/usr.bin/procstat/procstat.c Tue Jun 20 20:19:57 2017 (r320169) @@ -49,10 +49,11 @@ static void usage(void) { - xo_error("usage: procstat [-CHhn] [-M core] [-N system] " - "[-w interval]\n" + xo_error("usage: procstat [--libxo] [-CHhn] [-M core] " + "[-N system] [-w interval]\n" " [-b | -c | -e | -f | -i | -j | -k | " - "-l | -r | -s | -S | -t | -v | -x]\n" + "-l | -r | -s | \n" + " -S | -t | -v | -x]\n" " [-a | pid | core ...]\n"); xo_finish(); exit(EX_USAGE); @@ -161,7 +162,7 @@ main(int argc, char *argv[]) argc = xo_parse_args(argc, argv); xocontainer = "basic"; - while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrsStvw:x")) != -1) { + while ((ch = getopt(argc, argv, "abCcefHhijklM:N:nrSstvw:x")) != -1) { switch (ch) { case 'C': Cflag++; From owner-svn-src-stable@freebsd.org Tue Jun 20 21:11:04 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6544DDA282B for ; Tue, 20 Jun 2017 21:11:04 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: from mail-ua0-x22a.google.com (mail-ua0-x22a.google.com [IPv6:2607:f8b0:400c:c08::22a]) (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 1AC3074598 for ; Tue, 20 Jun 2017 21:11:04 +0000 (UTC) (envelope-from oliver.pinter@hardenedbsd.org) Received: by mail-ua0-x22a.google.com with SMTP id d45so54395784uai.1 for ; Tue, 20 Jun 2017 14:11:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DYDEUtwJDJeCqO8g8ZqXE7fcj7oc+M/TpPCEi+egM9o=; b=qRMd1ooSmCwVBNku8ijGG7kBcZ1uJyz8ZwL2RRrG0rVSXHsXw0yEmOyJRlk2gnf3Oa SbLub1z7z20+eusJlV8XLzrAkeOEfqhndITz+jDSekOViWuzEnIpAev9IhEZ32aePrrW eLhyFdyFYxqCQCe9yUZ06jrQRsoGSTx07IO1ZfU3sLCJInvPMdO9W9NJcHIT8uGTAidL +j5Nw6GGjNQJ0d5E7JCHdVne1wHBtm2uBNWLErx7FrfoslT9h6meYSN2aeAsLxTEY6s6 hZ11+F6keKi454BL/nlOj8PzIugkL/3GBbee+SREcILRZp1ToQ+xOcSIBX5kgjC5Ghnd 44hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DYDEUtwJDJeCqO8g8ZqXE7fcj7oc+M/TpPCEi+egM9o=; b=uhiKozCjueZ+dFikJEAArSNx3o703KNx63kRKIgaiTDaV3TcUfMhj6VqPs+PZcjfX1 pe7XUOD5D+5mVYseOKmwfYhXsTf6K2RknIT2f4F6g0YCM8Bz/FfBA4NqENdaAasR7St9 R0AKCCCKRcH+D0lvCR3UWf3sF8RqCLR6XGMRc8rdxjIRrp59Y3zVifQoxt3B24I7rukU b3FF9fTiSDq4NI/uJVDQgRLTlfFz/hSrKIyqS/jkom+FaYSfQK8DmwAFmDk/TGHsvYIM 1z2V4sPymU83RQ9sNcyzDOnfrnSpdZC9PbpsuVlbaAYGjsC2cQwK2dL1gBx7omG+QVrj 9tAg== X-Gm-Message-State: AKS2vOzC9UuaPlvYdoQVtFLVf6SKFPT7cPC7VTPocM94nbTxFWqMgVlB g/0M6Mm2tg9YIf3Nbeksp/ildTpr21xe X-Received: by 10.159.40.3 with SMTP id c3mr20852422uac.95.1497993063134; Tue, 20 Jun 2017 14:11:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.36.195 with HTTP; Tue, 20 Jun 2017 14:11:02 -0700 (PDT) In-Reply-To: <322387f5-c7ae-9646-bb7b-6ac6e5478fd9@FreeBSD.org> References: <201503242000.t2OK0Cbg065573@svn.freebsd.org> <5514A07B.70302@FreeBSD.org> <322387f5-c7ae-9646-bb7b-6ac6e5478fd9@FreeBSD.org> From: Oliver Pinter Date: Tue, 20 Jun 2017 23:11:02 +0200 Message-ID: Subject: Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy To: Andriy Gapon Cc: John Baldwin , Randall Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jun 2017 21:11:04 -0000 On 6/20/17, Andriy Gapon wrote: > On 20/06/2017 01:37, Oliver Pinter wrote: >> On 3/27/15, John Baldwin wrote: >>> On 3/24/15 1:00 PM, Randall Stewart wrote: >>>> Author: rrs >>>> Date: Tue Mar 24 20:00:11 2015 >>>> New Revision: 280455 >>>> URL: https://svnweb.freebsd.org/changeset/base/280455 >>>> >>>> Log: >>>> MFC of r277177 and r279894 with the fixes for the PMC for Haswell. >>>> >>>> Sponsored by: Netflix Inc. >>>> >>>> Added: >>>> stable/10/usr.sbin/pmcstudy/ >>>> - copied from r277177, head/usr.sbin/pmcstudy/ >>>> Modified: >>>> stable/10/lib/libpmc/libpmc.c >>>> stable/10/sys/amd64/conf/GENERIC >> >> Hi! >> >> The MFC of 279833 was missing from this commit. I'm CCing avg@, since >> he made a big bunch of hwpmc related MFCs yesterday. > > I've just merged that commit. > Thank you all. Thanks for the fast response and the MFC of all these things. (I was already MFCd of these commits in HardenedBSD, and it's conflicted on this line, and I observed in this way...) > >>> >>> The change to GENERIC looks like it slipped in by accident? Neither of >>> the >>> commits to HEAD enabled hwpmc in GENERIC AFAICT. > > > -- > Andriy Gapon > From owner-svn-src-stable@freebsd.org Wed Jun 21 14:36:26 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EFE2D90F79; Wed, 21 Jun 2017 14:36:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68F9B6F0A2; Wed, 21 Jun 2017 14:36:26 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LEaPas070410; Wed, 21 Jun 2017 14:36:25 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LEaP5A070409; Wed, 21 Jun 2017 14:36:25 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706211436.v5LEaP5A070409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 21 Jun 2017 14:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320188 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 14:36:26 -0000 Author: jhb Date: Wed Jun 21 14:36:25 2017 New Revision: 320188 URL: https://svnweb.freebsd.org/changeset/base/320188 Log: MFC 319702: Fix an off-by-one error in the VM page array on some systems. r313186 changed how the size of the VM page array was calculated to be less wasteful. For most systems, the amount of memory is divided by the overhead required by each page (a page of data plus a struct vm_page) to determine the maximum number of available pages. However, if the remainder for the first non-available page was at least a page of data (so that the only memory missing was a struct vm_page), this last page was left in phys_avail[] but was not allocated an entry in the VM page array. Handle this case by explicitly excluding the page from phys_avail[]. Approved by: re (kib) Modified: stable/11/sys/vm/vm_page.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vm_page.c ============================================================================== --- stable/11/sys/vm/vm_page.c Wed Jun 21 12:19:05 2017 (r320187) +++ stable/11/sys/vm/vm_page.c Wed Jun 21 14:36:25 2017 (r320188) @@ -561,8 +561,13 @@ vm_page_startup(vm_offset_t vaddr) size += vm_phys_segs[i].end - vm_phys_segs[i].start; for (i = 0; phys_avail[i + 1] != 0; i += 2) size += phys_avail[i + 1] - phys_avail[i]; - page_range = size / (PAGE_SIZE + sizeof(struct vm_page)); #elif defined(VM_PHYSSEG_DENSE) + size = high_avail - low_avail; +#else +#error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." +#endif + +#ifdef VM_PHYSSEG_DENSE /* * In the VM_PHYSSEG_DENSE case, the number of pages can account for * the overhead of a page structure per page only if vm_page_array is @@ -570,14 +575,27 @@ vm_page_startup(vm_offset_t vaddr) * allocate page structures representing the physical memory * underlying vm_page_array, even though they will not be used. */ - if (new_end == high_avail) - page_range = (high_avail - low_avail) / (PAGE_SIZE + - sizeof(struct vm_page)); + if (new_end != high_avail) + page_range = size / PAGE_SIZE; else - page_range = high_avail / PAGE_SIZE - first_page; -#else -#error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." #endif + { + page_range = size / (PAGE_SIZE + sizeof(struct vm_page)); + + /* + * If the partial bytes remaining are large enough for + * a page (PAGE_SIZE) without a corresponding + * 'struct vm_page', then new_end will contain an + * extra page after subtracting the length of the VM + * page array. Compensate by subtracting an extra + * page from new_end. + */ + if (size % (PAGE_SIZE + sizeof(struct vm_page)) >= PAGE_SIZE) { + if (new_end == high_avail) + high_avail -= PAGE_SIZE; + new_end -= PAGE_SIZE; + } + } end = new_end; /* From owner-svn-src-stable@freebsd.org Wed Jun 21 14:39:32 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E5B0D9108B; Wed, 21 Jun 2017 14:39:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B91C6F371; Wed, 21 Jun 2017 14:39:32 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5LEdVdb070592; Wed, 21 Jun 2017 14:39:31 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5LEdVYq070591; Wed, 21 Jun 2017 14:39:31 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201706211439.v5LEdVYq070591@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 21 Jun 2017 14:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320190 - stable/10/sys/vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jun 2017 14:39:32 -0000 Author: jhb Date: Wed Jun 21 14:39:31 2017 New Revision: 320190 URL: https://svnweb.freebsd.org/changeset/base/320190 Log: MFC 313186, 319702: Account for overhead of page structures when sizing page array. 313186: Over the years, the code and comments in vm_page_startup() have diverged in one respect. When determining how many page structures to allocate, contrary to what the comments say, the code does not account for the overhead of a page structure per page of physical memory. This revision changes the code to match the comments. 319702: Fix an off-by-one error in the VM page array on some systems. r313186 changed how the size of the VM page array was calculated to be less wasteful. For most systems, the amount of memory is divided by the overhead required by each page (a page of data plus a struct vm_page) to determine the maximum number of available pages. However, if the remainder for the first non-available page was at least a page of data (so that the only memory missing was a struct vm_page), this last page was left in phys_avail[] but was not allocated an entry in the VM page array. Handle this case by explicitly excluding the page from phys_avail[]. Requested by: alc Modified: stable/10/sys/vm/vm_page.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/vm_page.c ============================================================================== --- stable/10/sys/vm/vm_page.c Wed Jun 21 14:38:52 2017 (r320189) +++ stable/10/sys/vm/vm_page.c Wed Jun 21 14:39:31 2017 (r320190) @@ -275,17 +275,16 @@ vm_page_domain_init(struct vm_domain *vmd) /* * vm_page_startup: * - * Initializes the resident memory module. - * - * Allocates memory for the page cells, and - * for the object/offset-to-page hash table headers. - * Each page cell is initialized and placed on the free list. + * Initializes the resident memory module. Allocates physical memory for + * bootstrapping UMA and some data structures that are used to manage + * physical pages. Initializes these structures, and populates the free + * page queues. */ vm_offset_t vm_page_startup(vm_offset_t vaddr) { vm_offset_t mapped; - vm_paddr_t page_range; + vm_paddr_t high_avail, low_avail, page_range, size; vm_paddr_t new_end; int i; vm_paddr_t pa; @@ -295,7 +294,6 @@ vm_page_startup(vm_offset_t vaddr) /* the biggest memory array is the second group of pages */ vm_paddr_t end; vm_paddr_t biggestsize; - vm_paddr_t low_water, high_water; int biggestone; biggestsize = 0; @@ -315,26 +313,12 @@ vm_page_startup(vm_offset_t vaddr) vm_phys_add_seg(0, phys_avail[0]); #endif - low_water = phys_avail[0]; - high_water = phys_avail[1]; - - for (i = 0; i < vm_phys_nsegs; i++) { - if (vm_phys_segs[i].start < low_water) - low_water = vm_phys_segs[i].start; - if (vm_phys_segs[i].end > high_water) - high_water = vm_phys_segs[i].end; - } for (i = 0; phys_avail[i + 1]; i += 2) { - vm_paddr_t size = phys_avail[i + 1] - phys_avail[i]; - + size = phys_avail[i + 1] - phys_avail[i]; if (size > biggestsize) { biggestone = i; biggestsize = size; } - if (phys_avail[i] < low_water) - low_water = phys_avail[i]; - if (phys_avail[i + 1] > high_water) - high_water = phys_avail[i + 1]; } end = phys_avail[biggestone+1]; @@ -383,6 +367,16 @@ vm_page_startup(vm_offset_t vaddr) new_end + vm_page_dump_size, VM_PROT_READ | VM_PROT_WRITE); bzero((void *)vm_page_dump, vm_page_dump_size); #endif +#if defined(__amd64__) || defined(__mips__) + /* + * Include the UMA bootstrap pages and vm_page_dump in a crash dump. + * When pmap_map() uses the direct map, they are not automatically + * included. + */ + for (pa = new_end; pa < end; pa += PAGE_SIZE) + dump_add_page(pa); +#endif + phys_avail[biggestone + 1] = new_end; #ifdef __amd64__ /* * Request that the physical pages underlying the message buffer be @@ -398,33 +392,80 @@ vm_page_startup(vm_offset_t vaddr) #endif /* * Compute the number of pages of memory that will be available for - * use (taking into account the overhead of a page structure per - * page). + * use, taking into account the overhead of a page structure per page. + * In other words, solve + * "available physical memory" - round_page(page_range * + * sizeof(struct vm_page)) = page_range * PAGE_SIZE + * for page_range. */ - first_page = low_water / PAGE_SIZE; -#ifdef VM_PHYSSEG_SPARSE - page_range = 0; + low_avail = phys_avail[0]; + high_avail = phys_avail[1]; for (i = 0; i < vm_phys_nsegs; i++) { - page_range += atop(vm_phys_segs[i].end - - vm_phys_segs[i].start); + if (vm_phys_segs[i].start < low_avail) + low_avail = vm_phys_segs[i].start; + if (vm_phys_segs[i].end > high_avail) + high_avail = vm_phys_segs[i].end; } + /* Skip the first chunk. It is already accounted for. */ + for (i = 2; phys_avail[i + 1] != 0; i += 2) { + if (phys_avail[i] < low_avail) + low_avail = phys_avail[i]; + if (phys_avail[i + 1] > high_avail) + high_avail = phys_avail[i + 1]; + } + first_page = low_avail / PAGE_SIZE; +#ifdef VM_PHYSSEG_SPARSE + size = 0; + for (i = 0; i < vm_phys_nsegs; i++) + size += vm_phys_segs[i].end - vm_phys_segs[i].start; for (i = 0; phys_avail[i + 1] != 0; i += 2) - page_range += atop(phys_avail[i + 1] - phys_avail[i]); + size += phys_avail[i + 1] - phys_avail[i]; #elif defined(VM_PHYSSEG_DENSE) - page_range = high_water / PAGE_SIZE - first_page; + size = high_avail - low_avail; #else #error "Either VM_PHYSSEG_DENSE or VM_PHYSSEG_SPARSE must be defined." #endif + +#ifdef VM_PHYSSEG_DENSE + /* + * In the VM_PHYSSEG_DENSE case, the number of pages can account for + * the overhead of a page structure per page only if vm_page_array is + * allocated from the last physical memory chunk. Otherwise, we must + * allocate page structures representing the physical memory + * underlying vm_page_array, even though they will not be used. + */ + if (new_end != high_avail) + page_range = size / PAGE_SIZE; + else +#endif + { + page_range = size / (PAGE_SIZE + sizeof(struct vm_page)); + + /* + * If the partial bytes remaining are large enough for + * a page (PAGE_SIZE) without a corresponding + * 'struct vm_page', then new_end will contain an + * extra page after subtracting the length of the VM + * page array. Compensate by subtracting an extra + * page from new_end. + */ + if (size % (PAGE_SIZE + sizeof(struct vm_page)) >= PAGE_SIZE) { + if (new_end == high_avail) + high_avail -= PAGE_SIZE; + new_end -= PAGE_SIZE; + } + } end = new_end; /* * Reserve an unmapped guard page to trap access to vm_page_array[-1]. + * However, because this page is allocated from KVM, out-of-bounds + * accesses using the direct map will not be trapped. */ vaddr += PAGE_SIZE; /* - * Initialize the mem entry structures now, and put them in the free - * queue. + * Allocate physical memory for the page structures, and map it. */ new_end = trunc_page(end - page_range * sizeof(struct vm_page)); mapped = pmap_map(&vaddr, new_end, end, @@ -432,19 +473,18 @@ vm_page_startup(vm_offset_t vaddr) vm_page_array = (vm_page_t) mapped; #if VM_NRESERVLEVEL > 0 /* - * Allocate memory for the reservation management system's data - * structures. + * Allocate physical memory for the reservation management system's + * data structures, and map it. */ - new_end = vm_reserv_startup(&vaddr, new_end, high_water); + if (high_avail == end) + high_avail = new_end; + new_end = vm_reserv_startup(&vaddr, new_end, high_avail); #endif #if defined(__amd64__) || defined(__mips__) /* - * pmap_map on amd64 and mips can come out of the direct-map, not kvm - * like i386, so the pages must be tracked for a crashdump to include - * this data. This includes the vm_page_array and the early UMA - * bootstrap pages. + * Include vm_page_array and vm_reserv_array in a crash dump. */ - for (pa = new_end; pa < phys_avail[biggestone + 1]; pa += PAGE_SIZE) + for (pa = new_end; pa < end; pa += PAGE_SIZE) dump_add_page(pa); #endif phys_avail[biggestone + 1] = new_end; From owner-svn-src-stable@freebsd.org Thu Jun 22 05:22:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2BE7DA6365; Thu, 22 Jun 2017 05:22:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80D8E6A8E2; Thu, 22 Jun 2017 05:22:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M5MLcu039351; Thu, 22 Jun 2017 05:22:21 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5MLFD039350; Thu, 22 Jun 2017 05:22:21 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706220522.v5M5MLFD039350@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 22 Jun 2017 05:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320217 - stable/11/usr.sbin/rpc.lockd X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:22:22 -0000 Author: delphij Date: Thu Jun 22 05:22:21 2017 New Revision: 320217 URL: https://svnweb.freebsd.org/changeset/base/320217 Log: MFC r320183: Reduce code duplication in rpc.lockd. Reuse create_service code instead of duplicating it in lookup_addresses for kernel NLM. As a (good) side effect this also fixed a few issues that were already fixed in the former but never applied to the latter. Approved by: re (gjb) Modified: stable/11/usr.sbin/rpc.lockd/lockd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.sbin/rpc.lockd/lockd.c ============================================================================== --- stable/11/usr.sbin/rpc.lockd/lockd.c Thu Jun 22 05:10:16 2017 (r320216) +++ stable/11/usr.sbin/rpc.lockd/lockd.c Thu Jun 22 05:22:21 2017 (r320217) @@ -99,9 +99,8 @@ char localhost[] = "localhost"; static int create_service(struct netconfig *nconf); static void complete_service(struct netconfig *nconf, char *port_str); static void clearout_service(void); -void lookup_addresses(struct netconfig *nconf); +static void out_of_mem(void) __dead2; void init_nsm(void); -void out_of_mem(void); void usage(void); void sigalarm_handler(void); @@ -144,7 +143,6 @@ main(int argc, char **argv) break; case 'h': ++nhosts; - hosts_bak = hosts; hosts_bak = realloc(hosts, nhosts * sizeof(char *)); if (hosts_bak == NULL) { if (hosts != NULL) { @@ -172,7 +170,6 @@ main(int argc, char **argv) svcport_str = strdup(optarg); break; default: - case '?': usage(); /* NOTREACHED */ } @@ -227,7 +224,6 @@ main(int argc, char **argv) hosts[0] = strdup("*"); nhosts = 1; } else { - hosts_bak = hosts; if (have_v6) { hosts_bak = realloc(hosts, (nhosts + 2) * sizeof(char *)); @@ -309,7 +305,7 @@ main(int argc, char **argv) if (have_v6 == 0 && strcmp(nconf->nc_protofmly, "inet6") == 0) { /* DO NOTHING */ } else { - lookup_addresses(nconf); + create_service(nconf); } } } @@ -482,9 +478,14 @@ main(int argc, char **argv) /* * This routine creates and binds sockets on the appropriate - * addresses. It gets called one time for each transport. + * addresses if lockd for user NLM, or perform a lookup of + * addresses for the kernel to create transports. + * + * It gets called one time for each transport. + * * It returns 0 upon success, 1 for ingore the call and -1 to indicate * bind failed with EADDRINUSE. + * * Any file descriptors that have been created are stored in sock_fd and * the total count of them is maintained in sock_fdcnt. */ @@ -528,20 +529,23 @@ create_service(struct netconfig *nconf) nhostsbak = nhosts; while (nhostsbak > 0) { --nhostsbak; - sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); - if (sock_fd == NULL) - out_of_mem(); - sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; hints.ai_flags = AI_PASSIVE; - /* - * XXX - using RPC library internal functions. - */ - if ((fd = __rpc_nconf2fd(nconf)) < 0) { - syslog(LOG_ERR, "cannot create socket for %s", - nconf->nc_netid); - continue; + if (!kernel_lockd) { + sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); + if (sock_fd == NULL) + out_of_mem(); + sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ + + /* + * XXX - using RPC library internal functions. + */ + if ((fd = __rpc_nconf2fd(nconf)) < 0) { + syslog(LOG_ERR, "cannot create socket for %s", + nconf->nc_netid); + continue; + } } switch (hints.ai_family) { @@ -555,7 +559,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET6, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -570,7 +575,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -584,8 +590,7 @@ create_service(struct netconfig *nconf) */ if (strcmp("*", hosts[nhostsbak]) == 0) { if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) + if ((res = malloc(sizeof(struct addrinfo))) == NULL) out_of_mem(); mallocd_res = 1; res->ai_flags = hints.ai_flags; @@ -616,7 +621,7 @@ create_service(struct netconfig *nconf) break; default: syslog(LOG_ERR, - "bad addr fam %d", + "bad address family %d", res->ai_family); exit(1); } @@ -627,7 +632,8 @@ create_service(struct netconfig *nconf) "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -637,42 +643,62 @@ create_service(struct netconfig *nconf) syslog(LOG_ERR, "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } + if (kernel_lockd) { + struct netbuf servaddr; + char *uaddr; - /* Store the fd. */ - sock_fd[sock_fdcnt - 1] = fd; + /* + * Look up addresses for the kernel to create transports for. + */ + servaddr.len = servaddr.maxlen = res->ai_addrlen; + servaddr.buf = res->ai_addr; + uaddr = taddr2uaddr(nconf, &servaddr); - /* Now, attempt the bind. */ - r = bindresvport_sa(fd, res->ai_addr); - if (r != 0) { - if (errno == EADDRINUSE && mallocd_svcport != 0) { - if (mallocd_res != 0) { - free(res->ai_addr); - free(res); - } else - freeaddrinfo(res); - return (-1); + addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); + if (!addrs) + out_of_mem(); + addrs[2 * naddrs] = strdup(nconf->nc_netid); + addrs[2 * naddrs + 1] = uaddr; + naddrs++; + } else { + /* Store the fd. */ + sock_fd[sock_fdcnt - 1] = fd; + + /* Now, attempt the bind. */ + r = bindresvport_sa(fd, res->ai_addr); + if (r != 0) { + if (errno == EADDRINUSE && mallocd_svcport != 0) { + if (mallocd_res != 0) { + free(res->ai_addr); + free(res); + } else + freeaddrinfo(res); + return (-1); + } + syslog(LOG_ERR, "bindresvport_sa: %m"); + exit(1); } - syslog(LOG_ERR, "bindresvport_sa: %m"); - exit(1); - } - if (svcport_str == NULL) { - svcport_str = malloc(NI_MAXSERV * sizeof(char)); - if (svcport_str == NULL) - out_of_mem(); - mallocd_svcport = 1; + if (svcport_str == NULL) { + svcport_str = malloc(NI_MAXSERV * sizeof(char)); + if (svcport_str == NULL) + out_of_mem(); + mallocd_svcport = 1; - if (getnameinfo(res->ai_addr, - res->ai_addr->sa_len, NULL, NI_MAXHOST, - svcport_str, NI_MAXSERV * sizeof(char), - NI_NUMERICHOST | NI_NUMERICSERV)) - errx(1, "Cannot get port number"); + if (getnameinfo(res->ai_addr, + res->ai_addr->sa_len, NULL, NI_MAXHOST, + svcport_str, NI_MAXSERV * sizeof(char), + NI_NUMERICHOST | NI_NUMERICSERV)) + errx(1, "Cannot get port number"); + } } + if (mallocd_res != 0) { free(res->ai_addr); free(res); @@ -803,151 +829,6 @@ clearout_service(void) close(sock_fd[i]); } } -} - -/* - * Look up addresses for the kernel to create transports for. - */ -void -lookup_addresses(struct netconfig *nconf) -{ - struct addrinfo hints, *res = NULL; - struct sockaddr_in *sin; - struct sockaddr_in6 *sin6; - struct __rpc_sockinfo si; - struct netbuf servaddr; - int aicode; - int nhostsbak; - u_int32_t host_addr[4]; /* IPv4 or IPv6 */ - char *uaddr; - - if ((nconf->nc_semantics != NC_TPI_CLTS) && - (nconf->nc_semantics != NC_TPI_COTS) && - (nconf->nc_semantics != NC_TPI_COTS_ORD)) - return; /* not my type */ - - /* - * XXX - using RPC library internal functions. - */ - if (!__rpc_nconf2sockinfo(nconf, &si)) { - syslog(LOG_ERR, "cannot get information for %s", - nconf->nc_netid); - return; - } - - /* Get rpc.statd's address on this transport */ - memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; - hints.ai_family = si.si_af; - hints.ai_socktype = si.si_socktype; - hints.ai_protocol = si.si_proto; - - /* - * Bind to specific IPs if asked to - */ - nhostsbak = nhosts; - while (nhostsbak > 0) { - --nhostsbak; - - switch (hints.ai_family) { - case AF_INET: - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET6 address. - */ - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - case AF_INET6: - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET address. - */ - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - default: - break; - } - - /* - * If no hosts were specified, just bind to INADDR_ANY - */ - if (strcmp("*", hosts[nhostsbak]) == 0) { - if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) - out_of_mem(); - res->ai_flags = hints.ai_flags; - res->ai_family = hints.ai_family; - res->ai_protocol = hints.ai_protocol; - switch (res->ai_family) { - case AF_INET: - sin = malloc(sizeof(struct sockaddr_in)); - if (sin == NULL) - out_of_mem(); - sin->sin_family = AF_INET; - sin->sin_port = htons(0); - sin->sin_addr.s_addr = htonl(INADDR_ANY); - res->ai_addr = (struct sockaddr*) sin; - res->ai_addrlen = sizeof(struct sockaddr_in); - break; - case AF_INET6: - sin6 = malloc(sizeof(struct sockaddr_in6)); - if (sin6 == NULL) - out_of_mem(); - sin6->sin6_family = AF_INET6; - sin6->sin6_port = htons(0); - sin6->sin6_addr = in6addr_any; - res->ai_addr = (struct sockaddr*) sin6; - res->ai_addrlen = sizeof(struct sockaddr_in6); - break; - default: - break; - } - } else { - if ((aicode = getaddrinfo(NULL, svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, - gai_strerror(aicode)); - continue; - } - } - } else { - if ((aicode = getaddrinfo(hosts[nhostsbak], svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, gai_strerror(aicode)); - continue; - } - } - - servaddr.len = servaddr.maxlen = res->ai_addrlen; - servaddr.buf = res->ai_addr; - uaddr = taddr2uaddr(nconf, &servaddr); - - addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); - if (!addrs) - out_of_mem(); - addrs[2 * naddrs] = strdup(nconf->nc_netid); - addrs[2 * naddrs + 1] = uaddr; - naddrs++; - } /* end while */ } void From owner-svn-src-stable@freebsd.org Thu Jun 22 05:26:10 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 63E6FDA647B; Thu, 22 Jun 2017 05:26:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FEE86AA9D; Thu, 22 Jun 2017 05:26:10 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M5Q9U5039538; Thu, 22 Jun 2017 05:26:09 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5Q9bL039534; Thu, 22 Jun 2017 05:26:09 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201706220526.v5M5Q9bL039534@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 22 Jun 2017 05:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320218 - in stable/11/usr.bin: factor primes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:26:10 -0000 Author: cperciva Date: Thu Jun 22 05:26:08 2017 New Revision: 320218 URL: https://svnweb.freebsd.org/changeset/base/320218 Log: MFC r31956[12]: Teach primes(6) to enumerate primes up to 2^64 - 1. Approved by: re (delphij) Relnotes: primes(6) now enumerates primes beyond 3825123056546413050, up to a new limit of 2^64 - 1. > Description of fields to fill in above: 76 columns --| > PR: If and which Problem Report is related. > Submitted by: If someone else sent in the change. > Reported by: If someone else reported the issue. > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization. > Differential Revision: https://reviews.freebsd.org/D### (*full* phabric URL needed). > Empty fields above will be automatically removed. _M . M usr.bin/factor/factor.6 M usr.bin/primes/primes.c M usr.bin/primes/primes.h M usr.bin/primes/spsp.c Modified: stable/11/usr.bin/factor/factor.6 stable/11/usr.bin/primes/primes.c stable/11/usr.bin/primes/primes.h stable/11/usr.bin/primes/spsp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/factor/factor.6 ============================================================================== --- stable/11/usr.bin/factor/factor.6 Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/factor/factor.6 Thu Jun 22 05:26:08 2017 (r320218) @@ -119,9 +119,3 @@ cannot handle the factor list, .Nm primes will not get you a world record. -.Pp -.Nm primes -is unable to list primes between 3825123056546413050 and 18446744073709551615 -since it relies on strong pseudoprime tests after sieving, and nobody has -proven how many strong pseudoprime tests are required to prove primality for -integers larger than 3825123056546413050. Modified: stable/11/usr.bin/primes/primes.c ============================================================================== --- stable/11/usr.bin/primes/primes.c Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/primes/primes.c Thu Jun 22 05:26:08 2017 (r320218) @@ -112,7 +112,7 @@ main(int argc, char *argv[]) argv += optind; start = 0; - stop = SPSPMAX; + stop = (uint64_t)(-1); /* * Convert low and high args. Strtoumax(3) sets errno to @@ -139,8 +139,6 @@ main(int argc, char *argv[]) err(1, "%s", argv[1]); if (*p != '\0') errx(1, "%s: illegal numeric format.", argv[1]); - if (stop > SPSPMAX) - errx(1, "%s: stop value too large.", argv[1]); break; case 1: /* Start on the command line. */ Modified: stable/11/usr.bin/primes/primes.h ============================================================================== --- stable/11/usr.bin/primes/primes.h Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/primes/primes.h Thu Jun 22 05:26:08 2017 (r320218) @@ -72,6 +72,3 @@ extern const size_t pattern_size; /* length of pattern /* Test for primality using strong pseudoprime tests. */ int isprime(ubig); - -/* Maximum value which the SPSP code can handle. */ -#define SPSPMAX 3825123056546413050ULL Modified: stable/11/usr.bin/primes/spsp.c ============================================================================== --- stable/11/usr.bin/primes/spsp.c Thu Jun 22 05:22:21 2017 (r320217) +++ stable/11/usr.bin/primes/spsp.c Thu Jun 22 05:26:08 2017 (r320218) @@ -32,23 +32,32 @@ __FBSDID("$FreeBSD$"); #include "primes.h" -/* Return a * b % n, where 0 <= a, b < 2^63, 0 < n < 2^63. */ +/* Return a * b % n, where 0 < n. */ static uint64_t mulmod(uint64_t a, uint64_t b, uint64_t n) { uint64_t x = 0; + uint64_t an = a % n; while (b != 0) { - if (b & 1) - x = (x + a) % n; - a = (a + a) % n; + if (b & 1) { + x += an; + if ((x < an) || (x >= n)) + x -= n; + } + if (an + an < an) + an = an + an - n; + else if (an + an >= n) + an = an + an - n; + else + an = an + an; b >>= 1; } return (x); } -/* Return a^r % n, where 0 <= a < 2^63, 0 < n < 2^63. */ +/* Return a^r % n, where 0 < n. */ static uint64_t powmod(uint64_t a, uint64_t r, uint64_t n) { @@ -173,9 +182,20 @@ isprime(ubig _n) if (n < 3825123056546413051) return (1); - /* We can't handle values larger than this. */ - assert(n <= SPSPMAX); + /* + * Value from: + * J. Sorenson and J. Webster, Strong pseudoprimes to twelve prime + * bases, Math. Comp. 86(304):985-1003, 2017. + */ - /* UNREACHABLE */ - return (0); + /* No SPSPs to bases 2..37 less than 318665857834031151167461. */ + if (!spsp(n, 29)) + return (0); + if (!spsp(n, 31)) + return (0); + if (!spsp(n, 37)) + return (0); + + /* All 64-bit values are less than 318665857834031151167461. */ + return (1); } From owner-svn-src-stable@freebsd.org Thu Jun 22 05:30:28 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4F7DDA6607; Thu, 22 Jun 2017 05:30:28 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EA556AC38; Thu, 22 Jun 2017 05:30:28 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M5URVI039752; Thu, 22 Jun 2017 05:30:27 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M5UR4w039751; Thu, 22 Jun 2017 05:30:27 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201706220530.v5M5UR4w039751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Thu, 22 Jun 2017 05:30:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320219 - stable/11/sys/dev/xen/netfront X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 05:30:28 -0000 Author: cperciva Date: Thu Jun 22 05:30:27 2017 New Revision: 320219 URL: https://svnweb.freebsd.org/changeset/base/320219 Log: MFC r319491: Skip setting the MTU in the netfront driver (xn# devices) if the new MTU is the same as the old MTU. In particular, on Amazon EC2 "T2" instances without this change, the network interface is reinitialized every 30 minutes due to the MTU being (re)set when a new DHCP lease is obtained. Approved by: re (delphij) Modified: stable/11/sys/dev/xen/netfront/netfront.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/xen/netfront/netfront.c ============================================================================== --- stable/11/sys/dev/xen/netfront/netfront.c Thu Jun 22 05:26:08 2017 (r320218) +++ stable/11/sys/dev/xen/netfront/netfront.c Thu Jun 22 05:30:27 2017 (r320219) @@ -1767,6 +1767,9 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) #endif break; case SIOCSIFMTU: + if (ifp->if_mtu == ifr->ifr_mtu) + break; + ifp->if_mtu = ifr->ifr_mtu; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; xn_ifinit(sc); From owner-svn-src-stable@freebsd.org Thu Jun 22 07:08:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3DB8DA7DA0; Thu, 22 Jun 2017 07:08:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AE0570372; Thu, 22 Jun 2017 07:08:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M78KdG080632; Thu, 22 Jun 2017 07:08:20 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M78IYv080609; Thu, 22 Jun 2017 07:08:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220708.v5M78IYv080609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:08:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:08:21 -0000 Author: ngie Date: Thu Jun 22 07:08:18 2017 New Revision: 320222 URL: https://svnweb.freebsd.org/changeset/base/320222 Log: MFC r308139,r308157,r308160,r316818,r318250,r318443: r308139 (by bapt): cron(8): add support for /etc/cron.d and /usr/local/etc/cron.d For automation tools it is way easier to maintain files in directories rather than modifying /etc/crontab. The files in those directories are in the same format as /etc/crontab Relnotes: yes r308157 (by bapt): Fix typo in cron(8) date r308160 (by bapt): syslogd(8): add an 'include' keyword All the '.conf' files not beginning with a '.' contained int he directory following the keyword will be included. This keyword can only be used in the first level configuration files. Modify the default syslogd.conf to 'include' /etc/syslog.d and /usr/local/etc/syslog.d It simplify a lot handling of syslog from automation tools. Relnotes: yes r316818: Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd /etc/pam.d/ftp* should be installed with MK_FTP != no and /etc/pam.d/telnetd should be installed when MK_TELNET != no. r318250: Handle the logfiles in newsyslog and syslogd conditionally, based on src.conf(5) knobs This will allow consumers of FreeBSD to use the unmodified configuration files out of the box more than previously. Both newsyslog.conf and syslog.conf: - /var/log/lpd-errs (MK_LPR != no) - /var/log/ppp.log (MK_PPP != no) - /var/log/xferlog (MK_FTP != no) newsyslog.conf: - /var/log/amd.log (MK_AMD != no) - /var/log/pflog (MK_PF != no) - /var/log/sendmail.st (MK_SENDMAIL != no) r318443: Conditionally handle the crontab entry for atrun(8) The default crontab prior to this commit assumes atrun(8) is always present, which isn't true if MK_AT == no. Move atrun(8) execution from /etc/crontab to /etc/cron.d/at, and base /etc/cron.d/at's installation on MK_AT. cron(8) will detect /etc/cron.d/at's presence when the configuration is loaded and run atrun every 5 minutes like it would prior to this commit. SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at because atrun(8) executes programs, which may rely on environment set in the current default /etc/crontab. Noted by: bdrewery (in an internal review) Relnotes: yes (may need to add environmental modifications to /etc/cron.d/at) Added: stable/10/etc/cron.d/ - copied from r318443, head/etc/cron.d/ stable/10/etc/newsyslog.conf.d/amd.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/amd.conf stable/10/etc/newsyslog.conf.d/ftp.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/ftp.conf stable/10/etc/newsyslog.conf.d/lpr.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/lpr.conf stable/10/etc/newsyslog.conf.d/pf.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/pf.conf stable/10/etc/newsyslog.conf.d/ppp.conf - copied, changed from r318250, head/etc/newsyslog.conf.d/ppp.conf stable/10/etc/newsyslog.conf.d/sendmail.conf - copied unchanged from r318250, head/etc/newsyslog.conf.d/sendmail.conf stable/10/etc/syslog.d/ - copied from r318250, head/etc/syslog.d/ Modified: stable/10/etc/Makefile stable/10/etc/cron.d/Makefile stable/10/etc/crontab stable/10/etc/mtree/BSD.root.dist stable/10/etc/newsyslog.conf stable/10/etc/newsyslog.conf.d/Makefile stable/10/etc/pam.d/Makefile stable/10/etc/syslog.conf stable/10/etc/syslog.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/cron/cron/cron.8 stable/10/usr.sbin/cron/cron/cron.h stable/10/usr.sbin/cron/cron/database.c stable/10/usr.sbin/cron/cron/pathnames.h stable/10/usr.sbin/cron/lib/misc.c stable/10/usr.sbin/syslogd/syslog.conf.5 stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -4,7 +4,9 @@ .include SUBDIR= \ - newsyslog.conf.d + cron.d \ + newsyslog.conf.d \ + syslog.d .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail Modified: stable/10/etc/cron.d/Makefile ============================================================================== --- head/etc/cron.d/Makefile Thu May 18 06:33:55 2017 (r318443) +++ stable/10/etc/cron.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include .if ${MK_AT} != "no" FILES+= at Modified: stable/10/etc/crontab ============================================================================== --- stable/10/etc/crontab Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/crontab Thu Jun 22 07:08:18 2017 (r320222) @@ -7,8 +7,6 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin # #minute hour mday month wday who command # -*/5 * * * * root /usr/libexec/atrun -# # Save some entropy so that /dev/random can re-seed on boot. */11 * * * * operator /usr/libexec/save-entropy # Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/mtree/BSD.root.dist Thu Jun 22 07:08:18 2017 (r320222) @@ -30,6 +30,8 @@ .. bluetooth .. + cron.d + .. defaults .. devd @@ -71,6 +73,8 @@ ssh .. ssl + .. + syslog.d .. zfs .. Modified: stable/10/etc/newsyslog.conf ============================================================================== --- stable/10/etc/newsyslog.conf Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/newsyslog.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -18,7 +18,6 @@ # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/all.log 600 7 * @T00 J -/var/log/amd.log 644 7 100 * J /var/log/auth.log 600 7 100 @0101T JC /var/log/console.log 600 5 100 * J /var/log/cron 600 3 100 * JC @@ -26,18 +25,13 @@ /var/log/debug.log 600 7 100 * JC /var/log/init.log 644 3 100 * J /var/log/kerberos.log 600 7 100 * J -/var/log/lpd-errs 644 7 100 * JC /var/log/maillog 640 7 * @T00 JC /var/log/messages 644 5 100 @0101T JC /var/log/monthly.log 640 12 * $M1D0 JN -/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid -/var/log/ppp.log root:network 640 3 100 * JC /var/log/devd.log 644 3 100 * JC /var/log/security 600 10 100 * JC -/var/log/sendmail.st 640 10 * 168 BN /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN -/var/log/xferlog 600 7 100 * JC /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* Modified: stable/10/etc/newsyslog.conf.d/Makefile ============================================================================== --- stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -6,8 +6,32 @@ BINDIR= /etc/newsyslog.conf.d FILES= +.if ${MK_AMD} != "no" +FILES+= amd.conf +.endif + +.if ${MK_FTP} != "no" +FILES+= ftp.conf +.endif + +.if ${MK_LPR} != "no" +FILES+= lpr.conf +.endif + .if ${MK_OFED} != "no" FILES+= opensm.conf +.endif + +.if ${MK_PF} != "no" +FILES+= pf.conf +.endif + +.if ${MK_PPP} != "no" +FILES+= ppp.conf +.endif + +.if ${MK_SENDMAIL} != "no" +FILES+= sendmail.conf .endif .include Copied and modified: stable/10/etc/newsyslog.conf.d/amd.conf (from r318250, head/etc/newsyslog.conf.d/amd.conf) ============================================================================== --- head/etc/newsyslog.conf.d/amd.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/amd.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/amd.log 644 7 1000 * J +/var/log/amd.log 644 7 100 * J Copied and modified: stable/10/etc/newsyslog.conf.d/ftp.conf (from r318250, head/etc/newsyslog.conf.d/ftp.conf) ============================================================================== --- head/etc/newsyslog.conf.d/ftp.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/ftp.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/xferlog 600 7 1000 * JC +/var/log/xferlog 600 7 100 * JC Copied and modified: stable/10/etc/newsyslog.conf.d/lpr.conf (from r318250, head/etc/newsyslog.conf.d/lpr.conf) ============================================================================== --- head/etc/newsyslog.conf.d/lpr.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/lpr.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/lpd-errs 644 7 1000 * JC +/var/log/lpd-errs 644 7 100 * JC Copied and modified: stable/10/etc/newsyslog.conf.d/pf.conf (from r318250, head/etc/newsyslog.conf.d/pf.conf) ============================================================================== --- head/etc/newsyslog.conf.d/pf.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/pf.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/pflog 600 3 1000 * JB /var/run/pflogd.pid +/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid Copied and modified: stable/10/etc/newsyslog.conf.d/ppp.conf (from r318250, head/etc/newsyslog.conf.d/ppp.conf) ============================================================================== --- head/etc/newsyslog.conf.d/ppp.conf Sat May 13 03:10:50 2017 (r318250, copy source) +++ stable/10/etc/newsyslog.conf.d/ppp.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -1,2 +1,2 @@ # $FreeBSD$ -/var/log/ppp.log root:network 640 3 1000 * JC +/var/log/ppp.log root:network 640 3 100 * JC Copied: stable/10/etc/newsyslog.conf.d/sendmail.conf (from r318250, head/etc/newsyslog.conf.d/sendmail.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/newsyslog.conf.d/sendmail.conf Thu Jun 22 07:08:18 2017 (r320222, copy of r318250, head/etc/newsyslog.conf.d/sendmail.conf) @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/sendmail.st 640 10 * 168 BN Modified: stable/10/etc/pam.d/Makefile ============================================================================== --- stable/10/etc/pam.d/Makefile Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/pam.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -1,23 +1,52 @@ # $FreeBSD$ +.include + NO_OBJ= +FILESGROUPS= FILES + FILES= README \ - atrun \ cron \ - ftpd \ imap \ login \ other \ passwd pop3 \ - rsh \ sshd su system \ - telnetd \ xdm FILESDIR= /etc/pam.d FILESMODE= 644 -FILESMODE_README= 444 + +.if ${MK_AT} != "no" +FILESGROUPS+= AT +AT+= atrun +ATDIR= ${FILESDIR} +ATMODE= ${FILESMODE} +.endif + +.if ${MK_FTP} != "no" +FILESGROUPS+= FTP +FTP+= ftpd +FTPDIR= ${FILESDIR} +FTPMODE= ${FILESMODE} LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp +.endif + +.if ${MK_RCMDS} != "no" +FILESGROUPS+= RCMDS +RCMDS+= rsh +RCMDSDIR= ${FILESDIR} +RCMDSMODE= ${FILESMODE} +.endif + +.if ${MK_TELNET} != "no" +FILESGROUPS+= TELNET +TELNET+= telnetd +TELNETDIR= ${FILESDIR} +TELNETMODE= ${FILESMODE} +.endif + +FILESMODE_README= 444 .include Modified: stable/10/etc/syslog.conf ============================================================================== --- stable/10/etc/syslog.conf Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/etc/syslog.conf Thu Jun 22 07:08:18 2017 (r320222) @@ -10,8 +10,6 @@ security.* /var/log/security auth.info;authpriv.info /var/log/auth.log mail.info /var/log/maillog -lpr.info /var/log/lpd-errs -ftp.info /var/log/xferlog cron.* /var/log/cron !-devd *.=debug /var/log/debug.log @@ -31,6 +29,6 @@ cron.* /var/log/cron # Uncomment this if you wish to see messages produced by devd # !devd # *.>=notice /var/log/devd.log -!ppp -*.* /var/log/ppp.log !* +include /etc/syslog.d +include /usr/local/etc/syslog.d Modified: stable/10/etc/syslog.d/Makefile ============================================================================== --- head/etc/syslog.d/Makefile Sat May 13 03:10:50 2017 (r318250) +++ stable/10/etc/syslog.d/Makefile Thu Jun 22 07:08:18 2017 (r320222) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include .if ${MK_FTP} != "no" FILES+= ftp.conf Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 07:08:18 2017 (r320222) @@ -56,6 +56,7 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map +OLD_FILES+=etc/newsyslog.conf.d/amd.conf OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd @@ -1063,7 +1064,11 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.gz .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers +OLD_FILES+=etc/newsyslog.conf.d/ftp.conf +OLD_FILES+=etc/pam.d/ftp +OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd +OLD_FILES+=etc/syslog.d/ftp.conf OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp OLD_FILES+=usr/bin/pftp @@ -3816,7 +3821,9 @@ OLD_FILES+=usr/share/man/man8/updatedb.8.gz .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap +OLD_FILES+=etc/newsyslog.conf.d/lpr.conf OLD_FILES+=etc/rc.d/lpd +OLD_FILES+=etc/syslog.d/lpr.conf OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr @@ -4192,6 +4199,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinstall .endif .if ${MK_PF} == no +OLD_FILES+=etc/newsyslog.conf.d/pf.conf OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os OLD_FILES+=etc/rc.d/ftp-proxy @@ -4260,7 +4268,9 @@ OLD_FILES+=usr/share/man/man8/portsnap.8.gz .endif .if ${MK_PPP} == no +OLD_FILES+=etc/newsyslog.conf.d/ppp.conf OLD_FILES+=etc/ppp/ppp.conf +OLD_FILES+=etc/syslog.d/ppp.conf OLD_DIRS+=etc/ppp OLD_FILES+=usr/sbin/ppp OLD_FILES+=usr/sbin/pppctl @@ -4460,6 +4470,7 @@ OLD_FILES+=usr/share/man/man8/rtquery.8.gz .endif .if ${MK_SENDMAIL} == no +OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq OLD_FILES+=etc/periodic/daily/460.status-mail-rejects @@ -4778,6 +4789,7 @@ OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcsh.cat .endif .if ${MK_TELNET} == no +OLD_FILES+=etc/pam.d/telnetd OLD_FILES+=usr/bin/telnet OLD_FILES+=usr/libexec/telnetd OLD_FILES+=usr/share/man/man1/telnet.1.gz Modified: stable/10/usr.sbin/cron/cron/cron.8 ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 07:08:18 2017 (r320222) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 29, 2008 +.Dd October 31, 2016 .Dt CRON 8 .Os .Sh NAME @@ -52,7 +52,11 @@ The .Nm utility also searches for .Pa /etc/crontab -which is in a different format (see +and files in +.Pa /etc/cron.d +and +.Pa /usr/local/etc/cron.d +which are in a different format (see .Xr crontab 5 ) . .Pp The Modified: stable/10/usr.sbin/cron/cron/cron.h ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 07:08:18 2017 (r320222) @@ -218,7 +218,7 @@ void set_cron_uid(void), unget_char(int, FILE *), free_entry(entry *), skip_comments(FILE *), - log_it(char *, int, char *, char *), + log_it(char *, int, char *, const char *), log_close(void); int job_runqueue(void), Modified: stable/10/usr.sbin/cron/cron/database.c ============================================================================== --- stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:08:18 2017 (r320222) @@ -45,9 +45,18 @@ load_database(old_db) DIR *dir; struct stat statbuf; struct stat syscron_stat; + time_t maxmtime; DIR_T *dp; cron_db new_db; user *u, *nu; + struct { + const char *name; + struct stat st; + } syscrontabs [] = { + { SYSCRONTABS }, + { LOCALSYSCRONTABS } + }; + int i; Debug(DLOAD, ("[%d] load_database()\n", getpid())) @@ -65,6 +74,16 @@ load_database(old_db) if (stat(SYSCRONTAB, &syscron_stat) < OK) syscron_stat.st_mtime = 0; + maxmtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); + + for (i = 0; i < nitems(syscrontabs); i++) { + if (stat(syscrontabs[i].name, &syscrontabs[i].st) != -1) { + maxmtime = TMAX(syscrontabs[i].st.st_mtime, maxmtime); + } else { + syscrontabs[i].st.st_mtime = 0; + } + } + /* if spooldir's mtime has not changed, we don't need to fiddle with * the database. * @@ -72,7 +91,7 @@ load_database(old_db) * so is guaranteed to be different than the stat() mtime the first * time this function is called. */ - if (old_db->mtime == TMAX(statbuf.st_mtime, syscron_stat.st_mtime)) { + if (old_db->mtime == maxmtime) { Debug(DLOAD, ("[%d] spool dir mtime unch, no load needed.\n", getpid())) return; @@ -83,13 +102,36 @@ load_database(old_db) * actually changed. Whatever is left in the old database when * we're done is chaff -- crontabs that disappeared. */ - new_db.mtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); + new_db.mtime = maxmtime; new_db.head = new_db.tail = NULL; if (syscron_stat.st_mtime) { process_crontab("root", SYS_NAME, SYSCRONTAB, &syscron_stat, &new_db, old_db); + } + + for (i = 0; i < nitems(syscrontabs); i++) { + char tabname[MAXPATHLEN]; + if (syscrontabs[i].st.st_mtime == 0) + continue; + if (!(dir = opendir(syscrontabs[i].name))) { + log_it("CRON", getpid(), "OPENDIR FAILED", + syscrontabs[i].name); + (void) exit(ERROR_EXIT); + } + + while (NULL != (dp = readdir(dir))) { + if (dp->d_name[0] == '.') + continue; + if (dp->d_type != DT_REG) + continue; + snprintf(tabname, sizeof(tabname), "%s/%s", + syscrontabs[i].name, dp->d_name); + process_crontab("root", SYS_NAME, tabname, + &syscrontabs[i].st, &new_db, old_db); + } + closedir(dir); } /* we used to keep this dir open all the time, for the sake of Modified: stable/10/usr.sbin/cron/cron/pathnames.h ============================================================================== --- stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 07:08:18 2017 (r320222) @@ -62,6 +62,8 @@ /* 4.3BSD-style crontab */ #define SYSCRONTAB "/etc/crontab" +#define SYSCRONTABS "/etc/cron.d" +#define LOCALSYSCRONTABS "/usr/local/etc/cron.d" /* what editor to use if no EDITOR or VISUAL * environment variable specified. Modified: stable/10/usr.sbin/cron/lib/misc.c ============================================================================== --- stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 07:08:18 2017 (r320222) @@ -385,11 +385,7 @@ out: if (allow) void -log_it(username, xpid, event, detail) - char *username; - int xpid; - char *event; - char *detail; +log_it(char *username, int xpid, char *event, const char *detail) { #if defined(LOG_FILE) || DEBUGGING PID_T pid = xpid; Modified: stable/10/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 07:08:18 2017 (r320222) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd September 12, 2012 +.Dd November 1, 2016 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -61,6 +61,12 @@ The field is separated from the .Em action field by one or more tab characters or spaces. +.Pp +A special +.Em include +keyword can be used to include all files with names ending in '.conf' and not +beginning with a '.' contained in the directory following the keyword. +This keyword can only be used in the first level configuration file. .Pp Note that if you use spaces as separators, your .Nm Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 06:25:34 2017 (r320221) +++ stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:08:18 2017 (r320222) @@ -97,6 +97,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -120,6 +121,8 @@ __FBSDID("$FreeBSD$"); const char *ConfFile = _PATH_LOGCONF; const char *PidFile = _PATH_LOGPID; const char ctty[] = _PATH_CONSOLE; +static const char include_str[] = "include"; +static const char include_ext[] = ".conf"; #define dprintf if (Debug) printf @@ -1548,96 +1551,46 @@ die(int signo) exit(1); } -/* - * INIT -- Initialize syslogd from configuration table - */ -static void -init(int signo) +static int +configfiles(const struct dirent *dp) { - int i; - FILE *cf; - struct filed *f, *next, **nextp; - char *p; - char cline[LINE_MAX]; - char prog[LINE_MAX]; - char host[MAXHOSTNAMELEN]; - char oldLocalHostName[MAXHOSTNAMELEN]; - char hostMsg[2*MAXHOSTNAMELEN+40]; - char bootfileMsg[LINE_MAX]; + const char *p; + size_t ext_len; - dprintf("init\n"); + if (dp->d_name[0] == '.') + return (0); - /* - * Load hostname (may have changed). - */ - if (signo != 0) - (void)strlcpy(oldLocalHostName, LocalHostName, - sizeof(oldLocalHostName)); - if (gethostname(LocalHostName, sizeof(LocalHostName))) - err(EX_OSERR, "gethostname() failed"); - if ((p = strchr(LocalHostName, '.')) != NULL) { - *p++ = '\0'; - LocalDomain = p; - } else { - LocalDomain = ""; - } + ext_len = sizeof(include_ext) -1; - /* - * Close all open log files. - */ - Initialized = 0; - for (f = Files; f != NULL; f = next) { - /* flush any pending output */ - if (f->f_prevcount) - fprintlog(f, 0, (char *)NULL); + if (dp->d_namlen <= ext_len) + return (0); - switch (f->f_type) { - case F_FILE: - case F_FORW: - case F_CONSOLE: - case F_TTY: - close_filed(f); - break; - case F_PIPE: - if (f->f_un.f_pipe.f_pid > 0) { - close_filed(f); - deadq_enter(f->f_un.f_pipe.f_pid, - f->f_un.f_pipe.f_pname); - } - f->f_un.f_pipe.f_pid = 0; - break; - } - next = f->f_next; - if (f->f_program) free(f->f_program); - if (f->f_host) free(f->f_host); - free((char *)f); - } - Files = NULL; - nextp = &Files; + p = &dp->d_name[dp->d_namlen - ext_len]; + if (strcmp(p, include_ext) != 0) + return (0); - /* open the configuration file */ - if ((cf = fopen(ConfFile, "r")) == NULL) { - dprintf("cannot open %s\n", ConfFile); - *nextp = (struct filed *)calloc(1, sizeof(*f)); - if (*nextp == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.ERR\t/dev/console", *nextp, "*", "*"); - (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); - if ((*nextp)->f_next == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); - Initialized = 1; - return; - } + return (1); +} +static void +readconfigfile(FILE *cf, struct filed **nextp, int allow_includes) +{ + FILE *cf2; + struct filed *f; + struct dirent **ent; + char cline[LINE_MAX]; + char host[MAXHOSTNAMELEN]; + char prog[LINE_MAX]; + char file[MAXPATHLEN]; + char *p, *tmp; + int i, nents; + size_t include_len; + /* * Foreach line in the conf table, open that file. */ f = NULL; + include_len = sizeof(include_str) -1; (void)strlcpy(host, "*", sizeof(host)); (void)strlcpy(prog, "*", sizeof(prog)); while (fgets(cline, sizeof(cline), cf) != NULL) { @@ -1650,6 +1603,42 @@ init(int signo) continue; if (*p == 0) continue; + if (allow_includes && + strncmp(p, include_str, include_len) == 0 && + isspace(p[include_len])) { + p += include_len; + while (isspace(*p)) + p++; + tmp = p; + while (*tmp != '\0' && !isspace(*tmp)) + tmp++; + *tmp = '\0'; + dprintf("Trying to include files in '%s'\n", p); + nents = scandir(p, &ent, configfiles, alphasort); + if (nents == -1) { + dprintf("Unable to open '%s': %s\n", p, + strerror(errno)); + continue; + } + for (i = 0; i < nents; i++) { + if (snprintf(file, sizeof(file), "%s/%s", p, + ent[i]->d_name) >= (int)sizeof(file)) { + dprintf("ignoring path too long: " + "'%s/%s'\n", p, ent[i]->d_name); + free(ent[i]); + continue; + } + free(ent[i]); + cf2 = fopen(file, "r"); + if (cf2 == NULL) + continue; + dprintf("reading %s\n", file); + readconfigfile(cf2, nextp, 0); + fclose(cf2); + } + free(ent); + continue; + } if (*p == '#') { p++; if (*p != '!' && *p != '+' && *p != '-') @@ -1711,6 +1700,91 @@ init(int signo) nextp = &f->f_next; cfline(cline, f, prog, host); } +} + +/* + * INIT -- Initialize syslogd from configuration table + */ +static void +init(int signo) +{ + int i; + FILE *cf; + struct filed *f, *next, **nextp; + char *p; + char oldLocalHostName[MAXHOSTNAMELEN]; + char hostMsg[2*MAXHOSTNAMELEN+40]; + char bootfileMsg[LINE_MAX]; + + dprintf("init\n"); + + /* + * Load hostname (may have changed). + */ + if (signo != 0) + (void)strlcpy(oldLocalHostName, LocalHostName, + sizeof(oldLocalHostName)); + if (gethostname(LocalHostName, sizeof(LocalHostName))) + err(EX_OSERR, "gethostname() failed"); + if ((p = strchr(LocalHostName, '.')) != NULL) { + *p++ = '\0'; + LocalDomain = p; + } else { + LocalDomain = ""; + } + + /* + * Close all open log files. + */ + Initialized = 0; + for (f = Files; f != NULL; f = next) { + /* flush any pending output */ + if (f->f_prevcount) + fprintlog(f, 0, (char *)NULL); + + switch (f->f_type) { + case F_FILE: + case F_FORW: + case F_CONSOLE: + case F_TTY: + close_filed(f); + break; + case F_PIPE: + if (f->f_un.f_pipe.f_pid > 0) { + close_filed(f); + deadq_enter(f->f_un.f_pipe.f_pid, + f->f_un.f_pipe.f_pname); + } + f->f_un.f_pipe.f_pid = 0; + break; + } + next = f->f_next; + if (f->f_program) free(f->f_program); + if (f->f_host) free(f->f_host); + free((char *)f); + } + Files = NULL; + + /* open the configuration file */ + if ((cf = fopen(ConfFile, "r")) == NULL) { + dprintf("cannot open %s\n", ConfFile); + *nextp = (struct filed *)calloc(1, sizeof(*f)); + if (*nextp == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.ERR\t/dev/console", *nextp, "*", "*"); + (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); + if ((*nextp)->f_next == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); + Initialized = 1; + return; + } + + readconfigfile(cf, &Files, 1); /* close the configuration file */ (void)fclose(cf); From owner-svn-src-stable@freebsd.org Thu Jun 22 07:10:02 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6276BDA7E60; Thu, 22 Jun 2017 07:10:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3233870596; Thu, 22 Jun 2017 07:10:02 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7A1ON080922; Thu, 22 Jun 2017 07:10:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7A1xN080921; Thu, 22 Jun 2017 07:10:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220710.v5M7A1xN080921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320223 - stable/10/usr.sbin/cron/cron X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:10:02 -0000 Author: ngie Date: Thu Jun 22 07:10:01 2017 New Revision: 320223 URL: https://svnweb.freebsd.org/changeset/base/320223 Log: MFC r308158: r308158 (by bapt): Allow symlinks to be followed in cron.d directories and fix detection of regular files on NFS Modified: stable/10/usr.sbin/cron/cron/database.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/cron/cron/database.c ============================================================================== --- stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:08:18 2017 (r320222) +++ stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:10:01 2017 (r320223) @@ -44,7 +44,7 @@ load_database(old_db) { DIR *dir; struct stat statbuf; - struct stat syscron_stat; + struct stat syscron_stat, st; time_t maxmtime; DIR_T *dp; cron_db new_db; @@ -124,7 +124,8 @@ load_database(old_db) while (NULL != (dp = readdir(dir))) { if (dp->d_name[0] == '.') continue; - if (dp->d_type != DT_REG) + if (fstatat(dirfd(dir), dp->d_name, &st, 0) == 0 && + !S_ISREG(st.st_mode)) continue; snprintf(tabname, sizeof(tabname), "%s/%s", syscrontabs[i].name, dp->d_name); From owner-svn-src-stable@freebsd.org Thu Jun 22 07:14:40 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0EA59DA8048; Thu, 22 Jun 2017 07:14:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8509170948; Thu, 22 Jun 2017 07:14:39 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7EbWH084864; Thu, 22 Jun 2017 07:14:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7EbQb084863; Thu, 22 Jun 2017 07:14:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220714.v5M7EbQb084863@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320224 - stable/10/usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:14:40 -0000 Author: ngie Date: Thu Jun 22 07:14:37 2017 New Revision: 320224 URL: https://svnweb.freebsd.org/changeset/base/320224 Log: MFC r309194,r309216: r309194 (by bapt): initialize *nextp which could be left uninitialized in case the configuration file cannot be open/read CID: 1365665 r309216 (by bapt): Properly initialize nextp Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:10:01 2017 (r320223) +++ stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:14:37 2017 (r320224) @@ -1764,6 +1764,7 @@ init(int signo) free((char *)f); } Files = NULL; + nextp = &Files; /* open the configuration file */ if ((cf = fopen(ConfFile, "r")) == NULL) { From owner-svn-src-stable@freebsd.org Thu Jun 22 07:35:24 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9973DA83D7; Thu, 22 Jun 2017 07:35:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 757AC7110A; Thu, 22 Jun 2017 07:35:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-24-245-127-120.cpe.metrocast.net [24.245.127.120]) by mail.baldwin.cx (Postfix) with ESMTPSA id 1ADAB10AB01; Thu, 22 Jun 2017 03:35:16 -0400 (EDT) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd To: Ngie Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org References: <201706220708.v5M78IYv080609@repo.freebsd.org> From: John Baldwin Message-ID: Date: Thu, 22 Jun 2017 03:35:15 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <201706220708.v5M78IYv080609@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 22 Jun 2017 03:35:16 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:35:24 -0000 On 6/22/17 3:08 AM, Ngie Cooper wrote: > Author: ngie > Date: Thu Jun 22 07:08:18 2017 > New Revision: 320222 > URL: https://svnweb.freebsd.org/changeset/base/320222 > > Log: > MFC r308139,r308157,r308160,r316818,r318250,r318443: > > r308139 (by bapt): > > cron(8): add support for /etc/cron.d and /usr/local/etc/cron.d > > For automation tools it is way easier to maintain files in directories rather > than modifying /etc/crontab. > > The files in those directories are in the same format as /etc/crontab > > Relnotes: yes > > r308157 (by bapt): > > Fix typo in cron(8) date > > r308160 (by bapt): > > syslogd(8): add an 'include' keyword > > All the '.conf' files not beginning with a '.' contained int he directory > following the keyword will be included. > > This keyword can only be used in the first level configuration files. > > Modify the default syslogd.conf to 'include' /etc/syslog.d and > /usr/local/etc/syslog.d > > It simplify a lot handling of syslog from automation tools. > > Relnotes: yes > > r316818: > > Conditionally install /etc/pam.d/ftp* and /etc/pam.d/telnetd > > /etc/pam.d/ftp* should be installed with MK_FTP != no and > /etc/pam.d/telnetd should be installed when MK_TELNET != no. > > r318250: > > Handle the logfiles in newsyslog and syslogd conditionally, based on > src.conf(5) knobs > > This will allow consumers of FreeBSD to use the unmodified configuration > files out of the box more than previously. > > Both newsyslog.conf and syslog.conf: > - /var/log/lpd-errs (MK_LPR != no) > - /var/log/ppp.log (MK_PPP != no) > - /var/log/xferlog (MK_FTP != no) > > newsyslog.conf: > - /var/log/amd.log (MK_AMD != no) > - /var/log/pflog (MK_PF != no) > - /var/log/sendmail.st (MK_SENDMAIL != no) > > r318443: > > Conditionally handle the crontab entry for atrun(8) > > The default crontab prior to this commit assumes atrun(8) is always > present, which isn't true if MK_AT == no. Move atrun(8) execution > from /etc/crontab to /etc/cron.d/at, and base /etc/cron.d/at's installation > on MK_AT. cron(8) will detect /etc/cron.d/at's presence when the configuration > is loaded and run atrun every 5 minutes like it would prior to this commit. > > SHELL and PATH are duplicated between /etc/crontab and /etc/cron.d/at > because atrun(8) executes programs, which may rely on environment > set in the current default /etc/crontab. > > Noted by: bdrewery (in an internal review) > Relnotes: yes (may need to add environmental modifications to > /etc/cron.d/at) Please revert the breakout of the existing config files. I think that splitting up the conf files is too disruptive of a change (POLA) for stable branches. This was agreed to by other folks in the followup thread to the commits in head that you continue to ignore. In head please either fully split up the files or revert to a single file (another part of that thread you continue to ignore). -- John Baldwin From owner-svn-src-stable@freebsd.org Thu Jun 22 07:42:37 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A88ADDA8717; Thu, 22 Jun 2017 07:42:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EDDE71768; Thu, 22 Jun 2017 07:42:37 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7ga66097153; Thu, 22 Jun 2017 07:42:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7gaGk097152; Thu, 22 Jun 2017 07:42:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220742.v5M7gaGk097152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:42:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320228 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:42:37 -0000 Author: ngie Date: Thu Jun 22 07:42:36 2017 New Revision: 320228 URL: https://svnweb.freebsd.org/changeset/base/320228 Log: MFC r318545: Install {cron.d,newsyslog.conf.d,syslog.d} via `make distribution`, not `make install` I incorrectly started this pattern in r277541 with the opensm newsyslog.conf.d file, and continued using it in r318441 and r318443. This will fix the files being handled improperly via installworld, preventing tools like etcupdate, mergemaster, etc from functioning properly when comparing the installed contents on a system vs the contents in a source tree when doing merges. PR: 219404 MFC with: r277541, r318441, r318443 Modified: stable/10/etc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Jun 22 07:37:10 2017 (r320227) +++ stable/10/etc/Makefile Thu Jun 22 07:42:36 2017 (r320228) @@ -3,11 +3,6 @@ .include -SUBDIR= \ - cron.d \ - newsyslog.conf.d \ - syslog.d - .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail .endif @@ -243,9 +238,11 @@ distribution: .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif + ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install + ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif @@ -255,6 +252,7 @@ distribution: .endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap + ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ From owner-svn-src-stable@freebsd.org Thu Jun 22 07:54:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1996DA8AEF; Thu, 22 Jun 2017 07:54:22 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A80D71DF8; Thu, 22 Jun 2017 07:54:21 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7sEGN001586; Thu, 22 Jun 2017 07:54:14 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7sCnX001572; Thu, 22 Jun 2017 07:54:12 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220754.v5M7sCnX001572@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320229 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:54:22 -0000 Author: ngie Date: Thu Jun 22 07:54:12 2017 New Revision: 320229 URL: https://svnweb.freebsd.org/changeset/base/320229 Log: Revert r320222,r320223,r320224 The committed changes (reverted after this commit) break POLA on a stable branch. Requested by: jhb Deleted: stable/10/etc/cron.d/ stable/10/etc/newsyslog.conf.d/amd.conf stable/10/etc/newsyslog.conf.d/ftp.conf stable/10/etc/newsyslog.conf.d/lpr.conf stable/10/etc/newsyslog.conf.d/pf.conf stable/10/etc/newsyslog.conf.d/ppp.conf stable/10/etc/newsyslog.conf.d/sendmail.conf stable/10/etc/syslog.d/ Modified: stable/10/etc/crontab stable/10/etc/mtree/BSD.root.dist stable/10/etc/newsyslog.conf stable/10/etc/newsyslog.conf.d/Makefile stable/10/etc/pam.d/Makefile stable/10/etc/syslog.conf stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/cron/cron/cron.8 stable/10/usr.sbin/cron/cron/cron.h stable/10/usr.sbin/cron/cron/database.c stable/10/usr.sbin/cron/cron/pathnames.h stable/10/usr.sbin/cron/lib/misc.c stable/10/usr.sbin/syslogd/syslog.conf.5 stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/crontab ============================================================================== --- stable/10/etc/crontab Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/crontab Thu Jun 22 07:54:12 2017 (r320229) @@ -7,6 +7,8 @@ PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin # #minute hour mday month wday who command # +*/5 * * * * root /usr/libexec/atrun +# # Save some entropy so that /dev/random can re-seed on boot. */11 * * * * operator /usr/libexec/save-entropy # Modified: stable/10/etc/mtree/BSD.root.dist ============================================================================== --- stable/10/etc/mtree/BSD.root.dist Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/mtree/BSD.root.dist Thu Jun 22 07:54:12 2017 (r320229) @@ -30,8 +30,6 @@ .. bluetooth .. - cron.d - .. defaults .. devd @@ -73,8 +71,6 @@ ssh .. ssl - .. - syslog.d .. zfs .. Modified: stable/10/etc/newsyslog.conf ============================================================================== --- stable/10/etc/newsyslog.conf Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/newsyslog.conf Thu Jun 22 07:54:12 2017 (r320229) @@ -18,6 +18,7 @@ # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] /var/log/all.log 600 7 * @T00 J +/var/log/amd.log 644 7 100 * J /var/log/auth.log 600 7 100 @0101T JC /var/log/console.log 600 5 100 * J /var/log/cron 600 3 100 * JC @@ -25,13 +26,18 @@ /var/log/debug.log 600 7 100 * JC /var/log/init.log 644 3 100 * J /var/log/kerberos.log 600 7 100 * J +/var/log/lpd-errs 644 7 100 * JC /var/log/maillog 640 7 * @T00 JC /var/log/messages 644 5 100 @0101T JC /var/log/monthly.log 640 12 * $M1D0 JN +/var/log/pflog 600 3 100 * JB /var/run/pflogd.pid +/var/log/ppp.log root:network 640 3 100 * JC /var/log/devd.log 644 3 100 * JC /var/log/security 600 10 100 * JC +/var/log/sendmail.st 640 10 * 168 BN /var/log/utx.log 644 3 * @01T05 B /var/log/weekly.log 640 5 * $W6D0 JN +/var/log/xferlog 600 7 100 * JC /etc/newsyslog.conf.d/* /usr/local/etc/newsyslog.conf.d/* Modified: stable/10/etc/newsyslog.conf.d/Makefile ============================================================================== --- stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/newsyslog.conf.d/Makefile Thu Jun 22 07:54:12 2017 (r320229) @@ -6,32 +6,8 @@ BINDIR= /etc/newsyslog.conf.d FILES= -.if ${MK_AMD} != "no" -FILES+= amd.conf -.endif - -.if ${MK_FTP} != "no" -FILES+= ftp.conf -.endif - -.if ${MK_LPR} != "no" -FILES+= lpr.conf -.endif - .if ${MK_OFED} != "no" FILES+= opensm.conf -.endif - -.if ${MK_PF} != "no" -FILES+= pf.conf -.endif - -.if ${MK_PPP} != "no" -FILES+= ppp.conf -.endif - -.if ${MK_SENDMAIL} != "no" -FILES+= sendmail.conf .endif .include Modified: stable/10/etc/pam.d/Makefile ============================================================================== --- stable/10/etc/pam.d/Makefile Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/pam.d/Makefile Thu Jun 22 07:54:12 2017 (r320229) @@ -1,52 +1,23 @@ # $FreeBSD$ -.include - NO_OBJ= -FILESGROUPS= FILES - FILES= README \ + atrun \ cron \ + ftpd \ imap \ login \ other \ passwd pop3 \ + rsh \ sshd su system \ + telnetd \ xdm FILESDIR= /etc/pam.d FILESMODE= 644 - -.if ${MK_AT} != "no" -FILESGROUPS+= AT -AT+= atrun -ATDIR= ${FILESDIR} -ATMODE= ${FILESMODE} -.endif - -.if ${MK_FTP} != "no" -FILESGROUPS+= FTP -FTP+= ftpd -FTPDIR= ${FILESDIR} -FTPMODE= ${FILESMODE} -LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp -.endif - -.if ${MK_RCMDS} != "no" -FILESGROUPS+= RCMDS -RCMDS+= rsh -RCMDSDIR= ${FILESDIR} -RCMDSMODE= ${FILESMODE} -.endif - -.if ${MK_TELNET} != "no" -FILESGROUPS+= TELNET -TELNET+= telnetd -TELNETDIR= ${FILESDIR} -TELNETMODE= ${FILESMODE} -.endif - FILESMODE_README= 444 +LINKS= ${FILESDIR}/ftpd ${FILESDIR}/ftp .include Modified: stable/10/etc/syslog.conf ============================================================================== --- stable/10/etc/syslog.conf Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/etc/syslog.conf Thu Jun 22 07:54:12 2017 (r320229) @@ -10,6 +10,8 @@ security.* /var/log/security auth.info;authpriv.info /var/log/auth.log mail.info /var/log/maillog +lpr.info /var/log/lpd-errs +ftp.info /var/log/xferlog cron.* /var/log/cron !-devd *.=debug /var/log/debug.log @@ -29,6 +31,6 @@ cron.* /var/log/cron # Uncomment this if you wish to see messages produced by devd # !devd # *.>=notice /var/log/devd.log +!ppp +*.* /var/log/ppp.log !* -include /etc/syslog.d -include /usr/local/etc/syslog.d Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 22 07:54:12 2017 (r320229) @@ -56,7 +56,6 @@ OLD_FILES+=usr/share/man/man8/iasl.8.gz .if ${MK_AMD} == no OLD_FILES+=etc/amd.map -OLD_FILES+=etc/newsyslog.conf.d/amd.conf OLD_FILES+=etc/rc.d/amd OLD_FILES+=usr/bin/pawd OLD_FILES+=usr/sbin/amd @@ -1064,11 +1063,7 @@ OLD_FILES+=usr/share/man/man8/fmtree.8.gz .if ${MK_FTP} == no OLD_FILES+=etc/ftpusers -OLD_FILES+=etc/newsyslog.conf.d/ftp.conf -OLD_FILES+=etc/pam.d/ftp -OLD_FILES+=etc/pam.d/ftpd OLD_FILES+=etc/rc.d/ftpd -OLD_FILES+=etc/syslog.d/ftp.conf OLD_FILES+=usr/bin/ftp OLD_FILES+=usr/bin/gate-ftp OLD_FILES+=usr/bin/pftp @@ -3821,9 +3816,7 @@ OLD_FILES+=usr/share/man/man8/updatedb.8.gz .if ${MK_LPR} == no OLD_FILES+=etc/hosts.lpd OLD_FILES+=etc/printcap -OLD_FILES+=etc/newsyslog.conf.d/lpr.conf OLD_FILES+=etc/rc.d/lpd -OLD_FILES+=etc/syslog.d/lpr.conf OLD_FILES+=usr/bin/lp OLD_FILES+=usr/bin/lpq OLD_FILES+=usr/bin/lpr @@ -4199,7 +4192,6 @@ OLD_DIRS+=usr/share/examples/pc-sysinstall .endif .if ${MK_PF} == no -OLD_FILES+=etc/newsyslog.conf.d/pf.conf OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os OLD_FILES+=etc/rc.d/ftp-proxy @@ -4268,9 +4260,7 @@ OLD_FILES+=usr/share/man/man8/portsnap.8.gz .endif .if ${MK_PPP} == no -OLD_FILES+=etc/newsyslog.conf.d/ppp.conf OLD_FILES+=etc/ppp/ppp.conf -OLD_FILES+=etc/syslog.d/ppp.conf OLD_DIRS+=etc/ppp OLD_FILES+=usr/sbin/ppp OLD_FILES+=usr/sbin/pppctl @@ -4470,7 +4460,6 @@ OLD_FILES+=usr/share/man/man8/rtquery.8.gz .endif .if ${MK_SENDMAIL} == no -OLD_FILES+=etc/newsyslog.conf.d/sendmail.conf OLD_FILES+=etc/periodic/daily/150.clean-hoststat OLD_FILES+=etc/periodic/daily/440.status-mailq OLD_FILES+=etc/periodic/daily/460.status-mail-rejects @@ -4789,7 +4778,6 @@ OLD_FILES+=usr/share/nls/uk_UA.UTF-8/tcsh.cat .endif .if ${MK_TELNET} == no -OLD_FILES+=etc/pam.d/telnetd OLD_FILES+=usr/bin/telnet OLD_FILES+=usr/libexec/telnetd OLD_FILES+=usr/share/man/man1/telnet.1.gz Modified: stable/10/usr.sbin/cron/cron/cron.8 ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/cron.8 Thu Jun 22 07:54:12 2017 (r320229) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 31, 2016 +.Dd June 29, 2008 .Dt CRON 8 .Os .Sh NAME @@ -52,11 +52,7 @@ The .Nm utility also searches for .Pa /etc/crontab -and files in -.Pa /etc/cron.d -and -.Pa /usr/local/etc/cron.d -which are in a different format (see +which is in a different format (see .Xr crontab 5 ) . .Pp The Modified: stable/10/usr.sbin/cron/cron/cron.h ============================================================================== --- stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/cron.h Thu Jun 22 07:54:12 2017 (r320229) @@ -218,7 +218,7 @@ void set_cron_uid(void), unget_char(int, FILE *), free_entry(entry *), skip_comments(FILE *), - log_it(char *, int, char *, const char *), + log_it(char *, int, char *, char *), log_close(void); int job_runqueue(void), Modified: stable/10/usr.sbin/cron/cron/database.c ============================================================================== --- stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/database.c Thu Jun 22 07:54:12 2017 (r320229) @@ -44,19 +44,10 @@ load_database(old_db) { DIR *dir; struct stat statbuf; - struct stat syscron_stat, st; - time_t maxmtime; + struct stat syscron_stat; DIR_T *dp; cron_db new_db; user *u, *nu; - struct { - const char *name; - struct stat st; - } syscrontabs [] = { - { SYSCRONTABS }, - { LOCALSYSCRONTABS } - }; - int i; Debug(DLOAD, ("[%d] load_database()\n", getpid())) @@ -74,16 +65,6 @@ load_database(old_db) if (stat(SYSCRONTAB, &syscron_stat) < OK) syscron_stat.st_mtime = 0; - maxmtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); - - for (i = 0; i < nitems(syscrontabs); i++) { - if (stat(syscrontabs[i].name, &syscrontabs[i].st) != -1) { - maxmtime = TMAX(syscrontabs[i].st.st_mtime, maxmtime); - } else { - syscrontabs[i].st.st_mtime = 0; - } - } - /* if spooldir's mtime has not changed, we don't need to fiddle with * the database. * @@ -91,7 +72,7 @@ load_database(old_db) * so is guaranteed to be different than the stat() mtime the first * time this function is called. */ - if (old_db->mtime == maxmtime) { + if (old_db->mtime == TMAX(statbuf.st_mtime, syscron_stat.st_mtime)) { Debug(DLOAD, ("[%d] spool dir mtime unch, no load needed.\n", getpid())) return; @@ -102,37 +83,13 @@ load_database(old_db) * actually changed. Whatever is left in the old database when * we're done is chaff -- crontabs that disappeared. */ - new_db.mtime = maxmtime; + new_db.mtime = TMAX(statbuf.st_mtime, syscron_stat.st_mtime); new_db.head = new_db.tail = NULL; if (syscron_stat.st_mtime) { process_crontab("root", SYS_NAME, SYSCRONTAB, &syscron_stat, &new_db, old_db); - } - - for (i = 0; i < nitems(syscrontabs); i++) { - char tabname[MAXPATHLEN]; - if (syscrontabs[i].st.st_mtime == 0) - continue; - if (!(dir = opendir(syscrontabs[i].name))) { - log_it("CRON", getpid(), "OPENDIR FAILED", - syscrontabs[i].name); - (void) exit(ERROR_EXIT); - } - - while (NULL != (dp = readdir(dir))) { - if (dp->d_name[0] == '.') - continue; - if (fstatat(dirfd(dir), dp->d_name, &st, 0) == 0 && - !S_ISREG(st.st_mode)) - continue; - snprintf(tabname, sizeof(tabname), "%s/%s", - syscrontabs[i].name, dp->d_name); - process_crontab("root", SYS_NAME, tabname, - &syscrontabs[i].st, &new_db, old_db); - } - closedir(dir); } /* we used to keep this dir open all the time, for the sake of Modified: stable/10/usr.sbin/cron/cron/pathnames.h ============================================================================== --- stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/cron/pathnames.h Thu Jun 22 07:54:12 2017 (r320229) @@ -62,8 +62,6 @@ /* 4.3BSD-style crontab */ #define SYSCRONTAB "/etc/crontab" -#define SYSCRONTABS "/etc/cron.d" -#define LOCALSYSCRONTABS "/usr/local/etc/cron.d" /* what editor to use if no EDITOR or VISUAL * environment variable specified. Modified: stable/10/usr.sbin/cron/lib/misc.c ============================================================================== --- stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/cron/lib/misc.c Thu Jun 22 07:54:12 2017 (r320229) @@ -385,7 +385,11 @@ out: if (allow) void -log_it(char *username, int xpid, char *event, const char *detail) +log_it(username, xpid, event, detail) + char *username; + int xpid; + char *event; + char *detail; { #if defined(LOG_FILE) || DEBUGGING PID_T pid = xpid; Modified: stable/10/usr.sbin/syslogd/syslog.conf.5 ============================================================================== --- stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/syslogd/syslog.conf.5 Thu Jun 22 07:54:12 2017 (r320229) @@ -28,7 +28,7 @@ .\" @(#)syslog.conf.5 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd November 1, 2016 +.Dd September 12, 2012 .Dt SYSLOG.CONF 5 .Os .Sh NAME @@ -61,12 +61,6 @@ The field is separated from the .Em action field by one or more tab characters or spaces. -.Pp -A special -.Em include -keyword can be used to include all files with names ending in '.conf' and not -beginning with a '.' contained in the directory following the keyword. -This keyword can only be used in the first level configuration file. .Pp Note that if you use spaces as separators, your .Nm Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:42:36 2017 (r320228) +++ stable/10/usr.sbin/syslogd/syslogd.c Thu Jun 22 07:54:12 2017 (r320229) @@ -97,7 +97,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #include @@ -121,8 +120,6 @@ __FBSDID("$FreeBSD$"); const char *ConfFile = _PATH_LOGCONF; const char *PidFile = _PATH_LOGPID; const char ctty[] = _PATH_CONSOLE; -static const char include_str[] = "include"; -static const char include_ext[] = ".conf"; #define dprintf if (Debug) printf @@ -1551,46 +1548,96 @@ die(int signo) exit(1); } -static int -configfiles(const struct dirent *dp) +/* + * INIT -- Initialize syslogd from configuration table + */ +static void +init(int signo) { - const char *p; - size_t ext_len; + int i; + FILE *cf; + struct filed *f, *next, **nextp; + char *p; + char cline[LINE_MAX]; + char prog[LINE_MAX]; + char host[MAXHOSTNAMELEN]; + char oldLocalHostName[MAXHOSTNAMELEN]; + char hostMsg[2*MAXHOSTNAMELEN+40]; + char bootfileMsg[LINE_MAX]; - if (dp->d_name[0] == '.') - return (0); + dprintf("init\n"); - ext_len = sizeof(include_ext) -1; + /* + * Load hostname (may have changed). + */ + if (signo != 0) + (void)strlcpy(oldLocalHostName, LocalHostName, + sizeof(oldLocalHostName)); + if (gethostname(LocalHostName, sizeof(LocalHostName))) + err(EX_OSERR, "gethostname() failed"); + if ((p = strchr(LocalHostName, '.')) != NULL) { + *p++ = '\0'; + LocalDomain = p; + } else { + LocalDomain = ""; + } - if (dp->d_namlen <= ext_len) - return (0); + /* + * Close all open log files. + */ + Initialized = 0; + for (f = Files; f != NULL; f = next) { + /* flush any pending output */ + if (f->f_prevcount) + fprintlog(f, 0, (char *)NULL); - p = &dp->d_name[dp->d_namlen - ext_len]; - if (strcmp(p, include_ext) != 0) - return (0); + switch (f->f_type) { + case F_FILE: + case F_FORW: + case F_CONSOLE: + case F_TTY: + close_filed(f); + break; + case F_PIPE: + if (f->f_un.f_pipe.f_pid > 0) { + close_filed(f); + deadq_enter(f->f_un.f_pipe.f_pid, + f->f_un.f_pipe.f_pname); + } + f->f_un.f_pipe.f_pid = 0; + break; + } + next = f->f_next; + if (f->f_program) free(f->f_program); + if (f->f_host) free(f->f_host); + free((char *)f); + } + Files = NULL; + nextp = &Files; - return (1); -} + /* open the configuration file */ + if ((cf = fopen(ConfFile, "r")) == NULL) { + dprintf("cannot open %s\n", ConfFile); + *nextp = (struct filed *)calloc(1, sizeof(*f)); + if (*nextp == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.ERR\t/dev/console", *nextp, "*", "*"); + (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); + if ((*nextp)->f_next == NULL) { + logerror("calloc"); + exit(1); + } + cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); + Initialized = 1; + return; + } -static void -readconfigfile(FILE *cf, struct filed **nextp, int allow_includes) -{ - FILE *cf2; - struct filed *f; - struct dirent **ent; - char cline[LINE_MAX]; - char host[MAXHOSTNAMELEN]; - char prog[LINE_MAX]; - char file[MAXPATHLEN]; - char *p, *tmp; - int i, nents; - size_t include_len; - /* * Foreach line in the conf table, open that file. */ f = NULL; - include_len = sizeof(include_str) -1; (void)strlcpy(host, "*", sizeof(host)); (void)strlcpy(prog, "*", sizeof(prog)); while (fgets(cline, sizeof(cline), cf) != NULL) { @@ -1603,42 +1650,6 @@ readconfigfile(FILE *cf, struct filed **nextp, int all continue; if (*p == 0) continue; - if (allow_includes && - strncmp(p, include_str, include_len) == 0 && - isspace(p[include_len])) { - p += include_len; - while (isspace(*p)) - p++; - tmp = p; - while (*tmp != '\0' && !isspace(*tmp)) - tmp++; - *tmp = '\0'; - dprintf("Trying to include files in '%s'\n", p); - nents = scandir(p, &ent, configfiles, alphasort); - if (nents == -1) { - dprintf("Unable to open '%s': %s\n", p, - strerror(errno)); - continue; - } - for (i = 0; i < nents; i++) { - if (snprintf(file, sizeof(file), "%s/%s", p, - ent[i]->d_name) >= (int)sizeof(file)) { - dprintf("ignoring path too long: " - "'%s/%s'\n", p, ent[i]->d_name); - free(ent[i]); - continue; - } - free(ent[i]); - cf2 = fopen(file, "r"); - if (cf2 == NULL) - continue; - dprintf("reading %s\n", file); - readconfigfile(cf2, nextp, 0); - fclose(cf2); - } - free(ent); - continue; - } if (*p == '#') { p++; if (*p != '!' && *p != '+' && *p != '-') @@ -1700,92 +1711,6 @@ readconfigfile(FILE *cf, struct filed **nextp, int all nextp = &f->f_next; cfline(cline, f, prog, host); } -} - -/* - * INIT -- Initialize syslogd from configuration table - */ -static void -init(int signo) -{ - int i; - FILE *cf; - struct filed *f, *next, **nextp; - char *p; - char oldLocalHostName[MAXHOSTNAMELEN]; - char hostMsg[2*MAXHOSTNAMELEN+40]; - char bootfileMsg[LINE_MAX]; - - dprintf("init\n"); - - /* - * Load hostname (may have changed). - */ - if (signo != 0) - (void)strlcpy(oldLocalHostName, LocalHostName, - sizeof(oldLocalHostName)); - if (gethostname(LocalHostName, sizeof(LocalHostName))) - err(EX_OSERR, "gethostname() failed"); - if ((p = strchr(LocalHostName, '.')) != NULL) { - *p++ = '\0'; - LocalDomain = p; - } else { - LocalDomain = ""; - } - - /* - * Close all open log files. - */ - Initialized = 0; - for (f = Files; f != NULL; f = next) { - /* flush any pending output */ - if (f->f_prevcount) - fprintlog(f, 0, (char *)NULL); - - switch (f->f_type) { - case F_FILE: - case F_FORW: - case F_CONSOLE: - case F_TTY: - close_filed(f); - break; - case F_PIPE: - if (f->f_un.f_pipe.f_pid > 0) { - close_filed(f); - deadq_enter(f->f_un.f_pipe.f_pid, - f->f_un.f_pipe.f_pname); - } - f->f_un.f_pipe.f_pid = 0; - break; - } - next = f->f_next; - if (f->f_program) free(f->f_program); - if (f->f_host) free(f->f_host); - free((char *)f); - } - Files = NULL; - nextp = &Files; - - /* open the configuration file */ - if ((cf = fopen(ConfFile, "r")) == NULL) { - dprintf("cannot open %s\n", ConfFile); - *nextp = (struct filed *)calloc(1, sizeof(*f)); - if (*nextp == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.ERR\t/dev/console", *nextp, "*", "*"); - (*nextp)->f_next = (struct filed *)calloc(1, sizeof(*f)); - if ((*nextp)->f_next == NULL) { - logerror("calloc"); - exit(1); - } - cfline("*.PANIC\t*", (*nextp)->f_next, "*", "*"); - Initialized = 1; - return; - } - - readconfigfile(cf, &Files, 1); /* close the configuration file */ (void)fclose(cf); From owner-svn-src-stable@freebsd.org Thu Jun 22 07:57:30 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA0D9DA8B85; Thu, 22 Jun 2017 07:57:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A30071F54; Thu, 22 Jun 2017 07:57:30 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5M7vT9v001790; Thu, 22 Jun 2017 07:57:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5M7vTT2001789; Thu, 22 Jun 2017 07:57:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201706220757.v5M7vTT2001789@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Thu, 22 Jun 2017 07:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320230 - stable/10/etc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 07:57:30 -0000 Author: ngie Date: Thu Jun 22 07:57:29 2017 New Revision: 320230 URL: https://svnweb.freebsd.org/changeset/base/320230 Log: Revert r320228 as well See r320229 for the other related revert commit. Modified: stable/10/etc/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Thu Jun 22 07:54:12 2017 (r320229) +++ stable/10/etc/Makefile Thu Jun 22 07:57:29 2017 (r320230) @@ -3,6 +3,9 @@ .include +SUBDIR= \ + newsyslog.conf.d + .if ${MK_SENDMAIL} != "no" SUBDIR+=sendmail .endif @@ -238,11 +241,9 @@ distribution: .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif - ${_+_}cd ${.CURDIR}/cron.d; ${MAKE} install ${_+_}cd ${.CURDIR}/defaults; ${MAKE} install ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install - ${_+_}cd ${.CURDIR}/newsyslog.conf.d; ${MAKE} install .if ${MK_NTP} != "no" ${_+_}cd ${.CURDIR}/ntp; ${MAKE} install .endif @@ -252,7 +253,6 @@ distribution: .endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap - ${_+_}cd ${.CURDIR}/syslog.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt ${_+_}cd ${.CURDIR}/pam.d; ${MAKE} install cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 0444 \ From owner-svn-src-stable@freebsd.org Thu Jun 22 08:02:31 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4F94ADA8F09; Thu, 22 Jun 2017 08:02:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (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 0F56B72307; Thu, 22 Jun 2017 08:02:31 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-it0-x242.google.com with SMTP id 185so3290264itv.3; Thu, 22 Jun 2017 01:02:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=4PZ7q7+1sqM07icE3ubRi/M7PHEkrT9f3I5DYbDZRo8=; b=dm3PVI/rXhFyeMbzUY8h95Fc04AYJpgk+4NkXL1nnXYmzOZ3bDg9716LZCIHQS+MAY wbI2drKyW/NW5MyQXQSunuprYqJWuiFHR/fz/FpvcnswFlN+XhQMeWRLxU8k6njnq6gj gXRVbI/17ZQFku0ApBZv0x8A7dTkfK3fMY0d4cQqSOgZKnCs1sQnNKZ1DSPwLbBFC6s1 J217TK5fbWJo4zVlrdl5TDhGcDdKDo2Bvvo+NwK65fjX6atHqV6At2UB5yHozELvyhA7 3wNflaEVGRw/i9+4MEWgcVqAMXOSZWkh30VELQ6acGP4bQb4QtkRotIhzVQu8hSnHfnm isVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=4PZ7q7+1sqM07icE3ubRi/M7PHEkrT9f3I5DYbDZRo8=; b=KDJDzkdZz/791PPy0EEPJ5Uv/zQE6kM++N4X/ntsuboN2wrIfqCQiD3dKQykxOPRFU 74rG/sK1CuVJI6AWCVh6HK7LKx8OhAs1AQ6CrFuMtg7ynPcqvkvxNJmcsJ+U/ln0LuP5 lJTFOX6iYA2B7U8fRcyZyd4/0yudeIP4cWb1dFvqpRpybeMuOACD1XXV/G0wVcPN8D/y 8c9JQi2KOCmjfJx9EZX1PD1E5CBKmLJf447spKZCOTgZXGVoIA12RWbAxaXL5/WTz424 0lyHGg+IvZDefYWiDh8jJjn6fvfa7JPk8P02SMnZSTGhUA+L0Z5LkxcKLg3IsM0mrpAE jJzQ== X-Gm-Message-State: AKS2vOxtFRzi9nIMbEM8/w2mGc+Wy5NpbL25CKTEmxwGz9kkEFy6N2dp LnuuAwZiMrNhFjfNV7o= X-Received: by 10.36.227.72 with SMTP id d69mr725304ith.121.1498118550368; Thu, 22 Jun 2017 01:02:30 -0700 (PDT) Received: from pinklady.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 197sm470001ity.5.2017.06.22.01.02.29 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 01:02:29 -0700 (PDT) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: Date: Thu, 22 Jun 2017 01:02:28 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Message-Id: <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> References: <201706220708.v5M78IYv080609@repo.freebsd.org> To: John Baldwin X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 08:02:31 -0000 --Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 22, 2017, at 00:35, John Baldwin wrote: =E2=80=A6 > Please revert the breakout of the existing config files. I think that = splitting > up the conf files is too disruptive of a change (POLA) for stable = branches. Done in r320229 and r320230. > This was agreed to by other folks in the followup thread to the = commits in > head that you continue to ignore. > In head please either fully split up the files or revert to a single = file > (another part of that thread you continue to ignore). My eyes glazed over trying to read through all of the posts. I = seem to have missed the point where a proposed change was made to split = up the config files further. Could this please be summarized again? Thank you, -Ngie --Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJZS3mUAAoJEPWDqSZpMIYV/4AP/2fl4PvIjVRUfnf5kJ2Vld0S xmgLBIs9FuVEJ1fkUykiV5USsPVEpMeZ3TIoGqRA0K0YE4ubzOWPaPYudoOBQka7 vFpyqyIqT40zA0VkscV8uZ9oe8MKHKfQE7I6Kig8Vj6wH1Bu3AobWctjrzDxOgD9 MfjULGI7i9oWpZAUZsUxfyuSeyAybGUzDVlibItPQvWslTHl/U31kxeIwN/eQ/kX k9TF9JrGV/A23h83OrzsdH+Uq188KUjgNhI1Z0At2iYx8uDJsbE3y5ZJ2pjnT+FP WAwqnKYOeRwwF4zbeWUMY85WkWm4zllkGvOUqnSXHZacS7l8AAMBMoJEf+O2+dDj P44QzeC1aUTN+07MfgqiJcJYxbwMH4ZvdkZW0VRrwuXY8yzxLrgyT8uaYDe7U12P dwhG6KoVSeQBxjr1rHiwkuTRqTurSTBynLRZABFwVlfX4kDUZCx1Pi0PlrLTdrma qeBUsZT1jcZYiwk86LNYPvweWGPWtfyCvcNoJ2bxoHGvG7crU2UdapHgniFNy7JK ShPnanky0a/Rmxmy6ntwpZvVxwLJuBNkVEeadzeHSJ4y9VC9eTeNwfQoq6eSlUxs hnHWCIuxtRpz3MNeRMDrEmX7mOO2Ko3MqY0DBv1SDZHGZlmVQgCF6KSVcaZzgjCh NA8hn1IvJJufkNh0zNM7 =HkVD -----END PGP SIGNATURE----- --Apple-Mail=_D8D12565-46A6-405F-9DD5-3111590EEA0F-- From owner-svn-src-stable@freebsd.org Thu Jun 22 10:28:29 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE580D88E6F; Thu, 22 Jun 2017 10:28:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 934ED7622D; Thu, 22 Jun 2017 10:28:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from John-Baldwins-MacBook-Pro-2.local (d-24-245-127-120.cpe.metrocast.net [24.245.127.120]) by mail.baldwin.cx (Postfix) with ESMTPSA id E202C10AF01; Thu, 22 Jun 2017 06:28:27 -0400 (EDT) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd To: "Ngie Cooper (yaneurabeya)" References: <201706220708.v5M78IYv080609@repo.freebsd.org> <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: John Baldwin Message-ID: Date: Thu, 22 Jun 2017 06:28:26 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 22 Jun 2017 06:28:28 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 10:28:29 -0000 On 6/22/17 4:02 AM, Ngie Cooper (yaneurabeya) wrote: > >> On Jun 22, 2017, at 00:35, John Baldwin wrote: > > … > >> Please revert the breakout of the existing config files. I think that splitting >> up the conf files is too disruptive of a change (POLA) for stable branches. > > Done in r320229 and r320230. I haven't checked if this was merged to 11, but if so, I think they should also stay a single conf file in 11 for the same reason. >> This was agreed to by other folks in the followup thread to the commits in >> head that you continue to ignore. > > >> In head please either fully split up the files or revert to a single file >> (another part of that thread you continue to ignore). > > My eyes glazed over trying to read through all of the posts. I seem to have missed the point where a proposed change was made to split up the config files further. Could this please be summarized again? I think that having the files partially split up is the worst of both worlds as folks writing config management rules, etc. have to use different approaches depending on the rule. I think that is a headache and would rather have the config either be all in a single file, or all be split up into conf.d/ so that it is consistent. I also think that when splitting up a conf file we should do it all at once so that there is only one painful /etc merge instead of several of them. -- John Baldwin From owner-svn-src-stable@freebsd.org Thu Jun 22 11:03:43 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B172ED897A9; Thu, 22 Jun 2017 11:03:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8ABF27708E; Thu, 22 Jun 2017 11:03:43 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5MB3g74078265; Thu, 22 Jun 2017 11:03:42 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MB3g2T078264; Thu, 22 Jun 2017 11:03:42 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706221103.v5MB3g2T078264@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Jun 2017 11:03:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320231 - stable/11/sys/vm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 11:03:43 -0000 Author: kib Date: Thu Jun 22 11:03:42 2017 New Revision: 320231 URL: https://svnweb.freebsd.org/changeset/base/320231 Log: MFC r319975: Some minor improvements to vnode_pager_generic_putpages(). Approved by: re (marius) Modified: stable/11/sys/vm/vnode_pager.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/vm/vnode_pager.c ============================================================================== --- stable/11/sys/vm/vnode_pager.c Thu Jun 22 07:57:29 2017 (r320230) +++ stable/11/sys/vm/vnode_pager.c Thu Jun 22 11:03:42 2017 (r320231) @@ -1158,7 +1158,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page vm_ooffset_t poffset; struct uio auio; struct iovec aiov; - int count, error, i, maxsize, ncount, ppscheck; + int count, error, i, maxsize, ncount, pgoff, ppscheck; static struct timeval lastfail; static int curfail; @@ -1169,10 +1169,11 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page rtvals[i] = VM_PAGER_ERROR; if ((int64_t)ma[0]->pindex < 0) { - printf("vnode_pager_putpages: attempt to write meta-data!!! -- 0x%lx(%lx)\n", - (long)ma[0]->pindex, (u_long)ma[0]->dirty); + printf("vnode_pager_generic_putpages: " + "attempt to write meta-data 0x%jx(%lx)\n", + (uintmax_t)ma[0]->pindex, (u_long)ma[0]->dirty); rtvals[0] = VM_PAGER_BAD; - return VM_PAGER_BAD; + return (VM_PAGER_BAD); } maxsize = count * PAGE_SIZE; @@ -1195,8 +1196,6 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page VM_OBJECT_WLOCK(object); if (maxsize + poffset > object->un_pager.vnp.vnp_size) { if (object->un_pager.vnp.vnp_size > poffset) { - int pgoff; - maxsize = object->un_pager.vnp.vnp_size - poffset; ncount = btoc(maxsize); if ((pgoff = (int)maxsize & PAGE_MASK) != 0) { @@ -1210,6 +1209,7 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page vm_page_assert_sbusied(m); KASSERT(!pmap_page_is_write_mapped(m), ("vnode_pager_generic_putpages: page %p is not read-only", m)); + MPASS(m->dirty != 0); vm_page_clear_dirty(m, pgoff, PAGE_SIZE - pgoff); } @@ -1217,15 +1217,14 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page maxsize = 0; ncount = 0; } - if (ncount < count) { - for (i = ncount; i < count; i++) { - rtvals[i] = VM_PAGER_BAD; - } - } + for (i = ncount; i < count; i++) + rtvals[i] = VM_PAGER_BAD; } + for (i = 0; i < ncount - ((btoc(maxsize) & PAGE_MASK) != 0); i++) + MPASS(ma[i]->dirty == VM_PAGE_BITS_ALL); VM_OBJECT_WUNLOCK(object); - aiov.iov_base = (caddr_t) 0; + aiov.iov_base = NULL; aiov.iov_len = maxsize; auio.uio_iov = &aiov; auio.uio_iovcnt = 1; @@ -1233,26 +1232,23 @@ vnode_pager_generic_putpages(struct vnode *vp, vm_page auio.uio_segflg = UIO_NOCOPY; auio.uio_rw = UIO_WRITE; auio.uio_resid = maxsize; - auio.uio_td = (struct thread *) 0; + auio.uio_td = NULL; error = VOP_WRITE(vp, &auio, vnode_pager_putpages_ioflags(flags), curthread->td_ucred); PCPU_INC(cnt.v_vnodeout); PCPU_ADD(cnt.v_vnodepgsout, ncount); ppscheck = 0; - if (error) { - if ((ppscheck = ppsratecheck(&lastfail, &curfail, 1))) - printf("vnode_pager_putpages: I/O error %d\n", error); - } - if (auio.uio_resid) { - if (ppscheck || ppsratecheck(&lastfail, &curfail, 1)) - printf("vnode_pager_putpages: residual I/O %zd at %lu\n", - auio.uio_resid, (u_long)ma[0]->pindex); - } - for (i = 0; i < ncount; i++) { + if (error != 0 && (ppscheck = ppsratecheck(&lastfail, &curfail, 1)) + != 0) + printf("vnode_pager_putpages: I/O error %d\n", error); + if (auio.uio_resid != 0 && (ppscheck != 0 || + ppsratecheck(&lastfail, &curfail, 1) != 0)) + printf("vnode_pager_putpages: residual I/O %zd at %ju\n", + auio.uio_resid, (uintmax_t)ma[0]->pindex); + for (i = 0; i < ncount; i++) rtvals[i] = VM_PAGER_OK; - } - return rtvals[0]; + return (rtvals[0]); } int From owner-svn-src-stable@freebsd.org Thu Jun 22 13:31:45 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1203D8C8F4; Thu, 22 Jun 2017 13:31:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F6457B78F; Thu, 22 Jun 2017 13:31:45 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5MDVi2l041978; Thu, 22 Jun 2017 13:31:44 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MDViwv041977; Thu, 22 Jun 2017 13:31:44 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706221331.v5MDViwv041977@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Jun 2017 13:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320233 - stable/11/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 13:31:45 -0000 Author: gjb Date: Thu Jun 22 13:31:44 2017 New Revision: 320233 URL: https://svnweb.freebsd.org/changeset/base/320233 Log: Document r320218, primes(6) updated to new limit of 2^64-1. Document r320164, qlnxe(4) firmware and hardware support updates. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 22 12:46:48 2017 (r320232) +++ stable/11/release/doc/en_US.ISO8859-1/relnotes/article.xml Thu Jun 22 13:31:44 2017 (r320233) @@ -247,6 +247,11 @@ The &man.cxgbetool.8; utility has been added, providing command-line access to features and debugging facilities of &man.cxgbe.4; devices. + + The &man.primes.6; utility now + enumerates primes beyond + 3825123056546413050, up to a new limit of + 2^64 - 1. @@ -711,6 +716,12 @@ The &man.cxgbe.4; driver has been updated to firmware version 1.16.45.0 for T4, T5, and T6 cards. + + The &man.qlnxe.4; driver has been + updated to support QLE41XXX hardware. + + The &man.qlnxe.4; driver firmware has + been updated to version 8.30.0.0. From owner-svn-src-stable@freebsd.org Thu Jun 22 14:08:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1ACA6D8D008; Thu, 22 Jun 2017 14:08:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pf0-x243.google.com (mail-pf0-x243.google.com [IPv6:2607:f8b0:400e:c00::243]) (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 DA6897C454; Thu, 22 Jun 2017 14:08:58 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pf0-x243.google.com with SMTP id y7so3124701pfd.3; Thu, 22 Jun 2017 07:08:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1QyW2NkyjfvQuQuEZPQKfg6CG/4z3TNgnRXT+Pi80ic=; b=MKsi4jxtruvpCt8Hm0STWF6FkKcmNgGAvaq62YUuy3msZ5AifngxMI9nT3QHvVixX+ ZkMLS/URltP0vc4LKHXBzD59QI25K6g+HhE2jjiq8ME9FN3tf6F1s60ysYjXkq/uAkZf Pmkz2aya/tWrSNKaD3uwJGKLFZgBIRESpkY6Lo1PN9VqonttcOrOTDsvyyBm3lWhRLRc bkngiD/yj5HEpSV0tHQXAPwZbrcHj8SlTa83c32Lo9RsFVommYEf9AWaBMz9eNUN5qdj F1h+pGCLpa6NsaW1oE3S8E6K5vO1UvFlwt/R53JcAsEgjAZPuuFU4b/fGotFfppEfvnx lhJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=1QyW2NkyjfvQuQuEZPQKfg6CG/4z3TNgnRXT+Pi80ic=; b=SNj0zJ+rSaat/hlVuplTGDxoYSd7vrHuAyhH+3nSeqU5p6FBbZksLTAsDzaqm8uoiS ca0r/wyOyeX6Ot2ohQdLpbdINTnOLS31KjSrNNmkWxED9irdToK/HgaeVQH4fcNujlUb WDSKVEfMC5874TWz6NMFAASIh1jAsYgTUM7t7LAPFohtMhCfqFnFabdAUDC7utayvTc0 V0T5QgY6ieyWythA96HRI2PAU4aoTb3MZwHsZZoImq+syasE5g8AD9J6QPJ+x37jtzWN wAqxPQK7mE+iWdnAdCl+3oOW6ad3gabIrGZF0GP7Gb91Y4kiIv3442L7aUSafdya/VfT Z00Q== X-Gm-Message-State: AKS2vOzbpU2HfNB9bLD7WymsliU7ffV9rSsfC2yl06adian2h0/lWzT5 aGqvWQjcZneOYn2SlcA= X-Received: by 10.98.92.3 with SMTP id q3mr2793226pfb.65.1498140538023; Thu, 22 Jun 2017 07:08:58 -0700 (PDT) Received: from [192.168.20.13] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id o2sm4255665pgq.44.2017.06.22.07.08.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jun 2017 07:08:56 -0700 (PDT) Content-Type: text/plain; charset=cp932 Mime-Version: 1.0 (1.0) Subject: Re: svn commit: r320222 - in stable/10: etc etc/cron.d etc/mtree etc/newsyslog.conf.d etc/pam.d etc/syslog.d tools/build/mk usr.sbin/cron/cron usr.sbin/cron/lib usr.sbin/syslogd From: Ngie Cooper X-Mailer: iPhone Mail (14F89) In-Reply-To: Date: Thu, 22 Jun 2017 07:08:55 -0700 Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <52481168-DCDD-4D6A-8F68-1EBDA44513D1@gmail.com> References: <201706220708.v5M78IYv080609@repo.freebsd.org> <223428BC-9035-4435-B8EB-9A72EDCDD225@gmail.com> To: John Baldwin X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 14:08:59 -0000 > On Jun 22, 2017, at 03:28, John Baldwin wrote: >=20 >> On 6/22/17 4:02 AM, Ngie Cooper (yaneurabeya) wrote: >>=20 >>> On Jun 22, 2017, at 00:35, John Baldwin wrote: >>=20 >> =81c >>=20 >>> Please revert the breakout of the existing config files. I think that s= plitting >>> up the conf files is too disruptive of a change (POLA) for stable branch= es. >>=20 >> Done in r320229 and r320230. >=20 > I haven't checked if this was merged to 11, but if so, I think they should= also > stay a single conf file in 11 for the same reason. No, it wasn't merged to 11, so no further action required here. >>> This was agreed to by other folks in the followup thread to the commits i= n >>> head that you continue to ignore. >>=20 >>=20 >>> In head please either fully split up the files or revert to a single fil= e >>> (another part of that thread you continue to ignore). >>=20 >> My eyes glazed over trying to read through all of the posts. I seem to= have missed the point where a proposed change was made to split up the conf= ig files further. Could this please be summarized again? >=20 > I think that having the files partially split up is the worst of both > worlds as folks writing config management rules, etc. have to use > different approaches depending on the rule. I think that is a headache > and would rather have the config either be all in a single file, or all > be split up into conf.d/ so that it is consistent. I also think that > when splitting up a conf file we should do it all at once so that there is= > only one painful /etc merge instead of several of them. This still doesn't answer my concern fully. In what way are the config files= in base not broken down 100%, i.e., what action can I take to resolve your c= oncerns about it not being fully modularized? I think syslog.conf having ker= beros.log is likely the last issue, but I would really like clarification in= order to move forward. If there isn't any actionable feedback here, I'll call what's done in head "= good enough", not MFC the changes, and move on to other pressing tasks. Thanks, -Ngie= From owner-svn-src-stable@freebsd.org Thu Jun 22 18:40:35 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBAACD92527; Thu, 22 Jun 2017 18:40:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B737BFD8; Thu, 22 Jun 2017 18:40:35 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5MIeYkU066041; Thu, 22 Jun 2017 18:40:34 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5MIeYEr066038; Thu, 22 Jun 2017 18:40:34 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201706221840.v5MIeYEr066038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 22 Jun 2017 18:40:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320241 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 18:40:36 -0000 Author: markj Date: Thu Jun 22 18:40:34 2017 New Revision: 320241 URL: https://svnweb.freebsd.org/changeset/base/320241 Log: MFC r320124: Fix the !TD_IS_IDLETHREAD(curthread) locking assertions. Approved by: re (kib) Modified: stable/11/sys/kern/kern_mutex.c stable/11/sys/kern/kern_rwlock.c stable/11/sys/kern/kern_sx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_mutex.c ============================================================================== --- stable/11/sys/kern/kern_mutex.c Thu Jun 22 18:39:52 2017 (r320240) +++ stable/11/sys/kern/kern_mutex.c Thu Jun 22 18:40:34 2017 (r320241) @@ -233,7 +233,8 @@ __mtx_lock_flags(volatile uintptr_t *c, int opts, cons m = mtxlock2mtx(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("mtx_lock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, @@ -390,7 +391,7 @@ _mtx_trylock_flags_(volatile uintptr_t *c, int opts, c m = mtxlock2mtx(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("mtx_trylock() by idle thread %p on sleep mutex %s @ %s:%d", curthread, m->lock_object.lo_name, file, line)); KASSERT(m->mtx_lock != MTX_DESTROYED, Modified: stable/11/sys/kern/kern_rwlock.c ============================================================================== --- stable/11/sys/kern/kern_rwlock.c Thu Jun 22 18:39:52 2017 (r320240) +++ stable/11/sys/kern/kern_rwlock.c Thu Jun 22 18:40:34 2017 (r320241) @@ -269,7 +269,8 @@ _rw_wlock_cookie(volatile uintptr_t *c, const char *fi rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("rw_wlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -305,7 +306,7 @@ __rw_try_wlock(volatile uintptr_t *c, const char *file rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("rw_try_wlock() by idle thread %p on rwlock %s @ %s:%d", curthread, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -615,7 +616,8 @@ __rw_rlock(volatile uintptr_t *c, const char *file, in td = curthread; rw = rwlock2rw(c); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED_TD(td) || + !TD_IS_IDLETHREAD(td), ("rw_rlock() by idle thread %p on rwlock %s @ %s:%d", td, rw->lock_object.lo_name, file, line)); KASSERT(rw->rw_lock != RW_DESTROYED, @@ -815,7 +817,6 @@ _rw_runlock_cookie(volatile uintptr_t *c, const char * TD_LOCKS_DEC(curthread); } - /* * This function is called when we are unable to obtain a write lock on the Modified: stable/11/sys/kern/kern_sx.c ============================================================================== --- stable/11/sys/kern/kern_sx.c Thu Jun 22 18:39:52 2017 (r320240) +++ stable/11/sys/kern/kern_sx.c Thu Jun 22 18:40:34 2017 (r320241) @@ -293,7 +293,8 @@ _sx_xlock(struct sx *sx, int opts, const char *file, i uintptr_t tid, x; int error = 0; - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("sx_xlock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, @@ -330,7 +331,7 @@ sx_try_xlock_(struct sx *sx, const char *file, int lin if (SCHEDULER_STOPPED_TD(td)) return (1); - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(td), ("sx_try_xlock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, @@ -1028,7 +1029,8 @@ _sx_slock(struct sx *sx, int opts, const char *file, i uintptr_t x; int error; - KASSERT(kdb_active != 0 || !TD_IS_IDLETHREAD(curthread), + KASSERT(kdb_active != 0 || SCHEDULER_STOPPED() || + !TD_IS_IDLETHREAD(curthread), ("sx_slock() by idle thread %p on sx %s @ %s:%d", curthread, sx->lock_object.lo_name, file, line)); KASSERT(sx->sx_lock != SX_LOCK_DESTROYED, From owner-svn-src-stable@freebsd.org Fri Jun 23 00:00:01 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED086D97A75; Fri, 23 Jun 2017 00:00:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7B726FDE5; Fri, 23 Jun 2017 00:00:01 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5N000OC098927; Fri, 23 Jun 2017 00:00:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5N000da098926; Fri, 23 Jun 2017 00:00:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201706230000.v5N000da098926@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jun 2017 00:00:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320251 - stable/11/sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 00:00:02 -0000 Author: gjb Date: Fri Jun 23 00:00:00 2017 New Revision: 320251 URL: https://svnweb.freebsd.org/changeset/base/320251 Log: Update stable/11 to BETA3 as part of the 11.1-RELEASE cycle. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/conf/newvers.sh Modified: stable/11/sys/conf/newvers.sh ============================================================================== --- stable/11/sys/conf/newvers.sh Thu Jun 22 22:53:10 2017 (r320250) +++ stable/11/sys/conf/newvers.sh Fri Jun 23 00:00:00 2017 (r320251) @@ -44,7 +44,7 @@ TYPE="FreeBSD" REVISION="11.1" -BRANCH="BETA2" +BRANCH="BETA3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-stable@freebsd.org Fri Jun 23 18:57:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4AF39D87AF7; Fri, 23 Jun 2017 18:57:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AE1E70887; Fri, 23 Jun 2017 18:57:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NIvuI6072945; Fri, 23 Jun 2017 18:57:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NIvuUU072944; Fri, 23 Jun 2017 18:57:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706231857.v5NIvuUU072944@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Jun 2017 18:57:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320290 - stable/11/sys/kern X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 18:57:58 -0000 Author: kib Date: Fri Jun 23 18:57:56 2017 New Revision: 320290 URL: https://svnweb.freebsd.org/changeset/base/320290 Log: MFC r320038: Style. Approved by: re (gjb) Modified: stable/11/sys/kern/kern_event.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/kern/kern_event.c ============================================================================== --- stable/11/sys/kern/kern_event.c Fri Jun 23 18:42:47 2017 (r320289) +++ stable/11/sys/kern/kern_event.c Fri Jun 23 18:57:56 2017 (r320290) @@ -573,12 +573,13 @@ knote_fork(struct knlist *list, int pid) * interval timer support code. */ -#define NOTE_TIMER_PRECMASK (NOTE_SECONDS|NOTE_MSECONDS|NOTE_USECONDS| \ - NOTE_NSECONDS) +#define NOTE_TIMER_PRECMASK \ + (NOTE_SECONDS | NOTE_MSECONDS | NOTE_USECONDS | NOTE_NSECONDS) static sbintime_t timer2sbintime(intptr_t data, int flags) { + int64_t secs; /* * Macros for converting to the fractional second portion of an @@ -597,27 +598,27 @@ timer2sbintime(intptr_t data, int flags) case NOTE_MSECONDS: /* FALLTHROUGH */ case 0: if (data >= 1000) { - int64_t secs = data / 1000; + secs = data / 1000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | MS_TO_SBT(data % 1000)); } - return MS_TO_SBT(data); + return (MS_TO_SBT(data)); case NOTE_USECONDS: if (data >= 1000000) { - int64_t secs = data / 1000000; + secs = data / 1000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | US_TO_SBT(data % 1000000)); } - return US_TO_SBT(data); + return (US_TO_SBT(data)); case NOTE_NSECONDS: if (data >= 1000000000) { - int64_t secs = data / 1000000000; + secs = data / 1000000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); From owner-svn-src-stable@freebsd.org Fri Jun 23 19:04:42 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A895D87E19; Fri, 23 Jun 2017 19:04:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D93AA70FD4; Fri, 23 Jun 2017 19:04:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NJ4fmi077407; Fri, 23 Jun 2017 19:04:41 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NJ4fBM077406; Fri, 23 Jun 2017 19:04:41 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706231904.v5NJ4fBM077406@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 23 Jun 2017 19:04:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320293 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 19:04:42 -0000 Author: kib Date: Fri Jun 23 19:04:40 2017 New Revision: 320293 URL: https://svnweb.freebsd.org/changeset/base/320293 Log: MFC r320038: Style. Modified: stable/10/sys/kern/kern_event.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_event.c ============================================================================== --- stable/10/sys/kern/kern_event.c Fri Jun 23 19:03:31 2017 (r320292) +++ stable/10/sys/kern/kern_event.c Fri Jun 23 19:04:40 2017 (r320293) @@ -553,12 +553,13 @@ knote_fork(struct knlist *list, int pid) * interval timer support code. */ -#define NOTE_TIMER_PRECMASK (NOTE_SECONDS|NOTE_MSECONDS|NOTE_USECONDS| \ - NOTE_NSECONDS) +#define NOTE_TIMER_PRECMASK \ + (NOTE_SECONDS | NOTE_MSECONDS | NOTE_USECONDS | NOTE_NSECONDS) static sbintime_t timer2sbintime(intptr_t data, int flags) { + int64_t secs; /* * Macros for converting to the fractional second portion of an @@ -577,27 +578,27 @@ timer2sbintime(intptr_t data, int flags) case NOTE_MSECONDS: /* FALLTHROUGH */ case 0: if (data >= 1000) { - int64_t secs = data / 1000; + secs = data / 1000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | MS_TO_SBT(data % 1000)); } - return MS_TO_SBT(data); + return (MS_TO_SBT(data)); case NOTE_USECONDS: if (data >= 1000000) { - int64_t secs = data / 1000000; + secs = data / 1000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); #endif return (secs << 32 | US_TO_SBT(data % 1000000)); } - return US_TO_SBT(data); + return (US_TO_SBT(data)); case NOTE_NSECONDS: if (data >= 1000000000) { - int64_t secs = data / 1000000000; + secs = data / 1000000000; #ifdef __LP64__ if (secs > (SBT_MAX / SBT_1S)) return (SBT_MAX); From owner-svn-src-stable@freebsd.org Fri Jun 23 19:44:21 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E575CD8881C; Fri, 23 Jun 2017 19:44:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD63471DDD; Fri, 23 Jun 2017 19:44:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NJiK9v093876; Fri, 23 Jun 2017 19:44:20 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NJiKTn093872; Fri, 23 Jun 2017 19:44:20 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706231944.v5NJiKTn093872@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 19:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320294 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 19:44:22 -0000 Author: bdrewery Date: Fri Jun 23 19:44:20 2017 New Revision: 320294 URL: https://svnweb.freebsd.org/changeset/base/320294 Log: MFC r320012,r320028,r320061,r320118: r320012: Fix LIBAMU location to fix 'stale .depend' rebuilds in usr.sbin/amd. r320028: Fix more incorrect library directories fix 'stale .depend' rebuilds. r320061: Fix Makefiles which override LIBDIR to not add incorrect dependencies into .depend. r320118: Follow-up r320061: Need to respect make.conf/env LIBDIR overrides. Approved by: re (gjb) Modified: stable/11/share/mk/bsd.libnames.mk stable/11/share/mk/bsd.own.mk stable/11/share/mk/local.sys.mk stable/11/share/mk/src.libnames.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.libnames.mk ============================================================================== --- stable/11/share/mk/bsd.libnames.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/bsd.libnames.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -12,161 +12,161 @@ # Src directory locations are also defined in src.libnames.mk. -LIBCRT0?= ${DESTDIR}${LIBDIR}/crt0.o +LIBCRT0?= ${DESTDIR}${LIBDIR_BASE}/crt0.o -LIB80211?= ${DESTDIR}${LIBDIR}/lib80211.a -LIBALIAS?= ${DESTDIR}${LIBDIR}/libalias.a -LIBARCHIVE?= ${DESTDIR}${LIBDIR}/libarchive.a -LIBASN1?= ${DESTDIR}${LIBDIR}/libasn1.a -LIBATM?= ${DESTDIR}${LIBDIR}/libatm.a -LIBAUDITD?= ${DESTDIR}${LIBDIR}/libauditd.a -LIBAVL?= ${DESTDIR}${LIBDIR}/libavl.a -LIBBEGEMOT?= ${DESTDIR}${LIBDIR}/libbegemot.a -LIBBLACKLIST?= ${DESTDIR}${LIBDIR}/libblacklist.a -LIBBLUETOOTH?= ${DESTDIR}${LIBDIR}/libbluetooth.a -LIBBSDXML?= ${DESTDIR}${LIBDIR}/libbsdxml.a -LIBBSM?= ${DESTDIR}${LIBDIR}/libbsm.a -LIBBSNMP?= ${DESTDIR}${LIBDIR}/libbsnmp.a -LIBBZ2?= ${DESTDIR}${LIBDIR}/libbz2.a -LIBC?= ${DESTDIR}${LIBDIR}/libc.a -LIBCALENDAR?= ${DESTDIR}${LIBDIR}/libcalendar.a -LIBCAM?= ${DESTDIR}${LIBDIR}/libcam.a -LIBCAP_DNS?= ${DESTDIR}${LIBDIR}/libcap_dns.a -LIBCAP_GRP?= ${DESTDIR}${LIBDIR}/libcap_grp.a -LIBCAP_PWD?= ${DESTDIR}${LIBDIR}/libcap_pwd.a -LIBCAP_RANDOM?= ${DESTDIR}${LIBDIR}/libcap_random.a -LIBCAP_SYSCTL?= ${DESTDIR}${LIBDIR}/libcap_sysctl.a -LIBCASPER?= ${DESTDIR}${LIBDIR}/libcasper.a -LIBCOMPAT?= ${DESTDIR}${LIBDIR}/libcompat.a -LIBCOMPILER_RT?=${DESTDIR}${LIBDIR}/libcompiler_rt.a -LIBCOM_ERR?= ${DESTDIR}${LIBDIR}/libcom_err.a -LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libc++.a -LIBCRYPT?= ${DESTDIR}${LIBDIR}/libcrypt.a -LIBCRYPTO?= ${DESTDIR}${LIBDIR}/libcrypto.a -LIBCTF?= ${DESTDIR}${LIBDIR}/libctf.a -LIBCURSES?= ${DESTDIR}${LIBDIR}/libcurses.a -LIBCUSE?= ${DESTDIR}${LIBDIR}/libcuse.a -LIBCXGB4?= ${DESTDIR}${LIBDIR}/libcxgb4.a -LIBCXXRT?= ${DESTDIR}${LIBDIR}/libcxxrt.a -LIBC_PIC?= ${DESTDIR}${LIBDIR}/libc_pic.a -LIBDEVCTL?= ${DESTDIR}${LIBDIR}/libdevctl.a -LIBDEVDCTL?= ${DESTDIR}${LIBDIR}/libdevdctl.a -LIBDEVINFO?= ${DESTDIR}${LIBDIR}/libdevinfo.a -LIBDEVSTAT?= ${DESTDIR}${LIBDIR}/libdevstat.a -LIBDIALOG?= ${DESTDIR}${LIBDIR}/libdialog.a -LIBDNS?= ${DESTDIR}${LIBDIR}/libdns.a -LIBDPV?= ${DESTDIR}${LIBDIR}/libdpv.a -LIBDTRACE?= ${DESTDIR}${LIBDIR}/libdtrace.a -LIBDWARF?= ${DESTDIR}${LIBDIR}/libdwarf.a -LIBEDIT?= ${DESTDIR}${LIBDIR}/libedit.a -LIBEFIVAR?= ${DESTDIR}${LIBDIR}/libefivar.a -LIBELF?= ${DESTDIR}${LIBDIR}/libelf.a -LIBEXECINFO?= ${DESTDIR}${LIBDIR}/libexecinfo.a -LIBFETCH?= ${DESTDIR}${LIBDIR}/libfetch.a -LIBFIGPAR?= ${DESTDIR}${LIBDIR}/libfigpar.a +LIB80211?= ${DESTDIR}${LIBDIR_BASE}/lib80211.a +LIBALIAS?= ${DESTDIR}${LIBDIR_BASE}/libalias.a +LIBARCHIVE?= ${DESTDIR}${LIBDIR_BASE}/libarchive.a +LIBASN1?= ${DESTDIR}${LIBDIR_BASE}/libasn1.a +LIBATM?= ${DESTDIR}${LIBDIR_BASE}/libatm.a +LIBAUDITD?= ${DESTDIR}${LIBDIR_BASE}/libauditd.a +LIBAVL?= ${DESTDIR}${LIBDIR_BASE}/libavl.a +LIBBEGEMOT?= ${DESTDIR}${LIBDIR_BASE}/libbegemot.a +LIBBLACKLIST?= ${DESTDIR}${LIBDIR_BASE}/libblacklist.a +LIBBLUETOOTH?= ${DESTDIR}${LIBDIR_BASE}/libbluetooth.a +LIBBSDXML?= ${DESTDIR}${LIBDIR_BASE}/libbsdxml.a +LIBBSM?= ${DESTDIR}${LIBDIR_BASE}/libbsm.a +LIBBSNMP?= ${DESTDIR}${LIBDIR_BASE}/libbsnmp.a +LIBBZ2?= ${DESTDIR}${LIBDIR_BASE}/libbz2.a +LIBC?= ${DESTDIR}${LIBDIR_BASE}/libc.a +LIBCALENDAR?= ${DESTDIR}${LIBDIR_BASE}/libcalendar.a +LIBCAM?= ${DESTDIR}${LIBDIR_BASE}/libcam.a +LIBCAP_DNS?= ${DESTDIR}${LIBDIR_BASE}/libcap_dns.a +LIBCAP_GRP?= ${DESTDIR}${LIBDIR_BASE}/libcap_grp.a +LIBCAP_PWD?= ${DESTDIR}${LIBDIR_BASE}/libcap_pwd.a +LIBCAP_RANDOM?= ${DESTDIR}${LIBDIR_BASE}/libcap_random.a +LIBCAP_SYSCTL?= ${DESTDIR}${LIBDIR_BASE}/libcap_sysctl.a +LIBCASPER?= ${DESTDIR}${LIBDIR_BASE}/libcasper.a +LIBCOMPAT?= ${DESTDIR}${LIBDIR_BASE}/libcompat.a +LIBCOMPILER_RT?=${DESTDIR}${LIBDIR_BASE}/libcompiler_rt.a +LIBCOM_ERR?= ${DESTDIR}${LIBDIR_BASE}/libcom_err.a +LIBCPLUSPLUS?= ${DESTDIR}${LIBDIR_BASE}/libc++.a +LIBCRYPT?= ${DESTDIR}${LIBDIR_BASE}/libcrypt.a +LIBCRYPTO?= ${DESTDIR}${LIBDIR_BASE}/libcrypto.a +LIBCTF?= ${DESTDIR}${LIBDIR_BASE}/libctf.a +LIBCURSES?= ${DESTDIR}${LIBDIR_BASE}/libcurses.a +LIBCUSE?= ${DESTDIR}${LIBDIR_BASE}/libcuse.a +LIBCXGB4?= ${DESTDIR}${LIBDIR_BASE}/libcxgb4.a +LIBCXXRT?= ${DESTDIR}${LIBDIR_BASE}/libcxxrt.a +LIBC_PIC?= ${DESTDIR}${LIBDIR_BASE}/libc_pic.a +LIBDEVCTL?= ${DESTDIR}${LIBDIR_BASE}/libdevctl.a +LIBDEVDCTL?= ${DESTDIR}${LIBDIR_BASE}/libdevdctl.a +LIBDEVINFO?= ${DESTDIR}${LIBDIR_BASE}/libdevinfo.a +LIBDEVSTAT?= ${DESTDIR}${LIBDIR_BASE}/libdevstat.a +LIBDIALOG?= ${DESTDIR}${LIBDIR_BASE}/libdialog.a +LIBDNS?= ${DESTDIR}${LIBDIR_BASE}/libdns.a +LIBDPV?= ${DESTDIR}${LIBDIR_BASE}/libdpv.a +LIBDTRACE?= ${DESTDIR}${LIBDIR_BASE}/libdtrace.a +LIBDWARF?= ${DESTDIR}${LIBDIR_BASE}/libdwarf.a +LIBEDIT?= ${DESTDIR}${LIBDIR_BASE}/libedit.a +LIBEFIVAR?= ${DESTDIR}${LIBDIR_BASE}/libefivar.a +LIBELF?= ${DESTDIR}${LIBDIR_BASE}/libelf.a +LIBEXECINFO?= ${DESTDIR}${LIBDIR_BASE}/libexecinfo.a +LIBFETCH?= ${DESTDIR}${LIBDIR_BASE}/libfetch.a +LIBFIGPAR?= ${DESTDIR}${LIBDIR_BASE}/libfigpar.a LIBFL?= "don't use LIBFL, use LIBL" -LIBFORM?= ${DESTDIR}${LIBDIR}/libform.a -LIBG2C?= ${DESTDIR}${LIBDIR}/libg2c.a -LIBGEOM?= ${DESTDIR}${LIBDIR}/libgeom.a -LIBGNUREGEX?= ${DESTDIR}${LIBDIR}/libgnuregex.a -LIBGPIO?= ${DESTDIR}${LIBDIR}/libgpio.a -LIBGSSAPI?= ${DESTDIR}${LIBDIR}/libgssapi.a -LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR}/libgssapi_krb5.a -LIBHDB?= ${DESTDIR}${LIBDIR}/libhdb.a -LIBHEIMBASE?= ${DESTDIR}${LIBDIR}/libheimbase.a -LIBHEIMNTLM?= ${DESTDIR}${LIBDIR}/libheimntlm.a -LIBHEIMSQLITE?= ${DESTDIR}${LIBDIR}/libheimsqlite.a -LIBHX509?= ${DESTDIR}${LIBDIR}/libhx509.a -LIBIBCM?= ${DESTDIR}${LIBDIR}/libibcm.a -LIBIBCOMMON?= ${DESTDIR}${LIBDIR}/libibcommon.a -LIBIBMAD?= ${DESTDIR}${LIBDIR}/libibmad.a -LIBIBSDP?= ${DESTDIR}${LIBDIR}/libibsdp.a -LIBIBUMAD?= ${DESTDIR}${LIBDIR}/libibumad.a -LIBIBVERBS?= ${DESTDIR}${LIBDIR}/libibverbs.a -LIBIPSEC?= ${DESTDIR}${LIBDIR}/libipsec.a -LIBJAIL?= ${DESTDIR}${LIBDIR}/libjail.a -LIBKADM5CLNT?= ${DESTDIR}${LIBDIR}/libkadm5clnt.a -LIBKADM5SRV?= ${DESTDIR}${LIBDIR}/libkadm5srv.a -LIBKAFS5?= ${DESTDIR}${LIBDIR}/libkafs5.a -LIBKDC?= ${DESTDIR}${LIBDIR}/libkdc.a -LIBKEYCAP?= ${DESTDIR}${LIBDIR}/libkeycap.a -LIBKICONV?= ${DESTDIR}${LIBDIR}/libkiconv.a -LIBKRB5?= ${DESTDIR}${LIBDIR}/libkrb5.a -LIBKVM?= ${DESTDIR}${LIBDIR}/libkvm.a -LIBL?= ${DESTDIR}${LIBDIR}/libl.a +LIBFORM?= ${DESTDIR}${LIBDIR_BASE}/libform.a +LIBG2C?= ${DESTDIR}${LIBDIR_BASE}/libg2c.a +LIBGEOM?= ${DESTDIR}${LIBDIR_BASE}/libgeom.a +LIBGNUREGEX?= ${DESTDIR}${LIBDIR_BASE}/libgnuregex.a +LIBGPIO?= ${DESTDIR}${LIBDIR_BASE}/libgpio.a +LIBGSSAPI?= ${DESTDIR}${LIBDIR_BASE}/libgssapi.a +LIBGSSAPI_KRB5?= ${DESTDIR}${LIBDIR_BASE}/libgssapi_krb5.a +LIBHDB?= ${DESTDIR}${LIBDIR_BASE}/libhdb.a +LIBHEIMBASE?= ${DESTDIR}${LIBDIR_BASE}/libheimbase.a +LIBHEIMNTLM?= ${DESTDIR}${LIBDIR_BASE}/libheimntlm.a +LIBHEIMSQLITE?= ${DESTDIR}${LIBDIR_BASE}/libheimsqlite.a +LIBHX509?= ${DESTDIR}${LIBDIR_BASE}/libhx509.a +LIBIBCM?= ${DESTDIR}${LIBDIR_BASE}/libibcm.a +LIBIBCOMMON?= ${DESTDIR}${LIBDIR_BASE}/libibcommon.a +LIBIBMAD?= ${DESTDIR}${LIBDIR_BASE}/libibmad.a +LIBIBSDP?= ${DESTDIR}${LIBDIR_BASE}/libibsdp.a +LIBIBUMAD?= ${DESTDIR}${LIBDIR_BASE}/libibumad.a +LIBIBVERBS?= ${DESTDIR}${LIBDIR_BASE}/libibverbs.a +LIBIPSEC?= ${DESTDIR}${LIBDIR_BASE}/libipsec.a +LIBJAIL?= ${DESTDIR}${LIBDIR_BASE}/libjail.a +LIBKADM5CLNT?= ${DESTDIR}${LIBDIR_BASE}/libkadm5clnt.a +LIBKADM5SRV?= ${DESTDIR}${LIBDIR_BASE}/libkadm5srv.a +LIBKAFS5?= ${DESTDIR}${LIBDIR_BASE}/libkafs5.a +LIBKDC?= ${DESTDIR}${LIBDIR_BASE}/libkdc.a +LIBKEYCAP?= ${DESTDIR}${LIBDIR_BASE}/libkeycap.a +LIBKICONV?= ${DESTDIR}${LIBDIR_BASE}/libkiconv.a +LIBKRB5?= ${DESTDIR}${LIBDIR_BASE}/libkrb5.a +LIBKVM?= ${DESTDIR}${LIBDIR_BASE}/libkvm.a +LIBL?= ${DESTDIR}${LIBDIR_BASE}/libl.a LIBLN?= "don't use LIBLN, use LIBL" -LIBLZMA?= ${DESTDIR}${LIBDIR}/liblzma.a -LIBM?= ${DESTDIR}${LIBDIR}/libm.a -LIBMAGIC?= ${DESTDIR}${LIBDIR}/libmagic.a -LIBMD?= ${DESTDIR}${LIBDIR}/libmd.a -LIBMEMSTAT?= ${DESTDIR}${LIBDIR}/libmemstat.a -LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a -LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a -LIBMLX4?= ${DESTDIR}${LIBDIR}/libmlx4.a -LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a -LIBMT?= ${DESTDIR}${LIBDIR}/libmt.a -LIBMTHCA?= ${DESTDIR}${LIBDIR}/libmthca.a -LIBNANDFS?= ${DESTDIR}${LIBDIR}/libnandfs.a -LIBNCURSES?= ${DESTDIR}${LIBDIR}/libncurses.a -LIBNCURSESW?= ${DESTDIR}${LIBDIR}/libncursesw.a -LIBNETGRAPH?= ${DESTDIR}${LIBDIR}/libnetgraph.a -LIBNGATM?= ${DESTDIR}${LIBDIR}/libngatm.a -LIBNV?= ${DESTDIR}${LIBDIR}/libnv.a -LIBNVPAIR?= ${DESTDIR}${LIBDIR}/libnvpair.a -LIBOPENSM?= ${DESTDIR}${LIBDIR}/libopensm.a -LIBOPIE?= ${DESTDIR}${LIBDIR}/libopie.a -LIBOSMCOMP?= ${DESTDIR}${LIBDIR}/libosmcomp.a -LIBOSMVENDOR?= ${DESTDIR}${LIBDIR}/libosmvendor.a -LIBPAM?= ${DESTDIR}${LIBDIR}/libpam.a -LIBPANEL?= ${DESTDIR}${LIBDIR}/libpanel.a -LIBPANELW?= ${DESTDIR}${LIBDIR}/libpanelw.a -LIBPCAP?= ${DESTDIR}${LIBDIR}/libpcap.a -LIBPJDLOG?= ${DESTDIR}${LIBDIR}/libpjdlog.a -LIBPMC?= ${DESTDIR}${LIBDIR}/libpmc.a -LIBPROC?= ${DESTDIR}${LIBDIR}/libproc.a -LIBPROCSTAT?= ${DESTDIR}${LIBDIR}/libprocstat.a -LIBPTHREAD?= ${DESTDIR}${LIBDIR}/libpthread.a -LIBRADIUS?= ${DESTDIR}${LIBDIR}/libradius.a -LIBRDMACM?= ${DESTDIR}${LIBDIR}/librdmacm.a -LIBROKEN?= ${DESTDIR}${LIBDIR}/libroken.a -LIBRPCSEC_GSS?= ${DESTDIR}${LIBDIR}/librpcsec_gss.a -LIBRPCSVC?= ${DESTDIR}${LIBDIR}/librpcsvc.a -LIBRT?= ${DESTDIR}${LIBDIR}/librt.a -LIBRTLD_DB?= ${DESTDIR}${LIBDIR}/librtld_db.a -LIBSBUF?= ${DESTDIR}${LIBDIR}/libsbuf.a -LIBSDP?= ${DESTDIR}${LIBDIR}/libsdp.a -LIBSMB?= ${DESTDIR}${LIBDIR}/libsmb.a -LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a -LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR}/libssp_nonshared.a -LIBSTAND?= ${DESTDIR}${LIBDIR}/libstand.a -LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a -LIBSTDTHREADS?= ${DESTDIR}${LIBDIR}/libstdthreads.a -LIBSYSDECODE?= ${DESTDIR}${LIBDIR}/libsysdecode.a -LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a -LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a -LIBTERMCAPW?= ${DESTDIR}${LIBDIR}/libtermcapw.a +LIBLZMA?= ${DESTDIR}${LIBDIR_BASE}/liblzma.a +LIBM?= ${DESTDIR}${LIBDIR_BASE}/libm.a +LIBMAGIC?= ${DESTDIR}${LIBDIR_BASE}/libmagic.a +LIBMD?= ${DESTDIR}${LIBDIR_BASE}/libmd.a +LIBMEMSTAT?= ${DESTDIR}${LIBDIR_BASE}/libmemstat.a +LIBMENU?= ${DESTDIR}${LIBDIR_BASE}/libmenu.a +LIBMILTER?= ${DESTDIR}${LIBDIR_BASE}/libmilter.a +LIBMLX4?= ${DESTDIR}${LIBDIR_BASE}/libmlx4.a +LIBMP?= ${DESTDIR}${LIBDIR_BASE}/libmp.a +LIBMT?= ${DESTDIR}${LIBDIR_BASE}/libmt.a +LIBMTHCA?= ${DESTDIR}${LIBDIR_BASE}/libmthca.a +LIBNANDFS?= ${DESTDIR}${LIBDIR_BASE}/libnandfs.a +LIBNCURSES?= ${DESTDIR}${LIBDIR_BASE}/libncurses.a +LIBNCURSESW?= ${DESTDIR}${LIBDIR_BASE}/libncursesw.a +LIBNETGRAPH?= ${DESTDIR}${LIBDIR_BASE}/libnetgraph.a +LIBNGATM?= ${DESTDIR}${LIBDIR_BASE}/libngatm.a +LIBNV?= ${DESTDIR}${LIBDIR_BASE}/libnv.a +LIBNVPAIR?= ${DESTDIR}${LIBDIR_BASE}/libnvpair.a +LIBOPENSM?= ${DESTDIR}${LIBDIR_BASE}/libopensm.a +LIBOPIE?= ${DESTDIR}${LIBDIR_BASE}/libopie.a +LIBOSMCOMP?= ${DESTDIR}${LIBDIR_BASE}/libosmcomp.a +LIBOSMVENDOR?= ${DESTDIR}${LIBDIR_BASE}/libosmvendor.a +LIBPAM?= ${DESTDIR}${LIBDIR_BASE}/libpam.a +LIBPANEL?= ${DESTDIR}${LIBDIR_BASE}/libpanel.a +LIBPANELW?= ${DESTDIR}${LIBDIR_BASE}/libpanelw.a +LIBPCAP?= ${DESTDIR}${LIBDIR_BASE}/libpcap.a +LIBPJDLOG?= ${DESTDIR}${LIBDIR_BASE}/libpjdlog.a +LIBPMC?= ${DESTDIR}${LIBDIR_BASE}/libpmc.a +LIBPROC?= ${DESTDIR}${LIBDIR_BASE}/libproc.a +LIBPROCSTAT?= ${DESTDIR}${LIBDIR_BASE}/libprocstat.a +LIBPTHREAD?= ${DESTDIR}${LIBDIR_BASE}/libpthread.a +LIBRADIUS?= ${DESTDIR}${LIBDIR_BASE}/libradius.a +LIBRDMACM?= ${DESTDIR}${LIBDIR_BASE}/librdmacm.a +LIBROKEN?= ${DESTDIR}${LIBDIR_BASE}/libroken.a +LIBRPCSEC_GSS?= ${DESTDIR}${LIBDIR_BASE}/librpcsec_gss.a +LIBRPCSVC?= ${DESTDIR}${LIBDIR_BASE}/librpcsvc.a +LIBRT?= ${DESTDIR}${LIBDIR_BASE}/librt.a +LIBRTLD_DB?= ${DESTDIR}${LIBDIR_BASE}/librtld_db.a +LIBSBUF?= ${DESTDIR}${LIBDIR_BASE}/libsbuf.a +LIBSDP?= ${DESTDIR}${LIBDIR_BASE}/libsdp.a +LIBSMB?= ${DESTDIR}${LIBDIR_BASE}/libsmb.a +LIBSSL?= ${DESTDIR}${LIBDIR_BASE}/libssl.a +LIBSSP_NONSHARED?= ${DESTDIR}${LIBDIR_BASE}/libssp_nonshared.a +LIBSTAND?= ${DESTDIR}${LIBDIR_BASE}/libstand.a +LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR_BASE}/libstdc++.a +LIBSTDTHREADS?= ${DESTDIR}${LIBDIR_BASE}/libstdthreads.a +LIBSYSDECODE?= ${DESTDIR}${LIBDIR_BASE}/libsysdecode.a +LIBTACPLUS?= ${DESTDIR}${LIBDIR_BASE}/libtacplus.a +LIBTERMCAP?= ${DESTDIR}${LIBDIR_BASE}/libtermcap.a +LIBTERMCAPW?= ${DESTDIR}${LIBDIR_BASE}/libtermcapw.a LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP" LIBTINFO?= "don't use LIBTINFO, use LIBNCURSES" -LIBUFS?= ${DESTDIR}${LIBDIR}/libufs.a -LIBUGIDFW?= ${DESTDIR}${LIBDIR}/libugidfw.a -LIBULOG?= ${DESTDIR}${LIBDIR}/libulog.a -LIBUMEM?= ${DESTDIR}${LIBDIR}/libumem.a -LIBUSB?= ${DESTDIR}${LIBDIR}/libusb.a -LIBUSBHID?= ${DESTDIR}${LIBDIR}/libusbhid.a -LIBUTIL?= ${DESTDIR}${LIBDIR}/libutil.a -LIBUUTIL?= ${DESTDIR}${LIBDIR}/libuutil.a -LIBVGL?= ${DESTDIR}${LIBDIR}/libvgl.a -LIBVMMAPI?= ${DESTDIR}${LIBDIR}/libvmmapi.a -LIBWIND?= ${DESTDIR}${LIBDIR}/libwind.a -LIBWRAP?= ${DESTDIR}${LIBDIR}/libwrap.a -LIBXO?= ${DESTDIR}${LIBDIR}/libxo.a -LIBXPG4?= ${DESTDIR}${LIBDIR}/libxpg4.a -LIBY?= ${DESTDIR}${LIBDIR}/liby.a -LIBYPCLNT?= ${DESTDIR}${LIBDIR}/libypclnt.a -LIBZ?= ${DESTDIR}${LIBDIR}/libz.a -LIBZFS?= ${DESTDIR}${LIBDIR}/libzfs.a -LIBZFS_CORE?= ${DESTDIR}${LIBDIR}/libzfs_core.a -LIBZPOOL?= ${DESTDIR}${LIBDIR}/libzpool.a +LIBUFS?= ${DESTDIR}${LIBDIR_BASE}/libufs.a +LIBUGIDFW?= ${DESTDIR}${LIBDIR_BASE}/libugidfw.a +LIBULOG?= ${DESTDIR}${LIBDIR_BASE}/libulog.a +LIBUMEM?= ${DESTDIR}${LIBDIR_BASE}/libumem.a +LIBUSB?= ${DESTDIR}${LIBDIR_BASE}/libusb.a +LIBUSBHID?= ${DESTDIR}${LIBDIR_BASE}/libusbhid.a +LIBUTIL?= ${DESTDIR}${LIBDIR_BASE}/libutil.a +LIBUUTIL?= ${DESTDIR}${LIBDIR_BASE}/libuutil.a +LIBVGL?= ${DESTDIR}${LIBDIR_BASE}/libvgl.a +LIBVMMAPI?= ${DESTDIR}${LIBDIR_BASE}/libvmmapi.a +LIBWIND?= ${DESTDIR}${LIBDIR_BASE}/libwind.a +LIBWRAP?= ${DESTDIR}${LIBDIR_BASE}/libwrap.a +LIBXO?= ${DESTDIR}${LIBDIR_BASE}/libxo.a +LIBXPG4?= ${DESTDIR}${LIBDIR_BASE}/libxpg4.a +LIBY?= ${DESTDIR}${LIBDIR_BASE}/liby.a +LIBYPCLNT?= ${DESTDIR}${LIBDIR_BASE}/libypclnt.a +LIBZ?= ${DESTDIR}${LIBDIR_BASE}/libz.a +LIBZFS?= ${DESTDIR}${LIBDIR_BASE}/libzfs.a +LIBZFS_CORE?= ${DESTDIR}${LIBDIR_BASE}/libzfs_core.a +LIBZPOOL?= ${DESTDIR}${LIBDIR_BASE}/libzpool.a # enforce the 2 -lpthread and -lc to always be the last in that exact order .if defined(LDADD) @@ -183,7 +183,7 @@ LDADD:= ${LDADD:N-lc} -lc .if defined(_LIBRARIES) && defined(LIB) && \ ${_LIBRARIES:M${LIB}} != "" .if !defined(LIB${LIB:tu}) -.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR}/lib${LIB}.a +.error ${.CURDIR}: Missing value for LIB${LIB:tu} in ${_this:T}. Likely should be: LIB${LIB:tu}?= $${DESTDIR}$${LIBDIR_BASE}/lib${LIB}.a .endif .endif Modified: stable/11/share/mk/bsd.own.mk ============================================================================== --- stable/11/share/mk/bsd.own.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/bsd.own.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -152,7 +152,13 @@ DTBOWN?= root DTBGRP?= wheel DTBMODE?= 444 -LIBDIR?= /usr/lib +# Use make.conf / environment LIBDIR as default if set... +.if !empty(_PREMK_LIBDIR) +LIBDIR_BASE?= ${_PREMK_LIBDIR} +.endif +# otherwise use our expected default value. +LIBDIR_BASE?= /usr/lib +LIBDIR?= ${LIBDIR_BASE} LIBCOMPATDIR?= /usr/lib/compat LIBDATADIR?= /usr/libdata LIBEXECDIR?= /usr/libexec Modified: stable/11/share/mk/local.sys.mk ============================================================================== --- stable/11/share/mk/local.sys.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/local.sys.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -39,6 +39,10 @@ MAKE_PRINT_VAR_ON_ERROR += .MAKE.MAKEFILES .PATH OBJTOP?= ${.OBJDIR:S,${.CURDIR},,}${SRCTOP} .endif +.if !empty(LIBDIR) +_PREMK_LIBDIR:= ${LIBDIR} +.endif + .include "src.sys.mk" .if ${.MAKE.MODE:Mmeta*} != "" Modified: stable/11/share/mk/src.libnames.mk ============================================================================== --- stable/11/share/mk/src.libnames.mk Fri Jun 23 19:04:40 2017 (r320293) +++ stable/11/share/mk/src.libnames.mk Fri Jun 23 19:44:20 2017 (r320294) @@ -339,13 +339,13 @@ _DP_rdmacm= ibverbs # Define special cases LDADD_supcplusplus= -lsupc++ -LIBATF_C= ${DESTDIR}${LIBDIR}/libprivateatf-c.a -LIBATF_CXX= ${DESTDIR}${LIBDIR}/libprivateatf-c++.a +LIBATF_C= ${DESTDIR}${LIBDIR_BASE}/libprivateatf-c.a +LIBATF_CXX= ${DESTDIR}${LIBDIR_BASE}/libprivateatf-c++.a LDADD_atf_c= -lprivateatf-c LDADD_atf_cxx= -lprivateatf-c++ .for _l in ${_PRIVATELIBS} -LIB${_l:tu}?= ${DESTDIR}${LIBDIR}/libprivate${_l}.a +LIB${_l:tu}?= ${DESTDIR}${LIBDIR_BASE}/libprivate${_l}.a .endfor .for _l in ${_LIBRARIES} @@ -416,7 +416,7 @@ LIBSMDBDIR= ${OBJTOP}/lib/libsmdb LIBSMDB?= ${LIBSMDBDIR}/libsmdb.a LIBSMUTILDIR= ${OBJTOP}/lib/libsmutil -LIBSMUTIL?= ${LIBSMDBDIR}/libsmutil.a +LIBSMUTIL?= ${LIBSMUTILDIR}/libsmutil.a LIBNETBSDDIR?= ${OBJTOP}/lib/libnetbsd LIBNETBSD?= ${LIBNETBSDDIR}/libnetbsd.a @@ -449,16 +449,16 @@ LIBPARSEDIR= ${OBJTOP}/usr.sbin/ntp/libparse LIBPARSE?= ${LIBPARSEDIR}/libparse.a LIBLPRDIR= ${OBJTOP}/usr.sbin/lpr/common_source -LIBLPR?= ${LIBOPTSDIR}/liblpr.a +LIBLPR?= ${LIBLPRDIR}/liblpr.a LIBFIFOLOGDIR= ${OBJTOP}/usr.sbin/fifolog/lib -LIBFIFOLOG?= ${LIBOPTSDIR}/libfifolog.a +LIBFIFOLOG?= ${LIBFIFOLOGDIR}/libfifolog.a LIBBSNMPTOOLSDIR= ${OBJTOP}/usr.sbin/bsnmpd/tools/libbsnmptools LIBBSNMPTOOLS?= ${LIBBSNMPTOOLSDIR}/libbsnmptools.a LIBAMUDIR= ${OBJTOP}/usr.sbin/amd/libamu -LIBAMU?= ${LIBAMUDIR}/libamu/libamu.a +LIBAMU?= ${LIBAMUDIR}/libamu.a # Define a directory for each library. This is useful for adding -L in when # not using a --sysroot or for meta mode bootstrapping when there is no From owner-svn-src-stable@freebsd.org Fri Jun 23 20:07:58 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21F4AD88E46; Fri, 23 Jun 2017 20:07:58 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D92197262A; Fri, 23 Jun 2017 20:07:57 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NK7uEO002040; Fri, 23 Jun 2017 20:07:56 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NK7u7E002039; Fri, 23 Jun 2017 20:07:56 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232007.v5NK7u7E002039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:07:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320295 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:07:58 -0000 Author: bdrewery Date: Fri Jun 23 20:07:56 2017 New Revision: 320295 URL: https://svnweb.freebsd.org/changeset/base/320295 Log: MFC r319862,r319996,r320030: r319862: META_MODE: Show .ERROR_CMD in error. r319996: WITH_META_MODE: Don't try showing command if .ERROR_META_FILE is empty. r320030: WITH_META_MODE: End each ERROR_CMD CMD line with ';'. Approved by: re (gjb, marius) Modified: stable/11/share/mk/local.sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/local.sys.mk ============================================================================== --- stable/11/share/mk/local.sys.mk Fri Jun 23 19:44:20 2017 (r320294) +++ stable/11/share/mk/local.sys.mk Fri Jun 23 20:07:56 2017 (r320295) @@ -13,7 +13,10 @@ MAKE_PRINT_VAR_ON_ERROR += \ .MAKE.MODE .endif +_ERROR_CMD_EXEC= ${sed -n '/^CMD/s,^CMD \(.*\),\1;,p' ${.ERROR_META_FILE}:L:sh} +_ERROR_CMD= ${!empty(.ERROR_META_FILE):?${_ERROR_CMD_EXEC}:.PHONY} MAKE_PRINT_VAR_ON_ERROR+= \ + _ERROR_CMD \ .CURDIR \ .MAKE \ .OBJDIR \ From owner-svn-src-stable@freebsd.org Fri Jun 23 20:25:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E6428D89349; Fri, 23 Jun 2017 20:25:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B353072FB6; Fri, 23 Jun 2017 20:25:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NKPwGr010350; Fri, 23 Jun 2017 20:25:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NKPwxS010349; Fri, 23 Jun 2017 20:25:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232025.v5NKPwxS010349@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320297 - stable/11/share/mk X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:26:00 -0000 Author: bdrewery Date: Fri Jun 23 20:25:58 2017 New Revision: 320297 URL: https://svnweb.freebsd.org/changeset/base/320297 Log: MFC r319861: META_MODE: NO_FILEMON should imply nofilemon. Approved by: re (gjb) Modified: stable/11/share/mk/sys.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/sys.mk ============================================================================== --- stable/11/share/mk/sys.mk Fri Jun 23 20:21:53 2017 (r320296) +++ stable/11/share/mk/sys.mk Fri Jun 23 20:25:58 2017 (r320297) @@ -59,7 +59,7 @@ META_MODE+= missing-meta=yes .if !defined(NO_SILENT) META_MODE+= silent=yes .endif -.if !exists(/dev/filemon) +.if !exists(/dev/filemon) || defined(NO_FILEMON) META_MODE+= nofilemon .endif # Require filemon data with bmake From owner-svn-src-stable@freebsd.org Fri Jun 23 20:38:22 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5960D89717; Fri, 23 Jun 2017 20:38:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2202734DD; Fri, 23 Jun 2017 20:38:22 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NKcL4T014393; Fri, 23 Jun 2017 20:38:21 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NKcL8O014390; Fri, 23 Jun 2017 20:38:21 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232038.v5NKcL8O014390@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:38:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320298 - in stable/11: share/mk sys/conf X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:38:23 -0000 Author: bdrewery Date: Fri Jun 23 20:38:21 2017 New Revision: 320298 URL: https://svnweb.freebsd.org/changeset/base/320298 Log: MFC r320174,r320204: r320174: Fix 'make clean all' to work again. r320204: Fix various 'make *clean *all *install' combinations. PR: 219819 Approved by: re (gjb) Modified: stable/11/share/mk/bsd.dep.mk stable/11/share/mk/bsd.init.mk stable/11/sys/conf/kern.post.mk Directory Properties: stable/11/ (props changed) Modified: stable/11/share/mk/bsd.dep.mk ============================================================================== --- stable/11/share/mk/bsd.dep.mk Fri Jun 23 20:25:58 2017 (r320297) +++ stable/11/share/mk/bsd.dep.mk Fri Jun 23 20:38:21 2017 (r320298) @@ -90,7 +90,7 @@ _meta_filemon= 1 .if defined(_SKIP_BUILD) || defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .if ${MK_DIRDEPS_BUILD} == "no" || make(analyze) || make(print-dir) || \ - make(obj) || make(clean*) || make(destroy*) + make(obj) || (!make(all) && (make(clean*) || make(destroy*))) .MAKE.DEPENDFILE= /dev/null .endif .endif Modified: stable/11/share/mk/bsd.init.mk ============================================================================== --- stable/11/share/mk/bsd.init.mk Fri Jun 23 20:25:58 2017 (r320297) +++ stable/11/share/mk/bsd.init.mk Fri Jun 23 20:38:21 2017 (r320298) @@ -50,8 +50,9 @@ $xGRP= ${_gid} _SKIP_BUILD= not building at level 0 .elif !empty(.MAKEFLAGS:M-V${_V_DO_BUILD}) || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(clean*) || make(obj) || make(analyze) || make(print-dir) || \ - make(destroy*) + ${.TARGETS:Mclean*} == ${.TARGETS} || \ + ${.TARGETS:Mdestroy*} == ${.TARGETS} || \ + make(obj) || make(analyze) || make(print-dir) # Skip building, but don't show a warning. _SKIP_BUILD= .endif Modified: stable/11/sys/conf/kern.post.mk ============================================================================== --- stable/11/sys/conf/kern.post.mk Fri Jun 23 20:25:58 2017 (r320297) +++ stable/11/sys/conf/kern.post.mk Fri Jun 23 20:38:21 2017 (r320298) @@ -200,10 +200,10 @@ _meta_filemon= 1 # lookups. For install, only do this if no other targets are specified. # Also skip generating or including .depend.* files if in meta+filemon mode # since it will track dependencies itself. OBJS_DEPEND_GUESS is still used. -.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(obj) || make(clean*) || \ +.if !empty(.MAKEFLAGS:M-V${_V_READ_DEPEND}) || make(*obj) || \ + ${.TARGETS:M*clean*} == ${.TARGETS} || \ ${.TARGETS:M*install*} == ${.TARGETS} || \ - make(kernel-obj) || make(kernel-clean*) || \ - make(kernel-install*) || defined(_meta_filemon) + defined(_meta_filemon) _SKIP_READ_DEPEND= 1 .MAKE.DEPENDFILE= /dev/null .endif From owner-svn-src-stable@freebsd.org Fri Jun 23 20:49:24 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D38C3D89977; Fri, 23 Jun 2017 20:49:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A140E7396D; Fri, 23 Jun 2017 20:49:24 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5NKnNUi018517; Fri, 23 Jun 2017 20:49:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5NKnNbm018516; Fri, 23 Jun 2017 20:49:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201706232049.v5NKnNbm018516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 23 Jun 2017 20:49:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320299 - stable/11/lib/libsysdecode X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2017 20:49:24 -0000 Author: bdrewery Date: Fri Jun 23 20:49:23 2017 New Revision: 320299 URL: https://svnweb.freebsd.org/changeset/base/320299 Log: MFC r320206,r320207: r320206: Follow-up r308602: Don't add missing headers to .depend.tables.h. r320207: Tweak r320206: Still create the TABLE but not the .depend entry for missing headers. Approved by: re (gjb) Modified: stable/11/lib/libsysdecode/mktables Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libsysdecode/mktables ============================================================================== --- stable/11/lib/libsysdecode/mktables Fri Jun 23 20:38:21 2017 (r320298) +++ stable/11/lib/libsysdecode/mktables Fri Jun 23 20:49:23 2017 (r320299) @@ -65,17 +65,19 @@ gen_table() else filter="egrep -v" fi - all_headers="${all_headers:+${all_headers} }${file}" cat <<_EOF_ TABLE_START(${name}) _EOF_ - egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ - $include_dir/$file | ${filter} ${excl} | \ - awk '{ for (i = 1; i <= NF; i++) \ - if ($i ~ /define/) \ - break; \ - ++i; \ - printf "TABLE_ENTRY(%s)\n", $i }' + if [ -e "${include_dir}/${file}" ]; then + all_headers="${all_headers:+${all_headers} }${file}" + egrep "^#[[:space:]]*define[[:space:]]+"${grep}"[[:space:]]*" \ + $include_dir/$file | ${filter} ${excl} | \ + awk '{ for (i = 1; i <= NF; i++) \ + if ($i ~ /define/) \ + break; \ + ++i; \ + printf "TABLE_ENTRY(%s)\n", $i }' + fi cat <<_EOF_ TABLE_END From owner-svn-src-stable@freebsd.org Sat Jun 24 07:44:06 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9442D99EC0; Sat, 24 Jun 2017 07:44:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 957601301; Sat, 24 Jun 2017 07:44:06 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5O7i5N6087155; Sat, 24 Jun 2017 07:44:05 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5O7i58J087154; Sat, 24 Jun 2017 07:44:05 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706240744.v5O7i58J087154@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 24 Jun 2017 07:44:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320303 - stable/10/usr.sbin/rpc.lockd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 07:44:06 -0000 Author: delphij Date: Sat Jun 24 07:44:05 2017 New Revision: 320303 URL: https://svnweb.freebsd.org/changeset/base/320303 Log: MFC r320183: Reduce code duplication in rpc.lockd. Reuse create_service code instead of duplicating it in lookup_addresses for kernel NLM. As a (good) side effect this also fixed a few issues that were already fixed in the former but never applied to the latter. Reviewed by: kevlo Modified: stable/10/usr.sbin/rpc.lockd/lockd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/rpc.lockd/lockd.c ============================================================================== --- stable/10/usr.sbin/rpc.lockd/lockd.c Sat Jun 24 00:28:35 2017 (r320302) +++ stable/10/usr.sbin/rpc.lockd/lockd.c Sat Jun 24 07:44:05 2017 (r320303) @@ -99,13 +99,12 @@ char localhost[] = "localhost"; static int create_service(struct netconfig *nconf); static void complete_service(struct netconfig *nconf, char *port_str); static void clearout_service(void); -void lookup_addresses(struct netconfig *nconf); +static void out_of_mem(void) __dead2; void init_nsm(void); void nlm_prog_0(struct svc_req *, SVCXPRT *); void nlm_prog_1(struct svc_req *, SVCXPRT *); void nlm_prog_3(struct svc_req *, SVCXPRT *); void nlm_prog_4(struct svc_req *, SVCXPRT *); -void out_of_mem(void); void usage(void); void sigalarm_handler(void); @@ -148,7 +147,6 @@ main(int argc, char **argv) break; case 'h': ++nhosts; - hosts_bak = hosts; hosts_bak = realloc(hosts, nhosts * sizeof(char *)); if (hosts_bak == NULL) { if (hosts != NULL) { @@ -176,7 +174,6 @@ main(int argc, char **argv) svcport_str = strdup(optarg); break; default: - case '?': usage(); /* NOTREACHED */ } @@ -231,7 +228,6 @@ main(int argc, char **argv) hosts[0] = "*"; nhosts = 1; } else { - hosts_bak = hosts; if (have_v6) { hosts_bak = realloc(hosts, (nhosts + 2) * sizeof(char *)); @@ -313,7 +309,7 @@ main(int argc, char **argv) if (have_v6 == 0 && strcmp(nconf->nc_protofmly, "inet6") == 0) { /* DO NOTHING */ } else { - lookup_addresses(nconf); + create_service(nconf); } } } @@ -486,9 +482,14 @@ main(int argc, char **argv) /* * This routine creates and binds sockets on the appropriate - * addresses. It gets called one time for each transport. + * addresses if lockd for user NLM, or perform a lookup of + * addresses for the kernel to create transports. + * + * It gets called one time for each transport. + * * It returns 0 upon success, 1 for ingore the call and -1 to indicate * bind failed with EADDRINUSE. + * * Any file descriptors that have been created are stored in sock_fd and * the total count of them is maintained in sock_fdcnt. */ @@ -532,20 +533,23 @@ create_service(struct netconfig *nconf) nhostsbak = nhosts; while (nhostsbak > 0) { --nhostsbak; - sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); - if (sock_fd == NULL) - out_of_mem(); - sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; hints.ai_flags = AI_PASSIVE; - /* - * XXX - using RPC library internal functions. - */ - if ((fd = __rpc_nconf2fd(nconf)) < 0) { - syslog(LOG_ERR, "cannot create socket for %s", - nconf->nc_netid); - continue; + if (!kernel_lockd) { + sock_fd = realloc(sock_fd, (sock_fdcnt + 1) * sizeof(int)); + if (sock_fd == NULL) + out_of_mem(); + sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ + + /* + * XXX - using RPC library internal functions. + */ + if ((fd = __rpc_nconf2fd(nconf)) < 0) { + syslog(LOG_ERR, "cannot create socket for %s", + nconf->nc_netid); + continue; + } } switch (hints.ai_family) { @@ -559,7 +563,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET6, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -574,7 +579,8 @@ create_service(struct netconfig *nconf) */ if (inet_pton(AF_INET, hosts[nhostsbak], host_addr) == 1) { - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -588,8 +594,7 @@ create_service(struct netconfig *nconf) */ if (strcmp("*", hosts[nhostsbak]) == 0) { if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) + if ((res = malloc(sizeof(struct addrinfo))) == NULL) out_of_mem(); mallocd_res = 1; res->ai_flags = hints.ai_flags; @@ -620,7 +625,7 @@ create_service(struct netconfig *nconf) break; default: syslog(LOG_ERR, - "bad addr fam %d", + "bad address family %d", res->ai_family); exit(1); } @@ -631,7 +636,8 @@ create_service(struct netconfig *nconf) "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } @@ -641,42 +647,62 @@ create_service(struct netconfig *nconf) syslog(LOG_ERR, "cannot get local address for %s: %s", nconf->nc_netid, gai_strerror(aicode)); - close(fd); + if (!kernel_lockd) + close(fd); continue; } } + if (kernel_lockd) { + struct netbuf servaddr; + char *uaddr; - /* Store the fd. */ - sock_fd[sock_fdcnt - 1] = fd; + /* + * Look up addresses for the kernel to create transports for. + */ + servaddr.len = servaddr.maxlen = res->ai_addrlen; + servaddr.buf = res->ai_addr; + uaddr = taddr2uaddr(nconf, &servaddr); - /* Now, attempt the bind. */ - r = bindresvport_sa(fd, res->ai_addr); - if (r != 0) { - if (errno == EADDRINUSE && mallocd_svcport != 0) { - if (mallocd_res != 0) { - free(res->ai_addr); - free(res); - } else - freeaddrinfo(res); - return (-1); + addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); + if (!addrs) + out_of_mem(); + addrs[2 * naddrs] = strdup(nconf->nc_netid); + addrs[2 * naddrs + 1] = uaddr; + naddrs++; + } else { + /* Store the fd. */ + sock_fd[sock_fdcnt - 1] = fd; + + /* Now, attempt the bind. */ + r = bindresvport_sa(fd, res->ai_addr); + if (r != 0) { + if (errno == EADDRINUSE && mallocd_svcport != 0) { + if (mallocd_res != 0) { + free(res->ai_addr); + free(res); + } else + freeaddrinfo(res); + return (-1); + } + syslog(LOG_ERR, "bindresvport_sa: %m"); + exit(1); } - syslog(LOG_ERR, "bindresvport_sa: %m"); - exit(1); - } - if (svcport_str == NULL) { - svcport_str = malloc(NI_MAXSERV * sizeof(char)); - if (svcport_str == NULL) - out_of_mem(); - mallocd_svcport = 1; + if (svcport_str == NULL) { + svcport_str = malloc(NI_MAXSERV * sizeof(char)); + if (svcport_str == NULL) + out_of_mem(); + mallocd_svcport = 1; - if (getnameinfo(res->ai_addr, - res->ai_addr->sa_len, NULL, NI_MAXHOST, - svcport_str, NI_MAXSERV * sizeof(char), - NI_NUMERICHOST | NI_NUMERICSERV)) - errx(1, "Cannot get port number"); + if (getnameinfo(res->ai_addr, + res->ai_addr->sa_len, NULL, NI_MAXHOST, + svcport_str, NI_MAXSERV * sizeof(char), + NI_NUMERICHOST | NI_NUMERICSERV)) + errx(1, "Cannot get port number"); + } } + if (mallocd_res != 0) { free(res->ai_addr); free(res); @@ -807,151 +833,6 @@ clearout_service(void) close(sock_fd[i]); } } -} - -/* - * Look up addresses for the kernel to create transports for. - */ -void -lookup_addresses(struct netconfig *nconf) -{ - struct addrinfo hints, *res = NULL; - struct sockaddr_in *sin; - struct sockaddr_in6 *sin6; - struct __rpc_sockinfo si; - struct netbuf servaddr; - int aicode; - int nhostsbak; - u_int32_t host_addr[4]; /* IPv4 or IPv6 */ - char *uaddr; - - if ((nconf->nc_semantics != NC_TPI_CLTS) && - (nconf->nc_semantics != NC_TPI_COTS) && - (nconf->nc_semantics != NC_TPI_COTS_ORD)) - return; /* not my type */ - - /* - * XXX - using RPC library internal functions. - */ - if (!__rpc_nconf2sockinfo(nconf, &si)) { - syslog(LOG_ERR, "cannot get information for %s", - nconf->nc_netid); - return; - } - - /* Get rpc.statd's address on this transport */ - memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; - hints.ai_family = si.si_af; - hints.ai_socktype = si.si_socktype; - hints.ai_protocol = si.si_proto; - - /* - * Bind to specific IPs if asked to - */ - nhostsbak = nhosts; - while (nhostsbak > 0) { - --nhostsbak; - - switch (hints.ai_family) { - case AF_INET: - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET6 address. - */ - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - case AF_INET6: - if (inet_pton(AF_INET6, hosts[nhostsbak], - host_addr) == 1) { - hints.ai_flags &= AI_NUMERICHOST; - } else { - /* - * Skip if we have an AF_INET address. - */ - if (inet_pton(AF_INET, hosts[nhostsbak], - host_addr) == 1) { - continue; - } - } - break; - default: - break; - } - - /* - * If no hosts were specified, just bind to INADDR_ANY - */ - if (strcmp("*", hosts[nhostsbak]) == 0) { - if (svcport_str == NULL) { - res = malloc(sizeof(struct addrinfo)); - if (res == NULL) - out_of_mem(); - res->ai_flags = hints.ai_flags; - res->ai_family = hints.ai_family; - res->ai_protocol = hints.ai_protocol; - switch (res->ai_family) { - case AF_INET: - sin = malloc(sizeof(struct sockaddr_in)); - if (sin == NULL) - out_of_mem(); - sin->sin_family = AF_INET; - sin->sin_port = htons(0); - sin->sin_addr.s_addr = htonl(INADDR_ANY); - res->ai_addr = (struct sockaddr*) sin; - res->ai_addrlen = sizeof(struct sockaddr_in); - break; - case AF_INET6: - sin6 = malloc(sizeof(struct sockaddr_in6)); - if (sin6 == NULL) - out_of_mem(); - sin6->sin6_family = AF_INET6; - sin6->sin6_port = htons(0); - sin6->sin6_addr = in6addr_any; - res->ai_addr = (struct sockaddr*) sin6; - res->ai_addrlen = sizeof(struct sockaddr_in6); - break; - default: - break; - } - } else { - if ((aicode = getaddrinfo(NULL, svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, - gai_strerror(aicode)); - continue; - } - } - } else { - if ((aicode = getaddrinfo(hosts[nhostsbak], svcport_str, - &hints, &res)) != 0) { - syslog(LOG_ERR, - "cannot get local address for %s: %s", - nconf->nc_netid, gai_strerror(aicode)); - continue; - } - } - - servaddr.len = servaddr.maxlen = res->ai_addrlen; - servaddr.buf = res->ai_addr; - uaddr = taddr2uaddr(nconf, &servaddr); - - addrs = realloc(addrs, 2 * (naddrs + 1) * sizeof(char *)); - if (!addrs) - out_of_mem(); - addrs[2 * naddrs] = strdup(nconf->nc_netid); - addrs[2 * naddrs + 1] = uaddr; - naddrs++; - } /* end while */ } void From owner-svn-src-stable@freebsd.org Sat Jun 24 13:53:49 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57C9CD9F243; Sat, 24 Jun 2017 13:53:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25AD46A77A; Sat, 24 Jun 2017 13:53:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5ODrmG7037450; Sat, 24 Jun 2017 13:53:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5ODrmhP037449; Sat, 24 Jun 2017 13:53:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241353.v5ODrmhP037449@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 13:53:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320309 - stable/11/sys/i386/isa X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 13:53:49 -0000 Author: kib Date: Sat Jun 24 13:53:47 2017 New Revision: 320309 URL: https://svnweb.freebsd.org/changeset/base/320309 Log: MFC r320051: Correct translations between abridged and full x87 tags. Approved by: re (marius) Modified: stable/11/sys/i386/isa/npx.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/i386/isa/npx.c ============================================================================== --- stable/11/sys/i386/isa/npx.c Sat Jun 24 11:38:31 2017 (r320308) +++ stable/11/sys/i386/isa/npx.c Sat Jun 24 13:53:47 2017 (r320309) @@ -1116,7 +1116,7 @@ npx_fill_fpregs_xmm1(struct savexmm *sv_xmm, struct sa sv_87->sv_ac[i] = sv_xmm->sv_fp[i].fp_acc; if ((penv_xmm->en_tw & (1 << i)) != 0) /* zero and special are set as valid */ - penv_87->en_tw &= ~(3 << i); + penv_87->en_tw &= ~(3 << i * 2); } } @@ -1147,11 +1147,16 @@ npx_set_fpregs_xmm(struct save87 *sv_87, struct savexm penv_xmm->en_foo = penv_87->en_foo; penv_xmm->en_fos = penv_87->en_fos; - /* FPU registers and tags */ + /* + * FPU registers and tags. + * Abridged / Full translation (values in binary), see FXSAVE spec. + * 0 11 + * 1 00, 01, 10 + */ penv_xmm->en_tw = 0; for (i = 0; i < 8; ++i) { sv_xmm->sv_fp[i].fp_acc = sv_87->sv_ac[i]; - if ((penv_87->en_tw && (3 << i)) != (3 << i)) + if ((penv_87->en_tw & (3 << i * 2)) != (3 << i * 2)) penv_xmm->en_tw |= 1 << i; } } From owner-svn-src-stable@freebsd.org Sat Jun 24 14:41:59 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 466DBD9FCF9; Sat, 24 Jun 2017 14:41:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22F8D6EA78; Sat, 24 Jun 2017 14:41:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5OEfw63057364; Sat, 24 Jun 2017 14:41:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OEfwsx057363; Sat, 24 Jun 2017 14:41:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241441.v5OEfwsx057363@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 14:41:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r320311 - stable/11/lib/libc/gen X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 14:41:59 -0000 Author: kib Date: Sat Jun 24 14:41:57 2017 New Revision: 320311 URL: https://svnweb.freebsd.org/changeset/base/320311 Log: MFC r320052: Do not leak syslog_mutex on cancellation. Approved by: re (marius) Modified: stable/11/lib/libc/gen/syslog.c Directory Properties: stable/11/ (props changed) Modified: stable/11/lib/libc/gen/syslog.c ============================================================================== --- stable/11/lib/libc/gen/syslog.c Sat Jun 24 14:32:57 2017 (r320310) +++ stable/11/lib/libc/gen/syslog.c Sat Jun 24 14:41:57 2017 (r320311) @@ -129,8 +129,8 @@ syslog(int pri, const char *fmt, ...) va_end(ap); } -void -vsyslog(int pri, const char *fmt, va_list ap) +static void +vsyslog1(int pri, const char *fmt, va_list ap) { int cnt; char ch, *p; @@ -151,13 +151,9 @@ vsyslog(int pri, const char *fmt, va_list ap) saved_errno = errno; - THREAD_LOCK(); - /* Check priority against setlogmask values. */ - if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) { - THREAD_UNLOCK(); + if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) return; - } /* Set default facility if none specified. */ if ((pri & LOG_FACMASK) == 0) @@ -167,10 +163,8 @@ vsyslog(int pri, const char *fmt, va_list ap) tbuf_cookie.base = tbuf; tbuf_cookie.left = sizeof(tbuf); fp = fwopen(&tbuf_cookie, writehook); - if (fp == NULL) { - THREAD_UNLOCK(); + if (fp == NULL) return; - } /* Build the message. */ (void)time(&now); @@ -200,7 +194,6 @@ vsyslog(int pri, const char *fmt, va_list ap) fmt_fp = fwopen(&fmt_cookie, writehook); if (fmt_fp == NULL) { fclose(fp); - THREAD_UNLOCK(); return; } @@ -285,10 +278,8 @@ vsyslog(int pri, const char *fmt, va_list ap) */ disconnectlog(); connectlog(); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } /* * if the resend failed, fall through to * possible scenario 2 @@ -303,15 +294,11 @@ vsyslog(int pri, const char *fmt, va_list ap) if (status == CONNPRIV) break; _usleep(1); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } } - } else { - THREAD_UNLOCK(); + } else return; - } /* * Output the message to the console; try not to block @@ -333,10 +320,25 @@ vsyslog(int pri, const char *fmt, va_list ap) (void)_writev(fd, iov, 2); (void)_close(fd); } +} +static void +syslog_cancel_cleanup(void *arg __unused) +{ + THREAD_UNLOCK(); } +void +vsyslog(int pri, const char *fmt, va_list ap) +{ + + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); + vsyslog1(pri, fmt, ap); + pthread_cleanup_pop(1); +} + /* Should be called with mutex acquired */ static void disconnectlog(void) @@ -423,9 +425,11 @@ openlog_unlocked(const char *ident, int logstat, int l void openlog(const char *ident, int logstat, int logfac) { + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); openlog_unlocked(ident, logstat, logfac); - THREAD_UNLOCK(); + pthread_cleanup_pop(1); } From owner-svn-src-stable@freebsd.org Sat Jun 24 14:45:00 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 48925D9FF03; Sat, 24 Jun 2017 14:45:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2523C6EC61; Sat, 24 Jun 2017 14:45:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5OEix49057542; Sat, 24 Jun 2017 14:44:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5OEixDV057541; Sat, 24 Jun 2017 14:44:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201706241444.v5OEixDV057541@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jun 2017 14:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320312 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jun 2017 14:45:00 -0000 Author: kib Date: Sat Jun 24 14:44:59 2017 New Revision: 320312 URL: https://svnweb.freebsd.org/changeset/base/320312 Log: MFC r320052: Do not leak syslog_mutex on cancellation. Modified: stable/10/lib/libc/gen/syslog.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/syslog.c ============================================================================== --- stable/10/lib/libc/gen/syslog.c Sat Jun 24 14:41:57 2017 (r320311) +++ stable/10/lib/libc/gen/syslog.c Sat Jun 24 14:44:59 2017 (r320312) @@ -129,8 +129,8 @@ syslog(int pri, const char *fmt, ...) va_end(ap); } -void -vsyslog(int pri, const char *fmt, va_list ap) +static void +vsyslog1(int pri, const char *fmt, va_list ap) { int cnt; char ch, *p; @@ -151,13 +151,9 @@ vsyslog(int pri, const char *fmt, va_list ap) saved_errno = errno; - THREAD_LOCK(); - /* Check priority against setlogmask values. */ - if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) { - THREAD_UNLOCK(); + if (!(LOG_MASK(LOG_PRI(pri)) & LogMask)) return; - } /* Set default facility if none specified. */ if ((pri & LOG_FACMASK) == 0) @@ -167,10 +163,8 @@ vsyslog(int pri, const char *fmt, va_list ap) tbuf_cookie.base = tbuf; tbuf_cookie.left = sizeof(tbuf); fp = fwopen(&tbuf_cookie, writehook); - if (fp == NULL) { - THREAD_UNLOCK(); + if (fp == NULL) return; - } /* Build the message. */ (void)time(&now); @@ -200,7 +194,6 @@ vsyslog(int pri, const char *fmt, va_list ap) fmt_fp = fwopen(&fmt_cookie, writehook); if (fmt_fp == NULL) { fclose(fp); - THREAD_UNLOCK(); return; } @@ -285,10 +278,8 @@ vsyslog(int pri, const char *fmt, va_list ap) */ disconnectlog(); connectlog(); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } /* * if the resend failed, fall through to * possible scenario 2 @@ -303,15 +294,11 @@ vsyslog(int pri, const char *fmt, va_list ap) if (status == CONNPRIV) break; _usleep(1); - if (send(LogFile, tbuf, cnt, 0) >= 0) { - THREAD_UNLOCK(); + if (send(LogFile, tbuf, cnt, 0) >= 0) return; - } } - } else { - THREAD_UNLOCK(); + } else return; - } /* * Output the message to the console; try not to block @@ -333,10 +320,25 @@ vsyslog(int pri, const char *fmt, va_list ap) (void)_writev(fd, iov, 2); (void)_close(fd); } +} +static void +syslog_cancel_cleanup(void *arg __unused) +{ + THREAD_UNLOCK(); } +void +vsyslog(int pri, const char *fmt, va_list ap) +{ + + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); + vsyslog1(pri, fmt, ap); + pthread_cleanup_pop(1); +} + /* Should be called with mutex acquired */ static void disconnectlog(void) @@ -423,9 +425,11 @@ openlog_unlocked(const char *ident, int logstat, int l void openlog(const char *ident, int logstat, int logfac) { + THREAD_LOCK(); + pthread_cleanup_push(syslog_cancel_cleanup, NULL); openlog_unlocked(ident, logstat, logfac); - THREAD_UNLOCK(); + pthread_cleanup_pop(1); }