From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 01:25:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2013D6EF; Sun, 22 Mar 2015 01:25:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A73A696; Sun, 22 Mar 2015 01:25:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M1PwI9061292; Sun, 22 Mar 2015 01:25:58 GMT (envelope-from wblock@FreeBSD.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M1Pwvr061291; Sun, 22 Mar 2015 01:25:58 GMT (envelope-from wblock@FreeBSD.org) Message-Id: <201503220125.t2M1Pwvr061291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: wblock set sender to wblock@FreeBSD.org using -f From: Warren Block Date: Sun, 22 Mar 2015 01:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280336 - head/usr.bin/logger X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 01:25:59 -0000 Author: wblock (doc committer) Date: Sun Mar 22 01:25:57 2015 New Revision: 280336 URL: https://svnweb.freebsd.org/changeset/base/280336 Log: Describe the behavior when both -f and a message are given. Pointed out by Raphael Abreu on freebsd-doc. MFC after: 1 week Modified: head/usr.bin/logger/logger.1 Modified: head/usr.bin/logger/logger.1 ============================================================================== --- head/usr.bin/logger/logger.1 Sat Mar 21 23:39:34 2015 (r280335) +++ head/usr.bin/logger/logger.1 Sun Mar 22 01:25:57 2015 (r280336) @@ -28,7 +28,7 @@ .\" @(#)logger.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 4, 2014 +.Dd March 21, 2015 .Dt LOGGER 1 .Os .Sh NAME @@ -75,6 +75,7 @@ with each line. Log the message to standard error, as well as the system log. .It Fl f Ar file Read the contents of the specified file into syslog. +This option is ignored when a message is also specified. .It Fl h Ar host Send the message to the remote system .Ar host From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 02:15:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E5E8DAD; Sun, 22 Mar 2015 02:15:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 580F7AE2; Sun, 22 Mar 2015 02:15:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M2FB72084918; Sun, 22 Mar 2015 02:15:11 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M2FAD9084914; Sun, 22 Mar 2015 02:15:10 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503220215.t2M2FAD9084914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 22 Mar 2015 02:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280337 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 02:15:11 -0000 Author: adrian Date: Sun Mar 22 02:15:09 2015 New Revision: 280337 URL: https://svnweb.freebsd.org/changeset/base/280337 Log: Add initial D-Link DIR-655 (A1) support. This is based on the AP135 design - QCA9558 SoC, 3x3 2GHz wifi, but no 5GHz (11n or 11ac) chip is available. It however still has 128MiB of RAM, 16MiB of NOR flash and the AR8327N gigabit switch - so it's quite a beefy router device. Tested: * Well, a unit, naturally Obtained from: Completely messing up an amazon.com order and getting this instead, and asking "hey, wonder if I could.." Added: head/sys/mips/conf/DIR-655A1 (contents, props changed) head/sys/mips/conf/DIR-655A1.hints (contents, props changed) Added: head/sys/mips/conf/DIR-655A1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/DIR-655A1 Sun Mar 22 02:15:09 2015 (r280337) @@ -0,0 +1,56 @@ +# +# DIR-655A1 - 3x3 2GHz D-Link AP +# +# This contains a QCA9558 MIPS74k SoC with on-board 3x3 2GHz wifi, +# 128MiB RAM, an AR8327 5-port gigabit ethernet switch. +# +# $FreeBSD$ +# + +# Include the default QCA955x parameters +include "QCA955X_BASE" + +ident DIR-655A1 + +# Override hints with board values +hints "DIR-655A1.hints" + +# Force the board memory - the base AP135 has 128MB RAM +options AR71XX_REALMEM=(128*1024*1024) + +# i2c GPIO bus +#device gpioiic +#device iicbb +#device iicbus +#device iic + +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous + +device etherswitch +device arswitch + +# read MSDOS formatted disks - USB +#options MSDOSFS + +# Enable the uboot environment stuff rather then the +# redboot stuff. +options AR71XX_ENV_UBOOT + +# uzip - to boot natively from flash +device geom_uncompress +options GEOM_UNCOMPRESS + +# Used for the static uboot partition map +device geom_map + +options AR71XX_ATH_EEPROM +device firmware # Used by the above +options ATH_EEPROM_FIRMWARE + +# Boot off of the rootfs, as defined in the geom_map setup. +options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" + +# Default to accept +options IPFIREWALL_DEFAULT_TO_ACCEPT Added: head/sys/mips/conf/DIR-655A1.hints ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/conf/DIR-655A1.hints Sun Mar 22 02:15:09 2015 (r280337) @@ -0,0 +1,153 @@ + +# I'm assuming this is an AP135-020. The AP136-010 in openwrt has +# the ethernet ports wired up to the switch in the reverse way. + +# $FreeBSD$ + +# QCA955X_ETH_CFG_RGMII_EN (1 << 0) +hint.qca955x_gmac.0.gmac_cfg=0x1 + +# mdiobus0 on arge0 +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x19000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# mdiobus1 on arge1 - required to bring up arge1? +hint.argemdio.1.at="nexus0" +hint.argemdio.1.maddr=0x1a000000 +hint.argemdio.1.msize=0x1000 +hint.argemdio.1.order=0 + +# AR8327 - connected via mdiobus0 on arge0 +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=0 # definitely not the internal switch! +hint.arswitch.0.is_9340=0 # not the internal switch! +hint.arswitch.0.numphys=5 # all ports are PHYs +hint.arswitch.0.phy4cpu=0 +hint.arswitch.0.is_rgmii=0 # not needed +hint.arswitch.0.is_gmii=0 # not needed + +# This is where it gets a bit odd. port 0 and port 6 are CPU ports. +# The current code only supports one CPU port. So hm, what should +# we do to hook PAD6 up to be RGMII but a PHY, not a MAC? + +# The other trick - how do we get arge1 (hooked up to GMAC0) to work? +# That's currently supposed to be hooked up to CPU port 0. + +# Other AR8327 configuration parameters + +# AP136-020 parameters + +# GMAC0 AR8327 -> GMAC1 (arge1) SoC, SGMII + +# AR8327_PAD_MAC_SGMII +hint.arswitch.0.pad.0.mode=3 +#hint.arswitch.0.pad.0.rxclk_delay_sel=0 +hint.arswitch.0.pad.0.sgmii_delay_en=1 + +# GMAC6 AR8327 -> GMAC0 (arge0) SoC, RGMII + +# AR8327_PAD_MAC_RGMII +# XXX I think this hooks it up to the internal MAC6 +hint.arswitch.0.pad.6.mode=6 +hint.arswitch.0.pad.6.txclk_delay_en=1 +hint.arswitch.0.pad.6.rxclk_delay_en=1 +# AR8327_CLK_DELAY_SEL1 +hint.arswitch.0.pad.6.txclk_delay_sel=1 +# AR8327_CLK_DELAY_SEL2 +hint.arswitch.0.pad.6.rxclk_delay_sel=2 + +# XXX there's no LED management just yet! +hint.arswitch.0.led.ctrl0=0x00000000 +hint.arswitch.0.led.ctrl1=0xc737c737 +hint.arswitch.0.led.ctrl2=0x00000000 +hint.arswitch.0.led.ctrl3=0x00c30c00 +hint.arswitch.0.led.open_drain=1 + +# force_link=1 is required for the rest of the parameters +# to be configured. +hint.arswitch.0.port.0.force_link=1 +hint.arswitch.0.port.0.speed=1000 +hint.arswitch.0.port.0.duplex=1 +hint.arswitch.0.port.0.txpause=1 +hint.arswitch.0.port.0.rxpause=1 + +# force_link=1 is required for the rest of the parameters +# to be configured. +hint.arswitch.0.port.6.force_link=1 +hint.arswitch.0.port.6.speed=1000 +hint.arswitch.0.port.6.duplex=1 +hint.arswitch.0.port.6.txpause=1 +hint.arswitch.0.port.6.rxpause=1 + +# arge0 - hooked up to AR8327 GMAC6, RGMII +# set at 1000/full to the switch. +# so, lock both sides of this connect up to 1000/full; +# if_arge thus wont change the PLL configuration +# upon a link status change. +hint.arge.0.phymask=0x0 +hint.arge.0.miimode=3 # RGMII +hint.arge.0.media=1000 +hint.arge.0.fduplex=1 +hint.arge.0.pll_1000=0x56000000 + +# MAC for arge0 is the first 6 bytes of the ART +hint.arge.0.eeprommac=0x1fff0000 + +# arge1 - lock up to 1000/full +hint.arge.1.phymask=0x0 +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 +hint.arge.1.miimode=5 # SGMII +hint.arge.1.pll_1000=0x03000101 + +# MAC for arge1 is the second 6 bytes of the ART +hint.arge.1.eeprommac=0x1fff0006 + +# ath0: Where the ART is - last 64k in the flash +hint.ath.0.eepromaddr=0x1fff0000 +hint.ath.0.eepromsize=16384 + +# 256KiB u-boot +hint.map.0.at="flash/spi0" +hint.map.0.start=0x00000000 +hint.map.0.end=0x00040000 # 256k u-boot +hint.map.0.name="u-boot" +hint.map.0.readonly=1 + +# kernel +hint.map.1.at="flash/spi0" +hint.map.1.start=0x00040000 +hint.map.1.end="search:0x00040000:0x10000:.!/bin/sh" +hint.map.1.name="kernel" +hint.map.1.readonly=1 + +# rootfs +hint.map.2.at="flash/spi0" +hint.map.2.start="search:0x00040000:0x10000:.!/bin/sh" +hint.map.2.end=0x007d0000 +hint.map.2.name="rootfs" +hint.map.2.readonly=1 + +# 64KiB cfg +hint.map.3.at="flash/spi0" +hint.map.3.start=0x007d0000 +hint.map.3.end=0x007e0000 +hint.map.3.name="cfg" +hint.map.3.readonly=0 + +# 8256 KiB mib0 +hint.map.4.at="flash/spi0" +hint.map.4.start=0x007e0000 +hint.map.4.end=0x00ff0000 # 64k mib0 +hint.map.4.name="mib0" +hint.map.4.readonly=1 + +# 64KiB ART +# XXX TODO: is this really here? +hint.map.5.at="flash/spi0" +hint.map.5.start=0x00ff0000 +hint.map.5.end=0x01000000 # 64k ART +hint.map.5.name="ART" +hint.map.5.readonly=1 From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 05:54:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41A8A347; Sun, 22 Mar 2015 05:54:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CBB582; Sun, 22 Mar 2015 05:54:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M5sn7V085564; Sun, 22 Mar 2015 05:54:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M5snDM085563; Sun, 22 Mar 2015 05:54:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503220554.t2M5snDM085563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Mar 2015 05:54:49 +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: r280338 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 05:54:49 -0000 Author: ngie Date: Sun Mar 22 05:54:48 2015 New Revision: 280338 URL: https://svnweb.freebsd.org/changeset/base/280338 Log: MFC r278888: Some minor style(9) fixes (whitespace + comment) Modified: stable/10/sys/vm/memguard.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/vm/memguard.c ============================================================================== --- stable/10/sys/vm/memguard.c Sun Mar 22 02:15:09 2015 (r280337) +++ stable/10/sys/vm/memguard.c Sun Mar 22 05:54:48 2015 (r280338) @@ -89,9 +89,7 @@ memguard_sysctl_desc(SYSCTL_HANDLER_ARGS return (error); mtx_lock(&malloc_mtx); - /* - * If mtp is NULL, it will be initialized in memguard_cmp(). - */ + /* If mtp is NULL, it will be initialized in memguard_cmp() */ vm_memguard_mtype = malloc_desc2type(desc); strlcpy(vm_memguard_desc, desc, sizeof(vm_memguard_desc)); mtx_unlock(&malloc_mtx); @@ -504,7 +502,7 @@ int memguard_cmp_zone(uma_zone_t zone) { - if ((memguard_options & MG_GUARD_NOFREE) == 0 && + if ((memguard_options & MG_GUARD_NOFREE) == 0 && zone->uz_flags & UMA_ZONE_NOFREE) return (0); From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 06:17:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E3E755B; Sun, 22 Mar 2015 06:17:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 390DC231; Sun, 22 Mar 2015 06:17:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M6HRXx095318; Sun, 22 Mar 2015 06:17:27 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M6HR4N095317; Sun, 22 Mar 2015 06:17:27 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503220617.t2M6HR4N095317@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Mar 2015 06:17:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280339 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 06:17:27 -0000 Author: ngie Date: Sun Mar 22 06:17:26 2015 New Revision: 280339 URL: https://svnweb.freebsd.org/changeset/base/280339 Log: MFstable/10 r279495: MFC r278891: Add the mnt_lockref field to the ddb(4) 'show mount' command Differential Revision: https://reviews.freebsd.org/D1688 Submitted by: Conrad Meyer Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sys/kern/vfs_subr.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_subr.c ============================================================================== --- stable/9/sys/kern/vfs_subr.c Sun Mar 22 05:54:48 2015 (r280338) +++ stable/9/sys/kern/vfs_subr.c Sun Mar 22 06:17:26 2015 (r280339) @@ -3267,6 +3267,7 @@ DB_SHOW_COMMAND(mount, db_show_mount) db_printf(" mnt_maxsymlinklen = %d\n", mp->mnt_maxsymlinklen); db_printf(" mnt_iosize_max = %d\n", mp->mnt_iosize_max); db_printf(" mnt_hashseed = %u\n", mp->mnt_hashseed); + db_printf(" mnt_lockref = %d\n", mp->mnt_lockref); db_printf(" mnt_secondary_writes = %d\n", mp->mnt_secondary_writes); db_printf(" mnt_secondary_accwrites = %d\n", mp->mnt_secondary_accwrites); From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 08:42:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A43F614; Sun, 22 Mar 2015 08:42:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 743F11FB; Sun, 22 Mar 2015 08:42:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M8gjE5063474; Sun, 22 Mar 2015 08:42:45 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M8gj0g063473; Sun, 22 Mar 2015 08:42:45 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503220842.t2M8gj0g063473@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Mar 2015 08:42:45 +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: r280340 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 08:42:45 -0000 Author: ngie Date: Sun Mar 22 08:42:44 2015 New Revision: 280340 URL: https://svnweb.freebsd.org/changeset/base/280340 Log: MFC r279197,r279198: r279197: Parallelize building bootstrap-tools Differential Revision: https://reviews.freebsd.org/D1901 Reviewed by: ian No serious objections from: imp r279198: Fill in missing dependencies for dtrace related tools so the bootstrap-tools compiles properly on older hosts Pointyhat to: me Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Mar 22 06:17:26 2015 (r280339) +++ stable/10/Makefile.inc1 Sun Mar 22 08:42:44 2015 (r280340) @@ -1218,6 +1218,8 @@ legacy: # # bootstrap-tools: Build tools needed for compatibility # +_bt= _bootstrap-tools + .if ${MK_GAMES} != "no" _strfile= games/fortune/strfile .endif @@ -1248,11 +1250,15 @@ _sed= usr.bin/sed .if ${BOOTSTRAPPING} < 1000002 _m4= usr.bin/m4 + +${_bt}-usr.bin/m4: ${_bt}-lib/libohash .endif .if ${BOOTSTRAPPING} < 1000013 _yacc= lib/liby \ usr.bin/yacc + +${_bt}-usr.bin/yacc: ${_bt}-lib/liby .endif .if ${BOOTSTRAPPING} < 1000014 @@ -1262,6 +1268,8 @@ _crunch= usr.sbin/crunch .if ${BOOTSTRAPPING} < 1000026 _nmtree= lib/libnetbsd \ usr.sbin/nmtree + +${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd .endif .if ${BOOTSTRAPPING} < 1000027 @@ -1286,6 +1294,9 @@ _clang_tblgen= \ lib/clang/libllvmtablegen \ usr.bin/clang/tblgen \ usr.bin/clang/clang-tblgen + +${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport +${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport .endif # dtrace tools are required for older bootstrap env and cross-build @@ -1295,6 +1306,9 @@ _clang_tblgen= \ || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge + +${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf +${_bt}-cddl/usr.bin/ctfmerge: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf .endif # Default to building the GPL DTC, but build the BSDL one if users explicitly @@ -1312,6 +1326,9 @@ _kerberos5_bootstrap_tools= \ kerberos5/tools/asn1_compile \ kerberos5/tools/slc \ usr.bin/compile_et + +${_bt}-kerberos5/tools/slc: ${_bt}-kerberos5/lib/libroken +${_bt}-kerberos5/tools/asn1_compile: ${_bt}-kerberos5/lib/libroken .endif .if ${_BOOTSTRAP_MAKEINFO} != "no" @@ -1319,10 +1336,11 @@ _texinfo= gnu/usr.bin/texinfo/libtxi \ gnu/usr.bin/texinfo/makeinfo \ gnu/usr.bin/texinfo/install-info .endif +bootstrap-tools: .PHONY + # Please document (add comment) why something is in 'bootstrap-tools'. # Try to bound the building of the bootstrap-tool to just the # FreeBSD versions that need the tool built at this stage of the build. -bootstrap-tools: .MAKE .for _tool in \ ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ @@ -1350,12 +1368,15 @@ bootstrap-tools: .MAKE ${_nmtree} \ ${_texinfo} \ ${_vtfontcvt} +${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool} && \ ${MAKE} DIRPRFX=${_tool}/ obj && \ ${MAKE} DIRPRFX=${_tool}/ depend && \ ${MAKE} DIRPRFX=${_tool}/ all && \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install + +bootstrap-tools: ${_bt}-${_tool} .endfor # From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 08:47:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD53877B; Sun, 22 Mar 2015 08:47:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97DE3229; Sun, 22 Mar 2015 08:47:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M8laoZ064134; Sun, 22 Mar 2015 08:47:36 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M8la59064133; Sun, 22 Mar 2015 08:47:36 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503220847.t2M8la59064133@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Mar 2015 08:47: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: r280341 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 08:47:36 -0000 Author: ngie Date: Sun Mar 22 08:47:35 2015 New Revision: 280341 URL: https://svnweb.freebsd.org/changeset/base/280341 Log: Remove dependency between usr.bin/m4 and lib/libohash libohash doesn't exist on stable/10 (only head) Not sure why my make buildworld didn't catch any issues This is a direct commit to stable/10 as a followup to r280340 Modified: stable/10/Makefile.inc1 Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Mar 22 08:42:44 2015 (r280340) +++ stable/10/Makefile.inc1 Sun Mar 22 08:47:35 2015 (r280341) @@ -1250,8 +1250,6 @@ _sed= usr.bin/sed .if ${BOOTSTRAPPING} < 1000002 _m4= usr.bin/m4 - -${_bt}-usr.bin/m4: ${_bt}-lib/libohash .endif .if ${BOOTSTRAPPING} < 1000013 From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 09:09:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 83C9ABC4; Sun, 22 Mar 2015 09:09:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E8AF5FE; Sun, 22 Mar 2015 09:09:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M99RYg073624; Sun, 22 Mar 2015 09:09:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M99RXU073623; Sun, 22 Mar 2015 09:09:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503220909.t2M99RXU073623@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 22 Mar 2015 09:09:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280342 - head/sys/fs/msdosfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 09:09:28 -0000 Author: kib Date: Sun Mar 22 09:09:26 2015 New Revision: 280342 URL: https://svnweb.freebsd.org/changeset/base/280342 Log: msdosfs: mark unused compat-mount fields The magic number MSDOSFS_ARGSMAGIC, which used to distinguish "old" vs "new" msdosfs mount arguments, has not been used since 2005; it should just go away now. Likewise, the local-to-Unicode table that changed at the same time is unused. Leave the space reserved in the old style mount arguments, though, since we still support the old mount call (via the cmount entry point). Submitted by: Chris Torek MFC after: 2 weeks Modified: head/sys/fs/msdosfs/msdosfsmount.h Modified: head/sys/fs/msdosfs/msdosfsmount.h ============================================================================== --- head/sys/fs/msdosfs/msdosfsmount.h Sun Mar 22 08:47:35 2015 (r280341) +++ head/sys/fs/msdosfs/msdosfsmount.h Sun Mar 22 09:09:26 2015 (r280342) @@ -239,8 +239,8 @@ struct msdosfs_args { gid_t gid; /* gid that owns msdosfs files */ mode_t mask; /* file mask to be applied for msdosfs perms */ int flags; /* see below */ - int magic; /* version number */ - u_int16_t u2w[128]; /* Local->Unicode table */ + int unused1; /* unused, was version number */ + u_int16_t unused2[128]; /* no longer used, was Local->Unicode table */ char *cs_win; /* Windows(Unicode) Charset */ char *cs_dos; /* DOS Charset */ char *cs_local; /* Local Charset */ @@ -264,6 +264,4 @@ struct msdosfs_args { #define MSDOSFS_LARGEFS 0x10000000 /* perform fileno mapping */ #define MSDOSFS_FSIMOD 0x01000000 -#define MSDOSFS_ARGSMAGIC 0xe4eff300 - #endif /* !_MSDOSFS_MSDOSFSMOUNT_H_ */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 09:12:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3FA8DA8; Sun, 22 Mar 2015 09:12:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDCA66B6; Sun, 22 Mar 2015 09:12:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2M9Cjb0077546; Sun, 22 Mar 2015 09:12:45 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2M9Cj7c077545; Sun, 22 Mar 2015 09:12:45 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503220912.t2M9Cj7c077545@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 22 Mar 2015 09:12:45 +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: r280343 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 09:12:46 -0000 Author: kib Date: Sun Mar 22 09:12:44 2015 New Revision: 280343 URL: https://svnweb.freebsd.org/changeset/base/280343 Log: MFC r280253: Fix syntax error. Modified: stable/10/sys/x86/iommu/intel_reg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_reg.h ============================================================================== --- stable/10/sys/x86/iommu/intel_reg.h Sun Mar 22 09:09:26 2015 (r280342) +++ stable/10/sys/x86/iommu/intel_reg.h Sun Mar 22 09:12:44 2015 (r280343) @@ -103,7 +103,7 @@ typedef struct dmar_irte { #define DMAR_IRTE1_IM_POSTED (1ULL << 15) /* Posted */ /* Delivery Mode */ #define DMAR_IRTE1_DLM_FM (0ULL << 5) -#define DMAR_IRTE1_DLM_LP (1ULL << 5 +#define DMAR_IRTE1_DLM_LP (1ULL << 5) #define DMAR_IRTE1_DLM_SMI (2ULL << 5) #define DMAR_IRTE1_DLM_NMI (4ULL << 5) #define DMAR_IRTE1_DLM_INIT (5ULL << 5) From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 09:33:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19C6739A; Sun, 22 Mar 2015 09:33:03 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 80B178A2; Sun, 22 Mar 2015 09:33:02 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2M9WrU0002285 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 22 Mar 2015 11:32:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2M9WrU0002285 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2M9Wpne002284; Sun, 22 Mar 2015 11:32:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Mar 2015 11:32:51 +0200 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r280279 - head/sys/sys Message-ID: <20150322093251.GY2379@kib.kiev.ua> References: <201503201027.t2KAR6Ze053047@svn.freebsd.org> <20150320130216.GS2379@kib.kiev.ua> <550D9699.7070703@FreeBSD.org> <20150321163536.GK2379@kib.kiev.ua> <550DA656.5060004@FreeBSD.org> <20150322080015.O955@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150322080015.O955@besplex.bde.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 09:33:03 -0000 On Sun, Mar 22, 2015 at 09:41:53AM +1100, Bruce Evans wrote: > On Sat, 21 Mar 2015, John Baldwin wrote: > > > On 3/21/15 12:35 PM, Konstantin Belousov wrote: > X static int > X popcnt_pc_map_elem(uint64_t elem) > X { > X int count; > X > X /* > X * This simple method of counting the one bits performs well because > X * the given element typically contains more zero bits than one bits. > X */ > X count = 0; > X for (; elem != 0; elem &= elem - 1) > X count++; > X return (count); > X } > ... > > Perhaps this appeared to perform well not for the reason stated in its > comment, but because it was tested with excessive CFLAGS, and the compiler > actually reduced it to popcntq, and the test machine didn't have the > bug. No, it probably did not, since popcntq does not exist on the generic amd64 machine. > > In a game program that I wrote, efficiency of popcount() was actually > important since it was used in inner loops. I used lookup tables for > popcount() and a couple of application-specific functions and even for > fls(). This seemed to be better than the the existing bsf instruction, > so it can't be bad for popcount(). The lookup was limited to bitsets > of length 13 in the low bits of an int, so the table sizes were only > 2**13 = 4096. bitsets of length 64 would need multiple steps. However, > if the above performs well without compiler optimizations, then it must > be because usually only the lowest few bits are set. Then it would > perform even better with even smaller (8-bit) tables combined with an > early exit: > > count = 0; > for (; elem != 0; elem >>= 8) > count += lookup[elem &0xff]; > return (count); > > Many variations on this are possible. E.g., use fls() to decide where to > start; or avoid all branches, and add up the results in parallel. For > bitcount32, the latter is: > > bitcount64(x) := bitcount32(x & 0xffffffff) + bitcount32(x >> 32); > bitcount32(x) := bitcount16(x & 0xffff) + bitcount16(x >> 16); > bitcount16(x) := bitcount8(x & 0xff) + bitcount8(x >> 8); > bitcount8(x) := lookup[x]; > > Compilers won't be able to optimize the lookup methods. They might be > able to convert the current bitcount*() to popcnt*. Last time I looked, > clang but not gcc converted very complicated expressions for bswap*() > to bswap* instructions. > > >>> There's no way we can preemptively locate every bit of C that clang might > >>> decide to replace with popcount and fix them to employ a workaround. I think > >>> the only viable solution is to use "-mno-popcount" on all compilers that aren't > >>> known to be fixed. > > Why bother? It is only a short-lived and small(?) efficiency bug. > > >> Both you and Bruce and Jilles state this, but I am unable to understand the > >> argument about the compiler. Can somebody explain this to me, please ? > > It is also to avoid complications for short-lived optimizations. The > 3 uses of popcntq() in amd64 pmap cost: > - 9 lines of inline asm. > - 19 lines for the C version > - 9 lines instead of 3 for the 3 uses > When popcntq is not available, the result is a pessimization since the > optimizations are not complicated enough to be useful in that case. popcnt is not available for machines older than Nehalems. Nobody cares about the last bits of the speed for such CPUs. > They give the runtime overhead of a branch to call the C version that > is presumably worse than using the existing bitcount32() (possibly > twice) or the compiler builtin. > (jhb's cleanups didn't bother to optimize to use the builtin in > all cases, since it is hard to tell if the builtin is any good if > it is in software. If you remove the 19 lines for > popcnt_pc_map_elem() and and replace calls to it by __builtin_popcountl(), > then the results would be: > - compile-time failure for old unsupported compilers that don't have this > builtin > - usually, a link-time failure for gcc-4.2 through gcc-4.8. gcc > generates a call to __popcountdi2 unless CFLAGS enables the hardware > instruction. __popcountdi2 is in libgcc but not in libkern. > - usually, 3 inline copies of the same code that would be produced if > FreeBSD's bitcount64() were used for clang. clang unrolls things > excessively, giving enormous code. Unrolling allows it to load the > large constants in __bitcount64() only once, but large code is still > needed to use these constants. > - runtime failures in misconfigured cases where CFLAGS doesn't match > the hardware. Both gcc-4.8 and clang produce popcntq. The runtime > check doesn't help since the compilers produce popcntq for the C > case. Using __builtin_popcountl() asks for this directly. Using > __bitcount64() asks for it indirectly, and gets it for clang. > Using popcnt_pc_map_elem() may avoid getting it for clang, but > apparentely still gets it.) > When popcntq is available, the test to decide whether to use it is a > small pessimization. It might take longer than a branch-free software > method. This is unlikely since there are 3 popcounts per test. Yes, modulo the excessive dependency CPU bug. > > > If you compile with -mpopcount (or a march that includes it like -march=corei7) > > then the compiler will assume that popcount is available and will use it without > > doing any runtime checks. In the case of my sandybridge desktop, I have > > CPUTYPE set to "corei7-avx" in /etc/make.conf which adds "-march=corei7-avx" > > to CFLAGS, so the compiler assumes it can use POPCOUNT (as well as newer > > SSE and AVX). In this case the compiler recognized the pattern in the C > > function above as doing a population count and replaced the entire function with > > a POPCOUNT instruction even though the C code doesn't explicitly try to use it. > > The runtime error for the unsupported instruction is probably not important, > since using misconfigured CFLAGS asks for problems. In general, any new > instruction may trap, and the mismatch must be small for only popcntq to > trap. Most new instructions are in AVX or similar extensions, which are disabled for kernel. popcnt is one of the few useful instruction set addition for the general purpose algorithms, probably the only other exception is rdrand. > I think the runtime slowness from a buggy instruction is also unimportant. > ^^^^^ This and this: > > Always using new API would lose the micro-optimizations given by the runtime > decision for default CFLAGS (used by distributions for portability). To > keep them, it seems best to keep the inline asm but replace > popcnt_pc_map_elem(elem) by __bitcount64(elem). -mno-popcount can then > be used to work around slowness in the software (that is actually > hardware) case. So anybody has to compile his own kernel to get popcnt optimization ? We do care about trivial things that improve time. BTW, I have the following WIP change, which popcnt xorl is a piece of. It emulates the ifuncs with some preprocessing mess. It is much better than runtime patching, and is a prerequisite to properly support more things, like SMAP. I did not published it earlier, since I wanted to convert TLB flush code to this. This can be converted even more to emulate the real ifuncs, by grouping the real function' selection code into the method which is initially stored in the _selector. I tried this, but IMO without linker support, it results in more clutter without a gain. diff --git a/sys/amd64/amd64/fpu.c b/sys/amd64/amd64/fpu.c index f30c073..135cb85 100644 --- a/sys/amd64/amd64/fpu.c +++ b/sys/amd64/amd64/fpu.c @@ -59,6 +59,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* * Floating point support. @@ -149,24 +150,35 @@ struct xsave_area_elm_descr { u_int size; } *xsave_area_desc; -void -fpusave(void *addr) +DEFINE_STATIC_IFUNC(void, fpusave, (void *)); +DEFINE_STATIC_IFUNC(void, fpurestore, (void *)); + +static void +fpusave_xsave(void *addr) { - if (use_xsave) - xsave((char *)addr, xsave_mask); - else - fxsave((char *)addr); + xsave((char *)addr, xsave_mask); } -void -fpurestore(void *addr) +static void +fpurestore_xrstor(void *addr) { - if (use_xsave) - xrstor((char *)addr, xsave_mask); - else - fxrstor((char *)addr); + xrstor((char *)addr, xsave_mask); +} + +static void +fpusave_fxsave(void *addr) +{ + + fxsave((char *)addr); +} + +static void +fpurestore_fxrstor(void *addr) +{ + + fxrstor((char *)addr); } void @@ -208,8 +220,14 @@ fpuinit_bsp1(void) use_xsave = 1; TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); } - if (!use_xsave) + if (!use_xsave) { + fpusave_selector = fpusave_fxsave; + fpurestore_selector = fpurestore_fxrstor; return; + } + + fpusave_selector = fpusave_xsave; + fpurestore_selector = fpurestore_xrstor; cpuid_count(0xd, 0x0, cp); xsave_mask = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 6a4077c..f6fbc33 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -138,6 +138,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -404,6 +405,9 @@ SYSCTL_PROC(_vm_pmap, OID_AUTO, pcid_save_cnt, CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, NULL, 0, pmap_pcid_save_cnt_proc, "QU", "Count of saved TLB context on switch"); +DEFINE_GLOBAL_IFUNC(void, pmap_invalidate_cache_range, + (vm_offset_t sva, vm_offset_t eva)); + /* * Crashdump maps. */ @@ -413,6 +417,7 @@ static void free_pv_chunk(struct pv_chunk *pc); static void free_pv_entry(pmap_t pmap, pv_entry_t pv); static pv_entry_t get_pv_entry(pmap_t pmap, struct rwlock **lockp); static int popcnt_pc_map_elem(uint64_t elem); +static int popcnt_pc_map_elem_pq(uint64_t elem); static vm_page_t reclaim_pv_chunk(pmap_t locked_pmap, struct rwlock **lockp); static void reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp); @@ -438,6 +443,10 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte, struct rwlock **lockp); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, + vm_offset_t eva); +static void pmap_invalidate_cache_range_all(vm_offset_t sva, + vm_offset_t eva); static void pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode); static vm_page_t pmap_lookup_pt_page(pmap_t pmap, vm_offset_t va); static void pmap_pde_attr(pd_entry_t *pde, int cache_bits, int mask); @@ -854,6 +863,16 @@ pmap_bootstrap(vm_paddr_t *firstaddr) if (cpu_stdext_feature & CPUID_STDEXT_SMEP) load_cr4(rcr4() | CR4_SMEP); + if ((cpu_feature & CPUID_SS) != 0) + pmap_invalidate_cache_range_selector = + pmap_invalidate_cache_range_selfsnoop; + else if ((cpu_feature & CPUID_CLFSH) != 0) + pmap_invalidate_cache_range_selector = + pmap_force_invalidate_cache_range; + else + pmap_invalidate_cache_range_selector = + pmap_invalidate_cache_range_all; + /* * Initialize the kernel pmap (which is statically allocated). */ @@ -1729,24 +1748,22 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) -void -pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force) +static void +pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, vm_offset_t eva) { - if (force) { - sva &= ~(vm_offset_t)cpu_clflush_line_size; - } else { - KASSERT((sva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: sva not page-aligned")); - KASSERT((eva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: eva not page-aligned")); - } + KASSERT((sva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: sva not page-aligned")); + KASSERT((eva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: eva not page-aligned")); +} - if ((cpu_feature & CPUID_SS) != 0 && !force) - ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_feature & CPUID_CLFSH) != 0 && - eva - sva < PMAP_CLFLUSH_THRESHOLD) { +void +pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) +{ + sva &= ~(vm_offset_t)cpu_clflush_line_size; + if (eva - sva < PMAP_CLFLUSH_THRESHOLD) { /* * XXX: Some CPUs fault, hang, or trash the local APIC * registers if we use CLFLUSH on the local APIC @@ -1768,16 +1785,22 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force) clflush(sva); mfence(); } else { - /* - * No targeted cache flush methods are supported by CPU, - * or the supplied range is bigger than 2MB. + * The supplied range is bigger than 2MB. * Globally invalidate cache. */ pmap_invalidate_cache(); } } +static void +pmap_invalidate_cache_range_all(vm_offset_t sva, vm_offset_t eva) +{ + + pmap_invalidate_cache_range_selfsnoop(sva, eva); + pmap_invalidate_cache(); +} + /* * Remove the specified set of pages from the data and instruction caches. * @@ -2997,6 +3020,29 @@ popcnt_pc_map_elem(uint64_t elem) } /* + * The erratas for Intel processors state that "POPCNT Instruction May + * Take Longer to Execute Than Expected". It is believed that the + * issue is the spurious dependency on the destination register. + * Provide a hint to the register rename logic that the destination + * value is overwritten, by clearing it, as suggested in the + * optimization manual. It should be cheap for unaffected processors + * as well. + * + * Reference numbers for erratas are + * 4th Gen Core: HSD146 + * 5th Gen Core: BDM85 + */ +static int +popcnt_pc_map_elem_pq(uint64_t elem) +{ + u_long result; + + __asm __volatile("xorl %k0,%k0;popcntq %1,%0" + : "=&r" (result) : "rm" (elem)); + return (result); +} + +/* * Ensure that the number of spare PV entries in the specified pmap meets or * exceeds the given count, "needed". * @@ -3029,9 +3075,9 @@ retry: free += popcnt_pc_map_elem(pc->pc_map[1]); free += popcnt_pc_map_elem(pc->pc_map[2]); } else { - free = popcntq(pc->pc_map[0]); - free += popcntq(pc->pc_map[1]); - free += popcntq(pc->pc_map[2]); + free = popcnt_pc_map_elem_pq(pc->pc_map[0]); + free += popcnt_pc_map_elem_pq(pc->pc_map[1]); + free += popcnt_pc_map_elem_pq(pc->pc_map[2]); } if (free == 0) break; @@ -6204,7 +6250,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mode) for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE) pmap_kenter_attr(va + tmpsize, pa + tmpsize, mode); pmap_invalidate_range(kernel_pmap, va, va + tmpsize); - pmap_invalidate_cache_range(va, va + tmpsize, FALSE); + pmap_invalidate_cache_range(va, va + tmpsize); return ((void *)(va + offset)); } @@ -6540,7 +6586,7 @@ pmap_change_attr_locked(vm_offset_t va, vm_size_t size, int mode) */ if (changed) { pmap_invalidate_range(kernel_pmap, base, tmpva); - pmap_invalidate_cache_range(base, tmpva, FALSE); + pmap_invalidate_cache_range(base, tmpva); } return (error); } diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 868db7d..79a0b32 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -394,8 +394,8 @@ void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); void pmap_invalidate_cache_pages(vm_page_t *pages, int count); -void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, - boolean_t force); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); +void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); void pmap_get_mapping(pmap_t pmap, vm_offset_t va, uint64_t *ptr, int *num); boolean_t pmap_map_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); void pmap_unmap_io_transient(vm_page_t *, vm_offset_t *, int, boolean_t); diff --git a/sys/dev/drm2/i915/intel_ringbuffer.c b/sys/dev/drm2/i915/intel_ringbuffer.c index 2251220..6eb1d85 100644 --- a/sys/dev/drm2/i915/intel_ringbuffer.c +++ b/sys/dev/drm2/i915/intel_ringbuffer.c @@ -384,8 +384,8 @@ init_pipe_control(struct intel_ring_buffer *ring) if (pc->cpu_page == NULL) goto err_unpin; pmap_qenter((uintptr_t)pc->cpu_page, &obj->pages[0], 1); - pmap_invalidate_cache_range((vm_offset_t)pc->cpu_page, - (vm_offset_t)pc->cpu_page + PAGE_SIZE, FALSE); + pmap_force_invalidate_cache_range((vm_offset_t)pc->cpu_page, + (vm_offset_t)pc->cpu_page + PAGE_SIZE); pc->obj = obj; ring->private = pc; @@ -968,8 +968,9 @@ static int init_status_page(struct intel_ring_buffer *ring) } pmap_qenter((vm_offset_t)ring->status_page.page_addr, &obj->pages[0], 1); - pmap_invalidate_cache_range((vm_offset_t)ring->status_page.page_addr, - (vm_offset_t)ring->status_page.page_addr + PAGE_SIZE, FALSE); + pmap_force_invalidate_cache_range( + (vm_offset_t)ring->status_page.page_addr, + (vm_offset_t)ring->status_page.page_addr + PAGE_SIZE); ring->status_page.obj = obj; memset(ring->status_page.page_addr, 0, PAGE_SIZE); diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 68b44e9..58db621 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -143,6 +143,7 @@ __FBSDID("$FreeBSD$"); #include #include #endif +#include #include #include #include @@ -263,6 +264,9 @@ caddr_t ptvmmap = 0; caddr_t CADDR3; struct msgbuf *msgbufp = 0; +DEFINE_GLOBAL_IFUNC(void, pmap_invalidate_cache_range, + (vm_offset_t sva, vm_offset_t eva)); + /* * Crashdump maps. */ @@ -305,6 +309,10 @@ static vm_page_t pmap_enter_quick_locked(pmap_t pmap, vm_offset_t va, vm_page_t m, vm_prot_t prot, vm_page_t mpte); static void pmap_flush_page(vm_page_t m); static int pmap_insert_pt_page(pmap_t pmap, vm_page_t mpte); +static void pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, + vm_offset_t eva); +static void pmap_invalidate_cache_range_all(vm_offset_t sva, + vm_offset_t eva); static void pmap_fill_ptp(pt_entry_t *firstpte, pt_entry_t newpte); static boolean_t pmap_is_modified_pvh(struct md_page *pvh); static boolean_t pmap_is_referenced_pvh(struct md_page *pvh); @@ -509,6 +517,16 @@ pmap_bootstrap(vm_paddr_t firstaddr) /* Turn on PG_G on kernel page(s) */ pmap_set_pg(); + + if ((cpu_feature & CPUID_SS) != 0) + pmap_invalidate_cache_range_selector = + pmap_invalidate_cache_range_selfsnoop; + else if ((cpu_feature & CPUID_CLFSH) != 0) + pmap_invalidate_cache_range_selector = + pmap_force_invalidate_cache_range; + else + pmap_invalidate_cache_range_selector = + pmap_invalidate_cache_range_all; } /* @@ -1182,25 +1200,22 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) #define PMAP_CLFLUSH_THRESHOLD (2 * 1024 * 1024) -void -pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force) +static void +pmap_invalidate_cache_range_selfsnoop(vm_offset_t sva, vm_offset_t eva) { - if (force) { - sva &= ~(vm_offset_t)cpu_clflush_line_size; - } else { - KASSERT((sva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: sva not page-aligned")); - KASSERT((eva & PAGE_MASK) == 0, - ("pmap_invalidate_cache_range: eva not page-aligned")); - } + KASSERT((sva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: sva not page-aligned")); + KASSERT((eva & PAGE_MASK) == 0, + ("pmap_invalidate_cache_range: eva not page-aligned")); +} - if ((cpu_feature & CPUID_SS) != 0 && !force) - ; /* If "Self Snoop" is supported and allowed, do nothing. */ - else if ((cpu_feature & CPUID_CLFSH) != 0 && - eva - sva < PMAP_CLFLUSH_THRESHOLD) { +void +pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva) +{ -#ifdef DEV_APIC + sva &= ~(vm_offset_t)cpu_clflush_line_size; + if (eva - sva < PMAP_CLFLUSH_THRESHOLD) { /* * XXX: Some CPUs fault, hang, or trash the local APIC * registers if we use CLFLUSH on the local APIC @@ -1209,7 +1224,7 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force) */ if (pmap_kextract(sva) == lapic_paddr) return; -#endif + /* * Otherwise, do per-cache line flush. Use the mfence * instruction to insure that previous stores are @@ -1222,16 +1237,22 @@ pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, boolean_t force) clflush(sva); mfence(); } else { - /* - * No targeted cache flush methods are supported by CPU, - * or the supplied range is bigger than 2MB. + * The supplied range is bigger than 2MB. * Globally invalidate cache. */ pmap_invalidate_cache(); } } +static void +pmap_invalidate_cache_range_all(vm_offset_t sva, vm_offset_t eva) +{ + + pmap_invalidate_cache_range_selfsnoop(sva, eva); + pmap_invalidate_cache(); +} + void pmap_invalidate_cache_pages(vm_page_t *pages, int count) { @@ -5179,7 +5200,7 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_t size, int mode) for (tmpsize = 0; tmpsize < size; tmpsize += PAGE_SIZE) pmap_kenter_attr(va + tmpsize, pa + tmpsize, mode); pmap_invalidate_range(kernel_pmap, va, va + tmpsize); - pmap_invalidate_cache_range(va, va + size, FALSE); + pmap_invalidate_cache_range(va, va + size); return ((void *)(va + offset)); } @@ -5385,7 +5406,7 @@ pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) */ if (changed) { pmap_invalidate_range(kernel_pmap, base, tmpva); - pmap_invalidate_cache_range(base, tmpva, FALSE); + pmap_invalidate_cache_range(base, tmpva); } return (0); } diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index ebd177a..a9e1bfe 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -876,7 +876,7 @@ sf_buf_invalidate(struct sf_buf *sf) * settings are recalculated. */ pmap_qenter(sf->kva, &m, 1); - pmap_invalidate_cache_range(sf->kva, sf->kva + PAGE_SIZE, FALSE); + pmap_invalidate_cache_range(sf->kva, sf->kva + PAGE_SIZE); } /* diff --git a/sys/i386/include/pmap.h b/sys/i386/include/pmap.h index 05656cd..936c930 100644 --- a/sys/i386/include/pmap.h +++ b/sys/i386/include/pmap.h @@ -458,8 +458,8 @@ void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); void pmap_invalidate_all(pmap_t); void pmap_invalidate_cache(void); void pmap_invalidate_cache_pages(vm_page_t *pages, int count); -void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva, - boolean_t force); +void pmap_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); +void pmap_force_invalidate_cache_range(vm_offset_t sva, vm_offset_t eva); #endif /* _KERNEL */ diff --git a/sys/i386/isa/npx.c b/sys/i386/isa/npx.c index b0ea4e7..1dc9c3d 100644 --- a/sys/i386/isa/npx.c +++ b/sys/i386/isa/npx.c @@ -67,6 +67,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef XEN @@ -211,7 +212,6 @@ CTASSERT(X86_XSTATE_XCR0_OFFSET >= offsetof(struct savexmm, sv_pad) && static void fpu_clean_state(void); #endif -static void fpusave(union savefpu *); static void fpurstor(union savefpu *); int hw_float; @@ -231,8 +231,6 @@ struct xsave_area_elm_descr { u_int offset; u_int size; } *xsave_area_desc; - -static int use_xsaveopt; #endif static volatile u_int npx_traps_while_probing; @@ -349,7 +347,37 @@ cleanup: return (hw_float); } -#ifdef CPU_ENABLE_SSE +DEFINE_STATIC_IFUNC(void, npxsave_core, (union savefpu *)); +DEFINE_STATIC_IFUNC(void, fpusave, (union savefpu *)); + +static void +npxsave_xsaveopt(union savefpu *addr) +{ + + xsaveopt((char *)addr, xsave_mask); +} + +static void +fpusave_xsave(union savefpu *addr) +{ + + xsave((char *)addr, xsave_mask); +} + +static void +fpusave_fxsave(union savefpu *addr) +{ + + fxsave((char *)addr); +} + +static void +fpusave_fnsave(union savefpu *addr) +{ + + fnsave((char *)addr); +} + /* * Enable XSAVE if supported and allowed by user. * Calculate the xsave_mask. @@ -357,6 +385,7 @@ cleanup: static void npxinit_bsp1(void) { +#ifdef CPU_ENABLE_SSE u_int cp[4]; uint64_t xsave_mask_user; @@ -364,8 +393,18 @@ npxinit_bsp1(void) use_xsave = 1; TUNABLE_INT_FETCH("hw.use_xsave", &use_xsave); } - if (!use_xsave) + if (!use_xsave) { + if (cpu_fxsr) { + npxsave_core_selector = fpusave_fxsave; + fpusave_selector = fpusave_fxsave; + } else { +#endif + npxsave_core_selector = fpusave_fnsave; + fpusave_selector = fpusave_fnsave; +#ifdef CPU_ENABLE_SSE + } return; + } cpuid_count(0xd, 0x0, cp); xsave_mask = XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE; @@ -382,12 +421,13 @@ npxinit_bsp1(void) xsave_mask &= ~XFEATURE_MPX; cpuid_count(0xd, 0x1, cp); - if ((cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0) - use_xsaveopt = 1; -} + npxsave_core_selector = (cp[0] & CPUID_EXTSTATE_XSAVEOPT) != 0 ? + npxsave_xsaveopt : fpusave_xsave; + fpusave_selector = fpusave_xsave; #endif -/* +} +/* * Calculate the fpu save area size. */ static void @@ -426,9 +466,7 @@ npxinit(bool bsp) if (bsp) { if (!npx_probe()) return; -#ifdef CPU_ENABLE_SSE npxinit_bsp1(); -#endif } #ifdef CPU_ENABLE_SSE @@ -917,17 +955,11 @@ npxdna(void) * npxsave() atomically with checking fpcurthread. */ void -npxsave(addr) - union savefpu *addr; +npxsave(union savefpu *addr) { stop_emulating(); -#ifdef CPU_ENABLE_SSE - if (use_xsaveopt) - xsaveopt((char *)addr, xsave_mask); - else -#endif - fpusave(addr); + npxsave_core(addr); start_emulating(); PCPU_SET(fpcurthread, NULL); } @@ -1153,21 +1185,6 @@ npxsetregs(struct thread *td, union savefpu *addr, char *xfpustate, return (0); } -static void -fpusave(addr) - union savefpu *addr; -{ - -#ifdef CPU_ENABLE_SSE - if (use_xsave) - xsave((char *)addr, xsave_mask); - else if (cpu_fxsr) - fxsave(addr); - else -#endif - fnsave(addr); -} - #ifdef CPU_ENABLE_SSE /* * On AuthenticAMD processors, the fxrstor instruction does not restore diff --git a/sys/x86/include/ifunc.h b/sys/x86/include/ifunc.h new file mode 100644 index 0000000..a708104 --- /dev/null +++ b/sys/x86/include/ifunc.h @@ -0,0 +1,53 @@ +/*- + * Copyright (c) 2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef __X86_IFUNC_H +#define __X86_IFUNC_H + +#define DECLARE_IFUNC(ret_type, name, args) \ +ret_type name args + +#define DEFINE_IFUNC(scope, selector_qual, ret_type, name, args) \ +__asm__ (scope "\t" #name "\n" \ + "\t.type\t" #name ",@function\n" \ + #name ":\n" \ + "\tjmp *" #name "_selector\n" \ + "\t.size\t" #name ",\t. - "#name); \ +selector_qual ret_type (*name##_selector)args __used; \ +DECLARE_IFUNC(ret_type, name, args) + +#define DEFINE_STATIC_IFUNC(ret_type, name, args) \ + DEFINE_IFUNC(".local", static, ret_type, name, args) + +#define DEFINE_GLOBAL_IFUNC(ret_type, name, args) \ + DEFINE_IFUNC(".globl", , ret_type, name, args) + +#endif diff --git a/sys/x86/iommu/intel_utils.c b/sys/x86/iommu/intel_utils.c index f696f9d..1c96191 100644 --- a/sys/x86/iommu/intel_utils.c +++ b/sys/x86/iommu/intel_utils.c @@ -374,8 +374,7 @@ dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) * If DMAR does not snoop paging structures accesses, flush * CPU cache to memory. */ - pmap_invalidate_cache_range((uintptr_t)dst, (uintptr_t)dst + sz, - TRUE); + pmap_force_invalidate_cache_range((uintptr_t)dst, (uintptr_t)dst + sz); } void From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 10:08:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id AF905C8B; Sun, 22 Mar 2015 10:08:34 +0000 (UTC) Date: Sun, 22 Mar 2015 10:08:34 +0000 From: Alexey Dokuchaev To: Adrian Chadd Subject: Re: svn commit: r280337 - head/sys/mips/conf Message-ID: <20150322100834.GA88392@FreeBSD.org> References: <201503220215.t2M2FAD9084914@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503220215.t2M2FAD9084914@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 10:08:34 -0000 On Sun, Mar 22, 2015 at 02:15:10AM +0000, Adrian Chadd wrote: > New Revision: 280337 > URL: https://svnweb.freebsd.org/changeset/base/280337 > > Log: > Add initial D-Link DIR-655 (A1) support. > > This is based on the AP135 design - QCA9558 SoC, 3x3 2GHz wifi, but no > 5GHz (11n or 11ac) chip is available. > > It however still has 128MiB of RAM, 16MiB of NOR flash and the AR8327N > gigabit switch - so it's quite a beefy router device. Thanks for working on those guys Adrian! I've always avoided these type of "small box" routers: few years ago their CPU would typically not being able to saturate even 100Mbit/s; recently they became powerful enough, but having to run OpenWRT made me always prefer to fetch some Mendocino-based board from the back-yard junk and install FreeBSD to get a decent router. Good to know that soon I could simply get one of those small, fanless Gbit Chinese switches instead (and I'd probably run out of Mendocinos anyways by that time :-). ./danfe From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 12:11:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4166D65; Sun, 22 Mar 2015 12:11:42 +0000 (UTC) Received: from woozle.rinet.ru (woozle.rinet.ru [195.54.192.68]) (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 3FC47930; Sun, 22 Mar 2015 12:11:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by woozle.rinet.ru (8.14.5/8.14.5) with ESMTP id t2MCBK4M072994; Sun, 22 Mar 2015 15:11:20 +0300 (MSK) (envelope-from marck@rinet.ru) Date: Sun, 22 Mar 2015 15:11:20 +0300 (MSK) From: Dmitry Morozovsky To: Konstantin Belousov Subject: Re: svn commit: r280323 - head/sys/kern In-Reply-To: <20150321212416.GU2379@kib.kiev.ua> Message-ID: References: <201503211501.t2LF1Kj8052521@svn.freebsd.org> <20150321210341.GC15857@lonesome.com> <20150321210810.GT2379@kib.kiev.ua> <20150321212416.GU2379@kib.kiev.ua> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-NCC-RegID: ru.rinet X-OpenPGP-Key-ID: 6B691B03 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (woozle.rinet.ru [0.0.0.0]); Sun, 22 Mar 2015 15:11:20 +0300 (MSK) Cc: svn-src-head@freebsd.org, Mark Linimon , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 12:11:42 -0000 On Sat, 21 Mar 2015, Konstantin Belousov wrote: > > > > > Somewhat modernize the SysV shm code: > > > > > > > > Is my understanding correct that postgres still uses shm? If so, > > > > has someone benchmarked the speedup? > > > > > > Yes, some versions of Postgres still use SysV shm. > > > > To be clarified: IIUC, *all* contemporary versions of PostgreSQL do > > use SHM for shatrd buffers (as PgSQL use process-per-connection model) > > No. Recent versions use mmaped shared region for buffers. Yes, starting from 9.3 main buffers are memory-mapped. SysV SHM and Semaphores *are* still in use though. (mainly for search engines) Thanks for the clarification. -- Sincerely, D.Marck [DM5020, MCK-RIPE, DM3-RIPN] [ FreeBSD committer: marck@FreeBSD.org ] ------------------------------------------------------------------------ *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** ------------------------------------------------------------------------ From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 12:50:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B9A5422; Sun, 22 Mar 2015 12:50:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 730ADC34; Sun, 22 Mar 2015 12:50:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MCo0je076312; Sun, 22 Mar 2015 12:50:00 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MCnwqI076260; Sun, 22 Mar 2015 12:49:58 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201503221249.t2MCnwqI076260@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 22 Mar 2015 12:49:58 +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: r280344 - stable/10/usr.bin/procstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 12:50:00 -0000 Author: scottl Date: Sun Mar 22 12:49:57 2015 New Revision: 280344 URL: https://svnweb.freebsd.org/changeset/base/280344 Log: MFC r279842, r279875 Implement basic reporting of cpuset info via the -S option Obtained from: Netflix, Inc. Added: stable/10/usr.bin/procstat/procstat_cs.c - copied unchanged from r279842, head/usr.bin/procstat/procstat_cs.c Modified: stable/10/usr.bin/procstat/Makefile stable/10/usr.bin/procstat/procstat.1 stable/10/usr.bin/procstat/procstat.c stable/10/usr.bin/procstat/procstat.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/procstat/Makefile ============================================================================== --- stable/10/usr.bin/procstat/Makefile Sun Mar 22 09:12:44 2015 (r280343) +++ stable/10/usr.bin/procstat/Makefile Sun Mar 22 12:49:57 2015 (r280344) @@ -8,6 +8,7 @@ SRCS= procstat.c \ procstat_basic.c \ procstat_bin.c \ procstat_cred.c \ + procstat_cs.c \ procstat_files.c \ procstat_kstack.c \ procstat_rlimit.c \ Modified: stable/10/usr.bin/procstat/procstat.1 ============================================================================== --- stable/10/usr.bin/procstat/procstat.1 Sun Mar 22 09:12:44 2015 (r280343) +++ stable/10/usr.bin/procstat/procstat.1 Sun Mar 22 12:49:57 2015 (r280344) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 16, 2014 +.Dd March 10, 2015 .Dt PROCSTAT 1 .Os .Sh NAME @@ -35,7 +35,7 @@ .Nm .Op Fl CHhn .Op Fl w Ar interval -.Op Fl b | c | e | f | i | j | k | l | r | s | t | v | x +.Op Fl b | c | e | f | i | j | k | l | r | s | S | t | v | x .Op Fl a | Ar pid | Ar core ... .Sh DESCRIPTION The @@ -75,6 +75,8 @@ Display resource limits for the process. Display resource usage information for the process. .It Fl s Display security credential information for the process. +.It Fl S +Display the cpuset information for the thread. .It Fl t Display thread information for the process. .It Fl v @@ -108,9 +110,16 @@ flag may be used to request per-thread s statistics for some options. For those options, the second field in the table will list the thread ID to which the row of information corresponds. +The +.Fl H +flag is implied for the +.Fl S +mode. .Pp -Some information, such as VM and file descriptor information, is available +Information for VM, file descriptor, and cpuset options is available only to the owner of a process or the superuser. +A cpuset value displayed as -1 means that the information is either invalid +or not available. .Ss Binary Information Display the process ID, command, and path to the process binary: .Pp Modified: stable/10/usr.bin/procstat/procstat.c ============================================================================== --- stable/10/usr.bin/procstat/procstat.c Sun Mar 22 09:12:44 2015 (r280343) +++ stable/10/usr.bin/procstat/procstat.c Sun Mar 22 12:49:57 2015 (r280344) @@ -40,7 +40,7 @@ #include "procstat.h" static int aflag, bflag, cflag, eflag, fflag, iflag, jflag, kflag, lflag, rflag; -static int sflag, tflag, vflag, xflag; +static int sflag, tflag, vflag, xflag, Sflag; int hflag, nflag, Cflag, Hflag; static void @@ -50,7 +50,7 @@ usage(void) fprintf(stderr, "usage: procstat [-CHhn] [-M core] [-N system] " "[-w interval] \n"); fprintf(stderr, " [-b | -c | -e | -f | -i | -j | -k | " - "-l | -r | -s | -t | -v | -x]\n"); + "-l | -r | -s | -S | -t | -v | -x]\n"); fprintf(stderr, " [-a | pid | core ...]\n"); exit(EX_USAGE); } @@ -85,6 +85,8 @@ procstat(struct procstat *prstat, struct procstat_vm(prstat, kipp); else if (xflag) procstat_auxv(prstat, kipp); + else if (Sflag) + procstat_cs(prstat, kipp); else procstat_basic(kipp); } @@ -128,7 +130,7 @@ main(int argc, char *argv[]) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrstvw:x")) != -1) { + while ((ch = getopt(argc, argv, "CHN:M:abcefijklhrsStvw:x")) != -1) { switch (ch) { case 'C': Cflag++; @@ -144,6 +146,9 @@ main(int argc, char *argv[]) case 'N': nlistf = optarg; break; + case 'S': + Sflag++; + break; case 'a': aflag++; break; @@ -228,7 +233,7 @@ main(int argc, char *argv[]) /* We require that either 0 or 1 mode flags be set. */ tmp = bflag + cflag + eflag + fflag + iflag + jflag + (kflag ? 1 : 0) + - lflag + rflag + sflag + tflag + vflag + xflag; + lflag + rflag + sflag + tflag + vflag + xflag + Sflag; if (!(tmp == 0 || tmp == 1)) usage(); Modified: stable/10/usr.bin/procstat/procstat.h ============================================================================== --- stable/10/usr.bin/procstat/procstat.h Sun Mar 22 09:12:44 2015 (r280343) +++ stable/10/usr.bin/procstat/procstat.h Sun Mar 22 12:49:57 2015 (r280344) @@ -39,6 +39,7 @@ void procstat_auxv(struct procstat *prst void procstat_basic(struct kinfo_proc *kipp); void procstat_bin(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_cred(struct procstat *prstat, struct kinfo_proc *kipp); +void procstat_cs(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_env(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_files(struct procstat *prstat, struct kinfo_proc *kipp); void procstat_kstack(struct procstat *prstat, struct kinfo_proc *kipp, Copied: stable/10/usr.bin/procstat/procstat_cs.c (from r279842, head/usr.bin/procstat/procstat_cs.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/usr.bin/procstat/procstat_cs.c Sun Mar 22 12:49:57 2015 (r280344, copy of r279842, head/usr.bin/procstat/procstat_cs.c) @@ -0,0 +1,108 @@ +/*- + * Copyright (c) 2007 Robert N. M. Watson + * 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$ + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "procstat.h" + +void +procstat_cs(struct procstat *procstat, struct kinfo_proc *kipp) +{ + cpusetid_t cs; + cpuset_t mask; + struct kinfo_proc *kip; + unsigned int count, i; + int once, twice, lastcpu, cpu; + + if (!hflag) + printf("%5s %6s %-16s %-16s %2s %4s %-7s\n", "PID", + "TID", "COMM", "TDNAME", "CPU", "CSID", "CPU MASK"); + + kip = procstat_getprocs(procstat, KERN_PROC_PID | KERN_PROC_INC_THREAD, + kipp->ki_pid, &count); + if (kip == NULL) + return; + kinfo_proc_sort(kip, count); + for (i = 0; i < count; i++) { + kipp = &kip[i]; + printf("%5d ", kipp->ki_pid); + printf("%6d ", kipp->ki_tid); + printf("%-16s ", strlen(kipp->ki_comm) ? + kipp->ki_comm : "-"); + printf("%-16s ", (strlen(kipp->ki_tdname) && + (strcmp(kipp->ki_comm, kipp->ki_tdname) != 0)) ? + kipp->ki_tdname : "-"); + if (kipp->ki_oncpu != 255) + printf("%3d ", kipp->ki_oncpu); + else if (kipp->ki_lastcpu != 255) + printf("%3d ", kipp->ki_lastcpu); + else + printf("%3s ", "-"); + if (cpuset_getid(CPU_LEVEL_CPUSET, CPU_WHICH_TID, + kipp->ki_tid, &cs) != 0) { + cs = CPUSET_INVALID; + } + printf("%4d ", cs); + if ((cs != CPUSET_INVALID) && + (cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, + kipp->ki_tid, sizeof(mask), &mask) == 0)) { + lastcpu = -1; + once = 0; + twice = 0; + for (cpu = 0; cpu < CPU_SETSIZE; cpu++) { + if (CPU_ISSET(cpu, &mask)) { + if (once == 0) { + printf("%d", cpu); + once = 1; + } else if (cpu == lastcpu + 1) { + twice = 1; + } else if (twice == 1) { + printf("-%d,%d", lastcpu, cpu); + twice = 0; + } else + printf(",%d", cpu); + lastcpu = cpu; + } + } + if (once && twice) + printf("-%d", lastcpu); + } + printf("\n"); + } + procstat_freeprocs(procstat, kip); +} From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 13:11:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A9D7894; Sun, 22 Mar 2015 13:11:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEC6CE98; Sun, 22 Mar 2015 13:11:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MDBvrA089289; Sun, 22 Mar 2015 13:11:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MDBvpA089288; Sun, 22 Mar 2015 13:11:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503221311.t2MDBvpA089288@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 22 Mar 2015 13:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280345 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 13:11:58 -0000 Author: hselasky Date: Sun Mar 22 13:11:56 2015 New Revision: 280345 URL: https://svnweb.freebsd.org/changeset/base/280345 Log: Fix for out of order device destruction notifications when using the delist_dev() function. In addition to this change: - add a proper description of this function - add a proper witness assert inside this function - switch a nearby line to use the "cdp" pointer instead of cdev2priv() MFC after: 3 days Modified: head/sys/kern/kern_conf.c Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Sun Mar 22 12:49:57 2015 (r280344) +++ head/sys/kern/kern_conf.c Sun Mar 22 13:11:56 2015 (r280345) @@ -1093,9 +1093,12 @@ destroy_devl(struct cdev *dev) } dev_unlock(); - notify_destroy(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* avoid out of order notify events */ + notify_destroy(dev); + } mtx_lock(&cdevpriv_mtx); - while ((p = LIST_FIRST(&cdev2priv(dev)->cdp_fdpriv)) != NULL) { + while ((p = LIST_FIRST(&cdp->cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } @@ -1141,12 +1144,25 @@ delist_dev_locked(struct cdev *dev) devfs_destroy(dev); LIST_FOREACH(child, &dev->si_children, si_siblings) delist_dev_locked(child); + dev_unlock(); + /* ensure the destroy event is queued in order */ + notify_destroy(dev); + dev_lock(); } +/* + * This function will delist a character device and its children from + * the directory listing and create a destroy event without waiting + * for all character device references to go away. At some later point + * destroy_dev() must be called to complete the character device + * destruction. After calling this function the character device name + * can instantly be re-used. + */ void delist_dev(struct cdev *dev) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "delist_dev"); dev_lock(); delist_dev_locked(dev); dev_unlock(); From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 13:37:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16288E20; Sun, 22 Mar 2015 13:37:15 +0000 (UTC) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mailhost.stack.nl", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CB468BE; Sun, 22 Mar 2015 13:37:14 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id DBC83B8057; Sun, 22 Mar 2015 14:37:09 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id C7D5628494; Sun, 22 Mar 2015 14:37:09 +0100 (CET) Date: Sun, 22 Mar 2015 14:37:09 +0100 From: Jilles Tjoelker To: Bruce Evans Subject: Re: svn commit: r280308 - head/sys/fs/devfs Message-ID: <20150322133709.GA39238@stack.nl> References: <201503210114.t2L1ECcB075556@svn.freebsd.org> <20150321200221.K1846@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150321200221.K1846@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 13:37:15 -0000 On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: > On Sat, 21 Mar 2015, Xin LI wrote: > > Log: > > Disable timestamping on devfs read/write operations by default. > > Currently we update timestamps unconditionally when doing read or > > write operations. This may slow things down on hardware where > > reading timestamps is expensive (e.g. HPET, because of the default > > vfs.timestamp_precision setting is nanosecond now) with limited > > benefit. > > A new sysctl variable, vfs.devfs.dotimes is added, which can be > > set to non-zero value when the old behavior is desirable. > I don't like this. It defaults to non-POSIX-conformant behaviour... > The slowness is mostly from no delayed update of times in devfs. > Switching vfs.timestamp_precision to a hardware timecounter would > have been even more expensive for regular files if file systems > didn't have delayed updates. The assumption that vfs_timestamp() > doesn't use a slow timecounter was so often satisfied that no one > missed devfs also not supporting mounting with -noatime. > Delayed updates are even easier to implement for devfs than for disk > file systems the times never need to be written to disk. A slow update > is still wasteful for atimes, but not as bad as for disk file systems > since it doesn't trigger a slower sync to disk. Yes, I think implementing delayed updates is the right solution to this problem. This way, only stat and last close will need to read the clock. No configuration option will be needed. A subtle difference with most other file systems is that devfs nodes often stay open for very long, so the timestamps will usually come from stat() calls, which may be much later than the actual read or write. Still that is better than not updating timestamps at all. > > ... > > Modified: head/sys/fs/devfs/devfs_vnops.c > > ============================================================================== > > --- head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 00:21:30 2015 (r280307) > > +++ head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 01:14:11 2015 (r280308) > > ... > > @@ -1700,7 +1708,8 @@ devfs_write_f(struct file *fp, struct ui > > resid = uio->uio_resid; > > > > error = dsw->d_write(dev, uio, ioflag); > > - if (uio->uio_resid != resid || (error == 0 && resid != 0)) { > > + if (devfs_dotimes && > > + (uio->uio_resid != resid || (error == 0 && resid != 0))) { > > vfs_timestamp(&dev->si_ctime); > > dev->si_mtime = dev->si_ctime; > > } > An old bug is evident in the diff. Writing shouldn't change the ctime. That is not a bug. POSIX unambiguously requires write() to update both mtime and ctime. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 14:38:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8CD8A3E; Sun, 22 Mar 2015 14:38:52 +0000 (UTC) Received: from mail-pa0-x22e.google.com (mail-pa0-x22e.google.com [IPv6:2607:f8b0:400e:c03::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 961267F7; Sun, 22 Mar 2015 14:38:52 +0000 (UTC) Received: by pabxg6 with SMTP id xg6so150416514pab.0; Sun, 22 Mar 2015 07:38:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:references:to:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=9aEZRuf5xNtm23cU9oZU+Qrtv7CnQMdgYSDc7bTX6vw=; b=jFz+V+sRSPQwxmqAzKnQggDrnUCG5qreL7W5ZBX04urROTRr0IAGa80stNkbzj3uMG BWc5qAIuxE3jH6WYX1PybOlhvcTgnI7xeHWibv93GTprHi5cPcmusQpP+r5bgCd1pJim BcixyOvS4CTdsNqZbfIpvD/1+I1c0m8GzckMngTcJJTrb3fdRXFXrcMyNKTsg9vrVumK 3mOyr9lYRXMO1aV17GNxaFhtzXUOaVGVsX4PyrU7C5eCv8BABxsrI+Q0hVvfJrRi5Oi+ zYI6DCA1ZhNp3AZoD1UUtDnTiDIyT5TmHSNGiHYE4m4bBCwO/PIB5BcGq8OYXDAUE7XF 393Q== X-Received: by 10.66.102.34 with SMTP id fl2mr203192223pab.40.1427035132096; Sun, 22 Mar 2015 07:38:52 -0700 (PDT) Received: from [192.168.1.104] (ppp59-167-128-11.static.internode.on.net. [59.167.128.11]) by mx.google.com with ESMTPSA id j2sm14170097pdn.44.2015.03.22.07.38.49 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Mar 2015 07:38:51 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r280308 - head/sys/fs/devfs references: <201503210114.t2L1ECcB075556@svn.freebsd.org> <550D5D49.6020503@FreeBSD.org> <20150321142737.GJ2379@kib.kiev.ua> To: Konstantin Belousov From: Kubilay Kocak message-id: <550ED3F5.6040402@FreeBSD.org> Date: Mon, 23 Mar 2015 01:38:45 +1100 user-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Thunderbird/37.0 mime-version: 1.0 in-reply-to: <20150321142737.GJ2379@kib.kiev.ua> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 14:38:52 -0000 On 22/03/2015 1:27 AM, Konstantin Belousov wrote: > On Sat, Mar 21, 2015 at 11:00:09PM +1100, Kubilay Kocak wrote: >> On 21/03/2015 12:14 PM, Xin LI wrote: >>> Author: delphij >>> Date: Sat Mar 21 01:14:11 2015 >>> New Revision: 280308 >>> URL: https://svnweb.freebsd.org/changeset/base/280308 >>> >>> Log: >>> Disable timestamping on devfs read/write operations by default. >>> >>> Currently we update timestamps unconditionally when doing read or >>> write operations. This may slow things down on hardware where >>> reading timestamps is expensive (e.g. HPET, because of the default >>> vfs.timestamp_precision setting is nanosecond now) with limited >>> benefit. >>> >>> A new sysctl variable, vfs.devfs.dotimes is added, which can be >>> set to non-zero value when the old behavior is desirable. >> >> Perhaps *devfs_timestamp_update* is a better name. thoughts? >> >> If something shorter is desired: devfs_ts_update might be ok, though I >> prefer the former. >> >> Let's not forget these are user visible system control knobs, not just >> code variables, though I do understand the desire to shorten them, and >> that we do have descriptions for them ... mostly :) > > should it be > vfs.devfs.devfs_ts_devfs_ts_devfs_update_devfs > so that user is _absolutely_ sure that it is devfs related, if 'devfs' > used only one time in the MIB prevents him from realizing this ? > s/_/. devfs.timestamp_update sorry. :) From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 15:37:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86CFDF81; Sun, 22 Mar 2015 15:37:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6856DDA9; Sun, 22 Mar 2015 15:37:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MFb6BM057972; Sun, 22 Mar 2015 15:37:06 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MFb6Kf057971; Sun, 22 Mar 2015 15:37:06 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503221537.t2MFb6Kf057971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 22 Mar 2015 15:37:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280346 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 15:37:06 -0000 Author: pfg Date: Sun Mar 22 15:37:05 2015 New Revision: 280346 URL: https://svnweb.freebsd.org/changeset/base/280346 Log: Small style(9) cleanup. #define should always be followed by a tab not space. Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Mar 22 13:11:56 2015 (r280345) +++ head/sys/sys/cdefs.h Sun Mar 22 15:37:05 2015 (r280346) @@ -70,20 +70,20 @@ #if defined(__GNUC__) || defined(__INTEL_COMPILER) #if __GNUC__ >= 3 || defined(__INTEL_COMPILER) -#define __GNUCLIKE_ASM 3 -#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS +#define __GNUCLIKE_ASM 3 +#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS #else -#define __GNUCLIKE_ASM 2 +#define __GNUCLIKE_ASM 2 #endif -#define __GNUCLIKE___TYPEOF 1 -#define __GNUCLIKE___OFFSETOF 1 -#define __GNUCLIKE___SECTION 1 +#define __GNUCLIKE___TYPEOF 1 +#define __GNUCLIKE___OFFSETOF 1 +#define __GNUCLIKE___SECTION 1 #ifndef __INTEL_COMPILER # define __GNUCLIKE_CTOR_SECTION_HANDLING 1 #endif -#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 +#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 # if defined(__INTEL_COMPILER) && defined(__cplusplus) \ && __INTEL_COMPILER < 800 # undef __GNUCLIKE_BUILTIN_CONSTANT_P @@ -111,19 +111,19 @@ # define __GNUCLIKE_MATH_BUILTIN_RELOPS #endif -#define __GNUCLIKE_BUILTIN_MEMCPY 1 +#define __GNUCLIKE_BUILTIN_MEMCPY 1 /* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ -#define __CC_SUPPORTS_INLINE 1 -#define __CC_SUPPORTS___INLINE 1 -#define __CC_SUPPORTS___INLINE__ 1 +#define __CC_SUPPORTS_INLINE 1 +#define __CC_SUPPORTS___INLINE 1 +#define __CC_SUPPORTS___INLINE__ 1 -#define __CC_SUPPORTS___FUNC__ 1 -#define __CC_SUPPORTS_WARNING 1 +#define __CC_SUPPORTS___FUNC__ 1 +#define __CC_SUPPORTS_WARNING 1 -#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ +#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ -#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 +#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 #endif /* __GNUC__ || __INTEL_COMPILER */ @@ -139,7 +139,7 @@ /* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. - * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI * mode -- there must be no spaces between its arguments, and for nested * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also @@ -234,13 +234,13 @@ #define __section(x) __attribute__((__section__(x))) #endif #if defined(__INTEL_COMPILER) -#define __dead2 __attribute__((__noreturn__)) -#define __pure2 __attribute__((__const__)) -#define __unused __attribute__((__unused__)) -#define __used __attribute__((__used__)) -#define __packed __attribute__((__packed__)) -#define __aligned(x) __attribute__((__aligned__(x))) -#define __section(x) __attribute__((__section__(x))) +#define __dead2 __attribute__((__noreturn__)) +#define __pure2 __attribute__((__const__)) +#define __unused __attribute__((__unused__)) +#define __used __attribute__((__used__)) +#define __packed __attribute__((__packed__)) +#define __aligned(x) __attribute__((__aligned__(x))) +#define __section(x) __attribute__((__section__(x))) #endif #endif @@ -356,9 +356,9 @@ #endif #if __GNUC_PREREQ__(3, 3) -#define __nonnull(...) __attribute__((__nonnull__(__VA_ARGS__))) +#define __nonnull(...) __attribute__((__nonnull__(__VA_ARGS__))) #else -#define __nonnull(...) +#define __nonnull(...) #endif #if __GNUC_PREREQ__(3, 4) @@ -436,11 +436,11 @@ * larger code. */ #if __GNUC_PREREQ__(2, 96) -#define __predict_true(exp) __builtin_expect((exp), 1) -#define __predict_false(exp) __builtin_expect((exp), 0) +#define __predict_true(exp) __builtin_expect((exp), 1) +#define __predict_false(exp) __builtin_expect((exp), 0) #else -#define __predict_true(exp) (exp) -#define __predict_false(exp) (exp) +#define __predict_true(exp) (exp) +#define __predict_false(exp) (exp) #endif #if __GNUC_PREREQ__(4, 2) @@ -456,13 +456,13 @@ * require it. */ #if __GNUC_PREREQ__(4, 1) -#define __offsetof(type, field) __builtin_offsetof(type, field) +#define __offsetof(type, field) __builtin_offsetof(type, field) #else #ifndef __cplusplus #define __offsetof(type, field) \ ((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field)) #else -#define __offsetof(type, field) \ +#define __offsetof(type, field) \ (__offsetof__ (reinterpret_cast <__size_t> \ (&reinterpret_cast \ (static_cast (0)->field)))) @@ -562,7 +562,7 @@ * The following definition might not work well if used in header files, * but it should be better than nothing. If you want a "do nothing" * version, then it should generate some harmless declaration, such as: - * #define __IDSTRING(name,string) struct __hack + * #define __IDSTRING(name,string) struct __hack */ #define __IDSTRING(name,string) static const char name[] __unused = string #endif @@ -744,7 +744,7 @@ #endif #if defined(__mips) || defined(__powerpc64__) -#define __NO_TLS 1 +#define __NO_TLS 1 #endif /* From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 16:10:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02FB9ADF; Sun, 22 Mar 2015 16:10:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E0926177; Sun, 22 Mar 2015 16:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MGAcdO075130; Sun, 22 Mar 2015 16:10:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MGATu0075100; Sun, 22 Mar 2015 16:10:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503221610.t2MGATu0075100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 22 Mar 2015 16:10:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280347 - in head/sys/dev: aac aacraid advansys aha ahb amr buslogic bwi bwn ciss ct dpt ida if_ndis iir mlx mly trm twe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 16:10:39 -0000 Author: mav Date: Sun Mar 22 16:10:28 2015 New Revision: 280347 URL: https://svnweb.freebsd.org/changeset/base/280347 Log: Remove MAXBSIZE use from drivers where it has nothing to do. In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead. MFC after: 1 month Modified: head/sys/dev/aac/aac.c head/sys/dev/aacraid/aacraid.c head/sys/dev/advansys/adwcam.c head/sys/dev/aha/aha.c head/sys/dev/ahb/ahb.c head/sys/dev/amr/amr_pci.c head/sys/dev/buslogic/bt.c head/sys/dev/bwi/if_bwi.c head/sys/dev/bwn/if_bwn.c head/sys/dev/ciss/ciss.c head/sys/dev/ct/ct_isa.c head/sys/dev/dpt/dpt_scsi.c head/sys/dev/ida/ida.c head/sys/dev/ida/ida_eisa.c head/sys/dev/ida/ida_pci.c head/sys/dev/if_ndis/if_ndis_pci.c head/sys/dev/iir/iir.c head/sys/dev/iir/iir_pci.c head/sys/dev/mlx/mlx.c head/sys/dev/mlx/mlx_pci.c head/sys/dev/mly/mly.c head/sys/dev/trm/trm.c head/sys/dev/twe/twe.c head/sys/dev/twe/twe_freebsd.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/aac/aac.c Sun Mar 22 16:10:28 2015 (r280347) @@ -507,9 +507,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: head/sys/dev/aacraid/aacraid.c ============================================================================== --- head/sys/dev/aacraid/aacraid.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/aacraid/aacraid.c Sun Mar 22 16:10:28 2015 (r280347) @@ -597,9 +597,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: head/sys/dev/advansys/adwcam.c ============================================================================== --- head/sys/dev/advansys/adwcam.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/advansys/adwcam.c Sun Mar 22 16:10:28 2015 (r280347) @@ -961,7 +961,7 @@ adw_init(struct adw_softc *adw) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ ADW_SGSIZE, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: head/sys/dev/aha/aha.c ============================================================================== --- head/sys/dev/aha/aha.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/aha/aha.c Sun Mar 22 16:10:28 2015 (r280347) @@ -458,7 +458,7 @@ aha_init(struct aha_softc* aha) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_24BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: head/sys/dev/ahb/ahb.c ============================================================================== --- head/sys/dev/ahb/ahb.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/ahb/ahb.c Sun Mar 22 16:10:28 2015 (r280347) @@ -298,7 +298,7 @@ ahbattach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHB_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: head/sys/dev/amr/amr_pci.c ============================================================================== --- head/sys/dev/amr/amr_pci.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/amr/amr_pci.c Sun Mar 22 16:10:28 2015 (r280347) @@ -260,7 +260,8 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -277,8 +278,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ @@ -292,8 +294,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ Modified: head/sys/dev/buslogic/bt.c ============================================================================== --- head/sys/dev/buslogic/bt.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/buslogic/bt.c Sun Mar 22 16:10:28 2015 (r280347) @@ -726,7 +726,7 @@ bt_init(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ BT_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: head/sys/dev/bwi/if_bwi.c ============================================================================== --- head/sys/dev/bwi/if_bwi.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/bwi/if_bwi.c Sun Mar 22 16:10:28 2015 (r280347) @@ -1916,7 +1916,7 @@ bwi_dma_alloc(struct bwi_softc *sc) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ Modified: head/sys/dev/bwn/if_bwn.c ============================================================================== --- head/sys/dev/bwn/if_bwn.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/bwn/if_bwn.c Sun Mar 22 16:10:28 2015 (r280347) @@ -10381,7 +10381,7 @@ bwn_dma_attach(struct bwn_mac *mac) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/ciss/ciss.c Sun Mar 22 16:10:28 2015 (r280347) @@ -833,7 +833,7 @@ setup: BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ - CISS_MAX_SG_ELEMENTS, /* nsegments */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -851,7 +851,8 @@ setup: BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, CISS_MAX_SG_ELEMENTS, /* maxsize, nsegments */ + (CISS_MAX_SG_ELEMENTS - 1) * PAGE_SIZE, /* maxsize */ + CISS_MAX_SG_ELEMENTS, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, &sc->ciss_mtx, /* lockfunc, lockarg */ Modified: head/sys/dev/ct/ct_isa.c ============================================================================== --- head/sys/dev/ct/ct_isa.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/ct/ct_isa.c Sun Mar 22 16:10:28 2015 (r280347) @@ -207,7 +207,7 @@ ct_isa_attach(device_t dev) /* setup DMA map */ if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_24BIT, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, 1, + NULL, NULL, DFLTPHYS, 1, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, NULL, NULL, &ct->sc_dmat) != 0) { @@ -223,7 +223,7 @@ ct_isa_attach(device_t dev) return ENXIO; } - bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, MAXBSIZE, + bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, DFLTPHYS, ct_dmamap, &addr, BUS_DMA_NOWAIT); /* setup machdep softc */ @@ -231,7 +231,7 @@ ct_isa_attach(device_t dev) bs->sc_io_control = 0; bs->sc_bounce_phys = (u_int8_t *)addr; bs->sc_bounce_addr = vaddr; - bs->sc_bounce_size = MAXBSIZE; + bs->sc_bounce_size = DFLTPHYS; bs->sc_minphys = (1 << 24); bs->sc_dmasync_before = ct_isa_dmasync_before; bs->sc_dmasync_after = ct_isa_dmasync_after; Modified: head/sys/dev/dpt/dpt_scsi.c ============================================================================== --- head/sys/dev/dpt/dpt_scsi.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/dpt/dpt_scsi.c Sun Mar 22 16:10:28 2015 (r280347) @@ -1388,7 +1388,7 @@ dpt_init(struct dpt_softc *dpt) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ dpt->sgsize, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: head/sys/dev/ida/ida.c ============================================================================== --- head/sys/dev/ida/ida.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/ida/ida.c Sun Mar 22 16:10:28 2015 (r280347) @@ -241,7 +241,7 @@ ida_init(struct ida_softc *ida) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ IDA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, Modified: head/sys/dev/ida/ida_eisa.c ============================================================================== --- head/sys/dev/ida/ida_eisa.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/ida/ida_eisa.c Sun Mar 22 16:10:28 2015 (r280347) @@ -302,8 +302,8 @@ ida_eisa_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: head/sys/dev/ida/ida_pci.c ============================================================================== --- head/sys/dev/ida/ida_pci.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/ida/ida_pci.c Sun Mar 22 16:10:28 2015 (r280347) @@ -265,8 +265,8 @@ ida_pci_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: head/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- head/sys/dev/if_ndis/if_ndis_pci.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/if_ndis/if_ndis_pci.c Sun Mar 22 16:10:28 2015 (r280347) @@ -298,7 +298,8 @@ ndis_attach_pci(dev) BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, NDIS_NSEG_NEW,/* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + NDIS_NSEG_NEW, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, NULL, /* lockfunc, lockarg */ Modified: head/sys/dev/iir/iir.c ============================================================================== --- head/sys/dev/iir/iir.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/iir/iir.c Sun Mar 22 16:10:28 2015 (r280347) @@ -201,7 +201,8 @@ iir_init(struct gdt_softc *gdt) /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/GDT_MAXSG, + /*maxsize*/DFLTPHYS, + /*nsegments*/GDT_MAXSG, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, /*lockfunc*/busdma_lock_mutex, Modified: head/sys/dev/iir/iir_pci.c ============================================================================== --- head/sys/dev/iir/iir_pci.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/iir/iir_pci.c Sun Mar 22 16:10:28 2015 (r280347) @@ -307,7 +307,7 @@ iir_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/GDT_MAXSG, + /*nsegments*/BUS_SPACE_UNRESTRICTED, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&gdt->sc_lock, &gdt->sc_parent_dmat) != 0) { Modified: head/sys/dev/mlx/mlx.c ============================================================================== --- head/sys/dev/mlx/mlx.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/mlx/mlx.c Sun Mar 22 16:10:28 2015 (r280347) @@ -399,7 +399,8 @@ mlx_attach(struct mlx_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + MLX_MAXPHYS, /* maxsize */ + MLX_NSEG, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: head/sys/dev/mlx/mlx_pci.c ============================================================================== --- head/sys/dev/mlx/mlx_pci.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/mlx/mlx_pci.c Sun Mar 22 16:10:28 2015 (r280347) @@ -189,7 +189,8 @@ mlx_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ Modified: head/sys/dev/mly/mly.c ============================================================================== --- head/sys/dev/mly/mly.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/mly/mly.c Sun Mar 22 16:10:28 2015 (r280347) @@ -392,7 +392,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ @@ -410,7 +411,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + DFLTPHYS, /* maxsize */ + MLY_MAX_SGENTRIES, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: head/sys/dev/trm/trm.c ============================================================================== --- head/sys/dev/trm/trm.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/trm/trm.c Sun Mar 22 16:10:28 2015 (r280347) @@ -3381,7 +3381,7 @@ trm_init(u_int16_t unit, device_t dev) /*highaddr*/ BUS_SPACE_MAXADDR, /*filter*/ NULL, /*filterarg*/ NULL, - /*maxsize*/ MAXBSIZE, + /*maxsize*/ TRM_MAXPHYS, /*nsegments*/ TRM_NSEG, /*maxsegsz*/ TRM_MAXTRANSFER_SIZE, /*flags*/ BUS_DMA_ALLOCNOW, Modified: head/sys/dev/twe/twe.c ============================================================================== --- head/sys/dev/twe/twe.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/twe/twe.c Sun Mar 22 16:10:28 2015 (r280347) @@ -985,7 +985,7 @@ twe_immediate_request(struct twe_request if (usetmp && (tr->tr_data != NULL)) { tr->tr_flags |= TWE_CMD_IMMEDIATE; - if (tr->tr_length > MAXBSIZE) + if (tr->tr_length > DFLTPHYS) return (EINVAL); bcopy(tr->tr_data, sc->twe_immediate, tr->tr_length); } Modified: head/sys/dev/twe/twe_freebsd.c ============================================================================== --- head/sys/dev/twe/twe_freebsd.c Sun Mar 22 15:37:05 2015 (r280346) +++ head/sys/dev/twe/twe_freebsd.c Sun Mar 22 16:10:28 2015 (r280347) @@ -233,7 +233,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ @@ -301,7 +302,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH,/* maxsize, nsegments */ + (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE,/* maxsize */ + TWE_MAX_SGL_LENGTH, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ @@ -320,7 +322,7 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, 1, /* maxsize, nsegments */ + DFLTPHYS, 1, /* maxsize, nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 16:12:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAF44DD7; Sun, 22 Mar 2015 16:12:23 +0000 (UTC) Received: from mailrelay105.isp.belgacom.be (mailrelay105.isp.belgacom.be [195.238.20.132]) by mx1.freebsd.org (Postfix) with ESMTP id F0AC5196; Sun, 22 Mar 2015 16:12:22 +0000 (UTC) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=KjSUzZxnmGSQ+6+vr4Kd0OSSUs/Ia9ciENKrYVIfwLU= c=1 sm=2 a=6I5d2MoRAAAA:8 a=CLOSWh0hz5zq3mD8lasA:9 a=CjuIK1q_8ugA:10 a=6R8KEigaNUhcvUBM:21 a=2PLbIismDCuwnmFb:21 a=9C5w671CO25bZjS6ipoA:9 a=OTFKxNmSR6MA:10 a=LSW1mi3CKqAA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BhBgAZ6Q5V/y+M8VFcgwZSTgzGboV1AoEbTQEBAQEBAX2EFQEFViMQCxQECSUPKh4GE4gzAQjIegEBAQEBAQEDAQEBAQEBARcEiyGEZBEHhC0FkjiCBoV+lCsig289MYJDAQEB Received: from 47.140-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.140.47]) by relay.skynet.be with ESMTP; 22 Mar 2015 17:11:11 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id t2MGBAMZ000895; Sun, 22 Mar 2015 17:11:10 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Sun, 22 Mar 2015 17:11:10 +0100 From: Tijl Coosemans To: Ian Lepore Subject: Re: svn commit: r279993 - in head/sys: dev/cxgb dev/cxgbe kern vm Message-ID: <20150322171110.2af31564@kalimero.tijl.coosemans.org> In-Reply-To: <201503141708.t2EH8TdR074383@svn.freebsd.org> References: <201503141708.t2EH8TdR074383@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/ycIkp_kwvfn.i6.Tw.o7FzR" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 16:12:23 -0000 --MP_/ycIkp_kwvfn.i6.Tw.o7FzR Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, 14 Mar 2015 17:08:29 +0000 (UTC) Ian Lepore wrote: > Author: ian > Date: Sat Mar 14 17:08:28 2015 > New Revision: 279993 > URL: https://svnweb.freebsd.org/changeset/base/279993 > > Log: > Set the SBUF_INCLUDENUL flag in sbuf_new_for_sysctl() so that sysctl > strings returned to userland include the nulterm byte. > > Some uses of sbuf_new_for_sysctl() write binary data rather than strings; > clear the SBUF_INCLUDENUL flag after calling sbuf_new_for_sysctl() in > those cases. (Note that the sbuf code still automatically adds a nulterm > byte in sbuf_finish(), but since it's not included in the length it won't > get copied to userland along with the binary data.) Can you review the attached patch? The KERN_PROC_ENV sysctl is also binary (zero-terminated strings). Adding an extra \0 at the end makes some programs think there's an extra empty environment variable. It causes console-kit-daemon to crash for instance. I suspect a similar patch may be needed for KERN_PROC_ARGS. --MP_/ycIkp_kwvfn.i6.Tw.o7FzR Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=kern_proc_env.patch Index: sys/kern/kern_proc.c =================================================================== --- sys/kern/kern_proc.c (revision 280322) +++ sys/kern/kern_proc.c (working copy) @@ -1904,6 +1904,7 @@ sysctl_kern_proc_env(SYSCTL_HANDLER_ARGS } sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = proc_getenvv(curthread, p, &sb); error2 = sbuf_finish(&sb); PRELE(p); --MP_/ycIkp_kwvfn.i6.Tw.o7FzR-- From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 16:25:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A447206; Sun, 22 Mar 2015 16:25:14 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 E5807276; Sun, 22 Mar 2015 16:25:13 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2MGP7po019258 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 22 Mar 2015 18:25:07 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2MGP7po019258 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2MGP7Ik019256; Sun, 22 Mar 2015 18:25:07 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 22 Mar 2015 18:25:07 +0200 From: Konstantin Belousov To: Jilles Tjoelker Subject: Re: svn commit: r280308 - head/sys/fs/devfs Message-ID: <20150322162507.GD2379@kib.kiev.ua> References: <201503210114.t2L1ECcB075556@svn.freebsd.org> <20150321200221.K1846@besplex.bde.org> <20150322133709.GA39238@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150322133709.GA39238@stack.nl> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 16:25:14 -0000 On Sun, Mar 22, 2015 at 02:37:09PM +0100, Jilles Tjoelker wrote: > On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: > > On Sat, 21 Mar 2015, Xin LI wrote: > > > > Log: > > > Disable timestamping on devfs read/write operations by default. > > > > Currently we update timestamps unconditionally when doing read or > > > write operations. This may slow things down on hardware where > > > reading timestamps is expensive (e.g. HPET, because of the default > > > vfs.timestamp_precision setting is nanosecond now) with limited > > > benefit. > > > > A new sysctl variable, vfs.devfs.dotimes is added, which can be > > > set to non-zero value when the old behavior is desirable. > > > I don't like this. It defaults to non-POSIX-conformant behaviour... > > > The slowness is mostly from no delayed update of times in devfs. > > Switching vfs.timestamp_precision to a hardware timecounter would > > have been even more expensive for regular files if file systems > > didn't have delayed updates. The assumption that vfs_timestamp() > > doesn't use a slow timecounter was so often satisfied that no one > > missed devfs also not supporting mounting with -noatime. > > > Delayed updates are even easier to implement for devfs than for disk > > file systems the times never need to be written to disk. A slow update > > is still wasteful for atimes, but not as bad as for disk file systems > > since it doesn't trigger a slower sync to disk. > > Yes, I think implementing delayed updates is the right solution to this > problem. This way, only stat and last close will need to read the clock. > No configuration option will be needed. > > A subtle difference with most other file systems is that devfs nodes > often stay open for very long, so the timestamps will usually come from > stat() calls, which may be much later than the actual read or write. > Still that is better than not updating timestamps at all. > > > > ... > > > Modified: head/sys/fs/devfs/devfs_vnops.c > > > ============================================================================== > > > --- head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 00:21:30 2015 (r280307) > > > +++ head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 01:14:11 2015 (r280308) > > > ... > > > @@ -1700,7 +1708,8 @@ devfs_write_f(struct file *fp, struct ui > > > resid = uio->uio_resid; > > > > > > error = dsw->d_write(dev, uio, ioflag); > > > - if (uio->uio_resid != resid || (error == 0 && resid != 0)) { > > > + if (devfs_dotimes && > > > + (uio->uio_resid != resid || (error == 0 && resid != 0))) { > > > vfs_timestamp(&dev->si_ctime); > > > dev->si_mtime = dev->si_ctime; > > > } > > > An old bug is evident in the diff. Writing shouldn't change the ctime. > > That is not a bug. POSIX unambiguously requires write() to update both > mtime and ctime. Does POSIX ever say anything about special files ? Devfs already has non-POSIX behaviour, e.g. write on one mount is reflected as mtime/ctime update on all mounts. On reboot, the time stamps are re-created, i.e. changes are not persistent. I think the deviations may be summarrized as 'devfs mtime is useless for the usual mtime purposes'. From this PoV, I have no objections to the patch. Doing extra work with delayed updates of times, which might be somewhat non-trivial, is a feature with non-obvious gain. From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 17:29:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 905F9294; Sun, 22 Mar 2015 17:29:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B93DA69; Sun, 22 Mar 2015 17:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MHTFW3010252; Sun, 22 Mar 2015 17:29:15 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MHTEPZ010250; Sun, 22 Mar 2015 17:29:14 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201503221729.t2MHTEPZ010250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sun, 22 Mar 2015 17:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280348 - head/sbin/savecore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 17:29:15 -0000 Author: scottl Date: Sun Mar 22 17:29:14 2015 New Revision: 280348 URL: https://svnweb.freebsd.org/changeset/base/280348 Log: Convert savecore to libxo. The 'verbose' paths still use printf since they're meant for interactivity on the command line and contain a lot of redundant information. Obtained from: Netflix, Inc. Modified: head/sbin/savecore/Makefile head/sbin/savecore/savecore.c Modified: head/sbin/savecore/Makefile ============================================================================== --- head/sbin/savecore/Makefile Sun Mar 22 16:10:28 2015 (r280347) +++ head/sbin/savecore/Makefile Sun Mar 22 17:29:14 2015 (r280348) @@ -1,7 +1,7 @@ # $FreeBSD$ PROG= savecore -LIBADD= z +LIBADD= z xo MAN= savecore.8 .include Modified: head/sbin/savecore/savecore.c ============================================================================== --- head/sbin/savecore/savecore.c Sun Mar 22 16:10:28 2015 (r280347) +++ head/sbin/savecore/savecore.c Sun Mar 22 17:29:14 2015 (r280348) @@ -80,6 +80,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include /* The size of the buffer used for I/O. */ #define BUFFERSIZE (1024*1024) @@ -98,29 +99,28 @@ static sig_atomic_t got_siginfo; static void infohandler(int); static void -printheader(FILE *f, const struct kerneldumpheader *h, const char *device, +printheader(xo_handle_t *xo, const struct kerneldumpheader *h, const char *device, int bounds, const int status) { uint64_t dumplen; time_t t; const char *stat_str; - fprintf(f, "Dump header from device %s\n", device); - fprintf(f, " Architecture: %s\n", h->architecture); - fprintf(f, " Architecture Version: %u\n", - dtoh32(h->architectureversion)); + xo_flush_h(xo); + xo_emit_h(xo, "{Lwc:Dump header from device}{:dump_device/%s}\n", device); + xo_emit_h(xo, "{P: }{Lwc:Architecture}{:architecture/%s}\n", h->architecture); + xo_emit_h(xo, "{P: }{Lwc:Architecture Version}{:architecture_version/%u}\n", dtoh32(h->architectureversion)); dumplen = dtoh64(h->dumplength); - fprintf(f, " Dump Length: %lldB (%lld MB)\n", (long long)dumplen, - (long long)(dumplen >> 20)); - fprintf(f, " Blocksize: %d\n", dtoh32(h->blocksize)); + xo_emit_h(xo, "{P: }{Lwc:Dump Length}{:dump_length_bytes/%lld}\n", (long long)dumplen); + xo_emit_h(xo, "{P: }{Lwc:Blocksize}{:blocksize/%d}\n", dtoh32(h->blocksize)); t = dtoh64(h->dumptime); - fprintf(f, " Dumptime: %s", ctime(&t)); - fprintf(f, " Hostname: %s\n", h->hostname); - fprintf(f, " Magic: %s\n", h->magic); - fprintf(f, " Version String: %s", h->versionstring); - fprintf(f, " Panic String: %s\n", h->panicstring); - fprintf(f, " Dump Parity: %u\n", h->parity); - fprintf(f, " Bounds: %d\n", bounds); + xo_emit_h(xo, "{P: }{Lwc:Dumptime}{:dumptime/%s}", ctime(&t)); + xo_emit_h(xo, "{P: }{Lwc:Hostname}{:hostname/%s}\n", h->hostname); + xo_emit_h(xo, "{P: }{Lwc:Magic}{:magic/%s}\n", h->magic); + xo_emit_h(xo, "{P: }{Lwc:Version String}{:version_string/%s}", h->versionstring); + xo_emit_h(xo, "{P: }{Lwc:Panic String}{:panic_string/%s}\n", h->panicstring); + xo_emit_h(xo, "{P: }{Lwc:Dump Parity}{:dump_parity/%u}\n", h->parity); + xo_emit_h(xo, "{P: }{Lwc:Bounds}{:bounds/%d}\n", bounds); switch(status) { case STATUS_BAD: @@ -132,8 +132,8 @@ printheader(FILE *f, const struct kernel default: stat_str = "unknown"; } - fprintf(f, " Dump Status: %s\n", stat_str); - fflush(f); + xo_emit_h(xo, "{P: }{Lwc:Dump Status}{:dump_status/%s}\n", stat_str); + xo_flush_h(xo); } static int @@ -434,6 +434,7 @@ DoTextdumpFile(int fd, off_t dumpsize, o static void DoFile(const char *savedir, const char *device) { + xo_handle_t *xostdout, *xoinfo; static char infoname[PATH_MAX], corename[PATH_MAX], linkname[PATH_MAX]; static char *buf = NULL; struct kerneldumpheader kdhf, kdhl; @@ -442,13 +443,19 @@ DoFile(const char *savedir, const char * mode_t oumask; int fd, fdinfo, error; int bounds, status; - u_int sectorsize; + u_int sectorsize, xostyle; int istextdump; bounds = getbounds(); mediasize = 0; status = STATUS_UNKNOWN; + xostdout = xo_create_to_file(stdout, XO_STYLE_TEXT, 0); + if (xostdout == NULL) { + syslog(LOG_ERR, "%s: %m", infoname); + return; + } + if (maxdumps > 0 && bounds == maxdumps) bounds = 0; @@ -574,10 +581,10 @@ DoFile(const char *savedir, const char * if (verbose >= 2) { printf("First dump headers:\n"); - printheader(stdout, &kdhf, device, bounds, -1); + printheader(xostdout, &kdhf, device, bounds, -1); printf("\nLast dump headers:\n"); - printheader(stdout, &kdhl, device, bounds, -1); + printheader(xostdout, &kdhl, device, bounds, -1); printf("\n"); } @@ -626,6 +633,7 @@ DoFile(const char *savedir, const char * nerr++; goto closefd; } + oumask = umask(S_IRWXG|S_IRWXO); /* Restrict access to the core file.*/ if (compress) { snprintf(corename, sizeof(corename), "%s.%d.gz", @@ -652,10 +660,22 @@ DoFile(const char *savedir, const char * goto closefd; } + xostyle = xo_get_style(NULL); + xoinfo = xo_create_to_file(info, xostyle, 0); + if (xoinfo == NULL) { + syslog(LOG_ERR, "%s: %m", infoname); + nerr++; + goto closefd; + } + xo_open_container_h(xoinfo, "crashdump"); + if (verbose) - printheader(stdout, &kdhl, device, bounds, status); + printheader(xostdout, &kdhl, device, bounds, status); - printheader(info, &kdhl, device, bounds, status); + printheader(xoinfo, &kdhl, device, bounds, status); + xo_close_container_h(xoinfo, "crashdump"); + xo_flush_h(xoinfo); + xo_finish_h(xoinfo); fclose(info); syslog(LOG_NOTICE, "writing %score to %s/%s", @@ -712,6 +732,8 @@ nuke: syslog(LOG_ERR, "error while clearing the dump header: %m"); } + xo_close_container_h(xostdout, "crashdump"); + xo_finish_h(xostdout); close(fd); return; @@ -725,7 +747,7 @@ closefd: static void usage(void) { - fprintf(stderr, "%s\n%s\n%s\n", + xo_error("%s\n%s\n%s\n", "usage: savecore -c [-v] [device ...]", " savecore -C [-v] [device ...]", " savecore [-fkvz] [-m maxdumps] [directory [device ...]]"); @@ -745,6 +767,10 @@ main(int argc, char **argv) openlog("savecore", LOG_PERROR, LOG_DAEMON); signal(SIGINFO, infohandler); + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(1); + while ((ch = getopt(argc, argv, "Ccfkm:vz")) != -1) switch(ch) { case 'C': From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 17:54:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0681998; Sun, 22 Mar 2015 17:54:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83BA4D57; Sun, 22 Mar 2015 17:54:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MHs1Kd023540; Sun, 22 Mar 2015 17:54:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MHs1Uj023539; Sun, 22 Mar 2015 17:54:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503221754.t2MHs1Uj023539@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 22 Mar 2015 17:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280349 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 17:54:01 -0000 Author: adrian Date: Sun Mar 22 17:54:00 2015 New Revision: 280349 URL: https://svnweb.freebsd.org/changeset/base/280349 Log: Initialise the pps / packet tracking timestamp so 11n aggregation works again. There's a bug in the ticks handling where when initialised at '0', once the ticks counter wrapped the comparison math would never trigger. The pps calculation would never happen, and thus aggregation was never enabled. It manifests itself as "oh you only get 11n transmit aggregation for the first 10 minutes of uptime." I'm sure there are other ticks related issues lurking in net80211. Tested: * ath / iwn, both with 'wlandebug +11n' and a little bit of iperf to kick off the transmit A-MPDU negotiation once the pps gets high enough. Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sun Mar 22 17:29:14 2015 (r280348) +++ head/sys/net80211/ieee80211_ht.c Sun Mar 22 17:54:00 2015 (r280349) @@ -1047,6 +1047,7 @@ ieee80211_ht_node_init(struct ieee80211_ tap = &ni->ni_tx_ampdu[tid]; tap->txa_tid = tid; tap->txa_ni = ni; + tap->txa_lastsample = ticks; /* NB: further initialization deferred */ } ni->ni_flags |= IEEE80211_NODE_HT | IEEE80211_NODE_AMPDU; @@ -1216,6 +1217,7 @@ ieee80211_ht_wds_init(struct ieee80211_n for (tid = 0; tid < WME_NUM_TID; tid++) { tap = &ni->ni_tx_ampdu[tid]; tap->txa_tid = tid; + tap->txa_lastsample = ticks; } /* NB: AMPDU tx/rx governed by IEEE80211_FHT_AMPDU_{TX,RX} */ ni->ni_flags |= IEEE80211_NODE_HT | IEEE80211_NODE_AMPDU; @@ -1691,6 +1693,7 @@ ampdu_tx_setup(struct ieee80211_tx_ampdu { callout_init(&tap->txa_timer, CALLOUT_MPSAFE); tap->txa_flags |= IEEE80211_AGGR_SETUP; + tap->txa_lastsample = ticks; } static void @@ -1718,8 +1721,12 @@ ampdu_tx_stop(struct ieee80211_tx_ampdu */ bar_stop_timer(tap); - tap->txa_lastsample = 0; + /* + * Reset packet estimate. + */ + tap->txa_lastsample = ticks; tap->txa_avgpps = 0; + /* NB: clearing NAK means we may re-send ADDBA */ tap->txa_flags &= ~(IEEE80211_AGGR_SETUP | IEEE80211_AGGR_NAK); } From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 17:56:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4334FAFD; Sun, 22 Mar 2015 17:56:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D8BBD76; Sun, 22 Mar 2015 17:56:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MHupZh023968; Sun, 22 Mar 2015 17:56:51 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MHuoek023965; Sun, 22 Mar 2015 17:56:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503221756.t2MHuoek023965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 22 Mar 2015 17:56:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280350 - in head/contrib/llvm: . tools/clang tools/lldb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 17:56:51 -0000 Author: dim Date: Sun Mar 22 17:56:49 2015 New Revision: 280350 URL: https://svnweb.freebsd.org/changeset/base/280350 Log: Add FREEBSD-Xlist files for llvm, clang and lldb. These are generated, and not "optimized" in any way, since I am not entirely sure of the syntax or format of this type of file. Feel free to suggest ways of shortening these lists. The general idea is the same for all three files, though: * Get rid of upstream build infrastructure (CMakeLists, Makefiles, etc) * Delete tests, tools and utilities we don't want or use (including samples) * Remove various bits of upstream metadata files that we don't want or use (.arcconfig, .gitignore, etc) Added: head/contrib/llvm/FREEBSD-Xlist (contents, props changed) head/contrib/llvm/tools/clang/FREEBSD-Xlist (contents, props changed) head/contrib/llvm/tools/lldb/FREEBSD-Xlist (contents, props changed) Added: head/contrib/llvm/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/FREEBSD-Xlist Sun Mar 22 17:56:49 2015 (r280350) @@ -0,0 +1,514 @@ +# $FreeBSD$ +.arcconfig +.clang-format +.clang-tidy +.gitignore +CMakeLists.txt +CODE_OWNERS.TXT +CREDITS.TXT +LLVMBuild.txt +Makefile +Makefile.common +Makefile.config.in +Makefile.rules +README.txt +autoconf/ +bindings/ +cmake/ +configure +docs/ +examples/ +include/llvm/CMakeLists.txt +include/llvm/Config/ +include/llvm/IR/CMakeLists.txt +include/llvm/Support/DataTypes.h.cmake +include/llvm/Support/LICENSE.TXT +lib/Analysis/CMakeLists.txt +lib/Analysis/IPA/CMakeLists.txt +lib/Analysis/IPA/LLVMBuild.txt +lib/Analysis/IPA/Makefile +lib/Analysis/LLVMBuild.txt +lib/Analysis/Makefile +lib/Analysis/README.txt +lib/AsmParser/CMakeLists.txt +lib/AsmParser/LLVMBuild.txt +lib/AsmParser/Makefile +lib/Bitcode/CMakeLists.txt +lib/Bitcode/LLVMBuild.txt +lib/Bitcode/Makefile +lib/Bitcode/Reader/CMakeLists.txt +lib/Bitcode/Reader/LLVMBuild.txt +lib/Bitcode/Reader/Makefile +lib/Bitcode/Writer/CMakeLists.txt +lib/Bitcode/Writer/LLVMBuild.txt +lib/Bitcode/Writer/Makefile +lib/CMakeLists.txt +lib/CodeGen/AsmPrinter/CMakeLists.txt +lib/CodeGen/AsmPrinter/LLVMBuild.txt +lib/CodeGen/AsmPrinter/Makefile +lib/CodeGen/CMakeLists.txt +lib/CodeGen/LLVMBuild.txt +lib/CodeGen/Makefile +lib/CodeGen/README.txt +lib/CodeGen/SelectionDAG/CMakeLists.txt +lib/CodeGen/SelectionDAG/LLVMBuild.txt +lib/CodeGen/SelectionDAG/Makefile +lib/DebugInfo/CMakeLists.txt +lib/DebugInfo/LLVMBuild.txt +lib/DebugInfo/Makefile +lib/ExecutionEngine/CMakeLists.txt +lib/ExecutionEngine/IntelJITEvents/CMakeLists.txt +lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt +lib/ExecutionEngine/IntelJITEvents/Makefile +lib/ExecutionEngine/Interpreter/CMakeLists.txt +lib/ExecutionEngine/Interpreter/LLVMBuild.txt +lib/ExecutionEngine/Interpreter/Makefile +lib/ExecutionEngine/LLVMBuild.txt +lib/ExecutionEngine/MCJIT/CMakeLists.txt +lib/ExecutionEngine/MCJIT/LLVMBuild.txt +lib/ExecutionEngine/MCJIT/Makefile +lib/ExecutionEngine/Makefile +lib/ExecutionEngine/OProfileJIT/CMakeLists.txt +lib/ExecutionEngine/OProfileJIT/LLVMBuild.txt +lib/ExecutionEngine/OProfileJIT/Makefile +lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt +lib/ExecutionEngine/RuntimeDyld/LLVMBuild.txt +lib/ExecutionEngine/RuntimeDyld/Makefile +lib/IR/CMakeLists.txt +lib/IR/LLVMBuild.txt +lib/IR/Makefile +lib/IRReader/CMakeLists.txt +lib/IRReader/LLVMBuild.txt +lib/IRReader/Makefile +lib/LLVMBuild.txt +lib/LTO/CMakeLists.txt +lib/LTO/LLVMBuild.txt +lib/LTO/Makefile +lib/LineEditor/CMakeLists.txt +lib/LineEditor/LLVMBuild.txt +lib/LineEditor/Makefile +lib/Linker/CMakeLists.txt +lib/Linker/LLVMBuild.txt +lib/Linker/Makefile +lib/MC/CMakeLists.txt +lib/MC/LLVMBuild.txt +lib/MC/MCDisassembler/CMakeLists.txt +lib/MC/MCDisassembler/LLVMBuild.txt +lib/MC/MCDisassembler/Makefile +lib/MC/MCParser/CMakeLists.txt +lib/MC/MCParser/LLVMBuild.txt +lib/MC/MCParser/Makefile +lib/MC/Makefile +lib/Makefile +lib/Object/CMakeLists.txt +lib/Object/LLVMBuild.txt +lib/Object/Makefile +lib/Option/CMakeLists.txt +lib/Option/LLVMBuild.txt +lib/Option/Makefile +lib/ProfileData/CMakeLists.txt +lib/ProfileData/LLVMBuild.txt +lib/ProfileData/Makefile +lib/Support/CMakeLists.txt +lib/Support/LLVMBuild.txt +lib/Support/Makefile +lib/Support/README.txt.system +lib/TableGen/CMakeLists.txt +lib/TableGen/LLVMBuild.txt +lib/TableGen/Makefile +lib/Target/AArch64/AsmParser/CMakeLists.txt +lib/Target/AArch64/AsmParser/LLVMBuild.txt +lib/Target/AArch64/AsmParser/Makefile +lib/Target/AArch64/CMakeLists.txt +lib/Target/AArch64/Disassembler/CMakeLists.txt +lib/Target/AArch64/Disassembler/LLVMBuild.txt +lib/Target/AArch64/Disassembler/Makefile +lib/Target/AArch64/InstPrinter/CMakeLists.txt +lib/Target/AArch64/InstPrinter/LLVMBuild.txt +lib/Target/AArch64/InstPrinter/Makefile +lib/Target/AArch64/LLVMBuild.txt +lib/Target/AArch64/MCTargetDesc/CMakeLists.txt +lib/Target/AArch64/MCTargetDesc/LLVMBuild.txt +lib/Target/AArch64/MCTargetDesc/Makefile +lib/Target/AArch64/Makefile +lib/Target/AArch64/TargetInfo/CMakeLists.txt +lib/Target/AArch64/TargetInfo/LLVMBuild.txt +lib/Target/AArch64/TargetInfo/Makefile +lib/Target/AArch64/Utils/CMakeLists.txt +lib/Target/AArch64/Utils/LLVMBuild.txt +lib/Target/AArch64/Utils/Makefile +lib/Target/ARM/AsmParser/CMakeLists.txt +lib/Target/ARM/AsmParser/LLVMBuild.txt +lib/Target/ARM/AsmParser/Makefile +lib/Target/ARM/CMakeLists.txt +lib/Target/ARM/Disassembler/CMakeLists.txt +lib/Target/ARM/Disassembler/LLVMBuild.txt +lib/Target/ARM/Disassembler/Makefile +lib/Target/ARM/InstPrinter/CMakeLists.txt +lib/Target/ARM/InstPrinter/LLVMBuild.txt +lib/Target/ARM/InstPrinter/Makefile +lib/Target/ARM/LLVMBuild.txt +lib/Target/ARM/MCTargetDesc/CMakeLists.txt +lib/Target/ARM/MCTargetDesc/LLVMBuild.txt +lib/Target/ARM/MCTargetDesc/Makefile +lib/Target/ARM/Makefile +lib/Target/ARM/README-Thumb.txt +lib/Target/ARM/README-Thumb2.txt +lib/Target/ARM/README.txt +lib/Target/ARM/TargetInfo/CMakeLists.txt +lib/Target/ARM/TargetInfo/LLVMBuild.txt +lib/Target/ARM/TargetInfo/Makefile +lib/Target/CMakeLists.txt +lib/Target/CppBackend/CMakeLists.txt +lib/Target/CppBackend/LLVMBuild.txt +lib/Target/CppBackend/Makefile +lib/Target/CppBackend/TargetInfo/CMakeLists.txt +lib/Target/CppBackend/TargetInfo/LLVMBuild.txt +lib/Target/CppBackend/TargetInfo/Makefile +lib/Target/Hexagon/CMakeLists.txt +lib/Target/Hexagon/Disassembler/CMakeLists.txt +lib/Target/Hexagon/Disassembler/LLVMBuild.txt +lib/Target/Hexagon/Disassembler/Makefile +lib/Target/Hexagon/LLVMBuild.txt +lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt +lib/Target/Hexagon/MCTargetDesc/LLVMBuild.txt +lib/Target/Hexagon/MCTargetDesc/Makefile +lib/Target/Hexagon/Makefile +lib/Target/Hexagon/TargetInfo/CMakeLists.txt +lib/Target/Hexagon/TargetInfo/LLVMBuild.txt +lib/Target/Hexagon/TargetInfo/Makefile +lib/Target/LLVMBuild.txt +lib/Target/MSP430/CMakeLists.txt +lib/Target/MSP430/InstPrinter/CMakeLists.txt +lib/Target/MSP430/InstPrinter/LLVMBuild.txt +lib/Target/MSP430/InstPrinter/Makefile +lib/Target/MSP430/LLVMBuild.txt +lib/Target/MSP430/MCTargetDesc/CMakeLists.txt +lib/Target/MSP430/MCTargetDesc/LLVMBuild.txt +lib/Target/MSP430/MCTargetDesc/Makefile +lib/Target/MSP430/Makefile +lib/Target/MSP430/README.txt +lib/Target/MSP430/TargetInfo/CMakeLists.txt +lib/Target/MSP430/TargetInfo/LLVMBuild.txt +lib/Target/MSP430/TargetInfo/Makefile +lib/Target/Makefile +lib/Target/Mips/AsmParser/CMakeLists.txt +lib/Target/Mips/AsmParser/LLVMBuild.txt +lib/Target/Mips/AsmParser/Makefile +lib/Target/Mips/CMakeLists.txt +lib/Target/Mips/Disassembler/CMakeLists.txt +lib/Target/Mips/Disassembler/LLVMBuild.txt +lib/Target/Mips/Disassembler/Makefile +lib/Target/Mips/InstPrinter/CMakeLists.txt +lib/Target/Mips/InstPrinter/LLVMBuild.txt +lib/Target/Mips/InstPrinter/Makefile +lib/Target/Mips/LLVMBuild.txt +lib/Target/Mips/MCTargetDesc/CMakeLists.txt +lib/Target/Mips/MCTargetDesc/LLVMBuild.txt +lib/Target/Mips/MCTargetDesc/Makefile +lib/Target/Mips/Makefile +lib/Target/Mips/TargetInfo/CMakeLists.txt +lib/Target/Mips/TargetInfo/LLVMBuild.txt +lib/Target/Mips/TargetInfo/Makefile +lib/Target/NVPTX/CMakeLists.txt +lib/Target/NVPTX/InstPrinter/CMakeLists.txt +lib/Target/NVPTX/InstPrinter/LLVMBuild.txt +lib/Target/NVPTX/InstPrinter/Makefile +lib/Target/NVPTX/LLVMBuild.txt +lib/Target/NVPTX/MCTargetDesc/CMakeLists.txt +lib/Target/NVPTX/MCTargetDesc/LLVMBuild.txt +lib/Target/NVPTX/MCTargetDesc/Makefile +lib/Target/NVPTX/Makefile +lib/Target/NVPTX/TargetInfo/CMakeLists.txt +lib/Target/NVPTX/TargetInfo/LLVMBuild.txt +lib/Target/NVPTX/TargetInfo/Makefile +lib/Target/PowerPC/AsmParser/CMakeLists.txt +lib/Target/PowerPC/AsmParser/LLVMBuild.txt +lib/Target/PowerPC/AsmParser/Makefile +lib/Target/PowerPC/CMakeLists.txt +lib/Target/PowerPC/Disassembler/CMakeLists.txt +lib/Target/PowerPC/Disassembler/LLVMBuild.txt +lib/Target/PowerPC/Disassembler/Makefile +lib/Target/PowerPC/InstPrinter/CMakeLists.txt +lib/Target/PowerPC/InstPrinter/LLVMBuild.txt +lib/Target/PowerPC/InstPrinter/Makefile +lib/Target/PowerPC/LLVMBuild.txt +lib/Target/PowerPC/MCTargetDesc/CMakeLists.txt +lib/Target/PowerPC/MCTargetDesc/LLVMBuild.txt +lib/Target/PowerPC/MCTargetDesc/Makefile +lib/Target/PowerPC/Makefile +lib/Target/PowerPC/README.txt +lib/Target/PowerPC/README_ALTIVEC.txt +lib/Target/PowerPC/TargetInfo/CMakeLists.txt +lib/Target/PowerPC/TargetInfo/LLVMBuild.txt +lib/Target/PowerPC/TargetInfo/Makefile +lib/Target/R600/AsmParser/CMakeLists.txt +lib/Target/R600/AsmParser/LLVMBuild.txt +lib/Target/R600/AsmParser/Makefile +lib/Target/R600/CMakeLists.txt +lib/Target/R600/InstPrinter/CMakeLists.txt +lib/Target/R600/InstPrinter/LLVMBuild.txt +lib/Target/R600/InstPrinter/Makefile +lib/Target/R600/LLVMBuild.txt +lib/Target/R600/MCTargetDesc/CMakeLists.txt +lib/Target/R600/MCTargetDesc/LLVMBuild.txt +lib/Target/R600/MCTargetDesc/Makefile +lib/Target/R600/Makefile +lib/Target/R600/TargetInfo/CMakeLists.txt +lib/Target/R600/TargetInfo/LLVMBuild.txt +lib/Target/R600/TargetInfo/Makefile +lib/Target/README.txt +lib/Target/Sparc/AsmParser/CMakeLists.txt +lib/Target/Sparc/AsmParser/LLVMBuild.txt +lib/Target/Sparc/AsmParser/Makefile +lib/Target/Sparc/CMakeLists.txt +lib/Target/Sparc/Disassembler/CMakeLists.txt +lib/Target/Sparc/Disassembler/LLVMBuild.txt +lib/Target/Sparc/Disassembler/Makefile +lib/Target/Sparc/InstPrinter/CMakeLists.txt +lib/Target/Sparc/InstPrinter/LLVMBuild.txt +lib/Target/Sparc/InstPrinter/Makefile +lib/Target/Sparc/LLVMBuild.txt +lib/Target/Sparc/MCTargetDesc/CMakeLists.txt +lib/Target/Sparc/MCTargetDesc/LLVMBuild.txt +lib/Target/Sparc/MCTargetDesc/Makefile +lib/Target/Sparc/Makefile +lib/Target/Sparc/README.txt +lib/Target/Sparc/TargetInfo/CMakeLists.txt +lib/Target/Sparc/TargetInfo/LLVMBuild.txt +lib/Target/Sparc/TargetInfo/Makefile +lib/Target/SystemZ/AsmParser/CMakeLists.txt +lib/Target/SystemZ/AsmParser/LLVMBuild.txt +lib/Target/SystemZ/AsmParser/Makefile +lib/Target/SystemZ/CMakeLists.txt +lib/Target/SystemZ/Disassembler/CMakeLists.txt +lib/Target/SystemZ/Disassembler/LLVMBuild.txt +lib/Target/SystemZ/Disassembler/Makefile +lib/Target/SystemZ/InstPrinter/CMakeLists.txt +lib/Target/SystemZ/InstPrinter/LLVMBuild.txt +lib/Target/SystemZ/InstPrinter/Makefile +lib/Target/SystemZ/LLVMBuild.txt +lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt +lib/Target/SystemZ/MCTargetDesc/LLVMBuild.txt +lib/Target/SystemZ/MCTargetDesc/Makefile +lib/Target/SystemZ/Makefile +lib/Target/SystemZ/TargetInfo/CMakeLists.txt +lib/Target/SystemZ/TargetInfo/LLVMBuild.txt +lib/Target/SystemZ/TargetInfo/Makefile +lib/Target/X86/AsmParser/CMakeLists.txt +lib/Target/X86/AsmParser/LLVMBuild.txt +lib/Target/X86/AsmParser/Makefile +lib/Target/X86/CMakeLists.txt +lib/Target/X86/Disassembler/CMakeLists.txt +lib/Target/X86/Disassembler/LLVMBuild.txt +lib/Target/X86/Disassembler/Makefile +lib/Target/X86/InstPrinter/CMakeLists.txt +lib/Target/X86/InstPrinter/LLVMBuild.txt +lib/Target/X86/InstPrinter/Makefile +lib/Target/X86/LLVMBuild.txt +lib/Target/X86/MCTargetDesc/CMakeLists.txt +lib/Target/X86/MCTargetDesc/LLVMBuild.txt +lib/Target/X86/MCTargetDesc/Makefile +lib/Target/X86/Makefile +lib/Target/X86/README-FPStack.txt +lib/Target/X86/README-MMX.txt +lib/Target/X86/README-SSE.txt +lib/Target/X86/README-UNIMPLEMENTED.txt +lib/Target/X86/README-X86-64.txt +lib/Target/X86/README.txt +lib/Target/X86/TargetInfo/CMakeLists.txt +lib/Target/X86/TargetInfo/LLVMBuild.txt +lib/Target/X86/TargetInfo/Makefile +lib/Target/X86/Utils/CMakeLists.txt +lib/Target/X86/Utils/LLVMBuild.txt +lib/Target/X86/Utils/Makefile +lib/Target/X86/X86CompilationCallback_Win64.asm +lib/Target/XCore/CMakeLists.txt +lib/Target/XCore/Disassembler/CMakeLists.txt +lib/Target/XCore/Disassembler/LLVMBuild.txt +lib/Target/XCore/Disassembler/Makefile +lib/Target/XCore/InstPrinter/CMakeLists.txt +lib/Target/XCore/InstPrinter/LLVMBuild.txt +lib/Target/XCore/InstPrinter/Makefile +lib/Target/XCore/LLVMBuild.txt +lib/Target/XCore/MCTargetDesc/CMakeLists.txt +lib/Target/XCore/MCTargetDesc/LLVMBuild.txt +lib/Target/XCore/MCTargetDesc/Makefile +lib/Target/XCore/Makefile +lib/Target/XCore/README.txt +lib/Target/XCore/TargetInfo/CMakeLists.txt +lib/Target/XCore/TargetInfo/LLVMBuild.txt +lib/Target/XCore/TargetInfo/Makefile +lib/Transforms/CMakeLists.txt +lib/Transforms/Hello/ +lib/Transforms/IPO/CMakeLists.txt +lib/Transforms/IPO/LLVMBuild.txt +lib/Transforms/IPO/Makefile +lib/Transforms/InstCombine/CMakeLists.txt +lib/Transforms/InstCombine/LLVMBuild.txt +lib/Transforms/InstCombine/Makefile +lib/Transforms/Instrumentation/CMakeLists.txt +lib/Transforms/Instrumentation/LLVMBuild.txt +lib/Transforms/Instrumentation/Makefile +lib/Transforms/LLVMBuild.txt +lib/Transforms/Makefile +lib/Transforms/ObjCARC/CMakeLists.txt +lib/Transforms/ObjCARC/LLVMBuild.txt +lib/Transforms/ObjCARC/Makefile +lib/Transforms/Scalar/CMakeLists.txt +lib/Transforms/Scalar/LLVMBuild.txt +lib/Transforms/Scalar/Makefile +lib/Transforms/Utils/CMakeLists.txt +lib/Transforms/Utils/LLVMBuild.txt +lib/Transforms/Utils/Makefile +lib/Transforms/Vectorize/CMakeLists.txt +lib/Transforms/Vectorize/LLVMBuild.txt +lib/Transforms/Vectorize/Makefile +llvm.spec.in +projects/ +test/ +tools/CMakeLists.txt +tools/LLVMBuild.txt +tools/Makefile +tools/bugpoint/CMakeLists.txt +tools/bugpoint/LLVMBuild.txt +tools/bugpoint/Makefile +tools/bugpoint-passes/ +tools/dsymutil/ +tools/gold/ +tools/llc/CMakeLists.txt +tools/llc/LLVMBuild.txt +tools/llc/Makefile +tools/lli/CMakeLists.txt +tools/lli/ChildTarget/CMakeLists.txt +tools/lli/ChildTarget/LLVMBuild.txt +tools/lli/ChildTarget/Makefile +tools/lli/LLVMBuild.txt +tools/lli/Makefile +tools/llvm-ar/CMakeLists.txt +tools/llvm-ar/LLVMBuild.txt +tools/llvm-ar/Makefile +tools/llvm-ar/install_symlink.cmake +tools/llvm-as/CMakeLists.txt +tools/llvm-as/LLVMBuild.txt +tools/llvm-as/Makefile +tools/llvm-bcanalyzer/CMakeLists.txt +tools/llvm-bcanalyzer/LLVMBuild.txt +tools/llvm-bcanalyzer/Makefile +tools/llvm-c-test/ +tools/llvm-config/ +tools/llvm-cov/ +tools/llvm-diff/CMakeLists.txt +tools/llvm-diff/LLVMBuild.txt +tools/llvm-diff/Makefile +tools/llvm-dis/CMakeLists.txt +tools/llvm-dis/LLVMBuild.txt +tools/llvm-dis/Makefile +tools/llvm-dwarfdump/ +tools/llvm-extract/CMakeLists.txt +tools/llvm-extract/LLVMBuild.txt +tools/llvm-extract/Makefile +tools/llvm-go/ +tools/llvm-jitlistener/ +tools/llvm-link/CMakeLists.txt +tools/llvm-link/LLVMBuild.txt +tools/llvm-link/Makefile +tools/llvm-lto/ +tools/llvm-mc/CMakeLists.txt +tools/llvm-mc/LLVMBuild.txt +tools/llvm-mc/Makefile +tools/llvm-mcmarkup/ +tools/llvm-nm/CMakeLists.txt +tools/llvm-nm/LLVMBuild.txt +tools/llvm-nm/Makefile +tools/llvm-objdump/CMakeLists.txt +tools/llvm-objdump/LLVMBuild.txt +tools/llvm-objdump/Makefile +tools/llvm-profdata/ +tools/llvm-readobj/CMakeLists.txt +tools/llvm-readobj/LLVMBuild.txt +tools/llvm-readobj/Makefile +tools/llvm-rtdyld/CMakeLists.txt +tools/llvm-rtdyld/LLVMBuild.txt +tools/llvm-rtdyld/Makefile +tools/llvm-shlib/ +tools/llvm-size/ +tools/llvm-stress/CMakeLists.txt +tools/llvm-stress/LLVMBuild.txt +tools/llvm-stress/Makefile +tools/llvm-symbolizer/CMakeLists.txt +tools/llvm-symbolizer/Makefile +tools/llvm-vtabledump/ +tools/lto/ +tools/macho-dump/CMakeLists.txt +tools/macho-dump/LLVMBuild.txt +tools/macho-dump/Makefile +tools/msbuild/ +tools/obj2yaml/ +tools/opt/CMakeLists.txt +tools/opt/LLVMBuild.txt +tools/opt/Makefile +tools/verify-uselistorder/ +tools/yaml2obj/ +unittests/ +utils/DSAclean.py +utils/DSAextract.py +utils/FileCheck/ +utils/GenLibDeps.pl +utils/GetRepositoryPath +utils/GetSourceVersion +utils/KillTheDoctor/ +utils/LLVMBuild.txt +utils/Makefile +utils/Misc/ +utils/PerfectShuffle/ +utils/TableGen/CMakeLists.txt +utils/TableGen/LLVMBuild.txt +utils/TableGen/Makefile +utils/TableGen/tdtags +utils/Target/ +utils/UpdateCMakeLists.pl +utils/bisect +utils/bugpoint/ +utils/buildit/ +utils/check-each-file +utils/clang-parse-diagnostics-file +utils/codegen-diff +utils/count/ +utils/countloc.sh +utils/crosstool/ +utils/emacs/ +utils/findmisopt +utils/findoptdiff +utils/findsym.pl +utils/fpcmp/ +utils/getsrcs.sh +utils/git/ +utils/git-svn/ +utils/jedit/ +utils/kate/ +utils/lint/ +utils/lit/ +utils/lldbDataFormatters.py +utils/llvm-build/ +utils/llvm-compilers-check +utils/llvm-lit/ +utils/llvm-native-gxx +utils/llvm.grm +utils/llvm.natvis +utils/llvmdo +utils/llvmgrep +utils/makellvm +utils/not/ +utils/release/ +utils/shuffle_fuzz.py +utils/sort_includes.py +utils/test_debuginfo.pl +utils/testgen/ +utils/textmate/ +utils/unittest/ +utils/update_llc_test_checks.py +utils/valgrind/ +utils/vim/ +utils/wciia.py +utils/yaml-bench/ Added: head/contrib/llvm/tools/clang/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/tools/clang/FREEBSD-Xlist Sun Mar 22 17:56:49 2015 (r280350) @@ -0,0 +1,131 @@ +# $FreeBSD$ +.arcconfig +.clang-format +.clang-tidy +.gitignore +CMakeLists.txt +CODE_OWNERS.TXT +INPUTS/ +INSTALL.txt +Makefile +ModuleInfo.txt +NOTES.txt +README.txt +bindings/ +cmake/ +docs/ +examples/ +include/CMakeLists.txt +include/Makefile +include/clang/AST/CMakeLists.txt +include/clang/AST/Makefile +include/clang/Basic/CMakeLists.txt +include/clang/Basic/Makefile +include/clang/Basic/Version.inc.in +include/clang/CMakeLists.txt +include/clang/Config/ +include/clang/Driver/CMakeLists.txt +include/clang/Driver/Makefile +include/clang/Makefile +include/clang/Parse/CMakeLists.txt +include/clang/Parse/Makefile +include/clang/Sema/CMakeLists.txt +include/clang/Sema/Makefile +include/clang/Serialization/CMakeLists.txt +include/clang/Serialization/Makefile +include/clang-c/Makefile +lib/ARCMigrate/CMakeLists.txt +lib/ARCMigrate/Makefile +lib/AST/CMakeLists.txt +lib/AST/Makefile +lib/ASTMatchers/CMakeLists.txt +lib/ASTMatchers/Dynamic/CMakeLists.txt +lib/ASTMatchers/Dynamic/Makefile +lib/ASTMatchers/Makefile +lib/Analysis/CMakeLists.txt +lib/Analysis/Makefile +lib/Basic/CMakeLists.txt +lib/Basic/Makefile +lib/CMakeLists.txt +lib/CodeGen/CMakeLists.txt +lib/CodeGen/Makefile +lib/CodeGen/README.txt +lib/Driver/CMakeLists.txt +lib/Driver/Makefile +lib/Edit/CMakeLists.txt +lib/Edit/Makefile +lib/Format/CMakeLists.txt +lib/Format/Makefile +lib/Frontend/CMakeLists.txt +lib/Frontend/Makefile +lib/Frontend/Rewrite/CMakeLists.txt +lib/Frontend/Rewrite/Makefile +lib/FrontendTool/CMakeLists.txt +lib/FrontendTool/Makefile +lib/Headers/CMakeLists.txt +lib/Headers/Makefile +lib/Index/CMakeLists.txt +lib/Index/Makefile +lib/Lex/CMakeLists.txt +lib/Lex/Makefile +lib/Makefile +lib/Parse/CMakeLists.txt +lib/Parse/Makefile +lib/Rewrite/CMakeLists.txt +lib/Rewrite/Makefile +lib/Sema/CMakeLists.txt +lib/Sema/Makefile +lib/Serialization/CMakeLists.txt +lib/Serialization/Makefile +lib/StaticAnalyzer/CMakeLists.txt +lib/StaticAnalyzer/Checkers/CMakeLists.txt +lib/StaticAnalyzer/Checkers/Makefile +lib/StaticAnalyzer/Core/CMakeLists.txt +lib/StaticAnalyzer/Core/Makefile +lib/StaticAnalyzer/Frontend/CMakeLists.txt +lib/StaticAnalyzer/Frontend/Makefile +lib/StaticAnalyzer/Makefile +lib/StaticAnalyzer/README.txt +lib/Tooling/CMakeLists.txt +lib/Tooling/Core/CMakeLists.txt +lib/Tooling/Core/Makefile +lib/Tooling/Makefile +runtime/ +test/ +tools/CMakeLists.txt +tools/Makefile +tools/arcmt-test/ +tools/c-arcmt-test/ +tools/c-index-test/ +tools/clang-check/ +tools/clang-format/ +tools/clang-format-vs/ +tools/diag-build/ +tools/diagtool/ +tools/driver/CMakeLists.txt +tools/driver/Info.plist.in +tools/driver/Makefile +tools/driver/clang_symlink.cmake +tools/libclang/ +tools/scan-build/ +tools/scan-view/ +unittests/ +utils/ABITest/ +utils/CIndex/ +utils/CaptureCmd +utils/ClangDataFormat.py +utils/CmpDriver +utils/FindSpecRefs +utils/FuzzTest +utils/TableGen/CMakeLists.txt +utils/TableGen/Makefile +utils/TestUtils/ +utils/VtableTest/ +utils/analyzer/ +utils/builtin-defines.c +utils/clang-completion-mode.el +utils/clang.natvis +utils/find-unused-diagnostics.sh +utils/token-delta.py +utils/valgrind/ +www/ Added: head/contrib/llvm/tools/lldb/FREEBSD-Xlist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/tools/lldb/FREEBSD-Xlist Sun Mar 22 17:56:49 2015 (r280350) @@ -0,0 +1,186 @@ +# $FreeBSD$ +.arcconfig +.clang-format +.gitignore +CMakeLists.txt +INSTALL.txt +Makefile +cmake/ +docs/CMakeLists.txt +docs/building-with-debug-llvm.txt +docs/code-signing.txt +docs/doxygen.cfg.in +docs/doxygen.footer +docs/doxygen.header +docs/doxygen.intro +docs/lldb-for-gdb-users.txt +docs/lldb-gdb-remote.txt +docs/testsuite/ +examples/ +gtest/ +include/Makefile +include/lldb/Host/android/ +include/lldb/Host/linux/ +include/lldb/Host/macosx/ +include/lldb/Host/mingw/ +include/lldb/Host/msvc/ +include/lldb/Host/windows/ +include/lldb/Makefile +lib/ +lldb.xcodeproj/ +lldb.xcworkspace/ +resources/ +scripts/ +source/API/CMakeLists.txt +source/API/Makefile +source/Breakpoint/CMakeLists.txt +source/Breakpoint/Makefile +source/CMakeLists.txt +source/Commands/CMakeLists.txt +source/Commands/Makefile +source/Core/CMakeLists.txt +source/Core/Makefile +source/DataFormatters/CMakeLists.txt +source/DataFormatters/Makefile +source/Expression/CMakeLists.txt +source/Expression/Makefile +source/Host/CMakeLists.txt +source/Host/Makefile +source/Host/common/Makefile +source/Host/freebsd/Makefile +source/Host/linux/ +source/Host/macosx/ +source/Host/posix/Makefile +source/Host/windows/ +source/Interpreter/CMakeLists.txt +source/Interpreter/Makefile +source/Makefile +source/Plugins/ABI/CMakeLists.txt +source/Plugins/ABI/MacOSX-arm/CMakeLists.txt +source/Plugins/ABI/MacOSX-arm/Makefile +source/Plugins/ABI/MacOSX-arm64/CMakeLists.txt +source/Plugins/ABI/MacOSX-arm64/Makefile +source/Plugins/ABI/MacOSX-i386/CMakeLists.txt +source/Plugins/ABI/MacOSX-i386/Makefile +source/Plugins/ABI/SysV-hexagon/CMakeLists.txt +source/Plugins/ABI/SysV-hexagon/Makefile +source/Plugins/ABI/SysV-ppc/CMakeLists.txt +source/Plugins/ABI/SysV-ppc/Makefile +source/Plugins/ABI/SysV-ppc64/CMakeLists.txt +source/Plugins/ABI/SysV-ppc64/Makefile +source/Plugins/ABI/SysV-x86_64/CMakeLists.txt +source/Plugins/ABI/SysV-x86_64/Makefile +source/Plugins/CMakeLists.txt +source/Plugins/Disassembler/CMakeLists.txt +source/Plugins/Disassembler/llvm/CMakeLists.txt +source/Plugins/Disassembler/llvm/Makefile +source/Plugins/DynamicLoader/CMakeLists.txt +source/Plugins/DynamicLoader/Darwin-Kernel/ +source/Plugins/DynamicLoader/Hexagon-DYLD/CMakeLists.txt +source/Plugins/DynamicLoader/Hexagon-DYLD/Makefile +source/Plugins/DynamicLoader/MacOSX-DYLD/ +source/Plugins/DynamicLoader/POSIX-DYLD/CMakeLists.txt +source/Plugins/DynamicLoader/POSIX-DYLD/Makefile +source/Plugins/DynamicLoader/Static/CMakeLists.txt +source/Plugins/DynamicLoader/Static/Makefile +source/Plugins/Instruction/ARM/CMakeLists.txt +source/Plugins/Instruction/ARM/Makefile +source/Plugins/Instruction/ARM64/CMakeLists.txt +source/Plugins/Instruction/ARM64/Makefile +source/Plugins/Instruction/CMakeLists.txt +source/Plugins/InstrumentationRuntime/AddressSanitizer/CMakeLists.txt +source/Plugins/InstrumentationRuntime/AddressSanitizer/Makefile +source/Plugins/InstrumentationRuntime/CMakeLists.txt +source/Plugins/JITLoader/CMakeLists.txt +source/Plugins/JITLoader/GDB/CMakeLists.txt +source/Plugins/JITLoader/GDB/Makefile +source/Plugins/LanguageRuntime/CMakeLists.txt +source/Plugins/LanguageRuntime/CPlusPlus/CMakeLists.txt +source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/CMakeLists.txt +source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/Makefile +source/Plugins/LanguageRuntime/ObjC/ +source/Plugins/Makefile +source/Plugins/MemoryHistory/CMakeLists.txt +source/Plugins/MemoryHistory/asan/CMakeLists.txt +source/Plugins/MemoryHistory/asan/Makefile +source/Plugins/ObjectContainer/BSD-Archive/CMakeLists.txt +source/Plugins/ObjectContainer/BSD-Archive/Makefile +source/Plugins/ObjectContainer/CMakeLists.txt +source/Plugins/ObjectContainer/Universal-Mach-O/ +source/Plugins/ObjectFile/CMakeLists.txt +source/Plugins/ObjectFile/ELF/CMakeLists.txt +source/Plugins/ObjectFile/ELF/Makefile +source/Plugins/ObjectFile/JIT/CMakeLists.txt +source/Plugins/ObjectFile/JIT/Makefile +source/Plugins/ObjectFile/Mach-O/ +source/Plugins/ObjectFile/PECOFF/ +source/Plugins/OperatingSystem/CMakeLists.txt +source/Plugins/OperatingSystem/Python/CMakeLists.txt +source/Plugins/OperatingSystem/Python/Makefile +source/Plugins/Platform/CMakeLists.txt +source/Plugins/Platform/FreeBSD/CMakeLists.txt +source/Plugins/Platform/FreeBSD/Makefile +source/Plugins/Platform/Kalimba/ +source/Plugins/Platform/Linux/ +source/Plugins/Platform/MacOSX/ +source/Plugins/Platform/Makefile +source/Plugins/Platform/POSIX/CMakeLists.txt +source/Plugins/Platform/POSIX/Makefile +source/Plugins/Platform/Windows/ +source/Plugins/Platform/gdb-server/CMakeLists.txt +source/Plugins/Platform/gdb-server/Makefile +source/Plugins/Process/CMakeLists.txt +source/Plugins/Process/FreeBSD/CMakeLists.txt +source/Plugins/Process/FreeBSD/Makefile +source/Plugins/Process/Linux/ +source/Plugins/Process/MacOSX-Kernel/ +source/Plugins/Process/POSIX/CMakeLists.txt +source/Plugins/Process/POSIX/Makefile +source/Plugins/Process/Utility/CMakeLists.txt +source/Plugins/Process/Utility/Makefile +source/Plugins/Process/Windows/ +source/Plugins/Process/elf-core/CMakeLists.txt +source/Plugins/Process/elf-core/Makefile +source/Plugins/Process/gdb-remote/CMakeLists.txt +source/Plugins/Process/gdb-remote/Makefile +source/Plugins/Process/mach-core/ +source/Plugins/SymbolFile/CMakeLists.txt +source/Plugins/SymbolFile/DWARF/CMakeLists.txt +source/Plugins/SymbolFile/DWARF/Makefile +source/Plugins/SymbolFile/Symtab/CMakeLists.txt +source/Plugins/SymbolFile/Symtab/Makefile +source/Plugins/SymbolVendor/CMakeLists.txt +source/Plugins/SymbolVendor/ELF/CMakeLists.txt +source/Plugins/SymbolVendor/ELF/Makefile +source/Plugins/SymbolVendor/MacOSX/ +source/Plugins/SystemRuntime/ +source/Plugins/UnwindAssembly/CMakeLists.txt +source/Plugins/UnwindAssembly/InstEmulation/CMakeLists.txt +source/Plugins/UnwindAssembly/InstEmulation/Makefile +source/Plugins/UnwindAssembly/x86/CMakeLists.txt +source/Plugins/UnwindAssembly/x86/Makefile +source/Symbol/CMakeLists.txt +source/Symbol/Makefile +source/Target/CMakeLists.txt +source/Target/Makefile +source/Utility/CMakeLists.txt +source/Utility/Makefile +test/ +tools/CMakeLists.txt +tools/Makefile +tools/darwin-debug/ +tools/darwin-threads/ +tools/debugserver/ +tools/driver/CMakeLists.txt +tools/driver/Makefile +tools/driver/lldb-Info.plist +tools/install-headers/ +tools/lldb-gdbserver/ +tools/lldb-mi/CMakeLists.txt +tools/lldb-mi/Makefile +tools/lldb-mi/lldb-Info.plist +tools/lldb-perf/ +tools/lldb-platform/CMakeLists.txt +tools/lldb-platform/Makefile +utils/ +www/ From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 18:12:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE449FBE; Sun, 22 Mar 2015 18:12:05 +0000 (UTC) Received: from mail-ie0-x233.google.com (mail-ie0-x233.google.com [IPv6:2607:f8b0:4001:c03::233]) (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 73E9BF43; Sun, 22 Mar 2015 18:12:05 +0000 (UTC) Received: by iedfl3 with SMTP id fl3so25315830ied.1; Sun, 22 Mar 2015 11:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=hOy59qNCw1ONOaQ40QCOTmV24O4hKExVk/tJaIgZvYY=; b=JM7dneiOl6HAR6PYsR9BJ4V3aXMnqr+3D/V5QkMHKg3ZpUDRiMcm407o0VCAX1DNPj L/QgPtvoWfCisf67LjRyuMi35DeT3UyJAojcFfvqYWGi2nPGy8+uk1TBQQZWugwps8++ TKBU6Z0hcmJBzdhNQ812epKvwrImKbz9ximTAB8sRh//i6DhhCDRL7xn9PgmaLvHh7Ed sjLMayv8YhDjoT/XeaBJd8TNFAwNmDwOzf2g/eVaIBaEyX96l4eQU+4y+7NOwVpwiG4t /hSnxrSaDS1UrrDDws8E87ot9rx17TmvxFYcv/T9Wn1/XSxz11EZELaxcwJp9lySndij cI6g== MIME-Version: 1.0 X-Received: by 10.42.93.83 with SMTP id w19mr15405904icm.37.1427047924944; Sun, 22 Mar 2015 11:12:04 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sun, 22 Mar 2015 11:12:04 -0700 (PDT) In-Reply-To: <20150322100834.GA88392@FreeBSD.org> References: <201503220215.t2M2FAD9084914@svn.freebsd.org> <20150322100834.GA88392@FreeBSD.org> Date: Sun, 22 Mar 2015 11:12:04 -0700 X-Google-Sender-Auth: USPrpOV-My4PmsvDZ3nyQmqNQuU Message-ID: Subject: Re: svn commit: r280337 - head/sys/mips/conf From: Adrian Chadd To: Alexey Dokuchaev Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 18:12:05 -0000 On 22 March 2015 at 03:08, Alexey Dokuchaev wrote: > On Sun, Mar 22, 2015 at 02:15:10AM +0000, Adrian Chadd wrote: >> New Revision: 280337 >> URL: https://svnweb.freebsd.org/changeset/base/280337 >> >> Log: >> Add initial D-Link DIR-655 (A1) support. >> >> This is based on the AP135 design - QCA9558 SoC, 3x3 2GHz wifi, but no >> 5GHz (11n or 11ac) chip is available. >> >> It however still has 128MiB of RAM, 16MiB of NOR flash and the AR8327N >> gigabit switch - so it's quite a beefy router device. > > Thanks for working on those guys Adrian! I've always avoided these type > of "small box" routers: few years ago their CPU would typically not being > able to saturate even 100Mbit/s; recently they became powerful enough, but > having to run OpenWRT made me always prefer to fetch some Mendocino-based > board from the back-yard junk and install FreeBSD to get a decent router. Heh, you're welcome. The AR71xx and later CPUs have been able to do > 100mbit/sec for quite some time. > Good to know that soon I could simply get one of those small, fanless Gbit > Chinese switches instead (and I'd probably run out of Mendocinos anyways > by that time :-). if_arge need some attention to improve throughput. I'm totally all for someone owning that. :) -a From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 18:17:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D506E4AA; Sun, 22 Mar 2015 18:17:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0F27FA4; Sun, 22 Mar 2015 18:17:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MIHuWx034306; Sun, 22 Mar 2015 18:17:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MIHu8v034305; Sun, 22 Mar 2015 18:17:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503221817.t2MIHu8v034305@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 22 Mar 2015 18:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280351 - head/sys/boot/amd64/efi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 18:17:57 -0000 Author: andrew Date: Sun Mar 22 18:17:55 2015 New Revision: 280351 URL: https://svnweb.freebsd.org/changeset/base/280351 Log: Stop calling x86_efi_copyin and x86_efi_getdev directly. This is to help port loader.efi to both 32 and 64-bit ARM where we can use this file with minimal changes. Differential Revision: https://reviews.freebsd.org/D2031 Reviewed by: imp Modified: head/sys/boot/amd64/efi/bootinfo.c Modified: head/sys/boot/amd64/efi/bootinfo.c ============================================================================== --- head/sys/boot/amd64/efi/bootinfo.c Sun Mar 22 17:56:49 2015 (r280350) +++ head/sys/boot/amd64/efi/bootinfo.c Sun Mar 22 18:17:55 2015 (r280351) @@ -114,24 +114,24 @@ bi_copyenv(vm_offset_t start) /* Traverse the environment. */ for (ep = environ; ep != NULL; ep = ep->ev_next) { len = strlen(ep->ev_name); - if (x86_efi_copyin(ep->ev_name, addr, len) != len) + if (archsw.arch_copyin(ep->ev_name, addr, len) != len) break; addr += len; - if (x86_efi_copyin("=", addr, 1) != 1) + if (archsw.arch_copyin("=", addr, 1) != 1) break; addr++; if (ep->ev_value != NULL) { len = strlen(ep->ev_value); - if (x86_efi_copyin(ep->ev_value, addr, len) != len) + if (archsw.arch_copyin(ep->ev_value, addr, len) != len) break; addr += len; } - if (x86_efi_copyin("", addr, 1) != 1) + if (archsw.arch_copyin("", addr, 1) != 1) break; last = ++addr; } - if (x86_efi_copyin("", last++, 1) != 1) + if (archsw.arch_copyin("", last++, 1) != 1) last = start; return(last); } @@ -155,7 +155,7 @@ bi_copyenv(vm_offset_t start) #define COPY32(v, a, c) { \ uint32_t x = (v); \ if (c) \ - x86_efi_copyin(&x, a, sizeof(x)); \ + archsw.arch_copyin(&x, a, sizeof(x)); \ a += sizeof(x); \ } @@ -163,8 +163,8 @@ bi_copyenv(vm_offset_t start) COPY32(t, a, c); \ COPY32(strlen(s) + 1, a, c); \ if (c) \ - x86_efi_copyin(s, a, strlen(s) + 1); \ - a += roundup(strlen(s) + 1, sizeof(uint64_t)); \ + archsw.arch_copyin(s, a, strlen(s) + 1); \ + a += roundup(strlen(s) + 1, sizeof(u_long)); \ } #define MOD_NAME(a, s, c) MOD_STR(MODINFO_NAME, a, s, c) @@ -175,8 +175,8 @@ bi_copyenv(vm_offset_t start) COPY32(t, a, c); \ COPY32(sizeof(s), a, c); \ if (c) \ - x86_efi_copyin(&s, a, sizeof(s)); \ - a += roundup(sizeof(s), sizeof(uint64_t)); \ + archsw.arch_copyin(&s, a, sizeof(s)); \ + a += roundup(sizeof(s), sizeof(u_long)); \ } #define MOD_ADDR(a, s, c) MOD_VAR(MODINFO_ADDR, a, s, c) @@ -186,8 +186,8 @@ bi_copyenv(vm_offset_t start) COPY32(MODINFO_METADATA | mm->md_type, a, c); \ COPY32(mm->md_size, a, c); \ if (c) \ - x86_efi_copyin(mm->md_data, a, mm->md_size); \ - a += roundup(mm->md_size, sizeof(uint64_t)); \ + archsw.arch_copyin(mm->md_data, a, mm->md_size); \ + a += roundup(mm->md_size, sizeof(u_long)); \ } #define MOD_END(a, c) { \ @@ -326,7 +326,7 @@ bi_load(char *args, vm_offset_t *modulep * tested/set by MI code before launching the kernel. */ rootdevname = getenv("rootdev"); - x86_efi_getdev((void**)(&rootdev), rootdevname, NULL); + archsw.arch_getdev((void**)(&rootdev), rootdevname, NULL); if (rootdev == NULL) { printf("Can't determine root device.\n"); return(EINVAL); From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 18:25:23 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CB6282D; Sun, 22 Mar 2015 18:25:23 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (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 B94B2F2; Sun, 22 Mar 2015 18:25:22 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2MIP7jv096531; Sun, 22 Mar 2015 10:25:11 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503221825.t2MIP7jv096531@gw.catspoiler.org> Date: Sun, 22 Mar 2015 11:25:07 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280308 - head/sys/fs/devfs To: kostikbel@gmail.com In-Reply-To: <20150322162507.GD2379@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: src-committers@FreeBSD.org, jilles@stack.nl, svn-src-all@FreeBSD.org, delphij@FreeBSD.org, brde@optusnet.com.au, svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 18:25:23 -0000 On 22 Mar, Konstantin Belousov wrote: > On Sun, Mar 22, 2015 at 02:37:09PM +0100, Jilles Tjoelker wrote: >> On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: >> > On Sat, 21 Mar 2015, Xin LI wrote: >> >> > > Log: >> > > Disable timestamping on devfs read/write operations by default. >> >> > > Currently we update timestamps unconditionally when doing read or >> > > write operations. This may slow things down on hardware where >> > > reading timestamps is expensive (e.g. HPET, because of the default >> > > vfs.timestamp_precision setting is nanosecond now) with limited >> > > benefit. >> >> > > A new sysctl variable, vfs.devfs.dotimes is added, which can be >> > > set to non-zero value when the old behavior is desirable. >> >> > I don't like this. It defaults to non-POSIX-conformant behaviour... >> >> > The slowness is mostly from no delayed update of times in devfs. >> > Switching vfs.timestamp_precision to a hardware timecounter would >> > have been even more expensive for regular files if file systems >> > didn't have delayed updates. The assumption that vfs_timestamp() >> > doesn't use a slow timecounter was so often satisfied that no one >> > missed devfs also not supporting mounting with -noatime. >> >> > Delayed updates are even easier to implement for devfs than for disk >> > file systems the times never need to be written to disk. A slow update >> > is still wasteful for atimes, but not as bad as for disk file systems >> > since it doesn't trigger a slower sync to disk. >> >> Yes, I think implementing delayed updates is the right solution to this >> problem. This way, only stat and last close will need to read the clock. >> No configuration option will be needed. >> >> A subtle difference with most other file systems is that devfs nodes >> often stay open for very long, so the timestamps will usually come from >> stat() calls, which may be much later than the actual read or write. >> Still that is better than not updating timestamps at all. >> >> > > ... >> > > Modified: head/sys/fs/devfs/devfs_vnops.c >> > > ============================================================================== >> > > --- head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 00:21:30 2015 (r280307) >> > > +++ head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 01:14:11 2015 (r280308) >> > > ... >> > > @@ -1700,7 +1708,8 @@ devfs_write_f(struct file *fp, struct ui >> > > resid = uio->uio_resid; >> > > >> > > error = dsw->d_write(dev, uio, ioflag); >> > > - if (uio->uio_resid != resid || (error == 0 && resid != 0)) { >> > > + if (devfs_dotimes && >> > > + (uio->uio_resid != resid || (error == 0 && resid != 0))) { >> > > vfs_timestamp(&dev->si_ctime); >> > > dev->si_mtime = dev->si_ctime; >> > > } >> >> > An old bug is evident in the diff. Writing shouldn't change the ctime. >> >> That is not a bug. POSIX unambiguously requires write() to update both >> mtime and ctime. > Does POSIX ever say anything about special files ? > > Devfs already has non-POSIX behaviour, e.g. write on one mount is > reflected as mtime/ctime update on all mounts. On reboot, the time > stamps are re-created, i.e. changes are not persistent. > > I think the deviations may be summarrized as 'devfs mtime is useless for > the usual mtime purposes'. From this PoV, I have no objections to the > patch. Doing extra work with delayed updates of times, which might > be somewhat non-trivial, is a feature with non-obvious gain. It's not totally worthless. I think the mtime on tty devices is used to calculate the idle time that is printed by the w command. We just don't need nanosecond accuracy for that. From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 18:31:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4D5FB56; Sun, 22 Mar 2015 18:31:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0B5F1D7; Sun, 22 Mar 2015 18:31:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MIVTm7042827; Sun, 22 Mar 2015 18:31:29 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MIVTdU042826; Sun, 22 Mar 2015 18:31:29 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201503221831.t2MIVTdU042826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sun, 22 Mar 2015 18:31:29 +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: r280352 - stable/9/sys/dev/drm2 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 18:31:29 -0000 Author: jah Date: Sun Mar 22 18:31:28 2015 New Revision: 280352 URL: https://svnweb.freebsd.org/changeset/base/280352 Log: MFC r279919: Using parent DMA tag in drm_pci_alloc(). This can allow drm2 devices to work with Intel DMAR enabled for the system, as long as DMAR is disabled for the drm2 device. Reviewed by: kib (mentor) Modified: stable/9/sys/dev/drm2/drm_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_pci.c ============================================================================== --- stable/9/sys/dev/drm2/drm_pci.c Sun Mar 22 18:17:55 2015 (r280351) +++ stable/9/sys/dev/drm2/drm_pci.c Sun Mar 22 18:31:28 2015 (r280352) @@ -76,7 +76,9 @@ drm_pci_alloc(struct drm_device *dev, si if (mtx_owned(&dev->dma_lock)) DRM_ERROR("called while holding dma_lock\n"); - ret = bus_dma_tag_create(NULL, align, 0, /* tag, align, boundary */ + ret = bus_dma_tag_create( + bus_get_dma_tag(dev->device), /* parent */ + align, 0, /* align, boundary */ maxaddr, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */ NULL, NULL, /* filtfunc, filtfuncargs */ size, 1, size, /* maxsize, nsegs, maxsegsize */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 18:32:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2C06CBD; Sun, 22 Mar 2015 18:32:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DE6461F6; Sun, 22 Mar 2015 18:32:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MIWcfh043040; Sun, 22 Mar 2015 18:32:38 GMT (envelope-from jah@FreeBSD.org) Received: (from jah@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MIWc4P043039; Sun, 22 Mar 2015 18:32:38 GMT (envelope-from jah@FreeBSD.org) Message-Id: <201503221832.t2MIWc4P043039@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jah set sender to jah@FreeBSD.org using -f From: "Jason A. Harmening" Date: Sun, 22 Mar 2015 18:32: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: r280353 - stable/10/sys/dev/drm2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 18:32:39 -0000 Author: jah Date: Sun Mar 22 18:32:37 2015 New Revision: 280353 URL: https://svnweb.freebsd.org/changeset/base/280353 Log: MFC r279919: Using parent DMA tag in drm_pci_alloc(). This can allow drm2 devices to work with Intel DMAR enabled for the system, as long as DMAR is disabled for the drm2 device. Reviewed by: kib (mentor) Modified: stable/10/sys/dev/drm2/drm_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/drm_pci.c ============================================================================== --- stable/10/sys/dev/drm2/drm_pci.c Sun Mar 22 18:31:28 2015 (r280352) +++ stable/10/sys/dev/drm2/drm_pci.c Sun Mar 22 18:32:37 2015 (r280353) @@ -76,7 +76,9 @@ drm_pci_alloc(struct drm_device *dev, si if (mtx_owned(&dev->dma_lock)) DRM_ERROR("called while holding dma_lock\n"); - ret = bus_dma_tag_create(NULL, align, 0, /* tag, align, boundary */ + ret = bus_dma_tag_create( + bus_get_dma_tag(dev->device), /* parent */ + align, 0, /* align, boundary */ maxaddr, BUS_SPACE_MAXADDR, /* lowaddr, highaddr */ NULL, NULL, /* filtfunc, filtfuncargs */ size, 1, size, /* maxsize, nsegs, maxsegsize */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 19:28:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15416CC2 for ; Sun, 22 Mar 2015 19:28:33 +0000 (UTC) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) (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 D9CB3998 for ; Sun, 22 Mar 2015 19:28:32 +0000 (UTC) Received: by pacwe9 with SMTP id we9so168195095pac.1 for ; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=sPLiwqU8fiE6a8EeQUCVGrzrIsRaCMUDMOTvav0Vb3o=; b=BcZE1dkB24htmYq2FgFuhNkeZJNIGDGn9HrMpQcNswX0J0Ddon46ytvDBhHQfvOFFg PGgjz3NrwCifXDZovNUmQQW4/1ioa5HqxBJGzhl/WjLQhUCWydK/dG/Vgtm+IIJBjf4d 7YZHYMFYTAoXsCAaoNqD9pNZsxOeUWz3Tp/2HmM03q7BHpF5qsQgEAcYqM4H+W5sLu5A 9K+lBYW7+MbJjlr5tHr9Nqe435aO0nTjl6yGRtewHbZ6mKWdIUge1/QUCPqp02VfMF9r p1LiIfNrbh0cm93+9m6Pow0rgDh64azUzy/DQ6MKMgPx6CPvP60b5Egs1pqzGBR5r/VJ M6OA== X-Gm-Message-State: ALoCoQkC3dSQad5/LieFYTowlfqQxgb6cJyiINdNS5VAV469xylZ1bGSGSi5QuJs1g4NUVNKCEIP MIME-Version: 1.0 X-Received: by 10.70.89.195 with SMTP id bq3mr164835705pdb.138.1427052505838; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) Received: by 10.70.65.105 with HTTP; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) Received: by 10.70.65.105 with HTTP; Sun, 22 Mar 2015 12:28:25 -0700 (PDT) In-Reply-To: References: <201503211501.t2LF1Kj8052521@svn.freebsd.org> <20150321210341.GC15857@lonesome.com> <20150321210810.GT2379@kib.kiev.ua> <20150321212416.GU2379@kib.kiev.ua> Date: Sun, 22 Mar 2015 12:28:25 -0700 Message-ID: Subject: Re: svn commit: r280323 - head/sys/kern From: Jos Backus To: svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Konstantin Belousov , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 19:28:33 -0000 On Mar 22, 2015 5:11 AM, "Dmitry Morozovsky" wrote: > > On Sat, 21 Mar 2015, Konstantin Belousov wrote: > > > > > > > Somewhat modernize the SysV shm code: > > > > > > > > > > Is my understanding correct that postgres still uses shm? If so, > > > > > has someone benchmarked the speedup? > > > > > > > > Yes, some versions of Postgres still use SysV shm. > > > > > > To be clarified: IIUC, *all* contemporary versions of PostgreSQL do > > > use SHM for shatrd buffers (as PgSQL use process-per-connection model) > > > > No. Recent versions use mmaped shared region for buffers. > > Yes, starting from 9.3 main buffers are memory-mapped. SysV SHM and Semaphores > *are* still in use though. To expand on this a little bit: A small amount of SysV shared memory and semaphores are still used to manage safe and crash-proof access to the shared buffers between the postmaster and the client instances and other worker processes that need access to said buffers. My understanding from discussions on the PostgreSQL hackers list is that POSIX shared memory doesn't have the behavior needed to provide the same guarantees required. The change to use mmap()-ed memory was done to help people avoid having to change their SysV IPC resource limits, since these tend to have to be statically allocated, and are often too low to run PostgreSQL well or at all. This is to the best of my understanding. I'm not a PostgreSQL developer, so I could be wrong, in which case, please correct me. Jos > (mainly for search engines) > > Thanks for the clarification. > > -- > Sincerely, > D.Marck [DM5020, MCK-RIPE, DM3-RIPN] > [ FreeBSD committer: marck@FreeBSD.org ] > ------------------------------------------------------------------------ > *** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru *** > ------------------------------------------------------------------------ > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 20:38:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EBDC40E; Sun, 22 Mar 2015 20:38:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDD651A0; Sun, 22 Mar 2015 20:38:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MKcTYj002038; Sun, 22 Mar 2015 20:38:29 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MKcT4p002037; Sun, 22 Mar 2015 20:38:29 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201503222038.t2MKcT4p002037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 22 Mar 2015 20:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280354 - head/usr.sbin/jail X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 20:38:30 -0000 Author: allanjude (doc committer) Date: Sun Mar 22 20:38:28 2015 New Revision: 280354 URL: https://svnweb.freebsd.org/changeset/base/280354 Log: Fix typo in jail(8) man page PR: 198790 Differential Revision: https://reviews.freebsd.org/D2111 Submitted by: Jimmy Olgeni Approved by: wblock (mentor) Sponsored by: ScaleEngine Inc. Modified: head/usr.sbin/jail/jail.8 Modified: head/usr.sbin/jail/jail.8 ============================================================================== --- head/usr.sbin/jail/jail.8 Sun Mar 22 18:32:37 2015 (r280353) +++ head/usr.sbin/jail/jail.8 Sun Mar 22 20:38:28 2015 (r280354) @@ -703,7 +703,7 @@ jail is created, and will be removed fro jail is removed. .It Va ip4.addr In addition to the IP addresses that are passed to the kernel, an -interface, netmask and additional paramters (as supported by +interface, netmask and additional parameters (as supported by .Xr ifconfig 8 Ns ) may also be specified, in the form .Dq Ar interface Ns | Ns Ar ip-address Ns / Ns Ar netmask param ... . From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 21:18:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADC058CC; Sun, 22 Mar 2015 21:18:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98CD28C4; Sun, 22 Mar 2015 21:18:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MLIjcu021397; Sun, 22 Mar 2015 21:18:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MLIjWv021396; Sun, 22 Mar 2015 21:18:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503222118.t2MLIjWv021396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 22 Mar 2015 21:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280355 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 21:18:45 -0000 Author: ian Date: Sun Mar 22 21:18:44 2015 New Revision: 280355 URL: https://svnweb.freebsd.org/changeset/base/280355 Log: The sysctls that return process argv and envv return binary data, so clear the SBUF_INCLUDENUL flag. Pointed out by: tijl@ Modified: head/sys/kern/kern_proc.c Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Sun Mar 22 20:38:28 2015 (r280354) +++ head/sys/kern/kern_proc.c Sun Mar 22 21:18:44 2015 (r280355) @@ -1851,6 +1851,7 @@ sysctl_kern_proc_args(SYSCTL_HANDLER_ARG _PHOLD(p); PROC_UNLOCK(p); sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = proc_getargv(curthread, p, &sb); error2 = sbuf_finish(&sb); PRELE(p); @@ -1903,6 +1904,7 @@ sysctl_kern_proc_env(SYSCTL_HANDLER_ARGS } sbuf_new_for_sysctl(&sb, NULL, GET_PS_STRINGS_CHUNK_SZ, req); + sbuf_clear_flags(&sb, SBUF_INCLUDENUL); error = proc_getenvv(curthread, p, &sb); error2 = sbuf_finish(&sb); PRELE(p); From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 21:20:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9676DAF3; Sun, 22 Mar 2015 21:20:31 +0000 (UTC) Received: from relay.mailchannels.net (aso-006-i440.relay.mailchannels.net [23.91.64.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4B3388D1; Sun, 22 Mar 2015 21:20:29 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (ip-10-33-12-218.us-west-2.compute.internal [10.33.12.218]) by relay.mailchannels.net (Postfix) with ESMTPA id 94914A047F; Sun, 22 Mar 2015 21:20:27 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sun, 22 Mar 2015 21:20:27 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427059227710:1465418749 X-MC-Ingress-Time: 1427059227710 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YZnIJ-0001Hq-5E; Sun, 22 Mar 2015 21:20:27 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t2MLKPpF037879; Sun, 22 Mar 2015 15:20:25 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+VOhez/SxHfnWm+0QOFkYA Message-ID: <1427059225.49126.5.camel@freebsd.org> Subject: Re: svn commit: r279993 - in head/sys: dev/cxgb dev/cxgbe kern vm From: Ian Lepore To: Tijl Coosemans Date: Sun, 22 Mar 2015 15:20:25 -0600 In-Reply-To: <20150322171110.2af31564@kalimero.tijl.coosemans.org> References: <201503141708.t2EH8TdR074383@svn.freebsd.org> <20150322171110.2af31564@kalimero.tijl.coosemans.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 21:20:31 -0000 On Sun, 2015-03-22 at 17:11 +0100, Tijl Coosemans wrote: > On Sat, 14 Mar 2015 17:08:29 +0000 (UTC) Ian Lepore wrote: > > Author: ian > > Date: Sat Mar 14 17:08:28 2015 > > New Revision: 279993 > > URL: https://svnweb.freebsd.org/changeset/base/279993 > > > > Log: > > Set the SBUF_INCLUDENUL flag in sbuf_new_for_sysctl() so that sysctl > > strings returned to userland include the nulterm byte. > > > > Some uses of sbuf_new_for_sysctl() write binary data rather than strings; > > clear the SBUF_INCLUDENUL flag after calling sbuf_new_for_sysctl() in > > those cases. (Note that the sbuf code still automatically adds a nulterm > > byte in sbuf_finish(), but since it's not included in the length it won't > > get copied to userland along with the binary data.) > > Can you review the attached patch? The KERN_PROC_ENV sysctl is also > binary (zero-terminated strings). Adding an extra \0 at the end makes > some programs think there's an extra empty environment variable. It > causes console-kit-daemon to crash for instance. > > I suspect a similar patch may be needed for KERN_PROC_ARGS. I think you're right. The OID format isn't "A" so it shouldn't be formatted as a normal C string, for both argv and envv. I commited the fix as r280355, thanks. -- Ian From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 21:37:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F04CB5B7; Sun, 22 Mar 2015 21:37:14 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 99824AC0; Sun, 22 Mar 2015 21:37:14 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id D12BD4217FA; Mon, 23 Mar 2015 08:15:21 +1100 (AEDT) Date: Mon, 23 Mar 2015 08:15:21 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Jilles Tjoelker Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <20150322133709.GA39238@stack.nl> Message-ID: <20150323072243.I932@besplex.bde.org> References: <201503210114.t2L1ECcB075556@svn.freebsd.org> <20150321200221.K1846@besplex.bde.org> <20150322133709.GA39238@stack.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=IBQAFhTqP557DsAIRIsA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Xin LI , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 21:37:15 -0000 On Sun, 22 Mar 2015, Jilles Tjoelker wrote: > On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: >> On Sat, 21 Mar 2015, Xin LI wrote: > >>> Log: >>> Disable timestamping on devfs read/write operations by default. > >> I don't like this. It defaults to non-POSIX-conformant behaviour... > >> The slowness is mostly from no delayed update of times in devfs. > ... > Yes, I think implementing delayed updates is the right solution to this > problem. This way, only stat and last close will need to read the clock. > No configuration option will be needed. > > A subtle difference with most other file systems is that devfs nodes > often stay open for very long, so the timestamps will usually come from > stat() calls, which may be much later than the actual read or write. > Still that is better than not updating timestamps at all. It is probably the large important files that stay open a lot. Another not so subtle difference is that atimes are actually useful for some device files. They are used by w(1). My IN_LAZYMOD optimizations for ffs are relevant. They should be used for atimes for all file types, but the committed version only used for device files, and this code is now dead since device files moved to devfs. This code was also dead (bypassed due to missing details) before devfs in the soft updates case. My version sets IN_LAZMOD for regular files, but then kills it in another way: X Index: ufs_vnops.c X =================================================================== X RCS file: /home/ncvs/src/sys/ufs/ufs/ufs_vnops.c,v X retrieving revision 1.239 X diff -u -2 -r1.239 ufs_vnops.c X --- ufs_vnops.c 7 Apr 2004 03:47:20 -0000 1.239 X +++ ufs_vnops.c 4 Dec 2007 15:41:26 -0000 X @@ -157,8 +157,22 @@ X if ((ip->i_flag & (IN_ACCESS | IN_CHANGE | IN_UPDATE)) == 0) X return; X + /* X + * XXX IN_LAZYMOD has still not been verified to work for the X + * DOINGSOFTDEP() case. X + * XXX devfs makes IN_LAZYMOD almost moot for the device case ... X + */ X if ((vp->v_type == VBLK || vp->v_type == VCHR) && !DOINGSOFTDEP(vp)) X ip->i_flag |= IN_LAZYMOD; X - else X - ip->i_flag |= IN_MODIFIED; X + else { X + /* X + * ... but IN_LAZYMOD should be used in more cases. Start X + * using it for atime-only updates. X + */ X + if (ip->i_flag & (IN_CHANGE | IN_UPDATE)) X + ip->i_flag |= IN_MODIFIED; X + else X + ip->i_flag |= IN_LAZYMOD; The previous line is executed for the IN_ATIME case. X + ip->i_flag |= IN_MODIFIED; /* XXX change/mod confusion */ But then override the change. Motivation for completing this is small since I mount most file systems with -noatime, so the code is unreachable for another reason. X + } X if ((vp->v_mount->mnt_flag & MNT_RDONLY) == 0) { X vfs_timestamp(&ts); Before checking the above, I thought it would be a reasonable fix to implement only mounting with noatime for devfs, and require users to mount with noatime if they notice the slowness. Most device accesses are probably for reads. Checking the MNT_NOATIME flag takes about 1 line. >>> ... >>> Modified: head/sys/fs/devfs/devfs_vnops.c >>> ============================================================================== >>> --- head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 00:21:30 2015 (r280307) >>> +++ head/sys/fs/devfs/devfs_vnops.c Sat Mar 21 01:14:11 2015 (r280308) >>> ... >>> @@ -1700,7 +1708,8 @@ devfs_write_f(struct file *fp, struct ui >>> resid = uio->uio_resid; >>> >>> error = dsw->d_write(dev, uio, ioflag); >>> - if (uio->uio_resid != resid || (error == 0 && resid != 0)) { >>> + if (devfs_dotimes && >>> + (uio->uio_resid != resid || (error == 0 && resid != 0))) { >>> vfs_timestamp(&dev->si_ctime); >>> dev->si_mtime = dev->si_ctime; >>> } > >> An old bug is evident in the diff. Writing shouldn't change the ctime. > > That is not a bug. POSIX unambiguously requires write() to update both > mtime and ctime. Oops. I don't know how I forgot that. ffs's IN_* flag names are mixed up, but in ffs_write() IN_CHANGE is the one flag that is not affected there by the confusion -- it actually used for exactly what it means (that the file change time is marked for update, but the inode has not been modified for this since the update has not occured yet). Bruce From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 22:00:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB840CC4; Sun, 22 Mar 2015 22:00:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C578FCE7; Sun, 22 Mar 2015 22:00:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MM0UtN041349; Sun, 22 Mar 2015 22:00:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MM0UAJ041348; Sun, 22 Mar 2015 22:00:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503222200.t2MM0UAJ041348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Mar 2015 22:00: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: r280356 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 22:00:31 -0000 Author: ngie Date: Sun Mar 22 22:00:29 2015 New Revision: 280356 URL: https://svnweb.freebsd.org/changeset/base/280356 Log: Defeat race with texinfo tools built with make bootstrap-tools This is a direct commit to stable/10 because texinfo has been removed from head Modified: stable/10/Makefile.inc1 Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sun Mar 22 21:18:44 2015 (r280355) +++ stable/10/Makefile.inc1 Sun Mar 22 22:00:29 2015 (r280356) @@ -1333,6 +1333,9 @@ ${_bt}-kerberos5/tools/asn1_compile: ${_ _texinfo= gnu/usr.bin/texinfo/libtxi \ gnu/usr.bin/texinfo/makeinfo \ gnu/usr.bin/texinfo/install-info + +${_bt}-gnu/usr.bin/texinfo/install-info: ${_bt}-gnu/usr.bin/texinfo/libtxi +${_bt}-gnu/usr.bin/texinfo/makeinfo: ${_bt}-gnu/usr.bin/texinfo/libtxi .endif bootstrap-tools: .PHONY From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 22:12:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E3845DA; Sun, 22 Mar 2015 22:12:03 +0000 (UTC) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id D7865E9F; Sun, 22 Mar 2015 22:12:02 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id 7DB491A2636; Mon, 23 Mar 2015 08:40:58 +1100 (AEDT) Date: Mon, 23 Mar 2015 08:40:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r280308 - head/sys/fs/devfs In-Reply-To: <20150322162507.GD2379@kib.kiev.ua> Message-ID: <20150323081537.U932@besplex.bde.org> References: <201503210114.t2L1ECcB075556@svn.freebsd.org> <20150321200221.K1846@besplex.bde.org> <20150322133709.GA39238@stack.nl> <20150322162507.GD2379@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=gT3I8tYcGHsMu_VBJUQA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, Jilles Tjoelker , svn-src-all@freebsd.org, Xin LI , Bruce Evans , svn-src-head@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 22:12:03 -0000 On Sun, 22 Mar 2015, Konstantin Belousov wrote: > On Sun, Mar 22, 2015 at 02:37:09PM +0100, Jilles Tjoelker wrote: >> On Sat, Mar 21, 2015 at 08:49:00PM +1100, Bruce Evans wrote: >>> On Sat, 21 Mar 2015, Xin LI wrote: >> >>>> Log: >>>> Disable timestamping on devfs read/write operations by default. >> ... >>> I don't like this. It defaults to non-POSIX-conformant behaviour... >>> ... > Does POSIX ever say anything about special files ? It says indirectly that special files have full support for timestamps although they might not support many other attributes. From an old draft: X 51276 Upon successful completion, where nbyte is greater than 0, write( ) shall mark for update the X 51277 st_ctime and st_mtime fields of the file, and if the file is a regular file, the S_ISUID and S_ISGID X 51278 bits of the file mode may be cleared. Note that it makes a special case for regular files, but not for the file times. > Devfs already has non-POSIX behaviour, e.g. write on one mount is > reflected as mtime/ctime update on all mounts. On reboot, the time > stamps are re-created, i.e. changes are not persistent. POSIX doesn't cover reboots :-). Perhaps it should say something. I don't remember it even saying saying anything about the persistence of file data. Specifying this would be difficult. Obviously, it cannot reasonably specify persistence of file data for longer than is physically possible, and no implementation can guarantee its future behaviour. > I think the deviations may be summarrized as 'devfs mtime is useless for > the usual mtime purposes'. From this PoV, I have no objections to the > patch. Doing extra work with delayed updates of times, which might > be somewhat non-trivial, is a feature with non-obvious gain. I thought that atimes were even more useless, but it is the atime that is used by w(1). I mostly notice devfs times when find(1) finds garbage devfs times -- ones in the future caused by devfs creating files before userland has fixed up the time. Devfs has incomplete code to avoid this problem. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 22:40:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF1B4B34; Sun, 22 Mar 2015 22:40:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9851CF; Sun, 22 Mar 2015 22:40:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MMeWcc061849; Sun, 22 Mar 2015 22:40:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MMeWJs061829; Sun, 22 Mar 2015 22:40:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503222240.t2MMeWJs061829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 22 Mar 2015 22:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280357 - head/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 22:40:33 -0000 Author: dim Date: Sun Mar 22 22:40:32 2015 New Revision: 280357 URL: https://svnweb.freebsd.org/changeset/base/280357 Log: Build expr with -fwrapv, since it relies on signed integer wrapping having defined behavior. Reported by: rodrigc MFC after: 3 days Modified: head/bin/expr/Makefile Modified: head/bin/expr/Makefile ============================================================================== --- head/bin/expr/Makefile Sun Mar 22 22:00:29 2015 (r280356) +++ head/bin/expr/Makefile Sun Mar 22 22:40:32 2015 (r280357) @@ -6,6 +6,9 @@ PROG= expr SRCS= expr.y YFLAGS= +# expr relies on signed integer wrapping +CFLAGS+= -fwrapv + NO_WMISSING_VARIABLE_DECLARATIONS= .if ${MK_TESTS} != "no" From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 22:53:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1CCFD8C; Sun, 22 Mar 2015 22:53:40 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 9B1B4260; Sun, 22 Mar 2015 22:53:40 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 7B70F78119C; Mon, 23 Mar 2015 09:53:31 +1100 (AEDT) Date: Mon, 23 Mar 2015 09:53:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" Subject: Re: svn commit: r280346 - head/sys/sys In-Reply-To: <201503221537.t2MFb6Kf057971@svn.freebsd.org> Message-ID: <20150323084500.C1130@besplex.bde.org> References: <201503221537.t2MFb6Kf057971@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=tY7LaoIE7Bbx0eQ_6PYA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 22:53:41 -0000 On Sun, 22 Mar 2015, Pedro F. Giffuni wrote: > Log: > Small style(9) cleanup. > > #define should always be followed by a tab not space. Thanks, but not in comments. > Modified: head/sys/sys/cdefs.h > ============================================================================== > --- head/sys/sys/cdefs.h Sun Mar 22 13:11:56 2015 (r280345) > +++ head/sys/sys/cdefs.h Sun Mar 22 15:37:05 2015 (r280346) > @@ -70,20 +70,20 @@ > #if defined(__GNUC__) || defined(__INTEL_COMPILER) > > #if __GNUC__ >= 3 || defined(__INTEL_COMPILER) > -#define __GNUCLIKE_ASM 3 > -#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS > +#define __GNUCLIKE_ASM 3 > +#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS The commit that added the __INTEL_COMPILER stuff was well-intentioned but not ready for commit. The lines changed by it still have mounds of style bugs. They mostly still don't use tabs where they are more needed -- to line up the #defined values. The __INTEL_COMPILER stuff was only used in a few places for i386 originally (not even in the corresponding places for amd64), and has rotted. It is well intentioned, but mostly just makes the code uglier where it is actually used. > ... > #ifndef __INTEL_COMPILER > # define __GNUCLIKE_CTOR_SECTION_HANDLING 1 > #endif Indenting 'define' after '#' is another style bug. Apparently this defeated your pattern matcher, so the space after 'define' is not fixed here. > > -#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 > +#define __GNUCLIKE_BUILTIN_CONSTANT_P 1 > # if defined(__INTEL_COMPILER) && defined(__cplusplus) \ > && __INTEL_COMPILER < 800 '&&' on a new line is another style bug. It is gnu-style. > @@ -111,19 +111,19 @@ > # define __GNUCLIKE_MATH_BUILTIN_RELOPS > #endif > > -#define __GNUCLIKE_BUILTIN_MEMCPY 1 > +#define __GNUCLIKE_BUILTIN_MEMCPY 1 > > /* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */ > -#define __CC_SUPPORTS_INLINE 1 > -#define __CC_SUPPORTS___INLINE 1 > -#define __CC_SUPPORTS___INLINE__ 1 > +#define __CC_SUPPORTS_INLINE 1 > +#define __CC_SUPPORTS___INLINE 1 > +#define __CC_SUPPORTS___INLINE__ 1 3 different macros to support the different spellings of 'inline' are excessive, and also wrong: - __inline__ is a gnu spelling. Any use of it is a style and portability bug. Using it defeats portability ifdefs in this file, since only the FreeBSD spelling __inline is really supported in this file. The macro __CC_SUPPORTS___INLINE__ to support it shouldn't exist. Currently, there are 256 lines in /sys with this style bug (mostly in mips, fuse, xen, drm and contrib) :-(. There are just 3 lines which reference the macro: - 1 in cdefs.h to define it - 1 in cx to do home made portability stuff (inline -> __inline__). The FreeBSD spelling of this portability stuff is __inline or just plain inline in sloppier code. Even the sloppier code became portable to new compilers with C99. - 1 in iir. iir uses __inline__ a lot, and just fails when the macro says that it is not supported. - __inline is the FreeBSD spelling. It is used a lot. About 3500 times in /sys. The macro shouldn't exist, since portability ifdefs in cdefs.h are supposed to make __inline usable for most cases, by defining it to nothing if required. These portability ifdefs are mostly for handling the difference between C90 and gcc in 1990, and aren't complicated enough to handle all 1990 model compilers, but most code didn't care about the difference even in 1990. There are just 5 uses of the macro (not counting comments or its definition): - 2 in cpufunc.h (1 each for amd64 and i386) - 3 in in_cksum.h (1 each for amd64, mips, and powerpc. i386 is gratuitously different from amd64 due to different bad fixes for bugs in the inline asm). - inline is the C99 spelling. It is used almost 6000 times (mostly in contrib'ed uglyware). The macro for it made sense before C99 existed, but was committed after 1999 and has never been used. > -#define __CC_SUPPORTS___FUNC__ 1 > -#define __CC_SUPPORTS_WARNING 1 > +#define __CC_SUPPORTS___FUNC__ 1 > +#define __CC_SUPPORTS_WARNING 1 __func__ is like __inline, but has better compatibility support, so the macro for it should not exist. The macro is used just once (in ichsmb, for just 1 of 12 instances of __func__ in this file). > > -#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ > +#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */ > > -#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 > +#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1 The features corresponding to these macros are much more arcane than __inline and __func__. __CC_SUPPORTS_VARADIC_XXX is used just once (in i386 varags.h. Varargs is very compiler-dependent, but only the implementation should know the details, and is a better place to put them than here even if they only depend on the compiler). __CC_SUPPORTS_VARADIC_XXX is not used. (All counts in /sys). > ... > @@ -139,7 +139,7 @@ > > /* > * The __CONCAT macro is used to concatenate parts of symbol names, e.g. > - * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. > + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. Example of a comment mangled by the substitution. > @@ -234,13 +234,13 @@ > #define __section(x) __attribute__((__section__(x))) > #endif > #if defined(__INTEL_COMPILER) > -#define __dead2 __attribute__((__noreturn__)) > -#define __pure2 __attribute__((__const__)) > -#define __unused __attribute__((__unused__)) > -#define __used __attribute__((__used__)) > -#define __packed __attribute__((__packed__)) > -#define __aligned(x) __attribute__((__aligned__(x))) > -#define __section(x) __attribute__((__section__(x))) > +#define __dead2 __attribute__((__noreturn__)) > +#define __pure2 __attribute__((__const__)) > +#define __unused __attribute__((__unused__)) > +#define __used __attribute__((__used__)) > +#define __packed __attribute__((__packed__)) > +#define __aligned(x) __attribute__((__aligned__(x))) > +#define __section(x) __attribute__((__section__(x))) > #endif > #endif __INTEL_COMPILER causes complications by not being fully gcc-compatible, but here it is fully compatible and the duplication is spam. Previously, the spam wasn't even duplication since it had corrupt tabs. Duplication defeats the point of complicated ifdefs elsewhere, where the complications go in the direction of putting a single definition under a complicated condition. clang would require much messier ifdefs if it were not close to 100% compatible, since it is actually used. Bruce From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 23:20:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A885182; Sun, 22 Mar 2015 23:20:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33ADC6D3; Sun, 22 Mar 2015 23:20:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MNK9D5079031; Sun, 22 Mar 2015 23:20:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MNK96k079029; Sun, 22 Mar 2015 23:20:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503222320.t2MNK96k079029@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sun, 22 Mar 2015 23:20: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: r280358 - stable/9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 23:20:10 -0000 Author: ngie Date: Sun Mar 22 23:20:09 2015 New Revision: 280358 URL: https://svnweb.freebsd.org/changeset/base/280358 Log: MFstable/10 r280340,r280341,r280356: r280340: MFC r279197,r279198: r279197: Parallelize building bootstrap-tools Differential Revision: https://reviews.freebsd.org/D1901 Reviewed by: ian No serious objections from: imp r279198: Fill in missing dependencies for dtrace related tools so the bootstrap-tools compiles properly on older hosts Pointyhat to: me r280341: Remove dependency between usr.bin/m4 and lib/libohash libohash doesn't exist on stable/10 (only head) Not sure why my make buildworld didn't catch any issues This is a direct commit to stable/10 as a followup to r280340 r280356: Defeat race with texinfo tools built with make bootstrap-tools This is a direct commit to stable/10 because texinfo has been removed from head Modified: stable/9/Makefile.inc1 (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Sun Mar 22 22:40:32 2015 (r280357) +++ stable/9/Makefile.inc1 Sun Mar 22 23:20:09 2015 (r280358) @@ -1094,6 +1094,8 @@ legacy: # # bootstrap-tools: Build tools needed for compatibility # +_bt= _bootstrap-tools + .if ${MK_GAMES} != "no" _strfile= games/fortune/strfile .endif @@ -1125,11 +1127,15 @@ _lex= usr.bin/lex .if ${BOOTSTRAPPING} < 900006 || ${BOOTSTRAPPING} >= 1000013 _yacc= lib/liby \ usr.bin/yacc + +${_bt}-usr.bin/yacc: ${_bt}-lib/liby .endif .if ${BOOTSTRAPPING} < 1000026 _nmtree= lib/libnetbsd \ usr.sbin/nmtree + +${_bt}-usr.sbin/nmtree: ${_bt}-lib/libnetbsd .endif .if ${BOOTSTRAPPING} < 1000027 @@ -1156,6 +1162,9 @@ _clang_tblgen= \ lib/clang/libllvmtablegen \ usr.bin/clang/tblgen \ usr.bin/clang/clang-tblgen + +${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport +${_bt}-usr.bin/clang/tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport .endif .if ${MK_CDDL} != "no" && \ @@ -1164,6 +1173,9 @@ _clang_tblgen= \ || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) _dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge + +${_bt}-cddl/usr.bin/ctfconvert: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf +${_bt}-cddl/usr.bin/ctfmerge: ${_bt}-lib/libelf ${_bt}-lib/libdwarf ${_bt}-cddl/lib/libctf .endif .if ${MK_FDT} != "no" @@ -1174,11 +1186,15 @@ _dtc= gnu/usr.bin/dtc _texinfo= gnu/usr.bin/texinfo/libtxi \ gnu/usr.bin/texinfo/makeinfo \ gnu/usr.bin/texinfo/install-info + +${_bt}-gnu/usr.bin/texinfo/install-info: ${_bt}-gnu/usr.bin/texinfo/libtxi +${_bt}-gnu/usr.bin/texinfo/makeinfo: ${_bt}-gnu/usr.bin/texinfo/libtxi .endif +bootstrap-tools: .PHONY + # Please document (add comment) why something is in 'bootstrap-tools'. # Try to bound the building of the bootstrap-tool to just the # FreeBSD versions that need the tool built at this stage of the build. -bootstrap-tools: .for _tool in \ ${_clang_tblgen} \ ${_dtrace_tools} \ @@ -1203,12 +1219,15 @@ bootstrap-tools: ${_crunchgen} \ ${_nmtree} \ ${_texinfo} +${_bt}-${_tool}: .PHONY .MAKE ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ cd ${.CURDIR}/${_tool}; \ ${MAKE} DIRPRFX=${_tool}/ obj; \ ${MAKE} DIRPRFX=${_tool}/ depend; \ ${MAKE} DIRPRFX=${_tool}/ all; \ ${MAKE} DIRPRFX=${_tool}/ DESTDIR=${MAKEOBJDIRPREFIX}/legacy install + +bootstrap-tools: ${_bt}-${_tool} .endfor # From owner-svn-src-all@FreeBSD.ORG Sun Mar 22 23:42:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3411A12; Sun, 22 Mar 2015 23:42:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83DFF94C; Sun, 22 Mar 2015 23:42:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2MNgMmC092225; Sun, 22 Mar 2015 23:42:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2MNgM3G092224; Sun, 22 Mar 2015 23:42:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503222342.t2MNgM3G092224@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 22 Mar 2015 23:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280359 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Mar 2015 23:42:22 -0000 Author: pfg Date: Sun Mar 22 23:42:21 2015 New Revision: 280359 URL: https://svnweb.freebsd.org/changeset/base/280359 Log: Small style(9) cleanup. Fix yet more issues, but certainly not all. Pointed out by: bde Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Mar 22 23:20:09 2015 (r280358) +++ head/sys/sys/cdefs.h Sun Mar 22 23:42:21 2015 (r280359) @@ -80,23 +80,23 @@ #define __GNUCLIKE___SECTION 1 #ifndef __INTEL_COMPILER -# define __GNUCLIKE_CTOR_SECTION_HANDLING 1 +#define __GNUCLIKE_CTOR_SECTION_HANDLING 1 #endif #define __GNUCLIKE_BUILTIN_CONSTANT_P 1 -# if defined(__INTEL_COMPILER) && defined(__cplusplus) \ - && __INTEL_COMPILER < 800 -# undef __GNUCLIKE_BUILTIN_CONSTANT_P -# endif +#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \ + __INTEL_COMPILER < 800 +#undef __GNUCLIKE_BUILTIN_CONSTANT_P +#endif #if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER) -# define __GNUCLIKE_BUILTIN_VARARGS 1 -# define __GNUCLIKE_BUILTIN_STDARG 1 -# define __GNUCLIKE_BUILTIN_VAALIST 1 +#define __GNUCLIKE_BUILTIN_VARARGS 1 +#define __GNUCLIKE_BUILTIN_STDARG 1 +#define __GNUCLIKE_BUILTIN_VAALIST 1 #endif #if defined(__GNUC__) -# define __GNUC_VA_LIST_COMPATIBILITY 1 +#define __GNUC_VA_LIST_COMPATIBILITY 1 #endif /* @@ -107,8 +107,8 @@ #endif #ifndef __INTEL_COMPILER -# define __GNUCLIKE_BUILTIN_NEXT_ARG 1 -# define __GNUCLIKE_MATH_BUILTIN_RELOPS +#define __GNUCLIKE_BUILTIN_NEXT_ARG 1 +#define __GNUCLIKE_MATH_BUILTIN_RELOPS #endif #define __GNUCLIKE_BUILTIN_MEMCPY 1 @@ -139,7 +139,7 @@ /* * The __CONCAT macro is used to concatenate parts of symbol names, e.g. - * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. + * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI * mode -- there must be no spaces between its arguments, and for nested * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 00:07:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6DB2C613; Mon, 23 Mar 2015 00:07:11 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD4FBCD; Mon, 23 Mar 2015 00:07:10 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id 4DBFA3C2993; Mon, 23 Mar 2015 10:50:05 +1100 (AEDT) Date: Mon, 23 Mar 2015 10:50:02 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Dimitry Andric Subject: Re: svn commit: r280357 - head/bin/expr In-Reply-To: <201503222240.t2MMeWJs061829@svn.freebsd.org> Message-ID: <20150323102927.U1476@besplex.bde.org> References: <201503222240.t2MMeWJs061829@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=UdIJsax14pPILPEZKswA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 00:07:11 -0000 On Sun, 22 Mar 2015, Dimitry Andric wrote: > Log: > Build expr with -fwrapv, since it relies on signed integer wrapping > having defined behavior. This was supposed to be fixed using a volatile hack, but I see that was only for multiplication. Wrapping is not undefined behaviour. You mean overflow. expr mainly relies on the undefined behaviour giving a result and not causing the tests that the result is correct being optimized away. All compilers on all normal systems give a result. The volatile hack prevents the excessive optimization. But expr uses sloppy tests for addition and subtraction. For multiplication and division, there is no simple correctness test and expr does a complete test. For addition and multiplication, it assumes that the overflow gives (2's complement) wrapping so that simple sign tests work. > Modified: head/bin/expr/Makefile > ============================================================================== > --- head/bin/expr/Makefile Sun Mar 22 22:00:29 2015 (r280356) > +++ head/bin/expr/Makefile Sun Mar 22 22:40:32 2015 (r280357) > @@ -6,6 +6,9 @@ PROG= expr > SRCS= expr.y > YFLAGS= > > +# expr relies on signed integer wrapping > +CFLAGS+= -fwrapv Hard-coded gcc flags make compiling with non-gcc compilers impossible. -fwrapv implies 2's complement, so might not be supported even by gcc. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 01:08:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ABE14E78; Mon, 23 Mar 2015 01:08:41 +0000 (UTC) Received: from mail-wg0-x22b.google.com (mail-wg0-x22b.google.com [IPv6:2a00:1450:400c:c00::22b]) (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 38ACAE7; Mon, 23 Mar 2015 01:08:41 +0000 (UTC) Received: by wgbcc7 with SMTP id cc7so133817415wgb.0; Sun, 22 Mar 2015 18:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=Ii3Yqt6PR/wH0Swe+OskAnr99li+d23PxhDZ4EvvcVc=; b=EQ3+zexPqjqNJdMYB8pQCVjVtZA9yRFZgyJ0Xfko7Of5J4K4n9HeNcAzshCHIZkp+q 53rX6Ro1VH6PvlTZHLjveZsov2NC/ZGGjZVI9fLlwUz02KfccKQLAtGyrmOt8KaYbprn oo7arlf2L5dkKIf53n8vCjORVngNLMPBWptHiihLADtZr4w5nXJwThh27GIIP2Hc2ijh aqM1uNh3cLwdM3H/O34kJiqTca7pZ//yCncjmdPWn3Q2vZ6w8avVo61j8L1tZbXie6e9 Z4ZbfHXjWeO/szWI3YW5UzpvVulnC7Ll2izsC9uZKWN/UF5HK8CUPio27JEzsCVic2Lh AzbA== X-Received: by 10.180.86.201 with SMTP id r9mr15078261wiz.56.1427072919634; Sun, 22 Mar 2015 18:08:39 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id r14sm8782121wiv.13.2015.03.22.18.08.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 22 Mar 2015 18:08:38 -0700 (PDT) Date: Mon, 23 Mar 2015 02:08:36 +0100 From: Mateusz Guzik To: Rui Paulo Subject: Re: svn commit: r278479 - in head: etc sys/kern Message-ID: <20150323010836.GC6798@dft-labs.eu> References: <201502092313.t19NDpoS083043@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201502092313.t19NDpoS083043@svn.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 01:08:41 -0000 On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: > Author: rpaulo > Date: Mon Feb 9 23:13:50 2015 > New Revision: 278479 > URL: https://svnweb.freebsd.org/changeset/base/278479 > > Log: > Notify devd(8) when a process crashed. > > This change implements a notification (via devctl) to userland when > the kernel produces coredumps after a process has crashed. > devd can then run a specific command to produce a human readable crash > report. The command is most usually a helper that runs gdb/lldb > commands on the file/coredump pair. It's possible to use this > functionality for implementing automatic generation of crash reports. > > devd(8) will be notified of the full path of the binary that crashed and > the full path of the coredump file. > The more I look at this the more I'm convinced this is quite insecure. At a minimum this should also grow a flag to decide whether notification about jailed process crashes are allowed. Off by default. As it is you pass a path leading to a jail, but that's inherently untrusted and will lead to trouble. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 02:45:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0437C1B; Mon, 23 Mar 2015 02:45:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9422BCA; Mon, 23 Mar 2015 02:45:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2N2jD7F076755; Mon, 23 Mar 2015 02:45:13 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2N2jDRs076751; Mon, 23 Mar 2015 02:45:13 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201503230245.t2N2jDRs076751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 23 Mar 2015 02:45:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280360 - head/crypto/openssh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 02:45:13 -0000 Author: bdrewery Date: Mon Mar 23 02:45:12 2015 New Revision: 280360 URL: https://svnweb.freebsd.org/changeset/base/280360 Log: Document "none" for VersionAddendum. PR: 193127 MFC after: 2 weeks Modified: head/crypto/openssh/ssh_config.5 head/crypto/openssh/sshd_config.5 Modified: head/crypto/openssh/ssh_config.5 ============================================================================== --- head/crypto/openssh/ssh_config.5 Sun Mar 22 23:42:21 2015 (r280359) +++ head/crypto/openssh/ssh_config.5 Mon Mar 23 02:45:12 2015 (r280360) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: ssh_config.5,v 1.185 2014/02/23 20:11:36 djm Exp $ .\" $FreeBSD$ -.Dd February 23, 2014 +.Dd March 22, 2015 .Dt SSH_CONFIG 5 .Os .Sh NAME @@ -1424,6 +1424,9 @@ Specifies a string to append to the regu OS- or site-specific modifications. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm VisualHostKey If this flag is set to .Dq yes , Modified: head/crypto/openssh/sshd_config.5 ============================================================================== --- head/crypto/openssh/sshd_config.5 Sun Mar 22 23:42:21 2015 (r280359) +++ head/crypto/openssh/sshd_config.5 Mon Mar 23 02:45:12 2015 (r280360) @@ -35,7 +35,7 @@ .\" .\" $OpenBSD: sshd_config.5,v 1.172 2014/02/27 22:47:07 djm Exp $ .\" $FreeBSD$ -.Dd February 27, 2014 +.Dd March 22, 2015 .Dt SSHD_CONFIG 5 .Os .Sh NAME @@ -1254,6 +1254,9 @@ Optionally specifies additional text to sent by the server upon connection. The default is .Dq FreeBSD-20140420 . +The value +.Dq none +may be used to disable this. .It Cm X11DisplayOffset Specifies the first display number available for .Xr sshd 8 Ns 's From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 03:44:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9287063F; Mon, 23 Mar 2015 03:44:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DA8625A; Mon, 23 Mar 2015 03:44:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2N3i0U7005122; Mon, 23 Mar 2015 03:44:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2N3i0U1005121; Mon, 23 Mar 2015 03:44:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503230344.t2N3i0U1005121@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Mon, 23 Mar 2015 03:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280361 - head/tools/tools/ath/athratestats X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 03:44:01 -0000 Author: adrian Date: Mon Mar 23 03:43:59 2015 New Revision: 280361 URL: https://svnweb.freebsd.org/changeset/base/280361 Log: Bump mask to be 64 bits - this fixes seeing MCS rates > 19. Tested: * AR9380, STA mode, associated to a 3x3 AP (also FreeBSD) Modified: head/tools/tools/ath/athratestats/main.c Modified: head/tools/tools/ath/athratestats/main.c ============================================================================== --- head/tools/tools/ath/athratestats/main.c Mon Mar 23 02:45:12 2015 (r280360) +++ head/tools/tools/ath/athratestats/main.c Mon Mar 23 03:43:59 2015 (r280361) @@ -115,7 +115,7 @@ static void ath_sample_stats(struct ath_ratestats *r, struct ath_rateioctl_rt *rt, struct sample_node *sn) { - uint32_t mask; + uint64_t mask; int rix, y; PRINTMSG("static_rix (%d) ratemask 0x%llx\n", From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 11:02:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98632C5E; Mon, 23 Mar 2015 11:02:08 +0000 (UTC) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56A3081B; Mon, 23 Mar 2015 11:02:08 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Ya07N-0006oF-2P; Mon, 23 Mar 2015 12:02:06 +0100 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, "Alexander Motin" Subject: Re: svn commit: r280040 - head/usr.sbin/bhyve References: <201503151529.t2FFT4lN012903@svn.freebsd.org> Date: Mon, 23 Mar 2015 12:01:59 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <201503151529.t2FFT4lN012903@svn.freebsd.org> User-Agent: Opera Mail/1.0 (Win32) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: - X-Spam-Score: -1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, BAYES_40 autolearn=disabled version=3.3.2 X-Scan-Signature: 67ca9281b58cf5c8a5b2b1d981559170 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 11:02:08 -0000 On Sun, 15 Mar 2015 16:29:04 +0100, Alexander Motin wrote: > Author: mav > Date: Sun Mar 15 15:29:03 2015 > New Revision: 280040 > URL: https://svnweb.freebsd.org/changeset/base/280040 > > Log: > Give AHCI disk serial based on backing file path same as for virtio > block. > It is still not good that they may intersect on different hosts, but > that > is better then intersecting on the same host. Hi, Maybe you can mix sysctl 'kern.hostid: 3674800361' into it. Regards, Ronald. > MFC after: 2 weeks > > Modified: > head/usr.sbin/bhyve/pci_ahci.c > > Modified: head/usr.sbin/bhyve/pci_ahci.c > ============================================================================== > --- head/usr.sbin/bhyve/pci_ahci.c Sun Mar 15 15:19:02 2015 (r280039) > +++ head/usr.sbin/bhyve/pci_ahci.c Sun Mar 15 15:29:03 2015 (r280040) > @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include "bhyverun.h" > #include "pci_emul.h" > @@ -131,6 +132,7 @@ struct ahci_port { > struct pci_ahci_softc *pr_sc; > uint8_t *cmd_lst; > uint8_t *rfis; > + char ident[20 + 1]; > int atapi; > int reset; > int mult_sectors; > @@ -855,8 +857,7 @@ handle_identify(struct ahci_port *p, int > buf[1] = cyl; > buf[3] = heads; > buf[6] = sech; > - /* TODO emulate different serial? */ > - ata_string((uint8_t *)(buf+10), "123456", 20); > + ata_string((uint8_t *)(buf+10), p->ident, 20); > ata_string((uint8_t *)(buf+23), "001", 8); > ata_string((uint8_t *)(buf+27), "BHYVE SATA DISK", 40); > buf[47] = (0x8000 | 128); > @@ -946,8 +947,7 @@ handle_atapi_identify(struct ahci_port * > memset(buf, 0, sizeof(buf)); > buf[0] = (2 << 14 | 5 << 8 | 1 << 7 | 2 << 5); > - /* TODO emulate different serial? */ > - ata_string((uint8_t *)(buf+10), "123456", 20); > + ata_string((uint8_t *)(buf+10), p->ident, 20); > ata_string((uint8_t *)(buf+23), "001", 8); > ata_string((uint8_t *)(buf+27), "BHYVE SATA DVD ROM", 40); > buf[49] = (1 << 9 | 1 << 8); > @@ -2167,6 +2167,8 @@ pci_ahci_init(struct vmctx *ctx, struct > struct blockif_ctxt *bctxt; > struct pci_ahci_softc *sc; > int ret, slots; > + MD5_CTX mdctx; > + u_char digest[16]; > ret = 0; > @@ -2204,6 +2206,16 @@ pci_ahci_init(struct vmctx *ctx, struct > sc->port[0].pr_sc = sc; > /* > + * Create an identifier for the backing file. Use parts of the > + * md5 sum of the filename > + */ > + MD5Init(&mdctx); > + MD5Update(&mdctx, opts, strlen(opts)); > + MD5Final(digest, &mdctx); > + sprintf(sc->port[0].ident, "BHYVE-%02X%02X-%02X%02X-%02X%02X", > + digest[0], digest[1], digest[2], digest[3], digest[4], digest[5]); > + > + /* > * Allocate blockif request structures and add them > * to the free list > */ > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 11:48:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C41E292F; Mon, 23 Mar 2015 11:48:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADEBCC93; Mon, 23 Mar 2015 11:48:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NBmQCn024957; Mon, 23 Mar 2015 11:48:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NBmQ7o024956; Mon, 23 Mar 2015 11:48:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503231148.t2NBmQ7o024956@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 23 Mar 2015 11:48: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: r280363 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 11:48:26 -0000 Author: mav Date: Mon Mar 23 11:48:25 2015 New Revision: 280363 URL: https://svnweb.freebsd.org/changeset/base/280363 Log: MFC r280293: Add missing variable initialization. Reported by: Coverity CID: 1288938 Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 11:47:01 2015 (r280362) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 11:48:25 2015 (r280363) @@ -1509,7 +1509,7 @@ ata_ioreq_cb(struct blockif_req *br, int DPRINTF("%s %d\n", __func__, err); - ncq = 0; + ncq = dsm = 0; aior = br->br_param; p = aior->io_pr; cfis = aior->cfis; From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 11:55:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25278D27; Mon, 23 Mar 2015 11:55:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E425D71; Mon, 23 Mar 2015 11:55:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NBt0TY029301; Mon, 23 Mar 2015 11:55:00 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NBsvN8029271; Mon, 23 Mar 2015 11:54:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503231154.t2NBsvN8029271@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 23 Mar 2015 11:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280364 - in head/sys/arm64: . include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 11:55:00 -0000 Author: andrew Date: Mon Mar 23 11:54:56 2015 New Revision: 280364 URL: https://svnweb.freebsd.org/changeset/base/280364 Log: Add the start of the arm64 machine headers. This is the subset needed to start getting userland libraries building. Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/ head/sys/arm64/include/ head/sys/arm64/include/_align.h (contents, props changed) head/sys/arm64/include/_inttypes.h (contents, props changed) head/sys/arm64/include/_limits.h (contents, props changed) head/sys/arm64/include/_stdint.h (contents, props changed) head/sys/arm64/include/_types.h (contents, props changed) head/sys/arm64/include/asm.h (contents, props changed) head/sys/arm64/include/atomic.h (contents, props changed) head/sys/arm64/include/cpu.h (contents, props changed) head/sys/arm64/include/cpufunc.h (contents, props changed) head/sys/arm64/include/elf.h (contents, props changed) head/sys/arm64/include/endian.h (contents, props changed) head/sys/arm64/include/exec.h (contents, props changed) head/sys/arm64/include/float.h (contents, props changed) head/sys/arm64/include/ieeefp.h (contents, props changed) head/sys/arm64/include/param.h (contents, props changed) head/sys/arm64/include/pcb.h (contents, props changed) head/sys/arm64/include/pcpu.h (contents, props changed) head/sys/arm64/include/pmap.h (contents, props changed) head/sys/arm64/include/pmc_mdep.h (contents, props changed) head/sys/arm64/include/proc.h (contents, props changed) head/sys/arm64/include/profile.h (contents, props changed) head/sys/arm64/include/pte.h (contents, props changed) head/sys/arm64/include/reloc.h (contents, props changed) head/sys/arm64/include/runq.h (contents, props changed) head/sys/arm64/include/setjmp.h (contents, props changed) head/sys/arm64/include/signal.h (contents, props changed) head/sys/arm64/include/stdarg.h (contents, props changed) head/sys/arm64/include/ucontext.h (contents, props changed) head/sys/arm64/include/vdso.h (contents, props changed) head/sys/arm64/include/vm.h (contents, props changed) head/sys/arm64/include/vmparam.h (contents, props changed) Added: head/sys/arm64/include/_align.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/_align.h Mon Mar 23 11:54:56 2015 (r280364) @@ -0,0 +1,44 @@ +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * William Jolitz. + * + * 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 REGENTS 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 REGENTS 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. + * + * from: @(#)param.h 5.8 (Berkeley) 6/28/91 + * $FreeBSD$ + */ + +#ifndef _MACHINE__ALIGN_H_ +#define _MACHINE__ALIGN_H_ + +/* + * Round p (pointer or byte index) up to a correctly-aligned value + * for all data types (int, long, ...). The result is unsigned int + * and must be cast to any desired pointer type. + */ +#define _ALIGNBYTES (sizeof(long long) - 1) +#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) & ~_ALIGNBYTES) + +#endif /* !_MACHINE__ALIGN_H_ */ Added: head/sys/arm64/include/_inttypes.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/_inttypes.h Mon Mar 23 11:54:56 2015 (r280364) @@ -0,0 +1,213 @@ +/*- + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Klaus Klein. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. + * + * From: $NetBSD: int_fmtio.h,v 1.4 2008/04/28 20:23:36 martin Exp $ + * $FreeBSD$ + */ + +#ifndef _MACHINE__INTTYPES_H_ +#define _MACHINE__INTTYPES_H_ + +/* + * Macros for format specifiers. + */ + +/* fprintf(3) macros for signed integers. */ + +#define PRId8 "d" /* int8_t */ +#define PRId16 "d" /* int16_t */ +#define PRId32 "d" /* int32_t */ +#define PRId64 "ld" /* int64_t */ +#define PRIdLEAST8 "d" /* int_least8_t */ +#define PRIdLEAST16 "d" /* int_least16_t */ +#define PRIdLEAST32 "d" /* int_least32_t */ +#define PRIdLEAST64 "ld" /* int_least64_t */ +#define PRIdFAST8 "d" /* int_fast8_t */ +#define PRIdFAST16 "d" /* int_fast16_t */ +#define PRIdFAST32 "d" /* int_fast32_t */ +#define PRIdFAST64 "ld" /* int_fast64_t */ +#define PRIdMAX "jd" /* intmax_t */ +#define PRIdPTR "ld" /* intptr_t */ + +#define PRIi8 "i" /* int8_t */ +#define PRIi16 "i" /* int16_t */ +#define PRIi32 "i" /* int32_t */ +#define PRIi64 "li" /* int64_t */ +#define PRIiLEAST8 "i" /* int_least8_t */ +#define PRIiLEAST16 "i" /* int_least16_t */ +#define PRIiLEAST32 "i" /* int_least32_t */ +#define PRIiLEAST64 "li" /* int_least64_t */ +#define PRIiFAST8 "i" /* int_fast8_t */ +#define PRIiFAST16 "i" /* int_fast16_t */ +#define PRIiFAST32 "i" /* int_fast32_t */ +#define PRIiFAST64 "li" /* int_fast64_t */ +#define PRIiMAX "ji" /* intmax_t */ +#define PRIiPTR "li" /* intptr_t */ + +/* fprintf(3) macros for unsigned integers. */ + +#define PRIo8 "o" /* uint8_t */ +#define PRIo16 "o" /* uint16_t */ +#define PRIo32 "o" /* uint32_t */ +#define PRIo64 "lo" /* uint64_t */ +#define PRIoLEAST8 "o" /* uint_least8_t */ +#define PRIoLEAST16 "o" /* uint_least16_t */ +#define PRIoLEAST32 "o" /* uint_least32_t */ +#define PRIoLEAST64 "lo" /* uint_least64_t */ +#define PRIoFAST8 "o" /* uint_fast8_t */ +#define PRIoFAST16 "o" /* uint_fast16_t */ +#define PRIoFAST32 "o" /* uint_fast32_t */ +#define PRIoFAST64 "lo" /* uint_fast64_t */ +#define PRIoMAX "jo" /* uintmax_t */ +#define PRIoPTR "lo" /* uintptr_t */ + +#define PRIu8 "u" /* uint8_t */ +#define PRIu16 "u" /* uint16_t */ +#define PRIu32 "u" /* uint32_t */ +#define PRIu64 "lu" /* uint64_t */ +#define PRIuLEAST8 "u" /* uint_least8_t */ +#define PRIuLEAST16 "u" /* uint_least16_t */ +#define PRIuLEAST32 "u" /* uint_least32_t */ +#define PRIuLEAST64 "lu" /* uint_least64_t */ +#define PRIuFAST8 "u" /* uint_fast8_t */ +#define PRIuFAST16 "u" /* uint_fast16_t */ +#define PRIuFAST32 "u" /* uint_fast32_t */ +#define PRIuFAST64 "lu" /* uint_fast64_t */ +#define PRIuMAX "ju" /* uintmax_t */ +#define PRIuPTR "lu" /* uintptr_t */ + +#define PRIx8 "x" /* uint8_t */ +#define PRIx16 "x" /* uint16_t */ +#define PRIx32 "x" /* uint32_t */ +#define PRIx64 "lx" /* uint64_t */ +#define PRIxLEAST8 "x" /* uint_least8_t */ +#define PRIxLEAST16 "x" /* uint_least16_t */ +#define PRIxLEAST32 "x" /* uint_least32_t */ +#define PRIxLEAST64 "lx" /* uint_least64_t */ +#define PRIxFAST8 "x" /* uint_fast8_t */ +#define PRIxFAST16 "x" /* uint_fast16_t */ +#define PRIxFAST32 "x" /* uint_fast32_t */ +#define PRIxFAST64 "lx" /* uint_fast64_t */ +#define PRIxMAX "jx" /* uintmax_t */ +#define PRIxPTR "lx" /* uintptr_t */ + +#define PRIX8 "X" /* uint8_t */ +#define PRIX16 "X" /* uint16_t */ +#define PRIX32 "X" /* uint32_t */ +#define PRIX64 "lX" /* uint64_t */ +#define PRIXLEAST8 "X" /* uint_least8_t */ +#define PRIXLEAST16 "X" /* uint_least16_t */ +#define PRIXLEAST32 "X" /* uint_least32_t */ +#define PRIXLEAST64 "lX" /* uint_least64_t */ +#define PRIXFAST8 "X" /* uint_fast8_t */ +#define PRIXFAST16 "X" /* uint_fast16_t */ +#define PRIXFAST32 "X" /* uint_fast32_t */ +#define PRIXFAST64 "lX" /* uint_fast64_t */ +#define PRIXMAX "jX" /* uintmax_t */ +#define PRIXPTR "lX" /* uintptr_t */ + +/* fscanf(3) macros for signed integers. */ + +#define SCNd8 "hhd" /* int8_t */ +#define SCNd16 "hd" /* int16_t */ +#define SCNd32 "d" /* int32_t */ +#define SCNd64 "ld" /* int64_t */ +#define SCNdLEAST8 "hhd" /* int_least8_t */ +#define SCNdLEAST16 "hd" /* int_least16_t */ +#define SCNdLEAST32 "d" /* int_least32_t */ +#define SCNdLEAST64 "ld" /* int_least64_t */ +#define SCNdFAST8 "d" /* int_fast8_t */ +#define SCNdFAST16 "d" /* int_fast16_t */ +#define SCNdFAST32 "d" /* int_fast32_t */ +#define SCNdFAST64 "ld" /* int_fast64_t */ +#define SCNdMAX "jd" /* intmax_t */ +#define SCNdPTR "ld" /* intptr_t */ + +#define SCNi8 "hhi" /* int8_t */ +#define SCNi16 "hi" /* int16_t */ +#define SCNi32 "i" /* int32_t */ +#define SCNi64 "li" /* int64_t */ +#define SCNiLEAST8 "hhi" /* int_least8_t */ +#define SCNiLEAST16 "hi" /* int_least16_t */ +#define SCNiLEAST32 "i" /* int_least32_t */ +#define SCNiLEAST64 "li" /* int_least64_t */ +#define SCNiFAST8 "i" /* int_fast8_t */ +#define SCNiFAST16 "i" /* int_fast16_t */ +#define SCNiFAST32 "i" /* int_fast32_t */ +#define SCNiFAST64 "li" /* int_fast64_t */ +#define SCNiMAX "ji" /* intmax_t */ +#define SCNiPTR "li" /* intptr_t */ + +/* fscanf(3) macros for unsigned integers. */ + +#define SCNo8 "hho" /* uint8_t */ +#define SCNo16 "ho" /* uint16_t */ +#define SCNo32 "o" /* uint32_t */ +#define SCNo64 "lo" /* uint64_t */ +#define SCNoLEAST8 "hho" /* uint_least8_t */ +#define SCNoLEAST16 "ho" /* uint_least16_t */ +#define SCNoLEAST32 "o" /* uint_least32_t */ +#define SCNoLEAST64 "lo" /* uint_least64_t */ +#define SCNoFAST8 "o" /* uint_fast8_t */ +#define SCNoFAST16 "o" /* uint_fast16_t */ +#define SCNoFAST32 "o" /* uint_fast32_t */ +#define SCNoFAST64 "lo" /* uint_fast64_t */ +#define SCNoMAX "jo" /* uintmax_t */ +#define SCNoPTR "lo" /* uintptr_t */ + +#define SCNu8 "hhu" /* uint8_t */ +#define SCNu16 "hu" /* uint16_t */ +#define SCNu32 "u" /* uint32_t */ +#define SCNu64 "lu" /* uint64_t */ +#define SCNuLEAST8 "hhu" /* uint_least8_t */ +#define SCNuLEAST16 "hu" /* uint_least16_t */ +#define SCNuLEAST32 "u" /* uint_least32_t */ +#define SCNuLEAST64 "lu" /* uint_least64_t */ +#define SCNuFAST8 "u" /* uint_fast8_t */ +#define SCNuFAST16 "u" /* uint_fast16_t */ +#define SCNuFAST32 "u" /* uint_fast32_t */ +#define SCNuFAST64 "lu" /* uint_fast64_t */ +#define SCNuMAX "ju" /* uintmax_t */ +#define SCNuPTR "lu" /* uintptr_t */ + +#define SCNx8 "hhx" /* uint8_t */ +#define SCNx16 "hx" /* uint16_t */ +#define SCNx32 "x" /* uint32_t */ +#define SCNx64 "lx" /* uint64_t */ +#define SCNxLEAST8 "hhx" /* uint_least8_t */ +#define SCNxLEAST16 "hx" /* uint_least16_t */ +#define SCNxLEAST32 "x" /* uint_least32_t */ +#define SCNxLEAST64 "lx" /* uint_least64_t */ +#define SCNxFAST8 "x" /* uint_fast8_t */ +#define SCNxFAST16 "x" /* uint_fast16_t */ +#define SCNxFAST32 "x" /* uint_fast32_t */ +#define SCNxFAST64 "lx" /* uint_fast64_t */ +#define SCNxMAX "jx" /* uintmax_t */ +#define SCNxPTR "lx" /* uintptr_t */ + +#endif /* !_MACHINE__INTTYPES_H_ */ Added: head/sys/arm64/include/_limits.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/_limits.h Mon Mar 23 11:54:56 2015 (r280364) @@ -0,0 +1,85 @@ +/*- + * Copyright (c) 1988, 1993 + * The Regents of the University of California. 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 REGENTS 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 REGENTS 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. + * + * @(#)limits.h 8.3 (Berkeley) 1/4/94 + * $FreeBSD$ + */ + +#ifndef _MACHINE__LIMITS_H_ +#define _MACHINE__LIMITS_H_ + +/* + * According to ANSI (section 2.2.4.2), the values below must be usable by + * #if preprocessing directives. Additionally, the expression must have the + * same type as would an expression that is an object of the corresponding + * type converted according to the integral promotions. The subtraction for + * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an + * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). + */ + +#define __CHAR_BIT 8 /* number of bits in a char */ + +#define __SCHAR_MAX 0x7f /* max value for a signed char */ +#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ + +#define __UCHAR_MAX 0xff /* max value for an unsigned char */ + +#define __USHRT_MAX 0xffff /* max value for an unsigned short */ +#define __SHRT_MAX 0x7fff /* max value for a short */ +#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ + +#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ +#define __INT_MAX 0x7fffffff /* max value for an int */ +#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ + +#define __ULONG_MAX 0xffffffffffffffffUL /* max for an unsigned long */ +#define __LONG_MAX 0x7fffffffffffffffL /* max for a long */ +#define __LONG_MIN (-0x7fffffffffffffffL - 1) /* min for a long */ + +/* Long longs have the same size but not the same type as longs. */ + /* max for an unsigned long long */ +#define __ULLONG_MAX 0xffffffffffffffffULL +#define __LLONG_MAX 0x7fffffffffffffffLL /* max for a long long */ +#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ + +#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ + +#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ + +#define __OFF_MAX __LONG_MAX /* max value for an off_t */ +#define __OFF_MIN __LONG_MIN /* min value for an off_t */ + +/* Quads and longs are the same size. Ensure they stay in sync. */ +#define __UQUAD_MAX (__ULONG_MAX) /* max value for a uquad_t */ +#define __QUAD_MAX (__LONG_MAX) /* max value for a quad_t */ +#define __QUAD_MIN (__LONG_MIN) /* min value for a quad_t */ + +#define __LONG_BIT 64 +#define __WORD_BIT 32 + +/* Minimum signal stack size. */ +#define __MINSIGSTKSZ (1024 * 4) + +#endif /* !_MACHINE__LIMITS_H_ */ Added: head/sys/arm64/include/_stdint.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/_stdint.h Mon Mar 23 11:54:56 2015 (r280364) @@ -0,0 +1,158 @@ +/*- + * Copyright (c) 2001, 2002 Mike Barcroft + * Copyright (c) 2001 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Klaus Klein. + * + * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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$ + */ + +#ifndef _MACHINE__STDINT_H_ +#define _MACHINE__STDINT_H_ + +#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) + +#define INT8_C(c) (c) +#define INT16_C(c) (c) +#define INT32_C(c) (c) +#define INT64_C(c) (c ## L) + +#define UINT8_C(c) (c) +#define UINT16_C(c) (c) +#define UINT32_C(c) (c ## U) +#define UINT64_C(c) (c ## UL) + +#define INTMAX_C(c) INT64_C(c) +#define UINTMAX_C(c) UINT64_C(c) + +#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ + +#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) + +/* + * ISO/IEC 9899:1999 + * 7.18.2.1 Limits of exact-width integer types + */ +/* Minimum values of exact-width signed integer types. */ +#define INT8_MIN (-0x7f-1) +#define INT16_MIN (-0x7fff-1) +#define INT32_MIN (-0x7fffffff-1) +#define INT64_MIN (-0x7fffffffffffffffL-1) + +/* Maximum values of exact-width signed integer types. */ +#define INT8_MAX 0x7f +#define INT16_MAX 0x7fff +#define INT32_MAX 0x7fffffff +#define INT64_MAX 0x7fffffffffffffffL + +/* Maximum values of exact-width unsigned integer types. */ +#define UINT8_MAX 0xff +#define UINT16_MAX 0xffff +#define UINT32_MAX 0xffffffffU +#define UINT64_MAX 0xffffffffffffffffUL + +/* + * ISO/IEC 9899:1999 + * 7.18.2.2 Limits of minimum-width integer types + */ +/* Minimum values of minimum-width signed integer types. */ +#define INT_LEAST8_MIN INT8_MIN +#define INT_LEAST16_MIN INT16_MIN +#define INT_LEAST32_MIN INT32_MIN +#define INT_LEAST64_MIN INT64_MIN + +/* Maximum values of minimum-width signed integer types. */ +#define INT_LEAST8_MAX INT8_MAX +#define INT_LEAST16_MAX INT16_MAX +#define INT_LEAST32_MAX INT32_MAX +#define INT_LEAST64_MAX INT64_MAX + +/* Maximum values of minimum-width unsigned integer types. */ +#define UINT_LEAST8_MAX UINT8_MAX +#define UINT_LEAST16_MAX UINT16_MAX +#define UINT_LEAST32_MAX UINT32_MAX +#define UINT_LEAST64_MAX UINT64_MAX + +/* + * ISO/IEC 9899:1999 + * 7.18.2.3 Limits of fastest minimum-width integer types + */ +/* Minimum values of fastest minimum-width signed integer types. */ +#define INT_FAST8_MIN INT32_MIN +#define INT_FAST16_MIN INT32_MIN +#define INT_FAST32_MIN INT32_MIN +#define INT_FAST64_MIN INT64_MIN + +/* Maximum values of fastest minimum-width signed integer types. */ +#define INT_FAST8_MAX INT32_MAX +#define INT_FAST16_MAX INT32_MAX +#define INT_FAST32_MAX INT32_MAX +#define INT_FAST64_MAX INT64_MAX + +/* Maximum values of fastest minimum-width unsigned integer types. */ +#define UINT_FAST8_MAX UINT32_MAX +#define UINT_FAST16_MAX UINT32_MAX +#define UINT_FAST32_MAX UINT32_MAX +#define UINT_FAST64_MAX UINT64_MAX + +/* + * ISO/IEC 9899:1999 + * 7.18.2.4 Limits of integer types capable of holding object pointers + */ +#define INTPTR_MIN INT64_MIN +#define INTPTR_MAX INT64_MAX +#define UINTPTR_MAX UINT64_MAX + +/* + * ISO/IEC 9899:1999 + * 7.18.2.5 Limits of greatest-width integer types + */ +#define INTMAX_MIN INT64_MIN +#define INTMAX_MAX INT64_MAX +#define UINTMAX_MAX UINT64_MAX + +/* + * ISO/IEC 9899:1999 + * 7.18.3 Limits of other integer types + */ +/* Limits of ptrdiff_t. */ +#define PTRDIFF_MIN INT64_MIN +#define PTRDIFF_MAX INT64_MAX + +/* Limits of sig_atomic_t. */ +#define SIG_ATOMIC_MIN INT32_MIN +#define SIG_ATOMIC_MAX INT32_MAX + +/* Limit of size_t. */ +#define SIZE_MAX UINT64_MAX + +/* Limits of wint_t. */ +#define WINT_MIN INT32_MIN +#define WINT_MAX INT32_MAX + +#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */ + +#endif /* !_MACHINE__STDINT_H_ */ Added: head/sys/arm64/include/_types.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/_types.h Mon Mar 23 11:54:56 2015 (r280364) @@ -0,0 +1,114 @@ +/*- + * Copyright (c) 2002 Mike Barcroft + * Copyright (c) 1990, 1993 + * The Regents of the University of California. 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * From: @(#)ansi.h 8.2 (Berkeley) 1/4/94 + * From: @(#)types.h 8.3 (Berkeley) 1/5/94 + * $FreeBSD$ + */ + +#ifndef _MACHINE__TYPES_H_ +#define _MACHINE__TYPES_H_ + +#ifndef _SYS_CDEFS_H_ +#error this file needs sys/cdefs.h as a prerequisite +#endif + +/* + * Basic types upon which most other types are built. + */ +typedef signed char __int8_t; +typedef unsigned char __uint8_t; +typedef short __int16_t; +typedef unsigned short __uint16_t; +typedef int __int32_t; +typedef unsigned int __uint32_t; +typedef long __int64_t; +typedef unsigned long __uint64_t; + +/* + * Standard type definitions. + */ +typedef __int32_t __clock_t; /* clock()... */ +typedef __int64_t __critical_t; +typedef double __double_t; +typedef float __float_t; +typedef __int64_t __intfptr_t; +typedef __int64_t __intmax_t; +typedef __int64_t __intptr_t; +typedef __int32_t __int_fast8_t; +typedef __int32_t __int_fast16_t; +typedef __int32_t __int_fast32_t; +typedef __int64_t __int_fast64_t; +typedef __int8_t __int_least8_t; +typedef __int16_t __int_least16_t; +typedef __int32_t __int_least32_t; +typedef __int64_t __int_least64_t; +typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ +typedef __int64_t __register_t; +typedef __int64_t __segsz_t; /* segment size (in pages) */ +typedef __uint64_t __size_t; /* sizeof() */ +typedef __int64_t __ssize_t; /* byte count or error */ +typedef __int64_t __time_t; /* time()... */ +typedef __uint64_t __uintfptr_t; +typedef __uint64_t __uintmax_t; +typedef __uint64_t __uintptr_t; +typedef __uint32_t __uint_fast8_t; +typedef __uint32_t __uint_fast16_t; +typedef __uint32_t __uint_fast32_t; +typedef __uint64_t __uint_fast64_t; +typedef __uint8_t __uint_least8_t; +typedef __uint16_t __uint_least16_t; +typedef __uint32_t __uint_least32_t; +typedef __uint64_t __uint_least64_t; +typedef __uint64_t __u_register_t; +typedef __uint64_t __vm_offset_t; +typedef __int64_t __vm_ooffset_t; +typedef __uint64_t __vm_paddr_t; +typedef __uint64_t __vm_pindex_t; +typedef __uint64_t __vm_size_t; +typedef unsigned int ___wchar_t; + +#define __WCHAR_MIN __UINT_MIN /* min value for a wchar_t */ +#define __WCHAR_MAX __UINT_MAX /* max value for a wchar_t */ + +/* + * Unusual type definitions. + */ +#ifdef __GNUCLIKE_BUILTIN_VARARGS +typedef __builtin_va_list __va_list; /* internally known to gcc */ +#else +typedef char * __va_list; +#endif /* __GNUCLIKE_BUILTIN_VARARGS */ +#if defined(__GNUCLIKE_BUILTIN_VAALIST) && !defined(__GNUC_VA_LIST) \ + && !defined(__NO_GNUC_VA_LIST) +#define __GNUC_VA_LIST +typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ +#endif + +#endif /* !_MACHINE__TYPES_H_ */ Added: head/sys/arm64/include/asm.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/asm.h Mon Mar 23 11:54:56 2015 (r280364) @@ -0,0 +1,71 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * 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$ + */ + +#ifndef _MACHINE_ASM_H_ +#define _MACHINE_ASM_H_ + +#undef __FBSDID +#if !defined(lint) && !defined(STRIP_FBSDID) +#define __FBSDID(s) .ident s +#else +#define __FBSDID(s) /* nothing */ +#endif + +#define _C_LABEL(x) x + +#define ENTRY(sym) \ + .text; .globl sym; .align 2; sym: +#define EENTRY(sym) \ + .globl sym; sym: +#define END(sym) .size sym, . - sym +#define EEND(sym) + +#define WEAK_REFERENCE(sym, alias) \ + .weak alias; \ + .set alias,sym + +#define UINT64_C(x) (x) + +#if defined(PIC) +#define PIC_SYM(x,y) x ## @ ## y +#else +#define PIC_SYM(x,y) x +#endif + +/* + * Sets the trap fault handler. The exception handler will return to the + * address in the handler register on a data abort or the xzr register to + * clear the handler. The tmp parameter should be a register able to hold + * the temporary data. + */ +#define SET_FAULT_HANDLER(handler, tmp) \ + ldr tmp, [x18, #PC_CURTHREAD]; /* Load curthread */ \ + ldr tmp, [tmp, #TD_PCB]; /* Load the pcb */ \ + str handler, [tmp, #PCB_ONFAULT] /* Set the handler */ + +#endif /* _MACHINE_ASM_H_ */ Added: head/sys/arm64/include/atomic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/atomic.h Mon Mar 23 11:54:56 2015 (r280364) @@ -0,0 +1,574 @@ +/*- + * Copyright (c) 2013 Andrew Turner + * 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$ + */ + +#ifndef _MACHINE_ATOMIC_H_ +#define _MACHINE_ATOMIC_H_ + +#define isb() __asm __volatile("isb" : : : "memory") +#define dsb() __asm __volatile("dsb sy" : : : "memory") +#define dmb() __asm __volatile("dmb sy" : : : "memory") + +#define mb() dmb() +#define wmb() dmb() +#define rmb() dmb() + +static __inline void +atomic_add_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " add %w0, %w0, %w3 \n" + " stxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" + ); +} + +static __inline void +atomic_clear_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " bic %w0, %w0, %w3 \n" + " stxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" + ); +} + +static __inline int +atomic_cmpset_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: mov %w1, #1 \n" + " ldxr %w0, [%2] \n" + " cmp %w0, %w3 \n" + " b.ne 2f \n" + " stxr %w1, %w4, [%2] \n" + " cbnz %w1, 1b \n" + "2:" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) + : : "cc" + ); + + return (!res); +} + +static __inline uint32_t +atomic_fetchadd_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp, ret; + int res; + + __asm __volatile( + "1: ldxr %w4, [%2] \n" + " add %w0, %w4, %w3 \n" + " stxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val), "=&r"(ret) : : "cc" + ); + + return (ret); +} + +static __inline uint32_t +atomic_readandclear_32(volatile uint32_t *p) +{ + uint32_t tmp, ret; + int res; + + __asm __volatile( + " mov %w0, #0 \n" + "1: ldxr %w3, [%2] \n" + " stxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "=&r"(ret) : : "cc" + ); + + return (ret); +} + +static __inline void +atomic_set_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " orr %w0, %w0, %w3 \n" + " stxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" + ); +} + +static __inline void +atomic_subtract_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldxr %w0, [%2] \n" + " sub %w0, %w0, %w3 \n" + " stxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc" + ); +} + +#define atomic_add_int atomic_add_32 +#define atomic_clear_int atomic_clear_32 +#define atomic_cmpset_int atomic_cmpset_32 +#define atomic_fetchadd_int atomic_fetchadd_32 +#define atomic_readandclear_int atomic_readandclear_32 +#define atomic_set_int atomic_set_32 +#define atomic_subtract_int atomic_subtract_32 + + +static __inline void +atomic_add_acq_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldaxr %w0, [%2] \n" + " add %w0, %w0, %w3 \n" + " stlxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + "2:" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline void +atomic_clear_acq_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldaxr %w0, [%2] \n" + " bic %w0, %w0, %w3 \n" + " stlxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline int +atomic_cmpset_acq_32(volatile uint32_t *p, uint32_t cmpval, uint32_t newval) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: mov %w1, #1 \n" + " ldaxr %w0, [%2] \n" + " cmp %w0, %w3 \n" + " b.ne 2f \n" + " stlxr %w1, %w4, [%2] \n" + " cbnz %w1, 1b \n" + "2:" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (cmpval), "+r" (newval) + : : "cc", "memory" + ); + + return (!res); +} + +static __inline uint32_t +atomic_load_acq_32(volatile uint32_t *p) +{ + uint32_t ret; + + ret = *p; + dmb(); + + return (ret); +} + +static __inline void +atomic_set_acq_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldaxr %w0, [%2] \n" + " orr %w0, %w0, %w3 \n" + " stlxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline void +atomic_subtract_acq_32(volatile uint32_t *p, uint32_t val) +{ + uint32_t tmp; + int res; + + __asm __volatile( + "1: ldaxr %w0, [%2] \n" + " sub %w0, %w0, %w3 \n" + " stlxr %w1, %w0, [%2] \n" + " cbnz %w1, 1b \n" + : "=&r"(tmp), "=&r"(res), "+r" (p), "+r" (val) : : "cc", "memory" + ); +} + +static __inline void +atomic_store_rel_32(volatile uint32_t *p, uint32_t val) +{ + + dmb(); + *p = val; +} + +#define atomic_add_acq_int atomic_add_acq_32 +#define atomic_clear_acq_int atomic_add_acq_32 +#define atomic_cmpset_acq_int atomic_cmpset_acq_32 +#define atomic_load_acq_int atomic_load_acq_32 +#define atomic_set_acq_int atomic_set_acq_32 +#define atomic_subtract_acq_int atomic_subtract_acq_32 + +/* The atomic functions currently are both acq and rel, we should fix this. */ +#define atomic_add_rel_32 atomic_add_acq_32 +#define atomic_clear_rel_32 atomic_add_acq_32 +#define atomic_cmpset_rel_32 atomic_cmpset_acq_32 +#define atomic_set_rel_32 atomic_set_acq_32 +#define atomic_subtract_rel_32 atomic_subtract_acq_32 + +#define atomic_add_rel_int atomic_add_rel_32 +#define atomic_clear_rel_int atomic_add_rel_32 +#define atomic_cmpset_rel_int atomic_cmpset_rel_32 +#define atomic_set_rel_int atomic_set_rel_32 +#define atomic_subtract_rel_int atomic_subtract_rel_32 +#define atomic_store_rel_int atomic_store_rel_32 + + +static __inline void +atomic_add_64(volatile uint64_t *p, uint64_t val) +{ + uint64_t tmp; + int res; + + __asm __volatile( + "1: ldxr %0, [%2] \n" *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 12:59:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AB3C37E; Mon, 23 Mar 2015 12:59:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 856F96E3; Mon, 23 Mar 2015 12:59:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NCxELL058348; Mon, 23 Mar 2015 12:59:14 GMT (envelope-from philip@FreeBSD.org) Received: (from philip@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NCxEqh058346; Mon, 23 Mar 2015 12:59:14 GMT (envelope-from philip@FreeBSD.org) Message-Id: <201503231259.t2NCxEqh058346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: philip set sender to philip@FreeBSD.org using -f From: Philip Paeps Date: Mon, 23 Mar 2015 12:59:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r280367 - svnadmin/conf X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 12:59:14 -0000 Author: philip Date: Mon Mar 23 12:59:13 2015 New Revision: 280367 URL: https://svnweb.freebsd.org/changeset/base/280367 Log: Welcome Kristof Provost (kp) as a new src committer. His relentless attacks on bugs in pf and ipv6 couldn't possibly continue unpunished! gnn and I will be his mentors. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Mar 23 12:50:35 2015 (r280366) +++ svnadmin/conf/access Mon Mar 23 12:59:13 2015 (r280367) @@ -137,6 +137,7 @@ ken kensmith kevlo kib +kp kuriyama loos lstewart Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Mar 23 12:50:35 2015 (r280366) +++ svnadmin/conf/mentors Mon Mar 23 12:59:13 2015 (r280367) @@ -25,6 +25,7 @@ jkh rwatson jonathan rwatson jwd rmacklem kadesai ken Co-mentor: scottl, ambrisko +kp philip Co-mentor: gnn mahrens mckusick miwi rwatson monthadar adrian From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 13:38:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29BB3142; Mon, 23 Mar 2015 13:38:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12459C37; Mon, 23 Mar 2015 13:38:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NDca0h077574; Mon, 23 Mar 2015 13:38:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NDcYS9077563; Mon, 23 Mar 2015 13:38:34 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503231338.t2NDcYS9077563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 23 Mar 2015 13:38:34 +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: r280369 - in stable/10/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon modules/drm2/i915kms X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 13:38:36 -0000 Author: kib Date: Mon Mar 23 13:38:33 2015 New Revision: 280369 URL: https://svnweb.freebsd.org/changeset/base/280369 Log: MFC r277487: An update for the i915 GPU driver, which brings the code up to Linux commit 4d93914ae3db4a897ead4b. MFC r277959 (by adrian): Fix backlight for ivybridge based laptops (and whatever else comes through this codepath.) MFC r278146: Do not attach to the unsupported chipsets, unless magic tunable is frobbed. MFC r278147, r278148: Fix sign for the error code returned from the driver-specific code. MFC r278152: Do not access gmbus_ports array past its end. MFC r278159 (by emaste): Remove duplicate intel_fbc_enabled prototype. Added: stable/10/sys/dev/drm2/i915/i915_gem_stolen.c - copied unchanged from r277487, head/sys/dev/drm2/i915/i915_gem_stolen.c stable/10/sys/dev/drm2/i915/intel_ddi.c - copied unchanged from r277487, head/sys/dev/drm2/i915/intel_ddi.c stable/10/sys/dev/drm2/i915/intel_pm.c - copied unchanged from r277487, head/sys/dev/drm2/i915/intel_pm.c Modified: stable/10/sys/dev/drm2/drm.h stable/10/sys/dev/drm2/drmP.h stable/10/sys/dev/drm2/drm_crtc.c stable/10/sys/dev/drm2/drm_crtc.h stable/10/sys/dev/drm2/drm_crtc_helper.c stable/10/sys/dev/drm2/drm_crtc_helper.h stable/10/sys/dev/drm2/drm_drv.c stable/10/sys/dev/drm2/drm_edid.c stable/10/sys/dev/drm2/drm_edid.h stable/10/sys/dev/drm2/drm_edid_modes.h stable/10/sys/dev/drm2/drm_fb_helper.c stable/10/sys/dev/drm2/drm_ioctl.c stable/10/sys/dev/drm2/drm_irq.c stable/10/sys/dev/drm2/drm_memory.c stable/10/sys/dev/drm2/drm_mode.h stable/10/sys/dev/drm2/drm_pciids.h stable/10/sys/dev/drm2/drm_stub.c stable/10/sys/dev/drm2/i915/i915_debug.c stable/10/sys/dev/drm2/i915/i915_dma.c stable/10/sys/dev/drm2/i915/i915_drm.h stable/10/sys/dev/drm2/i915/i915_drv.c stable/10/sys/dev/drm2/i915/i915_drv.h stable/10/sys/dev/drm2/i915/i915_gem.c stable/10/sys/dev/drm2/i915/i915_gem_context.c stable/10/sys/dev/drm2/i915/i915_gem_evict.c stable/10/sys/dev/drm2/i915/i915_gem_execbuffer.c stable/10/sys/dev/drm2/i915/i915_gem_gtt.c stable/10/sys/dev/drm2/i915/i915_gem_tiling.c stable/10/sys/dev/drm2/i915/i915_irq.c stable/10/sys/dev/drm2/i915/i915_reg.h stable/10/sys/dev/drm2/i915/i915_suspend.c stable/10/sys/dev/drm2/i915/intel_bios.c stable/10/sys/dev/drm2/i915/intel_crt.c stable/10/sys/dev/drm2/i915/intel_display.c stable/10/sys/dev/drm2/i915/intel_dp.c stable/10/sys/dev/drm2/i915/intel_drv.h stable/10/sys/dev/drm2/i915/intel_fb.c stable/10/sys/dev/drm2/i915/intel_hdmi.c stable/10/sys/dev/drm2/i915/intel_iic.c stable/10/sys/dev/drm2/i915/intel_lvds.c stable/10/sys/dev/drm2/i915/intel_modes.c stable/10/sys/dev/drm2/i915/intel_overlay.c stable/10/sys/dev/drm2/i915/intel_panel.c stable/10/sys/dev/drm2/i915/intel_ringbuffer.c stable/10/sys/dev/drm2/i915/intel_ringbuffer.h stable/10/sys/dev/drm2/i915/intel_sdvo.c stable/10/sys/dev/drm2/i915/intel_sprite.c stable/10/sys/dev/drm2/i915/intel_tv.c stable/10/sys/dev/drm2/radeon/atombios_encoders.c stable/10/sys/dev/drm2/radeon/radeon_legacy_encoders.c stable/10/sys/modules/drm2/i915kms/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/drm2/drm.h ============================================================================== --- stable/10/sys/dev/drm2/drm.h Mon Mar 23 13:05:02 2015 (r280368) +++ stable/10/sys/dev/drm2/drm.h Mon Mar 23 13:38:33 2015 (r280369) @@ -1018,6 +1018,9 @@ struct drm_event_vblank { #define DRM_CAP_PRIME 0x5 #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 +#define DRM_PRIME_CAP_IMPORT 0x1 +#define DRM_PRIME_CAP_EXPORT 0x2 + #include "drm_mode.h" /** @@ -1126,6 +1129,8 @@ struct drm_event_vblank { #define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) #define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) #define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) +#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) +#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) #define DRM_IOCTL_MM_INIT DRM_IOWR(0xc0, struct drm_mm_init_arg) #define DRM_IOCTL_MM_TAKEDOWN DRM_IOWR(0xc1, struct drm_mm_type_arg) Modified: stable/10/sys/dev/drm2/drmP.h ============================================================================== --- stable/10/sys/dev/drm2/drmP.h Mon Mar 23 13:05:02 2015 (r280368) +++ stable/10/sys/dev/drm2/drmP.h Mon Mar 23 13:38:33 2015 (r280369) @@ -1246,6 +1246,7 @@ int drm_ati_pcigart_cleanup(struct drm_d /* Cache management (drm_memory.c) */ void drm_clflush_pages(vm_page_t *pages, unsigned long num_pages); +void drm_clflush_virt_range(char *addr, unsigned long length); /* Locking IOCTL support (drm_drv.c) */ int drm_lock(struct drm_device *dev, void *data, Modified: stable/10/sys/dev/drm2/drm_crtc.c ============================================================================== --- stable/10/sys/dev/drm2/drm_crtc.c Mon Mar 23 13:05:02 2015 (r280368) +++ stable/10/sys/dev/drm2/drm_crtc.c Mon Mar 23 13:38:33 2015 (r280369) @@ -352,7 +352,7 @@ void drm_framebuffer_cleanup(struct drm_ * @funcs: callbacks for the new CRTC * * LOCKING: - * Caller must hold mode config lock. + * Takes mode_config lock. * * Inits a new object created as base part of an driver crtc object. * @@ -372,8 +372,11 @@ int drm_crtc_init(struct drm_device *dev if (ret) goto out; + crtc->base.properties = &crtc->properties; + list_add_tail(&crtc->head, &dev->mode_config.crtc_list); dev->mode_config.num_crtc++; + out: sx_xunlock(&dev->mode_config.mutex); @@ -474,6 +477,7 @@ int drm_connector_init(struct drm_device if (ret) goto out; + connector->base.properties = &connector->properties; connector->dev = dev; connector->funcs = funcs; connector->connector_type = connector_type; @@ -582,6 +586,7 @@ int drm_plane_init(struct drm_device *de if (ret) goto out; + plane->base.properties = &plane->properties; plane->dev = dev; plane->funcs = funcs; plane->format_types = malloc(sizeof(uint32_t) * format_count, @@ -1399,11 +1404,7 @@ int drm_mode_getconnector(struct drm_dev } connector = obj_to_connector(obj); - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] != 0) { - props_count++; - } - } + props_count = connector->properties.count; for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { if (connector->encoder_ids[i] != 0) { @@ -1456,21 +1457,19 @@ int drm_mode_getconnector(struct drm_dev copied = 0; prop_ptr = (uint32_t *)(uintptr_t)(out_resp->props_ptr); prop_values = (uint64_t *)(uintptr_t)(out_resp->prop_values_ptr); - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] != 0) { - if (copyout(&connector->property_ids[i], - prop_ptr + copied, sizeof(uint32_t))) { - ret = EFAULT; - goto out; - } + for (i = 0; i < connector->properties.count; i++) { + if (copyout(&connector->properties.ids[i], + prop_ptr + copied, sizeof(uint32_t))) { + ret = EFAULT; + goto out; + } - if (copyout(&connector->property_values[i], - prop_values + copied, sizeof(uint64_t))) { - ret = EFAULT; - goto out; - } - copied++; + if (copyout(&connector->properties.values[i], + prop_values + copied, sizeof(uint64_t))) { + ret = EFAULT; + goto out; } + copied++; } } out_resp->count_props = props_count; @@ -1808,7 +1807,7 @@ int drm_mode_setcrtc(struct drm_device * struct drm_display_mode *mode = NULL; struct drm_mode_set set; uint32_t *set_connectors_ptr; - int ret = 0; + int ret; int i; if (!drm_core_check_feature(dev, DRIVER_MODESET)) @@ -2070,7 +2069,7 @@ int drm_mode_addfb(struct drm_device *de ret = -dev->mode_config.funcs->fb_create(dev, file_priv, &r, &fb); if (ret != 0) { - DRM_ERROR("could not create framebuffer, error %d\n", ret); + DRM_DEBUG_KMS("could not create framebuffer, error %d\n", ret); goto out; } @@ -2152,6 +2151,47 @@ static int format_check(struct drm_mode_ } } +static int framebuffer_check(struct drm_mode_fb_cmd2 *r) +{ + int ret, hsub, vsub, num_planes, i; + + ret = format_check(r); + if (ret) { + DRM_DEBUG_KMS("bad framebuffer format 0x%08x\n", r->pixel_format); + return ret; + } + + hsub = drm_format_horz_chroma_subsampling(r->pixel_format); + vsub = drm_format_vert_chroma_subsampling(r->pixel_format); + num_planes = drm_format_num_planes(r->pixel_format); + + if (r->width == 0 || r->width % hsub) { + DRM_DEBUG_KMS("bad framebuffer width %u\n", r->height); + return -EINVAL; + } + + if (r->height == 0 || r->height % vsub) { + DRM_DEBUG_KMS("bad framebuffer height %u\n", r->height); + return -EINVAL; + } + + for (i = 0; i < num_planes; i++) { + unsigned int width = r->width / (i != 0 ? hsub : 1); + + if (!r->handles[i]) { + DRM_DEBUG_KMS("no buffer object handle for plane %d\n", i); + return -EINVAL; + } + + if (r->pitches[i] < drm_format_plane_cpp(r->pixel_format, i) * width) { + DRM_DEBUG_KMS("bad pitch %u for plane %d\n", r->pitches[i], i); + return -EINVAL; + } + } + + return 0; +} + /** * drm_mode_addfb2 - add an FB to the graphics configuration * @inode: inode from the ioctl @@ -2181,21 +2221,19 @@ int drm_mode_addfb2(struct drm_device *d return (EINVAL); if ((config->min_width > r->width) || (r->width > config->max_width)) { - DRM_ERROR("bad framebuffer width %d, should be >= %d && <= %d\n", + DRM_DEBUG_KMS("bad framebuffer width %d, should be >= %d && <= %d\n", r->width, config->min_width, config->max_width); return (EINVAL); } if ((config->min_height > r->height) || (r->height > config->max_height)) { - DRM_ERROR("bad framebuffer height %d, should be >= %d && <= %d\n", + DRM_DEBUG_KMS("bad framebuffer height %d, should be >= %d && <= %d\n", r->height, config->min_height, config->max_height); return (EINVAL); } - ret = format_check(r); - if (ret) { - DRM_ERROR("bad framebuffer format 0x%08x\n", r->pixel_format); - return ret; - } + ret = framebuffer_check(r); + if (ret) + return -ret; sx_xlock(&dev->mode_config.mutex); @@ -2204,7 +2242,7 @@ int drm_mode_addfb2(struct drm_device *d ret = -dev->mode_config.funcs->fb_create(dev, file_priv, r, &fb); if (ret != 0) { - DRM_ERROR("could not create framebuffer, error %d\n", ret); + DRM_DEBUG_KMS("could not create framebuffer, error %d\n", ret); goto out; } @@ -2335,7 +2373,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_de struct drm_framebuffer *fb; unsigned flags; int num_clips; - int ret = 0; + int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return (EINVAL); @@ -2530,7 +2568,7 @@ int drm_mode_attachmode_ioctl(struct drm struct drm_display_mode *mode; struct drm_mode_object *obj; struct drm_mode_modeinfo *umode = &mode_cmd->mode; - int ret = 0; + int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; @@ -2584,7 +2622,7 @@ int drm_mode_detachmode_ioctl(struct drm struct drm_connector *connector; struct drm_display_mode mode; struct drm_mode_modeinfo *umode = &mode_cmd->mode; - int ret = 0; + int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; @@ -2672,6 +2710,33 @@ struct drm_property *drm_property_create return property; } +struct drm_property *drm_property_create_bitmask(struct drm_device *dev, + int flags, const char *name, + const struct drm_prop_enum_list *props, + int num_values) +{ + struct drm_property *property; + int i, ret; + + flags |= DRM_MODE_PROP_BITMASK; + + property = drm_property_create(dev, flags, name, num_values); + if (!property) + return NULL; + + for (i = 0; i < num_values; i++) { + ret = drm_property_add_enum(property, i, + props[i].type, + props[i].name); + if (ret) { + drm_property_destroy(dev, property); + return NULL; + } + } + + return property; +} + struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, const char *name, uint64_t min, uint64_t max) @@ -2695,7 +2760,14 @@ int drm_property_add_enum(struct drm_pro { struct drm_property_enum *prop_enum; - if (!(property->flags & DRM_MODE_PROP_ENUM)) + if (!(property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK))) + return -EINVAL; + + /* + * Bitmask enum properties have the additional constraint of values + * from 0 to 63 + */ + if ((property->flags & DRM_MODE_PROP_BITMASK) && (value > 63)) return -EINVAL; if (!list_empty(&property->enum_blob_list)) { @@ -2736,56 +2808,71 @@ void drm_property_destroy(struct drm_dev free(property, DRM_MEM_KMS); } -int drm_connector_attach_property(struct drm_connector *connector, +void drm_connector_attach_property(struct drm_connector *connector, struct drm_property *property, uint64_t init_val) { - int i; - - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == 0) { - connector->property_ids[i] = property->base.id; - connector->property_values[i] = init_val; - break; - } - } - - if (i == DRM_CONNECTOR_MAX_PROPERTY) - return -EINVAL; - return 0; + drm_object_attach_property(&connector->base, property, init_val); } int drm_connector_property_set_value(struct drm_connector *connector, struct drm_property *property, uint64_t value) { + return drm_object_property_set_value(&connector->base, property, value); +} + +int drm_connector_property_get_value(struct drm_connector *connector, + struct drm_property *property, uint64_t *val) +{ + return drm_object_property_get_value(&connector->base, property, val); +} + +void drm_object_attach_property(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t init_val) +{ + int count = obj->properties->count; + + if (count == DRM_OBJECT_MAX_PROPERTY) { + printf("Failed to attach object property (type: 0x%x). Please " + "increase DRM_OBJECT_MAX_PROPERTY by 1 for each time " + "you see this message on the same object type.\n", + obj->type); + return; + } + + obj->properties->ids[count] = property->base.id; + obj->properties->values[count] = init_val; + obj->properties->count++; +} + +int drm_object_property_set_value(struct drm_mode_object *obj, + struct drm_property *property, uint64_t val) +{ int i; - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == property->base.id) { - connector->property_values[i] = value; - break; + for (i = 0; i < obj->properties->count; i++) { + if (obj->properties->ids[i] == property->base.id) { + obj->properties->values[i] = val; + return 0; } } - if (i == DRM_CONNECTOR_MAX_PROPERTY) - return -EINVAL; - return 0; + return -EINVAL; } -int drm_connector_property_get_value(struct drm_connector *connector, +int drm_object_property_get_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t *val) { int i; - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == property->base.id) { - *val = connector->property_values[i]; - break; + for (i = 0; i < obj->properties->count; i++) { + if (obj->properties->ids[i] == property->base.id) { + *val = obj->properties->values[i]; + return 0; } } - if (i == DRM_CONNECTOR_MAX_PROPERTY) - return -EINVAL; - return 0; + return -EINVAL; } int drm_mode_getproperty_ioctl(struct drm_device *dev, @@ -2817,7 +2904,7 @@ int drm_mode_getproperty_ioctl(struct dr } property = obj_to_property(obj); - if (property->flags & DRM_MODE_PROP_ENUM) { + if (property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK)) { list_for_each_entry(prop_enum, &property->enum_blob_list, head) enum_count++; } else if (property->flags & DRM_MODE_PROP_BLOB) { @@ -2842,7 +2929,7 @@ int drm_mode_getproperty_ioctl(struct dr } out_resp->count_values = value_count; - if (property->flags & DRM_MODE_PROP_ENUM) { + if (property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK)) { if ((out_resp->count_enum_blobs >= enum_count) && enum_count) { copied = 0; enum_ptr = (struct drm_mode_property_enum *)(uintptr_t)out_resp->enum_blob_ptr; @@ -2965,7 +3052,7 @@ int drm_mode_connector_update_edid_prope struct edid *edid) { struct drm_device *dev = connector->dev; - int ret = 0, size; + int ret, size; if (connector->edid_blob_ptr) drm_property_destroy_blob(dev, connector->edid_blob_ptr); @@ -2988,75 +3075,202 @@ int drm_mode_connector_update_edid_prope return ret; } +static bool drm_property_change_is_valid(struct drm_property *property, + u64 value) +{ + if (property->flags & DRM_MODE_PROP_IMMUTABLE) + return false; + if (property->flags & DRM_MODE_PROP_RANGE) { + if (value < property->values[0] || value > property->values[1]) + return false; + return true; + } else if (property->flags & DRM_MODE_PROP_BITMASK) { + int i; + u64 valid_mask = 0; + for (i = 0; i < property->num_values; i++) + valid_mask |= (1ULL << property->values[i]); + return !(value & ~valid_mask); + } else { + int i; + for (i = 0; i < property->num_values; i++) + if (property->values[i] == value) + return true; + return false; + } +} + int drm_mode_connector_property_set_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { - struct drm_mode_connector_set_property *out_resp = data; - struct drm_mode_object *obj; - struct drm_property *property; - struct drm_connector *connector; + struct drm_mode_connector_set_property *conn_set_prop = data; + struct drm_mode_obj_set_property obj_set_prop = { + .value = conn_set_prop->value, + .prop_id = conn_set_prop->prop_id, + .obj_id = conn_set_prop->connector_id, + .obj_type = DRM_MODE_OBJECT_CONNECTOR + }; + + /* It does all the locking and checking we need */ + return drm_mode_obj_set_property_ioctl(dev, &obj_set_prop, file_priv); +} + +static int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t value) +{ + int ret = -EINVAL; + struct drm_connector *connector = obj_to_connector(obj); + + /* Do DPMS ourselves */ + if (property == connector->dev->mode_config.dpms_property) { + if (connector->funcs->dpms) + (*connector->funcs->dpms)(connector, (int)value); + ret = 0; + } else if (connector->funcs->set_property) + ret = connector->funcs->set_property(connector, property, value); + + /* store the property value if successful */ + if (!ret) + drm_connector_property_set_value(connector, property, value); + return ret; +} + +static int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t value) +{ int ret = -EINVAL; + struct drm_crtc *crtc = obj_to_crtc(obj); + + if (crtc->funcs->set_property) + ret = crtc->funcs->set_property(crtc, property, value); + if (!ret) + drm_object_property_set_value(obj, property, value); + + return ret; +} + +static int drm_mode_plane_set_obj_prop(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t value) +{ + int ret = -EINVAL; + struct drm_plane *plane = obj_to_plane(obj); + + if (plane->funcs->set_property) + ret = plane->funcs->set_property(plane, property, value); + if (!ret) + drm_object_property_set_value(obj, property, value); + + return ret; +} + +int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + struct drm_mode_obj_get_properties *arg = data; + struct drm_mode_object *obj; + int ret = 0; int i; + int copied = 0; + int props_count = 0; + uint32_t __user *props_ptr; + uint64_t __user *prop_values_ptr; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; sx_xlock(&dev->mode_config.mutex); - obj = drm_mode_object_find(dev, out_resp->connector_id, DRM_MODE_OBJECT_CONNECTOR); + obj = drm_mode_object_find(dev, arg->obj_id, arg->obj_type); if (!obj) { + ret = -EINVAL; + goto out; + } + if (!obj->properties) { + ret = -EINVAL; goto out; } - connector = obj_to_connector(obj); - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == out_resp->prop_id) - break; + props_count = obj->properties->count; + + /* This ioctl is called twice, once to determine how much space is + * needed, and the 2nd time to fill it. */ + if ((arg->count_props >= props_count) && props_count) { + copied = 0; + props_ptr = (uint32_t __user *)(unsigned long)(arg->props_ptr); + prop_values_ptr = (uint64_t __user *)(unsigned long) + (arg->prop_values_ptr); + for (i = 0; i < props_count; i++) { + if (copyout(props_ptr + copied, + &obj->properties->ids[i], sizeof(uint32_t))) { + ret = -EFAULT; + goto out; + } + if (copyout(prop_values_ptr + copied, + &obj->properties->values[i], sizeof(uint64_t))) { + ret = -EFAULT; + goto out; + } + copied++; + } } + arg->count_props = props_count; +out: + sx_xunlock(&dev->mode_config.mutex); + return ret; +} - if (i == DRM_CONNECTOR_MAX_PROPERTY) { +int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + struct drm_mode_obj_set_property *arg = data; + struct drm_mode_object *arg_obj; + struct drm_mode_object *prop_obj; + struct drm_property *property; + int ret = -EINVAL; + int i; + + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return -EINVAL; + + sx_xlock(&dev->mode_config.mutex); + + arg_obj = drm_mode_object_find(dev, arg->obj_id, arg->obj_type); + if (!arg_obj) + goto out; + if (!arg_obj->properties) goto out; - } - obj = drm_mode_object_find(dev, out_resp->prop_id, DRM_MODE_OBJECT_PROPERTY); - if (!obj) { + for (i = 0; i < arg_obj->properties->count; i++) + if (arg_obj->properties->ids[i] == arg->prop_id) + break; + + if (i == arg_obj->properties->count) goto out; - } - property = obj_to_property(obj); - if (property->flags & DRM_MODE_PROP_IMMUTABLE) + prop_obj = drm_mode_object_find(dev, arg->prop_id, + DRM_MODE_OBJECT_PROPERTY); + if (!prop_obj) goto out; + property = obj_to_property(prop_obj); - if (property->flags & DRM_MODE_PROP_RANGE) { - if (out_resp->value < property->values[0]) - goto out; + if (!drm_property_change_is_valid(property, arg->value)) + goto out; - if (out_resp->value > property->values[1]) - goto out; - } else { - int found = 0; - for (i = 0; i < property->num_values; i++) { - if (property->values[i] == out_resp->value) { - found = 1; - break; - } - } - if (!found) { - goto out; - } + switch (arg_obj->type) { + case DRM_MODE_OBJECT_CONNECTOR: + ret = drm_mode_connector_set_obj_prop(arg_obj, property, + arg->value); + break; + case DRM_MODE_OBJECT_CRTC: + ret = drm_mode_crtc_set_obj_prop(arg_obj, property, arg->value); + break; + case DRM_MODE_OBJECT_PLANE: + ret = drm_mode_plane_set_obj_prop(arg_obj, property, arg->value); + break; } - /* Do DPMS ourselves */ - if (property == connector->dev->mode_config.dpms_property) { - if (connector->funcs->dpms) - (*connector->funcs->dpms)(connector, (int) out_resp->value); - ret = 0; - } else if (connector->funcs->set_property) - ret = connector->funcs->set_property(connector, property, out_resp->value); - - /* store the property value if successful */ - if (!ret) - drm_connector_property_set_value(connector, property, out_resp->value); out: sx_xunlock(&dev->mode_config.mutex); return ret; @@ -3176,6 +3390,11 @@ int drm_mode_gamma_get_ioctl(struct drm_ } crtc = obj_to_crtc(obj); + if (crtc->funcs->gamma_set == NULL) { + ret = -ENOSYS; + goto out; + } + /* memcpy into gamma store */ if (crtc_lut->gamma_size != crtc->gamma_size) { ret = -EINVAL; @@ -3417,3 +3636,136 @@ void drm_fb_get_bpp_depth(uint32_t forma break; } } + +/** + * drm_format_num_planes - get the number of planes for format + * @format: pixel format (DRM_FORMAT_*) + * + * RETURNS: + * The number of planes used by the specified pixel format. + */ +int drm_format_num_planes(uint32_t format) +{ + switch (format) { + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + case DRM_FORMAT_YUV411: + case DRM_FORMAT_YVU411: + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV444: + case DRM_FORMAT_YVU444: + return 3; + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + case DRM_FORMAT_NV16: + case DRM_FORMAT_NV61: + return 2; + default: + return 1; + } +} + +/** + * drm_format_plane_cpp - determine the bytes per pixel value + * @format: pixel format (DRM_FORMAT_*) + * @plane: plane index + * + * RETURNS: + * The bytes per pixel value for the specified plane. + */ +int drm_format_plane_cpp(uint32_t format, int plane) +{ + unsigned int depth; + int bpp; + + if (plane >= drm_format_num_planes(format)) + return 0; + + switch (format) { + case DRM_FORMAT_YUYV: + case DRM_FORMAT_YVYU: + case DRM_FORMAT_UYVY: + case DRM_FORMAT_VYUY: + return 2; + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + case DRM_FORMAT_NV16: + case DRM_FORMAT_NV61: + return plane ? 2 : 1; + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + case DRM_FORMAT_YUV411: + case DRM_FORMAT_YVU411: + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV444: + case DRM_FORMAT_YVU444: + return 1; + default: + drm_fb_get_bpp_depth(format, &depth, &bpp); + return bpp >> 3; + } +} + +/** + * drm_format_horz_chroma_subsampling - get the horizontal chroma subsampling factor + * @format: pixel format (DRM_FORMAT_*) + * + * RETURNS: + * The horizontal chroma subsampling factor for the + * specified pixel format. + */ +int drm_format_horz_chroma_subsampling(uint32_t format) +{ + switch (format) { + case DRM_FORMAT_YUV411: + case DRM_FORMAT_YVU411: + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + return 4; + case DRM_FORMAT_YUYV: + case DRM_FORMAT_YVYU: + case DRM_FORMAT_UYVY: + case DRM_FORMAT_VYUY: + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + case DRM_FORMAT_NV16: + case DRM_FORMAT_NV61: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + return 2; + default: + return 1; + } +} + +/** + * drm_format_vert_chroma_subsampling - get the vertical chroma subsampling factor + * @format: pixel format (DRM_FORMAT_*) + * + * RETURNS: + * The vertical chroma subsampling factor for the + * specified pixel format. + */ +int drm_format_vert_chroma_subsampling(uint32_t format) +{ + switch (format) { + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + return 4; + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + return 2; + default: + return 1; + } +} Modified: stable/10/sys/dev/drm2/drm_crtc.h ============================================================================== --- stable/10/sys/dev/drm2/drm_crtc.h Mon Mar 23 13:05:02 2015 (r280368) +++ stable/10/sys/dev/drm2/drm_crtc.h Mon Mar 23 13:38:33 2015 (r280369) @@ -47,6 +47,14 @@ struct i2c_adapter; struct drm_mode_object { uint32_t id; uint32_t type; + struct drm_object_properties *properties; +}; + +#define DRM_OBJECT_MAX_PROPERTY 16 +struct drm_object_properties { + int count; + uint32_t ids[DRM_OBJECT_MAX_PROPERTY]; + uint64_t values[DRM_OBJECT_MAX_PROPERTY]; }; /* @@ -295,7 +303,8 @@ struct drm_plane; * @mode_fixup: fixup proposed mode * @mode_set: set the desired mode on the CRTC * @gamma_set: specify color ramp for CRTC - * @destroy: deinit and free object. + * @destroy: deinit and free object + * @set_property: called when a property is changed * * The drm_crtc_funcs structure is the central CRTC management structure * in the DRM. Each CRTC controls one or more connectors (note that the name @@ -339,6 +348,8 @@ struct drm_crtc_funcs { int (*page_flip)(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event); + int (*set_property)(struct drm_crtc *crtc, + struct drm_property *property, uint64_t val); }; /** @@ -347,6 +358,7 @@ struct drm_crtc_funcs { * @x: x position on screen * @y: y position on screen * @funcs: CRTC control functions + * @properties: property tracking for this CRTC * * Each CRTC may have one or more connectors associated with it. This structure * allows the CRTC to be controlled. @@ -382,6 +394,8 @@ struct drm_crtc { /* if you are using the helper */ void *helper_private; + + struct drm_object_properties properties; }; @@ -431,7 +445,6 @@ struct drm_encoder_funcs { }; #define DRM_CONNECTOR_MAX_UMODES 16 -#define DRM_CONNECTOR_MAX_PROPERTY 16 #define DRM_CONNECTOR_LEN 32 #define DRM_CONNECTOR_MAX_ENCODER 2 @@ -511,8 +524,7 @@ struct drm_connector { struct list_head user_modes; struct drm_property_blob *edid_blob_ptr; - u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; - uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; + struct drm_object_properties properties; uint8_t polled; /* DRM_CONNECTOR_POLL_* */ @@ -543,6 +555,7 @@ struct drm_connector { * @update_plane: update the plane configuration * @disable_plane: shut down the plane * @destroy: clean up plane resources + * @set_property: called when a property is changed */ struct drm_plane_funcs { int (*update_plane)(struct drm_plane *plane, @@ -553,6 +566,8 @@ struct drm_plane_funcs { uint32_t src_w, uint32_t src_h); int (*disable_plane)(struct drm_plane *plane); void (*destroy)(struct drm_plane *plane); + int (*set_property)(struct drm_plane *plane, + struct drm_property *property, uint64_t val); }; /** @@ -570,6 +585,7 @@ struct drm_plane_funcs { * @enabled: enabled flag * @funcs: helper functions * @helper_private: storage for drver layer + @properties: property tracking for this plane */ struct drm_plane { struct drm_device *dev; @@ -592,6 +608,8 @@ struct drm_plane { const struct drm_plane_funcs *funcs; void *helper_private; + + struct drm_object_properties properties; }; /** @@ -806,6 +824,15 @@ extern int drm_connector_property_set_va extern int drm_connector_property_get_value(struct drm_connector *connector, struct drm_property *property, uint64_t *value); +void drm_object_attach_property(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t init_val); +extern int drm_object_property_set_value(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t val); +extern int drm_object_property_get_value(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t *value); extern struct drm_display_mode *drm_crtc_mode_create(struct drm_device *dev); extern void drm_framebuffer_set_object(struct drm_device *dev, unsigned long handle); @@ -818,7 +845,7 @@ extern int drmfb_remove(struct drm_devic extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY); extern bool drm_crtc_in_use(struct drm_crtc *crtc); -extern int drm_connector_attach_property(struct drm_connector *connector, +extern void drm_connector_attach_property(struct drm_connector *connector, struct drm_property *property, uint64_t init_val); extern struct drm_property *drm_property_create(struct drm_device *dev, int flags, const char *name, int num_values); @@ -826,6 +853,10 @@ extern struct drm_property *drm_property const char *name, const struct drm_prop_enum_list *props, int num_values); +struct drm_property *drm_property_create_bitmask(struct drm_device *dev, + int flags, const char *name, + const struct drm_prop_enum_list *props, + int num_values); struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, const char *name, uint64_t min, uint64_t max); @@ -921,7 +952,8 @@ extern int drm_add_modes_noedid(struct d extern int drm_edid_header_is_valid(const u8 *raw_edid); extern bool drm_edid_is_valid(struct edid *edid); struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, - int hsize, int vsize, int fresh); + int hsize, int vsize, int fresh, + bool rb); extern int drm_mode_create_dumb_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); @@ -929,7 +961,16 @@ extern int drm_mode_mmap_dumb_ioctl(stru void *data, struct drm_file *file_priv); extern int drm_mode_destroy_dumb_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); +extern int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); extern void drm_fb_get_bpp_depth(uint32_t format, unsigned int *depth, int *bpp); +extern int drm_format_num_planes(uint32_t format); +extern int drm_format_plane_cpp(uint32_t format, int plane); +extern int drm_format_horz_chroma_subsampling(uint32_t format); +extern int drm_format_vert_chroma_subsampling(uint32_t format); + #endif /* __DRM_CRTC_H__ */ Modified: stable/10/sys/dev/drm2/drm_crtc_helper.c ============================================================================== --- stable/10/sys/dev/drm2/drm_crtc_helper.c Mon Mar 23 13:05:02 2015 (r280368) +++ stable/10/sys/dev/drm2/drm_crtc_helper.c Mon Mar 23 13:38:33 2015 (r280369) @@ -549,7 +549,7 @@ int drm_crtc_helper_set_config(struct dr int count = 0, ro, fail = 0; struct drm_crtc_helper_funcs *crtc_funcs; struct drm_mode_set save_set; - int ret = 0; + int ret; int i; DRM_DEBUG_KMS("\n"); Modified: stable/10/sys/dev/drm2/drm_crtc_helper.h ============================================================================== --- stable/10/sys/dev/drm2/drm_crtc_helper.h Mon Mar 23 13:05:02 2015 (r280368) +++ stable/10/sys/dev/drm2/drm_crtc_helper.h Mon Mar 23 13:38:33 2015 (r280369) @@ -78,7 +78,7 @@ struct drm_encoder_helper_funcs { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 13:42:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 175D543E; Mon, 23 Mar 2015 13:42:05 +0000 (UTC) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id D22DBD11; Mon, 23 Mar 2015 13:42:04 +0000 (UTC) Received: from bender (c112.sec.cl.cam.ac.uk [128.232.18.112]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 6FBA4D7A38; Mon, 23 Mar 2015 13:42:02 +0000 (UTC) Date: Mon, 23 Mar 2015 13:42:01 +0000 From: Andrew Turner Subject: Re: svn commit: r280364 - in head/sys/arm64: . include Message-ID: <20150323134201.2af00fae@bender> In-Reply-To: <201503231154.t2NBsvN8029271@svn.freebsd.org> References: <201503231154.t2NBsvN8029271@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 13:42:05 -0000 On Mon, 23 Mar 2015 11:54:57 +0000 (UTC) Andrew Turner wrote: > Author: andrew > Date: Mon Mar 23 11:54:56 2015 > New Revision: 280364 > URL: https://svnweb.freebsd.org/changeset/base/280364 > > Log: > Add the start of the arm64 machine headers. This is the subset > needed to start getting userland libraries building. > > Reviewed by: imp > Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2057 From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 14:36:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 366F416D; Mon, 23 Mar 2015 14:36:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 20C6F68F; Mon, 23 Mar 2015 14:36:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NEaseG007988; Mon, 23 Mar 2015 14:36:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NEas9w007985; Mon, 23 Mar 2015 14:36:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503231436.t2NEas9w007985@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 23 Mar 2015 14:36:54 +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: r280370 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 14:36:55 -0000 Author: mav Date: Mon Mar 23 14:36:53 2015 New Revision: 280370 URL: https://svnweb.freebsd.org/changeset/base/280370 Log: MFC r279957, r280017: Add DSM TRIM command support for virtual AHCI disks. It works only for virtual disks backed by ZVOLs and raw devices supporting BIO_DELETE. Virtual disks backed by files won't report this capability. Relnotes: yes Modified: stable/10/usr.sbin/bhyve/block_if.c stable/10/usr.sbin/bhyve/block_if.h stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/block_if.c ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.c Mon Mar 23 13:38:33 2015 (r280369) +++ stable/10/usr.sbin/bhyve/block_if.c Mon Mar 23 14:36:53 2015 (r280370) @@ -59,7 +59,8 @@ __FBSDID("$FreeBSD$"); enum blockop { BOP_READ, BOP_WRITE, - BOP_FLUSH + BOP_FLUSH, + BOP_DELETE }; enum blockstat { @@ -81,6 +82,7 @@ struct blockif_ctxt { int bc_magic; int bc_fd; int bc_ischr; + int bc_candelete; int bc_rdonly; off_t bc_size; int bc_sectsz; @@ -172,6 +174,7 @@ static void blockif_proc(struct blockif_ctxt *bc, struct blockif_elem *be) { struct blockif_req *br; + off_t arg[2]; int err; br = be->be_req; @@ -197,6 +200,19 @@ blockif_proc(struct blockif_ctxt *bc, st } else if (fsync(bc->bc_fd)) err = errno; break; + case BOP_DELETE: + if (!bc->bc_candelete) + err = EOPNOTSUPP; + else if (bc->bc_rdonly) + err = EROFS; + else if (bc->bc_ischr) { + arg[0] = br->br_offset; + arg[1] = br->br_iov[0].iov_len; + if (ioctl(bc->bc_fd, DIOCGDELETE, arg)) + err = errno; + } else + err = EOPNOTSUPP; + break; default: err = EINVAL; break; @@ -276,9 +292,10 @@ blockif_open(const char *optstr, const c char *nopt, *xopts; struct blockif_ctxt *bc; struct stat sbuf; + struct diocgattr_arg arg; off_t size, psectsz, psectoff; int extra, fd, i, sectsz; - int nocache, sync, ro; + int nocache, sync, ro, candelete; pthread_once(&blockif_once, blockif_init); @@ -332,6 +349,7 @@ blockif_open(const char *optstr, const c size = sbuf.st_size; sectsz = DEV_BSIZE; psectsz = psectoff = 0; + candelete = 0; if (S_ISCHR(sbuf.st_mode)) { if (ioctl(fd, DIOCGMEDIASIZE, &size) < 0 || ioctl(fd, DIOCGSECTORSIZE, §sz)) { @@ -343,6 +361,10 @@ blockif_open(const char *optstr, const c assert(sectsz != 0); if (ioctl(fd, DIOCGSTRIPESIZE, &psectsz) == 0 && psectsz > 0) ioctl(fd, DIOCGSTRIPEOFFSET, &psectoff); + strlcpy(arg.name, "GEOM::candelete", sizeof(arg.name)); + arg.len = sizeof(arg.value.i); + if (ioctl(fd, DIOCGATTR, &arg) == 0) + candelete = arg.value.i; } else psectsz = sbuf.st_blksize; @@ -355,6 +377,7 @@ blockif_open(const char *optstr, const c bc->bc_magic = BLOCKIF_SIG; bc->bc_fd = fd; bc->bc_ischr = S_ISCHR(sbuf.st_mode); + bc->bc_candelete = candelete; bc->bc_rdonly = ro; bc->bc_size = size; bc->bc_sectsz = sectsz; @@ -434,6 +457,14 @@ blockif_flush(struct blockif_ctxt *bc, s } int +blockif_delete(struct blockif_ctxt *bc, struct blockif_req *breq) +{ + + assert(bc->bc_magic == BLOCKIF_SIG); + return (blockif_request(bc, breq, BOP_DELETE)); +} + +int blockif_cancel(struct blockif_ctxt *bc, struct blockif_req *breq) { struct blockif_elem *be; @@ -634,3 +665,11 @@ blockif_is_ro(struct blockif_ctxt *bc) assert(bc->bc_magic == BLOCKIF_SIG); return (bc->bc_rdonly); } + +int +blockif_candelete(struct blockif_ctxt *bc) +{ + + assert(bc->bc_magic == BLOCKIF_SIG); + return (bc->bc_candelete); +} Modified: stable/10/usr.sbin/bhyve/block_if.h ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.h Mon Mar 23 13:38:33 2015 (r280369) +++ stable/10/usr.sbin/bhyve/block_if.h Mon Mar 23 14:36:53 2015 (r280370) @@ -58,9 +58,11 @@ int blockif_sectsz(struct blockif_ctxt * void blockif_psectsz(struct blockif_ctxt *bc, int *size, int *off); int blockif_queuesz(struct blockif_ctxt *bc); int blockif_is_ro(struct blockif_ctxt *bc); +int blockif_candelete(struct blockif_ctxt *bc); int blockif_read(struct blockif_ctxt *bc, struct blockif_req *breq); int blockif_write(struct blockif_ctxt *bc, struct blockif_req *breq); int blockif_flush(struct blockif_ctxt *bc, struct blockif_req *breq); +int blockif_delete(struct blockif_ctxt *bc, struct blockif_req *breq); int blockif_cancel(struct blockif_ctxt *bc, struct blockif_req *breq); int blockif_close(struct blockif_ctxt *bc); Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 13:38:33 2015 (r280369) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 14:36:53 2015 (r280370) @@ -644,6 +644,100 @@ ahci_handle_flush(struct ahci_port *p, i } static inline void +read_prdt(struct ahci_port *p, int slot, uint8_t *cfis, + void *buf, int size) +{ + struct ahci_cmd_hdr *hdr; + struct ahci_prdt_entry *prdt; + void *to; + int i, len; + + hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); + len = size; + to = buf; + prdt = (struct ahci_prdt_entry *)(cfis + 0x80); + for (i = 0; i < hdr->prdtl && len; i++) { + uint8_t *ptr; + uint32_t dbcsz; + int sublen; + + dbcsz = (prdt->dbc & DBCMASK) + 1; + ptr = paddr_guest2host(ahci_ctx(p->pr_sc), prdt->dba, dbcsz); + sublen = len < dbcsz ? len : dbcsz; + memcpy(to, ptr, sublen); + len -= sublen; + to += sublen; + prdt++; + } +} + +static void +ahci_handle_dsm_trim(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done) +{ + struct ahci_ioreq *aior; + struct blockif_req *breq; + uint8_t *entry; + uint64_t elba; + uint32_t len, elen; + int err; + uint8_t buf[512]; + + len = (uint16_t)cfis[13] << 8 | cfis[12]; + len *= 512; + read_prdt(p, slot, cfis, buf, sizeof(buf)); + +next: + entry = &buf[done]; + elba = ((uint64_t)entry[5] << 40) | + ((uint64_t)entry[4] << 32) | + ((uint64_t)entry[3] << 24) | + ((uint64_t)entry[2] << 16) | + ((uint64_t)entry[1] << 8) | + entry[0]; + elen = (uint16_t)entry[7] << 8 | entry[6]; + done += 8; + if (elen == 0) { + if (done >= len) { + ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); + p->pending &= ~(1 << slot); + ahci_check_stopped(p); + return; + } + goto next; + } + + /* + * Pull request off free list + */ + aior = STAILQ_FIRST(&p->iofhd); + assert(aior != NULL); + STAILQ_REMOVE_HEAD(&p->iofhd, io_flist); + aior->cfis = cfis; + aior->slot = slot; + aior->len = len; + aior->done = done; + aior->prdtl = 0; + + breq = &aior->io_req; + breq->br_offset = elba * blockif_sectsz(p->bctx); + breq->br_iovcnt = 1; + breq->br_iov[0].iov_len = elen * blockif_sectsz(p->bctx); + + /* + * Mark this command in-flight. + */ + p->pending |= 1 << slot; + + /* + * Stuff request onto busy list + */ + TAILQ_INSERT_HEAD(&p->iobhd, aior, io_blist); + + err = blockif_delete(p->bctx, breq); + assert(err == 0); +} + +static inline void write_prdt(struct ahci_port *p, int slot, uint8_t *cfis, void *buf, int size) { @@ -684,10 +778,12 @@ handle_identify(struct ahci_port *p, int } else { uint16_t buf[256]; uint64_t sectors; - int sectsz, psectsz, psectoff; + int sectsz, psectsz, psectoff, candelete, ro; uint16_t cyl; uint8_t sech, heads; + ro = blockif_is_ro(p->bctx); + candelete = blockif_candelete(p->bctx); sectsz = blockif_sectsz(p->bctx); sectors = blockif_size(p->bctx) / sectsz; blockif_chs(p->bctx, &cyl, &heads, &sech); @@ -718,6 +814,7 @@ handle_identify(struct ahci_port *p, int buf[66] = 100; buf[67] = 100; buf[68] = 100; + buf[69] = 0; buf[75] = 31; buf[76] = (1 << 8 | 1 << 2); buf[80] = 0x1f0; @@ -736,6 +833,11 @@ handle_identify(struct ahci_port *p, int buf[101] = (sectors >> 16); buf[102] = (sectors >> 32); buf[103] = (sectors >> 48); + if (candelete && !ro) { + buf[69] |= ATA_SUPPORT_RZAT | ATA_SUPPORT_DRAT; + buf[105] = 1; + buf[169] = ATA_SUPPORT_DSM_TRIM; + } buf[106] = 0x4000; buf[209] = 0x4000; if (psectsz > sectsz) { @@ -1394,6 +1496,15 @@ ahci_handle_cmd(struct ahci_port *p, int case ATA_FLUSHCACHE48: ahci_handle_flush(p, slot, cfis); break; + case ATA_DATA_SET_MANAGEMENT: + if (cfis[11] == 0 && cfis[3] == ATA_DSM_TRIM && + cfis[13] == 0 && cfis[12] == 1) { + ahci_handle_dsm_trim(p, slot, cfis, 0); + break; + } + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + break; case ATA_STANDBY_CMD: break; case ATA_NOP: @@ -1505,7 +1616,7 @@ ata_ioreq_cb(struct blockif_req *br, int struct pci_ahci_softc *sc; uint32_t tfd; uint8_t *cfis; - int pending, slot, ncq; + int pending, slot, ncq, dsm; DPRINTF("%s %d\n", __func__, err); @@ -1521,6 +1632,8 @@ ata_ioreq_cb(struct blockif_req *br, int if (cfis[2] == ATA_WRITE_FPDMA_QUEUED || cfis[2] == ATA_READ_FPDMA_QUEUED) ncq = 1; + if (cfis[2] == ATA_DATA_SET_MANAGEMENT) + dsm = 1; pthread_mutex_lock(&sc->mtx); @@ -1534,10 +1647,17 @@ ata_ioreq_cb(struct blockif_req *br, int */ STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); - if (pending && !err) { - ahci_handle_dma(p, slot, cfis, aior->done, - hdr->prdtl - pending); - goto out; + if (dsm) { + if (aior->done != aior->len && !err) { + ahci_handle_dsm_trim(p, slot, cfis, aior->done); + goto out; + } + } else { + if (pending && !err) { + ahci_handle_dma(p, slot, cfis, aior->done, + hdr->prdtl - pending); + goto out; + } } if (!err && aior->done == aior->len) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 14:42:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2CD2511; Mon, 23 Mar 2015 14:42:13 +0000 (UTC) Received: from borg.macktronics.com (borg.macktronics.com [209.181.253.68]) (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 4C8597D4; Mon, 23 Mar 2015 14:42:12 +0000 (UTC) Received: from olive.macktronics.com (olive.macktronics.com [209.181.253.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by borg.macktronics.com (Postfix) with ESMTPS id 59DE9546; Mon, 23 Mar 2015 09:35:55 -0500 (CDT) Date: Mon, 23 Mar 2015 09:35:54 -0500 (CDT) From: Dan Mack To: Alexander Motin Subject: Re: svn commit: r280363 - stable/10/usr.sbin/bhyve In-Reply-To: <201503231148.t2NBmQ7o024956@svn.freebsd.org> Message-ID: References: <201503231148.t2NBmQ7o024956@svn.freebsd.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 14:42:13 -0000 I just tried to build 280369 and got this: --- all_subdir_bhyve --- /usr/src/usr.sbin/bhyve/pci_ahci.c:1512:8: error: use of undeclared identifier 'dsm' ncq = dsm = 0; ^ 1 error generated. *** [pci_ahci.o] Error code 1 This is on 10.1-Stable Dan On Mon, 23 Mar 2015, Alexander Motin wrote: > Author: mav > Date: Mon Mar 23 11:48:25 2015 > New Revision: 280363 > URL: https://svnweb.freebsd.org/changeset/base/280363 > > Log: > MFC r280293: Add missing variable initialization. > > Reported by: Coverity > CID: 1288938 > > Modified: > stable/10/usr.sbin/bhyve/pci_ahci.c > Directory Properties: > stable/10/ (props changed) > > Modified: stable/10/usr.sbin/bhyve/pci_ahci.c > ============================================================================== > --- stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 11:47:01 2015 (r280362) > +++ stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 11:48:25 2015 (r280363) > @@ -1509,7 +1509,7 @@ ata_ioreq_cb(struct blockif_req *br, int > > DPRINTF("%s %d\n", __func__, err); > > - ncq = 0; > + ncq = dsm = 0; > aior = br->br_param; > p = aior->io_pr; > cfis = aior->cfis; > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > dan -- Dan Mack From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 14:43:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 784E0757; Mon, 23 Mar 2015 14:43:40 +0000 (UTC) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::230]) (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 0E93C7FC; Mon, 23 Mar 2015 14:43:40 +0000 (UTC) Received: by labto5 with SMTP id to5so28179112lab.0; Mon, 23 Mar 2015 07:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=FasvwP8lI+lsnVI3l7dTDgZiE4AFADmnlAnkL0QaZoM=; b=oojzq/HJD+94170K4v7Nj18RLNkAccqJ0kHQy9SSsZngkqkD1AMVoRaSZSZfg8hDXe ksj1JXlN86PfqtTTzyiuh8d+9BfLWniz8z+lJoVX5wP9xcgBO88Gn3JR7KhEosEHRalX fLhpGLSlDX6DpJWzmJDJk9zBmYz+YnLyfnUo5TOEqUwIkOV96dWZPrRTEMmfytpkaJ0/ s2o1Uvd1yDnf8KoVCgvLFRfp6zMLy3PMvp+2la5VCFYWMUOLtlXR0lwgz+D9C/WJow3w 9U6ZbreBLmerLBcnM/W3oIBFpWOKoZcC+BpxqTi2IzaDoD6HulM7tyG5vW4/IBoX2Afr ngmg== X-Received: by 10.152.37.228 with SMTP id b4mr55793471lak.111.1427121818121; Mon, 23 Mar 2015 07:43:38 -0700 (PDT) Received: from mavbook.mavhome.dp.ua ([134.249.139.101]) by mx.google.com with ESMTPSA id p2sm222560laj.29.2015.03.23.07.43.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Mar 2015 07:43:37 -0700 (PDT) Sender: Alexander Motin Message-ID: <55102697.8030903@FreeBSD.org> Date: Mon, 23 Mar 2015 16:43:35 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Dan Mack Subject: Re: svn commit: r280363 - stable/10/usr.sbin/bhyve References: <201503231148.t2NBmQ7o024956@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 14:43:40 -0000 On 23.03.2015 16:35, Dan Mack wrote: > I just tried to build 280369 and got this: > > --- all_subdir_bhyve --- > /usr/src/usr.sbin/bhyve/pci_ahci.c:1512:8: error: use of undeclared > identifier 'dsm' > ncq = dsm = 0; > ^ > 1 error generated. > *** [pci_ahci.o] Error code 1 > > This is on 10.1-Stable Yes, it was my fault. Should be fixed by r280370. Sorry. > On Mon, 23 Mar 2015, Alexander Motin wrote: > >> Author: mav >> Date: Mon Mar 23 11:48:25 2015 >> New Revision: 280363 >> URL: https://svnweb.freebsd.org/changeset/base/280363 >> >> Log: >> MFC r280293: Add missing variable initialization. >> >> Reported by: Coverity >> CID: 1288938 >> >> Modified: >> stable/10/usr.sbin/bhyve/pci_ahci.c >> Directory Properties: >> stable/10/ (props changed) >> >> Modified: stable/10/usr.sbin/bhyve/pci_ahci.c >> ============================================================================== >> >> --- stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 11:47:01 2015 >> (r280362) >> +++ stable/10/usr.sbin/bhyve/pci_ahci.c Mon Mar 23 11:48:25 2015 >> (r280363) >> @@ -1509,7 +1509,7 @@ ata_ioreq_cb(struct blockif_req *br, int >> >> DPRINTF("%s %d\n", __func__, err); >> >> - ncq = 0; >> + ncq = dsm = 0; >> aior = br->br_param; >> p = aior->io_pr; >> cfis = aior->cfis; >> _______________________________________________ >> svn-src-all@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/svn-src-all >> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" >> > > > dan > -- > Dan Mack > -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 14:44:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7FE788A2; Mon, 23 Mar 2015 14:44:46 +0000 (UTC) Received: from borg.macktronics.com (borg.macktronics.com [209.181.253.68]) (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 002E880E; Mon, 23 Mar 2015 14:44:46 +0000 (UTC) Received: from olive.macktronics.com (olive.macktronics.com [209.181.253.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by borg.macktronics.com (Postfix) with ESMTPS id 2DA4B551; Mon, 23 Mar 2015 09:44:45 -0500 (CDT) Date: Mon, 23 Mar 2015 09:44:45 -0500 (CDT) From: Dan Mack To: Alexander Motin Subject: Re: svn commit: r280363 - stable/10/usr.sbin/bhyve In-Reply-To: <55102697.8030903@FreeBSD.org> Message-ID: References: <201503231148.t2NBmQ7o024956@svn.freebsd.org> <55102697.8030903@FreeBSD.org> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 14:44:46 -0000 On Mon, 23 Mar 2015, Alexander Motin wrote: > On 23.03.2015 16:35, Dan Mack wrote: >> I just tried to build 280369 and got this: >> >> --- all_subdir_bhyve --- >> /usr/src/usr.sbin/bhyve/pci_ahci.c:1512:8: error: use of undeclared >> identifier 'dsm' >> ncq = dsm = 0; >> ^ >> 1 error generated. >> *** [pci_ahci.o] Error code 1 >> >> This is on 10.1-Stable > > Yes, it was my fault. Should be fixed by r280370. Sorry. Okies, thanks. Usually not in a hurry but tyring to build with the openssl fixes now :-) Take care, dan -- Dan Mack From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:12:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0AF92C6; Mon, 23 Mar 2015 15:12:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC607BA9; Mon, 23 Mar 2015 15:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFC26u026189; Mon, 23 Mar 2015 15:12:02 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFC2Xl026188; Mon, 23 Mar 2015 15:12:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503231512.t2NFC2Xl026188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 23 Mar 2015 15:12:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280371 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:12:03 -0000 Author: tuexen Date: Mon Mar 23 15:12:02 2015 New Revision: 280371 URL: https://svnweb.freebsd.org/changeset/base/280371 Log: Remove a useless assignment. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Mar 23 14:36:53 2015 (r280370) +++ head/sys/netinet/sctp_output.c Mon Mar 23 15:12:02 2015 (r280371) @@ -9286,8 +9286,6 @@ sctp_send_asconf_ack(struct sctp_tcb *st atomic_add_int(&chk->whoTo->ref_count, 1); } chk->data = m_ack; - chk->send_size = 0; - /* Get size */ chk->send_size = ack->len; chk->sent = SCTP_DATAGRAM_UNSENT; chk->snd_count = 0; From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:36:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A188E3F for ; Mon, 23 Mar 2015 15:36:33 +0000 (UTC) Received: from mail-ig0-f170.google.com (mail-ig0-f170.google.com [209.85.213.170]) (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 B9765E61 for ; Mon, 23 Mar 2015 15:36:32 +0000 (UTC) Received: by igcau2 with SMTP id au2so45722179igc.0 for ; Mon, 23 Mar 2015 08:36:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=mn2NZhdnUJwiti+GZbOL388/QLmMvcN72qgdmLrjckA=; b=Y9txSZ64D+qh20QofUUcfJolKxZ/Zt8cYzacbnvvS/5paeRILxsrsogNZ9cpCJ6iA2 345d4JPTKcWSiWJe91sLmEkMO0Gbv+1Z7Tc0B7L3FYzhSCnZ1uDzm2GfcTbTk18Ss2Ez k8ozcPZ2DrHqICGfilEhOc7LCx0zgKEg8mAjSONsDAn0QHumoK+4ueW9Clt0OhWkvcip moOCFXNtoRU6t+MCcgjFozvUNiM/cggBLRJLbSF0eDjxtv72tJlD9XVUcP1bCAJsi5C7 GpXhKC5kMNFroBKRBQ4v/7dL0e/TlO8qD9eWxPRvc3/mhOewp0MczlElMwsizPrfkjr/ QC+Q== X-Gm-Message-State: ALoCoQnKW4vxHfvK42zKxWw5Azb+NM+byxrAglzBo0f8dx1ydF3eKJizvPPRODgKSt5Cu88KkAuH X-Received: by 10.42.47.73 with SMTP id n9mr20777011icf.20.1427124986030; Mon, 23 Mar 2015 08:36:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.0.99 with HTTP; Mon, 23 Mar 2015 08:35:45 -0700 (PDT) X-Originating-IP: [68.101.40.130] In-Reply-To: <201503202348.t2KNmCM0033402@svn.freebsd.org> References: <201503202348.t2KNmCM0033402@svn.freebsd.org> From: "Philip M. Gollucci" Date: Mon, 23 Mar 2015 11:35:45 -0400 Message-ID: Subject: Re: svn commit: r280306 - in head: secure/lib/libcrypto secure/lib/libssl sys/sys To: Jung-uk Kim Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:36:33 -0000 What about SSLv3 due to POODLE ? On Fri, Mar 20, 2015 at 7:48 PM, Jung-uk Kim wrote: > Author: jkim > Date: Fri Mar 20 23:48:11 2015 > New Revision: 280306 > URL: https://svnweb.freebsd.org/changeset/base/280306 > > Log: > Disable insecure SSLv2 support from the base OpenSSL. > > Differential Revision: https://reviews.freebsd.org/D1304 > > Modified: > head/secure/lib/libcrypto/opensslconf-arm.h > head/secure/lib/libcrypto/opensslconf-mips.h > head/secure/lib/libcrypto/opensslconf-powerpc.h > head/secure/lib/libcrypto/opensslconf-sparc64.h > head/secure/lib/libcrypto/opensslconf-x86.h > head/secure/lib/libssl/Makefile > head/sys/sys/param.h > > Modified: head/secure/lib/libcrypto/opensslconf-arm.h > > ============================================================================== > --- head/secure/lib/libcrypto/opensslconf-arm.h Fri Mar 20 21:56:48 2015 > (r280305) > +++ head/secure/lib/libcrypto/opensslconf-arm.h Fri Mar 20 23:48:11 2015 > (r280306) > @@ -27,6 +27,9 @@ extern "C" { > #ifndef OPENSSL_NO_SCTP > # define OPENSSL_NO_SCTP > #endif > +#ifndef OPENSSL_NO_SSL2 > +# define OPENSSL_NO_SSL2 > +#endif > #ifndef OPENSSL_NO_STORE > # define OPENSSL_NO_STORE > #endif > @@ -69,6 +72,9 @@ extern "C" { > # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) > # define NO_SCTP > # endif > +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) > +# define NO_SSL2 > +# endif > # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) > # define NO_STORE > # endif > > Modified: head/secure/lib/libcrypto/opensslconf-mips.h > > ============================================================================== > --- head/secure/lib/libcrypto/opensslconf-mips.h Fri Mar 20 > 21:56:48 2015 (r280305) > +++ head/secure/lib/libcrypto/opensslconf-mips.h Fri Mar 20 > 23:48:11 2015 (r280306) > @@ -27,6 +27,9 @@ extern "C" { > #ifndef OPENSSL_NO_SCTP > # define OPENSSL_NO_SCTP > #endif > +#ifndef OPENSSL_NO_SSL2 > +# define OPENSSL_NO_SSL2 > +#endif > #ifndef OPENSSL_NO_STORE > # define OPENSSL_NO_STORE > #endif > @@ -69,6 +72,9 @@ extern "C" { > # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) > # define NO_SCTP > # endif > +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) > +# define NO_SSL2 > +# endif > # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) > # define NO_STORE > # endif > > Modified: head/secure/lib/libcrypto/opensslconf-powerpc.h > > ============================================================================== > --- head/secure/lib/libcrypto/opensslconf-powerpc.h Fri Mar 20 > 21:56:48 2015 (r280305) > +++ head/secure/lib/libcrypto/opensslconf-powerpc.h Fri Mar 20 > 23:48:11 2015 (r280306) > @@ -27,6 +27,9 @@ extern "C" { > #ifndef OPENSSL_NO_SCTP > # define OPENSSL_NO_SCTP > #endif > +#ifndef OPENSSL_NO_SSL2 > +# define OPENSSL_NO_SSL2 > +#endif > #ifndef OPENSSL_NO_STORE > # define OPENSSL_NO_STORE > #endif > @@ -69,6 +72,9 @@ extern "C" { > # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) > # define NO_SCTP > # endif > +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) > +# define NO_SSL2 > +# endif > # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) > # define NO_STORE > # endif > > Modified: head/secure/lib/libcrypto/opensslconf-sparc64.h > > ============================================================================== > --- head/secure/lib/libcrypto/opensslconf-sparc64.h Fri Mar 20 > 21:56:48 2015 (r280305) > +++ head/secure/lib/libcrypto/opensslconf-sparc64.h Fri Mar 20 > 23:48:11 2015 (r280306) > @@ -27,6 +27,9 @@ extern "C" { > #ifndef OPENSSL_NO_SCTP > # define OPENSSL_NO_SCTP > #endif > +#ifndef OPENSSL_NO_SSL2 > +# define OPENSSL_NO_SSL2 > +#endif > #ifndef OPENSSL_NO_STORE > # define OPENSSL_NO_STORE > #endif > @@ -69,6 +72,9 @@ extern "C" { > # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) > # define NO_SCTP > # endif > +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) > +# define NO_SSL2 > +# endif > # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) > # define NO_STORE > # endif > > Modified: head/secure/lib/libcrypto/opensslconf-x86.h > > ============================================================================== > --- head/secure/lib/libcrypto/opensslconf-x86.h Fri Mar 20 21:56:48 2015 > (r280305) > +++ head/secure/lib/libcrypto/opensslconf-x86.h Fri Mar 20 23:48:11 2015 > (r280306) > @@ -27,6 +27,9 @@ extern "C" { > #ifndef OPENSSL_NO_SCTP > # define OPENSSL_NO_SCTP > #endif > +#ifndef OPENSSL_NO_SSL2 > +# define OPENSSL_NO_SSL2 > +#endif > #ifndef OPENSSL_NO_STORE > # define OPENSSL_NO_STORE > #endif > @@ -66,6 +69,9 @@ extern "C" { > # if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) > # define NO_SCTP > # endif > +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) > +# define NO_SSL2 > +# endif > # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) > # define NO_STORE > # endif > > Modified: head/secure/lib/libssl/Makefile > > ============================================================================== > --- head/secure/lib/libssl/Makefile Fri Mar 20 21:56:48 2015 > (r280305) > +++ head/secure/lib/libssl/Makefile Fri Mar 20 23:48:11 2015 > (r280306) > @@ -12,11 +12,11 @@ NO_LINT= > > SRCS= bio_ssl.c d1_both.c d1_clnt.c d1_enc.c d1_lib.c d1_meth.c d1_pkt.c > \ > d1_srtp.c d1_srvr.c s23_clnt.c s23_lib.c s23_meth.c s23_pkt.c \ > - s23_srvr.c s2_clnt.c s2_enc.c s2_lib.c s2_meth.c s2_pkt.c > s2_srvr.c \ > - s3_both.c s3_cbc.c s3_clnt.c s3_enc.c s3_lib.c s3_meth.c s3_pkt.c \ > - s3_srvr.c ssl_algs.c ssl_asn1.c ssl_cert.c ssl_ciph.c ssl_err.c \ > - ssl_err2.c ssl_lib.c ssl_rsa.c ssl_sess.c ssl_stat.c ssl_txt.c \ > - t1_clnt.c t1_enc.c t1_lib.c t1_meth.c t1_reneg.c t1_srvr.c > tls_srp.c > + s23_srvr.c s3_both.c s3_cbc.c s3_clnt.c s3_enc.c s3_lib.c > s3_meth.c \ > + s3_pkt.c s3_srvr.c ssl_algs.c ssl_asn1.c ssl_cert.c ssl_ciph.c \ > + ssl_err.c ssl_err2.c ssl_lib.c ssl_rsa.c ssl_sess.c ssl_stat.c \ > + ssl_txt.c t1_clnt.c t1_enc.c t1_lib.c t1_meth.c t1_reneg.c > t1_srvr.c \ > + tls_srp.c > > INCS= dtls1.h kssl.h srtp.h ssl.h ssl2.h ssl23.h ssl3.h tls1.h > INCSDIR=${INCLUDEDIR}/openssl > > Modified: head/sys/sys/param.h > > ============================================================================== > --- head/sys/sys/param.h Fri Mar 20 21:56:48 2015 (r280305) > +++ head/sys/sys/param.h Fri Mar 20 23:48:11 2015 (r280306) > @@ -58,7 +58,7 @@ > * in the range 5 to 9. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1100065 /* Master, propagated to newvers */ > +#define __FreeBSD_version 1100066 /* Master, propagated to newvers */ > > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of > FreeBSD, > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" > -- --------------------------------------------------------------------------------- Curb: Your ride is here 4096R/D1EAB94D 2081 E230 3001 6508 8847 1BBF A0A8 DB0F D1EA B94D Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354 Member, Apache Software Foundation Committer, FreeBSD Foundation Consultant, P6M7G8 Inc. Sr. Director IT Operations, Curb What doesn't kill us can only make us stronger; Except it almost kills you. From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:44:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4AF50144; Mon, 23 Mar 2015 15:44:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3616FF53; Mon, 23 Mar 2015 15:44:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFiIID045848; Mon, 23 Mar 2015 15:44:18 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFiI90045847; Mon, 23 Mar 2015 15:44:18 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503231544.t2NFiI90045847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 23 Mar 2015 15:44:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280374 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:44:18 -0000 Author: arybchik Date: Mon Mar 23 15:44:17 2015 New Revision: 280374 URL: https://svnweb.freebsd.org/changeset/base/280374 Log: sfxge: assert either kernel or internal copy of interface flags ioctl to put interface down sets ifp->if_flags which holds the intended administratively defined state and calls driver callback to apply it. When everything is done, driver updates internal copy of interface flags sc->if_flags which holds the operational state. So, transmit from Rx path is possible when interface is intended to be administratively down in accordance with ifp->if_flags, but not applied yet and the operational state is up in accordance with sc->if_flags. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2075 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Mon Mar 23 15:27:33 2015 (r280373) +++ head/sys/dev/sfxge/sfxge_tx.c Mon Mar 23 15:44:17 2015 (r280374) @@ -676,7 +676,16 @@ sfxge_if_transmit(struct ifnet *ifp, str sc = (struct sfxge_softc *)ifp->if_softc; - KASSERT(ifp->if_flags & IFF_UP, ("interface not up")); + /* + * Transmit may be called when interface is up from the kernel + * point of view, but not yet up (in progress) from the driver + * point of view. I.e. link aggregation bring up. + * Transmit may be called when interface is up from the driver + * point of view, but already down from the kernel point of + * view. I.e. Rx when interface shutdown is in progress. + */ + KASSERT((ifp->if_flags & IFF_UP) || (sc->if_flags & IFF_UP), + ("interface not up")); /* Pick the desired transmit queue. */ if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:45:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9BA52B8; Mon, 23 Mar 2015 15:45:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8D30F71; Mon, 23 Mar 2015 15:45:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFjeaU046113; Mon, 23 Mar 2015 15:45:40 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFjehZ046112; Mon, 23 Mar 2015 15:45:40 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503231545.t2NFjehZ046112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 23 Mar 2015 15:45:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280375 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:45:41 -0000 Author: arybchik Date: Mon Mar 23 15:45:39 2015 New Revision: 280375 URL: https://svnweb.freebsd.org/changeset/base/280375 Log: sfxge: add barriers to BAR write macros In theory the barriers are required to cope with write combining and reordering. Two barriers are added (sometimes merged to one): 1. Before the first write to guarantee that previous writes to the region have been done 2. Before the last write to guarantee that write to the last dword/qword is done after previous writes Barriers are inserted before in the assumption that it is better to postpone barriers as much as it is possible (more chances that the operation has already been already done and barrier does not stall CPU). On x86 and amd64 bus space write barriers are just compiler memory barriers which are definitely required. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2077 Modified: head/sys/dev/sfxge/common/efsys.h Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Mon Mar 23 15:44:17 2015 (r280374) +++ head/sys/dev/sfxge/common/efsys.h Mon Mar 23 15:45:39 2015 (r280375) @@ -786,6 +786,14 @@ typedef struct efsys_bar_s { EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \ uint32_t, (_edp)->ed_u32[0]); \ \ + /* \ + * Make sure that previous writes to the dword have \ + * been done. It should be cheaper than barrier just \ + * after the write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_dword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_edp)->ed_u32[0]); \ @@ -809,6 +817,14 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ + /* \ + * Make sure that previous writes to the qword have \ + * been done. It should be cheaper than barrier just \ + * after the write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_qword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_8((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eqp)->eq_u64[0]); \ @@ -829,9 +845,25 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ + /* \ + * Make sure that previous writes to the qword have \ + * been done. It should be cheaper than barrier just \ + * after the last write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_qword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eqp)->eq_u32[0]); \ + /* \ + * It should be guaranteed that the last dword comes \ + * the last, so barrier entire qword to be sure that \ + * neither above nor below writes are reordered. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_qword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 4, (_eqp)->eq_u32[1]); \ @@ -858,9 +890,25 @@ typedef struct efsys_bar_s { uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ \ + /* \ + * Make sure that previous writes to the oword have \ + * been done. It should be cheaper than barrier just \ + * after the last write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_8((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eop)->eo_u64[0]); \ + /* \ + * It should be guaranteed that the last qword comes \ + * the last, so barrier entire oword to be sure that \ + * neither above nor below writes are reordered. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_8((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 8, (_eop)->eo_u64[1]); \ @@ -888,6 +936,14 @@ typedef struct efsys_bar_s { uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ \ + /* \ + * Make sure that previous writes to the oword have \ + * been done. It should be cheaper than barrier just \ + * after the last write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eop)->eo_u32[0]); \ @@ -897,6 +953,14 @@ typedef struct efsys_bar_s { bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 8, (_eop)->eo_u32[2]); \ + /* \ + * It should be guaranteed that the last dword comes \ + * the last, so barrier entire oword to be sure that \ + * neither above nor below writes are reordered. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 12, (_eop)->eo_u32[3]); \ From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:47:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 829FE50B; Mon, 23 Mar 2015 15:47:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63BB6F9D; Mon, 23 Mar 2015 15:47:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFleWK046569; Mon, 23 Mar 2015 15:47:40 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFlcAE046562; Mon, 23 Mar 2015 15:47:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503231547.t2NFlcAE046562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 23 Mar 2015 15:47:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280376 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:47:40 -0000 Author: arybchik Date: Mon Mar 23 15:47:37 2015 New Revision: 280376 URL: https://svnweb.freebsd.org/changeset/base/280376 Log: sfxge: remove obsolete Tx non-multi queue support Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier versions support. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2081 Modified: head/sys/dev/sfxge/sfxge.c head/sys/dev/sfxge/sfxge.h head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sfxge/sfxge_tx.c head/sys/dev/sfxge/sfxge_tx.h Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Mon Mar 23 15:45:39 2015 (r280375) +++ head/sys/dev/sfxge/sfxge.c Mon Mar 23 15:47:37 2015 (r280376) @@ -330,19 +330,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ether_ifattach(ifp, encp->enc_mac_addr); -#ifdef SFXGE_HAVE_MQ ifp->if_transmit = sfxge_if_transmit; ifp->if_qflush = sfxge_if_qflush; -#else - ifp->if_start = sfxge_if_start; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->txq_entries - 1); - ifp->if_snd.ifq_drv_maxlen = sc->txq_entries - 1; - IFQ_SET_READY(&ifp->if_snd); - - snprintf(sc->tx_lock_name, sizeof(sc->tx_lock_name), - "%s:tx", device_get_nameunit(sc->dev)); - mtx_init(&sc->tx_lock, sc->tx_lock_name, NULL, MTX_DEF); -#endif ifp->if_get_counter = sfxge_get_counter; Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Mon Mar 23 15:45:39 2015 (r280375) +++ head/sys/dev/sfxge/sfxge.h Mon Mar 23 15:47:37 2015 (r280376) @@ -67,12 +67,6 @@ #ifndef IFM_10G_KX4 #define IFM_10G_KX4 IFM_10G_CX4 #endif -#if __FreeBSD_version >= 800054 -/* Networking core is multiqueue aware. We can manage our own TX - * queues and use m_pkthdr.flowid. - */ -#define SFXGE_HAVE_MQ -#endif #if (__FreeBSD_version >= 800501 && __FreeBSD_version < 900000) || \ __FreeBSD_version >= 900003 #define SFXGE_HAVE_DESCRIBE_INTR @@ -243,11 +237,7 @@ struct sfxge_softc { struct sfxge_rxq *rxq[SFXGE_RX_SCALE_MAX]; unsigned int rx_indir_table[SFXGE_RX_SCALE_MAX]; -#ifdef SFXGE_HAVE_MQ struct sfxge_txq *txq[SFXGE_TXQ_NTYPES + SFXGE_RX_SCALE_MAX]; -#else - struct sfxge_txq *txq[SFXGE_TXQ_NTYPES]; -#endif struct ifmedia media; @@ -255,11 +245,6 @@ struct sfxge_softc { size_t rx_buffer_size; uma_zone_t rx_buffer_zone; -#ifndef SFXGE_HAVE_MQ - struct mtx tx_lock __aligned(CACHE_LINE_SIZE); - char tx_lock_name[SFXGE_LOCK_NAME_MAX]; -#endif - unsigned int evq_count; unsigned int rxq_count; unsigned int txq_count; Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Mon Mar 23 15:45:39 2015 (r280375) +++ head/sys/dev/sfxge/sfxge_rx.c Mon Mar 23 15:47:37 2015 (r280376) @@ -330,14 +330,12 @@ sfxge_rx_deliver(struct sfxge_softc *sc, if (rx_desc->flags & EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; -#ifdef SFXGE_HAVE_MQ /* The hash covers a 4-tuple for TCP only */ if (rx_desc->flags & EFX_PKT_TCP) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); } -#endif m->m_data += sc->rx_prefix_size; m->m_len = rx_desc->size - sc->rx_prefix_size; m->m_pkthdr.len = m->m_len; @@ -386,10 +384,9 @@ sfxge_lro_deliver(struct sfxge_lro_state memcpy(c_th + 1, c->th_last + 1, optlen); } -#ifdef SFXGE_HAVE_MQ m->m_pkthdr.flowid = c->conn_hash; M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); -#endif + m->m_pkthdr.csum_flags = csum_flags; __sfxge_rx_deliver(sc, m); Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Mon Mar 23 15:45:39 2015 (r280375) +++ head/sys/dev/sfxge/sfxge_tx.c Mon Mar 23 15:47:37 2015 (r280376) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #define SFXGE_TXQ_BLOCK_LEVEL(_entries) \ (EFX_TXQ_LIMIT(_entries) - SFXGE_TSO_MAX_DESC) -#ifdef SFXGE_HAVE_MQ #define SFXGE_PARAM_TX_DPL_GET_MAX SFXGE_PARAM(tx_dpl_get_max) static int sfxge_tx_dpl_get_max = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT; @@ -109,8 +108,6 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p &sfxge_tx_dpl_put_max, 0, "Maximum number of any packets in deferred packet put-list"); -#endif - /* Forward declarations. */ static void sfxge_tx_qdpl_service(struct sfxge_txq *txq); @@ -160,8 +157,6 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq } } -#ifdef SFXGE_HAVE_MQ - static unsigned int sfxge_is_mbuf_non_tcp(struct mbuf *mbuf) { @@ -225,8 +220,6 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * stdp->std_get_non_tcp_count += non_tcp_count; } -#endif /* SFXGE_HAVE_MQ */ - static void sfxge_tx_qreap(struct sfxge_txq *txq) { @@ -401,8 +394,6 @@ reject: return (rc); } -#ifdef SFXGE_HAVE_MQ - /* * Drain the deferred packet list into the transmit queue. */ @@ -709,88 +700,6 @@ sfxge_if_transmit(struct ifnet *ifp, str return (rc); } -#else /* !SFXGE_HAVE_MQ */ - -static void sfxge_if_start_locked(struct ifnet *ifp) -{ - struct sfxge_softc *sc = ifp->if_softc; - struct sfxge_txq *txq; - struct mbuf *mbuf; - unsigned int pushed[SFXGE_TXQ_NTYPES]; - unsigned int q_index; - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) - return; - - if (!sc->port.link_up) - return; - - for (q_index = 0; q_index < SFXGE_TXQ_NTYPES; q_index++) { - txq = sc->txq[q_index]; - pushed[q_index] = txq->added; - } - - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - IFQ_DRV_DEQUEUE(&ifp->if_snd, mbuf); - if (mbuf == NULL) - break; - - ETHER_BPF_MTAP(ifp, mbuf); /* packet capture */ - - /* Pick the desired transmit queue. */ - if (mbuf->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) - q_index = SFXGE_TXQ_IP_TCP_UDP_CKSUM; - else if (mbuf->m_pkthdr.csum_flags & CSUM_DELAY_IP) - q_index = SFXGE_TXQ_IP_CKSUM; - else - q_index = SFXGE_TXQ_NON_CKSUM; - txq = sc->txq[q_index]; - - if (sfxge_tx_queue_mbuf(txq, mbuf) != 0) - continue; - - if (txq->blocked) { - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - break; - } - - /* Push the fragments to the hardware in batches. */ - if (txq->added - pushed[q_index] >= SFXGE_TX_BATCH) { - efx_tx_qpush(txq->common, txq->added); - pushed[q_index] = txq->added; - } - } - - for (q_index = 0; q_index < SFXGE_TXQ_NTYPES; q_index++) { - txq = sc->txq[q_index]; - if (txq->added != pushed[q_index]) - efx_tx_qpush(txq->common, txq->added); - } -} - -void sfxge_if_start(struct ifnet *ifp) -{ - struct sfxge_softc *sc = ifp->if_softc; - - SFXGE_TXQ_LOCK(sc->txq[0]); - sfxge_if_start_locked(ifp); - SFXGE_TXQ_UNLOCK(sc->txq[0]); -} - -static void -sfxge_tx_qdpl_service(struct sfxge_txq *txq) -{ - struct ifnet *ifp = txq->sc->ifnet; - - SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sfxge_if_start_locked(ifp); - SFXGE_TXQ_UNLOCK(txq); -} - -#endif /* SFXGE_HAVE_MQ */ - /* * Software "TSO". Not quite as good as doing it in hardware, but * still faster than segmenting in the stack. @@ -1379,9 +1288,7 @@ sfxge_tx_qfini(struct sfxge_softc *sc, u sc->txq[index] = NULL; -#ifdef SFXGE_HAVE_MQ SFXGE_TXQ_LOCK_DESTROY(txq); -#endif free(txq, M_SFXGE); } @@ -1395,10 +1302,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; -#ifdef SFXGE_HAVE_MQ struct sfxge_tx_dpl *stdp; struct sysctl_oid *dpl_node; -#endif efsys_mem_t *esmp; unsigned int nmaps; int rc; @@ -1457,7 +1362,6 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u (rc = tso_init(txq)) != 0) goto fail3; -#ifdef SFXGE_HAVE_MQ if (sfxge_tx_dpl_get_max <= 0) { log(LOG_ERR, "%s=%d must be greater than 0", SFXGE_PARAM_TX_DPL_GET_MAX, sfxge_tx_dpl_get_max); @@ -1507,7 +1411,6 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, "put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_put_hiwat, 0, ""); -#endif txq->type = type; txq->evq_index = evq_index; @@ -1637,11 +1540,7 @@ sfxge_tx_init(struct sfxge_softc *sc) KASSERT(intr->state == SFXGE_INTR_INITIALIZED, ("intr->state != SFXGE_INTR_INITIALIZED")); -#ifdef SFXGE_HAVE_MQ sc->txq_count = SFXGE_TXQ_NTYPES - 1 + sc->intr.n_alloc; -#else - sc->txq_count = SFXGE_TXQ_NTYPES; -#endif sc->txqs_node = SYSCTL_ADD_NODE( device_get_sysctl_ctx(sc->dev), Modified: head/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.h Mon Mar 23 15:45:39 2015 (r280375) +++ head/sys/dev/sfxge/sfxge_tx.h Mon Mar 23 15:47:37 2015 (r280376) @@ -128,12 +128,6 @@ enum sfxge_txq_type { #define SFXGE_TX_BATCH 64 -#ifdef SFXGE_HAVE_MQ -#define SFXGE_TX_LOCK(txq) (&(txq)->lock) -#else -#define SFXGE_TX_LOCK(txq) (&(txq)->sc->tx_lock) -#endif - #define SFXGE_TXQ_LOCK_INIT(_txq, _ifname, _txq_index) \ do { \ struct sfxge_txq *__txq = (_txq); \ @@ -147,13 +141,13 @@ enum sfxge_txq_type { #define SFXGE_TXQ_LOCK_DESTROY(_txq) \ mtx_destroy(&(_txq)->lock) #define SFXGE_TXQ_LOCK(_txq) \ - mtx_lock(SFXGE_TX_LOCK(_txq)) + mtx_lock(&(_txq)->lock) #define SFXGE_TXQ_TRYLOCK(_txq) \ - mtx_trylock(SFXGE_TX_LOCK(_txq)) + mtx_trylock(&(_txq)->lock) #define SFXGE_TXQ_UNLOCK(_txq) \ - mtx_unlock(SFXGE_TX_LOCK(_txq)) + mtx_unlock(&(_txq)->lock) #define SFXGE_TXQ_LOCK_ASSERT_OWNED(_txq) \ - mtx_assert(SFXGE_TX_LOCK(_txq), MA_OWNED) + mtx_assert(&(_txq)->lock, MA_OWNED) struct sfxge_txq { @@ -186,13 +180,9 @@ struct sfxge_txq { /* The following fields change more often, and are used mostly * on the initiation path */ -#ifdef SFXGE_HAVE_MQ struct mtx lock __aligned(CACHE_LINE_SIZE); struct sfxge_tx_dpl dpl; /* Deferred packet list. */ unsigned int n_pend_desc; -#else - unsigned int n_pend_desc __aligned(CACHE_LINE_SIZE); -#endif unsigned int added; unsigned int reaped; /* Statistics */ @@ -227,11 +217,7 @@ extern int sfxge_tx_start(struct sfxge_s extern void sfxge_tx_stop(struct sfxge_softc *sc); extern void sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq); extern void sfxge_tx_qflush_done(struct sfxge_txq *txq); -#ifdef SFXGE_HAVE_MQ extern void sfxge_if_qflush(struct ifnet *ifp); extern int sfxge_if_transmit(struct ifnet *ifp, struct mbuf *m); -#else -extern void sfxge_if_start(struct ifnet *ifp); -#endif #endif From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:49:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 422BC698; Mon, 23 Mar 2015 15:49:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2D711FC8; Mon, 23 Mar 2015 15:49:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFnCFb046819; Mon, 23 Mar 2015 15:49:12 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFnCj5046818; Mon, 23 Mar 2015 15:49:12 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503231549.t2NFnCj5046818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 23 Mar 2015 15:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280377 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:49:12 -0000 Author: arybchik Date: Mon Mar 23 15:49:11 2015 New Revision: 280377 URL: https://svnweb.freebsd.org/changeset/base/280377 Log: sfxge: add statistics for each Tx queue Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2082 Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Mon Mar 23 15:47:37 2015 (r280376) +++ head/sys/dev/sfxge/sfxge_tx.c Mon Mar 23 15:49:11 2015 (r280377) @@ -109,6 +109,26 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p "Maximum number of any packets in deferred packet put-list"); +static const struct { + const char *name; + size_t offset; +} sfxge_tx_stats[] = { +#define SFXGE_TX_STAT(name, member) \ + { #name, offsetof(struct sfxge_txq, member) } + SFXGE_TX_STAT(tso_bursts, tso_bursts), + SFXGE_TX_STAT(tso_packets, tso_packets), + SFXGE_TX_STAT(tso_long_headers, tso_long_headers), + SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), + SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), + SFXGE_TX_STAT(tx_collapses, collapses), + SFXGE_TX_STAT(tx_drops, drops), + SFXGE_TX_STAT(tx_get_overflow, get_overflow), + SFXGE_TX_STAT(tx_get_non_tcp_overflow, get_non_tcp_overflow), + SFXGE_TX_STAT(tx_put_overflow, put_overflow), + SFXGE_TX_STAT(tx_netdown_drops, netdown_drops), +}; + + /* Forward declarations. */ static void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); @@ -1259,6 +1279,30 @@ fail: return (rc); } +static int +sfxge_txq_stat_init(struct sfxge_txq *txq, struct sysctl_oid *txq_node) +{ + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(txq->sc->dev); + struct sysctl_oid *stat_node; + unsigned int id; + + stat_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(txq_node), OID_AUTO, + "stats", CTLFLAG_RD, NULL, + "Tx queue statistics"); + if (stat_node == NULL) + return (ENOMEM); + + for (id = 0; id < nitems(sfxge_tx_stats); id++) { + SYSCTL_ADD_ULONG( + ctx, SYSCTL_CHILDREN(stat_node), OID_AUTO, + sfxge_tx_stats[id].name, CTLFLAG_RD | CTLFLAG_STATS, + (unsigned long *)((caddr_t)txq + sfxge_tx_stats[id].offset), + ""); + } + + return (0); +} + /** * Destroy a transmit queue. */ @@ -1412,6 +1456,10 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u "put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_put_hiwat, 0, ""); + rc = sfxge_txq_stat_init(txq, txq_node); + if (rc != 0) + goto fail_txq_stat_init; + txq->type = type; txq->evq_index = evq_index; txq->txq_index = txq_index; @@ -1419,6 +1467,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_txq_stat_init: fail_dpl_node: fail_tx_dpl_put_max: fail_tx_dpl_get_max: @@ -1437,25 +1486,6 @@ fail: return (rc); } -static const struct { - const char *name; - size_t offset; -} sfxge_tx_stats[] = { -#define SFXGE_TX_STAT(name, member) \ - { #name, offsetof(struct sfxge_txq, member) } - SFXGE_TX_STAT(tso_bursts, tso_bursts), - SFXGE_TX_STAT(tso_packets, tso_packets), - SFXGE_TX_STAT(tso_long_headers, tso_long_headers), - SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), - SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), - SFXGE_TX_STAT(tx_collapses, collapses), - SFXGE_TX_STAT(tx_drops, drops), - SFXGE_TX_STAT(tx_get_overflow, get_overflow), - SFXGE_TX_STAT(tx_get_non_tcp_overflow, get_non_tcp_overflow), - SFXGE_TX_STAT(tx_put_overflow, put_overflow), - SFXGE_TX_STAT(tx_netdown_drops, netdown_drops), -}; - static int sfxge_tx_stat_handler(SYSCTL_HANDLER_ARGS) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:52:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 112DB85E; Mon, 23 Mar 2015 15:52:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D71C0F8; Mon, 23 Mar 2015 15:52:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFq6wR050627; Mon, 23 Mar 2015 15:52:06 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFq6Pf050626; Mon, 23 Mar 2015 15:52:06 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503231552.t2NFq6Pf050626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 23 Mar 2015 15:52:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280378 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:52:07 -0000 Author: arybchik Date: Mon Mar 23 15:52:05 2015 New Revision: 280378 URL: https://svnweb.freebsd.org/changeset/base/280378 Log: sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64 bus_space_*_8() are not always macros, so it is not correct to use #ifndef. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2083 Modified: head/sys/dev/sfxge/common/efsys.h Modified: head/sys/dev/sfxge/common/efsys.h ============================================================================== --- head/sys/dev/sfxge/common/efsys.h Mon Mar 23 15:49:11 2015 (r280377) +++ head/sys/dev/sfxge/common/efsys.h Mon Mar 23 15:52:05 2015 (r280378) @@ -94,13 +94,20 @@ extern "C" { #define ISP2(x) (((x) & ((x) - 1)) == 0) #endif -#if defined(__x86_64__) +#if defined(__x86_64__) && __FreeBSD_version >= 1000000 + +#define SFXGE_USE_BUS_SPACE_8 1 + #if !defined(bus_space_read_stream_8) + #define bus_space_read_stream_8(t, h, o) \ bus_space_read_8((t), (h), (o)) + #define bus_space_write_stream_8(t, h, o, v) \ bus_space_write_8((t), (h), (o), (v)) + #endif + #endif #define ENOTACTIVE EINVAL @@ -663,7 +670,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #define EFSYS_BAR_READQ(_esbp, _offset, _eqp) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -804,7 +811,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #define EFSYS_BAR_WRITEQ(_esbp, _offset, _eqp) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -873,7 +880,7 @@ typedef struct efsys_bar_s { } while (B_FALSE) #endif -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #define EFSYS_BAR_WRITEO(_esbp, _offset, _eop, _lock) \ do { \ _NOTE(CONSTANTCONDITION) \ From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:52:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D067F9CB; Mon, 23 Mar 2015 15:52:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBDA611E; Mon, 23 Mar 2015 15:52:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFqwjW050771; Mon, 23 Mar 2015 15:52:58 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFqwLE050770; Mon, 23 Mar 2015 15:52:58 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503231552.t2NFqwLE050770@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 23 Mar 2015 15:52:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280379 - head/sys/dev/sfxge/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:52:58 -0000 Author: arybchik Date: Mon Mar 23 15:52:57 2015 New Revision: 280379 URL: https://svnweb.freebsd.org/changeset/base/280379 Log: sfxge: do not check MCDI status word This is a temporary workaround until we determine a reliable sequence of operations for detecting MC reboots. Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2084 Modified: head/sys/dev/sfxge/common/efx_mcdi.c Modified: head/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- head/sys/dev/sfxge/common/efx_mcdi.c Mon Mar 23 15:52:05 2015 (r280378) +++ head/sys/dev/sfxge/common/efx_mcdi.c Mon Mar 23 15:52:57 2015 (r280379) @@ -213,6 +213,14 @@ static int efx_mcdi_poll_reboot( __in efx_nic_t *enp) { +#ifndef EFX_GRACEFUL_MC_REBOOT + /* + * This function is not being used properly. + * Until its callers are fixed, it should always return 0. + */ + _NOTE(ARGUNUSED(enp)) + return (0); +#else efx_mcdi_iface_t *emip = &(enp->en_u.siena.enu_mip); unsigned int rebootr; efx_dword_t dword; @@ -236,6 +244,7 @@ efx_mcdi_poll_reboot( return (EINTR); else return (EIO); +#endif } __checkReturn boolean_t From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 15:53:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22CD4B17; Mon, 23 Mar 2015 15:53:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E44C12F; Mon, 23 Mar 2015 15:53:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NFrQom050888; Mon, 23 Mar 2015 15:53:26 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NFrQ8u050887; Mon, 23 Mar 2015 15:53:26 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503231553.t2NFrQ8u050887@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Mon, 23 Mar 2015 15:53:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280380 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 15:53:27 -0000 Author: arybchik Date: Mon Mar 23 15:53:26 2015 New Revision: 280380 URL: https://svnweb.freebsd.org/changeset/base/280380 Log: sfxge: remove unnecessary and wrong prediction Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2085 Modified: head/sys/dev/sfxge/sfxge_port.c Modified: head/sys/dev/sfxge/sfxge_port.c ============================================================================== --- head/sys/dev/sfxge/sfxge_port.c Mon Mar 23 15:52:57 2015 (r280379) +++ head/sys/dev/sfxge/sfxge_port.c Mon Mar 23 15:53:26 2015 (r280380) @@ -241,7 +241,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND SFXGE_PORT_LOCK(port); if (port->wanted_fc != fcntl) { - if (__predict_false(port->init_state == SFXGE_PORT_STARTED)) + if (port->init_state == SFXGE_PORT_STARTED) error = efx_mac_fcntl_set(sc->enp, port->wanted_fc, B_TRUE); From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 16:04:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1275DF38; Mon, 23 Mar 2015 16:04:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F11FC253; Mon, 23 Mar 2015 16:04:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NG47LJ055774; Mon, 23 Mar 2015 16:04:07 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NG455A055762; Mon, 23 Mar 2015 16:04:05 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503231604.t2NG455A055762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Mar 2015 16:04:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280381 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 16:04:08 -0000 Author: emaste Date: Mon Mar 23 16:04:04 2015 New Revision: 280381 URL: https://svnweb.freebsd.org/changeset/base/280381 Log: Renumber clauses to avoid missing 3 Modified: head/sys/arm64/include/_types.h head/sys/arm64/include/cpu.h head/sys/arm64/include/float.h head/sys/arm64/include/pmap.h head/sys/arm64/include/proc.h head/sys/arm64/include/signal.h head/sys/arm64/include/stdarg.h head/sys/arm64/include/vmparam.h Modified: head/sys/arm64/include/_types.h ============================================================================== --- head/sys/arm64/include/_types.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/_types.h Mon Mar 23 16:04:04 2015 (r280381) @@ -11,7 +11,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/arm64/include/cpu.h ============================================================================== --- head/sys/arm64/include/cpu.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/cpu.h Mon Mar 23 16:04:04 2015 (r280381) @@ -17,7 +17,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/arm64/include/float.h ============================================================================== --- head/sys/arm64/include/float.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/float.h Mon Mar 23 16:04:04 2015 (r280381) @@ -14,7 +14,7 @@ * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/arm64/include/pmap.h ============================================================================== --- head/sys/arm64/include/pmap.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/pmap.h Mon Mar 23 16:04:04 2015 (r280381) @@ -14,7 +14,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/arm64/include/proc.h ============================================================================== --- head/sys/arm64/include/proc.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/proc.h Mon Mar 23 16:04:04 2015 (r280381) @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/arm64/include/signal.h ============================================================================== --- head/sys/arm64/include/signal.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/signal.h Mon Mar 23 16:04:04 2015 (r280381) @@ -10,7 +10,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/arm64/include/stdarg.h ============================================================================== --- head/sys/arm64/include/stdarg.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/stdarg.h Mon Mar 23 16:04:04 2015 (r280381) @@ -11,7 +11,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * Modified: head/sys/arm64/include/vmparam.h ============================================================================== --- head/sys/arm64/include/vmparam.h Mon Mar 23 15:53:26 2015 (r280380) +++ head/sys/arm64/include/vmparam.h Mon Mar 23 16:04:04 2015 (r280381) @@ -15,7 +15,7 @@ * 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. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 16:22:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A024F7C7; Mon, 23 Mar 2015 16:22:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 725F9662; Mon, 23 Mar 2015 16:22:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NGMvUR065147; Mon, 23 Mar 2015 16:22:57 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NGMvY8065146; Mon, 23 Mar 2015 16:22:57 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503231622.t2NGMvY8065146@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 23 Mar 2015 16:22:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280382 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 16:22:57 -0000 Author: dteske Date: Mon Mar 23 16:22:56 2015 New Revision: 280382 URL: https://svnweb.freebsd.org/changeset/base/280382 Log: Fix sgetkey indentation to be consistent with the rest of the file. Remove some blank lines, adjust some comments and update copyright. MFC after: 3 days X-MFC-to: stable/10 stable/9 Modified: head/sys/boot/forth/check-password.4th Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Mon Mar 23 16:04:04 2015 (r280381) +++ head/sys/boot/forth/check-password.4th Mon Mar 23 16:22:56 2015 (r280382) @@ -1,4 +1,4 @@ -\ Copyright (c) 2006-2012 Devin Teske +\ Copyright (c) 2006-2015 Devin Teske \ All rights reserved. \ \ Redistribution and use in source and binary forms, with or without @@ -48,33 +48,29 @@ variable readlen \ input length \ : sgetkey ( -- ) - begin \ Loop forever - key? if \ Was a key pressed? (see loader(8)) - - drop \ Remove stack-cruft - key \ Get the key that was pressed - - \ Check key pressed (see loader(8)) and input limit - dup 0<> if ( and ) readlen @ readmax < if - - \ Echo an asterisk (unless Backspace/Enter) - dup bs_key <> if ( and ) dup enter_key <> if - ." *" \ Echo an asterisk - then then - - exit \ Exit from the function - then then - - \ Always allow Backspace and Enter - dup bs_key = if exit then - dup enter_key = if exit then - - then - 50 ms \ Sleep for 50 milliseconds (see loader(8)) - again + begin \ Loop forever + key? if \ Was a key pressed? (see loader(8)) + drop \ Remove stack-cruft + key \ Get the key that was pressed + + \ Check key pressed (see loader(8)) and input limit + dup 0<> if ( and ) readlen @ readmax < if + \ Echo an asterisk (unless Backspace/Enter) + dup bs_key <> if ( and ) dup enter_key <> if + ." *" \ Echo an asterisk + then then + exit + then then + + \ Always allow Backspace and Enter + dup bs_key = if exit then + dup enter_key = if exit then + then + 50 ms \ Sleep for 50 milliseconds (see loader(8)) + again ; -: read ( String prompt -- ) +: read ( c-addr/u -- ) \ Expects string prompt as stack input 0 25 at-xy \ Move the cursor to the bottom-left dup 1+ read-start ! \ Store X offset after the prompt @@ -127,8 +123,7 @@ variable readlen \ input length then then - drop \ drop the last key that was entered - + drop \ last key pressed again \ Enter was not pressed; repeat ; From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 16:31:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBDADB1E; Mon, 23 Mar 2015 16:31:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9E8357CA; Mon, 23 Mar 2015 16:31:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NGVSJd069930; Mon, 23 Mar 2015 16:31:28 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NGVS3B069929; Mon, 23 Mar 2015 16:31:28 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503231631.t2NGVS3B069929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 23 Mar 2015 16:31:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280383 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 16:31:28 -0000 Author: dteske Date: Mon Mar 23 16:31:27 2015 New Revision: 280383 URL: https://svnweb.freebsd.org/changeset/base/280383 Log: Prevent password/bootlock_password features of loader.conf(5) from locking out everyone in the case of setting a password longer than the maximum (currently 16 characters). Now the required password is truncated to the maximum input that can be read from the user. PR: kern/198760 MFC after: 3 days MFH: stable/10 stable/9 Modified: head/sys/boot/forth/check-password.4th Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Mon Mar 23 16:22:56 2015 (r280382) +++ head/sys/boot/forth/check-password.4th Mon Mar 23 16:31:27 2015 (r280383) @@ -28,15 +28,15 @@ marker task-check-password.4th include /boot/screen.4th -13 constant enter_key \ The decimal ASCII value for Enter key -8 constant bs_key \ The decimal ASCII value for Backspace key -16 constant readmax \ Maximum number of characters for the password +13 constant enter_key \ The decimal ASCII value for Enter key +8 constant bs_key \ The decimal ASCII value for Backspace key +16 constant readmax \ Maximum number of characters for the password -variable readX \ Current X offset (column)(used by read) -variable read-start \ Starting X offset (column)(used by read) +variable readX \ Current X offset (column)(used by read) +variable read-start \ Starting X offset (column)(used by read) -create readval 16 allot \ input obtained (maximum 16 characters) -variable readlen \ input length +create readval readmax allot \ input obtained (up to readmax characters) +variable readlen \ input length \ This function blocks program flow (loops forever) until a key is pressed. \ The key that was pressed is added to the top of the stack in the form of its @@ -132,6 +132,7 @@ variable readlen \ input length \ Do not allow the user to proceed beyond this point if a boot-lock \ password has been set (preventing even boot from proceeding) s" bootlock_password" getenv dup -1 <> if + dup readmax > if drop readmax then begin s" Boot Password: " read ( prompt -- ) 2dup readval readlen @ compare 0<> @@ -154,7 +155,7 @@ variable readlen \ input length \ Only reached if autoboot fails for any reason (including if/when \ the user aborts/escapes the countdown sequence leading to boot). - s" password" getenv + s" password" getenv dup readmax > if drop readmax then begin s" Password: " read ( prompt -- ) 2dup readval readlen @ compare 0= if From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 16:43:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9DAEF9C; Mon, 23 Mar 2015 16:43:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD458F5; Mon, 23 Mar 2015 16:43:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NGhlcU074912; Mon, 23 Mar 2015 16:43:47 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NGhlNh074911; Mon, 23 Mar 2015 16:43:47 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503231643.t2NGhlNh074911@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 23 Mar 2015 16:43:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280384 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 16:43:48 -0000 Author: dteske Date: Mon Mar 23 16:43:46 2015 New Revision: 280384 URL: https://svnweb.freebsd.org/changeset/base/280384 Log: Increase max input for password/bootlock_password from 16 to 255. When taking user input, don't show asterisks as the user types but instead spin a twiddle. Implement Ctrl-U to clear user input. If the buffer is empty, either because the user has yet to type anything, presses Ctrl-U at any time, or presses backspace enough to end in an empty buffer, the twiddle is erased to provide feed- back to the user. MFC after: 3 days X-MFC-to: stable/10 stable/9 Modified: head/sys/boot/forth/check-password.4th Modified: head/sys/boot/forth/check-password.4th ============================================================================== --- head/sys/boot/forth/check-password.4th Mon Mar 23 16:31:27 2015 (r280383) +++ head/sys/boot/forth/check-password.4th Mon Mar 23 16:43:46 2015 (r280384) @@ -28,11 +28,12 @@ marker task-check-password.4th include /boot/screen.4th -13 constant enter_key \ The decimal ASCII value for Enter key -8 constant bs_key \ The decimal ASCII value for Backspace key -16 constant readmax \ Maximum number of characters for the password +13 constant enter_key \ The decimal ASCII value for Enter key +8 constant bs_key \ The decimal ASCII value for Backspace key +21 constant ctrl_u \ The decimal ASCII value for Ctrl-U sequence +255 constant readmax \ Maximum number of characters for the password -variable readX \ Current X offset (column)(used by read) +variable read-tick \ Twiddle position (used by read) variable read-start \ Starting X offset (column)(used by read) create readval readmax allot \ input obtained (up to readmax characters) @@ -55,16 +56,23 @@ variable readlen \ input len \ Check key pressed (see loader(8)) and input limit dup 0<> if ( and ) readlen @ readmax < if - \ Echo an asterisk (unless Backspace/Enter) - dup bs_key <> if ( and ) dup enter_key <> if - ." *" \ Echo an asterisk - then then + \ Spin the twiddle and then exit this function + read-tick @ dup 1+ 4 mod read-tick ! + 2 spaces + dup 0 = if ( 1 ) ." /" else + dup 1 = if ( 2 ) ." -" else + dup 2 = if ( 3 ) ." \" else + dup 3 = if ( 4 ) ." |" else + 1 spaces + then then then then drop + read-start @ 25 at-xy exit then then - \ Always allow Backspace and Enter + \ Always allow Backspace, Enter, and Ctrl-U dup bs_key = if exit then dup enter_key = if exit then + dup ctrl_u = if exit then then 50 ms \ Sleep for 50 milliseconds (see loader(8)) again @@ -74,7 +82,6 @@ variable readlen \ input len 0 25 at-xy \ Move the cursor to the bottom-left dup 1+ read-start ! \ Store X offset after the prompt - read-start @ readX ! \ copy value to the current X offset 0 readlen ! \ Initialize the read length type \ Print the prompt @@ -86,42 +93,23 @@ variable readlen \ input len \ security reasons). If Enter is pressed, we process the \ password, otherwise augment the key to a string. - \ If the key that was entered was not Enter, advance - dup enter_key <> if - readX @ 1+ readX ! \ Advance the column - readlen @ 1+ readlen ! \ Increment input length - then - - \ Handle backspacing - dup bs_key = if - readX @ 2 - readX ! \ Set new cursor position - readlen @ 2 - readlen ! \ Decrement input length - - \ Don't move behind starting position - readX @ read-start @ < if - read-start @ readX ! - then - readlen @ 0< if - 0 readlen ! - then - - \ Reposition cursor and erase character - readX @ 25 at-xy 1 spaces readX @ 25 at-xy - then - dup enter_key = if - drop \ Clean up stack cruft - 10 emit \ Echo new line + drop \ Clean up stack cruft + 3 spaces \ Erase the twiddle + 10 emit \ Echo new line exit - then - - \ If not Backspace or Enter, store the character - dup bs_key <> if ( and ) dup enter_key <> if - - \ store the character in our buffer - dup readval readlen @ 1- + c! - - then then + else dup ctrl_u = if + 3 spaces read-start @ 25 at-xy \ Erase the twiddle + 0 readlen ! \ Reset input to NULL + else dup bs_key = if + readlen @ 1 - dup readlen ! \ Decrement input length + dup 0< if drop 0 dup readlen ! then \ Don't go negative + 0= if 3 spaces read-start @ 25 at-xy then \ Twiddle + else dup \ Store the character + \ NB: sgetkey prevents overflow by way of blocking + \ at readmax except for Backspace or Enter + readlen @ 1+ dup readlen ! 1- readval + c! + then then then drop \ last key pressed again \ Enter was not pressed; repeat From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 17:31:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1845134; Mon, 23 Mar 2015 17:31:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8CBC9F34; Mon, 23 Mar 2015 17:31:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NHVNuT095662; Mon, 23 Mar 2015 17:31:23 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NHVNNB095661; Mon, 23 Mar 2015 17:31:23 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503231731.t2NHVNNB095661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 23 Mar 2015 17:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280385 - head/sys/boot/forth X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 17:31:23 -0000 Author: dteske Date: Mon Mar 23 17:31:22 2015 New Revision: 280385 URL: https://svnweb.freebsd.org/changeset/base/280385 Log: Add missing variables password/bootlock_password. NB: Using NULL for default values in-case someone or something uncomments it and reboots. See check-password.4th(8) for additional details. MFC after: 3 days X-MFC-to: stable/10 stable/9 Modified: head/sys/boot/forth/loader.conf Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Mon Mar 23 16:43:46 2015 (r280384) +++ head/sys/boot/forth/loader.conf Mon Mar 23 17:31:22 2015 (r280385) @@ -60,6 +60,8 @@ entropy_cache_type="/boot/entropy" # allowed to interrupt autoboot process and # escape to the loader prompt, set to # "NO" to disable autobooting +#password="" # Prevent changes to boot options +#bootlock_password="" # Prevent booting (see check-password.4th(8)) #beastie_disable="NO" # Turn the beastie boot menu on and off #kernels="kernel kernel.old" # Kernels to display in the boot menu #loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 17:35:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7295F2EB; Mon, 23 Mar 2015 17:35:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D930F71; Mon, 23 Mar 2015 17:35:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NHZ7T6099119; Mon, 23 Mar 2015 17:35:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NHZ6E0099116; Mon, 23 Mar 2015 17:35:06 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503231735.t2NHZ6E0099116@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Mon, 23 Mar 2015 17:35:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280386 - in head/bin: cp mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 17:35:07 -0000 Author: jilles Date: Mon Mar 23 17:35:05 2015 New Revision: 280386 URL: https://svnweb.freebsd.org/changeset/base/280386 Log: cp,mv: Use futimens() instead of utimensat() if possible. Modified: head/bin/cp/utils.c head/bin/mv/mv.c Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Mon Mar 23 17:31:22 2015 (r280385) +++ head/bin/cp/utils.c Mon Mar 23 17:35:05 2015 (r280386) @@ -342,7 +342,7 @@ setfile(struct stat *fs, int fd) tspec[0] = fs->st_atim; tspec[1] = fs->st_mtim; - if (utimensat(AT_FDCWD, to.p_path, tspec, + if (fdval ? futimens(fd, tspec) : utimensat(AT_FDCWD, to.p_path, tspec, islink ? AT_SYMLINK_NOFOLLOW : 0)) { warn("utimensat: %s", to.p_path); rval = 1; Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Mon Mar 23 17:31:22 2015 (r280385) +++ head/bin/mv/mv.c Mon Mar 23 17:35:05 2015 (r280386) @@ -352,7 +352,7 @@ err: if (unlink(to)) ts[0] = sbp->st_atim; ts[1] = sbp->st_mtim; - if (utimensat(AT_FDCWD, to, ts, 0)) + if (futimens(to_fd, ts)) warn("%s: set times", to); if (close(to_fd)) { From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 18:09:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [8.8.178.116]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 109B4E86; Mon, 23 Mar 2015 18:09:17 +0000 (UTC) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx2.freebsd.org (Postfix) with ESMTP id 9F31E1A84; Mon, 23 Mar 2015 18:09:16 +0000 (UTC) Message-ID: <551056CC.10903@FreeBSD.org> Date: Mon, 23 Mar 2015 14:09:16 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: "Philip M. Gollucci" Subject: Re: svn commit: r280306 - in head: secure/lib/libcrypto secure/lib/libssl sys/sys References: <201503202348.t2KNmCM0033402@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 18:09:17 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 03/23/2015 11:35, Philip M. Gollucci wrote: > What about SSLv3 due to POODLE ? IMHO, it is too early to remove SSLv3 support because it is still widely used although there are known vulnerabilities. Please use OpenSSL from ports, i.e., security/openssl, i.e., turn off both SSL2 and SSL3 options and compile all ports with it. Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVEFbGAAoJEHyflib82/FGtH0H/jEr8VI2EIh4T0qmOyaXbwEg Aqz6sIO1AJe/PultpqEMSUWPKofHNH4YstOcaHQ421g22tcGjK3VgwhzSG97IPjH vlSY3451DDw0FzQVD20N3c8B0tjnrM2QD9K+wULvE74W9Yu6woSgQN/kLqhGnuss qPM3MemKNYq5euGnWVzXaY+IuDHFf8CFKanpymVFc378rV/M4tgXJbesNOX9Koiv VC7tvfn7slsr/bHSqC6zdDNk5BkL3iaNGceHweMeIQ8HeTtglESVjjOnBMayxsYS YKapEONNnhVh+Waq2jH0JylDIfotWMylvxFRLlW99oSPnvVHOMhsr+gEh6LxZGQ= =a8q9 -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 18:45:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B384DE5B; Mon, 23 Mar 2015 18:45:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C9E5A37; Mon, 23 Mar 2015 18:45:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NIjW6V032789; Mon, 23 Mar 2015 18:45:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NIjUuK032777; Mon, 23 Mar 2015 18:45:30 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503231845.t2NIjUuK032777@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 23 Mar 2015 18:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280387 - in head/usr.bin/xlint: arch/sparc64 common lint1 lint2 xlint X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 18:45:32 -0000 Author: pfg Date: Mon Mar 23 18:45:29 2015 New Revision: 280387 URL: https://svnweb.freebsd.org/changeset/base/280387 Log: xlint: update. Bring some important updates from NetBSD up to about 2008/04/25. The main feature is initial support for C99. This is a very basic update to make it easier to merge new compiler attirbutes but more updates are likely to follow. Obtained from: NetBSD MFC after: 2 weeks Modified: head/usr.bin/xlint/arch/sparc64/targparam.h head/usr.bin/xlint/common/lint.h head/usr.bin/xlint/common/mem.c head/usr.bin/xlint/lint1/cgram.y head/usr.bin/xlint/lint1/decl.c head/usr.bin/xlint/lint1/emit1.c head/usr.bin/xlint/lint1/err.c head/usr.bin/xlint/lint1/externs1.h head/usr.bin/xlint/lint1/func.c head/usr.bin/xlint/lint1/init.c head/usr.bin/xlint/lint1/lint1.h head/usr.bin/xlint/lint1/main1.c head/usr.bin/xlint/lint1/makeman head/usr.bin/xlint/lint1/scan.l head/usr.bin/xlint/lint1/tree.c head/usr.bin/xlint/lint2/read.c head/usr.bin/xlint/xlint/lint.1 head/usr.bin/xlint/xlint/xlint.c Modified: head/usr.bin/xlint/arch/sparc64/targparam.h ============================================================================== --- head/usr.bin/xlint/arch/sparc64/targparam.h Mon Mar 23 17:35:05 2015 (r280386) +++ head/usr.bin/xlint/arch/sparc64/targparam.h Mon Mar 23 18:45:29 2015 (r280387) @@ -1,4 +1,4 @@ -/* $NetBSD: targparam.h,v 1.2 2002/01/30 06:55:00 thorpej Exp $ */ +/* $NetBSD: targparam.h,v 1.3 2002/01/31 23:31:34 he Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -29,6 +29,8 @@ * 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$ */ /* Modified: head/usr.bin/xlint/common/lint.h ============================================================================== --- head/usr.bin/xlint/common/lint.h Mon Mar 23 17:35:05 2015 (r280386) +++ head/usr.bin/xlint/common/lint.h Mon Mar 23 18:45:29 2015 (r280387) @@ -1,4 +1,4 @@ -/* $NetBSD: lint.h,v 1.5 2002/03/07 18:29:56 tv Exp $ */ +/* $NetBSD: lint.h,v 1.7 2003/10/27 00:12:44 lukem Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -29,6 +29,8 @@ * 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$ */ #if HAVE_CONFIG_H @@ -90,7 +92,7 @@ typedef struct { u_int tt_isftyp : 1; /* 1 if floating point type */ u_int tt_isatyp : 1; /* 1 if arithmetic type */ u_int tt_issclt : 1; /* 1 if scalar type */ - char *tt_name; /* Bezeichnung des Typs */ + const char *tt_name; /* Bezeichnung des Typs */ } ttab_t; #define size(t) (ttab[t].tt_sz) Modified: head/usr.bin/xlint/common/mem.c ============================================================================== --- head/usr.bin/xlint/common/mem.c Mon Mar 23 17:35:05 2015 (r280386) +++ head/usr.bin/xlint/common/mem.c Mon Mar 23 18:45:29 2015 (r280387) @@ -1,4 +1,4 @@ -/* $NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $ */ +/* $NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -33,8 +33,9 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $"); +__RCSID("$NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $"); #endif +__FBSDID("$FreeBSD$"); #include #include @@ -64,9 +65,13 @@ xcalloc(size_t n, size_t s) void * xrealloc(void *p, size_t s) { + void *n; - if ((p = realloc(p, s)) == NULL) + if ((n = realloc(p, s)) == NULL) { + free(p); nomem(); + } + p = n; return (p); } Modified: head/usr.bin/xlint/lint1/cgram.y ============================================================================== --- head/usr.bin/xlint/lint1/cgram.y Mon Mar 23 17:35:05 2015 (r280386) +++ head/usr.bin/xlint/lint1/cgram.y Mon Mar 23 18:45:29 2015 (r280387) @@ -1,5 +1,5 @@ %{ -/* $NetBSD: cgram.y,v 1.23 2002/01/31 19:36:53 tv Exp $ */ +/* $NetBSD: cgram.y,v 1.40 2008/04/25 17:18:24 christos Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -35,7 +35,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: cgram.y,v 1.23 2002/01/31 19:36:53 tv Exp $"); +__RCSID("$NetBSD: cgram.y,v 1.40 2008/04/25 17:18:24 christos Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -65,13 +65,13 @@ int mblklev; */ static int onowarn = -1; -static int toicon(tnode_t *); +static int toicon(tnode_t *, int); static void idecl(sym_t *, int, sbuf_t *); static void ignuptorp(void); #ifdef DEBUG -static __inline void CLRWFLGS(void); -static __inline void CLRWFLGS(void) +static inline void CLRWFLGS(void); +static inline void CLRWFLGS(void) { printf("%s, %d: clear flags %s %d\n", curr_pos.p_file, curr_pos.p_line, __FILE__, __LINE__); @@ -79,8 +79,8 @@ static __inline void CLRWFLGS(void) onowarn = -1; } -static __inline void SAVE(void); -static __inline void SAVE(void) +static inline void SAVE(void); +static inline void SAVE(void) { if (onowarn != -1) abort(); @@ -89,8 +89,8 @@ static __inline void SAVE(void) onowarn = nowarn; } -static __inline void RESTORE(void); -static __inline void RESTORE(void) +static inline void RESTORE(void); +static inline void RESTORE(void) { if (onowarn != -1) { nowarn = onowarn; @@ -107,6 +107,8 @@ static __inline void RESTORE(void) #endif %} +%expect 1 + %union { int y_int; val_t *y_val; @@ -118,6 +120,7 @@ static __inline void RESTORE(void) tqual_t y_tqual; type_t *y_type; tnode_t *y_tnode; + range_t y_range; strg_t *y_strg; pqinf_t *y_pqinf; }; @@ -243,6 +246,8 @@ static __inline void RESTORE(void) %type parameter_type_list %type parameter_declaration %type expr +%type expr_stmnt_val +%type expr_stmnt_list %type term %type func_arg_list %type point_or_arrow @@ -253,6 +258,8 @@ static __inline void RESTORE(void) %type string %type string2 %type opt_asm_or_symbolrename +%type range +%type lorange %% @@ -682,12 +689,12 @@ notype_member_decl: $$ = $1; } | notype_decl T_COLON constant { - $$ = bitfield($1, toicon($3)); + $$ = bitfield($1, toicon($3, 1)); } | { symtyp = FVFT; } T_COLON constant { - $$ = bitfield(NULL, toicon($3)); + $$ = bitfield(NULL, toicon($3, 1)); } ; @@ -696,12 +703,12 @@ type_member_decl: $$ = $1; } | type_decl T_COLON constant { - $$ = bitfield($1, toicon($3)); + $$ = bitfield($1, toicon($3, 1)); } | { symtyp = FVFT; } T_COLON constant { - $$ = bitfield(NULL, toicon($3)); + $$ = bitfield(NULL, toicon($3, 1)); } ; @@ -784,7 +791,7 @@ enumerator: $$ = ename($1, enumval, 1); } | ename T_ASSIGN constant { - $$ = ename($1, toicon($3), 0); + $$ = ename($1, toicon($3, 1), 0); } ; @@ -849,7 +856,7 @@ notype_direct_decl: $$ = addarray($1, 0, 0); } | notype_direct_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | notype_direct_decl param_list { $$ = addfunc($1, $2); @@ -878,7 +885,7 @@ type_direct_decl: $$ = addarray($1, 0, 0); } | type_direct_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | type_direct_decl param_list { $$ = addfunc($1, $2); @@ -914,7 +921,7 @@ direct_param_decl: $$ = addarray($1, 0, 0); } | direct_param_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | direct_param_decl param_list { $$ = addfunc($1, $2); @@ -943,7 +950,7 @@ direct_notype_param_decl: $$ = addarray($1, 0, 0); } | direct_notype_param_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | direct_notype_param_decl param_list { $$ = addfunc($1, $2); @@ -1121,6 +1128,7 @@ init_expr: expr %prec T_COMMA { mkinit($1); } + | init_by_name init_expr %prec T_COMMA | init_lbrace init_expr_list init_rbrace | init_lbrace init_expr_list T_COMMA init_rbrace | error @@ -1131,6 +1139,38 @@ init_expr_list: | init_expr_list T_COMMA init_expr ; +lorange: + constant T_ELLIPSE { + $$.lo = toicon($1, 1); + } + ; +range: + constant { + $$.lo = toicon($1, 1); + $$.hi = $$.lo + 1; + } + | lorange constant { + $$.lo = $1.lo; + $$.hi = toicon($2, 1); + } + ; + +init_by_name: + T_LBRACK range T_RBRACK T_ASSIGN { + if (!Sflag) + warning(321); + } + | point identifier T_ASSIGN { + if (!Sflag) + warning(313); + memberpush($2); + } + | identifier T_COLON { + gnuism(315); + memberpush($1); + } + ; + init_lbrace: T_LBRACE { initlbr(); @@ -1187,13 +1227,13 @@ direct_abs_decl: $$ = addarray(aname(), 0, 0); } | T_LBRACK constant T_RBRACK { - $$ = addarray(aname(), 1, toicon($2)); + $$ = addarray(aname(), 1, toicon($2, 0)); } | direct_abs_decl T_LBRACK T_RBRACK { $$ = addarray($1, 0, 0); } | direct_abs_decl T_LBRACK constant T_RBRACK { - $$ = addarray($1, 1, toicon($3)); + $$ = addarray($1, 1, toicon($3, 0)); } | abs_decl_param_list { $$ = addfunc(aname(), $1); @@ -1207,9 +1247,8 @@ direct_abs_decl: } ; -stmnt: +non_expr_stmnt: labeled_stmnt - | expr_stmnt | comp_stmnt | selection_stmnt | iteration_stmnt @@ -1217,6 +1256,10 @@ stmnt: ftflg = 0; } | asm_stmnt + +stmnt: + expr_stmnt + | non_expr_stmnt ; labeled_stmnt: @@ -1231,7 +1274,12 @@ label: | T_CASE constant T_COLON { label(T_CASE, NULL, $2); ftflg = 1; - } + } + | T_CASE constant T_ELLIPSE constant T_COLON { + /* XXX: We don't fill all cases */ + label(T_CASE, NULL, $2); + ftflg = 1; + } | T_DEFAULT T_COLON { label(T_DEFAULT, NULL, NULL); ftflg = 1; @@ -1239,11 +1287,11 @@ label: ; comp_stmnt: - compstmnt_lbrace declaration_list opt_stmnt_list compstmnt_rbrace - | compstmnt_lbrace opt_stmnt_list compstmnt_rbrace + comp_stmnt_lbrace declaration_list opt_stmnt_list comp_stmnt_rbrace + | comp_stmnt_lbrace opt_stmnt_list comp_stmnt_rbrace ; -compstmnt_lbrace: +comp_stmnt_lbrace: T_LBRACE { blklev++; mblklev++; @@ -1251,7 +1299,7 @@ compstmnt_lbrace: } ; -compstmnt_rbrace: +comp_stmnt_rbrace: T_RBRACE { popdecl(); freeblk(); @@ -1276,7 +1324,7 @@ stmnt_list: expr_stmnt: expr T_SEMI { - expr($1, 0, 0); + expr($1, 0, 0, 1); ftflg = 0; } | T_SEMI { @@ -1284,6 +1332,34 @@ expr_stmnt: } ; +/* + * The following two productions are used to implement + * ({ [[decl-list] stmt-list] }). + * XXX: This is not well tested. + */ +expr_stmnt_val: + expr T_SEMI { + /* XXX: We should really do that only on the last name */ + if ($1->tn_op == NAME) + $1->tn_sym->s_used = 1; + $$ = $1; + expr($1, 0, 0, 0); + ftflg = 0; + } + | non_expr_stmnt { + $$ = getnode(); + $$->tn_type = gettyp(VOID); + } + ; + +expr_stmnt_list: + expr_stmnt_val + | expr_stmnt_list expr_stmnt_val { + $$ = $2; + } + | expr_stmnt_list expr_stmnt_val + ; + selection_stmnt: if_without_else { SAVE(); @@ -1525,6 +1601,26 @@ term: $2->tn_parn = 1; $$ = $2; } + | T_LPARN comp_stmnt_lbrace declaration_list expr_stmnt_list { + blklev--; + mblklev--; + initsym = mktempsym(duptyp($4->tn_type)); + mblklev++; + blklev++; + gnuism(320); + } comp_stmnt_rbrace T_RPARN { + $$ = getnnode(initsym, 0); + } + | T_LPARN comp_stmnt_lbrace expr_stmnt_list { + blklev--; + mblklev--; + initsym = mktempsym($3->tn_type); + mblklev++; + blklev++; + gnuism(320); + } comp_stmnt_rbrace T_RPARN { + $$ = getnnode(initsym, 0); + } | term T_INCDEC { $$ = build($2 == INC ? INCAFT : DECAFT, $1, NULL); } @@ -1580,6 +1676,14 @@ term: | T_LPARN type_name T_RPARN term %prec T_UNOP { $$ = cast($4, $2); } + | T_LPARN type_name T_RPARN %prec T_UNOP { + sym_t *tmp = mktempsym($2); + idecl(tmp, 1, NULL); + } init_lbrace init_expr_list init_rbrace { + if (!Sflag) + gnuism(319); + $$ = getnnode(initsym, 0); + } ; string: @@ -1620,6 +1724,13 @@ point_or_arrow: } ; +point: + T_STROP { + if ($1 != POINT) + error(249); + } + ; + identifier: T_NAME { $$ = $1; @@ -1635,7 +1746,6 @@ identifier: int yyerror(char *msg) { - error(249); if (++sytxerr >= 5) norecover(); @@ -1670,13 +1780,13 @@ q_gt(int64_t a, int64_t b) * expressions, it frees the memory used for the expression. */ static int -toicon(tnode_t *tn) +toicon(tnode_t *tn, int required) { int i; tspec_t t; val_t *v; - v = constant(tn); + v = constant(tn, required); /* * Abstract declarations are used inside expression. To free @@ -1721,7 +1831,7 @@ idecl(sym_t *decl, int initflg, sbuf_t * case EXTERN: if (rename != NULL) { if (decl->s_rename != NULL) - lerror("idecl() 1"); + LERROR("idecl()"); s = getlblk(1, rename->sb_len + 1); (void)memcpy(s, rename->sb_name, rename->sb_len + 1); @@ -1749,7 +1859,7 @@ idecl(sym_t *decl, int initflg, sbuf_t * decl1loc(decl, initflg); break; default: - lerror("idecl() 2"); + LERROR("idecl()"); } if (initflg && !initerr) Modified: head/usr.bin/xlint/lint1/decl.c ============================================================================== --- head/usr.bin/xlint/lint1/decl.c Mon Mar 23 17:35:05 2015 (r280386) +++ head/usr.bin/xlint/lint1/decl.c Mon Mar 23 18:45:29 2015 (r280387) @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $ */ +/* $NetBSD: decl.c,v 1.33 2004/06/20 22:20:16 jmc Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.29 2002/01/18 21:01:39 thorpej Exp $"); +__RCSID("$NetBSD: decl.c,v 1.33 2004/06/20 22:20:16 jmc Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -197,7 +197,7 @@ setcompl(type_t *tp, int ic) tp->t_str->sincompl = ic; } else { if (t != ENUM) - lerror("setcompl() 1"); + LERROR("setcompl()"); tp->t_enum->eincompl = ic; } } @@ -256,7 +256,7 @@ addtype(type_t *tp) * something like "typedef int a; int a b;" * This should not happen with current grammar. */ - lerror("addtype()"); + LERROR("addtype()"); } dcs->d_type = tp; return; @@ -297,7 +297,7 @@ addtype(type_t *tp) dcs->d_lmod = NOTSPEC; if (!quadflg) /* %s C does not support 'long long' */ - (void)gnuism(265, tflag ? "traditional" : "ANSI"); + (void)c99ism(265, tflag ? "traditional" : "c89"); } if (dcs->d_type != NULL && dcs->d_type->t_typedef) { @@ -466,7 +466,7 @@ addqual(tqual_t q) dcs->d_const = 1; } else { if (q != VOLATILE) - lerror("addqual() 1"); + LERROR("addqual()"); if (dcs->d_volatile) { /* duplicate "%s" */ warning(10, "volatile"); @@ -508,13 +508,13 @@ popdecl(void) (void)printf("popdecl(%d)\n", (int)dcs->d_ctx); if (dcs->d_nxt == NULL) - lerror("popdecl() 1"); + LERROR("popdecl()"); di = dcs; dcs = di->d_nxt; switch (di->d_ctx) { case EXTERN: /* there is nothing after external declarations */ - lerror("popdecl() 2"); + LERROR("popdecl()"); /* NOTREACHED */ case MOS: case MOU: @@ -562,7 +562,7 @@ popdecl(void) rmsyms(di->d_dlsyms); break; default: - lerror("popdecl() 3"); + LERROR("popdecl()"); } free(di); } @@ -635,7 +635,7 @@ deftyp(void) if (tp != NULL && (t != NOTSPEC || s != NOTSPEC || l != NOTSPEC)) { /* should never happen */ - lerror("deftyp() 1"); + LERROR("deftyp()"); } if (tp == NULL) { @@ -674,7 +674,7 @@ deftyp(void) case VOID: break; default: - lerror("deftyp() 2"); + LERROR("deftyp()"); } if (t != INT && t != CHAR && (s != NOTSPEC || l != NOTSPEC)) { dcs->d_terr = 1; @@ -712,13 +712,13 @@ deftyp(void) if (dcs->d_const && dcs->d_type->t_const) { if (!dcs->d_type->t_typedef) - lerror("deftyp() 3"); + LERROR("deftyp()"); /* typedef already qualified with "%s" */ warning(68, "const"); } if (dcs->d_volatile && dcs->d_type->t_volatile) { if (!dcs->d_type->t_typedef) - lerror("deftyp() 4"); + LERROR("deftyp()"); /* typedef already qualified with "%s" */ warning(68, "volatile"); } @@ -777,7 +777,7 @@ length(type_t *tp, const char *name) switch (tp->t_tspec) { case FUNC: /* compiler takes size of function */ - lerror("%s", msgs[12]); + LERROR("%s", msgs[12]); /* NOTREACHED */ case STRUCT: case UNION: @@ -796,7 +796,7 @@ length(type_t *tp, const char *name) default: elsz = size(tp->t_tspec); if (elsz <= 0) - lerror("length()"); + LERROR("length()"); break; } return (elem * elsz); @@ -831,7 +831,7 @@ getbound(type_t *tp) } } if (a < CHAR_BIT || a > LINT_ALIGN(1) * CHAR_BIT) - lerror("getbound() 1"); + LERROR("getbound()"); return (a); } @@ -925,7 +925,7 @@ chktyp(sym_t *sym) if (dcs->d_ctx == PARG) { if (sym->s_scl != ABSTRACT) { if (sym->s_name == unnamed) - lerror("chktyp()"); + LERROR("chktyp()"); /* void param cannot have name: %s */ error(61, sym->s_name); *tpp = gettyp(INT); @@ -963,12 +963,12 @@ decl1str(sym_t *dsym) scl_t sc; if ((sc = dsym->s_scl) != MOS && sc != MOU) - lerror("decl1str() 1"); + LERROR("decl1str()"); if (dcs->d_rdcsym != NULL) { if ((sc = dcs->d_rdcsym->s_scl) != MOS && sc != MOU) /* should be ensured by storesym() */ - lerror("decl1str() 2"); + LERROR("decl1str()"); if (dsym->s_styp == dcs->d_rdcsym->s_styp) { /* duplicate member name: %s */ error(33, dsym->s_name); @@ -991,11 +991,13 @@ decl1str(sym_t *dsym) t == SHORT || t == USHORT || t == ENUM) { if (bitfieldtype_ok == 0) { if (sflag) { + char buf[64]; /* * bit-field type '%s' invalid in * ANSI C */ - warning(273, tyname(tp)); + warning(273, + tyname(buf, sizeof(buf), tp)); } else if (pflag) { /* nonportable bit-field type */ warning(34); @@ -1051,7 +1053,7 @@ decl1str(sym_t *dsym) if ((sz = length(dsym->s_type, dsym->s_name)) == 0) { if (t == ARRAY && dsym->s_type->t_dim == 0) { /* illegal zero sized structure member: %s */ - warning(39, dsym->s_name); + c99ism(39, dsym->s_name); } } @@ -1221,12 +1223,12 @@ addarray(sym_t *decl, int dim, int n) tp->t_dim = n; if (n < 0) { - /* zero or negative array dimension */ - error(20); + /* negative array dimension */ + error(20, n); n = 0; } else if (n == 0 && dim) { - /* zero or negative array dimension */ - warning(20); + /* zero array dimension */ + c99ism(322, dim); } else if (n == 0 && !dim) { /* is incomplete type */ setcompl(tp, 1); @@ -1417,7 +1419,7 @@ dname(sym_t *sym) } else if (sc == EXTERN) { sym->s_def = DECL; } else { - lerror("dname() 1"); + LERROR("dname()"); } break; case PARG: @@ -1430,7 +1432,7 @@ dname(sym_t *sym) sym->s_reg = 1; sc = AUTO; } else { - lerror("dname() 2"); + LERROR("dname()"); } sym->s_def = DEF; break; @@ -1453,11 +1455,11 @@ dname(sym_t *sym) } else if (sc == EXTERN) { sym->s_def = DECL; } else { - lerror("dname() 3"); + LERROR("dname()"); } break; default: - lerror("dname() 4"); + LERROR("dname()"); } sym->s_scl = sc; @@ -1481,7 +1483,7 @@ iname(sym_t *sym) /* redeclaration of formal parameter %s */ error(21, sym->s_name); if (!sym->s_defarg) - lerror("iname()"); + LERROR("iname()"); } sym = pushdown(sym); } @@ -1514,7 +1516,7 @@ mktag(sym_t *tag, tspec_t kind, int decl } else if (kind == ENUM) { scl = ENUMTAG; } else { - lerror("mktag()"); + LERROR("mktag()"); } if (tag != NULL) { @@ -1636,7 +1638,7 @@ scltoa(scl_t sc) case STRTAG: s = "struct"; break; case UNIONTAG: s = "union"; break; case ENUMTAG: s = "enum"; break; - default: lerror("tagttoa()"); + default: LERROR("tagttoa()"); } return (s); } @@ -1664,7 +1666,7 @@ compltag(type_t *tp, sym_t *fmem) sp->memb = fmem; if (sp->size == 0) { /* zero sized %s */ - (void)gnuism(47, ttab[t].tt_name); + (void)c99ism(47, ttab[t].tt_name); } else { n = 0; for (mem = fmem; mem != NULL; mem = mem->s_nxt) { @@ -2143,7 +2145,7 @@ compltyp(sym_t *dsym, sym_t *ssym) while ((dst = *dstp) != NULL) { if (src == NULL || dst->t_tspec != src->t_tspec) - lerror("compltyp() 1"); + LERROR("compltyp()"); if (dst->t_tspec == ARRAY) { if (dst->t_dim == 0 && src->t_dim != 0) { *dstp = dst = duptyp(dst); @@ -2472,7 +2474,7 @@ decl1loc(sym_t *dsym, int initflg) */ break; default: - lerror("decl1loc() 1"); + LERROR("decl1loc()"); } } else if (dcs->d_rdcsym->s_blklev == blklev) { @@ -2621,7 +2623,7 @@ aname(void) sym_t *sym; if (dcs->d_ctx != ABSTRACT && dcs->d_ctx != PARG) - lerror("aname()"); + LERROR("aname()"); sym = getblk(sizeof (sym_t)); @@ -2791,7 +2793,7 @@ chkausg(int novar, sym_t *arg) { if (!arg->s_set) - lerror("chkausg() 1"); + LERROR("chkausg()"); if (novar) return; @@ -2810,7 +2812,7 @@ chkvusg(int novar, sym_t *sym) sym_t *xsym; if (blklev == 0 || sym->s_blklev == 0) - lerror("chkvusg() 1"); + LERROR("chkvusg()"); /* errors in expressions easily cause lots of these warnings */ if (nerr != 0) @@ -2875,7 +2877,7 @@ chklusg(sym_t *lab) { if (blklev != 1 || lab->s_blklev != 1) - lerror("chklusg() 1"); + LERROR("chklusg()"); if (lab->s_set && !lab->s_used) { STRUCT_ASSIGN(curr_pos, lab->s_spos); @@ -2914,7 +2916,7 @@ chktusg(sym_t *sym) warning(235, sym->s_name); break; default: - lerror("chktusg() 1"); + LERROR("chktusg()"); } } @@ -2946,7 +2948,7 @@ chkglsyms(void) chktusg(sym); } else { if (sym->s_kind != FMOS) - lerror("chkglsyms() 1"); + LERROR("chkglsyms()"); } } @@ -2961,7 +2963,7 @@ chkglvar(sym_t *sym) return; if (sym->s_scl != EXTERN && sym->s_scl != STATIC) - lerror("chkglvar() 1"); + LERROR("chkglvar()"); glchksz(sym); Modified: head/usr.bin/xlint/lint1/emit1.c ============================================================================== --- head/usr.bin/xlint/lint1/emit1.c Mon Mar 23 17:35:05 2015 (r280386) +++ head/usr.bin/xlint/lint1/emit1.c Mon Mar 23 18:45:29 2015 (r280387) @@ -1,4 +1,4 @@ -/* $NetBSD: emit1.c,v 1.11 2002/01/31 19:36:54 tv Exp $ */ +/* $NetBSD: emit1.c,v 1.14 2004/06/20 22:20:16 jmc Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -34,7 +34,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: emit1.c,v 1.11 2002/01/31 19:36:54 tv Exp $"); +__RCSID("$NetBSD: emit1.c,v 1.14 2004/06/20 22:20:16 jmc Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -117,7 +117,7 @@ outtype(type_t *tp) case STRUCT: t = 'T'; s = 's'; break; case UNION: t = 'T'; s = 'u'; break; default: - lerror("outtyp() 1"); + LERROR("outtyp()"); } if (tp->t_const) outchar('c'); @@ -257,7 +257,7 @@ outsym(sym_t *sym, scl_t sc, def_t def) outchar('e'); break; default: - lerror("outsym() 2"); + LERROR("outsym()"); } if (llibflg && def != DECL) { /* @@ -485,7 +485,7 @@ outfstrg(strg_t *strg) u_char *cp; if (strg->st_tspec != CHAR) - lerror("outfstrg() 1"); + LERROR("outfstrg()"); cp = strg->st_cp; Modified: head/usr.bin/xlint/lint1/err.c ============================================================================== --- head/usr.bin/xlint/lint1/err.c Mon Mar 23 17:35:05 2015 (r280386) +++ head/usr.bin/xlint/lint1/err.c Mon Mar 23 18:45:29 2015 (r280387) @@ -1,4 +1,4 @@ -/* $NetBSD: err.c,v 1.17 2002/01/31 19:36:54 tv Exp $ */ +/* $NetBSD: err.c,v 1.40 2009/04/15 01:20:57 christos Exp $ */ /* * Copyright (c) 1994, 1995 Jochen Pohl @@ -33,7 +33,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: err.c,v 1.17 2002/01/31 19:36:54 tv Exp $"); +__RCSID("$NetBSD: err.c,v 1.40 2009/04/15 01:20:57 christos Exp $"); #endif __FBSDID("$FreeBSD$"); @@ -76,7 +76,7 @@ const char *msgs[] = { "null dimension", /* 17 */ "illegal use of 'void'", /* 18 */ "void type for %s", /* 19 */ - "zero or negative array dimension", /* 20 */ + "negative array dimension (%d)", /* 20 */ "redeclaration of formal parameter %s", /* 21 */ "incomplete or misplaced function definition", /* 22 */ "undefined label %s", /* 23 */ @@ -95,7 +95,7 @@ const char *msgs[] = { "illegal bit-field size", /* 36 */ "zero size bit-field", /* 37 */ "function illegal in structure or union", /* 38 */ - "illegal zero sized structure member: %s", /* 39 */ + "zero sized array in struct is a C99 extension: %s", /* 39 */ "unknown size: %s", /* 40 */ "illegal use of bit-field", /* 41 */ "forward reference to enum type", /* 42 */ @@ -103,7 +103,7 @@ const char *msgs[] = { "declaration introduces new type in ANSI C: %s %s", /* 44 */ "base type is really '%s %s'", /* 45 */ "(%s) tag redeclared", /* 46 */ - "zero sized %s", /* 47 */ + "zero sized %s is a C9X feature", /* 47 */ "overflow in enumeration values: %s", /* 48 */ "struct or union member must be named", /* 49 */ "a function is declared as an argument: %s", /* 50 */ @@ -188,7 +188,7 @@ const char *msgs[] = { "expression has null effect", /* 129 */ "enum type mismatch, op %s", /* 130 */ "conversion to '%s' may sign-extend incorrectly", /* 131 */ - "conversion from '%s' may lose accuracy", /* 132 */ + "conversion from '%s' to '%s' may lose accuracy", /* 132 */ "conversion of pointer to '%s' loses bits", /* 133 */ "conversion of pointer to '%s' may lose bits", /* 134 */ "possible pointer alignment problem", /* 135 */ @@ -232,7 +232,7 @@ const char *msgs[] = { "too many array initializers", /* 173 */ "too many initializers", /* 174 */ "initialisation of an incomplete type", /* 175 */ - "invalid initializer", /* 176 */ + "invalid initializer type %s", /* 176 */ "non-constant initializer", /* 177 */ "initializer does not fit", /* 178 */ "cannot initialize struct/union with no named member", /* 179 */ @@ -354,7 +354,7 @@ const char *msgs[] = { "conversion of '%s' to '%s' is out of range, arg #%d", /* 295 */ "conversion of negative constant to unsigned type, arg #%d", /* 296 */ "conversion to '%s' may sign-extend incorrectly, arg #%d", /* 297 */ - "conversion from '%s' may lose accuracy, arg #%d", /* 298 */ + "conversion from '%s' to '%s' may lose accuracy, arg #%d", /* 298 */ "prototype does not match old style definition, arg #%d", /* 299 */ "old style definition", /* 300 */ "array of incomplete type", /* 301 */ @@ -369,6 +369,16 @@ const char *msgs[] = { "symbol renaming can't be used on function arguments", /* 310 */ "symbol renaming can't be used on automatic variables", /* 311 */ "%s C does not support // comments", /* 312 */ + "struct or union member name in initializer is a C9X feature",/* 313 */ + "%s is not a structure or a union", /* 314 */ + "GCC style struct or union member name in initializer", /* 315 */ + "__FUNCTION__ is a GCC extension", /* 316 */ + "__func__ is a C9X feature", /* 317 */ + "variable array dimension is a C99/GCC extension", /* 318 */ + "compound literals are a C9X/GCC extension", /* 319 */ + "({ }) is a GCC extension", /* 320 */ + "array initializer with designators is a C9X feature", /* 321 */ + "zero sized array is a C99 extension", /* 322 */ }; /* @@ -377,10 +387,10 @@ const char *msgs[] = { void msglist(void) { - int i; + size_t i; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 18:45:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F5E6F90; Mon, 23 Mar 2015 18:45:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AC22A38; Mon, 23 Mar 2015 18:45:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NIjcBF032842; Mon, 23 Mar 2015 18:45:38 GMT (envelope-from benno@FreeBSD.org) Received: (from benno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NIjcZ0032841; Mon, 23 Mar 2015 18:45:38 GMT (envelope-from benno@FreeBSD.org) Message-Id: <201503231845.t2NIjcZ0032841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: benno set sender to benno@FreeBSD.org using -f From: Benno Rice Date: Mon, 23 Mar 2015 18:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280388 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 18:45:38 -0000 Author: benno Date: Mon Mar 23 18:45:37 2015 New Revision: 280388 URL: https://svnweb.freebsd.org/changeset/base/280388 Log: Be consistent with M_ZERO when allocating ccbs. There are four places, all in cam_xpt.c, where ccbs are malloc'ed. Two of these use M_ZERO, two don't. The two that don't meant that allocated ccbs had trash in them making it hard to debug errors where they showed up. Due to this, use M_ZERO all the time when allocating ccbs. Submitted by: Scott Ferris Sponsored by: EMC/Isilon Storage Division Reviewed by: scottl, imp Differential: https://reviews.freebsd.org/D2120 Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Mon Mar 23 18:45:29 2015 (r280387) +++ head/sys/cam/cam_xpt.c Mon Mar 23 18:45:37 2015 (r280388) @@ -4523,7 +4523,7 @@ xpt_get_ccb_nowait(struct cam_periph *pe { union ccb *new_ccb; - new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_NOWAIT); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_NOWAIT); if (new_ccb == NULL) return (NULL); periph->periph_allocated++; @@ -4537,7 +4537,7 @@ xpt_get_ccb(struct cam_periph *periph) union ccb *new_ccb; cam_periph_unlock(periph); - new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_WAITOK); + new_ccb = malloc(sizeof(*new_ccb), M_CAMCCB, M_ZERO|M_WAITOK); cam_periph_lock(periph); periph->periph_allocated++; cam_ccbq_take_opening(&periph->path->device->ccbq); From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:08:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A862FDEA for ; Mon, 23 Mar 2015 19:08:48 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 6E621D14 for ; Mon, 23 Mar 2015 19:08:48 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJ8mFW033552 for ; Mon, 23 Mar 2015 19:08:48 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2NJ8mwK033551 for svn-src-all@freebsd.org; Mon, 23 Mar 2015 19:08:48 GMT (envelope-from bdrewery) Received: (qmail 24706 invoked from network); 23 Mar 2015 14:08:46 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 23 Mar 2015 14:08:46 -0500 Message-ID: <551064BF.2090806@FreeBSD.org> Date: Mon, 23 Mar 2015 14:08:47 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, FreeBSD Ports Management Team Subject: Re: svn commit: r280306 - in head: secure/lib/libcrypto secure/lib/libssl sys/sys References: <201503202348.t2KNmCM0033402@svn.freebsd.org> In-Reply-To: <201503202348.t2KNmCM0033402@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8WigA476T4NrhtQtMpagVp7NhrOfBmfGW" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:08:48 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8WigA476T4NrhtQtMpagVp7NhrOfBmfGW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 3/20/2015 6:48 PM, Jung-uk Kim wrote: > Author: jkim > Date: Fri Mar 20 23:48:11 2015 > New Revision: 280306 > URL: https://svnweb.freebsd.org/changeset/base/280306 >=20 > Log: > Disable insecure SSLv2 support from the base OpenSSL. > =20 > Differential Revision: https://reviews.freebsd.org/D1304 >=20 > Modified: > head/secure/lib/libcrypto/opensslconf-arm.h > head/secure/lib/libcrypto/opensslconf-mips.h > head/secure/lib/libcrypto/opensslconf-powerpc.h > head/secure/lib/libcrypto/opensslconf-sparc64.h > head/secure/lib/libcrypto/opensslconf-x86.h > head/secure/lib/libssl/Makefile > head/sys/sys/param.h >=20 Can this be backed out until a ports exp-run is done and ports are fixed? This is causing a lot of fallout. --=20 Regards, Bryan Drewery --8WigA476T4NrhtQtMpagVp7NhrOfBmfGW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVEGS/AAoJEDXXcbtuRpfPRzMH/jgDnj6dzgo3wMgjw09qVkaK Zb7SRCXNRhrIO5jWpa2A2r8CbVHEvk7DvYWdFuZ4Z47xmsV47vPS+4X4TTYVoY36 Zd0ak3vLeUCjYKVzdfTRIj1tOvir+BjukODh1otoQkP1RArJOucILZuUsHEEUdAk metELdprLJHMCPz3LLDl4pSjsPl2QuQxwhl5VDRDPlYClkSxFJOAF2DHGSpZaSzz qKUwyiowjKmshweNdVIO0KBTbK7hbneDsOTQipqHKbZPwE5D+tWcvhGmmjXWcnUY 3vayQ720Td1MeLqs+GMJLpm0HpRSDLCduWPbfLC5fIthl/BQ8nHxzEgxWlVjgR8= =yGxw -----END PGP SIGNATURE----- --8WigA476T4NrhtQtMpagVp7NhrOfBmfGW-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:12:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F067F179; Mon, 23 Mar 2015 19:12:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D0D26E0B; Mon, 23 Mar 2015 19:12:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJCuIG047371; Mon, 23 Mar 2015 19:12:56 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NJCuuF047369; Mon, 23 Mar 2015 19:12:56 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503231912.t2NJCuuF047369@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 23 Mar 2015 19:12:56 +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: r280390 - stable/10/usr.sbin/sysrc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:12:57 -0000 Author: dteske Date: Mon Mar 23 19:12:55 2015 New Revision: 280390 URL: https://svnweb.freebsd.org/changeset/base/280390 Log: MFC revisions 274068, 274119, 279624: r274068: Add key+=append syntax to sysrc(8) r279624: Add key-=remove syntax r274119: Add EXAMPLES-section entries for new syntax Reviewed by: shurd (r274068) Thanks to: seanc Relnotes: sysrc(8) now supports key+=append and key-=remove Modified: stable/10/usr.sbin/sysrc/sysrc stable/10/usr.sbin/sysrc/sysrc.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/sysrc/sysrc ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc Mon Mar 23 18:54:37 2015 (r280389) +++ stable/10/usr.sbin/sysrc/sysrc Mon Mar 23 19:12:55 2015 (r280390) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010-2014 Devin Teske +# Copyright (c) 2010-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="6.1 Jul-18,2014" +SYSRC_VERSION="6.3 Mar-4,2015" # # Options @@ -80,7 +80,7 @@ die() # usage() { - f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] name[[+]=value] ...\n" "$pgm" f_err "Try \`%s --help' for more information.\n" "$pgm" die } @@ -94,7 +94,7 @@ help() local optfmt="\t%-11s%s\n" local envfmt="\t%-17s%s\n" - f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm" f_err "OPTIONS:\n" f_err "$optfmt" "-a" \ @@ -529,6 +529,12 @@ status=$SUCCESS while [ $# -gt 0 ]; do NAME="${1%%=*}" + case "$NAME" in + *+) mode=APPEND NAME="${NAME%+}" ;; + *-) mode=REMOVE NAME="${NAME%-}" ;; + *) mode=ASSIGN + esac + [ "$DESCRIBE" ] && \ echo "$NAME: $( f_sysrc_desc "$NAME" )" @@ -589,18 +595,70 @@ while [ $# -gt 0 ]; do fi # - # If `-N' is passed, simplify the output + # Determine both `before' value and appropriate `new' value # - if [ ! "$SHOW_VALUE" ]; then - echo "$NAME" - f_sysrc_set "$NAME" "${1#*}" - else + case "$mode" in + APPEND) + before=$( f_sysrc_get "$NAME" ) + add="${1#*=}" + delim="${add%"${add#?}"}" # first character + oldIFS="$IFS" + case "$delim" in + ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;; + *) IFS="$delim" + esac + new="$before" + for a in $add; do + [ "$a" ] || continue + skip= + for b in $before; do + [ "$b" = "$a" ] && skip=1 break + done + [ "$skip" ] || new="$new$delim$a" + done + new="${new#"$delim"}" IFS="$oldIFS" + unset add delim oldIFS a skip b + [ "$SHOW_FILE" ] && before=$( f_sysrc_find "$NAME" ) + ;; + REMOVE) + before=$( f_sysrc_get "$NAME" ) + remove="${1#*=}" + delim="${remove%"${remove#?}"}" # first character + oldIFS="$IFS" + case "$delim" in + ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;; + *) IFS="$delim" + esac + new= + for b in $before; do + [ "$b" ] || continue + add=1 + for r in $remove; do + [ "$r" = "$b" ] && add= break + done + [ "$add" ] && new="$new$delim$b" + done + new="${new#"$delim"}" IFS="$oldIFS" + unset remove delim oldIFS b add r + [ "$SHOW_FILE" ] && before=$( f_sysrc_find "$NAME" ) + ;; + *) if [ "$SHOW_FILE" ]; then before=$( f_sysrc_find "$NAME" ) else before=$( f_sysrc_get "$NAME" ) fi - if f_sysrc_set "$NAME" "${1#*=}"; then + new="${1#*=}" + esac + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + f_sysrc_set "$NAME" "$new" + else + if f_sysrc_set "$NAME" "$new"; then if [ "$SHOW_FILE" ]; then after=$( f_sysrc_find "$NAME" ) else Modified: stable/10/usr.sbin/sysrc/sysrc.8 ============================================================================== --- stable/10/usr.sbin/sysrc/sysrc.8 Mon Mar 23 18:54:37 2015 (r280389) +++ stable/10/usr.sbin/sysrc/sysrc.8 Mon Mar 23 19:12:55 2015 (r280390) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2014 Devin Teske +.\" Copyright (c) 2011-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jul 18, 2014 +.Dd March 4, 2015 .Dt SYSRC 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir -.Ar name Ns Op = Ns Ar value +.Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value .Ar ... .Nm .Op Fl cdDeFhinNqvx @@ -135,6 +135,15 @@ It shares the `-e' and `-n' options and also has the same .Ql name[=value] syntax for making queries/assignments. +In addition +.Pq but unlike Xr sysctl 8 , +.Ql name+=value +is supported for adding items to values +.Pq see APPENDING VALUES +and +.Ql name-=value +is supported for removing items from values +.Pq see SUBTRACTING VALUES . .Pp However, while .Xr sysctl 8 @@ -183,6 +192,115 @@ modifying these integral files (yet taki grow unwieldy should .Nm be called repeatedly). +.Sh APPENDING VALUES +When using the +.Ql key+=value +syntax to add items to existing values, +the first character of the value is taken as the delimiter separating items +.Pq usually Qo \ Qc or Qo , Qc . +For example, in the following statement: +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces+=" gif0" +.El +.Pp +the first character is a space, informing +.Nm +that existing values are to be considered separated by whitespace. +If +.Ql gif0 +is not found in the existing value for +.Va cloned_interfaces , +it is added +.Pq with delimiter only if existing value is non-NULL . +.Pp +For convenience, if the first character is alpha-numeric +.Pq letters A-Z, a-z, or numbers 0-9 , +.Nm +uses the default setting of whitespace as separator. +For example, the above and below statements are equivalent since +.Dq gif0 +starts with an alpha-numeric character +.Pq the letter Li g : +.Pp +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces+=gif0 +.El +.Pp +Take the following sequence for example: +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces= # start with NULL +.It \ +.Nm +cloned_interfaces+=gif0 +.Dl # NULL -> `gif0' Pq NB: no preceding delimiter +.It \ +.Nm +cloned_interfaces+=gif0 # no change +.It \ +.Nm +cloned_interfaces+="tun0 gif0" +.Dl # `gif0' -> `gif0 tun0' Pq NB: no duplication +.El +.Pp +.Nm +prevents the same value from being added if already there. +.Sh SUBTRACTING VALUES +When using the +.Ql key-=value +syntax to remove items from existing values, +the first character of the value is taken as the delimiter separating items +.Pq usually Qo \ Qc or Qo , Qc . +For example, in the following statement: +.Pp +.Dl Nm cloned_interfaces-=" gif0" +.Pp +the first character is a space, informing +.Nm +that existing values are to be considered separated by whitespace. +If +.Ql gif0 +is found in the existing value for +.Va cloned_interfaces , +it is removed +.Pq extra delimiters removed . +.Pp +For convenience, if the first character is alpha-numeric +.Pq letters A-Z, a-z, or numbers 0-9 , +.Nm +uses the default setting of whitespace as separator. +For example, the above and below statements are equivalent since +.Dq gif0 +starts with an alpha-numeric character +.Pq the letter Li g : +.Pp +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces-=gif0 +.El +.Pp +Take the following sequence for example: +.Bl -tag -width indent+ +.It \ +.Nm +foo="bar baz" # start +.It \ +.Nm +foo-=bar # `bar baz' -> `baz' +.It \ +.Nm +foo-=baz # `baz' -> NULL +.El +.Pp +.Nm +removes all occurrences of all items provided +and collapses extra delimiters between items. .Sh ENVIRONMENT The following environment variables are referenced by .Nm : @@ -243,6 +361,16 @@ Working on other files, such as -f /etc/crontab MAILTO .Dl returns the value of the MAILTO setting Pq if configured . .Pp +Appending to existing values: +.Pp +.Nm +\&cloned_interfaces+=gif0 +.Dl appends Qo gif0 Qc to $cloned_interfaces Pq see APPENDING VALUES . +.Pp +.Nm +\&cloned_interfaces-=gif0 +.Dl removes Qo gif0 Qc from $cloned_interfaces Pq see SUBTRACTING VALUES . +.Pp In addition to the above syntax, .Nm also supports inline From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:13:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D76752BE for ; Mon, 23 Mar 2015 19:13:14 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 9C478E15 for ; Mon, 23 Mar 2015 19:13:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJDEmX037114 for ; Mon, 23 Mar 2015 19:13:14 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2NJDEcK037102 for svn-src-all@freebsd.org; Mon, 23 Mar 2015 19:13:14 GMT (envelope-from bdrewery) Received: (qmail 6874 invoked from network); 23 Mar 2015 14:13:12 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 23 Mar 2015 14:13:12 -0500 Message-ID: <551065CA.9000603@FreeBSD.org> Date: Mon, 23 Mar 2015 14:13:14 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Jung-uk Kim , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, FreeBSD Ports Management Team Subject: Re: svn commit: r280306 - in head: secure/lib/libcrypto secure/lib/libssl sys/sys References: <201503202348.t2KNmCM0033402@svn.freebsd.org> <551064BF.2090806@FreeBSD.org> In-Reply-To: <551064BF.2090806@FreeBSD.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QoGGjJGqmiwxgixiJ1e1on4j3TpapxqU8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:13:14 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --QoGGjJGqmiwxgixiJ1e1on4j3TpapxqU8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 3/23/2015 2:08 PM, Bryan Drewery wrote: > On 3/20/2015 6:48 PM, Jung-uk Kim wrote: >> Author: jkim >> Date: Fri Mar 20 23:48:11 2015 >> New Revision: 280306 >> URL: https://svnweb.freebsd.org/changeset/base/280306 >> >> Log: >> Disable insecure SSLv2 support from the base OpenSSL. >> =20 >> Differential Revision: https://reviews.freebsd.org/D1304 >> >> Modified: >> head/secure/lib/libcrypto/opensslconf-arm.h >> head/secure/lib/libcrypto/opensslconf-mips.h >> head/secure/lib/libcrypto/opensslconf-powerpc.h >> head/secure/lib/libcrypto/opensslconf-sparc64.h >> head/secure/lib/libcrypto/opensslconf-x86.h >> head/secure/lib/libssl/Makefile >> head/sys/sys/param.h >> >=20 > Can this be backed out until a ports exp-run is done and ports are > fixed? This is causing a lot of fallout. >=20 >=20 Here are the results actually: http://gohan2.ysv.freebsd.org/build.html?mastername=3Dhead-amd64-default-= baseline&build=3Dp381881_s280335 It is not that bad. --=20 Regards, Bryan Drewery --QoGGjJGqmiwxgixiJ1e1on4j3TpapxqU8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVEGXKAAoJEDXXcbtuRpfP8EgIANUUN6pFan23x0bNg5NJaO0O Mw0XjnwdKrjhIhciDh6gpG8p9o+5ubnO59/Nwc9ALeOlDfgjzemHdMxxxXzn9FKO 7nt/22eQS+lhUWRmodsxRtwp/U2GANMzeWHZdD1mZhdwVzmw4iJK9NsGB6RjuOcL hkaqmEJXpxJsUJ42FePCjalLjggCkQOcB5xnzlqHUlQD01dZo8NLSMXiZuwlrFCV mUIZQT0g92iEQAg9wfY7Jg1q1IIsGUznOvJKnQErO1bi73HZxjpcKfYODkqCkIKn Bu9beSOa1CfNQhVHepTGxWoViDdBy9PbfjMtFn7uqYr6qa+WF89Sf1ByYlrzQT8= =qPl7 -----END PGP SIGNATURE----- --QoGGjJGqmiwxgixiJ1e1on4j3TpapxqU8-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:21:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6A9C874 for ; Mon, 23 Mar 2015 19:21:19 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 8C7FBF2A for ; Mon, 23 Mar 2015 19:21:19 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJLJOf040518 for ; Mon, 23 Mar 2015 19:21:19 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2NJLJFU040515 for svn-src-all@freebsd.org; Mon, 23 Mar 2015 19:21:19 GMT (envelope-from bdrewery) Received: (qmail 61291 invoked from network); 23 Mar 2015 14:21:11 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 23 Mar 2015 14:21:11 -0500 Message-ID: <551067A9.1020406@FreeBSD.org> Date: Mon, 23 Mar 2015 14:21:13 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, FreeBSD Ports Management Team Subject: Re: svn commit: r280306 - in head: secure/lib/libcrypto secure/lib/libssl sys/sys References: <201503202348.t2KNmCM0033402@svn.freebsd.org> <551064BF.2090806@FreeBSD.org> <551065CA.9000603@FreeBSD.org> In-Reply-To: <551065CA.9000603@FreeBSD.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xedRuUfWPFDs4oPMS2rQbjwJ0DLjlSFxr" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:21:19 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xedRuUfWPFDs4oPMS2rQbjwJ0DLjlSFxr Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 3/23/2015 2:13 PM, Bryan Drewery wrote: > On 3/23/2015 2:08 PM, Bryan Drewery wrote: >> On 3/20/2015 6:48 PM, Jung-uk Kim wrote: >>> Author: jkim >>> Date: Fri Mar 20 23:48:11 2015 >>> New Revision: 280306 >>> URL: https://svnweb.freebsd.org/changeset/base/280306 >>> >>> Log: >>> Disable insecure SSLv2 support from the base OpenSSL. >>> =20 >>> Differential Revision: https://reviews.freebsd.org/D1304 >>> >>> Modified: >>> head/secure/lib/libcrypto/opensslconf-arm.h >>> head/secure/lib/libcrypto/opensslconf-mips.h >>> head/secure/lib/libcrypto/opensslconf-powerpc.h >>> head/secure/lib/libcrypto/opensslconf-sparc64.h >>> head/secure/lib/libcrypto/opensslconf-x86.h >>> head/secure/lib/libssl/Makefile >>> head/sys/sys/param.h >>> >> >> Can this be backed out until a ports exp-run is done and ports are >> fixed? This is causing a lot of fallout. >> >> >=20 > Here are the results actually: >=20 > http://gohan2.ysv.freebsd.org/build.html?mastername=3Dhead-amd64-defaul= t-baseline&build=3Dp381881_s280335 >=20 > It is not that bad. >=20 Reminds me that I need to implement this https://lists.freebsd.org/pipermail/freebsd-current/2014-September/052187= =2Ehtml --=20 Regards, Bryan Drewery --xedRuUfWPFDs4oPMS2rQbjwJ0DLjlSFxr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVEGepAAoJEDXXcbtuRpfPN7MH/R3b/gC1d2YHAruTVy7FqKtx Ge+X3pAHQ96PxBZR2Io8/pB3ba/UXwt8UvZ1I7tG2ux9UM2m0gBRe0fjN3Euc/z0 be326bVdE7vQZqMl6jmdBYGe/JCmpzBUQCOOWrIcK1vANu39MjI+ZTr/NOM6h+lj B9AkCS64/HSUuUQZSeZrh9J/Erh7I/+cqIVmMniZMkeNJ/Ej790GhhdbXxOFXMIm 4bNPND77uORz88IL94gZOSvbAGGmMNt8fIDKcA3o2POrhTxDrvOJx9sL/j9raof/ AI/92083PGVMu3xOkbgCsmHSH9vun6zD14ENbMyw5HG0xzYrpYe5EqgkbHZ/XiM= =rlp0 -----END PGP SIGNATURE----- --xedRuUfWPFDs4oPMS2rQbjwJ0DLjlSFxr-- From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:25:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64A55D79; Mon, 23 Mar 2015 19:25:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46787F6A; Mon, 23 Mar 2015 19:25:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJPawS053507; Mon, 23 Mar 2015 19:25:36 GMT (envelope-from dteske@FreeBSD.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NJPZ4X053505; Mon, 23 Mar 2015 19:25:35 GMT (envelope-from dteske@FreeBSD.org) Message-Id: <201503231925.t2NJPZ4X053505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dteske set sender to dteske@FreeBSD.org using -f From: Devin Teske Date: Mon, 23 Mar 2015 19:25:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280391 - stable/9/usr.sbin/sysrc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:25:36 -0000 Author: dteske Date: Mon Mar 23 19:25:34 2015 New Revision: 280391 URL: https://svnweb.freebsd.org/changeset/base/280391 Log: MFC revisions 268860, 268863, 274068, 274119, 279624: r268860: Minor enhancements, bug fixes, man-page adjustments to sysrc(8) r268863: Bump date/copyright in man-page r274068: Add key+=append syntax r279624: Add key-=remove syntax r274119: Add EXAMPLES-section entries for new syntax Reported by: lme (r268860) Reviewed by: shurd (r274068) Thanks to: seanc (r274068, r279624, r274119) Modified: stable/9/usr.sbin/sysrc/sysrc stable/9/usr.sbin/sysrc/sysrc.8 Directory Properties: stable/9/usr.sbin/sysrc/ (props changed) Modified: stable/9/usr.sbin/sysrc/sysrc ============================================================================== --- stable/9/usr.sbin/sysrc/sysrc Mon Mar 23 19:12:55 2015 (r280390) +++ stable/9/usr.sbin/sysrc/sysrc Mon Mar 23 19:25:34 2015 (r280391) @@ -1,6 +1,6 @@ #!/bin/sh #- -# Copyright (c) 2010-2013 Devin Teske +# Copyright (c) 2010-2015 Devin Teske # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,7 +40,7 @@ BSDCFG_SHARE="/usr/share/bsdconfig" # # Version information # -SYSRC_VERSION="6.0 Nov-07,2013" +SYSRC_VERSION="6.3 Mar-4,2015" # # Options @@ -80,7 +80,7 @@ die() # usage() { - f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] name[[+]=value] ...\n" "$pgm" f_err "Try \`%s --help' for more information.\n" "$pgm" die } @@ -94,7 +94,7 @@ help() local optfmt="\t%-11s%s\n" local envfmt="\t%-17s%s\n" - f_err "Usage: %s [OPTIONS] name[=value] ...\n" "$pgm" + f_err "Usage: %s [OPTIONS] name[[+|-]=value] ...\n" "$pgm" f_err "OPTIONS:\n" f_err "$optfmt" "-a" \ @@ -102,7 +102,7 @@ help() f_err "$optfmt" "-A" \ "Dump a list of all configuration variables (incl. defaults)." f_err "$optfmt" "-c" \ - "Check. Return success if no changes needed, else error." + "Check. Return success if set or no changes, else error." f_err "$optfmt" "-d" \ "Print a description of the given variable." f_err "$optfmt" "-D" \ @@ -134,7 +134,7 @@ help() f_err "$optfmt" "-N" \ "Show only variable names, not their values." f_err "$optfmt" "-q" \ - "Quiet. Ignore previous \`-v' and/or SYSRC_VERBOSE." + "Quiet. Disable verbose and hide certain errors." f_err "$optfmt" "-R dir" \ "Operate within the root directory \`dir' rather than \`/'." f_err "$optfmt" "-v" \ @@ -152,8 +152,6 @@ help() "Override default rc_conf_files (even if set to NULL)." f_err "$envfmt" "RC_DEFAULTS" \ "Location of \`/etc/defaults/rc.conf' file." - f_err "$envfmt" "SYSRC_VERBOSE" \ - "Default verbosity. Set to non-NULL to enable." die } @@ -527,10 +525,16 @@ fi # # Process command-line arguments # -costatus=$SUCCESS +status=$SUCCESS while [ $# -gt 0 ]; do NAME="${1%%=*}" + case "$NAME" in + *+) mode=APPEND NAME="${NAME%+}" ;; + *-) mode=REMOVE NAME="${NAME%-}" ;; + *) mode=ASSIGN + esac + [ "$DESCRIBE" ] && \ echo "$NAME: $( f_sysrc_desc "$NAME" )" @@ -558,7 +562,7 @@ while [ $# -gt 0 ]; do # desire to set some value # if [ "$DELETE" ]; then - f_sysrc_delete "$NAME" + f_sysrc_delete "$NAME" || status=$FAILURE shift 1 continue fi @@ -568,28 +572,93 @@ while [ $# -gt 0 ]; do # if [ "$CHECK_ONLY" ]; then if ! IGNORED=$( f_sysrc_get "$NAME?" ); then - costatus=$FAILURE - else - value=$( f_sysrc_get "$NAME" ) - [ "$value" = "${1#*=}" ] || costatus=$FAILURE + status=$FAILURE + [ "$SYSRC_VERBOSE" ] && + echo "$NAME: not currently set" + shift 1 + continue + fi + value=$( f_sysrc_get "$NAME" ) + if [ "$value" != "${1#*=}" ]; then + status=$FAILURE + if [ "$SYSRC_VERBOSE" ]; then + echo -n "$( f_sysrc_find "$NAME" ): " + echo -n "$NAME: would change from " + echo "\`$value' to \`${1#*=}'" + fi + elif [ "$SYSRC_VERBOSE" ]; then + echo -n "$( f_sysrc_find "$NAME" ): " + echo "$NAME: already set to \`$value'" fi shift 1 continue fi # - # If `-N' is passed, simplify the output + # Determine both `before' value and appropriate `new' value # - if [ ! "$SHOW_VALUE" ]; then - echo "$NAME" - f_sysrc_set "$NAME" "${1#*}" - else + case "$mode" in + APPEND) + before=$( f_sysrc_get "$NAME" ) + add="${1#*=}" + delim="${add%"${add#?}"}" # first character + oldIFS="$IFS" + case "$delim" in + ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;; + *) IFS="$delim" + esac + new="$before" + for a in $add; do + [ "$a" ] || continue + skip= + for b in $before; do + [ "$b" = "$a" ] && skip=1 break + done + [ "$skip" ] || new="$new$delim$a" + done + new="${new#"$delim"}" IFS="$oldIFS" + unset add delim oldIFS a skip b + [ "$SHOW_FILE" ] && before=$( f_sysrc_find "$NAME" ) + ;; + REMOVE) + before=$( f_sysrc_get "$NAME" ) + remove="${1#*=}" + delim="${remove%"${remove#?}"}" # first character + oldIFS="$IFS" + case "$delim" in + ""|[$IFS]|[a-zA-Z0-9]) delim=" " ;; + *) IFS="$delim" + esac + new= + for b in $before; do + [ "$b" ] || continue + add=1 + for r in $remove; do + [ "$r" = "$b" ] && add= break + done + [ "$add" ] && new="$new$delim$b" + done + new="${new#"$delim"}" IFS="$oldIFS" + unset remove delim oldIFS b add r + [ "$SHOW_FILE" ] && before=$( f_sysrc_find "$NAME" ) + ;; + *) if [ "$SHOW_FILE" ]; then before=$( f_sysrc_find "$NAME" ) else before=$( f_sysrc_get "$NAME" ) fi - if f_sysrc_set "$NAME" "${1#*=}"; then + new="${1#*=}" + esac + + # + # If `-N' is passed, simplify the output + # + if [ ! "$SHOW_VALUE" ]; then + echo "$NAME" + f_sysrc_set "$NAME" "$new" + else + if f_sysrc_set "$NAME" "$new"; then if [ "$SHOW_FILE" ]; then after=$( f_sysrc_find "$NAME" ) else @@ -604,10 +673,10 @@ while [ $# -gt 0 ]; do ;; *) if ! IGNORED=$( f_sysrc_get "$NAME?" ); then - [ "$IGNORE_UNKNOWNS" ] || + [ "$IGNORE_UNKNOWNS" -o "$QUIET" ] || echo "$pgm: unknown variable '$NAME'" shift 1 - costatus=$FAILURE + status=$FAILURE continue fi @@ -631,7 +700,7 @@ while [ $# -gt 0 ]; do # If `-x' or `-X' is passed, delete the variable # if [ "$DELETE" ]; then - f_sysrc_delete "$NAME" + f_sysrc_delete "$NAME" || status=$FAILURE shift 1 continue fi @@ -667,7 +736,7 @@ while [ $# -gt 0 ]; do shift 1 done -[ ! "$CHECK_ONLY" ] || exit $costatus +exit $status # $SUCCESS unless error occurred with either `-c' or `-x' ################################################################################ # END Modified: stable/9/usr.sbin/sysrc/sysrc.8 ============================================================================== --- stable/9/usr.sbin/sysrc/sysrc.8 Mon Mar 23 19:12:55 2015 (r280390) +++ stable/9/usr.sbin/sysrc/sysrc.8 Mon Mar 23 19:25:34 2015 (r280391) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2011-2013 Devin Teske +.\" Copyright (c) 2011-2015 Devin Teske .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Nov 20, 2013 +.Dd March 4, 2015 .Dt SYSRC 8 .Os .Sh NAME @@ -35,7 +35,7 @@ .Op Fl cdDeFhinNqvx .Op Fl f Ar file .Op Fl j Ar jail | Fl R Ar dir -.Ar name Ns Op = Ns Ar value +.Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value .Ar ... .Nm .Op Fl cdDeFhinNqvx @@ -58,11 +58,14 @@ Dump a list of all non-default configura Dump a list of all configuration variables .Pq incl. defaults . .It Fl c -Check if the value will change when assigning a new value. +Check only. +For querying, return success if all requested variables are set +.Pq even if NULL , +otherwise return error status. +For assignments, return success if no changes are required, otherwise failure. If verbose .Pq see Dq Fl v -prints a message stating whether a change would occur. -Exits with success if no change is necessary, else returns error status. +prints a message stating whether variables are set and/or changes are required. .It Fl d Print a description of the given variable. .It Fl D @@ -108,14 +111,12 @@ Show only variable values, not their nam Show only variable names, not their values. .It Fl q Quiet. -Ignore previous occurrences of -.Fl v -flag. +Disable verbose and hide certain errors. .It Fl R Ar dir Operate within the root directory -.Pq Sq Ar dir +.Sq Ar dir rather than -.Pq Sq / . +.Sq / . .It Fl v Verbose. Print the pathname of the specific @@ -127,13 +128,22 @@ Print version information to stdout and Remove variable(s) from specified file(s). .El .Pp -This utility works similar to +This utility has a similar syntax to .Xr sysctl 8 . It shares the `-e' and `-n' options .Pq detailed above and also has the same .Ql name[=value] -syntax for querying/setting configuration options. +syntax for making queries/assignments. +In addition +.Pq but unlike Xr sysctl 8 , +.Ql name+=value +is supported for adding items to values +.Pq see APPENDING VALUES +and +.Ql name-=value +is supported for removing items from values +.Pq see SUBTRACTING VALUES . .Pp However, while .Xr sysctl 8 @@ -182,6 +192,115 @@ modifying these integral files (yet taki grow unwieldy should .Nm be called repeatedly). +.Sh APPENDING VALUES +When using the +.Ql key+=value +syntax to add items to existing values, +the first character of the value is taken as the delimiter separating items +.Pq usually Qo \ Qc or Qo , Qc . +For example, in the following statement: +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces+=" gif0" +.El +.Pp +the first character is a space, informing +.Nm +that existing values are to be considered separated by whitespace. +If +.Ql gif0 +is not found in the existing value for +.Va cloned_interfaces , +it is added +.Pq with delimiter only if existing value is non-NULL . +.Pp +For convenience, if the first character is alpha-numeric +.Pq letters A-Z, a-z, or numbers 0-9 , +.Nm +uses the default setting of whitespace as separator. +For example, the above and below statements are equivalent since +.Dq gif0 +starts with an alpha-numeric character +.Pq the letter Li g : +.Pp +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces+=gif0 +.El +.Pp +Take the following sequence for example: +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces= # start with NULL +.It \ +.Nm +cloned_interfaces+=gif0 +.Dl # NULL -> `gif0' Pq NB: no preceding delimiter +.It \ +.Nm +cloned_interfaces+=gif0 # no change +.It \ +.Nm +cloned_interfaces+="tun0 gif0" +.Dl # `gif0' -> `gif0 tun0' Pq NB: no duplication +.El +.Pp +.Nm +prevents the same value from being added if already there. +.Sh SUBTRACTING VALUES +When using the +.Ql key-=value +syntax to remove items from existing values, +the first character of the value is taken as the delimiter separating items +.Pq usually Qo \ Qc or Qo , Qc . +For example, in the following statement: +.Pp +.Dl Nm cloned_interfaces-=" gif0" +.Pp +the first character is a space, informing +.Nm +that existing values are to be considered separated by whitespace. +If +.Ql gif0 +is found in the existing value for +.Va cloned_interfaces , +it is removed +.Pq extra delimiters removed . +.Pp +For convenience, if the first character is alpha-numeric +.Pq letters A-Z, a-z, or numbers 0-9 , +.Nm +uses the default setting of whitespace as separator. +For example, the above and below statements are equivalent since +.Dq gif0 +starts with an alpha-numeric character +.Pq the letter Li g : +.Pp +.Bl -tag -width indent+ +.It \ +.Nm +cloned_interfaces-=gif0 +.El +.Pp +Take the following sequence for example: +.Bl -tag -width indent+ +.It \ +.Nm +foo="bar baz" # start +.It \ +.Nm +foo-=bar # `bar baz' -> `baz' +.It \ +.Nm +foo-=baz # `baz' -> NULL +.El +.Pp +.Nm +removes all occurrences of all items provided +and collapses extra delimiters between items. .Sh ENVIRONMENT The following environment variables are referenced by .Nm : @@ -242,6 +361,16 @@ Working on other files, such as -f /etc/crontab MAILTO .Dl returns the value of the MAILTO setting Pq if configured . .Pp +Appending to existing values: +.Pp +.Nm +\&cloned_interfaces+=gif0 +.Dl appends Qo gif0 Qc to $cloned_interfaces Pq see APPENDING VALUES . +.Pp +.Nm +\&cloned_interfaces-=gif0 +.Dl removes Qo gif0 Qc from $cloned_interfaces Pq see SUBTRACTING VALUES . +.Pp In addition to the above syntax, .Nm also supports inline @@ -304,5 +433,5 @@ utility first appeared in .An Devin Teske Aq dteske@FreeBSD.org .Sh THANKS TO Brandon Gooch, Garrett Cooper, Julian Elischer, Pawel Jakub Dawidek, -Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, and Jilles Tjoelker -for suggestions and help. +Cyrille Lefevre, Ross West, Stefan Esser, Marco Steinbach, Jilles Tjoelker, +Allan Jude, and Lars Engels for suggestions, help, and testing. From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:44:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45FB86BA; Mon, 23 Mar 2015 19:44:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 307291FF; Mon, 23 Mar 2015 19:44:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJiK1f063116; Mon, 23 Mar 2015 19:44:20 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NJiJpK063111; Mon, 23 Mar 2015 19:44:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503231944.t2NJiJpK063111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 23 Mar 2015 19:44:19 +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: r280392 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:44:20 -0000 Author: pfg Date: Mon Mar 23 19:44:18 2015 New Revision: 280392 URL: https://svnweb.freebsd.org/changeset/base/280392 Log: MFC r279186: setmode(3): Make sure that setmode sets errno on failure. Our man page already documented this partially but now we provide more consistent behavior. PR: 136669 Obtained from: NetBSD (CVS rev. 1.31, 1.33) Relnotes: yes Modified: stable/10/lib/libc/gen/setmode.3 stable/10/lib/libc/gen/setmode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/setmode.3 ============================================================================== --- stable/10/lib/libc/gen/setmode.3 Mon Mar 23 19:25:34 2015 (r280391) +++ stable/10/lib/libc/gen/setmode.3 Mon Mar 23 19:44:18 2015 (r280392) @@ -28,7 +28,7 @@ .\" @(#)setmode.3 8.2 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd April 28, 1995 +.Dd February 22, 2015 .Dt SETMODE 3 .Os .Sh NAME @@ -99,7 +99,20 @@ The function may fail and set errno for any of the errors specified for the library routine -.Xr malloc 3 . +.Xr malloc 3 +or +.Xr strtol 3 . +In addition, +.Fn setmode +will fail and set +.Va errno +to: +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa mode +argument does not represent a valid mode. +.El .Sh SEE ALSO .Xr chmod 1 , .Xr stat 2 , Modified: stable/10/lib/libc/gen/setmode.c ============================================================================== --- stable/10/lib/libc/gen/setmode.c Mon Mar 23 19:25:34 2015 (r280391) +++ stable/10/lib/libc/gen/setmode.c Mon Mar 23 19:44:18 2015 (r280392) @@ -41,6 +41,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -66,7 +68,7 @@ typedef struct bitcmd { #define CMD2_OBITS 0x08 #define CMD2_UBITS 0x10 -static BITCMD *addcmd(BITCMD *, int, int, int, u_int); +static BITCMD *addcmd(BITCMD *, mode_t, mode_t, mode_t, mode_t); static void compress_mode(BITCMD *); #ifdef SETMODE_DEBUG static void dumpmode(BITCMD *); @@ -151,33 +153,32 @@ common: if (set->cmd2 & CMD2_CLR) { BITCMD *newset; \ setlen += SET_LEN_INCR; \ newset = realloc(saveset, sizeof(BITCMD) * setlen); \ - if (!newset) { \ - if (saveset) \ - free(saveset); \ - saveset = NULL; \ - return (NULL); \ - } \ + if (newset == NULL) \ + goto out; \ set = newset + (set - saveset); \ saveset = newset; \ endset = newset + (setlen - 2); \ } \ - set = addcmd(set, (a), (b), (c), (d)) + set = addcmd(set, (mode_t)(a), (mode_t)(b), (mode_t)(c), (d)) #define STANDARD_BITS (S_ISUID|S_ISGID|S_IRWXU|S_IRWXG|S_IRWXO) void * setmode(const char *p) { - int perm, who; + int serrno; char op, *ep; BITCMD *set, *saveset, *endset; sigset_t sigset, sigoset; - mode_t mask; - int equalopdone=0, permXbits, setlen; + mode_t mask, perm, permXbits, who; long perml; + int equalopdone; + int setlen; - if (!*p) + if (!*p) { + errno = EINVAL; return (NULL); + } /* * Get a copy of the mask for the permissions that are mask relative. @@ -203,10 +204,17 @@ setmode(const char *p) * or illegal bits. */ if (isdigit((unsigned char)*p)) { + errno = 0; perml = strtol(p, &ep, 8); - if (*ep || perml < 0 || perml & ~(STANDARD_BITS|S_ISTXT)) { - free(saveset); - return (NULL); + if (*ep) { + errno = EINVAL; + goto out; + } + if (errno == ERANGE && (perml == LONG_MAX || perml == LONG_MIN)) + goto out; + if (perml & ~(STANDARD_BITS|S_ISTXT)) { + errno = EINVAL; + goto out; } perm = (mode_t)perml; ADDCMD('=', (STANDARD_BITS|S_ISTXT), perm, mask); @@ -218,6 +226,7 @@ setmode(const char *p) * Build list of structures to set/clear/copy bits as described by * each clause of the symbolic mode. */ + equalopdone = 0; for (;;) { /* First, find out which bits might be modified. */ for (who = 0;; ++p) { @@ -240,8 +249,8 @@ setmode(const char *p) } getop: if ((op = *p++) != '+' && op != '-' && op != '=') { - free(saveset); - return (NULL); + errno = EINVAL; + goto out; } if (op == '=') equalopdone = 0; @@ -330,10 +339,15 @@ apply: if (!*p) dumpmode(saveset); #endif return (saveset); +out: + serrno = errno; + free(saveset); + errno = serrno; + return NULL; } static BITCMD * -addcmd(BITCMD *set, int op, int who, int oparg, u_int mask) +addcmd(BITCMD *set, mode_t op, mode_t who, mode_t oparg, mode_t mask) { switch (op) { case '=': From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:48:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C10FA9C0; Mon, 23 Mar 2015 19:48:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB08E243; Mon, 23 Mar 2015 19:48:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJm5rw063728; Mon, 23 Mar 2015 19:48:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NJlrIg063643; Mon, 23 Mar 2015 19:47:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503231947.t2NJlrIg063643@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 23 Mar 2015 19:47:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280393 - in head/sys/dev: ahci ata ata/chipsets mvs siis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:48:06 -0000 Author: mav Date: Mon Mar 23 19:47:52 2015 New Revision: 280393 URL: https://svnweb.freebsd.org/changeset/base/280393 Log: Reduce priority of ATA/SATA drivers. Legacy ata(4) -> BUS_PROBE_LOW_PRIORITY; more functional ahci(4), siis(4), mvs(4) -> BUS_PROBE_DEFAULT; BUS_PROBE_VENDOR leave for vendor drivers. MFC after: 2 weeks Modified: head/sys/dev/ahci/ahci.c head/sys/dev/ahci/ahci_pci.c head/sys/dev/ahci/ahciem.c head/sys/dev/ata/ata-all.c head/sys/dev/ata/chipsets/ata-acard.c head/sys/dev/ata/chipsets/ata-acerlabs.c head/sys/dev/ata/chipsets/ata-adaptec.c head/sys/dev/ata/chipsets/ata-amd.c head/sys/dev/ata/chipsets/ata-ati.c head/sys/dev/ata/chipsets/ata-cenatek.c head/sys/dev/ata/chipsets/ata-cypress.c head/sys/dev/ata/chipsets/ata-cyrix.c head/sys/dev/ata/chipsets/ata-fsl.c head/sys/dev/ata/chipsets/ata-highpoint.c head/sys/dev/ata/chipsets/ata-intel.c head/sys/dev/ata/chipsets/ata-ite.c head/sys/dev/ata/chipsets/ata-jmicron.c head/sys/dev/ata/chipsets/ata-marvell.c head/sys/dev/ata/chipsets/ata-micron.c head/sys/dev/ata/chipsets/ata-national.c head/sys/dev/ata/chipsets/ata-netcell.c head/sys/dev/ata/chipsets/ata-nvidia.c head/sys/dev/ata/chipsets/ata-promise.c head/sys/dev/ata/chipsets/ata-serverworks.c head/sys/dev/ata/chipsets/ata-siliconimage.c head/sys/dev/ata/chipsets/ata-sis.c head/sys/dev/ata/chipsets/ata-via.c head/sys/dev/mvs/mvs.c head/sys/dev/mvs/mvs_pci.c head/sys/dev/mvs/mvs_soc.c head/sys/dev/siis/siis.c Modified: head/sys/dev/ahci/ahci.c ============================================================================== --- head/sys/dev/ahci/ahci.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ahci/ahci.c Mon Mar 23 19:47:52 2015 (r280393) @@ -638,7 +638,7 @@ ahci_ch_probe(device_t dev) { device_set_desc_copy(dev, "AHCI channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ahci/ahci_pci.c Mon Mar 23 19:47:52 2015 (r280393) @@ -340,13 +340,13 @@ ahci_probe(device_t dev) snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } if (!valid) return (ENXIO); device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } static int @@ -366,11 +366,11 @@ ahci_ata_probe(device_t dev) snprintf(buf, sizeof(buf), "%s AHCI SATA controller", ahci_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } device_set_desc_copy(dev, "AHCI SATA controller"); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } static int Modified: head/sys/dev/ahci/ahciem.c ============================================================================== --- head/sys/dev/ahci/ahciem.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ahci/ahciem.c Mon Mar 23 19:47:52 2015 (r280393) @@ -65,7 +65,7 @@ ahci_em_probe(device_t dev) { device_set_desc_copy(dev, "AHCI enclosure management bridge"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/ata-all.c Mon Mar 23 19:47:52 2015 (r280393) @@ -91,7 +91,7 @@ FEATURE(ata_cam, "ATA devices are access int ata_probe(device_t dev) { - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } int Modified: head/sys/dev/ata/chipsets/ata-acard.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acard.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-acard.c Mon Mar 23 19:47:52 2015 (r280393) @@ -83,7 +83,7 @@ ata_acard_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_acard_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acerlabs.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-acerlabs.c Mon Mar 23 19:47:52 2015 (r280393) @@ -96,7 +96,7 @@ ata_ali_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ali_chipinit; ctlr->chipdeinit = ata_ali_chipdeinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-adaptec.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-adaptec.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-adaptec.c Mon Mar 23 19:47:52 2015 (r280393) @@ -75,7 +75,7 @@ ata_adaptec_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_marvell_edma_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } ATA_DECLARE_DRIVER(ata_adaptec); Modified: head/sys/dev/ata/chipsets/ata-amd.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-amd.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-amd.c Mon Mar 23 19:47:52 2015 (r280393) @@ -82,7 +82,7 @@ ata_amd_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_amd_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ati.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-ati.c Mon Mar 23 19:47:52 2015 (r280393) @@ -123,7 +123,7 @@ ata_ati_probe(device_t dev) ctlr->chipinit = ata_ati_chipinit; break; } - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-cenatek.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-cenatek.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-cenatek.c Mon Mar 23 19:47:52 2015 (r280393) @@ -63,7 +63,7 @@ ata_cenatek_probe(device_t dev) ctlr->chipinit = ata_generic_chipinit; device_set_desc(dev, "Cenatek Rocket Drive controller"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } ATA_DECLARE_DRIVER(ata_cenatek); Modified: head/sys/dev/ata/chipsets/ata-cypress.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-cypress.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-cypress.c Mon Mar 23 19:47:52 2015 (r280393) @@ -75,7 +75,7 @@ ata_cypress_probe(device_t dev) pci_get_subclass(dev) == PCIS_STORAGE_IDE) { device_set_desc(dev, "Cypress 82C693 ATA controller"); ctlr->chipinit = ata_cypress_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: head/sys/dev/ata/chipsets/ata-cyrix.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-cyrix.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-cyrix.c Mon Mar 23 19:47:52 2015 (r280393) @@ -66,7 +66,7 @@ ata_cyrix_probe(device_t dev) if (pci_get_devid(dev) == ATA_CYRIX_5530) { device_set_desc(dev, "Cyrix 5530 ATA33 controller"); ctlr->chipinit = ata_cyrix_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: head/sys/dev/ata/chipsets/ata-fsl.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-fsl.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-fsl.c Mon Mar 23 19:47:52 2015 (r280393) @@ -79,7 +79,7 @@ imx_ata_probe(device_t dev) ctrl = device_get_softc(dev); device_set_desc(dev, "Freescale Integrated PATA Controller"); - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static void Modified: head/sys/dev/ata/chipsets/ata-highpoint.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-highpoint.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-highpoint.c Mon Mar 23 19:47:52 2015 (r280393) @@ -103,7 +103,7 @@ ata_highpoint_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_highpoint_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-intel.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-intel.c Mon Mar 23 19:47:52 2015 (r280393) @@ -264,7 +264,7 @@ ata_intel_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_intel_chipinit; ctlr->chipdeinit = ata_intel_chipdeinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ite.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-ite.c Mon Mar 23 19:47:52 2015 (r280393) @@ -77,7 +77,7 @@ ata_ite_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ite_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-jmicron.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-jmicron.c Mon Mar 23 19:47:52 2015 (r280393) @@ -86,7 +86,7 @@ ata_jmicron_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_jmicron_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-marvell.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-marvell.c Mon Mar 23 19:47:52 2015 (r280393) @@ -139,7 +139,7 @@ ata_marvell_probe(device_t dev) ctlr->chipinit = ata_marvell_dummy_chipinit; break; } - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-micron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-micron.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-micron.c Mon Mar 23 19:47:52 2015 (r280393) @@ -63,7 +63,7 @@ ata_micron_probe(device_t dev) device_set_desc(dev, "RZ 100? ATA controller !WARNING! data loss/corruption risk"); ctlr->chipinit = ata_generic_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return (ENXIO); } Modified: head/sys/dev/ata/chipsets/ata-national.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-national.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-national.c Mon Mar 23 19:47:52 2015 (r280393) @@ -67,7 +67,7 @@ ata_national_probe(device_t dev) if (pci_get_devid(dev) == ATA_SC1100) { device_set_desc(dev, "National Geode SC1100 ATA33 controller"); ctlr->chipinit = ata_national_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: head/sys/dev/ata/chipsets/ata-netcell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-netcell.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-netcell.c Mon Mar 23 19:47:52 2015 (r280393) @@ -66,7 +66,7 @@ ata_netcell_probe(device_t dev) if (pci_get_devid(dev) == ATA_NETCELL_SR) { device_set_desc(dev, "Netcell SyncRAID SR3000/5000 RAID Controller"); ctlr->chipinit = ata_netcell_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } return ENXIO; } Modified: head/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-nvidia.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-nvidia.c Mon Mar 23 19:47:52 2015 (r280393) @@ -187,7 +187,7 @@ ata_nvidia_probe(device_t dev) ctlr->chipinit = ata_ahci_chipinit; else ctlr->chipinit = ata_nvidia_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-promise.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-promise.c Mon Mar 23 19:47:52 2015 (r280393) @@ -209,7 +209,7 @@ ata_promise_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_promise_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-serverworks.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-serverworks.c Mon Mar 23 19:47:52 2015 (r280393) @@ -96,7 +96,7 @@ ata_serverworks_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_serverworks_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-siliconimage.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-siliconimage.c Mon Mar 23 19:47:52 2015 (r280393) @@ -113,7 +113,7 @@ ata_sii_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_sii_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } int Modified: head/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-sis.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-sis.c Mon Mar 23 19:47:52 2015 (r280393) @@ -154,7 +154,7 @@ ata_sis_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_sis_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/ata/chipsets/ata-via.c Mon Mar 23 19:47:52 2015 (r280393) @@ -141,7 +141,7 @@ ata_via_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_via_chipinit; - return (BUS_PROBE_DEFAULT); + return (BUS_PROBE_LOW_PRIORITY); } static int Modified: head/sys/dev/mvs/mvs.c ============================================================================== --- head/sys/dev/mvs/mvs.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/mvs/mvs.c Mon Mar 23 19:47:52 2015 (r280393) @@ -107,7 +107,7 @@ mvs_ch_probe(device_t dev) { device_set_desc_copy(dev, "Marvell SATA channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int Modified: head/sys/dev/mvs/mvs_pci.c ============================================================================== --- head/sys/dev/mvs/mvs_pci.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/mvs/mvs_pci.c Mon Mar 23 19:47:52 2015 (r280393) @@ -88,7 +88,7 @@ mvs_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", mvs_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); Modified: head/sys/dev/mvs/mvs_soc.c ============================================================================== --- head/sys/dev/mvs/mvs_soc.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/mvs/mvs_soc.c Mon Mar 23 19:47:52 2015 (r280393) @@ -91,7 +91,7 @@ mvs_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", mvs_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); Modified: head/sys/dev/siis/siis.c ============================================================================== --- head/sys/dev/siis/siis.c Mon Mar 23 19:44:18 2015 (r280392) +++ head/sys/dev/siis/siis.c Mon Mar 23 19:47:52 2015 (r280393) @@ -129,7 +129,7 @@ siis_probe(device_t dev) snprintf(buf, sizeof(buf), "%s SATA controller", siis_ids[i].name); device_set_desc_copy(dev, buf); - return (BUS_PROBE_VENDOR); + return (BUS_PROBE_DEFAULT); } } return (ENXIO); @@ -451,7 +451,7 @@ siis_ch_probe(device_t dev) { device_set_desc_copy(dev, "SIIS channel"); - return (0); + return (BUS_PROBE_DEFAULT); } static int From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:50:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70D1FB24; Mon, 23 Mar 2015 19:50:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BABF315; Mon, 23 Mar 2015 19:50:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJoMKu064109; Mon, 23 Mar 2015 19:50:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NJoMpa064108; Mon, 23 Mar 2015 19:50:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503231950.t2NJoMpa064108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 23 Mar 2015 19:50: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: r280394 - stable/10/lib/libc/db/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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:50:22 -0000 Author: pfg Date: Mon Mar 23 19:50:21 2015 New Revision: 280394 URL: https://svnweb.freebsd.org/changeset/base/280394 Log: MFC r279037: dbm_delete(3): correct man page to match current behaviour. "The dbm_store() and dbm_delete() functions shall return 0 when they succeed and a negative value when they fail." Reference: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html PR: 42422 Suggested by: delphij Modified: stable/10/lib/libc/db/man/dbm.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/db/man/dbm.3 ============================================================================== --- stable/10/lib/libc/db/man/dbm.3 Mon Mar 23 19:47:52 2015 (r280393) +++ stable/10/lib/libc/db/man/dbm.3 Mon Mar 23 19:50:21 2015 (r280394) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 16, 2006 +.Dd February 19, 2015 .Dt DBM 3 .Os .Sh NAME @@ -174,9 +174,7 @@ deletes the entry for The .Fn dbm_delete function -normally returns zero but returns 1 if there was no entry with -.Fa key -in the database or returns -1 and sets +normally returns zero or returns -1 and sets .Va errno if there were any errors. .Pp From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:53:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9813CE9E; Mon, 23 Mar 2015 19:53:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82E7935B; Mon, 23 Mar 2015 19:53:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NJrc9F067936; Mon, 23 Mar 2015 19:53:38 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NJrc8C067935; Mon, 23 Mar 2015 19:53:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503231953.t2NJrc8C067935@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 23 Mar 2015 19:53:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280395 - stable/9/lib/libc/db/man X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:53:38 -0000 Author: pfg Date: Mon Mar 23 19:53:37 2015 New Revision: 280395 URL: https://svnweb.freebsd.org/changeset/base/280395 Log: MFC r279037: dbm_delete(3): correct man page to match current behaviour. "The dbm_store() and dbm_delete() functions shall return 0 when they succeed and a negative value when they fail." Reference: http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html PR: 42422 Suggested by: delphij Modified: stable/9/lib/libc/db/man/dbm.3 Directory Properties: stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/db/man/dbm.3 ============================================================================== --- stable/9/lib/libc/db/man/dbm.3 Mon Mar 23 19:50:21 2015 (r280394) +++ stable/9/lib/libc/db/man/dbm.3 Mon Mar 23 19:53:37 2015 (r280395) @@ -15,7 +15,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 16, 2006 +.Dd February 19, 2015 .Dt DBM 3 .Os .Sh NAME @@ -174,9 +174,7 @@ deletes the entry for The .Fn dbm_delete function -normally returns zero but returns 1 if there was no entry with -.Fa key -in the database or returns -1 and sets +normally returns zero or returns -1 and sets .Va errno if there were any errors. .Pp From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 19:59:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FD81176; Mon, 23 Mar 2015 19:59:28 +0000 (UTC) Received: from mail-ie0-x234.google.com (mail-ie0-x234.google.com [IPv6:2607:f8b0:4001:c03::234]) (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 F400E3C9; Mon, 23 Mar 2015 19:59:27 +0000 (UTC) Received: by ieclw3 with SMTP id lw3so44779165iec.2; Mon, 23 Mar 2015 12:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=7z/nQpxC9sadMVl6wQSPQS0hMi+UfxRoxRlPh0xuXW8=; b=MpVa93PN32fBIy5dLSA9sQV/oox1VDm+Oi7kXKX+9g2jcKtisVrr9iKpB5a03qVtiC dJKpdpe1l/2WrYoNtjpvaMWAR6JlmnDNHQEOMYAY9Q9Zk+uGlkly4kgaPpb/1BrCW/Fr aekYSuBxcE2cRFtX9r0pAX2EQho1KcW9Kh9z9rSn8YLFEXZvtkcQSYUpZTyQMcN21Vkc Zk84BshqC7m9MS2aicNahZOPgbDMDH2JB1kMdBUSL79ff18BfvqxYmytKd0xXOLdXZ85 0ZHT1+RZnHzwN88Wogc+GgpTQhDD86tI3/PS50ckaP6nenrLAE/3qVCjvv2U+qU+6hzJ k4iw== X-Received: by 10.107.167.3 with SMTP id q3mr1426790ioe.18.1427140767147; Mon, 23 Mar 2015 12:59:27 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.19 with HTTP; Mon, 23 Mar 2015 12:59:06 -0700 (PDT) In-Reply-To: <201503231845.t2NIjUuK032777@svn.freebsd.org> References: <201503231845.t2NIjUuK032777@svn.freebsd.org> From: Ed Maste Date: Mon, 23 Mar 2015 15:59:06 -0400 X-Google-Sender-Auth: Fc9cimaQNkA9GuRzd0EKUGecfEA Message-ID: Subject: Re: svn commit: r280387 - in head/usr.bin/xlint: arch/sparc64 common lint1 lint2 xlint To: "Pedro F. Giffuni" Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 19:59:28 -0000 On 23 March 2015 at 14:45, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Mar 23 18:45:29 2015 > New Revision: 280387 > URL: https://svnweb.freebsd.org/changeset/base/280387 > > Log: > xlint: update. Nice. I was going to have a look at this at some point, so I'm glad that you've taken it on. Should we merge a copy of the original version, and then this update, to vendor/ to facilitate future merges? -Ed From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 20:00:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3ADEB2BF; Mon, 23 Mar 2015 20:00:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 25FB33D7; Mon, 23 Mar 2015 20:00:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NK0aw3071392; Mon, 23 Mar 2015 20:00:36 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NK0ave071391; Mon, 23 Mar 2015 20:00:36 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503232000.t2NK0ave071391@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 23 Mar 2015 20:00: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: r280396 - stable/10/lib/msun/src X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 20:00:36 -0000 Author: pfg Date: Mon Mar 23 20:00:35 2015 New Revision: 280396 URL: https://svnweb.freebsd.org/changeset/base/280396 Log: MFC r277948: msun: use previously ignored "in" value. This fixes evaluation of exceptional values in scalblnl(). While here, simplify the code as suggested by Bruce Evans. Reported by: clang static analyzer Modified: stable/10/lib/msun/src/s_scalbln.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/msun/src/s_scalbln.c ============================================================================== --- stable/10/lib/msun/src/s_scalbln.c Mon Mar 23 19:53:37 2015 (r280395) +++ stable/10/lib/msun/src/s_scalbln.c Mon Mar 23 20:00:35 2015 (r280396) @@ -35,13 +35,7 @@ scalbln (double x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; return (scalbn(x, in)); } @@ -50,13 +44,7 @@ scalblnf (float x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; return (scalbnf(x, in)); } @@ -65,12 +53,6 @@ scalblnl (long double x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } - return (scalbnl(x, (int)n)); + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; + return (scalbnl(x, in)); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 20:02:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29587436; Mon, 23 Mar 2015 20:02:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14065672; Mon, 23 Mar 2015 20:02:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NK2G1c072735; Mon, 23 Mar 2015 20:02:16 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NK2Gi6072734; Mon, 23 Mar 2015 20:02:16 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503232002.t2NK2Gi6072734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 23 Mar 2015 20:02:16 +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: r280397 - stable/9/lib/msun/src X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 20:02:17 -0000 Author: pfg Date: Mon Mar 23 20:02:16 2015 New Revision: 280397 URL: https://svnweb.freebsd.org/changeset/base/280397 Log: MFC r277948: msun: use previously ignored "in" value. This fixes evaluation of exceptional values in scalblnl(). While here, simplify the code as suggested by Bruce Evans. Reported by: clang static analyzer Modified: stable/9/lib/msun/src/s_scalbln.c Directory Properties: stable/9/lib/msun/ (props changed) Modified: stable/9/lib/msun/src/s_scalbln.c ============================================================================== --- stable/9/lib/msun/src/s_scalbln.c Mon Mar 23 20:00:35 2015 (r280396) +++ stable/9/lib/msun/src/s_scalbln.c Mon Mar 23 20:02:16 2015 (r280397) @@ -35,13 +35,7 @@ scalbln (double x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; return (scalbn(x, in)); } @@ -50,13 +44,7 @@ scalblnf (float x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; return (scalbnf(x, in)); } @@ -65,12 +53,6 @@ scalblnl (long double x, long n) { int in; - in = (int)n; - if (in != n) { - if (n > 0) - in = INT_MAX; - else - in = INT_MIN; - } - return (scalbnl(x, (int)n)); + in = (n > INT_MAX) ? INT_MAX : (n < INT_MIN) ? INT_MIN : n; + return (scalbnl(x, in)); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 20:13:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8039B6ED for ; Mon, 23 Mar 2015 20:13:38 +0000 (UTC) Received: from nm1-vm1.bullet.mail.bf1.yahoo.com (nm1-vm1.bullet.mail.bf1.yahoo.com [98.139.213.163]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 267A47D3 for ; Mon, 23 Mar 2015 20:13:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427141610; bh=raGnJjyv3MviokUYgw2FfH/bAtGiwrxk+VGK7aHOReE=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=TdrcearndsAiz3LLJT1+NBjSg5N9KneRzsx2kGQp70GN5pDgc2QB2WnheM1aF1Fnr5UfHtMNcW0ezIrE7De+20EnVzzq7ukGSwl2B1+PImIRbJY4qJ+oXPv7/ODz1nQkWcR0hWDvksAoih9Xw0RChmd5nmQ+8hps0QIXSdAh8UXL6/Z6e+PqQGV+Ii5gsKtAS+LRmNiozJRGprqBcn2l1xpyWrl+5xM0IDjv9gbzzi/2Hcl1GPHSWTDDi+KTxC9gO6tnYmQA0FRIhzjhKU76wOeHRno0nCkIlIJYMcvbhH3jHo1rT4S8joyBVzHeQqRHLG1OjOcrzzB/li+ocOKiAw== Received: from [98.139.170.181] by nm1.bullet.mail.bf1.yahoo.com with NNFMP; 23 Mar 2015 20:13:30 -0000 Received: from [98.139.211.162] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 23 Mar 2015 20:13:30 -0000 Received: from [127.0.0.1] by smtp219.mail.bf1.yahoo.com with NNFMP; 23 Mar 2015 20:13:30 -0000 X-Yahoo-Newman-Id: 579455.91178.bm@smtp219.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: FDb5JhgVM1mN.qjLiLA5ghBjLeFYXYgdUPZHLSbPbhcsve_ Qea1LzlFKhAz3uzgzkqJRS9YkLvvXq3qiN2UsB7QyFozEC5O67cmoMRjUEdu TzaGiSfdd2E_0EtyWA9GodW1ij9SAmRJhj60K6OWYJXwxCOD5S0ZYPt_8w67 ri18W79W3kk53MXCVIWYPDx3cKlBBNP6nSYNK8zbSjVuuGgvVUeWJE42z60A qbdbQr4XVhW4y.rtpcnqKrgSYVsjC3sbHsxqCDxoEoE6Hwd0c2Gyz61jypnd 4pX2GuabH.SMS.AV12M4mc82EQSA41phixSDVjL_dyKXdHPTKpEh4PAe2s.z gW4Swvw.8HbHpUZ_8xoMHFSSwZto4QqbCKcUCRUTvPfTtPn.K6kT82QeupI5 59fHJVAtaRPfwIGHUkMrLRil.8PN2HTns4kCXl22n2nCZCvTkqMbuwgwCcHK K3vzA7lGsA1Hwan2QoqLUk2Dks5027hlD_0AU8J0PQ8lT0qjJdKpxDbPIF.l _kwJeJeeH1YTmgUoXl8BA6KAke1VxpMAe X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <551073E8.9090402@FreeBSD.org> Date: Mon, 23 Mar 2015 15:13:28 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ed Maste Subject: Re: svn commit: r280387 - in head/usr.bin/xlint: arch/sparc64 common lint1 lint2 xlint References: <201503231845.t2NIjUuK032777@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 20:13:38 -0000 On 03/23/15 14:59, Ed Maste wrote: > On 23 March 2015 at 14:45, Pedro F. Giffuni wrote: >> Author: pfg >> Date: Mon Mar 23 18:45:29 2015 >> New Revision: 280387 >> URL: https://svnweb.freebsd.org/changeset/base/280387 >> >> Log: >> xlint: update. > Nice. > > I was going to have a look at this at some point, so I'm glad that > you've taken it on. Should we merge a copy of the original version, > and then this update, to vendor/ to facilitate future merges? TBH, I am still sorting out the changes from NetBSD that apply to us. It is not as ugly as libedit used to be but it's not nice either. I was planning phase 2: sync to just before their license change (2-clause BSDL). phase 3: apply the license changes and properly fix the /*-. phase 4: Bring the new updates. If you manage to get us in sync with a plain vendor import, that would be great and would save me from hand merging ;). Pedro. From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 20:50:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6DD64CE; Mon, 23 Mar 2015 20:50:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7EE4B97; Mon, 23 Mar 2015 20:50:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NKoTOR093353; Mon, 23 Mar 2015 20:50:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NKoTQg093352; Mon, 23 Mar 2015 20:50:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503232050.t2NKoTQg093352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Mar 2015 20:50: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: r280398 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 20:50:30 -0000 Author: emaste Date: Mon Mar 23 20:50:28 2015 New Revision: 280398 URL: https://svnweb.freebsd.org/changeset/base/280398 Log: MFC r275060: Fix b64_pton output buffer overrun test for exact-sized buffer b64_pton would sometimes erroneously fail to decode a base64 string into a precisely sized buffer. The overflow check was a little too greedy. Modified: stable/10/lib/libc/net/base64.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/base64.c ============================================================================== --- stable/10/lib/libc/net/base64.c Mon Mar 23 20:02:16 2015 (r280397) +++ stable/10/lib/libc/net/base64.c Mon Mar 23 20:50:28 2015 (r280398) @@ -199,6 +199,7 @@ b64_pton(src, target, targsize) size_t targsize; { int tarindex, state, ch; + u_char nextbyte; char *pos; state = 0; @@ -226,22 +227,28 @@ b64_pton(src, target, targsize) break; case 1: if (target) { - if ((size_t)tarindex + 1 >= targsize) + if ((size_t)tarindex >= targsize) return (-1); target[tarindex] |= (pos - Base64) >> 4; - target[tarindex+1] = ((pos - Base64) & 0x0f) - << 4 ; + nextbyte = ((pos - Base64) & 0x0f) << 4; + if ((size_t)tarindex + 1 < targsize) + target[tarindex + 1] = nextbyte; + else if (nextbyte) + return (-1); } tarindex++; state = 2; break; case 2: if (target) { - if ((size_t)tarindex + 1 >= targsize) + if ((size_t)tarindex >= targsize) return (-1); target[tarindex] |= (pos - Base64) >> 2; - target[tarindex+1] = ((pos - Base64) & 0x03) - << 6; + nextbyte = ((pos - Base64) & 0x03) << 6; + if ((size_t)tarindex + 1 < targsize) + target[tarindex + 1] = nextbyte; + else if (nextbyte) + return (-1); } tarindex++; state = 3; @@ -299,7 +306,8 @@ b64_pton(src, target, targsize) * zeros. If we don't check them, they become a * subliminal channel. */ - if (target && target[tarindex] != 0) + if (target && (size_t)tarindex < targsize && + target[tarindex] != 0) return (-1); } } else { From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 20:51:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1242627; Mon, 23 Mar 2015 20:51:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C41EBB1; Mon, 23 Mar 2015 20:51:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NKpal4095063; Mon, 23 Mar 2015 20:51:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NKpasC095062; Mon, 23 Mar 2015 20:51:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503232051.t2NKpasC095062@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 23 Mar 2015 20:51: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: r280399 - stable/10/lib/libc/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 20:51:36 -0000 Author: emaste Date: Mon Mar 23 20:51:35 2015 New Revision: 280399 URL: https://svnweb.freebsd.org/changeset/base/280399 Log: MFC r275163: ANSIfy b64_pton Modified: stable/10/lib/libc/net/base64.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/net/base64.c ============================================================================== --- stable/10/lib/libc/net/base64.c Mon Mar 23 20:50:28 2015 (r280398) +++ stable/10/lib/libc/net/base64.c Mon Mar 23 20:51:35 2015 (r280399) @@ -193,10 +193,7 @@ b64_ntop(u_char const *src, size_t srcle */ int -b64_pton(src, target, targsize) - char const *src; - u_char *target; - size_t targsize; +b64_pton(const char *src, u_char *target, size_t targsize) { int tarindex, state, ch; u_char nextbyte; From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 21:13:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 030ECD88; Mon, 23 Mar 2015 21:13:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8A9CE50; Mon, 23 Mar 2015 21:13:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NLDVCE007044; Mon, 23 Mar 2015 21:13:31 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NLDUDc007038; Mon, 23 Mar 2015 21:13:30 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503232113.t2NLDUDc007038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 23 Mar 2015 21:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280400 - in head/contrib/llvm: include/llvm/CodeGen lib/CodeGen/SelectionDAG lib/Target/ARM X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 21:13:32 -0000 Author: dim Date: Mon Mar 23 21:13:29 2015 New Revision: 280400 URL: https://svnweb.freebsd.org/changeset/base/280400 Log: Pull in r230348 from upstream llvm trunk (by Tim Northover): ARM: treat [N x i32] and [N x i64] as AAPCS composite types The logic is almost there already, with our special homogeneous aggregate handling. Tweaking it like this allows front-ends to emit AAPCS compliant code without ever having to count registers or add discarded padding arguments. Only arrays of i32 and i64 are needed to model AAPCS rules, but I decided to apply the logic to all integer arrays for more consistency. This fixes a possible "Unexpected member type for HA" error when compiling lib/msun/bsdsrc/b_tgamma.c for armv6. Reported by: Jakub Palider Modified: head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Modified: head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h ============================================================================== --- head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h Mon Mar 23 20:51:35 2015 (r280399) +++ head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h Mon Mar 23 21:13:29 2015 (r280400) @@ -122,8 +122,8 @@ public: // There is no need to differentiate between a pending CCValAssign and other // kinds, as they are stored in a different list. static CCValAssign getPending(unsigned ValNo, MVT ValVT, MVT LocVT, - LocInfo HTP) { - return getReg(ValNo, ValVT, 0, LocVT, HTP); + LocInfo HTP, unsigned ExtraInfo = 0) { + return getReg(ValNo, ValVT, ExtraInfo, LocVT, HTP); } void convertToReg(unsigned RegNo) { @@ -146,6 +146,7 @@ public: unsigned getLocReg() const { assert(isRegLoc()); return Loc; } unsigned getLocMemOffset() const { assert(isMemLoc()); return Loc; } + unsigned getExtraInfo() const { return Loc; } MVT getLocVT() const { return LocVT; } LocInfo getLocInfo() const { return HTP; } Modified: head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ============================================================================== --- head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Mar 23 20:51:35 2015 (r280399) +++ head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Mon Mar 23 21:13:29 2015 (r280400) @@ -7429,11 +7429,8 @@ TargetLowering::LowerCallTo(TargetLoweri } if (Args[i].isNest) Flags.setNest(); - if (NeedsRegBlock) { + if (NeedsRegBlock) Flags.setInConsecutiveRegs(); - if (Value == NumValues - 1) - Flags.setInConsecutiveRegsLast(); - } Flags.setOrigAlign(OriginalAlignment); MVT PartVT = getRegisterType(CLI.RetTy->getContext(), VT); @@ -7482,6 +7479,9 @@ TargetLowering::LowerCallTo(TargetLoweri CLI.Outs.push_back(MyFlags); CLI.OutVals.push_back(Parts[j]); } + + if (NeedsRegBlock && Value == NumValues - 1) + CLI.Outs[CLI.Outs.size() - 1].Flags.setInConsecutiveRegsLast(); } } @@ -7696,11 +7696,8 @@ void SelectionDAGISel::LowerArguments(co } if (F.getAttributes().hasAttribute(Idx, Attribute::Nest)) Flags.setNest(); - if (NeedsRegBlock) { + if (NeedsRegBlock) Flags.setInConsecutiveRegs(); - if (Value == NumValues - 1) - Flags.setInConsecutiveRegsLast(); - } Flags.setOrigAlign(OriginalAlignment); MVT RegisterVT = TLI->getRegisterType(*CurDAG->getContext(), VT); @@ -7715,6 +7712,8 @@ void SelectionDAGISel::LowerArguments(co MyFlags.Flags.setOrigAlign(1); Ins.push_back(MyFlags); } + if (NeedsRegBlock && Value == NumValues - 1) + Ins[Ins.size() - 1].Flags.setInConsecutiveRegsLast(); PartBase += VT.getStoreSize(); } } Modified: head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h Mon Mar 23 20:51:35 2015 (r280399) +++ head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h Mon Mar 23 21:13:29 2015 (r280400) @@ -160,6 +160,8 @@ static bool RetCC_ARM_AAPCS_Custom_f64(u State); } +static const uint16_t RRegList[] = { ARM::R0, ARM::R1, ARM::R2, ARM::R3 }; + static const uint16_t SRegList[] = { ARM::S0, ARM::S1, ARM::S2, ARM::S3, ARM::S4, ARM::S5, ARM::S6, ARM::S7, ARM::S8, ARM::S9, ARM::S10, ARM::S11, @@ -168,81 +170,114 @@ static const uint16_t DRegList[] = { ARM ARM::D4, ARM::D5, ARM::D6, ARM::D7 }; static const uint16_t QRegList[] = { ARM::Q0, ARM::Q1, ARM::Q2, ARM::Q3 }; + // Allocate part of an AAPCS HFA or HVA. We assume that each member of the HA // has InConsecutiveRegs set, and that the last member also has // InConsecutiveRegsLast set. We must process all members of the HA before // we can allocate it, as we need to know the total number of registers that // will be needed in order to (attempt to) allocate a contiguous block. -static bool CC_ARM_AAPCS_Custom_HA(unsigned &ValNo, MVT &ValVT, MVT &LocVT, - CCValAssign::LocInfo &LocInfo, - ISD::ArgFlagsTy &ArgFlags, CCState &State) { - SmallVectorImpl &PendingHAMembers = State.getPendingLocs(); +static bool CC_ARM_AAPCS_Custom_Aggregate(unsigned &ValNo, MVT &ValVT, + MVT &LocVT, + CCValAssign::LocInfo &LocInfo, + ISD::ArgFlagsTy &ArgFlags, + CCState &State) { + SmallVectorImpl &PendingMembers = State.getPendingLocs(); // AAPCS HFAs must have 1-4 elements, all of the same type - assert(PendingHAMembers.size() < 4); - if (PendingHAMembers.size() > 0) - assert(PendingHAMembers[0].getLocVT() == LocVT); + if (PendingMembers.size() > 0) + assert(PendingMembers[0].getLocVT() == LocVT); // Add the argument to the list to be allocated once we know the size of the - // HA - PendingHAMembers.push_back( - CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); - - if (ArgFlags.isInConsecutiveRegsLast()) { - assert(PendingHAMembers.size() > 0 && PendingHAMembers.size() <= 4 && - "Homogeneous aggregates must have between 1 and 4 members"); - - // Try to allocate a contiguous block of registers, each of the correct - // size to hold one member. - ArrayRef RegList; - switch (LocVT.SimpleTy) { - case MVT::f32: - RegList = SRegList; - break; - case MVT::f64: - RegList = DRegList; - break; - case MVT::v2f64: - RegList = QRegList; - break; - default: - llvm_unreachable("Unexpected member type for HA"); - break; - } + // aggregate. Store the type's required alignmnent as extra info for later: in + // the [N x i64] case all trace has been removed by the time we actually get + // to do allocation. + PendingMembers.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo, + ArgFlags.getOrigAlign())); + + if (!ArgFlags.isInConsecutiveRegsLast()) + return true; + + // Try to allocate a contiguous block of registers, each of the correct + // size to hold one member. + unsigned Align = std::min(PendingMembers[0].getExtraInfo(), 8U); + + ArrayRef RegList; + switch (LocVT.SimpleTy) { + case MVT::i32: { + RegList = RRegList; + unsigned RegIdx = State.getFirstUnallocated(RegList.data(), RegList.size()); + + // First consume all registers that would give an unaligned object. Whether + // we go on stack or in regs, no-one will be using them in future. + unsigned RegAlign = RoundUpToAlignment(Align, 4) / 4; + while (RegIdx % RegAlign != 0 && RegIdx < RegList.size()) + State.AllocateReg(RegList[RegIdx++]); - unsigned RegResult = - State.AllocateRegBlock(RegList, PendingHAMembers.size()); + break; + } + case MVT::f32: + RegList = SRegList; + break; + case MVT::f64: + RegList = DRegList; + break; + case MVT::v2f64: + RegList = QRegList; + break; + default: + llvm_unreachable("Unexpected member type for block aggregate"); + break; + } - if (RegResult) { - for (SmallVectorImpl::iterator It = PendingHAMembers.begin(); - It != PendingHAMembers.end(); ++It) { - It->convertToReg(RegResult); - State.addLoc(*It); - ++RegResult; - } - PendingHAMembers.clear(); - return true; + unsigned RegResult = State.AllocateRegBlock(RegList, PendingMembers.size()); + if (RegResult) { + for (SmallVectorImpl::iterator It = PendingMembers.begin(); + It != PendingMembers.end(); ++It) { + It->convertToReg(RegResult); + State.addLoc(*It); + ++RegResult; } + PendingMembers.clear(); + return true; + } - // Register allocation failed, fall back to the stack - - // Mark all VFP regs as unavailable (AAPCS rule C.2.vfp) - for (unsigned regNo = 0; regNo < 16; ++regNo) - State.AllocateReg(SRegList[regNo]); - - unsigned Size = LocVT.getSizeInBits() / 8; - unsigned Align = std::min(Size, 8U); + // Register allocation failed, we'll be needing the stack + unsigned Size = LocVT.getSizeInBits() / 8; + if (LocVT == MVT::i32 && State.getNextStackOffset() == 0) { + // If nothing else has used the stack until this point, a non-HFA aggregate + // can be split between regs and stack. + unsigned RegIdx = State.getFirstUnallocated(RegList.data(), RegList.size()); + for (auto &It : PendingMembers) { + if (RegIdx >= RegList.size()) + It.convertToMem(State.AllocateStack(Size, Size)); + else + It.convertToReg(State.AllocateReg(RegList[RegIdx++])); - for (auto It : PendingHAMembers) { - It.convertToMem(State.AllocateStack(Size, Align)); State.addLoc(It); } - - // All pending members have now been allocated - PendingHAMembers.clear(); + PendingMembers.clear(); + return true; + } else if (LocVT != MVT::i32) + RegList = SRegList; + + // Mark all regs as unavailable (AAPCS rule C.2.vfp for VFP, C.6 for core) + for (auto Reg : RegList) + State.AllocateReg(Reg); + + for (auto &It : PendingMembers) { + It.convertToMem(State.AllocateStack(Size, Align)); + State.addLoc(It); + + // After the first item has been allocated, the rest are packed as tightly + // as possible. (E.g. an incoming i64 would have starting Align of 8, but + // we'll be allocating a bunch of i32 slots). + Align = Size; } - // This will be allocated by the last member of the HA + // All pending members have now been allocated + PendingMembers.clear(); + + // This will be allocated by the last member of the aggregate return true; } Modified: head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td Mon Mar 23 20:51:35 2015 (r280399) +++ head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td Mon Mar 23 21:13:29 2015 (r280400) @@ -175,7 +175,7 @@ def CC_ARM_AAPCS_VFP : CallingConv<[ CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType>, // HFAs are passed in a contiguous block of registers, or on the stack - CCIfConsecutiveRegs>, + CCIfConsecutiveRegs>, CCIfType<[v2f64], CCAssignToReg<[Q0, Q1, Q2, Q3]>>, CCIfType<[f64], CCAssignToReg<[D0, D1, D2, D3, D4, D5, D6, D7]>>, Modified: head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Mon Mar 23 20:51:35 2015 (r280399) +++ head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Mon Mar 23 21:13:29 2015 (r280400) @@ -11280,7 +11280,9 @@ static bool isHomogeneousAggregate(Type return (Members > 0 && Members <= 4); } -/// \brief Return true if a type is an AAPCS-VFP homogeneous aggregate. +/// \brief Return true if a type is an AAPCS-VFP homogeneous aggregate or one of +/// [N x i32] or [N x i64]. This allows front-ends to skip emitting padding when +/// passing according to AAPCS rules. bool ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters( Type *Ty, CallingConv::ID CallConv, bool isVarArg) const { if (getEffectiveCallingConv(CallConv, isVarArg) != @@ -11289,7 +11291,9 @@ bool ARMTargetLowering::functionArgument HABaseType Base = HA_UNKNOWN; uint64_t Members = 0; - bool result = isHomogeneousAggregate(Ty, Base, Members); - DEBUG(dbgs() << "isHA: " << result << " "; Ty->dump()); - return result; + bool IsHA = isHomogeneousAggregate(Ty, Base, Members); + DEBUG(dbgs() << "isHA: " << IsHA << " "; Ty->dump()); + + bool IsIntArray = Ty->isArrayTy() && Ty->getArrayElementType()->isIntegerTy(); + return IsHA || IsIntArray; } From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 21:15:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD0CD1E2; Mon, 23 Mar 2015 21:15:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A78C0E77; Mon, 23 Mar 2015 21:15:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NLF8B3007369; Mon, 23 Mar 2015 21:15:08 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NLF8eC007368; Mon, 23 Mar 2015 21:15:08 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503232115.t2NLF8eC007368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 23 Mar 2015 21:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280401 - head/contrib/llvm/patches X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 21:15:08 -0000 Author: dim Date: Mon Mar 23 21:15:07 2015 New Revision: 280401 URL: https://svnweb.freebsd.org/changeset/base/280401 Log: Add llvm patch corresponding to r280400. Added: head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff Added: head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/patches/patch-10-llvm-r230348-arm-fix-bad-ha.diff Mon Mar 23 21:15:07 2015 (r280401) @@ -0,0 +1,419 @@ +Pull in r230348 from upstream llvm trunk (by Tim Northover): + + ARM: treat [N x i32] and [N x i64] as AAPCS composite types + + The logic is almost there already, with our special homogeneous + aggregate handling. Tweaking it like this allows front-ends to emit + AAPCS compliant code without ever having to count registers or add + discarded padding arguments. + + Only arrays of i32 and i64 are needed to model AAPCS rules, but I + decided to apply the logic to all integer arrays for more consistency. + +This fixes a possible "Unexpected member type for HA" error when +compiling lib/msun/bsdsrc/b_tgamma.c for armv6. + +Reported by: Jakub Palider + +Introduced here: https://svnweb.freebsd.org/changeset/base/280400 + +Index: include/llvm/CodeGen/CallingConvLower.h +=================================================================== +--- include/llvm/CodeGen/CallingConvLower.h ++++ include/llvm/CodeGen/CallingConvLower.h +@@ -122,8 +122,8 @@ class CCValAssign { + // There is no need to differentiate between a pending CCValAssign and other + // kinds, as they are stored in a different list. + static CCValAssign getPending(unsigned ValNo, MVT ValVT, MVT LocVT, +- LocInfo HTP) { +- return getReg(ValNo, ValVT, 0, LocVT, HTP); ++ LocInfo HTP, unsigned ExtraInfo = 0) { ++ return getReg(ValNo, ValVT, ExtraInfo, LocVT, HTP); + } + + void convertToReg(unsigned RegNo) { +@@ -146,6 +146,7 @@ class CCValAssign { + + unsigned getLocReg() const { assert(isRegLoc()); return Loc; } + unsigned getLocMemOffset() const { assert(isMemLoc()); return Loc; } ++ unsigned getExtraInfo() const { return Loc; } + MVT getLocVT() const { return LocVT; } + + LocInfo getLocInfo() const { return HTP; } +Index: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +=================================================================== +--- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp ++++ lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +@@ -7429,11 +7429,8 @@ TargetLowering::LowerCallTo(TargetLowering::CallLo + } + if (Args[i].isNest) + Flags.setNest(); +- if (NeedsRegBlock) { ++ if (NeedsRegBlock) + Flags.setInConsecutiveRegs(); +- if (Value == NumValues - 1) +- Flags.setInConsecutiveRegsLast(); +- } + Flags.setOrigAlign(OriginalAlignment); + + MVT PartVT = getRegisterType(CLI.RetTy->getContext(), VT); +@@ -7482,6 +7479,9 @@ TargetLowering::LowerCallTo(TargetLowering::CallLo + CLI.Outs.push_back(MyFlags); + CLI.OutVals.push_back(Parts[j]); + } ++ ++ if (NeedsRegBlock && Value == NumValues - 1) ++ CLI.Outs[CLI.Outs.size() - 1].Flags.setInConsecutiveRegsLast(); + } + } + +@@ -7696,11 +7696,8 @@ void SelectionDAGISel::LowerArguments(const Functi + } + if (F.getAttributes().hasAttribute(Idx, Attribute::Nest)) + Flags.setNest(); +- if (NeedsRegBlock) { ++ if (NeedsRegBlock) + Flags.setInConsecutiveRegs(); +- if (Value == NumValues - 1) +- Flags.setInConsecutiveRegsLast(); +- } + Flags.setOrigAlign(OriginalAlignment); + + MVT RegisterVT = TLI->getRegisterType(*CurDAG->getContext(), VT); +@@ -7715,6 +7712,8 @@ void SelectionDAGISel::LowerArguments(const Functi + MyFlags.Flags.setOrigAlign(1); + Ins.push_back(MyFlags); + } ++ if (NeedsRegBlock && Value == NumValues - 1) ++ Ins[Ins.size() - 1].Flags.setInConsecutiveRegsLast(); + PartBase += VT.getStoreSize(); + } + } +Index: lib/Target/ARM/ARMCallingConv.h +=================================================================== +--- lib/Target/ARM/ARMCallingConv.h ++++ lib/Target/ARM/ARMCallingConv.h +@@ -160,6 +160,8 @@ static bool RetCC_ARM_AAPCS_Custom_f64(unsigned &V + State); + } + ++static const uint16_t RRegList[] = { ARM::R0, ARM::R1, ARM::R2, ARM::R3 }; ++ + static const uint16_t SRegList[] = { ARM::S0, ARM::S1, ARM::S2, ARM::S3, + ARM::S4, ARM::S5, ARM::S6, ARM::S7, + ARM::S8, ARM::S9, ARM::S10, ARM::S11, +@@ -168,81 +170,114 @@ static const uint16_t DRegList[] = { ARM::D0, ARM: + ARM::D4, ARM::D5, ARM::D6, ARM::D7 }; + static const uint16_t QRegList[] = { ARM::Q0, ARM::Q1, ARM::Q2, ARM::Q3 }; + ++ + // Allocate part of an AAPCS HFA or HVA. We assume that each member of the HA + // has InConsecutiveRegs set, and that the last member also has + // InConsecutiveRegsLast set. We must process all members of the HA before + // we can allocate it, as we need to know the total number of registers that + // will be needed in order to (attempt to) allocate a contiguous block. +-static bool CC_ARM_AAPCS_Custom_HA(unsigned &ValNo, MVT &ValVT, MVT &LocVT, +- CCValAssign::LocInfo &LocInfo, +- ISD::ArgFlagsTy &ArgFlags, CCState &State) { +- SmallVectorImpl &PendingHAMembers = State.getPendingLocs(); ++static bool CC_ARM_AAPCS_Custom_Aggregate(unsigned &ValNo, MVT &ValVT, ++ MVT &LocVT, ++ CCValAssign::LocInfo &LocInfo, ++ ISD::ArgFlagsTy &ArgFlags, ++ CCState &State) { ++ SmallVectorImpl &PendingMembers = State.getPendingLocs(); + + // AAPCS HFAs must have 1-4 elements, all of the same type +- assert(PendingHAMembers.size() < 4); +- if (PendingHAMembers.size() > 0) +- assert(PendingHAMembers[0].getLocVT() == LocVT); ++ if (PendingMembers.size() > 0) ++ assert(PendingMembers[0].getLocVT() == LocVT); + + // Add the argument to the list to be allocated once we know the size of the +- // HA +- PendingHAMembers.push_back( +- CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo)); ++ // aggregate. Store the type's required alignmnent as extra info for later: in ++ // the [N x i64] case all trace has been removed by the time we actually get ++ // to do allocation. ++ PendingMembers.push_back(CCValAssign::getPending(ValNo, ValVT, LocVT, LocInfo, ++ ArgFlags.getOrigAlign())); + +- if (ArgFlags.isInConsecutiveRegsLast()) { +- assert(PendingHAMembers.size() > 0 && PendingHAMembers.size() <= 4 && +- "Homogeneous aggregates must have between 1 and 4 members"); ++ if (!ArgFlags.isInConsecutiveRegsLast()) ++ return true; + +- // Try to allocate a contiguous block of registers, each of the correct +- // size to hold one member. +- ArrayRef RegList; +- switch (LocVT.SimpleTy) { +- case MVT::f32: +- RegList = SRegList; +- break; +- case MVT::f64: +- RegList = DRegList; +- break; +- case MVT::v2f64: +- RegList = QRegList; +- break; +- default: +- llvm_unreachable("Unexpected member type for HA"); +- break; +- } ++ // Try to allocate a contiguous block of registers, each of the correct ++ // size to hold one member. ++ unsigned Align = std::min(PendingMembers[0].getExtraInfo(), 8U); + +- unsigned RegResult = +- State.AllocateRegBlock(RegList, PendingHAMembers.size()); ++ ArrayRef RegList; ++ switch (LocVT.SimpleTy) { ++ case MVT::i32: { ++ RegList = RRegList; ++ unsigned RegIdx = State.getFirstUnallocated(RegList.data(), RegList.size()); + +- if (RegResult) { +- for (SmallVectorImpl::iterator It = PendingHAMembers.begin(); +- It != PendingHAMembers.end(); ++It) { +- It->convertToReg(RegResult); +- State.addLoc(*It); +- ++RegResult; +- } +- PendingHAMembers.clear(); +- return true; +- } ++ // First consume all registers that would give an unaligned object. Whether ++ // we go on stack or in regs, no-one will be using them in future. ++ unsigned RegAlign = RoundUpToAlignment(Align, 4) / 4; ++ while (RegIdx % RegAlign != 0 && RegIdx < RegList.size()) ++ State.AllocateReg(RegList[RegIdx++]); + +- // Register allocation failed, fall back to the stack ++ break; ++ } ++ case MVT::f32: ++ RegList = SRegList; ++ break; ++ case MVT::f64: ++ RegList = DRegList; ++ break; ++ case MVT::v2f64: ++ RegList = QRegList; ++ break; ++ default: ++ llvm_unreachable("Unexpected member type for block aggregate"); ++ break; ++ } + +- // Mark all VFP regs as unavailable (AAPCS rule C.2.vfp) +- for (unsigned regNo = 0; regNo < 16; ++regNo) +- State.AllocateReg(SRegList[regNo]); ++ unsigned RegResult = State.AllocateRegBlock(RegList, PendingMembers.size()); ++ if (RegResult) { ++ for (SmallVectorImpl::iterator It = PendingMembers.begin(); ++ It != PendingMembers.end(); ++It) { ++ It->convertToReg(RegResult); ++ State.addLoc(*It); ++ ++RegResult; ++ } ++ PendingMembers.clear(); ++ return true; ++ } + +- unsigned Size = LocVT.getSizeInBits() / 8; +- unsigned Align = std::min(Size, 8U); ++ // Register allocation failed, we'll be needing the stack ++ unsigned Size = LocVT.getSizeInBits() / 8; ++ if (LocVT == MVT::i32 && State.getNextStackOffset() == 0) { ++ // If nothing else has used the stack until this point, a non-HFA aggregate ++ // can be split between regs and stack. ++ unsigned RegIdx = State.getFirstUnallocated(RegList.data(), RegList.size()); ++ for (auto &It : PendingMembers) { ++ if (RegIdx >= RegList.size()) ++ It.convertToMem(State.AllocateStack(Size, Size)); ++ else ++ It.convertToReg(State.AllocateReg(RegList[RegIdx++])); + +- for (auto It : PendingHAMembers) { +- It.convertToMem(State.AllocateStack(Size, Align)); + State.addLoc(It); + } ++ PendingMembers.clear(); ++ return true; ++ } else if (LocVT != MVT::i32) ++ RegList = SRegList; + +- // All pending members have now been allocated +- PendingHAMembers.clear(); ++ // Mark all regs as unavailable (AAPCS rule C.2.vfp for VFP, C.6 for core) ++ for (auto Reg : RegList) ++ State.AllocateReg(Reg); ++ ++ for (auto &It : PendingMembers) { ++ It.convertToMem(State.AllocateStack(Size, Align)); ++ State.addLoc(It); ++ ++ // After the first item has been allocated, the rest are packed as tightly ++ // as possible. (E.g. an incoming i64 would have starting Align of 8, but ++ // we'll be allocating a bunch of i32 slots). ++ Align = Size; + } + +- // This will be allocated by the last member of the HA ++ // All pending members have now been allocated ++ PendingMembers.clear(); ++ ++ // This will be allocated by the last member of the aggregate + return true; + } + +Index: lib/Target/ARM/ARMCallingConv.td +=================================================================== +--- lib/Target/ARM/ARMCallingConv.td ++++ lib/Target/ARM/ARMCallingConv.td +@@ -175,7 +175,7 @@ def CC_ARM_AAPCS_VFP : CallingConv<[ + CCIfType<[v2i64, v4i32, v8i16, v16i8, v4f32], CCBitConvertToType>, + + // HFAs are passed in a contiguous block of registers, or on the stack +- CCIfConsecutiveRegs>, ++ CCIfConsecutiveRegs>, + + CCIfType<[v2f64], CCAssignToReg<[Q0, Q1, Q2, Q3]>>, + CCIfType<[f64], CCAssignToReg<[D0, D1, D2, D3, D4, D5, D6, D7]>>, +Index: lib/Target/ARM/ARMISelLowering.cpp +=================================================================== +--- lib/Target/ARM/ARMISelLowering.cpp ++++ lib/Target/ARM/ARMISelLowering.cpp +@@ -11280,7 +11280,9 @@ static bool isHomogeneousAggregate(Type *Ty, HABas + return (Members > 0 && Members <= 4); + } + +-/// \brief Return true if a type is an AAPCS-VFP homogeneous aggregate. ++/// \brief Return true if a type is an AAPCS-VFP homogeneous aggregate or one of ++/// [N x i32] or [N x i64]. This allows front-ends to skip emitting padding when ++/// passing according to AAPCS rules. + bool ARMTargetLowering::functionArgumentNeedsConsecutiveRegisters( + Type *Ty, CallingConv::ID CallConv, bool isVarArg) const { + if (getEffectiveCallingConv(CallConv, isVarArg) != +@@ -11289,7 +11291,9 @@ bool ARMTargetLowering::functionArgumentNeedsConse + + HABaseType Base = HA_UNKNOWN; + uint64_t Members = 0; +- bool result = isHomogeneousAggregate(Ty, Base, Members); +- DEBUG(dbgs() << "isHA: " << result << " "; Ty->dump()); +- return result; ++ bool IsHA = isHomogeneousAggregate(Ty, Base, Members); ++ DEBUG(dbgs() << "isHA: " << IsHA << " "; Ty->dump()); ++ ++ bool IsIntArray = Ty->isArrayTy() && Ty->getArrayElementType()->isIntegerTy(); ++ return IsHA || IsIntArray; + } +Index: test/CodeGen/ARM/aggregate-padding.ll +=================================================================== +--- test/CodeGen/ARM/aggregate-padding.ll ++++ test/CodeGen/ARM/aggregate-padding.ll +@@ -0,0 +1,101 @@ ++; RUN: llc -mtriple=armv7-linux-gnueabihf %s -o - | FileCheck %s ++ ++; [2 x i64] should be contiguous when split (e.g. we shouldn't try to align all ++; i32 components to 64 bits). Also makes sure i64 based types are properly ++; aligned on the stack. ++define i64 @test_i64_contiguous_on_stack([8 x double], float, i32 %in, [2 x i64] %arg) nounwind { ++; CHECK-LABEL: test_i64_contiguous_on_stack: ++; CHECK-DAG: ldr [[LO0:r[0-9]+]], [sp, #8] ++; CHECK-DAG: ldr [[HI0:r[0-9]+]], [sp, #12] ++; CHECK-DAG: ldr [[LO1:r[0-9]+]], [sp, #16] ++; CHECK-DAG: ldr [[HI1:r[0-9]+]], [sp, #20] ++; CHECK: adds r0, [[LO0]], [[LO1]] ++; CHECK: adc r1, [[HI0]], [[HI1]] ++ ++ %val1 = extractvalue [2 x i64] %arg, 0 ++ %val2 = extractvalue [2 x i64] %arg, 1 ++ %sum = add i64 %val1, %val2 ++ ret i64 %sum ++} ++ ++; [2 x i64] should try to use looks for 4 regs, not 8 (which might happen if the ++; i64 -> i32, i32 split wasn't handled correctly). ++define i64 @test_2xi64_uses_4_regs([8 x double], float, [2 x i64] %arg) nounwind { ++; CHECK-LABEL: test_2xi64_uses_4_regs: ++; CHECK-DAG: mov r0, r2 ++; CHECK-DAG: mov r1, r3 ++ ++ %val = extractvalue [2 x i64] %arg, 1 ++ ret i64 %val ++} ++ ++; An aggregate should be able to split between registers and stack if there is ++; nothing else on the stack. ++define i32 @test_aggregates_split([8 x double], i32, [4 x i32] %arg) nounwind { ++; CHECK-LABEL: test_aggregates_split: ++; CHECK: ldr [[VAL3:r[0-9]+]], [sp] ++; CHECK: add r0, r1, [[VAL3]] ++ ++ %val0 = extractvalue [4 x i32] %arg, 0 ++ %val3 = extractvalue [4 x i32] %arg, 3 ++ %sum = add i32 %val0, %val3 ++ ret i32 %sum ++} ++ ++; If an aggregate has to be moved entirely onto the stack, nothing should be ++; able to use r0-r3 any more. Also checks that [2 x i64] properly aligned when ++; it uses regs. ++define i32 @test_no_int_backfilling([8 x double], float, i32, [2 x i64], i32 %arg) nounwind { ++; CHECK-LABEL: test_no_int_backfilling: ++; CHECK: ldr r0, [sp, #24] ++ ret i32 %arg ++} ++ ++; Even if the argument was successfully allocated as reg block, there should be ++; no backfillig to r1. ++define i32 @test_no_int_backfilling_regsonly(i32, [1 x i64], i32 %arg) { ++; CHECK-LABEL: test_no_int_backfilling_regsonly: ++; CHECK: ldr r0, [sp] ++ ret i32 %arg ++} ++ ++; If an aggregate has to be moved entirely onto the stack, nothing should be ++; able to use r0-r3 any more. ++define float @test_no_float_backfilling([7 x double], [4 x i32], i32, [4 x double], float %arg) nounwind { ++; CHECK-LABEL: test_no_float_backfilling: ++; CHECK: vldr s0, [sp, #40] ++ ret float %arg ++} ++ ++; They're a bit pointless, but types like [N x i8] should work as well. ++define i8 @test_i8_in_regs(i32, [3 x i8] %arg) { ++; CHECK-LABEL: test_i8_in_regs: ++; CHECK: add r0, r1, r3 ++ %val0 = extractvalue [3 x i8] %arg, 0 ++ %val2 = extractvalue [3 x i8] %arg, 2 ++ %sum = add i8 %val0, %val2 ++ ret i8 %sum ++} ++ ++define i16 @test_i16_split(i32, i32, [3 x i16] %arg) { ++; CHECK-LABEL: test_i16_split: ++; CHECK: ldrh [[VAL2:r[0-9]+]], [sp] ++; CHECK: add r0, r2, [[VAL2]] ++ %val0 = extractvalue [3 x i16] %arg, 0 ++ %val2 = extractvalue [3 x i16] %arg, 2 ++ %sum = add i16 %val0, %val2 ++ ret i16 %sum ++} ++ ++; Beware: on the stack each i16 still gets a 32-bit slot, the array is not ++; packed. ++define i16 @test_i16_forced_stack([8 x double], double, i32, i32, [3 x i16] %arg) { ++; CHECK-LABEL: test_i16_forced_stack: ++; CHECK-DAG: ldrh [[VAL0:r[0-9]+]], [sp, #8] ++; CHECK-DAG: ldrh [[VAL2:r[0-9]+]], [sp, #16] ++; CHECK: add r0, [[VAL0]], [[VAL2]] ++ %val0 = extractvalue [3 x i16] %arg, 0 ++ %val2 = extractvalue [3 x i16] %arg, 2 ++ %sum = add i16 %val0, %val2 ++ ret i16 %sum ++} From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 22:42:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1779D649; Mon, 23 Mar 2015 22:42:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED2B6A25; Mon, 23 Mar 2015 22:42:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NMghqx049649; Mon, 23 Mar 2015 22:42:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NMghoP049646; Mon, 23 Mar 2015 22:42:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503232242.t2NMghoP049646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 23 Mar 2015 22:42:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280402 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 22:42:44 -0000 Author: ian Date: Mon Mar 23 22:42:42 2015 New Revision: 280402 URL: https://svnweb.freebsd.org/changeset/base/280402 Log: Do not save/restore the TLS pointer on context switch for armv6. The pointer cannot be changed directly by userland code on armv6 (it can be on armv4), so there's no need to save/restore. Submitted by: Michal Meloun Modified: head/sys/arm/arm/swtch.S head/sys/arm/arm/sys_machdep.c head/sys/arm/arm/vm_machdep.c Modified: head/sys/arm/arm/swtch.S ============================================================================== --- head/sys/arm/arm/swtch.S Mon Mar 23 21:15:07 2015 (r280401) +++ head/sys/arm/arm/swtch.S Mon Mar 23 22:42:42 2015 (r280402) @@ -255,7 +255,7 @@ ENTRY(cpu_switch) mov r4, r0 /* Save the old thread. */ #ifdef ARM_TP_ADDRESS - /* Store the old tp */ + /* Store the old tp; userland can change it on armv4. */ ldr r3, =ARM_TP_ADDRESS ldr r9, [r3] str r9, [r0, #(TD_MD + MD_TP)] @@ -272,11 +272,10 @@ ENTRY(cpu_switch) ldr r9, [r1, #(TD_MD + MD_RAS_END)] str r9, [r3, #8] #else - /* Store the old tp */ - mrc p15, 0, r9, c13, c0, 3 - str r9, [r0, #(TD_MD + MD_TP)] - - /* Set the new tp */ + /* + * Set new tp. No need to store the old one first, userland can't + * change it directly on armv6. + */ ldr r9, [r1, #(TD_MD + MD_TP)] mcr p15, 0, r9, c13, c0, 3 #endif Modified: head/sys/arm/arm/sys_machdep.c ============================================================================== --- head/sys/arm/arm/sys_machdep.c Mon Mar 23 21:15:07 2015 (r280401) +++ head/sys/arm/arm/sys_machdep.c Mon Mar 23 22:42:42 2015 (r280402) @@ -84,13 +84,11 @@ static int arm32_set_tp(struct thread *td, void *args) { - if (td != curthread) - td->td_md.md_tp = (register_t)args; - else + td->td_md.md_tp = (register_t)args; #ifndef ARM_TP_ADDRESS - set_tls(args); + set_tls(args); #else - *(register_t *)ARM_TP_ADDRESS = (register_t)args; + *(register_t *)ARM_TP_ADDRESS = (register_t)args; #endif return (0); } @@ -99,13 +97,10 @@ static int arm32_get_tp(struct thread *td, void *args) { - if (td != curthread) - td->td_retval[0] = td->td_md.md_tp; - else #ifndef ARM_TP_ADDRESS - td->td_retval[0] = (register_t)get_tls(); + td->td_retval[0] = td->td_md.md_tp; #else - td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS; + td->td_retval[0] = *(register_t *)ARM_TP_ADDRESS; #endif return (0); } Modified: head/sys/arm/arm/vm_machdep.c ============================================================================== --- head/sys/arm/arm/vm_machdep.c Mon Mar 23 21:15:07 2015 (r280401) +++ head/sys/arm/arm/vm_machdep.c Mon Mar 23 22:42:42 2015 (r280402) @@ -145,7 +145,7 @@ cpu_fork(register struct thread *td1, re #ifdef ARM_TP_ADDRESS td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; #else - td2->td_md.md_tp = (register_t) get_tls(); + td2->td_md.md_tp = td1->td_md.md_tp; #endif } @@ -274,7 +274,7 @@ cpu_set_user_tls(struct thread *td, void #ifdef ARM_TP_ADDRESS *(register_t *)ARM_TP_ADDRESS = (register_t)tls_base; #else - set_tls((void *)tls_base); + set_tls(tls_base); #endif critical_exit(); } From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 23:06:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFF10C9; Mon, 23 Mar 2015 23:06:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB4FFCAA; Mon, 23 Mar 2015 23:06:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NN6Xqn059627; Mon, 23 Mar 2015 23:06:33 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NN6Xbi059626; Mon, 23 Mar 2015 23:06:33 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503232306.t2NN6Xbi059626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Mon, 23 Mar 2015 23:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280403 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 23:06:34 -0000 Author: np Date: Mon Mar 23 23:06:32 2015 New Revision: 280403 URL: https://svnweb.freebsd.org/changeset/base/280403 Log: cxgbe(4): Do not call sbuf_trim on an sbuf with a drain function. MFC after: 1 week Modified: head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Mon Mar 23 22:42:42 2015 (r280402) +++ head/sys/dev/cxgbe/t4_main.c Mon Mar 23 23:06:32 2015 (r280403) @@ -5080,13 +5080,16 @@ cxgbe_sysctls(struct port_info *pi) static int sysctl_int_array(SYSCTL_HANDLER_ARGS) { - int rc, *i; + int rc, *i, space = 0; struct sbuf sb; sbuf_new_for_sysctl(&sb, NULL, 64, req); - for (i = arg1; arg2; arg2 -= sizeof(int), i++) - sbuf_printf(&sb, "%d ", *i); - sbuf_trim(&sb); + for (i = arg1; arg2; arg2 -= sizeof(int), i++) { + if (space) + sbuf_printf(&sb, " "); + sbuf_printf(&sb, "%d", *i); + space = 1; + } rc = sbuf_finish(&sb); sbuf_delete(&sb); return (rc); From owner-svn-src-all@FreeBSD.ORG Mon Mar 23 23:34:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 521DE883; Mon, 23 Mar 2015 23:34:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D3D5F63; Mon, 23 Mar 2015 23:34:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2NNYMnk073338; Mon, 23 Mar 2015 23:34:22 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2NNYMt8073337; Mon, 23 Mar 2015 23:34:22 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503232334.t2NNYMt8073337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 23 Mar 2015 23:34:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280404 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Mar 2015 23:34:22 -0000 Author: tuexen Date: Mon Mar 23 23:34:21 2015 New Revision: 280404 URL: https://svnweb.freebsd.org/changeset/base/280404 Log: When an ICMP message is received and the MTU shrinks, only mark outstanding chunks for retransmissions. MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Mon Mar 23 23:06:32 2015 (r280403) +++ head/sys/netinet/sctp_usrreq.c Mon Mar 23 23:34:21 2015 (r280404) @@ -125,21 +125,19 @@ sctp_pathmtu_adjustment(struct sctp_tcb if (chk->sent < SCTP_DATAGRAM_RESEND) { sctp_flight_size_decrease(chk); sctp_total_flight_decrease(stcb, chk); - } - if (chk->sent != SCTP_DATAGRAM_RESEND) { + chk->sent = SCTP_DATAGRAM_RESEND; sctp_ucount_incr(stcb->asoc.sent_queue_retran_cnt); + chk->rec.data.doing_fast_retransmit = 0; + if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { + sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_PMTU, + chk->whoTo->flight_size, + chk->book_size, + (uintptr_t) chk->whoTo, + chk->rec.data.TSN_seq); + } + /* Clear any time so NO RTT is being done */ + chk->do_rtt = 0; } - chk->sent = SCTP_DATAGRAM_RESEND; - chk->rec.data.doing_fast_retransmit = 0; - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_FLIGHT_LOGGING_ENABLE) { - sctp_misc_ints(SCTP_FLIGHT_LOG_DOWN_PMTU, - chk->whoTo->flight_size, - chk->book_size, - (uintptr_t) chk->whoTo, - chk->rec.data.TSN_seq); - } - /* Clear any time so NO RTT is being done */ - chk->do_rtt = 0; } } } From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 00:01:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1504371; Tue, 24 Mar 2015 00:01:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B1F322; Tue, 24 Mar 2015 00:01:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O012GA085021; Tue, 24 Mar 2015 00:01:02 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O010Y8084858; Tue, 24 Mar 2015 00:01:00 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201503240001.t2O010Y8084858@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 24 Mar 2015 00:01:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280405 - in vendor/lua: . dist dist/doc dist/src X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 00:01:02 -0000 Author: rpaulo Date: Tue Mar 24 00:00:59 2015 New Revision: 280405 URL: https://svnweb.freebsd.org/changeset/base/280405 Log: Import lua 5.3.0. Added: vendor/lua/ vendor/lua/dist/ vendor/lua/dist/Makefile (contents, props changed) vendor/lua/dist/README vendor/lua/dist/doc/ vendor/lua/dist/doc/contents.html (contents, props changed) vendor/lua/dist/doc/logo.gif (contents, props changed) vendor/lua/dist/doc/lua.1 (contents, props changed) vendor/lua/dist/doc/lua.css (contents, props changed) vendor/lua/dist/doc/luac.1 (contents, props changed) vendor/lua/dist/doc/manual.css (contents, props changed) vendor/lua/dist/doc/manual.html (contents, props changed) vendor/lua/dist/doc/osi-certified-72x60.png (contents, props changed) vendor/lua/dist/doc/readme.html (contents, props changed) vendor/lua/dist/src/ vendor/lua/dist/src/Makefile (contents, props changed) vendor/lua/dist/src/lapi.c (contents, props changed) vendor/lua/dist/src/lapi.h (contents, props changed) vendor/lua/dist/src/lauxlib.c (contents, props changed) vendor/lua/dist/src/lauxlib.h (contents, props changed) vendor/lua/dist/src/lbaselib.c (contents, props changed) vendor/lua/dist/src/lbitlib.c (contents, props changed) vendor/lua/dist/src/lcode.c (contents, props changed) vendor/lua/dist/src/lcode.h (contents, props changed) vendor/lua/dist/src/lcorolib.c (contents, props changed) vendor/lua/dist/src/lctype.c (contents, props changed) vendor/lua/dist/src/lctype.h (contents, props changed) vendor/lua/dist/src/ldblib.c (contents, props changed) vendor/lua/dist/src/ldebug.c (contents, props changed) vendor/lua/dist/src/ldebug.h (contents, props changed) vendor/lua/dist/src/ldo.c (contents, props changed) vendor/lua/dist/src/ldo.h (contents, props changed) vendor/lua/dist/src/ldump.c (contents, props changed) vendor/lua/dist/src/lfunc.c (contents, props changed) vendor/lua/dist/src/lfunc.h (contents, props changed) vendor/lua/dist/src/lgc.c (contents, props changed) vendor/lua/dist/src/lgc.h (contents, props changed) vendor/lua/dist/src/linit.c (contents, props changed) vendor/lua/dist/src/liolib.c (contents, props changed) vendor/lua/dist/src/llex.c (contents, props changed) vendor/lua/dist/src/llex.h (contents, props changed) vendor/lua/dist/src/llimits.h (contents, props changed) vendor/lua/dist/src/lmathlib.c (contents, props changed) vendor/lua/dist/src/lmem.c (contents, props changed) vendor/lua/dist/src/lmem.h (contents, props changed) vendor/lua/dist/src/loadlib.c (contents, props changed) vendor/lua/dist/src/lobject.c (contents, props changed) vendor/lua/dist/src/lobject.h (contents, props changed) vendor/lua/dist/src/lopcodes.c (contents, props changed) vendor/lua/dist/src/lopcodes.h (contents, props changed) vendor/lua/dist/src/loslib.c (contents, props changed) vendor/lua/dist/src/lparser.c (contents, props changed) vendor/lua/dist/src/lparser.h (contents, props changed) vendor/lua/dist/src/lprefix.h (contents, props changed) vendor/lua/dist/src/lstate.c (contents, props changed) vendor/lua/dist/src/lstate.h (contents, props changed) vendor/lua/dist/src/lstring.c (contents, props changed) vendor/lua/dist/src/lstring.h (contents, props changed) vendor/lua/dist/src/lstrlib.c (contents, props changed) vendor/lua/dist/src/ltable.c (contents, props changed) vendor/lua/dist/src/ltable.h (contents, props changed) vendor/lua/dist/src/ltablib.c (contents, props changed) vendor/lua/dist/src/ltm.c (contents, props changed) vendor/lua/dist/src/ltm.h (contents, props changed) vendor/lua/dist/src/lua.c (contents, props changed) vendor/lua/dist/src/lua.h (contents, props changed) vendor/lua/dist/src/lua.hpp vendor/lua/dist/src/luac.c (contents, props changed) vendor/lua/dist/src/luaconf.h (contents, props changed) vendor/lua/dist/src/lualib.h (contents, props changed) vendor/lua/dist/src/lundump.c (contents, props changed) vendor/lua/dist/src/lundump.h (contents, props changed) vendor/lua/dist/src/lutf8lib.c (contents, props changed) vendor/lua/dist/src/lvm.c (contents, props changed) vendor/lua/dist/src/lvm.h (contents, props changed) vendor/lua/dist/src/lzio.c (contents, props changed) vendor/lua/dist/src/lzio.h (contents, props changed) Added: vendor/lua/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lua/dist/Makefile Tue Mar 24 00:00:59 2015 (r280405) @@ -0,0 +1,114 @@ +# Makefile for installing Lua +# See doc/readme.html for installation and customization instructions. + +# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================= + +# Your platform. See PLATS for possible values. +PLAT= none + +# Where to install. The installation starts in the src and doc directories, +# so take care if INSTALL_TOP is not an absolute path. See the local target. +# You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with +# LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h. +INSTALL_TOP= /usr/local +INSTALL_BIN= $(INSTALL_TOP)/bin +INSTALL_INC= $(INSTALL_TOP)/include +INSTALL_LIB= $(INSTALL_TOP)/lib +INSTALL_MAN= $(INSTALL_TOP)/man/man1 +INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V +INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V + +# How to install. If your install program does not support "-p", then +# you may have to run ranlib on the installed liblua.a. +INSTALL= install -p +INSTALL_EXEC= $(INSTALL) -m 0755 +INSTALL_DATA= $(INSTALL) -m 0644 +# +# If you don't have "install" you can use "cp" instead. +# INSTALL= cp -p +# INSTALL_EXEC= $(INSTALL) +# INSTALL_DATA= $(INSTALL) + +# Other utilities. +MKDIR= mkdir -p +RM= rm -f + +# == END OF USER SETTINGS -- NO NEED TO CHANGE ANYTHING BELOW THIS LINE ======= + +# Convenience platforms targets. +PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + +# What to install. +TO_BIN= lua luac +TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp +TO_LIB= liblua.a +TO_MAN= lua.1 luac.1 + +# Lua version and release. +V= 5.3 +R= $V.0 + +# Targets start here. +all: $(PLAT) + +$(PLATS) clean: + cd src && $(MAKE) $@ + +test: dummy + src/lua -v + +install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) + +uninstall: + cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN) + cd src && cd $(INSTALL_INC) && $(RM) $(TO_INC) + cd src && cd $(INSTALL_LIB) && $(RM) $(TO_LIB) + cd doc && cd $(INSTALL_MAN) && $(RM) $(TO_MAN) + +local: + $(MAKE) install INSTALL_TOP=../install + +none: + @echo "Please do 'make PLATFORM' where PLATFORM is one of these:" + @echo " $(PLATS)" + @echo "See doc/readme.html for complete instructions." + +# make may get confused with test/ and install/ +dummy: + +# echo config parameters +echo: + @cd src && $(MAKE) -s echo + @echo "PLAT= $(PLAT)" + @echo "V= $V" + @echo "R= $R" + @echo "TO_BIN= $(TO_BIN)" + @echo "TO_INC= $(TO_INC)" + @echo "TO_LIB= $(TO_LIB)" + @echo "TO_MAN= $(TO_MAN)" + @echo "INSTALL_TOP= $(INSTALL_TOP)" + @echo "INSTALL_BIN= $(INSTALL_BIN)" + @echo "INSTALL_INC= $(INSTALL_INC)" + @echo "INSTALL_LIB= $(INSTALL_LIB)" + @echo "INSTALL_MAN= $(INSTALL_MAN)" + @echo "INSTALL_LMOD= $(INSTALL_LMOD)" + @echo "INSTALL_CMOD= $(INSTALL_CMOD)" + @echo "INSTALL_EXEC= $(INSTALL_EXEC)" + @echo "INSTALL_DATA= $(INSTALL_DATA)" + +# echo pkg-config data +pc: + @echo "version=$R" + @echo "prefix=$(INSTALL_TOP)" + @echo "libdir=$(INSTALL_LIB)" + @echo "includedir=$(INSTALL_INC)" + +# list targets that do not create files (but not all makes understand .PHONY) +.PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho + +# (end of Makefile) Added: vendor/lua/dist/README ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lua/dist/README Tue Mar 24 00:00:59 2015 (r280405) @@ -0,0 +1,6 @@ + +This is Lua 5.3.0, released on 06 Jan 2015. + +For installation instructions, license details, and +further information about Lua, see doc/readme.html. + Added: vendor/lua/dist/doc/contents.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lua/dist/doc/contents.html Tue Mar 24 00:00:59 2015 (r280405) @@ -0,0 +1,619 @@ + + + +Lua 5.3 Reference Manual - contents + + + + + + + +
+

+ +Lua 5.3 Reference Manual +

+ +

+The reference manual is the official definition of the Lua language. +For a complete introduction to Lua programming, see the book +Programming in Lua. + +

+start +· +contents +· +index +


+ +Copyright © 2015 Lua.org, PUC-Rio. +Freely available under the terms of the +Lua license. + + +

Contents

+ + +

Index

+ + + + + + + +
+

Lua functions

+

+basic
+_G
+_VERSION
+ +assert
+collectgarbage
+dofile
+error
+getmetatable
+ipairs
+load
+loadfile
+next
+pairs
+pcall
+print
+rawequal
+rawget
+rawlen
+rawset
+require
+select
+setmetatable
+tonumber
+tostring
+type
+xpcall
+ +

+coroutine
+coroutine.create
+coroutine.isyieldable
+coroutine.resume
+coroutine.running
+coroutine.status
+coroutine.wrap
+coroutine.yield
+ +

+debug
+debug.debug
+debug.gethook
+debug.getinfo
+debug.getlocal
+debug.getmetatable
+debug.getregistry
+debug.getupvalue
+debug.getuservalue
+debug.sethook
+debug.setlocal
+debug.setmetatable
+debug.setupvalue
+debug.setuservalue
+debug.traceback
+debug.upvalueid
+debug.upvaluejoin
+ +

+io
+io.close
+io.flush
+io.input
+io.lines
+io.open
+io.output
+io.popen
+io.read
+io.stderr
+io.stdin
+io.stdout
+io.tmpfile
+io.type
+io.write
+ +file:close
+file:flush
+file:lines
+file:read
+file:seek
+file:setvbuf
+file:write
+ +

+

 

+

+math
+math.abs
+math.acos
+math.asin
+math.atan
+math.ceil
+math.cos
+math.deg
+math.exp
+math.floor
+math.fmod
+math.huge
+math.log
+math.max
+math.maxinteger
+math.min
+math.mininteger
+math.modf
+math.pi
+math.rad
+math.random
+math.randomseed
+math.sin
+math.sqrt
+math.tan
+math.tointeger
+math.type
+math.ult
+ +

+os
+os.clock
+os.date
+os.difftime
+os.execute
+os.exit
+os.getenv
+os.remove
+os.rename
+os.setlocale
+os.time
+os.tmpname
+ +

+package
+package.config
+package.cpath
+package.loaded
+package.loadlib
+package.path
+package.preload
+package.searchers
+package.searchpath
+ +

+string
+string.byte
+string.char
+string.dump
+string.find
+string.format
+string.gmatch
+string.gsub
+string.len
+string.lower
+string.match
+string.pack
+string.packsize
+string.rep
+string.reverse
+string.sub
+string.unpack
+string.upper
+ +

+table
+table.concat
+table.insert
+table.move
+table.pack
+table.remove
+table.sort
+table.unpack
+ +

+utf8
+utf8.char
+utf8.charpattern
+utf8.codepoint
+utf8.codes
+utf8.len
+utf8.offset
+ +

environment
variables

+LUA_CPATH
+LUA_CPATH_5_3
+LUA_INIT
+LUA_INIT_5_3
+LUA_PATH
+LUA_PATH_5_3
+ +
+

C API

+

+lua_Alloc
+lua_CFunction
+lua_Debug
+lua_Hook
+lua_Integer
+lua_KContext
+lua_KFunction
+lua_Number
+lua_Reader
+lua_State
+lua_Unsigned
+lua_Writer
+ +

+lua_absindex
+lua_arith
+lua_atpanic
+lua_call
+lua_callk
+lua_checkstack
+lua_close
+lua_compare
+lua_concat
+lua_copy
+lua_createtable
+lua_dump
+lua_error
+lua_gc
+lua_getallocf
+lua_getextraspace
+lua_getfield
+lua_getglobal
+lua_gethook
+lua_gethookcount
+lua_gethookmask
+lua_geti
+lua_getinfo
+lua_getlocal
+lua_getmetatable
+lua_getstack
+lua_gettable
+lua_gettop
+lua_getupvalue
+lua_getuservalue
+lua_insert
+lua_isboolean
+lua_iscfunction
+lua_isfunction
+lua_isinteger
+lua_islightuserdata
+lua_isnil
+lua_isnone
+lua_isnoneornil
+lua_isnumber
+lua_isstring
+lua_istable
+lua_isthread
+lua_isuserdata
+lua_isyieldable
+lua_len
+lua_load
+lua_newstate
+lua_newtable
+lua_newthread
+lua_newuserdata
+lua_next
+lua_numbertointeger
+lua_pcall
+lua_pcallk
+lua_pop
+lua_pushboolean
+lua_pushcclosure
+lua_pushcfunction
+lua_pushfstring
+lua_pushglobaltable
+lua_pushinteger
+lua_pushlightuserdata
+lua_pushliteral
+lua_pushlstring
+lua_pushnil
+lua_pushnumber
+lua_pushstring
+lua_pushthread
+lua_pushvalue
+lua_pushvfstring
+lua_rawequal
+lua_rawget
+lua_rawgeti
+lua_rawgetp
+lua_rawlen
+lua_rawset
+lua_rawseti
+lua_rawsetp
+lua_register
+lua_remove
+lua_replace
+lua_resume
+lua_rotate
+lua_setallocf
+lua_setfield
+lua_setglobal
+lua_sethook
+lua_seti
+lua_setlocal
+lua_setmetatable
+lua_settable
+lua_settop
+lua_setupvalue
+lua_setuservalue
+lua_status
+lua_stringtonumber
+lua_toboolean
+lua_tocfunction
+lua_tointeger
+lua_tointegerx
+lua_tolstring
+lua_tonumber
+lua_tonumberx
+lua_topointer
+lua_tostring
+lua_tothread
+lua_touserdata
+lua_type
+lua_typename
+lua_upvalueid
+lua_upvalueindex
+lua_upvaluejoin
+lua_version
+lua_xmove
+lua_yield
+lua_yieldk
+ +

+

auxiliary library

+

+luaL_Buffer
+luaL_Reg
+luaL_Stream
+ +

+luaL_addchar
+luaL_addlstring
+luaL_addsize
+luaL_addstring
+luaL_addvalue
+luaL_argcheck
+luaL_argerror
+luaL_buffinit
+luaL_buffinitsize
+luaL_callmeta
+luaL_checkany
+luaL_checkinteger
+luaL_checklstring
+luaL_checknumber
+luaL_checkoption
+luaL_checkstack
+luaL_checkstring
+luaL_checktype
+luaL_checkudata
+luaL_checkversion
+luaL_dofile
+luaL_dostring
+luaL_error
+luaL_execresult
+luaL_fileresult
+luaL_getmetafield
+luaL_getmetatable
+luaL_getsubtable
+luaL_gsub
+luaL_len
+luaL_loadbuffer
+luaL_loadbufferx
+luaL_loadfile
+luaL_loadfilex
+luaL_loadstring
+luaL_newlib
+luaL_newlibtable
+luaL_newmetatable
+luaL_newstate
+luaL_openlibs
+luaL_optinteger
+luaL_optlstring
+luaL_optnumber
+luaL_optstring
+luaL_prepbuffer
+luaL_prepbuffsize
+luaL_pushresult
+luaL_pushresultsize
+luaL_ref
+luaL_requiref
+luaL_setfuncs
+luaL_setmetatable
+luaL_testudata
+luaL_tolstring
+luaL_traceback
+luaL_typename
+luaL_unref
+luaL_where
+ +

standard library

+

+luaopen_base
+luaopen_coroutine
+luaopen_debug
+luaopen_io
+luaopen_math
+luaopen_os
+luaopen_package
+luaopen_string
+luaopen_table
+luaopen_utf8
+ +

constants

+LUA_ERRERR
+LUA_ERRFILE
+LUA_ERRGCMM
+LUA_ERRMEM
+LUA_ERRRUN
+LUA_ERRSYNTAX
+LUA_HOOKCALL
+LUA_HOOKCOUNT
+LUA_HOOKLINE
+LUA_HOOKRET
+LUA_HOOKTAILCALL
+LUA_MASKCALL
+LUA_MASKCOUNT
+LUA_MASKLINE
+LUA_MASKRET
+LUA_MAXINTEGER
+LUA_MININTEGER
+LUA_MINSTACK
+LUA_MULTRET
+LUA_NOREF
+LUA_OK
+LUA_OPADD
+LUA_OPBAND
+LUA_OPBNOT
+LUA_OPBOR
+LUA_OPBXOR
+LUA_OPDIV
+LUA_OPEQ
+LUA_OPIDIV
+LUA_OPLE
+LUA_OPLT
+LUA_OPMOD
+LUA_OPMUL
+LUA_OPPOW
+LUA_OPSHL
+LUA_OPSHR
+LUA_OPSUB
+LUA_OPUNM
+LUA_REFNIL
+LUA_REGISTRYINDEX
+LUA_RIDX_GLOBALS
+LUA_RIDX_MAINTHREAD
+LUA_TBOOLEAN
+LUA_TFUNCTION
+LUA_TLIGHTUSERDATA
+LUA_TNIL
+LUA_TNONE
+LUA_TNUMBER
+LUA_TSTRING
+LUA_TTABLE
+LUA_TTHREAD
+LUA_TUSERDATA
+LUA_USE_APICHECK
+LUA_YIELD
+LUAL_BUFFERSIZE
+ +
+ +
+ +Last update: +Tue Dec 9 21:26:07 BRST 2014 + + + + + Added: vendor/lua/dist/doc/logo.gif ============================================================================== Binary file. No diff available. Added: vendor/lua/dist/doc/lua.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lua/dist/doc/lua.1 Tue Mar 24 00:00:59 2015 (r280405) @@ -0,0 +1,111 @@ +.TH LUA 1 "$Date: 2014/12/10 15:55:45 $" +.SH NAME +lua \- Lua interpreter +.SH SYNOPSIS +.B lua +[ +.I options +] +[ +.I script +[ +.I args +] +] +.SH DESCRIPTION +.B lua +is the standalone Lua interpreter. +It loads and executes Lua programs, +either in textual source form or +in precompiled binary form. +(Precompiled binaries are output by +.BR luac , +the Lua compiler.) +.B lua +can be used as a batch interpreter and also interactively. +.LP +The given +.I options +are handled in order and then +the Lua program in file +.I script +is loaded and executed. +The given +.I args +are available to +.I script +as strings in a global table named +.BR arg . +If no options or arguments are given, +then +.B "\-v \-i" +is assumed when the standard input is a terminal; +otherwise, +.B "\-" +is assumed. +.LP +In interactive mode, +.B lua +prompts the user, +reads lines from the standard input, +and executes them as they are read. +If the line contains an expression or list of expressions, +then the line is evaluated and the results are printed. +If a line does not contain a complete statement, +then a secondary prompt is displayed and +lines are read until a complete statement is formed or +a syntax error is found. +.LP +At the very start, +before even handling the command line, +.B lua +checks the contents of the environment variables +.B LUA_INIT_5_3 +or +.BR LUA_INIT , +in that order. +If the contents is of the form +.RI '@ filename ', +then +.I filename +is executed. +Otherwise, the string is assumed to be a Lua statement and is executed. +.SH OPTIONS +.TP +.BI \-e " stat" +execute statement +.IR stat . +.TP +.B \-i +enter interactive mode after executing +.IR script . +.TP +.BI \-l " name" +execute the equivalent of +.IB name =require(' name ') +before executing +.IR script . +.TP +.B \-v +show version information. +.TP +.B \-E +ignore environment variables. +.TP +.B \-\- +stop handling options. +.TP +.B \- +stop handling options and execute the standard input as a file. +.SH "SEE ALSO" +.BR luac (1) +.br +The documentation at lua.org, +especially section 7 of the reference manual. +.SH DIAGNOSTICS +Error messages should be self explanatory. +.SH AUTHORS +R. Ierusalimschy, +L. H. de Figueiredo, +W. Celes +.\" EOF Added: vendor/lua/dist/doc/lua.css ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lua/dist/doc/lua.css Tue Mar 24 00:00:59 2015 (r280405) @@ -0,0 +1,105 @@ +html { + background-color: #F8F8F8 ; +} + +body { + border: solid #a0a0a0 1px ; + border-radius: 20px ; + padding: 26px ; + margin: 16px ; + color: #000000 ; + background-color: #FFFFFF ; + font-family: Helvetica, Arial, sans-serif ; + text-align: justify ; +} + +h1, h2, h3, h4 { + font-family: Verdana, Geneva, sans-serif ; + font-weight: normal ; + font-style: normal ; +} + +h2 { + padding-top: 0.4em ; + padding-bottom: 0.4em ; + padding-left: 0.8em ; + padding-right: 0.8em ; + background-color: #D0D0FF ; + border-radius: 8px ; + border: solid #a0a0a0 1px ; +} + +h3 { + padding-left: 0.5em ; + border-left: solid #D0D0FF 1em ; +} + +table h3 { + padding-left: 0px ; + border-left: none ; +} + +a:link { + color: #000080 ; + background-color: inherit ; + text-decoration: none ; +} + +a:visited { + background-color: inherit ; + text-decoration: none ; +} + +a:link:hover, a:visited:hover { + color: #000080 ; + background-color: #D0D0FF ; + border-radius: 4px; +} + +a:link:active, a:visited:active { + color: #FF0000 ; +} + +h1 a img { + vertical-align: text-bottom ; +} + +hr { + border: 0 ; + height: 1px ; + color: #a0a0a0 ; + background-color: #a0a0a0 ; + display: none ; +} + +table hr { + display: block ; +} + +:target { + background-color: #F8F8F8 ; + padding: 8px ; + border: solid #a0a0a0 2px ; + border-radius: 8px ; +} + +.footer { + color: gray ; + font-size: x-small ; +} + +input[type=text] { + border: solid #a0a0a0 2px ; + border-radius: 2em ; + background-image: url('images/search.png') ; + background-repeat: no-repeat ; + background-position: 4px center ; + padding-left: 20px ; + height: 2em ; +} + +pre.session { + background-color: #F8F8F8 ; + padding: 1em ; + border-radius: 8px ; +} Added: vendor/lua/dist/doc/luac.1 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lua/dist/doc/luac.1 Tue Mar 24 00:00:59 2015 (r280405) @@ -0,0 +1,118 @@ +.\" $Id: luac.man,v 1.29 2011/11/16 13:53:40 lhf Exp $ +.TH LUAC 1 "$Date: 2011/11/16 13:53:40 $" +.SH NAME +luac \- Lua compiler +.SH SYNOPSIS +.B luac +[ +.I options +] [ +.I filenames +] +.SH DESCRIPTION +.B luac +is the Lua compiler. +It translates programs written in the Lua programming language +into binary files containing precompiled chunks +that can be later loaded and executed. +.LP +The main advantages of precompiling chunks are: +faster loading, +protecting source code from accidental user changes, +and +off-line syntax checking. +Precompiling does not imply faster execution +because in Lua chunks are always compiled into bytecodes before being executed. +.B luac +simply allows those bytecodes to be saved in a file for later execution. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 00:01:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 739464A4; Tue, 24 Mar 2015 00:01:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4566332B; Tue, 24 Mar 2015 00:01:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O01VMq085590; Tue, 24 Mar 2015 00:01:31 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O01V1T085589; Tue, 24 Mar 2015 00:01:31 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201503240001.t2O01V1T085589@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 24 Mar 2015 00:01:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280406 - vendor/lua/5.3.0 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 00:01:31 -0000 Author: rpaulo Date: Tue Mar 24 00:01:30 2015 New Revision: 280406 URL: https://svnweb.freebsd.org/changeset/base/280406 Log: Tag lua 5.3.0. Added: vendor/lua/5.3.0/ - copied from r280405, vendor/lua/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 00:06:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EBEB761; Tue, 24 Mar 2015 00:06:07 +0000 (UTC) Received: from mail-ig0-x22e.google.com (mail-ig0-x22e.google.com [IPv6:2607:f8b0:4001: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 F3BC435E; Tue, 24 Mar 2015 00:06:03 +0000 (UTC) Received: by igbqf9 with SMTP id qf9so53402007igb.1; Mon, 23 Mar 2015 17:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=G4wszPifR7WmmsnvhTtCV0BMRWPMtBWdQzirBoCXWcc=; b=eh+ZePMIHH2NH6ODxVgTax0OODAF0EapXZvHgyPW/XyzL6QsJVoIz7Q46R9nSSGmsl vhAFq977NzvNj/srpdo7s7X4Ra2CKYUsJyyqIeJ3/+uoZmizwUHQxGl8TMMdKwD7Whi8 IWhXuNq8FL5T/GFOtKfYpptgyW+GZuyxZ48jY3bpwMfnt2Xe/gQuZ0KT+BC7St/F5OXY fZM6VmhpedlQN1BPDLCP3/8eUUA2XzrTXcAuUyJw8qmzdsROiNgboq7I+7elArFvsznJ DQ+tp1uTYRfl8frdNoWfxpvF6PpfmRJ9ZDp41PLdXLCmfcETCXOM4wgSXRT+pTp06qQ6 Jgvw== MIME-Version: 1.0 X-Received: by 10.107.5.131 with SMTP id 125mr2446385iof.88.1427155563385; Mon, 23 Mar 2015 17:06:03 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Mon, 23 Mar 2015 17:06:03 -0700 (PDT) In-Reply-To: <201503240001.t2O01V1T085589@svn.freebsd.org> References: <201503240001.t2O01V1T085589@svn.freebsd.org> Date: Mon, 23 Mar 2015 17:06:03 -0700 X-Google-Sender-Auth: fvHWH9DrYNmo6WS23ZXj2Y6nEhI Message-ID: Subject: Re: svn commit: r280406 - vendor/lua/5.3.0 From: Adrian Chadd To: Rui Paulo Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , svn-src-vendor@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 00:06:07 -0000 [snip] [gets coffee and popcorn] -a From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 00:10:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 967D9904; Tue, 24 Mar 2015 00:10:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8147B393; Tue, 24 Mar 2015 00:10:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O0ACdM089907; Tue, 24 Mar 2015 00:10:12 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O0ACZb089906; Tue, 24 Mar 2015 00:10:12 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201503240010.t2O0ACZb089906@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Tue, 24 Mar 2015 00:10:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280407 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 00:10:12 -0000 Author: mjg Date: Tue Mar 24 00:10:11 2015 New Revision: 280407 URL: https://svnweb.freebsd.org/changeset/base/280407 Log: filedesc: microoptimize fget_unlocked by getting rid of fd < 0 branch Casting fd to an unsigned type simplifies fd range coparison to mere checking if the result is bigger than the table. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Mar 24 00:01:30 2015 (r280406) +++ head/sys/kern/kern_descrip.c Tue Mar 24 00:10:11 2015 (r280407) @@ -2342,7 +2342,7 @@ fget_unlocked(struct filedesc *fdp, int #endif fdt = fdp->fd_files; - if (fd < 0 || fd >= fdt->fdt_nfiles) + if ((u_int)fd >= fdt->fdt_nfiles) return (EBADF); /* * Fetch the descriptor locklessly. We avoid fdrop() races by From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 01:31:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0BE4D6B; Tue, 24 Mar 2015 01:31:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA8B8DA3; Tue, 24 Mar 2015 01:31:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O1V31W028012; Tue, 24 Mar 2015 01:31:03 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O1V3ne028011; Tue, 24 Mar 2015 01:31:03 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503240131.t2O1V3ne028011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 24 Mar 2015 01:31: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: r280408 - stable/10/usr.bin/grep X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 01:31:03 -0000 Author: pfg Date: Tue Mar 24 01:31:02 2015 New Revision: 280408 URL: https://svnweb.freebsd.org/changeset/base/280408 Log: MFC r280307: bsdgrep: fix regression in the -f option since r268799 Caused by an incomplete merge from NetBSD. PR: 198725 Modified: stable/10/usr.bin/grep/grep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/grep/grep.c ============================================================================== --- stable/10/usr.bin/grep/grep.c Tue Mar 24 00:10:11 2015 (r280407) +++ stable/10/usr.bin/grep/grep.c Tue Mar 24 01:31:02 2015 (r280408) @@ -316,7 +316,7 @@ read_patterns(const char *fn) len = 0; line = NULL; while ((rlen = getline(&line, &len, f)) != -1) - add_pattern(line, line[0] == '\n' ? 0 : len); + add_pattern(line, line[0] == '\n' ? 0 : (size_t)rlen); free(line); if (ferror(f)) err(2, "%s", fn); From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 01:32:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD67EEC7; Tue, 24 Mar 2015 01:32:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96EC6E43; Tue, 24 Mar 2015 01:32:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O1Wlwm031071; Tue, 24 Mar 2015 01:32:47 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O1WlqN031070; Tue, 24 Mar 2015 01:32:47 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503240132.t2O1WlqN031070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 24 Mar 2015 01:32:47 +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: r280409 - stable/9/usr.bin/grep X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 01:32:47 -0000 Author: pfg Date: Tue Mar 24 01:32:46 2015 New Revision: 280409 URL: https://svnweb.freebsd.org/changeset/base/280409 Log: MFC r280307: bsdgrep: fix regression in the -f option since r268799 Caused by an incomplete merge from NetBSD. PR: 198725 Modified: stable/9/usr.bin/grep/grep.c Directory Properties: stable/9/usr.bin/grep/ (props changed) Modified: stable/9/usr.bin/grep/grep.c ============================================================================== --- stable/9/usr.bin/grep/grep.c Tue Mar 24 01:31:02 2015 (r280408) +++ stable/9/usr.bin/grep/grep.c Tue Mar 24 01:32:46 2015 (r280409) @@ -315,7 +315,7 @@ read_patterns(const char *fn) len = 0; line = NULL; while ((rlen = getline(&line, &len, f)) != -1) - add_pattern(line, line[0] == '\n' ? 0 : len); + add_pattern(line, line[0] == '\n' ? 0 : (size_t)rlen); free(line); if (ferror(f)) err(2, "%s", fn); From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 02:15:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0D90692; Tue, 24 Mar 2015 02:15:33 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtp002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72BE4250; Tue, 24 Mar 2015 02:15:33 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NLP00HPQ29B9H00@st11p02mm-asmtp002.mac.com>; Tue, 24 Mar 2015 02:15:14 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-03-23_05:2015-03-23,2015-03-23,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1503240021 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r278479 - in head: etc sys/kern From: Rui Paulo In-reply-to: <20150323010836.GC6798@dft-labs.eu> Date: Mon, 23 Mar 2015 19:15:11 -0700 Content-transfer-encoding: quoted-printable Message-id: <7FC385F3-9E5E-444D-BA2C-4364E2D46656@me.com> References: <201502092313.t19NDpoS083043@svn.freebsd.org> <20150323010836.GC6798@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 02:15:33 -0000 On Mar 22, 2015, at 18:08, Mateusz Guzik wrote: >=20 > On Mon, Feb 09, 2015 at 11:13:51PM +0000, Rui Paulo wrote: >> Author: rpaulo >> Date: Mon Feb 9 23:13:50 2015 >> New Revision: 278479 >> URL: https://svnweb.freebsd.org/changeset/base/278479 >>=20 >> Log: >> Notify devd(8) when a process crashed. >>=20 >> This change implements a notification (via devctl) to userland when >> the kernel produces coredumps after a process has crashed. >> devd can then run a specific command to produce a human readable = crash >> report. The command is most usually a helper that runs gdb/lldb >> commands on the file/coredump pair. It's possible to use this >> functionality for implementing automatic generation of crash = reports. >>=20 >> devd(8) will be notified of the full path of the binary that crashed = and >> the full path of the coredump file. >>=20 >=20 > The more I look at this the more I'm convinced this is quite insecure. >=20 > At a minimum this should also grow a flag to decide whether = notification > about jailed process crashes are allowed. Off by default. >=20 > As it is you pass a path leading to a jail, but that's inherently > untrusted and will lead to trouble. We got sidetracked by the devd-bloat discussion, but I can turn this off = until a better approach is programmed.=20 -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 02:17:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AAA583B; Tue, 24 Mar 2015 02:17:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54BDC27C; Tue, 24 Mar 2015 02:17:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O2HHKJ052652; Tue, 24 Mar 2015 02:17:17 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O2HHgU052651; Tue, 24 Mar 2015 02:17:17 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201503240217.t2O2HHgU052651@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 24 Mar 2015 02:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280410 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 02:17:18 -0000 Author: rpaulo Date: Tue Mar 24 02:17:17 2015 New Revision: 280410 URL: https://svnweb.freebsd.org/changeset/base/280410 Log: Disable coredump_devctl because it could lead to leaking paths to jails. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Mar 24 01:32:46 2015 (r280409) +++ head/sys/kern/kern_sig.c Tue Mar 24 02:17:17 2015 (r280410) @@ -180,7 +180,7 @@ static int set_core_nodump_flag = 0; SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, 0, "Enable setting the NODUMP flag on coredump files"); -static int coredump_devctl = 1; +static int coredump_devctl = 0; SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, &coredump_devctl, 0, "Generate a devctl notification when processes coredump"); From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 02:25:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D433B49 for ; Tue, 24 Mar 2015 02:25:20 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 01719385 for ; Tue, 24 Mar 2015 02:25:20 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O2PJom091001 for ; Tue, 24 Mar 2015 02:25:19 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2O2PJd3090996 for svn-src-all@freebsd.org; Tue, 24 Mar 2015 02:25:19 GMT (envelope-from bdrewery) Received: (qmail 21888 invoked from network); 23 Mar 2015 21:25:18 -0500 Received: from unknown (HELO blah) (freebsd@shatow.net@10.10.1.90) by sweb.xzibition.com with ESMTPA; 23 Mar 2015 21:25:18 -0500 Message-ID: <5510CB0E.5010208@FreeBSD.org> Date: Mon, 23 Mar 2015 21:25:18 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Rui Paulo , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280410 - head/sys/kern References: <201503240217.t2O2HHgU052651@svn.freebsd.org> In-Reply-To: <201503240217.t2O2HHgU052651@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 02:25:20 -0000 On 3/23/15 9:17 PM, Rui Paulo wrote: > Author: rpaulo > Date: Tue Mar 24 02:17:17 2015 > New Revision: 280410 > URL: https://svnweb.freebsd.org/changeset/base/280410 > > Log: > Disable coredump_devctl because it could lead to leaking paths to > jails. > > Modified: > head/sys/kern/kern_sig.c > > Modified: head/sys/kern/kern_sig.c > ============================================================================== > --- head/sys/kern/kern_sig.c Tue Mar 24 01:32:46 2015 (r280409) > +++ head/sys/kern/kern_sig.c Tue Mar 24 02:17:17 2015 (r280410) > @@ -180,7 +180,7 @@ static int set_core_nodump_flag = 0; > SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, > 0, "Enable setting the NODUMP flag on coredump files"); > > -static int coredump_devctl = 1; > +static int coredump_devctl = 0; > SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, &coredump_devctl, > 0, "Generate a devctl notification when processes coredump"); > > If there is a security concern about this feature I think more needs to be done than just flipping the default. It could easily be forgotten about and make a release. -- Regards, Bryan Drewery From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 02:35:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86330D09; Tue, 24 Mar 2015 02:35:47 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58F95658; Tue, 24 Mar 2015 02:35:47 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NLP00LO837I0E40@st11p02mm-asmtp001.mac.com>; Tue, 24 Mar 2015 02:35:45 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-03-23_05:2015-03-23,2015-03-23,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1503240024 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280410 - head/sys/kern From: Rui Paulo In-reply-to: <5510CB0E.5010208@FreeBSD.org> Date: Mon, 23 Mar 2015 19:35:42 -0700 Content-transfer-encoding: quoted-printable Message-id: <29715C14-0AC2-43A2-A718-E89AC3C57AC0@me.com> References: <201503240217.t2O2HHgU052651@svn.freebsd.org> <5510CB0E.5010208@FreeBSD.org> To: Bryan Drewery X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 02:35:47 -0000 On Mar 23, 2015, at 19:25, Bryan Drewery wrote: >=20 > On 3/23/15 9:17 PM, Rui Paulo wrote: >> Author: rpaulo >> Date: Tue Mar 24 02:17:17 2015 >> New Revision: 280410 >> URL: https://svnweb.freebsd.org/changeset/base/280410 >>=20 >> Log: >> Disable coredump_devctl because it could lead to leaking paths to >> jails. >>=20 >> Modified: >> head/sys/kern/kern_sig.c >>=20 >> Modified: head/sys/kern/kern_sig.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/kern/kern_sig.c Tue Mar 24 01:32:46 2015 = (r280409) >> +++ head/sys/kern/kern_sig.c Tue Mar 24 02:17:17 2015 = (r280410) >> @@ -180,7 +180,7 @@ static int set_core_nodump_flag =3D 0; >> SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, = &set_core_nodump_flag, >> 0, "Enable setting the NODUMP flag on coredump files"); >>=20 >> -static int coredump_devctl =3D 1; >> +static int coredump_devctl =3D 0; >> SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, = &coredump_devctl, >> 0, "Generate a devctl notification when processes coredump"); >>=20 >>=20 >=20 > If there is a security concern about this feature I think more needs = to be done than just flipping the default. It could easily be forgotten = about and make a release. Sure, but to be honest there are already sysctls that make your system = insecure and we've been making releases with them for many years. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 02:47:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36A98F39 for ; Tue, 24 Mar 2015 02:47:15 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 F183C7B0 for ; Tue, 24 Mar 2015 02:47:14 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O2lEZ1097782 for ; Tue, 24 Mar 2015 02:47:14 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2O2lEDL097779 for svn-src-all@freebsd.org; Tue, 24 Mar 2015 02:47:14 GMT (envelope-from bdrewery) Received: (qmail 5717 invoked from network); 23 Mar 2015 21:47:11 -0500 Received: from unknown (HELO blah) (freebsd@shatow.net@10.10.1.90) by sweb.xzibition.com with ESMTPA; 23 Mar 2015 21:47:11 -0500 Message-ID: <5510D02F.2080007@FreeBSD.org> Date: Mon, 23 Mar 2015 21:47:11 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Rui Paulo Subject: Re: svn commit: r280410 - head/sys/kern References: <201503240217.t2O2HHgU052651@svn.freebsd.org> <5510CB0E.5010208@FreeBSD.org> <29715C14-0AC2-43A2-A718-E89AC3C57AC0@me.com> In-Reply-To: <29715C14-0AC2-43A2-A718-E89AC3C57AC0@me.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 02:47:15 -0000 On 3/23/15 9:35 PM, Rui Paulo wrote: > On Mar 23, 2015, at 19:25, Bryan Drewery wrote: >> >> On 3/23/15 9:17 PM, Rui Paulo wrote: >>> Author: rpaulo >>> Date: Tue Mar 24 02:17:17 2015 >>> New Revision: 280410 >>> URL: https://svnweb.freebsd.org/changeset/base/280410 >>> >>> Log: >>> Disable coredump_devctl because it could lead to leaking paths to >>> jails. >>> >>> Modified: >>> head/sys/kern/kern_sig.c >>> >>> Modified: head/sys/kern/kern_sig.c >>> ============================================================================== >>> --- head/sys/kern/kern_sig.c Tue Mar 24 01:32:46 2015 (r280409) >>> +++ head/sys/kern/kern_sig.c Tue Mar 24 02:17:17 2015 (r280410) >>> @@ -180,7 +180,7 @@ static int set_core_nodump_flag = 0; >>> SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, >>> 0, "Enable setting the NODUMP flag on coredump files"); >>> >>> -static int coredump_devctl = 1; >>> +static int coredump_devctl = 0; >>> SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, &coredump_devctl, >>> 0, "Generate a devctl notification when processes coredump"); >>> >>> >> >> If there is a security concern about this feature I think more needs to be done than just flipping the default. It could easily be forgotten about and make a release. > > Sure, but to be honest there are already sysctls that make your system insecure and we've been making releases with them for many years. > > -- > Rui Paulo > I just think the known issue should be documented at the least. -- Regards, Bryan Drewery From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 04:58:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C79E82AD; Tue, 24 Mar 2015 04:58:20 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 142767D6; Tue, 24 Mar 2015 04:58:20 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 44209781235; Tue, 24 Mar 2015 15:58:15 +1100 (AEDT) Date: Tue, 24 Mar 2015 15:58:14 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik Subject: Re: svn commit: r280407 - head/sys/kern In-Reply-To: <201503240010.t2O0ACZb089906@svn.freebsd.org> Message-ID: <20150324135350.N1665@besplex.bde.org> References: <201503240010.t2O0ACZb089906@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=7mZd-1maibRHfPAOe-sA:9 a=XooPTRC4dljZ9avz:21 a=AhD2TEE5LKyrGx4Z:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 04:58:21 -0000 On Tue, 24 Mar 2015, Mateusz Guzik wrote: > Log: > filedesc: microoptimize fget_unlocked by getting rid of fd < 0 branch This has no effect. Compilers optimize to the equivalent of the the unsigned cast hack if this is good. On x86, it is good since no instructions are needed for the conversion, and the only difference between the code generated by if (fd >= fdt->fdt_nfiles) and if (fd < 0 || fd >= fdt->fdt_nfiles) is to change from jl (jump if less than) to jb (jump if below) (both jumps over the if clause). Negative values satisfy jl but not jb. > Casting fd to an unsigned type simplifies fd range coparison to mere checking > if the result is bigger than the table. No, it obfuscates the range comparison. On some arches, conversion to unsigned is slow. Then compilers should optimize in the opposite direction by first undoing the bogus cast to get back to the range check and then optimizing the range check using the best strategy. Compilers should probably first undo the bogus cast even on x86, so as to reduce to the range check case. Range checks are more important and more uniform than bogus casts, so they are more likely to be optimized. Similarly if fd has type u_int to begin with. (Grosser forms of the obfuscation do this. The gross forms are still common :-(. The first one in syscalls.master is "u_int fd" for dup(). But this doesn't even survive as far as do_dup(), since sys_dup() explicitly converts to int. The conversions are: - the arg "int fd" is type-punned to "u_int fd" in the args struct - uap->fd is cast to before passing it to do_dup(). dup2() is similar. The first one in syscalls.master that uses the obfuscation is getgroups() or perhaps getlogin(). The conversions and obfuscations for getgroups are: - the arg "int gidsetlen" is type-punned to "u_int gidsetsize" in the args struct. This also converts the name to a worse one. The arg gives the number of elements, not a length or a size - uap->gidsetsize is compared with a maximum value. This depends on it being u_int to reject negative values. - uap->gidsetsize passed is without a cast to copyout(). It becomes a size_t. This conversion cannot overflow for the checked value even if uap->gidsetsize has the correct type (int), but an explicit cast might be needed to avoid compiler warnings then (sys_dup() does such a cast). copyout() has related naming problems. Its count arg is 'named' len. bcopy() and memcpy()'s count arg is also named 'len' in FreeBSD, but in C99 and POSIX memcpy()'s count arg is just named 'n'. > Modified: head/sys/kern/kern_descrip.c > ============================================================================== > --- head/sys/kern/kern_descrip.c Tue Mar 24 00:01:30 2015 (r280406) > +++ head/sys/kern/kern_descrip.c Tue Mar 24 00:10:11 2015 (r280407) > @@ -2342,7 +2342,7 @@ fget_unlocked(struct filedesc *fdp, int > #endif > > fdt = fdp->fd_files; > - if (fd < 0 || fd >= fdt->fdt_nfiles) > + if ((u_int)fd >= fdt->fdt_nfiles) > return (EBADF); > /* > * Fetch the descriptor locklessly. We avoid fdrop() races by This undoes the changes that removed the obfuscation. Many commits were involved: - 4.4BSD-Lite1 uses the obfuscation in a modification of the above form, with "u_int" spelled in non-BSD style as "unsigned" for at least most of fcntl(), close(), compat_43_fstat(), fstat(), fpathconf(), flock() and dupfdopen(). - 4.4BSD-Lite2 fixed the style bug, so that these functions used the obfuscation in exactly the above form - FreeBSD never merged these changes from Lite2 - dupfd_open() apparently had the BSD spelling in Lite1, so FreeBSD-2+ always had that. jhb committed my change to unobfuscate dupfd_open() in 2002. - I apparently missed half of the obfuscations with the "unsigned" spelling. But half of them were moved into _fget(), fget() or fget_locked(). - early in 2002, the obfuscation was in _fget() in exactly the above form. _fget() far too large for an inline function, but was static inline in kern_descrip.c. - a little later in 2002, the obfuscated part of _fget() and a little more was turned into fget_locked(). fget_locked() was not too large for an inline function, and was static inline in filedesc.h. But this change turned the obfuscation into nonsense. It added the explicit check for the lower bound, but kept the bogus cast. - I asked the committer to fix this, but my instructions were apparently too tl;dr (maybe 1/4 as long as this mail), and the result was less than reversion to the previous obfuscated version -- it was that plus, plus another bogus cast to u_int (the second one has no effect not already given by the first one), and a comment documenting the obfuscation. The comment takes about 4 times as much source code as the unobfuscated version. - I fixed this in 2004. The unobfuscated version is slightly shorter then the version with the doubled bogus cast, even without the comment. - this version of fget_locked() survived until at least FreeBSD-9, but in recent versions its style regressed in other ways. It expanded from 2 lines of statements to 6 to add 1 assert statement and 3 lines with style bugs (2 extra blank lines and one loss of use of a conditional expression). - fget_locked() seems to be unchanged recently, so it doesn't have the obfuscation. fget_unlocked() is newer than the unobfuscated version of fget_locked(). It is in a different file, but may have copied the unobfuscated range check from fget_locked(). This commit restores the obfuscation to it alone. There are now some other range checks in kern_desc.c that are missing the obfuscation: grepping for "fd <" gives: - a magic treatment for negative fd's in closefrom() - the range check in an unobfuscated by confusing form in fdisused(). The check has to be inverted since it is in a KASSERT(), and the inversion is done by reversing the inequalities. - similarly in fdalloc(). I used to use this hack a lot 30 years ago, but stopped when compilers got better 20-25 years ago. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 05:50:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA3AD24; Tue, 24 Mar 2015 05:50:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C12C5C83; Tue, 24 Mar 2015 05:50:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O5oAhx051275; Tue, 24 Mar 2015 05:50:10 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O5o8lQ051263; Tue, 24 Mar 2015 05:50:08 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240550.t2O5o8lQ051263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 05:50:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280411 - vendor/tzdata/dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 05:50:11 -0000 Author: edwin Date: Tue Mar 24 05:50:07 2015 New Revision: 280411 URL: https://svnweb.freebsd.org/changeset/base/280411 Log: Vendor import of tzdata2015b: Release 2015b - 2015-03-19 23:28:11 -0700 Changes affecting future time stamps Mongolia will start observing DST again this year, from the last Saturday in March at 02:00 to the last Saturday in September at 00:00. (Thanks to Ganbold Tsagaankhuu.) Palestine will start DST on March 28, not March 27. Also, correct the fall 2014 transition from September 26 to October 24. Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) Changes affecting past time stamps The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a regression. (Thanks to Stuart Bishop for reporting the problem.) Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. Changes affecting time zone abbreviations Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". (Thanks to Hank W.) Obtained from: ftp://ftp.iana.org/tz/releases/ Modified: vendor/tzdata/dist/asia vendor/tzdata/dist/australasia vendor/tzdata/dist/europe vendor/tzdata/dist/leap-seconds.list vendor/tzdata/dist/northamerica vendor/tzdata/dist/southamerica Modified: vendor/tzdata/dist/asia ============================================================================== --- vendor/tzdata/dist/asia Tue Mar 24 02:17:17 2015 (r280410) +++ vendor/tzdata/dist/asia Tue Mar 24 05:50:07 2015 (r280411) @@ -1904,6 +1904,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # this is almost surely wrong. +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 only - Oct 1 0:00 0 - @@ -1924,6 +1931,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta @@ -2342,13 +2351,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # official source...: # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 -# From Paul Eggert (2013-09-24): -# For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 00:00. This is consistent with -# the predictions in today's editions of the following URLs, -# which are for Gaza and Hebron respectively: -# http://www.timeanddate.com/worldclock/timezone.html?n=702 -# http://www.timeanddate.com/worldclock/timezone.html?n=2364 +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2374,9 +2389,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1 Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - -Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S Rule Palestine 2012 only - Sep 21 1:00 0 - -Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: vendor/tzdata/dist/australasia ============================================================================== --- vendor/tzdata/dist/australasia Tue Mar 24 02:17:17 2015 (r280410) +++ vendor/tzdata/dist/australasia Tue Mar 24 05:50:07 2015 (r280411) @@ -373,6 +373,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 D 9:39:00 - LMT 1901 # Agana 10:00 - GST 2000 Dec 23 # Guam 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -388,12 +389,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 14:00 - LINT # N Mariana Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31 - 9:43:00 - LMT 1901 - 9:00 - MPT 1969 Oct # N Mariana Is Time - 10:00 - MPT 2000 Dec 23 - 10:00 - ChST # Chamorro Standard Time +# See Pacific/Guam. # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -563,6 +559,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - NST 1967 Apr # N=Nome -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands # Samoa (formerly and also known as Western Samoa) @@ -744,23 +741,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # uninhabited # Midway -# -# From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] -# reproduced a Pan American Airways timetable from 1936, for their weekly -# "Orient Express" flights between San Francisco and Manila, and connecting -# flights to Chicago and the US East Coast. As it uses some time zone -# designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. -# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " -# -Zone Pacific/Midway -11:49:28 - LMT 1901 - -11:00 - NST 1956 Jun 3 - -11:00 1:00 NDT 1956 Sep 2 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +# See Pacific/Pago_Pago. # Palmyra # uninhabited since World War II; was probably like Pacific/Kiritimati Modified: vendor/tzdata/dist/europe ============================================================================== --- vendor/tzdata/dist/europe Tue Mar 24 02:17:17 2015 (r280410) +++ vendor/tzdata/dist/europe Tue Mar 24 05:50:07 2015 (r280411) @@ -2400,7 +2400,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 192 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 3:00 Russia VOL%sT 1991 Mar 31 2:00s 4:00 - VOLT 1992 Mar 29 2:00s - 3:00 Russia MSK 2011 Mar 27 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s 4:00 - MSK 2014 Oct 26 2:00s 3:00 - MSK Modified: vendor/tzdata/dist/leap-seconds.list ============================================================================== --- vendor/tzdata/dist/leap-seconds.list Tue Mar 24 02:17:17 2015 (r280410) +++ vendor/tzdata/dist/leap-seconds.list Tue Mar 24 05:50:07 2015 (r280411) @@ -131,10 +131,10 @@ # over the last few minutes of the day. The frequency of the local # clock is decreased (or increased) to realize the positive (or # negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# defintion of UTC. +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. # # Questions or comments to: # Judah Levine Modified: vendor/tzdata/dist/northamerica ============================================================================== --- vendor/tzdata/dist/northamerica Tue Mar 24 02:17:17 2015 (r280410) +++ vendor/tzdata/dist/northamerica Tue Mar 24 05:50:07 2015 (r280411) @@ -2312,8 +2312,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # "...the new time zone will come into effect at two o'clock on the first Sunday # of February, when we will have to advance the clock one hour from its current # time..." -# # Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D @@ -2508,13 +2524,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT ############################################################################### # Anguilla -# See America/Port_of_Spain. - # Antigua and Barbuda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 - -5:00 - EST 1951 - -4:00 - AST +# See America/Port_of_Spain. # Bahamas # @@ -2581,10 +2592,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 193 -4:00 US A%sT # Cayman Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST +# See America/Panama. # Costa Rica @@ -3107,6 +3115,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. Modified: vendor/tzdata/dist/southamerica ============================================================================== --- vendor/tzdata/dist/southamerica Tue Mar 24 02:17:17 2015 (r280410) +++ vendor/tzdata/dist/southamerica Tue Mar 24 05:50:07 2015 (r280411) @@ -1206,10 +1206,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf -# From Juan Correa (2015-01-28): -# ... today the Ministry of Energy announced that Chile will drop DST, will keep -# "summer time" (UTC -3 / UTC -5) all year round.... -# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1268,7 +1271,7 @@ Zone America/Santiago -4:42:46 - LMT 189 -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u -5:00 - EAST # @@ -1603,6 +1606,7 @@ Zone America/Port_of_Spain -4:06:04 - LM # These all agree with Trinidad and Tobago since 1970. Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Guadeloupe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 05:50:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A70D5E4A; Tue, 24 Mar 2015 05:50:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7892BC89; Tue, 24 Mar 2015 05:50:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O5oelK051975; Tue, 24 Mar 2015 05:50:40 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O5oeAK051974; Tue, 24 Mar 2015 05:50:40 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240550.t2O5oeAK051974@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 05:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280412 - vendor/tzdata/tzdata2015b X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 05:50:40 -0000 Author: edwin Date: Tue Mar 24 05:50:39 2015 New Revision: 280412 URL: https://svnweb.freebsd.org/changeset/base/280412 Log: Tag of tzdata 2015b Added: vendor/tzdata/tzdata2015b/ - copied from r280411, vendor/tzdata/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 05:52:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 612ABF80; Tue, 24 Mar 2015 05:52:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 42334D2D; Tue, 24 Mar 2015 05:52:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O5qVnb055013; Tue, 24 Mar 2015 05:52:31 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O5qTsV055002; Tue, 24 Mar 2015 05:52:29 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240552.t2O5qTsV055002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 05:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280413 - head/contrib/tzdata X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 05:52:31 -0000 Author: edwin Date: Tue Mar 24 05:52:28 2015 New Revision: 280413 URL: https://svnweb.freebsd.org/changeset/base/280413 Log: MFV of 280411,tzdata{2015b} Release 2015b - 2015-03-19 23:28:11 -0700 Changes affecting future time stamps Mongolia will start observing DST again this year, from the last Saturday in March at 02:00 to the last Saturday in September at 00:00. (Thanks to Ganbold Tsagaankhuu.) Palestine will start DST on March 28, not March 27. Also, correct the fall 2014 transition from September 26 to October 24. Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) Changes affecting past time stamps The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a regression. (Thanks to Stuart Bishop for reporting the problem.) Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. Changes affecting time zone abbreviations Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". (Thanks to Hank W.) Modified: head/contrib/tzdata/asia head/contrib/tzdata/australasia head/contrib/tzdata/europe head/contrib/tzdata/leap-seconds.list head/contrib/tzdata/northamerica head/contrib/tzdata/southamerica Directory Properties: head/contrib/tzdata/ (props changed) Modified: head/contrib/tzdata/asia ============================================================================== --- head/contrib/tzdata/asia Tue Mar 24 05:50:39 2015 (r280412) +++ head/contrib/tzdata/asia Tue Mar 24 05:52:28 2015 (r280413) @@ -1904,6 +1904,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # this is almost surely wrong. +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 only - Oct 1 0:00 0 - @@ -1924,6 +1931,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta @@ -2342,13 +2351,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # official source...: # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 -# From Paul Eggert (2013-09-24): -# For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 00:00. This is consistent with -# the predictions in today's editions of the following URLs, -# which are for Gaza and Hebron respectively: -# http://www.timeanddate.com/worldclock/timezone.html?n=702 -# http://www.timeanddate.com/worldclock/timezone.html?n=2364 +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2374,9 +2389,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1 Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - -Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S Rule Palestine 2012 only - Sep 21 1:00 0 - -Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: head/contrib/tzdata/australasia ============================================================================== --- head/contrib/tzdata/australasia Tue Mar 24 05:50:39 2015 (r280412) +++ head/contrib/tzdata/australasia Tue Mar 24 05:52:28 2015 (r280413) @@ -373,6 +373,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 D 9:39:00 - LMT 1901 # Agana 10:00 - GST 2000 Dec 23 # Guam 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -388,12 +389,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 14:00 - LINT # N Mariana Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31 - 9:43:00 - LMT 1901 - 9:00 - MPT 1969 Oct # N Mariana Is Time - 10:00 - MPT 2000 Dec 23 - 10:00 - ChST # Chamorro Standard Time +# See Pacific/Guam. # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -563,6 +559,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - NST 1967 Apr # N=Nome -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands # Samoa (formerly and also known as Western Samoa) @@ -744,23 +741,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # uninhabited # Midway -# -# From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] -# reproduced a Pan American Airways timetable from 1936, for their weekly -# "Orient Express" flights between San Francisco and Manila, and connecting -# flights to Chicago and the US East Coast. As it uses some time zone -# designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. -# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " -# -Zone Pacific/Midway -11:49:28 - LMT 1901 - -11:00 - NST 1956 Jun 3 - -11:00 1:00 NDT 1956 Sep 2 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +# See Pacific/Pago_Pago. # Palmyra # uninhabited since World War II; was probably like Pacific/Kiritimati Modified: head/contrib/tzdata/europe ============================================================================== --- head/contrib/tzdata/europe Tue Mar 24 05:50:39 2015 (r280412) +++ head/contrib/tzdata/europe Tue Mar 24 05:52:28 2015 (r280413) @@ -2400,7 +2400,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 192 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 3:00 Russia VOL%sT 1991 Mar 31 2:00s 4:00 - VOLT 1992 Mar 29 2:00s - 3:00 Russia MSK 2011 Mar 27 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s 4:00 - MSK 2014 Oct 26 2:00s 3:00 - MSK Modified: head/contrib/tzdata/leap-seconds.list ============================================================================== --- head/contrib/tzdata/leap-seconds.list Tue Mar 24 05:50:39 2015 (r280412) +++ head/contrib/tzdata/leap-seconds.list Tue Mar 24 05:52:28 2015 (r280413) @@ -131,10 +131,10 @@ # over the last few minutes of the day. The frequency of the local # clock is decreased (or increased) to realize the positive (or # negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# defintion of UTC. +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. # # Questions or comments to: # Judah Levine Modified: head/contrib/tzdata/northamerica ============================================================================== --- head/contrib/tzdata/northamerica Tue Mar 24 05:50:39 2015 (r280412) +++ head/contrib/tzdata/northamerica Tue Mar 24 05:52:28 2015 (r280413) @@ -2312,8 +2312,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # "...the new time zone will come into effect at two o'clock on the first Sunday # of February, when we will have to advance the clock one hour from its current # time..." -# # Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D @@ -2508,13 +2524,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT ############################################################################### # Anguilla -# See America/Port_of_Spain. - # Antigua and Barbuda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 - -5:00 - EST 1951 - -4:00 - AST +# See America/Port_of_Spain. # Bahamas # @@ -2581,10 +2592,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 193 -4:00 US A%sT # Cayman Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST +# See America/Panama. # Costa Rica @@ -3107,6 +3115,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. Modified: head/contrib/tzdata/southamerica ============================================================================== --- head/contrib/tzdata/southamerica Tue Mar 24 05:50:39 2015 (r280412) +++ head/contrib/tzdata/southamerica Tue Mar 24 05:52:28 2015 (r280413) @@ -1206,10 +1206,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf -# From Juan Correa (2015-01-28): -# ... today the Ministry of Energy announced that Chile will drop DST, will keep -# "summer time" (UTC -3 / UTC -5) all year round.... -# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1268,7 +1271,7 @@ Zone America/Santiago -4:42:46 - LMT 189 -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u -5:00 - EAST # @@ -1603,6 +1606,7 @@ Zone America/Port_of_Spain -4:06:04 - LM # These all agree with Trinidad and Tobago since 1970. Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Guadeloupe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 06:05:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 701811E6; Tue, 24 Mar 2015 06:05:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50CFCE10; Tue, 24 Mar 2015 06:05:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O65sk1060327; Tue, 24 Mar 2015 06:05:54 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O65r9k060321; Tue, 24 Mar 2015 06:05:53 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240605.t2O65r9k060321@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 06:05:52 +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: r280414 - stable/10/contrib/tzdata X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 06:05:55 -0000 Author: edwin Date: Tue Mar 24 06:05:52 2015 New Revision: 280414 URL: https://svnweb.freebsd.org/changeset/base/280414 Log: MFC of 280413,tzdata10: Release 2015b - 2015-03-19 23:28:11 -0700 Changes affecting future time stamps Mongolia will start observing DST again this year, from the last Saturday in March at 02:00 to the last Saturday in September at 00:00. (Thanks to Ganbold Tsagaankhuu.) Palestine will start DST on March 28, not March 27. Also, correct the fall 2014 transition from September 26 to October 24. Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) Changes affecting past time stamps The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a regression. (Thanks to Stuart Bishop for reporting the problem.) Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. Changes affecting time zone abbreviations Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". (Thanks to Hank W.) Modified: stable/10/contrib/tzdata/asia stable/10/contrib/tzdata/australasia stable/10/contrib/tzdata/europe stable/10/contrib/tzdata/leap-seconds.list stable/10/contrib/tzdata/northamerica stable/10/contrib/tzdata/southamerica Modified: stable/10/contrib/tzdata/asia ============================================================================== --- stable/10/contrib/tzdata/asia Tue Mar 24 05:52:28 2015 (r280413) +++ stable/10/contrib/tzdata/asia Tue Mar 24 06:05:52 2015 (r280414) @@ -1904,6 +1904,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # this is almost surely wrong. +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 only - Oct 1 0:00 0 - @@ -1924,6 +1931,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta @@ -2342,13 +2351,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # official source...: # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 -# From Paul Eggert (2013-09-24): -# For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 00:00. This is consistent with -# the predictions in today's editions of the following URLs, -# which are for Gaza and Hebron respectively: -# http://www.timeanddate.com/worldclock/timezone.html?n=702 -# http://www.timeanddate.com/worldclock/timezone.html?n=2364 +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2374,9 +2389,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1 Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - -Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S Rule Palestine 2012 only - Sep 21 1:00 0 - -Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: stable/10/contrib/tzdata/australasia ============================================================================== --- stable/10/contrib/tzdata/australasia Tue Mar 24 05:52:28 2015 (r280413) +++ stable/10/contrib/tzdata/australasia Tue Mar 24 06:05:52 2015 (r280414) @@ -373,6 +373,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 D 9:39:00 - LMT 1901 # Agana 10:00 - GST 2000 Dec 23 # Guam 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -388,12 +389,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 14:00 - LINT # N Mariana Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31 - 9:43:00 - LMT 1901 - 9:00 - MPT 1969 Oct # N Mariana Is Time - 10:00 - MPT 2000 Dec 23 - 10:00 - ChST # Chamorro Standard Time +# See Pacific/Guam. # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -563,6 +559,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - NST 1967 Apr # N=Nome -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands # Samoa (formerly and also known as Western Samoa) @@ -744,23 +741,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # uninhabited # Midway -# -# From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] -# reproduced a Pan American Airways timetable from 1936, for their weekly -# "Orient Express" flights between San Francisco and Manila, and connecting -# flights to Chicago and the US East Coast. As it uses some time zone -# designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. -# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " -# -Zone Pacific/Midway -11:49:28 - LMT 1901 - -11:00 - NST 1956 Jun 3 - -11:00 1:00 NDT 1956 Sep 2 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +# See Pacific/Pago_Pago. # Palmyra # uninhabited since World War II; was probably like Pacific/Kiritimati Modified: stable/10/contrib/tzdata/europe ============================================================================== --- stable/10/contrib/tzdata/europe Tue Mar 24 05:52:28 2015 (r280413) +++ stable/10/contrib/tzdata/europe Tue Mar 24 06:05:52 2015 (r280414) @@ -2400,7 +2400,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 192 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 3:00 Russia VOL%sT 1991 Mar 31 2:00s 4:00 - VOLT 1992 Mar 29 2:00s - 3:00 Russia MSK 2011 Mar 27 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s 4:00 - MSK 2014 Oct 26 2:00s 3:00 - MSK Modified: stable/10/contrib/tzdata/leap-seconds.list ============================================================================== --- stable/10/contrib/tzdata/leap-seconds.list Tue Mar 24 05:52:28 2015 (r280413) +++ stable/10/contrib/tzdata/leap-seconds.list Tue Mar 24 06:05:52 2015 (r280414) @@ -131,10 +131,10 @@ # over the last few minutes of the day. The frequency of the local # clock is decreased (or increased) to realize the positive (or # negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# defintion of UTC. +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. # # Questions or comments to: # Judah Levine Modified: stable/10/contrib/tzdata/northamerica ============================================================================== --- stable/10/contrib/tzdata/northamerica Tue Mar 24 05:52:28 2015 (r280413) +++ stable/10/contrib/tzdata/northamerica Tue Mar 24 06:05:52 2015 (r280414) @@ -2312,8 +2312,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # "...the new time zone will come into effect at two o'clock on the first Sunday # of February, when we will have to advance the clock one hour from its current # time..." -# # Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D @@ -2508,13 +2524,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT ############################################################################### # Anguilla -# See America/Port_of_Spain. - # Antigua and Barbuda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 - -5:00 - EST 1951 - -4:00 - AST +# See America/Port_of_Spain. # Bahamas # @@ -2581,10 +2592,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 193 -4:00 US A%sT # Cayman Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST +# See America/Panama. # Costa Rica @@ -3107,6 +3115,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. Modified: stable/10/contrib/tzdata/southamerica ============================================================================== --- stable/10/contrib/tzdata/southamerica Tue Mar 24 05:52:28 2015 (r280413) +++ stable/10/contrib/tzdata/southamerica Tue Mar 24 06:05:52 2015 (r280414) @@ -1206,10 +1206,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf -# From Juan Correa (2015-01-28): -# ... today the Ministry of Energy announced that Chile will drop DST, will keep -# "summer time" (UTC -3 / UTC -5) all year round.... -# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1268,7 +1271,7 @@ Zone America/Santiago -4:42:46 - LMT 189 -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u -5:00 - EAST # @@ -1603,6 +1606,7 @@ Zone America/Port_of_Spain -4:06:04 - LM # These all agree with Trinidad and Tobago since 1970. Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Guadeloupe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 06:09:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12DC233D; Tue, 24 Mar 2015 06:09:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7803E29; Tue, 24 Mar 2015 06:09:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O697AC060782; Tue, 24 Mar 2015 06:09:07 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O695qK060771; Tue, 24 Mar 2015 06:09:05 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240609.t2O695qK060771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 06:09:05 +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: r280415 - stable/9/contrib/tzdata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 06:09:08 -0000 Author: edwin Date: Tue Mar 24 06:09:04 2015 New Revision: 280415 URL: https://svnweb.freebsd.org/changeset/base/280415 Log: MFC of 280413,tzdata9: Release 2015b - 2015-03-19 23:28:11 -0700 Changes affecting future time stamps Mongolia will start observing DST again this year, from the last Saturday in March at 02:00 to the last Saturday in September at 00:00. (Thanks to Ganbold Tsagaankhuu.) Palestine will start DST on March 28, not March 27. Also, correct the fall 2014 transition from September 26 to October 24. Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) Changes affecting past time stamps The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a regression. (Thanks to Stuart Bishop for reporting the problem.) Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. Changes affecting time zone abbreviations Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". (Thanks to Hank W.) Modified: stable/9/contrib/tzdata/asia stable/9/contrib/tzdata/australasia stable/9/contrib/tzdata/europe stable/9/contrib/tzdata/leap-seconds.list stable/9/contrib/tzdata/northamerica stable/9/contrib/tzdata/southamerica Directory Properties: stable/9/contrib/tzdata/ (props changed) Modified: stable/9/contrib/tzdata/asia ============================================================================== --- stable/9/contrib/tzdata/asia Tue Mar 24 06:05:52 2015 (r280414) +++ stable/9/contrib/tzdata/asia Tue Mar 24 06:09:04 2015 (r280415) @@ -1904,6 +1904,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # this is almost surely wrong. +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 only - Oct 1 0:00 0 - @@ -1924,6 +1931,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta @@ -2342,13 +2351,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # official source...: # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 -# From Paul Eggert (2013-09-24): -# For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 00:00. This is consistent with -# the predictions in today's editions of the following URLs, -# which are for Gaza and Hebron respectively: -# http://www.timeanddate.com/worldclock/timezone.html?n=702 -# http://www.timeanddate.com/worldclock/timezone.html?n=2364 +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2374,9 +2389,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1 Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - -Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S Rule Palestine 2012 only - Sep 21 1:00 0 - -Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: stable/9/contrib/tzdata/australasia ============================================================================== --- stable/9/contrib/tzdata/australasia Tue Mar 24 06:05:52 2015 (r280414) +++ stable/9/contrib/tzdata/australasia Tue Mar 24 06:09:04 2015 (r280415) @@ -373,6 +373,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 D 9:39:00 - LMT 1901 # Agana 10:00 - GST 2000 Dec 23 # Guam 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -388,12 +389,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 14:00 - LINT # N Mariana Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31 - 9:43:00 - LMT 1901 - 9:00 - MPT 1969 Oct # N Mariana Is Time - 10:00 - MPT 2000 Dec 23 - 10:00 - ChST # Chamorro Standard Time +# See Pacific/Guam. # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -563,6 +559,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - NST 1967 Apr # N=Nome -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands # Samoa (formerly and also known as Western Samoa) @@ -744,23 +741,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # uninhabited # Midway -# -# From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] -# reproduced a Pan American Airways timetable from 1936, for their weekly -# "Orient Express" flights between San Francisco and Manila, and connecting -# flights to Chicago and the US East Coast. As it uses some time zone -# designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. -# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " -# -Zone Pacific/Midway -11:49:28 - LMT 1901 - -11:00 - NST 1956 Jun 3 - -11:00 1:00 NDT 1956 Sep 2 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +# See Pacific/Pago_Pago. # Palmyra # uninhabited since World War II; was probably like Pacific/Kiritimati Modified: stable/9/contrib/tzdata/europe ============================================================================== --- stable/9/contrib/tzdata/europe Tue Mar 24 06:05:52 2015 (r280414) +++ stable/9/contrib/tzdata/europe Tue Mar 24 06:09:04 2015 (r280415) @@ -2400,7 +2400,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 192 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 3:00 Russia VOL%sT 1991 Mar 31 2:00s 4:00 - VOLT 1992 Mar 29 2:00s - 3:00 Russia MSK 2011 Mar 27 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s 4:00 - MSK 2014 Oct 26 2:00s 3:00 - MSK Modified: stable/9/contrib/tzdata/leap-seconds.list ============================================================================== --- stable/9/contrib/tzdata/leap-seconds.list Tue Mar 24 06:05:52 2015 (r280414) +++ stable/9/contrib/tzdata/leap-seconds.list Tue Mar 24 06:09:04 2015 (r280415) @@ -131,10 +131,10 @@ # over the last few minutes of the day. The frequency of the local # clock is decreased (or increased) to realize the positive (or # negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# defintion of UTC. +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. # # Questions or comments to: # Judah Levine Modified: stable/9/contrib/tzdata/northamerica ============================================================================== --- stable/9/contrib/tzdata/northamerica Tue Mar 24 06:05:52 2015 (r280414) +++ stable/9/contrib/tzdata/northamerica Tue Mar 24 06:09:04 2015 (r280415) @@ -2312,8 +2312,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # "...the new time zone will come into effect at two o'clock on the first Sunday # of February, when we will have to advance the clock one hour from its current # time..." -# # Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D @@ -2508,13 +2524,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT ############################################################################### # Anguilla -# See America/Port_of_Spain. - # Antigua and Barbuda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 - -5:00 - EST 1951 - -4:00 - AST +# See America/Port_of_Spain. # Bahamas # @@ -2581,10 +2592,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 193 -4:00 US A%sT # Cayman Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST +# See America/Panama. # Costa Rica @@ -3107,6 +3115,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. Modified: stable/9/contrib/tzdata/southamerica ============================================================================== --- stable/9/contrib/tzdata/southamerica Tue Mar 24 06:05:52 2015 (r280414) +++ stable/9/contrib/tzdata/southamerica Tue Mar 24 06:09:04 2015 (r280415) @@ -1206,10 +1206,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf -# From Juan Correa (2015-01-28): -# ... today the Ministry of Energy announced that Chile will drop DST, will keep -# "summer time" (UTC -3 / UTC -5) all year round.... -# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1268,7 +1271,7 @@ Zone America/Santiago -4:42:46 - LMT 189 -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u -5:00 - EAST # @@ -1603,6 +1606,7 @@ Zone America/Port_of_Spain -4:06:04 - LM # These all agree with Trinidad and Tobago since 1970. Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Guadeloupe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 06:11:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0401E60E; Tue, 24 Mar 2015 06:11:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D93A4E3A; Tue, 24 Mar 2015 06:11:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O6BNEp064108; Tue, 24 Mar 2015 06:11:23 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O6BLmI064099; Tue, 24 Mar 2015 06:11:21 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240611.t2O6BLmI064099@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 06:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r280416 - stable/8/share/zoneinfo X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 06:11:24 -0000 Author: edwin Date: Tue Mar 24 06:11:20 2015 New Revision: 280416 URL: https://svnweb.freebsd.org/changeset/base/280416 Log: MFC of 280413,tzdata8: Release 2015b - 2015-03-19 23:28:11 -0700 Changes affecting future time stamps Mongolia will start observing DST again this year, from the last Saturday in March at 02:00 to the last Saturday in September at 00:00. (Thanks to Ganbold Tsagaankhuu.) Palestine will start DST on March 28, not March 27. Also, correct the fall 2014 transition from September 26 to October 24. Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) Changes affecting past time stamps The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a regression. (Thanks to Stuart Bishop for reporting the problem.) Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. Changes affecting time zone abbreviations Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". (Thanks to Hank W.) Modified: stable/8/share/zoneinfo/asia stable/8/share/zoneinfo/australasia stable/8/share/zoneinfo/europe stable/8/share/zoneinfo/leap-seconds.list stable/8/share/zoneinfo/northamerica stable/8/share/zoneinfo/southamerica Directory Properties: stable/8/share/zoneinfo/ (props changed) Modified: stable/8/share/zoneinfo/asia ============================================================================== --- stable/8/share/zoneinfo/asia Tue Mar 24 06:09:04 2015 (r280415) +++ stable/8/share/zoneinfo/asia Tue Mar 24 06:11:20 2015 (r280416) @@ -1904,6 +1904,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # this is almost surely wrong. +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 only - Oct 1 0:00 0 - @@ -1924,6 +1931,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta @@ -2342,13 +2351,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # official source...: # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 -# From Paul Eggert (2013-09-24): -# For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 00:00. This is consistent with -# the predictions in today's editions of the following URLs, -# which are for Gaza and Hebron respectively: -# http://www.timeanddate.com/worldclock/timezone.html?n=702 -# http://www.timeanddate.com/worldclock/timezone.html?n=2364 +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2374,9 +2389,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1 Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - -Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S Rule Palestine 2012 only - Sep 21 1:00 0 - -Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: stable/8/share/zoneinfo/australasia ============================================================================== --- stable/8/share/zoneinfo/australasia Tue Mar 24 06:09:04 2015 (r280415) +++ stable/8/share/zoneinfo/australasia Tue Mar 24 06:11:20 2015 (r280416) @@ -373,6 +373,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 D 9:39:00 - LMT 1901 # Agana 10:00 - GST 2000 Dec 23 # Guam 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -388,12 +389,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 14:00 - LINT # N Mariana Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31 - 9:43:00 - LMT 1901 - 9:00 - MPT 1969 Oct # N Mariana Is Time - 10:00 - MPT 2000 Dec 23 - 10:00 - ChST # Chamorro Standard Time +# See Pacific/Guam. # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -563,6 +559,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - NST 1967 Apr # N=Nome -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands # Samoa (formerly and also known as Western Samoa) @@ -744,23 +741,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # uninhabited # Midway -# -# From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] -# reproduced a Pan American Airways timetable from 1936, for their weekly -# "Orient Express" flights between San Francisco and Manila, and connecting -# flights to Chicago and the US East Coast. As it uses some time zone -# designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. -# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " -# -Zone Pacific/Midway -11:49:28 - LMT 1901 - -11:00 - NST 1956 Jun 3 - -11:00 1:00 NDT 1956 Sep 2 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +# See Pacific/Pago_Pago. # Palmyra # uninhabited since World War II; was probably like Pacific/Kiritimati Modified: stable/8/share/zoneinfo/europe ============================================================================== --- stable/8/share/zoneinfo/europe Tue Mar 24 06:09:04 2015 (r280415) +++ stable/8/share/zoneinfo/europe Tue Mar 24 06:11:20 2015 (r280416) @@ -2400,7 +2400,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 192 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 3:00 Russia VOL%sT 1991 Mar 31 2:00s 4:00 - VOLT 1992 Mar 29 2:00s - 3:00 Russia MSK 2011 Mar 27 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s 4:00 - MSK 2014 Oct 26 2:00s 3:00 - MSK Modified: stable/8/share/zoneinfo/leap-seconds.list ============================================================================== --- stable/8/share/zoneinfo/leap-seconds.list Tue Mar 24 06:09:04 2015 (r280415) +++ stable/8/share/zoneinfo/leap-seconds.list Tue Mar 24 06:11:20 2015 (r280416) @@ -131,10 +131,10 @@ # over the last few minutes of the day. The frequency of the local # clock is decreased (or increased) to realize the positive (or # negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# defintion of UTC. +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. # # Questions or comments to: # Judah Levine Modified: stable/8/share/zoneinfo/northamerica ============================================================================== --- stable/8/share/zoneinfo/northamerica Tue Mar 24 06:09:04 2015 (r280415) +++ stable/8/share/zoneinfo/northamerica Tue Mar 24 06:11:20 2015 (r280416) @@ -2312,8 +2312,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # "...the new time zone will come into effect at two o'clock on the first Sunday # of February, when we will have to advance the clock one hour from its current # time..." -# # Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D @@ -2508,13 +2524,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT ############################################################################### # Anguilla -# See America/Port_of_Spain. - # Antigua and Barbuda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 - -5:00 - EST 1951 - -4:00 - AST +# See America/Port_of_Spain. # Bahamas # @@ -2581,10 +2592,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 193 -4:00 US A%sT # Cayman Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST +# See America/Panama. # Costa Rica @@ -3107,6 +3115,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. Modified: stable/8/share/zoneinfo/southamerica ============================================================================== --- stable/8/share/zoneinfo/southamerica Tue Mar 24 06:09:04 2015 (r280415) +++ stable/8/share/zoneinfo/southamerica Tue Mar 24 06:11:20 2015 (r280416) @@ -1206,10 +1206,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf -# From Juan Correa (2015-01-28): -# ... today the Ministry of Energy announced that Chile will drop DST, will keep -# "summer time" (UTC -3 / UTC -5) all year round.... -# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1268,7 +1271,7 @@ Zone America/Santiago -4:42:46 - LMT 189 -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u -5:00 - EAST # @@ -1603,6 +1606,7 @@ Zone America/Port_of_Spain -4:06:04 - LM # These all agree with Trinidad and Tobago since 1970. Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Guadeloupe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 06:13:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 215C1751; Tue, 24 Mar 2015 06:13:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02C1CED8; Tue, 24 Mar 2015 06:13:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O6D21A064841; Tue, 24 Mar 2015 06:13:02 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O6D0jO064830; Tue, 24 Mar 2015 06:13:00 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240613.t2O6D0jO064830@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 06:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r280417 - stable/7/share/zoneinfo X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 06:13:03 -0000 Author: edwin Date: Tue Mar 24 06:12:59 2015 New Revision: 280417 URL: https://svnweb.freebsd.org/changeset/base/280417 Log: MFC of 280413,tzdata7: Release 2015b - 2015-03-19 23:28:11 -0700 Changes affecting future time stamps Mongolia will start observing DST again this year, from the last Saturday in March at 02:00 to the last Saturday in September at 00:00. (Thanks to Ganbold Tsagaankhuu.) Palestine will start DST on March 28, not March 27. Also, correct the fall 2014 transition from September 26 to October 24. Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) Changes affecting past time stamps The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a regression. (Thanks to Stuart Bishop for reporting the problem.) Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. Changes affecting time zone abbreviations Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". (Thanks to Hank W.) Modified: stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/australasia stable/7/share/zoneinfo/europe stable/7/share/zoneinfo/leap-seconds.list stable/7/share/zoneinfo/northamerica stable/7/share/zoneinfo/southamerica Directory Properties: stable/7/share/zoneinfo/ (props changed) Modified: stable/7/share/zoneinfo/asia ============================================================================== --- stable/7/share/zoneinfo/asia Tue Mar 24 06:11:20 2015 (r280416) +++ stable/7/share/zoneinfo/asia Tue Mar 24 06:12:59 2015 (r280417) @@ -1904,6 +1904,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # this is almost surely wrong. +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 only - Oct 1 0:00 0 - @@ -1924,6 +1931,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta @@ -2342,13 +2351,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # official source...: # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 -# From Paul Eggert (2013-09-24): -# For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 00:00. This is consistent with -# the predictions in today's editions of the following URLs, -# which are for Gaza and Hebron respectively: -# http://www.timeanddate.com/worldclock/timezone.html?n=702 -# http://www.timeanddate.com/worldclock/timezone.html?n=2364 +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2374,9 +2389,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1 Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - -Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S Rule Palestine 2012 only - Sep 21 1:00 0 - -Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: stable/7/share/zoneinfo/australasia ============================================================================== --- stable/7/share/zoneinfo/australasia Tue Mar 24 06:11:20 2015 (r280416) +++ stable/7/share/zoneinfo/australasia Tue Mar 24 06:12:59 2015 (r280417) @@ -373,6 +373,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 D 9:39:00 - LMT 1901 # Agana 10:00 - GST 2000 Dec 23 # Guam 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -388,12 +389,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 14:00 - LINT # N Mariana Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31 - 9:43:00 - LMT 1901 - 9:00 - MPT 1969 Oct # N Mariana Is Time - 10:00 - MPT 2000 Dec 23 - 10:00 - ChST # Chamorro Standard Time +# See Pacific/Guam. # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -563,6 +559,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - NST 1967 Apr # N=Nome -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands # Samoa (formerly and also known as Western Samoa) @@ -744,23 +741,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # uninhabited # Midway -# -# From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] -# reproduced a Pan American Airways timetable from 1936, for their weekly -# "Orient Express" flights between San Francisco and Manila, and connecting -# flights to Chicago and the US East Coast. As it uses some time zone -# designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. -# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " -# -Zone Pacific/Midway -11:49:28 - LMT 1901 - -11:00 - NST 1956 Jun 3 - -11:00 1:00 NDT 1956 Sep 2 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +# See Pacific/Pago_Pago. # Palmyra # uninhabited since World War II; was probably like Pacific/Kiritimati Modified: stable/7/share/zoneinfo/europe ============================================================================== --- stable/7/share/zoneinfo/europe Tue Mar 24 06:11:20 2015 (r280416) +++ stable/7/share/zoneinfo/europe Tue Mar 24 06:12:59 2015 (r280417) @@ -2400,7 +2400,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 192 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 3:00 Russia VOL%sT 1991 Mar 31 2:00s 4:00 - VOLT 1992 Mar 29 2:00s - 3:00 Russia MSK 2011 Mar 27 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s 4:00 - MSK 2014 Oct 26 2:00s 3:00 - MSK Modified: stable/7/share/zoneinfo/leap-seconds.list ============================================================================== --- stable/7/share/zoneinfo/leap-seconds.list Tue Mar 24 06:11:20 2015 (r280416) +++ stable/7/share/zoneinfo/leap-seconds.list Tue Mar 24 06:12:59 2015 (r280417) @@ -131,10 +131,10 @@ # over the last few minutes of the day. The frequency of the local # clock is decreased (or increased) to realize the positive (or # negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# defintion of UTC. +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. # # Questions or comments to: # Judah Levine Modified: stable/7/share/zoneinfo/northamerica ============================================================================== --- stable/7/share/zoneinfo/northamerica Tue Mar 24 06:11:20 2015 (r280416) +++ stable/7/share/zoneinfo/northamerica Tue Mar 24 06:12:59 2015 (r280417) @@ -2312,8 +2312,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # "...the new time zone will come into effect at two o'clock on the first Sunday # of February, when we will have to advance the clock one hour from its current # time..." -# # Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D @@ -2508,13 +2524,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT ############################################################################### # Anguilla -# See America/Port_of_Spain. - # Antigua and Barbuda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 - -5:00 - EST 1951 - -4:00 - AST +# See America/Port_of_Spain. # Bahamas # @@ -2581,10 +2592,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 193 -4:00 US A%sT # Cayman Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST +# See America/Panama. # Costa Rica @@ -3107,6 +3115,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. Modified: stable/7/share/zoneinfo/southamerica ============================================================================== --- stable/7/share/zoneinfo/southamerica Tue Mar 24 06:11:20 2015 (r280416) +++ stable/7/share/zoneinfo/southamerica Tue Mar 24 06:12:59 2015 (r280417) @@ -1206,10 +1206,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf -# From Juan Correa (2015-01-28): -# ... today the Ministry of Energy announced that Chile will drop DST, will keep -# "summer time" (UTC -3 / UTC -5) all year round.... -# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1268,7 +1271,7 @@ Zone America/Santiago -4:42:46 - LMT 189 -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u -5:00 - EAST # @@ -1603,6 +1606,7 @@ Zone America/Port_of_Spain -4:06:04 - LM # These all agree with Trinidad and Tobago since 1970. Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Guadeloupe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 06:14:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BF7298D6; Tue, 24 Mar 2015 06:14:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0489F01; Tue, 24 Mar 2015 06:14:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O6EUhN065070; Tue, 24 Mar 2015 06:14:30 GMT (envelope-from edwin@FreeBSD.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O6ESS2065063; Tue, 24 Mar 2015 06:14:28 GMT (envelope-from edwin@FreeBSD.org) Message-Id: <201503240614.t2O6ESS2065063@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: edwin set sender to edwin@FreeBSD.org using -f From: Edwin Groothuis Date: Tue, 24 Mar 2015 06:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org Subject: svn commit: r280418 - stable/6/share/zoneinfo X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 06:14:30 -0000 Author: edwin Date: Tue Mar 24 06:14:27 2015 New Revision: 280418 URL: https://svnweb.freebsd.org/changeset/base/280418 Log: MFC of 280413,tzdata6: Release 2015b - 2015-03-19 23:28:11 -0700 Changes affecting future time stamps Mongolia will start observing DST again this year, from the last Saturday in March at 02:00 to the last Saturday in September at 00:00. (Thanks to Ganbold Tsagaankhuu.) Palestine will start DST on March 28, not March 27. Also, correct the fall 2014 transition from September 26 to October 24. Adjust future predictions accordingly. (Thanks to Steffen Thorsen.) Changes affecting past time stamps The 1982 zone shift in Pacific/Easter has been corrected, fixing a 2015a regression. (Thanks to Stuart Bishop for reporting the problem.) Some more zones have been turned into links, when they differed from existing zones only for older time stamps. As usual, these changes affect UTC offsets in pre-1970 time stamps only. Their old contents have been moved to the 'backzone' file. The affected zones are: America/Antigua, America/Cayman, Pacific/Midway, and Pacific/Saipan. Changes affecting time zone abbreviations Correct the 1992-2010 DST abbreviation in Volgograd from "MSK" to "MSD". (Thanks to Hank W.) Modified: stable/6/share/zoneinfo/asia stable/6/share/zoneinfo/australasia stable/6/share/zoneinfo/europe stable/6/share/zoneinfo/leap-seconds.list stable/6/share/zoneinfo/northamerica stable/6/share/zoneinfo/southamerica Directory Properties: stable/6/share/zoneinfo/ (props changed) Modified: stable/6/share/zoneinfo/asia ============================================================================== --- stable/6/share/zoneinfo/asia Tue Mar 24 06:12:59 2015 (r280417) +++ stable/6/share/zoneinfo/asia Tue Mar 24 06:14:27 2015 (r280418) @@ -1904,6 +1904,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # this is almost surely wrong. +# From Ganbold Tsagaankhuu (2015-03-10): +# It seems like yesterday Mongolian Government meeting has concluded to use +# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of +# March 2015, daylight saving time starts. And 00:00AM of last Saturday of +# September daylight saving time ends. Source: +# http://zasag.mn/news/view/8969 + # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 only - Oct 1 0:00 0 - @@ -1924,6 +1931,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S +Rule Mongol 2015 max - Sep lastSat 0:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta @@ -2342,13 +2351,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 # official source...: # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 -# From Paul Eggert (2013-09-24): -# For future dates, guess the last Thursday in March at 24:00 through -# the first Friday on or after September 21 at 00:00. This is consistent with -# the predictions in today's editions of the following URLs, -# which are for Gaza and Hebron respectively: -# http://www.timeanddate.com/worldclock/timezone.html?n=702 -# http://www.timeanddate.com/worldclock/timezone.html?n=2364 +# From Steffen Thorsen (2015-03-03): +# Sources such as http://www.alquds.com/news/article/view/id/548257 +# and http://www.raya.ps/ar/news/890705.html say Palestine areas will +# start DST on 2015-03-28 00:00 which is one day later than expected. +# +# From Paul Eggert (2015-03-03): +# http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014 +# says that the fall 2014 transition was Oct 23 at 24:00. +# For future dates, guess the last Friday in March at 24:00 through +# the first Friday on or after October 21 at 00:00. This is consistent with +# the predictions in today's editions of the following URLs: +# http://www.timeanddate.com/time/change/gaza-strip/gaza +# http://www.timeanddate.com/time/change/west-bank/hebron # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S @@ -2374,9 +2389,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1 Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Sep 30 0:00 0 - -Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S +Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S Rule Palestine 2012 only - Sep 21 1:00 0 - -Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - +Rule Palestine 2013 only - Sep Fri>=21 0:00 0 - +Rule Palestine 2014 max - Oct Fri>=21 0:00 0 - +Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Modified: stable/6/share/zoneinfo/australasia ============================================================================== --- stable/6/share/zoneinfo/australasia Tue Mar 24 06:12:59 2015 (r280417) +++ stable/6/share/zoneinfo/australasia Tue Mar 24 06:14:27 2015 (r280418) @@ -373,6 +373,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 D 9:39:00 - LMT 1901 # Agana 10:00 - GST 2000 Dec 23 # Guam 10:00 - ChST # Chamorro Standard Time +Link Pacific/Guam Pacific/Saipan # N Mariana Is # Kiribati # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -388,12 +389,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 14:00 - LINT # N Mariana Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31 - 9:43:00 - LMT 1901 - 9:00 - MPT 1969 Oct # N Mariana Is Time - 10:00 - MPT 2000 Dec 23 - 10:00 - ChST # Chamorro Standard Time +# See Pacific/Guam. # Marshall Is # Zone NAME GMTOFF RULES FORMAT [UNTIL] @@ -563,6 +559,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1 -11:00 - NST 1967 Apr # N=Nome -11:00 - BST 1983 Nov 30 # B=Bering -11:00 - SST # S=Samoa +Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands # Samoa (formerly and also known as Western Samoa) @@ -744,23 +741,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 190 # uninhabited # Midway -# -# From Mark Brader (2005-01-23): -# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies, -# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3] -# reproduced a Pan American Airways timetable from 1936, for their weekly -# "Orient Express" flights between San Francisco and Manila, and connecting -# flights to Chicago and the US East Coast. As it uses some time zone -# designations that I've never seen before:.... -# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun. -# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A " -# -Zone Pacific/Midway -11:49:28 - LMT 1901 - -11:00 - NST 1956 Jun 3 - -11:00 1:00 NDT 1956 Sep 2 - -11:00 - NST 1967 Apr # N=Nome - -11:00 - BST 1983 Nov 30 # B=Bering - -11:00 - SST # S=Samoa +# See Pacific/Pago_Pago. # Palmyra # uninhabited since World War II; was probably like Pacific/Kiritimati Modified: stable/6/share/zoneinfo/europe ============================================================================== --- stable/6/share/zoneinfo/europe Tue Mar 24 06:12:59 2015 (r280417) +++ stable/6/share/zoneinfo/europe Tue Mar 24 06:14:27 2015 (r280418) @@ -2400,7 +2400,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 192 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 3:00 Russia VOL%sT 1991 Mar 31 2:00s 4:00 - VOLT 1992 Mar 29 2:00s - 3:00 Russia MSK 2011 Mar 27 2:00s + 3:00 Russia MSK/MSD 2011 Mar 27 2:00s 4:00 - MSK 2014 Oct 26 2:00s 3:00 - MSK Modified: stable/6/share/zoneinfo/leap-seconds.list ============================================================================== --- stable/6/share/zoneinfo/leap-seconds.list Tue Mar 24 06:12:59 2015 (r280417) +++ stable/6/share/zoneinfo/leap-seconds.list Tue Mar 24 06:14:27 2015 (r280418) @@ -131,10 +131,10 @@ # over the last few minutes of the day. The frequency of the local # clock is decreased (or increased) to realize the positive (or # negative) leap second. This method removes the time step described -# above. Although the long-term behavior of the time scale is correct -# in this case, this method introduces an error during the adjustment -# period both in time and in frequency with respect to the official -# defintion of UTC. +# above. Although the long-term behavior of the time scale is correct +# in this case, this method introduces an error during the adjustment +# period both in time and in frequency with respect to the official +# definition of UTC. # # Questions or comments to: # Judah Levine Modified: stable/6/share/zoneinfo/northamerica ============================================================================== --- stable/6/share/zoneinfo/northamerica Tue Mar 24 06:12:59 2015 (r280417) +++ stable/6/share/zoneinfo/northamerica Tue Mar 24 06:14:27 2015 (r280418) @@ -2312,8 +2312,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 # "...the new time zone will come into effect at two o'clock on the first Sunday # of February, when we will have to advance the clock one hour from its current # time..." -# # Also, the new zone will not use DST. +# +# From Carlos Raúl Perasso (2015-02-02): +# The decree that modifies the Mexican Hour System Law has finally +# been published at the Diario Oficial de la Federación +# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015 +# It establishes 5 zones for Mexico: +# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W, +# includes most of Mexico, excluding what's mentioned below. +# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the +# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía +# de Banderas which lies in Central Zone); Sinaloa and Sonora. +# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the +# state of Baja California. +# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state +# of Quintana Roo. +# 5- The islands, reefs and keys shall take their timezone from the +# longitude they are located at. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule Mexico 1939 only - Feb 5 0:00 1:00 D @@ -2508,13 +2524,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT ############################################################################### # Anguilla -# See America/Port_of_Spain. - # Antigua and Barbuda -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Antigua -4:07:12 - LMT 1912 Mar 2 - -5:00 - EST 1951 - -4:00 - AST +# See America/Port_of_Spain. # Bahamas # @@ -2581,10 +2592,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 193 -4:00 US A%sT # Cayman Is -# Zone NAME GMTOFF RULES FORMAT [UNTIL] -Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown - -5:07:11 - KMT 1912 Feb # Kingston Mean Time - -5:00 - EST +# See America/Panama. # Costa Rica @@ -3107,6 +3115,7 @@ Zone America/Managua -5:45:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890 -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:00 - EST +Link America/Panama America/Cayman # Puerto Rico # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. Modified: stable/6/share/zoneinfo/southamerica ============================================================================== --- stable/6/share/zoneinfo/southamerica Tue Mar 24 06:12:59 2015 (r280417) +++ stable/6/share/zoneinfo/southamerica Tue Mar 24 06:14:27 2015 (r280418) @@ -1206,10 +1206,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1 # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf -# From Juan Correa (2015-01-28): -# ... today the Ministry of Energy announced that Chile will drop DST, will keep -# "summer time" (UTC -3 / UTC -5) all year round.... -# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html +# From Eduardo Romero Urra (2015-03-03): +# Today has been published officially that Chile will use the DST time +# permanently until March 25 of 2017 +# http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg +# +# From Paul Eggert (2015-03-03): +# For now, assume that the extension will persist indefinitely. # NOTE: ChileAQ rules for Antarctic bases are stored separately in the # 'antarctica' file. @@ -1268,7 +1271,7 @@ Zone America/Santiago -4:42:46 - LMT 189 -3:00 - CLT Zone Pacific/Easter -7:17:44 - LMT 1890 -7:17:28 - EMT 1932 Sep # Easter Mean Time - -7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time + -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time -6:00 Chile EAS%sT 2015 Apr 26 3:00u -5:00 - EAST # @@ -1603,6 +1606,7 @@ Zone America/Port_of_Spain -4:06:04 - LM # These all agree with Trinidad and Tobago since 1970. Link America/Port_of_Spain America/Anguilla +Link America/Port_of_Spain America/Antigua Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Guadeloupe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 06:55:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FF8E1CF; Tue, 24 Mar 2015 06:55:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4863C5F6; Tue, 24 Mar 2015 06:55:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O6tCTv083878; Tue, 24 Mar 2015 06:55:12 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O6t95Y083871; Tue, 24 Mar 2015 06:55:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240655.t2O6t95Y083871@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 06:55:09 +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: r280419 - in stable/10: etc include share/examples share/man/man4 share/man/man9 share/misc tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 06:55:12 -0000 Author: ngie Date: Tue Mar 24 06:55:08 2015 New Revision: 280419 URL: https://svnweb.freebsd.org/changeset/base/280419 Log: MFC r278135,r278202: r278135 (by amdmi3): - Remove more files when MK_USB == no Reviewed by: ngie Approved by: ngie Differential Revision: D1600 r278202: Clean up more usb related files when MK_USB == no when dealing with manpages, libraries, and binaries Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/Makefile stable/10/include/Makefile stable/10/share/examples/Makefile stable/10/share/man/man4/Makefile stable/10/share/man/man9/Makefile stable/10/share/misc/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Tue Mar 24 06:14:27 2015 (r280418) +++ stable/10/etc/Makefile Tue Mar 24 06:55:08 2015 (r280419) @@ -44,7 +44,6 @@ BIN1= crontab \ rc.bsdextended \ rc.firewall \ rc.initdiskless \ - rc.sendmail \ rc.shutdown \ rc.subr \ remote \ @@ -144,6 +143,10 @@ BIN1+= portsnap.conf BIN1+= pf.os .endif +.if ${MK_SENDMAIL} != "no" +BIN1+= rc.sendmail +.endif + .if ${MK_TCSH} != "no" BIN1+= csh.cshrc csh.login csh.logout .endif @@ -248,7 +251,9 @@ distribution: ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install +.if ${MK_PKGBOOTSTRAP} != "no" ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install +.endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt @@ -310,8 +315,10 @@ distribution: .endif ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ ${DESTDIR}/etc/dumpdates +.if ${MK_LOCATE} != "no" ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/db/locate.database +.endif ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ ${DESTDIR}/var/crash cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ @@ -379,6 +386,7 @@ distrib-dirs: ${MTREES:N/*} done; true .endif ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys +.if ${MK_MAN} != "no" cd ${DESTDIR}/usr/share/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ @@ -386,23 +394,30 @@ distrib-dirs: ${MTREES:N/*} ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/man/en.UTF-8/; \ done +.if ${MK_OPENSSL} != "no" cd ${DESTDIR}/usr/share/openssl/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ done +.endif set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \ - ${INSTALL_SYMLINK} "$$2" \ - "${DESTDIR}/usr/share/openssl/man/$$1"; \ + if [ "${MK_OPENSSL}" != "no" ]; then \ + ${INSTALL_SYMLINK} "$$2" \ + "${DESTDIR}/usr/share/openssl/man/$$1"; \ + fi; \ shift; shift; \ done +.endif +.if ${MK_NLS} != "no" set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ shift; shift; \ done +.endif etc-examples: cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ Modified: stable/10/include/Makefile ============================================================================== --- stable/10/include/Makefile Tue Mar 24 06:14:27 2015 (r280418) +++ stable/10/include/Makefile Tue Mar 24 06:55:08 2015 (r280419) @@ -46,7 +46,7 @@ LSUBDIRS= cam/ata cam/scsi \ dev/hwpmc \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ - dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ + dev/speaker dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/msdosfs fs/nandfs fs/nfs fs/nullfs \ fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ @@ -58,6 +58,10 @@ LSUBDIRS= cam/ata cam/scsi \ security/mac_mls security/mac_partition \ ufs/ffs ufs/ufs +.if ${MK_USB} != "no" +LSUBDIRS+= dev/usb +.endif + LSUBSUBDIRS= dev/mpt/mpilib .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Tue Mar 24 06:14:27 2015 (r280418) +++ stable/10/share/examples/Makefile Tue Mar 24 06:55:08 2015 (r280419) @@ -18,7 +18,6 @@ LDIRS= BSD_daemon \ ipfw \ jails \ kld \ - libusb20 \ libvgl \ mdoc \ netgraph \ @@ -92,12 +91,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ kld/syscall/module/syscall.c \ kld/syscall/test/Makefile \ kld/syscall/test/call.c \ - libusb20/Makefile \ - libusb20/README \ - libusb20/util.c \ - libusb20/util.h \ - libusb20/bulk.c \ - libusb20/control.c \ libvgl/Makefile \ libvgl/demo.c \ mdoc/POSIX-copyright \ @@ -203,6 +196,16 @@ XFILES+= hast/ucarp.sh \ hast/vip-up.sh .endif +.if ${MK_USB} != "no" +LDIRS+= libusb20 +XFILES+= libusb20/Makefile \ + libusb20/README \ + libusb20/util.c \ + libusb20/util.h \ + libusb20/bulk.c \ + libusb20/control.c +.endif + .if ${MACHINE_CPUARCH} == "amd64" .if ${MK_BHYVE} != "no" LDIRS+= bhyve Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Tue Mar 24 06:14:27 2015 (r280418) +++ stable/10/share/man/man4/Makefile Tue Mar 24 06:55:08 2015 (r280419) @@ -504,54 +504,6 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ - u3g.4 \ - uark.4 \ - uart.4 \ - uath.4 \ - ubsa.4 \ - ubsec.4 \ - ubser.4 \ - ubtbcmfw.4 \ - uchcom.4 \ - ucom.4 \ - ucycom.4 \ - udav.4 \ - udbp.4 \ - udp.4 \ - udplite.4 \ - uep.4 \ - ufm.4 \ - ufoma.4 \ - uftdi.4 \ - ugen.4 \ - uhci.4 \ - uhid.4 \ - uhso.4 \ - uipaq.4 \ - ukbd.4 \ - uled.4 \ - ulpt.4 \ - umass.4 \ - umcs.4 \ - umct.4 \ - umodem.4 \ - ums.4 \ - unix.4 \ - upgt.4 \ - uplcom.4 \ - ural.4 \ - urio.4 \ - urndis.4 \ - ${_urtw.4} \ - urtwn.4 \ - urtwnfw.4 \ - usb.4 \ - usb_template.4 \ - usb_quirk.4 \ - uslcom.4 \ - utopia.4 \ - uvisor.4 \ - uvscom.4 \ vale.4 \ vga.4 \ vge.4 \ @@ -733,13 +685,6 @@ MLINKS+=tl.4 if_tl.4 MLINKS+=tun.4 if_tun.4 MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 -MLINKS+=u3g.4 u3gstub.4 -MLINKS+=uath.4 if_uath.4 -MLINKS+=udav.4 if_udav.4 -MLINKS+=upgt.4 if_upgt.4 -MLINKS+=ural.4 if_ural.4 -MLINKS+=urndis.4 if_urndis.4 -MLINKS+=${_urtw.4} ${_if_urtw.4} MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=${_vmx.4} ${_if_vmx.4} @@ -884,4 +829,63 @@ _pflog.4= pflog.4 _pfsync.4= pfsync.4 .endif +.if ${MK_USB} != "no" +MAN+= u3g.4 \ + uark.4 \ + uart.4 \ + uath.4 \ + ubsa.4 \ + ubsec.4 \ + ubser.4 \ + ubtbcmfw.4 \ + uchcom.4 \ + ucom.4 \ + ucycom.4 \ + udav.4 \ + udbp.4 \ + udp.4 \ + udplite.4 \ + uep.4 \ + ufm.4 \ + ufoma.4 \ + uftdi.4 \ + ugen.4 \ + uhci.4 \ + uhid.4 \ + uhso.4 \ + uipaq.4 \ + ukbd.4 \ + uled.4 \ + ulpt.4 \ + umass.4 \ + umcs.4 \ + umct.4 \ + umodem.4 \ + ums.4 \ + unix.4 \ + upgt.4 \ + uplcom.4 \ + ural.4 \ + urio.4 \ + urndis.4 \ + ${_urtw.4} \ + urtwn.4 \ + urtwnfw.4 \ + usb.4 \ + usb_template.4 \ + usb_quirk.4 \ + uslcom.4 \ + utopia.4 \ + uvisor.4 \ + uvscom.4 \ + +MLINKS+=u3g.4 u3gstub.4 +MLINKS+=uath.4 if_uath.4 +MLINKS+=udav.4 if_udav.4 +MLINKS+=upgt.4 if_upgt.4 +MLINKS+=ural.4 if_ural.4 +MLINKS+=urndis.4 if_urndis.4 +MLINKS+=${_urtw.4} ${_if_urtw.4} +.endif + .include Modified: stable/10/share/man/man9/Makefile ============================================================================== --- stable/10/share/man/man9/Makefile Tue Mar 24 06:14:27 2015 (r280418) +++ stable/10/share/man/man9/Makefile Tue Mar 24 06:55:08 2015 (r280419) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + MAN= accept_filter.9 \ accf_data.9 \ accf_dns.9 \ @@ -270,7 +272,6 @@ MAN= accept_filter.9 \ uidinfo.9 \ uio.9 \ unr.9 \ - usbdi.9 \ utopia.9 \ vaccess.9 \ vaccess_acl_nfs4.9 \ @@ -1408,6 +1409,9 @@ MLINKS+=uidinfo.9 uifind.9 \ uidinfo.9 uihold.9 MLINKS+=uio.9 uiomove.9 \ uio.9 uiomove_nofault.9 + +.if ${MK_USB} != "no" +MAN+= usbdi.9 MLINKS+=usbdi.9 usbd_do_request.9 \ usbdi.9 usbd_do_request_flags.9 \ usbdi.9 usbd_errstr.9 \ @@ -1459,6 +1463,7 @@ MLINKS+=usbdi.9 usbd_do_request.9 \ usbdi.9 usb_fifo_reset.9 \ usbdi.9 usb_fifo_softc.9 \ usbdi.9 usb_fifo_wakeup.9 +.endif MLINKS+=vcount.9 count_dev.9 MLINKS+=vfsconf.9 vfs_modevent.9 \ vfsconf.9 vfs_register.9 \ Modified: stable/10/share/misc/Makefile ============================================================================== --- stable/10/share/misc/Makefile Tue Mar 24 06:14:27 2015 (r280418) +++ stable/10/share/misc/Makefile Tue Mar 24 06:55:08 2015 (r280419) @@ -1,15 +1,22 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/8/93 # $FreeBSD$ +.include + .PATH: ${.CURDIR}/../../sys/dev/usb FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot eqnchar flowers init.ee \ iso3166 iso639 latin1 man.template mdoc.template operator pci_vendors \ - scsi_modes usb_hid_usages usbdevs \ + scsi_modes \ organization.dot NO_OBJ= FILESDIR= ${BINDIR}/misc +.if ${MK_USB} != "no" +FILES+= usb_hid_usages +FILES+= usbdevs +.endif + .include Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 06:14:27 2015 (r280418) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 06:55:08 2015 (r280419) @@ -4861,8 +4861,357 @@ OLD_FILES+=usr/sbin/unbound-control-setu .endif .if ${MK_USB} == no +OLD_FILES+=etc/devd/uath.conf OLD_FILES+=etc/devd/uauth.conf +OLD_FILES+=etc/devd/ulpt.conf OLD_FILES+=etc/devd/usb.conf +OLD_FILES+=usr/bin/usbhidaction +OLD_FILES+=usr/bin/usbhidctl +OLD_FILES+=usr/include/libusb.h +OLD_FILES+=usr/include/libusb20.h +OLD_FILES+=usr/include/libusb20_desc.h +OLD_FILES+=usr/include/usb.h +OLD_FILES+=usr/include/usbhid.h +OLD_FILES+=usr/lib/libusb.a +OLD_FILES+=usr/lib/libusb.so +OLD_LIBS+=usr/lib/libusb.so.3 +OLD_FILES+=usr/lib/libusb_p.a +OLD_FILES+=usr/lib/libusbhid.a +OLD_FILES+=usr/lib/libusbhid.so +OLD_LIBS+=usr/lib/libusbhid.so.4 +OLD_FILES+=usr/lib/libusbhid_p.a +OLD_FILES+=usr/lib32/libusb.a +OLD_FILES+=usr/lib32/libusb.so +OLD_LIBS+=usr/lib32/libusb.so.3 +OLD_FILES+=usr/lib32/libusb_p.a +OLD_FILES+=usr/lib32/libusbhid.a +OLD_FILES+=usr/lib32/libusbhid.so +OLD_LIBS+=usr/lib32/libusbhid.so.4 +OLD_FILES+=usr/lib32/libusbhid_p.a +OLD_FILES+=usr/libdata/pkgconfig/libusb-0.1.pc +OLD_FILES+=usr/libdata/pkgconfig/libusb-1.0.pc +OLD_FILES+=usr/libdata/pkgconfig/libusb-2.0.pc +OLD_FILES+=usr/sbin/uathload +OLD_FILES+=usr/sbin/uhsoctl +OLD_FILES+=usr/sbin/usbconfig +OLD_FILES+=usr/sbin/usbdump +OLD_FILES+=usr/share/examples/libusb20/Makefile +OLD_FILES+=usr/share/examples/libusb20/README +OLD_FILES+=usr/share/examples/libusb20/bulk.c +OLD_FILES+=usr/share/examples/libusb20/control.c +OLD_FILES+=usr/share/examples/libusb20/util.c +OLD_FILES+=usr/share/examples/libusb20/util.h +OLD_DIRS+=usr/share/examples/libusb20 +OLD_FILES+=usr/share/man/man1/uhsoctl.1.gz +OLD_FILES+=usr/share/man/man1/usbhidaction.1.gz +OLD_FILES+=usr/share/man/man1/usbhidctl.1.gz +OLD_FILES+=usr/share/man/man3/hid_dispose_report_desc.3.gz +OLD_FILES+=usr/share/man/man3/hid_end_parse.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_data.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_item.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_report_desc.3.gz +OLD_FILES+=usr/share/man/man3/hid_init.3.gz +OLD_FILES+=usr/share/man/man3/hid_locate.3.gz +OLD_FILES+=usr/share/man/man3/hid_report_size.3.gz +OLD_FILES+=usr/share/man/man3/hid_set_data.3.gz +OLD_FILES+=usr/share/man/man3/hid_start_parse.3.gz +OLD_FILES+=usr/share/man/man3/hid_usage_in_page.3.gz +OLD_FILES+=usr/share/man/man3/hid_usage_page.3.gz +OLD_FILES+=usr/share/man/man3/libusb.3.gz +OLD_FILES+=usr/share/man/man3/libusb20.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_add_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_alloc_default.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_dequeue_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_device_foreach.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_enqueue_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_free.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_quirk_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_template.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_remove_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_set_template.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_desc_foreach.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc_config.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_detach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_free.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_backend_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_bus_number.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_config_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_device_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_fd.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_iface_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_info.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_port.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_port_path.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_usage.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_speed.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_kernel_driver_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_process.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_simple_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_request_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_reset.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_alt_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_config_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_power_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_wait_process.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_error_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_decode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_encode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_get_1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_get_2.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_strerror.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_bulk_intr_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_callback_wrapper.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_clear_stall_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_drain.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_packet_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_total_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_pointer.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc0.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_status.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_time_complete.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_pending.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_buffer.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_callback.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_flags.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc0.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_total_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_bulk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_control.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_intr.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_isoc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_start.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_stop.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_submit.3.gz +OLD_FILES+=usr/share/man/man3/libusb_alloc_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_attach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_bulk_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_cancel_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/libusb_claim_interface.3.gz +OLD_FILES+=usr/share/man/man3/libusb_clear_halt.3.gz +OLD_FILES+=usr/share/man/man3/libusb_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb_control_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver_np.3.gz +OLD_FILES+=usr/share/man/man3/libusb_error_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb_event_handler_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb_event_handling_ok.3.gz +OLD_FILES+=usr/share/man/man3/libusb_exit.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_bos_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_device_list.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_ss_endpoint_comp.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_active_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_bus_number.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor_by_value.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_configuration.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_list.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_speed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_driver_np.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_max_iso_packet_size.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_max_packet_size.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_next_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_pollfds.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor_ascii.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_completed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_locked.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout_completed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_init.3.gz +OLD_FILES+=usr/share/man/man3/libusb_interrupt_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_kernel_driver_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb_lock_event_waiters.3.gz +OLD_FILES+=usr/share/man/man3/libusb_lock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb_open_device_with_vid_pid.3.gz +OLD_FILES+=usr/share/man/man3/libusb_parse_bos_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_parse_ss_endpoint_comp.3.gz +OLD_FILES+=usr/share/man/man3/libusb_ref_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_release_interface.3.gz +OLD_FILES+=usr/share/man/man3/libusb_reset_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_configuration.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_interface_alt_setting.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_pollfd_notifiers.3.gz +OLD_FILES+=usr/share/man/man3/libusb_strerror.3.gz +OLD_FILES+=usr/share/man/man3/libusb_submit_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_try_lock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unlock_event_waiters.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unlock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unref_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_wait_for_event.3.gz +OLD_FILES+=usr/share/man/man3/libusbhid.3.gz +OLD_FILES+=usr/share/man/man3/usb.3.gz +OLD_FILES+=usr/share/man/man3/usb_bulk_read.3.gz +OLD_FILES+=usr/share/man/man3/usb_bulk_write.3.gz +OLD_FILES+=usr/share/man/man3/usb_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/usb_claim_interface.3.gz +OLD_FILES+=usr/share/man/man3/usb_clear_halt.3.gz +OLD_FILES+=usr/share/man/man3/usb_close.3.gz +OLD_FILES+=usr/share/man/man3/usb_control_msg.3.gz +OLD_FILES+=usr/share/man/man3/usb_destroy_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_device.3.gz +OLD_FILES+=usr/share/man/man3/usb_fetch_and_parse_descriptors.3.gz +OLD_FILES+=usr/share/man/man3/usb_find_busses.3.gz +OLD_FILES+=usr/share/man/man3/usb_find_devices.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_busses.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_descriptor_by_endpoint.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_string.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_string_simple.3.gz +OLD_FILES+=usr/share/man/man3/usb_init.3.gz +OLD_FILES+=usr/share/man/man3/usb_interrupt_read.3.gz +OLD_FILES+=usr/share/man/man3/usb_interrupt_write.3.gz +OLD_FILES+=usr/share/man/man3/usb_open.3.gz +OLD_FILES+=usr/share/man/man3/usb_parse_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_parse_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/usb_release_interface.3.gz +OLD_FILES+=usr/share/man/man3/usb_reset.3.gz +OLD_FILES+=usr/share/man/man3/usb_resetep.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_altinterface.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/usb_strerror.3.gz +OLD_FILES+=usr/share/man/man3/usbhid.3.gz +OLD_FILES+=usr/share/man/man4/u3g.4.gz +OLD_FILES+=usr/share/man/man4/u3gstub.4.gz +OLD_FILES+=usr/share/man/man4/uark.4.gz +OLD_FILES+=usr/share/man/man4/uart.4.gz +OLD_FILES+=usr/share/man/man4/uath.4.gz +OLD_FILES+=usr/share/man/man4/ubsa.4.gz +OLD_FILES+=usr/share/man/man4/ubsec.4.gz +OLD_FILES+=usr/share/man/man4/ubser.4.gz +OLD_FILES+=usr/share/man/man4/ubtbcmfw.4.gz +OLD_FILES+=usr/share/man/man4/uchcom.4.gz +OLD_FILES+=usr/share/man/man4/ucom.4.gz +OLD_FILES+=usr/share/man/man4/ucycom.4.gz +OLD_FILES+=usr/share/man/man4/udav.4.gz +OLD_FILES+=usr/share/man/man4/udbp.4.gz +OLD_FILES+=usr/share/man/man4/udp.4.gz +OLD_FILES+=usr/share/man/man4/udplite.4.gz +OLD_FILES+=usr/share/man/man4/uep.4.gz +OLD_FILES+=usr/share/man/man4/ufm.4.gz +OLD_FILES+=usr/share/man/man4/ufoma.4.gz +OLD_FILES+=usr/share/man/man4/uftdi.4.gz +OLD_FILES+=usr/share/man/man4/ugen.4.gz +OLD_FILES+=usr/share/man/man4/uhci.4.gz +OLD_FILES+=usr/share/man/man4/uhid.4.gz +OLD_FILES+=usr/share/man/man4/uhso.4.gz +OLD_FILES+=usr/share/man/man4/uipaq.4.gz +OLD_FILES+=usr/share/man/man4/ukbd.4.gz +OLD_FILES+=usr/share/man/man4/uled.4.gz +OLD_FILES+=usr/share/man/man4/ulpt.4.gz +OLD_FILES+=usr/share/man/man4/umass.4.gz +OLD_FILES+=usr/share/man/man4/umcs.4.gz +OLD_FILES+=usr/share/man/man4/umct.4.gz +OLD_FILES+=usr/share/man/man4/umodem.4.gz +OLD_FILES+=usr/share/man/man4/umoscom.4.gz +OLD_FILES+=usr/share/man/man4/ums.4.gz +OLD_FILES+=usr/share/man/man4/unix.4.gz +OLD_FILES+=usr/share/man/man4/upgt.4.gz +OLD_FILES+=usr/share/man/man4/uplcom.4.gz +OLD_FILES+=usr/share/man/man4/ural.4.gz +OLD_FILES+=usr/share/man/man4/urio.4.gz +OLD_FILES+=usr/share/man/man4/urndis.4.gz +OLD_FILES+=usr/share/man/man4/urtw.4.gz +OLD_FILES+=usr/share/man/man4/urtwn.4.gz +OLD_FILES+=usr/share/man/man4/urtwnfw.4.gz +OLD_FILES+=usr/share/man/man4/usb.4.gz +OLD_FILES+=usr/share/man/man4/usb_quirk.4.gz +OLD_FILES+=usr/share/man/man4/usb_template.4.gz +OLD_FILES+=usr/share/man/man4/usfs.4.gz +OLD_FILES+=usr/share/man/man4/uslcom.4.gz +OLD_FILES+=usr/share/man/man4/utopia.4.gz +OLD_FILES+=usr/share/man/man4/uvisor.4.gz +OLD_FILES+=usr/share/man/man4/uvscom.4.gz +OLD_FILES+=usr/share/man/man8/uathload.8.gz +OLD_FILES+=usr/share/man/man8/usbconfig.8.gz +OLD_FILES+=usr/share/man/man8/usbdump.8.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_alloc_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_attach.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_detach.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_free_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_error.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_linear.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_bytes_max.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_error.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_linear.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_reset.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_softc.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_wakeup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_do_request.9.gz +OLD_FILES+=usr/share/man/man9/usbd_do_request_flags.9.gz +OLD_FILES+=usr/share/man/man9/usbd_errstr.9.gz +OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_info.9.gz +OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_uaa.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_clear_stall.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_drain.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_pending.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_poll.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_setup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_start.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_stop.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_submit.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_unsetup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_clr_flag.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_data.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_get_frame.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_get_priv.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_is_stalled.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_framelen.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_frames.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_flag.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_data.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_offset.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frames.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_interval.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_priv.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_stall.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_timeout.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_softc.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_state.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_status.9.gz +OLD_FILES+=usr/share/man/man9/usbdi.9.gz +OLD_FILES+=usr/share/misc/usb_hid_usages +OLD_FILES+=usr/share/misc/usbdevs .endif .if ${MK_UTMPX} == no From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 06:59:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BF7C3B0; Tue, 24 Mar 2015 06:59:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76CD7648; Tue, 24 Mar 2015 06:59:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O6xgSg084417; Tue, 24 Mar 2015 06:59:42 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O6xg2f084416; Tue, 24 Mar 2015 06:59:42 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240659.t2O6xg2f084416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 06:59:42 +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: r280420 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 06:59:42 -0000 Author: ngie Date: Tue Mar 24 06:59:41 2015 New Revision: 280420 URL: https://svnweb.freebsd.org/changeset/base/280420 Log: Forced commit to note that the previous commit to this file included the following MFC as well: MFC 278251: Honor the following flags for items that can be conditionalized out of the build/install without disrupting other dependent services (see r278249, et al): - MK_LOCATE - MK_MAN - MK_NLS - MK_OPENSSL - MK_PKGBOOTSTRAP - MK_SENDMAIL Additional flags need to be handled in etc/Makefile, but it requires refactoring the relevant scripts in etc/rc.d/* MFC after: 3 weeks Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/Makefile Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Tue Mar 24 06:55:08 2015 (r280419) +++ stable/10/etc/Makefile Tue Mar 24 06:59:41 2015 (r280420) @@ -52,7 +52,7 @@ BIN1= crontab \ shells \ sysctl.conf \ syslog.conf \ - termcap.small + termcap.small \ .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" BIN1+= libmap32.conf From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 07:12:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 719F3725; Tue, 24 Mar 2015 07:12:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A0FB871; Tue, 24 Mar 2015 07:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O7C2GT092924; Tue, 24 Mar 2015 07:12:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O7BsxL092257; Tue, 24 Mar 2015 07:11:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240711.t2O7BsxL092257@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 07:11:54 +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: r280421 - in stable/9: . etc lib lib/libpam/modules libexec share/mk tools/build/options usr.bin usr.sbin usr.sbin/ppp X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 07:12:02 -0000 Author: ngie Date: Tue Mar 24 07:11:54 2015 New Revision: 280421 URL: https://svnweb.freebsd.org/changeset/base/280421 Log: MFstable/10 r278569,r279505,r279506: r278569: MFC r278182: r278182: Conditionalize building radius support into libpam, ppp, etc via MK_RADIUS_SUPPORT Sponsored by: EMC / Isilon Storage Division r279505: MFC r278192: Add the following options to enable/disable several features in the base system WITHOUT_BOOTPARAMD - bootparamd WITHOUT_BOOTPD - bootpd WITHOUT_FINGER - finger, fingerd WITHOUT_FTP - ftp, ftpd WITHOUT_INETD - inetd WITHOUT_RBOOTD - rbootd WITHOUT_TCP_WRAPPERS - tcpd, et al WITHOUT_TFTP - tftp, tftp-server WITHOUT_TIMED - timed Sponsored by: EMC / Isilon Storage Division r279506: MFC r278193: Add MK_FILE to control whether or not to build file(1), libmagic(3), etc Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_BOOTPARAMD - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_BOOTPARAMD stable/9/tools/build/options/WITHOUT_BOOTPD - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_BOOTPD stable/9/tools/build/options/WITHOUT_FILE - copied unchanged from r279506, stable/10/tools/build/options/WITHOUT_FILE stable/9/tools/build/options/WITHOUT_FINGER - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_FINGER stable/9/tools/build/options/WITHOUT_FTP - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_FTP stable/9/tools/build/options/WITHOUT_INETD - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_INETD stable/9/tools/build/options/WITHOUT_RADIUS_SUPPORT - copied unchanged from r278569, stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT stable/9/tools/build/options/WITHOUT_RBOOTD - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_RBOOTD stable/9/tools/build/options/WITHOUT_TCP_WRAPPERS - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS stable/9/tools/build/options/WITHOUT_TFTP - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_TFTP stable/9/tools/build/options/WITHOUT_TIMED - copied unchanged from r279505, stable/10/tools/build/options/WITHOUT_TIMED Modified: stable/9/Makefile.inc1 (contents, props changed) stable/9/etc/Makefile stable/9/lib/Makefile (contents, props changed) stable/9/lib/libpam/modules/modules.inc stable/9/libexec/Makefile stable/9/share/mk/bsd.own.mk stable/9/usr.bin/Makefile stable/9/usr.sbin/Makefile (contents, props changed) stable/9/usr.sbin/ppp/Makefile Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libpam/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/ppp/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/Makefile.inc1 Tue Mar 24 07:11:54 2015 (r280421) @@ -1391,7 +1391,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ - lib/libradius lib/libsbuf lib/libtacplus \ + ${_lib_libradius} lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libavl} \ ${_cddl_lib_libzfs_core} \ @@ -1403,6 +1403,10 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 _lib_libthr= lib/libthr .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_lib_libradius= lib/libradius +.endif + .if ${MK_OFED} != "no" _ofed_lib= contrib/ofed/usr.lib/ .endif Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/etc/Makefile Tue Mar 24 07:11:54 2015 (r280421) @@ -17,13 +17,11 @@ BIN1= crontab \ dhclient.conf \ disktab \ fbtab \ - ftpusers \ gettytab \ group \ hosts \ hosts.allow \ hosts.equiv \ - inetd.conf \ libalias.conf \ libmap.conf \ login.access \ @@ -93,6 +91,14 @@ BIN1+= snmpd.config BIN1+= freebsd-update.conf .endif +.if ${MK_FTP} != "no" +BIN1+= ftpusers +.endif + +.if ${MK_INETD} != "no" +BIN1+= inetd.conf +.endif + .if ${MK_LOCATE} != "no" BIN1+= ${.CURDIR}/../usr.bin/locate/locate/locate.rc .endif Modified: stable/9/lib/Makefile ============================================================================== --- stable/9/lib/Makefile Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/lib/Makefile Tue Mar 24 07:11:54 2015 (r280421) @@ -43,7 +43,7 @@ SUBDIR_ORDERED= ${_csu} \ libmd \ ncurses \ ${_libnetgraph} \ - libradius \ + ${_libradius} \ librpcsvc \ libsbuf \ libtacplus \ @@ -82,7 +82,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libjail \ libkiconv \ liblzma \ - libmagic \ + ${_libmagic} \ libmemstat \ ${_libmilter} \ ${_libmp} \ @@ -153,6 +153,10 @@ _libbsnmp= libbsnmp _clang= clang .endif +.if ${MK_FILE} != "no" +_libmagic= libmagic +.endif + .if ${MK_GPIB} != "no" _libgpib= libgpib .endif @@ -224,6 +228,10 @@ _libmp= libmp _libpmc= libpmc .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_libradius= libradius +.endif + .if ${MK_SENDMAIL} != "no" _libmilter= libmilter _libsm= libsm Modified: stable/9/lib/libpam/modules/modules.inc ============================================================================== --- stable/9/lib/libpam/modules/modules.inc Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/lib/libpam/modules/modules.inc Tue Mar 24 07:11:54 2015 (r280421) @@ -21,7 +21,9 @@ MODULES += pam_opie MODULES += pam_opieaccess MODULES += pam_passwdqc MODULES += pam_permit +.if ${MK_RADIUS_SUPPORT} != "no" MODULES += pam_radius +.endif MODULES += pam_rhosts MODULES += pam_rootok MODULES += pam_securetty Modified: stable/9/libexec/Makefile ============================================================================== --- stable/9/libexec/Makefile Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/libexec/Makefile Tue Mar 24 07:11:54 2015 (r280421) @@ -4,15 +4,11 @@ .include SUBDIR= ${_atrun} \ - bootpd \ ${_comsat} \ - fingerd \ - ftpd \ getty \ ${_mail.local} \ ${_mknetid} \ ${_pppoed} \ - rbootd \ revnetgroup \ ${_rlogind} \ rpc.rquotad \ @@ -24,9 +20,7 @@ SUBDIR= ${_atrun} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - tcpd \ ${_telnetd} \ - tftpd \ ${_tftp-proxy} \ ulog-helper \ ${_ypxfr} @@ -35,6 +29,18 @@ SUBDIR= ${_atrun} \ _atrun= atrun .endif +.if ${MK_BOOTPD} != "no" +SUBDIR+= bootpd +.endif + +.if ${MK_FINGER} != "no" +SUBDIR+= fingerd +.endif + +.if ${MK_FTP} != "no" +SUBDIR+= ftpd +.endif + .if ${MK_MAIL} != "no" _comsat= comsat .endif @@ -56,6 +62,10 @@ _tftp-proxy= tftp-proxy _rtld-elf= rtld-elf .endif +.if ${MK_RBOOTD} != "no" +SUBDIR+= rbootd +.endif + .if ${MK_RCMDS} != "no" _rlogind= rlogind _rshd= rshd @@ -70,8 +80,16 @@ _smrsh= smrsh SUBDIR+= talkd .endif +.if ${MK_TCP_WRAPPERS} != "no" +SUBDIR+= tcpd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif +.if ${MK_TFTP} != "no" +SUBDIR+= tftpd +.endif + .include Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/share/mk/bsd.own.mk Tue Mar 24 07:11:54 2015 (r280421) @@ -343,6 +343,8 @@ __DEFAULT_YES_OPTIONS = \ BINUTILS \ BLUETOOTH \ BOOT \ + BOOTPARAMD \ + BOOTPD \ BSD_CPIO \ BSDINSTALL \ BSNMP \ @@ -362,10 +364,13 @@ __DEFAULT_YES_OPTIONS = \ DYNAMICROOT \ EE \ EXAMPLES \ + FILE \ + FINGER \ FLOPPY \ FORTH \ FP_LIBC \ FREEBSD_UPDATE \ + FTP \ GAMES \ GCC \ GCOV \ @@ -378,6 +383,7 @@ __DEFAULT_YES_OPTIONS = \ HTML \ INET \ INET6 \ + INETD \ INFO \ INSTALLLIB \ IPFILTER \ @@ -419,6 +425,8 @@ __DEFAULT_YES_OPTIONS = \ PPP \ PROFILE \ QUOTAS \ + RADIUS_SUPPORT \ + RBOOTD \ RCMDS \ RCS \ RESCUE \ @@ -432,8 +440,11 @@ __DEFAULT_YES_OPTIONS = \ SYSCONS \ TALK \ TCSH \ + TCP_WRAPPERS \ TELNET \ TEXTPROC \ + TFTP \ + TIMED \ TOOLCHAIN \ USB \ UTMPX \ Copied: stable/9/tools/build/options/WITHOUT_BOOTPARAMD (from r279505, stable/10/tools/build/options/WITHOUT_BOOTPARAMD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_BOOTPARAMD Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_BOOTPARAMD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bootparamd 8 . Copied: stable/9/tools/build/options/WITHOUT_BOOTPD (from r279505, stable/10/tools/build/options/WITHOUT_BOOTPD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_BOOTPD Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_BOOTPD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bootpd 8 . Copied: stable/9/tools/build/options/WITHOUT_FILE (from r279506, stable/10/tools/build/options/WITHOUT_FILE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_FILE Tue Mar 24 07:11:54 2015 (r280421, copy of r279506, stable/10/tools/build/options/WITHOUT_FILE) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr file 1 +and related programs. Copied: stable/9/tools/build/options/WITHOUT_FINGER (from r279505, stable/10/tools/build/options/WITHOUT_FINGER) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_FINGER Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_FINGER) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr finger 1 +and +.Xr fingerd 8 . Copied: stable/9/tools/build/options/WITHOUT_FTP (from r279505, stable/10/tools/build/options/WITHOUT_FTP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_FTP Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_FTP) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr ftp 1 +and +.Xr ftpd 8 . Copied: stable/9/tools/build/options/WITHOUT_INETD (from r279505, stable/10/tools/build/options/WITHOUT_INETD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_INETD Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_INETD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build +.Xr inetd 8 . Copied: stable/9/tools/build/options/WITHOUT_RADIUS_SUPPORT (from r278569, stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_RADIUS_SUPPORT Tue Mar 24 07:11:54 2015 (r280421, copy of r278569, stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . Copied: stable/9/tools/build/options/WITHOUT_RBOOTD (from r279505, stable/10/tools/build/options/WITHOUT_RBOOTD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_RBOOTD Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_RBOOTD) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr rbootd 8 . Copied: stable/9/tools/build/options/WITHOUT_TCP_WRAPPERS (from r279505, stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_TCP_WRAPPERS Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_TCP_WRAPPERS) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr tcpd 8 , +and related utilities. Copied: stable/9/tools/build/options/WITHOUT_TFTP (from r279505, stable/10/tools/build/options/WITHOUT_TFTP) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_TFTP Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_TFTP) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr tftp 1 +and +.Xr tftpd 8 . Copied: stable/9/tools/build/options/WITHOUT_TIMED (from r279505, stable/10/tools/build/options/WITHOUT_TIMED) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_TIMED Tue Mar 24 07:11:54 2015 (r280421, copy of r279505, stable/10/tools/build/options/WITHOUT_TIMED) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr timed 8 . Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/usr.bin/Makefile Tue Mar 24 07:11:54 2015 (r280421) @@ -44,14 +44,11 @@ SUBDIR= alias \ expand \ false \ fetch \ - file \ find \ - finger \ fmt \ fold \ fstat \ fsync \ - ftp \ gcore \ gencat \ getconf \ @@ -153,7 +150,6 @@ SUBDIR= alias \ tar \ tcopy \ tee \ - tftp \ time \ tip \ top \ @@ -238,6 +234,22 @@ _clang= clang SUBDIR+= ee .endif +.if ${MK_FILE} != "no" +SUBDIR+= file +.endif + +.if ${MK_FINGER} != "no" +SUBDIR+= finger +.endif + +.if ${MK_FTP} != "no" +SUBDIR+= ftp +.endif + +.if ${MK_GROFF} != "no" +SUBDIR+= vgrind +.endif + .if ${MK_HESIOD} != "no" SUBDIR+= hesinfo .endif @@ -248,10 +260,6 @@ _mkcsmapper= mkcsmapper _mkesdb= mkesdb .endif -.if ${MK_GROFF} != "no" -SUBDIR+= vgrind -.endif - .if ${MK_OPENSSL} != "no" SUBDIR+= bc SUBDIR+= chkey @@ -324,6 +332,10 @@ SUBDIR+= colcrt SUBDIR+= ul .endif +.if ${MK_TFTP} != "no" +SUBDIR+= tftp +.endif + .if ${MK_TOOLCHAIN} != "no" SUBDIR+= ar SUBDIR+= c89 Modified: stable/9/usr.sbin/Makefile ============================================================================== --- stable/9/usr.sbin/Makefile Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/usr.sbin/Makefile Tue Mar 24 07:11:54 2015 (r280421) @@ -5,7 +5,6 @@ SUBDIR= adduser \ arp \ - bootparamd \ burncd \ bsdconfig \ cdcontrol \ @@ -33,7 +32,6 @@ SUBDIR= adduser \ gstat \ i2c \ ifmcstat \ - inetd \ iostat \ kldxref \ mailwrapper \ @@ -82,11 +80,8 @@ SUBDIR= adduser \ spray \ syslogd \ sysrc \ - tcpdchk \ - tcpdmatch \ tcpdrop \ tcpdump \ - timed \ traceroute \ trpt \ tzsetup \ @@ -149,6 +144,10 @@ SUBDIR+= rndc-confgen SUBDIR+= bluetooth .endif +.if ${MK_BOOTPARAMD} != "no" +SUBDIR+= bootparamd +.endif + .if ${MK_BSDINSTALL} != "no" SUBDIR+= bsdinstall .endif @@ -194,6 +193,10 @@ SUBDIR+= rtsold SUBDIR+= traceroute6 .endif +.if ${MK_INETD} != "no" +SUBDIR+= inetd +.endif + .if ${MK_IPFW} != "no" SUBDIR+= ipfwpcap .endif @@ -313,6 +316,15 @@ SUBDIR+= sendmail SUBDIR+= sysinstall .endif +.if ${MK_TCP_WRAPPERS} != "no" +SUBDIR+= tcpdchk +SUBDIR+= tcpdmatch +.endif + +.if ${MK_TIMED} != "no" +SUBDIR+= timed +.endif + .if ${MK_TOOLCHAIN} != "no" SUBDIR+= config SUBDIR+= crunch Modified: stable/9/usr.sbin/ppp/Makefile ============================================================================== --- stable/9/usr.sbin/ppp/Makefile Tue Mar 24 06:59:41 2015 (r280420) +++ stable/9/usr.sbin/ppp/Makefile Tue Mar 24 07:11:54 2015 (r280421) @@ -31,6 +31,9 @@ PPP_NO_NETGRAPH= .if ${MK_PAM_SUPPORT} == "no" PPP_NO_PAM= .endif +.if ${MK_RADIUS_SUPPORT} == "no" +PPP_NO_RADIUS= +.endif .if defined(PPP_NO_SUID) BINMODE=550 From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 07:44:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9790FBA8; Tue, 24 Mar 2015 07:44:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77E96B8C; Tue, 24 Mar 2015 07:44:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O7i0R9007329; Tue, 24 Mar 2015 07:44:00 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O7hxtg007300; Tue, 24 Mar 2015 07:43:59 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240743.t2O7hxtg007300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 07:43: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: r280422 - in stable/10: etc/rc.d tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 07:44:00 -0000 Author: ngie Date: Tue Mar 24 07:43:58 2015 New Revision: 280422 URL: https://svnweb.freebsd.org/changeset/base/280422 Log: MFC r271893,r271895,r272043,r278249,r278282,r278466: r271893: Don't install /etc/rc.d/rwho unless MK_RCMDS == yes Sponsored by: EMC / Isilon Storage Division r271895: Don't install /etc/rc.d/ftp-proxy unless MK_PF == yes Sponsored by: EMC / Isilon Storage Division r272043: Don't install /etc/rc.d/keyserv unless MK_OPENSSL == yes Sponsored by: EMC / Isilon Storage Division r278249: Honor the following flags with the following rc.d scripts for services that can be easily decoupled from the boot process without disrupting other services - MK_APM && MK_ACPI: powerd - MK_BOOTPARAMD: bootparams - MK_FTP: ftpd - MK_INETD: inetd - MK_LEGACY_CONSOLE: moused, syscons - MK_MAIL: othermta - MK_NS_CACHING: nscd - MK_NTP: ntpd (ntpdate is required by other services and can't be easily conditionalized -- yet..) - MK_ROUTED: routed - MK_SENDMAIL: sendmail - MK_TIMED: timed - MK_VI: virecover Sponsored by: EMC / Isilon Storage Division r278282: Use FILES+= idiom instead of _inetd when referencing inetd rc.d script This was a discrepancy between ^/projects/building-blocks and ^/head that I didn't resolve before committing the change to ^/head Pointyhat to: me Reported by: jhb Sponsored by: EMC / Isilon Storage Division r278466: Remove explicit routing/sendmail rc.d inclusion in FILES Reported by: Guy Yur Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Tue Mar 24 07:11:54 2015 (r280421) +++ stable/10/etc/rc.d/Makefile Tue Mar 24 07:43:58 2015 (r280422) @@ -18,7 +18,6 @@ FILES= DAEMON \ auditdistd \ bgfsck \ ${_bluetooth} \ - bootparams \ bridge \ ${_bthidd} \ cleanvar \ @@ -34,8 +33,6 @@ FILES= DAEMON \ dumpon \ faith \ fsck \ - ftp-proxy \ - ftpd \ gbde \ geli \ geli2 \ @@ -45,7 +42,6 @@ FILES= DAEMON \ hostid \ hostid_save \ hostname \ - inetd \ initrandom \ ip6addrctl \ ipfilter \ @@ -57,7 +53,6 @@ FILES= DAEMON \ ${_ipxrouted} \ ${_kadmind} \ ${_kdc} \ - keyserv \ ${_kfd} \ kld \ kldxref \ @@ -74,7 +69,6 @@ FILES= DAEMON \ mdconfig \ mdconfig2 \ mountd \ - moused \ mroute6d \ mrouted \ msgs \ @@ -90,15 +84,12 @@ FILES= DAEMON \ nisdomain \ ${_nscd} \ nsswitch \ - ntpd \ ntpdate \ ${_opensm} \ - othermta \ pf \ pflog \ pfsync \ postrandom \ - powerd \ ppp \ pppoed \ pwcheck \ @@ -110,16 +101,13 @@ FILES= DAEMON \ rfcomm_pppd_server \ root \ route6d \ - routed \ routing \ rpcbind \ rtadvd \ rtsold \ - rwho \ savecore \ sdpd \ securelevel \ - sendmail \ serial \ sppp \ ${_sshd} \ @@ -129,10 +117,8 @@ FILES= DAEMON \ stf \ swap \ swaplate \ - syscons \ sysctl \ syslogd \ - timed \ tmp \ ${_ubthidhci} \ ugidfw \ @@ -158,6 +144,10 @@ FILES+= accounting FILES+= power_profile .endif +.if ${MK_ACPI} != "no" || ${MK_APM} != "no" +FILES+= powerd +.endif + .if ${MK_AMD} != "no" FILES+= amd .endif @@ -180,6 +170,10 @@ _hcsecd= hcsecd _ubthidhci= ubthidhci .endif +.if ${MK_BOOTPARAMD} != "no" +FILES+= bootparams +.endif + .if ${MK_BSNMP} != "no" FILES+= bsnmpd .endif @@ -188,6 +182,10 @@ FILES+= bsnmpd FILES+= ccd .endif +.if ${MK_FTP} != "no" +FILES+= ftpd +.endif + .if ${MK_HAST} != "no" FILES+= hastd .endif @@ -196,6 +194,10 @@ FILES+= hastd _ipxrouted= ipxrouted .endif +.if ${MK_INETD} != "no" +FILES+= inetd +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid @@ -214,22 +216,59 @@ _kfd= kfd _kpasswdd= kpasswdd .endif +.if ${MK_LEGACY_CONSOLE} != "no" +FILES+= moused +FILES+= syscons +.endif + .if ${MK_LPR} != "no" FILES+= lpd .endif +.if ${MK_MAIL} != "no" +FILES+= othermta +.endif + .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif +.if ${MK_NTP} != "no" +FILES+= ntpd +.endif + .if ${MK_OFED} != "no" _opensm= opensm .endif +.if ${MK_OPENSSL} != "no" +FILES+= keyserv +.endif + .if ${MK_OPENSSH} != "no" _sshd= sshd .endif +.if ${MK_PF} != "no" +FILES+= ftp-proxy +.endif + +.if ${MK_RCMDS} != "no" +FILES+= rwho +.endif + +.if ${MK_ROUTED} != "no" +FILES+= routed +.endif + +.if ${MK_SENDMAIL} != "no" +FILES+= sendmail +.endif + +.if ${MK_TIMED} != "no" +FILES+= timed +.endif + .if ${MK_UNBOUND} != "no" _unbound= local_unbound .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 07:11:54 2015 (r280421) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 07:43:58 2015 (r280422) @@ -3692,9 +3692,9 @@ OLD_FILES+=usr/libexec/ssh-pkcs11-helper OLD_FILES+=usr/sbin/sshd .endif -#.if ${MK_OPENSSL} == no -# to be filled in -#.endif +.if ${MK_OPENSSL} == no +OLD_FILES+=etc/rc.d/keyserv +.endif .if ${MK_PC_SYSINSTALL} == no # backend-partmanager @@ -3788,6 +3788,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinsta .if ${MK_PF} == no OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os +OLD_FILES+=etc/rc.d/ftp-proxy OLD_FILES+=sbin/pfctl OLD_FILES+=sbin/pflogd OLD_FILES+=usr/libexec/tftp-proxy @@ -3975,6 +3976,7 @@ OLD_FILES+=usr/lib/private/libssh_p.a .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp +OLD_FILES+=etc/rc.d/rwho OLD_FILES+=etc/periodic/daily/140.clean-rwho OLD_FILES+=etc/periodic/daily/430.status-rwho OLD_FILES+=rescue/rcp From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 07:47:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 9171ED63; Tue, 24 Mar 2015 07:47:47 +0000 (UTC) Date: Tue, 24 Mar 2015 07:47:47 +0000 From: Alexey Dokuchaev To: Adrian Chadd Subject: Re: svn commit: r280406 - vendor/lua/5.3.0 Message-ID: <20150324074747.GB40112@FreeBSD.org> References: <201503240001.t2O01V1T085589@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Rui Paulo , svn-src-vendor@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 07:47:47 -0000 On Mon, Mar 23, 2015 at 05:06:03PM -0700, Adrian Chadd wrote: > [snip] > > [gets coffee and popcorn] +1. I briefly had a thought if perhaps April suddenly arrived unnoticed. ./danfe From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 08:06:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 754EC14F; Tue, 24 Mar 2015 08:06:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DDD4D86; Tue, 24 Mar 2015 08:06:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O86mAp017057; Tue, 24 Mar 2015 08:06:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O86khw017048; Tue, 24 Mar 2015 08:06:46 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240806.t2O86khw017048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 08:06:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280423 - in stable/9: etc include share/man/man4 share/man/man9 share/misc tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 08:06:48 -0000 Author: ngie Date: Tue Mar 24 08:06:45 2015 New Revision: 280423 URL: https://svnweb.freebsd.org/changeset/base/280423 Log: MFstable/10 r280419,r280420: r280419: MFC r278135,r278202: r278135 (by amdmi3): - Remove more files when MK_USB == no Reviewed by: ngie Approved by: ngie Differential Revision: D1600 r278202: Clean up more usb related files when MK_USB == no when dealing with manpages, libraries, and binaries Sponsored by: EMC / Isilon Storage Division r280420: Forced commit to note that the previous commit to this file included the following MFC as well: MFC 278251: Honor the following flags for items that can be conditionalized out of the build/install without disrupting other dependent services (see r278249, et al): - MK_LOCATE - MK_MAN - MK_NLS - MK_OPENSSL - MK_PKGBOOTSTRAP - MK_SENDMAIL Additional flags need to be handled in etc/Makefile, but it requires refactoring the relevant scripts in etc/rc.d/* Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/Makefile stable/9/include/Makefile stable/9/share/man/man4/Makefile stable/9/share/man/man9/Makefile stable/9/share/misc/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/include/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/share/man/man9/ (props changed) stable/9/share/misc/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/Makefile ============================================================================== --- stable/9/etc/Makefile Tue Mar 24 07:43:58 2015 (r280422) +++ stable/9/etc/Makefile Tue Mar 24 08:06:45 2015 (r280423) @@ -40,7 +40,6 @@ BIN1= crontab \ rc.bsdextended \ rc.firewall \ rc.initdiskless \ - rc.sendmail \ rc.shutdown \ rc.subr \ remote \ @@ -49,7 +48,7 @@ BIN1= crontab \ shells \ sysctl.conf \ syslog.conf \ - termcap.small + termcap.small \ .if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "powerpc64" BIN1+= libmap32.conf @@ -136,6 +135,10 @@ BIN1+= portsnap.conf BIN1+= pf.os .endif +.if ${MK_SENDMAIL} != "no" +BIN1+= rc.sendmail +.endif + .if ${MK_TCSH} != "no" BIN1+= csh.cshrc csh.login csh.logout .endif @@ -237,7 +240,9 @@ distribution: ${_+_}cd ${.CURDIR}/devd; ${MAKE} install ${_+_}cd ${.CURDIR}/gss; ${MAKE} install ${_+_}cd ${.CURDIR}/periodic; ${MAKE} install +.if ${MK_PKGBOOTSTRAP} != "no" ${_+_}cd ${.CURDIR}/pkg; ${MAKE} install +.endif ${_+_}cd ${.CURDIR}/rc.d; ${MAKE} install ${_+_}cd ${.CURDIR}/../share/termcap; ${MAKE} etc-termcap ${_+_}cd ${.CURDIR}/../usr.sbin/rmt; ${MAKE} etc-rmt @@ -302,8 +307,10 @@ distribution: .endif ${INSTALL} -o ${BINOWN} -g operator -m 664 /dev/null \ ${DESTDIR}/etc/dumpdates +.if ${MK_LOCATE} != "no" ${INSTALL} -o nobody -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/db/locate.database +.endif ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${.CURDIR}/minfree \ ${DESTDIR}/var/crash cd ${.CURDIR}/..; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ @@ -372,6 +379,7 @@ distrib-dirs: ${MTREES:N/*} done; true .endif ${INSTALL_SYMLINK} usr/src/sys ${DESTDIR}/sys +.if ${MK_MAN} != "no" cd ${DESTDIR}/usr/share/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ @@ -379,23 +387,30 @@ distrib-dirs: ${MTREES:N/*} ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/man/en.UTF-8/; \ done +.if ${MK_OPENSSL} != "no" cd ${DESTDIR}/usr/share/openssl/man; \ for mandir in man*; do \ ${INSTALL_SYMLINK} ../$$mandir \ ${DESTDIR}/usr/share/openssl/man/en.ISO8859-1/; \ done +.endif set - `grep "^[a-zA-Z]" ${.CURDIR}/man.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/man/$$1"; \ - ${INSTALL_SYMLINK} "$$2" \ - "${DESTDIR}/usr/share/openssl/man/$$1"; \ + if [ "${MK_OPENSSL}" != "no" ]; then \ + ${INSTALL_SYMLINK} "$$2" \ + "${DESTDIR}/usr/share/openssl/man/$$1"; \ + fi; \ shift; shift; \ done +.endif +.if ${MK_NLS} != "no" set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \ while [ $$# -gt 0 ] ; do \ ${INSTALL_SYMLINK} "$$2" "${DESTDIR}/usr/share/nls/$$1"; \ shift; shift; \ done +.endif etc-examples: cd ${.CURDIR}; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ Modified: stable/9/include/Makefile ============================================================================== --- stable/9/include/Makefile Tue Mar 24 07:43:58 2015 (r280422) +++ stable/9/include/Makefile Tue Mar 24 08:06:45 2015 (r280423) @@ -46,7 +46,7 @@ LSUBDIRS= cam/ata cam/scsi \ dev/hwpmc \ dev/ic dev/iicbus ${_dev_ieee488} dev/io dev/lmc dev/mfi dev/nvme \ dev/ofw dev/pbio dev/pci ${_dev_powermac_nvram} dev/ppbus dev/smbus \ - dev/speaker dev/usb dev/utopia dev/vkbd dev/wi \ + dev/speaker dev/utopia dev/vkbd dev/wi \ fs/devfs fs/fdescfs fs/fifofs fs/msdosfs fs/nfs fs/ntfs fs/nullfs \ ${_fs_nwfs} fs/portalfs fs/procfs fs/smbfs fs/udf fs/unionfs \ geom/cache geom/concat geom/eli geom/gate geom/journal geom/label \ @@ -58,6 +58,10 @@ LSUBDIRS= cam/ata cam/scsi \ security/mac_mls security/mac_partition \ ufs/ffs ufs/ufs +.if ${MK_USB} != "no" +LSUBDIRS+= dev/usb +.endif + LSUBSUBDIRS= dev/mpt/mpilib .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Tue Mar 24 07:43:58 2015 (r280422) +++ stable/9/share/man/man4/Makefile Tue Mar 24 08:06:45 2015 (r280423) @@ -475,50 +475,6 @@ MAN= aac.4 \ tws.4 \ tx.4 \ txp.4 \ - u3g.4 \ - uark.4 \ - uart.4 \ - uath.4 \ - ubsa.4 \ - ubsec.4 \ - ubser.4 \ - ubtbcmfw.4 \ - uchcom.4 \ - ucom.4 \ - ucycom.4 \ - udav.4 \ - udbp.4 \ - udp.4 \ - uep.4 \ - ufm.4 \ - ufoma.4 \ - uftdi.4 \ - ugen.4 \ - uhci.4 \ - uhid.4 \ - uhso.4 \ - uipaq.4 \ - ukbd.4 \ - ulpt.4 \ - umass.4 \ - umcs.4 \ - umct.4 \ - umodem.4 \ - ums.4 \ - unix.4 \ - upgt.4 \ - uplcom.4 \ - ural.4 \ - urio.4 \ - urndis.4 \ - ${_urtw.4} \ - usb.4 \ - usb_template.4 \ - usb_quirk.4 \ - uslcom.4 \ - utopia.4 \ - uvisor.4 \ - uvscom.4 \ vga.4 \ vge.4 \ viapm.4 \ @@ -688,13 +644,6 @@ MLINKS+=tl.4 if_tl.4 MLINKS+=tun.4 if_tun.4 MLINKS+=tx.4 if_tx.4 MLINKS+=txp.4 if_txp.4 -MLINKS+=u3g.4 u3gstub.4 -MLINKS+=uath.4 if_uath.4 -MLINKS+=udav.4 if_udav.4 -MLINKS+=upgt.4 if_upgt.4 -MLINKS+=ural.4 if_ural.4 -MLINKS+=urndis.4 if_urndis.4 -MLINKS+=${_urtw.4} ${_if_urtw.4} MLINKS+=vge.4 if_vge.4 MLINKS+=vlan.4 if_vlan.4 MLINKS+=vpo.4 imm.4 @@ -806,4 +755,59 @@ SUBDIR= man4.${MACHINE_CPUARCH} _ccd.4= ccd.4 .endif +.if ${MK_USB} != "no" +MAN+= u3g.4 \ + uark.4 \ + uart.4 \ + uath.4 \ + ubsa.4 \ + ubsec.4 \ + ubser.4 \ + ubtbcmfw.4 \ + uchcom.4 \ + ucom.4 \ + ucycom.4 \ + udav.4 \ + udbp.4 \ + udp.4 \ + uep.4 \ + ufm.4 \ + ufoma.4 \ + uftdi.4 \ + ugen.4 \ + uhci.4 \ + uhid.4 \ + uhso.4 \ + uipaq.4 \ + ukbd.4 \ + ulpt.4 \ + umass.4 \ + umcs.4 \ + umct.4 \ + umodem.4 \ + ums.4 \ + unix.4 \ + upgt.4 \ + uplcom.4 \ + ural.4 \ + urio.4 \ + urndis.4 \ + ${_urtw.4} \ + usb.4 \ + usb_template.4 \ + usb_quirk.4 \ + uslcom.4 \ + utopia.4 \ + uvisor.4 \ + uvscom.4 \ + +MLINKS+=u3g.4 u3gstub.4 +MLINKS+=uath.4 if_uath.4 +MLINKS+=udav.4 if_udav.4 +MLINKS+=upgt.4 if_upgt.4 +MLINKS+=ural.4 if_ural.4 +MLINKS+=urndis.4 if_urndis.4 +MLINKS+=${_urtw.4} ${_if_urtw.4} +.endif + .include Modified: stable/9/share/man/man9/Makefile ============================================================================== --- stable/9/share/man/man9/Makefile Tue Mar 24 07:43:58 2015 (r280422) +++ stable/9/share/man/man9/Makefile Tue Mar 24 08:06:45 2015 (r280423) @@ -1,5 +1,7 @@ # $FreeBSD$ +.include + MAN= accept_filter.9 \ accf_data.9 \ accf_dns.9 \ @@ -265,7 +267,6 @@ MAN= accept_filter.9 \ uidinfo.9 \ uio.9 \ unr.9 \ - usbdi.9 \ utopia.9 \ vaccess.9 \ vaccess_acl_nfs4.9 \ @@ -1353,6 +1354,9 @@ MLINKS+=uidinfo.9 uifind.9 \ uidinfo.9 uihold.9 MLINKS+=uio.9 uiomove.9 \ uio.9 uiomove_nofault.9 + +.if ${MK_USB} != "no" +MAN+= usbdi.9 MLINKS+=usbdi.9 usbd_do_request.9 \ usbdi.9 usbd_do_request_flags.9 \ usbdi.9 usbd_errstr.9 \ @@ -1404,6 +1408,7 @@ MLINKS+=usbdi.9 usbd_do_request.9 \ usbdi.9 usb_fifo_reset.9 \ usbdi.9 usb_fifo_softc.9 \ usbdi.9 usb_fifo_wakeup.9 +.endif MLINKS+=vcount.9 count_dev.9 MLINKS+=vfsconf.9 vfs_modevent.9 \ vfsconf.9 vfs_register.9 \ Modified: stable/9/share/misc/Makefile ============================================================================== --- stable/9/share/misc/Makefile Tue Mar 24 07:43:58 2015 (r280422) +++ stable/9/share/misc/Makefile Tue Mar 24 08:06:45 2015 (r280423) @@ -1,15 +1,22 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/8/93 # $FreeBSD$ +.include + .PATH: ${.CURDIR}/../../sys/dev/usb FILES= ascii birthtoken bsd-family-tree committers-doc.dot committers-ports.dot \ committers-src.dot eqnchar flowers init.ee \ iso3166 iso639 latin1 man.template mdoc.template operator pci_vendors \ - scsi_modes usb_hid_usages usbdevs \ + scsi_modes \ organization.dot NO_OBJ= FILESDIR= ${BINDIR}/misc +.if ${MK_USB} != "no" +FILES+= usb_hid_usages +FILES+= usbdevs +.endif + .include Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 07:43:58 2015 (r280422) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 08:06:45 2015 (r280423) @@ -3938,8 +3938,350 @@ OLD_FILES+=usr/share/man/man8/telnetd.8. #.endif .if ${MK_USB} == no +OLD_FILES+=etc/devd/uath.conf OLD_FILES+=etc/devd/uauth.conf +OLD_FILES+=etc/devd/ulpt.conf OLD_FILES+=etc/devd/usb.conf +OLD_FILES+=usr/bin/usbhidaction +OLD_FILES+=usr/bin/usbhidctl +OLD_FILES+=usr/include/libusb.h +OLD_FILES+=usr/include/libusb20.h +OLD_FILES+=usr/include/libusb20_desc.h +OLD_FILES+=usr/include/usb.h +OLD_FILES+=usr/include/usbhid.h +OLD_FILES+=usr/lib/libusb.a +OLD_FILES+=usr/lib/libusb.so +OLD_LIBS+=usr/lib/libusb.so.3 +OLD_FILES+=usr/lib/libusb_p.a +OLD_FILES+=usr/lib/libusbhid.a +OLD_FILES+=usr/lib/libusbhid.so +OLD_LIBS+=usr/lib/libusbhid.so.4 +OLD_FILES+=usr/lib/libusbhid_p.a +OLD_FILES+=usr/lib32/libusb.a +OLD_FILES+=usr/lib32/libusb.so +OLD_LIBS+=usr/lib32/libusb.so.3 +OLD_FILES+=usr/lib32/libusb_p.a +OLD_FILES+=usr/lib32/libusbhid.a +OLD_FILES+=usr/lib32/libusbhid.so +OLD_LIBS+=usr/lib32/libusbhid.so.4 +OLD_FILES+=usr/lib32/libusbhid_p.a +OLD_FILES+=usr/libdata/pkgconfig/libusb-0.1.pc +OLD_FILES+=usr/libdata/pkgconfig/libusb-1.0.pc +OLD_FILES+=usr/libdata/pkgconfig/libusb-2.0.pc +OLD_FILES+=usr/sbin/uathload +OLD_FILES+=usr/sbin/uhsoctl +OLD_FILES+=usr/sbin/usbconfig +OLD_FILES+=usr/sbin/usbdump +OLD_FILES+=usr/share/man/man1/uhsoctl.1.gz +OLD_FILES+=usr/share/man/man1/usbhidaction.1.gz +OLD_FILES+=usr/share/man/man1/usbhidctl.1.gz +OLD_FILES+=usr/share/man/man3/hid_dispose_report_desc.3.gz +OLD_FILES+=usr/share/man/man3/hid_end_parse.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_data.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_item.3.gz +OLD_FILES+=usr/share/man/man3/hid_get_report_desc.3.gz +OLD_FILES+=usr/share/man/man3/hid_init.3.gz +OLD_FILES+=usr/share/man/man3/hid_locate.3.gz +OLD_FILES+=usr/share/man/man3/hid_report_size.3.gz +OLD_FILES+=usr/share/man/man3/hid_set_data.3.gz +OLD_FILES+=usr/share/man/man3/hid_start_parse.3.gz +OLD_FILES+=usr/share/man/man3/hid_usage_in_page.3.gz +OLD_FILES+=usr/share/man/man3/hid_usage_page.3.gz +OLD_FILES+=usr/share/man/man3/libusb.3.gz +OLD_FILES+=usr/share/man/man3/libusb20.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_add_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_alloc_default.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_dequeue_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_device_foreach.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_enqueue_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_free.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_quirk_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_get_template.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_remove_dev_quirk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_be_set_template.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_desc_foreach.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_alloc_config.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_detach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_free.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_backend_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_bus_number.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_config_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_device_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_fd.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_iface_desc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_info.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_parent_port.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_port_path.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_power_usage.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_get_speed.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_kernel_driver_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_process.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_simple_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_req_string_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_request_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_reset.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_alt_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_config_index.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_set_power_mode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_dev_wait_process.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_error_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_decode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_encode.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_get_1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_me_get_2.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_strerror.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_bulk_intr_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_callback_wrapper.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_clear_stall_sync.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_drain.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_actual_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_packet_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_max_total_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_pointer.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc0.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_priv_sc1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_status.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_get_time_complete.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_pending.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_buffer.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_callback.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_flags.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_length.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc0.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_priv_sc1.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_set_total_frames.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_bulk.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_control.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_intr.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_setup_isoc.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_start.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_stop.3.gz +OLD_FILES+=usr/share/man/man3/libusb20_tr_submit.3.gz +OLD_FILES+=usr/share/man/man3/libusb_alloc_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_attach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_bulk_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_cancel_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/libusb_claim_interface.3.gz +OLD_FILES+=usr/share/man/man3/libusb_clear_halt.3.gz +OLD_FILES+=usr/share/man/man3/libusb_close.3.gz +OLD_FILES+=usr/share/man/man3/libusb_control_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_detach_kernel_driver_np.3.gz +OLD_FILES+=usr/share/man/man3/libusb_error_name.3.gz +OLD_FILES+=usr/share/man/man3/libusb_event_handler_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb_event_handling_ok.3.gz +OLD_FILES+=usr/share/man/man3/libusb_exit.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_bos_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_device_list.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_ss_endpoint_comp.3.gz +OLD_FILES+=usr/share/man/man3/libusb_free_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_active_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_bus_number.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_config_descriptor_by_value.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_configuration.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_address.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_list.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_device_speed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_driver.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_driver_np.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_max_iso_packet_size.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_max_packet_size.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_next_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_pollfds.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_get_string_descriptor_ascii.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_completed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_locked.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout.3.gz +OLD_FILES+=usr/share/man/man3/libusb_handle_events_timeout_completed.3.gz +OLD_FILES+=usr/share/man/man3/libusb_init.3.gz +OLD_FILES+=usr/share/man/man3/libusb_interrupt_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_kernel_driver_active.3.gz +OLD_FILES+=usr/share/man/man3/libusb_lock_event_waiters.3.gz +OLD_FILES+=usr/share/man/man3/libusb_lock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_open.3.gz +OLD_FILES+=usr/share/man/man3/libusb_open_device_with_vid_pid.3.gz +OLD_FILES+=usr/share/man/man3/libusb_parse_bos_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/libusb_parse_ss_endpoint_comp.3.gz +OLD_FILES+=usr/share/man/man3/libusb_ref_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_release_interface.3.gz +OLD_FILES+=usr/share/man/man3/libusb_reset_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_configuration.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_interface_alt_setting.3.gz +OLD_FILES+=usr/share/man/man3/libusb_set_pollfd_notifiers.3.gz +OLD_FILES+=usr/share/man/man3/libusb_strerror.3.gz +OLD_FILES+=usr/share/man/man3/libusb_submit_transfer.3.gz +OLD_FILES+=usr/share/man/man3/libusb_try_lock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unlock_event_waiters.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unlock_events.3.gz +OLD_FILES+=usr/share/man/man3/libusb_unref_device.3.gz +OLD_FILES+=usr/share/man/man3/libusb_wait_for_event.3.gz +OLD_FILES+=usr/share/man/man3/libusbhid.3.gz +OLD_FILES+=usr/share/man/man3/usb.3.gz +OLD_FILES+=usr/share/man/man3/usb_bulk_read.3.gz +OLD_FILES+=usr/share/man/man3/usb_bulk_write.3.gz +OLD_FILES+=usr/share/man/man3/usb_check_connected.3.gz +OLD_FILES+=usr/share/man/man3/usb_claim_interface.3.gz +OLD_FILES+=usr/share/man/man3/usb_clear_halt.3.gz +OLD_FILES+=usr/share/man/man3/usb_close.3.gz +OLD_FILES+=usr/share/man/man3/usb_control_msg.3.gz +OLD_FILES+=usr/share/man/man3/usb_destroy_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_device.3.gz +OLD_FILES+=usr/share/man/man3/usb_fetch_and_parse_descriptors.3.gz +OLD_FILES+=usr/share/man/man3/usb_find_busses.3.gz +OLD_FILES+=usr/share/man/man3/usb_find_devices.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_busses.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_descriptor_by_endpoint.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_string.3.gz +OLD_FILES+=usr/share/man/man3/usb_get_string_simple.3.gz +OLD_FILES+=usr/share/man/man3/usb_init.3.gz +OLD_FILES+=usr/share/man/man3/usb_interrupt_read.3.gz +OLD_FILES+=usr/share/man/man3/usb_interrupt_write.3.gz +OLD_FILES+=usr/share/man/man3/usb_open.3.gz +OLD_FILES+=usr/share/man/man3/usb_parse_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_parse_descriptor.3.gz +OLD_FILES+=usr/share/man/man3/usb_release_interface.3.gz +OLD_FILES+=usr/share/man/man3/usb_reset.3.gz +OLD_FILES+=usr/share/man/man3/usb_resetep.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_altinterface.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_configuration.3.gz +OLD_FILES+=usr/share/man/man3/usb_set_debug.3.gz +OLD_FILES+=usr/share/man/man3/usb_strerror.3.gz +OLD_FILES+=usr/share/man/man3/usbhid.3.gz +OLD_FILES+=usr/share/man/man4/u3g.4.gz +OLD_FILES+=usr/share/man/man4/u3gstub.4.gz +OLD_FILES+=usr/share/man/man4/uark.4.gz +OLD_FILES+=usr/share/man/man4/uart.4.gz +OLD_FILES+=usr/share/man/man4/uath.4.gz +OLD_FILES+=usr/share/man/man4/ubsa.4.gz +OLD_FILES+=usr/share/man/man4/ubsec.4.gz +OLD_FILES+=usr/share/man/man4/ubser.4.gz +OLD_FILES+=usr/share/man/man4/ubtbcmfw.4.gz +OLD_FILES+=usr/share/man/man4/uchcom.4.gz +OLD_FILES+=usr/share/man/man4/ucom.4.gz +OLD_FILES+=usr/share/man/man4/ucycom.4.gz +OLD_FILES+=usr/share/man/man4/udav.4.gz +OLD_FILES+=usr/share/man/man4/udbp.4.gz +OLD_FILES+=usr/share/man/man4/udp.4.gz +OLD_FILES+=usr/share/man/man4/udplite.4.gz +OLD_FILES+=usr/share/man/man4/uep.4.gz +OLD_FILES+=usr/share/man/man4/ufm.4.gz +OLD_FILES+=usr/share/man/man4/ufoma.4.gz +OLD_FILES+=usr/share/man/man4/uftdi.4.gz +OLD_FILES+=usr/share/man/man4/ugen.4.gz +OLD_FILES+=usr/share/man/man4/uhci.4.gz +OLD_FILES+=usr/share/man/man4/uhid.4.gz +OLD_FILES+=usr/share/man/man4/uhso.4.gz +OLD_FILES+=usr/share/man/man4/uipaq.4.gz +OLD_FILES+=usr/share/man/man4/ukbd.4.gz +OLD_FILES+=usr/share/man/man4/uled.4.gz +OLD_FILES+=usr/share/man/man4/ulpt.4.gz +OLD_FILES+=usr/share/man/man4/umass.4.gz +OLD_FILES+=usr/share/man/man4/umcs.4.gz +OLD_FILES+=usr/share/man/man4/umct.4.gz +OLD_FILES+=usr/share/man/man4/umodem.4.gz +OLD_FILES+=usr/share/man/man4/umoscom.4.gz +OLD_FILES+=usr/share/man/man4/ums.4.gz +OLD_FILES+=usr/share/man/man4/unix.4.gz +OLD_FILES+=usr/share/man/man4/upgt.4.gz +OLD_FILES+=usr/share/man/man4/uplcom.4.gz +OLD_FILES+=usr/share/man/man4/ural.4.gz +OLD_FILES+=usr/share/man/man4/urio.4.gz +OLD_FILES+=usr/share/man/man4/urndis.4.gz +OLD_FILES+=usr/share/man/man4/urtw.4.gz +OLD_FILES+=usr/share/man/man4/urtwn.4.gz +OLD_FILES+=usr/share/man/man4/urtwnfw.4.gz +OLD_FILES+=usr/share/man/man4/usb.4.gz +OLD_FILES+=usr/share/man/man4/usb_quirk.4.gz +OLD_FILES+=usr/share/man/man4/usb_template.4.gz +OLD_FILES+=usr/share/man/man4/usfs.4.gz +OLD_FILES+=usr/share/man/man4/uslcom.4.gz +OLD_FILES+=usr/share/man/man4/utopia.4.gz +OLD_FILES+=usr/share/man/man4/uvisor.4.gz +OLD_FILES+=usr/share/man/man4/uvscom.4.gz +OLD_FILES+=usr/share/man/man8/uathload.8.gz +OLD_FILES+=usr/share/man/man8/usbconfig.8.gz +OLD_FILES+=usr/share/man/man8/usbdump.8.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_alloc_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_attach.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_detach.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_free_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_error.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_get_data_linear.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_bytes_max.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_buffer.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_error.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_put_data_linear.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_reset.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_softc.9.gz +OLD_FILES+=usr/share/man/man9/usb_fifo_wakeup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_do_request.9.gz +OLD_FILES+=usr/share/man/man9/usbd_do_request_flags.9.gz +OLD_FILES+=usr/share/man/man9/usbd_errstr.9.gz +OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_info.9.gz +OLD_FILES+=usr/share/man/man9/usbd_lookup_id_by_uaa.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_clear_stall.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_drain.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_pending.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_poll.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_setup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_start.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_stop.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_submit.9.gz +OLD_FILES+=usr/share/man/man9/usbd_transfer_unsetup.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_clr_flag.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_data.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_frame_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_get_frame.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_get_priv.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_is_stalled.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_framelen.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_frames.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_max_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_flag.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_data.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_len.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frame_offset.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_frames.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_interval.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_priv.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_stall.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_set_timeout.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_softc.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_state.9.gz +OLD_FILES+=usr/share/man/man9/usbd_xfer_status.9.gz +OLD_FILES+=usr/share/man/man9/usbdi.9.gz +OLD_FILES+=usr/share/misc/usb_hid_usages +OLD_FILES+=usr/share/misc/usbdevs .endif .if ${MK_UTMPX} == no From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 08:18:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9EC39319; Tue, 24 Mar 2015 08:18:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 898E5E64; Tue, 24 Mar 2015 08:18:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O8IPYl022068; Tue, 24 Mar 2015 08:18:25 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O8IPlJ022067; Tue, 24 Mar 2015 08:18:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503240818.t2O8IPlJ022067@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Mar 2015 08:18:25 +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: r280424 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 08:18:25 -0000 Author: kib Date: Tue Mar 24 08:18:24 2015 New Revision: 280424 URL: https://svnweb.freebsd.org/changeset/base/280424 Log: MFC r280195: When inserting new entry into the address map, ensure that not only next entry does not intersect with the tail of the new entry, but also that previous entry is also before new entry start. Modified: stable/10/sys/x86/iommu/intel_gas.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_gas.c ============================================================================== --- stable/10/sys/x86/iommu/intel_gas.c Tue Mar 24 08:06:45 2015 (r280423) +++ stable/10/sys/x86/iommu/intel_gas.c Tue Mar 24 08:18:24 2015 (r280424) @@ -366,7 +366,8 @@ dmar_gas_match_insert(struct dmar_gas_ma next = RB_NEXT(dmar_gas_entries_tree, &a->ctx->rb_root, prev); KASSERT(next->start >= a->entry->end && - next->start - a->entry->start >= a->size, + next->start - a->entry->start >= a->size && + prev->end <= a->entry->end, ("dmar_gas_match_insert hole failed %p prev (%jx, %jx) " "free_after %jx next (%jx, %jx) entry (%jx, %jx)", a->ctx, (uintmax_t)prev->start, (uintmax_t)prev->end, From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 08:21:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F405468; Tue, 24 Mar 2015 08:21:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A0D1F07; Tue, 24 Mar 2015 08:21:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O8LbkQ025620; Tue, 24 Mar 2015 08:21:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O8LbNI025600; Tue, 24 Mar 2015 08:21:37 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503240821.t2O8LbNI025600@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Mar 2015 08:21: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: r280425 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 08:21:37 -0000 Author: kib Date: Tue Mar 24 08:21:36 2015 New Revision: 280425 URL: https://svnweb.freebsd.org/changeset/base/280425 Log: MFC r280196: Recheck that boundary is not crossed after the move to satisfy boundary restriction. Modified: stable/10/sys/x86/iommu/intel_gas.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_gas.c ============================================================================== --- stable/10/sys/x86/iommu/intel_gas.c Tue Mar 24 08:18:24 2015 (r280424) +++ stable/10/sys/x86/iommu/intel_gas.c Tue Mar 24 08:21:36 2015 (r280425) @@ -327,13 +327,15 @@ dmar_gas_match_one(struct dmar_gas_match start = roundup2(bs, a->common->alignment); /* DMAR_PAGE_SIZE to create gap after new entry. */ if (start + a->size + DMAR_PAGE_SIZE <= prev->end + prev->free_after && - start + a->size <= end) { + start + a->size <= end && dmar_test_boundary(start, a->size, + a->common->boundary)) { a->entry->start = start; return (true); } /* - * Not enough space to align at boundary, but allowed to split. + * Not enough space to align at the requested boundary, or + * boundary is smaller than the size, but allowed to split. * We already checked that start + size does not overlap end. * * XXXKIB. It is possible that bs is exactly at the start of From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 08:22:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB5CF5A4; Tue, 24 Mar 2015 08:22:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 953C2F16; Tue, 24 Mar 2015 08:22:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O8MnvK026130; Tue, 24 Mar 2015 08:22:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O8MnmN026125; Tue, 24 Mar 2015 08:22:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240822.t2O8MnmN026125@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 08:22:49 +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: r280426 - in stable/9: etc/rc.d tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 08:22:49 -0000 Author: ngie Date: Tue Mar 24 08:22:48 2015 New Revision: 280426 URL: https://svnweb.freebsd.org/changeset/base/280426 Log: MFstable/10 r278052,r278190,r278191,r278574,r278575,r280422: r278052: MFC r271892: r271892: Sort the optional rc.d scripts by their knobs Sponsored by: EMC / Isilon Storage Division r278190: MFC r277732: r277732: Honor MK_API in etc/rc.d Sponsored by: EMC / Isilon Storage Division r278191: MFC r277733: r277733: Honor MK_AMD with etc/rc.d/amd Sponsored by: EMC / Isilon Storage Division r278574: MFC r277736: r277736: Honor MK_ACCT with etc/rc.d/accounting Sponsored by: EMC / Isilon Storage Division r278575: Remove etc/rc.d/accounting from FILES r280422: MFC r271893,r271895,r272043,r278249,r278282,r278466: r271893: Don't install /etc/rc.d/rwho unless MK_RCMDS == yes Sponsored by: EMC / Isilon Storage Division r271895: Don't install /etc/rc.d/ftp-proxy unless MK_PF == yes Sponsored by: EMC / Isilon Storage Division r272043: Don't install /etc/rc.d/keyserv unless MK_OPENSSL == yes Sponsored by: EMC / Isilon Storage Division r278249: Honor the following flags with the following rc.d scripts for services that can be easily decoupled from the boot process without disrupting other services - MK_APM && MK_ACPI: powerd - MK_BOOTPARAMD: bootparams - MK_FTP: ftpd - MK_INETD: inetd - MK_LEGACY_CONSOLE: moused, syscons - MK_MAIL: othermta - MK_NS_CACHING: nscd - MK_NTP: ntpd (ntpdate is required by other services and can't be easily conditionalized -- yet..) - MK_ROUTED: routed - MK_SENDMAIL: sendmail - MK_TIMED: timed - MK_VI: virecover Sponsored by: EMC / Isilon Storage Division r278282: Use FILES+= idiom instead of _inetd when referencing inetd rc.d script This was a discrepancy between ^/projects/building-blocks and ^/head that I didn't resolve before committing the change to ^/head Pointyhat to: me Reported by: jhb Sponsored by: EMC / Isilon Storage Division r278466: Remove explicit routing/sendmail rc.d inclusion in FILES Reported by: Guy Yur Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Tue Mar 24 08:21:36 2015 (r280425) +++ stable/9/etc/rc.d/Makefile Tue Mar 24 08:22:48 2015 (r280426) @@ -18,7 +18,6 @@ FILES= DAEMON \ auditdistd \ bgfsck \ ${_bluetooth} \ - bootparams \ bridge \ ${_bthidd} \ cleanvar \ @@ -34,8 +33,6 @@ FILES= DAEMON \ encswap \ faith \ fsck \ - ftp-proxy \ - ftpd \ gbde \ geli \ geli2 \ @@ -45,7 +42,6 @@ FILES= DAEMON \ hostid \ hostid_save \ hostname \ - inetd \ initrandom \ ip6addrctl \ ipfilter \ @@ -57,7 +53,6 @@ FILES= DAEMON \ ${_ipxrouted} \ kadmind \ kerberos \ - keyserv \ kld \ kldxref \ kpasswdd \ @@ -73,7 +68,6 @@ FILES= DAEMON \ mdconfig \ mdconfig2 \ mountd \ - moused \ mroute6d \ mrouted \ msgs \ @@ -90,14 +84,11 @@ FILES= DAEMON \ nisdomain \ ${_nscd} \ nsswitch \ - ntpd \ ntpdate \ ${_opensm} \ - othermta \ pf \ pflog \ pfsync \ - powerd \ ppp \ pppoed \ pwcheck \ @@ -109,16 +100,13 @@ FILES= DAEMON \ rfcomm_pppd_server \ root \ route6d \ - routed \ routing \ rpcbind \ rtadvd \ rtsold \ - rwho \ savecore \ sdpd \ securelevel \ - sendmail \ serial \ sppp \ ${_sshd} \ @@ -127,10 +115,8 @@ FILES= DAEMON \ static_ndp \ stf \ swap1 \ - syscons \ sysctl \ syslogd \ - timed \ tmp \ ${_ubthidhci} \ ugidfw \ @@ -150,19 +136,34 @@ FILES= DAEMON \ FILES+= accounting .endif -.if ${MK_AMD} != "no" -FILES+= amd -.endif - .if ${MK_ACPI} != "no" FILES+= power_profile .endif +.if ${MK_ACPI} != "no" || ${MK_APM} != "no" +FILES+= powerd +.endif + +.if ${MK_AMD} != "no" +FILES+= amd +.endif + .if ${MK_APM} != "no" FILES+= apm FILES+= apmd .endif +.if ${MK_BLUETOOTH} != "no" +_bluetooth= bluetooth +_bthidd= bthidd +_hcsecd= hcsecd +_ubthidhci= ubthidhci +.endif + +.if ${MK_BOOTPARAMD} != "no" +FILES+= bootparams +.endif + .if ${MK_BSNMP} != "no" FILES+= bsnmpd .endif @@ -171,10 +172,18 @@ FILES+= bsnmpd FILES+= ccd .endif +.if ${MK_FTP} != "no" +FILES+= ftpd +.endif + .if ${MK_HAST} != "no" FILES+= hastd .endif +.if ${MK_INETD} != "no" +FILES+= inetd +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif @@ -183,27 +192,57 @@ _ipxrouted= ipxrouted FILES+= jail .endif +.if ${MK_LEGACY_CONSOLE} != "no" +FILES+= moused +FILES+= syscons +.endif + .if ${MK_LPR} != "no" FILES+= lpd .endif +.if ${MK_MAIL} != "no" +FILES+= othermta +.endif + +.if ${MK_NS_CACHING} != "no" +_nscd= nscd +.endif + +.if ${MK_NTP} != "no" +FILES+= ntpd +.endif + .if ${MK_OFED} != "no" _opensm= opensm .endif +.if ${MK_OPENSSL} != "no" +FILES+= keyserv +.endif + .if ${MK_OPENSSH} != "no" _sshd= sshd .endif -.if ${MK_NS_CACHING} != "no" -_nscd= nscd +.if ${MK_PF} != "no" +FILES+= ftp-proxy .endif -.if ${MK_BLUETOOTH} != "no" -_bluetooth= bluetooth -_bthidd= bthidd -_hcsecd= hcsecd -_ubthidhci= ubthidhci +.if ${MK_RCMDS} != "no" +FILES+= rwho +.endif + +.if ${MK_ROUTED} != "no" +FILES+= routed +.endif + +.if ${MK_SENDMAIL} != "no" +FILES+= sendmail +.endif + +.if ${MK_TIMED} != "no" +FILES+= timed .endif .if ${MK_WIRELESS} != "no" Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 08:21:36 2015 (r280425) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Tue Mar 24 08:22:48 2015 (r280426) @@ -3303,9 +3303,9 @@ OLD_FILES+=usr/libexec/ssh-pkcs11-helper OLD_FILES+=usr/sbin/sshd .endif -#.if ${MK_OPENSSL} == no -# to be filled in -#.endif +.if ${MK_OPENSSL} == no +OLD_FILES+=etc/rc.d/keyserv +.endif .if ${MK_SYSINSTALL} == no OLD_FILES+=usr/sbin/sysinstall @@ -3414,6 +3414,7 @@ OLD_DIRS+=usr/share/examples/pc-sysinsta .if ${MK_PF} == no OLD_FILES+=etc/periodic/security/520.pfdenied OLD_FILES+=etc/pf.os +OLD_FILES+=etc/rc.d/ftp-proxy OLD_FILES+=sbin/pfctl OLD_FILES+=sbin/pflogd OLD_FILES+=usr/libexec/tftp-proxy @@ -3596,6 +3597,7 @@ OLD_FILES+=usr/lib/private/libssh_p.a .if ${MK_RCMDS} == no OLD_FILES+=bin/rcp +OLD_FILES+=etc/rc.d/rwho OLD_FILES+=etc/periodic/daily/140.clean-rwho OLD_FILES+=etc/periodic/daily/430.status-rwho OLD_FILES+=rescue/rcp From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 08:24:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96D2D705; Tue, 24 Mar 2015 08:24:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 818E0F32; Tue, 24 Mar 2015 08:24:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O8OuPI026457; Tue, 24 Mar 2015 08:24:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O8Ouap026456; Tue, 24 Mar 2015 08:24:56 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240824.t2O8Ouap026456@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 08:24:56 +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: r280427 - stable/10/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 08:24:56 -0000 Author: ngie Date: Tue Mar 24 08:24:55 2015 New Revision: 280427 URL: https://svnweb.freebsd.org/changeset/base/280427 Log: MFC r278204: Sort the entries by build knob, then MACHINE_ARCH like other areas of the tree Sponsored by: EMC / Isilon Storage Division Modified: stable/10/include/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/include/Makefile ============================================================================== --- stable/10/include/Makefile Tue Mar 24 08:22:48 2015 (r280426) +++ stable/10/include/Makefile Tue Mar 24 08:24:55 2015 (r280427) @@ -58,14 +58,10 @@ LSUBDIRS= cam/ata cam/scsi \ security/mac_mls security/mac_partition \ ufs/ffs ufs/ufs -.if ${MK_USB} != "no" -LSUBDIRS+= dev/usb -.endif - LSUBSUBDIRS= dev/mpt/mpilib -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" -_dev_powermac_nvram= dev/powermac_nvram +.if ${MK_BLUETOOTH} != "no" +LSUBSUBDIRS+= netgraph/bluetooth/include .endif .if ${MK_GPIB} != "no" @@ -81,10 +77,6 @@ INCS+= gssapi.h INCS+= hesiod.h .endif -.if ${MK_BLUETOOTH} != "no" -LSUBSUBDIRS+= netgraph/bluetooth/include -.endif - # XXX unconditionally needed by #.if ${MK_IPX} != "no" _netipx= netipx @@ -94,7 +86,14 @@ _netipx= netipx .if ${MK_ICONV} == "yes" INCS+= iconv.h .endif - + +.if ${MK_USB} != "no" +LSUBDIRS+= dev/usb +.endif + +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +_dev_powermac_nvram= dev/powermac_nvram +.endif # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 08:27:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE99F852; Tue, 24 Mar 2015 08:27:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99D10F43; Tue, 24 Mar 2015 08:27:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O8R212026815; Tue, 24 Mar 2015 08:27:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O8R2kH026814; Tue, 24 Mar 2015 08:27:02 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503240827.t2O8R2kH026814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 08:27:02 +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: r280428 - stable/9/include X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 08:27:02 -0000 Author: ngie Date: Tue Mar 24 08:27:01 2015 New Revision: 280428 URL: https://svnweb.freebsd.org/changeset/base/280428 Log: MFstable/10 r280427: MFC r278204: Sort the entries by build knob, then MACHINE_ARCH like other areas of the tree Sponsored by: EMC / Isilon Storage Division Modified: stable/9/include/Makefile Directory Properties: stable/9/ (props changed) stable/9/include/ (props changed) Modified: stable/9/include/Makefile ============================================================================== --- stable/9/include/Makefile Tue Mar 24 08:24:55 2015 (r280427) +++ stable/9/include/Makefile Tue Mar 24 08:27:01 2015 (r280428) @@ -58,14 +58,10 @@ LSUBDIRS= cam/ata cam/scsi \ security/mac_mls security/mac_partition \ ufs/ffs ufs/ufs -.if ${MK_USB} != "no" -LSUBDIRS+= dev/usb -.endif - LSUBSUBDIRS= dev/mpt/mpilib -.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" -_dev_powermac_nvram= dev/powermac_nvram +.if ${MK_BLUETOOTH} != "no" +LSUBSUBDIRS+= netgraph/bluetooth/include .endif .if ${MK_GPIB} != "no" @@ -85,10 +81,6 @@ INCS+= hesiod.h INCS+= iconv.h .endif -.if ${MK_BLUETOOTH} != "no" -LSUBSUBDIRS+= netgraph/bluetooth/include -.endif - # XXX unconditionally needed by #.if ${MK_IPX} != "no" _netipx= netipx @@ -99,6 +91,14 @@ _netncp= netncp _fs_nwfs= fs/nwfs .endif +.if ${MK_USB} != "no" +LSUBDIRS+= dev/usb +.endif + +.if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64" +_dev_powermac_nvram= dev/powermac_nvram +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is # probably only useful for developers and should be avoided if you do not From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 09:21:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7C8E4FC; Tue, 24 Mar 2015 09:21:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C30207BA; Tue, 24 Mar 2015 09:21:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O9LsU7053782; Tue, 24 Mar 2015 09:21:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O9Lsjs053781; Tue, 24 Mar 2015 09:21:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503240921.t2O9Lsjs053781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Mar 2015 09:21:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280429 - head/sys/dev/sound/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 09:21:54 -0000 Author: hselasky Date: Tue Mar 24 09:21:53 2015 New Revision: 280429 URL: https://svnweb.freebsd.org/changeset/base/280429 Log: Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. MFC after: 3 days PR: 198444 Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Tue Mar 24 08:27:01 2015 (r280428) +++ head/sys/dev/sound/usb/uaudio.c Tue Mar 24 09:21:53 2015 (r280429) @@ -2026,6 +2026,13 @@ uaudio_chan_play_sync_callback(struct us DPRINTF("Comparing %d Hz :: %d Hz\n", (int)temp, (int)sample_rate); + /* + * Use feedback value as fallback when there is no + * recording channel: + */ + if (ch->priv_sc->sc_rec_chan.num_alt == 0) + ch->jitter_curr = temp - sample_rate; + ch->feedback_rate = temp; break; From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 09:46:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EDAAB54; Tue, 24 Mar 2015 09:46:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8749EA; Tue, 24 Mar 2015 09:46:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2O9kmrm064462; Tue, 24 Mar 2015 09:46:48 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2O9kmIS064461; Tue, 24 Mar 2015 09:46:48 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201503240946.t2O9kmIS064461@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 24 Mar 2015 09:46:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280430 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 09:46:48 -0000 Author: bz Date: Tue Mar 24 09:46:47 2015 New Revision: 280430 URL: https://svnweb.freebsd.org/changeset/base/280430 Log: Make ix_crcstrip a public symbol for the moment; it probably is not the right solution but I will leave it to experts to untangle this problem to properly stop the build failures. At the moment only if_ix.c includes dev/netmap/ixgbe_netmap.h which is good as ixgbe_netmap.h defines a couple of (file) static variables--thus local to if_ix.c. static int ix_crcstrip however now also got checked from ix_txrx.c (as an extern) and should not be visible there. In fact we do see powerpc and powerpc64 build failures because of this. It is unclear to me why on other (clang built?) architectures this does not lead to a reference of an undefined symbol and similar build breakage. Modified: head/sys/dev/netmap/ixgbe_netmap.h Modified: head/sys/dev/netmap/ixgbe_netmap.h ============================================================================== --- head/sys/dev/netmap/ixgbe_netmap.h Tue Mar 24 09:21:53 2015 (r280429) +++ head/sys/dev/netmap/ixgbe_netmap.h Tue Mar 24 09:46:47 2015 (r280430) @@ -61,7 +61,8 @@ * count packets that might be missed due to lost interrupts. */ SYSCTL_DECL(_dev_netmap); -static int ix_rx_miss, ix_rx_miss_bufs, ix_crcstrip; +static int ix_rx_miss, ix_rx_miss_bufs; +int ix_crcstrip; SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip, CTLFLAG_RW, &ix_crcstrip, 0, "strip CRC on rx frames"); SYSCTL_INT(_dev_netmap, OID_AUTO, ix_rx_miss, From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 11:22:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6666A69; Tue, 24 Mar 2015 11:22:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 915F2893; Tue, 24 Mar 2015 11:22:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OBMDZW012311; Tue, 24 Mar 2015 11:22:13 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OBMD1P012310; Tue, 24 Mar 2015 11:22:13 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503241122.t2OBMD1P012310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 24 Mar 2015 11:22:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280431 - head/sys/modules/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 11:22:13 -0000 Author: arybchik Date: Tue Mar 24 11:22:12 2015 New Revision: 280431 URL: https://svnweb.freebsd.org/changeset/base/280431 Log: sfxge: cleanup: remove trailing whitespaces Sponsored by: Solarflare Communications, Inc. Modified: head/sys/modules/sfxge/Makefile Modified: head/sys/modules/sfxge/Makefile ============================================================================== --- head/sys/modules/sfxge/Makefile Tue Mar 24 09:46:47 2015 (r280430) +++ head/sys/modules/sfxge/Makefile Tue Mar 24 11:22:12 2015 (r280431) @@ -14,7 +14,7 @@ SRCS+= sfxge_port.c sfxge_rx.c sfxge_tx. SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${.CURDIR}/../../dev/sfxge/common -SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c +SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c SRCS+= efx_nvram.c efx_phy.c efx_port.c efx_rx.c efx_sram.c efx_tx.c SRCS+= efx_vpd.c efx_wol.c SRCS+= efsys.h @@ -22,7 +22,7 @@ SRCS+= efx.h efx_impl.h efx_mcdi.h efx_r SRCS+= efx_regs_mcdi.h efx_regs_pci.h efx_types.h SRCS+= siena_mac.c siena_nic.c siena_nvram.c siena_phy.c -SRCS+= siena_sram.c siena_vpd.c +SRCS+= siena_sram.c siena_vpd.c SRCS+= siena_flash.h siena_impl.h DEBUG_FLAGS= -DDEBUG=1 From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 11:25:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B670C5A; Tue, 24 Mar 2015 11:25:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 065058C0; Tue, 24 Mar 2015 11:25:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OBPKEc012749; Tue, 24 Mar 2015 11:25:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OBPKf9012748; Tue, 24 Mar 2015 11:25:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503241125.t2OBPKf9012748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 24 Mar 2015 11:25:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280432 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 11:25:21 -0000 Author: arybchik Date: Tue Mar 24 11:25:19 2015 New Revision: 280432 URL: https://svnweb.freebsd.org/changeset/base/280432 Log: sfxge: cleanup: add a blank line before each #if to improve readability Sponsored by: Solarflare Communications, Inc. Modified: head/sys/dev/sfxge/sfxge.h Modified: head/sys/dev/sfxge/sfxge.h ============================================================================== --- head/sys/dev/sfxge/sfxge.h Tue Mar 24 11:22:12 2015 (r280431) +++ head/sys/dev/sfxge/sfxge.h Tue Mar 24 11:25:19 2015 (r280432) @@ -55,25 +55,32 @@ */ #define CACHE_LINE_SIZE 128 #endif + #ifndef IFCAP_LINKSTATE #define IFCAP_LINKSTATE 0 #endif + #ifndef IFCAP_VLAN_HWTSO #define IFCAP_VLAN_HWTSO 0 #endif + #ifndef IFM_10G_T #define IFM_10G_T IFM_UNKNOWN #endif + #ifndef IFM_10G_KX4 #define IFM_10G_KX4 IFM_10G_CX4 #endif + #if (__FreeBSD_version >= 800501 && __FreeBSD_version < 900000) || \ __FreeBSD_version >= 900003 #define SFXGE_HAVE_DESCRIBE_INTR #endif + #ifdef IFM_ETH_RXPAUSE #define SFXGE_HAVE_PAUSE_MEDIAOPTS #endif + #ifndef CTLTYPE_U64 #define CTLTYPE_U64 CTLTYPE_QUAD #endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 11:33:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46F9CBB; Tue, 24 Mar 2015 11:33:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31D8E9B6; Tue, 24 Mar 2015 11:33:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OBXZ2f017301; Tue, 24 Mar 2015 11:33:35 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OBXZal017300; Tue, 24 Mar 2015 11:33:35 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503241133.t2OBXZal017300@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Tue, 24 Mar 2015 11:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280433 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 11:33:35 -0000 Author: arybchik Date: Tue Mar 24 11:33:34 2015 New Revision: 280433 URL: https://svnweb.freebsd.org/changeset/base/280433 Log: sfxge: cleanup: fix index variable type to match upper boundary type Sponsored by: Solarflare Communications, Inc. Modified: head/sys/dev/sfxge/sfxge_tx.c Modified: head/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_tx.c Tue Mar 24 11:25:19 2015 (r280432) +++ head/sys/dev/sfxge/sfxge_tx.c Tue Mar 24 11:33:34 2015 (r280433) @@ -667,7 +667,7 @@ void sfxge_if_qflush(struct ifnet *ifp) { struct sfxge_softc *sc; - int i; + unsigned int i; sc = ifp->if_softc; From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 12:44:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C825FFC5; Tue, 24 Mar 2015 12:44:10 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F7CF103; Tue, 24 Mar 2015 12:44:09 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2OCi6GK003261 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 24 Mar 2015 15:44:06 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2OCi6wI003260; Tue, 24 Mar 2015 15:44:06 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 24 Mar 2015 15:44:06 +0300 From: Gleb Smirnoff To: Andrew Rybchenko Subject: Re: svn commit: r280374 - head/sys/dev/sfxge Message-ID: <20150324124405.GM64665@FreeBSD.org> References: <201503231544.t2NFiI90045847@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503231544.t2NFiI90045847@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 12:44:10 -0000 On Mon, Mar 23, 2015 at 03:44:18PM +0000, Andrew Rybchenko wrote: A> Author: arybchik A> Date: Mon Mar 23 15:44:17 2015 A> New Revision: 280374 A> URL: https://svnweb.freebsd.org/changeset/base/280374 A> A> Log: A> sfxge: assert either kernel or internal copy of interface flags A> A> ioctl to put interface down sets ifp->if_flags which holds the intended A> administratively defined state and calls driver callback to apply it. A> When everything is done, driver updates internal copy of A> interface flags sc->if_flags which holds the operational state. A> So, transmit from Rx path is possible when interface is intended to be A> administratively down in accordance with ifp->if_flags, but not applied A> yet and the operational state is up in accordance with sc->if_flags. A> A> Sponsored by: Solarflare Communications, Inc. A> Differential Revision: https://reviews.freebsd.org/D2075 In the future ifnet API, that is now being developed in projects/ifnet, the stack promises to change if_flags only via SIOCSIFFLAGS, so driver can and should cashe the value and later access it using internal locking. The if_flags need not be accessed at all by the driver. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 12:46:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB9961C7; Tue, 24 Mar 2015 12:46:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6BB512D; Tue, 24 Mar 2015 12:46:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OCkMvj050596; Tue, 24 Mar 2015 12:46:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OCkMKA050595; Tue, 24 Mar 2015 12:46:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503241246.t2OCkMKA050595@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Mar 2015 12:46:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280434 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 12:46:23 -0000 Author: kib Date: Tue Mar 24 12:46:21 2015 New Revision: 280434 URL: https://svnweb.freebsd.org/changeset/base/280434 Log: Assert that the mapping loop makes progress. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_idpgtbl.c Modified: head/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- head/sys/x86/iommu/intel_idpgtbl.c Tue Mar 24 11:33:34 2015 (r280433) +++ head/sys/x86/iommu/intel_idpgtbl.c Tue Mar 24 12:46:21 2015 (r280434) @@ -465,6 +465,7 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, KASSERT(size >= pg_sz, ("mapping loop overflow %p %jx %jx %jx", ctx, (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); + KASSERT(pg_sz > 0, ("pg_sz 0 lvl %d", lvl)); pte = ctx_pgtbl_map_pte(ctx, base, lvl, flags, &idx, &sf); if (pte == NULL) { KASSERT((flags & DMAR_PGF_WAITOK) == 0, From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 12:48:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C57B56D; Tue, 24 Mar 2015 12:48:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47DFE162; Tue, 24 Mar 2015 12:48:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OCmqUp051027; Tue, 24 Mar 2015 12:48:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OCmqkm051026; Tue, 24 Mar 2015 12:48:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503241248.t2OCmqkm051026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 24 Mar 2015 12:48:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280435 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 12:48:52 -0000 Author: kib Date: Tue Mar 24 12:48:51 2015 New Revision: 280435 URL: https://svnweb.freebsd.org/changeset/base/280435 Log: When mapping an allocated entry, use the entry size, instead of the requested size. If tag restrictions caused split entry, its size is less then requsted. Hardware provided by: Michael Fuckner Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_gas.c Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Tue Mar 24 12:46:21 2015 (r280434) +++ head/sys/x86/iommu/intel_gas.c Tue Mar 24 12:48:51 2015 (r280435) @@ -649,7 +649,7 @@ dmar_gas_map(struct dmar_ctx *ctx, const entry->flags |= eflags; DMAR_CTX_UNLOCK(ctx); - error = ctx_map_buf(ctx, entry->start, size, ma, + error = ctx_map_buf(ctx, entry->start, entry->end - entry->start, ma, ((eflags & DMAR_MAP_ENTRY_READ) != 0 ? DMAR_PTE_R : 0) | ((eflags & DMAR_MAP_ENTRY_WRITE) != 0 ? DMAR_PTE_W : 0) | ((eflags & DMAR_MAP_ENTRY_SNOOP) != 0 ? DMAR_PTE_SNP : 0) | From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 14:16:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99097B9; Tue, 24 Mar 2015 14:16:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83A44DCA; Tue, 24 Mar 2015 14:16:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OEGF5j094196; Tue, 24 Mar 2015 14:16:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OEGFpC094195; Tue, 24 Mar 2015 14:16:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503241416.t2OEGFpC094195@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Mar 2015 14:16:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280436 - head/secure/lib/libcrypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 14:16:15 -0000 Author: andrew Date: Tue Mar 24 14:16:14 2015 New Revision: 280436 URL: https://svnweb.freebsd.org/changeset/base/280436 Log: Add the openssl header for arm64. As it is based on MACHINE_CPUARCH it is named opensslconf-aarch64.h. Sponsored by: The FreeBSD Foundation Added: head/secure/lib/libcrypto/opensslconf-aarch64.h (contents, props changed) Added: head/secure/lib/libcrypto/opensslconf-aarch64.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/secure/lib/libcrypto/opensslconf-aarch64.h Tue Mar 24 14:16:14 2015 (r280436) @@ -0,0 +1,242 @@ +/* $FreeBSD$ */ +/* opensslconf.h */ +/* WARNING: Generated automatically from opensslconf.h.in by Configure. */ + +#ifdef __cplusplus +extern "C" { +#endif +/* OpenSSL was configured with the following options: */ +#ifndef OPENSSL_DOING_MAKEDEPEND + + +#ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 +# define OPENSSL_NO_EC_NISTP_64_GCC_128 +#endif +#ifndef OPENSSL_NO_GMP +# define OPENSSL_NO_GMP +#endif +#ifndef OPENSSL_NO_JPAKE +# define OPENSSL_NO_JPAKE +#endif +#ifndef OPENSSL_NO_KRB5 +# define OPENSSL_NO_KRB5 +#endif +#ifndef OPENSSL_NO_MD2 +# define OPENSSL_NO_MD2 +#endif +#ifndef OPENSSL_NO_SCTP +# define OPENSSL_NO_SCTP +#endif +#ifndef OPENSSL_NO_SSL2 +# define OPENSSL_NO_SSL2 +#endif +#ifndef OPENSSL_NO_STORE +# define OPENSSL_NO_STORE +#endif +#ifndef OPENSSL_NO_UNIT_TEST +# define OPENSSL_NO_UNIT_TEST +#endif + +#endif /* OPENSSL_DOING_MAKEDEPEND */ + +#ifndef OPENSSL_THREADS +# define OPENSSL_THREADS +#endif +#ifndef OPENSSL_NO_ASM +# define OPENSSL_NO_ASM +#endif +#ifndef OPENSSL_NO_STATIC_ENGINE +# define OPENSSL_NO_STATIC_ENGINE +#endif + +/* The OPENSSL_NO_* macros are also defined as NO_* if the application + asks for it. This is a transient feature that is provided for those + who haven't had the time to do the appropriate changes in their + applications. */ +#ifdef OPENSSL_ALGORITHM_DEFINES +# if defined(OPENSSL_NO_EC_NISTP_64_GCC_128) && !defined(NO_EC_NISTP_64_GCC_128) +# define NO_EC_NISTP_64_GCC_128 +# endif +# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) +# define NO_GMP +# endif +# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE) +# define NO_JPAKE +# endif +# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) +# define NO_KRB5 +# endif +# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2) +# define NO_MD2 +# endif +# if defined(OPENSSL_NO_SCTP) && !defined(NO_SCTP) +# define NO_SCTP +# endif +# if defined(OPENSSL_NO_SSL2) && !defined(NO_SSL2) +# define NO_SSL2 +# endif +# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) +# define NO_STORE +# endif +# if defined(OPENSSL_NO_UNIT_TEST) && !defined(NO_UNIT_TEST) +# define NO_UNIT_TEST +# endif +#endif + +/* crypto/opensslconf.h.in */ + +/* Generate 80386 code? */ +#undef I386_ONLY + +#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ +#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) +#define ENGINESDIR "/usr/lib/engines" +#define OPENSSLDIR "/etc/ssl" +#endif +#endif + +#undef OPENSSL_UNISTD +#define OPENSSL_UNISTD + +#undef OPENSSL_EXPORT_VAR_AS_FUNCTION + +#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) +#define IDEA_INT unsigned int +#endif + +#if defined(HEADER_MD2_H) && !defined(MD2_INT) +#define MD2_INT unsigned int +#endif + +#if defined(HEADER_RC2_H) && !defined(RC2_INT) +/* I need to put in a mod for the alpha - eay */ +#define RC2_INT unsigned int +#endif + +#if defined(HEADER_RC4_H) +#if !defined(RC4_INT) +/* using int types make the structure larger but make the code faster + * on most boxes I have tested - up to %20 faster. */ +/* + * I don't know what does "most" mean, but declaring "int" is a must on: + * - Intel P6 because partial register stalls are very expensive; + * - elder Alpha because it lacks byte load/store instructions; + */ +#define RC4_INT unsigned int +#endif +#if !defined(RC4_CHUNK) +/* + * This enables code handling data aligned at natural CPU word + * boundary. See crypto/rc4/rc4_enc.c for further details. + */ +#undef RC4_CHUNK +#endif +#endif + +#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) +/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a + * %20 speed up (longs are 8 bytes, int's are 4). */ +#ifndef DES_LONG +#define DES_LONG unsigned int +#endif +#endif + +#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) +#define CONFIG_HEADER_BN_H +#undef BN_LLONG + +/* Should we define BN_DIV2W here? */ + +/* Only one for the following should be defined */ +#define SIXTY_FOUR_BIT_LONG +#undef SIXTY_FOUR_BIT +#undef THIRTY_TWO_BIT +#endif + +#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) +#define CONFIG_HEADER_RC4_LOCL_H +/* if this is defined data[i] is used instead of *data, this is a %20 + * speedup on x86 */ +#define RC4_INDEX +#endif + +#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) +#define CONFIG_HEADER_BF_LOCL_H +#undef BF_PTR +#endif /* HEADER_BF_LOCL_H */ + +#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) +#define CONFIG_HEADER_DES_LOCL_H +#ifndef DES_DEFAULT_OPTIONS +/* the following is tweaked from a config script, that is why it is a + * protected undef/define */ +#ifndef DES_PTR +#define DES_PTR +#endif + +/* This helps C compiler generate the correct code for multiple functional + * units. It reduces register dependancies at the expense of 2 more + * registers */ +#ifndef DES_RISC1 +#define DES_RISC1 +#endif + +#ifndef DES_RISC2 +#undef DES_RISC2 +#endif + +#if defined(DES_RISC1) && defined(DES_RISC2) +YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! +#endif + +/* Unroll the inner loop, this sometimes helps, sometimes hinders. + * Very mucy CPU dependant */ +#ifndef DES_UNROLL +#define DES_UNROLL +#endif + +/* These default values were supplied by + * Peter Gutman + * They are only used if nothing else has been defined */ +#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) +/* Special defines which change the way the code is built depending on the + CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find + even newer MIPS CPU's, but at the moment one size fits all for + optimization options. Older Sparc's work better with only UNROLL, but + there's no way to tell at compile time what it is you're running on */ + +#if defined( sun ) /* Newer Sparc's */ +# define DES_PTR +# define DES_RISC1 +# define DES_UNROLL +#elif defined( __ultrix ) /* Older MIPS */ +# define DES_PTR +# define DES_RISC2 +# define DES_UNROLL +#elif defined( __osf1__ ) /* Alpha */ +# define DES_PTR +# define DES_RISC2 +#elif defined ( _AIX ) /* RS6000 */ + /* Unknown */ +#elif defined( __hpux ) /* HP-PA */ + /* Unknown */ +#elif defined( __aux ) /* 68K */ + /* Unknown */ +#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ +# define DES_UNROLL +#elif defined( __sgi ) /* Newer MIPS */ +# define DES_PTR +# define DES_RISC2 +# define DES_UNROLL +#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ +# define DES_PTR +# define DES_RISC1 +# define DES_UNROLL +#endif /* Systems-specific speed defines */ +#endif + +#endif /* DES_DEFAULT_OPTIONS */ +#endif /* HEADER_DES_LOCL_H */ +#ifdef __cplusplus +} +#endif From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 14:23:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59DD55F6; Tue, 24 Mar 2015 14:23:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44833EDD; Tue, 24 Mar 2015 14:23:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OEN060098662; Tue, 24 Mar 2015 14:23:00 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OEMxqB098654; Tue, 24 Mar 2015 14:22:59 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503241422.t2OEMxqB098654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Mar 2015 14:22:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280437 - head/contrib/gcc/config/aarch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 14:23:00 -0000 Author: andrew Date: Tue Mar 24 14:22:58 2015 New Revision: 280437 URL: https://svnweb.freebsd.org/changeset/base/280437 Log: Adda minimal gcc config. This is just enough to build the bits of csu we get from gcc, and libgcc_eh. Sponsored by: The FreeBSD Foundation Added: head/contrib/gcc/config/aarch64/ head/contrib/gcc/config/aarch64/aarch64.h (contents, props changed) head/contrib/gcc/config/aarch64/freebsd.h (contents, props changed) Added: head/contrib/gcc/config/aarch64/aarch64.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcc/config/aarch64/aarch64.h Tue Mar 24 14:22:58 2015 (r280437) @@ -0,0 +1,3 @@ +/* $FreeBSD */ + +#define FIRST_PSEUDO_REGISTER 67 Added: head/contrib/gcc/config/aarch64/freebsd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/gcc/config/aarch64/freebsd.h Tue Mar 24 14:22:58 2015 (r280437) @@ -0,0 +1,6 @@ +/* $FreeBSD$ */ + +#undef INIT_SECTION_ASM_OP +#undef FINI_SECTION_ASM_OP +#define INIT_ARRAY_SECTION_ASM_OP "\t.section\t.init_array,\"aw\",%init_array" +#define FINI_ARRAY_SECTION_ASM_OP "\t.section\t.fini_array,\"aw\",%fini_array" From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 14:36:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A380CF6; Tue, 24 Mar 2015 14:36:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71673B7; Tue, 24 Mar 2015 14:36:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OEaFaO004000; Tue, 24 Mar 2015 14:36:15 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OEaBW4003982; Tue, 24 Mar 2015 14:36:11 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503241436.t2OEaBW4003982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 24 Mar 2015 14:36:11 +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: r280438 - in stable/10: contrib/groff/tmac lib lib/libmt rescue/rescue share/man/man4 share/mk sys/cam/scsi sys/sys usr.bin/mt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 14:36:15 -0000 Author: ken Date: Tue Mar 24 14:36:10 2015 New Revision: 280438 URL: https://svnweb.freebsd.org/changeset/base/280438 Log: MFC sa(4) and mt(1) improvements. This includes these changes: 279219, 279229, 279261, 279534, 279570, 280230, 280231. In addition, bump __FreeBSD_version for the addition of the new mtio(4) / sa(4) ioctls. Thanks to Dan Langille, Harald Schmalzbauer and Rudolf Cejka for spending a significant amount of time and effort testing these changes. ------------------------------------------------------------------------ r279219 | ken | 2015-02-23 14:59:30 -0700 (Mon, 23 Feb 2015) | 282 lines Significant upgrades to sa(4) and mt(1). The primary focus of these changes is to modernize FreeBSD's tape infrastructure so that we can take advantage of some of the features of modern tape drives and allow support for LTFS. Significant changes and new features include: o sa(4) driver status and parameter information is now exported via an XML structure. This will allow for changes and improvements later on that will not break userland applications. The old MTIOCGET status ioctl remains, so applications using the existing interface will not break. o 'mt status' now reports drive-reported tape position information as well as the previously available calculated tape position information. These numbers will be different at times, because the drive-reported block numbers are relative to BOP (Beginning of Partition), but the block numbers calculated previously via sa(4) (and still provided) are relative to the last filemark. Both numbers are now provided. 'mt status' now also shows the drive INQUIRY information, serial number and any position flags (BOP, EOT, etc.) provided with the tape position information. 'mt status -v' adds information on the maximum possible I/O size, and the underlying values used to calculate it. o The extra sa(4) /dev entries (/dev/saN.[0-3]) have been removed. The extra devices were originally added as place holders for density-specific device nodes. Some OSes (NetBSD, NetApp's OnTap and Solaris) have had device nodes that, when you write to them, will automatically select a given density for particular tape drives. This is a convenient way of switching densities, but it was never implemented in FreeBSD. Only the device nodes were there, and that sometimes confused users. For modern tape devices, the density is generally not selectable (e.g. with LTO) or defaults to the highest availble density when the tape is rewritten from BOT (e.g. TS11X0). So, for most users, density selection won't be necessary. If they do need to select the density, it is easy enough to use 'mt density' to change it. o Protection information is now supported. This is either a Reed-Solomon CRC or CRC32 that is included at the end of each block read and written. On write, the tape drive verifies the CRC, and on read, the tape drive provides a CRC for the userland application to verify. o New, extensible tape driver parameter get/set interface. o Density reporting information. For drives that support it, 'mt getdensity' will show detailed information on what formats the tape drive supports, and what formats the tape drive supports. o Some mt(1) functionality moved into a new mt(3) library so that external applications can reuse the code. o The new mt(3) library includes helper routines to aid in parsing the XML output of the sa(4) driver, and build a tree of driver metadata. o Support for the MTLOAD (load a tape in the drive) and MTWEOFI (write filemark immediate) ioctls needed by IBM's LTFS implementation. o Improve device departure behavior for the sa(4) driver. The previous implementation led to hangs when the device was open. o This has been tested on the following types of drives: IBM TS1150 IBM TS1140 IBM LTO-6 IBM LTO-5 HP LTO-2 Seagate DDS-4 Quantum DLT-4000 Exabyte 8505 Sony DDS-2 contrib/groff/tmac/doc-syms, share/mk/bsd.libnames.mk, lib/Makefile, Add libmt. lib/libmt/Makefile, lib/libmt/mt.3, lib/libmt/mtlib.c, lib/libmt/mtlib.h, New mt(3) library that contains functions moved from mt(1) and new functions needed to interact with the updated sa(4) driver. This includes XML parser helper functions that application writers can use when writing code to query tape parameters. rescue/rescue/Makefile: Add -lmt to CRUNCH_LIBS. src/share/man/man4/mtio.4 Clarify this man page a bit, and since it contains what is essentially the mtio.h header file, add new ioctls and structure definitions from mtio.h. src/share/man/man4/sa.4 Update BUGS and maintainer section. sys/cam/scsi/scsi_all.c, sys/cam/scsi/scsi_all.h: Add SCSI SECURITY PROTOCOL IN/OUT CDB definitions and CDB building functions. sys/cam/scsi/scsi_sa.c sys/cam/scsi/scsi_sa.h Many tape driver changes, largely outlined above. Increase the sa(4) driver read/write timeout from 4 to 32 minutes. This is based on the recommended values for IBM LTO 5/6 drives. This may also avoid timeouts for other tape hardware that can take a long time to do retries and error recovery. Longer term, a better way to handle this is to ask the drive for recommended timeout values using the REPORT SUPPORTED OPCODES command. Modern IBM and Oracle tape drives at least support that command, and it would allow for more accurate timeout values. Add XML status generation. This is done with a series of macros to eliminate as much duplicate code as possible. The new XML-based status values are reported through the new MTIOCEXTGET ioctl. Add XML driver parameter reporting, using the new MTIOCPARAMGET ioctl. Add a new driver parameter setting interface, using the new MTIOCPARAMSET and MTIOCSETLIST ioctls. Add a new MTIOCRBLIM ioctl to get block limits information. Add CCB/CDB building routines scsi_locate_16, scsi_locate_10, and scsi_read_position_10(). scsi_locate_10 implements the LOCATE command, as does the existing scsi_set_position() command. It just supports additional arguments and features. If/when we figure out a good way to provide backward compatibility for older applications using the old function API, we can just revamp scsi_set_position(). The same goes for scsi_read_position_10() and the existing scsi_read_position() function. Revamp sasetpos() to take the new mtlocate structure as an argument. It now will use either scsi_locate_10() or scsi_locate_16(), depending upon the arguments the user supplies. As before, once we change position we don't have a clear idea of what the current logical position of the tape drive is. For tape drives that support long form position data, we read the current position and store that for later reporting after changing the position. This should help applications like Bacula speed tape access under FreeBSD once they are modified to support the new ioctls. Add a new quirk, SA_QUIRK_NO_LONG_POS, that is set for all drives that report SCSI-2 or older, as well as drives that report an Illegal Request type error for READ POSITION with the long format. So we should automatically detect drives that don't support the long form and stop asking for it after an initial try. Add a partition number to the sa(4) softc. Improve device departure handling. The previous implementation led to hangs when the device was open. If an application had the sa(4) driver open, and attempted to close it after it went away, the cam_periph_release() call in saclose() would cause the periph to get destroyed because that was the last reference to it. Because destroy_dev() was called from the sa(4) driver's cleanup routine (sacleanup()), and would block waiting for the close to happen, a deadlock would result. So instead of calling destroy_dev() from the cleanup routine, call destroy_dev_sched_cb() from saoninvalidate() and wait for the callback. Acquire a reference for devfs in saregister(), and release it in the new sadevgonecb() routine when all devfs devices for the particular sa(4) driver instance are gone. Add a new function, sasetupdev(), to centralize setting per-instance devfs device parameters instead of repeating the code in saregister(). Add an open count to the softc, so we know how many peripheral driver references are a result of open sessions. Add the D_TRACKCLOSE flag to the cdevsw flags so that we get a 1:1 mapping of open to close calls instead of a N:1 mapping. This should be a no-op for everything except the control device, since we don't allow more than one open on non-control devices. However, since we do allow multiple opens on the control device, the combination of the open count and the D_TRACKCLOSE flag should result in an accurate peripheral driver reference count, and an accurate open count. The accurate open count allows us to release all peripheral driver references that are the result of open contexts once we get the callback from devfs. sys/sys/mtio.h: Add a number of new mt(4) ioctls and the requisite data structures. None of the existing interfaces been removed or changed. This includes definitions for the following new ioctls: MTIOCRBLIM /* get block limits */ MTIOCEXTLOCATE /* seek to position */ MTIOCEXTGET /* get tape status */ MTIOCPARAMGET /* get tape params */ MTIOCPARAMSET /* set tape params */ MTIOCSETLIST /* set N params */ usr.bin/mt/Makefile: mt(1) now depends on libmt, libsbuf and libbsdxml. usr.bin/mt/mt.1: Document new mt(1) features and subcommands. usr.bin/mt/mt.c: Implement support for mt(1) subcommands that need to use getopt(3) for their arguments. Implement a new 'mt status' command to replace the old 'mt status' command. The old status command has been renamed 'ostatus'. The new status function uses the MTIOCEXTGET ioctl, and therefore parses the XML data to determine drive status. The -x argument to 'mt status' allows the user to dump out the raw XML reported by the kernel. The new status display is mostly the same as the old status display, except that it doesn't print the redundant density mode information, and it does print the current partition number and position flags. Add a new command, 'mt locate', that will supersede the old 'mt setspos' and 'mt sethpos' commands. 'mt locate' implements all of the functionality of the MTIOCEXTLOCATE ioctl, and allows the user to change the logical position of the tape drive in a number of ways. (Partition, block number, file number, set mark number, end of data.) The immediate bit and the explicit address bits are implemented, but not documented in the man page. Add a new 'mt weofi' command to use the new MTWEOFI ioctl. This allows the user to ask the drive to write a filemark without waiting around for the operation to complete. Add a new 'mt getdensity' command that gets the XML-based tape drive density report from the sa(4) driver and displays it. This uses the SCSI REPORT DENSITY SUPPORT command to get comprehensive information from the tape drive about what formats it is able to read and write. Add a new 'mt protect' command that allows getting and setting tape drive protection information. The protection information is a CRC tacked on to the end of every read/write from and to the tape drive. Sponsored by: Spectra Logic MFC after: 1 month ------------------------------------------------------------------------ ------------------------------------------------------------------------ r279229 | ken | 2015-02-23 22:43:16 -0700 (Mon, 23 Feb 2015) | 5 lines Fix printf format warnings on sparc64 and mips. Sponsored by: Spectra Logic MFC after: 1 month ------------------------------------------------------------------------ ------------------------------------------------------------------------ r279261 | ken | 2015-02-24 21:30:23 -0700 (Tue, 24 Feb 2015) | 23 lines Fix several problems found by Coverity. lib/libmt/mtlib.c: In mt_start_element(), make sure we don't overflow the cur_sb array. CID 1271325 usr.bin/mt/mt.c: In main(), bzero the mt_com structure so that we aren't using any uninitialized stack variables. CID 1271319 In mt_param(), only allow one -s and one -p argument. This will prevent a memory leak caused by overwriting the param_name and/or param_value variables. CID 1271320 and CID 1271322 To make things simpler in mt_param(), make sure there there is only one exit path for the function. Make sure the arguments are explicitly freed. Sponsored by: Spectra Logic Pointed out by: emaste MFC after: 1 month ------------------------------------------------------------------------ ------------------------------------------------------------------------ r279534 | ken | 2015-03-02 11:09:49 -0700 (Mon, 02 Mar 2015) | 18 lines Change the sa(4) driver to check for long position support on SCSI-2 devices. Some older tape devices claim to be SCSI-2, but actually do support long position information. (Long position information includes the current file mark.) For example, the COMPAQ SuperDLT1. So we now only disable the check on SCSI-1 and older devices. sys/cam/scsi/scsi_sa.c: In saregister(), only disable fetching long position information on SCSI-1 and older drives. Update the comment to explain why. Confirmed by: dvl Sponsored by: Spectra Logic MFC after: 3 weeks ------------------------------------------------------------------------ ------------------------------------------------------------------------ r279570 | ken | 2015-03-03 15:49:07 -0700 (Tue, 03 Mar 2015) | 21 lines Add density code for DAT-72, and notes on DAT-160. As it turns out, the density code for DAT-160 (0x48) is the same as for SDLT220. Since the SDLT values are already in the table, we will leave them in place. Thanks to Harald Schmalzbauer for confirming the DAT-72 density code. lib/libmt/mtlib.c: Add DAT-72 density code, and commented out DAT-160 density code. Explain why DAT-160 is commented out. Add notes explaining where the bpi values for these formats came from. usr.bin/mt/mt.1: Add DAT-72 density code, and add a note explaining that the SDLTTapeI(110) density code (0x48) is the same as DAT-160. Sponsored by: Spectra Logic MFC after: 3 weeks ------------------------------------------------------------------------ ------------------------------------------------------------------------ r280230 | ken | 2015-03-18 14:52:34 -0600 (Wed, 18 Mar 2015) | 25 lines Fix a couple of problems in the sa(4) media type reports. The only drives I have discovered so far that support medium type reports are newer HP LTO (LTO-5 and LTO-6) drives. IBM drives only support the density reports. sys/cam/scsi/scsi_sa.h: The number of possible density codes in the medium type report is 9, not 8. This caused problems parsing all of the medium type report after this point in the structure. usr.bin/mt/mt.c: Run the density codes returned in the medium type report through denstostring(), just like the primary and secondary density codes in the density report. This will print the density code in hex, and give a text description if it is available. Thanks to Rudolf Cejka for doing extensive testing with HP LTO drives and Bacula and discovering these problems. Tested by: Rudolf Cejka Sponsored by: Spectra Logic MFC after: 4 days ------------------------------------------------------------------------ ------------------------------------------------------------------------ r280231 | ken | 2015-03-18 14:54:54 -0600 (Wed, 18 Mar 2015) | 16 lines Improve the mt(1) rblim display. The granularity reported by READ BLOCK LIMITS is an exponent, not a byte value. So a granularity of 0 means 2^0, or 1 byte. A granularity of 1 means 2^1, or 2 bytes. Print out the individual block limits on separate lines to improve readability and avoid exceeding 80 columns. usr.bin/mt/mt.c: Fix and improve the 'mt rblim' output. Add a MT_PLURAL() macro so we can print "byte" or "bytes" as appropriate. Sponsored by: Spectra Logic MFC after: 4 days ------------------------------------------------------------------------ Sponsored by: Spectra Logic Added: stable/10/lib/libmt/ - copied from r279219, head/lib/libmt/ Modified: stable/10/contrib/groff/tmac/doc-syms stable/10/lib/Makefile stable/10/lib/libmt/mtlib.c stable/10/rescue/rescue/Makefile stable/10/share/man/man4/mtio.4 stable/10/share/man/man4/sa.4 stable/10/share/mk/bsd.libnames.mk stable/10/sys/cam/scsi/scsi_all.c stable/10/sys/cam/scsi/scsi_all.h stable/10/sys/cam/scsi/scsi_sa.c stable/10/sys/cam/scsi/scsi_sa.h stable/10/sys/sys/mtio.h stable/10/sys/sys/param.h stable/10/usr.bin/mt/Makefile stable/10/usr.bin/mt/mt.1 stable/10/usr.bin/mt/mt.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/groff/tmac/doc-syms ============================================================================== --- stable/10/contrib/groff/tmac/doc-syms Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/contrib/groff/tmac/doc-syms Tue Mar 24 14:36:10 2015 (r280438) @@ -796,6 +796,7 @@ .ds doc-str-Lb-libmd Message Digest (MD4, MD5, etc.) Support Library (libmd, \-lmd) .ds doc-str-Lb-libmemstat Kernel Memory Allocator Statistics Library (libmemstat, \-lmemstat) .ds doc-str-Lb-libmenu Curses Menu Library (libmenu, \-lmenu) +.ds doc-str-Lb-libmt Magnetic Tape Library (libmt, \-lmt) .ds doc-str-Lb-libnetgraph Netgraph User Library (libnetgraph, \-lnetgraph) .ds doc-str-Lb-libnetpgp Netpgp signing, verification, encryption and decryption (libnetpgp, \-lnetpgp) .ds doc-str-Lb-libossaudio OSS Audio Emulation Library (libossaudio, \-lossaudio) Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/lib/Makefile Tue Mar 24 14:36:10 2015 (r280438) @@ -65,6 +65,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ libmd \ ${_libmilter} \ ${_libmp} \ + libmt \ ${_libnandfs} \ libnetbsd \ ${_libnetgraph} \ Modified: stable/10/lib/libmt/mtlib.c ============================================================================== --- head/lib/libmt/mtlib.c Mon Feb 23 21:59:30 2015 (r279219) +++ stable/10/lib/libmt/mtlib.c Tue Mar 24 14:36:10 2015 (r280438) @@ -68,7 +68,7 @@ mt_start_element(void *user_data, const return; mtinfo->level++; - if ((u_int)mtinfo->level > (sizeof(mtinfo->cur_sb) / + if ((u_int)mtinfo->level >= (sizeof(mtinfo->cur_sb) / sizeof(mtinfo->cur_sb[0]))) { mtinfo->error = 1; snprintf(mtinfo->error_str, sizeof(mtinfo->error_str), @@ -568,6 +568,15 @@ static struct densities { * * IBM 3592 definitions obtained from second edition of the IBM * System Storage Tape Drive 3592 SCSI Reference (May 25, 2012). + * + * DAT-72 and DAT-160 bpi values taken from "HP StorageWorks DAT160 + * tape drive white paper", dated June 2007. + * + * DAT-160 / SDLT220 density code (0x48) conflict information + * found here: + * + * http://h20564.www2.hp.com/hpsc/doc/public/display?docId=emr_na-c01065117&sp4ts.oid=429311 + * (Document ID c01065117) */ /*Num. bpmm bpi Reference */ { 0x1, 32, 800, "X3.22-1983" }, @@ -613,6 +622,14 @@ static struct densities { { 0x42, 7398, 187909, "LTO-2" }, { 0x44, 9638, 244805, "LTO-3" }, { 0x46, 12725, 323215, "LTO-4" }, + { 0x47, 6417, 163000, "DAT-72" }, + /* + * XXX KDM note that 0x48 is also the density code for DAT-160. + * For some reason they used overlapping density codes. + */ +#if 0 + { 0x48, 6870, 174500, "DAT-160" }, +#endif { 0x48, 5236, 133000, "SDLTapeI(110)" }, { 0x49, 7598, 193000, "SDLTapeI(160)" }, { 0x4a, 0, 0, "T10000A" }, Modified: stable/10/rescue/rescue/Makefile ============================================================================== --- stable/10/rescue/rescue/Makefile Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/rescue/rescue/Makefile Tue Mar 24 14:36:10 2015 (r280438) @@ -131,7 +131,7 @@ CRUNCH_LIBS+= -lgeom -lbsdxml -lkiconv .if ${MK_OPENSSL} == "no" CRUNCH_LIBS+= -lmd .endif -CRUNCH_LIBS+= -lsbuf -lufs -lz +CRUNCH_LIBS+= -lmt -lsbuf -lufs -lz .if ${MACHINE_CPUARCH} == "i386" CRUNCH_PROGS_sbin+= bsdlabel sconfig fdisk Modified: stable/10/share/man/man4/mtio.4 ============================================================================== --- stable/10/share/man/man4/mtio.4 Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/share/man/man4/mtio.4 Tue Mar 24 14:36:10 2015 (r280438) @@ -35,7 +35,7 @@ .\" @(#)mtio.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 11, 2011 +.Dd February 12, 2015 .Dt MTIO 4 .Os .Sh NAME @@ -44,10 +44,10 @@ .Sh DESCRIPTION The special files named -.Pa /dev/[n]sa* +.Pa /dev/[en]sa* refer to SCSI tape drives, which may be attached to the system. -.Pa /dev/[n]sa*.ctl +.Pa /dev/sa*.ctl are control devices that can be used to issue ioctls to the SCSI tape driver to set parameters that are required to last beyond the unmounting of a tape. @@ -57,16 +57,19 @@ when the last requested read, write or s has been reached. The letter .Ql n -is usually prepended to +is prepended to the name of the no-rewind devices. +The letter +.Ql e +is prepended to the name of the eject devices. .Pp Tapes can be written with either fixed length records or variable length records. See .Xr sa 4 for more information. -Two end-of-file markers mark the end of a tape, and -one end-of-file marker marks the end of a tape file. +Two filemarks mark the end of a tape, and +one filemark marks the end of a tape file. If the tape is not to be rewound it is positioned with the head in between the two tape marks, where the next write will over write the second end-of-file marker. @@ -132,6 +135,8 @@ struct mtop { #define MTWSS 16 /* write setmark(s) */ #define MTFSS 17 /* forward space setmark */ #define MTBSS 18 /* backward space setmark */ +#define MTLOAD 19 /* load tape in drive */ +#define MTWEOFI 20 /* write an end-of-file record without waiting*/ #define MT_COMP_ENABLE 0xffffffff #define MT_COMP_DISABLED 0xfffffffe @@ -228,6 +233,112 @@ union mterrstat { char _reserved_padding[256]; }; +struct mtrblim { + uint32_t granularity; + uint32_t min_block_length; + uint32_t max_block_length; +}; + +typedef enum { + MT_LOCATE_DEST_OBJECT = 0x00, + MT_LOCATE_DEST_FILE = 0x01, + MT_LOCATE_DEST_SET = 0x02, + MT_LOCATE_DEST_EOD = 0x03 +} mt_locate_dest_type; + +typedef enum { + MT_LOCATE_BAM_IMPLICIT = 0x00, + MT_LOCATE_BAM_EXPLICIT = 0x01 +} mt_locate_bam; + +typedef enum { + MT_LOCATE_FLAG_IMMED = 0x01, + MT_LOCATE_FLAG_CHANGE_PART = 0x02 +} mt_locate_flags; + +struct mtlocate { + mt_locate_flags flags; + mt_locate_dest_type dest_type; + mt_locate_bam block_address_mode; + int64_t partition; + uint64_t logical_id; + uint8_t reserved[64]; +}; + +typedef enum { + MT_EXT_GET_NONE, + MT_EXT_GET_OK, + MT_EXT_GET_NEED_MORE_SPACE, + MT_EXT_GET_ERROR +} mt_ext_get_status; + +struct mtextget { + uint32_t alloc_len; + char *status_xml; + uint32_t fill_len; + mt_ext_get_status status; + char error_str[128]; + uint8_t reserved[64]; +}; + +#define MT_EXT_GET_ROOT_NAME "mtextget" +#define MT_DENSITY_ROOT_NAME "mtdensity" +#define MT_MEDIA_DENSITY_NAME "media_density" +#define MT_DENSITY_REPORT_NAME "density_report" +#define MT_MEDIUM_TYPE_REPORT_NAME "medium_type_report" +#define MT_MEDIA_REPORT_NAME "media_report" +#define MT_DENSITY_ENTRY_NAME "density_entry" + +#define MT_DENS_WRITE_OK 0x80 +#define MT_DENS_DUP 0x40 +#define MT_DENS_DEFLT 0x20 + + +#define MT_PARAM_FIXED_STR_LEN 32 +union mt_param_value { + int64_t value_signed; + uint64_t value_unsigned; + char *value_var_str; + char value_fixed_str[MT_PARAM_FIXED_STR_LEN]; + uint8_t reserved[64]; +}; + +typedef enum { + MT_PARAM_SET_NONE, + MT_PARAM_SET_SIGNED, + MT_PARAM_SET_UNSIGNED, + MT_PARAM_SET_VAR_STR, + MT_PARAM_SET_FIXED_STR +} mt_param_set_type; + +typedef enum { + MT_PARAM_STATUS_NONE, + MT_PARAM_STATUS_OK, + MT_PARAM_STATUS_ERROR +} mt_param_set_status; + +#define MT_PARAM_VALUE_NAME_LEN 64 +struct mtparamset { + char value_name[MT_PARAM_VALUE_NAME_LEN]; + mt_param_set_type value_type; + int value_len; + union mt_param_value value; + mt_param_set_status status; + char error_str[128]; +}; + +#define MT_PARAM_ROOT_NAME "mtparamget" +#define MT_PROTECTION_NAME "protection" + +/* + * Set a list of parameters. + */ +struct mtsetlist { + int num_params; + int param_len; + struct mtparamset *params; +}; + /* * Constants for mt_type byte. These are the same * for controllers compatible with the types listed. @@ -277,6 +388,12 @@ union mterrstat { #define MTIOCSETEOTMODEL _IOW('m', 8, uint32_t) /* Get current EOT model */ #define MTIOCGETEOTMODEL _IOR('m', 8, uint32_t) +#define MTIOCRBLIM _IOR('m', 9, struct mtrblim) /* get block limits */ +#define MTIOCEXTLOCATE _IOW('m', 10, struct mtlocate) /* seek to position */ +#define MTIOCEXTGET _IOWR('m', 11, struct mtextget) /* get tape status */ +#define MTIOCPARAMGET _IOWR('m', 12, struct mtextget) /* get tape params */ +#define MTIOCPARAMSET _IOWR('m', 13, struct mtparamset) /* set tape params */ +#define MTIOCSETLIST _IOWR('m', 14, struct mtsetlist) /* set N params */ #ifndef _KERNEL #define DEFTAPE "/dev/nsa0" @@ -285,13 +402,12 @@ union mterrstat { #endif /* !_SYS_MTIO_H_ */ .Ed .Sh FILES -.Bl -tag -width /dev/[n]sa* -compact -.It Pa /dev/[n]sa* +.Bl -tag -width /dev/[en]sa* -compact +.It Pa /dev/[en]sa* .El .Sh SEE ALSO .Xr mt 1 , .Xr tar 1 , -.Xr ast 4 , .Xr sa 4 .Sh HISTORY The @@ -300,8 +416,3 @@ manual appeared in .Bx 4.2 . An i386 version first appeared in .Fx 2.2 . -.Sh BUGS -The status should be returned in a device independent format. -.Pp -The special file naming should be redone in a more consistent and -understandable manner. Modified: stable/10/share/man/man4/sa.4 ============================================================================== --- stable/10/share/man/man4/sa.4 Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/share/man/man4/sa.4 Tue Mar 24 14:36:10 2015 (r280438) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 23, 2013 +.Dd February 12, 2015 .Dt SA 4 .Os .Sh NAME @@ -285,10 +285,10 @@ device driver written and ported from by .An Julian Elischer . .Pp -The current owner of record is -.An Matthew Jacob -who has suffered too many -years of breaking tape drivers. +The owner of record for many years was +.An Matthew Jacob . +The current maintainer is +.An Kenneth Merry .Sh BUGS This driver lacks many of the hacks required to deal with older devices. Many older @@ -305,7 +305,5 @@ for your device in order to read tapes w .Fx 2.X. .Pp -Fine grained density and compression mode support that is bound to specific -device names needs to be added. -.Pp -Support for fast indexing by use of partitions is missing. +Partitions are only supported for status information and location. +It would be nice to add support for creating and editing tape partitions. Modified: stable/10/share/mk/bsd.libnames.mk ============================================================================== --- stable/10/share/mk/bsd.libnames.mk Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/share/mk/bsd.libnames.mk Tue Mar 24 14:36:10 2015 (r280438) @@ -95,6 +95,7 @@ LIBMENU?= ${DESTDIR}${LIBDIR}/libmenu.a LIBMILTER?= ${DESTDIR}${LIBDIR}/libmilter.a .endif LIBMP?= ${DESTDIR}${LIBDIR}/libmp.a +LIBMT?= ${DESTDIR}${LIBDIR}/libmt.a LIBNCURSES?= ${DESTDIR}${LIBDIR}/libncurses.a LIBNCURSESW?= ${DESTDIR}${LIBDIR}/libncursesw.a LIBNETGRAPH?= ${DESTDIR}${LIBDIR}/libnetgraph.a Modified: stable/10/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.c Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/sys/cam/scsi/scsi_all.c Tue Mar 24 14:36:10 2015 (r280438) @@ -7443,6 +7443,71 @@ scsi_persistent_reserve_out(struct ccb_s scsi_cmd->opcode = PERSISTENT_RES_OUT; scsi_cmd->action = service_action; scsi_cmd->scope_type = scope | res_type; + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/CAM_DIR_OUT, + tag_action, + /*data_ptr*/data_ptr, + /*dxfer_len*/dxfer_len, + sense_len, + sizeof(*scsi_cmd), + timeout); +} + +void +scsi_security_protocol_in(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, uint32_t security_protocol, + uint32_t security_protocol_specific, int byte4, + uint8_t *data_ptr, uint32_t dxfer_len, int sense_len, + int timeout) +{ + struct scsi_security_protocol_in *scsi_cmd; + + scsi_cmd = (struct scsi_security_protocol_in *)&csio->cdb_io.cdb_bytes; + bzero(scsi_cmd, sizeof(*scsi_cmd)); + + scsi_cmd->opcode = SECURITY_PROTOCOL_IN; + + scsi_cmd->security_protocol = security_protocol; + scsi_ulto2b(security_protocol_specific, + scsi_cmd->security_protocol_specific); + scsi_cmd->byte4 = byte4; + scsi_ulto4b(dxfer_len, scsi_cmd->length); + + cam_fill_csio(csio, + retries, + cbfcnp, + /*flags*/CAM_DIR_IN, + tag_action, + data_ptr, + dxfer_len, + sense_len, + sizeof(*scsi_cmd), + timeout); +} + +void +scsi_security_protocol_out(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, uint32_t security_protocol, + uint32_t security_protocol_specific, int byte4, + uint8_t *data_ptr, uint32_t dxfer_len, int sense_len, + int timeout) +{ + struct scsi_security_protocol_out *scsi_cmd; + + scsi_cmd = (struct scsi_security_protocol_out *)&csio->cdb_io.cdb_bytes; + bzero(scsi_cmd, sizeof(*scsi_cmd)); + + scsi_cmd->opcode = SECURITY_PROTOCOL_OUT; + + scsi_cmd->security_protocol = security_protocol; + scsi_ulto2b(security_protocol_specific, + scsi_cmd->security_protocol_specific); + scsi_cmd->byte4 = byte4; scsi_ulto4b(dxfer_len, scsi_cmd->length); cam_fill_csio(csio, Modified: stable/10/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/10/sys/cam/scsi/scsi_all.h Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/sys/cam/scsi/scsi_all.h Tue Mar 24 14:36:10 2015 (r280438) @@ -1758,6 +1758,7 @@ struct ata_pass_16 { #define SERVICE_ACTION_IN 0x9E #define REPORT_LUNS 0xA0 #define ATA_PASS_12 0xA1 +#define SECURITY_PROTOCOL_IN 0xA2 #define MAINTENANCE_IN 0xA3 #define MAINTENANCE_OUT 0xA4 #define MOVE_MEDIUM 0xA5 @@ -1765,6 +1766,7 @@ struct ata_pass_16 { #define WRITE_12 0xAA #define WRITE_VERIFY_12 0xAE #define VERIFY_12 0xAF +#define SECURITY_PROTOCOL_OUT 0xB5 #define READ_ELEMENT_STATUS 0xB8 #define READ_CD 0xBE @@ -2702,6 +2704,41 @@ struct scsi_target_group_data_extended { struct scsi_target_port_group_descriptor groups[]; }; +struct scsi_security_protocol_in +{ + uint8_t opcode; + uint8_t security_protocol; +#define SPI_PROT_INFORMATION 0x00 +#define SPI_PROT_CBCS 0x07 +#define SPI_PROT_TAPE_DATA_ENC 0x20 +#define SPI_PROT_DATA_ENC_CONFIG 0x21 +#define SPI_PROT_SA_CREATE_CAP 0x40 +#define SPI_PROT_IKEV2_SCSI 0x41 +#define SPI_PROT_JEDEC_UFS 0xEC +#define SPI_PROT_SDCARD_TFSSS 0xED +#define SPI_PROT_AUTH_HOST_TRANSIENT 0xEE +#define SPI_PROT_ATA_DEVICE_PASSWORD 0xEF + uint8_t security_protocol_specific[2]; + uint8_t byte4; +#define SPI_INC_512 0x80 + uint8_t reserved1; + uint8_t length[4]; + uint8_t reserved2; + uint8_t control; +}; + +struct scsi_security_protocol_out +{ + uint8_t opcode; + uint8_t security_protocol; + uint8_t security_protocol_specific[2]; + uint8_t byte4; +#define SPO_INC_512 0x80 + uint8_t reserved1; + uint8_t length[4]; + uint8_t reserved2; + uint8_t control; +}; typedef enum { SSD_TYPE_NONE, @@ -3623,6 +3660,20 @@ void scsi_start_stop(struct ccb_scsiio * u_int8_t tag_action, int start, int load_eject, int immediate, u_int8_t sense_len, u_int32_t timeout); +void scsi_security_protocol_in(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + uint8_t tag_action, uint32_t security_protocol, + uint32_t security_protocol_specific, int byte4, + uint8_t *data_ptr, uint32_t dxfer_len, + int sense_len, int timeout); + +void scsi_security_protocol_out(struct ccb_scsiio *csio, uint32_t retries, + void (*cbfcnp)(struct cam_periph *,union ccb *), + uint8_t tag_action, uint32_t security_protocol, + uint32_t security_protocol_specific, int byte4, + uint8_t *data_ptr, uint32_t dxfer_len, + int sense_len, int timeout); + void scsi_persistent_reserve_in(struct ccb_scsiio *csio, uint32_t retries, void (*cbfcnp)(struct cam_periph *,union ccb *), uint8_t tag_action, int service_action, Modified: stable/10/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_sa.c Tue Mar 24 14:22:58 2015 (r280437) +++ stable/10/sys/cam/scsi/scsi_sa.c Tue Mar 24 14:36:10 2015 (r280438) @@ -2,6 +2,7 @@ * Implementation of SCSI Sequential Access Peripheral driver for CAM. * * Copyright (c) 1999, 2000 Matthew Jacob + * Copyright (c) 2013, 2014, 2015 Spectra Logic Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #ifdef _KERNEL #include +#include #include #include #endif @@ -69,7 +71,7 @@ __FBSDID("$FreeBSD$"); #include #ifndef SA_IO_TIMEOUT -#define SA_IO_TIMEOUT 4 +#define SA_IO_TIMEOUT 32 #endif #ifndef SA_SPACE_TIMEOUT #define SA_SPACE_TIMEOUT 1 * 60 @@ -80,6 +82,9 @@ __FBSDID("$FreeBSD$"); #ifndef SA_ERASE_TIMEOUT #define SA_ERASE_TIMEOUT 4 * 60 #endif +#ifndef SA_REP_DENSITY_TIMEOUT +#define SA_REP_DENSITY_TIMEOUT 90 +#endif #define SCSIOP_TIMEOUT (60 * 1000) /* not an option */ @@ -87,6 +92,7 @@ __FBSDID("$FreeBSD$"); #define REWIND_TIMEOUT (SA_REWIND_TIMEOUT * 60 * 1000) #define ERASE_TIMEOUT (SA_ERASE_TIMEOUT * 60 * 1000) #define SPACE_TIMEOUT (SA_SPACE_TIMEOUT * 60 * 1000) +#define REP_DENSITY_TIMEOUT (SA_REP_DENSITY_TIMEOUT * 60 * 1000) /* * Additional options that can be set for config: SA_1FM_AT_EOT @@ -133,7 +139,12 @@ typedef enum { SA_FLAG_COMP_ENABLED = 0x0400, SA_FLAG_COMP_SUPP = 0x0800, SA_FLAG_COMP_UNSUPP = 0x1000, - SA_FLAG_TAPE_FROZEN = 0x2000 + SA_FLAG_TAPE_FROZEN = 0x2000, + SA_FLAG_PROTECT_SUPP = 0x4000, + + SA_FLAG_COMPRESSION = (SA_FLAG_COMP_SUPP|SA_FLAG_COMP_ENABLED| + SA_FLAG_COMP_UNSUPP), + SA_FLAG_SCTX_INIT = 0x8000 } sa_flags; typedef enum { @@ -143,27 +154,30 @@ typedef enum { } sa_mode; typedef enum { - SA_PARAM_NONE = 0x00, - SA_PARAM_BLOCKSIZE = 0x01, - SA_PARAM_DENSITY = 0x02, - SA_PARAM_COMPRESSION = 0x04, - SA_PARAM_BUFF_MODE = 0x08, - SA_PARAM_NUMBLOCKS = 0x10, - SA_PARAM_WP = 0x20, - SA_PARAM_SPEED = 0x40, - SA_PARAM_ALL = 0x7f + SA_PARAM_NONE = 0x000, + SA_PARAM_BLOCKSIZE = 0x001, + SA_PARAM_DENSITY = 0x002, + SA_PARAM_COMPRESSION = 0x004, + SA_PARAM_BUFF_MODE = 0x008, + SA_PARAM_NUMBLOCKS = 0x010, + SA_PARAM_WP = 0x020, + SA_PARAM_SPEED = 0x040, + SA_PARAM_DENSITY_EXT = 0x080, + SA_PARAM_LBP = 0x100, + SA_PARAM_ALL = 0x1ff } sa_params; typedef enum { - SA_QUIRK_NONE = 0x00, - SA_QUIRK_NOCOMP = 0x01, /* Can't deal with compression at all */ - SA_QUIRK_FIXED = 0x02, /* Force fixed mode */ - SA_QUIRK_VARIABLE = 0x04, /* Force variable mode */ - SA_QUIRK_2FM = 0x08, /* Needs Two File Marks at EOD */ - SA_QUIRK_1FM = 0x10, /* No more than 1 File Mark at EOD */ - SA_QUIRK_NODREAD = 0x20, /* Don't try and dummy read density */ - SA_QUIRK_NO_MODESEL = 0x40, /* Don't do mode select at all */ - SA_QUIRK_NO_CPAGE = 0x80 /* Don't use DEVICE COMPRESSION page */ + SA_QUIRK_NONE = 0x000, + SA_QUIRK_NOCOMP = 0x001, /* Can't deal with compression at all*/ + SA_QUIRK_FIXED = 0x002, /* Force fixed mode */ + SA_QUIRK_VARIABLE = 0x004, /* Force variable mode */ + SA_QUIRK_2FM = 0x008, /* Needs Two File Marks at EOD */ + SA_QUIRK_1FM = 0x010, /* No more than 1 File Mark at EOD */ + SA_QUIRK_NODREAD = 0x020, /* Don't try and dummy read density */ + SA_QUIRK_NO_MODESEL = 0x040, /* Don't do mode select at all */ + SA_QUIRK_NO_CPAGE = 0x080, /* Don't use DEVICE COMPRESSION page */ + SA_QUIRK_NO_LONG_POS = 0x100 /* No long position information */ } sa_quirks; #define SA_QUIRK_BIT_STRING \ @@ -175,10 +189,10 @@ typedef enum { "\0051FM" \ "\006NODREAD" \ "\007NO_MODESEL" \ - "\010NO_CPAGE" + "\010NO_CPAGE" \ + "\011NO_LONG_POS" #define SAMODE(z) (dev2unit(z) & 0x3) -#define SADENSITY(z) ((dev2unit(z) >> 2) & 0x3) #define SA_IS_CTRL(z) (dev2unit(z) & (1 << 4)) #define SA_NOT_CTLDEV 0 @@ -187,29 +201,134 @@ typedef enum { #define SA_ATYPE_R 0 #define SA_ATYPE_NR 1 #define SA_ATYPE_ER 2 +#define SA_NUM_ATYPES 3 -#define SAMINOR(ctl, mode, access) \ - ((ctl << 4) | (mode << 2) | (access & 0x3)) +#define SAMINOR(ctl, access) \ + ((ctl << 4) | (access & 0x3)) -#define SA_NUM_MODES 4 struct sa_devs { struct cdev *ctl_dev; - struct sa_mode_devs { - struct cdev *r_dev; - struct cdev *nr_dev; - struct cdev *er_dev; - } mode_devs[SA_NUM_MODES]; + struct cdev *r_dev; + struct cdev *nr_dev; + struct cdev *er_dev; +}; + +#define SASBADDBASE(sb, indent, data, xfmt, name, type, xsize, desc) \ + sbuf_printf(sb, "%*s<%s type=\"%s\" size=\"%zd\" " \ + "fmt=\"%s\" desc=\"%s\">" #xfmt "\n", indent, "", \ + #name, #type, xsize, #xfmt, desc ? desc : "", data, #name); + +#define SASBADDINT(sb, indent, data, fmt, name) \ + SASBADDBASE(sb, indent, data, fmt, name, int, sizeof(data), \ + NULL) + +#define SASBADDINTDESC(sb, indent, data, fmt, name, desc) \ + SASBADDBASE(sb, indent, data, fmt, name, int, sizeof(data), \ + desc) + +#define SASBADDUINT(sb, indent, data, fmt, name) \ + SASBADDBASE(sb, indent, data, fmt, name, uint, sizeof(data), \ + NULL) + +#define SASBADDUINTDESC(sb, indent, data, fmt, name, desc) \ + SASBADDBASE(sb, indent, data, fmt, name, uint, sizeof(data), \ + desc) + +#define SASBADDFIXEDSTR(sb, indent, data, fmt, name) \ + SASBADDBASE(sb, indent, data, fmt, name, str, sizeof(data), \ + NULL) + +#define SASBADDFIXEDSTRDESC(sb, indent, data, fmt, name, desc) \ + SASBADDBASE(sb, indent, data, fmt, name, str, sizeof(data), \ + desc) + +#define SASBADDVARSTR(sb, indent, data, fmt, name, maxlen) \ + SASBADDBASE(sb, indent, data, fmt, name, str, maxlen, NULL) + +#define SASBADDVARSTRDESC(sb, indent, data, fmt, name, maxlen, desc) \ + SASBADDBASE(sb, indent, data, fmt, name, str, maxlen, desc) + +#define SASBADDNODE(sb, indent, name) { \ + sbuf_printf(sb, "%*s<%s type=\"%s\">\n", indent, "", #name, \ + "node"); \ + indent += 2; \ +} + +#define SASBADDNODENUM(sb, indent, name, num) { \ + sbuf_printf(sb, "%*s<%s type=\"%s\" num=\"%d\">\n", indent, "", \ + #name, "node", num); \ + indent += 2; \ +} + +#define SASBENDNODE(sb, indent, name) { \ + indent -= 2; \ + sbuf_printf(sb, "%*s\n", indent, "", #name); \ +} + +#define SA_DENSITY_TYPES 4 + +struct sa_prot_state { + int initialized; + uint32_t prot_method; + uint32_t pi_length; + uint32_t lbp_w; + uint32_t lbp_r; + uint32_t rbdp; +}; + +struct sa_prot_info { + struct sa_prot_state cur_prot_state; + struct sa_prot_state pending_prot_state; +}; + +/* + * A table mapping protection parameters to their types and values. + */ +struct sa_prot_map { + char *name; + mt_param_set_type param_type; + off_t offset; + uint32_t min_val; + uint32_t max_val; + uint32_t *value; +} sa_prot_table[] = { + { "prot_method", MT_PARAM_SET_UNSIGNED, + __offsetof(struct sa_prot_state, prot_method), + /*min_val*/ 0, /*max_val*/ 255, NULL }, + { "pi_length", MT_PARAM_SET_UNSIGNED, + __offsetof(struct sa_prot_state, pi_length), + /*min_val*/ 0, /*max_val*/ SA_CTRL_DP_PI_LENGTH_MASK, NULL }, + { "lbp_w", MT_PARAM_SET_UNSIGNED, + __offsetof(struct sa_prot_state, lbp_w), + /*min_val*/ 0, /*max_val*/ 1, NULL }, + { "lbp_r", MT_PARAM_SET_UNSIGNED, + __offsetof(struct sa_prot_state, lbp_r), + /*min_val*/ 0, /*max_val*/ 1, NULL }, + { "rbdp", MT_PARAM_SET_UNSIGNED, + __offsetof(struct sa_prot_state, rbdp), + /*min_val*/ 0, /*max_val*/ 1, NULL } }; +#define SA_NUM_PROT_ENTS sizeof(sa_prot_table)/sizeof(sa_prot_table[0]) + +#define SA_PROT_ENABLED(softc) ((softc->flags & SA_FLAG_PROTECT_SUPP) \ + && (softc->prot_info.cur_prot_state.initialized != 0) \ + && (softc->prot_info.cur_prot_state.prot_method != 0)) + +#define SA_PROT_LEN(softc) softc->prot_info.cur_prot_state.pi_length + struct sa_softc { sa_state state; sa_flags flags; sa_quirks quirks; u_int si_flags; + struct cam_periph *periph; struct bio_queue_head bio_queue; int queue_count; struct devstat *device_stats; struct sa_devs devs; + int open_count; + int num_devs_to_destroy; int blk_gran; int blk_mask; int blk_shift; @@ -231,12 +350,37 @@ struct sa_softc { int filemarks; union ccb saved_ccb; int last_resid_was_io; - - /* - * Relative to BOT Location. - */ - daddr_t fileno; - daddr_t blkno; + uint8_t density_type_bits[SA_DENSITY_TYPES]; + int density_info_valid[SA_DENSITY_TYPES]; + uint8_t density_info[SA_DENSITY_TYPES][SRDS_MAX_LENGTH]; + + struct sa_prot_info prot_info; + + int sili; + int eot_warn; + + /* + * Current position information. -1 means that the given value is + * unknown. fileno and blkno are always calculated. blkno is + * relative to the previous file mark. rep_fileno and rep_blkno + * are as reported by the drive, if it supports the long form + * report for the READ POSITION command. rep_blkno is relative to + * the beginning of the partition. + * + * bop means that the drive is at the beginning of the partition. + * eop means that the drive is between early warning and end of + * partition, inside the current partition. + * bpew means that the position is in a PEWZ (Programmable Early + * Warning Zone) + */ + daddr_t partition; /* Absolute from BOT */ + daddr_t fileno; /* Relative to beginning of partition */ + daddr_t blkno; /* Relative to last file mark */ + daddr_t rep_blkno; /* Relative to beginning of partition */ + daddr_t rep_fileno; /* Relative to beginning of partition */ + int bop; /* Beginning of Partition */ + int eop; /* End of Partition */ + int bpew; /* Beyond Programmable Early Warning */ /* * Latched Error Info @@ -403,16 +547,42 @@ static int sagetparams(struct cam_perip u_int8_t *write_protect, u_int8_t *speed, int *comp_supported, int *comp_enabled, u_int32_t *comp_algorithm, - sa_comp_t *comp_page); + sa_comp_t *comp_page, + struct scsi_control_data_prot_subpage + *prot_page, int dp_size, + int prot_changeable); +static int sasetprot(struct cam_periph *periph, + struct sa_prot_state *new_prot); static int sasetparams(struct cam_periph *periph, sa_params params_to_set, u_int32_t blocksize, u_int8_t density, u_int32_t comp_algorithm, u_int32_t sense_flags); +static int sasetsili(struct cam_periph *periph, + struct mtparamset *ps, int num_params); +static int saseteotwarn(struct cam_periph *periph, + struct mtparamset *ps, int num_params); +static void safillprot(struct sa_softc *softc, int *indent, + struct sbuf *sb); +static void sapopulateprots(struct sa_prot_state *cur_state, + struct sa_prot_map *new_table, + int table_ents); +static struct sa_prot_map *safindprotent(char *name, struct sa_prot_map *table, + int table_ents); +static int sasetprotents(struct cam_periph *periph, + struct mtparamset *ps, int num_params); +static struct sa_param_ent *safindparament(struct mtparamset *ps); +static int saparamsetlist(struct cam_periph *periph, + struct mtsetlist *list, int need_copy); +static int saextget(struct cdev *dev, struct cam_periph *periph, + struct sbuf *sb, struct mtextget *g); +static int saparamget(struct sa_softc *softc, struct sbuf *sb); static void saprevent(struct cam_periph *periph, int action); static int sarewind(struct cam_periph *periph); static int saspace(struct cam_periph *periph, int count, scsi_space_code code); +static void sadevgonecb(void *arg); +static void sasetupdev(struct sa_softc *softc, struct cdev *dev); static int samount(struct cam_periph *, int, struct cdev *); static int saretension(struct cam_periph *periph); static int sareservereleaseunit(struct cam_periph *periph, @@ -420,9 +590,16 @@ static int sareservereleaseunit(struct static int saloadunload(struct cam_periph *periph, int load); static int saerase(struct cam_periph *periph, int longerase); static int sawritefilemarks(struct cam_periph *periph, - int nmarks, int setmarks); + int nmarks, int setmarks, int immed); +static int sagetpos(struct cam_periph *periph); static int sardpos(struct cam_periph *periph, int, u_int32_t *); -static int sasetpos(struct cam_periph *periph, int, u_int32_t *); +static int sasetpos(struct cam_periph *periph, int, + struct mtlocate *); +static void safilldenstypesb(struct sbuf *sb, int *indent, + uint8_t *buf, int buf_len, + int is_density); +static void safilldensitysb(struct sa_softc *softc, int *indent, + struct sbuf *sb); #ifndef SA_DEFAULT_IO_SPLIT @@ -464,7 +641,7 @@ static struct cdevsw sa_cdevsw = { .d_ioctl = saioctl, .d_strategy = sastrategy, .d_name = "sa", - .d_flags = D_TAPE, + .d_flags = D_TAPE | D_TRACKCLOSE, }; static int @@ -488,6 +665,7 @@ saopen(struct cdev *dev, int flags, int if (SA_IS_CTRL(dev)) { softc->ctrl_mode = 1; + softc->open_count++; cam_periph_unlock(periph); return (0); } @@ -519,6 +697,7 @@ saopen(struct cdev *dev, int flags, int if (error && (flags & O_NONBLOCK)) { softc->flags |= SA_FLAG_OPEN; softc->open_pending_mount = 1; + softc->open_count++; cam_periph_unhold(periph); cam_periph_unlock(periph); return (0); @@ -534,6 +713,7 @@ saopen(struct cdev *dev, int flags, int saprevent(periph, PR_PREVENT); softc->flags |= SA_FLAG_OPEN; + softc->open_count++; cam_periph_unhold(periph); cam_periph_unlock(periph); @@ -545,7 +725,7 @@ saclose(struct cdev *dev, int flag, int { struct cam_periph *periph; struct sa_softc *softc; - int mode, error, writing, tmp; + int mode, error, writing, tmp, i; int closedbits = SA_FLAG_OPEN; mode = SAMODE(dev); @@ -564,6 +744,7 @@ saclose(struct cdev *dev, int flag, int softc->open_rdonly = 0; if (SA_IS_CTRL(dev)) { softc->ctrl_mode = 0; + softc->open_count--; cam_periph_unlock(periph); cam_periph_release(periph); return (0); @@ -572,6 +753,7 @@ saclose(struct cdev *dev, int flag, int if (softc->open_pending_mount) { softc->flags &= ~SA_FLAG_OPEN; softc->open_pending_mount = 0; + softc->open_count--; cam_periph_unlock(periph); cam_periph_release(periph); return (0); @@ -676,6 +858,16 @@ saclose(struct cdev *dev, int flag, int * And we are no longer open for business. */ softc->flags &= ~closedbits; + softc->open_count--; + + /* + * Invalidate any density information that depends on having tape + * media in the drive. + */ + for (i = 0; i < SA_DENSITY_TYPES; i++) { + if (softc->density_type_bits[i] & SRDS_MEDIA) + softc->density_info_valid[i] = 0; + } /* * Inform users if tape state if frozen.... @@ -824,6 +1016,480 @@ sastrategy(struct bio *bp) return; } +static int +sasetsili(struct cam_periph *periph, struct mtparamset *ps, int num_params) +{ + uint32_t sili_blocksize; + struct sa_softc *softc; + int error; + + error = 0; + softc = (struct sa_softc *)periph->softc; + + if (ps->value_type != MT_PARAM_SET_SIGNED) { + snprintf(ps->error_str, sizeof(ps->error_str), + "sili is a signed parameter"); + goto bailout; + } + if ((ps->value.value_signed < 0) + || (ps->value.value_signed > 1)) { + snprintf(ps->error_str, sizeof(ps->error_str), + "invalid sili value %jd", (intmax_t)ps->value.value_signed); + goto bailout_error; + } + /* + * We only set the SILI flag in variable block + * mode. You'll get a check condition in fixed + * block mode if things don't line up in any case. + */ + if (softc->flags & SA_FLAG_FIXED) { + snprintf(ps->error_str, sizeof(ps->error_str), + "can't set sili bit in fixed block mode"); + goto bailout_error; + } + if (softc->sili == ps->value.value_signed) + goto bailout; + + if (ps->value.value_signed == 1) + sili_blocksize = 4; + else + sili_blocksize = 0; + + error = sasetparams(periph, SA_PARAM_BLOCKSIZE, + sili_blocksize, 0, 0, SF_QUIET_IR); + if (error != 0) { + snprintf(ps->error_str, sizeof(ps->error_str), + "sasetparams() returned error %d", error); + goto bailout_error; + } + + softc->sili = ps->value.value_signed; + +bailout: + ps->status = MT_PARAM_STATUS_OK; + return (error); + +bailout_error: + ps->status = MT_PARAM_STATUS_ERROR; + if (error == 0) + error = EINVAL; + + return (error); +} + +static int +saseteotwarn(struct cam_periph *periph, struct mtparamset *ps, int num_params) +{ + struct sa_softc *softc; + int error; + + error = 0; + softc = (struct sa_softc *)periph->softc; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 14:51:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 480CB4B8; Tue, 24 Mar 2015 14:51:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32EF02BA; Tue, 24 Mar 2015 14:51:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OEplwO012759; Tue, 24 Mar 2015 14:51:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OEpk6u012758; Tue, 24 Mar 2015 14:51:47 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503241451.t2OEpk6u012758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 24 Mar 2015 14:51:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280439 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 14:51:47 -0000 Author: tuexen Date: Tue Mar 24 14:51:46 2015 New Revision: 280439 URL: https://svnweb.freebsd.org/changeset/base/280439 Log: Fix an accounting bug related to the per stream chunk counter. While there, don't refer to a net articifically. MFC after: 3 days Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Tue Mar 24 14:36:10 2015 (r280438) +++ head/sys/netinet/sctputil.c Tue Mar 24 14:51:46 2015 (r280439) @@ -4891,13 +4891,9 @@ sctp_release_pr_sctp_chunk(struct sctp_t chk->rec.data.payloadtype = sp->ppid; chk->rec.data.context = sp->context; chk->flags = sp->act_flags; - if (sp->net) - chk->whoTo = sp->net; - else - chk->whoTo = stcb->asoc.primary_destination; - atomic_add_int(&chk->whoTo->ref_count, 1); + chk->whoTo = NULL; chk->rec.data.TSN_seq = atomic_fetchadd_int(&stcb->asoc.sending_seq, 1); - stcb->asoc.pr_sctp_cnt++; + strq->chunks_on_queues++; TAILQ_INSERT_TAIL(&stcb->asoc.sent_queue, chk, sctp_next); stcb->asoc.sent_queue_cnt++; stcb->asoc.pr_sctp_cnt++; From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 15:05:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F012ADF; Tue, 24 Mar 2015 15:05:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A3CB60B; Tue, 24 Mar 2015 15:05:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OF5bZA018189; Tue, 24 Mar 2015 15:05:37 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OF5buU018188; Tue, 24 Mar 2015 15:05:37 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503241505.t2OF5buU018188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 24 Mar 2015 15:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280440 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 15:05:37 -0000 Author: tuexen Date: Tue Mar 24 15:05:36 2015 New Revision: 280440 URL: https://svnweb.freebsd.org/changeset/base/280440 Log: Fix the bug in the handling of fragmented abandoned SCTP user messages reported in https://code.google.com/p/sctp-refimpl/issues/detail?id=11 Thanks to Lally Singh for reporting it. MFC after: 3 days Modified: head/sys/netinet/sctp_indata.c Modified: head/sys/netinet/sctp_indata.c ============================================================================== --- head/sys/netinet/sctp_indata.c Tue Mar 24 14:51:46 2015 (r280439) +++ head/sys/netinet/sctp_indata.c Tue Mar 24 15:05:36 2015 (r280440) @@ -2597,12 +2597,14 @@ sctp_process_segment_range(struct sctp_t * cumack trackers for first transmissions, * and retransmissions. */ - if ((tp1->whoTo->find_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && + if ((tp1->sent < SCTP_DATAGRAM_RESEND) && + (tp1->whoTo->find_pseudo_cumack == 1) && (tp1->snd_count == 1)) { tp1->whoTo->pseudo_cumack = tp1->rec.data.TSN_seq; tp1->whoTo->find_pseudo_cumack = 0; } - if ((tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->sent < SCTP_DATAGRAM_RESEND) && + if ((tp1->sent < SCTP_DATAGRAM_RESEND) && + (tp1->whoTo->find_rtx_pseudo_cumack == 1) && (tp1->snd_count > 1)) { tp1->whoTo->rtx_pseudo_cumack = tp1->rec.data.TSN_seq; tp1->whoTo->find_rtx_pseudo_cumack = 0; @@ -3512,7 +3514,7 @@ sctp_window_probe_recovery(struct sctp_t if ((tp1->sent >= SCTP_DATAGRAM_ACKED) || (tp1->data == NULL)) { /* TSN's skipped we do NOT move back. */ sctp_misc_ints(SCTP_FLIGHT_LOG_DWN_WP_FWD, - tp1->whoTo->flight_size, + tp1->whoTo ? tp1->whoTo->flight_size : 0, tp1->book_size, (uintptr_t) tp1->whoTo, tp1->rec.data.TSN_seq); From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 15:08:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B00BEC78; Tue, 24 Mar 2015 15:08:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AEFB63E; Tue, 24 Mar 2015 15:08:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OF8iXp018579; Tue, 24 Mar 2015 15:08:44 GMT (envelope-from lstewart@FreeBSD.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OF8iPD018578; Tue, 24 Mar 2015 15:08:44 GMT (envelope-from lstewart@FreeBSD.org) Message-Id: <201503241508.t2OF8iPD018578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: lstewart set sender to lstewart@FreeBSD.org using -f From: Lawrence Stewart Date: Tue, 24 Mar 2015 15:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280441 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 15:08:44 -0000 Author: lstewart Date: Tue Mar 24 15:08:43 2015 New Revision: 280441 URL: https://svnweb.freebsd.org/changeset/base/280441 Log: The addition of flowid and flowtype in r280233 and r280237 respectively forgot to extend the IPv6 packet node format string, which causes a build failure when SIFTR is compiled with IPv6 support. Reported by: Lars Eggert Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Tue Mar 24 15:05:36 2015 (r280440) +++ head/sys/netinet/siftr.c Tue Mar 24 15:08:43 2015 (r280441) @@ -448,7 +448,7 @@ siftr_process_pkt(struct pkt_node * pkt_ MAX_LOG_MSG_LEN, "%c,0x%08x,%zd.%06ld,%x:%x:%x:%x:%x:%x:%x:%x,%u,%x:%x:%x:" "%x:%x:%x:%x:%x,%u,%ld,%ld,%ld,%ld,%ld,%u,%u,%u,%u,%u,%u," - "%u,%d,%u,%u,%u,%u,%u,%u\n", + "%u,%d,%u,%u,%u,%u,%u,%u,%u,%u\n", direction[pkt_node->direction], pkt_node->hash, pkt_node->tval.tv_sec, From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 15:45:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30B4672D; Tue, 24 Mar 2015 15:45:47 +0000 (UTC) Received: from mail.strugglingcoder.info (strugglingcoder.info [65.19.130.35]) (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 19837ABC; Tue, 24 Mar 2015 15:45:46 +0000 (UTC) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPSA id D057BD2A07; Tue, 24 Mar 2015 08:45:45 -0700 (PDT) Date: Tue, 24 Mar 2015 08:45:45 -0700 From: hiren panchasara To: Lawrence Stewart Subject: Re: svn commit: r280441 - head/sys/netinet Message-ID: <20150324154545.GA53237@strugglingcoder.info> References: <201503241508.t2OF8iPD018578@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="c/UxJciryulPFo89" Content-Disposition: inline In-Reply-To: <201503241508.t2OF8iPD018578@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 15:45:47 -0000 --c/UxJciryulPFo89 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03/24/15 at 03:08P, Lawrence Stewart wrote: > Author: lstewart > Date: Tue Mar 24 15:08:43 2015 > New Revision: 280441 > URL: https://svnweb.freebsd.org/changeset/base/280441 >=20 > Log: > The addition of flowid and flowtype in r280233 and r280237 respectively= forgot > to extend the IPv6 packet node format string, which causes a build fail= ure when > SIFTR is compiled with IPv6 support. > =20 > Reported by: Lars Eggert My bad :-( Thanks for quickly fixing this. Hiren --c/UxJciryulPFo89 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJVEYaoXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lKg8H/AuY3mlPlInsWdMS+mD4zPqE XAuQ66QRSSX7m5zbD2bBc6p4GMAckP7cOnFIN5vvzkjNs/B3gPcoRpTAm7u8zgy6 X2ztqrKqWc/VBXDirG1b0F4nfHltKnBff5OczrNOLQSxEUFCnhT15vATIzFn1A3e l2bjdwdS4FCTwLZTj4+XfoBL6/V8DknfvM0rDjbopEaDNLriy0zl8WIoj2iS4rem loFtlv3c1cv1zlfQpuHZu4VqaJo4T+RJmAuz5Orz5F36agfXBoMPenmI/2WXHP89 DeY/MdcKGW+4igk4r8BzzLv2sHWFYxUhqwWJXE1sE+OiwtF7/UK8mFbtkQ+n9Ao= =UHlq -----END PGP SIGNATURE----- --c/UxJciryulPFo89-- From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 16:31:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39589682; Tue, 24 Mar 2015 16:31:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22877D7; Tue, 24 Mar 2015 16:31:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OGVQbk060591; Tue, 24 Mar 2015 16:31:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OGVNwe060578; Tue, 24 Mar 2015 16:31:23 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503241631.t2OGVNwe060578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Mar 2015 16:31:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280442 - head/sys/dev/sound/pcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 16:31:26 -0000 Author: hselasky Date: Tue Mar 24 16:31:22 2015 New Revision: 280442 URL: https://svnweb.freebsd.org/changeset/base/280442 Log: Make all PCM core sysctls tunable and remove redundant TUNABLE() statements. This allows for setting all PCM core parameters in the kernel environment through loader.conf(5) or kenv(1) which is useful for pluggable PCM devices like USB audio devices which might be plugged after that sysctl.conf(5) is executed. Modified: head/sys/dev/sound/pcm/channel.c head/sys/dev/sound/pcm/dsp.c head/sys/dev/sound/pcm/feeder_eq.c head/sys/dev/sound/pcm/feeder_rate.c head/sys/dev/sound/pcm/mixer.c head/sys/dev/sound/pcm/sndstat.c head/sys/dev/sound/pcm/sound.c head/sys/dev/sound/pcm/vchan.c Modified: head/sys/dev/sound/pcm/channel.c ============================================================================== --- head/sys/dev/sound/pcm/channel.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/channel.c Tue Mar 24 16:31:22 2015 (r280442) @@ -42,14 +42,13 @@ SND_DECLARE_FILE("$FreeBSD$"); int report_soft_formats = 1; SYSCTL_INT(_hw_snd, OID_AUTO, report_soft_formats, CTLFLAG_RW, - &report_soft_formats, 1, "report software-emulated formats"); + &report_soft_formats, 0, "report software-emulated formats"); int report_soft_matrix = 1; SYSCTL_INT(_hw_snd, OID_AUTO, report_soft_matrix, CTLFLAG_RW, - &report_soft_matrix, 1, "report software-emulated channel matrixing"); + &report_soft_matrix, 0, "report software-emulated channel matrixing"); int chn_latency = CHN_LATENCY_DEFAULT; -TUNABLE_INT("hw.snd.latency", &chn_latency); static int sysctl_hw_snd_latency(SYSCTL_HANDLER_ARGS) @@ -67,12 +66,11 @@ sysctl_hw_snd_latency(SYSCTL_HANDLER_ARG return err; } -SYSCTL_PROC(_hw_snd, OID_AUTO, latency, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, latency, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_latency, "I", "buffering latency (0=low ... 10=high)"); int chn_latency_profile = CHN_LATENCY_PROFILE_DEFAULT; -TUNABLE_INT("hw.snd.latency_profile", &chn_latency_profile); static int sysctl_hw_snd_latency_profile(SYSCTL_HANDLER_ARGS) @@ -90,13 +88,12 @@ sysctl_hw_snd_latency_profile(SYSCTL_HAN return err; } -SYSCTL_PROC(_hw_snd, OID_AUTO, latency_profile, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, latency_profile, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_latency_profile, "I", "buffering latency profile (0=aggressive 1=safe)"); static int chn_timeout = CHN_TIMEOUT; -TUNABLE_INT("hw.snd.timeout", &chn_timeout); -#ifdef SND_DEBUG + static int sysctl_hw_snd_timeout(SYSCTL_HANDLER_ARGS) { @@ -113,17 +110,15 @@ sysctl_hw_snd_timeout(SYSCTL_HANDLER_ARG return err; } -SYSCTL_PROC(_hw_snd, OID_AUTO, timeout, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, timeout, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_timeout, "I", "interrupt timeout (1 - 10) seconds"); -#endif static int chn_vpc_autoreset = 1; SYSCTL_INT(_hw_snd, OID_AUTO, vpc_autoreset, CTLFLAG_RWTUN, &chn_vpc_autoreset, 0, "automatically reset channels volume to 0db"); static int chn_vol_0db_pcm = SND_VOL_0DB_PCM; -TUNABLE_INT("hw.snd.vpc_0db", &chn_vol_0db_pcm); static void chn_vpc_proc(int reset, int db) @@ -169,7 +164,7 @@ sysctl_hw_snd_vpc_0db(SYSCTL_HANDLER_ARG return (0); } -SYSCTL_PROC(_hw_snd, OID_AUTO, vpc_0db, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, vpc_0db, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_vpc_0db, "I", "0db relative level"); @@ -193,16 +188,13 @@ SYSCTL_PROC(_hw_snd, OID_AUTO, vpc_reset "reset volume on all channels"); static int chn_usefrags = 0; -TUNABLE_INT("hw.snd.usefrags", &chn_usefrags); static int chn_syncdelay = -1; -TUNABLE_INT("hw.snd.syncdelay", &chn_syncdelay); -#ifdef SND_DEBUG -SYSCTL_INT(_hw_snd, OID_AUTO, usefrags, CTLFLAG_RW, - &chn_usefrags, 1, "prefer setfragments() over setblocksize()"); -SYSCTL_INT(_hw_snd, OID_AUTO, syncdelay, CTLFLAG_RW, - &chn_syncdelay, 1, + +SYSCTL_INT(_hw_snd, OID_AUTO, usefrags, CTLFLAG_RWTUN, + &chn_usefrags, 0, "prefer setfragments() over setblocksize()"); +SYSCTL_INT(_hw_snd, OID_AUTO, syncdelay, CTLFLAG_RWTUN, + &chn_syncdelay, 0, "append (0-1000) millisecond trailing buffer delay on each sync"); -#endif /** * @brief Channel sync group lock Modified: head/sys/dev/sound/pcm/dsp.c ============================================================================== --- head/sys/dev/sound/pcm/dsp.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/dsp.c Tue Mar 24 16:31:22 2015 (r280442) @@ -44,7 +44,7 @@ SND_DECLARE_FILE("$FreeBSD$"); static int dsp_mmap_allow_prot_exec = 0; -SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RW, +SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RWTUN, &dsp_mmap_allow_prot_exec, 0, "linux mmap compatibility (-1=force disable 0=auto 1=force enable)"); Modified: head/sys/dev/sound/pcm/feeder_eq.c ============================================================================== --- head/sys/dev/sound/pcm/feeder_eq.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/feeder_eq.c Tue Mar 24 16:31:22 2015 (r280442) @@ -682,12 +682,10 @@ feeder_eq_initsys(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "eq", CTLTYPE_INT | CTLFLAG_RW, d, sizeof(d), + "eq", CTLTYPE_INT | CTLFLAG_RWTUN, d, sizeof(d), sysctl_dev_pcm_eq, "I", "Bass/Treble Equalizer (0=disable, 1=enable, 2=bypass)"); - bzero(buf, sizeof(buf)); - (void)snprintf(buf, sizeof(buf), "Bass/Treble Equalizer Preamp " "(-/+ %d.0dB , %d.%ddB step)", FEEDEQ_GAIN_MAX, FEEDEQ_GAIN_STEP / FEEDEQ_GAIN_DIV, @@ -696,7 +694,7 @@ feeder_eq_initsys(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "eq_preamp", CTLTYPE_STRING | CTLFLAG_RW, d, sizeof(d), + "eq_preamp", CTLTYPE_STRING | CTLFLAG_RWTUN, d, sizeof(d), sysctl_dev_pcm_eq_preamp, "A", buf); } #endif Modified: head/sys/dev/sound/pcm/feeder_rate.c ============================================================================== --- head/sys/dev/sound/pcm/feeder_rate.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/feeder_rate.c Tue Mar 24 16:31:22 2015 (r280442) @@ -162,12 +162,6 @@ static int feeder_rate_polyphase_max = Z static char feeder_rate_presets[] = FEEDER_RATE_PRESETS; SYSCTL_STRING(_hw_snd, OID_AUTO, feeder_rate_presets, CTLFLAG_RD, &feeder_rate_presets, 0, "compile-time rate presets"); - -TUNABLE_INT("hw.snd.feeder_rate_min", &feeder_rate_min); -TUNABLE_INT("hw.snd.feeder_rate_max", &feeder_rate_max); -TUNABLE_INT("hw.snd.feeder_rate_round", &feeder_rate_round); -TUNABLE_INT("hw.snd.feeder_rate_quality", &feeder_rate_quality); - SYSCTL_INT(_hw_snd, OID_AUTO, feeder_rate_polyphase_max, CTLFLAG_RWTUN, &feeder_rate_polyphase_max, 0, "maximum allowable polyphase entries"); @@ -189,7 +183,7 @@ sysctl_hw_snd_feeder_rate_min(SYSCTL_HAN return (0); } -SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_min, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_min, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_feeder_rate_min, "I", "minimum allowable rate"); @@ -211,7 +205,7 @@ sysctl_hw_snd_feeder_rate_max(SYSCTL_HAN return (0); } -SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_max, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_max, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_feeder_rate_max, "I", "maximum allowable rate"); @@ -233,7 +227,7 @@ sysctl_hw_snd_feeder_rate_round(SYSCTL_H return (0); } -SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_round, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_round, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_feeder_rate_round, "I", "sample rate converter rounding threshold"); @@ -285,7 +279,7 @@ sysctl_hw_snd_feeder_rate_quality(SYSCTL return (0); } -SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_quality, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, feeder_rate_quality, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_feeder_rate_quality, "I", "sample rate converter quality ("__XSTRING(Z_QUALITY_MIN)"=low .. " __XSTRING(Z_QUALITY_MAX)"=high)"); Modified: head/sys/dev/sound/pcm/mixer.c ============================================================================== --- head/sys/dev/sound/pcm/mixer.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/mixer.c Tue Mar 24 16:31:22 2015 (r280442) @@ -883,10 +883,10 @@ mixer_hwvol_init(device_t dev) m->hwvol_step = 5; SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "hwvol_step", CTLFLAG_RW, &m->hwvol_step, 0, ""); + OID_AUTO, "hwvol_step", CTLFLAG_RWTUN, &m->hwvol_step, 0, ""); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "hwvol_mixer", CTLTYPE_STRING | CTLFLAG_RW, m, 0, + OID_AUTO, "hwvol_mixer", CTLTYPE_STRING | CTLFLAG_RWTUN, m, 0, sysctl_hw_snd_hwvol_mixer, "A", ""); return 0; } Modified: head/sys/dev/sound/pcm/sndstat.c ============================================================================== --- head/sys/dev/sound/pcm/sndstat.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/sndstat.c Tue Mar 24 16:31:22 2015 (r280442) @@ -83,7 +83,6 @@ static int sndstat_files = 0; static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(sndstat_devlist); int snd_verbose = 0; -TUNABLE_INT("hw.snd.verbose", &snd_verbose); #ifdef SND_DEBUG static int @@ -104,7 +103,7 @@ sysctl_hw_snd_sndstat_pid(SYSCTL_HANDLER sx_unlock(&sndstat_lock); return (err); } -SYSCTL_PROC(_hw_snd, OID_AUTO, sndstat_pid, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, sndstat_pid, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_sndstat_pid, "I", "sndstat busy pid"); #endif @@ -125,7 +124,7 @@ sysctl_hw_sndverbose(SYSCTL_HANDLER_ARGS } return error; } -SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, verbose, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_sndverbose, "I", "verbosity level"); static int Modified: head/sys/dev/sound/pcm/sound.c ============================================================================== --- head/sys/dev/sound/pcm/sound.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/sound.c Tue Mar 24 16:31:22 2015 (r280442) @@ -49,20 +49,17 @@ devclass_t pcm_devclass; int pcm_veto_load = 1; int snd_unit = -1; -TUNABLE_INT("hw.snd.default_unit", &snd_unit); static int snd_unit_auto = -1; SYSCTL_INT(_hw_snd, OID_AUTO, default_auto, CTLFLAG_RWTUN, &snd_unit_auto, 0, "assign default unit to a newly attached device"); int snd_maxautovchans = 16; -/* XXX: a tunable implies that we may need more than one sound channel before - the system can change a sysctl (/etc/sysctl.conf), do we really need - this? */ -TUNABLE_INT("hw.snd.maxautovchans", &snd_maxautovchans); SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD, 0, "Sound driver"); +static void pcm_sysinit(device_t); + /* * XXX I've had enough with people not telling proper version/arch * while reporting problems, not after 387397913213th questions/requests. @@ -444,7 +441,7 @@ sysctl_hw_snd_default_unit(SYSCTL_HANDLE } /* XXX: do we need a way to let the user change the default unit? */ SYSCTL_PROC(_hw_snd, OID_AUTO, default_unit, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_ANYBODY, + CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_ANYBODY, 0, sizeof(int), sysctl_hw_snd_default_unit, "I", "default sound device"); @@ -474,7 +471,7 @@ sysctl_hw_snd_maxautovchans(SYSCTL_HANDL } return (error); } -SYSCTL_PROC(_hw_snd, OID_AUTO, maxautovchans, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, maxautovchans, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_maxautovchans, "I", "maximum virtual channel"); struct pcm_channel * @@ -766,16 +763,17 @@ pcm_setstatus(device_t dev, char *str) { struct snddev_info *d = device_get_softc(dev); + /* should only be called once */ + if (d->flags & SD_F_REGISTERED) + return (EINVAL); + PCM_BUSYASSERT(d); if (d->playcount == 0 || d->reccount == 0) d->flags |= SD_F_SIMPLEX; - if ((d->playcount > 0 || d->reccount > 0) && - !(d->flags & SD_F_AUTOVCHAN)) { + if (d->playcount > 0 || d->reccount > 0) d->flags |= SD_F_AUTOVCHAN; - vchan_initsys(dev); - } pcm_setmaxautovchans(d, snd_maxautovchans); @@ -794,6 +792,12 @@ pcm_setstatus(device_t dev, char *str) PCM_UNLOCK(d); + /* + * Create all sysctls once SD_F_REGISTERED is set else + * tunable sysctls won't work: + */ + pcm_sysinit(dev); + if (snd_unit_auto < 0) snd_unit_auto = (snd_unit < 0) ? 1 : 0; if (snd_unit < 0 || snd_unit_auto > 1) @@ -1001,11 +1005,49 @@ sysctl_hw_snd_clone_gc(SYSCTL_HANDLER_AR return (err); } -SYSCTL_PROC(_hw_snd, OID_AUTO, clone_gc, CTLTYPE_INT | CTLFLAG_RW, +SYSCTL_PROC(_hw_snd, OID_AUTO, clone_gc, CTLTYPE_INT | CTLFLAG_RWTUN, 0, sizeof(int), sysctl_hw_snd_clone_gc, "I", "global clone garbage collector"); #endif +static void +pcm_sysinit(device_t dev) +{ + struct snddev_info *d = device_get_softc(dev); + + /* XXX: an user should be able to set this with a control tool, the + sysadmin then needs min+max sysctls for this */ + SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "buffersize", CTLFLAG_RD, &d->bufsz, 0, "allocated buffer size"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "bitperfect", CTLTYPE_INT | CTLFLAG_RWTUN, d, sizeof(d), + sysctl_dev_pcm_bitperfect, "I", + "bit-perfect playback/recording (0=disable, 1=enable)"); +#ifdef SND_DEBUG + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "clone_flags", CTLTYPE_UINT | CTLFLAG_RWTUN, d, sizeof(d), + sysctl_dev_pcm_clone_flags, "IU", + "clone flags"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "clone_deadline", CTLTYPE_INT | CTLFLAG_RWTUN, d, sizeof(d), + sysctl_dev_pcm_clone_deadline, "I", + "clone expiration deadline (ms)"); + SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "clone_gc", CTLTYPE_INT | CTLFLAG_RWTUN, d, sizeof(d), + sysctl_dev_pcm_clone_gc, "I", + "clone garbage collector"); +#endif + if (d->flags & SD_F_AUTOVCHAN) + vchan_initsys(dev); + if (d->flags & SD_F_EQ) + feeder_eq_initsys(dev); +} + int pcm_register(device_t dev, void *devinfo, int numplay, int numrec) { @@ -1087,41 +1129,9 @@ pcm_register(device_t dev, void *devinfo d->rec_sysctl_tree = SYSCTL_ADD_NODE(&d->rec_sysctl_ctx, SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "rec", CTLFLAG_RD, 0, "record channels node"); - /* XXX: an user should be able to set this with a control tool, the - sysadmin then needs min+max sysctls for this */ - SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), - OID_AUTO, "buffersize", CTLFLAG_RD, &d->bufsz, 0, "allocated buffer size"); - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "bitperfect", CTLTYPE_INT | CTLFLAG_RW, d, sizeof(d), - sysctl_dev_pcm_bitperfect, "I", - "bit-perfect playback/recording (0=disable, 1=enable)"); -#ifdef SND_DEBUG - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "clone_flags", CTLTYPE_UINT | CTLFLAG_RW, d, sizeof(d), - sysctl_dev_pcm_clone_flags, "IU", - "clone flags"); - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "clone_deadline", CTLTYPE_INT | CTLFLAG_RW, d, sizeof(d), - sysctl_dev_pcm_clone_deadline, "I", - "clone expiration deadline (ms)"); - SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), - SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "clone_gc", CTLTYPE_INT | CTLFLAG_RW, d, sizeof(d), - sysctl_dev_pcm_clone_gc, "I", - "clone garbage collector"); -#endif - if (numplay > 0 || numrec > 0) { + if (numplay > 0 || numrec > 0) d->flags |= SD_F_AUTOVCHAN; - vchan_initsys(dev); - } - - if (d->flags & SD_F_EQ) - feeder_eq_initsys(dev); sndstat_register(dev, d->status, sndstat_prepare_pcm); Modified: head/sys/dev/sound/pcm/vchan.c ============================================================================== --- head/sys/dev/sound/pcm/vchan.c Tue Mar 24 15:08:43 2015 (r280441) +++ head/sys/dev/sound/pcm/vchan.c Tue Mar 24 16:31:22 2015 (r280442) @@ -45,7 +45,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #ifdef SND_DEBUG static int snd_passthrough_verbose = 0; -SYSCTL_INT(_hw_snd, OID_AUTO, passthrough_verbose, CTLFLAG_RW, +SYSCTL_INT(_hw_snd, OID_AUTO, passthrough_verbose, CTLFLAG_RWTUN, &snd_passthrough_verbose, 0, "passthrough verbosity"); #endif @@ -946,45 +946,45 @@ vchan_initsys(device_t dev) /* Play */ SYSCTL_ADD_PROC(&d->play_sysctl_ctx, SYSCTL_CHILDREN(d->play_sysctl_tree), - OID_AUTO, "vchans", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "vchans", CTLTYPE_INT | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, PLAY), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchans, "I", "total allocated virtual channel"); SYSCTL_ADD_PROC(&d->play_sysctl_ctx, SYSCTL_CHILDREN(d->play_sysctl_tree), - OID_AUTO, "vchanmode", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "vchanmode", CTLTYPE_STRING | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, PLAY), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchanmode, "A", "vchan format/rate selection: 0=fixed, 1=passthrough, 2=adaptive"); SYSCTL_ADD_PROC(&d->play_sysctl_ctx, SYSCTL_CHILDREN(d->play_sysctl_tree), - OID_AUTO, "vchanrate", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "vchanrate", CTLTYPE_INT | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, PLAY), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchanrate, "I", "virtual channel mixing speed/rate"); SYSCTL_ADD_PROC(&d->play_sysctl_ctx, SYSCTL_CHILDREN(d->play_sysctl_tree), - OID_AUTO, "vchanformat", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "vchanformat", CTLTYPE_STRING | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, PLAY), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchanformat, "A", "virtual channel mixing format"); /* Rec */ SYSCTL_ADD_PROC(&d->rec_sysctl_ctx, SYSCTL_CHILDREN(d->rec_sysctl_tree), - OID_AUTO, "vchans", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "vchans", CTLTYPE_INT | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, REC), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchans, "I", "total allocated virtual channel"); SYSCTL_ADD_PROC(&d->rec_sysctl_ctx, SYSCTL_CHILDREN(d->rec_sysctl_tree), - OID_AUTO, "vchanmode", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "vchanmode", CTLTYPE_STRING | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, REC), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchanmode, "A", "vchan format/rate selection: 0=fixed, 1=passthrough, 2=adaptive"); SYSCTL_ADD_PROC(&d->rec_sysctl_ctx, SYSCTL_CHILDREN(d->rec_sysctl_tree), - OID_AUTO, "vchanrate", CTLTYPE_INT | CTLFLAG_RW, + OID_AUTO, "vchanrate", CTLTYPE_INT | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, REC), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchanrate, "I", "virtual channel mixing speed/rate"); SYSCTL_ADD_PROC(&d->rec_sysctl_ctx, SYSCTL_CHILDREN(d->rec_sysctl_tree), - OID_AUTO, "vchanformat", CTLTYPE_STRING | CTLFLAG_RW, + OID_AUTO, "vchanformat", CTLTYPE_STRING | CTLFLAG_RWTUN, VCHAN_SYSCTL_DATA(unit, REC), VCHAN_SYSCTL_DATA_SIZE, sysctl_dev_pcm_vchanformat, "A", "virtual channel mixing format"); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 16:37:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15E67890; Tue, 24 Mar 2015 16:37:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00788131; Tue, 24 Mar 2015 16:37:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OGbKDH061826; Tue, 24 Mar 2015 16:37:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OGbKYg061824; Tue, 24 Mar 2015 16:37:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503241637.t2OGbKYg061824@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Mar 2015 16:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280443 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 16:37:21 -0000 Author: hselasky Date: Tue Mar 24 16:37:19 2015 New Revision: 280443 URL: https://svnweb.freebsd.org/changeset/base/280443 Log: Correct string pointer offset for error printout. Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Tue Mar 24 16:31:22 2015 (r280442) +++ head/sys/kern/kern_sysctl.c Tue Mar 24 16:37:19 2015 (r280443) @@ -285,7 +285,7 @@ sysctl_load_tunable_by_oid_locked(struct error = sysctl_root_handler_locked(oidp, oidp->oid_arg1, oidp->oid_arg2, &req); if (error != 0) - printf("Setting sysctl %s failed: %d\n", path, error); + printf("Setting sysctl %s failed: %d\n", path + rem, error); if (penv != NULL) freeenv(penv); } From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 16:45:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29FE3AD; Tue, 24 Mar 2015 16:45:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14B9F241; Tue, 24 Mar 2015 16:45:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OGjpuP066995; Tue, 24 Mar 2015 16:45:51 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OGjpoe066993; Tue, 24 Mar 2015 16:45:51 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503241645.t2OGjpoe066993@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 24 Mar 2015 16:45:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280444 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 16:45:52 -0000 Author: glebius Date: Tue Mar 24 16:45:50 2015 New Revision: 280444 URL: https://svnweb.freebsd.org/changeset/base/280444 Log: Move ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple function that works with in6_addr and it is not related to the INET6 stack implementation. Sponsored by: Nginx, Inc. Modified: head/sys/netinet6/in6.h head/sys/netinet6/in6_var.h Modified: head/sys/netinet6/in6.h ============================================================================== --- head/sys/netinet6/in6.h Tue Mar 24 16:37:19 2015 (r280443) +++ head/sys/netinet6/in6.h Tue Mar 24 16:45:50 2015 (r280444) @@ -651,6 +651,7 @@ int in6_cksum_partial(struct mbuf *, u_i int in6_localaddr(struct in6_addr *); int in6_localip(struct in6_addr *); int in6_addrscope(const struct in6_addr *); +char *ip6_sprintf(char *, const struct in6_addr *); struct in6_ifaddr *in6_ifawithifp(struct ifnet *, struct in6_addr *); extern void in6_if_up(struct ifnet *); struct sockaddr; Modified: head/sys/netinet6/in6_var.h ============================================================================== --- head/sys/netinet6/in6_var.h Tue Mar 24 16:37:19 2015 (r280443) +++ head/sys/netinet6/in6_var.h Tue Mar 24 16:45:50 2015 (r280444) @@ -811,7 +811,6 @@ struct in6_ifaddr *in6ifa_ifpforlinkloca struct in6_ifaddr *in6ifa_ifpwithaddr(struct ifnet *, struct in6_addr *); struct in6_ifaddr *in6ifa_ifwithaddr(const struct in6_addr *, uint32_t); struct in6_ifaddr *in6ifa_llaonifp(struct ifnet *); -char *ip6_sprintf(char *, const struct in6_addr *); int in6_addr2zoneid(struct ifnet *, struct in6_addr *, u_int32_t *); int in6_matchlen(struct in6_addr *, struct in6_addr *); int in6_are_prefix_equal(struct in6_addr *, struct in6_addr *, int); From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 16:46:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CDAB1FB; Tue, 24 Mar 2015 16:46:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87652258; Tue, 24 Mar 2015 16:46:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OGkfT7067148; Tue, 24 Mar 2015 16:46:41 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OGkf2U067147; Tue, 24 Mar 2015 16:46:41 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503241646.t2OGkf2U067147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 24 Mar 2015 16:46:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280445 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 16:46:41 -0000 Author: glebius Date: Tue Mar 24 16:46:40 2015 New Revision: 280445 URL: https://svnweb.freebsd.org/changeset/base/280445 Log: Do not include if_var.h and in6_var.h into kern_jail.c. It is now possible after r280444. Sponsored by: Nginx, Inc. Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Tue Mar 24 16:45:50 2015 (r280444) +++ head/sys/kern/kern_jail.c Tue Mar 24 16:46:40 2015 (r280445) @@ -62,16 +62,12 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include #ifdef DDB #include -#ifdef INET6 -#include -#endif /* INET6 */ #endif /* DDB */ #include From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 16:53:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53819425; Tue, 24 Mar 2015 16:53:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DA44384; Tue, 24 Mar 2015 16:53:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OGrHqV071404; Tue, 24 Mar 2015 16:53:17 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OGrHvi071403; Tue, 24 Mar 2015 16:53:17 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503241653.t2OGrHvi071403@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 24 Mar 2015 16:53:17 +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: r280446 - stable/10/sys/cam X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 16:53:18 -0000 Author: ken Date: Tue Mar 24 16:53:16 2015 New Revision: 280446 URL: https://svnweb.freebsd.org/changeset/base/280446 Log: MFC, r279375 ------------------------------------------------------------------------ r279375 | ken | 2015-02-27 14:35:36 -0700 (Fri, 27 Feb 2015) | 26 lines Fix I/O size calculation for pass(4) driver requests and add latency tracking. It is important to subtract the residual from the requested transfer size to see how much data was actually transferred. With tape drives in particular, it is common to request more data than is returned. Also, add I/O latency tracking for CAM requests issued by cam_periph_runccb(). If the caller supplies a struct devstat, and the I/O is a SCSI or ATA I/O, we will track the elapsed time to provide I/O latency statistics for the request. sys/cam/scsi/cam_periph.c: In cam_periph_runccb(), subtract the residual when reporting I/O totals to devstat(9) for SCSI and ATA passthrough requests. In cam_periph_runccb(), grab the I/O start time and supply the start time to devstat_end_transaction() so that it can calculate the elapsed I/O time. Sponsored by: Spectra Logic MFC after: 1 week ------------------------------------------------------------------------ Sponsored by: Spectra Logic Modified: stable/10/sys/cam/cam_periph.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam_periph.c ============================================================================== --- stable/10/sys/cam/cam_periph.c Tue Mar 24 16:46:40 2015 (r280445) +++ stable/10/sys/cam/cam_periph.c Tue Mar 24 16:53:16 2015 (r280446) @@ -1048,8 +1048,11 @@ cam_periph_runccb(union ccb *ccb, cam_flags camflags, u_int32_t sense_flags, struct devstat *ds) { + struct bintime *starttime; + struct bintime ltime; int error; + starttime = NULL; xpt_path_assert(ccb->ccb_h.path, MA_OWNED); /* @@ -1057,8 +1060,11 @@ cam_periph_runccb(union ccb *ccb, * this particular type of ccb, record the transaction start. */ if ((ds != NULL) && (ccb->ccb_h.func_code == XPT_SCSI_IO || - ccb->ccb_h.func_code == XPT_ATA_IO)) - devstat_start_transaction(ds, NULL); + ccb->ccb_h.func_code == XPT_ATA_IO)) { + starttime = <ime; + binuptime(starttime); + devstat_start_transaction(ds, starttime); + } ccb->ccb_h.cbfcnp = cam_periph_done; xpt_action(ccb); @@ -1086,22 +1092,22 @@ cam_periph_runccb(union ccb *ccb, if (ds != NULL) { if (ccb->ccb_h.func_code == XPT_SCSI_IO) { devstat_end_transaction(ds, - ccb->csio.dxfer_len, + ccb->csio.dxfer_len - ccb->csio.resid, ccb->csio.tag_action & 0x3, ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE) ? DEVSTAT_NO_DATA : (ccb->ccb_h.flags & CAM_DIR_OUT) ? DEVSTAT_WRITE : - DEVSTAT_READ, NULL, NULL); + DEVSTAT_READ, NULL, starttime); } else if (ccb->ccb_h.func_code == XPT_ATA_IO) { devstat_end_transaction(ds, - ccb->ataio.dxfer_len, + ccb->ataio.dxfer_len - ccb->ataio.resid, ccb->ataio.tag_action & 0x3, ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE) ? DEVSTAT_NO_DATA : (ccb->ccb_h.flags & CAM_DIR_OUT) ? DEVSTAT_WRITE : - DEVSTAT_READ, NULL, NULL); + DEVSTAT_READ, NULL, starttime); } } From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 17:12:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C37ECC67; Tue, 24 Mar 2015 17:12:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACE3A85E; Tue, 24 Mar 2015 17:12:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OHCcTg081779; Tue, 24 Mar 2015 17:12:38 GMT (envelope-from tychon@FreeBSD.org) Received: (from tychon@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OHCaNu081774; Tue, 24 Mar 2015 17:12:36 GMT (envelope-from tychon@FreeBSD.org) Message-Id: <201503241712.t2OHCaNu081774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tychon set sender to tychon@FreeBSD.org using -f From: Tycho Nightingale Date: Tue, 24 Mar 2015 17:12:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280447 - in head/sys/amd64: include vmm vmm/amd vmm/intel X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 17:12:38 -0000 Author: tychon Date: Tue Mar 24 17:12:36 2015 New Revision: 280447 URL: https://svnweb.freebsd.org/changeset/base/280447 Log: When fetching an instruction in non-64bit mode, consider the value of the code segment base address. Also if an instruction doesn't support a mod R/M (modRM) byte, don't be concerned if the CPU is in real mode. Reviewed by: neel Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/amd/svm.c head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Tue Mar 24 16:53:16 2015 (r280446) +++ head/sys/amd64/include/vmm.h Tue Mar 24 17:12:36 2015 (r280447) @@ -551,6 +551,7 @@ struct vm_exit { struct { uint64_t gpa; uint64_t gla; + uint64_t cs_base; int cs_d; /* CS.D */ struct vm_guest_paging paging; struct vie vie; Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Tue Mar 24 16:53:16 2015 (r280446) +++ head/sys/amd64/vmm/amd/svm.c Tue Mar 24 17:12:36 2015 (r280447) @@ -799,8 +799,13 @@ svm_handle_inst_emul(struct vmcb *vmcb, KASSERT(error == 0, ("%s: vmcb_seg(CS) error %d", __func__, error)); switch(paging->cpu_mode) { + case CPU_MODE_REAL: + vmexit->u.inst_emul.cs_base = seg.base; + vmexit->u.inst_emul.cs_d = 0; case CPU_MODE_PROTECTED: case CPU_MODE_COMPATIBILITY: + vmexit->u.inst_emul.cs_base = seg.base; + /* * Section 4.8.1 of APM2, Default Operand Size or D bit. */ @@ -808,6 +813,7 @@ svm_handle_inst_emul(struct vmcb *vmcb, 1 : 0; break; default: + vmexit->u.inst_emul.cs_base = 0; vmexit->u.inst_emul.cs_d = 0; break; } Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Mar 24 16:53:16 2015 (r280446) +++ head/sys/amd64/vmm/intel/vmx.c Tue Mar 24 17:12:36 2015 (r280447) @@ -1784,12 +1784,18 @@ vmexit_inst_emul(struct vm_exit *vmexit, vmexit->u.inst_emul.gla = gla; vmx_paging_info(paging); switch (paging->cpu_mode) { + case CPU_MODE_REAL: + vmexit->u.inst_emul.cs_base = vmcs_read(VMCS_GUEST_CS_BASE); + vmexit->u.inst_emul.cs_d = 0; + break; case CPU_MODE_PROTECTED: case CPU_MODE_COMPATIBILITY: + vmexit->u.inst_emul.cs_base = vmcs_read(VMCS_GUEST_CS_BASE); csar = vmcs_read(VMCS_GUEST_CS_ACCESS_RIGHTS); vmexit->u.inst_emul.cs_d = SEG_DESC_DEF32(csar); break; default: + vmexit->u.inst_emul.cs_base = 0; vmexit->u.inst_emul.cs_d = 0; break; } Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Tue Mar 24 16:53:16 2015 (r280446) +++ head/sys/amd64/vmm/vmm.c Tue Mar 24 17:12:36 2015 (r280447) @@ -1251,7 +1251,7 @@ vm_handle_inst_emul(struct vm *vm, int v struct vie *vie; struct vcpu *vcpu; struct vm_exit *vme; - uint64_t gla, gpa; + uint64_t gla, gpa, cs_base; struct vm_guest_paging *paging; mem_region_read_t mread; mem_region_write_t mwrite; @@ -1263,6 +1263,7 @@ vm_handle_inst_emul(struct vm *vm, int v gla = vme->u.inst_emul.gla; gpa = vme->u.inst_emul.gpa; + cs_base = vme->u.inst_emul.cs_base; cs_d = vme->u.inst_emul.cs_d; vie = &vme->u.inst_emul.vie; paging = &vme->u.inst_emul.paging; @@ -1277,8 +1278,8 @@ vm_handle_inst_emul(struct vm *vm, int v * maximum size instruction. */ length = vme->inst_length ? vme->inst_length : VIE_INST_SIZE; - error = vmm_fetch_instruction(vm, vcpuid, paging, vme->rip, - length, vie); + error = vmm_fetch_instruction(vm, vcpuid, paging, vme->rip + + cs_base, length, vie); } else { /* * The instruction bytes have already been copied into 'vie' Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Tue Mar 24 16:53:16 2015 (r280446) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Tue Mar 24 17:12:36 2015 (r280447) @@ -1825,12 +1825,12 @@ decode_modrm(struct vie *vie, enum vm_cp { uint8_t x; - if (cpu_mode == CPU_MODE_REAL) - return (-1); - if (vie->op.op_flags & VIE_OP_F_NO_MODRM) return (0); + if (cpu_mode == CPU_MODE_REAL) + return (-1); + if (vie_peek(vie, &x)) return (-1); From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 17:20:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FD2D1000; Tue, 24 Mar 2015 17:20:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D38B28BE; Tue, 24 Mar 2015 17:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OHKLn8082858; Tue, 24 Mar 2015 17:20:21 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OHKLI7082856; Tue, 24 Mar 2015 17:20:21 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503241720.t2OHKLI7082856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 24 Mar 2015 17:20:21 +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: r280448 - in stable/10/sys/dev: mpr mps X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 17:20:22 -0000 Author: ken Date: Tue Mar 24 17:20:20 2015 New Revision: 280448 URL: https://svnweb.freebsd.org/changeset/base/280448 Log: MFC, r279336: ------------------------------------------------------------------------ r279336 | ken | 2015-02-26 15:22:06 -0700 (Thu, 26 Feb 2015) | 12 lines Add FreeBSD stable/10 version checks for the availability of the CDAI_FLAG_NONE advanced information CCB flag. Support for the flag was merged to stable/10 in r279329, and the __FreeBSD_version in stable/10 was bumped to 1001510. Check for that version in the mps(4) and mpr(4) drivers when determining whether to use the flag. Sponsored by: Spectra Logic MFC after: 3 days ------------------------------------------------------------------------ Modified: stable/10/sys/dev/mpr/mpr_sas.c stable/10/sys/dev/mps/mps_sas.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mpr/mpr_sas.c ============================================================================== --- stable/10/sys/dev/mpr/mpr_sas.c Tue Mar 24 17:12:36 2015 (r280447) +++ stable/10/sys/dev/mpr/mpr_sas.c Tue Mar 24 17:20:20 2015 (r280448) @@ -3084,7 +3084,8 @@ mprsas_async(void *callback_arg, uint32_ cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; cdai.buftype = CDAI_TYPE_RCAPLONG; -#if __FreeBSD_version >= 1100061 +#if (__FreeBSD_version >= 1100061) || \ + ((__FreeBSD_version >= 1001510) && (__FreeBSD_version < 1100000)) cdai.flags = CDAI_FLAG_NONE; #else cdai.flags = 0; Modified: stable/10/sys/dev/mps/mps_sas.c ============================================================================== --- stable/10/sys/dev/mps/mps_sas.c Tue Mar 24 17:12:36 2015 (r280447) +++ stable/10/sys/dev/mps/mps_sas.c Tue Mar 24 17:20:20 2015 (r280448) @@ -3237,7 +3237,8 @@ mpssas_async(void *callback_arg, uint32_ cdai.ccb_h.func_code = XPT_DEV_ADVINFO; cdai.ccb_h.flags = CAM_DIR_IN; cdai.buftype = CDAI_TYPE_RCAPLONG; -#if __FreeBSD_version >= 1100061 +#if (__FreeBSD_version >= 1100061) || \ + ((__FreeBSD_version >= 1001510) && (__FreeBSD_version < 1100000)) cdai.flags = CDAI_FLAG_NONE; #else cdai.flags = 0; From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 17:37:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED6D0493; Tue, 24 Mar 2015 17:37:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D749CAD8; Tue, 24 Mar 2015 17:37:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OHbWBe092497; Tue, 24 Mar 2015 17:37:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OHbWKR092496; Tue, 24 Mar 2015 17:37:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503241737.t2OHbWKR092496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 24 Mar 2015 17:37:32 +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: r280449 - stable/10/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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 17:37:33 -0000 Author: pfg Date: Tue Mar 24 17:37:31 2015 New Revision: 280449 URL: https://svnweb.freebsd.org/changeset/base/280449 Log: MFC r280273; Permit multiple arguments for the nonnull attribute. This is very useful for non-trivial functions and doesn't affect existing uses. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/cdefs.h ============================================================================== --- stable/10/sys/sys/cdefs.h Tue Mar 24 17:20:20 2015 (r280448) +++ stable/10/sys/sys/cdefs.h Tue Mar 24 17:37:31 2015 (r280449) @@ -347,9 +347,9 @@ #endif #if __GNUC_PREREQ__(3, 3) -#define __nonnull(x) __attribute__((__nonnull__(x))) +#define __nonnull(...) __attribute__((__nonnull__(__VA_ARGS__))) #else -#define __nonnull(x) +#define __nonnull(...) #endif #if __GNUC_PREREQ__(3, 4) From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 17:42:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EB8574E; Tue, 24 Mar 2015 17:42:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 29128C0F; Tue, 24 Mar 2015 17:42:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OHgsWt096810; Tue, 24 Mar 2015 17:42:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OHgs7D096809; Tue, 24 Mar 2015 17:42:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503241742.t2OHgs7D096809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 24 Mar 2015 17:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280450 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 17:42:54 -0000 Author: hselasky Date: Tue Mar 24 17:42:53 2015 New Revision: 280450 URL: https://svnweb.freebsd.org/changeset/base/280450 Log: Make sure tunable sysctls are only fetched once. The existing code can re-register sysctls when destroying sysctl contexts or when moving sysctls from one tree to another. Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Tue Mar 24 17:37:31 2015 (r280449) +++ head/sys/kern/kern_sysctl.c Tue Mar 24 17:42:53 2015 (r280450) @@ -353,6 +353,9 @@ sysctl_register_oid(struct sysctl_oid *o #endif (oidp->oid_kind & CTLFLAG_TUN) != 0 && (oidp->oid_kind & CTLFLAG_NOFETCH) == 0) { + /* only fetch value once */ + oidp->oid_kind |= CTLFLAG_NOFETCH; + /* try to fetch value from kernel environment */ sysctl_load_tunable_by_oid_locked(oidp); } } From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 18:09:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11B35EB2; Tue, 24 Mar 2015 18:09:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC899EB7; Tue, 24 Mar 2015 18:09:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OI9D4O010092; Tue, 24 Mar 2015 18:09:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OI974b010068; Tue, 24 Mar 2015 18:09:07 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503241809.t2OI974b010068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 24 Mar 2015 18:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280451 - in head: . share/man/man4 sys/arm/mv sys/boot/forth sys/conf sys/dev/ata sys/dev/ata/chipsets sys/modules/ata/atapci/chipsets sys/modules/ata/atapci/chipsets/ataadaptec sys/mo... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 18:09:14 -0000 Author: mav Date: Tue Mar 24 18:09:07 2015 New Revision: 280451 URL: https://svnweb.freebsd.org/changeset/base/280451 Log: Remove from legacy ata(4) driver support for hardware, supported by newer and more functional drivers ahci(4), siis(4) and mvs(4). This removes about 3400 lines of code, unused since FreeBSD 9.0 release. Deleted: head/sys/arm/mv/mv_sata.c head/sys/dev/ata/chipsets/ata-adaptec.c head/sys/dev/ata/chipsets/ata-ahci.c head/sys/modules/ata/atapci/chipsets/ataadaptec/ head/sys/modules/ata/atapci/chipsets/ataahci/ Modified: head/UPDATING head/share/man/man4/ahci.4 head/share/man/man4/ata.4 head/share/man/man4/mvs.4 head/share/man/man4/siis.4 head/sys/arm/mv/files.mv head/sys/boot/forth/loader.conf head/sys/conf/NOTES head/sys/conf/files head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-pci.h head/sys/dev/ata/chipsets/ata-acerlabs.c head/sys/dev/ata/chipsets/ata-ati.c head/sys/dev/ata/chipsets/ata-intel.c head/sys/dev/ata/chipsets/ata-jmicron.c head/sys/dev/ata/chipsets/ata-marvell.c head/sys/dev/ata/chipsets/ata-nvidia.c head/sys/dev/ata/chipsets/ata-siliconimage.c head/sys/dev/ata/chipsets/ata-via.c head/sys/modules/ata/atapci/chipsets/Makefile Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Mar 24 17:42:53 2015 (r280450) +++ head/UPDATING Tue Mar 24 18:09:07 2015 (r280451) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150324: + From legacy ata(4) driver was removed support for SATA controllers + supported by more functional drivers ahci(4), siis(4) and mvs(4). + Kernel modules ataahci and ataadaptec were removed completely, + replaced by ahci and mvs modules respectively. + 20150315: Clang, llvm and lldb have been upgraded to 3.6.0 release. Please see the 20141231 entry below for information about prerequisites and Modified: head/share/man/man4/ahci.4 ============================================================================== --- head/share/man/man4/ahci.4 Tue Mar 24 17:42:53 2015 (r280450) +++ head/share/man/man4/ahci.4 Tue Mar 24 18:09:07 2015 (r280451) @@ -143,12 +143,6 @@ device for localization and status repor Supporting AHCI controllers may transmit that information to the backplane controllers via SGPIO interface. Backplane controllers interpret received statuses in some way (IBPI standard) to report them using present indicators. -.Pp -AHCI hardware is also supported by ataahci driver from -.Xr ata 4 -subsystem. -If both drivers are loaded at the same time, this one will be -given precedence as the more functional of the two. .Sh HARDWARE The .Nm Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Tue Mar 24 17:42:53 2015 (r280450) +++ head/share/man/man4/ata.4 Tue Mar 24 18:09:07 2015 (r280451) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 3, 2012 +.Dd March 23, 2015 .Dt ATA 4 .Os .Sh NAME @@ -50,8 +50,6 @@ atapci_load="YES" ataacard_load="YES" ataacerlabs_load="YES" -ataadaptec_load="YES" -ataahci_load="YES" ataamd_load="YES" ataati_load="YES" atacenatek_load="YES" @@ -76,16 +74,11 @@ atavia_load="YES" The first line is for the common hardware independent code, and is a prerequisite for the other modules. The next three lines are generic bus-specific drivers. -Of the rest, ataahci is the AHCI driver. -The others are vendor-specific PCI drivers. +The rest are vendor-specific PCI drivers. .Pp The following tunables are settable from the .Xr loader 8 : .Bl -ohang -.It Va hw.ahci.force -set to nonzero value for forcing drivers to attach to some known AHCI-capable -chips even if they are configured for legacy IDE emulation (the default is 1, -force the attach). .It Va hw.ata.ata_dma_check_80pin set to 0 to disable the 80pin cable check (the default is 1, check the cable). .It Va hint.atapci.X.msi @@ -106,13 +99,6 @@ Interface Power Management is disabled. This is the default value. .It 1 The device is allowed to initiate a PM state change; the host is passive. -.It 2 -The host initiates a PARTIAL PM state transition every time a port becomes idle. -.It 3 -host initiates SLUMBER PM state transition every time port becomes idle. -.El -.Pp -Modes 2 and 3 are only supported for AHCI. .It Va hint.ata. Ns Ar X Ns Va .dev Ns Ar X Ns Va .sata_rev limits the initial SATA revision (speed) for the specified device on the specified channel. @@ -198,8 +184,7 @@ IT8211F, IT8212F, IT8213F. .It JMicron: JMB360, JMB361, JMB363, JMB365, JMB366, JMB368. .It Marvell -88SX5040, 88SX5041, 88SX5080, 88SX5081, 88SX6041, 88SX6042, 88SX6081, 88SE6101, -88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145, 88SX7042. +88SE6101, 88SE6102, 88SE6111, 88SE6121, 88SE6141, 88SE6145. .It National: SC1100. .It NetCell: @@ -216,7 +201,7 @@ PDC40718, PDC40719. .It ServerWorks: HT1000, ROSB4, CSB5, CSB6, K2, Frodo4, Frodo8. .It Silicon Image: -SiI0680, SiI3112, SiI3114, SiI3124, SiI3132, SiI3512. +SiI0680, SiI3112, SiI3114, SiI3512. .It SiS: SIS180, SIS181, SIS182, SIS5513, SIS530, SIS540, SIS550, SIS620, SIS630, SIS630S, SIS633, SIS635, SIS730, SIS733, SIS735, SIS745, SIS961, SIS962, @@ -227,13 +212,10 @@ VT82C686A, VT82C686B, VT8231, VT8233, VT VT8237A, VT8237S, VT8251, CX700, VX800, VX855, VX900. .El .Pp -Some of above chips are also supported by the more featured -.Xr ahci 4 , -.Xr mvs 4 , -and -.Xr siis 4 -drivers. -If both drivers are loaded at the same time, those will have precedence. +Some of above chips can be configured for AHCI mode. +In such case they are supported by +.Xr ahci 4 +driver instead. .Pp Unknown ATA chipsets are supported in PIO modes, and if the standard busmaster DMA registers are present and contain valid setup, DMA is Modified: head/share/man/man4/mvs.4 ============================================================================== --- head/share/man/man4/mvs.4 Tue Mar 24 17:42:53 2015 (r280450) +++ head/share/man/man4/mvs.4 Tue Mar 24 18:09:07 2015 (r280451) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 2013 +.Dd March 23, 2015 .Dt MVS 4 .Os .Sh NAME @@ -109,13 +109,6 @@ Port Multipliers (including FIS-based sw hardware command queues (up to 31 command per port), Native Command Queuing, SATA interface Power Management, device hot-plug and Message Signaled Interrupts. -.Pp -The same hardware is also supported by the atamarvell and ataadaptec -drivers from the -.Xr ata 4 -subsystem. -If both drivers are loaded at the same time, this one will be -given precedence as the more functional of the two. .Sh HARDWARE The .Nm Modified: head/share/man/man4/siis.4 ============================================================================== --- head/share/man/man4/siis.4 Tue Mar 24 17:42:53 2015 (r280450) +++ head/share/man/man4/siis.4 Tue Mar 24 18:09:07 2015 (r280451) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 8, 2011 +.Dd March 23, 2015 .Dt SIIS 4 .Os .Sh NAME @@ -98,12 +98,6 @@ The activity LEDs of the adapters suppor driver can be controlled via the .Xr led 4 API for localization or status reporting purposes. -.Pp -Same hardware is also supported by the atasiliconimage driver from -.Xr ata 4 -subsystem. -If both drivers are loaded at the same time, this one will be -given precedence as the more functional of the two. .Sh HARDWARE The .Nm Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/arm/mv/files.mv Tue Mar 24 18:09:07 2015 (r280451) @@ -27,7 +27,6 @@ arm/mv/mv_common.c standard arm/mv/mv_localbus.c standard arm/mv/mv_machdep.c standard arm/mv/mv_pci.c optional pci -arm/mv/mv_sata.c optional ata | atamvsata arm/mv/mv_ts.c standard arm/mv/timer.c standard arm/mv/twsi.c optional iicbus Modified: head/sys/boot/forth/loader.conf ============================================================================== --- head/sys/boot/forth/loader.conf Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/boot/forth/loader.conf Tue Mar 24 18:09:07 2015 (r280451) @@ -148,10 +148,8 @@ module_path="/boot/modules" # Set the mo ### ATA modules ############################################## ############################################################## -ataahci_load="NO" # AHCI SATA ataacard_load="NO" # ACARD ataacerlabs_load="NO" # Acer Labs Inc. (ALI) -ataadaptec_load="NO" # Adaptec ataamd_load="NO" # American Micro Devices (AMD) ataati_load="NO" # ATI atacenatek_load="NO" # Cenatek Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/conf/NOTES Tue Mar 24 18:09:07 2015 (r280451) @@ -1722,10 +1722,8 @@ device ata #device atapci # PCI bus support; only generic chipset support # PCI ATA chipsets -#device ataahci # AHCI SATA #device ataacard # ACARD #device ataacerlabs # Acer Labs Inc. (ALI) -#device ataadaptec # Adaptec #device ataamd # American Micro Devices (AMD) #device ataati # ATI #device atacenatek # Cenatek Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/conf/files Tue Mar 24 18:09:07 2015 (r280451) @@ -684,12 +684,8 @@ dev/ata/ata-card.c optional ata pccard dev/ata/ata-cbus.c optional ata pc98 | atapc98 dev/ata/ata-isa.c optional ata isa | ataisa dev/ata/ata-pci.c optional ata pci | atapci -dev/ata/chipsets/ata-ahci.c optional ata pci | ataahci | ataacerlabs | \ - ataati | ataintel | atajmicron | \ - atavia | atanvidia dev/ata/chipsets/ata-acard.c optional ata pci | ataacard dev/ata/chipsets/ata-acerlabs.c optional ata pci | ataacerlabs -dev/ata/chipsets/ata-adaptec.c optional ata pci | ataadaptec dev/ata/chipsets/ata-amd.c optional ata pci | ataamd dev/ata/chipsets/ata-ati.c optional ata pci | ataati dev/ata/chipsets/ata-cenatek.c optional ata pci | atacenatek @@ -699,7 +695,7 @@ dev/ata/chipsets/ata-highpoint.c optiona dev/ata/chipsets/ata-intel.c optional ata pci | ataintel dev/ata/chipsets/ata-ite.c optional ata pci | ataite dev/ata/chipsets/ata-jmicron.c optional ata pci | atajmicron -dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell | ataadaptec +dev/ata/chipsets/ata-marvell.c optional ata pci | atamarvell dev/ata/chipsets/ata-micron.c optional ata pci | atamicron dev/ata/chipsets/ata-national.c optional ata pci | atanational dev/ata/chipsets/ata-netcell.c optional ata pci | atanetcell Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/dev/ata/ata-all.h Tue Mar 24 18:09:07 2015 (r280451) @@ -150,139 +150,6 @@ #define ATA_SACTIVE 16 -/* SATA AHCI v1.0 register defines */ -#define ATA_AHCI_CAP 0x00 -#define ATA_AHCI_CAP_NPMASK 0x0000001f -#define ATA_AHCI_CAP_SXS 0x00000020 -#define ATA_AHCI_CAP_EMS 0x00000040 -#define ATA_AHCI_CAP_CCCS 0x00000080 -#define ATA_AHCI_CAP_NCS 0x00001F00 -#define ATA_AHCI_CAP_NCS_SHIFT 8 -#define ATA_AHCI_CAP_PSC 0x00002000 -#define ATA_AHCI_CAP_SSC 0x00004000 -#define ATA_AHCI_CAP_PMD 0x00008000 -#define ATA_AHCI_CAP_FBSS 0x00010000 -#define ATA_AHCI_CAP_SPM 0x00020000 -#define ATA_AHCI_CAP_SAM 0x00080000 -#define ATA_AHCI_CAP_ISS 0x00F00000 -#define ATA_AHCI_CAP_ISS_SHIFT 20 -#define ATA_AHCI_CAP_SCLO 0x01000000 -#define ATA_AHCI_CAP_SAL 0x02000000 -#define ATA_AHCI_CAP_SALP 0x04000000 -#define ATA_AHCI_CAP_SSS 0x08000000 -#define ATA_AHCI_CAP_SMPS 0x10000000 -#define ATA_AHCI_CAP_SSNTF 0x20000000 -#define ATA_AHCI_CAP_SNCQ 0x40000000 -#define ATA_AHCI_CAP_64BIT 0x80000000 - -#define ATA_AHCI_GHC 0x04 -#define ATA_AHCI_GHC_AE 0x80000000 -#define ATA_AHCI_GHC_IE 0x00000002 -#define ATA_AHCI_GHC_HR 0x00000001 - -#define ATA_AHCI_IS 0x08 -#define ATA_AHCI_PI 0x0c -#define ATA_AHCI_VS 0x10 - -#define ATA_AHCI_OFFSET 0x80 - -#define ATA_AHCI_P_CLB 0x100 -#define ATA_AHCI_P_CLBU 0x104 -#define ATA_AHCI_P_FB 0x108 -#define ATA_AHCI_P_FBU 0x10c -#define ATA_AHCI_P_IS 0x110 -#define ATA_AHCI_P_IE 0x114 -#define ATA_AHCI_P_IX_DHR 0x00000001 -#define ATA_AHCI_P_IX_PS 0x00000002 -#define ATA_AHCI_P_IX_DS 0x00000004 -#define ATA_AHCI_P_IX_SDB 0x00000008 -#define ATA_AHCI_P_IX_UF 0x00000010 -#define ATA_AHCI_P_IX_DP 0x00000020 -#define ATA_AHCI_P_IX_PC 0x00000040 -#define ATA_AHCI_P_IX_DI 0x00000080 - -#define ATA_AHCI_P_IX_PRC 0x00400000 -#define ATA_AHCI_P_IX_IPM 0x00800000 -#define ATA_AHCI_P_IX_OF 0x01000000 -#define ATA_AHCI_P_IX_INF 0x04000000 -#define ATA_AHCI_P_IX_IF 0x08000000 -#define ATA_AHCI_P_IX_HBD 0x10000000 -#define ATA_AHCI_P_IX_HBF 0x20000000 -#define ATA_AHCI_P_IX_TFE 0x40000000 -#define ATA_AHCI_P_IX_CPD 0x80000000 - -#define ATA_AHCI_P_CMD 0x118 -#define ATA_AHCI_P_CMD_ST 0x00000001 -#define ATA_AHCI_P_CMD_SUD 0x00000002 -#define ATA_AHCI_P_CMD_POD 0x00000004 -#define ATA_AHCI_P_CMD_CLO 0x00000008 -#define ATA_AHCI_P_CMD_FRE 0x00000010 -#define ATA_AHCI_P_CMD_CCS_MASK 0x00001f00 -#define ATA_AHCI_P_CMD_ISS 0x00002000 -#define ATA_AHCI_P_CMD_FR 0x00004000 -#define ATA_AHCI_P_CMD_CR 0x00008000 -#define ATA_AHCI_P_CMD_CPS 0x00010000 -#define ATA_AHCI_P_CMD_PMA 0x00020000 -#define ATA_AHCI_P_CMD_HPCP 0x00040000 -#define ATA_AHCI_P_CMD_ISP 0x00080000 -#define ATA_AHCI_P_CMD_CPD 0x00100000 -#define ATA_AHCI_P_CMD_ATAPI 0x01000000 -#define ATA_AHCI_P_CMD_DLAE 0x02000000 -#define ATA_AHCI_P_CMD_ALPE 0x04000000 -#define ATA_AHCI_P_CMD_ASP 0x08000000 -#define ATA_AHCI_P_CMD_ICC_MASK 0xf0000000 -#define ATA_AHCI_P_CMD_NOOP 0x00000000 -#define ATA_AHCI_P_CMD_ACTIVE 0x10000000 -#define ATA_AHCI_P_CMD_PARTIAL 0x20000000 -#define ATA_AHCI_P_CMD_SLUMBER 0x60000000 - -#define ATA_AHCI_P_TFD 0x120 -#define ATA_AHCI_P_SIG 0x124 -#define ATA_AHCI_P_SSTS 0x128 -#define ATA_AHCI_P_SCTL 0x12c -#define ATA_AHCI_P_SERR 0x130 -#define ATA_AHCI_P_SACT 0x134 -#define ATA_AHCI_P_CI 0x138 -#define ATA_AHCI_P_SNTF 0x13C -#define ATA_AHCI_P_FBS 0x140 - -#define ATA_AHCI_CL_SIZE 32 -#define ATA_AHCI_CL_OFFSET 0 -#define ATA_AHCI_FB_OFFSET (ATA_AHCI_CL_SIZE * 32) -#define ATA_AHCI_CT_OFFSET (ATA_AHCI_FB_OFFSET + 4096) -#define ATA_AHCI_CT_SIZE (2176 + 128) - -struct ata_ahci_dma_prd { - u_int64_t dba; - u_int32_t reserved; - u_int32_t dbc; /* 0 based */ -#define ATA_AHCI_PRD_MASK 0x003fffff /* max 4MB */ -#define ATA_AHCI_PRD_IPC (1<<31) -} __packed; - -struct ata_ahci_cmd_tab { - u_int8_t cfis[64]; - u_int8_t acmd[32]; - u_int8_t reserved[32]; -#define ATA_AHCI_DMA_ENTRIES 129 - struct ata_ahci_dma_prd prd_tab[ATA_AHCI_DMA_ENTRIES]; -} __packed; - -struct ata_ahci_cmd_list { - u_int16_t cmd_flags; -#define ATA_AHCI_CMD_ATAPI 0x0020 -#define ATA_AHCI_CMD_WRITE 0x0040 -#define ATA_AHCI_CMD_PREFETCH 0x0080 -#define ATA_AHCI_CMD_RESET 0x0100 -#define ATA_AHCI_CMD_BIST 0x0200 -#define ATA_AHCI_CMD_CLR_BUSY 0x0400 - - u_int16_t prd_length; /* PRD entries */ - u_int32_t bytecount; - u_int64_t cmd_table_phys; /* 128byte aligned */ -} __packed; - - /* DMA register defines */ #define ATA_DMA_ENTRIES 256 #define ATA_DMA_EOT 0x80000000 Modified: head/sys/dev/ata/ata-pci.h ============================================================================== --- head/sys/dev/ata/ata-pci.h Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/dev/ata/ata-pci.h Tue Mar 24 18:09:07 2015 (r280451) @@ -169,93 +169,49 @@ struct ata_pci_controller { #define ATA_I6300ESB_R1 0x25b08086 #define ATA_I63XXESB2 0x269e8086 #define ATA_I63XXESB2_S1 0x26808086 -#define ATA_I63XXESB2_S2 0x26818086 -#define ATA_I63XXESB2_R1 0x26828086 -#define ATA_I63XXESB2_R2 0x26838086 #define ATA_I82801FB 0x266f8086 #define ATA_I82801FB_S1 0x26518086 #define ATA_I82801FB_R1 0x26528086 #define ATA_I82801FBM 0x26538086 #define ATA_I82801GB 0x27df8086 #define ATA_I82801GB_S1 0x27c08086 -#define ATA_I82801GB_AH 0x27c18086 -#define ATA_I82801GB_R1 0x27c38086 #define ATA_I82801GBM_S1 0x27c48086 -#define ATA_I82801GBM_AH 0x27c58086 -#define ATA_I82801GBM_R1 0x27c68086 #define ATA_I82801HB_S1 0x28208086 -#define ATA_I82801HB_AH6 0x28218086 -#define ATA_I82801HB_R1 0x28228086 -#define ATA_I82801HB_AH4 0x28248086 #define ATA_I82801HB_S2 0x28258086 #define ATA_I82801HBM 0x28508086 #define ATA_I82801HBM_S1 0x28288086 -#define ATA_I82801HBM_S2 0x28298086 -#define ATA_I82801HBM_S3 0x282a8086 #define ATA_I82801IB_S1 0x29208086 #define ATA_I82801IB_S3 0x29218086 -#define ATA_I82801IB_AH6 0x29228086 -#define ATA_I82801IB_AH4 0x29238086 #define ATA_I82801IB_R1 0x29258086 #define ATA_I82801IB_S2 0x29268086 #define ATA_I82801IBM_S1 0x29288086 -#define ATA_I82801IBM_AH 0x29298086 -#define ATA_I82801IBM_R1 0x292a8086 #define ATA_I82801IBM_S2 0x292d8086 #define ATA_I82801JIB_S1 0x3a208086 -#define ATA_I82801JIB_AH 0x3a228086 -#define ATA_I82801JIB_R1 0x3a258086 #define ATA_I82801JIB_S2 0x3a268086 #define ATA_I82801JD_S1 0x3a008086 -#define ATA_I82801JD_AH 0x3a028086 -#define ATA_I82801JD_R1 0x3a058086 #define ATA_I82801JD_S2 0x3a068086 #define ATA_I82801JI_S1 0x3a208086 -#define ATA_I82801JI_AH 0x3a228086 -#define ATA_I82801JI_R1 0x3a258086 #define ATA_I82801JI_S2 0x3a268086 #define ATA_5Series_S1 0x3b208086 #define ATA_5Series_S2 0x3b218086 -#define ATA_5Series_AH1 0x3b228086 -#define ATA_5Series_AH2 0x3b238086 -#define ATA_5Series_R1 0x3b258086 #define ATA_5Series_S3 0x3b268086 #define ATA_5Series_S4 0x3b288086 -#define ATA_5Series_AH3 0x3b298086 -#define ATA_5Series_R2 0x3b2c8086 #define ATA_5Series_S5 0x3b2d8086 #define ATA_5Series_S6 0x3b2e8086 -#define ATA_5Series_AH4 0x3b2f8086 #define ATA_CPT_S1 0x1c008086 #define ATA_CPT_S2 0x1c018086 -#define ATA_CPT_AH1 0x1c028086 -#define ATA_CPT_AH2 0x1c038086 -#define ATA_CPT_R1 0x1c048086 -#define ATA_CPT_R2 0x1c058086 #define ATA_CPT_S3 0x1c088086 #define ATA_CPT_S4 0x1c098086 #define ATA_PBG_S1 0x1d008086 -#define ATA_PBG_AH1 0x1d028086 -#define ATA_PBG_R1 0x1d048086 -#define ATA_PBG_R2 0x1d068086 -#define ATA_PBG_R3 0x28268086 #define ATA_PBG_S2 0x1d088086 #define ATA_PPT_S1 0x1e008086 #define ATA_PPT_S2 0x1e018086 -#define ATA_PPT_AH1 0x1e028086 -#define ATA_PPT_AH2 0x1e038086 -#define ATA_PPT_R1 0x1e048086 -#define ATA_PPT_R2 0x1e058086 -#define ATA_PPT_R3 0x1e068086 -#define ATA_PPT_R4 0x1e078086 #define ATA_PPT_S3 0x1e088086 #define ATA_PPT_S4 0x1e098086 -#define ATA_PPT_R5 0x1e0e8086 -#define ATA_PPT_R6 0x1e0f8086 #define ATA_AVOTON_S1 0x1f208086 #define ATA_AVOTON_S2 0x1f218086 @@ -264,29 +220,13 @@ struct ata_pci_controller { #define ATA_LPT_S1 0x8c008086 #define ATA_LPT_S2 0x8c018086 -#define ATA_LPT_AH1 0x8c028086 -#define ATA_LPT_AH2 0x8c038086 -#define ATA_LPT_R1 0x8c048086 -#define ATA_LPT_R2 0x8c058086 -#define ATA_LPT_R3 0x8c068086 -#define ATA_LPT_R4 0x8c078086 #define ATA_LPT_S3 0x8c088086 #define ATA_LPT_S4 0x8c098086 -#define ATA_LPT_R5 0x8c0e8086 -#define ATA_LPT_R6 0x8c0f8086 #define ATA_WCPT_S1 0x8c808086 #define ATA_WCPT_S2 0x8c818086 -#define ATA_WCPT_AH1 0x8c828086 -#define ATA_WCPT_AH2 0x8c838086 -#define ATA_WCPT_R1 0x8c848086 -#define ATA_WCPT_R2 0x8c858086 -#define ATA_WCPT_R3 0x8c868086 -#define ATA_WCPT_R4 0x8c878086 #define ATA_WCPT_S3 0x8c888086 #define ATA_WCPT_S4 0x8c898086 -#define ATA_WCPT_R5 0x8c8e8086 -#define ATA_WCPT_R6 0x8c8f8086 #define ATA_WELLS_S1 0x8d008086 #define ATA_WELLS_S2 0x8d088086 @@ -300,9 +240,7 @@ struct ata_pci_controller { #define ATA_I31244 0x32008086 #define ATA_ISCH 0x811a8086 -#define ATA_DH89XXCC 0x23238086 -#define ATA_COLETOCRK_AH1 0x23a38086 #define ATA_COLETOCRK_S1 0x23a18086 #define ATA_COLETOCRK_S2 0x23a68086 @@ -322,14 +260,6 @@ struct ata_pci_controller { #define ATA_JMB368_2 0x0368197b #define ATA_MARVELL_ID 0x11ab -#define ATA_M88SX5040 0x504011ab -#define ATA_M88SX5041 0x504111ab -#define ATA_M88SX5080 0x508011ab -#define ATA_M88SX5081 0x508111ab -#define ATA_M88SX6041 0x604111ab -#define ATA_M88SX6042 0x604211ab -#define ATA_M88SX6081 0x608111ab -#define ATA_M88SX7042 0x704211ab #define ATA_M88SE6101 0x610111ab #define ATA_M88SE6102 0x610211ab #define ATA_M88SE6111 0x611111ab @@ -505,10 +435,6 @@ struct ata_pci_controller { #define ATA_SII3512 0x35121095 #define ATA_SII3112 0x31121095 #define ATA_SII3112_1 0x02401095 -#define ATA_SII3124 0x31241095 -#define ATA_SII3132 0x31321095 -#define ATA_SII3132_1 0x02421095 -#define ATA_SII3132_2 0x02441095 #define ATA_SII0680 0x06801095 #define ATA_CMD646 0x06461095 #define ATA_CMD648 0x06481095 @@ -631,8 +557,6 @@ const struct ata_chip_id *ata_find_chip( int ata_mode2idx(int mode); /* global prototypes from chipsets/ata-*.c */ -int ata_ahci_chipinit(device_t); -int ata_marvell_edma_chipinit(device_t); int ata_sii_chipinit(device_t); /* externs */ Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acerlabs.c Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/dev/ata/chipsets/ata-acerlabs.c Tue Mar 24 18:09:07 2015 (r280451) @@ -117,11 +117,6 @@ ata_ali_chipinit(device_t dev) ctlr->setmode = ata_sata_setmode; ctlr->getrev = ata_sata_getrev; - /* AHCI mode is correctly supported only on the ALi 5288. */ - if ((ctlr->chip->chipid == ATA_ALI_5288) && - (ata_ahci_chipinit(dev) != ENXIO)) - return 0; - /* Allocate resources for later use by channel attach routines. */ res = malloc(sizeof(struct ali_sata_resources), M_ATAPCI, M_WAITOK); for (i = 0; i < 4; i++) { @@ -347,4 +342,3 @@ ata_ali_setmode(device_t dev, int target } ATA_DECLARE_DRIVER(ata_ali); -MODULE_DEPEND(ata_ali, ata_ahci, 1, 1, 1); Modified: head/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ati.c Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/dev/ata/chipsets/ata-ati.c Tue Mar 24 18:09:07 2015 (r280451) @@ -64,9 +64,6 @@ static int ata_ati_setmode(device_t dev, #define ATI_PATA 0x02 #define ATI_AHCI 0x04 -static int force_ahci = 1; -TUNABLE_INT("hw.ahci.force", &force_ahci); - /* * ATI chipset support functions */ @@ -104,8 +101,6 @@ ata_ati_probe(device_t dev) if (!(ctlr->chip = ata_match_chip(dev, ids))) return ENXIO; - ata_set_desc(dev); - switch (ctlr->chip->cfg1) { case ATI_PATA: ctlr->chipinit = ata_ati_chipinit; @@ -117,12 +112,13 @@ ata_ati_probe(device_t dev) ctlr->chipinit = ata_sii_chipinit; break; case ATI_AHCI: - if (force_ahci == 1 || pci_get_subclass(dev) != PCIS_STORAGE_IDE) - ctlr->chipinit = ata_ahci_chipinit; - else - ctlr->chipinit = ata_ati_chipinit; + if (pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return (ENXIO); + ctlr->chipinit = ata_ati_chipinit; break; } + + ata_set_desc(dev); return (BUS_PROBE_LOW_PRIORITY); } @@ -264,5 +260,4 @@ ata_ati_setmode(device_t dev, int target } ATA_DECLARE_DRIVER(ata_ati); -MODULE_DEPEND(ata_ati, ata_ahci, 1, 1, 1); MODULE_DEPEND(ata_ati, ata_sii, 1, 1, 1); Modified: head/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-intel.c Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/dev/ata/chipsets/ata-intel.c Tue Mar 24 18:09:07 2015 (r280451) @@ -80,7 +80,6 @@ static void ata_intel_31244_tf_write(str static void ata_intel_31244_reset(device_t dev); /* misc defines */ -#define INTEL_AHCI 1 #define INTEL_ICH5 2 #define INTEL_6CH 4 #define INTEL_6CH2 8 @@ -127,118 +126,57 @@ ata_intel_probe(device_t dev) { ATA_I6300ESB_S1, 0, INTEL_ICH5, 2, ATA_SA150, "6300ESB" }, { ATA_I6300ESB_R1, 0, INTEL_ICH5, 2, ATA_SA150, "6300ESB" }, { ATA_I82801FB, 0, 0, 2, ATA_UDMA5, "ICH6" }, - { ATA_I82801FB_S1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH6" }, - { ATA_I82801FB_R1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH6" }, - { ATA_I82801FBM, 0, INTEL_AHCI, 0, ATA_SA150, "ICH6M" }, + { ATA_I82801FB_S1, 0, 0, 0, ATA_SA150, "ICH6" }, + { ATA_I82801FB_R1, 0, 0, 0, ATA_SA150, "ICH6" }, + { ATA_I82801FBM, 0, 0, 0, ATA_SA150, "ICH6M" }, { ATA_I82801GB, 0, 0, 1, ATA_UDMA5, "ICH7" }, { ATA_I82801GB_S1, 0, INTEL_ICH7, 0, ATA_SA300, "ICH7" }, - { ATA_I82801GB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7" }, - { ATA_I82801GB_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH7" }, { ATA_I82801GBM_S1, 0, INTEL_ICH7, 0, ATA_SA150, "ICH7M" }, - { ATA_I82801GBM_R1, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" }, - { ATA_I82801GBM_AH, 0, INTEL_AHCI, 0, ATA_SA150, "ICH7M" }, { ATA_I63XXESB2, 0, 0, 1, ATA_UDMA5, "63XXESB2" }, { ATA_I63XXESB2_S1, 0, 0, 0, ATA_SA300, "63XXESB2" }, - { ATA_I63XXESB2_S2, 0, INTEL_AHCI, 0, ATA_SA300, "63XXESB2" }, - { ATA_I63XXESB2_R1, 0, INTEL_AHCI, 0, ATA_SA300, "63XXESB2" }, - { ATA_I63XXESB2_R2, 0, INTEL_AHCI, 0, ATA_SA300, "63XXESB2" }, { ATA_I82801HB_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH8" }, { ATA_I82801HB_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HB_AH4, 0, INTEL_AHCI, 0, ATA_SA300, "ICH8" }, - { ATA_I82801HB_AH6, 0, INTEL_AHCI, 0, ATA_SA300, "ICH8" }, { ATA_I82801HBM, 0, 0, 1, ATA_UDMA5, "ICH8M" }, { ATA_I82801HBM_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH8M" }, - { ATA_I82801HBM_S2, 0, INTEL_AHCI, 0, ATA_SA300, "ICH8M" }, - { ATA_I82801HBM_S3, 0, INTEL_AHCI, 0, ATA_SA300, "ICH8M" }, { ATA_I82801IB_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH9" }, { ATA_I82801IB_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9" }, { ATA_I82801IB_S3, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_AH4, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_AH6, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" }, - { ATA_I82801IB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9" }, { ATA_I82801IBM_S1, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9M" }, - { ATA_I82801IBM_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9M" }, - { ATA_I82801IBM_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH9M" }, { ATA_I82801IBM_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH9M" }, { ATA_I82801JIB_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JIB_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JIB_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, { ATA_I82801JIB_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH10" }, { ATA_I82801JD_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JD_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JD_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, { ATA_I82801JD_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH10" }, { ATA_I82801JI_S1, 0, INTEL_6CH, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JI_AH, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, - { ATA_I82801JI_R1, 0, INTEL_AHCI, 0, ATA_SA300, "ICH10" }, { ATA_I82801JI_S2, 0, INTEL_6CH2, 0, ATA_SA300, "ICH10" }, { ATA_5Series_S1, 0, INTEL_6CH, 0, ATA_SA300, "5 Series/3400 Series PCH" }, { ATA_5Series_S2, 0, INTEL_6CH2, 0, ATA_SA300, "5 Series/3400 Series PCH" }, - { ATA_5Series_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "5 Series/3400 Series PCH" }, - { ATA_5Series_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "5 Series/3400 Series PCH" }, - { ATA_5Series_R1, 0, INTEL_AHCI, 0, ATA_SA300, "5 Series/3400 Series PCH" }, { ATA_5Series_S3, 0, INTEL_6CH2, 0, ATA_SA300, "5 Series/3400 Series PCH" }, { ATA_5Series_S4, 0, INTEL_6CH, 0, ATA_SA300, "5 Series/3400 Series PCH" }, - { ATA_5Series_AH3, 0, INTEL_AHCI, 0, ATA_SA300, "5 Series/3400 Series PCH" }, - { ATA_5Series_R2, 0, INTEL_AHCI, 0, ATA_SA300, "5 Series/3400 Series PCH" }, { ATA_5Series_S5, 0, INTEL_6CH2, 0, ATA_SA300, "5 Series/3400 Series PCH" }, { ATA_5Series_S6, 0, INTEL_6CH, 0, ATA_SA300, "5 Series/3400 Series PCH" }, - { ATA_5Series_AH4, 0, INTEL_AHCI, 0, ATA_SA300, "5 Series/3400 Series PCH" }, { ATA_CPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Cougar Point" }, { ATA_CPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Cougar Point" }, - { ATA_CPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Cougar Point" }, - { ATA_CPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Cougar Point" }, - { ATA_CPT_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Cougar Point" }, - { ATA_CPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Cougar Point" }, { ATA_CPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Cougar Point" }, { ATA_CPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Cougar Point" }, { ATA_PBG_S1, 0, INTEL_6CH, 0, ATA_SA300, "Patsburg" }, - { ATA_PBG_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" }, - { ATA_PBG_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" }, - { ATA_PBG_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" }, - { ATA_PBG_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Patsburg" }, { ATA_PBG_S2, 0, INTEL_6CH2, 0, ATA_SA300, "Patsburg" }, { ATA_PPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Panther Point" }, { ATA_PPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_R4, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, { ATA_PPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" }, { ATA_PPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, - { ATA_PPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Panther Point" }, { ATA_AVOTON_S1, 0, INTEL_6CH, 0, ATA_SA300, "Avoton" }, { ATA_AVOTON_S2, 0, INTEL_6CH, 0, ATA_SA300, "Avoton" }, { ATA_AVOTON_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Avoton" }, { ATA_AVOTON_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Avoton" }, { ATA_LPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_R4, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" }, { ATA_LPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, - { ATA_LPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Lynx Point" }, { ATA_WCPT_S1, 0, INTEL_6CH, 0, ATA_SA300, "Wildcat Point" }, { ATA_WCPT_S2, 0, INTEL_6CH, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_AH1, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_AH2, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_R1, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_R2, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_R3, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_R4, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, { ATA_WCPT_S3, 0, INTEL_6CH2, 0, ATA_SA300, "Wildcat Point" }, { ATA_WCPT_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_R5, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, - { ATA_WCPT_R6, 0, INTEL_AHCI, 0, ATA_SA300, "Wildcat Point" }, { ATA_WELLS_S1, 0, INTEL_6CH, 0, ATA_SA300, "Wellsburg" }, { ATA_WELLS_S2, 0, INTEL_6CH2, 0, ATA_SA300, "Wellsburg" }, { ATA_WELLS_S3, 0, INTEL_6CH, 0, ATA_SA300, "Wellsburg" }, @@ -249,10 +187,8 @@ ata_intel_probe(device_t dev) { ATA_LPTLP_S4, 0, INTEL_6CH2, 0, ATA_SA300, "Lynx Point-LP" }, { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { ATA_ISCH, 0, 0, 1, ATA_UDMA5, "SCH" }, - { ATA_DH89XXCC, 0, INTEL_AHCI, 0, ATA_SA300, "DH89xxCC" }, { ATA_COLETOCRK_S1, 0, INTEL_6CH2, 0, ATA_SA300, "COLETOCRK" }, { ATA_COLETOCRK_S2, 0, INTEL_6CH2, 0, ATA_SA300, "COLETOCRK" }, - { ATA_COLETOCRK_AH1,0, INTEL_AHCI, 0, ATA_SA300, "COLETOCRK" }, { 0, 0, 0, 0, 0, 0}}; if (pci_get_vendor(dev) != ATA_INTEL_ID) @@ -326,15 +262,6 @@ ata_intel_chipinit(device_t dev) ctlr->ch_detach = ata_pci_ch_detach; ctlr->reset = ata_intel_reset; - /* - * if we have AHCI capability and AHCI or RAID mode enabled - * in BIOS we try for AHCI mode - */ - if ((ctlr->chip->cfg1 & INTEL_AHCI) && - (pci_read_config(dev, 0x90, 1) & 0xc0) && - (ata_ahci_chipinit(dev) != ENXIO)) - return 0; - /* BAR(5) may point to SATA interface registers */ if ((ctlr->chip->cfg1 & INTEL_ICH7)) { ctlr->r_type2 = SYS_RES_MEMORY; @@ -995,4 +922,3 @@ ata_intel_31244_reset(device_t dev) } ATA_DECLARE_DRIVER(ata_intel); -MODULE_DEPEND(ata_intel, ata_ahci, 1, 1, 1); Modified: head/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-jmicron.c Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/dev/ata/chipsets/ata-jmicron.c Tue Mar 24 18:09:07 2015 (r280451) @@ -100,11 +100,7 @@ ata_jmicron_chipinit(device_t dev) /* do we have multiple PCI functions ? */ if (pci_read_config(dev, 0xdf, 1) & 0x40) { - /* are we on the AHCI part ? */ - if (ata_ahci_chipinit(dev) != ENXIO) - return 0; - - /* otherwise we are on the PATA part */ + /* If this was not claimed by AHCI, then we are on the PATA part */ ctlr->ch_attach = ata_jmicron_ch_attach; ctlr->ch_detach = ata_pci_ch_detach; ctlr->reset = ata_generic_reset; @@ -160,4 +156,3 @@ ata_jmicron_setmode(device_t dev, int ta } ATA_DECLARE_DRIVER(ata_jmicron); -MODULE_DEPEND(ata_jmicron, ata_ahci, 1, 1, 1); Modified: head/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-marvell.c Tue Mar 24 17:42:53 2015 (r280450) +++ head/sys/dev/ata/chipsets/ata-marvell.c Tue Mar 24 18:09:07 2015 (r280451) @@ -55,20 +55,8 @@ static int ata_marvell_chipinit(device_t static int ata_marvell_ch_attach(device_t dev); static int ata_marvell_setmode(device_t dev, int target, int mode); static int ata_marvell_dummy_chipinit(device_t dev); -static int ata_marvell_edma_ch_attach(device_t dev); -static int ata_marvell_edma_ch_detach(device_t dev); -static int ata_marvell_edma_status(device_t dev); -static int ata_marvell_edma_begin_transaction(struct ata_request *request); -static int ata_marvell_edma_end_transaction(struct ata_request *request); -static void ata_marvell_edma_reset(device_t dev); -static void ata_marvell_edma_dmasetprd(void *xsc, bus_dma_segment_t *segs, int nsegs, int error); -static void ata_marvell_edma_dmainit(device_t dev); /* misc defines */ -#define MV_50XX 50 -#define MV_60XX 60 -#define MV_6042 62 -#define MV_7042 72 #define MV_61XX 61 #define MV_91XX 91 @@ -99,15 +87,7 @@ ata_marvell_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); static const struct ata_chip_id ids[] = - {{ ATA_M88SX5040, 0, 4, MV_50XX, ATA_SA150, "88SX5040" }, - { ATA_M88SX5041, 0, 4, MV_50XX, ATA_SA150, "88SX5041" }, - { ATA_M88SX5080, 0, 8, MV_50XX, ATA_SA150, "88SX5080" }, - { ATA_M88SX5081, 0, 8, MV_50XX, ATA_SA150, "88SX5081" }, - { ATA_M88SX6041, 0, 4, MV_60XX, ATA_SA300, "88SX6041" }, - { ATA_M88SX6042, 0, 4, MV_6042, ATA_SA300, "88SX6042" }, - { ATA_M88SX6081, 0, 8, MV_60XX, ATA_SA300, "88SX6081" }, - { ATA_M88SX7042, 0, 4, MV_7042, ATA_SA300, "88SX7042" }, - { ATA_M88SE6101, 0, 0, MV_61XX, ATA_UDMA6, "88SE6101" }, + {{ ATA_M88SE6101, 0, 0, MV_61XX, ATA_UDMA6, "88SE6101" }, { ATA_M88SE6102, 0, 0, MV_61XX, ATA_UDMA6, "88SE6102" }, { ATA_M88SE6111, 0, 1, MV_61XX, ATA_UDMA6, "88SE6111" }, { ATA_M88SE6121, 0, 2, MV_61XX, ATA_UDMA6, "88SE6121" }, @@ -126,12 +106,6 @@ ata_marvell_probe(device_t dev) ata_set_desc(dev); switch (ctlr->chip->cfg2) { - case MV_50XX: - case MV_60XX: - case MV_6042: - case MV_7042: - ctlr->chipinit = ata_marvell_edma_chipinit; - break; case MV_61XX: ctlr->chipinit = ata_marvell_chipinit; break; @@ -205,425 +179,4 @@ ata_marvell_dummy_chipinit(device_t dev) return (0); } -int -ata_marvell_edma_chipinit(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(dev); - - if (ata_setup_interrupt(dev, ata_generic_intr)) - return ENXIO; - - ctlr->r_type1 = SYS_RES_MEMORY; - ctlr->r_rid1 = PCIR_BAR(0); - if (!(ctlr->r_res1 = bus_alloc_resource_any(dev, ctlr->r_type1, - &ctlr->r_rid1, RF_ACTIVE))) - return ENXIO; - - /* mask all host controller interrupts */ - ATA_OUTL(ctlr->r_res1, 0x01d64, 0x00000000); - - /* mask all PCI interrupts */ - ATA_OUTL(ctlr->r_res1, 0x01d5c, 0x00000000); - - ctlr->ch_attach = ata_marvell_edma_ch_attach; - ctlr->ch_detach = ata_marvell_edma_ch_detach; - ctlr->reset = ata_marvell_edma_reset; - ctlr->setmode = ata_sata_setmode; - ctlr->getrev = ata_sata_getrev; - ctlr->channels = ctlr->chip->cfg1; - - /* clear host controller interrupts */ - ATA_OUTL(ctlr->r_res1, 0x20014, 0x00000000); - if (ctlr->chip->cfg1 > 4) - ATA_OUTL(ctlr->r_res1, 0x30014, 0x00000000); - - /* clear PCI interrupts */ - ATA_OUTL(ctlr->r_res1, 0x01d58, 0x00000000); - - /* unmask PCI interrupts we want */ - ATA_OUTL(ctlr->r_res1, 0x01d5c, 0x007fffff); - - /* unmask host controller interrupts we want */ - ATA_OUTL(ctlr->r_res1, 0x01d64, 0x000000ff/*HC0*/ | 0x0001fe00/*HC1*/ | - /*(1<<19) | (1<<20) | (1<<21) |*/(1<<22) | (1<<24) | (0x7f << 25)); - - return 0; -} - -static int -ata_marvell_edma_ch_attach(device_t dev) -{ - struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); - struct ata_channel *ch = device_get_softc(dev); - u_int64_t work; - int i; - - ata_marvell_edma_dmainit(dev); - work = ch->dma.work_bus; - /* clear work area */ - bzero(ch->dma.work, 1024+256); - bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, - BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - - /* set legacy ATA resources */ - for (i = ATA_DATA; i <= ATA_COMMAND; i++) { - ch->r_io[i].res = ctlr->r_res1; - ch->r_io[i].offset = 0x02100 + (i << 2) + ATA_MV_EDMA_BASE(ch); - } - ch->r_io[ATA_CONTROL].res = ctlr->r_res1; - ch->r_io[ATA_CONTROL].offset = 0x02120 + ATA_MV_EDMA_BASE(ch); - ch->r_io[ATA_IDX_ADDR].res = ctlr->r_res1; - ata_default_registers(dev); - - /* set SATA resources */ - switch (ctlr->chip->cfg2) { - case MV_50XX: - ch->r_io[ATA_SSTATUS].res = ctlr->r_res1; - ch->r_io[ATA_SSTATUS].offset = 0x00100 + ATA_MV_HOST_BASE(ch); - ch->r_io[ATA_SERROR].res = ctlr->r_res1; - ch->r_io[ATA_SERROR].offset = 0x00104 + ATA_MV_HOST_BASE(ch); - ch->r_io[ATA_SCONTROL].res = ctlr->r_res1; - ch->r_io[ATA_SCONTROL].offset = 0x00108 + ATA_MV_HOST_BASE(ch); - break; - case MV_60XX: - case MV_6042: - case MV_7042: - ch->r_io[ATA_SSTATUS].res = ctlr->r_res1; - ch->r_io[ATA_SSTATUS].offset = 0x02300 + ATA_MV_EDMA_BASE(ch); - ch->r_io[ATA_SERROR].res = ctlr->r_res1; - ch->r_io[ATA_SERROR].offset = 0x02304 + ATA_MV_EDMA_BASE(ch); - ch->r_io[ATA_SCONTROL].res = ctlr->r_res1; - ch->r_io[ATA_SCONTROL].offset = 0x02308 + ATA_MV_EDMA_BASE(ch); - ch->r_io[ATA_SACTIVE].res = ctlr->r_res1; - ch->r_io[ATA_SACTIVE].offset = 0x02350 + ATA_MV_EDMA_BASE(ch); - break; - } - - ch->flags |= ATA_NO_SLAVE; - ch->flags |= ATA_USE_16BIT; /* XXX SOS needed ? */ - ch->flags |= ATA_SATA; - ata_generic_hw(dev); - ch->hw.begin_transaction = ata_marvell_edma_begin_transaction; - ch->hw.end_transaction = ata_marvell_edma_end_transaction; - ch->hw.status = ata_marvell_edma_status; - - /* disable the EDMA machinery */ - ATA_OUTL(ctlr->r_res1, 0x02028 + ATA_MV_EDMA_BASE(ch), 0x00000002); - DELAY(100000); /* SOS should poll for disabled */ - - /* set configuration to non-queued 128b read transfers stop on error */ - ATA_OUTL(ctlr->r_res1, 0x02000 + ATA_MV_EDMA_BASE(ch), (1<<11) | (1<<13)); - - /* request queue base high */ - ATA_OUTL(ctlr->r_res1, 0x02010 + ATA_MV_EDMA_BASE(ch), work >> 32); - - /* request queue in ptr */ - ATA_OUTL(ctlr->r_res1, 0x02014 + ATA_MV_EDMA_BASE(ch), work & 0xffffffff); - - /* request queue out ptr */ - ATA_OUTL(ctlr->r_res1, 0x02018 + ATA_MV_EDMA_BASE(ch), 0x0); - - /* response queue base high */ - work += 1024; - ATA_OUTL(ctlr->r_res1, 0x0201c + ATA_MV_EDMA_BASE(ch), work >> 32); - - /* response queue in ptr */ - ATA_OUTL(ctlr->r_res1, 0x02020 + ATA_MV_EDMA_BASE(ch), 0x0); - - /* response queue out ptr */ - ATA_OUTL(ctlr->r_res1, 0x02024 + ATA_MV_EDMA_BASE(ch), work & 0xffffffff); - - /* clear SATA error register */ - ATA_IDX_OUTL(ch, ATA_SERROR, ATA_IDX_INL(ch, ATA_SERROR)); - - /* clear any outstanding error interrupts */ - ATA_OUTL(ctlr->r_res1, 0x02008 + ATA_MV_EDMA_BASE(ch), 0x0); - - /* unmask all error interrupts */ - ATA_OUTL(ctlr->r_res1, 0x0200c + ATA_MV_EDMA_BASE(ch), ~0x0); - - /* enable EDMA machinery */ - ATA_OUTL(ctlr->r_res1, 0x02028 + ATA_MV_EDMA_BASE(ch), 0x00000001); - return 0; -} - -static int -ata_marvell_edma_ch_detach(device_t dev) -{ - struct ata_channel *ch = device_get_softc(dev); - - if (ch->dma.work_tag && ch->dma.work_map) - bus_dmamap_sync(ch->dma.work_tag, ch->dma.work_map, - BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); - ata_dmafini(dev); - return (0); -} - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 18:46:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2D52949; Tue, 24 Mar 2015 18:46:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD1EC5EF; Tue, 24 Mar 2015 18:46:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OIk2BG030378; Tue, 24 Mar 2015 18:46:02 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OIk2Im030374; Tue, 24 Mar 2015 18:46:02 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503241846.t2OIk2Im030374@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Mar 2015 18:46:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280452 - in head/sys: arm/broadcom/bcm2835 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 18:46:02 -0000 Author: andrew Date: Tue Mar 24 18:46:01 2015 New Revision: 280452 URL: https://svnweb.freebsd.org/changeset/base/280452 Log: Add the SOC_BCM2835 and SOC_BCM2836 options for the arm kernel and add the former to std.bcm2835. These will be used to enable support for the Raspberry Pi 2. MFC after: 1 week Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835 head/sys/conf/options.arm Modified: head/sys/arm/broadcom/bcm2835/std.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.bcm2835 Tue Mar 24 18:09:07 2015 (r280451) +++ head/sys/arm/broadcom/bcm2835/std.bcm2835 Tue Mar 24 18:46:01 2015 (r280452) @@ -3,6 +3,7 @@ machine arm armv6 cpu CPU_ARM1176 makeoptions CONF_CFLAGS="-mcpu=arm1176jzf-s" +options SOC_BCM2835 files "../broadcom/bcm2835/files.bcm2835" files "../broadcom/bcm2835/files.bcm283x" Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Tue Mar 24 18:09:07 2015 (r280451) +++ head/sys/conf/options.arm Tue Mar 24 18:46:01 2015 (r280452) @@ -39,6 +39,8 @@ SOCDEV_PA opt_global.h SOCDEV_VA opt_global.h PV_STATS opt_pmap.h QEMU_WORKAROUNDS opt_global.h +SOC_BCM2835 opt_global.h +SOC_BCM2836 opt_global.h SOC_MV_ARMADAXP opt_global.h SOC_MV_DISCOVERY opt_global.h SOC_MV_DOVE opt_global.h From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 19:01:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11DC8E62; Tue, 24 Mar 2015 19:01:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0C72853; Tue, 24 Mar 2015 19:01:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OJ1huj037449; Tue, 24 Mar 2015 19:01:43 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OJ1hYc037445; Tue, 24 Mar 2015 19:01:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503241901.t2OJ1hYc037445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 24 Mar 2015 19:01:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280453 - in head/sys/arm: broadcom/bcm2835 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 19:01:44 -0000 Author: andrew Date: Tue Mar 24 19:01:42 2015 New Revision: 280453 URL: https://svnweb.freebsd.org/changeset/base/280453 Log: Move including std.bcm2835 to the RPI-B kernel config. The std.rpi file will be shared between the existing Raspberry Pi config, and the new Raspberry Pi 2 config. MFC after: 1 week Modified: head/sys/arm/broadcom/bcm2835/std.rpi head/sys/arm/conf/RPI-B Modified: head/sys/arm/broadcom/bcm2835/std.rpi ============================================================================== --- head/sys/arm/broadcom/bcm2835/std.rpi Tue Mar 24 18:46:01 2015 (r280452) +++ head/sys/arm/broadcom/bcm2835/std.rpi Tue Mar 24 19:01:42 2015 (r280453) @@ -1,7 +1,5 @@ # $FreeBSD$ -include "../broadcom/bcm2835/std.bcm2835" - options KERNVIRTADDR=0xc0100000 makeoptions KERNVIRTADDR=0xc0100000 options KERNPHYSADDR=0x00100000 Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Tue Mar 24 18:46:01 2015 (r280452) +++ head/sys/arm/conf/RPI-B Tue Mar 24 19:01:42 2015 (r280453) @@ -21,6 +21,7 @@ ident RPI-B include "../broadcom/bcm2835/std.rpi" +include "../broadcom/bcm2835/std.bcm2835" options HZ=100 options SCHED_4BSD # 4BSD scheduler From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 19:25:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41B053E1; Tue, 24 Mar 2015 19:25:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 135E2A97; Tue, 24 Mar 2015 19:25:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OJPboZ049978; Tue, 24 Mar 2015 19:25:37 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OJPbub049977; Tue, 24 Mar 2015 19:25:37 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503241925.t2OJPbub049977@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 24 Mar 2015 19:25:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280454 - in vendor/NetBSD/xlint: . dist X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 19:25:38 -0000 Author: emaste Date: Tue Mar 24 19:25:36 2015 New Revision: 280454 URL: https://svnweb.freebsd.org/changeset/base/280454 Log: Copy initial xlint(1) import to vendor branch Added: vendor/NetBSD/xlint/ vendor/NetBSD/xlint/dist/ - copied from r12099, cvs2svn/branches/JPO/usr.bin/xlint/ From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 20:00:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 49CE7110; Tue, 24 Mar 2015 20:00:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 333C1DFF; Tue, 24 Mar 2015 20:00:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OK0D8Z065578; Tue, 24 Mar 2015 20:00:13 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OK0Cbg065573; Tue, 24 Mar 2015 20:00:12 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201503242000.t2OK0Cbg065573@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Tue, 24 Mar 2015 20:00: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: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 20:00:13 -0000 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 stable/10/sys/dev/hwpmc/hwpmc_core.c stable/10/sys/dev/hwpmc/hwpmc_intel.c stable/10/sys/dev/hwpmc/hwpmc_logging.c stable/10/sys/dev/hwpmc/hwpmc_mod.c stable/10/sys/dev/hwpmc/hwpmc_piv.c stable/10/sys/dev/hwpmc/hwpmc_uncore.c stable/10/sys/dev/hwpmc/hwpmc_x86.c stable/10/sys/dev/hwpmc/pmc_events.h stable/10/sys/sys/pmc.h stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libpmc/libpmc.c ============================================================================== --- stable/10/lib/libpmc/libpmc.c Tue Mar 24 19:25:36 2015 (r280454) +++ stable/10/lib/libpmc/libpmc.c Tue Mar 24 20:00:11 2015 (r280455) @@ -200,6 +200,12 @@ static const struct pmc_event_descr hasw __PMC_EV_ALIAS_HASWELL() }; +static const struct pmc_event_descr haswell_xeon_event_table[] = +{ + __PMC_EV_ALIAS_HASWELL_XEON() +}; + + static const struct pmc_event_descr ivybridge_event_table[] = { __PMC_EV_ALIAS_IVYBRIDGE() @@ -267,6 +273,7 @@ PMC_MDEP_TABLE(core2, IAP, PMC_CLASS_SOF PMC_MDEP_TABLE(corei7, IAP, PMC_CLASS_SOFT, PMC_CLASS_IAF, PMC_CLASS_TSC, PMC_CLASS_UCF, PMC_CLASS_UCP); 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(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); @@ -312,6 +319,7 @@ PMC_CLASS_TABLE_DESC(core2, IAP, core2, PMC_CLASS_TABLE_DESC(corei7, IAP, corei7, iap); PMC_CLASS_TABLE_DESC(nehalem_ex, IAP, nehalem_ex, iap); PMC_CLASS_TABLE_DESC(haswell, IAP, haswell, iap); +PMC_CLASS_TABLE_DESC(haswell_xeon, IAP, haswell, iap); PMC_CLASS_TABLE_DESC(ivybridge, IAP, ivybridge, iap); PMC_CLASS_TABLE_DESC(ivybridge_xeon, IAP, ivybridge_xeon, iap); PMC_CLASS_TABLE_DESC(sandybridge, IAP, sandybridge, iap); @@ -626,6 +634,8 @@ static struct pmc_event_alias core2_alia #define nehalem_ex_aliases_without_iaf core2_aliases_without_iaf #define haswell_aliases core2_aliases #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 ivybridge_aliases core2_aliases #define ivybridge_aliases_without_iaf core2_aliases_without_iaf #define ivybridge_xeon_aliases core2_aliases @@ -896,7 +906,8 @@ iap_allocate_pmc(enum pmc_event pe, char n = pmc_parse_mask(iap_rsp_mask_sb_sbx_ib, p, &rsp); } else return (-1); - } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL) { + } else if (cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL || + cpu_info.pm_cputype == PMC_CPU_INTEL_HASWELL_XEON) { if (KWPREFIXMATCH(p, IAP_KW_RSP "=")) { n = pmc_parse_mask(iap_rsp_mask_haswell, p, &rsp); } else @@ -2788,6 +2799,10 @@ pmc_event_names_of_class(enum pmc_class ev = haswell_event_table; count = PMC_EVENT_TABLE_SIZE(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + ev = haswell_xeon_event_table; + count = PMC_EVENT_TABLE_SIZE(haswell_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; count = PMC_EVENT_TABLE_SIZE(ivybridge); @@ -3115,6 +3130,9 @@ pmc_init(void) pmc_class_table[n++] = &haswelluc_class_table_descr; PMC_MDEP_INIT_INTEL_V2(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + PMC_MDEP_INIT_INTEL_V2(haswell_xeon); + break; case PMC_CPU_INTEL_IVYBRIDGE: PMC_MDEP_INIT_INTEL_V2(ivybridge); break; @@ -3280,6 +3298,11 @@ _pmc_name_of_event(enum pmc_event pe, en ev = haswell_event_table; evfence = haswell_event_table + PMC_EVENT_TABLE_SIZE(haswell); break; + case PMC_CPU_INTEL_HASWELL_XEON: + ev = haswell_xeon_event_table; + evfence = haswell_xeon_event_table + PMC_EVENT_TABLE_SIZE(haswell_xeon); + break; + case PMC_CPU_INTEL_IVYBRIDGE: ev = ivybridge_event_table; evfence = ivybridge_event_table + PMC_EVENT_TABLE_SIZE(ivybridge); Modified: stable/10/sys/amd64/conf/GENERIC ============================================================================== --- stable/10/sys/amd64/conf/GENERIC Tue Mar 24 19:25:36 2015 (r280454) +++ stable/10/sys/amd64/conf/GENERIC Tue Mar 24 20:00:11 2015 (r280455) @@ -84,6 +84,7 @@ options SMP # Symmetric MultiProcesso device cpufreq # Bus support. +device hwpmc device acpi options ACPI_DMAR device pci Modified: stable/10/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/10/sys/dev/hwpmc/hwpmc_core.c Tue Mar 24 19:25:36 2015 (r280454) +++ stable/10/sys/dev/hwpmc/hwpmc_core.c Tue Mar 24 20:00:11 2015 (r280455) @@ -38,7 +38,11 @@ __FBSDID("$FreeBSD$"); #include #include +#if (__FreeBSD_version >= 1100000) +#include +#else #include +#endif #include #include #include @@ -569,7 +573,8 @@ struct iap_event_descr { #define IAP_F_IBX (1 << 9) /* CPU: Ivy Bridge Xeon */ #define IAP_F_HW (1 << 10) /* CPU: Haswell */ #define IAP_F_CAS (1 << 11) /* CPU: Atom Silvermont */ -#define IAP_F_FM (1 << 12) /* Fixed mask */ +#define IAP_F_HWX (1 << 12) /* CPU: Haswell Xeon */ +#define IAP_F_FM (1 << 13) /* Fixed mask */ #define IAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -613,11 +618,11 @@ 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_CAS | IAP_F_HWX), 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_SBX | IAP_F_CAS | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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), @@ -638,9 +643,9 @@ 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), 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_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), 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 | @@ -654,7 +659,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_HW | IAP_F_HWX), 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), @@ -662,26 +667,27 @@ 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_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), 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_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), 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_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_05H, 0x08, 0x05, IAP_F_FM | IAP_F_CA), IAPDESCR(08H_06H, 0x08, 0x06, IAP_F_FM | IAP_F_CA), 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), + 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), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW), - IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW), - IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW), + 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_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), 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(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), @@ -697,15 +703,16 @@ 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), 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_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), - IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + 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), @@ -716,24 +723,24 @@ static struct iap_event_descr iap_events IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | - IAP_F_WM | IAP_F_SB | IAP_F_SBX), + IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX ), IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_08H, 0x10, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_10H, 0x10, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_20H, 0x10, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_40H, 0x10, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_80H, 0x10, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | - IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(10H_81H, 0x10, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(11H_00H, 0x11, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), IAPDESCR(11H_01H, 0x11, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_SB | - IAP_F_SBX), - IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX), + IAP_F_SBX | IAP_F_IB | IAP_F_IBX), + IAPDESCR(11H_02H, 0x11, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | IAP_F_IBX), IAPDESCR(11H_81H, 0x11, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(12H_00H, 0x12, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -796,30 +803,30 @@ 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), - IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW), + 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_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_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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), - IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW), + 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_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_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), - IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_E7H, 0x24, 0xE7, IAP_F_FM | IAP_F_HW), + 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), - IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW), + 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(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -850,7 +857,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), + IAPDESCR(27H_50H, 0x27, 0x50, IAP_F_FM | IAP_F_HW | IAP_F_HWX), 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), @@ -878,10 +885,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_CAS | IAP_F_HWX), 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_CAS | IAP_F_HWX), IAPDESCR(30H, 0x30, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), @@ -897,10 +904,10 @@ 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_HW | IAP_F_CAS | IAP_F_HWX), 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_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -942,25 +949,25 @@ 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(48H_02H, 0x48, 0x02, IAP_F_FM | IAP_F_I7O), 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_HW | IAP_F_HWX), 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_HW | IAP_F_HWX), 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), - IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW), + 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), - IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW), - IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW), - IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW), + 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_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(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), @@ -970,9 +977,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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(4DH_01H, 0x4D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -989,7 +996,7 @@ static struct iap_event_descr iap_events IAPDESCR(4FH_10H, 0x4F, 0x10, IAP_F_FM | IAP_F_WM), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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 | @@ -1001,10 +1008,10 @@ 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), - IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + 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), @@ -1016,25 +1023,25 @@ 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(5FH_01H, 0x5F, 0x01, IAP_F_FM | IAP_F_IB), - IAPDESCR(5FH_04H, 0x5F, 0x04, IAP_F_IBX), + 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_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_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_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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(61H, 0x61, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(61H_00H, 0x61, 0x00, IAP_F_FM | IAP_F_CC), @@ -1046,9 +1053,9 @@ 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(64H, 0x64, IAP_M_CORE, IAP_F_CA | IAP_F_CC2), IAPDESCR(64H_40H, 0x64, 0x40, IAP_F_FM | IAP_F_CC), @@ -1090,20 +1097,25 @@ 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_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_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_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_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_20H, 0x79, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | 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_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | 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), @@ -1120,10 +1132,10 @@ 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_CAS | IAP_F_HWX), 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), + IAPDESCR(80H_04H, 0x80, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX), IAPDESCR(81H_00H, 0x81, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(81H_01H, 0x81, 0x01, IAP_F_FM | IAP_F_I7O), @@ -1141,74 +1153,74 @@ static struct iap_event_descr iap_events 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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), - IAPDESCR(85H_0EH, 0x85, 0x0E, IAP_F_FM | IAP_F_HW), + 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_10H, 0x85, 0x10, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(85H_20H, 0x85, 0x20, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(85H_40H, 0x85, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW), - IAPDESCR(85H_60H, 0x85, 0x60, IAP_F_FM | IAP_F_HW), + 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), + 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), IAPDESCR(86H_00H, 0x86, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(87H_08H, 0x87, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), 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_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_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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_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_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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_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, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + 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_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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_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_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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_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, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(8AH_00H, 0x8A, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(8BH_00H, 0x8B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -1223,45 +1235,45 @@ static struct iap_event_descr iap_events IAPDESCR(93H_00H, 0x93, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - 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(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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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), - IAPDESCR(A1H_04H, 0xA1, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A1H_08H, 0xA1, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - 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 | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A1H_20H, 0xA1, 0x20, 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + 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), + 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_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*/ + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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 | @@ -1269,15 +1281,17 @@ 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_HW), - IAPDESCR(A3H_02H, 0xA3, 0x02, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(A3H_04H, 0xA3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(A3H_05H, 0xA3, 0x05, IAP_F_FM | IAP_F_HW), - IAPDESCR(A3H_08H, 0xA3, 0x08, IAP_F_FM | IAP_F_IBX | 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), + 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(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), + 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), IAPDESCR(AAH_02H, 0xAA, 0x02, IAP_F_FM | IAP_F_CA), @@ -1295,17 +1309,17 @@ static struct iap_event_descr iap_events 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_IBX | IAP_F_HW | IAP_F_HWX), 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_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), 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), @@ -1315,7 +1329,7 @@ static struct iap_event_descr iap_events 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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), @@ -1353,7 +1367,7 @@ 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_CAS), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX | IAP_F_CAS), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -1364,30 +1378,30 @@ 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(BCH_11H, 0xBC, 0x11, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_12H, 0xBC, 0x12, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_14H, 0xBC, 0x14, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_18H, 0xBC, 0x18, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_21H, 0xBC, 0x21, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_22H, 0xBC, 0x22, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_24H, 0xBC, 0x24, IAP_F_FM | IAP_F_HW), - IAPDESCR(BCH_28H, 0xBC, 0x28, IAP_F_FM | IAP_F_HW), + 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_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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(BFH_05H, 0xBF, 0x05, IAP_F_FM | IAP_F_SB | IAP_F_SBX), 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_CAS | IAP_F_HWX), 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_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C0H_02H, 0xC0, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB), IAPDESCR(C0H_04H, 0xC0, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | @@ -1398,21 +1412,22 @@ 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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), + IAPDESCR(C1H_40H, 0xC1, 0x40, IAP_F_FM | IAP_F_HW | IAP_F_HWX), + 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_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), 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_IBX | IAP_F_HW | IAP_F_HWX), 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), @@ -1424,37 +1439,39 @@ 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_CAS), + 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 | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C3H_08H, 0xC3, 0x08, 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_00H, 0xC4, 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_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C4H_01H, 0xC4, 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_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_02H, 0xC4, 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_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_04H, 0xC4, 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_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_08H, 0xC4, 0x08, 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(C4H_0CH, 0xC4, 0x0C, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(C4H_0FH, 0xC4, 0x0F, IAP_F_FM | IAP_F_CA), IAPDESCR(C4H_10H, 0xC4, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_20H, 0xC4, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C4H_7EH, 0xC4, 0x7E, IAP_F_CAS), IAPDESCR(C4H_BFH, 0xC4, 0xBF, IAP_F_CAS), IAPDESCR(C4H_EBH, 0xC4, 0xEB, IAP_F_CAS), @@ -1466,17 +1483,17 @@ static struct iap_event_descr iap_events 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 | - IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(C5H_01H, 0xC5, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C5H_02H, 0xC5, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(C5H_04H, 0xC5, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | - IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C5H_10H, 0xC5, 0x10, IAP_F_FM | IAP_F_SB | IAP_F_IB | 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(C5H_7EH, 0xC5, 0x7E, IAP_F_CAS), IAPDESCR(C5H_BFH, 0xC5, 0xBF, IAP_F_CAS), IAPDESCR(C5H_EBH, 0xC5, 0xEB, IAP_F_CAS), @@ -1511,15 +1528,15 @@ static struct iap_event_descr iap_events IAPDESCR(CAH_00H, 0xCA, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(CAH_01H, 0xCA, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_CAS), IAPDESCR(CAH_02H, 0xCA, 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_04H, 0xCA, 0x04, 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_08H, 0xCA, 0x08, 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_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CAH_20H, 0xCA, 0x20, IAP_F_CAS), IAPDESCR(CAH_3FH, 0xCA, 0x3F, IAP_F_CAS), IAPDESCR(CAH_50H, 0xCA, 0x50, IAP_F_CAS), @@ -1545,11 +1562,11 @@ static struct iap_event_descr iap_events IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_03H, 0xCC, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(CCH_20H, 0xCC, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(CDH_00H, 0xCD, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CDH_01H, 0xCD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | IAP_F_HWX), IAPDESCR(CDH_02H, 0xCD, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), @@ -1559,55 +1576,67 @@ 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), - IAPDESCR(D0H_02H, 0xD0, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_10H, 0xD0, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), + 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), + IAPDESCR(D0H_20H, 0xD0, 0x20, IAP_F_FM | 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), - IAPDESCR(D0H_41H, 0xD0, 0x41, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_42H, 0xD0, 0x42, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_80H, 0xD0, 0x80, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - IAPDESCR(D0H_81H, 0xD0, 0x81, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(D0H_82H, 0xD0, 0x82, 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(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_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 | - 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_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), - IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW), - IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), + 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 | + 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 | + 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_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_01H, 0xD2, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_02H, 0xD2, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_04H, 0xD2, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_08H, 0xD2, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_0FH, 0xD2, 0x0F, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_IB | - IAP_F_IBX | IAP_F_HW), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D2H_10H, 0xD2, 0x10, IAP_F_FM | IAP_F_CC2E), IAPDESCR(D3H_01H, 0xD3, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX | IAP_F_HW), - IAPDESCR(D3H_04H, 0xD3, 0x04, IAP_F_FM | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(D3H_10H, 0xD3, 0x10, IAP_F_IBX), - IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX), + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(D3H_03H, 0xD0, 0x3, 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_10H, 0xD3, 0x10, IAP_F_IBX ), + IAPDESCR(D3H_20H, 0xD3, 0x20, IAP_F_IBX ), IAPDESCR(D4H_01H, 0xD4, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 20:07:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E55374FB; Tue, 24 Mar 2015 20:07:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1857F0B; Tue, 24 Mar 2015 20:07:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OK7Sf9069857; Tue, 24 Mar 2015 20:07:28 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OK7SAO069856; Tue, 24 Mar 2015 20:07:28 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201503242007.t2OK7SAO069856@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 24 Mar 2015 20:07:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280456 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 20:07:29 -0000 Author: rpaulo Date: Tue Mar 24 20:07:27 2015 New Revision: 280456 URL: https://svnweb.freebsd.org/changeset/base/280456 Log: Remove whitespace. Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Mar 24 20:00:11 2015 (r280455) +++ head/sys/vm/vm_page.c Tue Mar 24 20:07:27 2015 (r280456) @@ -160,7 +160,7 @@ vm_page_init_fakepg(void *dummy) { fakepg_zone = uma_zcreate("fakepg", sizeof(struct vm_page), NULL, NULL, - NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM); + NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE | UMA_ZONE_VM); } /* Make sure that u_long is at least 64 bits when PAGE_SIZE is 32K. */ @@ -443,7 +443,7 @@ vm_page_startup(vm_offset_t vaddr) */ for (pa = new_end; pa < phys_avail[biggestone + 1]; pa += PAGE_SIZE) dump_add_page(pa); -#endif +#endif phys_avail[biggestone + 1] = new_end; /* @@ -702,7 +702,7 @@ vm_page_unhold(vm_page_t mem) * vm_page_unhold_pages: * * Unhold each of the pages that is referenced by the given array. - */ + */ void vm_page_unhold_pages(vm_page_t *ma, int count) { @@ -1303,7 +1303,7 @@ vm_page_rename(vm_page_t m, vm_object_t * zero is given for "end", then the range's upper bound is * infinity. If the given object is backed by a vnode and it * transitions from having one or more cached pages to none, the - * vnode's hold count is reduced. + * vnode's hold count is reduced. */ void vm_page_cache_free(vm_object_t object, vm_pindex_t start, vm_pindex_t end) @@ -1455,7 +1455,7 @@ vm_page_is_cached(vm_object_t object, vm * VM_ALLOC_NOBUSY do not exclusive busy the page * VM_ALLOC_NODUMP do not include the page in a kernel core dump * VM_ALLOC_NOOBJ page is not associated with an object and - * should not be exclusive busy + * should not be exclusive busy * VM_ALLOC_SBUSY shared busy the allocated page * VM_ALLOC_WIRED wire the allocated page * VM_ALLOC_ZERO prefer a zeroed page @@ -1563,7 +1563,7 @@ vm_page_alloc(vm_object_t object, vm_pin ("vm_page_alloc: page %p has unexpected queue %d", m, m->queue)); KASSERT(m->wire_count == 0, ("vm_page_alloc: page %p is wired", m)); KASSERT(m->hold_count == 0, ("vm_page_alloc: page %p is held", m)); - KASSERT(!vm_page_sbusied(m), + KASSERT(!vm_page_sbusied(m), ("vm_page_alloc: page %p is busy", m)); KASSERT(m->dirty == 0, ("vm_page_alloc: page %p is dirty", m)); KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, @@ -1702,7 +1702,7 @@ vm_page_alloc_contig_vdrop(struct spglis * optional allocation flags: * VM_ALLOC_NOBUSY do not exclusive busy the page * VM_ALLOC_NOOBJ page is not associated with an object and - * should not be exclusive busy + * should not be exclusive busy * VM_ALLOC_SBUSY shared busy the allocated page * VM_ALLOC_WIRED wire the allocated page * VM_ALLOC_ZERO prefer a zeroed page @@ -2399,7 +2399,7 @@ vm_page_unwire(vm_page_t m, uint8_t queu * This will cause them to be moved to the cache more quickly and * if not actively re-referenced, reclaimed more quickly. If we just * stick these pages at the end of the inactive queue, heavy filesystem - * meta-data accesses can cause an unnecessary paging load on memory bound + * meta-data accesses can cause an unnecessary paging load on memory bound * processes. This optimization causes one-time-use metadata to be * reused more quickly. * @@ -2537,7 +2537,7 @@ vm_page_cache(vm_page_t m) /* * Remove the page from the object's collection of resident - * pages. + * pages. */ vm_radix_remove(&object->rtree, m->pindex); TAILQ_REMOVE(&object->memq, m, listq); @@ -2610,7 +2610,7 @@ vm_page_cache(vm_page_t m) * it gets reused quickly. However, this can result in a silly syndrome * due to the page recycling too quickly. Small objects will not be * fully cached. On the other hand, if we move the page to the inactive - * queue we wind up with a problem whereby very large objects + * queue we wind up with a problem whereby very large objects * unnecessarily blow away our inactive and cache queues. * * The solution is to move the pages based on a fixed weighting. We @@ -2712,7 +2712,7 @@ retrylookup: vm_page_xbusied(m) : vm_page_busied(m); if (sleep) { if ((allocflags & VM_ALLOC_NOWAIT) != 0) - return (NULL); + return (NULL); /* * Reference the page before unlocking and * sleeping so that the page daemon is less @@ -2808,7 +2808,7 @@ vm_page_set_valid_range(vm_page_t m, int pmap_zero_page_area(m, frag, base - frag); /* - * If the ending offset is not DEV_BSIZE aligned and the + * If the ending offset is not DEV_BSIZE aligned and the * valid bit is clear, we have to zero out a portion of * the last block. */ @@ -2820,7 +2820,7 @@ vm_page_set_valid_range(vm_page_t m, int /* * Assert that no previously invalid block that is now being validated - * is already dirty. + * is already dirty. */ KASSERT((~m->valid & vm_page_bits(base, size) & m->dirty) == 0, ("vm_page_set_valid_range: page %p is dirty", m)); @@ -2915,7 +2915,7 @@ vm_page_set_validclean(vm_page_t m, int pmap_zero_page_area(m, frag, base - frag); /* - * If the ending offset is not DEV_BSIZE aligned and the + * If the ending offset is not DEV_BSIZE aligned and the * valid bit is clear, we have to zero out a portion of * the last block. */ @@ -3011,12 +3011,12 @@ vm_page_set_invalid(vm_page_t m, int bas /* * vm_page_zero_invalid() * - * The kernel assumes that the invalid portions of a page contain + * The kernel assumes that the invalid portions of a page contain * garbage, but such pages can be mapped into memory by user code. * When this occurs, we must zero out the non-valid portions of the * page so user code sees what it expects. * - * Pages are most often semi-valid when the end of a file is mapped + * Pages are most often semi-valid when the end of a file is mapped * into memory and the file's size is not page aligned. */ void @@ -3033,10 +3033,10 @@ vm_page_zero_invalid(vm_page_t m, boolea * vm_page_set_validclean(). */ for (b = i = 0; i <= PAGE_SIZE / DEV_BSIZE; ++i) { - if (i == (PAGE_SIZE / DEV_BSIZE) || + if (i == (PAGE_SIZE / DEV_BSIZE) || (m->valid & ((vm_page_bits_t)1 << i))) { if (i > b) { - pmap_zero_page_area(m, + pmap_zero_page_area(m, b << DEV_BSHIFT, (i - b) << DEV_BSHIFT); } b = i + 1; From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 20:09:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 72DFB784; Tue, 24 Mar 2015 20:09:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F406F3A; Tue, 24 Mar 2015 20:09:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OK9uPe070194; Tue, 24 Mar 2015 20:09:56 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OK9u3Q070193; Tue, 24 Mar 2015 20:09:56 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201503242009.t2OK9u3Q070193@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Tue, 24 Mar 2015 20:09:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280457 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 20:09:56 -0000 Author: rpaulo Date: Tue Mar 24 20:09:55 2015 New Revision: 280457 URL: https://svnweb.freebsd.org/changeset/base/280457 Log: Use TUNABLE_INT_FETCH for boot_pages. vm.boot_pages is marked as a CTLFLAG_RDTUN, but it's used by the VM before the sysctl subsystem is initialsed. We manually fetch the variable from the environment to work around this problem. Tested by: Keith White kwhite at uottawa.ca MFC after: 1 week Modified: head/sys/vm/vm_page.c Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Mar 24 20:07:27 2015 (r280456) +++ head/sys/vm/vm_page.c Tue Mar 24 20:09:55 2015 (r280457) @@ -134,8 +134,9 @@ long first_page; int vm_page_zero_count; static int boot_pages = UMA_BOOT_PAGES; -SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RDTUN, &boot_pages, 0, - "number of pages allocated for bootstrapping the VM system"); +SYSCTL_INT(_vm, OID_AUTO, boot_pages, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &boot_pages, 0, + "number of pages allocated for bootstrapping the VM system"); static int pa_tryrelock_restart; SYSCTL_INT(_vm, OID_AUTO, tryrelock_restart, CTLFLAG_RD, @@ -349,6 +350,7 @@ vm_page_startup(vm_offset_t vaddr) * Allocate memory for use when boot strapping the kernel memory * allocator. */ + TUNABLE_INT_FETCH("vm.boot_pages", &boot_pages); new_end = end - (boot_pages * UMA_SLAB_SIZE); new_end = trunc_page(new_end); mapped = pmap_map(&vaddr, new_end, end, From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 20:33:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1095FF11; Tue, 24 Mar 2015 20:33:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0DB127C; Tue, 24 Mar 2015 20:33:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OKXPUC084147; Tue, 24 Mar 2015 20:33:25 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OKXP6A084142; Tue, 24 Mar 2015 20:33:25 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503242033.t2OKXP6A084142@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 24 Mar 2015 20:33:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280458 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 20:33:26 -0000 Author: pfg Date: Tue Mar 24 20:33:24 2015 New Revision: 280458 URL: https://svnweb.freebsd.org/changeset/base/280458 Log: Introduce nonnull attributes in the signal and pthread headers. The `nonnull' attribute specifies that some function parameters should be non-null pointers. This is very useful as it helps the compiler generate warnings on suspicious code and can also enable some small optimizations. In clang this is also useful for the static analyzer. While we could go on defining this all over the tree, it only makes sense to annotate a subset of critical functions. Hinted by: Android's bionic libc Differential Revision: https://reviews.freebsd.org/D2101 Modified: head/include/pthread.h head/include/signal.h Modified: head/include/pthread.h ============================================================================== --- head/include/pthread.h Tue Mar 24 20:09:55 2015 (r280457) +++ head/include/pthread.h Tue Mar 24 20:33:24 2015 (r280458) @@ -144,19 +144,23 @@ struct _pthread_cleanup_info { */ __BEGIN_DECLS int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); -int pthread_attr_destroy(pthread_attr_t *); +int pthread_attr_destroy(pthread_attr_t *) __nonnull(1); int pthread_attr_getstack(const pthread_attr_t * __restrict, - void ** __restrict, size_t * __restrict); -int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); + void ** __restrict, size_t * __restrict) + __nonnull(1, 2, 3); +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) + __nonnull(1, 2); int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); int pthread_attr_getstackaddr(const pthread_attr_t *, void **); -int pthread_attr_getdetachstate(const pthread_attr_t *, int *); -int pthread_attr_init(pthread_attr_t *); -int pthread_attr_setstacksize(pthread_attr_t *, size_t); -int pthread_attr_setguardsize(pthread_attr_t *, size_t); -int pthread_attr_setstack(pthread_attr_t *, void *, size_t); +int pthread_attr_getdetachstate(const pthread_attr_t *, int *) + __nonnull(1, 2); +int pthread_attr_init(pthread_attr_t *) __nonnull(1); +int pthread_attr_setstacksize(pthread_attr_t *, size_t) __nonnull(1); +int pthread_attr_setguardsize(pthread_attr_t *, size_t) __nonnull(1); +int pthread_attr_setstack(pthread_attr_t *, void *, size_t) + __nonnull(1); int pthread_attr_setstackaddr(pthread_attr_t *, void *); -int pthread_attr_setdetachstate(pthread_attr_t *, int); +int pthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1); int pthread_barrier_destroy(pthread_barrier_t *); int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned); @@ -164,7 +168,7 @@ int pthread_barrier_wait(pthread_barrie int pthread_barrierattr_destroy(pthread_barrierattr_t *); int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *); -int pthread_barrierattr_init(pthread_barrierattr_t *); +int pthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1); int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); #define pthread_cleanup_push(cleanup_routine, cleanup_arg) \ @@ -180,85 +184,96 @@ int pthread_barrierattr_setpshared(pthr __pthread_cleanup_pop_imp(execute); \ } -int pthread_condattr_destroy(pthread_condattr_t *); +int pthread_condattr_destroy(pthread_condattr_t *) __nonnull(1); int pthread_condattr_getclock(const pthread_condattr_t *, - clockid_t *); -int pthread_condattr_getpshared(const pthread_condattr_t *, int *); -int pthread_condattr_init(pthread_condattr_t *); -int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); -int pthread_condattr_setpshared(pthread_condattr_t *, int); -int pthread_cond_broadcast(pthread_cond_t *); -int pthread_cond_destroy(pthread_cond_t *); + clockid_t *) __nonnull(1, 2); +int pthread_condattr_getpshared(const pthread_condattr_t *, int *) + __nonnull(1, 2); +int pthread_condattr_init(pthread_condattr_t *) __nonnull(1); +int pthread_condattr_setclock(pthread_condattr_t *, clockid_t) + __nonnull(1); +int pthread_condattr_setpshared(pthread_condattr_t *, int) + __nonnull(1); +int pthread_cond_broadcast(pthread_cond_t *) + __nonnull(1); +int pthread_cond_destroy(pthread_cond_t *) + __nonnull(1); int pthread_cond_init(pthread_cond_t *, - const pthread_condattr_t *); -int pthread_cond_signal(pthread_cond_t *); + const pthread_condattr_t *) __nonnull(1); +int pthread_cond_signal(pthread_cond_t *) __nonnull(1); int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *__mutex, const struct timespec *) - __requires_exclusive(*__mutex); + __nonnull(1, 2, 3) __requires_exclusive(*__mutex); int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex) - __requires_exclusive(*__mutex); + __nonnull(1, 2) __requires_exclusive(*__mutex); int pthread_create(pthread_t *, const pthread_attr_t *, - void *(*) (void *), void *); + void *(*) (void *), void *) __nonnull(1, 3); int pthread_detach(pthread_t); int pthread_equal(pthread_t, pthread_t); void pthread_exit(void *) __dead2; void *pthread_getspecific(pthread_key_t); -int pthread_getcpuclockid(pthread_t, clockid_t *); +int pthread_getcpuclockid(pthread_t, clockid_t *) __nonnull(2); int pthread_join(pthread_t, void **); int pthread_key_create(pthread_key_t *, - void (*) (void *)); + void (*) (void *)) __nonnull(1); int pthread_key_delete(pthread_key_t); -int pthread_mutexattr_init(pthread_mutexattr_t *); -int pthread_mutexattr_destroy(pthread_mutexattr_t *); +int pthread_mutexattr_init(pthread_mutexattr_t *) __nonnull(1); +int pthread_mutexattr_destroy(pthread_mutexattr_t *) __nonnull(1); int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, - int *); -int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *); -int pthread_mutexattr_settype(pthread_mutexattr_t *, int); -int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); + int *) __nonnull(1, 2); +int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *) + __nonnull(1, 2); +int pthread_mutexattr_settype(pthread_mutexattr_t *, int) + __nonnull(1); +int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) + __nonnull(1); int pthread_mutex_destroy(pthread_mutex_t *__mutex) - __requires_unlocked(*__mutex); + __nonnull(1) __requires_unlocked(*__mutex); int pthread_mutex_init(pthread_mutex_t *__mutex, const pthread_mutexattr_t *) - __requires_unlocked(*__mutex); + __nonnull(1) __requires_unlocked(*__mutex); int pthread_mutex_lock(pthread_mutex_t *__mutex) - __locks_exclusive(*__mutex); + __nonnull(1) __locks_exclusive(*__mutex); int pthread_mutex_trylock(pthread_mutex_t *__mutex) - __trylocks_exclusive(0, *__mutex); + __nonnull(1) __trylocks_exclusive(0, *__mutex); int pthread_mutex_timedlock(pthread_mutex_t *__mutex, const struct timespec *) - __trylocks_exclusive(0, *__mutex); + __nonnull(1, 2) __trylocks_exclusive(0, *__mutex); int pthread_mutex_unlock(pthread_mutex_t *__mutex) - __unlocks(*__mutex); -int pthread_once(pthread_once_t *, void (*) (void)); + __nonnull(1) __unlocks(*__mutex); +int pthread_once(pthread_once_t *, void (*) (void)) __nonnull(1, 2); int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) - __requires_unlocked(*__rwlock); + __nonnull(1) __requires_unlocked(*__rwlock); int pthread_rwlock_init(pthread_rwlock_t *__rwlock, const pthread_rwlockattr_t *) - __requires_unlocked(*__rwlock); + __nonnull(1) __requires_unlocked(*__rwlock); int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) - __locks_shared(*__rwlock); + __nonnull(1) __locks_shared(*__rwlock); int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __trylocks_shared(0, *__rwlock); + __nonnull(1, 2) __trylocks_shared(0, *__rwlock); int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __trylocks_exclusive(0, *__rwlock); + __nonnull(1, 2) __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) - __trylocks_shared(0, *__rwlock); + __nonnull(1) __trylocks_shared(0, *__rwlock); int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) - __trylocks_exclusive(0, *__rwlock); + __nonnull(1) __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) - __unlocks(*__rwlock); + __nonnull(1) __unlocks(*__rwlock); int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) - __locks_exclusive(*__rwlock); -int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); + __nonnull(1) __locks_exclusive(*__rwlock); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) + __nonnull(1); int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *, int *); int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, - int *); -int pthread_rwlockattr_init(pthread_rwlockattr_t *); + int *) __nonnull(1, 2); +int pthread_rwlockattr_init(pthread_rwlockattr_t *) + __nonnull(1); int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int); -int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) + __nonnull(1); pthread_t pthread_self(void); int pthread_setspecific(pthread_key_t, const void *); @@ -295,18 +310,20 @@ int pthread_mutexattr_setprotocol(pthre int pthread_attr_getinheritsched(const pthread_attr_t *, int *); int pthread_attr_getschedparam(const pthread_attr_t *, - struct sched_param *); -int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); -int pthread_attr_getscope(const pthread_attr_t *, int *); + struct sched_param *) __nonnull(1, 2); +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) + __nonnull(1, 2); +int pthread_attr_getscope(const pthread_attr_t *, int *) + __nonnull(1, 2); int pthread_attr_setinheritsched(pthread_attr_t *, int); int pthread_attr_setschedparam(pthread_attr_t *, - const struct sched_param *); -int pthread_attr_setschedpolicy(pthread_attr_t *, int); -int pthread_attr_setscope(pthread_attr_t *, int); + const struct sched_param *) __nonnull(1, 2); +int pthread_attr_setschedpolicy(pthread_attr_t *, int) __nonnull(1); +int pthread_attr_setscope(pthread_attr_t *, int) __nonnull(1); int pthread_getschedparam(pthread_t pthread, int *, - struct sched_param *); + struct sched_param *) __nonnull(2, 3); int pthread_setschedparam(pthread_t, int, - const struct sched_param *); + const struct sched_param *) __nonnull(3); #if __XSI_VISIBLE int pthread_getconcurrency(void); int pthread_setconcurrency(int); Modified: head/include/signal.h ============================================================================== --- head/include/signal.h Tue Mar 24 20:09:55 2015 (r280457) +++ head/include/signal.h Tue Mar 24 20:33:24 2015 (r280458) @@ -78,10 +78,10 @@ int sigdelset(sigset_t *, int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); int sigismember(const sigset_t *, int); -int sigpending(sigset_t *); +int sigpending(sigset_t *) __nonnull(1); int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); -int sigsuspend(const sigset_t *); -int sigwait(const sigset_t * __restrict, int * __restrict); +int sigsuspend(const sigset_t *) __nonnull(1); +int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull(1, 2); #endif #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 21:12:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8227979; Tue, 24 Mar 2015 21:12:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B119903; Tue, 24 Mar 2015 21:12:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OLCkes003205; Tue, 24 Mar 2015 21:12:46 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OLCkiK003203; Tue, 24 Mar 2015 21:12:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503242112.t2OLCkiK003203@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 24 Mar 2015 21:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280459 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 21:12:46 -0000 Author: tuexen Date: Tue Mar 24 21:12:45 2015 New Revision: 280459 URL: https://svnweb.freebsd.org/changeset/base/280459 Log: Fix two bugs which resulted in a screwed up end point list: * Use a save way to walk throught a list while manipulting it. * Have to appropiate locks in place. Joint work with rrs@ MFC after: 3 days Modified: head/sys/netinet/sctp_pcb.c head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Tue Mar 24 20:33:24 2015 (r280458) +++ head/sys/netinet/sctp_pcb.c Tue Mar 24 21:12:45 2015 (r280459) @@ -1867,7 +1867,7 @@ sctp_swap_inpcb_for_listen(struct sctp_i { /* For 1-2-1 with port reuse */ struct sctppcbhead *head; - struct sctp_inpcb *tinp; + struct sctp_inpcb *tinp, *ninp; if (sctp_is_feature_off(inp, SCTP_PCB_FLAGS_PORTREUSE)) { /* only works with port reuse on */ @@ -1877,10 +1877,11 @@ sctp_swap_inpcb_for_listen(struct sctp_i return (0); } SCTP_INP_RUNLOCK(inp); + SCTP_INP_INFO_WLOCK(); head = &SCTP_BASE_INFO(sctp_ephash)[SCTP_PCBHASH_ALLADDR(inp->sctp_lport, SCTP_BASE_INFO(hashmark))]; /* Kick out all non-listeners to the TCP hash */ - LIST_FOREACH(tinp, head, sctp_hash) { + LIST_FOREACH_SAFE(tinp, head, sctp_hash, ninp) { if (tinp->sctp_lport != inp->sctp_lport) { continue; } @@ -1908,6 +1909,7 @@ sctp_swap_inpcb_for_listen(struct sctp_i LIST_INSERT_HEAD(head, inp, sctp_hash); SCTP_INP_WUNLOCK(inp); SCTP_INP_RLOCK(inp); + SCTP_INP_INFO_WUNLOCK(); return (0); } Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Tue Mar 24 20:33:24 2015 (r280458) +++ head/sys/netinet/sctp_usrreq.c Tue Mar 24 21:12:45 2015 (r280459) @@ -6965,8 +6965,8 @@ sctp_listen(struct socket *so, int backl #endif SOCK_LOCK(so); error = solisten_proto_check(so); + SOCK_UNLOCK(so); if (error) { - SOCK_UNLOCK(so); SCTP_INP_RUNLOCK(inp); return (error); } @@ -6979,28 +6979,27 @@ sctp_listen(struct socket *so, int backl * move the guy that was listener to the TCP Pool. */ if (sctp_swap_inpcb_for_listen(inp)) { - goto in_use; + SCTP_INP_RUNLOCK(inp); + SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EADDRINUSE); + return (EADDRINUSE); } } if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && (inp->sctp_flags & SCTP_PCB_FLAGS_CONNECTED)) { /* We are already connected AND the TCP model */ -in_use: SCTP_INP_RUNLOCK(inp); - SOCK_UNLOCK(so); SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_USRREQ, EADDRINUSE); return (EADDRINUSE); } SCTP_INP_RUNLOCK(inp); if (inp->sctp_flags & SCTP_PCB_FLAGS_UNBOUND) { /* We must do a bind. */ - SOCK_UNLOCK(so); if ((error = sctp_inpcb_bind(so, NULL, NULL, p))) { /* bind error, probably perm */ return (error); } - SOCK_LOCK(so); } + SOCK_LOCK(so); /* It appears for 7.0 and on, we must always call this. */ solisten_proto(so, backlog); if (inp->sctp_flags & SCTP_PCB_FLAGS_UDPTYPE) { From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 21:31:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB95D78A; Tue, 24 Mar 2015 21:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2EB7BCD; Tue, 24 Mar 2015 21:31:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OLVj7W013386; Tue, 24 Mar 2015 21:31:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OLVcSQ013357; Tue, 24 Mar 2015 21:31:38 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503242131.t2OLVcSQ013357@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 24 Mar 2015 21:31:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280461 - in vendor/lld: . dist dist/cmake dist/cmake/modules dist/docs dist/docs/_static dist/docs/_templates dist/docs/llvm-theme dist/docs/llvm-theme/static dist/include dist/include... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 21:31:45 -0000 Author: dim Date: Tue Mar 24 21:31:36 2015 New Revision: 280461 URL: https://svnweb.freebsd.org/changeset/base/280461 Log: Vendor import of lld trunk r233088: https://llvm.org/svn/llvm-project/lld/trunk@233088 Added: vendor/lld/ vendor/lld/dist/ vendor/lld/dist/.arcconfig vendor/lld/dist/.clang-format vendor/lld/dist/.gitignore vendor/lld/dist/CMakeLists.txt (contents, props changed) vendor/lld/dist/LICENSE.TXT (contents, props changed) vendor/lld/dist/Makefile (contents, props changed) vendor/lld/dist/README.md vendor/lld/dist/cmake/ vendor/lld/dist/cmake/modules/ vendor/lld/dist/cmake/modules/FindVTune.cmake vendor/lld/dist/docs/ vendor/lld/dist/docs/C++11.rst vendor/lld/dist/docs/CMakeLists.txt (contents, props changed) vendor/lld/dist/docs/Driver.rst vendor/lld/dist/docs/Makefile (contents, props changed) vendor/lld/dist/docs/README.txt (contents, props changed) vendor/lld/dist/docs/Readers.rst vendor/lld/dist/docs/_static/ vendor/lld/dist/docs/_static/favicon.ico (contents, props changed) vendor/lld/dist/docs/_templates/ vendor/lld/dist/docs/_templates/indexsidebar.html (contents, props changed) vendor/lld/dist/docs/_templates/layout.html (contents, props changed) vendor/lld/dist/docs/conf.py (contents, props changed) vendor/lld/dist/docs/design.rst vendor/lld/dist/docs/development.rst vendor/lld/dist/docs/getting_started.rst vendor/lld/dist/docs/hello.png (contents, props changed) vendor/lld/dist/docs/index.rst vendor/lld/dist/docs/llvm-theme/ vendor/lld/dist/docs/llvm-theme/layout.html (contents, props changed) vendor/lld/dist/docs/llvm-theme/static/ vendor/lld/dist/docs/llvm-theme/static/contents.png (contents, props changed) vendor/lld/dist/docs/llvm-theme/static/llvm.css (contents, props changed) vendor/lld/dist/docs/llvm-theme/static/logo.png (contents, props changed) vendor/lld/dist/docs/llvm-theme/static/navigation.png (contents, props changed) vendor/lld/dist/docs/llvm-theme/theme.conf (contents, props changed) vendor/lld/dist/docs/make.bat vendor/lld/dist/docs/open_projects.rst vendor/lld/dist/docs/sphinx_intro.rst vendor/lld/dist/docs/windows_support.rst vendor/lld/dist/include/ vendor/lld/dist/include/Makefile (contents, props changed) vendor/lld/dist/include/lld/ vendor/lld/dist/include/lld/Config/ vendor/lld/dist/include/lld/Config/Makefile (contents, props changed) vendor/lld/dist/include/lld/Config/Version.h (contents, props changed) vendor/lld/dist/include/lld/Config/Version.inc.in (contents, props changed) vendor/lld/dist/include/lld/Core/ vendor/lld/dist/include/lld/Core/AbsoluteAtom.h (contents, props changed) vendor/lld/dist/include/lld/Core/Alias.h (contents, props changed) vendor/lld/dist/include/lld/Core/ArchiveLibraryFile.h (contents, props changed) vendor/lld/dist/include/lld/Core/Atom.h (contents, props changed) vendor/lld/dist/include/lld/Core/DefinedAtom.h (contents, props changed) vendor/lld/dist/include/lld/Core/Error.h (contents, props changed) vendor/lld/dist/include/lld/Core/File.h (contents, props changed) vendor/lld/dist/include/lld/Core/Instrumentation.h (contents, props changed) vendor/lld/dist/include/lld/Core/LLVM.h (contents, props changed) vendor/lld/dist/include/lld/Core/LinkingContext.h (contents, props changed) vendor/lld/dist/include/lld/Core/Node.h (contents, props changed) vendor/lld/dist/include/lld/Core/Parallel.h (contents, props changed) vendor/lld/dist/include/lld/Core/Pass.h (contents, props changed) vendor/lld/dist/include/lld/Core/PassManager.h (contents, props changed) vendor/lld/dist/include/lld/Core/Reader.h (contents, props changed) vendor/lld/dist/include/lld/Core/Reference.h (contents, props changed) vendor/lld/dist/include/lld/Core/Resolver.h (contents, props changed) vendor/lld/dist/include/lld/Core/STDExtras.h (contents, props changed) vendor/lld/dist/include/lld/Core/SharedLibraryAtom.h (contents, props changed) vendor/lld/dist/include/lld/Core/SharedLibraryFile.h (contents, props changed) vendor/lld/dist/include/lld/Core/Simple.h (contents, props changed) vendor/lld/dist/include/lld/Core/SymbolTable.h (contents, props changed) vendor/lld/dist/include/lld/Core/TODO.txt (contents, props changed) vendor/lld/dist/include/lld/Core/UndefinedAtom.h (contents, props changed) vendor/lld/dist/include/lld/Core/Writer.h (contents, props changed) vendor/lld/dist/include/lld/Core/range.h (contents, props changed) vendor/lld/dist/include/lld/Driver/ vendor/lld/dist/include/lld/Driver/Driver.h (contents, props changed) vendor/lld/dist/include/lld/Driver/WinLinkModuleDef.h (contents, props changed) vendor/lld/dist/include/lld/Makefile (contents, props changed) vendor/lld/dist/include/lld/Passes/ vendor/lld/dist/include/lld/ReaderWriter/ vendor/lld/dist/include/lld/ReaderWriter/AtomLayout.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/CoreLinkingContext.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/ELFLinkingContext.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/ELFTargets.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/LinkerScript.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/MachOLinkingContext.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/PECOFFLinkingContext.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/RelocationHelperFunctions.h (contents, props changed) vendor/lld/dist/include/lld/ReaderWriter/YamlContext.h (contents, props changed) vendor/lld/dist/lib/ vendor/lld/dist/lib/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/Config/ vendor/lld/dist/lib/Config/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/Config/Makefile (contents, props changed) vendor/lld/dist/lib/Config/Version.cpp (contents, props changed) vendor/lld/dist/lib/Core/ vendor/lld/dist/lib/Core/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/Core/DefinedAtom.cpp (contents, props changed) vendor/lld/dist/lib/Core/Error.cpp (contents, props changed) vendor/lld/dist/lib/Core/File.cpp (contents, props changed) vendor/lld/dist/lib/Core/LinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/Core/Makefile (contents, props changed) vendor/lld/dist/lib/Core/Reader.cpp (contents, props changed) vendor/lld/dist/lib/Core/Resolver.cpp (contents, props changed) vendor/lld/dist/lib/Core/SymbolTable.cpp (contents, props changed) vendor/lld/dist/lib/Core/TODO.txt (contents, props changed) vendor/lld/dist/lib/Core/Writer.cpp (contents, props changed) vendor/lld/dist/lib/Driver/ vendor/lld/dist/lib/Driver/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/Driver/CoreDriver.cpp (contents, props changed) vendor/lld/dist/lib/Driver/CoreOptions.td vendor/lld/dist/lib/Driver/DarwinLdDriver.cpp (contents, props changed) vendor/lld/dist/lib/Driver/DarwinLdOptions.td vendor/lld/dist/lib/Driver/Driver.cpp (contents, props changed) vendor/lld/dist/lib/Driver/GnuLdDriver.cpp (contents, props changed) vendor/lld/dist/lib/Driver/GnuLdOptions.td vendor/lld/dist/lib/Driver/Makefile (contents, props changed) vendor/lld/dist/lib/Driver/TODO.rst vendor/lld/dist/lib/Driver/UniversalDriver.cpp (contents, props changed) vendor/lld/dist/lib/Driver/UniversalDriverOptions.td vendor/lld/dist/lib/Driver/WinLinkDriver.cpp (contents, props changed) vendor/lld/dist/lib/Driver/WinLinkModuleDef.cpp (contents, props changed) vendor/lld/dist/lib/Driver/WinLinkOptions.td vendor/lld/dist/lib/Makefile (contents, props changed) vendor/lld/dist/lib/Passes/ vendor/lld/dist/lib/ReaderWriter/ vendor/lld/dist/lib/ReaderWriter/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/CoreLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/ vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64DynamicLibraryWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64ELFFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64ELFReader.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64ExecutableWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64LinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64LinkingContext.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64RelocationHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/AArch64TargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/AArch64/TODO.rst vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMELFFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMELFReader.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMExecutableWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMLinkingContext.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMRelocationHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMRelocationPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMSymbolTable.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMTargetHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/ARMTargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ARM/TODO.rst vendor/lld/dist/lib/ReaderWriter/ELF/Atoms.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Chunk.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/CreateELF.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/DefaultLayout.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/DefaultTargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/DynamicFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/DynamicLibraryWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ELFFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ELFLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ELFReader.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/ExecutableWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/HeaderChunks.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/ vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonELFWriters.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonEncodings.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableAtoms.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonLinkingContext.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationFunctions.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonSectionChunks.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Hexagon/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Layout.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/ vendor/lld/dist/lib/ReaderWriter/ELF/Mips/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsCtorsOrderPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsCtorsOrderPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsDynamicTable.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsELFFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsELFFlagsMerger.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsELFFlagsMerger.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsELFReader.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsELFWriters.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsSectionChunks.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Mips/MipsTargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/OrderPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/OutputELFWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Reader.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/SectionChunks.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/SegmentChunks.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/TODO.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/TargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/TargetLayout.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Writer.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/Writer.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/ vendor/lld/dist/lib/ReaderWriter/ELF/X86/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86DynamicLibraryWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86ELFFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86ELFReader.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86ExecutableWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86LinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86LinkingContext.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86RelocationHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86RelocationHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86TargetHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86/X86TargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ExampleSubTarget/ vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ExampleSubTarget/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ExampleSubTarget/ExampleLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ExampleSubTarget/ExampleLinkingContext.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ExampleSubTarget/ExampleTargetHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ExampleSubTarget/ExampleTargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/ExampleSubTarget/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/TODO.rst vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64DynamicLibraryWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64ELFFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64ELFReader.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64ElfType.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64ExecutableWriter.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64LinkingContext.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/ELF/X86_64/X86_64TargetHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/FileArchive.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/LinkerScript.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/Atoms.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/CompactUnwindPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ExecutableAtoms.hpp vendor/lld/dist/lib/ReaderWriter/MachO/File.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/GOTPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/LayoutPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/LayoutPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachOLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/MachOPasses.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/ShimPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/StubsPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/MachO/WriterMachO.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/Native/ vendor/lld/dist/lib/ReaderWriter/Native/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/Native/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/Native/NativeFileFormat.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/Native/ReaderNative.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/Native/WriterNative.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/ vendor/lld/dist/lib/ReaderWriter/PECOFF/Atoms.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/EdataPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/EdataPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/IdataPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/IdataPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/InferSubsystemPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/LoadConfigPass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/LoadConfigPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/OrderPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/PDBPass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/PECOFFLinkingContext.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/Pass.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/Pass.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/WriterImportLibrary.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/WriterImportLibrary.h (contents, props changed) vendor/lld/dist/lib/ReaderWriter/PECOFF/WriterPECOFF.cpp (contents, props changed) vendor/lld/dist/lib/ReaderWriter/YAML/ vendor/lld/dist/lib/ReaderWriter/YAML/CMakeLists.txt (contents, props changed) vendor/lld/dist/lib/ReaderWriter/YAML/Makefile (contents, props changed) vendor/lld/dist/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp (contents, props changed) vendor/lld/dist/test/ vendor/lld/dist/test/CMakeLists.txt (contents, props changed) vendor/lld/dist/test/Driver/ vendor/lld/dist/test/Driver/Inputs/ vendor/lld/dist/test/Driver/Inputs/libtest.a (contents, props changed) vendor/lld/dist/test/Driver/Inputs/usr/ vendor/lld/dist/test/Driver/Inputs/usr/lib/ vendor/lld/dist/test/Driver/Inputs/usr/lib/i386/ vendor/lld/dist/test/Driver/Inputs/usr/lib/i386/libtest.a (contents, props changed) vendor/lld/dist/test/Driver/Inputs/usr/lib/libtest.a (contents, props changed) vendor/lld/dist/test/Driver/def-lib-search.test vendor/lld/dist/test/Driver/flavor-option.test vendor/lld/dist/test/Driver/lib-search.test vendor/lld/dist/test/Driver/so-whole-archive.test vendor/lld/dist/test/Driver/trivial-driver.test vendor/lld/dist/test/Driver/undef-basic.objtxt vendor/lld/dist/test/LinkerScript/ vendor/lld/dist/test/LinkerScript/expr-precedence.test vendor/lld/dist/test/LinkerScript/extern-bad-symbol.test vendor/lld/dist/test/LinkerScript/extern-empty.test vendor/lld/dist/test/LinkerScript/extern-valid.test vendor/lld/dist/test/LinkerScript/incomplete-ternary.test vendor/lld/dist/test/LinkerScript/libname-err-1.test vendor/lld/dist/test/LinkerScript/libname-err-2.test vendor/lld/dist/test/LinkerScript/linker-script-outputformat.test vendor/lld/dist/test/LinkerScript/linker-script.test vendor/lld/dist/test/LinkerScript/memory-empty.test vendor/lld/dist/test/LinkerScript/memory-missing-attrs.test vendor/lld/dist/test/LinkerScript/memory-missing-length.test vendor/lld/dist/test/LinkerScript/memory-missing-name.test vendor/lld/dist/test/LinkerScript/memory-missing-origin.test vendor/lld/dist/test/LinkerScript/memory-valid.test vendor/lld/dist/test/LinkerScript/missing-entry-symbol.test vendor/lld/dist/test/LinkerScript/missing-input-file-name.test vendor/lld/dist/test/LinkerScript/missing-input-sections.test vendor/lld/dist/test/LinkerScript/missing-operand.test vendor/lld/dist/test/LinkerScript/missing-output-section-name.test vendor/lld/dist/test/LinkerScript/missing-symbol.test vendor/lld/dist/test/LinkerScript/sections.test vendor/lld/dist/test/Makefile (contents, props changed) vendor/lld/dist/test/Unit/ vendor/lld/dist/test/Unit/lit.cfg vendor/lld/dist/test/Unit/lit.site.cfg.in (contents, props changed) vendor/lld/dist/test/core/ vendor/lld/dist/test/core/absolute-basic.objtxt vendor/lld/dist/test/core/absolute-local.objtxt vendor/lld/dist/test/core/archive-basic.objtxt vendor/lld/dist/test/core/archive-chain.objtxt vendor/lld/dist/test/core/archive-tentdef-search.objtxt vendor/lld/dist/test/core/associates.objtxt vendor/lld/dist/test/core/auto-hide-coalesce.objtxt vendor/lld/dist/test/core/code-model-attributes.objtxt vendor/lld/dist/test/core/constants-coalesce.objtxt vendor/lld/dist/test/core/cstring-coalesce.objtxt vendor/lld/dist/test/core/custom-section-coalesce.objtxt vendor/lld/dist/test/core/custom-section.objtxt vendor/lld/dist/test/core/dead-strip-attributes.objtxt vendor/lld/dist/test/core/dead-strip-basic.objtxt vendor/lld/dist/test/core/dead-strip-globals.objtxt vendor/lld/dist/test/core/dead-strip-reverse.objtxt vendor/lld/dist/test/core/error-atom-attribute.objtxt vendor/lld/dist/test/core/error-atom-content-byte-value.objtxt vendor/lld/dist/test/core/error-atom-content-bytes.objtxt vendor/lld/dist/test/core/error-atom-type.objtxt vendor/lld/dist/test/core/error-atom-undefined-wrong-attribue.objtxt vendor/lld/dist/test/core/error-duplicate-absolutes.objtxt vendor/lld/dist/test/core/error-file-attribute.objtxt vendor/lld/dist/test/core/error-fixup-attribute.objtxt vendor/lld/dist/test/core/error-fixup-target.objtxt vendor/lld/dist/test/core/fixups-addend.objtxt vendor/lld/dist/test/core/fixups-dup-named.objtxt vendor/lld/dist/test/core/fixups-named.objtxt vendor/lld/dist/test/core/fixups-unnamed.objtxt vendor/lld/dist/test/core/gnulinkonce-rearrange-resolve.objtxt vendor/lld/dist/test/core/gnulinkonce-remaining-undef.objtxt vendor/lld/dist/test/core/gnulinkonce-resolve.objtxt vendor/lld/dist/test/core/gnulinkonce-simple.objtxt vendor/lld/dist/test/core/inline-coalesce.objtxt vendor/lld/dist/test/core/multiple-def-error.objtxt vendor/lld/dist/test/core/permissions.objtxt vendor/lld/dist/test/core/sectiongroup-deadstrip.objtxt vendor/lld/dist/test/core/sectiongroup-gnulinkonce-error.objtxt vendor/lld/dist/test/core/sectiongroup-rearrange-resolve.objtxt vendor/lld/dist/test/core/sectiongroup-remaining-undef.objtxt vendor/lld/dist/test/core/sectiongroup-resolve.objtxt vendor/lld/dist/test/core/sectiongroup-simple.objtxt vendor/lld/dist/test/core/shared-library-basic.objtxt vendor/lld/dist/test/core/shared-library-coalesce.objtxt vendor/lld/dist/test/core/tent-merge.objtxt vendor/lld/dist/test/core/undef-coalesce-error.objtxt vendor/lld/dist/test/core/undef-coalesce.objtxt vendor/lld/dist/test/core/undef-fallback.objtxt vendor/lld/dist/test/core/undef-weak-coalesce.objtxt vendor/lld/dist/test/core/weak-coalesce.objtxt vendor/lld/dist/test/darwin/ vendor/lld/dist/test/darwin/native-and-mach-o.objtxt vendor/lld/dist/test/elf/ vendor/lld/dist/test/elf/AArch64/ vendor/lld/dist/test/elf/AArch64/Inputs/ vendor/lld/dist/test/elf/AArch64/Inputs/fn.c (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/fn.o (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/initfini-option.c (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/initfini-option.o (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/initfini.c (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/initfini.o (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/main.c (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/main.o (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/no-interp-section.c (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/no-interp-section.o (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/zerosizedsection.o (contents, props changed) vendor/lld/dist/test/elf/AArch64/Inputs/zerosizedsection.s (contents, props changed) vendor/lld/dist/test/elf/AArch64/defsym.test vendor/lld/dist/test/elf/AArch64/dontignorezerosize-sections.test vendor/lld/dist/test/elf/AArch64/dynlib-nointerp-section.test vendor/lld/dist/test/elf/AArch64/initfini.test vendor/lld/dist/test/elf/AArch64/rel-abs32-overflow.test vendor/lld/dist/test/elf/AArch64/rel-abs32.test vendor/lld/dist/test/elf/AArch64/rel-abs64.test vendor/lld/dist/test/elf/AArch64/rel-bad.test vendor/lld/dist/test/elf/ARM/ vendor/lld/dist/test/elf/ARM/arm-symbols.test vendor/lld/dist/test/elf/ARM/defsym.test vendor/lld/dist/test/elf/ARM/entry-point.test vendor/lld/dist/test/elf/ARM/missing-symbol.test vendor/lld/dist/test/elf/ARM/rel-abs32.test vendor/lld/dist/test/elf/ARM/rel-arm-call.test vendor/lld/dist/test/elf/ARM/rel-arm-jump24-veneer-b.test vendor/lld/dist/test/elf/ARM/rel-arm-jump24-veneer-bl.test vendor/lld/dist/test/elf/ARM/rel-arm-jump24.test vendor/lld/dist/test/elf/ARM/rel-arm-mov.test vendor/lld/dist/test/elf/ARM/rel-arm-prel31.test vendor/lld/dist/test/elf/ARM/rel-arm-thm-interwork.test vendor/lld/dist/test/elf/ARM/rel-rel32.test vendor/lld/dist/test/elf/ARM/rel-thm-call.test vendor/lld/dist/test/elf/ARM/rel-thm-jump11.test vendor/lld/dist/test/elf/ARM/rel-thm-jump24-veneer.test vendor/lld/dist/test/elf/ARM/rel-thm-jump24.test vendor/lld/dist/test/elf/ARM/rel-thm-mov.test vendor/lld/dist/test/elf/ARM/rel-tls-ie32.test vendor/lld/dist/test/elf/ARM/rel-tls-le32.test vendor/lld/dist/test/elf/ARM/thm-symbols.test vendor/lld/dist/test/elf/ARM/undef-lazy-symbol.test vendor/lld/dist/test/elf/Hexagon/ vendor/lld/dist/test/elf/Hexagon/Inputs/ vendor/lld/dist/test/elf/Hexagon/Inputs/dynobj-data.c (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/dynobj-data.o (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/dynobj.c (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/dynobj.o (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/got-plt-order.c (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/got-plt-order.o (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/libMaxAlignment.a (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/sda-base.o (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/sdata1.c (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/sdata1.o (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/sdata2.c (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/sdata2.o (contents, props changed) vendor/lld/dist/test/elf/Hexagon/Inputs/use-shared.hexagon (contents, props changed) vendor/lld/dist/test/elf/Hexagon/dynlib-data.test vendor/lld/dist/test/elf/Hexagon/dynlib-gotoff.test vendor/lld/dist/test/elf/Hexagon/dynlib-hash.test vendor/lld/dist/test/elf/Hexagon/dynlib-rela.test vendor/lld/dist/test/elf/Hexagon/dynlib-syms.test vendor/lld/dist/test/elf/Hexagon/dynlib.test vendor/lld/dist/test/elf/Hexagon/hexagon-got-plt-order.test vendor/lld/dist/test/elf/Hexagon/hexagon-plt-setup.test vendor/lld/dist/test/elf/Hexagon/maxalignment.test vendor/lld/dist/test/elf/Hexagon/rela-order.test vendor/lld/dist/test/elf/Hexagon/sda-base.test vendor/lld/dist/test/elf/Hexagon/zerofillquick-sdata.test vendor/lld/dist/test/elf/Inputs/ vendor/lld/dist/test/elf/Inputs/abs-test.i386 (contents, props changed) vendor/lld/dist/test/elf/Inputs/bar.o.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/branch-test.hexagon (contents, props changed) vendor/lld/dist/test/elf/Inputs/branch-test.ppc (contents, props changed) vendor/lld/dist/test/elf/Inputs/consecutive-weak-defs.o.yaml vendor/lld/dist/test/elf/Inputs/constants-merge.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/constdata.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/foo.o.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/globalconst.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/globalconst.o.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/gotpcrel.S (contents, props changed) vendor/lld/dist/test/elf/Inputs/gotpcrel.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/group-cmd-search-1.ls vendor/lld/dist/test/elf/Inputs/group-cmd-search-2.ls vendor/lld/dist/test/elf/Inputs/group-cmd-search-3.ls vendor/lld/dist/test/elf/Inputs/ifunc.S (contents, props changed) vendor/lld/dist/test/elf/Inputs/ifunc.cpp (contents, props changed) vendor/lld/dist/test/elf/Inputs/ifunc.cpp.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/ifunc.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/init_array.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/libfnarchive.a (contents, props changed) vendor/lld/dist/test/elf/Inputs/libifunc.x86-64.so (contents, props changed) vendor/lld/dist/test/elf/Inputs/libundef.so (contents, props changed) vendor/lld/dist/test/elf/Inputs/libweaksym.so (contents, props changed) vendor/lld/dist/test/elf/Inputs/main-with-global-def.o.yaml vendor/lld/dist/test/elf/Inputs/mainobj.x86_64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/object-test.elf-hexagon (contents, props changed) vendor/lld/dist/test/elf/Inputs/object-test.elf-i386 (contents, props changed) vendor/lld/dist/test/elf/Inputs/phdr.i386 (contents, props changed) vendor/lld/dist/test/elf/Inputs/quickdata-sort-test.o.elf-hexagon (contents, props changed) vendor/lld/dist/test/elf/Inputs/quickdata-sortcommon-test.o.elf-hexagon (contents, props changed) vendor/lld/dist/test/elf/Inputs/quickdata-test.elf-hexagon (contents, props changed) vendor/lld/dist/test/elf/Inputs/reloc-test.elf-i386 (contents, props changed) vendor/lld/dist/test/elf/Inputs/reloc-xb.x86 (contents, props changed) vendor/lld/dist/test/elf/Inputs/reloc-xt.x86 (contents, props changed) vendor/lld/dist/test/elf/Inputs/relocs-dynamic.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/relocs.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/responsefile vendor/lld/dist/test/elf/Inputs/rodata-test.hexagon (contents, props changed) vendor/lld/dist/test/elf/Inputs/rodata-test.i386 (contents, props changed) vendor/lld/dist/test/elf/Inputs/rodata.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/rodata.o (contents, props changed) vendor/lld/dist/test/elf/Inputs/section-test.i386 (contents, props changed) vendor/lld/dist/test/elf/Inputs/shared.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/shared.so-x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/stripped-empty.x86_64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/target-test.hexagon (contents, props changed) vendor/lld/dist/test/elf/Inputs/target-test.ppc (contents, props changed) vendor/lld/dist/test/elf/Inputs/tls.S (contents, props changed) vendor/lld/dist/test/elf/Inputs/tls.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/tls.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/tlsAddr.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/tlsaddr.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/undef-from-main-so.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/undef-from-main.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/undef-pc32.o (contents, props changed) vendor/lld/dist/test/elf/Inputs/undef.o (contents, props changed) vendor/lld/dist/test/elf/Inputs/undef2-so.o.yaml vendor/lld/dist/test/elf/Inputs/use-shared-32s.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/use-shared-32s.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/use-shared.c (contents, props changed) vendor/lld/dist/test/elf/Inputs/use-shared.x86-64 (contents, props changed) vendor/lld/dist/test/elf/Inputs/weaksym.o (contents, props changed) vendor/lld/dist/test/elf/Inputs/writersyms.o (contents, props changed) vendor/lld/dist/test/elf/Inputs/x86-64-relocs.S (contents, props changed) vendor/lld/dist/test/elf/Mips/ vendor/lld/dist/test/elf/Mips/base-address-64.test vendor/lld/dist/test/elf/Mips/base-address.test vendor/lld/dist/test/elf/Mips/ctors-order.test vendor/lld/dist/test/elf/Mips/dt-textrel-64.test vendor/lld/dist/test/elf/Mips/dt-textrel.test vendor/lld/dist/test/elf/Mips/dynlib-dynamic.test vendor/lld/dist/test/elf/Mips/dynlib-dynsym-micro.test vendor/lld/dist/test/elf/Mips/dynlib-dynsym.test vendor/lld/dist/test/elf/Mips/dynlib-fileheader-64.test vendor/lld/dist/test/elf/Mips/dynlib-fileheader-micro-64.test vendor/lld/dist/test/elf/Mips/dynlib-fileheader-micro.test vendor/lld/dist/test/elf/Mips/dynlib-fileheader.test vendor/lld/dist/test/elf/Mips/dynsym-table-1.test vendor/lld/dist/test/elf/Mips/dynsym-table-2.test vendor/lld/dist/test/elf/Mips/e-flags-merge-1-64.test vendor/lld/dist/test/elf/Mips/e-flags-merge-1.test vendor/lld/dist/test/elf/Mips/e-flags-merge-10.test vendor/lld/dist/test/elf/Mips/e-flags-merge-11.test vendor/lld/dist/test/elf/Mips/e-flags-merge-2-64.test vendor/lld/dist/test/elf/Mips/e-flags-merge-2.test vendor/lld/dist/test/elf/Mips/e-flags-merge-3-64.test vendor/lld/dist/test/elf/Mips/e-flags-merge-3.test vendor/lld/dist/test/elf/Mips/e-flags-merge-4-64.test vendor/lld/dist/test/elf/Mips/e-flags-merge-4.test vendor/lld/dist/test/elf/Mips/e-flags-merge-5-64.test vendor/lld/dist/test/elf/Mips/e-flags-merge-5.test vendor/lld/dist/test/elf/Mips/e-flags-merge-6-64.test vendor/lld/dist/test/elf/Mips/e-flags-merge-6.test vendor/lld/dist/test/elf/Mips/e-flags-merge-7-64.test vendor/lld/dist/test/elf/Mips/e-flags-merge-7.test vendor/lld/dist/test/elf/Mips/e-flags-merge-8.test vendor/lld/dist/test/elf/Mips/e-flags-merge-9.test vendor/lld/dist/test/elf/Mips/entry-name.test vendor/lld/dist/test/elf/Mips/exe-dynamic.test vendor/lld/dist/test/elf/Mips/exe-dynsym-micro.test vendor/lld/dist/test/elf/Mips/exe-dynsym.test vendor/lld/dist/test/elf/Mips/exe-fileheader-64.test vendor/lld/dist/test/elf/Mips/exe-fileheader-micro-64.test vendor/lld/dist/test/elf/Mips/exe-fileheader-micro.test vendor/lld/dist/test/elf/Mips/exe-fileheader.test vendor/lld/dist/test/elf/Mips/exe-got-micro.test vendor/lld/dist/test/elf/Mips/exe-got.test vendor/lld/dist/test/elf/Mips/got-page-32.test vendor/lld/dist/test/elf/Mips/got-page-64.test vendor/lld/dist/test/elf/Mips/got16-2.test vendor/lld/dist/test/elf/Mips/got16-micro.test vendor/lld/dist/test/elf/Mips/got16.test vendor/lld/dist/test/elf/Mips/gotsym.test vendor/lld/dist/test/elf/Mips/gp-sym-1-micro.test vendor/lld/dist/test/elf/Mips/gp-sym-1.test vendor/lld/dist/test/elf/Mips/gp-sym-2.test vendor/lld/dist/test/elf/Mips/hilo16-1.test vendor/lld/dist/test/elf/Mips/hilo16-2.test vendor/lld/dist/test/elf/Mips/hilo16-3.test vendor/lld/dist/test/elf/Mips/hilo16-4.test vendor/lld/dist/test/elf/Mips/hilo16-5.test vendor/lld/dist/test/elf/Mips/hilo16-8-micro.test vendor/lld/dist/test/elf/Mips/hilo16-9-micro.test vendor/lld/dist/test/elf/Mips/initfini-micro.test vendor/lld/dist/test/elf/Mips/interpreter-64.test vendor/lld/dist/test/elf/Mips/interpreter.test vendor/lld/dist/test/elf/Mips/invalid-reginfo.test vendor/lld/dist/test/elf/Mips/jalx-align-err.test vendor/lld/dist/test/elf/Mips/jump-fix-err.test vendor/lld/dist/test/elf/Mips/la25-stub-micro.test vendor/lld/dist/test/elf/Mips/la25-stub.test vendor/lld/dist/test/elf/Mips/mips-options-gp0.test vendor/lld/dist/test/elf/Mips/n64-rel-chain.test vendor/lld/dist/test/elf/Mips/opt-emulation.test vendor/lld/dist/test/elf/Mips/pc23-range.test vendor/lld/dist/test/elf/Mips/plt-entry-mixed-1.test vendor/lld/dist/test/elf/Mips/plt-entry-mixed-2.test vendor/lld/dist/test/elf/Mips/plt-entry-mixed-3.test vendor/lld/dist/test/elf/Mips/plt-entry-mixed-4.test vendor/lld/dist/test/elf/Mips/plt-entry-r6.test vendor/lld/dist/test/elf/Mips/plt-header-micro.test vendor/lld/dist/test/elf/Mips/plt-header-mixed.test vendor/lld/dist/test/elf/Mips/plt-header.test vendor/lld/dist/test/elf/Mips/r26-1-micro.test vendor/lld/dist/test/elf/Mips/r26-1.test vendor/lld/dist/test/elf/Mips/r26-2-micro.test vendor/lld/dist/test/elf/Mips/r26-2.test vendor/lld/dist/test/elf/Mips/rel-32.test vendor/lld/dist/test/elf/Mips/rel-64.test vendor/lld/dist/test/elf/Mips/rel-copy-micro.test vendor/lld/dist/test/elf/Mips/rel-copy-pc.test vendor/lld/dist/test/elf/Mips/rel-copy.test vendor/lld/dist/test/elf/Mips/rel-dynamic-01-micro.test vendor/lld/dist/test/elf/Mips/rel-dynamic-01.test vendor/lld/dist/test/elf/Mips/rel-dynamic-02.test vendor/lld/dist/test/elf/Mips/rel-dynamic-03-micro.test vendor/lld/dist/test/elf/Mips/rel-dynamic-03.test vendor/lld/dist/test/elf/Mips/rel-dynamic-04-micro.test vendor/lld/dist/test/elf/Mips/rel-dynamic-04.test vendor/lld/dist/test/elf/Mips/rel-dynamic-05-micro.test vendor/lld/dist/test/elf/Mips/rel-dynamic-05.test vendor/lld/dist/test/elf/Mips/rel-dynamic-06-64.test vendor/lld/dist/test/elf/Mips/rel-dynamic-06.test vendor/lld/dist/test/elf/Mips/rel-dynamic-07-64.test vendor/lld/dist/test/elf/Mips/rel-dynamic-07.test vendor/lld/dist/test/elf/Mips/rel-dynamic-08-64.test vendor/lld/dist/test/elf/Mips/rel-dynamic-08-micro.test vendor/lld/dist/test/elf/Mips/rel-dynamic-08.test vendor/lld/dist/test/elf/Mips/rel-dynamic-09-micro.test vendor/lld/dist/test/elf/Mips/rel-dynamic-09.test vendor/lld/dist/test/elf/Mips/rel-dynamic-10-micro.test vendor/lld/dist/test/elf/Mips/rel-dynamic-10.test vendor/lld/dist/test/elf/Mips/rel-dynamic-11.test vendor/lld/dist/test/elf/Mips/rel-dynamic-12.test vendor/lld/dist/test/elf/Mips/rel-gprel16.test vendor/lld/dist/test/elf/Mips/rel-gprel32-64.test vendor/lld/dist/test/elf/Mips/rel-gprel32.test vendor/lld/dist/test/elf/Mips/rel-pc-hilo.test vendor/lld/dist/test/elf/Mips/rel-pc18-s3.test vendor/lld/dist/test/elf/Mips/rel-pc19-s2.test vendor/lld/dist/test/elf/Mips/rel-pc21-s2.test vendor/lld/dist/test/elf/Mips/rel-pc26-s2.test vendor/lld/dist/test/elf/Mips/rel-pc32.test vendor/lld/dist/test/elf/Mips/rel-pc7-10-16-23.test vendor/lld/dist/test/elf/Mips/rel-sub.test vendor/lld/dist/test/elf/Mips/st-other.test vendor/lld/dist/test/elf/Mips/tls-1-micro.test vendor/lld/dist/test/elf/Mips/tls-1.test vendor/lld/dist/test/elf/Mips/tls-2-64.test vendor/lld/dist/test/elf/Mips/tls-2-micro.test vendor/lld/dist/test/elf/Mips/tls-2.test vendor/lld/dist/test/elf/Mips/tls-3-micro.test vendor/lld/dist/test/elf/Mips/tls-3.test vendor/lld/dist/test/elf/Mips/tls-4-micro.test vendor/lld/dist/test/elf/Mips/tls-4.test vendor/lld/dist/test/elf/Mips/tls-5-64.test vendor/lld/dist/test/elf/Mips/tls-5-micro.test vendor/lld/dist/test/elf/Mips/tls-5.test vendor/lld/dist/test/elf/X86_64/ vendor/lld/dist/test/elf/X86_64/ExampleTarget/ vendor/lld/dist/test/elf/X86_64/ExampleTarget/triple.test vendor/lld/dist/test/elf/X86_64/Inputs/ vendor/lld/dist/test/elf/X86_64/Inputs/constint.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/constint.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/debug0.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/debug0.x86-64 (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/debug1.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/debug1.x86-64 (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/externtls.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/externtls.x86-64 (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/fn.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/fn.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/generaltls-so.o.yaml vendor/lld/dist/test/elf/X86_64/Inputs/group/ vendor/lld/dist/test/elf/X86_64/Inputs/group/1.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/1.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/fn.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/fn.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/fn1.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/fn1.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/fn2.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/fn2.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/group.sh (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/libfn.a (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/libfn.so (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/libfn1.a (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/group/libfn2.so (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/initfini-option.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/initfini-option.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/initfini.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/initfini.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/largebss.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/largebss.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/ vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/1.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/1.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/2.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/2.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/3.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/3.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/layoutpass/lib2.a (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/libfn.a (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/libfn.so (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/main.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/main.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/multi-ovrd.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/multi-ovrd.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/multi-weak.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/multi-weak.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/multiweaksyms.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/nmagic.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/nmagic.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/no-interp-section.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/no-interp-section.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/note.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/note.s (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/note_ro_rw.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/note_ro_rw.s (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/ovrd.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/ovrd.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/rodata.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/rodata.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/rodata.s (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/rwint.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/rwint.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/sectionmap.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/sectionmap.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/undefcpp.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/undefcpp.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/weak-zero-sized.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/weak.c (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/weak.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/weak.s (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/zerosizedsection.o (contents, props changed) vendor/lld/dist/test/elf/X86_64/Inputs/zerosizedsection.s (contents, props changed) vendor/lld/dist/test/elf/X86_64/alignoffset.test vendor/lld/dist/test/elf/X86_64/debug.test vendor/lld/dist/test/elf/X86_64/defsym.test vendor/lld/dist/test/elf/X86_64/demangle.test vendor/lld/dist/test/elf/X86_64/dontignorezerosize-sections.test vendor/lld/dist/test/elf/X86_64/dynamicvars.test vendor/lld/dist/test/elf/X86_64/dynlib-nointerp-section.test vendor/lld/dist/test/elf/X86_64/dynlib-search.test vendor/lld/dist/test/elf/X86_64/dynsym-weak.test vendor/lld/dist/test/elf/X86_64/extern-tls.test vendor/lld/dist/test/elf/X86_64/general-dynamic-tls.test vendor/lld/dist/test/elf/X86_64/imagebase.test vendor/lld/dist/test/elf/X86_64/initfini-order.test vendor/lld/dist/test/elf/X86_64/initfini.test vendor/lld/dist/test/elf/X86_64/largebss.test vendor/lld/dist/test/elf/X86_64/layoutpass-order.test vendor/lld/dist/test/elf/X86_64/maxpagesize.test vendor/lld/dist/test/elf/X86_64/mergesimilarstrings.test vendor/lld/dist/test/elf/X86_64/multi-weak-layout.test vendor/lld/dist/test/elf/X86_64/multi-weak-override.test vendor/lld/dist/test/elf/X86_64/multi-weak-syms-order.test vendor/lld/dist/test/elf/X86_64/nmagic.test vendor/lld/dist/test/elf/X86_64/noalignsegments.test vendor/lld/dist/test/elf/X86_64/note-sections-ro_plus_rw.test vendor/lld/dist/test/elf/X86_64/note-sections.test vendor/lld/dist/test/elf/X86_64/omagic.test vendor/lld/dist/test/elf/X86_64/outputsegments.test vendor/lld/dist/test/elf/X86_64/reloc_r_x86_64_16.test vendor/lld/dist/test/elf/X86_64/reloc_r_x86_64_pc16.test vendor/lld/dist/test/elf/X86_64/reloc_r_x86_64_pc64.test vendor/lld/dist/test/elf/X86_64/rodata.test vendor/lld/dist/test/elf/X86_64/sectionchoice.test vendor/lld/dist/test/elf/X86_64/sectionmap.test vendor/lld/dist/test/elf/X86_64/startGroupEndGroup.test vendor/lld/dist/test/elf/X86_64/startGroupEndGroupWithDynlib.test vendor/lld/dist/test/elf/X86_64/staticlib-search.test vendor/lld/dist/test/elf/X86_64/undef.test vendor/lld/dist/test/elf/X86_64/underscore-end.test vendor/lld/dist/test/elf/X86_64/weak-override.test vendor/lld/dist/test/elf/X86_64/weak-zero-sized.test vendor/lld/dist/test/elf/X86_64/weaksym.test vendor/lld/dist/test/elf/X86_64/yamlinput.test vendor/lld/dist/test/elf/abs-dup.objtxt vendor/lld/dist/test/elf/abs.test vendor/lld/dist/test/elf/allowduplicates.objtxt vendor/lld/dist/test/elf/archive-elf-forceload.test vendor/lld/dist/test/elf/archive-elf.test vendor/lld/dist/test/elf/as-needed.test vendor/lld/dist/test/elf/branch.test vendor/lld/dist/test/elf/check.test vendor/lld/dist/test/elf/checkrodata.test vendor/lld/dist/test/elf/common.test vendor/lld/dist/test/elf/consecutive-weak-sym-defs.test vendor/lld/dist/test/elf/defsym.objtxt vendor/lld/dist/test/elf/dynamic-segorder.test vendor/lld/dist/test/elf/dynamic-undef.test vendor/lld/dist/test/elf/dynamic.test vendor/lld/dist/test/elf/eh_frame_hdr.test vendor/lld/dist/test/elf/entry.objtxt vendor/lld/dist/test/elf/export-dynamic.test vendor/lld/dist/test/elf/filenotfound.test vendor/lld/dist/test/elf/gnulinkonce/ vendor/lld/dist/test/elf/gnulinkonce/gnulinkonce-report-discarded-reference.test vendor/lld/dist/test/elf/gnulinkonce/gnulinkonce-report-undef.test vendor/lld/dist/test/elf/gnulinkonce/gnulinkonce.test vendor/lld/dist/test/elf/gotpcrel.test vendor/lld/dist/test/elf/gottpoff.test vendor/lld/dist/test/elf/group-cmd-search.test vendor/lld/dist/test/elf/hexagon-quickdata-sort.test vendor/lld/dist/test/elf/hexagon-quickdata-sortcommon.test vendor/lld/dist/test/elf/ifunc.test vendor/lld/dist/test/elf/ignore-unknownoption.test vendor/lld/dist/test/elf/init_array-order.test vendor/lld/dist/test/elf/init_array.test vendor/lld/dist/test/elf/initfini-options.test-1.test vendor/lld/dist/test/elf/initfini-options.test-2.test vendor/lld/dist/test/elf/initfini-options.test-3.test vendor/lld/dist/test/elf/librarynotfound.test vendor/lld/dist/test/elf/linker-as-ld.test vendor/lld/dist/test/elf/linkerscript/ vendor/lld/dist/test/elf/linkerscript/Inputs/ vendor/lld/dist/test/elf/linkerscript/Inputs/externs.ls vendor/lld/dist/test/elf/linkerscript/Inputs/invalid.ls vendor/lld/dist/test/elf/linkerscript/Inputs/prog1.o.yaml vendor/lld/dist/test/elf/linkerscript/Inputs/prog2.o.yaml vendor/lld/dist/test/elf/linkerscript/Inputs/prog3.o.yaml vendor/lld/dist/test/elf/linkerscript/Inputs/simple.o.yaml vendor/lld/dist/test/elf/linkerscript/Inputs/valid.ls vendor/lld/dist/test/elf/linkerscript/externs.objtxt vendor/lld/dist/test/elf/linkerscript/invalid-script-cli-1.test vendor/lld/dist/test/elf/linkerscript/invalid-script-cli-2.test vendor/lld/dist/test/elf/linkerscript/invalid.test vendor/lld/dist/test/elf/linkerscript/sections-order.test vendor/lld/dist/test/elf/linkerscript/sections-with-wildcards.test vendor/lld/dist/test/elf/linkerscript/symbol-definition.test vendor/lld/dist/test/elf/linkerscript/valid-script-cli.objtxt vendor/lld/dist/test/elf/loginputfiles.test vendor/lld/dist/test/elf/mergeatoms.test vendor/lld/dist/test/elf/mergeconstants.test vendor/lld/dist/test/elf/mergeglobalatoms.test vendor/lld/dist/test/elf/note.test vendor/lld/dist/test/elf/options/ vendor/lld/dist/test/elf/options/dynamic-linker.test vendor/lld/dist/test/elf/phdr.test vendor/lld/dist/test/elf/quickdata.test vendor/lld/dist/test/elf/reloc.test vendor/lld/dist/test/elf/responsefile.test vendor/lld/dist/test/elf/rodata.test vendor/lld/dist/test/elf/rosegment.test vendor/lld/dist/test/elf/sectionGroups/ vendor/lld/dist/test/elf/sectionGroups/sectiongroup-new-members.test vendor/lld/dist/test/elf/sectionGroups/sectiongroup-simple.test vendor/lld/dist/test/elf/sectionGroups/sectiongroup-undef-member-other.test vendor/lld/dist/test/elf/sectionGroups/sectiongroup-undef-member.test vendor/lld/dist/test/elf/sectionGroups/sectiongroup-with-globalsymbols.test vendor/lld/dist/test/elf/sectionGroups/sectiongroup-with-undef-external-reference.test vendor/lld/dist/test/elf/sectionGroups/sectiongroup-with-undef-signature.test vendor/lld/dist/test/elf/sections.test vendor/lld/dist/test/elf/sh_addralign.test vendor/lld/dist/test/elf/soname.test vendor/lld/dist/test/elf/strip-all.test vendor/lld/dist/test/elf/stripped-empty.test vendor/lld/dist/test/elf/symbols.test vendor/lld/dist/test/elf/tls.test vendor/lld/dist/test/elf/tlsAddr.test vendor/lld/dist/test/elf/undef-from-dso-to-main.test vendor/lld/dist/test/elf/undef-from-main-dso.test vendor/lld/dist/test/elf/weaksym.test vendor/lld/dist/test/elf/wrap.test vendor/lld/dist/test/elf/x86-64-dynamic-relocs.test vendor/lld/dist/test/elf/x86-64-dynamic.test vendor/lld/dist/test/elf/x86.test vendor/lld/dist/test/elf/x86_64-kinds.test vendor/lld/dist/test/lit.cfg vendor/lld/dist/test/lit.site.cfg.in (contents, props changed) vendor/lld/dist/test/mach-o/ vendor/lld/dist/test/mach-o/Inputs/ vendor/lld/dist/test/mach-o/Inputs/DependencyDump.py (contents, props changed) vendor/lld/dist/test/mach-o/Inputs/bar.yaml vendor/lld/dist/test/mach-o/Inputs/exported_symbols_list.exp vendor/lld/dist/test/mach-o/Inputs/full.filelist vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/ vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/ vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/lib/ vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/lib/libmyshared.dylib (contents, props changed) vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a (contents, props changed) vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/local/ vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/local/lib/ vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o (contents, props changed) vendor/lld/dist/test/mach-o/Inputs/libSystem.yaml vendor/lld/dist/test/mach-o/Inputs/libbar.a (contents, props changed) vendor/lld/dist/test/mach-o/Inputs/libfoo.a (contents, props changed) vendor/lld/dist/test/mach-o/Inputs/order_file-basic.order vendor/lld/dist/test/mach-o/Inputs/partial.filelist vendor/lld/dist/test/mach-o/Inputs/use-dylib-install-names.yaml vendor/lld/dist/test/mach-o/PIE.yaml vendor/lld/dist/test/mach-o/align_text.yaml vendor/lld/dist/test/mach-o/arm-interworking-movw.yaml vendor/lld/dist/test/mach-o/arm-interworking.yaml vendor/lld/dist/test/mach-o/arm-shims.yaml vendor/lld/dist/test/mach-o/arm-subsections-via-symbols.yaml vendor/lld/dist/test/mach-o/cstring-sections.yaml vendor/lld/dist/test/mach-o/data-only-dylib.yaml vendor/lld/dist/test/mach-o/demangle.yaml vendor/lld/dist/test/mach-o/dependency_info.yaml vendor/lld/dist/test/mach-o/dso_handle.yaml vendor/lld/dist/test/mach-o/dylib-exports.yaml vendor/lld/dist/test/mach-o/dylib-install-names.yaml vendor/lld/dist/test/mach-o/exe-offsets.yaml vendor/lld/dist/test/mach-o/exe-segment-overlap.yaml vendor/lld/dist/test/mach-o/exported_symbols_list-dylib.yaml vendor/lld/dist/test/mach-o/exported_symbols_list-obj.yaml vendor/lld/dist/test/mach-o/exported_symbols_list-undef.yaml vendor/lld/dist/test/mach-o/fat-archive.yaml vendor/lld/dist/test/mach-o/filelist.yaml vendor/lld/dist/test/mach-o/force_load-dylib.yaml vendor/lld/dist/test/mach-o/force_load-x86_64.yaml vendor/lld/dist/test/mach-o/framework-user-paths.yaml vendor/lld/dist/test/mach-o/got-order.yaml vendor/lld/dist/test/mach-o/hello-world-arm64.yaml vendor/lld/dist/test/mach-o/hello-world-armv6.yaml vendor/lld/dist/test/mach-o/hello-world-armv7.yaml vendor/lld/dist/test/mach-o/hello-world-x86.yaml vendor/lld/dist/test/mach-o/hello-world-x86_64.yaml vendor/lld/dist/test/mach-o/image-base.yaml vendor/lld/dist/test/mach-o/infer-arch.yaml vendor/lld/dist/test/mach-o/interposing-section.yaml vendor/lld/dist/test/mach-o/keep_private_externs.yaml vendor/lld/dist/test/mach-o/lazy-bind-x86_64.yaml vendor/lld/dist/test/mach-o/lib-search-paths.yaml vendor/lld/dist/test/mach-o/library-order.yaml vendor/lld/dist/test/mach-o/library-rescan.yaml vendor/lld/dist/test/mach-o/libresolve-bizarre-root-override.yaml vendor/lld/dist/test/mach-o/libresolve-multiple-syslibroots.yaml vendor/lld/dist/test/mach-o/libresolve-one-syslibroot.yaml vendor/lld/dist/test/mach-o/libresolve-simple.yaml vendor/lld/dist/test/mach-o/libresolve-user-paths.yaml vendor/lld/dist/test/mach-o/libresolve-z.yaml vendor/lld/dist/test/mach-o/linker-as-ld.yaml vendor/lld/dist/test/mach-o/lit.local.cfg vendor/lld/dist/test/mach-o/mh_bundle_header.yaml vendor/lld/dist/test/mach-o/mh_dylib_header.yaml vendor/lld/dist/test/mach-o/objc_export_list.yaml vendor/lld/dist/test/mach-o/order_file-basic.yaml vendor/lld/dist/test/mach-o/parse-aliases.yaml vendor/lld/dist/test/mach-o/parse-arm-relocs.yaml vendor/lld/dist/test/mach-o/parse-cfstring32.yaml vendor/lld/dist/test/mach-o/parse-cfstring64.yaml vendor/lld/dist/test/mach-o/parse-compact-unwind32.yaml vendor/lld/dist/test/mach-o/parse-compact-unwind64.yaml vendor/lld/dist/test/mach-o/parse-data-in-code-armv7.yaml vendor/lld/dist/test/mach-o/parse-data-in-code-x86.yaml vendor/lld/dist/test/mach-o/parse-data-relocs-arm64.yaml vendor/lld/dist/test/mach-o/parse-data-relocs-x86_64.yaml vendor/lld/dist/test/mach-o/parse-data.yaml vendor/lld/dist/test/mach-o/parse-eh-frame-x86-anon.yaml vendor/lld/dist/test/mach-o/parse-eh-frame-x86-labeled.yaml vendor/lld/dist/test/mach-o/parse-eh-frame.yaml vendor/lld/dist/test/mach-o/parse-function.yaml vendor/lld/dist/test/mach-o/parse-initializers32.yaml vendor/lld/dist/test/mach-o/parse-initializers64.yaml vendor/lld/dist/test/mach-o/parse-literals-error.yaml vendor/lld/dist/test/mach-o/parse-literals.yaml vendor/lld/dist/test/mach-o/parse-non-lazy-pointers.yaml vendor/lld/dist/test/mach-o/parse-relocs-x86.yaml vendor/lld/dist/test/mach-o/parse-section-no-symbol.yaml vendor/lld/dist/test/mach-o/parse-tentative-defs.yaml vendor/lld/dist/test/mach-o/parse-text-relocs-arm64.yaml vendor/lld/dist/test/mach-o/parse-text-relocs-x86_64.yaml vendor/lld/dist/test/mach-o/re-exported-dylib-ordinal.yaml vendor/lld/dist/test/mach-o/rpath.yaml vendor/lld/dist/test/mach-o/sectalign.yaml vendor/lld/dist/test/mach-o/unwind-info-simple-arm64.yaml vendor/lld/dist/test/mach-o/unwind-info-simple-x86_64.yaml vendor/lld/dist/test/mach-o/upward-dylib-load-command.yaml vendor/lld/dist/test/mach-o/upward-dylib-paths.yaml vendor/lld/dist/test/mach-o/usage.yaml vendor/lld/dist/test/mach-o/use-simple-dylib.yaml vendor/lld/dist/test/mach-o/write-final-sections.yaml vendor/lld/dist/test/mach-o/wrong-arch-error.yaml vendor/lld/dist/test/pecoff/ vendor/lld/dist/test/pecoff/Inputs/ vendor/lld/dist/test/pecoff/Inputs/abs.obj.yaml vendor/lld/dist/test/pecoff/Inputs/alignment.obj.yaml vendor/lld/dist/test/pecoff/Inputs/alternatename1.obj.yaml vendor/lld/dist/test/pecoff/Inputs/alternatename2.obj.yaml vendor/lld/dist/test/pecoff/Inputs/alternatename3.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-ImageBase.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-ImageBase.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-addr32-exec.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-addr32-exec.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-addr32.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-addr32.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-blx23t.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-blx23t.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-branch24t.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-branch24t.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-exports.def vendor/lld/dist/test/pecoff/Inputs/armnt-exports.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-import.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-import.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-mov32t-exec.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-mov32t-exec.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-mov32t.obj.yaml vendor/lld/dist/test/pecoff/Inputs/armnt-mov32t.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-obj.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/armnt-obj.yaml vendor/lld/dist/test/pecoff/Inputs/associative1.obj.yaml vendor/lld/dist/test/pecoff/Inputs/associative3.obj.yaml vendor/lld/dist/test/pecoff/Inputs/basereloc.obj.yaml vendor/lld/dist/test/pecoff/Inputs/bss.asm vendor/lld/dist/test/pecoff/Inputs/bss.obj (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/comdat.obj.yaml vendor/lld/dist/test/pecoff/Inputs/common-symbol.obj.yaml vendor/lld/dist/test/pecoff/Inputs/drectve.obj.yaml vendor/lld/dist/test/pecoff/Inputs/drectve2.obj.yaml vendor/lld/dist/test/pecoff/Inputs/drectve3.lib (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/entry.obj.yaml vendor/lld/dist/test/pecoff/Inputs/executable.obj.yaml vendor/lld/dist/test/pecoff/Inputs/executable.s (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/export.obj.yaml vendor/lld/dist/test/pecoff/Inputs/exports.def vendor/lld/dist/test/pecoff/Inputs/exports2.def vendor/lld/dist/test/pecoff/Inputs/grouped-sections.asm vendor/lld/dist/test/pecoff/Inputs/grouped-sections.obj.yaml vendor/lld/dist/test/pecoff/Inputs/hello.asm vendor/lld/dist/test/pecoff/Inputs/hello.obj.yaml vendor/lld/dist/test/pecoff/Inputs/hello64.asm vendor/lld/dist/test/pecoff/Inputs/hello64.obj.yaml vendor/lld/dist/test/pecoff/Inputs/hello64lib.asm vendor/lld/dist/test/pecoff/Inputs/hello64lib.lib (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/imagebase.obj.yaml vendor/lld/dist/test/pecoff/Inputs/library.lib (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/machine-type-unknown.obj.yaml vendor/lld/dist/test/pecoff/Inputs/main.obj.yaml vendor/lld/dist/test/pecoff/Inputs/merge-largest1.obj.yaml vendor/lld/dist/test/pecoff/Inputs/merge-largest2.obj.yaml vendor/lld/dist/test/pecoff/Inputs/merge-same-size1.obj.yaml vendor/lld/dist/test/pecoff/Inputs/merge-same-size2.obj.yaml vendor/lld/dist/test/pecoff/Inputs/merge-same-size3.obj.yaml vendor/lld/dist/test/pecoff/Inputs/nonstandard-sections.obj.yaml vendor/lld/dist/test/pecoff/Inputs/nop.asm vendor/lld/dist/test/pecoff/Inputs/nop.obj.yaml vendor/lld/dist/test/pecoff/Inputs/nop64.obj.yaml vendor/lld/dist/test/pecoff/Inputs/reloc.obj.yaml vendor/lld/dist/test/pecoff/Inputs/reloc64.obj.yaml vendor/lld/dist/test/pecoff/Inputs/resource.rc vendor/lld/dist/test/pecoff/Inputs/resource.res (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/responsefile.txt (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/secrel1.obj.yaml vendor/lld/dist/test/pecoff/Inputs/secrel2.obj.yaml vendor/lld/dist/test/pecoff/Inputs/seh.c (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/seh.obj.yaml vendor/lld/dist/test/pecoff/Inputs/static-data1.obj.yaml vendor/lld/dist/test/pecoff/Inputs/static-data2.obj.yaml vendor/lld/dist/test/pecoff/Inputs/static.lib (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/subsystem.main.yaml vendor/lld/dist/test/pecoff/Inputs/subsystem.winmain.yaml vendor/lld/dist/test/pecoff/Inputs/tlsused.obj.yaml vendor/lld/dist/test/pecoff/Inputs/unknown-drectve.obj.yaml vendor/lld/dist/test/pecoff/Inputs/unwind.obj.yaml vendor/lld/dist/test/pecoff/Inputs/vars-main-x64.obj.yaml vendor/lld/dist/test/pecoff/Inputs/vars-main-x86.obj.yaml vendor/lld/dist/test/pecoff/Inputs/vars-main.c (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/vars.c (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/vars.dll.yaml vendor/lld/dist/test/pecoff/Inputs/vars.lib (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/vars64.lib (contents, props changed) vendor/lld/dist/test/pecoff/Inputs/weak-externals.asm vendor/lld/dist/test/pecoff/Inputs/weak-externals.obj.yaml vendor/lld/dist/test/pecoff/alignment.test vendor/lld/dist/test/pecoff/alternatename.test vendor/lld/dist/test/pecoff/armnt-ImageBase.test vendor/lld/dist/test/pecoff/armnt-addr32-exec.test vendor/lld/dist/test/pecoff/armnt-addr32.test vendor/lld/dist/test/pecoff/armnt-address-of-entry-point.test vendor/lld/dist/test/pecoff/armnt-blx23t.test vendor/lld/dist/test/pecoff/armnt-branch24t.test vendor/lld/dist/test/pecoff/armnt-exports.s (contents, props changed) vendor/lld/dist/test/pecoff/armnt-exports.test vendor/lld/dist/test/pecoff/armnt-imports.test vendor/lld/dist/test/pecoff/armnt-mov32t-exec.test vendor/lld/dist/test/pecoff/armnt-movt32t.test vendor/lld/dist/test/pecoff/armnt.test vendor/lld/dist/test/pecoff/associative.test vendor/lld/dist/test/pecoff/base-reloc.test vendor/lld/dist/test/pecoff/baseaddr.test vendor/lld/dist/test/pecoff/bss-section.test vendor/lld/dist/test/pecoff/comdat.test vendor/lld/dist/test/pecoff/common-symbol.test vendor/lld/dist/test/pecoff/conflicting-machine.test vendor/lld/dist/test/pecoff/delayimport.test vendor/lld/dist/test/pecoff/dll.test vendor/lld/dist/test/pecoff/dosstub.test vendor/lld/dist/test/pecoff/drectve.test vendor/lld/dist/test/pecoff/dynamic.test vendor/lld/dist/test/pecoff/dynamicbase.test vendor/lld/dist/test/pecoff/entry.test vendor/lld/dist/test/pecoff/export-warning.test vendor/lld/dist/test/pecoff/export.test vendor/lld/dist/test/pecoff/exportlib.test vendor/lld/dist/test/pecoff/exportlib2.test vendor/lld/dist/test/pecoff/grouped-sections.test vendor/lld/dist/test/pecoff/hello.test vendor/lld/dist/test/pecoff/hello64.test vendor/lld/dist/test/pecoff/help.test vendor/lld/dist/test/pecoff/imagebase.test vendor/lld/dist/test/pecoff/importlib.test vendor/lld/dist/test/pecoff/include.test vendor/lld/dist/test/pecoff/lib.test vendor/lld/dist/test/pecoff/libarg.test vendor/lld/dist/test/pecoff/localyimported.test vendor/lld/dist/test/pecoff/long-section-name.test vendor/lld/dist/test/pecoff/machinetype.test vendor/lld/dist/test/pecoff/manifest.test vendor/lld/dist/test/pecoff/merge-largest.test vendor/lld/dist/test/pecoff/merge-same-size.test vendor/lld/dist/test/pecoff/multi.test vendor/lld/dist/test/pecoff/noentry.test vendor/lld/dist/test/pecoff/nonstandard-sections.test vendor/lld/dist/test/pecoff/options.test vendor/lld/dist/test/pecoff/pe32plus.test vendor/lld/dist/test/pecoff/reloc.test vendor/lld/dist/test/pecoff/reloc64.test vendor/lld/dist/test/pecoff/resource.test vendor/lld/dist/test/pecoff/responsefile.test vendor/lld/dist/test/pecoff/safeseh.test vendor/lld/dist/test/pecoff/secrel.test vendor/lld/dist/test/pecoff/section-attribute.test vendor/lld/dist/test/pecoff/section-renaming.test vendor/lld/dist/test/pecoff/seh.test vendor/lld/dist/test/pecoff/seh64.test vendor/lld/dist/test/pecoff/subsystem.test vendor/lld/dist/test/pecoff/tls.test vendor/lld/dist/test/pecoff/trivial.test vendor/lld/dist/test/pecoff/unknown-drectve.test vendor/lld/dist/test/pecoff/weak-external.test vendor/lld/dist/tools/ vendor/lld/dist/tools/CMakeLists.txt (contents, props changed) vendor/lld/dist/tools/Makefile (contents, props changed) vendor/lld/dist/tools/linker-script-test/ vendor/lld/dist/tools/linker-script-test/CMakeLists.txt (contents, props changed) vendor/lld/dist/tools/linker-script-test/Makefile (contents, props changed) vendor/lld/dist/tools/linker-script-test/linker-script-test.cpp (contents, props changed) vendor/lld/dist/tools/lld/ vendor/lld/dist/tools/lld/CMakeLists.txt (contents, props changed) vendor/lld/dist/tools/lld/Makefile (contents, props changed) vendor/lld/dist/tools/lld/TODO.txt (contents, props changed) vendor/lld/dist/tools/lld/lld.cpp (contents, props changed) vendor/lld/dist/unittests/ vendor/lld/dist/unittests/CMakeLists.txt (contents, props changed) vendor/lld/dist/unittests/CoreTests/ vendor/lld/dist/unittests/CoreTests/CMakeLists.txt (contents, props changed) vendor/lld/dist/unittests/CoreTests/Makefile (contents, props changed) vendor/lld/dist/unittests/CoreTests/ParallelTest.cpp (contents, props changed) vendor/lld/dist/unittests/CoreTests/RangeTest.cpp (contents, props changed) vendor/lld/dist/unittests/DriverTests/ vendor/lld/dist/unittests/DriverTests/CMakeLists.txt (contents, props changed) vendor/lld/dist/unittests/DriverTests/DarwinLdDriverTest.cpp (contents, props changed) vendor/lld/dist/unittests/DriverTests/DriverTest.h (contents, props changed) vendor/lld/dist/unittests/DriverTests/GnuLdDriverTest.cpp (contents, props changed) vendor/lld/dist/unittests/DriverTests/Makefile (contents, props changed) vendor/lld/dist/unittests/DriverTests/UniversalDriverTest.cpp (contents, props changed) vendor/lld/dist/unittests/DriverTests/WinLinkDriverTest.cpp (contents, props changed) vendor/lld/dist/unittests/DriverTests/WinLinkModuleDefTest.cpp (contents, props changed) vendor/lld/dist/unittests/MachOTests/ vendor/lld/dist/unittests/MachOTests/CMakeLists.txt (contents, props changed) vendor/lld/dist/unittests/MachOTests/MachONormalizedFileBinaryReaderTests.cpp (contents, props changed) vendor/lld/dist/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp (contents, props changed) vendor/lld/dist/unittests/MachOTests/MachONormalizedFileToAtomsTests.cpp (contents, props changed) vendor/lld/dist/unittests/MachOTests/MachONormalizedFileYAMLTests.cpp (contents, props changed) vendor/lld/dist/unittests/MachOTests/empty_obj_x86_armv7.txt (contents, props changed) vendor/lld/dist/unittests/Makefile (contents, props changed) vendor/lld/dist/utils/ vendor/lld/dist/utils/astyle-options vendor/lld/dist/utils/linker-script-test/ vendor/lld/dist/www/ Added: vendor/lld/dist/.arcconfig ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/.arcconfig Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,4 @@ +{ + "project_id" : "lld", + "conduit_uri" : "http://reviews.llvm.org/" +} Added: vendor/lld/dist/.clang-format ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/.clang-format Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1 @@ +BasedOnStyle: LLVM Added: vendor/lld/dist/.gitignore ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/.gitignore Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,24 @@ +#==============================================================================# +# This file specifies intentionally untracked files that git should ignore. +# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html +#==============================================================================# + +#==============================================================================# +# File extensions to be ignored anywhere in the tree. +#==============================================================================# +# Temp files created by most text editors. +*~ +# Merge files created by git. +*.orig +# Byte compiled python modules. +*.pyc +# vim swap files +.*.swp +# Mac OS X Finder layout info +.DS_Store + +#==============================================================================# +# Directories to be ignored. +#==============================================================================# +# Sphinx build files. +docs/_build Added: vendor/lld/dist/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/CMakeLists.txt Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,98 @@ +set(LLD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(LLD_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) + +# Compute the LLD version from the LLVM version. +string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" LLD_VERSION + ${PACKAGE_VERSION}) +message(STATUS "LLD version: ${LLD_VERSION}") + +string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" LLD_VERSION_MAJOR + ${LLD_VERSION}) +string(REGEX REPLACE "[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" LLD_VERSION_MINOR + ${LLD_VERSION}) + +# Determine LLD revision and repository. +# TODO: Figure out a way to get the revision and the repository on windows. +if ( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" ) + execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/GetSourceVersion ${LLD_SOURCE_DIR} + OUTPUT_VARIABLE LLD_REVISION) + + execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/GetRepositoryPath ${LLD_SOURCE_DIR} + OUTPUT_VARIABLE LLD_REPOSITORY) + if ( LLD_REPOSITORY ) + # Replace newline characters with spaces + string(REGEX REPLACE "(\r?\n)+" " " LLD_REPOSITORY ${LLD_REPOSITORY}) + # Remove leading spaces + STRING(REGEX REPLACE "^[ \t\r\n]+" "" LLD_REPOSITORY "${LLD_REPOSITORY}" ) + # Remove trailing spaces + string(REGEX REPLACE "(\ )+$" "" LLD_REPOSITORY ${LLD_REPOSITORY}) + endif() + + if ( LLD_REVISION ) + # Replace newline characters with spaces + string(REGEX REPLACE "(\r?\n)+" " " LLD_REVISION ${LLD_REVISION}) + # Remove leading spaces + STRING(REGEX REPLACE "^[ \t\r\n]+" "" LLD_REVISION "${LLD_REVISION}" ) + # Remove trailing spaces + string(REGEX REPLACE "(\ )+$" "" LLD_REVISION ${LLD_REVISION}) + endif() +endif () + +# Configure the Version.inc file. +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/include/lld/Config/Version.inc.in + ${CMAKE_CURRENT_BINARY_DIR}/include/lld/Config/Version.inc) + + +if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) + message(FATAL_ERROR "In-source builds are not allowed. CMake would overwrite " +"the makefiles distributed with LLVM. Please create a directory and run cmake " +"from there, passing the path to this source directory as the last argument. " +"This process created the file `CMakeCache.txt' and the directory " +"`CMakeFiles'. Please delete them.") +endif() + +list (APPEND CMAKE_MODULE_PATH "${LLD_SOURCE_DIR}/cmake/modules") + +option(LLD_USE_VTUNE + "Enable VTune user task tracking." + OFF) +if (LLD_USE_VTUNE) + find_package(VTune) + if (VTUNE_FOUND) + include_directories(${VTune_INCLUDE_DIRS}) + list(APPEND LLVM_COMMON_LIBS ${VTune_LIBRARIES}) + add_definitions(-DLLD_HAS_VTUNE) + endif() +endif() + + +if (MSVC) + add_definitions(-wd4530) # Suppress 'warning C4530: C++ exception handler used, but unwind semantics are not enabled.' + add_definitions(-wd4062) # Suppress 'warning C4062: enumerator X in switch of enum Y is not handled' from system header. +endif() + +include_directories(BEFORE + ${CMAKE_CURRENT_BINARY_DIR}/include + ${CMAKE_CURRENT_SOURCE_DIR}/include + ) + +if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) + install(DIRECTORY include/ + DESTINATION include + FILES_MATCHING + PATTERN "*.h" + PATTERN ".svn" EXCLUDE + ) +endif() + +add_subdirectory(lib) +add_subdirectory(tools) + +add_subdirectory(test) + +if (LLVM_INCLUDE_TESTS) + add_subdirectory(unittests) +endif() + +add_subdirectory(docs) Added: vendor/lld/dist/LICENSE.TXT ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/LICENSE.TXT Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,62 @@ +============================================================================== +lld License +============================================================================== +University of Illinois/NCSA +Open Source License + +Copyright (c) 2011-2015 by the contributors listed in CREDITS.TXT +All rights reserved. + +Developed by: + + LLVM Team + + University of Illinois at Urbana-Champaign + + http://llvm.org + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. + +============================================================================== +The lld software contains code written by third parties. Such software will +have its own individual LICENSE.TXT file in the directory in which it appears. +This file will describe the copyrights, license, and restrictions which apply +to that code. + +The disclaimer of warranty in the University of Illinois Open Source License +applies to all code in the lld Distribution, and nothing in any of the +other licenses gives permission to use the names of the LLVM Team or the +University of Illinois to endorse or promote products derived from this +Software. + +The following pieces of software have additional or alternate copyrights, +licenses, and/or restrictions: + +Program Directory +------- --------- + Added: vendor/lld/dist/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/Makefile Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,86 @@ +##===- Makefile --------------------------------------------*- Makefile -*-===## +# +# The LLVM Compiler Infrastructure +# +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. +# +##===----------------------------------------------------------------------===## + +# If LLD_LEVEL is not set, then we are the top-level Makefile. Otherwise, we +# are being included from a subdirectory makefile. + +ifndef LLD_LEVEL + +IS_TOP_LEVEL := 1 +LLD_LEVEL := . +DIRS := include lib tools unittests + +PARALLEL_DIRS := + +endif + +ifeq ($(MAKECMDGOALS),libs-only) + DIRS := $(filter-out tools docs, $(DIRS)) + OPTIONAL_DIRS := +endif +ifeq ($(BUILD_LLD_ONLY),YES) + DIRS := $(filter-out docs unittests, $(DIRS)) + OPTIONAL_DIRS := +endif + +### +# Common Makefile code, shared by all lld Makefiles. + +# Set LLVM source root level. +LEVEL := $(LLD_LEVEL)/../.. + +# Include LLVM common makefile. +include $(LEVEL)/Makefile.common + +ifneq ($(ENABLE_DOCS),1) + DIRS := $(filter-out docs, $(DIRS)) +endif + +CPP.Flags += -I$(PROJ_SRC_DIR)/$(LLD_LEVEL)/include +CPP.Flags += -I$(PROJ_OBJ_DIR)/$(LLD_LEVEL)/include + +### +# lld Top Level specific stuff. + +ifeq ($(IS_TOP_LEVEL),1) + +ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) +$(RecursiveTargets):: + $(Verb) for dir in test unittests; do \ + if [ -f $(PROJ_SRC_DIR)/$${dir}/Makefile ] && [ ! -f $${dir}/Makefile ]; then \ + $(MKDIR) $${dir}; \ + $(CP) $(PROJ_SRC_DIR)/$${dir}/Makefile $${dir}/Makefile; \ + fi \ + done +endif + +test:: + @ $(MAKE) -C test + +report:: + @ $(MAKE) -C test report + +clean:: + @ $(MAKE) -C test clean + +libs-only: all + +tags:: + $(Verb) etags `find . -type f -name '*.h' -or -name '*.cpp' | \ + grep -v /lib/Headers | grep -v /test/` + +cscope.files: + find tools lib include -name '*.cpp' \ + -or -name '*.def' \ + -or -name '*.td' \ + -or -name '*.h' > cscope.files + +.PHONY: test report clean cscope.files + +endif Added: vendor/lld/dist/README.md ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/README.md Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,10 @@ + +LLVM Linker (lld) +============================== + +This directory and its subdirectories contain source code for the LLVM Linker, a +modular cross platform linker which is built as part of the LLVM compiler +infrastructure project. + +lld is open source software. You may freely distribute it under the terms of +the license agreement found in LICENSE.txt. Added: vendor/lld/dist/cmake/modules/FindVTune.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/cmake/modules/FindVTune.cmake Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,31 @@ +# - Find VTune ittnotify. +# Defines: +# VTune_FOUND +# VTune_INCLUDE_DIRS +# VTune_LIBRARIES + +set(dirs + "$ENV{VTUNE_AMPLIFIER_XE_2013_DIR}/" + "C:/Program Files (x86)/Intel/VTune Amplifier XE 2013/" + "$ENV{VTUNE_AMPLIFIER_XE_2011_DIR}/" + "C:/Program Files (x86)/Intel/VTune Amplifier XE 2011/" + ) + +find_path(VTune_INCLUDE_DIRS ittnotify.h + PATHS ${dirs} + PATH_SUFFIXES include) + +if (CMAKE_SIZEOF_VOID_P MATCHES "8") + set(vtune_lib_dir lib64) +else() + set(vtune_lib_dir lib32) +endif() + +find_library(VTune_LIBRARIES libittnotify + HINTS "${VTune_INCLUDE_DIRS}/.." + PATHS ${dirs} + PATH_SUFFIXES ${vtune_lib_dir}) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args( + VTune DEFAULT_MSG VTune_LIBRARIES VTune_INCLUDE_DIRS) Added: vendor/lld/dist/docs/C++11.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/C++11.rst Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,9 @@ +C++11 +===== + +Originally, LLD was developed in C++11 unlike the rest of LLVM. Now, all of +LLVM, LLD, and Clang are developed using C++11. See the `LLVM Coding +Standards`_ for details on the precise subset of C++11 supported by the various +host compilers. + +.. _LLVM Coding Standards: http://llvm.org/docs/CodingStandards.html Added: vendor/lld/dist/docs/CMakeLists.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/CMakeLists.txt Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,8 @@ +if (LLVM_ENABLE_SPHINX) + if (SPHINX_FOUND) + include(AddSphinxTarget) + if (${SPHINX_OUTPUT_HTML}) + add_sphinx_target(html lld) + endif() + endif() +endif() Added: vendor/lld/dist/docs/Driver.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/Driver.rst Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,79 @@ +====== +Driver +====== + +.. contents:: + :local: + +Introduction +============ + +This document describes the lld driver. The purpose of this document is to +describe both the motivation and design goals for the driver, as well as details +of the internal implementation. + +Overview +======== + +The lld driver is designed to support a number of different command line +interfaces. The main interfaces we plan to support are binutils' ld, Apple's +ld, and Microsoft's link.exe. + +Flavors +------- + +Each of these different interfaces is referred to as a flavor. There is also an +extra flavor "core" which is used to exercise the core functionality of the +linker it the test suite. + +* gnu +* darwin +* link +* core + +Selecting a Flavor +^^^^^^^^^^^^^^^^^^ + +There are two different ways to tell lld which flavor to be. They are checked in +order, so the second overrides the first. The first is to symlink :program:`lld` +as :program:`lld-{flavor}` or just :program:`{flavor}`. You can also specify +it as the first command line argument using ``-flavor``:: + + $ lld -flavor gnu + +There is a shortcut for ``-flavor core`` as ``-core``. + + +Adding an Option to an existing Flavor +====================================== + +#. Add the option to the desired :file:`lib/Driver/{flavor}Options.td`. + +#. Add to :cpp:class:`lld::FlavorLinkingContext` a getter and setter method + for the option. + +#. Modify :cpp:func:`lld::FlavorDriver::parse` in :file: + `lib/Driver/{Flavor}Driver.cpp` to call the targetInfo setter + for corresponding to the option. + +#. Modify {Flavor}Reader and {Flavor}Writer to use the new targtInfo option. + + +Adding a Flavor +=============== + +#. Add an entry for the flavor in :file:`include/lld/Driver/Driver.h` to + :cpp:class:`lld::UniversalDriver::Flavor`. + +#. Add an entry in :file:`lib/Driver/UniversalDriver.cpp` to + :cpp:func:`lld::Driver::strToFlavor` and + :cpp:func:`lld::UniversalDriver::link`. + This allows the flavor to be selected via symlink and :option:`-flavor`. + +#. Add a tablegen file called :file:`lib/Driver/{flavor}Options.td` that + describes the options. If the options are a superset of another driver, that + driver's td file can simply be included. The :file:`{flavor}Options.td` file + must also be added to :file:`lib/Driver/CMakeLists.txt`. + +#. Add a ``{flavor}Driver`` as a subclass of :cpp:class:`lld::Driver` + in :file:`lib/Driver/{flavor}Driver.cpp`. Added: vendor/lld/dist/docs/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/Makefile Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,155 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +all: html + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + -rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/lld.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/lld.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/lld" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/lld" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." Added: vendor/lld/dist/docs/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/README.txt Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,12 @@ +lld Documentation +================= + +The lld documentation is written using the Sphinx documentation generator. It is +currently tested with Sphinx 1.1.3. + +We currently use the 'nature' theme and a Beaker inspired structure. + +To rebuild documents into html: + + [/lld/docs]> make html + Added: vendor/lld/dist/docs/Readers.rst ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/Readers.rst Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,172 @@ +.. _Readers: + +Developing lld Readers +====================== + +Introduction +------------ + +The purpose of a "Reader" is to take an object file in a particular format +and create an `lld::File`:cpp:class: (which is a graph of Atoms) +representing the object file. A Reader inherits from +`lld::Reader`:cpp:class: which lives in +:file:`include/lld/Core/Reader.h` and +:file:`lib/Core/Reader.cpp`. + +The Reader infrastructure for an object format ``Foo`` requires the +following pieces in order to fit into lld: + +:file:`include/lld/ReaderWriter/ReaderFoo.h` + + .. cpp:class:: ReaderOptionsFoo : public ReaderOptions + + This Options class is the only way to configure how the Reader will + parse any file into an `lld::Reader`:cpp:class: object. This class + should be declared in the `lld`:cpp:class: namespace. + + .. cpp:function:: Reader *createReaderFoo(ReaderOptionsFoo &reader) + + This factory function configures and create the Reader. This function + should be declared in the `lld`:cpp:class: namespace. + +:file:`lib/ReaderWriter/Foo/ReaderFoo.cpp` + + .. cpp:class:: ReaderFoo : public Reader + + This is the concrete Reader class which can be called to parse + object files. It should be declared in an anonymous namespace or + if there is shared code with the `lld::WriterFoo`:cpp:class: you + can make a nested namespace (e.g. `lld::foo`:cpp:class:). + +You may have noticed that :cpp:class:`ReaderFoo` is not declared in the +``.h`` file. An important design aspect of lld is that all Readers are +created *only* through an object-format-specific +:cpp:func:`createReaderFoo` factory function. The creation of the Reader is +parametrized through a :cpp:class:`ReaderOptionsFoo` class. This options +class is the one-and-only way to control how the Reader operates when +parsing an input file into an Atom graph. For instance, you may want the +Reader to only accept certain architectures. The options class can be +instantiated from command line options or be programmatically configured. + +Where to start +-------------- + +The lld project already has a skeleton of source code for Readers for +``ELF``, ``PECOFF``, ``MachO``, and lld's native Atom graph format +(both binary ``Native`` and ``YAML`` representations). If your file format +is a variant of one of those, you should modify the existing Reader to +support your variant. This is done by customizing the Options +class for the Reader and making appropriate changes to the ``.cpp`` file to +interpret those options and act accordingly. + +If your object file format is not a variant of any existing Reader, you'll need +to create a new Reader subclass with the organization described above. + +Readers are factories +--------------------- + +The linker will usually only instantiate your Reader once. That one Reader will +have its loadFile() method called many times with different input files. +To support multithreaded linking, the Reader may be parsing multiple input +files in parallel. Therefore, there should be no parsing state in you Reader +object. Any parsing state should be in ivars of your File subclass or in +some temporary object. + +The key method to implement in a reader is:: + + virtual error_code loadFile(LinkerInput &input, + std::vector> &result); + +It takes a memory buffer (which contains the contents of the object file +being read) and returns an instantiated lld::File object which is +a collection of Atoms. The result is a vector of File pointers (instead of +simple a File pointer) because some file formats allow multiple object +"files" to be encoded in one file system file. + + +Memory Ownership +---------------- + +Atoms are always owned by their File object. During core linking when Atoms +are coalesced or stripped away, core linking does not delete them. +Core linking just removes those unused Atoms from its internal list. +The destructor of a File object is responsible for deleting all Atoms it +owns, and if ownership of the MemoryBuffer was passed to it, the File +destructor needs to delete that too. + +Making Atoms +------------ + +The internal model of lld is purely Atom based. But most object files do not +have an explicit concept of Atoms, instead most have "sections". The way +to think of this is that a section is just a list of Atoms with common +attributes. + +The first step in parsing section-based object files is to cleave each +section into a list of Atoms. The technique may vary by section type. For +code sections (e.g. .text), there are usually symbols at the start of each +function. Those symbol addresses are the points at which the section is +cleaved into discrete Atoms. Some file formats (like ELF) also include the +length of each symbol in the symbol table. Otherwise, the length of each +Atom is calculated to run to the start of the next symbol or the end of the +section. + +Other sections types can be implicitly cleaved. For instance c-string literals +or unwind info (e.g. .eh_frame) can be cleaved by having the Reader look at +the content of the section. It is important to cleave sections into Atoms +to remove false dependencies. For instance the .eh_frame section often +has no symbols, but contains "pointers" to the functions for which it +has unwind info. If the .eh_frame section was not cleaved (but left as one +big Atom), there would always be a reference (from the eh_frame Atom) to +each function. So the linker would be unable to coalesce or dead stripped +away the function atoms. + +The lld Atom model also requires that a reference to an undefined symbol be +modeled as a Reference to an UndefinedAtom. So the Reader also needs to +create an UndefinedAtom for each undefined symbol in the object file. + +Once all Atoms have been created, the second step is to create References +(recall that Atoms are "nodes" and References are "edges"). Most References +are created by looking at the "relocation records" in the object file. If +a function contains a call to "malloc", there is usually a relocation record +specifying the address in the section and the symbol table index. Your +Reader will need to convert the address to an Atom and offset and the symbol +table index into a target Atom. If "malloc" is not defined in the object file, +the target Atom of the Reference will be an UndefinedAtom. + + +Performance +----------- +Once you have the above working to parse an object file into Atoms and +References, you'll want to look at performance. Some techniques that can +help performance are: + +* Use llvm::BumpPtrAllocator or pre-allocate one big vector and then + just have each atom point to its subrange of References in that vector. + This can be faster that allocating each Reference as separate object. +* Pre-scan the symbol table and determine how many atoms are in each section + then allocate space for all the Atom objects at once. +* Don't copy symbol names or section content to each Atom, instead use + StringRef and ArrayRef in each Atom to point to its name and content in the + MemoryBuffer. + + +Testing +------- + +We are still working on infrastructure to test Readers. The issue is that +you don't want to check in binary files to the test suite. And the tools +for creating your object file from assembly source may not be available on +every OS. + +We are investigating a way to use YAML to describe the section, symbols, +and content of a file. Then have some code which will write out an object +file from that YAML description. + +Once that is in place, you can write test cases that contain section/symbols +YAML and is run through the linker to produce Atom/References based YAML which +is then run through FileCheck to verify the Atoms and References are as +expected. + + + Added: vendor/lld/dist/docs/_static/favicon.ico ============================================================================== Binary file. No diff available. Added: vendor/lld/dist/docs/_templates/indexsidebar.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/_templates/indexsidebar.html Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,4 @@ +

Bugs

+ +

lld bugs should be reported at the + LLVM Bugzilla.

Added: vendor/lld/dist/docs/_templates/layout.html ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/_templates/layout.html Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,12 @@ +{% extends "!layout.html" %} + +{% block extrahead %} + +{% endblock %} + +{% block rootrellink %} +
  • lld Home | 
  • +{% endblock %} Added: vendor/lld/dist/docs/conf.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/lld/dist/docs/conf.py Tue Mar 24 21:31:36 2015 (r280461) @@ -0,0 +1,254 @@ +# -*- coding: utf-8 -*- +# +# lld documentation build configuration file. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'lld' +copyright = u'2011-2014, LLVM Project' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '3.2' +# The full version, including alpha/beta/rc tags. +release = '3.2' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +today_fmt = '%Y-%m-%d' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = True + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'friendly' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'llvm-theme' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +html_theme_path = ["."] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# If given, this must be the name of an image file (path relative to the +# configuration directory) that is the favicon of the docs. Modern browsers use +# this as icon for tabs, windows and bookmarks. It should be a Windows-style +# icon file (.ico), which is 16x16 or 32x32 pixels large. Default: None. The +# image file will be copied to the _static directory of the output HTML, but +# only if the file does not already exist there. +html_favicon = '_static/favicon.ico' + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%Y-%m-%d' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +html_sidebars = {'index': 'indexsidebar.html'} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +# html_additional_pages = {'index': 'index.html'} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'llddoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 21:32:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6CCAAB51; Tue, 24 Mar 2015 21:32:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41AD3BF4; Tue, 24 Mar 2015 21:32:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OLWo4V014012; Tue, 24 Mar 2015 21:32:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OLWo7G014011; Tue, 24 Mar 2015 21:32:50 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503242132.t2OLWo7G014011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 24 Mar 2015 21:32:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r280462 - vendor/lld/lld-trunk-r233088 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 21:32:50 -0000 Author: dim Date: Tue Mar 24 21:32:49 2015 New Revision: 280462 URL: https://svnweb.freebsd.org/changeset/base/280462 Log: Tag lld trunk r233088. Added: vendor/lld/lld-trunk-r233088/ - copied from r280461, vendor/lld/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 21:42:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C0EA193; Tue, 24 Mar 2015 21:42:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38BF4CFF; Tue, 24 Mar 2015 21:42:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OLgTGF019270; Tue, 24 Mar 2015 21:42:29 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OLgT4b019269; Tue, 24 Mar 2015 21:42:29 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503242142.t2OLgT4b019269@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Tue, 24 Mar 2015 21:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280463 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 21:42:29 -0000 Author: ken Date: Tue Mar 24 21:42:28 2015 New Revision: 280463 URL: https://svnweb.freebsd.org/changeset/base/280463 Log: Remove some #if 0'ed code that apparently confuses cscope. Requested by: Peter Xu MFC after: 3 days Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Mar 24 21:32:49 2015 (r280462) +++ head/sys/cam/ctl/ctl.c Tue Mar 24 21:42:28 2015 (r280463) @@ -12152,9 +12152,6 @@ ctl_lun_reset(struct ctl_lun *lun, union /* * Run through the OOA queue and abort each I/O. */ -#if 0 - TAILQ_FOREACH((struct ctl_io_hdr *)xio, &lun->ooa_queue, ooa_links) { -#endif for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { xio->io_hdr.flags |= CTL_FLAG_ABORT | CTL_FLAG_ABORT_STATUS; @@ -12335,9 +12332,6 @@ ctl_abort_task(union ctl_io *io) * untagged command to abort, simply abort the first untagged command * we come to. We only allow one untagged command at a time of course. */ -#if 0 - TAILQ_FOREACH((struct ctl_io_hdr *)xio, &lun->ooa_queue, ooa_links) { -#endif for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { #if 0 @@ -12375,7 +12369,7 @@ ctl_abort_task(union ctl_io *io) #if 0 if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED) && (io->taskio.tag_type == CTL_TAG_UNTAGGED)) - || (xio->scsiio.tag_num == io->taskio.tag_num)) { + || (xio->scsiio.tag_num == io->taskio.tag_num)) #endif /* * XXX KDM we've got problems with FC, because it From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 22:39:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97324FBF; Tue, 24 Mar 2015 22:39:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83C0A32F; Tue, 24 Mar 2015 22:39:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OMdocv045823; Tue, 24 Mar 2015 22:39:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OMdoC9045822; Tue, 24 Mar 2015 22:39:50 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503242239.t2OMdoC9045822@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 22:39:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280475 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 22:39:50 -0000 Author: ngie Date: Tue Mar 24 22:39:49 2015 New Revision: 280475 URL: https://svnweb.freebsd.org/changeset/base/280475 Log: The number of commands added when ddb(4) is enabled is 3, not 2 MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/share/man/man4/witness.4 Modified: head/share/man/man4/witness.4 ============================================================================== --- head/share/man/man4/witness.4 Tue Mar 24 22:39:18 2015 (r280474) +++ head/share/man/man4/witness.4 Tue Mar 24 22:39:49 2015 (r280475) @@ -127,7 +127,7 @@ can be set via .Pp The .Nm -code also provides two extra +code also provides three extra .Xr ddb 4 commands if both .Nm From owner-svn-src-all@FreeBSD.ORG Tue Mar 24 22:40:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0429184; Tue, 24 Mar 2015 22:40:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCF93337; Tue, 24 Mar 2015 22:40:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2OMeHLf046477; Tue, 24 Mar 2015 22:40:17 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2OMeHt0046476; Tue, 24 Mar 2015 22:40:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201503242240.t2OMeHt0046476@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 24 Mar 2015 22:40:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280476 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 22:40:18 -0000 Author: ngie Date: Tue Mar 24 22:40:16 2015 New Revision: 280476 URL: https://svnweb.freebsd.org/changeset/base/280476 Log: Bump .Dd Modified: head/share/man/man4/witness.4 Modified: head/share/man/man4/witness.4 ============================================================================== --- head/share/man/man4/witness.4 Tue Mar 24 22:39:49 2015 (r280475) +++ head/share/man/man4/witness.4 Tue Mar 24 22:40:16 2015 (r280476) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2015 +.Dd March 24, 2015 .Dt WITNESS 4 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 04:58:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FD42145 for ; Wed, 25 Mar 2015 04:58:39 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 656C8123 for ; Wed, 25 Mar 2015 04:58:39 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P4wd7m037377 for ; Wed, 25 Mar 2015 04:58:39 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2P4wdi1037375 for svn-src-all@freebsd.org; Wed, 25 Mar 2015 04:58:39 GMT (envelope-from bdrewery) Received: (qmail 33390 invoked from network); 24 Mar 2015 23:58:35 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 24 Mar 2015 23:58:35 -0500 Message-ID: <5512407E.2040505@FreeBSD.org> Date: Tue, 24 Mar 2015 23:58:38 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r279361 - in head: sys/kern sys/sys usr.sbin/jail References: <201502271628.t1RGSurE067472@svn.freebsd.org> In-Reply-To: <201502271628.t1RGSurE067472@svn.freebsd.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qE6JkqtRN8MjIF9cfEAN008M9AEr40GR2" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 04:58:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qE6JkqtRN8MjIF9cfEAN008M9AEr40GR2 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2/27/2015 10:28 AM, Ian Lepore wrote: > Author: ian > Date: Fri Feb 27 16:28:55 2015 > New Revision: 279361 > URL: https://svnweb.freebsd.org/changeset/base/279361 >=20 > Log: > Allow the kern.osrelease and kern.osreldate sysctl values to be set i= n a > jail's creation parameters. This allows the kernel version to be rel= iably For package building we very much need to be able to override hw.ncpu, hw.physmem and kern.smp.cpus. Too many ports spy on those rather than using the values we pass in the environment. Java ports have this issue. We set a ulimit on the jail and Java sees there is 96GB of RAM on the system and tries to allocate a very large portion of it and fails. Hence we cannot run package builds with any sort of memory limits. Ports disrespecting the MAKE_JOBS_NUMBER we assign to them will no longer be an issue if we can spoof hw.ncpu/kern.smp.cpus as well. Bonus points for allowing these to be changed on-demand. We may setup a jail and want to change how much memory or CPUs it is allowed depending on what is going to be built next. I had been planning to look at this eventually but if someone beats me to it that would be great! --=20 Regards, Bryan Drewery --qE6JkqtRN8MjIF9cfEAN008M9AEr40GR2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVEkB+AAoJEDXXcbtuRpfPZLQH/3d2oxN3l6sTsg4hPAwlo+f4 IIf42iWq3t0LK2C/W2xAzDRuOxZP8VyX527njF3yxxkbJu1jHZSBnis7swKwscfl ch8FyT/XdFuVFn6VxXd3md5NH20V8XfbfCBA2ovIRgETML/uFkf6LkvSuy2A1Gsr xHij2u7rKTH0jgR2CuclMevjcXeBVf3RS/ax6q357GMpCIy0MOYuGcOYVQ/Q251M liKkYR2EmR0CWqZhiQVo48MSM090pZ9HsQwk+dYCD94iBwcy60RwSdKZ3a0aRk6a ud9dcKNwb/KLu0/juXcrxP3j2/e1zx3S8AaGL4y6ekfcmAOF8AEmps9kBkx6eDw= =wDDi -----END PGP SIGNATURE----- --qE6JkqtRN8MjIF9cfEAN008M9AEr40GR2-- From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 08:23:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED80739F; Wed, 25 Mar 2015 08:23:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE3F2853; Wed, 25 Mar 2015 08:23:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P8N9hk023518; Wed, 25 Mar 2015 08:23:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P8N9QP023517; Wed, 25 Mar 2015 08:23:09 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503250823.t2P8N9QP023517@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 25 Mar 2015 08:23:09 +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: r280494 - stable/10/tools/regression/sysvshm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 08:23:10 -0000 Author: kib Date: Wed Mar 25 08:23:08 2015 New Revision: 280494 URL: https://svnweb.freebsd.org/changeset/base/280494 Log: MFC r280232: Cosmetics. Modified: stable/10/tools/regression/sysvshm/shmtest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/tools/regression/sysvshm/shmtest.c ============================================================================== --- stable/10/tools/regression/sysvshm/shmtest.c Wed Mar 25 06:41:08 2015 (r280493) +++ stable/10/tools/regression/sysvshm/shmtest.c Wed Mar 25 08:23:08 2015 (r280494) @@ -49,27 +49,22 @@ #include #include -int main __P((int, char *[])); -void print_shmid_ds __P((struct shmid_ds *, mode_t)); -void sigsys_handler __P((int)); -void sigchld_handler __P((int)); -void cleanup __P((void)); -void receiver __P((void)); -void usage __P((void)); - -const char *m_str = "The quick brown fox jumped over the lazy dog."; - -int sender_shmid = -1; -pid_t child_pid; - -key_t shmkey; - -size_t pgsize; +static void print_shmid_ds(struct shmid_ds *, mode_t); +static void sigsys_handler(int); +static void sigchld_handler(int); +static void cleanup(void); +static void receiver(void); +static void usage(void); + +static const char *m_str = "The quick brown fox jumped over the lazy dog."; + +static int sender_shmid = -1; +static pid_t child_pid; +static key_t shmkey; +static size_t pgsize; int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { struct sigaction sa; struct shmid_ds s_ds; @@ -172,17 +167,15 @@ main(argc, argv) errx(1, "sender: received unexpected signal"); } -void -sigsys_handler(signo) - int signo; +static void +sigsys_handler(int signo __unused) { errx(1, "System V Shared Memory support is not present in the kernel"); } -void -sigchld_handler(signo) - int signo; +static void +sigchld_handler(int signo __unused) { struct shmid_ds s_ds; int cstatus; @@ -214,8 +207,8 @@ sigchld_handler(signo) exit(0); } -void -cleanup() +static void +cleanup(void) { /* @@ -227,10 +220,8 @@ cleanup() } } -void -print_shmid_ds(sp, mode) - struct shmid_ds *sp; - mode_t mode; +static void +print_shmid_ds(struct shmid_ds *sp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -262,16 +253,16 @@ print_shmid_ds(sp, mode) errx(1, "mode mismatch"); } -void -usage() +static void +usage(void) { fprintf(stderr, "usage: %s keypath\n", getprogname()); exit(1); } -void -receiver() +static void +receiver(void) { int shmid; void *shm_buf; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 08:55:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 635C99EB; Wed, 25 Mar 2015 08:55:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E20DB88; Wed, 25 Mar 2015 08:55:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P8tZth038468; Wed, 25 Mar 2015 08:55:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P8tZFp038467; Wed, 25 Mar 2015 08:55:35 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503250855.t2P8tZFp038467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 08:55:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280495 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 08:55:35 -0000 Author: hselasky Date: Wed Mar 25 08:55:34 2015 New Revision: 280495 URL: https://svnweb.freebsd.org/changeset/base/280495 Log: Implement a simple OID number garbage collector. Given the increasing number of dynamically created and destroyed SYSCTLs during runtime it is very likely that the current new OID number limit of 0x7fffffff can be reached. Especially if dynamic OID creation and destruction results from automatic tests. Additional changes: - Optimize the typical use case by decrementing the next automatic OID sequence number instead of incrementing it. This saves searching time when inserting new OIDs into a fresh parent OID node. - Add simple check for duplicate non-automatic OID numbers. MFC after: 1 week Modified: head/sys/kern/kern_sysctl.c Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Wed Mar 25 08:23:08 2015 (r280494) +++ head/sys/kern/kern_sysctl.c Wed Mar 25 08:55:34 2015 (r280495) @@ -296,6 +296,8 @@ sysctl_register_oid(struct sysctl_oid *o struct sysctl_oid_list *parent = oidp->oid_parent; struct sysctl_oid *p; struct sysctl_oid *q; + int oid_number; + int timeout = 2; /* * First check if another oid with the same name already @@ -312,37 +314,66 @@ sysctl_register_oid(struct sysctl_oid *o return; } } + /* get current OID number */ + oid_number = oidp->oid_number; + +#if (OID_AUTO >= 0) +#error "OID_AUTO is expected to be a negative value" +#endif /* - * If this oid has a number OID_AUTO, give it a number which - * is greater than any current oid. + * Any negative OID number qualifies as OID_AUTO. Valid OID + * numbers should always be positive. + * * NOTE: DO NOT change the starting value here, change it in * , and make sure it is at least 256 to * accomodate e.g. net.inet.raw as a static sysctl node. */ - if (oidp->oid_number == OID_AUTO) { - static int newoid = CTL_AUTO_START; + if (oid_number < 0) { + static int newoid; + + /* + * By decrementing the next OID number we spend less + * time inserting the OIDs into a sorted list. + */ + if (--newoid < CTL_AUTO_START) + newoid = 0x7fffffff; - oidp->oid_number = newoid++; - if (newoid == 0x7fffffff) - panic("out of oids"); - } -#if 0 - else if (oidp->oid_number >= CTL_AUTO_START) { - /* do not panic; this happens when unregistering sysctl sets */ - printf("static sysctl oid too high: %d", oidp->oid_number); + oid_number = newoid; } -#endif /* - * Insert the oid into the parent's list in order. + * Insert the OID into the parent's list sorted by OID number. */ +retry: q = NULL; SLIST_FOREACH(p, parent, oid_link) { - if (oidp->oid_number < p->oid_number) + /* check if the current OID number is in use */ + if (oid_number == p->oid_number) { + /* get the next valid OID number */ + if (oid_number < CTL_AUTO_START || + oid_number == 0x7fffffff) { + /* wraparound - restart */ + oid_number = CTL_AUTO_START; + /* don't loop forever */ + if (!timeout--) + panic("sysctl: Out of OID numbers\n"); + goto retry; + } else { + oid_number++; + } + } else if (oid_number < p->oid_number) break; q = p; } - if (q) + /* check for non-auto OID number collision */ + if (oidp->oid_number >= 0 && oidp->oid_number < CTL_AUTO_START && + oid_number >= CTL_AUTO_START) { + printf("sysctl: OID number(%d) is already in use for '%s'\n", + oidp->oid_number, oidp->oid_name); + } + /* update the OID number, if any */ + oidp->oid_number = oid_number; + if (q != NULL) SLIST_INSERT_AFTER(q, oidp, oid_link); else SLIST_INSERT_HEAD(parent, oidp, oid_link); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 09:40:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25A593B8; Wed, 25 Mar 2015 09:40:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0FF31F99; Wed, 25 Mar 2015 09:40:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P9emG7059804; Wed, 25 Mar 2015 09:40:48 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P9em1G059803; Wed, 25 Mar 2015 09:40:48 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503250940.t2P9em1G059803@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 09:40:48 +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: r280496 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 09:40:49 -0000 Author: arybchik Date: Wed Mar 25 09:40:48 2015 New Revision: 280496 URL: https://svnweb.freebsd.org/changeset/base/280496 Log: MFC: 263297 Return error when packet is dropped because of link down. Submitted by: Boris Misenov Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 08:55:34 2015 (r280495) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:40:48 2015 (r280496) @@ -604,7 +604,7 @@ sfxge_if_transmit(struct ifnet *ifp, str if (!SFXGE_LINK_UP(sc)) { m_freem(m); - return (0); + return (ENETDOWN); } /* Pick the desired transmit queue. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 09:45:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7DB1B612; Wed, 25 Mar 2015 09:45:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E011C4; Wed, 25 Mar 2015 09:45:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P9j9Gm062913; Wed, 25 Mar 2015 09:45:09 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P9j8wQ062908; Wed, 25 Mar 2015 09:45:08 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503250945.t2P9j8wQ062908@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 09:45: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: r280497 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 09:45:09 -0000 Author: arybchik Date: Wed Mar 25 09:45:07 2015 New Revision: 280497 URL: https://svnweb.freebsd.org/changeset/base/280497 Log: MFC: 263332 Add counter for Tx errors returned from if_transmit. Submitted by: Boris Misenov Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:40:48 2015 (r280496) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:45:07 2015 (r280497) @@ -515,6 +515,11 @@ sfxge_tx_packet_add(struct sfxge_txq *tx int locked; int rc; + if (!SFXGE_LINK_UP(txq->sc)) { + rc = ENETDOWN; + goto fail; + } + /* * Try to grab the txq lock. If we are able to get the lock, * the packet will be appended to the "get list" of the deferred @@ -552,6 +557,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx fail: m_freem(m); + atomic_add_long(&txq->early_drops, 1); return (rc); } @@ -602,11 +608,6 @@ sfxge_if_transmit(struct ifnet *ifp, str KASSERT(ifp->if_flags & IFF_UP, ("interface not up")); - if (!SFXGE_LINK_UP(sc)) { - m_freem(m); - return (ENETDOWN); - } - /* Pick the desired transmit queue. */ if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) { int index = 0; @@ -1406,6 +1407,7 @@ static const struct { SFXGE_TX_STAT(tso_long_headers, tso_long_headers), SFXGE_TX_STAT(tx_collapses, collapses), SFXGE_TX_STAT(tx_drops, drops), + SFXGE_TX_STAT(tx_early_drops, early_drops), }; static int Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:40:48 2015 (r280496) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:45:07 2015 (r280497) @@ -159,6 +159,7 @@ struct sfxge_txq { unsigned long tso_long_headers; unsigned long collapses; unsigned long drops; + unsigned long early_drops; /* The following fields change more often, and are used mostly * on the completion path From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 09:54:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AFA486D; Wed, 25 Mar 2015 09:54:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2590C1C3; Wed, 25 Mar 2015 09:54:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P9s7gW067445; Wed, 25 Mar 2015 09:54:07 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P9s7fg067444; Wed, 25 Mar 2015 09:54:07 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201503250954.t2P9s7fg067444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Wed, 25 Mar 2015 09:54: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: r280498 - stable/10/share/man/man9 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 09:54:08 -0000 Author: dchagin Date: Wed Mar 25 09:54:07 2015 New Revision: 280498 URL: https://svnweb.freebsd.org/changeset/base/280498 Log: MFC r279776: Add a cred parameter to the VOP_VPTOCNP(9) manpage. While here fix igor warning about new line. Modified: stable/10/share/man/man9/VOP_VPTOCNP.9 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man9/VOP_VPTOCNP.9 ============================================================================== --- stable/10/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:45:07 2015 (r280497) +++ stable/10/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:54:07 2015 (r280498) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2011 +.Dd March 8, 2015 .Dt VOP_VPTOCNP 9 .Os .Sh NAME @@ -36,9 +36,10 @@ .Nd translate a vnode to its component name .Sh SYNOPSIS .In sys/param.h +.In sys/ucred.h .In sys/vnode.h .Ft int -.Fn VOP_VPTOCNP "struct vnode *vp" "struct vnode **dvp" "char *buf" "int *buflen" +.Fn VOP_VPTOCNP "struct vnode *vp" "struct vnode **dvp" "struct ucred *cred" "char *buf" "int *buflen" .Sh DESCRIPTION This translates a vnode into its component name, and writes that name to the head of the buffer specified by @@ -49,6 +50,8 @@ The vnode to translate. .It Fa dvp The vnode of the parent directory of .Fa vp . +.It Fa cred +The caller credentials. .It Fa buf The buffer into which to prepend the component name. .It Fa buflen @@ -59,7 +62,8 @@ The default implementation of .Nm scans through .Fa vp Ns 's -parent directory looking for a dirent with a matching file number. If +parent directory looking for a dirent with a matching file number. +If .Fa vp is not a directory, then .Nm From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 09:56:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26AE7AA1; Wed, 25 Mar 2015 09:56:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED4CE1DF; Wed, 25 Mar 2015 09:56:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P9un0r067866; Wed, 25 Mar 2015 09:56:49 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P9un7g067862; Wed, 25 Mar 2015 09:56:49 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503250956.t2P9un7g067862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 09:56:49 +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: r280499 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 09:56:50 -0000 Author: arybchik Date: Wed Mar 25 09:56:48 2015 New Revision: 280499 URL: https://svnweb.freebsd.org/changeset/base/280499 Log: MFC: 263649 sfxge: limit software Tx queue size. Previous implementation limits put queue size only (when Tx lock can't be acquired), but get queue may grow unboundedly which results in mbuf pools exhaustion and latency growth. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:54:07 2015 (r280498) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:56:48 2015 (r280499) @@ -476,6 +476,9 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); + if (stdp->std_count >= SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + return (ENOBUFS); + *(stdp->std_getp) = mbuf; stdp->std_getp = &mbuf->m_nextpkt; stdp->std_count++; @@ -495,8 +498,8 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, old_len = mp->m_pkthdr.csum_data; } else old_len = 0; - if (old_len >= SFXGE_TX_MAX_DEFERRED) - return ENOBUFS; + if (old_len >= SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT) + return (ENOBUFS); mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; } while (atomic_cmpset_ptr(putp, old, new) == 0); @@ -527,12 +530,9 @@ sfxge_tx_packet_add(struct sfxge_txq *tx */ locked = mtx_trylock(&txq->lock); - /* - * Can only fail if we weren't able to get the lock. - */ if (sfxge_tx_qdpl_put(txq, m, locked) != 0) { - KASSERT(!locked, - ("sfxge_tx_qdpl_put() failed locked")); + if (locked) + mtx_unlock(&txq->lock); rc = ENOBUFS; goto fail; } Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:54:07 2015 (r280498) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:56:48 2015 (r280499) @@ -75,7 +75,8 @@ struct sfxge_tx_mapping { enum sfxge_tx_buf_flags flags; }; -#define SFXGE_TX_MAX_DEFERRED 64 +#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 64 +#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 /* * Deferred packet list. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 09:58:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 816F9C03; Wed, 25 Mar 2015 09:58:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6B5F01F8; Wed, 25 Mar 2015 09:58:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P9w3ec068108; Wed, 25 Mar 2015 09:58:03 GMT (envelope-from dchagin@FreeBSD.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P9w3DX068107; Wed, 25 Mar 2015 09:58:03 GMT (envelope-from dchagin@FreeBSD.org) Message-Id: <201503250958.t2P9w3DX068107@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dchagin set sender to dchagin@FreeBSD.org using -f From: Dmitry Chagin Date: Wed, 25 Mar 2015 09:58:03 +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: r280500 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 09:58:03 -0000 Author: dchagin Date: Wed Mar 25 09:58:02 2015 New Revision: 280500 URL: https://svnweb.freebsd.org/changeset/base/280500 Log: MFC r279776: Add a cred parameter to the VOP_VPTOCNP(9) manpage. While here fix igor warning about new line. Modified: stable/9/share/man/man9/VOP_VPTOCNP.9 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/VOP_VPTOCNP.9 ============================================================================== --- stable/9/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:56:48 2015 (r280499) +++ stable/9/share/man/man9/VOP_VPTOCNP.9 Wed Mar 25 09:58:02 2015 (r280500) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 19, 2011 +.Dd March 8, 2015 .Dt VOP_VPTOCNP 9 .Os .Sh NAME @@ -36,9 +36,10 @@ .Nd translate a vnode to its component name .Sh SYNOPSIS .In sys/param.h +.In sys/ucred.h .In sys/vnode.h .Ft int -.Fn VOP_VPTOCNP "struct vnode *vp" "struct vnode **dvp" "char *buf" "int *buflen" +.Fn VOP_VPTOCNP "struct vnode *vp" "struct vnode **dvp" "struct ucred *cred" "char *buf" "int *buflen" .Sh DESCRIPTION This translates a vnode into its component name, and writes that name to the head of the buffer specified by @@ -49,6 +50,8 @@ The vnode to translate. .It Fa dvp The vnode of the parent directory of .Fa vp . +.It Fa cred +The caller credentials. .It Fa buf The buffer into which to prepend the component name. .It Fa buflen @@ -59,7 +62,8 @@ The default implementation of .Nm scans through .Fa vp Ns 's -parent directory looking for a dirent with a matching file number. If +parent directory looking for a dirent with a matching file number. +If .Fa vp is not a directory, then .Nm From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 09:59:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2273D52; Wed, 25 Mar 2015 09:59:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AE0D20F; Wed, 25 Mar 2015 09:59:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2P9xgsu068528; Wed, 25 Mar 2015 09:59:42 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2P9xcVT068508; Wed, 25 Mar 2015 09:59:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503250959.t2P9xcVT068508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 09:59: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: r280501 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 09:59:42 -0000 Author: arybchik Date: Wed Mar 25 09:59:38 2015 New Revision: 280501 URL: https://svnweb.freebsd.org/changeset/base/280501 Log: MFC: 272325 cleanup: code style fixes Remove trailing whitespaces and tabs. Enclose value in return statements in parentheses. Use tabs after #define. Do not skip comparison with 0/NULL in boolean expressions. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efsys.h stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_dma.c stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_intr.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_rx.h stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 09:59:38 2015 (r280501) @@ -53,44 +53,44 @@ extern "C" { #define EFSYS_HAS_UINT64 1 #define EFSYS_USE_UINT64 0 #if _BYTE_ORDER == _BIG_ENDIAN -#define EFSYS_IS_BIG_ENDIAN 1 -#define EFSYS_IS_LITTLE_ENDIAN 0 +#define EFSYS_IS_BIG_ENDIAN 1 +#define EFSYS_IS_LITTLE_ENDIAN 0 #elif _BYTE_ORDER == _LITTLE_ENDIAN -#define EFSYS_IS_BIG_ENDIAN 0 -#define EFSYS_IS_LITTLE_ENDIAN 1 +#define EFSYS_IS_BIG_ENDIAN 0 +#define EFSYS_IS_LITTLE_ENDIAN 1 #endif #include "efx_types.h" /* Common code requires this */ #if __FreeBSD_version < 800068 -#define memmove(d, s, l) bcopy(s, d, l) +#define memmove(d, s, l) bcopy(s, d, l) #endif - + /* FreeBSD equivalents of Solaris things */ #ifndef _NOTE -#define _NOTE(s) +#define _NOTE(s) #endif #ifndef B_FALSE -#define B_FALSE FALSE +#define B_FALSE FALSE #endif #ifndef B_TRUE -#define B_TRUE TRUE +#define B_TRUE TRUE #endif #ifndef IS_P2ALIGNED -#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) +#define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) #endif #ifndef P2ROUNDUP -#define P2ROUNDUP(x, align) (-(-(x) & -(align))) +#define P2ROUNDUP(x, align) (-(-(x) & -(align))) #endif #ifndef IS2P -#define ISP2(x) (((x) & ((x) - 1)) == 0) +#define ISP2(x) (((x) & ((x) - 1)) == 0) #endif -#define ENOTACTIVE EINVAL +#define ENOTACTIVE EINVAL /* Memory type to use on FreeBSD */ MALLOC_DECLARE(M_SFXGE); @@ -242,7 +242,7 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #define EFSYS_OPT_PHY_PROPS 0 #define EFSYS_OPT_PHY_BIST 1 #define EFSYS_OPT_PHY_LED_CONTROL 1 -#define EFSYS_OPT_PHY_FLAGS 0 +#define EFSYS_OPT_PHY_FLAGS 0 #define EFSYS_OPT_VPD 1 #define EFSYS_OPT_NVRAM 1 @@ -256,8 +256,8 @@ sfxge_map_mbuf_fast(bus_dma_tag_t tag, b #define EFSYS_OPT_WOL 1 #define EFSYS_OPT_RX_SCALE 1 #define EFSYS_OPT_QSTATS 1 -#define EFSYS_OPT_FILTER 0 -#define EFSYS_OPT_RX_SCATTER 0 +#define EFSYS_OPT_FILTER 0 +#define EFSYS_OPT_RX_SCATTER 0 #define EFSYS_OPT_RX_HDR_SPLIT 0 #define EFSYS_OPT_EV_PREFETCH 0 @@ -272,7 +272,7 @@ typedef struct __efsys_identifier_s efsy #ifndef KDTRACE_HOOKS -#define EFSYS_PROBE(_name) +#define EFSYS_PROBE(_name) #define EFSYS_PROBE1(_name, _type1, _arg1) @@ -815,16 +815,16 @@ extern void sfxge_err(efsys_identifier_t panic(#_exp); \ } while (0) -#define EFSYS_ASSERT3(_x, _op, _y, _t) do { \ +#define EFSYS_ASSERT3(_x, _op, _y, _t) do { \ const _t __x = (_t)(_x); \ const _t __y = (_t)(_y); \ if (!(__x _op __y)) \ - panic("assertion failed at %s:%u", __FILE__, __LINE__); \ + panic("assertion failed at %s:%u", __FILE__, __LINE__); \ } while(0) -#define EFSYS_ASSERT3U(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uint64_t) -#define EFSYS_ASSERT3S(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, int64_t) -#define EFSYS_ASSERT3P(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uintptr_t) +#define EFSYS_ASSERT3U(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uint64_t) +#define EFSYS_ASSERT3S(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, int64_t) +#define EFSYS_ASSERT3P(_x, _op, _y) EFSYS_ASSERT3(_x, _op, _y, uintptr_t) #ifdef __cplusplus } Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 09:59:38 2015 (r280501) @@ -56,12 +56,12 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" -#define SFXGE_CAP (IFCAP_VLAN_MTU | \ +#define SFXGE_CAP (IFCAP_VLAN_MTU | \ IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ IFCAP_JUMBO_MTU | IFCAP_LRO | \ IFCAP_VLAN_HWTSO | IFCAP_LINKSTATE) -#define SFXGE_CAP_ENABLE SFXGE_CAP -#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \ +#define SFXGE_CAP_ENABLE SFXGE_CAP +#define SFXGE_CAP_FIXED (IFCAP_VLAN_MTU | IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | \ IFCAP_JUMBO_MTU | IFCAP_LINKSTATE) MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); @@ -77,7 +77,7 @@ sfxge_start(struct sfxge_softc *sc) sx_assert(&sc->softc_lock, LA_XLOCKED); if (sc->init_state == SFXGE_STARTED) - return 0; + return (0); if (sc->init_state != SFXGE_REGISTERED) { rc = EINVAL; @@ -222,7 +222,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign ifp->if_mtu = ifr->ifr_mtu; error = sfxge_start(sc); sx_xunlock(&sc->softc_lock); - if (error) { + if (error != 0) { ifp->if_flags &= ~IFF_UP; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; if_down(ifp); @@ -286,7 +286,7 @@ sfxge_ifnet_fini(struct ifnet *ifp) if_free(ifp); } -static int +static int sfxge_ifnet_init(struct ifnet *ifp, struct sfxge_softc *sc) { const efx_nic_cfg_t *encp = efx_nic_cfg_get(sc->enp); @@ -323,11 +323,11 @@ sfxge_ifnet_init(struct ifnet *ifp, stru if ((rc = sfxge_port_ifmedia_init(sc)) != 0) goto fail; - return 0; + return (0); fail: ether_ifdetach(sc->ifnet); - return rc; + return (rc); } void @@ -346,7 +346,7 @@ sfxge_bar_init(struct sfxge_softc *sc) { efsys_bar_t *esbp = &sc->bar; - esbp->esb_rid = PCIR_BAR(EFX_MEM_BAR); + esbp->esb_rid = PCIR_BAR(EFX_MEM_BAR); if ((esbp->esb_res = bus_alloc_resource_any(sc->dev, SYS_RES_MEMORY, &esbp->esb_rid, RF_ACTIVE)) == NULL) { device_printf(sc->dev, "Cannot allocate BAR region %d\n", @@ -385,7 +385,7 @@ sfxge_create(struct sfxge_softc *sc) device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "stats", CTLFLAG_RD, NULL, "Statistics"); - if (!sc->stats_node) { + if (sc->stats_node == NULL) { error = ENOMEM; goto fail; } @@ -553,14 +553,14 @@ sfxge_vpd_handler(SYSCTL_HANDLER_ARGS) struct sfxge_softc *sc = arg1; efx_vpd_value_t value; int rc; - + value.evv_tag = arg2 >> 16; value.evv_keyword = arg2 & 0xffff; if ((rc = efx_vpd_get(sc->enp, sc->vpd_data, sc->vpd_size, &value)) != 0) - return rc; + return (rc); - return SYSCTL_OUT(req, value.evv_value, value.evv_length); + return (SYSCTL_OUT(req, value.evv_value, value.evv_length)); } static void @@ -622,12 +622,12 @@ sfxge_vpd_init(struct sfxge_softc *sc) for (keyword[1] = 'A'; keyword[1] <= 'Z'; keyword[1]++) sfxge_vpd_try_add(sc, vpd_list, EFX_VPD_RO, keyword); - return 0; - + return (0); + fail2: free(sc->vpd_data, M_SFXGE); fail: - return rc; + return (rc); } static void @@ -744,12 +744,12 @@ sfxge_probe(device_t dev) pci_device_id = pci_get_device(dev); rc = efx_family(pci_vendor_id, pci_device_id, &family); - if (rc) - return ENXIO; + if (rc != 0) + return (ENXIO); KASSERT(family == EFX_FAMILY_SIENA, ("impossible controller family")); device_set_desc(dev, "Solarflare SFC9000 family"); - return 0; + return (0); } static device_method_t sfxge_methods[] = { Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 09:59:38 2015 (r280501) @@ -30,7 +30,7 @@ */ #ifndef _SFXGE_H -#define _SFXGE_H +#define _SFXGE_H #include #include @@ -52,43 +52,43 @@ /* This should be right on most machines the driver will be used on, and * we needn't care too much about wasting a few KB per interface. */ -#define CACHE_LINE_SIZE 128 +#define CACHE_LINE_SIZE 128 #endif #ifndef IFCAP_LINKSTATE -#define IFCAP_LINKSTATE 0 +#define IFCAP_LINKSTATE 0 #endif #ifndef IFCAP_VLAN_HWTSO -#define IFCAP_VLAN_HWTSO 0 +#define IFCAP_VLAN_HWTSO 0 #endif #ifndef IFM_10G_T -#define IFM_10G_T IFM_UNKNOWN +#define IFM_10G_T IFM_UNKNOWN #endif #ifndef IFM_10G_KX4 -#define IFM_10G_KX4 IFM_10G_CX4 +#define IFM_10G_KX4 IFM_10G_CX4 #endif #if __FreeBSD_version >= 800054 /* Networking core is multiqueue aware. We can manage our own TX * queues and use m_pkthdr.flowid. */ -#define SFXGE_HAVE_MQ +#define SFXGE_HAVE_MQ #endif #if (__FreeBSD_version >= 800501 && __FreeBSD_version < 900000) || \ __FreeBSD_version >= 900003 -#define SFXGE_HAVE_DESCRIBE_INTR +#define SFXGE_HAVE_DESCRIBE_INTR #endif #ifdef IFM_ETH_RXPAUSE -#define SFXGE_HAVE_PAUSE_MEDIAOPTS +#define SFXGE_HAVE_PAUSE_MEDIAOPTS #endif #ifndef CTLTYPE_U64 -#define CTLTYPE_U64 CTLTYPE_QUAD +#define CTLTYPE_U64 CTLTYPE_QUAD #endif #include "sfxge_rx.h" #include "sfxge_tx.h" -#define SFXGE_IP_ALIGN 2 +#define SFXGE_IP_ALIGN 2 -#define SFXGE_ETHERTYPE_LOOPBACK 0x9000 /* Xerox loopback */ +#define SFXGE_ETHERTYPE_LOOPBACK 0x9000 /* Xerox loopback */ enum sfxge_evq_state { SFXGE_EVQ_UNINITIALIZED = 0, @@ -132,9 +132,9 @@ enum sfxge_intr_state { }; struct sfxge_intr_hdl { - int eih_rid; - void *eih_tag; - struct resource *eih_res; + int eih_rid; + void *eih_tag; + struct resource *eih_res; }; struct sfxge_intr { @@ -196,7 +196,7 @@ struct sfxge_softc { device_t dev; struct sx softc_lock; enum sfxge_softc_state init_state; - struct ifnet *ifnet; + struct ifnet *ifnet; unsigned int if_flags; struct sysctl_oid *stats_node; @@ -208,7 +208,7 @@ struct sfxge_softc { efx_nic_t *enp; struct mtx enp_lock; - bus_dma_tag_t parent_dma_tag; + bus_dma_tag_t parent_dma_tag; efsys_bar_t bar; struct sfxge_intr intr; @@ -242,8 +242,8 @@ struct sfxge_softc { #endif }; -#define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) -#define SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING) +#define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) +#define SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING) /* * From sfxge.c. @@ -298,6 +298,6 @@ extern void sfxge_mac_link_update(struct extern int sfxge_mac_filter_set(struct sfxge_softc *sc); extern int sfxge_port_ifmedia_init(struct sfxge_softc *sc); -#define SFXGE_MAX_MTU (9 * 1024) +#define SFXGE_MAX_MTU (9 * 1024) #endif /* _SFXGE_H */ Modified: stable/10/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 09:59:38 2015 (r280501) @@ -46,7 +46,7 @@ sfxge_dma_cb(void *arg, bus_dma_segment_ addr = arg; - if (error) { + if (error != 0) { *addr = 0; return; } @@ -78,7 +78,7 @@ retry: return (0); } #if defined(__i386__) || defined(__amd64__) - while (m && seg_count < maxsegs) { + while (m != NULL && seg_count < maxsegs) { /* * firmware doesn't like empty segments */ @@ -193,7 +193,7 @@ sfxge_dma_init(struct sfxge_softc *sc) BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lock, lockarg */ - &sc->parent_dma_tag)) { + &sc->parent_dma_tag) != 0) { device_printf(sc->dev, "Cannot allocate parent DMA tag\n"); return (ENOMEM); } Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 09:59:38 2015 (r280501) @@ -221,7 +221,7 @@ sfxge_get_txq_by_label(struct sfxge_evq KASSERT((evq->index == 0 && label < SFXGE_TXQ_NTYPES) || (label == SFXGE_TXQ_IP_TCP_UDP_CKSUM), ("unexpected txq label")); index = (evq->index == 0) ? label : (evq->index - 1 + SFXGE_TXQ_NTYPES); - return evq->sc->txq[index]; + return (evq->sc->txq[index]); } static boolean_t @@ -438,7 +438,7 @@ sfxge_ev_stat_handler(SYSCTL_HANDLER_ARG sfxge_ev_stat_update(sc); - return SYSCTL_OUT(req, &sc->ev_stats[id], sizeof(sc->ev_stats[id])); + return (SYSCTL_OUT(req, &sc->ev_stats[id], sizeof(sc->ev_stats[id]))); } static void @@ -488,7 +488,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG sx_xlock(&sc->softc_lock); - if (req->newptr) { + if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &moderation, sizeof(moderation))) != 0) goto out; @@ -515,14 +515,14 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG out: sx_xunlock(&sc->softc_lock); - return error; + return (error); } static boolean_t sfxge_ev_initialized(void *arg) { struct sfxge_evq *evq; - + evq = (struct sfxge_evq *)arg; KASSERT(evq->init_state == SFXGE_EVQ_STARTING, @@ -741,7 +741,7 @@ sfxge_ev_start(struct sfxge_softc *sc) /* Initialize the event module */ if ((rc = efx_ev_init(sc->enp)) != 0) - return rc; + return (rc); /* Start the event queues */ for (index = 0; index < intr->n_alloc; index++) { Modified: stable/10/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 09:59:38 2015 (r280501) @@ -66,19 +66,19 @@ sfxge_intr_line_filter(void *arg) ("intr->type != EFX_INTR_LINE")); if (intr->state != SFXGE_INTR_STARTED) - return FILTER_STRAY; + return (FILTER_STRAY); (void)efx_intr_status_line(enp, &fatal, &qmask); if (fatal) { (void) efx_intr_disable(enp); (void) efx_intr_fatal(enp); - return FILTER_HANDLED; + return (FILTER_HANDLED); } if (qmask != 0) { intr->zero_count = 0; - return FILTER_SCHEDULE_THREAD; + return (FILTER_SCHEDULE_THREAD); } /* SF bug 15783: If the function is not asserting its IRQ and @@ -93,13 +93,13 @@ sfxge_intr_line_filter(void *arg) if (intr->zero_count++ == 0) { if (evq->init_state == SFXGE_EVQ_STARTED) { if (efx_ev_qpending(evq->common, evq->read_ptr)) - return FILTER_SCHEDULE_THREAD; + return (FILTER_SCHEDULE_THREAD); efx_ev_qprime(evq->common, evq->read_ptr); - return FILTER_HANDLED; + return (FILTER_HANDLED); } } - return FILTER_STRAY; + return (FILTER_STRAY); } static void @@ -171,7 +171,7 @@ sfxge_intr_bus_enable(struct sfxge_softc default: KASSERT(0, ("Invalid interrupt type")); - return EINVAL; + return (EINVAL); } /* Try to add the handlers */ @@ -250,7 +250,7 @@ sfxge_intr_alloc(struct sfxge_softc *sc, table[i].eih_res = res; } - if (error) { + if (error != 0) { count = i - 1; for (i = 0; i < count; i++) bus_release_resource(dev, SYS_RES_IRQ, @@ -345,7 +345,7 @@ sfxge_intr_setup_msi(struct sfxge_softc if (count == 0) return (EINVAL); - if ((error = pci_alloc_msi(dev, &count)) != 0) + if ((error = pci_alloc_msi(dev, &count)) != 0) return (ENOMEM); /* Allocate interrupt handler. */ @@ -420,7 +420,7 @@ void sfxge_intr_stop(struct sfxge_softc *sc) { struct sfxge_intr *intr; - + intr = &sc->intr; KASSERT(intr->state == SFXGE_INTR_STARTED, Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 09:59:38 2015 (r280501) @@ -74,7 +74,7 @@ sfxge_mac_stat_update(struct sfxge_softc /* Try to update the cached counters */ if ((rc = efx_mac_stats_update(sc->enp, esmp, - port->mac_stats.decode_buf, NULL)) != EAGAIN) + port->mac_stats.decode_buf, NULL)) != EAGAIN) goto out; DELAY(100); @@ -83,7 +83,7 @@ sfxge_mac_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: mtx_unlock(&port->lock); - return rc; + return (rc); } static int @@ -94,11 +94,11 @@ sfxge_mac_stat_handler(SYSCTL_HANDLER_AR int rc; if ((rc = sfxge_mac_stat_update(sc)) != 0) - return rc; + return (rc); - return SYSCTL_OUT(req, + return (SYSCTL_OUT(req, (uint64_t *)sc->port.mac_stats.decode_buf + id, - sizeof(uint64_t)); + sizeof(uint64_t))); } static void @@ -130,9 +130,9 @@ sfxge_port_wanted_fc(struct sfxge_softc struct ifmedia_entry *ifm = sc->media.ifm_cur; if (ifm->ifm_media == (IFM_ETHER | IFM_AUTO)) - return EFX_FCNTL_RESPOND | EFX_FCNTL_GENERATE; - return ((ifm->ifm_media & IFM_ETH_RXPAUSE) ? EFX_FCNTL_RESPOND : 0) | - ((ifm->ifm_media & IFM_ETH_TXPAUSE) ? EFX_FCNTL_GENERATE : 0); + return (EFX_FCNTL_RESPOND | EFX_FCNTL_GENERATE); + return (((ifm->ifm_media & IFM_ETH_RXPAUSE) ? EFX_FCNTL_RESPOND : 0) | + ((ifm->ifm_media & IFM_ETH_TXPAUSE) ? EFX_FCNTL_GENERATE : 0)); } static unsigned int @@ -150,13 +150,13 @@ sfxge_port_link_fc_ifm(struct sfxge_soft static unsigned int sfxge_port_wanted_fc(struct sfxge_softc *sc) { - return sc->port.wanted_fc; + return (sc->port.wanted_fc); } static unsigned int sfxge_port_link_fc_ifm(struct sfxge_softc *sc) { - return 0; + return (0); } static int @@ -172,7 +172,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND mtx_lock(&port->lock); - if (req->newptr) { + if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &fcntl, sizeof(fcntl))) != 0) goto out; @@ -235,7 +235,7 @@ sfxge_mac_link_update(struct sfxge_softc { struct sfxge_port *port; int link_state; - + port = &sc->port; if (port->link_mode == mode) @@ -289,7 +289,7 @@ sfxge_mac_filter_set_locked(struct sfxge /* Set promisc-unicast and broadcast filter bits */ if ((rc = efx_mac_filter_set(enp, !!(ifp->if_flags & IFF_PROMISC), B_TRUE)) != 0) - return rc; + return (rc); /* Set multicast hash filter */ if (ifp->if_flags & (IFF_PROMISC | IFF_ALLMULTI)) { @@ -311,7 +311,7 @@ sfxge_mac_filter_set_locked(struct sfxge } if_maddr_runlock(ifp); } - return efx_mac_hash_set(enp, bucket); + return (efx_mac_hash_set(enp, bucket)); } int @@ -336,7 +336,7 @@ sfxge_mac_filter_set(struct sfxge_softc else rc = 0; mtx_unlock(&port->lock); - return rc; + return (rc); } void @@ -413,7 +413,7 @@ sfxge_port_start(struct sfxge_softc *sc) /* Update MAC stats by DMA every second */ if ((rc = efx_mac_stats_periodic(enp, &port->mac_stats.dma_buf, - 1000, B_FALSE)) != 0) + 1000, B_FALSE)) != 0) goto fail2; if ((rc = efx_mac_drain(enp, B_FALSE)) != 0) @@ -435,7 +435,7 @@ fail4: (void)efx_mac_drain(enp, B_TRUE); fail3: (void)efx_mac_stats_periodic(enp, &port->mac_stats.dma_buf, - 0, B_FALSE); + 0, B_FALSE); fail2: efx_port_fini(sc->enp); fail: @@ -488,7 +488,7 @@ sfxge_phy_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: mtx_unlock(&port->lock); - return rc; + return (rc); } static int @@ -499,11 +499,11 @@ sfxge_phy_stat_handler(SYSCTL_HANDLER_AR int rc; if ((rc = sfxge_phy_stat_update(sc)) != 0) - return rc; + return (rc); - return SYSCTL_OUT(req, + return (SYSCTL_OUT(req, (uint32_t *)sc->port.phy_stats.decode_buf + id, - sizeof(uint32_t)); + sizeof(uint32_t))); } static void @@ -619,7 +619,7 @@ fail: free(port->phy_stats.decode_buf, M_SFXGE); (void)mtx_destroy(&port->lock); port->sc = NULL; - return rc; + return (rc); } static int sfxge_link_mode[EFX_PHY_MEDIA_NTYPES][EFX_LINK_NMODES] = { @@ -697,9 +697,9 @@ sfxge_media_change(struct ifnet *ifp) rc = efx_phy_adv_cap_set(sc->enp, ifm->ifm_data); out: - sx_xunlock(&sc->softc_lock); + sx_xunlock(&sc->softc_lock); - return rc; + return (rc); } int sfxge_port_ifmedia_init(struct sfxge_softc *sc) @@ -788,7 +788,7 @@ int sfxge_port_ifmedia_init(struct sfxge best_mode_ifm = mode_ifm; } - if (best_mode_ifm) + if (best_mode_ifm != 0) ifmedia_set(&sc->media, best_mode_ifm); /* Now discard port state until interface is started. */ @@ -796,5 +796,5 @@ int sfxge_port_ifmedia_init(struct sfxge out2: efx_nic_fini(sc->enp); out: - return rc; + return (rc); } Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 09:59:38 2015 (r280501) @@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" -#define RX_REFILL_THRESHOLD (EFX_RXQ_LIMIT(SFXGE_NDESCS) * 9 / 10) -#define RX_REFILL_THRESHOLD_2 (RX_REFILL_THRESHOLD / 2) +#define RX_REFILL_THRESHOLD (EFX_RXQ_LIMIT(SFXGE_NDESCS) * 9 / 10) +#define RX_REFILL_THRESHOLD_2 (RX_REFILL_THRESHOLD / 2) /* Size of the LRO hash table. Must be a power of 2. A larger table * means we can accelerate a larger number of streams. @@ -87,10 +87,10 @@ static int lro_slow_start_packets = 2000 static int lro_loss_packets = 20; /* Flags for sfxge_lro_conn::l2_id; must not collide with EVL_VLID_MASK */ -#define SFXGE_LRO_L2_ID_VLAN 0x4000 -#define SFXGE_LRO_L2_ID_IPV6 0x8000 -#define SFXGE_LRO_CONN_IS_VLAN_ENCAP(c) ((c)->l2_id & SFXGE_LRO_L2_ID_VLAN) -#define SFXGE_LRO_CONN_IS_TCPIPV4(c) (!((c)->l2_id & SFXGE_LRO_L2_ID_IPV6)) +#define SFXGE_LRO_L2_ID_VLAN 0x4000 +#define SFXGE_LRO_L2_ID_IPV6 0x8000 +#define SFXGE_LRO_CONN_IS_VLAN_ENCAP(c) ((c)->l2_id & SFXGE_LRO_L2_ID_VLAN) +#define SFXGE_LRO_CONN_IS_TCPIPV4(c) (!((c)->l2_id & SFXGE_LRO_L2_ID_IPV6)) /* Compare IPv6 addresses, avoiding conditional branches */ static __inline unsigned long ipv6_addr_cmp(const struct in6_addr *left, @@ -179,12 +179,12 @@ static inline struct mbuf *sfxge_rx_allo m = (struct mbuf *)uma_zalloc_arg(zone_mbuf, &args, M_NOWAIT); /* Allocate (and attach) packet buffer */ - if (m && !uma_zalloc_arg(sc->rx_buffer_zone, m, M_NOWAIT)) { + if (m != NULL && !uma_zalloc_arg(sc->rx_buffer_zone, m, M_NOWAIT)) { uma_zfree(zone_mbuf, m); m = NULL; } - return m; + return (m); } #define SFXGE_REFILL_BATCH 64 @@ -370,7 +370,7 @@ static void sfxge_lro_drop(struct sfxge_ KASSERT(!c->mbuf, ("found orphaned mbuf")); - if (c->next_buf.mbuf) { + if (c->next_buf.mbuf != NULL) { sfxge_rx_deliver(rxq->sc, &c->next_buf); LIST_REMOVE(c, active_link); } @@ -510,7 +510,7 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx if (__predict_false(th_seq != c->next_seq)) { /* Out-of-order, so start counting again. */ - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(&rxq->lro, c); c->n_in_order_pkts -= lro_loss_packets; c->next_seq = th_seq + data_length; @@ -522,10 +522,10 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx now = ticks; if (now - c->last_pkt_ticks > lro_idle_ticks) { ++rxq->lro.n_drop_idle; - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(&rxq->lro, c); sfxge_lro_drop(rxq, c); - return 0; + return (0); } c->last_pkt_ticks = ticks; @@ -537,12 +537,12 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx } if (__predict_false(dont_merge)) { - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(&rxq->lro, c); if (th->th_flags & (TH_FIN | TH_RST)) { ++rxq->lro.n_drop_closed; sfxge_lro_drop(rxq, c); - return 0; + return (0); } goto deliver_buf_out; } @@ -563,11 +563,11 @@ sfxge_lro_try_merge(struct sfxge_rxq *rx } rx_buf->mbuf = NULL; - return 1; + return (1); deliver_buf_out: sfxge_rx_deliver(rxq->sc, rx_buf); - return 1; + return (1); } static void sfxge_lro_new_conn(struct sfxge_lro_state *st, uint32_t conn_hash, @@ -621,7 +621,7 @@ sfxge_lro(struct sfxge_rxq *rxq, struct struct sfxge_lro_conn *c; uint16_t l2_id; uint16_t l3_proto; - void *nh; + void *nh; struct tcphdr *th; uint32_t conn_hash; unsigned bucket; @@ -671,7 +671,7 @@ sfxge_lro(struct sfxge_rxq *rxq, struct continue; if ((c->source - th->th_sport) | (c->dest - th->th_dport)) continue; - if (c->mbuf) { + if (c->mbuf != NULL) { if (SFXGE_LRO_CONN_IS_TCPIPV4(c)) { struct ip *c_iph, *iph = nh; c_iph = c->nh; @@ -691,7 +691,7 @@ sfxge_lro(struct sfxge_rxq *rxq, struct TAILQ_REMOVE(&rxq->lro.conns[bucket], c, link); TAILQ_INSERT_HEAD(&rxq->lro.conns[bucket], c, link); - if (c->next_buf.mbuf) { + if (c->next_buf.mbuf != NULL) { if (!sfxge_lro_try_merge(rxq, c)) goto deliver_now; } else { @@ -720,10 +720,10 @@ static void sfxge_lro_end_of_burst(struc while (!LIST_EMPTY(&st->active_conns)) { c = LIST_FIRST(&st->active_conns); - if (!c->delivered && c->mbuf) + if (!c->delivered && c->mbuf != NULL) sfxge_lro_deliver(st, c); if (sfxge_lro_try_merge(rxq, c)) { - if (c->mbuf) + if (c->mbuf != NULL) sfxge_lro_deliver(st, c); LIST_REMOVE(c, active_link); } @@ -836,7 +836,7 @@ sfxge_rx_qstop(struct sfxge_softc *sc, u evq = sc->evq[index]; mtx_lock(&evq->lock); - + KASSERT(rxq->init_state == SFXGE_RXQ_STARTED, ("rxq not started")); @@ -881,7 +881,7 @@ again: rxq->loopback = 0; /* Destroy the common code receive queue. */ - efx_rx_qdestroy(rxq->common); + efx_rx_qdestroy(rxq->common); efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, EFX_RXQ_NBUFS(SFXGE_NDESCS)); @@ -1136,7 +1136,7 @@ static const struct { const char *name; size_t offset; } sfxge_rx_stats[] = { -#define SFXGE_RX_STAT(name, member) \ +#define SFXGE_RX_STAT(name, member) \ { #name, offsetof(struct sfxge_rxq, member) } SFXGE_RX_STAT(lro_merges, lro.n_merges), SFXGE_RX_STAT(lro_bursts, lro.n_bursts), @@ -1161,7 +1161,7 @@ sfxge_rx_stat_handler(SYSCTL_HANDLER_ARG sum += *(unsigned int *)((caddr_t)sc->rxq[index] + sfxge_rx_stats[id].offset); - return SYSCTL_OUT(req, &sum, sizeof(sum)); + return (SYSCTL_OUT(req, &sum, sizeof(sum))); } static void Modified: stable/10/sys/dev/sfxge/sfxge_rx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 09:59:38 2015 (r280501) @@ -30,25 +30,25 @@ */ #ifndef _SFXGE_RX_H -#define _SFXGE_RX_H +#define _SFXGE_RX_H -#define SFXGE_MAGIC_RESERVED 0x8000 +#define SFXGE_MAGIC_RESERVED 0x8000 -#define SFXGE_MAGIC_DMAQ_LABEL_WIDTH 6 -#define SFXGE_MAGIC_DMAQ_LABEL_MASK \ - ((1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH) - 1) +#define SFXGE_MAGIC_DMAQ_LABEL_WIDTH 6 +#define SFXGE_MAGIC_DMAQ_LABEL_MASK \ + ((1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH) - 1) -#define SFXGE_MAGIC_RX_QFLUSH_DONE \ - (SFXGE_MAGIC_RESERVED | (1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_RX_QFLUSH_DONE \ + (SFXGE_MAGIC_RESERVED | (1 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) -#define SFXGE_MAGIC_RX_QFLUSH_FAILED \ - (SFXGE_MAGIC_RESERVED | (2 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_RX_QFLUSH_FAILED \ + (SFXGE_MAGIC_RESERVED | (2 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) -#define SFXGE_MAGIC_RX_QREFILL \ - (SFXGE_MAGIC_RESERVED | (3 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_RX_QREFILL \ + (SFXGE_MAGIC_RESERVED | (3 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) -#define SFXGE_MAGIC_TX_QFLUSH_DONE \ - (SFXGE_MAGIC_RESERVED | (4 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) +#define SFXGE_MAGIC_TX_QFLUSH_DONE \ + (SFXGE_MAGIC_RESERVED | (4 << SFXGE_MAGIC_DMAQ_LABEL_WIDTH)) #define SFXGE_RX_SCALE_MAX EFX_MAXRSS Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:58:02 2015 (r280500) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:59:38 2015 (r280501) @@ -74,8 +74,8 @@ __FBSDID("$FreeBSD$"); * the output at a packet boundary. Allow for a reasonable * minimum MSS of 512. */ -#define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) -#define SFXGE_TXQ_BLOCK_LEVEL (SFXGE_NDESCS - SFXGE_TSO_MAX_DESC) +#define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) +#define SFXGE_TXQ_BLOCK_LEVEL (SFXGE_NDESCS - SFXGE_TSO_MAX_DESC) /* Forward declarations. */ static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); @@ -343,7 +343,7 @@ static int sfxge_tx_queue_mbuf(struct sf /* Post the fragment list. */ sfxge_tx_qlist_post(txq); - return 0; + return (0); reject_mapped: bus_dmamap_unload(txq->packet_dma_tag, *used_map); @@ -352,7 +352,7 @@ reject: m_freem(mbuf); ++txq->drops; - return rc; + return (rc); } #ifdef SFXGE_HAVE_MQ @@ -426,8 +426,8 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx ("queue unblocked but count is non-zero")); } -#define SFXGE_TX_QDPL_PENDING(_txq) \ - ((_txq)->dpl.std_put != 0) +#define SFXGE_TX_QDPL_PENDING(_txq) \ + ((_txq)->dpl.std_put != 0) /* * Service the deferred packet list. @@ -493,7 +493,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, do { old = *putp; - if (old) { + if (old != 0) { struct mbuf *mp = (struct mbuf *)old; old_len = mp->m_pkthdr.csum_data; } else @@ -559,7 +559,6 @@ fail: m_freem(m); atomic_add_long(&txq->early_drops, 1); return (rc); - } static void @@ -577,7 +576,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx } stdp->std_get = NULL; stdp->std_count = 0; - stdp->std_getp = &stdp->std_get; + stdp->std_getp = &stdp->std_get; mtx_unlock(&txq->lock); } @@ -599,7 +598,7 @@ sfxge_if_qflush(struct ifnet *ifp) */ int sfxge_if_transmit(struct ifnet *ifp, struct mbuf *m) -{ +{ struct sfxge_softc *sc; struct sfxge_txq *txq; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:01:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33776EBE; Wed, 25 Mar 2015 10:01:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D2D022F; Wed, 25 Mar 2015 10:01:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PA1AGa068956; Wed, 25 Mar 2015 10:01:10 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PA17I6068947; Wed, 25 Mar 2015 10:01:07 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251001.t2PA17I6068947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:01: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: r280502 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:01:10 -0000 Author: arybchik Date: Wed Mar 25 10:01:07 2015 New Revision: 280502 URL: https://svnweb.freebsd.org/changeset/base/280502 Log: MFC: 272328 Make size of Tx and Rx rings configurable Required size of event queue is calculated now. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_rx.h stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:01:07 2015 (r280502) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -66,6 +67,25 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_SFXGE, "sfxge", "Solarflare 10GigE driver"); + +SYSCTL_NODE(_hw, OID_AUTO, sfxge, CTLFLAG_RD, 0, + "SFXGE driver parameters"); + +#define SFXGE_PARAM_RX_RING SFXGE_PARAM(rx_ring) +static int sfxge_rx_ring_entries = SFXGE_NDESCS; +TUNABLE_INT(SFXGE_PARAM_RX_RING, &sfxge_rx_ring_entries); +SYSCTL_INT(_hw_sfxge, OID_AUTO, rx_ring, CTLFLAG_RDTUN, + &sfxge_rx_ring_entries, 0, + "Maximum number of descriptors in a receive ring"); + +#define SFXGE_PARAM_TX_RING SFXGE_PARAM(tx_ring) +static int sfxge_tx_ring_entries = SFXGE_NDESCS; +TUNABLE_INT(SFXGE_PARAM_TX_RING, &sfxge_tx_ring_entries); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, CTLFLAG_RDTUN, + &sfxge_tx_ring_entries, 0, + "Maximum number of descriptors in a transmit ring"); + + static void sfxge_reset(void *arg, int npending); @@ -313,8 +333,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp->if_qflush = sfxge_if_qflush; #else ifp->if_start = sfxge_if_start; - IFQ_SET_MAXLEN(&ifp->if_snd, SFXGE_NDESCS - 1); - ifp->if_snd.ifq_drv_maxlen = SFXGE_NDESCS - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, sc->txq_entries - 1); + ifp->if_snd.ifq_drv_maxlen = sc->txq_entries - 1; IFQ_SET_READY(&ifp->if_snd); mtx_init(&sc->tx_lock, "txq", NULL, MTX_DEF); @@ -413,6 +433,26 @@ sfxge_create(struct sfxge_softc *sc) goto fail3; sc->enp = enp; + if (!ISP2(sfxge_rx_ring_entries) || + !(sfxge_rx_ring_entries & EFX_RXQ_NDESCS_MASK)) { + log(LOG_ERR, "%s=%d must be power of 2 from %u to %u", + SFXGE_PARAM_RX_RING, sfxge_rx_ring_entries, + EFX_RXQ_MINNDESCS, EFX_RXQ_MAXNDESCS); + error = EINVAL; + goto fail_rx_ring_entries; + } + sc->rxq_entries = sfxge_rx_ring_entries; + + if (!ISP2(sfxge_tx_ring_entries) || + !(sfxge_tx_ring_entries & EFX_TXQ_NDESCS_MASK)) { + log(LOG_ERR, "%s=%d must be power of 2 from %u to %u", + SFXGE_PARAM_TX_RING, sfxge_tx_ring_entries, + EFX_TXQ_MINNDESCS, EFX_TXQ_MAXNDESCS); + error = EINVAL; + goto fail_tx_ring_entries; + } + sc->txq_entries = sfxge_tx_ring_entries; + /* Initialize MCDI to talk to the microcontroller. */ if ((error = sfxge_mcdi_init(sc)) != 0) goto fail4; @@ -485,6 +525,8 @@ fail5: sfxge_mcdi_fini(sc); fail4: +fail_tx_ring_entries: +fail_rx_ring_entries: sc->enp = NULL; efx_nic_destroy(enp); mtx_destroy(&sc->enp_lock); Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:01:07 2015 (r280502) @@ -86,6 +86,8 @@ #include "sfxge_rx.h" #include "sfxge_tx.h" +#define ROUNDUP_POW_OF_TWO(_n) (1ULL << flsl((_n) - 1)) + #define SFXGE_IP_ALIGN 2 #define SFXGE_ETHERTYPE_LOOPBACK 0x9000 /* Xerox loopback */ @@ -105,6 +107,7 @@ struct sfxge_evq { enum sfxge_evq_state init_state; unsigned int index; + unsigned int entries; efsys_mem_t mem; unsigned int buf_base_id; @@ -120,7 +123,6 @@ struct sfxge_evq { struct sfxge_txq **txqs; }; -#define SFXGE_NEVS 4096 #define SFXGE_NDESCS 1024 #define SFXGE_MODERATION 30 @@ -208,6 +210,9 @@ struct sfxge_softc { efx_nic_t *enp; struct mtx enp_lock; + unsigned int rxq_entries; + unsigned int txq_entries; + bus_dma_tag_t parent_dma_tag; efsys_bar_t bar; @@ -245,6 +250,10 @@ struct sfxge_softc { #define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) #define SFXGE_RUNNING(sc) ((sc)->ifnet->if_drv_flags & IFF_DRV_RUNNING) +#define SFXGE_PARAM(_name) "hw.sfxge." #_name + +SYSCTL_DECL(_hw_sfxge); + /* * From sfxge.c. */ Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:01:07 2015 (r280502) @@ -97,7 +97,7 @@ sfxge_ev_rx(void *arg, uint32_t label, u if (rxq->init_state != SFXGE_RXQ_STARTED) goto done; - expected = rxq->pending++ & (SFXGE_NDESCS - 1); + expected = rxq->pending++ & rxq->ptr_mask; if (id != expected) { evq->exception = B_TRUE; @@ -242,10 +242,10 @@ sfxge_ev_tx(void *arg, uint32_t label, u if (txq->init_state != SFXGE_TXQ_STARTED) goto done; - stop = (id + 1) & (SFXGE_NDESCS - 1); - id = txq->pending & (SFXGE_NDESCS - 1); + stop = (id + 1) & txq->ptr_mask; + id = txq->pending & txq->ptr_mask; - delta = (stop >= id) ? (stop - id) : (SFXGE_NDESCS - id + stop); + delta = (stop >= id) ? (stop - id) : (txq->entries - id + stop); txq->pending += delta; evq->tx_done++; @@ -630,7 +630,7 @@ sfxge_ev_qstop(struct sfxge_softc *sc, u efx_ev_qdestroy(evq->common); efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, - EFX_EVQ_NBUFS(SFXGE_NEVS)); + EFX_EVQ_NBUFS(evq->entries)); mtx_unlock(&evq->lock); } @@ -649,15 +649,15 @@ sfxge_ev_qstart(struct sfxge_softc *sc, ("evq->init_state != SFXGE_EVQ_INITIALIZED")); /* Clear all events. */ - (void)memset(esmp->esm_base, 0xff, EFX_EVQ_SIZE(SFXGE_NEVS)); + (void)memset(esmp->esm_base, 0xff, EFX_EVQ_SIZE(evq->entries)); /* Program the buffer table. */ if ((rc = efx_sram_buf_tbl_set(sc->enp, evq->buf_base_id, esmp, - EFX_EVQ_NBUFS(SFXGE_NEVS))) != 0) - return rc; + EFX_EVQ_NBUFS(evq->entries))) != 0) + return (rc); /* Create the common code event queue. */ - if ((rc = efx_ev_qcreate(sc->enp, index, esmp, SFXGE_NEVS, + if ((rc = efx_ev_qcreate(sc->enp, index, esmp, evq->entries, evq->buf_base_id, &evq->common)) != 0) goto fail; @@ -700,7 +700,7 @@ fail2: efx_ev_qdestroy(evq->common); fail: efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, - EFX_EVQ_NBUFS(SFXGE_NEVS)); + EFX_EVQ_NBUFS(evq->entries)); return (rc); } @@ -797,15 +797,31 @@ sfxge_ev_qinit(struct sfxge_softc *sc, u sc->evq[index] = evq; esmp = &evq->mem; + /* Build an event queue with room for one event per tx and rx buffer, + * plus some extra for link state events and MCDI completions. + * There are three tx queues in the first event queue and one in + * other. + */ + if (index == 0) + evq->entries = + ROUNDUP_POW_OF_TWO(sc->rxq_entries + + 3 * sc->txq_entries + + 128); + else + evq->entries = + ROUNDUP_POW_OF_TWO(sc->rxq_entries + + sc->txq_entries + + 128); + /* Initialise TX completion list */ evq->txqs = &evq->txq; /* Allocate DMA space. */ - if ((rc = sfxge_dma_alloc(sc, EFX_EVQ_SIZE(SFXGE_NEVS), esmp)) != 0) + if ((rc = sfxge_dma_alloc(sc, EFX_EVQ_SIZE(evq->entries), esmp)) != 0) return (rc); /* Allocate buffer table entries. */ - sfxge_sram_buf_tbl_alloc(sc, EFX_EVQ_NBUFS(SFXGE_NEVS), + sfxge_sram_buf_tbl_alloc(sc, EFX_EVQ_NBUFS(evq->entries), &evq->buf_base_id); mtx_init(&evq->lock, "evq", NULL, MTX_DEF); Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:01:07 2015 (r280502) @@ -54,8 +54,7 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" -#define RX_REFILL_THRESHOLD (EFX_RXQ_LIMIT(SFXGE_NDESCS) * 9 / 10) -#define RX_REFILL_THRESHOLD_2 (RX_REFILL_THRESHOLD / 2) +#define RX_REFILL_THRESHOLD(_entries) (EFX_RXQ_LIMIT(_entries) * 9 / 10) /* Size of the LRO hash table. Must be a power of 2. A larger table * means we can accelerate a larger number of streams. @@ -214,11 +213,11 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, un return; rxfill = rxq->added - rxq->completed; - KASSERT(rxfill <= EFX_RXQ_LIMIT(SFXGE_NDESCS), - ("rxfill > EFX_RXQ_LIMIT(SFXGE_NDESCS)")); - ntodo = min(EFX_RXQ_LIMIT(SFXGE_NDESCS) - rxfill, target); - KASSERT(ntodo <= EFX_RXQ_LIMIT(SFXGE_NDESCS), - ("ntodo > EFX_RQX_LIMIT(SFXGE_NDESCS)")); + KASSERT(rxfill <= EFX_RXQ_LIMIT(rxq->entries), + ("rxfill > EFX_RXQ_LIMIT(rxq->entries)")); + ntodo = min(EFX_RXQ_LIMIT(rxq->entries) - rxfill, target); + KASSERT(ntodo <= EFX_RXQ_LIMIT(rxq->entries), + ("ntodo > EFX_RQX_LIMIT(rxq->entries)")); if (ntodo == 0) return; @@ -231,7 +230,7 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, un bus_dma_segment_t seg; struct mbuf *m; - id = (rxq->added + batch) & (SFXGE_NDESCS - 1); + id = (rxq->added + batch) & rxq->ptr_mask; rx_desc = &rxq->queue[id]; KASSERT(rx_desc->mbuf == NULL, ("rx_desc->mbuf != NULL")); @@ -274,7 +273,7 @@ sfxge_rx_qrefill(struct sfxge_rxq *rxq) return; /* Make sure the queue is full */ - sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(SFXGE_NDESCS), B_TRUE); + sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(rxq->entries), B_TRUE); } static void __sfxge_rx_deliver(struct sfxge_softc *sc, struct mbuf *m) @@ -757,7 +756,7 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq unsigned int id; struct sfxge_rx_sw_desc *rx_desc; - id = completed++ & (SFXGE_NDESCS - 1); + id = completed++ & rxq->ptr_mask; rx_desc = &rxq->queue[id]; m = rx_desc->mbuf; @@ -821,8 +820,8 @@ discard: sfxge_lro_end_of_burst(rxq); /* Top up the queue if necessary */ - if (level < RX_REFILL_THRESHOLD) - sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(SFXGE_NDESCS), B_FALSE); + if (level < rxq->refill_threshold) + sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(rxq->entries), B_FALSE); } static void @@ -884,7 +883,7 @@ again: efx_rx_qdestroy(rxq->common); efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, - EFX_RXQ_NBUFS(SFXGE_NDESCS)); + EFX_RXQ_NBUFS(sc->rxq_entries)); mtx_unlock(&evq->lock); } @@ -908,12 +907,12 @@ sfxge_rx_qstart(struct sfxge_softc *sc, /* Program the buffer table. */ if ((rc = efx_sram_buf_tbl_set(sc->enp, rxq->buf_base_id, esmp, - EFX_RXQ_NBUFS(SFXGE_NDESCS))) != 0) - return rc; + EFX_RXQ_NBUFS(sc->rxq_entries))) != 0) + return (rc); /* Create the common code receive queue. */ if ((rc = efx_rx_qcreate(sc->enp, index, index, EFX_RXQ_TYPE_DEFAULT, - esmp, SFXGE_NDESCS, rxq->buf_base_id, evq->common, + esmp, sc->rxq_entries, rxq->buf_base_id, evq->common, &rxq->common)) != 0) goto fail; @@ -925,7 +924,7 @@ sfxge_rx_qstart(struct sfxge_softc *sc, rxq->init_state = SFXGE_RXQ_STARTED; /* Try to fill the queue from the pool. */ - sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(SFXGE_NDESCS), B_FALSE); + sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(sc->rxq_entries), B_FALSE); mtx_unlock(&evq->lock); @@ -933,8 +932,8 @@ sfxge_rx_qstart(struct sfxge_softc *sc, fail: efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, - EFX_RXQ_NBUFS(SFXGE_NDESCS)); - return rc; + EFX_RXQ_NBUFS(sc->rxq_entries)); + return (rc); } void @@ -1105,6 +1104,9 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u rxq = malloc(sizeof(struct sfxge_rxq), M_SFXGE, M_ZERO | M_WAITOK); rxq->sc = sc; rxq->index = index; + rxq->entries = sc->rxq_entries; + rxq->ptr_mask = rxq->entries - 1; + rxq->refill_threshold = RX_REFILL_THRESHOLD(rxq->entries); sc->rxq[index] = rxq; esmp = &rxq->mem; @@ -1112,16 +1114,16 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u evq = sc->evq[index]; /* Allocate and zero DMA space. */ - if ((rc = sfxge_dma_alloc(sc, EFX_RXQ_SIZE(SFXGE_NDESCS), esmp)) != 0) + if ((rc = sfxge_dma_alloc(sc, EFX_RXQ_SIZE(sc->rxq_entries), esmp)) != 0) return (rc); - (void)memset(esmp->esm_base, 0, EFX_RXQ_SIZE(SFXGE_NDESCS)); + (void)memset(esmp->esm_base, 0, EFX_RXQ_SIZE(sc->rxq_entries)); /* Allocate buffer table entries. */ - sfxge_sram_buf_tbl_alloc(sc, EFX_RXQ_NBUFS(SFXGE_NDESCS), + sfxge_sram_buf_tbl_alloc(sc, EFX_RXQ_NBUFS(sc->rxq_entries), &rxq->buf_base_id); /* Allocate the context array and the flow table. */ - rxq->queue = malloc(sizeof(struct sfxge_rx_sw_desc) * SFXGE_NDESCS, + rxq->queue = malloc(sizeof(struct sfxge_rx_sw_desc) * sc->rxq_entries, M_SFXGE, M_WAITOK | M_ZERO); sfxge_lro_init(rxq); Modified: stable/10/sys/dev/sfxge/sfxge_rx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 10:01:07 2015 (r280502) @@ -159,6 +159,8 @@ struct sfxge_rxq { efsys_mem_t mem; unsigned int buf_base_id; enum sfxge_rxq_state init_state; + unsigned int entries; + unsigned int ptr_mask; struct sfxge_rx_sw_desc *queue __aligned(CACHE_LINE_SIZE); unsigned int added; @@ -166,6 +168,7 @@ struct sfxge_rxq { unsigned int completed; unsigned int loopback; struct sfxge_lro_state lro; + unsigned int refill_threshold; struct callout refill_callout; unsigned int refill_delay; Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:01:07 2015 (r280502) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); * minimum MSS of 512. */ #define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) -#define SFXGE_TXQ_BLOCK_LEVEL (SFXGE_NDESCS - SFXGE_TSO_MAX_DESC) +#define SFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) /* Forward declarations. */ static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); @@ -101,7 +101,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq struct sfxge_tx_mapping *stmp; unsigned int id; - id = completed++ & (SFXGE_NDESCS - 1); + id = completed++ & txq->ptr_mask; stmp = &txq->stmp[id]; if (stmp->flags & TX_BUF_UNMAP) { @@ -125,7 +125,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq unsigned int level; level = txq->added - txq->completed; - if (level <= SFXGE_TXQ_UNBLOCK_LEVEL) + if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries)) sfxge_tx_qunblock(txq); } } @@ -218,19 +218,19 @@ sfxge_tx_qlist_post(struct sfxge_txq *tx ("efx_tx_qpost() refragmented descriptors")); level = txq->added - txq->reaped; - KASSERT(level <= SFXGE_NDESCS, ("overfilled TX queue")); + KASSERT(level <= txq->entries, ("overfilled TX queue")); /* Clear the fragment list. */ txq->n_pend_desc = 0; /* Have we reached the block level? */ - if (level < SFXGE_TXQ_BLOCK_LEVEL) + if (level < SFXGE_TXQ_BLOCK_LEVEL(txq->entries)) return; /* Reap, and check again */ sfxge_tx_qreap(txq); level = txq->added - txq->reaped; - if (level < SFXGE_TXQ_BLOCK_LEVEL) + if (level < SFXGE_TXQ_BLOCK_LEVEL(txq->entries)) return; txq->blocked = 1; @@ -242,7 +242,7 @@ sfxge_tx_qlist_post(struct sfxge_txq *tx mb(); sfxge_tx_qreap(txq); level = txq->added - txq->reaped; - if (level < SFXGE_TXQ_BLOCK_LEVEL) { + if (level < SFXGE_TXQ_BLOCK_LEVEL(txq->entries)) { mb(); txq->blocked = 0; } @@ -271,7 +271,7 @@ static int sfxge_tx_queue_mbuf(struct sf } /* Load the packet for DMA. */ - id = txq->added & (SFXGE_NDESCS - 1); + id = txq->added & txq->ptr_mask; stmp = &txq->stmp[id]; rc = bus_dmamap_load_mbuf_sg(txq->packet_dma_tag, stmp->map, mbuf, dma_seg, &n_dma_seg, 0); @@ -318,7 +318,7 @@ static int sfxge_tx_queue_mbuf(struct sf stmp->flags = 0; if (__predict_false(stmp == - &txq->stmp[SFXGE_NDESCS - 1])) + &txq->stmp[txq->ptr_mask])) stmp = &txq->stmp[0]; else stmp++; @@ -762,20 +762,22 @@ static inline const struct tcphdr *tso_t * a TSO header buffer, since they must always be followed by a * payload descriptor referring to an mbuf. */ -#define TSOH_COUNT (SFXGE_NDESCS / 2u) +#define TSOH_COUNT(_txq_entries) ((_txq_entries) / 2u) #define TSOH_PER_PAGE (PAGE_SIZE / TSOH_STD_SIZE) -#define TSOH_PAGE_COUNT ((TSOH_COUNT + TSOH_PER_PAGE - 1) / TSOH_PER_PAGE) +#define TSOH_PAGE_COUNT(_txq_entries) \ + ((TSOH_COUNT(_txq_entries) + TSOH_PER_PAGE - 1) / TSOH_PER_PAGE) static int tso_init(struct sfxge_txq *txq) { struct sfxge_softc *sc = txq->sc; + unsigned int tsoh_page_count = TSOH_PAGE_COUNT(sc->txq_entries); int i, rc; /* Allocate TSO header buffers */ - txq->tsoh_buffer = malloc(TSOH_PAGE_COUNT * sizeof(txq->tsoh_buffer[0]), + txq->tsoh_buffer = malloc(tsoh_page_count * sizeof(txq->tsoh_buffer[0]), M_SFXGE, M_WAITOK); - for (i = 0; i < TSOH_PAGE_COUNT; i++) { + for (i = 0; i < tsoh_page_count; i++) { rc = sfxge_dma_alloc(sc, PAGE_SIZE, &txq->tsoh_buffer[i]); if (rc != 0) goto fail; @@ -796,7 +798,7 @@ static void tso_fini(struct sfxge_txq *t int i; if (txq->tsoh_buffer != NULL) { - for (i = 0; i < TSOH_PAGE_COUNT; i++) + for (i = 0; i < TSOH_PAGE_COUNT(txq->sc->txq_entries); i++) sfxge_dma_free(&txq->tsoh_buffer[i]); free(txq->tsoh_buffer, M_SFXGE); } @@ -1010,12 +1012,12 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq tso.dma_addr = dma_seg->ds_addr + tso.header_len; } - id = txq->added & (SFXGE_NDESCS - 1); + id = txq->added & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, id))) - return -1; + return (-1); while (1) { - id = (id + 1) & (SFXGE_NDESCS - 1); + id = (id + 1) & txq->ptr_mask; tso_fill_packet_with_fragment(txq, &tso); /* Move onto the next fragment? */ @@ -1038,7 +1040,7 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq if (txq->n_pend_desc > SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) break; - next_id = (id + 1) & (SFXGE_NDESCS - 1); + next_id = (id + 1) & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, next_id))) break; @@ -1070,7 +1072,7 @@ sfxge_tx_qunblock(struct sfxge_txq *txq) unsigned int level; level = txq->added - txq->completed; - if (level <= SFXGE_TXQ_UNBLOCK_LEVEL) + if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries)) txq->blocked = 0; } @@ -1146,7 +1148,7 @@ sfxge_tx_qstop(struct sfxge_softc *sc, u txq->common = NULL; efx_sram_buf_tbl_clear(sc->enp, txq->buf_base_id, - EFX_TXQ_NBUFS(SFXGE_NDESCS)); + EFX_TXQ_NBUFS(sc->txq_entries)); mtx_unlock(&evq->lock); mtx_unlock(SFXGE_TXQ_LOCK(txq)); @@ -1172,8 +1174,8 @@ sfxge_tx_qstart(struct sfxge_softc *sc, /* Program the buffer table. */ if ((rc = efx_sram_buf_tbl_set(sc->enp, txq->buf_base_id, esmp, - EFX_TXQ_NBUFS(SFXGE_NDESCS))) != 0) - return rc; + EFX_TXQ_NBUFS(sc->txq_entries))) != 0) + return (rc); /* Determine the kind of queue we are creating. */ switch (txq->type) { @@ -1194,7 +1196,7 @@ sfxge_tx_qstart(struct sfxge_softc *sc, /* Create the common code transmit queue. */ if ((rc = efx_tx_qcreate(sc->enp, index, txq->type, esmp, - SFXGE_NDESCS, txq->buf_base_id, flags, evq->common, + sc->txq_entries, txq->buf_base_id, flags, evq->common, &txq->common)) != 0) goto fail; @@ -1211,8 +1213,8 @@ sfxge_tx_qstart(struct sfxge_softc *sc, fail: efx_sram_buf_tbl_clear(sc->enp, txq->buf_base_id, - EFX_TXQ_NBUFS(SFXGE_NDESCS)); - return rc; + EFX_TXQ_NBUFS(sc->txq_entries)); + return (rc); } void @@ -1280,7 +1282,7 @@ static void sfxge_tx_qfini(struct sfxge_softc *sc, unsigned int index) { struct sfxge_txq *txq; - unsigned int nmaps = SFXGE_NDESCS; + unsigned int nmaps; txq = sc->txq[index]; @@ -1292,6 +1294,7 @@ sfxge_tx_qfini(struct sfxge_softc *sc, u /* Free the context arrays. */ free(txq->pend_desc, M_SFXGE); + nmaps = sc->txq_entries; while (nmaps-- != 0) bus_dmamap_destroy(txq->packet_dma_tag, txq->stmp[nmaps].map); free(txq->stmp, M_SFXGE); @@ -1323,6 +1326,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u txq = malloc(sizeof(struct sfxge_txq), M_SFXGE, M_ZERO | M_WAITOK); txq->sc = sc; + txq->entries = sc->txq_entries; + txq->ptr_mask = txq->entries - 1; sc->txq[txq_index] = txq; esmp = &txq->mem; @@ -1330,12 +1335,12 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u evq = sc->evq[evq_index]; /* Allocate and zero DMA space for the descriptor ring. */ - if ((rc = sfxge_dma_alloc(sc, EFX_TXQ_SIZE(SFXGE_NDESCS), esmp)) != 0) + if ((rc = sfxge_dma_alloc(sc, EFX_TXQ_SIZE(sc->txq_entries), esmp)) != 0) return (rc); - (void)memset(esmp->esm_base, 0, EFX_TXQ_SIZE(SFXGE_NDESCS)); + (void)memset(esmp->esm_base, 0, EFX_TXQ_SIZE(sc->txq_entries)); /* Allocate buffer table entries. */ - sfxge_sram_buf_tbl_alloc(sc, EFX_TXQ_NBUFS(SFXGE_NDESCS), + sfxge_sram_buf_tbl_alloc(sc, EFX_TXQ_NBUFS(sc->txq_entries), &txq->buf_base_id); /* Create a DMA tag for packet mappings. */ @@ -1349,13 +1354,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u } /* Allocate pending descriptor array for batching writes. */ - txq->pend_desc = malloc(sizeof(efx_buffer_t) * SFXGE_NDESCS, + txq->pend_desc = malloc(sizeof(efx_buffer_t) * sc->txq_entries, M_SFXGE, M_ZERO | M_WAITOK); /* Allocate and initialise mbuf DMA mapping array. */ - txq->stmp = malloc(sizeof(struct sfxge_tx_mapping) * SFXGE_NDESCS, + txq->stmp = malloc(sizeof(struct sfxge_tx_mapping) * sc->txq_entries, M_SFXGE, M_ZERO | M_WAITOK); - for (nmaps = 0; nmaps < SFXGE_NDESCS; nmaps++) { + for (nmaps = 0; nmaps < sc->txq_entries; nmaps++) { rc = bus_dmamap_create(txq->packet_dma_tag, 0, &txq->stmp[nmaps].map); if (rc != 0) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 09:59:38 2015 (r280501) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:01:07 2015 (r280502) @@ -106,7 +106,7 @@ enum sfxge_txq_type { SFXGE_TXQ_NTYPES }; -#define SFXGE_TXQ_UNBLOCK_LEVEL (EFX_TXQ_LIMIT(SFXGE_NDESCS) / 4) +#define SFXGE_TXQ_UNBLOCK_LEVEL(_entries) (EFX_TXQ_LIMIT(_entries) / 4) #define SFXGE_TX_BATCH 64 @@ -128,6 +128,8 @@ struct sfxge_txq { unsigned int evq_index; efsys_mem_t mem; unsigned int buf_base_id; + unsigned int entries; + unsigned int ptr_mask; struct sfxge_tx_mapping *stmp; /* Packets in flight. */ bus_dma_tag_t packet_dma_tag; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:02:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F26595; Wed, 25 Mar 2015 10:02:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F35CD2FC; Wed, 25 Mar 2015 10:02:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PA2F18072587; Wed, 25 Mar 2015 10:02:15 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PA2FVJ072586; Wed, 25 Mar 2015 10:02:15 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251002.t2PA2FVJ072586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:02: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: r280503 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:02:16 -0000 Author: arybchik Date: Wed Mar 25 10:02:14 2015 New Revision: 280503 URL: https://svnweb.freebsd.org/changeset/base/280503 Log: MFC: 272329 Update SolarFlare driver manual page with new tunables. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: stable/10/share/man/man4/sfxge.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 ============================================================================== --- stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:01:07 2015 (r280502) +++ stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:02:14 2015 (r280503) @@ -76,6 +76,32 @@ The .Nm driver supports all 10Gb Ethernet adapters based on Solarflare SFC9000 family controllers. +.Sh LOADER TUNABLES +Tunables can be set at the +.Xr loader 8 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +Actual values can be obtained using +.Xr sysctl 8 . +.Bl -tag -width indent +.It Va hw.sfxge.rx_ring +Maximum number of descriptors in a receive queue ring. +Supported values are: 512, 1024, 2048 and 4096. +.It Va hw.sfxge.tx_ring +Maximum number of descriptors in a transmit queue ring. +Supported values are: 512, 1024, 2048 and 4096. +.It Va hw.sfxge.tx_dpl_get_max +The maximum length of the deferred packet 'get-list' for queued transmit +packets, used only if the transmit queue lock can be acquired. +If packet is dropped, \fItx_early_drops\fR counter grows and local sender +gets ENOBUFS error. +Value must be greater than 0. +.It Va hw.sfxge.tx_dpl_put_max +The maximum length of the deferred packet 'put-list' for queued transmit +packets, used if the transmit queue lock cannot be acquired. +If packet is dropped, \fItx_early_drops\fR counter grows and local sender +gets ENOBUFS error. +Value must be greater or equal to 0. .Sh SUPPORT For general information and support, go to the Solarflare support website at: From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:03:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27E6D1E8; Wed, 25 Mar 2015 10:03:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 083EA30B; Wed, 25 Mar 2015 10:03:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PA3gbU072807; Wed, 25 Mar 2015 10:03:42 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PA3gtS072804; Wed, 25 Mar 2015 10:03:42 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251003.t2PA3gtS072804@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:03:42 +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: r280504 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:03:43 -0000 Author: arybchik Date: Wed Mar 25 10:03:41 2015 New Revision: 280504 URL: https://svnweb.freebsd.org/changeset/base/280504 Log: MFC: 272330 The patch allows to check state of the software Tx queues at run time. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:02:14 2015 (r280503) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:03:41 2015 (r280504) @@ -201,6 +201,7 @@ struct sfxge_softc { struct ifnet *ifnet; unsigned int if_flags; struct sysctl_oid *stats_node; + struct sysctl_oid *txqs_node; struct task task_reset; Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:02:14 2015 (r280503) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:03:41 2015 (r280504) @@ -176,7 +176,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * KASSERT(*get_tailp == NULL, ("*get_tailp != NULL")); *stdp->std_getp = get_next; stdp->std_getp = get_tailp; - stdp->std_count += count; + stdp->std_get_count += count; } #endif /* SFXGE_HAVE_MQ */ @@ -380,7 +380,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx prefetch_read_many(txq->common); mbuf = stdp->std_get; - count = stdp->std_count; + count = stdp->std_get_count; while (count != 0) { KASSERT(mbuf != NULL, ("mbuf == NULL")); @@ -412,17 +412,17 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx if (count == 0) { KASSERT(mbuf == NULL, ("mbuf != NULL")); stdp->std_get = NULL; - stdp->std_count = 0; + stdp->std_get_count = 0; stdp->std_getp = &stdp->std_get; } else { stdp->std_get = mbuf; - stdp->std_count = count; + stdp->std_get_count = count; } if (txq->added != pushed) efx_tx_qpush(txq->common, txq->added); - KASSERT(txq->blocked || stdp->std_count == 0, + KASSERT(txq->blocked || stdp->std_get_count == 0, ("queue unblocked but count is non-zero")); } @@ -476,12 +476,12 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp->std_count >= SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + if (stdp->std_get_count >= SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) return (ENOBUFS); *(stdp->std_getp) = mbuf; stdp->std_getp = &mbuf->m_nextpkt; - stdp->std_count++; + stdp->std_get_count++; } else { volatile uintptr_t *putp; uintptr_t old; @@ -575,7 +575,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx m_freem(mbuf); } stdp->std_get = NULL; - stdp->std_count = 0; + stdp->std_get_count = 0; stdp->std_getp = &stdp->std_get; mtx_unlock(&txq->lock); @@ -1315,6 +1315,8 @@ static int sfxge_tx_qinit(struct sfxge_softc *sc, unsigned int txq_index, enum sfxge_txq_type type, unsigned int evq_index) { + char name[16]; + struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; #ifdef SFXGE_HAVE_MQ @@ -1367,6 +1369,16 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u goto fail2; } + snprintf(name, sizeof(name), "%u", txq_index); + txq_node = SYSCTL_ADD_NODE( + device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(sc->txqs_node), + OID_AUTO, name, CTLFLAG_RD, NULL, ""); + if (txq_node == NULL) { + rc = ENOMEM; + goto fail_txq_node; + } + if (type == SFXGE_TXQ_IP_TCP_UDP_CKSUM && (rc = tso_init(txq)) != 0) goto fail3; @@ -1377,6 +1389,11 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u stdp->std_getp = &stdp->std_get; mtx_init(&txq->lock, "txq", NULL, MTX_DEF); + + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_get_count", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_get_count, 0, ""); #endif txq->type = type; @@ -1387,6 +1404,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); fail3: +fail_txq_node: free(txq->pend_desc, M_SFXGE); fail2: while (nmaps-- != 0) @@ -1480,6 +1498,15 @@ sfxge_tx_init(struct sfxge_softc *sc) KASSERT(intr->state == SFXGE_INTR_INITIALIZED, ("intr->state != SFXGE_INTR_INITIALIZED")); + sc->txqs_node = SYSCTL_ADD_NODE( + device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), + OID_AUTO, "txq", CTLFLAG_RD, NULL, "Tx queues"); + if (sc->txqs_node == NULL) { + rc = ENOMEM; + goto fail_txq_node; + } + /* Initialize the transmit queues */ if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_NON_CKSUM, SFXGE_TXQ_NON_CKSUM, 0)) != 0) @@ -1509,5 +1536,6 @@ fail2: sfxge_tx_qfini(sc, SFXGE_TXQ_NON_CKSUM); fail: +fail_txq_node: return (rc); } Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:02:14 2015 (r280503) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:03:41 2015 (r280504) @@ -82,10 +82,10 @@ struct sfxge_tx_mapping { * Deferred packet list. */ struct sfxge_tx_dpl { - uintptr_t std_put; /* Head of put list. */ - struct mbuf *std_get; /* Head of get list. */ - struct mbuf **std_getp; /* Tail of get list. */ - unsigned int std_count; /* Count of packets. */ + uintptr_t std_put; /* Head of put list. */ + struct mbuf *std_get; /* Head of get list. */ + struct mbuf **std_getp; /* Tail of get list. */ + unsigned int std_get_count; /* Packets in get list. */ }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:05:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3210E33D; Wed, 25 Mar 2015 10:05:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12A87322; Wed, 25 Mar 2015 10:05:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PA5KTm073095; Wed, 25 Mar 2015 10:05:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PA5K7a073093; Wed, 25 Mar 2015 10:05:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251005.t2PA5K7a073093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:05: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: r280505 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:05:21 -0000 Author: arybchik Date: Wed Mar 25 10:05:19 2015 New Revision: 280505 URL: https://svnweb.freebsd.org/changeset/base/280505 Log: MFC: 272331 Support tunable to control Tx deferred packet list limits Also increase default for Tx queue get-list limit. Too small limit results in TCP packets drops especiall when many streams are running simultaneously. Put list may be kept small enough since it is just a temporary location if transmit function can't get Tx queue lock. Submitted by: Andrew Rybchenko Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:03:41 2015 (r280504) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:05:19 2015 (r280505) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -77,6 +78,25 @@ __FBSDID("$FreeBSD$"); #define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) #define SFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) +#ifdef SFXGE_HAVE_MQ + +#define SFXGE_PARAM_TX_DPL_GET_MAX SFXGE_PARAM(tx_dpl_get_max) +static int sfxge_tx_dpl_get_max = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT; +TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_MAX, &sfxge_tx_dpl_get_max); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_max, CTLFLAG_RDTUN, + &sfxge_tx_dpl_get_max, 0, + "Maximum number of packets in deferred packet get-list"); + +#define SFXGE_PARAM_TX_DPL_PUT_MAX SFXGE_PARAM(tx_dpl_put_max) +static int sfxge_tx_dpl_put_max = SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT; +TUNABLE_INT(SFXGE_PARAM_TX_DPL_PUT_MAX, &sfxge_tx_dpl_put_max); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_put_max, CTLFLAG_RDTUN, + &sfxge_tx_dpl_put_max, 0, + "Maximum number of packets in deferred packet put-list"); + +#endif + + /* Forward declarations. */ static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); @@ -476,7 +496,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp->std_get_count >= SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT) + if (stdp->std_get_count >= stdp->std_get_max) return (ENOBUFS); *(stdp->std_getp) = mbuf; @@ -498,7 +518,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, old_len = mp->m_pkthdr.csum_data; } else old_len = 0; - if (old_len >= SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT) + if (old_len >= stdp->std_put_max) return (ENOBUFS); mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; @@ -1384,8 +1404,23 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u goto fail3; #ifdef SFXGE_HAVE_MQ + if (sfxge_tx_dpl_get_max <= 0) { + log(LOG_ERR, "%s=%d must be greater than 0", + SFXGE_PARAM_TX_DPL_GET_MAX, sfxge_tx_dpl_get_max); + rc = EINVAL; + goto fail_tx_dpl_get_max; + } + if (sfxge_tx_dpl_put_max < 0) { + log(LOG_ERR, "%s=%d must be greater or equal to 0", + SFXGE_PARAM_TX_DPL_PUT_MAX, sfxge_tx_dpl_put_max); + rc = EINVAL; + goto fail_tx_dpl_put_max; + } + /* Initialize the deferred packet list. */ stdp = &txq->dpl; + stdp->std_put_max = sfxge_tx_dpl_put_max; + stdp->std_get_max = sfxge_tx_dpl_get_max; stdp->std_getp = &stdp->std_get; mtx_init(&txq->lock, "txq", NULL, MTX_DEF); @@ -1403,6 +1438,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_tx_dpl_put_max: +fail_tx_dpl_get_max: fail3: fail_txq_node: free(txq->pend_desc, M_SFXGE); Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:03:41 2015 (r280504) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:05:19 2015 (r280505) @@ -75,13 +75,17 @@ struct sfxge_tx_mapping { enum sfxge_tx_buf_flags flags; }; -#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 64 +#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 1024 #define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 /* * Deferred packet list. */ struct sfxge_tx_dpl { + unsigned int std_get_max; /* Maximum number of packets + * in get list */ + unsigned int std_put_max; /* Maximum number of packets + * in put list */ uintptr_t std_put; /* Head of put list. */ struct mbuf *std_get; /* Head of get list. */ struct mbuf **std_getp; /* Tail of get list. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:06:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 921CA485; Wed, 25 Mar 2015 10:06:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61C09335; Wed, 25 Mar 2015 10:06:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PA6R6X073281; Wed, 25 Mar 2015 10:06:27 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PA6RhI073280; Wed, 25 Mar 2015 10:06:27 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251006.t2PA6RhI073280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:06: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: r280506 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:06:27 -0000 Author: arybchik Date: Wed Mar 25 10:06:26 2015 New Revision: 280506 URL: https://svnweb.freebsd.org/changeset/base/280506 Log: MFC: 272377 Some cleanup for sfxge.4 Use standard mdoc macros instead of pure roff, fix some other mdoc usage, make the style consistent, and fix some grammar issues. Approved by: hrs (mentor) Modified: stable/10/share/man/man4/sfxge.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 ============================================================================== --- stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:05:19 2015 (r280505) +++ stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:06:26 2015 (r280506) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2012 +.Dd September 30, 2014 .Dt SFXGE 4 .Os .Sh NAME @@ -85,23 +85,30 @@ Actual values can be obtained using .Xr sysctl 8 . .Bl -tag -width indent .It Va hw.sfxge.rx_ring -Maximum number of descriptors in a receive queue ring. +The maximum number of descriptors in a receive queue ring. Supported values are: 512, 1024, 2048 and 4096. .It Va hw.sfxge.tx_ring -Maximum number of descriptors in a transmit queue ring. +The maximum number of descriptors in a transmit queue ring. Supported values are: 512, 1024, 2048 and 4096. .It Va hw.sfxge.tx_dpl_get_max -The maximum length of the deferred packet 'get-list' for queued transmit +The maximum length of the deferred packet +.Dq get-list +for queued transmit packets, used only if the transmit queue lock can be acquired. -If packet is dropped, \fItx_early_drops\fR counter grows and local sender -gets ENOBUFS error. -Value must be greater than 0. +If a packet is dropped, the +.Va tx_early_drops +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than 0. .It Va hw.sfxge.tx_dpl_put_max -The maximum length of the deferred packet 'put-list' for queued transmit +The maximum length of the deferred packet +.Dq put-list +for queued transmit packets, used if the transmit queue lock cannot be acquired. -If packet is dropped, \fItx_early_drops\fR counter grows and local sender -gets ENOBUFS error. -Value must be greater or equal to 0. +If a packet is dropped, the +.Va tx_early_drops +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than or equal to 0. +.El .Sh SUPPORT For general information and support, go to the Solarflare support website at: From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:08:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 406385EF; Wed, 25 Mar 2015 10:08:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AC52354; Wed, 25 Mar 2015 10:08:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PA8TvW073572; Wed, 25 Mar 2015 10:08:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PA8Tc6073571; Wed, 25 Mar 2015 10:08:29 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251008.t2PA8Tc6073571@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:08: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: r280507 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:08:29 -0000 Author: arybchik Date: Wed Mar 25 10:08:28 2015 New Revision: 280507 URL: https://svnweb.freebsd.org/changeset/base/280507 Log: MFC: 272411 Properly handle a case that should never happen (the bus_dma callback being called with error set to non-zero). Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:06:26 2015 (r280506) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:08:28 2015 (r280507) @@ -160,11 +160,14 @@ sfxge_dma_alloc(struct sfxge_softc *sc, /* * The callback gets error information about the mapping - * and will have set our vaddr to NULL if something went + * and will have set esm_addr to 0 if something went * wrong. */ - if (vaddr == NULL) + if (esmp->esm_addr == 0) { + bus_dmamem_free(esmp->esm_tag, esmp->esm_base, esmp->esm_map); + bus_dma_tag_destroy(esmp->esm_tag); return (ENOMEM); + } esmp->esm_base = vaddr; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:11:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B638782; Wed, 25 Mar 2015 10:11:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C2D15F2; Wed, 25 Mar 2015 10:11:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PABJgR074665; Wed, 25 Mar 2015 10:11:19 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PABIep074661; Wed, 25 Mar 2015 10:11:18 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251011.t2PABIep074661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:11: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: r280508 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:11:19 -0000 Author: arybchik Date: Wed Mar 25 10:11:17 2015 New Revision: 280508 URL: https://svnweb.freebsd.org/changeset/base/280508 Log: MFC: 277884 sfxge: Change sfxge_ev_qpoll() proto to avoid EVQ pointers array access It was the only place on data path where sc->evq array is accessed. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_intr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:11:17 2015 (r280508) @@ -280,7 +280,7 @@ extern int sfxge_ev_init(struct sfxge_so extern void sfxge_ev_fini(struct sfxge_softc *sc); extern int sfxge_ev_start(struct sfxge_softc *sc); extern void sfxge_ev_stop(struct sfxge_softc *sc); -extern int sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index); +extern int sfxge_ev_qpoll(struct sfxge_evq *evq); /* * From sfxge_intr.c. Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:11:17 2015 (r280508) @@ -564,13 +564,10 @@ static const efx_ev_callbacks_t sfxge_ev int -sfxge_ev_qpoll(struct sfxge_softc *sc, unsigned int index) +sfxge_ev_qpoll(struct sfxge_evq *evq) { - struct sfxge_evq *evq; int rc; - evq = sc->evq[index]; - mtx_lock(&evq->lock); if (evq->init_state != SFXGE_EVQ_STARTING && Modified: stable/10/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 10:08:28 2015 (r280507) +++ stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 10:11:17 2015 (r280508) @@ -106,9 +106,8 @@ static void sfxge_intr_line(void *arg) { struct sfxge_evq *evq = arg; - struct sfxge_softc *sc = evq->sc; - (void)sfxge_ev_qpoll(sc, 0); + (void)sfxge_ev_qpoll(evq); } static void @@ -142,7 +141,7 @@ sfxge_intr_message(void *arg) return; } - (void)sfxge_ev_qpoll(sc, index); + (void)sfxge_ev_qpoll(evq); } static int From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:12:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 556578BD; Wed, 25 Mar 2015 10:12:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FB135FE; Wed, 25 Mar 2015 10:12:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PACEk6077633; Wed, 25 Mar 2015 10:12:14 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PACEQ2077632; Wed, 25 Mar 2015 10:12:14 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251012.t2PACEQ2077632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:12:14 +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: r280509 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:12:14 -0000 Author: arybchik Date: Wed Mar 25 10:12:13 2015 New Revision: 280509 URL: https://svnweb.freebsd.org/changeset/base/280509 Log: MFC: 277885 sfxge: Move txq->next pointer to part writable on completion path In fact the pointer is used only if more than one TXQ is processed in one interrupt. It is used (read-write) on completion path only. Also it makes the first part of the structure smaller and it fits now into one 128byte cache line. So, TXQ structure becomes 128 bytes smaller. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:11:17 2015 (r280508) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:12:13 2015 (r280509) @@ -139,7 +139,6 @@ struct sfxge_txq { bus_dma_tag_t packet_dma_tag; efx_buffer_t *pend_desc; efx_txq_t *common; - struct sfxge_txq *next; efsys_mem_t *tsoh_buffer; @@ -173,6 +172,7 @@ struct sfxge_txq { */ unsigned int pending __aligned(CACHE_LINE_SIZE); unsigned int completed; + struct sfxge_txq *next; }; extern int sfxge_tx_packet_add(struct sfxge_txq *, struct mbuf *); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:13:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D48F5A08; Wed, 25 Mar 2015 10:13:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE89160B; Wed, 25 Mar 2015 10:13:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PADLnQ077826; Wed, 25 Mar 2015 10:13:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PADKdS077819; Wed, 25 Mar 2015 10:13:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251013.t2PADKdS077819@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10: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: r280510 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:13:22 -0000 Author: arybchik Date: Wed Mar 25 10:13:19 2015 New Revision: 280510 URL: https://svnweb.freebsd.org/changeset/base/280510 Log: MFC: 277886 sfxge: Make it possible to build without EVQ statistics Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:13:19 2015 (r280510) @@ -995,6 +995,7 @@ fail1: return (rc); } +#if EFSYS_OPT_QSTATS #if EFSYS_OPT_NAMES /* START MKCONFIG GENERATED EfxEventQueueStatNamesBlock 67e9bdcd920059bd */ static const char __cs * __cs __efx_ev_qstat_name[] = { @@ -1052,6 +1053,7 @@ efx_ev_qstat_name( return (__efx_ev_qstat_name[id]); } #endif /* EFSYS_OPT_NAMES */ +#endif /* EFSYS_OPT_QSTATS */ #if EFSYS_OPT_QSTATS void Modified: stable/10/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 10:13:19 2015 (r280510) @@ -358,6 +358,7 @@ fail1: return (rc); } +#if EFSYS_OPT_QSTATS #if EFSYS_OPT_NAMES /* START MKCONFIG GENERATED EfxTransmitQueueStatNamesBlock 78ca9ab00287fffb */ static const char __cs * __cs __efx_tx_qstat_name[] = { @@ -378,6 +379,7 @@ efx_tx_qstat_name( return (__efx_tx_qstat_name[id]); } #endif /* EFSYS_OPT_NAMES */ +#endif /* EFSYS_OPT_QSTATS */ #if EFSYS_OPT_QSTATS void Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:13:19 2015 (r280510) @@ -224,8 +224,10 @@ struct sfxge_softc { struct sfxge_evq *evq[SFXGE_RX_SCALE_MAX]; unsigned int ev_moderation; +#if EFSYS_OPT_QSTATS clock_t ev_stats_update_time; uint64_t ev_stats[EV_NQSTATS]; +#endif uma_zone_t rxq_cache; struct sfxge_rxq *rxq[SFXGE_RX_SCALE_MAX]; Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:12:13 2015 (r280509) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:13:19 2015 (r280510) @@ -401,6 +401,8 @@ sfxge_ev_wake_up(void *arg, uint32_t ind return (B_FALSE); } +#if EFSYS_OPT_QSTATS + static void sfxge_ev_stat_update(struct sfxge_softc *sc) { @@ -462,6 +464,8 @@ sfxge_ev_stat_init(struct sfxge_softc *s } } +#endif /* EFSYS_OPT_QSTATS */ + static void sfxge_ev_qmoderate(struct sfxge_softc *sc, unsigned int idx, unsigned int us) { @@ -622,8 +626,10 @@ sfxge_ev_qstop(struct sfxge_softc *sc, u evq->read_ptr = 0; evq->exception = B_FALSE; +#if EFSYS_OPT_QSTATS /* Add event counts before discarding the common evq state */ efx_ev_qstats_update(evq->common, sc->ev_stats); +#endif efx_ev_qdestroy(evq->common); efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, @@ -878,7 +884,9 @@ sfxge_ev_init(struct sfxge_softc *sc) goto fail; } +#if EFSYS_OPT_QSTATS sfxge_ev_stat_init(sc); +#endif return (0); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:14:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 952B3B47; Wed, 25 Mar 2015 10:14:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65A05618; Wed, 25 Mar 2015 10:14:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAEVn0078032; Wed, 25 Mar 2015 10:14:31 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAEVjD078031; Wed, 25 Mar 2015 10:14:31 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251014.t2PAEVjD078031@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:14: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: r280511 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:14:31 -0000 Author: arybchik Date: Wed Mar 25 10:14:30 2015 New Revision: 280511 URL: https://svnweb.freebsd.org/changeset/base/280511 Log: MFC: 277887 sfxge: Remove extra cache-line alignment and reorder sfxge_evq_t Remove the first member alignment to cacheline since it is nop. Use __aligned() for the whole structure to make sure that the structure size is cacheline aligned. Remove lock alignment to make the structure smaller and fit all members used on event queue processing into one cacheline (128 bytes) on x86-64. The lock is obtained as well from different context when event queue statistics are retrived from sysctl context, but it is infrequent. Reorder members to avoid padding and go in usage order on event processing. As the result all structure members used on event queue processing fit into exactly one cacheline (128 byte) now. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:13:19 2015 (r280510) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:14:30 2015 (r280511) @@ -102,26 +102,26 @@ enum sfxge_evq_state { #define SFXGE_EV_BATCH 16384 struct sfxge_evq { - struct sfxge_softc *sc __aligned(CACHE_LINE_SIZE); - struct mtx lock __aligned(CACHE_LINE_SIZE); - - enum sfxge_evq_state init_state; + /* Structure members below are sorted by usage order */ + struct sfxge_softc *sc; + struct mtx lock; unsigned int index; - unsigned int entries; + enum sfxge_evq_state init_state; efsys_mem_t mem; - unsigned int buf_base_id; - - boolean_t exception; - efx_evq_t *common; unsigned int read_ptr; + boolean_t exception; unsigned int rx_done; unsigned int tx_done; /* Linked list of TX queues with completions to process */ struct sfxge_txq *txq; struct sfxge_txq **txqs; -}; + + /* Structure members not used on event processing path */ + unsigned int buf_base_id; + unsigned int entries; +} __aligned(CACHE_LINE_SIZE); #define SFXGE_NDESCS 1024 #define SFXGE_MODERATION 30 From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:16:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0AD65CDE; Wed, 25 Mar 2015 10:16:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFA6C655; Wed, 25 Mar 2015 10:16:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAGYwF078377; Wed, 25 Mar 2015 10:16:34 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAGYZ8078376; Wed, 25 Mar 2015 10:16:34 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251016.t2PAGYZ8078376@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:16:34 +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: r280512 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:16:35 -0000 Author: arybchik Date: Wed Mar 25 10:16:33 2015 New Revision: 280512 URL: https://svnweb.freebsd.org/changeset/base/280512 Log: MFC: 277888 sfxge: fixed TSO code to cope with VLAN headers Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:14:30 2015 (r280511) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:16:33 2015 (r280512) @@ -854,9 +854,7 @@ static void tso_start(struct sfxge_tso_s tso->tcph_off = tso->nh_off + sizeof(struct ip6_hdr); } - /* We assume all headers are linear in the head mbuf */ tso->header_len = tso->tcph_off + 4 * tso_tcph(tso)->th_off; - KASSERT(tso->header_len <= mbuf->m_len, ("packet headers fragmented")); tso->full_packet_size = tso->header_len + mbuf->m_pkthdr.tso_segsz; tso->seqnum = ntohl(tso_tcph(tso)->th_seq); @@ -971,7 +969,7 @@ static int tso_start_new_packet(struct s tsoh_th = (struct tcphdr *)(header + tso->tcph_off); /* Copy and update the headers. */ - memcpy(header, tso->mbuf->m_data, tso->header_len); + m_copydata(tso->mbuf, 0, tso->header_len, header); tsoh_th->th_seq = htonl(tso->seqnum); tso->seqnum += tso->mbuf->m_pkthdr.tso_segsz; @@ -1017,20 +1015,18 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq { struct sfxge_tso_state tso; unsigned int id, next_id; + unsigned skipped = 0; tso_start(&tso, mbuf); - /* Grab the first payload fragment. */ - if (dma_seg->ds_len == tso.header_len) { + while (dma_seg->ds_len + skipped <= tso.header_len) { + skipped += dma_seg->ds_len; --n_dma_seg; KASSERT(n_dma_seg, ("no payload found in TSO packet")); ++dma_seg; - tso.in_len = dma_seg->ds_len; - tso.dma_addr = dma_seg->ds_addr; - } else { - tso.in_len = dma_seg->ds_len - tso.header_len; - tso.dma_addr = dma_seg->ds_addr + tso.header_len; } + tso.in_len = dma_seg->ds_len + (tso.header_len - skipped); + tso.dma_addr = dma_seg->ds_addr + (tso.header_len - skipped); id = txq->added & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, id))) From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:17:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2485DE34; Wed, 25 Mar 2015 10:17:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03FEA669; Wed, 25 Mar 2015 10:17:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAHPC4078544; Wed, 25 Mar 2015 10:17:25 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAHPQs078541; Wed, 25 Mar 2015 10:17:25 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251017.t2PAHPQs078541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:17:25 +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: r280513 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:17:26 -0000 Author: arybchik Date: Wed Mar 25 10:17:24 2015 New Revision: 280513 URL: https://svnweb.freebsd.org/changeset/base/280513 Log: MFC: 277889 sfxge: Add evq argument to sfxge_tx_qcomplete() It removes necessity to get evq pointer by its index in soft context. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:16:33 2015 (r280512) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:17:24 2015 (r280513) @@ -63,7 +63,7 @@ sfxge_ev_qcomplete(struct sfxge_evq *evq ("txq->evq_index != index")); if (txq->pending != txq->completed) - sfxge_tx_qcomplete(txq); + sfxge_tx_qcomplete(txq, evq); txq = next; } while (txq != NULL); @@ -257,7 +257,7 @@ sfxge_ev_tx(void *arg, uint32_t label, u } if (txq->pending - txq->completed >= SFXGE_TX_BATCH) - sfxge_tx_qcomplete(txq); + sfxge_tx_qcomplete(txq, evq); done: return (evq->tx_done >= SFXGE_EV_BATCH); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:16:33 2015 (r280512) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:17:24 2015 (r280513) @@ -105,15 +105,10 @@ static int sfxge_tx_queue_tso(struct sfx const bus_dma_segment_t *dma_seg, int n_dma_seg); void -sfxge_tx_qcomplete(struct sfxge_txq *txq) +sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq) { - struct sfxge_softc *sc; - struct sfxge_evq *evq; unsigned int completed; - sc = txq->sc; - evq = sc->evq[txq->evq_index]; - mtx_assert(&evq->lock, MA_OWNED); completed = txq->completed; @@ -1146,7 +1141,7 @@ sfxge_tx_qstop(struct sfxge_softc *sc, u txq->blocked = 0; txq->pending = txq->added; - sfxge_tx_qcomplete(txq); + sfxge_tx_qcomplete(txq, evq); KASSERT(txq->completed == txq->added, ("txq->completed != txq->added")); Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:16:33 2015 (r280512) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:17:24 2015 (r280513) @@ -175,13 +175,15 @@ struct sfxge_txq { struct sfxge_txq *next; }; +struct sfxge_evq; + extern int sfxge_tx_packet_add(struct sfxge_txq *, struct mbuf *); extern int sfxge_tx_init(struct sfxge_softc *sc); extern void sfxge_tx_fini(struct sfxge_softc *sc); extern int sfxge_tx_start(struct sfxge_softc *sc); extern void sfxge_tx_stop(struct sfxge_softc *sc); -extern void sfxge_tx_qcomplete(struct sfxge_txq *txq); +extern void sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq); extern void sfxge_tx_qflush_done(struct sfxge_txq *txq); #ifdef SFXGE_HAVE_MQ extern void sfxge_if_qflush(struct ifnet *ifp); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:18:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2C71F76; Wed, 25 Mar 2015 10:18:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD513676; Wed, 25 Mar 2015 10:18:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAIO9t078731; Wed, 25 Mar 2015 10:18:24 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAIOt0078730; Wed, 25 Mar 2015 10:18:24 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251018.t2PAIOt0078730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:18:24 +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: r280514 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:18:24 -0000 Author: arybchik Date: Wed Mar 25 10:18:23 2015 New Revision: 280514 URL: https://svnweb.freebsd.org/changeset/base/280514 Log: MFC: 277890 sfxge: Do not bzero() DMA allocated memory once again sfxge_dma_alloc() calls bus_dmamem_alloc() with BUS_DMA_ZERO flag, so allocated memory is already filled in by zeros Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:17:24 2015 (r280513) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:18:23 2015 (r280514) @@ -583,7 +583,6 @@ sfxge_port_init(struct sfxge_softc *sc) M_SFXGE, M_WAITOK | M_ZERO); if ((rc = sfxge_dma_alloc(sc, EFX_PHY_STATS_SIZE, phy_stats_buf)) != 0) goto fail; - bzero(phy_stats_buf->esm_base, phy_stats_buf->esm_size); sfxge_phy_stat_init(sc); sysctl_ctx = device_get_sysctl_ctx(sc->dev); @@ -605,7 +604,6 @@ sfxge_port_init(struct sfxge_softc *sc) M_SFXGE, M_WAITOK | M_ZERO); if ((rc = sfxge_dma_alloc(sc, EFX_MAC_STATS_SIZE, mac_stats_buf)) != 0) goto fail2; - bzero(mac_stats_buf->esm_base, mac_stats_buf->esm_size); sfxge_mac_stat_init(sc); port->init_state = SFXGE_PORT_INITIALIZED; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:19:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 359A514A; Wed, 25 Mar 2015 10:19:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FEB7685; Wed, 25 Mar 2015 10:19:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAJhED078929; Wed, 25 Mar 2015 10:19:43 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAJhFM078928; Wed, 25 Mar 2015 10:19:43 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251019.t2PAJhFM078928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:19:43 +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: r280515 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:19:44 -0000 Author: arybchik Date: Wed Mar 25 10:19:43 2015 New Revision: 280515 URL: https://svnweb.freebsd.org/changeset/base/280515 Log: MFC: 277891 sfxge: Remove unused esm_size member of the efsys_mem_t structure esm_size is not even initialized properly when memory is allocated. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:18:23 2015 (r280514) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:19:43 2015 (r280515) @@ -370,7 +370,6 @@ typedef struct efsys_mem_s { bus_dmamap_t esm_map; caddr_t esm_base; efsys_dma_addr_t esm_addr; - size_t esm_size; } efsys_mem_t; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:20:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8B30B292; Wed, 25 Mar 2015 10:20:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 75DC077C; Wed, 25 Mar 2015 10:20:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAKhqA080227; Wed, 25 Mar 2015 10:20:43 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAKhVn080226; Wed, 25 Mar 2015 10:20:43 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251020.t2PAKhVn080226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:20:43 +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: r280516 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:20:43 -0000 Author: arybchik Date: Wed Mar 25 10:20:42 2015 New Revision: 280516 URL: https://svnweb.freebsd.org/changeset/base/280516 Log: MFC: 277892 sfxge: Pass correct address to free allocated memory in the case of load error Most likely is was just memory leak on the error handling path since typically efsys_mem_t is filled in by zeros on allocation. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:19:43 2015 (r280515) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 10:20:42 2015 (r280516) @@ -153,7 +153,7 @@ sfxge_dma_alloc(struct sfxge_softc *sc, if (bus_dmamap_load(esmp->esm_tag, esmp->esm_map, vaddr, len, sfxge_dma_cb, &esmp->esm_addr, 0) != 0) { device_printf(sc->dev, "Couldn't load DMA mapping\n"); - bus_dmamem_free(esmp->esm_tag, esmp->esm_base, esmp->esm_map); + bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map); bus_dma_tag_destroy(esmp->esm_tag); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:21:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3CF23E4; Wed, 25 Mar 2015 10:21:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE0B7789; Wed, 25 Mar 2015 10:21:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PALhNt080868; Wed, 25 Mar 2015 10:21:43 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PALheD080867; Wed, 25 Mar 2015 10:21:43 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251021.t2PALheD080867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:21:43 +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: r280517 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:21:43 -0000 Author: arybchik Date: Wed Mar 25 10:21:42 2015 New Revision: 280517 URL: https://svnweb.freebsd.org/changeset/base/280517 Log: MFC: 277893 sfxge: Use SFXGE_MODERATION to initialize event moderation Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:20:42 2015 (r280516) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:21:42 2015 (r280517) @@ -870,7 +870,7 @@ sfxge_ev_init(struct sfxge_softc *sc) /* Set default interrupt moderation; add a sysctl to * read and change it. */ - sc->ev_moderation = 30; + sc->ev_moderation = SFXGE_MODERATION; SYSCTL_ADD_PROC(sysctl_ctx, SYSCTL_CHILDREN(sysctl_tree), OID_AUTO, "int_mod", CTLTYPE_UINT|CTLFLAG_RW, sc, 0, sfxge_int_mod_handler, "IU", From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:23:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA66E537; Wed, 25 Mar 2015 10:23:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B39C7A8; Wed, 25 Mar 2015 10:23:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAN2bi082967; Wed, 25 Mar 2015 10:23:02 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAN1aX082962; Wed, 25 Mar 2015 10:23:01 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251023.t2PAN1aX082962@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:23: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: r280518 - in stable/10: share/man/man4 sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:23:02 -0000 Author: arybchik Date: Wed Mar 25 10:23:00 2015 New Revision: 280518 URL: https://svnweb.freebsd.org/changeset/base/280518 Log: MFC: 277894 sfxge: implemented parameter to restrict RSS channels Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_intr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 ============================================================================== --- stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:21:42 2015 (r280517) +++ stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:23:00 2015 (r280518) @@ -108,6 +108,10 @@ If a packet is dropped, the .Va tx_early_drops counter is incremented and the local sender receives ENOBUFS. The value must be greater than or equal to 0. +.It Va hw.sfxge.N.max_rss_channels +The maximum number of allocated RSS channels for the Nth adapter. +If set to 0 or unset, the number of channels is determined by the number +of CPU cores. .El .Sh SUPPORT For general information and support, Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:21:42 2015 (r280517) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:23:00 2015 (r280518) @@ -396,11 +396,18 @@ sfxge_create(struct sfxge_softc *sc) device_t dev; efx_nic_t *enp; int error; + char rss_param_name[sizeof(SFXGE_PARAM(%d.max_rss_channels))]; dev = sc->dev; sx_init(&sc->softc_lock, "sfxge_softc"); + sc->max_rss_channels = 0; + snprintf(rss_param_name, sizeof(rss_param_name), + SFXGE_PARAM(%d.max_rss_channels), + (int)device_get_unit(dev)); + TUNABLE_INT_FETCH(rss_param_name, &sc->max_rss_channels); + sc->stats_node = SYSCTL_ADD_NODE( device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:21:42 2015 (r280517) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:23:00 2015 (r280518) @@ -229,6 +229,7 @@ struct sfxge_softc { uint64_t ev_stats[EV_NQSTATS]; #endif + unsigned int max_rss_channels; uma_zone_t rxq_cache; struct sfxge_rxq *rxq[SFXGE_RX_SCALE_MAX]; unsigned int rx_indir_table[SFXGE_RX_SCALE_MAX]; Modified: stable/10/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 10:21:42 2015 (r280517) +++ stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 10:23:00 2015 (r280518) @@ -298,6 +298,9 @@ sfxge_intr_setup_msix(struct sfxge_softc if (count > EFX_MAXRSS) count = EFX_MAXRSS; + if (sc->max_rss_channels > 0 && count > sc->max_rss_channels) + count = sc->max_rss_channels; + rid = PCIR_BAR(4); resp = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (resp == NULL) From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:25:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 191496CC; Wed, 25 Mar 2015 10:25:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F40C27EC; Wed, 25 Mar 2015 10:25:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAPkT1083364; Wed, 25 Mar 2015 10:25:46 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAPkbi083358; Wed, 25 Mar 2015 10:25:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251025.t2PAPkbi083358@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:25:46 +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: r280519 - in stable/10: share/man/man4 sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:25:47 -0000 Author: arybchik Date: Wed Mar 25 10:25:45 2015 New Revision: 280519 URL: https://svnweb.freebsd.org/changeset/base/280519 Log: MFC: 277895 sfxge: Separate software Tx queue limit for non-TCP traffic Add separate software Tx queue limit for non-TCP traffic to make total limit higher and avoid local drops of TCP packets because of no backpressure. There is no point to make non-TCP limit high since without backpressure UDP stream easily overflows any sensible limit. Split early drops statistics since it is better to have separate counter for each drop reason to make it unabmiguous. Add software Tx queue high watermark. The information is very useful to understand how big queues grow under traffic load. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 ============================================================================== --- stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:23:00 2015 (r280518) +++ stable/10/share/man/man4/sfxge.4 Wed Mar 25 10:25:45 2015 (r280519) @@ -93,10 +93,18 @@ Supported values are: 512, 1024, 2048 an .It Va hw.sfxge.tx_dpl_get_max The maximum length of the deferred packet .Dq get-list -for queued transmit -packets, used only if the transmit queue lock can be acquired. +for queued transmit packets (TCP and non-TCP), used only if the transmit +queue lock can be acquired. If a packet is dropped, the -.Va tx_early_drops +.Va tx_get_overflow +counter is incremented and the local sender receives ENOBUFS. +The value must be greater than 0. +.It Va hw.sfxge.tx_dpl_get_non_tcp_max +The maximum number of non-TCP packets in the deferred packet +.Dq get-list +, used only if the transmit queue lock can be acquired. +If packet is dropped, the +.Va tx_get_non_tcp_overflow counter is incremented and the local sender receives ENOBUFS. The value must be greater than 0. .It Va hw.sfxge.tx_dpl_put_max @@ -105,7 +113,7 @@ The maximum length of the deferred packe for queued transmit packets, used if the transmit queue lock cannot be acquired. If a packet is dropped, the -.Va tx_early_drops +.Va tx_put_overflow counter is incremented and the local sender receives ENOBUFS. The value must be greater than or equal to 0. .It Va hw.sfxge.N.max_rss_channels Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:23:00 2015 (r280518) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:25:45 2015 (r280519) @@ -85,14 +85,23 @@ static int sfxge_tx_dpl_get_max = SFXGE_ TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_MAX, &sfxge_tx_dpl_get_max); SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_max, CTLFLAG_RDTUN, &sfxge_tx_dpl_get_max, 0, - "Maximum number of packets in deferred packet get-list"); + "Maximum number of any packets in deferred packet get-list"); + +#define SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX \ + SFXGE_PARAM(tx_dpl_get_non_tcp_max) +static int sfxge_tx_dpl_get_non_tcp_max = + SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT; +TUNABLE_INT(SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX, &sfxge_tx_dpl_get_non_tcp_max); +SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_get_non_tcp_max, CTLFLAG_RDTUN, + &sfxge_tx_dpl_get_non_tcp_max, 0, + "Maximum number of non-TCP packets in deferred packet get-list"); #define SFXGE_PARAM_TX_DPL_PUT_MAX SFXGE_PARAM(tx_dpl_put_max) static int sfxge_tx_dpl_put_max = SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT; TUNABLE_INT(SFXGE_PARAM_TX_DPL_PUT_MAX, &sfxge_tx_dpl_put_max); SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_put_max, CTLFLAG_RDTUN, &sfxge_tx_dpl_put_max, 0, - "Maximum number of packets in deferred packet put-list"); + "Maximum number of any packets in deferred packet put-list"); #endif @@ -147,6 +156,15 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq #ifdef SFXGE_HAVE_MQ +static inline unsigned int +sfxge_is_mbuf_non_tcp(struct mbuf *mbuf) +{ + /* Absense of TCP checksum flags does not mean that it is non-TCP + * but it should be true if user wants to achieve high throughput. + */ + return (!(mbuf->m_pkthdr.csum_flags & (CSUM_IP_TCP | CSUM_IP6_TCP))); +} + /* * Reorder the put list and append it to the get list. */ @@ -158,6 +176,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * volatile uintptr_t *putp; uintptr_t put; unsigned int count; + unsigned int non_tcp_count; mtx_assert(&txq->lock, MA_OWNED); @@ -176,9 +195,11 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * get_next = NULL; count = 0; + non_tcp_count = 0; do { struct mbuf *put_next; + non_tcp_count += sfxge_is_mbuf_non_tcp(mbuf); put_next = mbuf->m_nextpkt; mbuf->m_nextpkt = get_next; get_next = mbuf; @@ -192,6 +213,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * *stdp->std_getp = get_next; stdp->std_getp = get_tailp; stdp->std_get_count += count; + stdp->std_get_non_tcp_count += non_tcp_count; } #endif /* SFXGE_HAVE_MQ */ @@ -382,6 +404,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx struct sfxge_tx_dpl *stdp; struct mbuf *mbuf, *next; unsigned int count; + unsigned int non_tcp_count; unsigned int pushed; int rc; @@ -396,6 +419,10 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx mbuf = stdp->std_get; count = stdp->std_get_count; + non_tcp_count = stdp->std_get_non_tcp_count; + + if (count > stdp->std_get_hiwat) + stdp->std_get_hiwat = count; while (count != 0) { KASSERT(mbuf != NULL, ("mbuf == NULL")); @@ -410,6 +437,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx rc = sfxge_tx_queue_mbuf(txq, mbuf); --count; + non_tcp_count -= sfxge_is_mbuf_non_tcp(mbuf); mbuf = next; if (rc != 0) continue; @@ -426,12 +454,16 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx if (count == 0) { KASSERT(mbuf == NULL, ("mbuf != NULL")); + KASSERT(non_tcp_count == 0, + ("inconsistent TCP/non-TCP detection")); stdp->std_get = NULL; stdp->std_get_count = 0; + stdp->std_get_non_tcp_count = 0; stdp->std_getp = &stdp->std_get; } else { stdp->std_get = mbuf; stdp->std_get_count = count; + stdp->std_get_non_tcp_count = non_tcp_count; } if (txq->added != pushed) @@ -491,8 +523,18 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, sfxge_tx_qdpl_swizzle(txq); - if (stdp->std_get_count >= stdp->std_get_max) + if (stdp->std_get_count >= stdp->std_get_max) { + txq->get_overflow++; return (ENOBUFS); + } + if (sfxge_is_mbuf_non_tcp(mbuf)) { + if (stdp->std_get_non_tcp_count >= + stdp->std_get_non_tcp_max) { + txq->get_non_tcp_overflow++; + return (ENOBUFS); + } + stdp->std_get_non_tcp_count++; + } *(stdp->std_getp) = mbuf; stdp->std_getp = &mbuf->m_nextpkt; @@ -513,8 +555,10 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, old_len = mp->m_pkthdr.csum_data; } else old_len = 0; - if (old_len >= stdp->std_put_max) + if (old_len >= stdp->std_put_max) { + atomic_add_long(&txq->put_overflow, 1); return (ENOBUFS); + } mbuf->m_pkthdr.csum_data = old_len + 1; mbuf->m_nextpkt = (void *)old; } while (atomic_cmpset_ptr(putp, old, new) == 0); @@ -535,6 +579,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx if (!SFXGE_LINK_UP(txq->sc)) { rc = ENETDOWN; + atomic_add_long(&txq->netdown_drops, 1); goto fail; } @@ -572,7 +617,6 @@ sfxge_tx_packet_add(struct sfxge_txq *tx fail: m_freem(m); - atomic_add_long(&txq->early_drops, 1); return (rc); } @@ -591,6 +635,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx } stdp->std_get = NULL; stdp->std_get_count = 0; + stdp->std_get_non_tcp_count = 0; stdp->std_getp = &stdp->std_get; mtx_unlock(&txq->lock); @@ -1401,6 +1446,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u rc = EINVAL; goto fail_tx_dpl_get_max; } + if (sfxge_tx_dpl_get_non_tcp_max <= 0) { + log(LOG_ERR, "%s=%d must be greater than 0", + SFXGE_PARAM_TX_DPL_GET_NON_TCP_MAX, + sfxge_tx_dpl_get_non_tcp_max); + rc = EINVAL; + goto fail_tx_dpl_get_max; + } if (sfxge_tx_dpl_put_max < 0) { log(LOG_ERR, "%s=%d must be greater or equal to 0", SFXGE_PARAM_TX_DPL_PUT_MAX, sfxge_tx_dpl_put_max); @@ -1412,6 +1464,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u stdp = &txq->dpl; stdp->std_put_max = sfxge_tx_dpl_put_max; stdp->std_get_max = sfxge_tx_dpl_get_max; + stdp->std_get_non_tcp_max = sfxge_tx_dpl_get_non_tcp_max; stdp->std_getp = &stdp->std_get; mtx_init(&txq->lock, "txq", NULL, MTX_DEF); @@ -1420,6 +1473,14 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SYSCTL_CHILDREN(txq_node), OID_AUTO, "dpl_get_count", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_count, 0, ""); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_get_non_tcp_count", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_get_non_tcp_count, 0, ""); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_get_hiwat, 0, ""); #endif txq->type = type; @@ -1457,7 +1518,10 @@ static const struct { SFXGE_TX_STAT(tso_long_headers, tso_long_headers), SFXGE_TX_STAT(tx_collapses, collapses), SFXGE_TX_STAT(tx_drops, drops), - SFXGE_TX_STAT(tx_early_drops, early_drops), + SFXGE_TX_STAT(tx_get_overflow, get_overflow), + SFXGE_TX_STAT(tx_get_non_tcp_overflow, get_non_tcp_overflow), + SFXGE_TX_STAT(tx_put_overflow, put_overflow), + SFXGE_TX_STAT(tx_netdown_drops, netdown_drops), }; static int Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:23:00 2015 (r280518) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:25:45 2015 (r280519) @@ -75,21 +75,29 @@ struct sfxge_tx_mapping { enum sfxge_tx_buf_flags flags; }; -#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT 1024 -#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 +#define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT (64 * 1024) +#define SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT 1024 +#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 /* * Deferred packet list. */ struct sfxge_tx_dpl { - unsigned int std_get_max; /* Maximum number of packets + unsigned int std_get_max; /* Maximum number of packets * in get list */ - unsigned int std_put_max; /* Maximum number of packets + unsigned int std_get_non_tcp_max; /* Maximum number + * of non-TCP packets + * in get list */ + unsigned int std_put_max; /* Maximum number of packets * in put list */ - uintptr_t std_put; /* Head of put list. */ - struct mbuf *std_get; /* Head of get list. */ - struct mbuf **std_getp; /* Tail of get list. */ - unsigned int std_get_count; /* Packets in get list. */ + uintptr_t std_put; /* Head of put list. */ + struct mbuf *std_get; /* Head of get list. */ + struct mbuf **std_getp; /* Tail of get list. */ + unsigned int std_get_count; /* Packets in get list. */ + unsigned int std_get_non_tcp_count; /* Non-TCP packets + * in get list */ + unsigned int std_get_hiwat; /* Packets in get list + * high watermark */ }; @@ -165,7 +173,10 @@ struct sfxge_txq { unsigned long tso_long_headers; unsigned long collapses; unsigned long drops; - unsigned long early_drops; + unsigned long get_overflow; + unsigned long get_non_tcp_overflow; + unsigned long put_overflow; + unsigned long netdown_drops; /* The following fields change more often, and are used mostly * on the completion path From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:26:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 046FE802; Wed, 25 Mar 2015 10:26:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2C757FB; Wed, 25 Mar 2015 10:26:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAQ89a083483; Wed, 25 Mar 2015 10:26:08 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAQ7OZ083478; Wed, 25 Mar 2015 10:26:07 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503251026.t2PAQ7OZ083478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 25 Mar 2015 10:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280520 - in head/sys: boot/fdt/dts/arm modules/dtb/rpi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:26:09 -0000 Author: andrew Date: Wed Mar 25 10:26:07 2015 New Revision: 280520 URL: https://svnweb.freebsd.org/changeset/base/280520 Log: Add the Raspberry Pi 2 dtb, based on the existing rpi.dts, but with a different base address for the devces. MFC after: 1 week Added: head/sys/boot/fdt/dts/arm/bcm2836.dtsi - copied, changed from r280125, head/sys/boot/fdt/dts/arm/bcm2835.dtsi head/sys/boot/fdt/dts/arm/rpi2.dts - copied, changed from r280125, head/sys/boot/fdt/dts/arm/rpi.dts Modified: head/sys/modules/dtb/rpi/Makefile Copied and modified: head/sys/boot/fdt/dts/arm/bcm2836.dtsi (from r280125, head/sys/boot/fdt/dts/arm/bcm2835.dtsi) ============================================================================== --- head/sys/boot/fdt/dts/arm/bcm2835.dtsi Sun Mar 15 21:57:44 2015 (r280125, copy source) +++ head/sys/boot/fdt/dts/arm/bcm2836.dtsi Wed Mar 25 10:26:07 2015 (r280520) @@ -29,19 +29,19 @@ #address-cells = <1>; #size-cells = <1>; - cpus { - cpu@0 { - compatible = "arm,1176jzf-s"; - }; + timer { + compatible = "arm,armv7-timer"; + clock-frequency = <19200000>; + interrupts = <72 73 75 74>; + interrupt-parent = <&intc>; }; - SOC: axi { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - reg = <0x20000000 0x01000000>; - ranges = <0 0x20000000 0x01000000>; + reg = <0x3f000000 0x01000000>; + ranges = <0 0x3f000000 0x01000000>; intc: interrupt-controller { compatible = "broadcom,bcm2835-armctrl-ic", @@ -101,30 +101,6 @@ */ }; - timer { - compatible = "broadcom,bcm2835-system-timer", - "broadcom,bcm2708-system-timer"; - reg = <0x3000 0x1000>; - interrupts = <8 9 10 11>; - interrupt-parent = <&intc>; - - clock-frequency = <1000000>; - }; - - armtimer { - /* Not AMBA compatible */ - compatible = "broadcom,bcm2835-sp804", "arm,sp804"; - reg = <0xB400 0x24>; - interrupts = <0>; - interrupt-parent = <&intc>; - }; - - watchdog0 { - compatible = "broadcom,bcm2835-wdt", - "broadcom,bcm2708-wdt"; - reg = <0x10001c 0x0c>; /* 0x1c, 0x20, 0x24 */ - }; - gpio: gpio { compatible = "broadcom,bcm2835-gpio", "broadcom,bcm2708-gpio"; @@ -397,8 +373,6 @@ }; bsc0 { - #address-cells = <1>; - #size-cells = <0>; compatible = "broadcom,bcm2835-bsc", "broadcom,bcm2708-bsc"; reg = <0x205000 0x20>; @@ -407,8 +381,6 @@ }; bsc1 { - #address-cells = <1>; - #size-cells = <0>; compatible = "broadcom,bcm2835-bsc", "broadcom,bcm2708-bsc"; reg = <0x804000 0x20>; @@ -459,7 +431,7 @@ interrupts = <70>; interrupt-parent = <&intc>; - clock-frequency = <50000000>; /* Set by VideoCore */ + clock-frequency = <2500000000>; /* Set by VideoCore */ }; uart0: uart0 { Copied and modified: head/sys/boot/fdt/dts/arm/rpi2.dts (from r280125, head/sys/boot/fdt/dts/arm/rpi.dts) ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Sun Mar 15 21:57:44 2015 (r280125, copy source) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Wed Mar 25 10:26:07 2015 (r280520) @@ -26,12 +26,11 @@ */ /dts-v1/; -/include/ "bcm2835.dtsi" +/include/ "bcm2836.dtsi" / { - model = "Raspberry Pi (BCM2835)"; - compatible = "raspberrypi,model-a", "raspberrypi,model-b", - "broadcom,bcm2835-vc", "broadcom,bcm2708-vc"; + model = "Raspberry Pi 2 Model B"; + compatible = "brcm,bcm2709"; memreserve = <0x08000000 0x08000000>; /* Set by VideoCore */ @@ -39,10 +38,10 @@ #address-cells = <1>; #size-cells = <0>; cpu@0 { - compatible = "arm,1176jzf-s"; + compatible = "arm,cortex-a7"; device_type = "cpu"; - reg = <0>; /* CPU ID=0 */ - clock-frequency = <700000000>; /* 700MHz */ + reg = <0xf00>; /* CPU ID=0xf00 */ + clock-frequency = <800000000>; /* 800MHz */ }; }; @@ -307,8 +306,6 @@ }; }; - - }; display { Modified: head/sys/modules/dtb/rpi/Makefile ============================================================================== --- head/sys/modules/dtb/rpi/Makefile Wed Mar 25 10:25:45 2015 (r280519) +++ head/sys/modules/dtb/rpi/Makefile Wed Mar 25 10:26:07 2015 (r280520) @@ -1,5 +1,5 @@ # $FreeBSD$ # DTS files for the Raspberry Pi-B -DTS=rpi.dts +DTS=rpi.dts rpi2.dts .include From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:26:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64D51962; Wed, 25 Mar 2015 10:26:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F15680E; Wed, 25 Mar 2015 10:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAQkSk083599; Wed, 25 Mar 2015 10:26:46 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAQkEb083598; Wed, 25 Mar 2015 10:26:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251026.t2PAQkEb083598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:26:46 +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: r280521 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:26:46 -0000 Author: arybchik Date: Wed Mar 25 10:26:45 2015 New Revision: 280521 URL: https://svnweb.freebsd.org/changeset/base/280521 Log: MFC: 278220 sfxge: Implement EFSYS_MEM_READ_BARRIER() Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:26:07 2015 (r280520) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:26:45 2015 (r280521) @@ -677,8 +677,7 @@ typedef struct efsys_bar_s { /* BARRIERS */ -/* Strict ordering guaranteed by devacc.devacc_attr_dataorder */ -#define EFSYS_MEM_READ_BARRIER() +#define EFSYS_MEM_READ_BARRIER() rmb() #define EFSYS_PIO_WRITE_BARRIER() /* TIMESTAMP */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:27:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08795AB6; Wed, 25 Mar 2015 10:27:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E5DDC82C; Wed, 25 Mar 2015 10:27:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PARvLP083857; Wed, 25 Mar 2015 10:27:57 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PARtv1083845; Wed, 25 Mar 2015 10:27:55 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251027.t2PARtv1083845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:27:55 +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: r280522 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:27:58 -0000 Author: arybchik Date: Wed Mar 25 10:27:54 2015 New Revision: 280522 URL: https://svnweb.freebsd.org/changeset/base/280522 Log: MFC: 278221 sfxge: Add macros to init, destroy, acquire, release and assert locks Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_mcdi.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:27:54 2015 (r280522) @@ -517,6 +517,15 @@ typedef struct efsys_bar_s { struct resource *esb_res; } efsys_bar_t; +#define SFXGE_BAR_LOCK_INIT(_esbp, _name) \ + mtx_init(&(_esbp)->esb_lock, (_name), NULL, MTX_DEF) +#define SFXGE_BAR_LOCK_DESTROY(_esbp) \ + mtx_destroy(&(_esbp)->esb_lock) +#define SFXGE_BAR_LOCK(_esbp) \ + mtx_lock(&(_esbp)->esb_lock) +#define SFXGE_BAR_UNLOCK(_esbp) \ + mtx_unlock(&(_esbp)->esb_lock) + #define EFSYS_BAR_READD(_esbp, _offset, _edp, _lock) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -525,7 +534,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_edp)->ed_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -535,7 +544,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -545,7 +554,7 @@ typedef struct efsys_bar_s { KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ ("not power of 2 aligned")); \ \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eqp)->eq_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -556,7 +565,7 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -568,7 +577,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eop)->eo_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -587,7 +596,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -599,7 +608,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \ uint32_t, (_edp)->ed_u32[0]); \ @@ -609,7 +618,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -619,7 +628,7 @@ typedef struct efsys_bar_s { KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ ("not power of 2 aligned")); \ \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE3(bar_writeq, unsigned int, (_offset), \ uint32_t, (_eqp)->eq_u32[1], \ @@ -630,7 +639,7 @@ typedef struct efsys_bar_s { bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ (_offset+4), (_eqp)->eq_u32[1]); \ \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -642,7 +651,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE5(bar_writeo, unsigned int, (_offset), \ uint32_t, (_eop)->eo_u32[3], \ @@ -661,7 +670,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:27:54 2015 (r280522) @@ -94,7 +94,7 @@ sfxge_start(struct sfxge_softc *sc) { int rc; - sx_assert(&sc->softc_lock, LA_XLOCKED); + SFXGE_ADAPTER_LOCK_ASSERT_OWNED(sc); if (sc->init_state == SFXGE_STARTED) return (0); @@ -163,15 +163,15 @@ sfxge_if_init(void *arg) sc = (struct sfxge_softc *)arg; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); (void)sfxge_start(sc); - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } static void sfxge_stop(struct sfxge_softc *sc) { - sx_assert(&sc->softc_lock, LA_XLOCKED); + SFXGE_ADAPTER_LOCK_ASSERT_OWNED(sc); if (sc->init_state != SFXGE_STARTED) return; @@ -211,7 +211,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign switch (command) { case SIOCSIFFLAGS: - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (ifp->if_flags & IFF_UP) { if (ifp->if_drv_flags & IFF_DRV_RUNNING) { if ((ifp->if_flags ^ sc->if_flags) & @@ -224,7 +224,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign if (ifp->if_drv_flags & IFF_DRV_RUNNING) sfxge_stop(sc); sc->if_flags = ifp->if_flags; - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); break; case SIOCSIFMTU: if (ifr->ifr_mtu == ifp->if_mtu) { @@ -237,11 +237,11 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign error = 0; } else { /* Restart required */ - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); sfxge_stop(sc); ifp->if_mtu = ifr->ifr_mtu; error = sfxge_start(sc); - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); if (error != 0) { ifp->if_flags &= ~IFF_UP; ifp->if_drv_flags &= ~IFF_DRV_RUNNING; @@ -255,7 +255,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign sfxge_mac_filter_set(sc); break; case SIOCSIFCAP: - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); /* * The networking core already rejects attempts to @@ -265,7 +265,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign */ if (~ifr->ifr_reqcap & SFXGE_CAP_FIXED) { error = EINVAL; - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); break; } @@ -279,7 +279,7 @@ sfxge_if_ioctl(struct ifnet *ifp, unsign else ifp->if_hwassist &= ~CSUM_TSO; - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: @@ -297,9 +297,9 @@ sfxge_ifnet_fini(struct ifnet *ifp) { struct sfxge_softc *sc = ifp->if_softc; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); sfxge_stop(sc); - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); ifmedia_removeall(&sc->media); ether_ifdetach(ifp); @@ -375,7 +375,7 @@ sfxge_bar_init(struct sfxge_softc *sc) } esbp->esb_tag = rman_get_bustag(esbp->esb_res); esbp->esb_handle = rman_get_bushandle(esbp->esb_res); - mtx_init(&esbp->esb_lock, "sfxge_efsys_bar", NULL, MTX_DEF); + SFXGE_BAR_LOCK_INIT(esbp, "sfxge_efsys_bar"); return (0); } @@ -387,7 +387,7 @@ sfxge_bar_fini(struct sfxge_softc *sc) bus_release_resource(sc->dev, SYS_RES_MEMORY, esbp->esb_rid, esbp->esb_res); - mtx_destroy(&esbp->esb_lock); + SFXGE_BAR_LOCK_DESTROY(esbp); } static int @@ -400,7 +400,7 @@ sfxge_create(struct sfxge_softc *sc) dev = sc->dev; - sx_init(&sc->softc_lock, "sfxge_softc"); + SFXGE_ADAPTER_LOCK_INIT(sc, "sfxge_softc"); sc->max_rss_channels = 0; snprintf(rss_param_name, sizeof(rss_param_name), @@ -544,7 +544,7 @@ fail3: fail: sc->dev = NULL; - sx_destroy(&sc->softc_lock); + SFXGE_ADAPTER_LOCK_DESTROY(sc); return (error); } @@ -593,7 +593,7 @@ sfxge_destroy(struct sfxge_softc *sc) taskqueue_drain(taskqueue_thread, &sc->task_reset); /* Destroy the softc lock. */ - sx_destroy(&sc->softc_lock); + SFXGE_ADAPTER_LOCK_DESTROY(sc); } static int @@ -695,7 +695,7 @@ sfxge_reset(void *arg, int npending) sc = (struct sfxge_softc *)arg; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (sc->init_state != SFXGE_STARTED) goto done; @@ -708,7 +708,7 @@ sfxge_reset(void *arg, int npending) rc); done: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } void Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:27:54 2015 (r280522) @@ -313,4 +313,48 @@ extern int sfxge_port_ifmedia_init(struc #define SFXGE_MAX_MTU (9 * 1024) +#define SFXGE_ADAPTER_LOCK_INIT(_sc, _name) \ + sx_init(&(_sc)->softc_lock, (_name)) +#define SFXGE_ADAPTER_LOCK_DESTROY(_sc) \ + sx_destroy(&(_sc)->softc_lock) +#define SFXGE_ADAPTER_LOCK(_sc) \ + sx_xlock(&(_sc)->softc_lock) +#define SFXGE_ADAPTER_UNLOCK(_sc) \ + sx_xunlock(&(_sc)->softc_lock) +#define SFXGE_ADAPTER_LOCK_ASSERT_OWNED(_sc) \ + sx_assert(&(_sc)->softc_lock, LA_XLOCKED) + +#define SFXGE_PORT_LOCK_INIT(_port, _name) \ + mtx_init(&(_port)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_PORT_LOCK_DESTROY(_port) \ + mtx_destroy(&(_port)->lock) +#define SFXGE_PORT_LOCK(_port) \ + mtx_lock(&(_port)->lock) +#define SFXGE_PORT_UNLOCK(_port) \ + mtx_unlock(&(_port)->lock) +#define SFXGE_PORT_LOCK_ASSERT_OWNED(_port) \ + mtx_assert(&(_port)->lock, MA_OWNED) + +#define SFXGE_MCDI_LOCK_INIT(_mcdi, _name) \ + mtx_init(&(_mcdi)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_MCDI_LOCK_DESTROY(_mcdi) \ + mtx_destroy(&(_mcdi)->lock) +#define SFXGE_MCDI_LOCK(_mcdi) \ + mtx_lock(&(_mcdi)->lock) +#define SFXGE_MCDI_UNLOCK(_mcdi) \ + mtx_unlock(&(_mcdi)->lock) +#define SFXGE_MCDI_LOCK_ASSERT_OWNED(_mcdi) \ + mtx_assert(&(_mcdi)->lock, MA_OWNED) + +#define SFXGE_EVQ_LOCK_INIT(_evq, _name) \ + mtx_init(&(_evq)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_EVQ_LOCK_DESTROY(_evq) \ + mtx_destroy(&(_evq)->lock) +#define SFXGE_EVQ_LOCK(_evq) \ + mtx_lock(&(_evq)->lock) +#define SFXGE_EVQ_UNLOCK(_evq) \ + mtx_unlock(&(_evq)->lock) +#define SFXGE_EVQ_LOCK_ASSERT_OWNED(_evq) \ + mtx_assert(&(_evq)->lock, MA_OWNED) + #endif /* _SFXGE_H */ Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:27:54 2015 (r280522) @@ -410,7 +410,7 @@ sfxge_ev_stat_update(struct sfxge_softc unsigned int index; clock_t now; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (sc->evq[0]->init_state != SFXGE_EVQ_STARTED) goto out; @@ -424,12 +424,12 @@ sfxge_ev_stat_update(struct sfxge_softc /* Add event counts from each event queue in turn */ for (index = 0; index < sc->intr.n_alloc; index++) { evq = sc->evq[index]; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); efx_ev_qstats_update(evq->common, sc->ev_stats); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); } out: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } static int @@ -490,7 +490,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG int error; int index; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &moderation, sizeof(moderation))) @@ -517,7 +517,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG } out: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); return (error); } @@ -572,7 +572,7 @@ sfxge_ev_qpoll(struct sfxge_evq *evq) { int rc; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); if (evq->init_state != SFXGE_EVQ_STARTING && evq->init_state != SFXGE_EVQ_STARTED) { @@ -602,12 +602,12 @@ sfxge_ev_qpoll(struct sfxge_evq *evq) if ((rc = efx_ev_qprime(evq->common, evq->read_ptr)) != 0) goto fail; - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); return (0); fail: - mtx_unlock(&(evq->lock)); + SFXGE_EVQ_UNLOCK(evq); return (rc); } @@ -621,7 +621,7 @@ sfxge_ev_qstop(struct sfxge_softc *sc, u KASSERT(evq->init_state == SFXGE_EVQ_STARTED, ("evq->init_state != SFXGE_EVQ_STARTED")); - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); evq->init_state = SFXGE_EVQ_INITIALIZED; evq->read_ptr = 0; evq->exception = B_FALSE; @@ -634,7 +634,7 @@ sfxge_ev_qstop(struct sfxge_softc *sc, u efx_ev_qdestroy(evq->common); efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, EFX_EVQ_NBUFS(evq->entries)); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); } static int @@ -664,7 +664,7 @@ sfxge_ev_qstart(struct sfxge_softc *sc, evq->buf_base_id, &evq->common)) != 0) goto fail; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); /* Set the default moderation */ (void)efx_ev_qmoderate(evq->common, sc->ev_moderation); @@ -675,7 +675,7 @@ sfxge_ev_qstart(struct sfxge_softc *sc, evq->init_state = SFXGE_EVQ_STARTING; - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); /* Wait for the initialization event */ count = 0; @@ -696,10 +696,10 @@ done: return (0); fail3: - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); evq->init_state = SFXGE_EVQ_INITIALIZED; fail2: - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); efx_ev_qdestroy(evq->common); fail: efx_sram_buf_tbl_clear(sc->enp, evq->buf_base_id, @@ -780,7 +780,7 @@ sfxge_ev_qfini(struct sfxge_softc *sc, u sc->evq[index] = NULL; - mtx_destroy(&evq->lock); + SFXGE_EVQ_LOCK_DESTROY(evq); free(evq, M_SFXGE); } @@ -827,7 +827,7 @@ sfxge_ev_qinit(struct sfxge_softc *sc, u sfxge_sram_buf_tbl_alloc(sc, EFX_EVQ_NBUFS(evq->entries), &evq->buf_base_id); - mtx_init(&evq->lock, "evq", NULL, MTX_DEF); + SFXGE_EVQ_LOCK_INIT(evq, "evq"); evq->init_state = SFXGE_EVQ_INITIALIZED; Modified: stable/10/sys/dev/sfxge/sfxge_mcdi.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_mcdi.c Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/sfxge_mcdi.c Wed Mar 25 10:27:54 2015 (r280522) @@ -52,8 +52,7 @@ __FBSDID("$FreeBSD$"); static void sfxge_mcdi_acquire(struct sfxge_mcdi *mcdi) { - - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT(mcdi->state != SFXGE_MCDI_UNINITIALIZED, ("MCDI not initialized")); @@ -61,15 +60,14 @@ sfxge_mcdi_acquire(struct sfxge_mcdi *mc (void)cv_wait_sig(&mcdi->cv, &mcdi->lock); mcdi->state = SFXGE_MCDI_BUSY; - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); } /* Release ownership of MCDI on request completion. */ static void sfxge_mcdi_release(struct sfxge_mcdi *mcdi) { - - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT((mcdi->state == SFXGE_MCDI_BUSY || mcdi->state == SFXGE_MCDI_COMPLETED), ("MCDI not busy or task not completed")); @@ -77,7 +75,7 @@ sfxge_mcdi_release(struct sfxge_mcdi *mc mcdi->state = SFXGE_MCDI_INITIALIZED; cv_broadcast(&mcdi->cv); - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); } static void @@ -160,11 +158,11 @@ sfxge_mcdi_ev_cpl(void *arg) sc = (struct sfxge_softc *)arg; mcdi = &sc->mcdi; - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT(mcdi->state == SFXGE_MCDI_BUSY, ("MCDI not busy")); mcdi->state = SFXGE_MCDI_COMPLETED; cv_broadcast(&mcdi->cv); - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); } static void @@ -203,7 +201,7 @@ sfxge_mcdi_init(struct sfxge_softc *sc) KASSERT(mcdi->state == SFXGE_MCDI_UNINITIALIZED, ("MCDI already initialized")); - mtx_init(&mcdi->lock, "sfxge_mcdi", NULL, MTX_DEF); + SFXGE_MCDI_LOCK_INIT(mcdi, "sfxge_mcdi"); mcdi->state = SFXGE_MCDI_INITIALIZED; @@ -220,7 +218,7 @@ sfxge_mcdi_init(struct sfxge_softc *sc) return (0); fail: - mtx_destroy(&mcdi->lock); + SFXGE_MCDI_LOCK_DESTROY(mcdi); mcdi->state = SFXGE_MCDI_UNINITIALIZED; return (rc); } @@ -236,7 +234,7 @@ sfxge_mcdi_fini(struct sfxge_softc *sc) mcdi = &sc->mcdi; emtp = &mcdi->transport; - mtx_lock(&mcdi->lock); + SFXGE_MCDI_LOCK(mcdi); KASSERT(mcdi->state == SFXGE_MCDI_INITIALIZED, ("MCDI not initialized")); @@ -244,7 +242,7 @@ sfxge_mcdi_fini(struct sfxge_softc *sc) bzero(emtp, sizeof(*emtp)); cv_destroy(&mcdi->cv); - mtx_unlock(&mcdi->lock); + SFXGE_MCDI_UNLOCK(mcdi); - mtx_destroy(&mcdi->lock); + SFXGE_MCDI_LOCK_DESTROY(mcdi); } Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:27:54 2015 (r280522) @@ -48,7 +48,7 @@ sfxge_mac_stat_update(struct sfxge_softc unsigned int count; int rc; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -82,7 +82,7 @@ sfxge_mac_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -170,7 +170,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND sc = arg1; port = &sc->port; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &fcntl, sizeof(fcntl))) != 0) @@ -191,7 +191,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND } out: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (error); } @@ -207,13 +207,13 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE sc = arg1; port = &sc->port; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state == SFXGE_PORT_STARTED && SFXGE_LINK_UP(sc)) efx_mac_fcntl_get(sc->enp, &wanted_fc, &link_fc); else link_fc = 0; error = SYSCTL_OUT(req, &link_fc, sizeof(link_fc)); - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (error); } @@ -262,7 +262,7 @@ sfxge_mac_poll_work(void *arg, int npend enp = sc->enp; port = &sc->port; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state != SFXGE_PORT_STARTED) goto done; @@ -272,7 +272,7 @@ sfxge_mac_poll_work(void *arg, int npend sfxge_mac_link_update(sc, mode); done: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); } static int @@ -320,7 +320,7 @@ sfxge_mac_filter_set(struct sfxge_softc struct sfxge_port *port = &sc->port; int rc; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); /* * The function may be called without softc_lock held in the * case of SIOCADDMULTI and SIOCDELMULTI ioctls. ioctl handler @@ -335,7 +335,7 @@ sfxge_mac_filter_set(struct sfxge_softc rc = sfxge_mac_filter_set_locked(sc); else rc = 0; - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -348,7 +348,7 @@ sfxge_port_stop(struct sfxge_softc *sc) port = &sc->port; enp = sc->enp; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); KASSERT(port->init_state == SFXGE_PORT_STARTED, ("port not started")); @@ -367,7 +367,7 @@ sfxge_port_stop(struct sfxge_softc *sc) /* Destroy the common code port object. */ efx_port_fini(sc->enp); - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); } int @@ -383,7 +383,7 @@ sfxge_port_start(struct sfxge_softc *sc) port = &sc->port; enp = sc->enp; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); KASSERT(port->init_state == SFXGE_PORT_INITIALIZED, ("port not initialized")); @@ -426,7 +426,7 @@ sfxge_port_start(struct sfxge_softc *sc) port->init_state = SFXGE_PORT_STARTED; /* Single poll in case there were missing initial events */ - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); sfxge_mac_poll_work(sc, 0); return (0); @@ -439,7 +439,7 @@ fail3: fail2: efx_port_fini(sc->enp); fail: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -453,7 +453,7 @@ sfxge_phy_stat_update(struct sfxge_softc unsigned int count; int rc; - mtx_lock(&port->lock); + SFXGE_PORT_LOCK(port); if (port->init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -487,7 +487,7 @@ sfxge_phy_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: - mtx_unlock(&port->lock); + SFXGE_PORT_UNLOCK(port); return (rc); } @@ -554,7 +554,7 @@ sfxge_port_fini(struct sfxge_softc *sc) sfxge_dma_free(esmp); free(port->mac_stats.decode_buf, M_SFXGE); - mtx_destroy(&port->lock); + SFXGE_PORT_LOCK_DESTROY(port); port->sc = NULL; } @@ -577,7 +577,7 @@ sfxge_port_init(struct sfxge_softc *sc) port->sc = sc; - mtx_init(&port->lock, "sfxge_port", NULL, MTX_DEF); + SFXGE_PORT_LOCK_INIT(port, "sfxge_port"); port->phy_stats.decode_buf = malloc(EFX_PHY_NSTATS * sizeof(uint32_t), M_SFXGE, M_WAITOK | M_ZERO); @@ -615,7 +615,7 @@ fail2: sfxge_dma_free(phy_stats_buf); fail: free(port->phy_stats.decode_buf, M_SFXGE); - (void)mtx_destroy(&port->lock); + SFXGE_PORT_LOCK_DESTROY(port); port->sc = NULL; return (rc); } @@ -655,7 +655,7 @@ sfxge_media_status(struct ifnet *ifp, st efx_link_mode_t mode; sc = ifp->if_softc; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); ifmr->ifm_status = IFM_AVALID; ifmr->ifm_active = IFM_ETHER; @@ -669,7 +669,7 @@ sfxge_media_status(struct ifnet *ifp, st ifmr->ifm_active |= sfxge_port_link_fc_ifm(sc); } - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); } static int @@ -682,7 +682,7 @@ sfxge_media_change(struct ifnet *ifp) sc = ifp->if_softc; ifm = sc->media.ifm_cur; - sx_xlock(&sc->softc_lock); + SFXGE_ADAPTER_LOCK(sc); if (!SFXGE_RUNNING(sc)) { rc = 0; @@ -695,7 +695,7 @@ sfxge_media_change(struct ifnet *ifp) rc = efx_phy_adv_cap_set(sc->enp, ifm->ifm_data); out: - sx_xunlock(&sc->softc_lock); + SFXGE_ADAPTER_UNLOCK(sc); return (rc); } Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:27:54 2015 (r280522) @@ -207,7 +207,7 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, un prefetch_read_many(sc->enp); prefetch_read_many(rxq->common); - mtx_assert(&evq->lock, MA_OWNED); + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); if (rxq->init_state != SFXGE_RXQ_STARTED) return; @@ -749,7 +749,7 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq index = rxq->index; evq = sc->evq[index]; - mtx_assert(&evq->lock, MA_OWNED); + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); completed = rxq->completed; while (completed != rxq->pending) { @@ -834,7 +834,7 @@ sfxge_rx_qstop(struct sfxge_softc *sc, u rxq = sc->rxq[index]; evq = sc->evq[index]; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); KASSERT(rxq->init_state == SFXGE_RXQ_STARTED, ("rxq not started")); @@ -849,7 +849,7 @@ again: /* Flush the receive queue */ efx_rx_qflush(rxq->common); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); count = 0; do { @@ -861,7 +861,7 @@ again: } while (++count < 20); - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); if (rxq->flush_state == SFXGE_FLUSH_FAILED) goto again; @@ -885,7 +885,7 @@ again: efx_sram_buf_tbl_clear(sc->enp, rxq->buf_base_id, EFX_RXQ_NBUFS(sc->rxq_entries)); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); } static int @@ -916,7 +916,7 @@ sfxge_rx_qstart(struct sfxge_softc *sc, &rxq->common)) != 0) goto fail; - mtx_lock(&evq->lock); + SFXGE_EVQ_LOCK(evq); /* Enable the receive queue. */ efx_rx_qenable(rxq->common); @@ -926,7 +926,7 @@ sfxge_rx_qstart(struct sfxge_softc *sc, /* Try to fill the queue from the pool. */ sfxge_rx_qfill(rxq, EFX_RXQ_LIMIT(sc->rxq_entries), B_FALSE); - mtx_unlock(&evq->lock); + SFXGE_EVQ_UNLOCK(evq); return (0); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:26:45 2015 (r280521) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:27:54 2015 (r280522) @@ -118,7 +118,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq { unsigned int completed; - mtx_assert(&evq->lock, MA_OWNED); + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); completed = txq->completed; while (completed != txq->pending) { @@ -178,7 +178,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * unsigned int count; unsigned int non_tcp_count; - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); stdp = &txq->dpl; @@ -221,7 +221,7 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * static void sfxge_tx_qreap(struct sfxge_txq *txq) { - mtx_assert(SFXGE_TXQ_LOCK(txq), MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); txq->reaped = txq->completed; } @@ -233,7 +233,7 @@ sfxge_tx_qlist_post(struct sfxge_txq *tx unsigned int level; int rc; - mtx_assert(SFXGE_TXQ_LOCK(txq), MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); KASSERT(txq->n_pend_desc != 0, ("txq->n_pend_desc == 0")); KASSERT(txq->n_pend_desc <= SFXGE_TSO_MAX_DESC, @@ -408,7 +408,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx unsigned int pushed; int rc; - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); sc = txq->sc; stdp = &txq->dpl; @@ -484,7 +484,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); do { if (SFXGE_TX_QDPL_PENDING(txq)) @@ -493,9 +493,9 @@ sfxge_tx_qdpl_service(struct sfxge_txq * if (!txq->blocked) sfxge_tx_qdpl_drain(txq); - mtx_unlock(&txq->lock); + SFXGE_TXQ_UNLOCK(txq); } while (SFXGE_TX_QDPL_PENDING(txq) && - mtx_trylock(&txq->lock)); + SFXGE_TXQ_TRYLOCK(txq)); } /* @@ -519,7 +519,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, KASSERT(mbuf->m_nextpkt == NULL, ("mbuf->m_nextpkt != NULL")); if (locked) { - mtx_assert(&txq->lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); sfxge_tx_qdpl_swizzle(txq); @@ -588,11 +588,11 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * the packet will be appended to the "get list" of the deferred * packet list. Otherwise, it will be pushed on the "put list". */ - locked = mtx_trylock(&txq->lock); + locked = SFXGE_TXQ_TRYLOCK(txq); if (sfxge_tx_qdpl_put(txq, m, locked) != 0) { if (locked) - mtx_unlock(&txq->lock); + SFXGE_TXQ_UNLOCK(txq); rc = ENOBUFS; goto fail; } @@ -605,7 +605,7 @@ sfxge_tx_packet_add(struct sfxge_txq *tx * is processing the list. */ if (!locked) - locked = mtx_trylock(&txq->lock); + locked = SFXGE_TXQ_TRYLOCK(txq); if (locked) { /* Try to service the list. */ @@ -626,7 +626,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx struct sfxge_tx_dpl *stdp = &txq->dpl; struct mbuf *mbuf, *next; - mtx_lock(&txq->lock); + SFXGE_TXQ_LOCK(txq); sfxge_tx_qdpl_swizzle(txq); for (mbuf = stdp->std_get; mbuf != NULL; mbuf = next) { @@ -638,7 +638,7 @@ sfxge_tx_qdpl_flush(struct sfxge_txq *tx stdp->std_get_non_tcp_count = 0; stdp->std_getp = &stdp->std_get; - mtx_unlock(&txq->lock); + SFXGE_TXQ_UNLOCK(txq); } void @@ -752,21 +752,20 @@ void sfxge_if_start(struct ifnet *ifp) { struct sfxge_softc *sc = ifp->if_softc; - mtx_lock(&sc->tx_lock); + SFXGE_TXQ_LOCK(sc->txq[0]); sfxge_if_start_locked(ifp); - mtx_unlock(&sc->tx_lock); + SFXGE_TXQ_UNLOCK(sc->txq[0]); } static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { - struct sfxge_softc *sc = txq->sc; - struct ifnet *ifp = sc->ifnet; + struct ifnet *ifp = txq->sc->ifnet; - mtx_assert(&sc->tx_lock, MA_OWNED); + SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; sfxge_if_start_locked(ifp); - mtx_unlock(&sc->tx_lock); + SFXGE_TXQ_UNLOCK(txq); } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:29:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1747C09; Wed, 25 Mar 2015 10:29:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91C8D849; Wed, 25 Mar 2015 10:29:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAT9rN084076; Wed, 25 Mar 2015 10:29:09 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAT9fB084075; Wed, 25 Mar 2015 10:29:09 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251029.t2PAT9fB084075@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:29:09 +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: r280523 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:29:09 -0000 Author: arybchik Date: Wed Mar 25 10:29:08 2015 New Revision: 280523 URL: https://svnweb.freebsd.org/changeset/base/280523 Log: MFC: 278248 sfxge: access statistics buffers under port lock Allow access to statistics data not only from sysctl handlers. Submitted by: Boris Misenov Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:27:54 2015 (r280522) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:29:08 2015 (r280523) @@ -48,7 +48,7 @@ sfxge_mac_stat_update(struct sfxge_softc unsigned int count; int rc; - SFXGE_PORT_LOCK(port); + SFXGE_PORT_LOCK_ASSERT_OWNED(port); if (port->init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -82,7 +82,6 @@ sfxge_mac_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: - SFXGE_PORT_UNLOCK(port); return (rc); } @@ -93,12 +92,16 @@ sfxge_mac_stat_handler(SYSCTL_HANDLER_AR unsigned int id = arg2; int rc; + SFXGE_PORT_LOCK(&sc->port); if ((rc = sfxge_mac_stat_update(sc)) != 0) - return (rc); + goto out; - return (SYSCTL_OUT(req, - (uint64_t *)sc->port.mac_stats.decode_buf + id, - sizeof(uint64_t))); + rc = SYSCTL_OUT(req, + (uint64_t *)sc->port.mac_stats.decode_buf + id, + sizeof(uint64_t)); +out: + SFXGE_PORT_UNLOCK(&sc->port); + return (rc); } static void @@ -453,7 +456,7 @@ sfxge_phy_stat_update(struct sfxge_softc unsigned int count; int rc; - SFXGE_PORT_LOCK(port); + SFXGE_PORT_LOCK_ASSERT_OWNED(port); if (port->init_state != SFXGE_PORT_STARTED) { rc = 0; @@ -487,7 +490,6 @@ sfxge_phy_stat_update(struct sfxge_softc rc = ETIMEDOUT; out: - SFXGE_PORT_UNLOCK(port); return (rc); } @@ -498,12 +500,16 @@ sfxge_phy_stat_handler(SYSCTL_HANDLER_AR unsigned int id = arg2; int rc; + SFXGE_PORT_LOCK(&sc->port); if ((rc = sfxge_phy_stat_update(sc)) != 0) - return (rc); + goto out; - return (SYSCTL_OUT(req, - (uint32_t *)sc->port.phy_stats.decode_buf + id, - sizeof(uint32_t))); + rc = SYSCTL_OUT(req, + (uint32_t *)sc->port.phy_stats.decode_buf + id, + sizeof(uint32_t)); +out: + SFXGE_PORT_UNLOCK(&sc->port); + return (rc); } static void From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:30:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71E5DD5E; Wed, 25 Mar 2015 10:30:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 528F6864; Wed, 25 Mar 2015 10:30:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAUnZj086023; Wed, 25 Mar 2015 10:30:49 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAUkox084873; Wed, 25 Mar 2015 10:30:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251030.t2PAUkox084873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:30:46 +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: r280524 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:30:49 -0000 Author: arybchik Date: Wed Mar 25 10:30:45 2015 New Revision: 280524 URL: https://svnweb.freebsd.org/changeset/base/280524 Log: MFC: 278250 sfxge: make lock names unique Lock name should include interface name. Tx queue and event queue lock name should include queue number. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_mcdi.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:30:45 2015 (r280524) @@ -509,16 +509,26 @@ typedef struct efsys_mem_s { /* BAR */ +#define SFXGE_LOCK_NAME_MAX 16 + typedef struct efsys_bar_s { struct mtx esb_lock; + char esb_lock_name[SFXGE_LOCK_NAME_MAX]; bus_space_tag_t esb_tag; bus_space_handle_t esb_handle; int esb_rid; struct resource *esb_res; } efsys_bar_t; -#define SFXGE_BAR_LOCK_INIT(_esbp, _name) \ - mtx_init(&(_esbp)->esb_lock, (_name), NULL, MTX_DEF) +#define SFXGE_BAR_LOCK_INIT(_esbp, _ifname) \ + do { \ + snprintf((_esbp)->esb_lock_name, \ + sizeof((_esbp)->esb_lock_name), \ + "%s:bar", (_ifname)); \ + mtx_init(&(_esbp)->esb_lock, (_esbp)->esb_lock_name, \ + NULL, MTX_DEF); \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) #define SFXGE_BAR_LOCK_DESTROY(_esbp) \ mtx_destroy(&(_esbp)->esb_lock) #define SFXGE_BAR_LOCK(_esbp) \ @@ -721,13 +731,35 @@ typedef clock_t efsys_timestamp_t; /* LOCK */ -typedef struct mtx efsys_lock_t; +typedef struct efsys_lock_s { + struct mtx lock; + char lock_name[SFXGE_LOCK_NAME_MAX]; +} efsys_lock_t; + +#define SFXGE_EFSYS_LOCK_INIT(_eslp, _ifname, _label) \ + do { \ + efsys_lock_t *__eslp = (_eslp); \ + \ + snprintf((__eslp)->lock_name, \ + sizeof((__eslp)->lock_name), \ + "%s:%s", (_ifname), (_label)); \ + mtx_init(&(__eslp)->lock, (__eslp)->lock_name, \ + NULL, MTX_DEF); \ + } while (B_FALSE) +#define SFXGE_EFSYS_LOCK_DESTROY(_eslp) \ + mtx_destroy(&(_eslp)->lock) +#define SFXGE_EFSYS_LOCK(_eslp) \ + mtx_lock(&(_eslp)->lock) +#define SFXGE_EFSYS_UNLOCK(_eslp) \ + mtx_unlock(&(_eslp)->lock) +#define SFXGE_EFSYS_LOCK_ASSERT_OWNED(_eslp) \ + mtx_assert(&(_eslp)->lock, MA_OWNED) #define EFSYS_LOCK_MAGIC 0x000010c4 #define EFSYS_LOCK(_lockp, _state) \ do { \ - mtx_lock(_lockp); \ + SFXGE_EFSYS_LOCK(_lockp); \ (_state) = EFSYS_LOCK_MAGIC; \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -736,7 +768,7 @@ typedef struct mtx efsys_lock_t; do { \ if ((_state) != EFSYS_LOCK_MAGIC) \ KASSERT(B_FALSE, ("not locked")); \ - mtx_unlock(_lockp); \ + SFXGE_EFSYS_UNLOCK(_lockp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 10:30:45 2015 (r280524) @@ -337,7 +337,9 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ifp->if_snd.ifq_drv_maxlen = sc->txq_entries - 1; IFQ_SET_READY(&ifp->if_snd); - mtx_init(&sc->tx_lock, "txq", NULL, MTX_DEF); + snprintf(sc->tx_lock_name, sizeof(sc->tx_lock_name), + "%s:tx", device_get_nameunit(sc->dev)); + mtx_init(&sc->tx_lock, sc->tx_lock_name, NULL, MTX_DEF); #endif if ((rc = sfxge_port_ifmedia_init(sc)) != 0) @@ -375,7 +377,8 @@ sfxge_bar_init(struct sfxge_softc *sc) } esbp->esb_tag = rman_get_bustag(esbp->esb_res); esbp->esb_handle = rman_get_bushandle(esbp->esb_res); - SFXGE_BAR_LOCK_INIT(esbp, "sfxge_efsys_bar"); + + SFXGE_BAR_LOCK_INIT(esbp, device_get_nameunit(sc->dev)); return (0); } @@ -400,7 +403,7 @@ sfxge_create(struct sfxge_softc *sc) dev = sc->dev; - SFXGE_ADAPTER_LOCK_INIT(sc, "sfxge_softc"); + SFXGE_ADAPTER_LOCK_INIT(sc, device_get_nameunit(sc->dev)); sc->max_rss_channels = 0; snprintf(rss_param_name, sizeof(rss_param_name), @@ -434,7 +437,8 @@ sfxge_create(struct sfxge_softc *sc) KASSERT(error == 0, ("Family should be filtered by sfxge_probe()")); /* Create the common code nic object. */ - mtx_init(&sc->enp_lock, "sfxge_nic", NULL, MTX_DEF); + SFXGE_EFSYS_LOCK_INIT(&sc->enp_lock, + device_get_nameunit(sc->dev), "nic"); if ((error = efx_nic_create(sc->family, (efsys_identifier_t *)sc, &sc->bar, &sc->enp_lock, &enp)) != 0) goto fail3; @@ -536,7 +540,7 @@ fail_tx_ring_entries: fail_rx_ring_entries: sc->enp = NULL; efx_nic_destroy(enp); - mtx_destroy(&sc->enp_lock); + SFXGE_EFSYS_LOCK_DESTROY(&sc->enp_lock); fail3: sfxge_bar_fini(sc); Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:30:45 2015 (r280524) @@ -121,6 +121,7 @@ struct sfxge_evq { /* Structure members not used on event processing path */ unsigned int buf_base_id; unsigned int entries; + char lock_name[SFXGE_LOCK_NAME_MAX]; } __aligned(CACHE_LINE_SIZE); #define SFXGE_NDESCS 1024 @@ -161,6 +162,9 @@ struct sfxge_mcdi { struct cv cv; enum sfxge_mcdi_state state; efx_mcdi_transport_t transport; + + /* Only used in debugging output */ + char lock_name[SFXGE_LOCK_NAME_MAX]; }; struct sfxge_hw_stats { @@ -185,6 +189,9 @@ struct sfxge_port { struct sfxge_hw_stats phy_stats; struct sfxge_hw_stats mac_stats; efx_link_mode_t link_mode; + + /* Only used in debugging output */ + char lock_name[SFXGE_LOCK_NAME_MAX]; }; enum sfxge_softc_state { @@ -197,6 +204,7 @@ enum sfxge_softc_state { struct sfxge_softc { device_t dev; struct sx softc_lock; + char softc_lock_name[SFXGE_LOCK_NAME_MAX]; enum sfxge_softc_state init_state; struct ifnet *ifnet; unsigned int if_flags; @@ -209,7 +217,7 @@ struct sfxge_softc { caddr_t vpd_data; size_t vpd_size; efx_nic_t *enp; - struct mtx enp_lock; + efsys_lock_t enp_lock; unsigned int rxq_entries; unsigned int txq_entries; @@ -248,6 +256,7 @@ struct sfxge_softc { #ifndef SFXGE_HAVE_MQ struct mtx tx_lock __aligned(CACHE_LINE_SIZE); + char tx_lock_name[SFXGE_LOCK_NAME_MAX]; #endif }; @@ -313,8 +322,15 @@ extern int sfxge_port_ifmedia_init(struc #define SFXGE_MAX_MTU (9 * 1024) -#define SFXGE_ADAPTER_LOCK_INIT(_sc, _name) \ - sx_init(&(_sc)->softc_lock, (_name)) +#define SFXGE_ADAPTER_LOCK_INIT(_sc, _ifname) \ + do { \ + struct sfxge_softc *__sc = (_sc); \ + \ + snprintf((__sc)->softc_lock_name, \ + sizeof((__sc)->softc_lock_name), \ + "%s:softc", (_ifname)); \ + sx_init(&(__sc)->softc_lock, (__sc)->softc_lock_name); \ + } while (B_FALSE) #define SFXGE_ADAPTER_LOCK_DESTROY(_sc) \ sx_destroy(&(_sc)->softc_lock) #define SFXGE_ADAPTER_LOCK(_sc) \ @@ -324,8 +340,16 @@ extern int sfxge_port_ifmedia_init(struc #define SFXGE_ADAPTER_LOCK_ASSERT_OWNED(_sc) \ sx_assert(&(_sc)->softc_lock, LA_XLOCKED) -#define SFXGE_PORT_LOCK_INIT(_port, _name) \ - mtx_init(&(_port)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_PORT_LOCK_INIT(_port, _ifname) \ + do { \ + struct sfxge_port *__port = (_port); \ + \ + snprintf((__port)->lock_name, \ + sizeof((__port)->lock_name), \ + "%s:port", (_ifname)); \ + mtx_init(&(__port)->lock, (__port)->lock_name, \ + NULL, MTX_DEF); \ + } while (B_FALSE) #define SFXGE_PORT_LOCK_DESTROY(_port) \ mtx_destroy(&(_port)->lock) #define SFXGE_PORT_LOCK(_port) \ @@ -335,8 +359,16 @@ extern int sfxge_port_ifmedia_init(struc #define SFXGE_PORT_LOCK_ASSERT_OWNED(_port) \ mtx_assert(&(_port)->lock, MA_OWNED) -#define SFXGE_MCDI_LOCK_INIT(_mcdi, _name) \ - mtx_init(&(_mcdi)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_MCDI_LOCK_INIT(_mcdi, _ifname) \ + do { \ + struct sfxge_mcdi *__mcdi = (_mcdi); \ + \ + snprintf((__mcdi)->lock_name, \ + sizeof((__mcdi)->lock_name), \ + "%s:mcdi", (_ifname)); \ + mtx_init(&(__mcdi)->lock, (__mcdi)->lock_name, \ + NULL, MTX_DEF); \ + } while (B_FALSE) #define SFXGE_MCDI_LOCK_DESTROY(_mcdi) \ mtx_destroy(&(_mcdi)->lock) #define SFXGE_MCDI_LOCK(_mcdi) \ @@ -346,8 +378,16 @@ extern int sfxge_port_ifmedia_init(struc #define SFXGE_MCDI_LOCK_ASSERT_OWNED(_mcdi) \ mtx_assert(&(_mcdi)->lock, MA_OWNED) -#define SFXGE_EVQ_LOCK_INIT(_evq, _name) \ - mtx_init(&(_evq)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_EVQ_LOCK_INIT(_evq, _ifname, _evq_index) \ + do { \ + struct sfxge_evq *__evq = (_evq); \ + \ + snprintf((__evq)->lock_name, \ + sizeof((__evq)->lock_name), \ + "%s:evq%u", (_ifname), (_evq_index)); \ + mtx_init(&(__evq)->lock, (__evq)->lock_name, \ + NULL, MTX_DEF); \ + } while (B_FALSE) #define SFXGE_EVQ_LOCK_DESTROY(_evq) \ mtx_destroy(&(_evq)->lock) #define SFXGE_EVQ_LOCK(_evq) \ Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:30:45 2015 (r280524) @@ -827,7 +827,7 @@ sfxge_ev_qinit(struct sfxge_softc *sc, u sfxge_sram_buf_tbl_alloc(sc, EFX_EVQ_NBUFS(evq->entries), &evq->buf_base_id); - SFXGE_EVQ_LOCK_INIT(evq, "evq"); + SFXGE_EVQ_LOCK_INIT(evq, device_get_nameunit(sc->dev), index); evq->init_state = SFXGE_EVQ_INITIALIZED; Modified: stable/10/sys/dev/sfxge/sfxge_mcdi.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_mcdi.c Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/sfxge_mcdi.c Wed Mar 25 10:30:45 2015 (r280524) @@ -201,7 +201,7 @@ sfxge_mcdi_init(struct sfxge_softc *sc) KASSERT(mcdi->state == SFXGE_MCDI_UNINITIALIZED, ("MCDI already initialized")); - SFXGE_MCDI_LOCK_INIT(mcdi, "sfxge_mcdi"); + SFXGE_MCDI_LOCK_INIT(mcdi, device_get_nameunit(sc->dev)); mcdi->state = SFXGE_MCDI_INITIALIZED; Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:30:45 2015 (r280524) @@ -583,7 +583,7 @@ sfxge_port_init(struct sfxge_softc *sc) port->sc = sc; - SFXGE_PORT_LOCK_INIT(port, "sfxge_port"); + SFXGE_PORT_LOCK_INIT(port, device_get_nameunit(sc->dev)); port->phy_stats.decode_buf = malloc(EFX_PHY_NSTATS * sizeof(uint32_t), M_SFXGE, M_WAITOK | M_ZERO); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:30:45 2015 (r280524) @@ -1466,7 +1466,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u stdp->std_get_non_tcp_max = sfxge_tx_dpl_get_non_tcp_max; stdp->std_getp = &stdp->std_get; - SFXGE_TXQ_LOCK_INIT(txq, "txq"); + SFXGE_TXQ_LOCK_INIT(txq, device_get_nameunit(sc->dev), txq_index); SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), SYSCTL_CHILDREN(txq_node), OID_AUTO, Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:29:08 2015 (r280523) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:30:45 2015 (r280524) @@ -130,8 +130,16 @@ enum sfxge_txq_type { #define SFXGE_TX_SCALE(sc) 1 #endif -#define SFXGE_TXQ_LOCK_INIT(_txq, _name) \ - mtx_init(&(_txq)->lock, (_name), NULL, MTX_DEF) +#define SFXGE_TXQ_LOCK_INIT(_txq, _ifname, _txq_index) \ + do { \ + struct sfxge_txq *__txq = (_txq); \ + \ + snprintf((__txq)->lock_name, \ + sizeof((__txq)->lock_name), \ + "%s:txq%u", (_ifname), (_txq_index)); \ + mtx_init(&(__txq)->lock, (__txq)->lock_name, \ + NULL, MTX_DEF); \ + } while (B_FALSE) #define SFXGE_TXQ_LOCK_DESTROY(_txq) \ mtx_destroy(&(_txq)->lock) #define SFXGE_TXQ_LOCK(_txq) \ @@ -164,6 +172,8 @@ struct sfxge_txq { efsys_mem_t *tsoh_buffer; + char lock_name[SFXGE_LOCK_NAME_MAX]; + /* This field changes more often and is read regularly on both * the initiation and completion paths */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:31:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA43BEAE; Wed, 25 Mar 2015 10:31:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C411C90B; Wed, 25 Mar 2015 10:31:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAVi30087680; Wed, 25 Mar 2015 10:31:44 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAViQV087661; Wed, 25 Mar 2015 10:31:44 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251031.t2PAViQV087661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:31:44 +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: r280525 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:31:45 -0000 Author: arybchik Date: Wed Mar 25 10:31:43 2015 New Revision: 280525 URL: https://svnweb.freebsd.org/changeset/base/280525 Log: MFC: 278254 sfxge: using 64-bit access for x86-64 Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:30:45 2015 (r280524) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 10:31:43 2015 (r280525) @@ -51,7 +51,11 @@ extern "C" { #include #define EFSYS_HAS_UINT64 1 +#if defined(__x86_64__) +#define EFSYS_USE_UINT64 1 +#else #define EFSYS_USE_UINT64 0 +#endif #if _BYTE_ORDER == _BIG_ENDIAN #define EFSYS_IS_BIG_ENDIAN 1 #define EFSYS_IS_LITTLE_ENDIAN 0 @@ -398,6 +402,26 @@ typedef struct efsys_mem_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#if defined(__x86_64__) +#define EFSYS_MEM_READQ(_esmp, _offset, _eqp) \ + do { \ + uint64_t *addr; \ + \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ + ("not power of 2 aligned")); \ + \ + addr = (void *)((_esmp)->esm_base + (_offset)); \ + \ + (_eqp)->eq_u64[0] = *addr; \ + \ + EFSYS_PROBE3(mem_readq, unsigned int, (_offset), \ + uint32_t, (_eqp)->eq_u32[1], \ + uint32_t, (_eqp)->eq_u32[0]); \ + \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) +#else #define EFSYS_MEM_READQ(_esmp, _offset, _eqp) \ do { \ uint32_t *addr; \ @@ -417,7 +441,31 @@ typedef struct efsys_mem_s { \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#endif +#if defined(__x86_64__) +#define EFSYS_MEM_READO(_esmp, _offset, _eop) \ + do { \ + uint64_t *addr; \ + \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_oword_t)), \ + ("not power of 2 aligned")); \ + \ + addr = (void *)((_esmp)->esm_base + (_offset)); \ + \ + (_eop)->eo_u64[0] = *addr++; \ + (_eop)->eo_u64[1] = *addr; \ + \ + EFSYS_PROBE5(mem_reado, unsigned int, (_offset), \ + uint32_t, (_eop)->eo_u32[3], \ + uint32_t, (_eop)->eo_u32[2], \ + uint32_t, (_eop)->eo_u32[1], \ + uint32_t, (_eop)->eo_u32[0]); \ + \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) +#else #define EFSYS_MEM_READO(_esmp, _offset, _eop) \ do { \ uint32_t *addr; \ @@ -441,6 +489,7 @@ typedef struct efsys_mem_s { \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#endif #define EFSYS_MEM_WRITED(_esmp, _offset, _edp) \ do { \ @@ -460,6 +509,27 @@ typedef struct efsys_mem_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#if defined(__x86_64__) +#define EFSYS_MEM_WRITEQ(_esmp, _offset, _eqp) \ + do { \ + uint64_t *addr; \ + \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ + ("not power of 2 aligned")); \ + \ + EFSYS_PROBE3(mem_writeq, unsigned int, (_offset), \ + uint32_t, (_eqp)->eq_u32[1], \ + uint32_t, (_eqp)->eq_u32[0]); \ + \ + addr = (void *)((_esmp)->esm_base + (_offset)); \ + \ + *addr = (_eqp)->eq_u64[0]; \ + \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) + +#else #define EFSYS_MEM_WRITEQ(_esmp, _offset, _eqp) \ do { \ uint32_t *addr; \ @@ -479,7 +549,31 @@ typedef struct efsys_mem_s { \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#endif +#if defined(__x86_64__) +#define EFSYS_MEM_WRITEO(_esmp, _offset, _eop) \ + do { \ + uint64_t *addr; \ + \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_oword_t)), \ + ("not power of 2 aligned")); \ + \ + EFSYS_PROBE5(mem_writeo, unsigned int, (_offset), \ + uint32_t, (_eop)->eo_u32[3], \ + uint32_t, (_eop)->eo_u32[2], \ + uint32_t, (_eop)->eo_u32[1], \ + uint32_t, (_eop)->eo_u32[0]); \ + \ + addr = (void *)((_esmp)->esm_base + (_offset)); \ + \ + *addr++ = (_eop)->eo_u64[0]; \ + *addr = (_eop)->eo_u64[1]; \ + \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) +#else #define EFSYS_MEM_WRITEO(_esmp, _offset, _eop) \ do { \ uint32_t *addr; \ @@ -503,6 +597,7 @@ typedef struct efsys_mem_s { \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#endif #define EFSYS_MEM_ADDR(_esmp) \ ((_esmp)->esm_addr) @@ -558,6 +653,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#if defined(__x86_64__) #define EFSYS_BAR_READQ(_esbp, _offset, _eqp) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -566,6 +662,53 @@ typedef struct efsys_bar_s { \ SFXGE_BAR_LOCK(_esbp); \ \ + (_eqp)->eq_u64[0] = bus_space_read_8((_esbp)->esb_tag, \ + (_esbp)->esb_handle, (_offset)); \ + \ + EFSYS_PROBE3(bar_readq, unsigned int, (_offset), \ + uint32_t, (_eqp)->eq_u32[1], \ + uint32_t, (_eqp)->eq_u32[0]); \ + \ + mtx_unlock(&((_esbp)->esb_lock)); \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) + +#define EFSYS_BAR_READO(_esbp, _offset, _eop, _lock) \ + do { \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_oword_t)), \ + ("not power of 2 aligned")); \ + \ + _NOTE(CONSTANTCONDITION) \ + if (_lock) \ + mtx_lock(&((_esbp)->esb_lock)); \ + \ + (_eop)->eo_u64[0] = bus_space_read_8((_esbp)->esb_tag, \ + (_esbp)->esb_handle, (_offset)); \ + (_eop)->eo_u64[1] = bus_space_read_8((_esbp)->esb_tag, \ + (_esbp)->esb_handle, (_offset+8)); \ + \ + EFSYS_PROBE5(bar_reado, unsigned int, (_offset), \ + uint32_t, (_eop)->eo_u32[3], \ + uint32_t, (_eop)->eo_u32[2], \ + uint32_t, (_eop)->eo_u32[1], \ + uint32_t, (_eop)->eo_u32[0]); \ + \ + _NOTE(CONSTANTCONDITION) \ + if (_lock) \ + mtx_unlock(&((_esbp)->esb_lock)); \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) + +#else +#define EFSYS_BAR_READQ(_esbp, _offset, _eqp) \ + do { \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ + ("not power of 2 aligned")); \ + \ + mtx_lock(&((_esbp)->esb_lock)); \ + \ (_eqp)->eq_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ (_eqp)->eq_u32[1] = bus_space_read_4((_esbp)->esb_tag, \ @@ -609,6 +752,7 @@ typedef struct efsys_bar_s { SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#endif #define EFSYS_BAR_WRITED(_esbp, _offset, _edp, _lock) \ do { \ @@ -632,6 +776,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#if defined(__x86_64__) #define EFSYS_BAR_WRITEQ(_esbp, _offset, _eqp) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -644,6 +789,25 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ + bus_space_write_8((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), (_eqp)->eq_u64[0]); \ + \ + mtx_unlock(&((_esbp)->esb_lock)); \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) +#else +#define EFSYS_BAR_WRITEQ(_esbp, _offset, _eqp) \ + do { \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ + ("not power of 2 aligned")); \ + \ + mtx_lock(&((_esbp)->esb_lock)); \ + \ + EFSYS_PROBE3(bar_writeq, unsigned int, (_offset), \ + uint32_t, (_eqp)->eq_u32[1], \ + uint32_t, (_eqp)->eq_u32[0]); \ + \ bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ (_offset), (_eqp)->eq_u32[0]); \ bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ @@ -652,7 +816,9 @@ typedef struct efsys_bar_s { SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#endif +#if defined(__x86_64__) #define EFSYS_BAR_WRITEO(_esbp, _offset, _eop, _lock) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -669,6 +835,34 @@ typedef struct efsys_bar_s { uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ \ + bus_space_write_8((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), (_eop)->eo_u64[0]); \ + bus_space_write_8((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset+8), (_eop)->eo_u64[1]); \ + \ + _NOTE(CONSTANTCONDITION) \ + if (_lock) \ + mtx_unlock(&((_esbp)->esb_lock)); \ + _NOTE(CONSTANTCONDITION) \ + } while (B_FALSE) + +#else +#define EFSYS_BAR_WRITEO(_esbp, _offset, _eop, _lock) \ + do { \ + _NOTE(CONSTANTCONDITION) \ + KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_oword_t)), \ + ("not power of 2 aligned")); \ + \ + _NOTE(CONSTANTCONDITION) \ + if (_lock) \ + mtx_lock(&((_esbp)->esb_lock)); \ + \ + EFSYS_PROBE5(bar_writeo, unsigned int, (_offset), \ + uint32_t, (_eop)->eo_u32[3], \ + uint32_t, (_eop)->eo_u32[2], \ + uint32_t, (_eop)->eo_u32[1], \ + uint32_t, (_eop)->eo_u32[0]); \ + \ bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ (_offset), (_eop)->eo_u32[0]); \ bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ @@ -683,6 +877,7 @@ typedef struct efsys_bar_s { SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) +#endif /* SPIN */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:32:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BBA1FEC; Wed, 25 Mar 2015 10:32:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C036915; Wed, 25 Mar 2015 10:32:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAWoBU088162; Wed, 25 Mar 2015 10:32:50 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAWouY088160; Wed, 25 Mar 2015 10:32:50 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251032.t2PAWouY088160@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:32:50 +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: r280526 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:32:51 -0000 Author: arybchik Date: Wed Mar 25 10:32:49 2015 New Revision: 280526 URL: https://svnweb.freebsd.org/changeset/base/280526 Log: MFC: 278255 sfxge: Add statistics for partially dropped TSO packets Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:31:43 2015 (r280525) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:32:49 2015 (r280526) @@ -1093,12 +1093,16 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq * roll back the work we have done. */ if (txq->n_pend_desc > - SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) + SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) { + txq->tso_pdrop_too_many++; break; + } next_id = (id + 1) & txq->ptr_mask; if (__predict_false(tso_start_new_packet(txq, &tso, - next_id))) + next_id))) { + txq->tso_pdrop_no_rsrc++; break; + } id = next_id; } } @@ -1515,6 +1519,8 @@ static const struct { SFXGE_TX_STAT(tso_bursts, tso_bursts), SFXGE_TX_STAT(tso_packets, tso_packets), SFXGE_TX_STAT(tso_long_headers, tso_long_headers), + SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), + SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), SFXGE_TX_STAT(tx_collapses, collapses), SFXGE_TX_STAT(tx_drops, drops), SFXGE_TX_STAT(tx_get_overflow, get_overflow), Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:31:43 2015 (r280525) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:32:49 2015 (r280526) @@ -201,6 +201,8 @@ struct sfxge_txq { unsigned long get_non_tcp_overflow; unsigned long put_overflow; unsigned long netdown_drops; + unsigned long tso_pdrop_too_many; + unsigned long tso_pdrop_no_rsrc; /* The following fields change more often, and are used mostly * on the completion path From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:34:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 667321D3; Wed, 25 Mar 2015 10:34:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 505E492E; Wed, 25 Mar 2015 10:34:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAYLbi088433; Wed, 25 Mar 2015 10:34:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAYLc6088431; Wed, 25 Mar 2015 10:34:21 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251034.t2PAYLc6088431@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:34:21 +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: r280527 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:34:21 -0000 Author: arybchik Date: Wed Mar 25 10:34:20 2015 New Revision: 280527 URL: https://svnweb.freebsd.org/changeset/base/280527 Log: MFC: 278833 sfxge: remove unused variable Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor), glebius Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:32:49 2015 (r280526) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:34:20 2015 (r280527) @@ -1279,7 +1279,6 @@ fail: void sfxge_tx_stop(struct sfxge_softc *sc) { - const efx_nic_cfg_t *encp; int index; index = SFXGE_TX_SCALE(sc); @@ -1288,7 +1287,6 @@ sfxge_tx_stop(struct sfxge_softc *sc) sfxge_tx_qstop(sc, SFXGE_TXQ_IP_CKSUM); - encp = efx_nic_cfg_get(sc->enp); sfxge_tx_qstop(sc, SFXGE_TXQ_NON_CKSUM); /* Tear down the transmit module */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:35:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E01A311; Wed, 25 Mar 2015 10:35:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E273593C; Wed, 25 Mar 2015 10:35:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAZK5f088652; Wed, 25 Mar 2015 10:35:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAZK3L088650; Wed, 25 Mar 2015 10:35:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251035.t2PAZK3L088650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:35: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: r280528 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:35:21 -0000 Author: arybchik Date: Wed Mar 25 10:35:19 2015 New Revision: 280528 URL: https://svnweb.freebsd.org/changeset/base/280528 Log: MFC: 278835 sfxge: remove full_packet_size from sfxge_tso_state It makes sfxge_tso_state smaller and even makes tso_start_new_packet() few bytes smaller. Data used to calculate packet size are used nearby, so it should be no problems with cache etc. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor), glebius Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:34:20 2015 (r280527) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:35:19 2015 (r280528) @@ -791,8 +791,6 @@ struct sfxge_tso_state { ssize_t nh_off; /* Offset of network header */ ssize_t tcph_off; /* Offset of TCP header */ unsigned header_len; /* Number of bytes of header */ - int full_packet_size; /* Number of bytes to put in each outgoing - * segment */ }; static inline const struct ip *tso_iph(const struct sfxge_tso_state *tso) @@ -894,7 +892,6 @@ static void tso_start(struct sfxge_tso_s } tso->header_len = tso->tcph_off + 4 * tso_tcph(tso)->th_off; - tso->full_packet_size = tso->header_len + mbuf->m_pkthdr.tso_segsz; tso->seqnum = ntohl(tso_tcph(tso)->th_seq); @@ -1014,7 +1011,8 @@ static int tso_start_new_packet(struct s tso->seqnum += tso->mbuf->m_pkthdr.tso_segsz; if (tso->out_len > tso->mbuf->m_pkthdr.tso_segsz) { /* This packet will not finish the TSO burst. */ - ip_length = tso->full_packet_size - tso->nh_off; + ip_length = tso->header_len - tso->nh_off + + tso->mbuf->m_pkthdr.tso_segsz; tsoh_th->th_flags &= ~(TH_FIN | TH_PUSH); } else { /* This packet will be the last in the TSO burst. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:35:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 283DE453; Wed, 25 Mar 2015 10:35:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12589949; Wed, 25 Mar 2015 10:35:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAZsdt088776; Wed, 25 Mar 2015 10:35:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAZsJb088775; Wed, 25 Mar 2015 10:35:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251035.t2PAZsJb088775@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:35:54 +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: r280529 - stable/10/sys/dev/usb/input X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:35:55 -0000 Author: hselasky Date: Wed Mar 25 10:35:54 2015 New Revision: 280529 URL: https://svnweb.freebsd.org/changeset/base/280529 Log: MFC r279854: Lock softc before clearing bits. Modified: stable/10/sys/dev/usb/input/uhid.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/input/uhid.c ============================================================================== --- stable/10/sys/dev/usb/input/uhid.c Wed Mar 25 10:35:19 2015 (r280528) +++ stable/10/sys/dev/usb/input/uhid.c Wed Mar 25 10:35:54 2015 (r280529) @@ -518,7 +518,9 @@ uhid_open(struct usb_fifo *fifo, int ffl */ if (fflags & FREAD) { /* reset flags */ + mtx_lock(&sc->sc_mtx); sc->sc_flags &= ~UHID_FLAG_IMMED; + mtx_unlock(&sc->sc_mtx); if (usb_fifo_alloc_buffer(fifo, sc->sc_isize + 1, UHID_FRAME_NUM)) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:36:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7490D593; Wed, 25 Mar 2015 10:36:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E9E4959; Wed, 25 Mar 2015 10:36:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAaccb088949; Wed, 25 Mar 2015 10:36:38 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAacf3088948; Wed, 25 Mar 2015 10:36:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251036.t2PAacf3088948@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:36: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: r280530 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:36:38 -0000 Author: arybchik Date: Wed Mar 25 10:36:37 2015 New Revision: 280530 URL: https://svnweb.freebsd.org/changeset/base/280530 Log: MFC: 278836 sfxge: remove used sfxge_tso_state member dma_seg_i Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:35:54 2015 (r280529) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:36:37 2015 (r280530) @@ -782,7 +782,6 @@ struct sfxge_tso_state { unsigned packet_space; /* Remaining space in current packet */ /* Input position */ - unsigned dma_seg_i; /* Current DMA segment number */ uint64_t dma_addr; /* DMA address of current position */ unsigned in_len; /* Remaining length in current mbuf */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:37:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E88036E4; Wed, 25 Mar 2015 10:37:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D32DD971; Wed, 25 Mar 2015 10:37:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAbIkJ089094; Wed, 25 Mar 2015 10:37:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAbIIe089093; Wed, 25 Mar 2015 10:37:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251037.t2PAbIIe089093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:37:18 +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: r280531 - stable/9/sys/dev/usb/input X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:37:19 -0000 Author: hselasky Date: Wed Mar 25 10:37:17 2015 New Revision: 280531 URL: https://svnweb.freebsd.org/changeset/base/280531 Log: MFC r279854: Lock softc before clearing bits. Modified: stable/9/sys/dev/usb/input/uhid.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/input/uhid.c ============================================================================== --- stable/9/sys/dev/usb/input/uhid.c Wed Mar 25 10:36:37 2015 (r280530) +++ stable/9/sys/dev/usb/input/uhid.c Wed Mar 25 10:37:17 2015 (r280531) @@ -518,7 +518,9 @@ uhid_open(struct usb_fifo *fifo, int ffl */ if (fflags & FREAD) { /* reset flags */ + mtx_lock(&sc->sc_mtx); sc->sc_flags &= ~UHID_FLAG_IMMED; + mtx_unlock(&sc->sc_mtx); if (usb_fifo_alloc_buffer(fifo, sc->sc_isize + 1, UHID_FRAME_NUM)) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:37:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1BFC481D; Wed, 25 Mar 2015 10:37:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06417978; Wed, 25 Mar 2015 10:37:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAbbYp089184; Wed, 25 Mar 2015 10:37:37 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAbbUo089181; Wed, 25 Mar 2015 10:37:37 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251037.t2PAbbUo089181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:37: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: r280532 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:37:38 -0000 Author: arybchik Date: Wed Mar 25 10:37:36 2015 New Revision: 280532 URL: https://svnweb.freebsd.org/changeset/base/280532 Log: MFC: 278837 sfxge: remove inline specifiers Now compiler does not need any help. The patch does not change generated code. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor), glebius Modified: stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:37:17 2015 (r280531) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:37:36 2015 (r280532) @@ -92,8 +92,8 @@ static int lro_loss_packets = 20; #define SFXGE_LRO_CONN_IS_TCPIPV4(c) (!((c)->l2_id & SFXGE_LRO_L2_ID_IPV6)) /* Compare IPv6 addresses, avoiding conditional branches */ -static __inline unsigned long ipv6_addr_cmp(const struct in6_addr *left, - const struct in6_addr *right) +static unsigned long ipv6_addr_cmp(const struct in6_addr *left, + const struct in6_addr *right) { #if LONG_BIT == 64 const uint64_t *left64 = (const uint64_t *)left; @@ -167,7 +167,7 @@ sfxge_rx_schedule_refill(struct sfxge_rx sfxge_rx_post_refill, rxq); } -static inline struct mbuf *sfxge_rx_alloc_mbuf(struct sfxge_softc *sc) +static struct mbuf *sfxge_rx_alloc_mbuf(struct sfxge_softc *sc) { struct mb_args args; struct mbuf *m; Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:37:17 2015 (r280531) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:37:36 2015 (r280532) @@ -107,7 +107,7 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p /* Forward declarations. */ -static inline void sfxge_tx_qdpl_service(struct sfxge_txq *txq); +static void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); static void sfxge_tx_qunblock(struct sfxge_txq *txq); static int sfxge_tx_queue_tso(struct sfxge_txq *txq, struct mbuf *mbuf, @@ -156,7 +156,7 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq #ifdef SFXGE_HAVE_MQ -static inline unsigned int +static unsigned int sfxge_is_mbuf_non_tcp(struct mbuf *mbuf) { /* Absense of TCP checksum flags does not mean that it is non-TCP @@ -481,7 +481,7 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx * * NOTE: drops the txq mutex! */ -static inline void +static void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); @@ -509,7 +509,7 @@ sfxge_tx_qdpl_service(struct sfxge_txq * * overload the csum_data field in the mbuf to keep track of this length * because there is no cheap alternative to avoid races. */ -static inline int +static int sfxge_tx_qdpl_put(struct sfxge_txq *txq, struct mbuf *mbuf, int locked) { struct sfxge_tx_dpl *stdp; @@ -757,7 +757,7 @@ void sfxge_if_start(struct ifnet *ifp) SFXGE_TXQ_UNLOCK(sc->txq[0]); } -static inline void +static void sfxge_tx_qdpl_service(struct sfxge_txq *txq) { struct ifnet *ifp = txq->sc->ifnet; @@ -792,19 +792,19 @@ struct sfxge_tso_state { unsigned header_len; /* Number of bytes of header */ }; -static inline const struct ip *tso_iph(const struct sfxge_tso_state *tso) +static const struct ip *tso_iph(const struct sfxge_tso_state *tso) { KASSERT(tso->protocol == htons(ETHERTYPE_IP), ("tso_iph() in non-IPv4 state")); return (const struct ip *)(tso->mbuf->m_data + tso->nh_off); } -static inline const struct ip6_hdr *tso_ip6h(const struct sfxge_tso_state *tso) +static __unused const struct ip6_hdr *tso_ip6h(const struct sfxge_tso_state *tso) { KASSERT(tso->protocol == htons(ETHERTYPE_IPV6), ("tso_ip6h() in non-IPv6 state")); return (const struct ip6_hdr *)(tso->mbuf->m_data + tso->nh_off); } -static inline const struct tcphdr *tso_tcph(const struct sfxge_tso_state *tso) +static const struct tcphdr *tso_tcph(const struct sfxge_tso_state *tso) { return (const struct tcphdr *)(tso->mbuf->m_data + tso->tcph_off); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:38:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B3F795E; Wed, 25 Mar 2015 10:38:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 153A9984; Wed, 25 Mar 2015 10:38:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAcMf5089415; Wed, 25 Mar 2015 10:38:22 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAcMIS089414; Wed, 25 Mar 2015 10:38:22 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251038.t2PAcMIS089414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10: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: r280533 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:38:23 -0000 Author: arybchik Date: Wed Mar 25 10:38:22 2015 New Revision: 280533 URL: https://svnweb.freebsd.org/changeset/base/280533 Log: MFC: 278838 sfxge: SYSCTL_IN/OUT should not be called with non-sleepable lock held The problem is found using WITNESS option enabled. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:37:36 2015 (r280532) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 10:38:22 2015 (r280533) @@ -91,16 +91,15 @@ sfxge_mac_stat_handler(SYSCTL_HANDLER_AR struct sfxge_softc *sc = arg1; unsigned int id = arg2; int rc; + uint64_t val; SFXGE_PORT_LOCK(&sc->port); - if ((rc = sfxge_mac_stat_update(sc)) != 0) - goto out; - - rc = SYSCTL_OUT(req, - (uint64_t *)sc->port.mac_stats.decode_buf + id, - sizeof(uint64_t)); -out: + if ((rc = sfxge_mac_stat_update(sc)) == 0) + val = ((uint64_t *)sc->port.mac_stats.decode_buf)[id]; SFXGE_PORT_UNLOCK(&sc->port); + + if (rc == 0) + rc = SYSCTL_OUT(req, &val, sizeof(val)); return (rc); } @@ -173,28 +172,29 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND sc = arg1; port = &sc->port; - SFXGE_PORT_LOCK(port); - if (req->newptr != NULL) { if ((error = SYSCTL_IN(req, &fcntl, sizeof(fcntl))) != 0) - goto out; - - if (port->wanted_fc == fcntl) - goto out; + return (error); - port->wanted_fc = fcntl; + SFXGE_PORT_LOCK(port); - if (port->init_state != SFXGE_PORT_STARTED) - goto out; + if (port->wanted_fc != fcntl) { + if (port->init_state == SFXGE_PORT_STARTED) + error = efx_mac_fcntl_set(sc->enp, + port->wanted_fc, + B_TRUE); + if (error == 0) + port->wanted_fc = fcntl; + } - error = efx_mac_fcntl_set(sc->enp, port->wanted_fc, B_TRUE); + SFXGE_PORT_UNLOCK(port); } else { - error = SYSCTL_OUT(req, &port->wanted_fc, - sizeof(port->wanted_fc)); - } + SFXGE_PORT_LOCK(port); + fcntl = port->wanted_fc; + SFXGE_PORT_UNLOCK(port); -out: - SFXGE_PORT_UNLOCK(port); + error = SYSCTL_OUT(req, &fcntl, sizeof(fcntl)); + } return (error); } @@ -205,7 +205,6 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE struct sfxge_softc *sc; struct sfxge_port *port; unsigned int wanted_fc, link_fc; - int error; sc = arg1; port = &sc->port; @@ -215,10 +214,9 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE efx_mac_fcntl_get(sc->enp, &wanted_fc, &link_fc); else link_fc = 0; - error = SYSCTL_OUT(req, &link_fc, sizeof(link_fc)); SFXGE_PORT_UNLOCK(port); - return (error); + return (SYSCTL_OUT(req, &link_fc, sizeof(link_fc))); } #endif /* SFXGE_HAVE_PAUSE_MEDIAOPTS */ @@ -499,16 +497,15 @@ sfxge_phy_stat_handler(SYSCTL_HANDLER_AR struct sfxge_softc *sc = arg1; unsigned int id = arg2; int rc; + uint32_t val; SFXGE_PORT_LOCK(&sc->port); - if ((rc = sfxge_phy_stat_update(sc)) != 0) - goto out; - - rc = SYSCTL_OUT(req, - (uint32_t *)sc->port.phy_stats.decode_buf + id, - sizeof(uint32_t)); -out: + if ((rc = sfxge_phy_stat_update(sc)) == 0) + val = ((uint32_t *)sc->port.phy_stats.decode_buf)[id]; SFXGE_PORT_UNLOCK(&sc->port); + + if (rc == 0) + rc = SYSCTL_OUT(req, &val, sizeof(val)); return (rc); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:39:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0FEFACD; Wed, 25 Mar 2015 10:39:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9AEAB993; Wed, 25 Mar 2015 10:39:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAd0XJ089545; Wed, 25 Mar 2015 10:39:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAd05H089544; Wed, 25 Mar 2015 10:39:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251039.t2PAd05H089544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r280534 - stable/8/sys/dev/usb/input X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:39:00 -0000 Author: hselasky Date: Wed Mar 25 10:38:59 2015 New Revision: 280534 URL: https://svnweb.freebsd.org/changeset/base/280534 Log: MFC r279854: Lock softc before clearing bits. Modified: stable/8/sys/dev/usb/input/uhid.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/input/uhid.c ============================================================================== --- stable/8/sys/dev/usb/input/uhid.c Wed Mar 25 10:38:22 2015 (r280533) +++ stable/8/sys/dev/usb/input/uhid.c Wed Mar 25 10:38:59 2015 (r280534) @@ -518,7 +518,9 @@ uhid_open(struct usb_fifo *fifo, int ffl */ if (fflags & FREAD) { /* reset flags */ + mtx_lock(&sc->sc_mtx); sc->sc_flags &= ~UHID_FLAG_IMMED; + mtx_unlock(&sc->sc_mtx); if (usb_fifo_alloc_buffer(fifo, sc->sc_isize + 1, UHID_FRAME_NUM)) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:39:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF978BFA; Wed, 25 Mar 2015 10:39:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C04B8998; Wed, 25 Mar 2015 10:39:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAdMCL089647; Wed, 25 Mar 2015 10:39:22 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAdJ58089633; Wed, 25 Mar 2015 10:39:19 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251039.t2PAdJ58089633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:39:19 +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: r280535 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:39:23 -0000 Author: arybchik Date: Wed Mar 25 10:39:18 2015 New Revision: 280535 URL: https://svnweb.freebsd.org/changeset/base/280535 Log: MFC: 278839 sfxge: style fixes Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_mac.c stable/10/sys/dev/sfxge/common/efx_mcdi.c stable/10/sys/dev/sfxge/common/efx_nic.c stable/10/sys/dev/sfxge/common/efx_rx.c stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/common/siena_mon.c stable/10/sys/dev/sfxge/common/siena_nic.c stable/10/sys/dev/sfxge/common/siena_vpd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:39:18 2015 (r280535) @@ -89,7 +89,8 @@ efx_ev_rx_not_ok( if (EFX_QWORD_FIELD(*eqp, FSF_AZ_RX_EV_TOBE_DISC) != 0) { EFX_EV_QSTAT_INCR(eep, EV_RX_TOBE_DISC); EFSYS_PROBE(tobe_disc); - /* Assume this is a unicast address mismatch, unless below + /* + * Assume this is a unicast address mismatch, unless below * we find either FSF_AZ_RX_EV_ETH_CRC_ERR or * EV_RX_PAUSE_FRM_ERR is set. */ @@ -102,7 +103,8 @@ efx_ev_rx_not_ok( (*flagsp) |= EFX_DISCARD; #if (EFSYS_OPT_RX_HDR_SPLIT || EFSYS_OPT_RX_SCATTER) - /* Lookout for payload queue ran dry errors and ignore them. + /* + * Lookout for payload queue ran dry errors and ignore them. * * Sadly for the header/data split cases, the descriptor * pointer in this event refers to the header queue and Modified: stable/10/sys/dev/sfxge/common/efx_mac.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mac.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_mac.c Wed Mar 25 10:39:18 2015 (r280535) @@ -669,11 +669,11 @@ chosen: EFSYS_ASSERT(emop != NULL); epp->ep_mac_type = type; - + if (emop->emo_reset != NULL) { if ((rc = emop->emo_reset(enp)) != 0) goto fail1; - + EFSYS_ASSERT(enp->en_reset_flags & EFX_RESET_MAC); enp->en_reset_flags &= ~EFX_RESET_MAC; } Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 10:39:18 2015 (r280535) @@ -44,7 +44,8 @@ __FBSDID("$FreeBSD$"); #define MCDI_P1_REBOOT_OFST 0x1fe #define MCDI_P2_REBOOT_OFST 0x1ff -/* A reboot/assertion causes the MCDI status word to be set after the +/* + * A reboot/assertion causes the MCDI status word to be set after the * command word is set or a REBOOT event is sent. If we notice a reboot * via these mechanisms then wait 10ms for the status word to be set. */ @@ -459,7 +460,8 @@ efx_mcdi_ev_death( ++emip->emi_aborted; } - /* Since we're running in parallel with a request, consume the + /* + * Since we're running in parallel with a request, consume the * status word before dropping the lock. */ if (rc == EIO || rc == EINTR) { Modified: stable/10/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_nic.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_nic.c Wed Mar 25 10:39:18 2015 (r280535) @@ -253,7 +253,8 @@ efx_nic_create( EFX_FEATURE_LFSR_HASH_INSERT | EFX_FEATURE_LINK_EVENTS | EFX_FEATURE_PERIODIC_MAC_STATS | EFX_FEATURE_WOL | EFX_FEATURE_MCDI | - EFX_FEATURE_LOOKAHEAD_SPLIT | EFX_FEATURE_MAC_HEADER_FILTERS; + EFX_FEATURE_LOOKAHEAD_SPLIT | + EFX_FEATURE_MAC_HEADER_FILTERS; break; #endif /* EFSYS_OPT_SIENA */ Modified: stable/10/sys/dev/sfxge/common/efx_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_rx.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_rx.c Wed Mar 25 10:39:18 2015 (r280535) @@ -527,7 +527,7 @@ efx_rx_filter_insert( EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_dmaq_id = (uint16_t)erp->er_index; - return efx_filter_insert_filter(erp->er_enp, spec, B_FALSE); + return (efx_filter_insert_filter(erp->er_enp, spec, B_FALSE)); } #endif @@ -541,7 +541,7 @@ efx_rx_filter_remove( EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_dmaq_id = (uint16_t)erp->er_index; - return efx_filter_remove_filter(erp->er_enp, spec); + return (efx_filter_remove_filter(erp->er_enp, spec)); } #endif @@ -673,7 +673,8 @@ efx_rx_qcreate( EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX); - EFX_STATIC_ASSERT(EFX_EV_RX_NLABELS == (1 << FRF_AZ_RX_DESCQ_LABEL_WIDTH)); + EFX_STATIC_ASSERT(EFX_EV_RX_NLABELS == + (1 << FRF_AZ_RX_DESCQ_LABEL_WIDTH)); EFSYS_ASSERT3U(label, <, EFX_EV_RX_NLABELS); EFSYS_ASSERT3U(enp->en_rx_qcount + 1, <, encp->enc_rxq_limit); Modified: stable/10/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 10:39:18 2015 (r280535) @@ -114,7 +114,7 @@ efx_tx_filter_insert( EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_dmaq_id = (uint16_t)etp->et_index; - return efx_filter_insert_filter(etp->et_enp, spec, B_FALSE); + return (efx_filter_insert_filter(etp->et_enp, spec, B_FALSE)); } #endif @@ -128,7 +128,7 @@ efx_tx_filter_remove( EFSYS_ASSERT3P(spec, !=, NULL); spec->efs_dmaq_id = (uint16_t)etp->et_index; - return efx_filter_remove_filter(etp->et_enp, spec); + return (efx_filter_remove_filter(etp->et_enp, spec)); } #endif Modified: stable/10/sys/dev/sfxge/common/siena_mon.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 10:39:18 2015 (r280535) @@ -138,13 +138,13 @@ siena_mon_decode_stats( efx_dword_t dword; EFSYS_MEM_READD(esmp, 4 * mc_sensor, &dword); emsvp->emsv_value = - (uint16_t)EFX_DWORD_FIELD( - dword, - MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE); + (uint16_t)EFX_DWORD_FIELD( + dword, + MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_VALUE); emsvp->emsv_state = - (uint16_t)EFX_DWORD_FIELD( - dword, - MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE); + (uint16_t)EFX_DWORD_FIELD( + dword, + MC_CMD_SENSOR_VALUE_ENTRY_TYPEDEF_STATE); } } Modified: stable/10/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 10:39:18 2015 (r280535) @@ -324,7 +324,8 @@ siena_board_cfg( efx_mcdi_execute(enp, &req); if (req.emr_rc == 0) { - if (req.emr_out_length_used < MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN) { + if (req.emr_out_length_used < + MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN) { rc = EMSGSIZE; goto fail3; } Modified: stable/10/sys/dev/sfxge/common/siena_vpd.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_vpd.c Wed Mar 25 10:38:59 2015 (r280534) +++ stable/10/sys/dev/sfxge/common/siena_vpd.c Wed Mar 25 10:39:18 2015 (r280535) @@ -541,11 +541,9 @@ siena_vpd_write( /* Copy in new vpd and update header */ vpd_offset = dcfg_size - vpd_length; - EFX_POPULATE_DWORD_1(dcfg->dynamic_vpd_offset, - EFX_DWORD_0, vpd_offset); + EFX_POPULATE_DWORD_1(dcfg->dynamic_vpd_offset, EFX_DWORD_0, vpd_offset); memcpy((caddr_t)dcfg + vpd_offset, data, vpd_length); - EFX_POPULATE_DWORD_1(dcfg->dynamic_vpd_length, - EFX_DWORD_0, vpd_length); + EFX_POPULATE_DWORD_1(dcfg->dynamic_vpd_length, EFX_DWORD_0, vpd_length); /* Update the checksum */ cksum = 0; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:40:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93603D47; Wed, 25 Mar 2015 10:40:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D5EC9AC; Wed, 25 Mar 2015 10:40:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAeIAs089890; Wed, 25 Mar 2015 10:40:18 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAeIHb089889; Wed, 25 Mar 2015 10:40:18 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251040.t2PAeIHb089889@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:40: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: r280536 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:40:18 -0000 Author: arybchik Date: Wed Mar 25 10:40:17 2015 New Revision: 280536 URL: https://svnweb.freebsd.org/changeset/base/280536 Log: MFC: 278841 sfxge: flush all Tx queues from if_qflush Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor), glebius Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:39:18 2015 (r280535) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:40:17 2015 (r280536) @@ -649,7 +649,7 @@ sfxge_if_qflush(struct ifnet *ifp) sc = ifp->if_softc; - for (i = 0; i < SFXGE_TX_SCALE(sc); i++) + for (i = 0; i < SFXGE_TXQ_IP_TCP_UDP_CKSUM + SFXGE_TX_SCALE(sc); i++) sfxge_tx_qdpl_flush(sc->txq[i]); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:41:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8ACD2E99; Wed, 25 Mar 2015 10:41:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5BD2DA54; Wed, 25 Mar 2015 10:41:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAfAdq090509; Wed, 25 Mar 2015 10:41:10 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAfAUm090508; Wed, 25 Mar 2015 10:41:10 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251041.t2PAfAUm090508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:41:10 +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: r280537 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:41:10 -0000 Author: arybchik Date: Wed Mar 25 10:41:09 2015 New Revision: 280537 URL: https://svnweb.freebsd.org/changeset/base/280537 Log: MFC: 278937 sfxge: add TCP segment size to sfxge_tso_state It avoids access to m_pkthdr when TSO packet is started and also makes tso_start_new_packet() function smaller. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:40:17 2015 (r280536) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:41:09 2015 (r280537) @@ -790,6 +790,7 @@ struct sfxge_tso_state { ssize_t nh_off; /* Offset of network header */ ssize_t tcph_off; /* Offset of TCP header */ unsigned header_len; /* Number of bytes of header */ + unsigned seg_size; /* TCP segment size */ }; static const struct ip *tso_iph(const struct sfxge_tso_state *tso) @@ -891,6 +892,7 @@ static void tso_start(struct sfxge_tso_s } tso->header_len = tso->tcph_off + 4 * tso_tcph(tso)->th_off; + tso->seg_size = mbuf->m_pkthdr.tso_segsz; tso->seqnum = ntohl(tso_tcph(tso)->th_seq); @@ -1007,11 +1009,10 @@ static int tso_start_new_packet(struct s m_copydata(tso->mbuf, 0, tso->header_len, header); tsoh_th->th_seq = htonl(tso->seqnum); - tso->seqnum += tso->mbuf->m_pkthdr.tso_segsz; - if (tso->out_len > tso->mbuf->m_pkthdr.tso_segsz) { + tso->seqnum += tso->seg_size; + if (tso->out_len > tso->seg_size) { /* This packet will not finish the TSO burst. */ - ip_length = tso->header_len - tso->nh_off + - tso->mbuf->m_pkthdr.tso_segsz; + ip_length = tso->header_len - tso->nh_off + tso->seg_size; tsoh_th->th_flags &= ~(TH_FIN | TH_PUSH); } else { /* This packet will be the last in the TSO burst. */ @@ -1033,7 +1034,7 @@ static int tso_start_new_packet(struct s /* Make the header visible to the hardware. */ bus_dmamap_sync(txq->packet_dma_tag, map, BUS_DMASYNC_PREWRITE); - tso->packet_space = tso->mbuf->m_pkthdr.tso_segsz; + tso->packet_space = tso->seg_size; txq->tso_packets++; /* Form a descriptor for this header. */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:42:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCB51FDF; Wed, 25 Mar 2015 10:42:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD97FA62; Wed, 25 Mar 2015 10:42:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAgK9r093627; Wed, 25 Mar 2015 10:42:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAgJjn093624; Wed, 25 Mar 2015 10:42:19 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251042.t2PAgJjn093624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:42:19 +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: r280538 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:42:21 -0000 Author: arybchik Date: Wed Mar 25 10:42:19 2015 New Revision: 280538 URL: https://svnweb.freebsd.org/changeset/base/280538 Log: MFC: 278938 sfxge: add driver context member with number of transmit queues Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:41:09 2015 (r280537) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:42:19 2015 (r280538) @@ -258,6 +258,8 @@ struct sfxge_softc { struct mtx tx_lock __aligned(CACHE_LINE_SIZE); char tx_lock_name[SFXGE_LOCK_NAME_MAX]; #endif + + unsigned int txq_count; }; #define SFXGE_LINK_UP(sc) ((sc)->port.link_mode != EFX_LINK_DOWN) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:41:09 2015 (r280537) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:42:19 2015 (r280538) @@ -649,7 +649,7 @@ sfxge_if_qflush(struct ifnet *ifp) sc = ifp->if_softc; - for (i = 0; i < SFXGE_TXQ_IP_TCP_UDP_CKSUM + SFXGE_TX_SCALE(sc); i++) + for (i = 0; i < sc->txq_count; i++) sfxge_tx_qdpl_flush(sc->txq[i]); } @@ -1279,13 +1279,9 @@ sfxge_tx_stop(struct sfxge_softc *sc) { int index; - index = SFXGE_TX_SCALE(sc); + index = sc->txq_count; while (--index >= 0) - sfxge_tx_qstop(sc, SFXGE_TXQ_IP_TCP_UDP_CKSUM + index); - - sfxge_tx_qstop(sc, SFXGE_TXQ_IP_CKSUM); - - sfxge_tx_qstop(sc, SFXGE_TXQ_NON_CKSUM); + sfxge_tx_qstop(sc, index); /* Tear down the transmit module */ efx_tx_fini(sc->enp); @@ -1301,30 +1297,17 @@ sfxge_tx_start(struct sfxge_softc *sc) if ((rc = efx_tx_init(sc->enp)) != 0) return (rc); - if ((rc = sfxge_tx_qstart(sc, SFXGE_TXQ_NON_CKSUM)) != 0) - goto fail; - - if ((rc = sfxge_tx_qstart(sc, SFXGE_TXQ_IP_CKSUM)) != 0) - goto fail2; - - for (index = 0; index < SFXGE_TX_SCALE(sc); index++) { - if ((rc = sfxge_tx_qstart(sc, SFXGE_TXQ_IP_TCP_UDP_CKSUM + - index)) != 0) - goto fail3; + for (index = 0; index < sc->txq_count; index++) { + if ((rc = sfxge_tx_qstart(sc, index)) != 0) + goto fail; } return (0); -fail3: +fail: while (--index >= 0) - sfxge_tx_qstop(sc, SFXGE_TXQ_IP_TCP_UDP_CKSUM + index); - - sfxge_tx_qstop(sc, SFXGE_TXQ_IP_CKSUM); - -fail2: - sfxge_tx_qstop(sc, SFXGE_TXQ_NON_CKSUM); + sfxge_tx_qstop(sc, index); -fail: efx_tx_fini(sc->enp); return (rc); @@ -1535,9 +1518,7 @@ sfxge_tx_stat_handler(SYSCTL_HANDLER_ARG /* Sum across all TX queues */ sum = 0; - for (index = 0; - index < SFXGE_TXQ_IP_TCP_UDP_CKSUM + SFXGE_TX_SCALE(sc); - index++) + for (index = 0; index < sc->txq_count; index++) sum += *(unsigned long *)((caddr_t)sc->txq[index] + sfxge_tx_stats[id].offset); @@ -1570,12 +1551,11 @@ sfxge_tx_fini(struct sfxge_softc *sc) { int index; - index = SFXGE_TX_SCALE(sc); + index = sc->txq_count; while (--index >= 0) - sfxge_tx_qfini(sc, SFXGE_TXQ_IP_TCP_UDP_CKSUM + index); + sfxge_tx_qfini(sc, index); - sfxge_tx_qfini(sc, SFXGE_TXQ_IP_CKSUM); - sfxge_tx_qfini(sc, SFXGE_TXQ_NON_CKSUM); + sc->txq_count = 0; } @@ -1591,6 +1571,12 @@ sfxge_tx_init(struct sfxge_softc *sc) KASSERT(intr->state == SFXGE_INTR_INITIALIZED, ("intr->state != SFXGE_INTR_INITIALIZED")); +#ifdef SFXGE_HAVE_MQ + sc->txq_count = SFXGE_TXQ_NTYPES - 1 + sc->intr.n_alloc; +#else + sc->txq_count = SFXGE_TXQ_NTYPES; +#endif + sc->txqs_node = SYSCTL_ADD_NODE( device_get_sysctl_ctx(sc->dev), SYSCTL_CHILDREN(device_get_sysctl_tree(sc->dev)), @@ -1609,8 +1595,10 @@ sfxge_tx_init(struct sfxge_softc *sc) SFXGE_TXQ_IP_CKSUM, 0)) != 0) goto fail2; - for (index = 0; index < SFXGE_TX_SCALE(sc); index++) { - if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_IP_TCP_UDP_CKSUM + index, + for (index = 0; + index < sc->txq_count - SFXGE_TXQ_NTYPES + 1; + index++) { + if ((rc = sfxge_tx_qinit(sc, SFXGE_TXQ_NTYPES - 1 + index, SFXGE_TXQ_IP_TCP_UDP_CKSUM, index)) != 0) goto fail3; } @@ -1620,15 +1608,16 @@ sfxge_tx_init(struct sfxge_softc *sc) return (0); fail3: - sfxge_tx_qfini(sc, SFXGE_TXQ_IP_CKSUM); - while (--index >= 0) sfxge_tx_qfini(sc, SFXGE_TXQ_IP_TCP_UDP_CKSUM + index); + sfxge_tx_qfini(sc, SFXGE_TXQ_IP_CKSUM); + fail2: sfxge_tx_qfini(sc, SFXGE_TXQ_NON_CKSUM); fail: fail_txq_node: + sc->txq_count = 0; return (rc); } Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:41:09 2015 (r280537) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:42:19 2015 (r280538) @@ -124,10 +124,8 @@ enum sfxge_txq_type { #ifdef SFXGE_HAVE_MQ #define SFXGE_TX_LOCK(txq) (&(txq)->lock) -#define SFXGE_TX_SCALE(sc) ((sc)->intr.n_alloc) #else #define SFXGE_TX_LOCK(txq) (&(txq)->sc->tx_lock) -#define SFXGE_TX_SCALE(sc) 1 #endif #define SFXGE_TXQ_LOCK_INIT(_txq, _ifname, _txq_index) \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:43:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E12351A8; Wed, 25 Mar 2015 10:43:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB060A6D; Wed, 25 Mar 2015 10:43:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAh7dD093790; Wed, 25 Mar 2015 10:43:07 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAh7HT093788; Wed, 25 Mar 2015 10:43:07 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251043.t2PAh7HT093788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:43: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: r280539 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:43:08 -0000 Author: arybchik Date: Wed Mar 25 10:43:06 2015 New Revision: 280539 URL: https://svnweb.freebsd.org/changeset/base/280539 Log: MFC: 278939 sfxge: add driver context member with number of receive queues Mainly to unify with similar member for transmit queues. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:42:19 2015 (r280538) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:43:06 2015 (r280539) @@ -259,6 +259,7 @@ struct sfxge_softc { char tx_lock_name[SFXGE_LOCK_NAME_MAX]; #endif + unsigned int rxq_count; unsigned int txq_count; }; Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:42:19 2015 (r280538) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:43:06 2015 (r280539) @@ -939,13 +939,10 @@ fail: void sfxge_rx_stop(struct sfxge_softc *sc) { - struct sfxge_intr *intr; int index; - intr = &sc->intr; - /* Stop the receive queue(s) */ - index = intr->n_alloc; + index = sc->rxq_count; while (--index >= 0) sfxge_rx_qstop(sc, index); @@ -987,7 +984,7 @@ sfxge_rx_start(struct sfxge_softc *sc) * Set up the scale table. Enable all hash types and hash insertion. */ for (index = 0; index < SFXGE_RX_SCALE_MAX; index++) - sc->rx_indir_table[index] = index % sc->intr.n_alloc; + sc->rx_indir_table[index] = index % sc->rxq_count; if ((rc = efx_rx_scale_tbl_set(sc->enp, sc->rx_indir_table, SFXGE_RX_SCALE_MAX)) != 0) goto fail; @@ -1000,7 +997,7 @@ sfxge_rx_start(struct sfxge_softc *sc) goto fail; /* Start the receive queue(s). */ - for (index = 0; index < intr->n_alloc; index++) { + for (index = 0; index < sc->rxq_count; index++) { if ((rc = sfxge_rx_qstart(sc, index)) != 0) goto fail2; } @@ -1099,7 +1096,7 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u efsys_mem_t *esmp; int rc; - KASSERT(index < sc->intr.n_alloc, ("index >= %d", sc->intr.n_alloc)); + KASSERT(index < sc->rxq_count, ("index >= %d", sc->rxq_count)); rxq = malloc(sizeof(struct sfxge_rxq), M_SFXGE, M_ZERO | M_WAITOK); rxq->sc = sc; @@ -1159,7 +1156,7 @@ sfxge_rx_stat_handler(SYSCTL_HANDLER_ARG /* Sum across all RX queues */ sum = 0; - for (index = 0; index < sc->intr.n_alloc; index++) + for (index = 0; index < sc->rxq_count; index++) sum += *(unsigned int *)((caddr_t)sc->rxq[index] + sfxge_rx_stats[id].offset); @@ -1190,14 +1187,13 @@ sfxge_rx_stat_init(struct sfxge_softc *s void sfxge_rx_fini(struct sfxge_softc *sc) { - struct sfxge_intr *intr; int index; - intr = &sc->intr; - - index = intr->n_alloc; + index = sc->rxq_count; while (--index >= 0) sfxge_rx_qfini(sc, index); + + sc->rxq_count = 0; } int @@ -1212,11 +1208,13 @@ sfxge_rx_init(struct sfxge_softc *sc) intr = &sc->intr; + sc->rxq_count = intr->n_alloc; + KASSERT(intr->state == SFXGE_INTR_INITIALIZED, ("intr->state != SFXGE_INTR_INITIALIZED")); /* Initialize the receive queue(s) - one per interrupt. */ - for (index = 0; index < intr->n_alloc; index++) { + for (index = 0; index < sc->rxq_count; index++) { if ((rc = sfxge_rx_qinit(sc, index)) != 0) goto fail; } @@ -1230,5 +1228,6 @@ fail: while (--index >= 0) sfxge_rx_qfini(sc, index); + sc->rxq_count = 0; return (rc); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:44:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 32C9F2F7; Wed, 25 Mar 2015 10:44:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C980A80; Wed, 25 Mar 2015 10:44:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAi9Bo093996; Wed, 25 Mar 2015 10:44:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAi97X093995; Wed, 25 Mar 2015 10:44:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251044.t2PAi97X093995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:44:09 +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: r280540 - stable/10/sys/ofed/include/linux X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:44:10 -0000 Author: hselasky Date: Wed Mar 25 10:44:09 2015 New Revision: 280540 URL: https://svnweb.freebsd.org/changeset/base/280540 Log: MFC r280211: Add missing void pointer argument to SYSINIT() functions. Sponsored by: Mellanox Technologies Modified: stable/10/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ofed/include/linux/linux_compat.c ============================================================================== --- stable/10/sys/ofed/include/linux/linux_compat.c Wed Mar 25 10:43:06 2015 (r280539) +++ stable/10/sys/ofed/include/linux/linux_compat.c Wed Mar 25 10:44:09 2015 (r280540) @@ -689,7 +689,7 @@ vunmap(void *addr) } static void -linux_compat_init(void) +linux_compat_init(void *arg) { struct sysctl_oid *rootoid; int i; @@ -719,7 +719,7 @@ linux_compat_init(void) SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, NULL); static void -linux_compat_uninit(void) +linux_compat_uninit(void *arg) { kobject_kfree_name(&class_root); kobject_kfree_name(&linux_rootdev.kobj); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:44:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9795424; Wed, 25 Mar 2015 10:44:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FC95A84; Wed, 25 Mar 2015 10:44:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAiVjB094109; Wed, 25 Mar 2015 10:44:31 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAiV5T094104; Wed, 25 Mar 2015 10:44:31 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251044.t2PAiV5T094104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:44: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: r280541 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:44:31 -0000 Author: arybchik Date: Wed Mar 25 10:44:30 2015 New Revision: 280541 URL: https://svnweb.freebsd.org/changeset/base/280541 Log: MFC: 278940 sfxge: add driver context member with number of event queues Mainly to unify with similar member for transmit and receive queues. It will be used in the future for resources allocation processing. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:44:09 2015 (r280540) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 10:44:30 2015 (r280541) @@ -259,6 +259,7 @@ struct sfxge_softc { char tx_lock_name[SFXGE_LOCK_NAME_MAX]; #endif + unsigned int evq_count; unsigned int rxq_count; unsigned int txq_count; }; Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:44:09 2015 (r280540) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 10:44:30 2015 (r280541) @@ -422,7 +422,7 @@ sfxge_ev_stat_update(struct sfxge_softc sc->ev_stats_update_time = now; /* Add event counts from each event queue in turn */ - for (index = 0; index < sc->intr.n_alloc; index++) { + for (index = 0; index < sc->evq_count; index++) { evq = sc->evq[index]; SFXGE_EVQ_LOCK(evq); efx_ev_qstats_update(evq->common, sc->ev_stats); @@ -488,7 +488,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG struct sfxge_intr *intr = &sc->intr; unsigned int moderation; int error; - int index; + unsigned int index; SFXGE_ADAPTER_LOCK(sc); @@ -508,7 +508,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG sc->ev_moderation = moderation; if (intr->state == SFXGE_INTR_STARTED) { - for (index = 0; index < intr->n_alloc; index++) + for (index = 0; index < sc->evq_count; index++) sfxge_ev_qmoderate(sc, index, moderation); } } else { @@ -722,7 +722,7 @@ sfxge_ev_stop(struct sfxge_softc *sc) ("Interrupts not started")); /* Stop the event queue(s) */ - index = intr->n_alloc; + index = sc->evq_count; while (--index >= 0) sfxge_ev_qstop(sc, index); @@ -747,7 +747,7 @@ sfxge_ev_start(struct sfxge_softc *sc) return (rc); /* Start the event queues */ - for (index = 0; index < intr->n_alloc; index++) { + for (index = 0; index < sc->evq_count; index++) { if ((rc = sfxge_ev_qstart(sc, index)) != 0) goto fail; } @@ -848,9 +848,11 @@ sfxge_ev_fini(struct sfxge_softc *sc) sc->ev_moderation = 0; /* Tear down the event queue(s). */ - index = intr->n_alloc; + index = sc->evq_count; while (--index >= 0) sfxge_ev_qfini(sc, index); + + sc->evq_count = 0; } int @@ -864,6 +866,8 @@ sfxge_ev_init(struct sfxge_softc *sc) intr = &sc->intr; + sc->evq_count = intr->n_alloc; + KASSERT(intr->state == SFXGE_INTR_INITIALIZED, ("intr->state != SFXGE_INTR_INITIALIZED")); @@ -879,7 +883,7 @@ sfxge_ev_init(struct sfxge_softc *sc) /* * Initialize the event queue(s) - one per interrupt. */ - for (index = 0; index < intr->n_alloc; index++) { + for (index = 0; index < sc->evq_count; index++) { if ((rc = sfxge_ev_qinit(sc, index)) != 0) goto fail; } @@ -894,5 +898,6 @@ fail: while (--index >= 0) sfxge_ev_qfini(sc, index); + sc->evq_count = 0; return (rc); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:46:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3171C574; Wed, 25 Mar 2015 10:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B66DA97; Wed, 25 Mar 2015 10:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAk4E5094398; Wed, 25 Mar 2015 10:46:04 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAk4tc094397; Wed, 25 Mar 2015 10:46:04 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251046.t2PAk4tc094397@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:46:04 +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: r280542 - stable/10/sys/modules/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:46:05 -0000 Author: arybchik Date: Wed Mar 25 10:46:04 2015 New Revision: 280542 URL: https://svnweb.freebsd.org/changeset/base/280542 Log: MFC: 279180 sfxge: list header in SRCS Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/modules/sfxge/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/sfxge/Makefile ============================================================================== --- stable/10/sys/modules/sfxge/Makefile Wed Mar 25 10:44:30 2015 (r280541) +++ stable/10/sys/modules/sfxge/Makefile Wed Mar 25 10:46:04 2015 (r280542) @@ -11,14 +11,19 @@ SRCS+= opt_inet.h opt_sched.h SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c SRCS+= sfxge_intr.c sfxge_mcdi.c SRCS+= sfxge_port.c sfxge_rx.c sfxge_tx.c +SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h .PATH: ${.CURDIR}/../../dev/sfxge/common SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c SRCS+= efx_nvram.c efx_phy.c efx_port.c efx_rx.c efx_sram.c efx_tx.c SRCS+= efx_vpd.c efx_wol.c +SRCS+= efsys.h +SRCS+= efx.h efx_impl.h efx_mcdi.h efx_regs.h efx_regs_ef10.h +SRCS+= efx_regs_mcdi.h efx_regs_pci.h efx_types.h SRCS+= siena_mac.c siena_nic.c siena_nvram.c siena_phy.c SRCS+= siena_sram.c siena_vpd.c +SRCS+= siena_flash.h siena_impl.h DEBUG_FLAGS= -DDEBUG=1 From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:46:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 795346AF; Wed, 25 Mar 2015 10:46:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63646A9C; Wed, 25 Mar 2015 10:46:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAkEtw094459; Wed, 25 Mar 2015 10:46:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAkEGB094458; Wed, 25 Mar 2015 10:46:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251046.t2PAkEGB094458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:46:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280543 - stable/9/sys/ofed/include/linux X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:46:14 -0000 Author: hselasky Date: Wed Mar 25 10:46:13 2015 New Revision: 280543 URL: https://svnweb.freebsd.org/changeset/base/280543 Log: MFC r280211: Add missing void pointer argument to SYSINIT() functions. Sponsored by: Mellanox Technologies Modified: stable/9/sys/ofed/include/linux/linux_compat.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/include/linux/linux_compat.c ============================================================================== --- stable/9/sys/ofed/include/linux/linux_compat.c Wed Mar 25 10:46:04 2015 (r280542) +++ stable/9/sys/ofed/include/linux/linux_compat.c Wed Mar 25 10:46:13 2015 (r280543) @@ -687,7 +687,7 @@ vunmap(void *addr) } static void -linux_compat_init(void) +linux_compat_init(void *arg) { struct sysctl_oid *rootoid; int i; @@ -717,7 +717,7 @@ linux_compat_init(void) SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, NULL); static void -linux_compat_uninit(void) +linux_compat_uninit(void *arg) { kobject_kfree_name(&class_root); kobject_kfree_name(&linux_rootdev.kobj); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:48:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 109458F4; Wed, 25 Mar 2015 10:48:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE956ABC; Wed, 25 Mar 2015 10:48:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAmTvF094832; Wed, 25 Mar 2015 10:48:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAmTed094829; Wed, 25 Mar 2015 10:48:29 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251048.t2PAmTed094829@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:48: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: r280544 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:48:30 -0000 Author: arybchik Date: Wed Mar 25 10:48:28 2015 New Revision: 280544 URL: https://svnweb.freebsd.org/changeset/base/280544 Log: MFC: 278941 sfxge: support variable-length response to MCDI GET_BOARD_CFG Allocate the minimum or maximum response length for GET_BOARD_CFG as appropriate. When looking up firmware subtypes by partition ID, check the ID against the actual response length. Merge of the patch made by Ben Hutchings in 2011. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h stable/10/sys/dev/sfxge/common/siena_nic.c stable/10/sys/dev/sfxge/common/siena_nvram.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Wed Mar 25 10:46:13 2015 (r280543) +++ stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Wed Mar 25 10:48:28 2015 (r280544) @@ -709,7 +709,9 @@ #define MC_CMD_GET_BOARD_CFG_IN_LEN 0 /* MC_CMD_GET_BOARD_CFG_OUT msgresponse */ -#define MC_CMD_GET_BOARD_CFG_OUT_LEN 96 +#define MC_CMD_GET_BOARD_CFG_OUT_LENMIN 96 +#define MC_CMD_GET_BOARD_CFG_OUT_LENMAX 136 +#define MC_CMD_GET_BOARD_CFG_OUT_LEN(num) (72+2*(num)) #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_TYPE_OFST 0 #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_OFST 4 #define MC_CMD_GET_BOARD_CFG_OUT_BOARD_NAME_LEN 32 @@ -729,7 +731,8 @@ #define MC_CMD_GET_BOARD_CFG_OUT_MAC_STRIDE_PORT1_OFST 68 #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST 72 #define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_LEN 2 -#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_NUM 12 +#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MINNUM 12 +#define MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_MAXNUM 32 /***********************************/ Modified: stable/10/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 10:46:13 2015 (r280543) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 10:48:28 2015 (r280544) @@ -276,7 +276,7 @@ siena_board_cfg( { efx_nic_cfg_t *encp = &(enp->en_nic_cfg); efx_mcdi_iface_t *emip = &(enp->en_u.siena.enu_mip); - uint8_t outbuf[MAX(MC_CMD_GET_BOARD_CFG_OUT_LEN, + uint8_t outbuf[MAX(MC_CMD_GET_BOARD_CFG_OUT_LENMIN, MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN)]; efx_mcdi_req_t req; uint8_t *src; @@ -288,7 +288,7 @@ siena_board_cfg( req.emr_in_buf = NULL; req.emr_in_length = 0; req.emr_out_buf = outbuf; - req.emr_out_length = MC_CMD_GET_BOARD_CFG_OUT_LEN; + req.emr_out_length = MC_CMD_GET_BOARD_CFG_OUT_LENMIN; efx_mcdi_execute(enp, &req); @@ -297,7 +297,7 @@ siena_board_cfg( goto fail1; } - if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_LEN) { + if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_LENMIN) { rc = EMSGSIZE; goto fail2; } Modified: stable/10/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nvram.c Wed Mar 25 10:46:13 2015 (r280543) +++ stable/10/sys/dev/sfxge/common/siena_nvram.c Wed Mar 25 10:48:28 2015 (r280544) @@ -587,7 +587,7 @@ siena_nvram_get_subtype( __out uint32_t *subtypep) { efx_mcdi_req_t req; - uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LEN]; + uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMAX]; efx_word_t *fw_list; int rc; @@ -605,17 +605,26 @@ siena_nvram_get_subtype( goto fail1; } - if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_LEN) { + if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_LENMIN) { rc = EMSGSIZE; goto fail2; } + if (req.emr_out_length_used < + MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST + + (partn + 1) * sizeof(efx_word_t)) { + rc = ENOENT; + goto fail3; + } + fw_list = MCDI_OUT2(req, efx_word_t, GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST); *subtypep = EFX_WORD_FIELD(fw_list[partn], EFX_WORD_0); return (0); +fail3: + EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:49:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D934DA6F; Wed, 25 Mar 2015 10:49:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BA7EEAD8; Wed, 25 Mar 2015 10:49:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAnlO0095046; Wed, 25 Mar 2015 10:49:47 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAnkLd095043; Wed, 25 Mar 2015 10:49:46 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251049.t2PAnkLd095043@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:49:46 +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: r280545 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:49:48 -0000 Author: arybchik Date: Wed Mar 25 10:49:45 2015 New Revision: 280545 URL: https://svnweb.freebsd.org/changeset/base/280545 Log: MFC: 278942 sfxge: fix broken MCDI_EV_FIELD() macro Submitted by: Andrew Lee Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_mcdi.h stable/10/sys/dev/sfxge/common/siena_phy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:48:28 2015 (r280544) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:49:45 2015 (r280545) @@ -577,9 +577,9 @@ efx_ev_mcdi( case MCDI_EVENT_CODE_CMDDONE: efx_mcdi_ev_cpl(enp, - MCDI_EV_FIELD(*eqp, CMDDONE_SEQ), - MCDI_EV_FIELD(*eqp, CMDDONE_DATALEN), - MCDI_EV_FIELD(*eqp, CMDDONE_ERRNO)); + MCDI_EV_FIELD(eqp, CMDDONE_SEQ), + MCDI_EV_FIELD(eqp, CMDDONE_DATALEN), + MCDI_EV_FIELD(eqp, CMDDONE_ERRNO)); break; case MCDI_EVENT_CODE_LINKCHANGE: { Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mcdi.h Wed Mar 25 10:48:28 2015 (r280544) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.h Wed Mar 25 10:49:45 2015 (r280545) @@ -231,7 +231,7 @@ efx_mcdi_version( MC_CMD_ ## _field) #define MCDI_EV_FIELD(_eqp, _field) \ - EFX_QWORD_FIELD(*eqp, MCDI_EVENT_ ## _field) + EFX_QWORD_FIELD(*_eqp, MCDI_EVENT_ ## _field) #ifdef __cplusplus } Modified: stable/10/sys/dev/sfxge/common/siena_phy.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_phy.c Wed Mar 25 10:48:28 2015 (r280544) +++ stable/10/sys/dev/sfxge/common/siena_phy.c Wed Mar 25 10:49:45 2015 (r280545) @@ -122,7 +122,7 @@ siena_phy_link_ev( * Convert the LINKCHANGE speed enumeration into mbit/s, in the * same way as GET_LINK encodes the speed */ - switch (MCDI_EV_FIELD(*eqp, LINKCHANGE_SPEED)) { + switch (MCDI_EV_FIELD(eqp, LINKCHANGE_SPEED)) { case MCDI_EVENT_LINKCHANGE_SPEED_100M: speed = 100; break; @@ -137,11 +137,11 @@ siena_phy_link_ev( break; } - link_flags = MCDI_EV_FIELD(*eqp, LINKCHANGE_LINK_FLAGS); + link_flags = MCDI_EV_FIELD(eqp, LINKCHANGE_LINK_FLAGS); siena_phy_decode_link_mode(enp, link_flags, speed, - MCDI_EV_FIELD(*eqp, LINKCHANGE_FCNTL), + MCDI_EV_FIELD(eqp, LINKCHANGE_FCNTL), &link_mode, &fcntl); - siena_phy_decode_cap(MCDI_EV_FIELD(*eqp, LINKCHANGE_LP_CAP), + siena_phy_decode_cap(MCDI_EV_FIELD(eqp, LINKCHANGE_LP_CAP), &lp_cap_mask); /* From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:50:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EDDCBB1; Wed, 25 Mar 2015 10:50:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 781D8AE4; Wed, 25 Mar 2015 10:50:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAoEAB095249; Wed, 25 Mar 2015 10:50:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAoDWg095247; Wed, 25 Mar 2015 10:50:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251050.t2PAoDWg095247@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:50: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: r280546 - in stable/10/contrib/ofed: libibverbs/examples/build librdmacm/examples/build X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:50:14 -0000 Author: hselasky Date: Wed Mar 25 10:50:13 2015 New Revision: 280546 URL: https://svnweb.freebsd.org/changeset/base/280546 Log: MFC r280264: Define BINDIR for some test utilities. Sponsored by: Mellanox Technologies Modified: stable/10/contrib/ofed/libibverbs/examples/build/Makefile.inc stable/10/contrib/ofed/librdmacm/examples/build/Makefile.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/libibverbs/examples/build/Makefile.inc ============================================================================== --- stable/10/contrib/ofed/libibverbs/examples/build/Makefile.inc Wed Mar 25 10:49:45 2015 (r280545) +++ stable/10/contrib/ofed/libibverbs/examples/build/Makefile.inc Wed Mar 25 10:50:13 2015 (r280546) @@ -1,3 +1,5 @@ +BINDIR?= /usr/bin + CFLAGS+= \ -I../../../../../../sys/ofed/include \ -I../../../../libibverbs/include \ Modified: stable/10/contrib/ofed/librdmacm/examples/build/Makefile.inc ============================================================================== --- stable/10/contrib/ofed/librdmacm/examples/build/Makefile.inc Wed Mar 25 10:49:45 2015 (r280545) +++ stable/10/contrib/ofed/librdmacm/examples/build/Makefile.inc Wed Mar 25 10:50:13 2015 (r280546) @@ -1,3 +1,5 @@ +BINDIR?= /usr/bin + IBDIR=../../../.. CFLAGS+= \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:51:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA640CF7; Wed, 25 Mar 2015 10:51:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A8D7BCE; Wed, 25 Mar 2015 10:51:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAp9ZI098355; Wed, 25 Mar 2015 10:51:09 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAp9DJ098353; Wed, 25 Mar 2015 10:51:09 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251051.t2PAp9DJ098353@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:51:09 +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: r280547 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:51:09 -0000 Author: arybchik Date: Wed Mar 25 10:51:08 2015 New Revision: 280547 URL: https://svnweb.freebsd.org/changeset/base/280547 Log: MFC: 279046 sfxge: handle fragmented TCP header in mbuf TCP header is fragmented in the case of VLAN tagged IPv6 traffic without HW VLAN tagging. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:50:13 2015 (r280546) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:51:08 2015 (r280547) @@ -864,6 +864,8 @@ static void tso_fini(struct sfxge_txq *t static void tso_start(struct sfxge_tso_state *tso, struct mbuf *mbuf) { struct ether_header *eh = mtod(mbuf, struct ether_header *); + const struct tcphdr *th; + struct tcphdr th_copy; tso->mbuf = mbuf; @@ -891,13 +893,24 @@ static void tso_start(struct sfxge_tso_s tso->tcph_off = tso->nh_off + sizeof(struct ip6_hdr); } - tso->header_len = tso->tcph_off + 4 * tso_tcph(tso)->th_off; + KASSERT(mbuf->m_len >= tso->tcph_off, + ("network header is fragmented in mbuf")); + /* We need TCP header including flags (window is the next) */ + if (mbuf->m_len < tso->tcph_off + offsetof(struct tcphdr, th_win)) { + m_copydata(tso->mbuf, tso->tcph_off, sizeof(th_copy), + (caddr_t)&th_copy); + th = &th_copy; + } else { + th = tso_tcph(tso); + } + + tso->header_len = tso->tcph_off + 4 * th->th_off; tso->seg_size = mbuf->m_pkthdr.tso_segsz; - tso->seqnum = ntohl(tso_tcph(tso)->th_seq); + tso->seqnum = ntohl(th->th_seq); /* These flags must not be duplicated */ - KASSERT(!(tso_tcph(tso)->th_flags & (TH_URG | TH_SYN | TH_RST)), + KASSERT(!(th->th_flags & (TH_URG | TH_SYN | TH_RST)), ("incompatible TCP flag on TSO packet")); tso->out_len = mbuf->m_pkthdr.len - tso->header_len; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:51:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AEEED28; Wed, 25 Mar 2015 10:51:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65F6DBCF; Wed, 25 Mar 2015 10:51:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PApBXm098386; Wed, 25 Mar 2015 10:51:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PApAVc098383; Wed, 25 Mar 2015 10:51:10 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251051.t2PApAVc098383@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:51:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280548 - in stable/9/contrib/ofed: libibverbs/examples/build librdmacm/examples/build X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:51:11 -0000 Author: hselasky Date: Wed Mar 25 10:51:09 2015 New Revision: 280548 URL: https://svnweb.freebsd.org/changeset/base/280548 Log: MFC r280264: Define BINDIR for some test utilities. Sponsored by: Mellanox Technologies Modified: stable/9/contrib/ofed/libibverbs/examples/build/Makefile.inc stable/9/contrib/ofed/librdmacm/examples/build/Makefile.inc Directory Properties: stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/libibverbs/examples/build/Makefile.inc ============================================================================== --- stable/9/contrib/ofed/libibverbs/examples/build/Makefile.inc Wed Mar 25 10:51:08 2015 (r280547) +++ stable/9/contrib/ofed/libibverbs/examples/build/Makefile.inc Wed Mar 25 10:51:09 2015 (r280548) @@ -1,3 +1,5 @@ +BINDIR?= /usr/bin + CFLAGS+= \ -I../../../../../../sys/ofed/include \ -I../../../../libibverbs/include \ Modified: stable/9/contrib/ofed/librdmacm/examples/build/Makefile.inc ============================================================================== --- stable/9/contrib/ofed/librdmacm/examples/build/Makefile.inc Wed Mar 25 10:51:08 2015 (r280547) +++ stable/9/contrib/ofed/librdmacm/examples/build/Makefile.inc Wed Mar 25 10:51:09 2015 (r280548) @@ -1,3 +1,5 @@ +BINDIR?= /usr/bin + IBDIR=../../../.. CFLAGS+= \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:52:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D04CF9D; Wed, 25 Mar 2015 10:52:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56A6FBFF; Wed, 25 Mar 2015 10:52:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAqalu099082; Wed, 25 Mar 2015 10:52:36 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAqaIH099081; Wed, 25 Mar 2015 10:52:36 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251052.t2PAqaIH099081@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:52: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: r280549 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:52:36 -0000 Author: arybchik Date: Wed Mar 25 10:52:35 2015 New Revision: 280549 URL: https://svnweb.freebsd.org/changeset/base/280549 Log: MFC: 279047 sfxge: regenerate MCDI protocol headers Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Wed Mar 25 10:51:09 2015 (r280548) +++ stable/10/sys/dev/sfxge/common/efx_regs_mcdi.h Wed Mar 25 10:52:35 2015 (r280549) @@ -40,6 +40,18 @@ /* The Scheduler has started. */ #define MC_FW_STATE_SCHED (8) +/* Siena MC shared memmory offsets */ +/* The 'doorbell' addresses are hard-wired to alert the MC when written */ +#define MC_SMEM_P0_DOORBELL_OFST 0x000 +#define MC_SMEM_P1_DOORBELL_OFST 0x004 +/* The rest of these are firmware-defined */ +#define MC_SMEM_P0_PDU_OFST 0x008 +#define MC_SMEM_P1_PDU_OFST 0x108 +#define MC_SMEM_PDU_LEN 0x100 +#define MC_SMEM_P0_PTP_TIME_OFST 0x7f0 +#define MC_SMEM_P0_STATUS_OFST 0x7f8 +#define MC_SMEM_P1_STATUS_OFST 0x7fc + /* Values to be written to the per-port status dword in shared * memory on reboot and assert */ #define MC_STATUS_DWORD_REBOOT (0xb007b007) @@ -58,10 +70,7 @@ /* Unused commands: 0x23, 0x27, 0x30, 0x31 */ -/* Unused commands: 0x23, 0x27, 0x30, 0x31 */ - -/** - * MCDI version 1 +/* MCDI version 1 * * Each MCDI request starts with an MCDI_HEADER, which is a 32byte * structure, filled in by the client. @@ -113,10 +122,10 @@ #define MCDI_HEADER_XFLAGS_EVREQ 0x01 /* Maximum number of payload bytes */ -#if MCDI_PCOL_VERSION == 1 -#define MCDI_CTL_SDU_LEN_MAX 0xfc -#elif MCDI_PCOL_VERSION == 2 +#ifdef WITH_MCDI_V2 #define MCDI_CTL_SDU_LEN_MAX 0x400 +#else +#define MCDI_CTL_SDU_LEN_MAX 0xfc #endif /* The MC can generate events for two reasons: @@ -133,7 +142,7 @@ * * If Code==CMDDONE, then the fields are further interpreted as: * - * - LEVEL==INFO Command succeded + * - LEVEL==INFO Command succeeded * - LEVEL==ERR Command failed * * 0 8 16 24 32 @@ -293,6 +302,27 @@ #define MCDI_EVENT_TX_ERR_INFO_WIDTH 16 #define MCDI_EVENT_TX_FLUSH_TXQ_LBN 0 #define MCDI_EVENT_TX_FLUSH_TXQ_WIDTH 12 +#define MCDI_EVENT_PTP_ERR_TYPE_LBN 0 +#define MCDI_EVENT_PTP_ERR_TYPE_WIDTH 8 +#define MCDI_EVENT_PTP_ERR_PLL_LOST 0x1 /* enum */ +#define MCDI_EVENT_PTP_ERR_FILTER 0x2 /* enum */ +#define MCDI_EVENT_PTP_ERR_FIFO 0x3 /* enum */ +#define MCDI_EVENT_PTP_ERR_QUEUE 0x4 /* enum */ +#define MCDI_EVENT_AOE_ERR_TYPE_LBN 0 +#define MCDI_EVENT_AOE_ERR_TYPE_WIDTH 8 +#define MCDI_EVENT_AOE_NO_LOAD 0x1 /* enum */ +#define MCDI_EVENT_AOE_FC_ASSERT 0x2 /* enum */ +#define MCDI_EVENT_AOE_FC_WATCHDOG 0x3 /* enum */ +#define MCDI_EVENT_AOE_FC_NO_START 0x4 /* enum */ +#define MCDI_EVENT_AOE_FAULT 0x5 /* enum */ +#define MCDI_EVENT_AOE_CPLD_REPROGRAMMED 0x6 /* enum */ +#define MCDI_EVENT_AOE_LOAD 0x7 /* enum */ +#define MCDI_EVENT_AOE_DMA 0x8 /* enum */ +#define MCDI_EVENT_AOE_BYTEBLASTER 0x9 /* enum */ +#define MCDI_EVENT_AOE_DDR_ECC_STATUS 0xa /* enum */ +#define MCDI_EVENT_AOE_PTP_STATUS 0xb /* enum */ +#define MCDI_EVENT_AOE_ERR_DATA_LBN 8 +#define MCDI_EVENT_AOE_ERR_DATA_WIDTH 8 #define MCDI_EVENT_DATA_LBN 0 #define MCDI_EVENT_DATA_WIDTH 32 #define MCDI_EVENT_SRC_LBN 36 @@ -313,6 +343,12 @@ #define MCDI_EVENT_CODE_FLR 0xa /* enum */ #define MCDI_EVENT_CODE_TX_ERR 0xb /* enum */ #define MCDI_EVENT_CODE_TX_FLUSH 0xc /* enum */ +#define MCDI_EVENT_CODE_PTP_RX 0xd /* enum */ +#define MCDI_EVENT_CODE_PTP_FAULT 0xe /* enum */ +#define MCDI_EVENT_CODE_PTP_PPS 0xf /* enum */ +#define MCDI_EVENT_CODE_AOE 0x12 /* enum */ +#define MCDI_EVENT_CODE_VCAL_FAIL 0x13 /* enum */ +#define MCDI_EVENT_CODE_HW_PPS 0x14 /* enum */ #define MCDI_EVENT_CMDDONE_DATA_OFST 0 #define MCDI_EVENT_CMDDONE_DATA_LBN 0 #define MCDI_EVENT_CMDDONE_DATA_WIDTH 32 @@ -328,6 +364,94 @@ #define MCDI_EVENT_TX_ERR_DATA_OFST 0 #define MCDI_EVENT_TX_ERR_DATA_LBN 0 #define MCDI_EVENT_TX_ERR_DATA_WIDTH 32 +#define MCDI_EVENT_PTP_SECONDS_OFST 0 +#define MCDI_EVENT_PTP_SECONDS_LBN 0 +#define MCDI_EVENT_PTP_SECONDS_WIDTH 32 +#define MCDI_EVENT_PTP_NANOSECONDS_OFST 0 +#define MCDI_EVENT_PTP_NANOSECONDS_LBN 0 +#define MCDI_EVENT_PTP_NANOSECONDS_WIDTH 32 +#define MCDI_EVENT_PTP_UUID_OFST 0 +#define MCDI_EVENT_PTP_UUID_LBN 0 +#define MCDI_EVENT_PTP_UUID_WIDTH 32 + +/* FCDI_EVENT structuredef */ +#define FCDI_EVENT_LEN 8 +#define FCDI_EVENT_CONT_LBN 32 +#define FCDI_EVENT_CONT_WIDTH 1 +#define FCDI_EVENT_LEVEL_LBN 33 +#define FCDI_EVENT_LEVEL_WIDTH 3 +#define FCDI_EVENT_LEVEL_INFO 0x0 /* enum */ +#define FCDI_EVENT_LEVEL_WARN 0x1 /* enum */ +#define FCDI_EVENT_LEVEL_ERR 0x2 /* enum */ +#define FCDI_EVENT_LEVEL_FATAL 0x3 /* enum */ +#define FCDI_EVENT_DATA_OFST 0 +#define FCDI_EVENT_LINK_STATE_STATUS_LBN 0 +#define FCDI_EVENT_LINK_STATE_STATUS_WIDTH 1 +#define FCDI_EVENT_LINK_DOWN 0x0 /* enum */ +#define FCDI_EVENT_LINK_UP 0x1 /* enum */ +#define FCDI_EVENT_DATA_LBN 0 +#define FCDI_EVENT_DATA_WIDTH 32 +#define FCDI_EVENT_SRC_LBN 36 +#define FCDI_EVENT_SRC_WIDTH 8 +#define FCDI_EVENT_EV_CODE_LBN 60 +#define FCDI_EVENT_EV_CODE_WIDTH 4 +#define FCDI_EVENT_CODE_LBN 44 +#define FCDI_EVENT_CODE_WIDTH 8 +#define FCDI_EVENT_CODE_REBOOT 0x1 /* enum */ +#define FCDI_EVENT_CODE_ASSERT 0x2 /* enum */ +#define FCDI_EVENT_CODE_DDR_TEST_RESULT 0x3 /* enum */ +#define FCDI_EVENT_CODE_LINK_STATE 0x4 /* enum */ +#define FCDI_EVENT_CODE_TIMED_READ 0x5 /* enum */ +#define FCDI_EVENT_CODE_PPS_IN 0x6 /* enum */ +#define FCDI_EVENT_CODE_PTP_TICK 0x7 /* enum */ +#define FCDI_EVENT_CODE_DDR_ECC_STATUS 0x8 /* enum */ +#define FCDI_EVENT_CODE_PTP_STATUS 0x9 /* enum */ +#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_OFST 0 +#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_LBN 0 +#define FCDI_EVENT_ASSERT_INSTR_ADDRESS_WIDTH 32 +#define FCDI_EVENT_ASSERT_TYPE_LBN 36 +#define FCDI_EVENT_ASSERT_TYPE_WIDTH 8 +#define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_LBN 36 +#define FCDI_EVENT_DDR_TEST_RESULT_STATUS_CODE_WIDTH 8 +#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_OFST 0 +#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_LBN 0 +#define FCDI_EVENT_DDR_TEST_RESULT_RESULT_WIDTH 32 +#define FCDI_EVENT_LINK_STATE_DATA_OFST 0 +#define FCDI_EVENT_LINK_STATE_DATA_LBN 0 +#define FCDI_EVENT_LINK_STATE_DATA_WIDTH 32 +#define FCDI_EVENT_PTP_STATE_OFST 0 +#define FCDI_EVENT_PTP_UNDEFINED 0x0 /* enum */ +#define FCDI_EVENT_PTP_SETUP_FAILED 0x1 /* enum */ +#define FCDI_EVENT_PTP_OPERATIONAL 0x2 /* enum */ +#define FCDI_EVENT_PTP_STATE_LBN 0 +#define FCDI_EVENT_PTP_STATE_WIDTH 32 +#define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_LBN 36 +#define FCDI_EVENT_DDR_ECC_STATUS_BANK_ID_WIDTH 8 +#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_OFST 0 +#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_LBN 0 +#define FCDI_EVENT_DDR_ECC_STATUS_STATUS_WIDTH 32 + +/* FCDI_EXTENDED_EVENT_PPS structuredef */ +#define FCDI_EXTENDED_EVENT_PPS_LENMIN 16 +#define FCDI_EXTENDED_EVENT_PPS_LENMAX 248 +#define FCDI_EXTENDED_EVENT_PPS_LEN(num) (8+8*(num)) +#define FCDI_EXTENDED_EVENT_PPS_COUNT_OFST 0 +#define FCDI_EXTENDED_EVENT_PPS_COUNT_LBN 0 +#define FCDI_EXTENDED_EVENT_PPS_COUNT_WIDTH 32 +#define FCDI_EXTENDED_EVENT_PPS_SECONDS_OFST 8 +#define FCDI_EXTENDED_EVENT_PPS_SECONDS_LBN 64 +#define FCDI_EXTENDED_EVENT_PPS_SECONDS_WIDTH 32 +#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_OFST 12 +#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_LBN 96 +#define FCDI_EXTENDED_EVENT_PPS_NANOSECONDS_WIDTH 32 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_OFST 8 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LEN 8 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LO_OFST 8 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_HI_OFST 12 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MINNUM 1 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_MAXNUM 30 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_LBN 64 +#define FCDI_EXTENDED_EVENT_PPS_TIMESTAMPS_WIDTH 64 /***********************************/ @@ -478,6 +602,8 @@ #define MC_CMD_GET_VERSION_OUT_FIRMWARE_OFST 0 #define MC_CMD_GET_VERSION_OUT_FIRMWARE_ANY 0xffffffff /* enum */ #define MC_CMD_GET_VERSION_OUT_FIRMWARE_BOOTROM 0xb0070000 /* enum */ +#define MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM 0xb0070000 /* enum */ +#define MC_CMD_GET_VERSION_OUT_FIRMWARE_HUNT_BOOTROM 0xb0070001 /* enum */ /* MC_CMD_GET_VERSION_OUT msgresponse */ #define MC_CMD_GET_VERSION_OUT_LEN 32 @@ -494,6 +620,2059 @@ /***********************************/ +/* MC_CMD_FC + * Perform an FC operation + */ +#define MC_CMD_FC 0x9 + +/* MC_CMD_FC_IN msgrequest */ +#define MC_CMD_FC_IN_LEN 4 +#define MC_CMD_FC_IN_OP_HDR_OFST 0 +#define MC_CMD_FC_IN_OP_LBN 0 +#define MC_CMD_FC_IN_OP_WIDTH 8 +#define MC_CMD_FC_OP_NULL 0x1 /* enum */ +#define MC_CMD_FC_OP_UNUSED 0x2 /* enum */ +#define MC_CMD_FC_OP_MAC 0x3 /* enum */ +#define MC_CMD_FC_OP_READ32 0x4 /* enum */ +#define MC_CMD_FC_OP_WRITE32 0x5 /* enum */ +#define MC_CMD_FC_OP_TRC_READ 0x6 /* enum */ +#define MC_CMD_FC_OP_TRC_WRITE 0x7 /* enum */ +#define MC_CMD_FC_OP_GET_VERSION 0x8 /* enum */ +#define MC_CMD_FC_OP_TRC_RX_READ 0x9 /* enum */ +#define MC_CMD_FC_OP_TRC_RX_WRITE 0xa /* enum */ +#define MC_CMD_FC_OP_SFP 0xb /* enum */ +#define MC_CMD_FC_OP_DDR_TEST 0xc /* enum */ +#define MC_CMD_FC_OP_GET_ASSERT 0xd /* enum */ +#define MC_CMD_FC_OP_FPGA_BUILD 0xe /* enum */ +#define MC_CMD_FC_OP_READ_MAP 0xf /* enum */ +#define MC_CMD_FC_OP_CAPABILITIES 0x10 /* enum */ +#define MC_CMD_FC_OP_GLOBAL_FLAGS 0x11 /* enum */ +#define MC_CMD_FC_OP_IO_REL 0x12 /* enum */ +#define MC_CMD_FC_OP_UHLINK 0x13 /* enum */ +#define MC_CMD_FC_OP_SET_LINK 0x14 /* enum */ +#define MC_CMD_FC_OP_LICENSE 0x15 /* enum */ +#define MC_CMD_FC_OP_STARTUP 0x16 /* enum */ +#define MC_CMD_FC_OP_DMA 0x17 /* enum */ +#define MC_CMD_FC_OP_TIMED_READ 0x18 /* enum */ +#define MC_CMD_FC_OP_LOG 0x19 /* enum */ +#define MC_CMD_FC_OP_CLOCK 0x1a /* enum */ +#define MC_CMD_FC_OP_DDR 0x1b /* enum */ +#define MC_CMD_FC_OP_TIMESTAMP 0x1c /* enum */ +#define MC_CMD_FC_OP_SPI 0x1d /* enum */ +#define MC_CMD_FC_OP_DIAG 0x1e /* enum */ +#define MC_CMD_FC_IN_PORT_EXT_OFST 0x0 /* enum */ +#define MC_CMD_FC_IN_PORT_INT_OFST 0x40 /* enum */ + +/* MC_CMD_FC_IN_NULL msgrequest */ +#define MC_CMD_FC_IN_NULL_LEN 4 +#define MC_CMD_FC_IN_CMD_OFST 0 + +/* MC_CMD_FC_IN_MAC msgrequest */ +#define MC_CMD_FC_IN_MAC_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_MAC_HEADER_OFST 4 +#define MC_CMD_FC_IN_MAC_OP_LBN 0 +#define MC_CMD_FC_IN_MAC_OP_WIDTH 8 +#define MC_CMD_FC_OP_MAC_OP_RECONFIGURE 0x1 /* enum */ +#define MC_CMD_FC_OP_MAC_OP_SET_LINK 0x2 /* enum */ +#define MC_CMD_FC_OP_MAC_OP_GET_STATS 0x3 /* enum */ +#define MC_CMD_FC_OP_MAC_OP_GET_RX_STATS 0x6 /* enum */ +#define MC_CMD_FC_OP_MAC_OP_GET_TX_STATS 0x7 /* enum */ +#define MC_CMD_FC_OP_MAC_OP_READ_STATUS 0x8 /* enum */ +#define MC_CMD_FC_IN_MAC_PORT_TYPE_LBN 8 +#define MC_CMD_FC_IN_MAC_PORT_TYPE_WIDTH 8 +#define MC_CMD_FC_PORT_EXT 0x0 /* enum */ +#define MC_CMD_FC_PORT_INT 0x1 /* enum */ +#define MC_CMD_FC_IN_MAC_PORT_IDX_LBN 16 +#define MC_CMD_FC_IN_MAC_PORT_IDX_WIDTH 8 +#define MC_CMD_FC_IN_MAC_CMD_FORMAT_LBN 24 +#define MC_CMD_FC_IN_MAC_CMD_FORMAT_WIDTH 8 +#define MC_CMD_FC_OP_MAC_CMD_FORMAT_DEFAULT 0x0 /* enum */ +#define MC_CMD_FC_OP_MAC_CMD_FORMAT_PORT_OVERRIDE 0x1 /* enum */ + +/* MC_CMD_FC_IN_MAC_RECONFIGURE msgrequest */ +#define MC_CMD_FC_IN_MAC_RECONFIGURE_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ + +/* MC_CMD_FC_IN_MAC_SET_LINK msgrequest */ +#define MC_CMD_FC_IN_MAC_SET_LINK_LEN 32 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ +#define MC_CMD_FC_IN_MAC_SET_LINK_MTU_OFST 8 +#define MC_CMD_FC_IN_MAC_SET_LINK_DRAIN_OFST 12 +#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_OFST 16 +#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_LEN 8 +#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_LO_OFST 16 +#define MC_CMD_FC_IN_MAC_SET_LINK_ADDR_HI_OFST 20 +#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_OFST 24 +#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_UNICAST_LBN 0 +#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_UNICAST_WIDTH 1 +#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_BRDCAST_LBN 1 +#define MC_CMD_FC_IN_MAC_SET_LINK_REJECT_BRDCAST_WIDTH 1 +#define MC_CMD_FC_IN_MAC_SET_LINK_FCNTL_OFST 28 + +/* MC_CMD_FC_IN_MAC_READ_STATUS msgrequest */ +#define MC_CMD_FC_IN_MAC_READ_STATUS_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ + +/* MC_CMD_FC_IN_MAC_GET_RX_STATS msgrequest */ +#define MC_CMD_FC_IN_MAC_GET_RX_STATS_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ + +/* MC_CMD_FC_IN_MAC_GET_TX_STATS msgrequest */ +#define MC_CMD_FC_IN_MAC_GET_TX_STATS_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ + +/* MC_CMD_FC_IN_MAC_GET_STATS msgrequest */ +#define MC_CMD_FC_IN_MAC_GET_STATS_LEN 20 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_MAC_HEADER_OFST 4 */ +#define MC_CMD_FC_IN_MAC_GET_STATS_STATS_INDEX_OFST 8 +#define MC_CMD_FC_IN_MAC_GET_STATS_FLAGS_OFST 12 +#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_ALL_LBN 0 +#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_ALL_WIDTH 1 +#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_LBN 1 +#define MC_CMD_FC_IN_MAC_GET_STATS_CLEAR_WIDTH 1 +#define MC_CMD_FC_IN_MAC_GET_STATS_UPDATE_LBN 2 +#define MC_CMD_FC_IN_MAC_GET_STATS_UPDATE_WIDTH 1 +#define MC_CMD_FC_IN_MAC_GET_STATS_NUM_OFST 16 +#define MC_CMD_FC_MAC_NSTATS_PER_BLOCK 0x1e /* enum */ +#define MC_CMD_FC_MAC_NBYTES_PER_STAT 0x8 /* enum */ + +/* MC_CMD_FC_IN_READ32 msgrequest */ +#define MC_CMD_FC_IN_READ32_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_READ32_ADDR_HI_OFST 4 +#define MC_CMD_FC_IN_READ32_ADDR_LO_OFST 8 +#define MC_CMD_FC_IN_READ32_NUMWORDS_OFST 12 + +/* MC_CMD_FC_IN_WRITE32 msgrequest */ +#define MC_CMD_FC_IN_WRITE32_LENMIN 16 +#define MC_CMD_FC_IN_WRITE32_LENMAX 252 +#define MC_CMD_FC_IN_WRITE32_LEN(num) (12+4*(num)) +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_WRITE32_ADDR_HI_OFST 4 +#define MC_CMD_FC_IN_WRITE32_ADDR_LO_OFST 8 +#define MC_CMD_FC_IN_WRITE32_BUFFER_OFST 12 +#define MC_CMD_FC_IN_WRITE32_BUFFER_LEN 4 +#define MC_CMD_FC_IN_WRITE32_BUFFER_MINNUM 1 +#define MC_CMD_FC_IN_WRITE32_BUFFER_MAXNUM 60 + +/* MC_CMD_FC_IN_TRC_READ msgrequest */ +#define MC_CMD_FC_IN_TRC_READ_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TRC_READ_TRC_OFST 4 +#define MC_CMD_FC_IN_TRC_READ_CHANNEL_OFST 8 + +/* MC_CMD_FC_IN_TRC_WRITE msgrequest */ +#define MC_CMD_FC_IN_TRC_WRITE_LEN 28 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TRC_WRITE_TRC_OFST 4 +#define MC_CMD_FC_IN_TRC_WRITE_CHANNEL_OFST 8 +#define MC_CMD_FC_IN_TRC_WRITE_DATA_OFST 12 +#define MC_CMD_FC_IN_TRC_WRITE_DATA_LEN 4 +#define MC_CMD_FC_IN_TRC_WRITE_DATA_NUM 4 + +/* MC_CMD_FC_IN_GET_VERSION msgrequest */ +#define MC_CMD_FC_IN_GET_VERSION_LEN 4 +/* MC_CMD_FC_IN_CMD_OFST 0 */ + +/* MC_CMD_FC_IN_TRC_RX_READ msgrequest */ +#define MC_CMD_FC_IN_TRC_RX_READ_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TRC_RX_READ_TRC_OFST 4 +#define MC_CMD_FC_IN_TRC_RX_READ_CHANNEL_OFST 8 + +/* MC_CMD_FC_IN_TRC_RX_WRITE msgrequest */ +#define MC_CMD_FC_IN_TRC_RX_WRITE_LEN 20 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TRC_RX_WRITE_TRC_OFST 4 +#define MC_CMD_FC_IN_TRC_RX_WRITE_CHANNEL_OFST 8 +#define MC_CMD_FC_IN_TRC_RX_WRITE_DATA_OFST 12 +#define MC_CMD_FC_IN_TRC_RX_WRITE_DATA_LEN 4 +#define MC_CMD_FC_IN_TRC_RX_WRITE_DATA_NUM 2 + +/* MC_CMD_FC_IN_SFP msgrequest */ +#define MC_CMD_FC_IN_SFP_LEN 24 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_SFP_SPEED_OFST 4 +#define MC_CMD_FC_IN_SFP_COPPER_LEN_OFST 8 +#define MC_CMD_FC_IN_SFP_DUAL_SPEED_OFST 12 +#define MC_CMD_FC_IN_SFP_PRESENT_OFST 16 +#define MC_CMD_FC_IN_SFP_TYPE_OFST 20 + +/* MC_CMD_FC_IN_DDR_TEST msgrequest */ +#define MC_CMD_FC_IN_DDR_TEST_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DDR_TEST_HEADER_OFST 4 +#define MC_CMD_FC_IN_DDR_TEST_OP_LBN 0 +#define MC_CMD_FC_IN_DDR_TEST_OP_WIDTH 8 +#define MC_CMD_FC_OP_DDR_TEST_START 0x1 /* enum */ +#define MC_CMD_FC_OP_DDR_TEST_POLL 0x2 /* enum */ + +/* MC_CMD_FC_IN_DDR_TEST_START msgrequest */ +#define MC_CMD_FC_IN_DDR_TEST_START_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_DDR_TEST_HEADER_OFST 4 */ +#define MC_CMD_FC_IN_DDR_TEST_START_MASK_OFST 8 +#define MC_CMD_FC_IN_DDR_TEST_START_T0_LBN 0 +#define MC_CMD_FC_IN_DDR_TEST_START_T0_WIDTH 1 +#define MC_CMD_FC_IN_DDR_TEST_START_T1_LBN 1 +#define MC_CMD_FC_IN_DDR_TEST_START_T1_WIDTH 1 +#define MC_CMD_FC_IN_DDR_TEST_START_B0_LBN 2 +#define MC_CMD_FC_IN_DDR_TEST_START_B0_WIDTH 1 +#define MC_CMD_FC_IN_DDR_TEST_START_B1_LBN 3 +#define MC_CMD_FC_IN_DDR_TEST_START_B1_WIDTH 1 + +/* MC_CMD_FC_IN_DDR_TEST_POLL msgrequest */ +#define MC_CMD_FC_IN_DDR_TEST_POLL_LEN 8 +#define MC_CMD_FC_IN_DDR_TEST_CMD_OFST 0 +/* MC_CMD_FC_IN_DDR_TEST_HEADER_OFST 4 */ + +/* MC_CMD_FC_IN_GET_ASSERT msgrequest */ +#define MC_CMD_FC_IN_GET_ASSERT_LEN 4 +/* MC_CMD_FC_IN_CMD_OFST 0 */ + +/* MC_CMD_FC_IN_FPGA_BUILD msgrequest */ +#define MC_CMD_FC_IN_FPGA_BUILD_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_FPGA_BUILD_OP_OFST 4 +#define MC_CMD_FC_IN_FPGA_BUILD_BUILD 0x1 /* enum */ +#define MC_CMD_FC_IN_FPGA_BUILD_SERVICES 0x2 /* enum */ +#define MC_CMD_FC_IN_FPGA_BUILD_BSP_VERSION 0x3 /* enum */ + +/* MC_CMD_FC_IN_READ_MAP msgrequest */ +#define MC_CMD_FC_IN_READ_MAP_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_READ_MAP_HEADER_OFST 4 +#define MC_CMD_FC_IN_READ_MAP_OP_LBN 0 +#define MC_CMD_FC_IN_READ_MAP_OP_WIDTH 8 +#define MC_CMD_FC_OP_READ_MAP_COUNT 0x1 /* enum */ +#define MC_CMD_FC_OP_READ_MAP_INDEX 0x2 /* enum */ + +/* MC_CMD_FC_IN_READ_MAP_COUNT msgrequest */ +#define MC_CMD_FC_IN_READ_MAP_COUNT_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_READ_MAP_HEADER_OFST 4 */ + +/* MC_CMD_FC_IN_READ_MAP_INDEX msgrequest */ +#define MC_CMD_FC_IN_READ_MAP_INDEX_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_READ_MAP_HEADER_OFST 4 */ +#define MC_CMD_FC_IN_MAP_INDEX_OFST 8 + +/* MC_CMD_FC_IN_CAPABILITIES msgrequest */ +#define MC_CMD_FC_IN_CAPABILITIES_LEN 4 +/* MC_CMD_FC_IN_CMD_OFST 0 */ + +/* MC_CMD_FC_IN_GLOBAL_FLAGS msgrequest */ +#define MC_CMD_FC_IN_GLOBAL_FLAGS_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_GLOBAL_FLAGS_FLAGS_OFST 4 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_RX_TUNING_CABLE_PLUGGED_IN_LBN 0 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_RX_TUNING_CABLE_PLUGGED_IN_WIDTH 1 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_RX_TUNING_LINK_MONITORING_LBN 1 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_RX_TUNING_LINK_MONITORING_WIDTH 1 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_DFE_ENABLE_LBN 2 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_DFE_ENABLE_WIDTH 1 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_1D_EYE_ENABLE_LBN 3 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_1D_EYE_ENABLE_WIDTH 1 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_1D_TUNING_ENABLE_LBN 4 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_1D_TUNING_ENABLE_WIDTH 1 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_OFFCAL_ENABLE_LBN 5 +#define MC_CMD_FC_IN_GLOBAL_FLAGS_OFFCAL_ENABLE_WIDTH 1 + +/* MC_CMD_FC_IN_IO_REL msgrequest */ +#define MC_CMD_FC_IN_IO_REL_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_IO_REL_HEADER_OFST 4 +#define MC_CMD_FC_IN_IO_REL_OP_LBN 0 +#define MC_CMD_FC_IN_IO_REL_OP_WIDTH 8 +#define MC_CMD_FC_IN_IO_REL_GET_ADDR 0x1 /* enum */ +#define MC_CMD_FC_IN_IO_REL_READ32 0x2 /* enum */ +#define MC_CMD_FC_IN_IO_REL_WRITE32 0x3 /* enum */ +#define MC_CMD_FC_IN_IO_REL_COMP_TYPE_LBN 8 +#define MC_CMD_FC_IN_IO_REL_COMP_TYPE_WIDTH 8 +#define MC_CMD_FC_COMP_TYPE_APP_ADDR_SPACE 0x1 /* enum */ +#define MC_CMD_FC_COMP_TYPE_FLASH 0x2 /* enum */ + +/* MC_CMD_FC_IN_IO_REL_GET_ADDR msgrequest */ +#define MC_CMD_FC_IN_IO_REL_GET_ADDR_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_IO_REL_HEADER_OFST 4 */ + +/* MC_CMD_FC_IN_IO_REL_READ32 msgrequest */ +#define MC_CMD_FC_IN_IO_REL_READ32_LEN 20 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_IO_REL_HEADER_OFST 4 */ +#define MC_CMD_FC_IN_IO_REL_READ32_ADDR_HI_OFST 8 +#define MC_CMD_FC_IN_IO_REL_READ32_ADDR_LO_OFST 12 +#define MC_CMD_FC_IN_IO_REL_READ32_NUMWORDS_OFST 16 + +/* MC_CMD_FC_IN_IO_REL_WRITE32 msgrequest */ +#define MC_CMD_FC_IN_IO_REL_WRITE32_LENMIN 20 +#define MC_CMD_FC_IN_IO_REL_WRITE32_LENMAX 252 +#define MC_CMD_FC_IN_IO_REL_WRITE32_LEN(num) (16+4*(num)) +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_IO_REL_HEADER_OFST 4 */ +#define MC_CMD_FC_IN_IO_REL_WRITE32_ADDR_HI_OFST 8 +#define MC_CMD_FC_IN_IO_REL_WRITE32_ADDR_LO_OFST 12 +#define MC_CMD_FC_IN_IO_REL_WRITE32_BUFFER_OFST 16 +#define MC_CMD_FC_IN_IO_REL_WRITE32_BUFFER_LEN 4 +#define MC_CMD_FC_IN_IO_REL_WRITE32_BUFFER_MINNUM 1 +#define MC_CMD_FC_IN_IO_REL_WRITE32_BUFFER_MAXNUM 59 + +/* MC_CMD_FC_IN_UHLINK msgrequest */ +#define MC_CMD_FC_IN_UHLINK_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 +#define MC_CMD_FC_IN_UHLINK_OP_LBN 0 +#define MC_CMD_FC_IN_UHLINK_OP_WIDTH 8 +#define MC_CMD_FC_OP_UHLINK_PHY 0x1 /* enum */ +#define MC_CMD_FC_OP_UHLINK_MAC 0x2 /* enum */ +#define MC_CMD_FC_OP_UHLINK_RX_EYE 0x3 /* enum */ +#define MC_CMD_FC_OP_UHLINK_DUMP_RX_EYE_PLOT 0x4 /* enum */ +#define MC_CMD_FC_OP_UHLINK_READ_RX_EYE_PLOT 0x5 /* enum */ +#define MC_CMD_FC_OP_UHLINK_RX_TUNE 0x6 /* enum */ +#define MC_CMD_FC_OP_UHLINK_LOOPBACK_SET 0x7 /* enum */ +#define MC_CMD_FC_OP_UHLINK_LOOPBACK_GET 0x8 /* enum */ +#define MC_CMD_FC_IN_UHLINK_PORT_TYPE_LBN 8 +#define MC_CMD_FC_IN_UHLINK_PORT_TYPE_WIDTH 8 +#define MC_CMD_FC_IN_UHLINK_PORT_IDX_LBN 16 +#define MC_CMD_FC_IN_UHLINK_PORT_IDX_WIDTH 8 +#define MC_CMD_FC_IN_UHLINK_CMD_FORMAT_LBN 24 +#define MC_CMD_FC_IN_UHLINK_CMD_FORMAT_WIDTH 8 +#define MC_CMD_FC_OP_UHLINK_CMD_FORMAT_DEFAULT 0x0 /* enum */ +#define MC_CMD_FC_OP_UHLINK_CMD_FORMAT_PORT_OVERRIDE 0x1 /* enum */ + +/* MC_CMD_FC_OP_UHLINK_PHY msgrequest */ +#define MC_CMD_FC_OP_UHLINK_PHY_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ + +/* MC_CMD_FC_OP_UHLINK_MAC msgrequest */ +#define MC_CMD_FC_OP_UHLINK_MAC_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ + +/* MC_CMD_FC_OP_UHLINK_RX_EYE msgrequest */ +#define MC_CMD_FC_OP_UHLINK_RX_EYE_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ +#define MC_CMD_FC_OP_UHLINK_RX_EYE_INDEX_OFST 8 +#define MC_CMD_FC_UHLINK_RX_EYE_PER_BLOCK 0x30 /* enum */ + +/* MC_CMD_FC_OP_UHLINK_DUMP_RX_EYE_PLOT msgrequest */ +#define MC_CMD_FC_OP_UHLINK_DUMP_RX_EYE_PLOT_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ + +/* MC_CMD_FC_OP_UHLINK_READ_RX_EYE_PLOT msgrequest */ +#define MC_CMD_FC_OP_UHLINK_READ_RX_EYE_PLOT_LEN 20 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ +#define MC_CMD_FC_OP_UHLINK_READ_RX_EYE_PLOT_DC_GAIN_OFST 8 +#define MC_CMD_FC_OP_UHLINK_READ_RX_EYE_PLOT_EQ_CONTROL_OFST 12 +#define MC_CMD_FC_OP_UHLINK_READ_RX_EYE_PLOT_INDEX_OFST 16 +#define MC_CMD_FC_UHLINK_RX_EYE_PLOT_ROWS_PER_BLOCK 0x1e /* enum */ + +/* MC_CMD_FC_OP_UHLINK_RX_TUNE msgrequest */ +#define MC_CMD_FC_OP_UHLINK_RX_TUNE_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ + +/* MC_CMD_FC_OP_UHLINK_LOOPBACK_SET msgrequest */ +#define MC_CMD_FC_OP_UHLINK_LOOPBACK_SET_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ +#define MC_CMD_FC_OP_UHLINK_LOOPBACK_SET_TYPE_OFST 8 +#define MC_CMD_FC_UHLINK_LOOPBACK_TYPE_PCS_SERIAL 0x0 /* enum */ +#define MC_CMD_FC_UHLINK_LOOPBACK_TYPE_PMA_PRE_CDR 0x1 /* enum */ +#define MC_CMD_FC_UHLINK_LOOPBACK_TYPE_PMA_POST_CDR 0x2 /* enum */ +#define MC_CMD_FC_OP_UHLINK_LOOPBACK_SET_STATE_OFST 12 +#define MC_CMD_FC_UHLINK_LOOPBACK_STATE_OFF 0x0 /* enum */ +#define MC_CMD_FC_UHLINK_LOOPBACK_STATE_ON 0x1 /* enum */ + +/* MC_CMD_FC_OP_UHLINK_LOOPBACK_GET msgrequest */ +#define MC_CMD_FC_OP_UHLINK_LOOPBACK_GET_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_UHLINK_HEADER_OFST 4 */ +#define MC_CMD_FC_OP_UHLINK_LOOPBACK_GET_TYPE_OFST 8 + +/* MC_CMD_FC_IN_SET_LINK msgrequest */ +#define MC_CMD_FC_IN_SET_LINK_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_SET_LINK_MODE_OFST 4 +#define MC_CMD_FC_IN_SET_LINK_SPEED_OFST 8 +#define MC_CMD_FC_IN_SET_LINK_FLAGS_OFST 12 +#define MC_CMD_FC_IN_SET_LINK_LOWPOWER_LBN 0 +#define MC_CMD_FC_IN_SET_LINK_LOWPOWER_WIDTH 1 +#define MC_CMD_FC_IN_SET_LINK_POWEROFF_LBN 1 +#define MC_CMD_FC_IN_SET_LINK_POWEROFF_WIDTH 1 +#define MC_CMD_FC_IN_SET_LINK_TXDIS_LBN 2 +#define MC_CMD_FC_IN_SET_LINK_TXDIS_WIDTH 1 + +/* MC_CMD_FC_IN_LICENSE msgrequest */ +#define MC_CMD_FC_IN_LICENSE_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_LICENSE_OP_OFST 4 +#define MC_CMD_FC_IN_LICENSE_UPDATE_LICENSE 0x0 /* enum */ +#define MC_CMD_FC_IN_LICENSE_GET_KEY_STATS 0x1 /* enum */ + +/* MC_CMD_FC_IN_STARTUP msgrequest */ +#define MC_CMD_FC_IN_STARTUP_LEN 40 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_STARTUP_BASE_OFST 4 +#define MC_CMD_FC_IN_STARTUP_LENGTH_OFST 8 +#define MC_CMD_FC_IN_STARTUP_IDLENGTH_OFST 12 +#define MC_CMD_FC_IN_STARTUP_ID_OFST 16 +#define MC_CMD_FC_IN_STARTUP_ID_LEN 1 +#define MC_CMD_FC_IN_STARTUP_ID_NUM 24 + +/* MC_CMD_FC_IN_DMA msgrequest */ +#define MC_CMD_FC_IN_DMA_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DMA_OP_OFST 4 +#define MC_CMD_FC_IN_DMA_STOP 0x0 /* enum */ +#define MC_CMD_FC_IN_DMA_READ 0x1 /* enum */ + +/* MC_CMD_FC_IN_DMA_STOP msgrequest */ +#define MC_CMD_FC_IN_DMA_STOP_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_DMA_OP_OFST 4 */ +#define MC_CMD_FC_IN_DMA_STOP_FC_HANDLE_OFST 8 + +/* MC_CMD_FC_IN_DMA_READ msgrequest */ +#define MC_CMD_FC_IN_DMA_READ_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_DMA_OP_OFST 4 */ +#define MC_CMD_FC_IN_DMA_READ_OFFSET_OFST 8 +#define MC_CMD_FC_IN_DMA_READ_LENGTH_OFST 12 + +/* MC_CMD_FC_IN_TIMED_READ msgrequest */ +#define MC_CMD_FC_IN_TIMED_READ_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TIMED_READ_OP_OFST 4 +#define MC_CMD_FC_IN_TIMED_READ_SET 0x0 /* enum */ +#define MC_CMD_FC_IN_TIMED_READ_GET 0x1 /* enum */ +#define MC_CMD_FC_IN_TIMED_READ_CLEAR 0x2 /* enum */ + +/* MC_CMD_FC_IN_TIMED_READ_SET msgrequest */ +#define MC_CMD_FC_IN_TIMED_READ_SET_LEN 52 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_TIMED_READ_OP_OFST 4 */ +#define MC_CMD_FC_IN_TIMED_READ_SET_HOST_HANDLE_OFST 8 +#define MC_CMD_FC_IN_TIMED_READ_SET_HOST_DMA_ADDRESS_OFST 12 +#define MC_CMD_FC_IN_TIMED_READ_SET_HOST_DMA_ADDRESS_LEN 8 +#define MC_CMD_FC_IN_TIMED_READ_SET_HOST_DMA_ADDRESS_LO_OFST 12 +#define MC_CMD_FC_IN_TIMED_READ_SET_HOST_DMA_ADDRESS_HI_OFST 16 +#define MC_CMD_FC_IN_TIMED_READ_SET_AOE_ADDRESS_OFST 20 +#define MC_CMD_FC_IN_TIMED_READ_SET_AOE_ADDRESS_LEN 8 +#define MC_CMD_FC_IN_TIMED_READ_SET_AOE_ADDRESS_LO_OFST 20 +#define MC_CMD_FC_IN_TIMED_READ_SET_AOE_ADDRESS_HI_OFST 24 +#define MC_CMD_FC_IN_TIMED_READ_SET_AOE_LENGTH_OFST 28 +#define MC_CMD_FC_IN_TIMED_READ_SET_HOST_LENGTH_OFST 32 +#define MC_CMD_FC_IN_TIMED_READ_SET_OFFSET_OFST 36 +#define MC_CMD_FC_IN_TIMED_READ_SET_DATA_OFST 40 +#define MC_CMD_FC_IN_TIMED_READ_SET_FLAGS_OFST 44 +#define MC_CMD_FC_IN_TIMED_READ_SET_INDIRECT_LBN 0 +#define MC_CMD_FC_IN_TIMED_READ_SET_INDIRECT_WIDTH 1 +#define MC_CMD_FC_IN_TIMED_READ_SET_DOUBLE_LBN 1 +#define MC_CMD_FC_IN_TIMED_READ_SET_DOUBLE_WIDTH 1 +#define MC_CMD_FC_IN_TIMED_READ_SET_EVENT_LBN 2 +#define MC_CMD_FC_IN_TIMED_READ_SET_EVENT_WIDTH 1 +#define MC_CMD_FC_IN_TIMED_READ_SET_PREREAD_LBN 3 +#define MC_CMD_FC_IN_TIMED_READ_SET_PREREAD_WIDTH 2 +#define MC_CMD_FC_IN_TIMED_READ_SET_NONE 0x0 /* enum */ +#define MC_CMD_FC_IN_TIMED_READ_SET_READ 0x1 /* enum */ +#define MC_CMD_FC_IN_TIMED_READ_SET_WRITE 0x2 /* enum */ +#define MC_CMD_FC_IN_TIMED_READ_SET_READWRITE 0x3 /* enum */ +#define MC_CMD_FC_IN_TIMED_READ_SET_PERIOD_OFST 48 + +/* MC_CMD_FC_IN_TIMED_READ_GET msgrequest */ +#define MC_CMD_FC_IN_TIMED_READ_GET_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_TIMED_READ_OP_OFST 4 */ +#define MC_CMD_FC_IN_TIMED_READ_GET_FC_HANDLE_OFST 8 + +/* MC_CMD_FC_IN_TIMED_READ_CLEAR msgrequest */ +#define MC_CMD_FC_IN_TIMED_READ_CLEAR_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_TIMED_READ_OP_OFST 4 */ +#define MC_CMD_FC_IN_TIMED_READ_CLEAR_FC_HANDLE_OFST 8 + +/* MC_CMD_FC_IN_LOG msgrequest */ +#define MC_CMD_FC_IN_LOG_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_LOG_OP_OFST 4 +#define MC_CMD_FC_IN_LOG_ADDR_RANGE 0x0 /* enum */ +#define MC_CMD_FC_IN_LOG_JTAG_UART 0x1 /* enum */ + +/* MC_CMD_FC_IN_LOG_ADDR_RANGE msgrequest */ +#define MC_CMD_FC_IN_LOG_ADDR_RANGE_LEN 20 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_LOG_OP_OFST 4 */ +#define MC_CMD_FC_IN_LOG_ADDR_RANGE_OFFSET_OFST 8 +#define MC_CMD_FC_IN_LOG_ADDR_RANGE_LENGTH_OFST 12 +#define MC_CMD_FC_IN_LOG_ADDR_RANGE_ERASE_SIZE_OFST 16 + +/* MC_CMD_FC_IN_LOG_JTAG_UART msgrequest */ +#define MC_CMD_FC_IN_LOG_JTAG_UART_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_LOG_OP_OFST 4 */ +#define MC_CMD_FC_IN_LOG_JTAG_UART_ENABLE_OFST 8 + +/* MC_CMD_FC_IN_CLOCK msgrequest */ +#define MC_CMD_FC_IN_CLOCK_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_CLOCK_OP_OFST 4 +#define MC_CMD_FC_IN_CLOCK_GET_TIME 0x0 /* enum */ +#define MC_CMD_FC_IN_CLOCK_SET_TIME 0x1 /* enum */ +#define MC_CMD_FC_IN_CLOCK_ID_OFST 8 +#define MC_CMD_FC_IN_CLOCK_STATS 0x0 /* enum */ +#define MC_CMD_FC_IN_CLOCK_MAC 0x1 /* enum */ + +/* MC_CMD_FC_IN_CLOCK_GET_TIME msgrequest */ +#define MC_CMD_FC_IN_CLOCK_GET_TIME_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_CLOCK_OP_OFST 4 */ +/* MC_CMD_FC_IN_CLOCK_ID_OFST 8 */ + +/* MC_CMD_FC_IN_CLOCK_SET_TIME msgrequest */ +#define MC_CMD_FC_IN_CLOCK_SET_TIME_LEN 24 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_CLOCK_OP_OFST 4 */ +/* MC_CMD_FC_IN_CLOCK_ID_OFST 8 */ +#define MC_CMD_FC_IN_CLOCK_SET_TIME_SECONDS_OFST 12 +#define MC_CMD_FC_IN_CLOCK_SET_TIME_SECONDS_LEN 8 +#define MC_CMD_FC_IN_CLOCK_SET_TIME_SECONDS_LO_OFST 12 +#define MC_CMD_FC_IN_CLOCK_SET_TIME_SECONDS_HI_OFST 16 +#define MC_CMD_FC_IN_CLOCK_SET_TIME_NANOSECONDS_OFST 20 + +/* MC_CMD_FC_IN_DDR msgrequest */ +#define MC_CMD_FC_IN_DDR_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DDR_OP_OFST 4 +#define MC_CMD_FC_IN_DDR_SET_SPD 0x0 /* enum */ +#define MC_CMD_FC_IN_DDR_GET_STATUS 0x1 /* enum */ +#define MC_CMD_FC_IN_DDR_BANK_OFST 8 +#define MC_CMD_FC_IN_DDR_BANK_B0 0x0 /* enum */ +#define MC_CMD_FC_IN_DDR_BANK_B1 0x1 /* enum */ +#define MC_CMD_FC_IN_DDR_BANK_T0 0x2 /* enum */ +#define MC_CMD_FC_IN_DDR_BANK_T1 0x3 /* enum */ +#define MC_CMD_FC_IN_DDR_NUM_BANKS 0x4 /* enum */ + +/* MC_CMD_FC_IN_DDR_SET_SPD msgrequest */ +#define MC_CMD_FC_IN_DDR_SET_SPD_LEN 148 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_DDR_OP_OFST 4 */ +/* MC_CMD_FC_IN_DDR_BANK_OFST 8 */ +#define MC_CMD_FC_IN_DDR_FLAGS_OFST 12 +#define MC_CMD_FC_IN_DDR_SET_SPD_ACTIVE 0x1 /* enum */ +#define MC_CMD_FC_IN_DDR_SPD_OFST 16 +#define MC_CMD_FC_IN_DDR_SPD_LEN 1 +#define MC_CMD_FC_IN_DDR_SPD_NUM 128 +#define MC_CMD_FC_IN_DDR_SPD_PAGE_ID_OFST 144 + +/* MC_CMD_FC_IN_DDR_GET_STATUS msgrequest */ +#define MC_CMD_FC_IN_DDR_GET_STATUS_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +/* MC_CMD_FC_IN_DDR_OP_OFST 4 */ +/* MC_CMD_FC_IN_DDR_BANK_OFST 8 */ + +/* MC_CMD_FC_IN_TIMESTAMP msgrequest */ +#define MC_CMD_FC_IN_TIMESTAMP_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TIMESTAMP_OP_OFST 4 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT 0x0 /* enum */ +#define MC_CMD_FC_IN_TIMESTAMP_READ_SNAPSHOT 0x1 /* enum */ +#define MC_CMD_FC_IN_TIMESTAMP_CLEAR_TRANSMIT 0x2 /* enum */ + +/* MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT msgrequest */ +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_LEN 28 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_OP_OFST 4 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_FILTER_OFST 8 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_LATEST 0x0 /* enum */ +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_MATCH 0x1 /* enum */ +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_CLOCK_ID_OFST 12 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_CLOCK_ID_LEN 8 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_CLOCK_ID_LO_OFST 12 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_CLOCK_ID_HI_OFST 16 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_PORT_NUM_OFST 20 +#define MC_CMD_FC_IN_TIMESTAMP_READ_TRANSMIT_SEQ_NUM_OFST 24 + +/* MC_CMD_FC_IN_TIMESTAMP_READ_SNAPSHOT msgrequest */ +#define MC_CMD_FC_IN_TIMESTAMP_READ_SNAPSHOT_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TIMESTAMP_READ_SNAPSHOT_OP_OFST 4 + +/* MC_CMD_FC_IN_TIMESTAMP_CLEAR_TRANSMIT msgrequest */ +#define MC_CMD_FC_IN_TIMESTAMP_CLEAR_TRANSMIT_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_TIMESTAMP_CLEAR_TRANSMIT_OP_OFST 4 + +/* MC_CMD_FC_IN_SPI msgrequest */ +#define MC_CMD_FC_IN_SPI_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_SPI_OP_OFST 4 +#define MC_CMD_FC_IN_SPI_READ 0x0 /* enum */ +#define MC_CMD_FC_IN_SPI_WRITE 0x1 /* enum */ +#define MC_CMD_FC_IN_SPI_ERASE 0x2 /* enum */ + +/* MC_CMD_FC_IN_SPI_READ msgrequest */ +#define MC_CMD_FC_IN_SPI_READ_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_SPI_READ_OP_OFST 4 +#define MC_CMD_FC_IN_SPI_READ_ADDR_OFST 8 +#define MC_CMD_FC_IN_SPI_READ_NUMBYTES_OFST 12 + +/* MC_CMD_FC_IN_SPI_WRITE msgrequest */ +#define MC_CMD_FC_IN_SPI_WRITE_LENMIN 16 +#define MC_CMD_FC_IN_SPI_WRITE_LENMAX 252 +#define MC_CMD_FC_IN_SPI_WRITE_LEN(num) (12+4*(num)) +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_SPI_WRITE_OP_OFST 4 +#define MC_CMD_FC_IN_SPI_WRITE_ADDR_OFST 8 +#define MC_CMD_FC_IN_SPI_WRITE_BUFFER_OFST 12 +#define MC_CMD_FC_IN_SPI_WRITE_BUFFER_LEN 4 +#define MC_CMD_FC_IN_SPI_WRITE_BUFFER_MINNUM 1 +#define MC_CMD_FC_IN_SPI_WRITE_BUFFER_MAXNUM 60 + +/* MC_CMD_FC_IN_SPI_ERASE msgrequest */ +#define MC_CMD_FC_IN_SPI_ERASE_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_SPI_ERASE_OP_OFST 4 +#define MC_CMD_FC_IN_SPI_ERASE_ADDR_OFST 8 +#define MC_CMD_FC_IN_SPI_ERASE_NUMBYTES_OFST 12 + +/* MC_CMD_FC_IN_DIAG msgrequest */ +#define MC_CMD_FC_IN_DIAG_LEN 8 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_POWER_NOISE 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK 0x1 /* enum */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL 0x2 /* enum */ + +/* MC_CMD_FC_IN_DIAG_POWER_NOISE msgrequest */ +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_READ_CONFIG 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_WRITE_CONFIG 0x1 /* enum */ + +/* MC_CMD_FC_IN_DIAG_POWER_NOISE_READ_CONFIG msgrequest */ +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_READ_CONFIG_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_READ_CONFIG_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_READ_CONFIG_SUB_OP_OFST 8 + +/* MC_CMD_FC_IN_DIAG_POWER_NOISE_WRITE_CONFIG msgrequest */ +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_WRITE_CONFIG_LEN 20 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_WRITE_CONFIG_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_WRITE_CONFIG_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_WRITE_CONFIG_TOGGLE_COUNT_OFST 12 +#define MC_CMD_FC_IN_DIAG_POWER_NOISE_WRITE_CONFIG_CLKEN_COUNT_OFST 16 + +/* MC_CMD_FC_IN_DIAG_DDR_SOAK msgrequest */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_RESULT 0x1 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_STOP 0x2 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR 0x3 /* enum */ + +/* MC_CMD_FC_IN_DIAG_DDR_SOAK_START msgrequest */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_LEN 24 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_BANK_MASK_OFST 12 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_TEST_PATTERN_OFST 16 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_ZEROS 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_ONES 0x1 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_TEST_TYPE_OFST 20 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_ONGOING_TEST 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_START_SINGLE_TEST 0x1 /* enum */ + +/* MC_CMD_FC_IN_DIAG_DDR_SOAK_RESULT msgrequest */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_RESULT_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_RESULT_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_RESULT_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_RESULT_BANK_ID_OFST 12 +#define MC_CMD_FC_DDR_BANK0 0x0 /* enum */ +#define MC_CMD_FC_DDR_BANK1 0x1 /* enum */ +#define MC_CMD_FC_DDR_BANK2 0x2 /* enum */ +#define MC_CMD_FC_DDR_BANK3 0x3 /* enum */ +#define MC_CMD_FC_DDR_AOEMEM_MAX_BANKS 0x4 /* enum */ + +/* MC_CMD_FC_IN_DIAG_DDR_SOAK_STOP msgrequest */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_STOP_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_STOP_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_STOP_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_STOP_BANK_MASK_OFST 12 + +/* MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR msgrequest */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR_LEN 20 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR_BANK_MASK_OFST 12 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR_FLAG_ACTION_OFST 16 +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR_CLEAR 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_DDR_SOAK_ERROR_SET 0x1 /* enum */ + +/* MC_CMD_FC_IN_DIAG_DATAPATH_CTRL msgrequest */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_LEN 12 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG 0x1 /* enum */ + +/* MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE msgrequest */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE_LEN 16 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE_MODE_OFST 12 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE_PASSTHROUGH 0x0 /* enum */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_SET_MODE_SNAKE 0x1 /* enum */ + +/* MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG msgrequest */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG_LEN 24 +/* MC_CMD_FC_IN_CMD_OFST 0 */ +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG_OP_OFST 4 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG_SUB_OP_OFST 8 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG_CONTROL1_OFST 12 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG_CONTROL2_OFST 16 +#define MC_CMD_FC_IN_DIAG_DATAPATH_CTRL_RAW_CONFIG_CONTROL3_OFST 20 + +/* MC_CMD_FC_OUT msgresponse */ +#define MC_CMD_FC_OUT_LEN 0 + +/* MC_CMD_FC_OUT_NULL msgresponse */ +#define MC_CMD_FC_OUT_NULL_LEN 0 + +/* MC_CMD_FC_OUT_READ32 msgresponse */ +#define MC_CMD_FC_OUT_READ32_LENMIN 4 +#define MC_CMD_FC_OUT_READ32_LENMAX 252 +#define MC_CMD_FC_OUT_READ32_LEN(num) (0+4*(num)) +#define MC_CMD_FC_OUT_READ32_BUFFER_OFST 0 +#define MC_CMD_FC_OUT_READ32_BUFFER_LEN 4 +#define MC_CMD_FC_OUT_READ32_BUFFER_MINNUM 1 +#define MC_CMD_FC_OUT_READ32_BUFFER_MAXNUM 63 + +/* MC_CMD_FC_OUT_WRITE32 msgresponse */ +#define MC_CMD_FC_OUT_WRITE32_LEN 0 + +/* MC_CMD_FC_OUT_TRC_READ msgresponse */ +#define MC_CMD_FC_OUT_TRC_READ_LEN 16 +#define MC_CMD_FC_OUT_TRC_READ_DATA_OFST 0 +#define MC_CMD_FC_OUT_TRC_READ_DATA_LEN 4 +#define MC_CMD_FC_OUT_TRC_READ_DATA_NUM 4 + +/* MC_CMD_FC_OUT_TRC_WRITE msgresponse */ +#define MC_CMD_FC_OUT_TRC_WRITE_LEN 0 + +/* MC_CMD_FC_OUT_GET_VERSION msgresponse */ +#define MC_CMD_FC_OUT_GET_VERSION_LEN 12 +#define MC_CMD_FC_OUT_GET_VERSION_FIRMWARE_OFST 0 +#define MC_CMD_FC_OUT_GET_VERSION_VERSION_OFST 4 +#define MC_CMD_FC_OUT_GET_VERSION_VERSION_LEN 8 +#define MC_CMD_FC_OUT_GET_VERSION_VERSION_LO_OFST 4 +#define MC_CMD_FC_OUT_GET_VERSION_VERSION_HI_OFST 8 + +/* MC_CMD_FC_OUT_TRC_RX_READ msgresponse */ +#define MC_CMD_FC_OUT_TRC_RX_READ_LEN 8 +#define MC_CMD_FC_OUT_TRC_RX_READ_DATA_OFST 0 +#define MC_CMD_FC_OUT_TRC_RX_READ_DATA_LEN 4 +#define MC_CMD_FC_OUT_TRC_RX_READ_DATA_NUM 2 + +/* MC_CMD_FC_OUT_TRC_RX_WRITE msgresponse */ +#define MC_CMD_FC_OUT_TRC_RX_WRITE_LEN 0 + +/* MC_CMD_FC_OUT_MAC_RECONFIGURE msgresponse */ +#define MC_CMD_FC_OUT_MAC_RECONFIGURE_LEN 0 + +/* MC_CMD_FC_OUT_MAC_SET_LINK msgresponse */ +#define MC_CMD_FC_OUT_MAC_SET_LINK_LEN 0 + +/* MC_CMD_FC_OUT_MAC_READ_STATUS msgresponse */ +#define MC_CMD_FC_OUT_MAC_READ_STATUS_LEN 4 +#define MC_CMD_FC_OUT_MAC_READ_STATUS_STATUS_OFST 0 + +/* MC_CMD_FC_OUT_MAC_GET_RX_STATS msgresponse */ +#define MC_CMD_FC_OUT_MAC_GET_RX_STATS_LEN ((((0-1+(64*MC_CMD_FC_MAC_RX_NSTATS))+1))>>3) +#define MC_CMD_FC_OUT_MAC_GET_RX_STATS_STATISTICS_OFST 0 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:53:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87E6517A; Wed, 25 Mar 2015 10:53:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68564C13; Wed, 25 Mar 2015 10:53:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PArT4J099256; Wed, 25 Mar 2015 10:53:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PArSNa099251; Wed, 25 Mar 2015 10:53:28 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251053.t2PArSNa099251@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:53:28 +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: r280550 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:53:29 -0000 Author: arybchik Date: Wed Mar 25 10:53:27 2015 New Revision: 280550 URL: https://svnweb.freebsd.org/changeset/base/280550 Log: MFC: 279048 sfxge: add Florence R7 turbo mode support to common code Submitted by: Andrew Lee Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_mcdi.h stable/10/sys/dev/sfxge/common/siena_nic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 10:52:35 2015 (r280549) +++ stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 10:53:27 2015 (r280550) @@ -861,6 +861,7 @@ efx_phy_bist_stop( #define EFX_FEATURE_MCDI 0x00000020 #define EFX_FEATURE_LOOKAHEAD_SPLIT 0x00000040 #define EFX_FEATURE_MAC_HEADER_FILTERS 0x00000080 +#define EFX_FEATURE_TURBO 0x00000100 typedef struct efx_nic_cfg_s { uint32_t enc_board_type; @@ -881,6 +882,7 @@ typedef struct efx_nic_cfg_s { uint32_t enc_rxq_limit; uint32_t enc_buftbl_limit; uint32_t enc_evq_moderation_max; + uint32_t enc_clk_mult; #if EFSYS_OPT_LOOPBACK uint32_t enc_loopback_types[EFX_LINK_NMODES]; #endif /* EFSYS_OPT_LOOPBACK */ Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:52:35 2015 (r280549) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:53:27 2015 (r280550) @@ -844,13 +844,14 @@ efx_ev_qmoderate( __in unsigned int us) { efx_nic_t *enp = eep->ee_enp; + efx_nic_cfg_t *encp = &(enp->en_nic_cfg); unsigned int locked; efx_dword_t dword; int rc; EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); - if (us > enp->en_nic_cfg.enc_evq_moderation_max) { + if (us > encp->enc_evq_moderation_max) { rc = EINVAL; goto fail1; } @@ -869,21 +870,20 @@ efx_ev_qmoderate( uint32_t timer_val; /* Calculate the timer value in quanta */ - us -= (us % EFX_EV_TIMER_QUANTUM); - if (us < EFX_EV_TIMER_QUANTUM) - us = EFX_EV_TIMER_QUANTUM; - - timer_val = us / EFX_EV_TIMER_QUANTUM; + timer_val = us * encp->enc_clk_mult / EFX_EV_TIMER_QUANTUM; /* Moderation value is base 0 so we need to deduct 1 */ + if (timer_val > 0) + timer_val--; + if (enp->en_family == EFX_FAMILY_FALCON) EFX_POPULATE_DWORD_2(dword, FRF_AB_TC_TIMER_MODE, FFE_AB_TIMER_MODE_INT_HLDOFF, - FRF_AB_TIMER_VAL, timer_val - 1); + FRF_AB_TIMER_VAL, timer_val); else EFX_POPULATE_DWORD_2(dword, FRF_CZ_TC_TIMER_MODE, FFE_CZ_TIMER_MODE_INT_HLDOFF, - FRF_CZ_TC_TIMER_VAL, timer_val - 1); + FRF_CZ_TC_TIMER_VAL, timer_val); } locked = (eep->ee_index == 0) ? 1 : 0; Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mcdi.h Wed Mar 25 10:52:35 2015 (r280549) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.h Wed Mar 25 10:53:27 2015 (r280550) @@ -233,6 +233,9 @@ efx_mcdi_version( #define MCDI_EV_FIELD(_eqp, _field) \ EFX_QWORD_FIELD(*_eqp, MCDI_EVENT_ ## _field) +#define MCDI_CMD_DWORD_FIELD(_edp, _field) \ + EFX_DWORD_FIELD(*_edp, MC_CMD_ ## _field) + #ifdef __cplusplus } #endif Modified: stable/10/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 10:52:35 2015 (r280549) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 10:53:27 2015 (r280550) @@ -279,7 +279,8 @@ siena_board_cfg( uint8_t outbuf[MAX(MC_CMD_GET_BOARD_CFG_OUT_LENMIN, MC_CMD_GET_RESOURCE_LIMITS_OUT_LEN)]; efx_mcdi_req_t req; - uint8_t *src; + uint8_t *mac_addr; + efx_dword_t *capabilities; int rc; /* Board configuration */ @@ -302,17 +303,35 @@ siena_board_cfg( goto fail2; } - if (emip->emi_port == 1) - src = MCDI_OUT2(req, uint8_t, + if (emip->emi_port == 1) { + mac_addr = MCDI_OUT2(req, uint8_t, GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT0); - else - src = MCDI_OUT2(req, uint8_t, + capabilities = MCDI_OUT2(req, efx_dword_t, + GET_BOARD_CFG_OUT_CAPABILITIES_PORT0); + } else { + mac_addr = MCDI_OUT2(req, uint8_t, GET_BOARD_CFG_OUT_MAC_ADDR_BASE_PORT1); - EFX_MAC_ADDR_COPY(encp->enc_mac_addr, src); + capabilities = MCDI_OUT2(req, efx_dword_t, + GET_BOARD_CFG_OUT_CAPABILITIES_PORT1); + } + EFX_MAC_ADDR_COPY(encp->enc_mac_addr, mac_addr); encp->enc_board_type = MCDI_OUT_DWORD(req, GET_BOARD_CFG_OUT_BOARD_TYPE); + /* Additional capabilities */ + encp->enc_clk_mult = 1; + if (MCDI_CMD_DWORD_FIELD(capabilities, CAPABILITIES_TURBO)) { + enp->en_features |= EFX_FEATURE_TURBO; + + if (MCDI_CMD_DWORD_FIELD(capabilities, + CAPABILITIES_TURBO_ACTIVE)) + encp->enc_clk_mult = 2; + } + + encp->enc_evq_moderation_max = EFX_EV_TIMER_QUANTUM << + FRF_AB_TIMER_VAL_WIDTH / encp->enc_clk_mult; + /* Resource limits */ req.emr_cmd = MC_CMD_GET_RESOURCE_LIMITS; EFX_STATIC_ASSERT(MC_CMD_GET_RESOURCE_LIMITS_IN_LEN == 0); @@ -607,9 +626,6 @@ siena_nic_probe( if ((rc = siena_board_cfg(enp)) != 0) goto fail4; - encp->enc_evq_moderation_max = - EFX_EV_TIMER_QUANTUM << FRF_CZ_TIMER_VAL_WIDTH; - if ((rc = siena_phy_cfg(enp)) != 0) goto fail5; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:54:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDB1C2C2; Wed, 25 Mar 2015 10:54:12 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 557A4C25; Wed, 25 Mar 2015 10:54:11 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2PAs9pc009423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Mar 2015 13:54:09 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2PAs9ee009422; Wed, 25 Mar 2015 13:54:09 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 25 Mar 2015 13:54:09 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280495 - head/sys/kern Message-ID: <20150325105409.GS64665@FreeBSD.org> References: <201503250855.t2P8tZFp038467@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503250855.t2P8tZFp038467@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:54:12 -0000 On Wed, Mar 25, 2015 at 08:55:35AM +0000, Hans Petter Selasky wrote: H> Author: hselasky H> Date: Wed Mar 25 08:55:34 2015 H> New Revision: 280495 H> URL: https://svnweb.freebsd.org/changeset/base/280495 H> H> Log: H> Implement a simple OID number garbage collector. Given the increasing H> number of dynamically created and destroyed SYSCTLs during runtime it H> is very likely that the current new OID number limit of 0x7fffffff can H> be reached. Especially if dynamic OID creation and destruction results H> from automatic tests. Additional changes: H> H> - Optimize the typical use case by decrementing the next automatic OID H> sequence number instead of incrementing it. This saves searching time H> when inserting new OIDs into a fresh parent OID node. H> H> - Add simple check for duplicate non-automatic OID numbers. Why didn't you use alloc_unr(9) for that? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:54:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58F3B401; Wed, 25 Mar 2015 10:54:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28E5AC2D; Wed, 25 Mar 2015 10:54:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAsPhO099434; Wed, 25 Mar 2015 10:54:25 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAsOcV099432; Wed, 25 Mar 2015 10:54:24 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251054.t2PAsOcV099432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:54:24 +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: r280551 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:54:25 -0000 Author: arybchik Date: Wed Mar 25 10:54:23 2015 New Revision: 280551 URL: https://svnweb.freebsd.org/changeset/base/280551 Log: MFC: 279076 sfxge: regenerate sensor map Add Florence R7 and Modena sensors. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_mon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 10:53:27 2015 (r280550) +++ stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 10:54:23 2015 (r280551) @@ -459,7 +459,7 @@ efx_mon_init( #define EFX_MON_STATS_SIZE 0x100 -/* START MKCONFIG GENERATED MonitorHeaderStatsBlock 16a14e61aa4f8d80 */ +/* START MKCONFIG GENERATED MonitorHeaderStatsBlock 58706a378332aeee */ typedef enum efx_mon_stat_e { EFX_MON_STAT_2_5V, EFX_MON_STAT_VCCP1, @@ -477,6 +477,20 @@ typedef enum efx_mon_stat_e { EFX_MON_STAT_1_2V, EFX_MON_STAT_1_8V, EFX_MON_STAT_3_3V, + EFX_MON_STAT_1_2VA, + EFX_MON_STAT_VREF, + EFX_MON_STAT_VAOE, + EFX_MON_STAT_AOE_TEMP, + EFX_MON_STAT_PSU_AOE_TEMP, + EFX_MON_STAT_PSU_TEMP, + EFX_MON_STAT_FAN0, + EFX_MON_STAT_FAN1, + EFX_MON_STAT_FAN2, + EFX_MON_STAT_FAN3, + EFX_MON_STAT_FAN4, + EFX_MON_STAT_VAOE_IN, + EFX_MON_STAT_IAOE, + EFX_MON_STAT_IAOE_IN, EFX_MON_NSTATS } efx_mon_stat_t; Modified: stable/10/sys/dev/sfxge/common/efx_mon.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mon.c Wed Mar 25 10:53:27 2015 (r280550) +++ stable/10/sys/dev/sfxge/common/efx_mon.c Wed Mar 25 10:54:23 2015 (r280551) @@ -195,7 +195,7 @@ fail1: #if EFSYS_OPT_NAMES -/* START MKCONFIG GENERATED MonitorStatNamesBlock 08518fd1fb4e2612 */ +/* START MKCONFIG GENERATED MonitorStatNamesBlock 89ff37f1d74ad8b3 */ static const char __cs * __cs __mon_stat_name[] = { "value_2_5v", "value_vccp1", @@ -213,6 +213,20 @@ static const char __cs * __cs __mon_sta "1_2v", "1_8v", "3_3v", + "1_2va", + "vref", + "vaoe", + "aoe_temperature", + "psu_aoe_temperature", + "psu_temperature", + "fan0", + "fan1", + "fan2", + "fan3", + "fan4", + "vaoe_in", + "iaoe", + "iaoe_in", }; /* END MKCONFIG GENERATED MonitorStatNamesBlock */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:55:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1CDC544; Wed, 25 Mar 2015 10:55:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BB02C3B; Wed, 25 Mar 2015 10:55:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAt92Y099649; Wed, 25 Mar 2015 10:55:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAt9P5099648; Wed, 25 Mar 2015 10:55:09 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251055.t2PAt9P5099648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:55:09 +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: r280552 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:55:09 -0000 Author: hselasky Date: Wed Mar 25 10:55:08 2015 New Revision: 280552 URL: https://svnweb.freebsd.org/changeset/base/280552 Log: MFC r279281: Fix a special case in ip_fragment() to produce a more sensible chain of packets. When the data payload length excluding any headers, of an outgoing IPv4 packet exceeds PAGE_SIZE bytes, a special case in ip_fragment() can kick in to optimise the outgoing payload(s). The code which was added in r98849 as part of zero copy socket support assumes that the beginning of any MTU sized payload is aligned to where a MBUF's "m_data" pointer points. This is not always the case and can sometimes cause large IPv4 packets, as part of ping replies, to be split more than needed. Instead of iterating the MBUFs to figure out how much data is in the current chain, use the value already in the "m_pkthdr.len" field of the first MBUF in the chain. Reviewed by: ken @ Differential Revision: https://reviews.freebsd.org/D1893 Sponsored by: Mellanox Technologies Modified: stable/10/sys/netinet/ip_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Wed Mar 25 10:54:23 2015 (r280551) +++ stable/10/sys/netinet/ip_output.c Wed Mar 25 10:55:08 2015 (r280552) @@ -752,10 +752,8 @@ ip_fragment(struct ip *ip, struct mbuf * * be less than the receiver's page size ? */ int newlen; - struct mbuf *m; - for (m = m0, off = 0; m && (off+m->m_len) <= mtu; m = m->m_next) - off += m->m_len; + off = MIN(mtu, m0->m_pkthdr.len); /* * firstlen (off - hlen) must be aligned on an From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:56:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A6FC6A3; Wed, 25 Mar 2015 10:56:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 310C5C57; Wed, 25 Mar 2015 10:56:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAuDBb099851; Wed, 25 Mar 2015 10:56:13 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAuBo2099844; Wed, 25 Mar 2015 10:56:11 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251056.t2PAuBo2099844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:56:11 +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: r280553 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:56:13 -0000 Author: arybchik Date: Wed Mar 25 10:56:10 2015 New Revision: 280553 URL: https://svnweb.freebsd.org/changeset/base/280553 Log: MFC: 279077 sfxge: style fixes Use nitem() to get number of array elements. Remove unused define. Use TAB to indent. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 10:55:08 2015 (r280552) +++ stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 10:56:10 2015 (r280553) @@ -1614,14 +1614,14 @@ efx_rx_scale_toeplitz_ipv6_key_set( #endif /* EFSYS_OPT_RX_SCALE */ -#define EFX_RXQ_MAXNDESCS 4096 -#define EFX_RXQ_MINNDESCS 512 +#define EFX_RXQ_MAXNDESCS 4096 +#define EFX_RXQ_MINNDESCS 512 -#define EFX_RXQ_NDESCS_MASK EFX_MASK(EFX_RXQ_MAXNDESCS, EFX_RXQ_MINNDESCS) +#define EFX_RXQ_NDESCS_MASK EFX_MASK(EFX_RXQ_MAXNDESCS, EFX_RXQ_MINNDESCS) -#define EFX_RXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) -#define EFX_RXQ_NBUFS(_ndescs) (EFX_RXQ_SIZE(_ndescs) / EFX_BUF_SIZE) -#define EFX_RXQ_LIMIT(_ndescs) ((_ndescs) - 16) +#define EFX_RXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) +#define EFX_RXQ_NBUFS(_ndescs) (EFX_RXQ_SIZE(_ndescs) / EFX_BUF_SIZE) +#define EFX_RXQ_LIMIT(_ndescs) ((_ndescs) - 16) typedef enum efx_rxq_type_e { EFX_RXQ_TYPE_DEFAULT, @@ -1700,14 +1700,14 @@ extern void efx_tx_fini( __in efx_nic_t *enp); -#define EFX_TXQ_MAXNDESCS 4096 -#define EFX_TXQ_MINNDESCS 512 +#define EFX_TXQ_MAXNDESCS 4096 +#define EFX_TXQ_MINNDESCS 512 -#define EFX_TXQ_NDESCS_MASK EFX_MASK(EFX_TXQ_MAXNDESCS, EFX_TXQ_MINNDESCS) +#define EFX_TXQ_NDESCS_MASK EFX_MASK(EFX_TXQ_MAXNDESCS, EFX_TXQ_MINNDESCS) -#define EFX_TXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) -#define EFX_TXQ_NBUFS(_ndescs) (EFX_TXQ_SIZE(_ndescs) / EFX_BUF_SIZE) -#define EFX_TXQ_LIMIT(_ndescs) ((_ndescs) - 16) +#define EFX_TXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) +#define EFX_TXQ_NBUFS(_ndescs) (EFX_TXQ_SIZE(_ndescs) / EFX_BUF_SIZE) +#define EFX_TXQ_LIMIT(_ndescs) ((_ndescs) - 16) extern __checkReturn int efx_tx_qcreate( Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:55:08 2015 (r280552) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 10:56:10 2015 (r280553) @@ -1172,9 +1172,7 @@ sfxge_rx_stat_init(struct sfxge_softc *s stat_list = SYSCTL_CHILDREN(sc->stats_node); - for (id = 0; - id < sizeof(sfxge_rx_stats) / sizeof(sfxge_rx_stats[0]); - id++) { + for (id = 0; id < nitems(sfxge_rx_stats); id++) { SYSCTL_ADD_PROC( ctx, stat_list, OID_AUTO, sfxge_rx_stats[id].name, Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:55:08 2015 (r280552) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:56:10 2015 (r280553) @@ -1547,9 +1547,7 @@ sfxge_tx_stat_init(struct sfxge_softc *s stat_list = SYSCTL_CHILDREN(sc->stats_node); - for (id = 0; - id < sizeof(sfxge_tx_stats) / sizeof(sfxge_tx_stats[0]); - id++) { + for (id = 0; id < nitems(sfxge_tx_stats); id++) { SYSCTL_ADD_PROC( ctx, stat_list, OID_AUTO, sfxge_tx_stats[id].name, Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:55:08 2015 (r280552) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:56:10 2015 (r280553) @@ -41,13 +41,7 @@ * clusters. (The chain could be longer than this initially, but can * be shortened with m_collapse().) */ -#define SFXGE_TX_MAPPING_MAX_SEG (64 / 2 + 1) - -/* Maximum number of DMA segments needed to map an output packet. It - * could overlap all mbufs in the chain and also require an extra - * segment for a TSO header. - */ -#define SFXGE_TX_PACKET_MAX_SEG (SFXGE_TX_MAPPING_MAX_SEG + 1) +#define SFXGE_TX_MAPPING_MAX_SEG (64 / 2 + 1) /* * Buffer mapping flags. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:56:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A20A87E8; Wed, 25 Mar 2015 10:56:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BBE7C63; Wed, 25 Mar 2015 10:56:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAusMd099976; Wed, 25 Mar 2015 10:56:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAushN099975; Wed, 25 Mar 2015 10:56:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251056.t2PAushN099975@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 10:56:54 +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: r280554 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:56:54 -0000 Author: hselasky Date: Wed Mar 25 10:56:53 2015 New Revision: 280554 URL: https://svnweb.freebsd.org/changeset/base/280554 Log: MFC r279281: Fix a special case in ip_fragment() to produce a more sensible chain of packets. When the data payload length excluding any headers, of an outgoing IPv4 packet exceeds PAGE_SIZE bytes, a special case in ip_fragment() can kick in to optimise the outgoing payload(s). The code which was added in r98849 as part of zero copy socket support assumes that the beginning of any MTU sized payload is aligned to where a MBUF's "m_data" pointer points. This is not always the case and can sometimes cause large IPv4 packets, as part of ping replies, to be split more than needed. Instead of iterating the MBUFs to figure out how much data is in the current chain, use the value already in the "m_pkthdr.len" field of the first MBUF in the chain. Reviewed by: ken @ Differential Revision: https://reviews.freebsd.org/D1893 Sponsored by: Mellanox Technologies Modified: stable/9/sys/netinet/ip_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_output.c ============================================================================== --- stable/9/sys/netinet/ip_output.c Wed Mar 25 10:56:10 2015 (r280553) +++ stable/9/sys/netinet/ip_output.c Wed Mar 25 10:56:53 2015 (r280554) @@ -741,10 +741,8 @@ ip_fragment(struct ip *ip, struct mbuf * * be less than the receiver's page size ? */ int newlen; - struct mbuf *m; - for (m = m0, off = 0; m && (off+m->m_len) <= mtu; m = m->m_next) - off += m->m_len; + off = MIN(mtu, m0->m_pkthdr.len); /* * firstlen (off - hlen) must be aligned on an From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:57:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 080A8927; Wed, 25 Mar 2015 10:57:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E645AC6F; Wed, 25 Mar 2015 10:57:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAvQcJ000220; Wed, 25 Mar 2015 10:57:26 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAvQmB000219; Wed, 25 Mar 2015 10:57:26 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251057.t2PAvQmB000219@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:57: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: r280555 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:57:27 -0000 Author: arybchik Date: Wed Mar 25 10:57:26 2015 New Revision: 280555 URL: https://svnweb.freebsd.org/changeset/base/280555 Log: MFC: 279078 sfxge: add assertions that required event handlers are implemented efx_ev_mcdi() does not assert or check that all event handlers it calls are non-null. Add assertions at the top for all required event handlers, as some events (in the case of this bug, monitor events) are rare. Submitted by: Ben Hutchings Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:56:53 2015 (r280554) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 10:57:26 2015 (r280555) @@ -567,6 +567,12 @@ efx_ev_mcdi( if (enp->en_family != EFX_FAMILY_SIENA) goto out; + EFSYS_ASSERT(eecp->eec_link_change != NULL); + EFSYS_ASSERT(eecp->eec_exception != NULL); +#if EFSYS_OPT_MON_STATS + EFSYS_ASSERT(eecp->eec_monitor != NULL); +#endif + EFX_EV_QSTAT_INCR(eep, EV_MCDI_RESPONSE); code = EFX_QWORD_FIELD(*eqp, MCDI_EVENT_CODE); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:58:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DFB29A86; Wed, 25 Mar 2015 10:58:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9C86C82; Wed, 25 Mar 2015 10:58:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAwM0T000409; Wed, 25 Mar 2015 10:58:22 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAwMvj000408; Wed, 25 Mar 2015 10:58:22 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251058.t2PAwMvj000408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:58: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: r280556 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:58:23 -0000 Author: arybchik Date: Wed Mar 25 10:58:21 2015 New Revision: 280556 URL: https://svnweb.freebsd.org/changeset/base/280556 Log: MFC: 279080 sfxge: reap Tx descriptors on unblock Otherwise when processing finally comes to efx_tx_qdesc_post() it could be insufficient space between reaped and added to post pending descriptors. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:57:26 2015 (r280555) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:58:21 2015 (r280556) @@ -1142,8 +1142,11 @@ sfxge_tx_qunblock(struct sfxge_txq *txq) unsigned int level; level = txq->added - txq->completed; - if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries)) + if (level <= SFXGE_TXQ_UNBLOCK_LEVEL(txq->entries)) { + /* reaped must be in sync with blocked */ + sfxge_tx_qreap(txq); txq->blocked = 0; + } } sfxge_tx_qdpl_service(txq); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:59:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C0F8BD1; Wed, 25 Mar 2015 10:59:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D646C94; Wed, 25 Mar 2015 10:59:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAxPK2000590; Wed, 25 Mar 2015 10:59:25 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAxOaj000587; Wed, 25 Mar 2015 10:59:24 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251059.t2PAxOaj000587@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 10:59:24 +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: r280557 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:59:25 -0000 Author: arybchik Date: Wed Mar 25 10:59:24 2015 New Revision: 280557 URL: https://svnweb.freebsd.org/changeset/base/280557 Log: MFC: 279094 sfxge: more accurate calculation of maximum number of TSO segments Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:58:21 2015 (r280556) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 10:59:24 2015 (r280557) @@ -72,10 +72,10 @@ __FBSDID("$FreeBSD$"); * maximum mbuf length we might need more than a ring-ful of * descriptors, but this should not happen in practice except * due to deliberate attack. In that case we will truncate - * the output at a packet boundary. Allow for a reasonable - * minimum MSS of 512. + * the output at a packet boundary. */ -#define SFXGE_TSO_MAX_DESC ((65535 / 512) * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) +#define SFXGE_TSO_MAX_DESC \ + (SFXGE_TSO_MAX_SEGS * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) #define SFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) #ifdef SFXGE_HAVE_MQ Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:58:21 2015 (r280556) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 10:59:24 2015 (r280557) @@ -36,12 +36,22 @@ #include #include +/* Maximum size of TSO packet */ +#define SFXGE_TSO_MAX_SIZE (65535) + +/* + * Maximum number of segments to be created for a TSO packet. + * Allow for a reasonable minimum MSS of 512. + */ +#define SFXGE_TSO_MAX_SEGS howmany(SFXGE_TSO_MAX_SIZE, 512) + /* Maximum number of DMA segments needed to map an mbuf chain. With * TSO, the mbuf length may be just over 64K, divided into 2K mbuf * clusters. (The chain could be longer than this initially, but can * be shortened with m_collapse().) */ -#define SFXGE_TX_MAPPING_MAX_SEG (64 / 2 + 1) +#define SFXGE_TX_MAPPING_MAX_SEG \ + (1 + howmany(SFXGE_TSO_MAX_SIZE, MCLBYTES)) /* * Buffer mapping flags. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 10:59:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFDD0D06; Wed, 25 Mar 2015 10:59:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5922C9C; Wed, 25 Mar 2015 10:59:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PAxk1t000701; Wed, 25 Mar 2015 10:59:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PAxhdm000685; Wed, 25 Mar 2015 10:59:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503251059.t2PAxhdm000685@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 25 Mar 2015 10:59:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280558 - in head/sys/arm: broadcom/bcm2835 conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 10:59:46 -0000 Author: andrew Date: Wed Mar 25 10:59:42 2015 New Revision: 280558 URL: https://svnweb.freebsd.org/changeset/base/280558 Log: Add support for the Raspberry Pi 2. As the chip is based on the bcm2835 in the Raspberry Pi B we support most of the devices are already supported, however the base address has changed. A few items are not working, or missing. The main ones are: * DMA doesn't work in the sdhci driver. * Enabling vchiq halts the boot, may be interrupt related. * There is no U-Boot port yet so the DTB is embedded in the kernel. The last point will make it difficult to boot FreeBSD, however there is support for the Raspberry Pi 2 in the U-Boot git repo. As I have not tested this it is left as an open task to create a port to build. X-MFC: When the above issues are fixed Sponsored by: ABT Systems Ltd Added: head/sys/arm/broadcom/bcm2835/bcm2836.c (contents, props changed) head/sys/arm/broadcom/bcm2835/bcm2836.h (contents, props changed) head/sys/arm/broadcom/bcm2835/files.bcm2836 (contents, props changed) head/sys/arm/broadcom/bcm2835/std.bcm2836 (contents, props changed) head/sys/arm/conf/RPI2 - copied, changed from r280125, head/sys/arm/conf/RPI-B Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_intr.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Wed Mar 25 10:59:24 2015 (r280557) +++ head/sys/arm/broadcom/bcm2835/bcm2835_intr.c Wed Mar 25 10:59:42 2015 (r280558) @@ -45,6 +45,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef SOC_BCM2836 +#include +#endif + #define INTC_PENDING_BASIC 0x00 #define INTC_PENDING_BANK1 0x04 #define INTC_PENDING_BANK2 0x08 @@ -61,10 +65,12 @@ __FBSDID("$FreeBSD$"); #define BANK2_START (BANK1_START + 32) #define BANK2_END (BANK2_START + 32 - 1) #define BANK3_START (BANK2_START + 32) +#define BANK3_END (BANK3_START + 32 - 1) #define IS_IRQ_BASIC(n) (((n) >= 0) && ((n) < BANK1_START)) #define IS_IRQ_BANK1(n) (((n) >= BANK1_START) && ((n) <= BANK1_END)) #define IS_IRQ_BANK2(n) (((n) >= BANK2_START) && ((n) <= BANK2_END)) +#define ID_IRQ_BCM2836(n) (((n) >= BANK3_START) && ((n) <= BANK3_END)) #define IRQ_BANK1(n) ((n) - BANK1_START) #define IRQ_BANK2(n) ((n) - BANK2_START) @@ -148,11 +154,19 @@ arm_get_next_irq(int last_irq) struct bcm_intc_softc *sc = bcm_intc_sc; uint32_t pending; int32_t irq = last_irq + 1; +#ifdef SOC_BCM2836 + int ret; +#endif /* Sanity check */ if (irq < 0) irq = 0; +#ifdef SOC_BCM2836 + if ((ret = bcm2836_get_next_irq(irq)) >= 0) + return (ret + BANK3_START); +#endif + /* TODO: should we mask last_irq? */ if (irq < BANK1_START) { pending = intc_read_4(sc, INTC_PENDING_BASIC); @@ -197,6 +211,10 @@ arm_mask_irq(uintptr_t nb) intc_write_4(sc, INTC_DISABLE_BANK1, (1 << IRQ_BANK1(nb))); else if (IS_IRQ_BANK2(nb)) intc_write_4(sc, INTC_DISABLE_BANK2, (1 << IRQ_BANK2(nb))); +#ifdef SOC_BCM2836 + else if (ID_IRQ_BCM2836(nb)) + bcm2836_mask_irq(nb - BANK3_START); +#endif else printf("arm_mask_irq: Invalid IRQ number: %d\n", nb); } @@ -213,6 +231,10 @@ arm_unmask_irq(uintptr_t nb) intc_write_4(sc, INTC_ENABLE_BANK1, (1 << IRQ_BANK1(nb))); else if (IS_IRQ_BANK2(nb)) intc_write_4(sc, INTC_ENABLE_BANK2, (1 << IRQ_BANK2(nb))); +#ifdef SOC_BCM2836 + else if (ID_IRQ_BCM2836(nb)) + bcm2836_unmask_irq(nb - BANK3_START); +#endif else printf("arm_mask_irq: Invalid IRQ number: %d\n", nb); } Modified: head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Wed Mar 25 10:59:24 2015 (r280557) +++ head/sys/arm/broadcom/bcm2835/bcm2835_machdep.c Wed Mar 25 10:59:42 2015 (r280558) @@ -88,6 +88,7 @@ bcm2835_late_init(platform_t plat) } } +#ifdef SOC_BCM2835 /* * Set up static device mappings. * All on-chip peripherals exist in a 16MB range starting at 0x20000000. @@ -100,6 +101,17 @@ bcm2835_devmap_init(platform_t plat) arm_devmap_add_entry(0x20000000, 0x01000000); return (0); } +#endif + +#ifdef SOC_BCM2836 +static int +bcm2836_devmap_init(platform_t plat) +{ + + arm_devmap_add_entry(0x3f000000, 0x01000000); + return (0); +} +#endif struct arm32_dma_range * bus_dma_get_range(void) @@ -121,6 +133,8 @@ cpu_reset() bcmwd_watchdog_reset(); while (1); } + +#ifdef SOC_BCM2835 static platform_method_t bcm2835_methods[] = { PLATFORMMETHOD(platform_devmap_init, bcm2835_devmap_init), PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr), @@ -128,6 +142,16 @@ static platform_method_t bcm2835_methods PLATFORMMETHOD_END, }; - FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b"); +#endif + +#ifdef SOC_BCM2836 +static platform_method_t bcm2836_methods[] = { + PLATFORMMETHOD(platform_devmap_init, bcm2836_devmap_init), + PLATFORMMETHOD(platform_lastaddr, bcm2835_lastaddr), + PLATFORMMETHOD(platform_late_init, bcm2835_late_init), + PLATFORMMETHOD_END, +}; +FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709"); +#endif Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Mar 25 10:59:24 2015 (r280557) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Mar 25 10:59:42 2015 (r280558) @@ -68,8 +68,16 @@ __FBSDID("$FreeBSD$"); #define dprintf(fmt, args...) #endif +/* DMA doesn't yet work with the bcm3826 */ +#ifdef SOC_BCM2836 +#define PIO_MODE 1 +#else +#define PIO_MODE 0 +#error +#endif + static int bcm2835_sdhci_hs = 1; -static int bcm2835_sdhci_pio_mode = 0; +static int bcm2835_sdhci_pio_mode = PIO_MODE; TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); Added: head/sys/arm/broadcom/bcm2835/bcm2836.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2836.c Wed Mar 25 10:59:42 2015 (r280558) @@ -0,0 +1,184 @@ +/* + * Copyright 2015 Andrew Turner. + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include + +#define ARM_LOCAL_BASE 0x40000000 +#define ARM_LOCAL_SIZE 0x00001000 + +#define ARM_LOCAL_CONTROL 0x00 +#define ARM_LOCAL_PRESCALER 0x08 +#define PRESCALER_19_2 0x80000000 /* 19.2 MHz */ +#define ARM_LOCAL_INT_TIMER(n) (0x40 + (n) * 4) +#define ARM_LOCAL_INT_MAILBOX(n) (0x50 + (n) * 4) +#define ARM_LOCAL_INT_PENDING(n) (0x60 + (n) * 4) +#define INT_PENDING_MASK 0x0f + +/* + * A driver for features of the bcm2836. + */ + +struct bcm2836_softc { + device_t sc_dev; + struct resource *sc_mem; +}; + +static device_identify_t bcm2836_identify; +static device_probe_t bcm2836_probe; +static device_attach_t bcm2836_attach; + +struct bcm2836_softc *softc; + +static void +bcm2836_identify(driver_t *driver, device_t parent) +{ + + if (BUS_ADD_CHILD(parent, 0, "bcm2836", -1) == NULL) + device_printf(parent, "add child failed\n"); +} + +static int +bcm2836_probe(device_t dev) +{ + + if (softc != NULL) + return (ENXIO); + + device_set_desc(dev, "Broadcom bcm2836"); + + return (BUS_PROBE_DEFAULT); +} + +static int +bcm2836_attach(device_t dev) +{ + int i, rid; + + softc = device_get_softc(dev); + softc->sc_dev = dev; + + rid = 0; + softc->sc_mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, + ARM_LOCAL_BASE, ARM_LOCAL_BASE + ARM_LOCAL_SIZE, ARM_LOCAL_SIZE, + RF_ACTIVE); + if (softc->sc_mem == NULL) { + device_printf(dev, "could not allocate memory resource\n"); + return (ENXIO); + } + + bus_write_4(softc->sc_mem, ARM_LOCAL_CONTROL, 0); + bus_write_4(softc->sc_mem, ARM_LOCAL_PRESCALER, PRESCALER_19_2); + + for (i = 0; i < 4; i++) + bus_write_4(softc->sc_mem, ARM_LOCAL_INT_TIMER(i), 0); + + for (i = 0; i < 4; i++) + bus_write_4(softc->sc_mem, ARM_LOCAL_INT_MAILBOX(i), 1); + + return (0); +} + +int +bcm2836_get_next_irq(int last_irq) +{ + uint32_t reg; + int cpu; + int irq; + + cpu = PCPU_GET(cpuid); + + reg = bus_read_4(softc->sc_mem, ARM_LOCAL_INT_PENDING(cpu)); + reg &= INT_PENDING_MASK; + if (reg == 0) + return (-1); + + irq = ffs(reg) - 1; + + return (irq); +} + +void +bcm2836_mask_irq(uintptr_t irq) +{ + uint32_t reg; + int i; + + for (i = 0; i < 4; i++) { + reg = bus_read_4(softc->sc_mem, ARM_LOCAL_INT_TIMER(i)); + reg &= ~(1 << irq); + bus_write_4(softc->sc_mem, ARM_LOCAL_INT_TIMER(i), reg); + } +} + +void +bcm2836_unmask_irq(uintptr_t irq) +{ + uint32_t reg; + int i; + + for (i = 0; i < 4; i++) { + reg = bus_read_4(softc->sc_mem, ARM_LOCAL_INT_TIMER(i)); + reg |= (1 << irq); + bus_write_4(softc->sc_mem, ARM_LOCAL_INT_TIMER(i), reg); + } +} + +static device_method_t bcm2836_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, bcm2836_identify), + DEVMETHOD(device_probe, bcm2836_probe), + DEVMETHOD(device_attach, bcm2836_attach), + + DEVMETHOD_END +}; + +static devclass_t bcm2836_devclass; + +static driver_t bcm2836_driver = { + "bcm2836", + bcm2836_methods, + sizeof(struct bcm2836_softc), +}; + +EARLY_DRIVER_MODULE(bcm2836, nexus, bcm2836_driver, bcm2836_devclass, 0, 0, + BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); Added: head/sys/arm/broadcom/bcm2835/bcm2836.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/bcm2836.h Wed Mar 25 10:59:42 2015 (r280558) @@ -0,0 +1,37 @@ +/* + * Copyright 2015 Andrew Turner. + * 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$ + */ + +#ifndef _BCM2815_BCM2836_H +#define _BCM2815_BCM2836_H + +int bcm2836_get_next_irq(int); +void bcm2836_mask_irq(uintptr_t); +void bcm2836_unmask_irq(uintptr_t); + +#endif Added: head/sys/arm/broadcom/bcm2835/files.bcm2836 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/files.bcm2836 Wed Mar 25 10:59:42 2015 (r280558) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +arm/arm/cpufunc_asm_armv7.S standard +arm/arm/generic_timer.c standard + +arm/broadcom/bcm2835/bcm2836.c standard Added: head/sys/arm/broadcom/bcm2835/std.bcm2836 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/broadcom/bcm2835/std.bcm2836 Wed Mar 25 10:59:42 2015 (r280558) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +machine arm armv6 +cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a" +options SOC_BCM2836 + +files "../broadcom/bcm2835/files.bcm2836" +files "../broadcom/bcm2835/files.bcm283x" + Copied and modified: head/sys/arm/conf/RPI2 (from r280125, head/sys/arm/conf/RPI-B) ============================================================================== --- head/sys/arm/conf/RPI-B Sun Mar 15 21:57:44 2015 (r280125, copy source) +++ head/sys/arm/conf/RPI2 Wed Mar 25 10:59:42 2015 (r280558) @@ -21,6 +21,7 @@ ident RPI-B include "../broadcom/bcm2835/std.rpi" +include "../broadcom/bcm2835/std.bcm2836" options HZ=100 options SCHED_4BSD # 4BSD scheduler @@ -80,7 +81,7 @@ options INVARIANT_SUPPORT # Extra sanit #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 -#options ROOTDEVNAME=\"ufs:mmcsd0s2\" +options ROOTDEVNAME=\"ufs:mmcsd0s2\" device bpf device loop @@ -129,13 +130,13 @@ device smsc device spibus device bcm2835_spi -device vchiq -device sound +#device vchiq +#device sound # Flattened Device Tree options FDT # Configure using FDT/DTB data # Note: DTB is normally loaded and modified by RPi boot loader, then # handed to kernel via U-Boot and ubldr. -#options FDT_DTB_STATIC -#makeoptions FDT_DTS_FILE=rpi.dts +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=rpi2.dts makeoptions MODULES_EXTRA=dtb/rpi From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:00:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5499AE4B; Wed, 25 Mar 2015 11:00:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E477CA6; Wed, 25 Mar 2015 11:00:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB0A6A001027; Wed, 25 Mar 2015 11:00:10 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB0AfG001026; Wed, 25 Mar 2015 11:00:10 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251100.t2PB0AfG001026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:00:10 +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: r280559 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:00:10 -0000 Author: arybchik Date: Wed Mar 25 11:00:09 2015 New Revision: 280559 URL: https://svnweb.freebsd.org/changeset/base/280559 Log: MFC: 279095 sfxge: never set RX_DESCQ_EN during self-test We must not enable RX queues with random parameters when they are mapped into a VF with an untrusted driver. It's probably not a good idea to do this anyway, so take this bit out of the table test masks. Submitted by: Ben Hutchings Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/siena_nic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 10:59:42 2015 (r280558) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 11:00:09 2015 (r280559) @@ -903,7 +903,7 @@ static efx_register_set_t __cs __siena_t static const uint32_t __cs __siena_table_masks[] = { 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x000003FF, 0xFFFF0FFF, 0xFFFFFFFF, 0x00000E7F, 0x00000000, - 0xFFFFFFFF, 0x0FFFFFFF, 0x01800000, 0x00000000, + 0xFFFFFFFE, 0x0FFFFFFF, 0x01800000, 0x00000000, 0xFFFFFFFE, 0x0FFFFFFF, 0x0C000000, 0x00000000, 0x3FFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x000013FF, From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:01:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E4C0F97; Wed, 25 Mar 2015 11:01:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28223D48; Wed, 25 Mar 2015 11:01:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB14xv002285; Wed, 25 Mar 2015 11:01:04 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB14HT002284; Wed, 25 Mar 2015 11:01:04 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251101.t2PB14HT002284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:01:04 +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: r280560 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:01:04 -0000 Author: arybchik Date: Wed Mar 25 11:01:03 2015 New Revision: 280560 URL: https://svnweb.freebsd.org/changeset/base/280560 Log: MFC: 279096 sfxge: keep fw and driver view of autoneg parameters consistent Previously the driver's view was the expected outcome of any reconfiguration even if that reconfiguration failed. Submitted by: Ben Horgan Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_phy.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_phy.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_phy.c Wed Mar 25 11:00:09 2015 (r280559) +++ stable/10/sys/dev/sfxge/common/efx_phy.c Wed Mar 25 11:01:03 2015 (r280560) @@ -427,6 +427,7 @@ efx_phy_adv_cap_set( { efx_port_t *epp = &(enp->en_port); efx_phy_ops_t *epop = epp->ep_epop; + uint32_t old_mask; int rc; EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); @@ -440,6 +441,7 @@ efx_phy_adv_cap_set( if (epp->ep_adv_cap_mask == mask) goto done; + old_mask = epp->ep_adv_cap_mask; epp->ep_adv_cap_mask = mask; if ((rc = epop->epo_reconfigure(enp)) != 0) @@ -450,6 +452,17 @@ done: fail2: EFSYS_PROBE(fail2); + + epp->ep_adv_cap_mask = old_mask; + /* Reconfigure for robustness */ + if (epop->epo_reconfigure(enp) != 0) { + /* + * We may have an inconsistent view of our advertised speed + * capabilities. + */ + EFSYS_ASSERT(0); + } + fail1: EFSYS_PROBE1(fail1, int, rc); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:01:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9481B19A; Wed, 25 Mar 2015 11:01:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65B4ED5D; Wed, 25 Mar 2015 11:01:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB1xeW004763; Wed, 25 Mar 2015 11:01:59 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB1xX7004762; Wed, 25 Mar 2015 11:01:59 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251101.t2PB1xX7004762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:01: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: r280561 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:01:59 -0000 Author: arybchik Date: Wed Mar 25 11:01:58 2015 New Revision: 280561 URL: https://svnweb.freebsd.org/changeset/base/280561 Log: MFC: 279097 sfxge: check allocations are non-NULL before freeing them Caught when efx_filter_init() failed and called efx_filter_fini() in the teardown path. Submitted by: Andrew Lee Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_filter.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_filter.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_filter.c Wed Mar 25 11:01:03 2015 (r280560) +++ stable/10/sys/dev/sfxge/common/efx_filter.c Wed Mar 25 11:01:58 2015 (r280561) @@ -721,7 +721,7 @@ efx_filter_init( eftp->eft_spec); if (!eftp->eft_spec) { rc = ENOMEM; - goto fail2; + goto fail3; } memset(eftp->eft_spec, 0, eftp->eft_size * sizeof(*eftp->eft_spec)); } @@ -729,6 +729,9 @@ efx_filter_init( return (0); +fail3: + EFSYS_PROBE(fail3); + fail2: EFSYS_PROBE(fail2); efx_filter_fini(enp); @@ -755,12 +758,17 @@ efx_filter_fini( EFX_STATIC_ASSERT(sizeof(eftp->eft_bitmap[0]) == sizeof(uint32_t)); bitmap_size = (eftp->eft_size + (sizeof(uint32_t) * 8) - 1) / 8; - EFSYS_KMEM_FREE(enp->en_esip, bitmap_size, eftp->eft_bitmap); - eftp->eft_bitmap = NULL; + if (eftp->eft_bitmap != NULL) { + EFSYS_KMEM_FREE(enp->en_esip, bitmap_size, + eftp->eft_bitmap); + eftp->eft_bitmap = NULL; + } - EFSYS_KMEM_FREE(enp->en_esip, eftp->eft_size * sizeof(*eftp->eft_spec), - eftp->eft_spec); - eftp->eft_spec = NULL; + if (eftp->eft_spec != NULL) { + EFSYS_KMEM_FREE(enp->en_esip, eftp->eft_size * + sizeof(*eftp->eft_spec), eftp->eft_spec); + eftp->eft_spec = NULL; + } } enp->en_mod_flags &= ~EFX_MOD_FILTER; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:04:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81B4B41F; Wed, 25 Mar 2015 11:04:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6310ED81; Wed, 25 Mar 2015 11:04:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB4EYm005230; Wed, 25 Mar 2015 11:04:14 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB4Dtl005220; Wed, 25 Mar 2015 11:04:13 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251104.t2PB4Dtl005220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:04: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: r280562 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:04:14 -0000 Author: arybchik Date: Wed Mar 25 11:04:12 2015 New Revision: 280562 URL: https://svnweb.freebsd.org/changeset/base/280562 Log: MFC: 279098 sfxge: allow TX and RX queue limits to be changed Before the common code had hard coded limits on the IDs RXQs and TXQs could be created with which were suited for the Windows driver with VMQ, and so would prevent queues with IDs greater than or equal to 259 (for TXQs) or 768 (for RXQs) from being created. This change allows the limits to be set in efsys.h, so that all 1024 queues can be created during new manftest tests. Also, the descriptor cache sizes were also hard coded to values suited to the smaller queue counts, and so it was necessary to make them configurable as well. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_impl.h stable/10/sys/dev/sfxge/common/siena_nic.c stable/10/sys/dev/sfxge/common/siena_sram.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 11:01:58 2015 (r280561) +++ stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 11:04:12 2015 (r280562) @@ -1622,6 +1622,7 @@ efx_rx_scale_toeplitz_ipv6_key_set( #define EFX_RXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) #define EFX_RXQ_NBUFS(_ndescs) (EFX_RXQ_SIZE(_ndescs) / EFX_BUF_SIZE) #define EFX_RXQ_LIMIT(_ndescs) ((_ndescs) - 16) +#define EFX_RXQ_DC_NDESCS(_dcsize) (8 << _dcsize) typedef enum efx_rxq_type_e { EFX_RXQ_TYPE_DEFAULT, @@ -1708,6 +1709,7 @@ efx_tx_fini( #define EFX_TXQ_SIZE(_ndescs) ((_ndescs) * sizeof (efx_qword_t)) #define EFX_TXQ_NBUFS(_ndescs) (EFX_TXQ_SIZE(_ndescs) / EFX_BUF_SIZE) #define EFX_TXQ_LIMIT(_ndescs) ((_ndescs) - 16) +#define EFX_TXQ_DC_NDESCS(_dcsize) (8 << _dcsize) extern __checkReturn int efx_tx_qcreate( Modified: stable/10/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 11:01:58 2015 (r280561) +++ stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 11:04:12 2015 (r280562) @@ -200,8 +200,18 @@ typedef struct efx_nic_ops_s { void (*eno_unprobe)(efx_nic_t *); } efx_nic_ops_t; -#define EFX_TXQ_LIMIT_TARGET 259 -#define EFX_RXQ_LIMIT_TARGET 768 +#ifndef EFX_TXQ_LIMIT_TARGET +# define EFX_TXQ_LIMIT_TARGET 259 +#endif +#ifndef EFX_RXQ_LIMIT_TARGET +# define EFX_RXQ_LIMIT_TARGET 768 +#endif +#ifndef EFX_TXQ_DC_SIZE +#define EFX_TXQ_DC_SIZE 1 /* 16 descriptors */ +#endif +#ifndef EFX_RXQ_DC_SIZE +#define EFX_RXQ_DC_SIZE 3 /* 64 descriptors */ +#endif #if EFSYS_OPT_FILTER Modified: stable/10/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 11:01:58 2015 (r280561) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 11:04:12 2015 (r280562) @@ -365,7 +365,8 @@ siena_board_cfg( } encp->enc_buftbl_limit = SIENA_SRAM_ROWS - - (encp->enc_txq_limit * 16) - (encp->enc_rxq_limit * 64); + (encp->enc_txq_limit * EFX_TXQ_DC_NDESCS(EFX_TXQ_DC_SIZE)) - + (encp->enc_rxq_limit * EFX_RXQ_DC_NDESCS(EFX_RXQ_DC_SIZE)); return (0); Modified: stable/10/sys/dev/sfxge/common/siena_sram.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_sram.c Wed Mar 25 11:01:58 2015 (r280561) +++ stable/10/sys/dev/sfxge/common/siena_sram.c Wed Mar 25 11:04:12 2015 (r280562) @@ -44,20 +44,21 @@ siena_sram_init( EFSYS_ASSERT(enp->en_family == EFX_FAMILY_SIENA); rx_base = encp->enc_buftbl_limit; - tx_base = rx_base + (encp->enc_rxq_limit * 64); + tx_base = rx_base + (encp->enc_rxq_limit * + EFX_RXQ_DC_NDESCS(EFX_RXQ_DC_SIZE)); /* Initialize the transmit descriptor cache */ EFX_POPULATE_OWORD_1(oword, FRF_AZ_SRM_TX_DC_BASE_ADR, tx_base); EFX_BAR_WRITEO(enp, FR_AZ_SRM_TX_DC_CFG_REG, &oword); - EFX_POPULATE_OWORD_1(oword, FRF_AZ_TX_DC_SIZE, 1); /* 16 descriptors */ + EFX_POPULATE_OWORD_1(oword, FRF_AZ_TX_DC_SIZE, EFX_TXQ_DC_SIZE); EFX_BAR_WRITEO(enp, FR_AZ_TX_DC_CFG_REG, &oword); /* Initialize the receive descriptor cache */ EFX_POPULATE_OWORD_1(oword, FRF_AZ_SRM_RX_DC_BASE_ADR, rx_base); EFX_BAR_WRITEO(enp, FR_AZ_SRM_RX_DC_CFG_REG, &oword); - EFX_POPULATE_OWORD_1(oword, FRF_AZ_RX_DC_SIZE, 3); /* 64 descriptors */ + EFX_POPULATE_OWORD_1(oword, FRF_AZ_RX_DC_SIZE, EFX_RXQ_DC_SIZE); EFX_BAR_WRITEO(enp, FR_AZ_RX_DC_CFG_REG, &oword); /* Set receive descriptor pre-fetch low water mark */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:06:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E4B22567; Wed, 25 Mar 2015 11:06:09 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (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 A2569D91; Wed, 25 Mar 2015 11:06:08 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B3C3E1FE022; Wed, 25 Mar 2015 12:05:59 +0100 (CET) Message-ID: <551296C6.9070402@selasky.org> Date: Wed, 25 Mar 2015 12:06:46 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280495 - head/sys/kern References: <201503250855.t2P8tZFp038467@svn.freebsd.org> <20150325105409.GS64665@FreeBSD.org> In-Reply-To: <20150325105409.GS64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:06:10 -0000 On 03/25/15 11:54, Gleb Smirnoff wrote: > On Wed, Mar 25, 2015 at 08:55:35AM +0000, Hans Petter Selasky wrote: > H> Author: hselasky > H> Date: Wed Mar 25 08:55:34 2015 > H> New Revision: 280495 > H> URL: https://svnweb.freebsd.org/changeset/base/280495 > H> > H> Log: > H> Implement a simple OID number garbage collector. Given the increasing > H> number of dynamically created and destroyed SYSCTLs during runtime it > H> is very likely that the current new OID number limit of 0x7fffffff can > H> be reached. Especially if dynamic OID creation and destruction results > H> from automatic tests. Additional changes: > H> > H> - Optimize the typical use case by decrementing the next automatic OID > H> sequence number instead of incrementing it. This saves searching time > H> when inserting new OIDs into a fresh parent OID node. > H> > H> - Add simple check for duplicate non-automatic OID numbers. > > Why didn't you use alloc_unr(9) for that? > Hi Gleb, I thought about using alloc_unr(). The problem is that sysctls have no clear concept of freeing. For example in some existing code sysctl are unregistered and registered again assuming that the oid_number will be preserved. I didn't want touch those parts. Also, hence we are already traversing a list to insert an SYSCTL object in an ordered fashion, the benefit of alloc_unr() is not that big. What do you think? --HPS From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:06:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8B516A7; Wed, 25 Mar 2015 11:06:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 893DFD96; Wed, 25 Mar 2015 11:06:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB6KLc005572; Wed, 25 Mar 2015 11:06:20 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB6HXJ005562; Wed, 25 Mar 2015 11:06:17 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251106.t2PB6HXJ005562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:06:17 +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: r280563 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:06:20 -0000 Author: arybchik Date: Wed Mar 25 11:06:16 2015 New Revision: 280563 URL: https://svnweb.freebsd.org/changeset/base/280563 Log: MFC: 279141 sfxge: style fixes and cleanup Sync endif comment with conditional. BOOTROM and SIENA_BOOTROM are the same, but highlight that it is Siena. Restore commented out assertion. Sync comments with out-of-tree driver. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_filter.c stable/10/sys/dev/sfxge/common/efx_mcdi.c stable/10/sys/dev/sfxge/common/efx_nic.c stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/common/siena_mac.c stable/10/sys/dev/sfxge/common/siena_nic.c stable/10/sys/dev/sfxge/common/siena_nvram.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 11:06:16 2015 (r280563) @@ -654,7 +654,7 @@ out: return (should_abort); } -#endif /* EFSYS_OPT_SIENA */ +#endif /* EFSYS_OPT_MCDI */ __checkReturn int efx_ev_qprime( @@ -970,7 +970,7 @@ efx_ev_qcreate( eep->ee_handler[FSE_AZ_EV_CODE_DRV_GEN_EV] = efx_ev_drv_gen; #if EFSYS_OPT_MCDI eep->ee_handler[FSE_AZ_EV_CODE_MCDI_EVRESPONSE] = efx_ev_mcdi; -#endif /* EFSYS_OPT_SIENA */ +#endif /* EFSYS_OPT_MCDI */ /* Set up the new event queue */ if (enp->en_family != EFX_FAMILY_FALCON) { Modified: stable/10/sys/dev/sfxge/common/efx_filter.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_filter.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/efx_filter.c Wed Mar 25 11:06:16 2015 (r280563) @@ -412,7 +412,7 @@ efx_filter_search( __in uint32_t key, __in boolean_t for_insert, __out int *filter_index, - __out int *depth_required) + __out unsigned int *depth_required) { unsigned hash, incr, filter_idx, depth; @@ -528,7 +528,8 @@ efx_filter_remove_filter( efx_filter_tbl_t *eftp = &efp->ef_tbl[tbl_id]; efx_filter_spec_t *saved_spec; efx_oword_t filter; - int filter_idx, depth; + int filter_idx; + unsigned int depth; int state; uint32_t key; int rc; @@ -561,7 +562,7 @@ efx_filter_remove_index( __in int index) { efx_filter_t *efp = &enp->en_filter; - enum efx_filter_tbl_id tbl_id = efx_filter_tbl_id(type); + efx_filter_tbl_id_t tbl_id = efx_filter_tbl_id(type); efx_filter_tbl_t *eftp = &efp->ef_tbl[tbl_id]; int state; Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 11:06:16 2015 (r280563) @@ -532,7 +532,7 @@ efx_mcdi_version( version: /* The bootrom doesn't understand BOOT_STATUS */ - if (build == MC_CMD_GET_VERSION_OUT_FIRMWARE_BOOTROM) { + if (build == MC_CMD_GET_VERSION_OUT_FIRMWARE_SIENA_BOOTROM) { status = EFX_MCDI_BOOT_ROM; goto out; } Modified: stable/10/sys/dev/sfxge/common/efx_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_nic.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/efx_nic.c Wed Mar 25 11:06:16 2015 (r280563) @@ -249,10 +249,13 @@ efx_nic_create( #if EFSYS_OPT_SIENA case EFX_FAMILY_SIENA: enp->en_enop = (efx_nic_ops_t *)&__efx_nic_siena_ops; - enp->en_features = EFX_FEATURE_IPV6 | + enp->en_features = + EFX_FEATURE_IPV6 | EFX_FEATURE_LFSR_HASH_INSERT | - EFX_FEATURE_LINK_EVENTS | EFX_FEATURE_PERIODIC_MAC_STATS | - EFX_FEATURE_WOL | EFX_FEATURE_MCDI | + EFX_FEATURE_LINK_EVENTS | + EFX_FEATURE_PERIODIC_MAC_STATS | + EFX_FEATURE_WOL | + EFX_FEATURE_MCDI | EFX_FEATURE_LOOKAHEAD_SPLIT | EFX_FEATURE_MAC_HEADER_FILTERS; break; Modified: stable/10/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 11:06:16 2015 (r280563) @@ -289,8 +289,9 @@ efx_tx_qcreate( EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC); EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_TX); - EFX_STATIC_ASSERT(EFX_EV_TX_NLABELS == (1 << FRF_AZ_TX_DESCQ_LABEL_WIDTH)); - /* EFSYS_ASSERT3U(label, <, EFX_EV_TX_NLABELS);*/ + EFX_STATIC_ASSERT(EFX_EV_TX_NLABELS == + (1 << FRF_AZ_TX_DESCQ_LABEL_WIDTH)); + EFSYS_ASSERT3U(label, <, EFX_EV_TX_NLABELS); EFSYS_ASSERT3U(enp->en_tx_qcount + 1, <, encp->enc_txq_limit); if (!ISP2(n) || !(n & EFX_TXQ_NDESCS_MASK)) { Modified: stable/10/sys/dev/sfxge/common/siena_mac.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_mac.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/siena_mac.c Wed Mar 25 11:06:16 2015 (r280563) @@ -534,6 +534,7 @@ siena_mac_stats_update( &generation_start); /* Check that we didn't read the stats in the middle of a DMA */ + /* Not a good enough check ? */ if (memcmp(&generation_start, &generation_end, sizeof (generation_start))) return (EAGAIN); Modified: stable/10/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 11:06:16 2015 (r280563) @@ -478,7 +478,7 @@ siena_phy_cfg( if (MCDI_OUT_DWORD_FIELD(req, GET_PHY_CFG_OUT_FLAGS, GET_PHY_CFG_OUT_BIST)) encp->enc_bist_mask |= (1 << EFX_PHY_BIST_TYPE_NORMAL); -#endif /* EFSYS_OPT_BIST */ +#endif /* EFSYS_OPT_PHY_BIST */ return (0); Modified: stable/10/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nvram.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/common/siena_nvram.c Wed Mar 25 11:06:16 2015 (r280563) @@ -612,7 +612,7 @@ siena_nvram_get_subtype( if (req.emr_out_length_used < MC_CMD_GET_BOARD_CFG_OUT_FW_SUBTYPE_LIST_OFST + - (partn + 1) * sizeof(efx_word_t)) { + (partn + 1) * sizeof (efx_word_t)) { rc = ENOENT; goto fail3; } Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 11:04:12 2015 (r280562) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 11:06:16 2015 (r280563) @@ -505,7 +505,7 @@ sfxge_tx_qdpl_service(struct sfxge_txq * * list", otherwise we atomically push it on the "put list". The swizzle * function takes care of ordering. * - * The length of the put list is bounded by SFXGE_TX_MAX_DEFFERED. We + * The length of the put list is bounded by SFXGE_TX_MAX_DEFERRED. We * overload the csum_data field in the mbuf to keep track of this length * because there is no cheap alternative to avoid races. */ @@ -569,7 +569,7 @@ sfxge_tx_qdpl_put(struct sfxge_txq *txq, /* * Called from if_transmit - will try to grab the txq lock and enqueue to the - * put list if it succeeds, otherwise will push onto the defer list. + * put list if it succeeds, otherwise try to push onto the defer list if space. */ int sfxge_tx_packet_add(struct sfxge_txq *txq, struct mbuf *m) From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:07:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAB817F6; Wed, 25 Mar 2015 11:07:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4B72DAE; Wed, 25 Mar 2015 11:07:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB7BBe005735; Wed, 25 Mar 2015 11:07:11 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB7BvN005734; Wed, 25 Mar 2015 11:07:11 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251107.t2PB7BvN005734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:07:11 +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: r280564 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:07:11 -0000 Author: arybchik Date: Wed Mar 25 11:07:10 2015 New Revision: 280564 URL: https://svnweb.freebsd.org/changeset/base/280564 Log: MFC: 279142 sfxge: synchronize EF10 registers header Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_regs_ef10.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_regs_ef10.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_regs_ef10.h Wed Mar 25 11:06:16 2015 (r280563) +++ stable/10/sys/dev/sfxge/common/efx_regs_ef10.h Wed Mar 25 11:07:10 2015 (r280564) @@ -1732,8 +1732,8 @@ extern "C" { #define ESF_DZ_RX_U_QST1_SPARE_WIDTH 12 #define ESF_DZ_RX_U_SOFT16_B0R3_0_LBN 48 #define ESF_DZ_RX_U_SOFT16_B0R3_0_WIDTH 16 -#define ESF_DZ_RX_U_PKT_EDIT_LBN 51 -#define ESF_DZ_RX_U_PKT_EDIT_WIDTH 1 +#define ESF_DZ_RX_U_TIMESTAMP_LBN 51 +#define ESF_DZ_RX_U_TIMESTAMP_WIDTH 1 #define ESF_DZ_RX_U_DOORBELL_ENABLED_LBN 50 #define ESF_DZ_RX_U_DOORBELL_ENABLED_WIDTH 1 #define ESF_DZ_RX_U_WORK_PENDING_LBN 49 @@ -2677,6 +2677,138 @@ extern "C" { #define ESF_DZ_B2T_CPL_RSP_CPL_ADRS_WIDTH 7 + +/* Enum DPCPU_INSTR_BRTYPE */ +#define ESE_DZ_BNEZAL 19 +#define ESE_DZ_BEQZAL 18 +#define ESE_DZ_BGEZAL 17 +#define ESE_DZ_BLTZAL 16 +#define ESE_DZ_BNEZ 3 +#define ESE_DZ_BEQZ 2 +#define ESE_DZ_BGEZ 1 +#define ESE_DZ_BLTZ 0 + +/* Enum DPCPU_INSTR_FUNCT */ +#define ESE_DZ_MASKMOD 44 +#define ESE_DZ_SLTU 43 +#define ESE_DZ_SLT 42 +#define ESE_DZ_INCMOD 40 +#define ESE_DZ_NOR 39 +#define ESE_DZ_XOR 38 +#define ESE_DZ_OR 37 +#define ESE_DZ_AND 36 +#define ESE_DZ_SUBU 35 +#define ESE_DZ_SUB 34 +#define ESE_DZ_ADDU 33 +#define ESE_DZ_ADD 32 +#define ESE_DZ_MULT 25 +#define ESE_DZ_MFLO 18 +#define ESE_DZ_MFHI 16 +#define ESE_DZ_JALR 9 +#define ESE_DZ_JR 8 +#define ESE_DZ_SRAV 7 +#define ESE_DZ_SRLV 6 +#define ESE_DZ_SLLV 4 +#define ESE_DZ_SRA 3 +#define ESE_DZ_SRL 2 +#define ESE_DZ_SLL 0 + +/* Enum DPCPU_INSTR_OP */ +#define ESE_DZ_LM_MSG 49 +#define ESE_DZ_MSG 48 +#define ESE_DZ_SHA 43 +#define ESE_DZ_SBA 42 +#define ESE_DZ_SH 41 +#define ESE_DZ_SB 40 +#define ESE_DZ_LHUA 39 +#define ESE_DZ_LBUA 38 +#define ESE_DZ_LHU 37 +#define ESE_DZ_LBU 36 +#define ESE_DZ_LHA 35 +#define ESE_DZ_LBA 34 +#define ESE_DZ_LH 33 +#define ESE_DZ_LB 32 +#define ESE_DZ_BGTU 31 +#define ESE_DZ_BLEU 30 +#define ESE_DZ_MODI 28 +#define ESE_DZ_NEGU 27 +#define ESE_DZ_NEG 26 +#define ESE_DZ_LI 25 +#define ESE_DZ_INCMODI 24 +#define ESE_DZ_BGT 23 +#define ESE_DZ_BLE 22 +#define ESE_DZ_BBS 21 +#define ESE_DZ_BBC 20 +#define ESE_DZ_JAL_EVT 19 +#define ESE_DZ_J_EVT 18 +#define ESE_DZ_HALT 16 +#define ESE_DZ_NORI 15 +#define ESE_DZ_XORI 14 +#define ESE_DZ_ORI 13 +#define ESE_DZ_ANDI 12 +#define ESE_DZ_SLTIU 11 +#define ESE_DZ_SLTI 10 +#define ESE_DZ_ADDIU 9 +#define ESE_DZ_ADDI 8 +#define ESE_DZ_BGTZ 7 +#define ESE_DZ_BLEZ 6 +#define ESE_DZ_BNE 5 +#define ESE_DZ_BEQ 4 +#define ESE_DZ_JAL 3 +#define ESE_DZ_J 2 +#define ESE_DZ_BRANCH 1 +#define ESE_DZ_REG2REG 0 + +/* Enum DPCPU_MSG_DIR */ +#define ESE_DPCPU_MSG_DZ_OUTB 0x1 +#define ESE_DPCPU_MSG_DZ_INB 0x0 + +/* Enum DPCPU_PDBUS_OP */ +#define ESE_DPCPU_PDBUS_DZ_RD 0x1 +#define ESE_DPCPU_PDBUS_DZ_WR 0x0 + +/* Enum INI_OP */ +#define ESE_DZ_RD_COMPL 0x3 +#define ESE_DZ_NOP 0x2 +#define ESE_DZ_WR 0x1 +#define ESE_DZ_RD 0x0 + +/* Enum INT_OP */ +#define ESE_DZ_LEGACY 0x2 +#define ESE_DZ_MSI 0x1 +#define ESE_DZ_MSIX 0x0 + +/* Enum PKT_STRM_CTL */ +#define ESE_DZ_EOP_TRUNC 0x3 +#define ESE_DZ_EOP_CRC_ERR 0x2 +#define ESE_DZ_EOP 0x1 +#define ESE_DZ_NOOP 0x0 + +/* Enum PM_EPI_PKT_MARKER */ +#define ESE_DZ_PM_EPI_LST 0x3 +#define ESE_DZ_PM_EPI_OBL 0x2 +#define ESE_DZ_PM_EPI_TBL 0x1 +#define ESE_DZ_PM_EPI_MDL 0x0 + +/* Enum PM_IPI_TO_PM_MM_COMMAND */ +#define ESE_DZ_FREE_CHAIN 0x3 +#define ESE_DZ_FREE_BUFFER 0x2 +#define ESE_DZ_ADD_BUFFER 0x1 +#define ESE_DZ_PM_MM_NOOP 0x0 + +/* Enum PM_MA_TO_PM_EPI_COMMAND */ +#define ESE_DZ_FROM_PORT_D 0x4 +#define ESE_DZ_FROM_PORT_C 0x3 +#define ESE_DZ_FROM_PORT_B 0x2 +#define ESE_DZ_FROM_PORT_A 0x1 +#define ESE_DZ_PM_EPI_NOOP 0x0 + +/* Enum PM_MA_TO_PM_IPI_COMMAND */ +#define ESE_DZ_TO_PORT_D 0x4 +#define ESE_DZ_TO_PORT_C 0x3 +#define ESE_DZ_TO_PORT_B 0x2 +#define ESE_DZ_TO_PORT_A 0x1 +#define ESE_DZ_PM_IPI_NOOP 0x0 #ifdef __cplusplus } #endif From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:07:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70B7093A; Wed, 25 Mar 2015 11:07:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40801DBC; Wed, 25 Mar 2015 11:07:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB7vlA005880; Wed, 25 Mar 2015 11:07:57 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB7vR1005879; Wed, 25 Mar 2015 11:07:57 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251107.t2PB7vR1005879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:07: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: r280565 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:07:57 -0000 Author: arybchik Date: Wed Mar 25 11:07:56 2015 New Revision: 280565 URL: https://svnweb.freebsd.org/changeset/base/280565 Log: MFC: 279143 sfxge: use common definitions of MC shared memory offsets and PDU length Submitted by: Ben Hutchings Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 11:07:10 2015 (r280564) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 11:07:56 2015 (r280565) @@ -35,15 +35,6 @@ __FBSDID("$FreeBSD$"); #if EFSYS_OPT_MCDI -/* Shared memory layout */ - -#define MCDI_P1_DBL_OFST 0x0 -#define MCDI_P2_DBL_OFST 0x1 -#define MCDI_P1_PDU_OFST 0x2 -#define MCDI_P2_PDU_OFST 0x42 -#define MCDI_P1_REBOOT_OFST 0x1fe -#define MCDI_P2_REBOOT_OFST 0x1ff - /* * A reboot/assertion causes the MCDI status word to be set after the * command word is set or a REBOOT event is sent. If we notice a reboot @@ -72,12 +63,12 @@ efx_mcdi_request_start( switch (emip->emi_port) { case 1: - pdur = MCDI_P1_PDU_OFST; - dbr = MCDI_P1_DBL_OFST; + pdur = MC_SMEM_P0_PDU_OFST >> 2; + dbr = MC_SMEM_P0_DOORBELL_OFST >> 2; break; case 2: - pdur = MCDI_P2_PDU_OFST; - dbr = MCDI_P2_DBL_OFST; + pdur = MC_SMEM_P1_PDU_OFST >> 2; + dbr = MC_SMEM_P1_DOORBELL_OFST >> 2; break; default: EFSYS_ASSERT(0); @@ -140,7 +131,9 @@ efx_mcdi_request_copyout( unsigned int pdur; efx_dword_t data; - pdur = (emip->emi_port == 1) ? MCDI_P1_PDU_OFST : MCDI_P2_PDU_OFST; + pdur = (emip->emi_port == 1) + ? MC_SMEM_P0_PDU_OFST >> 2 + : MC_SMEM_P1_PDU_OFST >> 2; /* Copy payload out if caller supplied buffer */ if (emrp->emr_out_buf != NULL) { @@ -227,8 +220,8 @@ efx_mcdi_poll_reboot( EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2); rebootr = ((emip->emi_port == 1) - ? MCDI_P1_REBOOT_OFST - : MCDI_P2_REBOOT_OFST); + ? MC_SMEM_P0_STATUS_OFST >> 2 + : MC_SMEM_P1_STATUS_OFST >> 2); EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, rebootr, &dword, B_FALSE); value = EFX_DWORD_FIELD(dword, EFX_DWORD_0); @@ -281,7 +274,9 @@ efx_mcdi_request_poll( } EFSYS_ASSERT(emip->emi_port == 1 || emip->emi_port == 2); - pdur = (emip->emi_port == 1) ? MCDI_P1_PDU_OFST : MCDI_P2_PDU_OFST; + pdur = (emip->emi_port == 1) + ? MC_SMEM_P0_PDU_OFST >> 2 + : MC_SMEM_P1_PDU_OFST >> 2; /* Read the command header */ EFX_BAR_TBL_READD(enp, FR_CZ_MC_TREG_SMEM, pdur, &dword, B_FALSE); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:08:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1C57A87; Wed, 25 Mar 2015 11:08:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8BD71DCB; Wed, 25 Mar 2015 11:08:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB8gIO006038; Wed, 25 Mar 2015 11:08:42 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB8g7C006037; Wed, 25 Mar 2015 11:08:42 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251108.t2PB8g7C006037@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:08:42 +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: r280566 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:08:42 -0000 Author: arybchik Date: Wed Mar 25 11:08:41 2015 New Revision: 280566 URL: https://svnweb.freebsd.org/changeset/base/280566 Log: MFC: 279144 sfxge: packet can't require more than n_dma_seg descriptors plus one Use remaining number of DMA segment instead of maximum number in mapping when checking space for one more TSO segment packet. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 11:07:56 2015 (r280565) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 11:08:41 2015 (r280566) @@ -1103,8 +1103,8 @@ sfxge_tx_queue_tso(struct sfxge_txq *txq * the remainder of the input mbuf but do not * roll back the work we have done. */ - if (txq->n_pend_desc > - SFXGE_TSO_MAX_DESC - (1 + SFXGE_TX_MAPPING_MAX_SEG)) { + if (txq->n_pend_desc + 1 /* header */ + n_dma_seg > + SFXGE_TSO_MAX_DESC) { txq->tso_pdrop_too_many++; break; } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:09:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23321BD0; Wed, 25 Mar 2015 11:09:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D27EDDA; Wed, 25 Mar 2015 11:09:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PB9ZbP006211; Wed, 25 Mar 2015 11:09:35 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PB9Z6B006210; Wed, 25 Mar 2015 11:09:35 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251109.t2PB9Z6B006210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:09: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: r280567 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:09:36 -0000 Author: arybchik Date: Wed Mar 25 11:09:35 2015 New Revision: 280567 URL: https://svnweb.freebsd.org/changeset/base/280567 Log: MFC: 279145 sfxge: use macros to acquire and release BAR locks everywhere It was the result of invalid merge of the patch from out-of-tree driver. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 11:08:41 2015 (r280566) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 11:09:35 2015 (r280567) @@ -669,7 +669,7 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -681,7 +681,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eop)->eo_u64[0] = bus_space_read_8((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -696,7 +696,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -707,7 +707,7 @@ typedef struct efsys_bar_s { KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ ("not power of 2 aligned")); \ \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ (_eqp)->eq_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, (_offset)); \ @@ -762,7 +762,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - SFXGE_BAR_LOCK(_esbp); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \ uint32_t, (_edp)->ed_u32[0]); \ @@ -772,7 +772,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - SFXGE_BAR_UNLOCK(_esbp); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -792,7 +792,7 @@ typedef struct efsys_bar_s { bus_space_write_8((_esbp)->esb_tag, (_esbp)->esb_handle,\ (_offset), (_eqp)->eq_u64[0]); \ \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) #else @@ -802,7 +802,7 @@ typedef struct efsys_bar_s { KASSERT(IS_P2ALIGNED(_offset, sizeof (efx_qword_t)), \ ("not power of 2 aligned")); \ \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE3(bar_writeq, unsigned int, (_offset), \ uint32_t, (_eqp)->eq_u32[1], \ @@ -842,7 +842,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_unlock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) @@ -855,7 +855,7 @@ typedef struct efsys_bar_s { \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ - mtx_lock(&((_esbp)->esb_lock)); \ + SFXGE_BAR_LOCK(_esbp); \ \ EFSYS_PROBE5(bar_writeo, unsigned int, (_offset), \ uint32_t, (_eop)->eo_u32[3], \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:10:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AE48D27; Wed, 25 Mar 2015 11:10:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 054F9E80; Wed, 25 Mar 2015 11:10:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PBAugt009399; Wed, 25 Mar 2015 11:10:56 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PBAui7009398; Wed, 25 Mar 2015 11:10:56 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251110.t2PBAui7009398@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 11:10:56 +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: r280568 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:10:57 -0000 Author: arybchik Date: Wed Mar 25 11:10:56 2015 New Revision: 280568 URL: https://svnweb.freebsd.org/changeset/base/280568 Log: MFC: 279146 sfxge: use sparse index to retrieve sensor value Submitted by: Andrew Jackson Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/siena_mon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/siena_mon.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 11:09:35 2015 (r280567) +++ stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 11:10:56 2015 (r280568) @@ -105,6 +105,7 @@ siena_mon_decode_stats( uint16_t mc_sensor; size_t mc_sensor_max; uint32_t vmask = 0; + uint32_t idx = 0; /* Assert the MC_CMD_SENSOR and EFX_MON_STATE namespaces agree */ SIENA_STATIC_SENSOR_ASSERT(OK); @@ -125,18 +126,19 @@ siena_mon_decode_stats( for (mc_sensor = 0; mc_sensor < mc_sensor_max; ++mc_sensor) { uint16_t efx_sensor = sensor_map[mc_sensor]; - if (efx_sensor == SIENA_MON_WRONG_PORT) + if (~dmask & (1 << mc_sensor)) continue; - EFSYS_ASSERT(efx_sensor < EFX_MON_NSTATS); + idx++; - if (~dmask & (1 << mc_sensor)) + if (efx_sensor == SIENA_MON_WRONG_PORT) continue; + EFSYS_ASSERT(efx_sensor < EFX_MON_NSTATS); vmask |= (1 << efx_sensor); if (value != NULL && esmp != NULL && !EFSYS_MEM_IS_NULL(esmp)) { efx_mon_stat_value_t *emsvp = value + efx_sensor; efx_dword_t dword; - EFSYS_MEM_READD(esmp, 4 * mc_sensor, &dword); + EFSYS_MEM_READD(esmp, 4 * (idx - 1), &dword); emsvp->emsv_value = (uint16_t)EFX_DWORD_FIELD( dword, From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:12:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE4F5E86; Wed, 25 Mar 2015 11:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADF83E9C; Wed, 25 Mar 2015 11:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PBCnhT010174; Wed, 25 Mar 2015 11:12:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PBCmmK010170; Wed, 25 Mar 2015 11:12:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251112.t2PBCmmK010170@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 11:12:48 +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: r280569 - in stable/10/sys/dev/usb: . quirk serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:12:50 -0000 Author: hselasky Date: Wed Mar 25 11:12:48 2015 New Revision: 280569 URL: https://svnweb.freebsd.org/changeset/base/280569 Log: MFC r279725: Add more USB IDs. PR: 197753 Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c stable/10/sys/dev/usb/serial/u3g.c stable/10/sys/dev/usb/usbdevs Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/10/sys/dev/usb/quirk/usb_quirk.c Wed Mar 25 11:10:56 2015 (r280568) +++ stable/10/sys/dev/usb/quirk/usb_quirk.c Wed Mar 25 11:12:48 2015 (r280569) @@ -483,7 +483,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), - + USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), /* Non-standard USB MIDI devices */ USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), Modified: stable/10/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/10/sys/dev/usb/serial/u3g.c Wed Mar 25 11:10:56 2015 (r280568) +++ stable/10/sys/dev/usb/serial/u3g.c Wed Mar 25 11:12:48 2015 (r280569) @@ -481,6 +481,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), + /* the following is a RNDIS device, no modem features */ + U3G_DEV(QUALCOMMINC, ZTE_MF730M, U3GINIT_SCSIEJECT), U3G_DEV(QUANTA, GKE, 0), U3G_DEV(QUANTA, GLE, 0), U3G_DEV(QUANTA, GLX, 0), Modified: stable/10/sys/dev/usb/usbdevs ============================================================================== --- stable/10/sys/dev/usb/usbdevs Wed Mar 25 11:10:56 2015 (r280568) +++ stable/10/sys/dev/usb/usbdevs Wed Mar 25 11:12:48 2015 (r280569) @@ -3649,6 +3649,7 @@ product QUALCOMMINC E0086 0x0086 3G mode product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC K3772_Z_INIT 0x1179 K3772-Z Initial product QUALCOMMINC K3772_Z 0x1181 K3772-Z +product QUALCOMMINC ZTE_MF730M 0x1420 3G modem product QUALCOMMINC MF195E_INIT 0x1514 MF195E initial product QUALCOMMINC MF195E 0x1516 MF195E product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:14:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D650FE7; Wed, 25 Mar 2015 11:14:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1161EB5; Wed, 25 Mar 2015 11:14:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PBEJS7010430; Wed, 25 Mar 2015 11:14:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PBEIVr010427; Wed, 25 Mar 2015 11:14:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251114.t2PBEIVr010427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 11:14:18 +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: r280570 - in stable/9/sys/dev/usb: . quirk serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:14:20 -0000 Author: hselasky Date: Wed Mar 25 11:14:17 2015 New Revision: 280570 URL: https://svnweb.freebsd.org/changeset/base/280570 Log: MFC r279725: Add more USB IDs. PR: 197753 Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c stable/9/sys/dev/usb/serial/u3g.c stable/9/sys/dev/usb/usbdevs Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Mar 25 11:12:48 2015 (r280569) +++ stable/9/sys/dev/usb/quirk/usb_quirk.c Wed Mar 25 11:14:17 2015 (r280570) @@ -482,7 +482,8 @@ static struct usb_quirk_entry usb_quirks USB_QUIRK(TOSHIBA, TRANSMEMORY, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE, UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK(VIALABS, USB30SATABRIDGE, 0x0000, 0xffff, UQ_MSC_NO_SYNC_CACHE), - + USB_QUIRK(QUALCOMMINC, ZTE_MF730M, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN, + UQ_MSC_NO_INQUIRY, UQ_CFG_INDEX_0), /* Non-standard USB MIDI devices */ USB_QUIRK(ROLAND, UM1, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), USB_QUIRK(ROLAND, SC8850, 0x0000, 0xffff, UQ_AU_VENDOR_CLASS), Modified: stable/9/sys/dev/usb/serial/u3g.c ============================================================================== --- stable/9/sys/dev/usb/serial/u3g.c Wed Mar 25 11:12:48 2015 (r280569) +++ stable/9/sys/dev/usb/serial/u3g.c Wed Mar 25 11:14:17 2015 (r280570) @@ -482,6 +482,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(QUALCOMMINC, MF626, 0), U3G_DEV(QUALCOMMINC, MF628, 0), U3G_DEV(QUALCOMMINC, MF633R, 0), + /* the following is a RNDIS device, no modem features */ + U3G_DEV(QUALCOMMINC, ZTE_MF730M, U3GINIT_SCSIEJECT), U3G_DEV(QUANTA, GKE, 0), U3G_DEV(QUANTA, GLE, 0), U3G_DEV(QUANTA, GLX, 0), Modified: stable/9/sys/dev/usb/usbdevs ============================================================================== --- stable/9/sys/dev/usb/usbdevs Wed Mar 25 11:12:48 2015 (r280569) +++ stable/9/sys/dev/usb/usbdevs Wed Mar 25 11:14:17 2015 (r280570) @@ -3649,6 +3649,7 @@ product QUALCOMMINC E0086 0x0086 3G mode product QUALCOMMINC SURFSTICK 0x0117 1&1 Surf Stick product QUALCOMMINC K3772_Z_INIT 0x1179 K3772-Z Initial product QUALCOMMINC K3772_Z 0x1181 K3772-Z +product QUALCOMMINC ZTE_MF730M 0x1420 3G modem product QUALCOMMINC MF195E_INIT 0x1514 MF195E initial product QUALCOMMINC MF195E 0x1516 MF195E product QUALCOMMINC ZTE_STOR 0x2000 USB ZTE Storage From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:14:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E4291A6; Wed, 25 Mar 2015 11:14:36 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0AD34EBD; Wed, 25 Mar 2015 11:14:35 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2PBEX0s009703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Mar 2015 14:14:33 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2PBEXl0009702; Wed, 25 Mar 2015 14:14:33 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 25 Mar 2015 14:14:33 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r280495 - head/sys/kern Message-ID: <20150325111433.GT64665@FreeBSD.org> References: <201503250855.t2P8tZFp038467@svn.freebsd.org> <20150325105409.GS64665@FreeBSD.org> <551296C6.9070402@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <551296C6.9070402@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:14:36 -0000 On Wed, Mar 25, 2015 at 12:06:46PM +0100, Hans Petter Selasky wrote: H> On 03/25/15 11:54, Gleb Smirnoff wrote: H> > On Wed, Mar 25, 2015 at 08:55:35AM +0000, Hans Petter Selasky wrote: H> > H> Author: hselasky H> > H> Date: Wed Mar 25 08:55:34 2015 H> > H> New Revision: 280495 H> > H> URL: https://svnweb.freebsd.org/changeset/base/280495 H> > H> H> > H> Log: H> > H> Implement a simple OID number garbage collector. Given the increasing H> > H> number of dynamically created and destroyed SYSCTLs during runtime it H> > H> is very likely that the current new OID number limit of 0x7fffffff can H> > H> be reached. Especially if dynamic OID creation and destruction results H> > H> from automatic tests. Additional changes: H> > H> H> > H> - Optimize the typical use case by decrementing the next automatic OID H> > H> sequence number instead of incrementing it. This saves searching time H> > H> when inserting new OIDs into a fresh parent OID node. H> > H> H> > H> - Add simple check for duplicate non-automatic OID numbers. H> > H> > Why didn't you use alloc_unr(9) for that? H> > H> H> Hi Gleb, H> H> I thought about using alloc_unr(). The problem is that sysctls have no H> clear concept of freeing. For example in some existing code sysctl are H> unregistered and registered again assuming that the oid_number will be H> preserved. I didn't want touch those parts. Also, hence we are already H> traversing a list to insert an SYSCTL object in an ordered fashion, the H> benefit of alloc_unr() is not that big. What do you think? Is it possible to split the space into two halves: one for static OIDs and other for dynamic ones? The latter allocated via alloc_unr? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:27:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4702546F; Wed, 25 Mar 2015 11:27:06 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (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 06D49FF2; Wed, 25 Mar 2015 11:27:06 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 8CCEA1FE022; Wed, 25 Mar 2015 12:27:02 +0100 (CET) Message-ID: <55129BB5.4000502@selasky.org> Date: Wed, 25 Mar 2015 12:27:49 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff Subject: Re: svn commit: r280495 - head/sys/kern References: <201503250855.t2P8tZFp038467@svn.freebsd.org> <20150325105409.GS64665@FreeBSD.org> <551296C6.9070402@selasky.org> <20150325111433.GT64665@FreeBSD.org> In-Reply-To: <20150325111433.GT64665@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:27:06 -0000 On 03/25/15 12:14, Gleb Smirnoff wrote: > On Wed, Mar 25, 2015 at 12:06:46PM +0100, Hans Petter Selasky wrote: > H> On 03/25/15 11:54, Gleb Smirnoff wrote: > H> > On Wed, Mar 25, 2015 at 08:55:35AM +0000, Hans Petter Selasky wrote: > H> > H> Author: hselasky > H> > H> Date: Wed Mar 25 08:55:34 2015 > H> > H> New Revision: 280495 > H> > H> URL: https://svnweb.freebsd.org/changeset/base/280495 > H> > H> > H> > H> Log: > H> > H> Implement a simple OID number garbage collector. Given the increasing > H> > H> number of dynamically created and destroyed SYSCTLs during runtime it > H> > H> is very likely that the current new OID number limit of 0x7fffffff can > H> > H> be reached. Especially if dynamic OID creation and destruction results > H> > H> from automatic tests. Additional changes: > H> > H> > H> > H> - Optimize the typical use case by decrementing the next automatic OID > H> > H> sequence number instead of incrementing it. This saves searching time > H> > H> when inserting new OIDs into a fresh parent OID node. > H> > H> > H> > H> - Add simple check for duplicate non-automatic OID numbers. > H> > > H> > Why didn't you use alloc_unr(9) for that? > H> > > H> > H> Hi Gleb, > H> > H> I thought about using alloc_unr(). The problem is that sysctls have no > H> clear concept of freeing. For example in some existing code sysctl are > H> unregistered and registered again assuming that the oid_number will be > H> preserved. I didn't want touch those parts. Also, hence we are already > H> traversing a list to insert an SYSCTL object in an ordered fashion, the > H> benefit of alloc_unr() is not that big. What do you think? > > Is it possible to split the space into two halves: one for static OIDs and > other for dynamic ones? The latter allocated via alloc_unr? > Yes, it is possible to do. One issue though is that the OID numbers shouldn't be recycled right away to preserve the old behaviour. It is not written anywhere, but I think there is some cleverness into the fact that the newoid value does not repeat instantly, as would happen using alloc_unr() to avoid races accessing OIDs from userspace? Does alloc_unr() support a sort of rotating allocation number mode within the defined range? The OID numbers are only required to be unique per directory level from what I can see. --HPS From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 11:53:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C0F4A61; Wed, 25 Mar 2015 11:53:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 066AA39C; Wed, 25 Mar 2015 11:53:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PBrq7R029647; Wed, 25 Mar 2015 11:53:52 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PBrqs6029646; Wed, 25 Mar 2015 11:53:52 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503251153.t2PBrqs6029646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 25 Mar 2015 11:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280571 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 11:53:53 -0000 Author: andrew Date: Wed Mar 25 11:53:52 2015 New Revision: 280571 URL: https://svnweb.freebsd.org/changeset/base/280571 Log: Remove a debug #error from the bcm2835 sdhci driver. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Mar 25 11:14:17 2015 (r280570) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Wed Mar 25 11:53:52 2015 (r280571) @@ -73,7 +73,6 @@ __FBSDID("$FreeBSD$"); #define PIO_MODE 1 #else #define PIO_MODE 0 -#error #endif static int bcm2835_sdhci_hs = 1; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 12:14:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D4BAFF44; Wed, 25 Mar 2015 12:14:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4DEC7E2; Wed, 25 Mar 2015 12:14:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PCEZfH039131; Wed, 25 Mar 2015 12:14:35 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PCEZoT039130; Wed, 25 Mar 2015 12:14:35 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201503251214.t2PCEZoT039130@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Wed, 25 Mar 2015 12:14:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280572 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 12:14:35 -0000 Author: brueffer Date: Wed Mar 25 12:14:34 2015 New Revision: 280572 URL: https://svnweb.freebsd.org/changeset/base/280572 Log: mdoc cleanup; fix spelling. Modified: head/share/man/man4/ixlv.4 Modified: head/share/man/man4/ixlv.4 ============================================================================== --- head/share/man/man4/ixlv.4 Wed Mar 25 11:53:52 2015 (r280571) +++ head/share/man/man4/ixlv.4 Wed Mar 25 12:14:34 2015 (r280572) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2015 +.Dd March 25, 2015 .Dt IXLV 4 .Os .Sh NAME @@ -77,13 +77,13 @@ and/or TSO6, and finally LRO can be set For more information on configuring this device, see .Xr ifconfig 8 . .Pp -NOTE that The +.Em NOTE : +The .Nm Driver is only used by means of SRIOV, normally in a VM on a hosting server with the .Xr ixl 4 driver. -.Pp .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -92,10 +92,10 @@ prompt before booting the kernel or stor .Bl -tag -width indent .It Va hw.ixlv.ringsz Set the number of descriptors in the rings, note that this -changes BOTH the TX and RX rings, they cannot be set independly. +changes BOTH the TX and RX rings, they cannot be set independently. .It Va hw.ixlv.max_queues Set the number of queues (each a TX/RX pair) for the port, this -allows one to override the autocalculation if its set to 0. +allows one to override the autocalculation if it is set to 0. .It Va hw.ixlv.txbrsz Set the size of the buff ring used by the transmit side of the stack, we have found that it is necessary to have it quite large @@ -109,7 +109,6 @@ The RX interrupt rate value, set to 8K b .It Va hw.ixlv.tx_itr The TX interrupt rate value, set to 4K by default. .El -.Pp .Sh SUPPORT For general information and support, go to the Intel support website at: @@ -119,8 +118,8 @@ If an issue is identified with this driv email all the specific information related to the issue to .Aq freebsd@intel.com . .Sh SEE ALSO -.Xr ixl 4 , .Xr arp 4 , +.Xr ixl 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 12:45:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E450E93B; Wed, 25 Mar 2015 12:45:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDD49BAD; Wed, 25 Mar 2015 12:45:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PCjUmL053540; Wed, 25 Mar 2015 12:45:30 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PCjUJp053539; Wed, 25 Mar 2015 12:45:30 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201503251245.t2PCjUJp053539@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Wed, 25 Mar 2015 12:45:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280573 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 12:45:31 -0000 Author: brueffer Date: Wed Mar 25 12:45:29 2015 New Revision: 280573 URL: https://svnweb.freebsd.org/changeset/base/280573 Log: Fix a typo and EOL whitespace missed in the previous commit. Modified: head/share/man/man4/ixlv.4 Modified: head/share/man/man4/ixlv.4 ============================================================================== --- head/share/man/man4/ixlv.4 Wed Mar 25 12:14:34 2015 (r280572) +++ head/share/man/man4/ixlv.4 Wed Mar 25 12:45:29 2015 (r280573) @@ -78,12 +78,12 @@ For more information on configuring this .Xr ifconfig 8 . .Pp .Em NOTE : -The +The .Nm -Driver is only used by means of SRIOV, normally in a VM on a +driver is only used by means of SRIOV, normally in a VM on a hosting server with the .Xr ixl 4 -driver. +driver. .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 12:46:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3F42A82; Wed, 25 Mar 2015 12:46:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A33F0BBA; Wed, 25 Mar 2015 12:46:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PCkKJ3053693; Wed, 25 Mar 2015 12:46:20 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PCkKSi053692; Wed, 25 Mar 2015 12:46:20 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201503251246.t2PCkKSi053692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Wed, 25 Mar 2015 12:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280574 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 12:46:21 -0000 Author: brueffer Date: Wed Mar 25 12:46:19 2015 New Revision: 280574 URL: https://svnweb.freebsd.org/changeset/base/280574 Log: mdoc cleanup; fix spelling; Xref ixlv.4 Modified: head/share/man/man4/ixl.4 Modified: head/share/man/man4/ixl.4 ============================================================================== --- head/share/man/man4/ixl.4 Wed Mar 25 12:45:29 2015 (r280573) +++ head/share/man/man4/ixl.4 Wed Mar 25 12:46:19 2015 (r280574) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2015 +.Dd March 25, 2015 .Dt IXL 4 .Os .Sh NAME @@ -113,8 +113,6 @@ Intel DUAL RATE 1G/10G SFP+ LR (bailed) Note that X710/XL710 Based SFP+ adapters also support all passive and active limiting direct attach cables that comply with SFF-8431 v4.1 and SFF-8472 v10.4 specifications. - -.Pp .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -125,10 +123,10 @@ prompt before booting the kernel or stor Allows one to enable/disable MSIX, thus forcing MSI instead. .It Va hw.ixl.ringsz Set the number of descriptors in the rings, note that this -changes BOTH the TX and RX rings, they cannot be set independly. +changes BOTH the TX and RX rings, they cannot be set independently. .It Va hw.ixl.max_queues Set the number of queues (each a TX/RX pair) for the port, this -allows one to override the autocalculation if its set to 0. +allows one to override the autocalculation if it is set to 0. .It Va hw.ixl.dynamic_rx_itr The dynamic RX interrupt control, set to 1 to enable. .It Va hw.ixl.dynamic_tx_itr @@ -138,27 +136,31 @@ The RX interrupt rate value, set to 8K b .It Va hw.ixl.tx_itr The TX interrupt rate value, set to 4K by default. .El -.Pp .Sh SYSCTL PROCEDURES .Bl -tag -width indent .It Va hw.ixl.fc -Allows one to set the flow control value. A value of 0 disables +Allows one to set the flow control value. +A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is TX pause. .It Va hw.ixl.advertise_speed Allows one to set advertised link speeds, this will then -cause a link renegotiation. With the appropriate adapter -this can cause a link at 10GB, 1GB, or 100MB. +cause a link renegotiation. +With the appropriate adapter +this can cause a link at 10GB, 1GB, or 100MB. .It Va hw.ixl.current_speed This is a display of the current setting. .It Va hw.ixl.fw_version This is a display of the Firmware version. +.El .Sh Interrupt Storms -It is important to note that 40G operation can generate high +It is important to note that 40G operation can generate high numbers of interrupts, often incorrectly being interpreted as -a storm condition in the kernel. It is suggested that this +a storm condition in the kernel. +It is suggested that this be resolved by setting: .Bl -tag -width indent .It Va hw.intr_storm_threshold: 0 +.El .Sh SUPPORT For general information and support, go to the Intel support website at: @@ -169,6 +171,7 @@ email all the specific information relat .Aq freebsd@intel.com . .Sh SEE ALSO .Xr arp 4 , +.Xr ixlv 4 , .Xr netintro 4 , .Xr ng_ether 4 , .Xr vlan 4 , From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 12:54:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:1900:2254:206a::19:2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E9E6DF0; Wed, 25 Mar 2015 12:54:09 +0000 (UTC) Received: from butcher-nb.yandex.net (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) by mx2.freebsd.org (Postfix) with ESMTP id 88E6D1E84; Wed, 25 Mar 2015 12:54:07 +0000 (UTC) Message-ID: <5512AF84.2000303@FreeBSD.org> Date: Wed, 25 Mar 2015 15:52:20 +0300 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gleb Smirnoff , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280444 - head/sys/netinet6 References: <201503241645.t2OGjpoe066993@svn.freebsd.org> In-Reply-To: <201503241645.t2OGjpoe066993@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="CtJKSKfvohiJQdDcQ85QaBo5wCO2g2DR5" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 12:54:09 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --CtJKSKfvohiJQdDcQ85QaBo5wCO2g2DR5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 24.03.2015 19:45, Gleb Smirnoff wrote: > Author: glebius > Date: Tue Mar 24 16:45:50 2015 > New Revision: 280444 > URL: https://svnweb.freebsd.org/changeset/base/280444 >=20 > Log: > Move ip6_sprintf() declaration from in6_var.h to in6.h. This is a sim= ple > function that works with in6_addr and it is not related to the INET6 > stack implementation. Hi, maybe it will be better just remove ip6_sprintf() and use inet_ntop() instead? --=20 WBR, Andrey V. Elsukov --CtJKSKfvohiJQdDcQ85QaBo5wCO2g2DR5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVEq+IAAoJEAHF6gQQyKF6pGAIAL+DvI5jz79zFmjPHocqYNGN 7f7ToSlQqxGJJgaT0FGBaZL3JcUUB+hpdWBRTU7lcjSulfMUGboEZ9IbgriaXUjy TNTyyfVfcMJxsLtjD8Y5BAN8+euryE3QpQZGvN0SPRQCFRON5uzFTSzPD0bzOgwA Wxeok0ftPqTp44T5vkipCaCMzcDQQXR2N02qzWS23wE8JpjbWKycKmquMXLfjm4L LzGws5VQDHp15diUdm3LfMKQmAu/nae+RqeBz0pGDSNQ4FBsrfh72w8453mZfeS4 /u3SWakzOnQb1lxm3dqKJE/cersyTIBqCVWaQQ46pXXOa8QZDnWO1GBLPx3N9YA= =K1ZZ -----END PGP SIGNATURE----- --CtJKSKfvohiJQdDcQ85QaBo5wCO2g2DR5-- From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 12:57:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E845FB; Wed, 25 Mar 2015 12:57:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76F74D1B; Wed, 25 Mar 2015 12:57:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PCvihj058791; Wed, 25 Mar 2015 12:57:44 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PCvinQ058790; Wed, 25 Mar 2015 12:57:44 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251257.t2PCvinQ058790@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 12:57:44 +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: r280575 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 12:57:44 -0000 Author: arybchik Date: Wed Mar 25 12:57:43 2015 New Revision: 280575 URL: https://svnweb.freebsd.org/changeset/base/280575 Log: MFC: 279147 sfxge: TxQ block level should use EFX_TXQ_LIMIT as maximum TxQ size Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 12:46:19 2015 (r280574) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 12:57:43 2015 (r280575) @@ -67,16 +67,22 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_tx.h" -/* Set the block level to ensure there is space to generate a - * large number of descriptors for TSO. With minimum MSS and - * maximum mbuf length we might need more than a ring-ful of - * descriptors, but this should not happen in practice except - * due to deliberate attack. In that case we will truncate - * the output at a packet boundary. +/* + * Estimate maximum number of Tx descriptors required for TSO packet. + * With minimum MSS and maximum mbuf length we might need more (even + * than a ring-ful of descriptors), but this should not happen in + * practice except due to deliberate attack. In that case we will + * truncate the output at a packet boundary. */ #define SFXGE_TSO_MAX_DESC \ (SFXGE_TSO_MAX_SEGS * 2 + SFXGE_TX_MAPPING_MAX_SEG - 1) -#define SFXGE_TXQ_BLOCK_LEVEL(_entries) ((_entries) - SFXGE_TSO_MAX_DESC) + +/* + * Set the block level to ensure there is space to generate a + * large number of descriptors for TSO. + */ +#define SFXGE_TXQ_BLOCK_LEVEL(_entries) \ + (EFX_TXQ_LIMIT(_entries) - SFXGE_TSO_MAX_DESC) #ifdef SFXGE_HAVE_MQ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 12:59:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B382F3FF; Wed, 25 Mar 2015 12:59:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C81AD39; Wed, 25 Mar 2015 12:59:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PCx2d2059699; Wed, 25 Mar 2015 12:59:02 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PCx2Mx059698; Wed, 25 Mar 2015 12:59:02 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251259.t2PCx2Mx059698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 12:59:02 +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: r280576 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 12:59:02 -0000 Author: arybchik Date: Wed Mar 25 12:59:01 2015 New Revision: 280576 URL: https://svnweb.freebsd.org/changeset/base/280576 Log: MFC: 279172 sfxge: add new identities to Siena static config Submitted by: Andrew Jackson Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/siena_flash.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/siena_flash.h ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_flash.h Wed Mar 25 12:57:43 2015 (r280575) +++ stable/10/sys/dev/sfxge/common/siena_flash.h Wed Mar 25 12:59:01 2015 (r280576) @@ -81,7 +81,9 @@ typedef struct siena_mc_static_config_hd efx_byte_t green_mode_valid; /* Whether cal holds a valid value */ efx_word_t mac_addr_count; efx_word_t mac_addr_stride; - efx_dword_t reserved2[2]; /* (write as zero) */ + efx_word_t calibrated_vref; + efx_word_t adc_vref; + efx_dword_t reserved2[1]; /* (write as zero) */ efx_dword_t num_dbi_items; struct { efx_word_t addr; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 12:59:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85FB854F; Wed, 25 Mar 2015 12:59:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55464D48; Wed, 25 Mar 2015 12:59:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PCxpA9059846; Wed, 25 Mar 2015 12:59:51 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PCxobj059844; Wed, 25 Mar 2015 12:59:50 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251259.t2PCxobj059844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 12:59:50 +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: r280577 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 12:59:51 -0000 Author: arybchik Date: Wed Mar 25 12:59:49 2015 New Revision: 280577 URL: https://svnweb.freebsd.org/changeset/base/280577 Log: MFC: 279173 sfxge: add missing common code NVRAM types and map from MCDI Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/siena_nvram.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 12:59:01 2015 (r280576) +++ stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 12:59:49 2015 (r280577) @@ -1024,6 +1024,10 @@ typedef enum efx_nvram_type_e { EFX_NVRAM_MC_GOLDEN, EFX_NVRAM_PHY, EFX_NVRAM_NULLPHY, + EFX_NVRAM_FPGA, + EFX_NVRAM_FCFW, + EFX_NVRAM_CPLD, + EFX_NVRAM_FPGA_BACKUP, EFX_NVRAM_NTYPES, } efx_nvram_type_t; Modified: stable/10/sys/dev/sfxge/common/siena_nvram.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nvram.c Wed Mar 25 12:59:01 2015 (r280576) +++ stable/10/sys/dev/sfxge/common/siena_nvram.c Wed Mar 25 12:59:49 2015 (r280577) @@ -330,6 +330,14 @@ static siena_parttbl_entry_t siena_partt {MC_CMD_NVRAM_TYPE_EXP_ROM_CFG_PORT1, 2, EFX_NVRAM_BOOTROM_CFG}, {MC_CMD_NVRAM_TYPE_PHY_PORT0, 1, EFX_NVRAM_PHY}, {MC_CMD_NVRAM_TYPE_PHY_PORT1, 2, EFX_NVRAM_PHY}, + {MC_CMD_NVRAM_TYPE_FPGA, 1, EFX_NVRAM_FPGA}, + {MC_CMD_NVRAM_TYPE_FPGA, 2, EFX_NVRAM_FPGA}, + {MC_CMD_NVRAM_TYPE_FPGA_BACKUP, 1, EFX_NVRAM_FPGA_BACKUP}, + {MC_CMD_NVRAM_TYPE_FPGA_BACKUP, 2, EFX_NVRAM_FPGA_BACKUP}, + {MC_CMD_NVRAM_TYPE_FC_FW, 1, EFX_NVRAM_FCFW}, + {MC_CMD_NVRAM_TYPE_FC_FW, 2, EFX_NVRAM_FCFW}, + {MC_CMD_NVRAM_TYPE_CPLD, 1, EFX_NVRAM_CPLD}, + {MC_CMD_NVRAM_TYPE_CPLD, 2, EFX_NVRAM_CPLD}, {0, 0, 0}, }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:01:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7ABA869A; Wed, 25 Mar 2015 13:01:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49DF8DEE; Wed, 25 Mar 2015 13:01:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD1BXM063157; Wed, 25 Mar 2015 13:01:11 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD1BbG063156; Wed, 25 Mar 2015 13:01:11 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251301.t2PD1BbG063156@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:01:11 +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: r280578 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:01:11 -0000 Author: arybchik Date: Wed Mar 25 13:01:10 2015 New Revision: 280578 URL: https://svnweb.freebsd.org/changeset/base/280578 Log: MFC: 279174 sfxge: add missing Siena sensors to common code Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/siena_mon.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/siena_mon.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 12:59:49 2015 (r280577) +++ stable/10/sys/dev/sfxge/common/siena_mon.c Wed Mar 25 13:01:10 2015 (r280578) @@ -70,6 +70,21 @@ static __cs uint16_t __siena_mon_port0_m EFX_MON_STAT_2_5V, /* MC_CMD_SENSOR_IN_2V5 */ EFX_MON_STAT_3_3V, /* MC_CMD_SENSOR_IN_3V3 */ EFX_MON_STAT_12V, /* MC_CMD_SENSOR_IN_12V0 */ + EFX_MON_STAT_1_2VA, /* MC_CMD_SENSOR_IN_1V2A */ + EFX_MON_STAT_VREF, /* MC_CMD_SENSOR_IN_VREF */ + EFX_MON_STAT_VAOE, /* MC_CMD_SENSOR_OUT_VAOE */ + EFX_MON_STAT_AOE_TEMP, /* MC_CMD_SENSOR_AOE_TEMP */ + EFX_MON_STAT_PSU_AOE_TEMP, /* MC_CMD_SENSOR_PSU_AOE_TEMP */ + EFX_MON_STAT_PSU_TEMP, /* MC_CMD_SENSOR_PSE_TEMP */ + EFX_MON_STAT_FAN0, /* MC_CMD_SENSOR_FAN_0 */ + EFX_MON_STAT_FAN1, /* MC_CMD_SENSOR_FAN_1 */ + EFX_MON_STAT_FAN2, /* MC_CMD_SENSOR_FAN_2 */ + EFX_MON_STAT_FAN3, /* MC_CMD_SENSOR_FAN_3 */ + EFX_MON_STAT_FAN4, /* MC_CMD_SENSOR_FAN_4 */ + EFX_MON_STAT_VAOE_IN, /* MC_CMD_SENSOR_IN_VAOE */ + EFX_MON_STAT_IAOE, /* MC_CMD_SENSOR_OUT_IAOE */ + EFX_MON_STAT_IAOE_IN, /* MC_CMD_SENSOR_IN_IAOE */ + }; static __cs uint16_t __siena_mon_port1_map[] = { @@ -86,6 +101,21 @@ static __cs uint16_t __siena_mon_port1_m EFX_MON_STAT_2_5V, /* MC_CMD_SENSOR_IN_2V5 */ EFX_MON_STAT_3_3V, /* MC_CMD_SENSOR_IN_3V3 */ EFX_MON_STAT_12V, /* MC_CMD_SENSOR_IN_12V0 */ + EFX_MON_STAT_1_2VA, /* MC_CMD_SENSOR_IN_1V2A */ + EFX_MON_STAT_VREF, /* MC_CMD_SENSOR_IN_VREF */ + EFX_MON_STAT_VAOE, /* MC_CMD_SENSOR_OUT_VAOE */ + EFX_MON_STAT_AOE_TEMP, /* MC_CMD_SENSOR_AOE_TEMP */ + EFX_MON_STAT_PSU_AOE_TEMP, /* MC_CMD_SENSOR_PSU_AOE_TEMP */ + EFX_MON_STAT_PSU_TEMP, /* MC_CMD_SENSOR_PSE_TEMP */ + EFX_MON_STAT_FAN0, /* MC_CMD_SENSOR_FAN_0 */ + EFX_MON_STAT_FAN1, /* MC_CMD_SENSOR_FAN_1 */ + EFX_MON_STAT_FAN2, /* MC_CMD_SENSOR_FAN_2 */ + EFX_MON_STAT_FAN3, /* MC_CMD_SENSOR_FAN_3 */ + EFX_MON_STAT_FAN4, /* MC_CMD_SENSOR_FAN_4 */ + EFX_MON_STAT_VAOE_IN, /* MC_CMD_SENSOR_IN_VAOE */ + EFX_MON_STAT_IAOE, /* MC_CMD_SENSOR_OUT_IAOE */ + EFX_MON_STAT_IAOE_IN, /* MC_CMD_SENSOR_IN_IAOE */ + }; #define SIENA_STATIC_SENSOR_ASSERT(_field) \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:01:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BD907E4; Wed, 25 Mar 2015 13:01:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3AF4CDFC; Wed, 25 Mar 2015 13:01:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD1qxh063758; Wed, 25 Mar 2015 13:01:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD1ql3063757; Wed, 25 Mar 2015 13:01:52 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251301.t2PD1ql3063757@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:01:52 +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: r280579 - 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:01:52 -0000 Author: hselasky Date: Wed Mar 25 13:01:51 2015 New Revision: 280579 URL: https://svnweb.freebsd.org/changeset/base/280579 Log: MFC r280345: Fix for out of order device destruction notifications when using the delist_dev() function. In addition to this change: - add a proper description of this function - add a proper witness assert inside this function - switch a nearby line to use the "cdp" pointer instead of cdev2priv() Modified: stable/10/sys/kern/kern_conf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_conf.c ============================================================================== --- stable/10/sys/kern/kern_conf.c Wed Mar 25 13:01:10 2015 (r280578) +++ stable/10/sys/kern/kern_conf.c Wed Mar 25 13:01:51 2015 (r280579) @@ -1093,9 +1093,12 @@ destroy_devl(struct cdev *dev) } dev_unlock(); - notify_destroy(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* avoid out of order notify events */ + notify_destroy(dev); + } mtx_lock(&cdevpriv_mtx); - while ((p = LIST_FIRST(&cdev2priv(dev)->cdp_fdpriv)) != NULL) { + while ((p = LIST_FIRST(&cdp->cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } @@ -1141,12 +1144,25 @@ delist_dev_locked(struct cdev *dev) devfs_destroy(dev); LIST_FOREACH(child, &dev->si_children, si_siblings) delist_dev_locked(child); + dev_unlock(); + /* ensure the destroy event is queued in order */ + notify_destroy(dev); + dev_lock(); } +/* + * This function will delist a character device and its children from + * the directory listing and create a destroy event without waiting + * for all character device references to go away. At some later point + * destroy_dev() must be called to complete the character device + * destruction. After calling this function the character device name + * can instantly be re-used. + */ void delist_dev(struct cdev *dev) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "delist_dev"); dev_lock(); delist_dev_locked(dev); dev_unlock(); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:02:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B9459B5; Wed, 25 Mar 2015 13:02:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A88DE0D; Wed, 25 Mar 2015 13:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD2YVl063929; Wed, 25 Mar 2015 13:02:34 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD2YEd063928; Wed, 25 Mar 2015 13:02:34 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251302.t2PD2YEd063928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:02:34 +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: r280580 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:02:34 -0000 Author: arybchik Date: Wed Mar 25 13:02:33 2015 New Revision: 280580 URL: https://svnweb.freebsd.org/changeset/base/280580 Log: MFC: 279175 sfxge: using bus_space_*_stream_* API for better portability Host-bus byte order translation is not requred. Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:01:51 2015 (r280579) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:02:33 2015 (r280580) @@ -94,6 +94,15 @@ extern "C" { #define ISP2(x) (((x) & ((x) - 1)) == 0) #endif +#if defined(__x86_64__) +#if !defined(bus_space_read_stream_8) +#define bus_space_read_stream_8(t, h, o) \ + bus_space_read_8((t), (h), (o)) +#define bus_space_write_stream_8(t, h, o, v) \ + bus_space_write_8((t), (h), (o), (v)) +#endif +#endif + #define ENOTACTIVE EINVAL /* Memory type to use on FreeBSD */ @@ -641,8 +650,9 @@ typedef struct efsys_bar_s { if (_lock) \ SFXGE_BAR_LOCK(_esbp); \ \ - (_edp)->ed_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset)); \ + (_edp)->ed_u32[0] = bus_space_read_stream_4( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset)); \ \ EFSYS_PROBE2(bar_readd, unsigned int, (_offset), \ uint32_t, (_edp)->ed_u32[0]); \ @@ -662,8 +672,9 @@ typedef struct efsys_bar_s { \ SFXGE_BAR_LOCK(_esbp); \ \ - (_eqp)->eq_u64[0] = bus_space_read_8((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset)); \ + (_eqp)->eq_u64[0] = bus_space_read_stream_8( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset)); \ \ EFSYS_PROBE3(bar_readq, unsigned int, (_offset), \ uint32_t, (_eqp)->eq_u32[1], \ @@ -683,10 +694,12 @@ typedef struct efsys_bar_s { if (_lock) \ SFXGE_BAR_LOCK(_esbp); \ \ - (_eop)->eo_u64[0] = bus_space_read_8((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset)); \ - (_eop)->eo_u64[1] = bus_space_read_8((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset+8)); \ + (_eop)->eo_u64[0] = bus_space_read_stream_8( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset)); \ + (_eop)->eo_u64[1] = bus_space_read_stream_8( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset) + 8); \ \ EFSYS_PROBE5(bar_reado, unsigned int, (_offset), \ uint32_t, (_eop)->eo_u32[3], \ @@ -709,10 +722,12 @@ typedef struct efsys_bar_s { \ SFXGE_BAR_LOCK(_esbp); \ \ - (_eqp)->eq_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset)); \ - (_eqp)->eq_u32[1] = bus_space_read_4((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset+4)); \ + (_eqp)->eq_u32[0] = bus_space_read_stream_4( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset)); \ + (_eqp)->eq_u32[1] = bus_space_read_stream_4( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset) + 4); \ \ EFSYS_PROBE3(bar_readq, unsigned int, (_offset), \ uint32_t, (_eqp)->eq_u32[1], \ @@ -732,14 +747,18 @@ typedef struct efsys_bar_s { if (_lock) \ SFXGE_BAR_LOCK(_esbp); \ \ - (_eop)->eo_u32[0] = bus_space_read_4((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset)); \ - (_eop)->eo_u32[1] = bus_space_read_4((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset+4)); \ - (_eop)->eo_u32[2] = bus_space_read_4((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset+8)); \ - (_eop)->eo_u32[3] = bus_space_read_4((_esbp)->esb_tag, \ - (_esbp)->esb_handle, (_offset+12)); \ + (_eop)->eo_u32[0] = bus_space_read_stream_4( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset)); \ + (_eop)->eo_u32[1] = bus_space_read_stream_4( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset) + 4); \ + (_eop)->eo_u32[2] = bus_space_read_stream_4( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset) + 8); \ + (_eop)->eo_u32[3] = bus_space_read_stream_4( \ + (_esbp)->esb_tag, (_esbp)->esb_handle, \ + (_offset) + 12); \ \ EFSYS_PROBE5(bar_reado, unsigned int, (_offset), \ uint32_t, (_eop)->eo_u32[3], \ @@ -767,7 +786,8 @@ typedef struct efsys_bar_s { EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \ uint32_t, (_edp)->ed_u32[0]); \ \ - bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ + bus_space_write_stream_4((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ (_offset), (_edp)->ed_u32[0]); \ \ _NOTE(CONSTANTCONDITION) \ @@ -789,7 +809,8 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ - bus_space_write_8((_esbp)->esb_tag, (_esbp)->esb_handle,\ + bus_space_write_stream_8((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ (_offset), (_eqp)->eq_u64[0]); \ \ SFXGE_BAR_UNLOCK(_esbp); \ @@ -808,10 +829,12 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ - bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ + bus_space_write_stream_4((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ (_offset), (_eqp)->eq_u32[0]); \ - bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ - (_offset+4), (_eqp)->eq_u32[1]); \ + bus_space_write_stream_4((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ + (_offset) + 4, (_eqp)->eq_u32[1]); \ \ SFXGE_BAR_UNLOCK(_esbp); \ _NOTE(CONSTANTCONDITION) \ @@ -835,10 +858,12 @@ typedef struct efsys_bar_s { uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ \ - bus_space_write_8((_esbp)->esb_tag, (_esbp)->esb_handle,\ + bus_space_write_stream_8((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ (_offset), (_eop)->eo_u64[0]); \ - bus_space_write_8((_esbp)->esb_tag, (_esbp)->esb_handle,\ - (_offset+8), (_eop)->eo_u64[1]); \ + bus_space_write_stream_8((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ + (_offset) + 8, (_eop)->eo_u64[1]); \ \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ @@ -863,14 +888,18 @@ typedef struct efsys_bar_s { uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ \ - bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ + bus_space_write_stream_4((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ (_offset), (_eop)->eo_u32[0]); \ - bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ - (_offset+4), (_eop)->eo_u32[1]); \ - bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ - (_offset+8), (_eop)->eo_u32[2]); \ - bus_space_write_4((_esbp)->esb_tag, (_esbp)->esb_handle,\ - (_offset+12), (_eop)->eo_u32[3]); \ + bus_space_write_stream_4((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ + (_offset) + 4, (_eop)->eo_u32[1]); \ + bus_space_write_stream_4((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ + (_offset) + 8, (_eop)->eo_u32[2]); \ + bus_space_write_stream_4((_esbp)->esb_tag, \ + (_esbp)->esb_handle, \ + (_offset) + 12, (_eop)->eo_u32[3]); \ \ _NOTE(CONSTANTCONDITION) \ if (_lock) \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:03:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7CF38B8D; Wed, 25 Mar 2015 13:03:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DDAE2A; Wed, 25 Mar 2015 13:03:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD3bWj064199; Wed, 25 Mar 2015 13:03:37 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD3b18064198; Wed, 25 Mar 2015 13:03:37 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251303.t2PD3b18064198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:03: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: r280581 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:03:37 -0000 Author: arybchik Date: Wed Mar 25 13:03:36 2015 New Revision: 280581 URL: https://svnweb.freebsd.org/changeset/base/280581 Log: MFC: 279176 sfxge: pass correct address to free allocated memory in the case of load error It is one more place missed in the previous fix. Most likely is was just memory leak on the error handling path since typically efsys_mem_t is filled in by zeros on allocation. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:02:33 2015 (r280580) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:03:36 2015 (r280581) @@ -164,8 +164,8 @@ sfxge_dma_alloc(struct sfxge_softc *sc, * wrong. */ if (esmp->esm_addr == 0) { - bus_dmamem_free(esmp->esm_tag, esmp->esm_base, esmp->esm_map); - bus_dma_tag_destroy(esmp->esm_tag); + bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map); + bus_dma_tag_destroy(esmp->esm_tag); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:04:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF0C9DAE; Wed, 25 Mar 2015 13:04:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEDC9E3F; Wed, 25 Mar 2015 13:04:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD4Ta3064376; Wed, 25 Mar 2015 13:04:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD4T5n064375; Wed, 25 Mar 2015 13:04:29 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251304.t2PD4T5n064375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:04: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: r280582 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:04:30 -0000 Author: arybchik Date: Wed Mar 25 13:04:28 2015 New Revision: 280582 URL: https://svnweb.freebsd.org/changeset/base/280582 Log: MFC: 279177 sfxge: assert event queue lock in event handlers It is useful to highlight lock context. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:03:36 2015 (r280581) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:04:28 2015 (r280582) @@ -45,6 +45,8 @@ sfxge_ev_qcomplete(struct sfxge_evq *evq struct sfxge_rxq *rxq; struct sfxge_txq *txq; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; index = evq->index; rxq = sc->rxq[index]; @@ -84,6 +86,8 @@ sfxge_ev_rx(void *arg, uint32_t label, u struct sfxge_rx_sw_desc *rx_desc; evq = arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; if (evq->exception) @@ -135,6 +139,8 @@ sfxge_ev_exception(void *arg, uint32_t c struct sfxge_softc *sc; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; evq->exception = B_TRUE; @@ -160,6 +166,8 @@ sfxge_ev_rxq_flush_done(void *arg, uint3 uint16_t magic; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; rxq = sc->rxq[rxq_index]; @@ -192,6 +200,8 @@ sfxge_ev_rxq_flush_failed(void *arg, uin uint16_t magic; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; rxq = sc->rxq[rxq_index]; @@ -233,6 +243,8 @@ sfxge_ev_tx(void *arg, uint32_t label, u unsigned int delta; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + txq = sfxge_get_txq_by_label(evq, label); KASSERT(txq != NULL, ("txq == NULL")); @@ -273,6 +285,8 @@ sfxge_ev_txq_flush_done(void *arg, uint3 uint16_t magic; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; txq = sc->txq[txq_index]; @@ -303,6 +317,8 @@ sfxge_ev_software(void *arg, uint16_t ma unsigned int label; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; label = magic & SFXGE_MAGIC_DMAQ_LABEL_MASK; @@ -528,6 +544,7 @@ sfxge_ev_initialized(void *arg) struct sfxge_evq *evq; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); KASSERT(evq->init_state == SFXGE_EVQ_STARTING, ("evq not starting")); @@ -544,6 +561,8 @@ sfxge_ev_link_change(void *arg, efx_link struct sfxge_softc *sc; evq = (struct sfxge_evq *)arg; + SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); + sc = evq->sc; sfxge_mac_link_update(sc, link_mode); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:05:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5804EEED; Wed, 25 Mar 2015 13:05:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 27431E4D; Wed, 25 Mar 2015 13:05:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD5I8K064563; Wed, 25 Mar 2015 13:05:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD5IKG064562; Wed, 25 Mar 2015 13:05:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251305.t2PD5IKG064562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:05:18 +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: r280583 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:05:18 -0000 Author: hselasky Date: Wed Mar 25 13:05:17 2015 New Revision: 280583 URL: https://svnweb.freebsd.org/changeset/base/280583 Log: MFC r280345: Fix for out of order device destruction notifications when using the delist_dev() function. In addition to this change: - add a proper description of this function - add a proper witness assert inside this function - switch a nearby line to use the "cdp" pointer instead of cdev2priv() Modified: stable/9/sys/kern/kern_conf.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_conf.c ============================================================================== --- stable/9/sys/kern/kern_conf.c Wed Mar 25 13:04:28 2015 (r280582) +++ stable/9/sys/kern/kern_conf.c Wed Mar 25 13:05:17 2015 (r280583) @@ -1088,9 +1088,12 @@ destroy_devl(struct cdev *dev) } dev_unlock(); - notify_destroy(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* avoid out of order notify events */ + notify_destroy(dev); + } mtx_lock(&cdevpriv_mtx); - while ((p = LIST_FIRST(&cdev2priv(dev)->cdp_fdpriv)) != NULL) { + while ((p = LIST_FIRST(&cdp->cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } @@ -1136,12 +1139,25 @@ delist_dev_locked(struct cdev *dev) devfs_destroy(dev); LIST_FOREACH(child, &dev->si_children, si_siblings) delist_dev_locked(child); + dev_unlock(); + /* ensure the destroy event is queued in order */ + notify_destroy(dev); + dev_lock(); } +/* + * This function will delist a character device and its children from + * the directory listing and create a destroy event without waiting + * for all character device references to go away. At some later point + * destroy_dev() must be called to complete the character device + * destruction. After calling this function the character device name + * can instantly be re-used. + */ void delist_dev(struct cdev *dev) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "delist_dev"); dev_lock(); delist_dev_locked(dev); dev_unlock(); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:05:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13265AA; Wed, 25 Mar 2015 13:05:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F061CE53; Wed, 25 Mar 2015 13:05:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD5XFe064647; Wed, 25 Mar 2015 13:05:33 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD5XTr064646; Wed, 25 Mar 2015 13:05:33 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251305.t2PD5XTr064646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:05: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: r280584 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:05:34 -0000 Author: arybchik Date: Wed Mar 25 13:05:33 2015 New Revision: 280584 URL: https://svnweb.freebsd.org/changeset/base/280584 Log: MFC: 279178 sfxge: do no allow EFSYS_MEM_ALLOC sleep It solves locking problem when EFSYS_MEM_ALLOC is called in the context holding a mutex (not allowed to sleep). E.g. on interface bring up or multicast addresses addition. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:05:17 2015 (r280583) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:05:33 2015 (r280584) @@ -941,7 +941,11 @@ typedef clock_t efsys_timestamp_t; #define EFSYS_KMEM_ALLOC(_esip, _size, _p) \ do { \ (_esip) = (_esip); \ - (_p) = malloc((_size), M_SFXGE, M_WAITOK|M_ZERO); \ + /* \ + * The macro is used in non-sleepable contexts, for \ + * example, holding a mutex. \ + */ \ + (_p) = malloc((_size), M_SFXGE, M_NOWAIT|M_ZERO); \ _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:06:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58F09200; Wed, 25 Mar 2015 13:06:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF98E66; Wed, 25 Mar 2015 13:06:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD6d5P064894; Wed, 25 Mar 2015 13:06:39 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD6ccl064892; Wed, 25 Mar 2015 13:06:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251306.t2PD6ccl064892@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:06: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: r280585 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:06:39 -0000 Author: arybchik Date: Wed Mar 25 13:06:37 2015 New Revision: 280585 URL: https://svnweb.freebsd.org/changeset/base/280585 Log: MFC: 279179 sfxge: DMA allocated memory is set to zeros because of BUS_DMA_ZERO flag It is not required to set it to zeros once again. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:05:33 2015 (r280584) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:06:37 2015 (r280585) @@ -1113,7 +1113,6 @@ sfxge_rx_qinit(struct sfxge_softc *sc, u /* Allocate and zero DMA space. */ if ((rc = sfxge_dma_alloc(sc, EFX_RXQ_SIZE(sc->rxq_entries), esmp)) != 0) return (rc); - (void)memset(esmp->esm_base, 0, EFX_RXQ_SIZE(sc->rxq_entries)); /* Allocate buffer table entries. */ sfxge_sram_buf_tbl_alloc(sc, EFX_RXQ_NBUFS(sc->rxq_entries), Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:05:33 2015 (r280584) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:06:37 2015 (r280585) @@ -1399,7 +1399,6 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u /* Allocate and zero DMA space for the descriptor ring. */ if ((rc = sfxge_dma_alloc(sc, EFX_TXQ_SIZE(sc->txq_entries), esmp)) != 0) return (rc); - (void)memset(esmp->esm_base, 0, EFX_TXQ_SIZE(sc->txq_entries)); /* Allocate buffer table entries. */ sfxge_sram_buf_tbl_alloc(sc, EFX_TXQ_NBUFS(sc->txq_entries), From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:08:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4888372; Wed, 25 Mar 2015 13:08:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93DDBE84; Wed, 25 Mar 2015 13:08:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD8whR065218; Wed, 25 Mar 2015 13:08:58 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD8wEm065217; Wed, 25 Mar 2015 13:08:58 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251308.t2PD8wEm065217@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r280586 - stable/8/sys/kern X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:08:58 -0000 Author: hselasky Date: Wed Mar 25 13:08:57 2015 New Revision: 280586 URL: https://svnweb.freebsd.org/changeset/base/280586 Log: MFC r280345: Fix for out of order device destruction notifications when using the delist_dev() function. In addition to this change: - add a proper description of this function - add a proper witness assert inside this function - switch a nearby line to use the "cdp" pointer instead of cdev2priv() Modified: stable/8/sys/kern/kern_conf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/kern_conf.c ============================================================================== --- stable/8/sys/kern/kern_conf.c Wed Mar 25 13:06:37 2015 (r280585) +++ stable/8/sys/kern/kern_conf.c Wed Mar 25 13:08:57 2015 (r280586) @@ -929,9 +929,12 @@ destroy_devl(struct cdev *dev) } dev_unlock(); - notify_destroy(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* avoid out of order notify events */ + notify_destroy(dev); + } mtx_lock(&cdevpriv_mtx); - while ((p = LIST_FIRST(&cdev2priv(dev)->cdp_fdpriv)) != NULL) { + while ((p = LIST_FIRST(&cdp->cdp_fdpriv)) != NULL) { devfs_destroy_cdevpriv(p); mtx_lock(&cdevpriv_mtx); } @@ -977,12 +980,25 @@ delist_dev_locked(struct cdev *dev) devfs_destroy(dev); LIST_FOREACH(child, &dev->si_children, si_siblings) delist_dev_locked(child); + dev_unlock(); + /* ensure the destroy event is queued in order */ + notify_destroy(dev); + dev_lock(); } +/* + * This function will delist a character device and its children from + * the directory listing and create a destroy event without waiting + * for all character device references to go away. At some later point + * destroy_dev() must be called to complete the character device + * destruction. After calling this function the character device name + * can instantly be re-used. + */ void delist_dev(struct cdev *dev) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, "delist_dev"); dev_lock(); delist_dev_locked(dev); dev_unlock(); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:09:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E599C594; Wed, 25 Mar 2015 13:09:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CED87E95; Wed, 25 Mar 2015 13:09:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PD9lhl065376; Wed, 25 Mar 2015 13:09:47 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PD9lnb065375; Wed, 25 Mar 2015 13:09:47 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251309.t2PD9lnb065375@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:09: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: r280587 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:09:48 -0000 Author: arybchik Date: Wed Mar 25 13:09:46 2015 New Revision: 280587 URL: https://svnweb.freebsd.org/changeset/base/280587 Log: MFC: 279181 sfxge: add indefinite article and update timestamp Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 ============================================================================== --- stable/10/share/man/man4/sfxge.4 Wed Mar 25 13:08:57 2015 (r280586) +++ stable/10/share/man/man4/sfxge.4 Wed Mar 25 13:09:46 2015 (r280587) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 30, 2014 +.Dd February 22, 2015 .Dt SFXGE 4 .Os .Sh NAME @@ -103,7 +103,7 @@ The value must be greater than 0. The maximum number of non-TCP packets in the deferred packet .Dq get-list , used only if the transmit queue lock can be acquired. -If packet is dropped, the +If a packet is dropped, the .Va tx_get_non_tcp_overflow counter is incremented and the local sender receives ENOBUFS. The value must be greater than 0. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:11:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 351236E9; Wed, 25 Mar 2015 13:11:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D933F41; Wed, 25 Mar 2015 13:11:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDBL30067676; Wed, 25 Mar 2015 13:11:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDBKIX066782; Wed, 25 Mar 2015 13:11:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251311.t2PDBKIX066782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:11: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: r280588 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:11:22 -0000 Author: arybchik Date: Wed Mar 25 13:11:19 2015 New Revision: 280588 URL: https://svnweb.freebsd.org/changeset/base/280588 Log: MFC: 279182 sfxge: correct event queue interrupt moderation timer quanta Submitted by: Andrew Lee Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_ev.c stable/10/sys/dev/sfxge/common/efx_impl.h stable/10/sys/dev/sfxge/common/siena_nic.c stable/10/sys/dev/sfxge/sfxge_ev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 13:11:19 2015 (r280588) @@ -895,7 +895,8 @@ typedef struct efx_nic_cfg_s { uint32_t enc_txq_limit; uint32_t enc_rxq_limit; uint32_t enc_buftbl_limit; - uint32_t enc_evq_moderation_max; + uint32_t enc_evq_timer_quantum_ns; + uint32_t enc_evq_timer_max_us; uint32_t enc_clk_mult; #if EFSYS_OPT_LOOPBACK uint32_t enc_loopback_types[EFX_LINK_NMODES]; Modified: stable/10/sys/dev/sfxge/common/efx_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/efx_ev.c Wed Mar 25 13:11:19 2015 (r280588) @@ -857,7 +857,7 @@ efx_ev_qmoderate( EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC); - if (us > encp->enc_evq_moderation_max) { + if (us > encp->enc_evq_timer_max_us) { rc = EINVAL; goto fail1; } @@ -876,7 +876,7 @@ efx_ev_qmoderate( uint32_t timer_val; /* Calculate the timer value in quanta */ - timer_val = us * encp->enc_clk_mult / EFX_EV_TIMER_QUANTUM; + timer_val = us * 1000 / encp->enc_evq_timer_quantum_ns; /* Moderation value is base 0 so we need to deduct 1 */ if (timer_val > 0) Modified: stable/10/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:11:19 2015 (r280588) @@ -408,7 +408,8 @@ struct efx_evq_s { #define EFX_EVQ_MAGIC 0x08081997 -#define EFX_EV_TIMER_QUANTUM 5 +#define EFX_EVQ_FALCON_TIMER_QUANTUM_NS 4968 /* 621 cycles */ +#define EFX_EVQ_SIENA_TIMER_QUANTUM_NS 6144 /* 768 cycles */ struct efx_rxq_s { uint32_t er_magic; Modified: stable/10/sys/dev/sfxge/common/siena_nic.c ============================================================================== --- stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/common/siena_nic.c Wed Mar 25 13:11:19 2015 (r280588) @@ -329,8 +329,10 @@ siena_board_cfg( encp->enc_clk_mult = 2; } - encp->enc_evq_moderation_max = EFX_EV_TIMER_QUANTUM << - FRF_AB_TIMER_VAL_WIDTH / encp->enc_clk_mult; + encp->enc_evq_timer_quantum_ns = + EFX_EVQ_SIENA_TIMER_QUANTUM_NS / encp->enc_clk_mult; + encp->enc_evq_timer_max_us = (encp->enc_evq_timer_quantum_ns << + FRF_CZ_TC_TIMER_VAL_WIDTH) / 1000; /* Resource limits */ req.emr_cmd = MC_CMD_GET_RESOURCE_LIMITS; Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:09:46 2015 (r280587) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:11:19 2015 (r280588) @@ -517,7 +517,7 @@ sfxge_int_mod_handler(SYSCTL_HANDLER_ARG * so we have to range-check the value ourselves. */ if (moderation > - efx_nic_cfg_get(sc->enp)->enc_evq_moderation_max) { + efx_nic_cfg_get(sc->enp)->enc_evq_timer_max_us) { error = EINVAL; goto out; } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:12:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B72A690E; Wed, 25 Mar 2015 13:12:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A02B5F58; Wed, 25 Mar 2015 13:12:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDCHuJ069410; Wed, 25 Mar 2015 13:12:17 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDCGSF069407; Wed, 25 Mar 2015 13:12:16 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251312.t2PDCGSF069407@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:12:16 +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: r280589 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:12:17 -0000 Author: arybchik Date: Wed Mar 25 13:12:15 2015 New Revision: 280589 URL: https://svnweb.freebsd.org/changeset/base/280589 Log: MFC: 279183 sfxge: add common code support for changing TX queue pace To delay packets from a particular TX queue by a particular time, write a value into the TX Pace table s.t. pace time <= TX Pace Clock Period * (2 ^ pace value) - the TX pace clock is 1/13 of the system clock, so its period should be 104 or 52 ns depending on whether turbo mode is active. EFX_TX_PACE_CLOCK_BASE added by me. Submitted by: Mark Spender Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_regs.h stable/10/sys/dev/sfxge/common/efx_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 13:11:19 2015 (r280588) +++ stable/10/sys/dev/sfxge/common/efx.h Wed Mar 25 13:12:15 2015 (r280589) @@ -1736,6 +1736,11 @@ efx_tx_qpost( __in unsigned int completed, __inout unsigned int *addedp); +extern __checkReturn int +efx_tx_qpace( + __in efx_txq_t *etp, + __in unsigned int ns); + extern void efx_tx_qpush( __in efx_txq_t *etp, Modified: stable/10/sys/dev/sfxge/common/efx_regs.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_regs.h Wed Mar 25 13:11:19 2015 (r280588) +++ stable/10/sys/dev/sfxge/common/efx_regs.h Wed Mar 25 13:12:15 2015 (r280589) @@ -34,6 +34,13 @@ extern "C" { #endif +/************************************************************************** + * + * Falcon/Siena registers and descriptors + * + ************************************************************************** + */ + /* * FR_AB_EE_VPD_CFG0_REG_SF(128bit): * SPI/VPD configuration register 0 @@ -3838,6 +3845,18 @@ extern "C" { #define FSF_AZ_DRIVER_EV_RX_DESCQ_ID_WIDTH 12 + +/************************************************************************** + * + * Falcon non-volatile configuration + * + ************************************************************************** + */ + + +#define FR_AZ_TX_PACE_TBL_OFST FR_BZ_TX_PACE_TBL_OFST + + #ifdef __cplusplus } #endif Modified: stable/10/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 13:11:19 2015 (r280588) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Wed Mar 25 13:12:15 2015 (r280589) @@ -224,6 +224,53 @@ efx_tx_qpush( etp->et_index, &dword, B_FALSE); } +#define EFX_MAX_PACE_VALUE 20 +#define EFX_TX_PACE_CLOCK_BASE 104 + + __checkReturn int +efx_tx_qpace( + __in efx_txq_t *etp, + __in unsigned int ns) +{ + efx_nic_t *enp = etp->et_enp; + efx_nic_cfg_t *encp = &(enp->en_nic_cfg); + efx_oword_t oword; + unsigned int pace_val; + unsigned int timer_period; + int rc; + + EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); + + if (ns == 0) { + pace_val = 0; + } else { + /* + * The pace_val to write into the table is s.t + * ns <= timer_period * (2 ^ pace_val) + */ + timer_period = EFX_TX_PACE_CLOCK_BASE / encp->enc_clk_mult; + for (pace_val = 1; pace_val <= EFX_MAX_PACE_VALUE; pace_val++) { + if ((timer_period << pace_val) >= ns) + break; + } + } + if (pace_val > EFX_MAX_PACE_VALUE) { + rc = EINVAL; + goto fail1; + } + + /* Update the pacing table */ + EFX_POPULATE_OWORD_1(oword, FRF_AZ_TX_PACE, pace_val); + EFX_BAR_TBL_WRITEO(enp, FR_AZ_TX_PACE_TBL, etp->et_index, &oword); + + return (0); + +fail1: + EFSYS_PROBE1(fail1, int, rc); + + return (rc); +} + void efx_tx_qflush( __in efx_txq_t *etp) @@ -234,6 +281,8 @@ efx_tx_qflush( EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC); + efx_tx_qpace(etp, 0); + label = etp->et_index; /* Flush the queue */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:13:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3730CA81; Wed, 25 Mar 2015 13:13:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04354F78; Wed, 25 Mar 2015 13:13:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDDXto069628; Wed, 25 Mar 2015 13:13:33 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDDXil069627; Wed, 25 Mar 2015 13:13:33 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251313.t2PDDXil069627@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:13: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: r280590 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:13:34 -0000 Author: arybchik Date: Wed Mar 25 13:13:32 2015 New Revision: 280590 URL: https://svnweb.freebsd.org/changeset/base/280590 Log: MFC: 279230 sfxge: use goto to cleanup to avoid duplicate cleanup code Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_dma.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:12:15 2015 (r280589) +++ stable/10/sys/dev/sfxge/sfxge_dma.c Wed Mar 25 13:13:32 2015 (r280590) @@ -137,7 +137,7 @@ sfxge_dma_alloc(struct sfxge_softc *sc, MIN(0x3FFFFFFFFFFFUL, BUS_SPACE_MAXADDR), BUS_SPACE_MAXADDR, NULL, NULL, len, 1, len, 0, NULL, NULL, &esmp->esm_tag) != 0) { device_printf(sc->dev, "Couldn't allocate txq DMA tag\n"); - return (ENOMEM); + goto fail_tag_create; } /* Allocate kernel memory. */ @@ -145,17 +145,14 @@ sfxge_dma_alloc(struct sfxge_softc *sc, BUS_DMA_WAITOK | BUS_DMA_COHERENT | BUS_DMA_ZERO, &esmp->esm_map) != 0) { device_printf(sc->dev, "Couldn't allocate DMA memory\n"); - bus_dma_tag_destroy(esmp->esm_tag); - return (ENOMEM); + goto fail_alloc; } /* Load map into device memory. */ if (bus_dmamap_load(esmp->esm_tag, esmp->esm_map, vaddr, len, sfxge_dma_cb, &esmp->esm_addr, 0) != 0) { device_printf(sc->dev, "Couldn't load DMA mapping\n"); - bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map); - bus_dma_tag_destroy(esmp->esm_tag); - return (ENOMEM); + goto fail_load; } /* @@ -163,15 +160,20 @@ sfxge_dma_alloc(struct sfxge_softc *sc, * and will have set esm_addr to 0 if something went * wrong. */ - if (esmp->esm_addr == 0) { - bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map); - bus_dma_tag_destroy(esmp->esm_tag); - return (ENOMEM); - } + if (esmp->esm_addr == 0) + goto fail_load_check; esmp->esm_base = vaddr; return (0); + +fail_load_check: +fail_load: + bus_dmamem_free(esmp->esm_tag, vaddr, esmp->esm_map); +fail_alloc: + bus_dma_tag_destroy(esmp->esm_tag); +fail_tag_create: + return (ENOMEM); } void From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:14:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0B416CA9; Wed, 25 Mar 2015 13:14:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7536F90; Wed, 25 Mar 2015 13:14:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDEQNR069924; Wed, 25 Mar 2015 13:14:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDEQSa069921; Wed, 25 Mar 2015 13:14:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251314.t2PDEQSa069921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:14: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: r280591 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:14:27 -0000 Author: hselasky Date: Wed Mar 25 13:14:25 2015 New Revision: 280591 URL: https://svnweb.freebsd.org/changeset/base/280591 Log: MFC r280322 and r280429: The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. PR: 198444 Modified: stable/10/sys/dev/sound/usb/uaudio.c stable/10/sys/dev/sound/usb/uaudio.h stable/10/sys/dev/sound/usb/uaudio_pcm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:13:32 2015 (r280590) +++ stable/10/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:14:25 2015 (r280591) @@ -218,26 +218,25 @@ struct uaudio_chan { uint32_t sample_rem; uint32_t sample_curr; uint32_t max_buf; + int32_t jitter_rem; + int32_t jitter_curr; + + int feedback_rate; uint32_t pcm_format[2]; uint16_t bytes_per_frame[2]; - uint8_t num_alt; - uint8_t cur_alt; - uint8_t set_alt; - uint8_t operation; + uint32_t intr_counter; + uint32_t running; + uint32_t num_alt; + uint32_t cur_alt; + uint32_t set_alt; + uint32_t operation; #define CHAN_OP_NONE 0 #define CHAN_OP_START 1 #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - - /* USB audio feedback endpoint state */ - struct { - uint16_t time; /* I/O interrupt count */ - int16_t constant; /* sample rate adjustment in Hz */ - int16_t remainder; /* current remainder */ - } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1096,6 +1095,11 @@ uaudio_attach_sub(device_t dev, kobj_cla uaudio_mixer_register_sysctl(sc, dev); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "feedback_rate", CTLFLAG_RD, &sc->sc_play_chan.feedback_rate, + 0, "Feedback sample rate in Hz"); + return (0); /* success */ detach: @@ -1294,7 +1298,6 @@ uaudio_configure_msg_sub(struct uaudio_s chan->frames_per_second = fps; chan->sample_rem = chan_alt->sample_rate % fps; chan->sample_curr = 0; - chan->frames_per_second = fps; /* compute required buffer size */ buf_size = (chan->bytes_per_frame[1] * frames); @@ -1974,7 +1977,7 @@ uaudio_chan_play_sync_callback(struct us { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint64_t sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; int len; @@ -2017,6 +2020,8 @@ uaudio_chan_play_sync_callback(struct us temp *= 125ULL; + sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + /* auto adjust */ while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; @@ -2024,35 +2029,17 @@ uaudio_chan_play_sync_callback(struct us while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* - * Some USB audio devices only report a sample rate - * different from the nominal one when they want one - * more or less sample. Make sure we catch this case - * by pulling the sample rate offset slowly towards - * zero if the reported value is equal to the sample - * rate. - */ - if (temp > sample_rate) - ch->feedback.constant += 1; - else if (temp < sample_rate) - ch->feedback.constant -= 1; - else if (ch->feedback.constant > 0) - ch->feedback.constant--; - else if (ch->feedback.constant < 0) - ch->feedback.constant++; - - DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", - (int)temp, (int)sample_rate, (int)ch->feedback.constant); + DPRINTF("Comparing %d Hz :: %d Hz\n", + (int)temp, (int)sample_rate); /* - * Range check sync constant. We cannot change the - * number of samples per second by more than the value - * defined by "UAUDIO_IRQS": + * Use feedback value as fallback when there is no + * recording channel: */ - if (ch->feedback.constant > UAUDIO_IRQS) - ch->feedback.constant = UAUDIO_IRQS; - else if (ch->feedback.constant < -UAUDIO_IRQS) - ch->feedback.constant = -UAUDIO_IRQS; + if (ch->priv_sc->sc_rec_chan.num_alt == 0) + ch->jitter_curr = temp - sample_rate; + + ch->feedback_rate = temp; break; case USB_ST_SETUP: @@ -2066,43 +2053,98 @@ uaudio_chan_play_sync_callback(struct us } } +static int +uaudio_chan_is_async(struct uaudio_chan *ch, uint8_t alt) +{ + uint8_t attr = ch->usb_alt[alt].p_ed1->bmAttributes; + return (UE_GET_ISO_TYPE(attr) == UE_ISO_ASYNC); +} + static void uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) { struct uaudio_chan *ch = usbd_xfer_softc(xfer); + struct uaudio_chan *ch_rec; struct usb_page_cache *pc; - uint32_t sample_size = ch->usb_alt[ch->cur_alt].sample_size; uint32_t mfl; uint32_t total; uint32_t blockcount; uint32_t n; uint32_t offset; + int sample_size; int actlen; int sumlen; - usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - - if (ch->end == ch->start) { - DPRINTF("no buffer!\n"); + if (ch->running == 0 || ch->start == ch->end) { + DPRINTF("not running or no buffer!\n"); return; } + /* check if there is a record channel */ + if (ch->priv_sc->sc_rec_chan.num_alt > 0) + ch_rec = &ch->priv_sc->sc_rec_chan; + else + ch_rec = NULL; + + usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); + switch (USB_GET_STATE(xfer)) { + case USB_ST_SETUP: +tr_setup: + if (ch_rec != NULL) { + /* reset receive jitter counters */ + mtx_lock(ch_rec->pcm_mtx); + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + mtx_unlock(ch_rec->pcm_mtx); + } + + /* reset transmit jitter counters */ + ch->jitter_curr = 0; + ch->jitter_rem = 0; + + /* FALLTHROUGH */ case USB_ST_TRANSFERRED: -tr_transferred: if (actlen < sumlen) { DPRINTF("short transfer, " "%d of %d bytes\n", actlen, sumlen); } chn_intr(ch->pcm_ch); + /* + * Check for asynchronous playback endpoint and that + * the playback endpoint is properly configured: + */ + if (ch_rec != NULL && + uaudio_chan_is_async(ch, ch->cur_alt) != 0) { + mtx_lock(ch_rec->pcm_mtx); + if (ch_rec->cur_alt < ch_rec->num_alt) { + int64_t tx_jitter; + int64_t rx_rate; + + /* translate receive jitter into transmit jitter */ + tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; + tx_jitter = (tx_jitter * ch_rec->jitter_curr) + + ch->jitter_rem; + + /* reset receive jitter counters */ + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + + /* compute exact number of transmit jitter samples */ + rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + ch->jitter_curr += tx_jitter / rx_rate; + ch->jitter_rem = tx_jitter % rx_rate; + } + mtx_unlock(ch_rec->pcm_mtx); + } + /* start the SYNC transfer one time per second, if any */ - if (++(ch->feedback.time) >= UAUDIO_IRQS) { - ch->feedback.time = 0; + if (++(ch->intr_counter) >= UAUDIO_IRQS) { + ch->intr_counter = 0; usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } - case USB_ST_SETUP: mfl = usbd_xfer_max_framelen(xfer); if (ch->bytes_per_frame[1] > mfl) { @@ -2118,6 +2160,9 @@ tr_transferred: /* setup number of frames */ usbd_xfer_set_frames(xfer, blockcount); + /* get sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + /* reset total length */ total = 0; @@ -2133,31 +2178,23 @@ tr_transferred: frame_len = ch->bytes_per_frame[0]; } - if (n == (blockcount - 1)) { - /* - * Update sync remainder and check if - * we should transmit more or less - * data: - */ - ch->feedback.remainder += ch->feedback.constant; - if (ch->feedback.remainder >= UAUDIO_IRQS) { - ch->feedback.remainder -= UAUDIO_IRQS; - DPRINTFN(6, "sending one sample more\n"); - if ((frame_len + sample_size) <= mfl) - frame_len += sample_size; - } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { - ch->feedback.remainder += UAUDIO_IRQS; - DPRINTFN(6, "sending one sample less\n"); - if (frame_len >= sample_size) - frame_len -= sample_size; - } + /* handle free running clock case */ + if (ch->jitter_curr > 0 && + (frame_len + sample_size) <= mfl) { + DPRINTFN(6, "sending one sample more\n"); + ch->jitter_curr--; + frame_len += sample_size; + } else if (ch->jitter_curr < 0 && + frame_len >= sample_size) { + DPRINTFN(6, "sending one sample less\n"); + ch->jitter_curr++; + frame_len -= sample_size; } - usbd_xfer_set_frame_len(xfer, n, frame_len); total += frame_len; } - DPRINTFN(6, "transfer %d bytes\n", total); + DPRINTFN(6, "transferring %d bytes\n", total); offset = 0; @@ -2165,28 +2202,25 @@ tr_transferred: while (total > 0) { n = (ch->end - ch->cur); - if (n > total) { + if (n > total) n = total; - } + usbd_copy_in(pc, offset, ch->cur, n); total -= n; ch->cur += n; offset += n; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } - usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_transferred; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2202,36 +2236,59 @@ uaudio_chan_record_callback(struct usb_x struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; uint32_t offset0; - uint32_t offset1; uint32_t mfl; int m; int n; int len; int actlen; int nframes; - int blockcount; - - usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); - mfl = usbd_xfer_max_framelen(xfer); + int expected_bytes; + int sample_size; - if (ch->end == ch->start) { + if (ch->start == ch->end) { DPRINTF("no buffer!\n"); return; } + usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); + mfl = usbd_xfer_max_framelen(xfer); + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - DPRINTFN(6, "transferred %d bytes\n", actlen); - offset0 = 0; pc = usbd_xfer_get_frame(xfer, 0); + /* try to compute the number of expected bytes */ + ch->sample_curr += (ch->sample_rem * ch->intr_frames); + + /* compute number of expected bytes */ + expected_bytes = (ch->intr_frames * ch->bytes_per_frame[0]) + + ((ch->sample_curr / ch->frames_per_second) * + (ch->bytes_per_frame[1] - ch->bytes_per_frame[0])); + + /* keep remainder */ + ch->sample_curr %= ch->frames_per_second; + + /* get current sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + for (n = 0; n != nframes; n++) { + uint32_t offset1 = offset0; - offset1 = offset0; len = usbd_xfer_frame_len(xfer, n); + /* make sure we only receive complete samples */ + len = len - (len % sample_size); + + /* subtract bytes received from expected payload */ + expected_bytes -= len; + + /* don't receive data when not ready */ + if (ch->running == 0 || ch->cur_alt != ch->set_alt) + continue; + + /* fill ring buffer with samples, if any */ while (len > 0) { m = (ch->end - ch->cur); @@ -2245,33 +2302,46 @@ uaudio_chan_record_callback(struct usb_x offset1 += m; ch->cur += m; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } offset0 += mfl; } - chn_intr(ch->pcm_ch); + /* update current jitter */ + ch->jitter_curr -= (expected_bytes / sample_size); + + /* don't allow a huge amount of jitter to accumulate */ + nframes = 2 * ch->intr_frames; + + /* range check current jitter */ + if (ch->jitter_curr < -nframes) + ch->jitter_curr = -nframes; + else if (ch->jitter_curr > nframes) + ch->jitter_curr = nframes; + + DPRINTFN(6, "transferred %d bytes, jitter %d samples\n", + actlen, ch->jitter_curr); + + if (ch->running != 0) + chn_intr(ch->pcm_ch); case USB_ST_SETUP: tr_setup: - blockcount = ch->intr_frames; + nframes = ch->intr_frames; - usbd_xfer_set_frames(xfer, blockcount); - for (n = 0; n < blockcount; n++) { + usbd_xfer_set_frames(xfer, nframes); + for (n = 0; n != nframes; n++) usbd_xfer_set_frame_len(xfer, n, mfl); - } usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_setup; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2344,13 +2414,7 @@ int uaudio_chan_set_param_blocksize(struct uaudio_chan *ch, uint32_t blocksize) { uint32_t temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); - sndbuf_setup(ch->pcm_buf, ch->buf, temp); - - ch->start = ch->buf; - ch->end = ch->buf + temp; - ch->cur = ch->buf; - return (temp / 2); } @@ -2364,8 +2428,11 @@ uaudio_chan_set_param_fragments(struct u int uaudio_chan_set_param_speed(struct uaudio_chan *ch, uint32_t speed) { + struct uaudio_softc *sc; uint8_t x; + sc = ch->priv_sc; + for (x = 0; x < ch->num_alt; x++) { if (ch->usb_alt[x].sample_rate < speed) { /* sample rate is too low */ @@ -2376,7 +2443,9 @@ uaudio_chan_set_param_speed(struct uaudi if (x != 0) x--; + usb_proc_explore_lock(sc->sc_udev); ch->set_alt = x; + usb_proc_explore_unlock(sc->sc_udev); DPRINTF("Selecting alt %d\n", (int)x); @@ -2447,16 +2516,16 @@ uaudio_chan_set_param_format(struct uaud return (0); } -int -uaudio_chan_start(struct uaudio_chan *ch) +static void +uaudio_chan_start_sub(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; int do_start = 0; - usb_proc_explore_lock(sc->sc_udev); if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_start = 1; } else { @@ -2465,28 +2534,81 @@ uaudio_chan_start(struct uaudio_chan *ch &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - - /* reset feedback endpoint state */ - memset(&ch->feedback, 0, sizeof(ch->feedback)); - if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); } - return (0); } -int -uaudio_chan_stop(struct uaudio_chan *ch) +static int +uaudio_chan_need_both(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running != 0 && + uaudio_chan_is_async(&sc->sc_play_chan, + sc->sc_play_chan.set_alt) != 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +static int +uaudio_chan_need_none(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running == 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +void +uaudio_chan_start(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; - int do_stop = 0; + /* make operation atomic */ usb_proc_explore_lock(sc->sc_udev); + + /* check if not running */ + if (ch->running == 0) { + uint32_t temp; + + /* get current buffer size */ + temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); + + /* set running flag */ + ch->running = 1; + + /* ensure the hardware buffer is reset */ + ch->start = ch->buf; + ch->end = ch->buf + temp; + ch->cur = ch->buf; + + if (uaudio_chan_need_both(sc)) { + /* + * Start both endpoints because of need for + * jitter information: + */ + uaudio_chan_start_sub(&sc->sc_rec_chan); + uaudio_chan_start_sub(&sc->sc_play_chan); + } else { + uaudio_chan_start_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); +} + +static void +uaudio_chan_stop_sub(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + int do_stop = 0; + if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_stop = 1; } else { @@ -2495,13 +2617,44 @@ uaudio_chan_stop(struct uaudio_chan *ch) &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - if (do_stop) { usbd_transfer_stop(ch->xfer[0]); usbd_transfer_stop(ch->xfer[1]); } - return (0); +} + +void +uaudio_chan_stop(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + + /* make operation atomic */ + usb_proc_explore_lock(sc->sc_udev); + + /* check if running */ + if (ch->running != 0) { + /* clear running flag */ + ch->running = 0; + + if (uaudio_chan_need_both(sc)) { + /* + * Leave the endpoints running because we need + * information about jitter! + */ + } else if (uaudio_chan_need_none(sc)) { + /* + * Stop both endpoints in case the one was used for + * jitter information: + */ + uaudio_chan_stop_sub(&sc->sc_rec_chan); + uaudio_chan_stop_sub(&sc->sc_play_chan); + } else { + uaudio_chan_stop_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); } /*========================================================================* Modified: stable/10/sys/dev/sound/usb/uaudio.h ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.h Wed Mar 25 13:13:32 2015 (r280590) +++ stable/10/sys/dev/sound/usb/uaudio.h Wed Mar 25 13:14:25 2015 (r280591) @@ -54,8 +54,8 @@ extern struct pcmchan_matrix *uaudio_cha uint32_t format); extern int uaudio_chan_set_param_format(struct uaudio_chan *ch, uint32_t format); -extern int uaudio_chan_start(struct uaudio_chan *ch); -extern int uaudio_chan_stop(struct uaudio_chan *ch); +extern void uaudio_chan_start(struct uaudio_chan *ch); +extern void uaudio_chan_stop(struct uaudio_chan *ch); extern int uaudio_mixer_init_sub(struct uaudio_softc *sc, struct snd_mixer *m); extern int uaudio_mixer_uninit_sub(struct uaudio_softc *sc); Modified: stable/10/sys/dev/sound/usb/uaudio_pcm.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio_pcm.c Wed Mar 25 13:13:32 2015 (r280590) +++ stable/10/sys/dev/sound/usb/uaudio_pcm.c Wed Mar 25 13:14:25 2015 (r280591) @@ -81,14 +81,14 @@ ua_chan_setfragments(kobj_t obj, void *d static int ua_chan_trigger(kobj_t obj, void *data, int go) { - if (!PCMTRIG_COMMON(go)) { - return (0); - } - if (go == PCMTRIG_START) { - return (uaudio_chan_start(data)); - } else { - return (uaudio_chan_stop(data)); + if (PCMTRIG_COMMON(go)) { + if (go == PCMTRIG_START) { + uaudio_chan_start(data); + } else { + uaudio_chan_stop(data); + } } + return (0); } static uint32_t From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:14:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7855DEA3; Wed, 25 Mar 2015 13:14:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4658EF9F; Wed, 25 Mar 2015 13:14:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDEq4A070051; Wed, 25 Mar 2015 13:14:52 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDEpew070046; Wed, 25 Mar 2015 13:14:51 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251314.t2PDEpew070046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:14:51 +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: r280592 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:14:52 -0000 Author: arybchik Date: Wed Mar 25 13:14:50 2015 New Revision: 280592 URL: https://svnweb.freebsd.org/changeset/base/280592 Log: MFC: 279231 sfxge: add put-list high watermark It is interesting to know how long put-list grows. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:14:25 2015 (r280591) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:14:50 2015 (r280592) @@ -214,6 +214,9 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * count++; } while (mbuf != NULL); + if (count > stdp->std_put_hiwat) + stdp->std_put_hiwat = count; + /* Append the reversed put list to the get list. */ KASSERT(*get_tailp == NULL, ("*get_tailp != NULL")); *stdp->std_getp = get_next; @@ -1484,6 +1487,10 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SYSCTL_CHILDREN(txq_node), OID_AUTO, "dpl_get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_hiwat, 0, ""); + SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), + SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl_put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + &stdp->std_put_hiwat, 0, ""); #endif txq->type = type; Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:14:25 2015 (r280591) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:14:50 2015 (r280592) @@ -102,6 +102,8 @@ struct sfxge_tx_dpl { * in get list */ unsigned int std_get_hiwat; /* Packets in get list * high watermark */ + unsigned int std_put_hiwat; /* Packets in put list + * high watermark */ }; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:15:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9831B9; Wed, 25 Mar 2015 13:15:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8084AFBF; Wed, 25 Mar 2015 13:15:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDFmJp070289; Wed, 25 Mar 2015 13:15:48 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDFms1070288; Wed, 25 Mar 2015 13:15:48 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251315.t2PDFms1070288@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:15:48 +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: r280593 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:15:48 -0000 Author: arybchik Date: Wed Mar 25 13:15:47 2015 New Revision: 280593 URL: https://svnweb.freebsd.org/changeset/base/280593 Log: MFC: 279266 sfxge: correct limit for number of Rx queues Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/common/efx_impl.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_impl.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:14:50 2015 (r280592) +++ stable/10/sys/dev/sfxge/common/efx_impl.h Wed Mar 25 13:15:47 2015 (r280593) @@ -204,7 +204,7 @@ typedef struct efx_nic_ops_s { # define EFX_TXQ_LIMIT_TARGET 259 #endif #ifndef EFX_RXQ_LIMIT_TARGET -# define EFX_RXQ_LIMIT_TARGET 768 +# define EFX_RXQ_LIMIT_TARGET 512 #endif #ifndef EFX_TXQ_DC_SIZE #define EFX_TXQ_DC_SIZE 1 /* 16 descriptors */ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:16:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9B08301; Wed, 25 Mar 2015 13:16:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91AA8FEA; Wed, 25 Mar 2015 13:16:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDGfEQ070474; Wed, 25 Mar 2015 13:16:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDGeYU070471; Wed, 25 Mar 2015 13:16:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251316.t2PDGeYU070471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:16:40 +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: r280594 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:16:41 -0000 Author: hselasky Date: Wed Mar 25 13:16:39 2015 New Revision: 280594 URL: https://svnweb.freebsd.org/changeset/base/280594 Log: MFC r280322 and r280429: The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. PR: 198444 Modified: stable/9/sys/dev/sound/usb/uaudio.c stable/9/sys/dev/sound/usb/uaudio.h stable/9/sys/dev/sound/usb/uaudio_pcm.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:15:47 2015 (r280593) +++ stable/9/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:16:39 2015 (r280594) @@ -218,26 +218,25 @@ struct uaudio_chan { uint32_t sample_rem; uint32_t sample_curr; uint32_t max_buf; + int32_t jitter_rem; + int32_t jitter_curr; + + int feedback_rate; uint32_t pcm_format[2]; uint16_t bytes_per_frame[2]; - uint8_t num_alt; - uint8_t cur_alt; - uint8_t set_alt; - uint8_t operation; + uint32_t intr_counter; + uint32_t running; + uint32_t num_alt; + uint32_t cur_alt; + uint32_t set_alt; + uint32_t operation; #define CHAN_OP_NONE 0 #define CHAN_OP_START 1 #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - - /* USB audio feedback endpoint state */ - struct { - uint16_t time; /* I/O interrupt count */ - int16_t constant; /* sample rate adjustment in Hz */ - int16_t remainder; /* current remainder */ - } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1096,6 +1095,11 @@ uaudio_attach_sub(device_t dev, kobj_cla uaudio_mixer_register_sysctl(sc, dev); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "feedback_rate", CTLFLAG_RD, &sc->sc_play_chan.feedback_rate, + 0, "Feedback sample rate in Hz"); + return (0); /* success */ detach: @@ -1294,7 +1298,6 @@ uaudio_configure_msg_sub(struct uaudio_s chan->frames_per_second = fps; chan->sample_rem = chan_alt->sample_rate % fps; chan->sample_curr = 0; - chan->frames_per_second = fps; /* compute required buffer size */ buf_size = (chan->bytes_per_frame[1] * frames); @@ -1974,7 +1977,7 @@ uaudio_chan_play_sync_callback(struct us { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint64_t sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; int len; @@ -2017,6 +2020,8 @@ uaudio_chan_play_sync_callback(struct us temp *= 125ULL; + sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + /* auto adjust */ while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; @@ -2024,35 +2029,17 @@ uaudio_chan_play_sync_callback(struct us while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* - * Some USB audio devices only report a sample rate - * different from the nominal one when they want one - * more or less sample. Make sure we catch this case - * by pulling the sample rate offset slowly towards - * zero if the reported value is equal to the sample - * rate. - */ - if (temp > sample_rate) - ch->feedback.constant += 1; - else if (temp < sample_rate) - ch->feedback.constant -= 1; - else if (ch->feedback.constant > 0) - ch->feedback.constant--; - else if (ch->feedback.constant < 0) - ch->feedback.constant++; - - DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", - (int)temp, (int)sample_rate, (int)ch->feedback.constant); + DPRINTF("Comparing %d Hz :: %d Hz\n", + (int)temp, (int)sample_rate); /* - * Range check sync constant. We cannot change the - * number of samples per second by more than the value - * defined by "UAUDIO_IRQS": + * Use feedback value as fallback when there is no + * recording channel: */ - if (ch->feedback.constant > UAUDIO_IRQS) - ch->feedback.constant = UAUDIO_IRQS; - else if (ch->feedback.constant < -UAUDIO_IRQS) - ch->feedback.constant = -UAUDIO_IRQS; + if (ch->priv_sc->sc_rec_chan.num_alt == 0) + ch->jitter_curr = temp - sample_rate; + + ch->feedback_rate = temp; break; case USB_ST_SETUP: @@ -2066,43 +2053,98 @@ uaudio_chan_play_sync_callback(struct us } } +static int +uaudio_chan_is_async(struct uaudio_chan *ch, uint8_t alt) +{ + uint8_t attr = ch->usb_alt[alt].p_ed1->bmAttributes; + return (UE_GET_ISO_TYPE(attr) == UE_ISO_ASYNC); +} + static void uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) { struct uaudio_chan *ch = usbd_xfer_softc(xfer); + struct uaudio_chan *ch_rec; struct usb_page_cache *pc; - uint32_t sample_size = ch->usb_alt[ch->cur_alt].sample_size; uint32_t mfl; uint32_t total; uint32_t blockcount; uint32_t n; uint32_t offset; + int sample_size; int actlen; int sumlen; - usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - - if (ch->end == ch->start) { - DPRINTF("no buffer!\n"); + if (ch->running == 0 || ch->start == ch->end) { + DPRINTF("not running or no buffer!\n"); return; } + /* check if there is a record channel */ + if (ch->priv_sc->sc_rec_chan.num_alt > 0) + ch_rec = &ch->priv_sc->sc_rec_chan; + else + ch_rec = NULL; + + usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); + switch (USB_GET_STATE(xfer)) { + case USB_ST_SETUP: +tr_setup: + if (ch_rec != NULL) { + /* reset receive jitter counters */ + mtx_lock(ch_rec->pcm_mtx); + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + mtx_unlock(ch_rec->pcm_mtx); + } + + /* reset transmit jitter counters */ + ch->jitter_curr = 0; + ch->jitter_rem = 0; + + /* FALLTHROUGH */ case USB_ST_TRANSFERRED: -tr_transferred: if (actlen < sumlen) { DPRINTF("short transfer, " "%d of %d bytes\n", actlen, sumlen); } chn_intr(ch->pcm_ch); + /* + * Check for asynchronous playback endpoint and that + * the playback endpoint is properly configured: + */ + if (ch_rec != NULL && + uaudio_chan_is_async(ch, ch->cur_alt) != 0) { + mtx_lock(ch_rec->pcm_mtx); + if (ch_rec->cur_alt < ch_rec->num_alt) { + int64_t tx_jitter; + int64_t rx_rate; + + /* translate receive jitter into transmit jitter */ + tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; + tx_jitter = (tx_jitter * ch_rec->jitter_curr) + + ch->jitter_rem; + + /* reset receive jitter counters */ + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + + /* compute exact number of transmit jitter samples */ + rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + ch->jitter_curr += tx_jitter / rx_rate; + ch->jitter_rem = tx_jitter % rx_rate; + } + mtx_unlock(ch_rec->pcm_mtx); + } + /* start the SYNC transfer one time per second, if any */ - if (++(ch->feedback.time) >= UAUDIO_IRQS) { - ch->feedback.time = 0; + if (++(ch->intr_counter) >= UAUDIO_IRQS) { + ch->intr_counter = 0; usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } - case USB_ST_SETUP: mfl = usbd_xfer_max_framelen(xfer); if (ch->bytes_per_frame[1] > mfl) { @@ -2118,6 +2160,9 @@ tr_transferred: /* setup number of frames */ usbd_xfer_set_frames(xfer, blockcount); + /* get sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + /* reset total length */ total = 0; @@ -2133,31 +2178,23 @@ tr_transferred: frame_len = ch->bytes_per_frame[0]; } - if (n == (blockcount - 1)) { - /* - * Update sync remainder and check if - * we should transmit more or less - * data: - */ - ch->feedback.remainder += ch->feedback.constant; - if (ch->feedback.remainder >= UAUDIO_IRQS) { - ch->feedback.remainder -= UAUDIO_IRQS; - DPRINTFN(6, "sending one sample more\n"); - if ((frame_len + sample_size) <= mfl) - frame_len += sample_size; - } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { - ch->feedback.remainder += UAUDIO_IRQS; - DPRINTFN(6, "sending one sample less\n"); - if (frame_len >= sample_size) - frame_len -= sample_size; - } + /* handle free running clock case */ + if (ch->jitter_curr > 0 && + (frame_len + sample_size) <= mfl) { + DPRINTFN(6, "sending one sample more\n"); + ch->jitter_curr--; + frame_len += sample_size; + } else if (ch->jitter_curr < 0 && + frame_len >= sample_size) { + DPRINTFN(6, "sending one sample less\n"); + ch->jitter_curr++; + frame_len -= sample_size; } - usbd_xfer_set_frame_len(xfer, n, frame_len); total += frame_len; } - DPRINTFN(6, "transfer %d bytes\n", total); + DPRINTFN(6, "transferring %d bytes\n", total); offset = 0; @@ -2165,28 +2202,25 @@ tr_transferred: while (total > 0) { n = (ch->end - ch->cur); - if (n > total) { + if (n > total) n = total; - } + usbd_copy_in(pc, offset, ch->cur, n); total -= n; ch->cur += n; offset += n; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } - usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_transferred; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2202,36 +2236,59 @@ uaudio_chan_record_callback(struct usb_x struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; uint32_t offset0; - uint32_t offset1; uint32_t mfl; int m; int n; int len; int actlen; int nframes; - int blockcount; - - usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); - mfl = usbd_xfer_max_framelen(xfer); + int expected_bytes; + int sample_size; - if (ch->end == ch->start) { + if (ch->start == ch->end) { DPRINTF("no buffer!\n"); return; } + usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); + mfl = usbd_xfer_max_framelen(xfer); + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - DPRINTFN(6, "transferred %d bytes\n", actlen); - offset0 = 0; pc = usbd_xfer_get_frame(xfer, 0); + /* try to compute the number of expected bytes */ + ch->sample_curr += (ch->sample_rem * ch->intr_frames); + + /* compute number of expected bytes */ + expected_bytes = (ch->intr_frames * ch->bytes_per_frame[0]) + + ((ch->sample_curr / ch->frames_per_second) * + (ch->bytes_per_frame[1] - ch->bytes_per_frame[0])); + + /* keep remainder */ + ch->sample_curr %= ch->frames_per_second; + + /* get current sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + for (n = 0; n != nframes; n++) { + uint32_t offset1 = offset0; - offset1 = offset0; len = usbd_xfer_frame_len(xfer, n); + /* make sure we only receive complete samples */ + len = len - (len % sample_size); + + /* subtract bytes received from expected payload */ + expected_bytes -= len; + + /* don't receive data when not ready */ + if (ch->running == 0 || ch->cur_alt != ch->set_alt) + continue; + + /* fill ring buffer with samples, if any */ while (len > 0) { m = (ch->end - ch->cur); @@ -2245,33 +2302,46 @@ uaudio_chan_record_callback(struct usb_x offset1 += m; ch->cur += m; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } offset0 += mfl; } - chn_intr(ch->pcm_ch); + /* update current jitter */ + ch->jitter_curr -= (expected_bytes / sample_size); + + /* don't allow a huge amount of jitter to accumulate */ + nframes = 2 * ch->intr_frames; + + /* range check current jitter */ + if (ch->jitter_curr < -nframes) + ch->jitter_curr = -nframes; + else if (ch->jitter_curr > nframes) + ch->jitter_curr = nframes; + + DPRINTFN(6, "transferred %d bytes, jitter %d samples\n", + actlen, ch->jitter_curr); + + if (ch->running != 0) + chn_intr(ch->pcm_ch); case USB_ST_SETUP: tr_setup: - blockcount = ch->intr_frames; + nframes = ch->intr_frames; - usbd_xfer_set_frames(xfer, blockcount); - for (n = 0; n < blockcount; n++) { + usbd_xfer_set_frames(xfer, nframes); + for (n = 0; n != nframes; n++) usbd_xfer_set_frame_len(xfer, n, mfl); - } usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_setup; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2344,13 +2414,7 @@ int uaudio_chan_set_param_blocksize(struct uaudio_chan *ch, uint32_t blocksize) { uint32_t temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); - sndbuf_setup(ch->pcm_buf, ch->buf, temp); - - ch->start = ch->buf; - ch->end = ch->buf + temp; - ch->cur = ch->buf; - return (temp / 2); } @@ -2364,8 +2428,11 @@ uaudio_chan_set_param_fragments(struct u int uaudio_chan_set_param_speed(struct uaudio_chan *ch, uint32_t speed) { + struct uaudio_softc *sc; uint8_t x; + sc = ch->priv_sc; + for (x = 0; x < ch->num_alt; x++) { if (ch->usb_alt[x].sample_rate < speed) { /* sample rate is too low */ @@ -2376,7 +2443,9 @@ uaudio_chan_set_param_speed(struct uaudi if (x != 0) x--; + usb_proc_explore_lock(sc->sc_udev); ch->set_alt = x; + usb_proc_explore_unlock(sc->sc_udev); DPRINTF("Selecting alt %d\n", (int)x); @@ -2447,16 +2516,16 @@ uaudio_chan_set_param_format(struct uaud return (0); } -int -uaudio_chan_start(struct uaudio_chan *ch) +static void +uaudio_chan_start_sub(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; int do_start = 0; - usb_proc_explore_lock(sc->sc_udev); if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_start = 1; } else { @@ -2465,28 +2534,81 @@ uaudio_chan_start(struct uaudio_chan *ch &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - - /* reset feedback endpoint state */ - memset(&ch->feedback, 0, sizeof(ch->feedback)); - if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); } - return (0); } -int -uaudio_chan_stop(struct uaudio_chan *ch) +static int +uaudio_chan_need_both(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running != 0 && + uaudio_chan_is_async(&sc->sc_play_chan, + sc->sc_play_chan.set_alt) != 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +static int +uaudio_chan_need_none(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running == 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +void +uaudio_chan_start(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; - int do_stop = 0; + /* make operation atomic */ usb_proc_explore_lock(sc->sc_udev); + + /* check if not running */ + if (ch->running == 0) { + uint32_t temp; + + /* get current buffer size */ + temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); + + /* set running flag */ + ch->running = 1; + + /* ensure the hardware buffer is reset */ + ch->start = ch->buf; + ch->end = ch->buf + temp; + ch->cur = ch->buf; + + if (uaudio_chan_need_both(sc)) { + /* + * Start both endpoints because of need for + * jitter information: + */ + uaudio_chan_start_sub(&sc->sc_rec_chan); + uaudio_chan_start_sub(&sc->sc_play_chan); + } else { + uaudio_chan_start_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); +} + +static void +uaudio_chan_stop_sub(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + int do_stop = 0; + if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_stop = 1; } else { @@ -2495,13 +2617,44 @@ uaudio_chan_stop(struct uaudio_chan *ch) &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - if (do_stop) { usbd_transfer_stop(ch->xfer[0]); usbd_transfer_stop(ch->xfer[1]); } - return (0); +} + +void +uaudio_chan_stop(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + + /* make operation atomic */ + usb_proc_explore_lock(sc->sc_udev); + + /* check if running */ + if (ch->running != 0) { + /* clear running flag */ + ch->running = 0; + + if (uaudio_chan_need_both(sc)) { + /* + * Leave the endpoints running because we need + * information about jitter! + */ + } else if (uaudio_chan_need_none(sc)) { + /* + * Stop both endpoints in case the one was used for + * jitter information: + */ + uaudio_chan_stop_sub(&sc->sc_rec_chan); + uaudio_chan_stop_sub(&sc->sc_play_chan); + } else { + uaudio_chan_stop_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); } /*========================================================================* Modified: stable/9/sys/dev/sound/usb/uaudio.h ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.h Wed Mar 25 13:15:47 2015 (r280593) +++ stable/9/sys/dev/sound/usb/uaudio.h Wed Mar 25 13:16:39 2015 (r280594) @@ -54,8 +54,8 @@ extern struct pcmchan_matrix *uaudio_cha uint32_t format); extern int uaudio_chan_set_param_format(struct uaudio_chan *ch, uint32_t format); -extern int uaudio_chan_start(struct uaudio_chan *ch); -extern int uaudio_chan_stop(struct uaudio_chan *ch); +extern void uaudio_chan_start(struct uaudio_chan *ch); +extern void uaudio_chan_stop(struct uaudio_chan *ch); extern int uaudio_mixer_init_sub(struct uaudio_softc *sc, struct snd_mixer *m); extern int uaudio_mixer_uninit_sub(struct uaudio_softc *sc); Modified: stable/9/sys/dev/sound/usb/uaudio_pcm.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio_pcm.c Wed Mar 25 13:15:47 2015 (r280593) +++ stable/9/sys/dev/sound/usb/uaudio_pcm.c Wed Mar 25 13:16:39 2015 (r280594) @@ -81,14 +81,14 @@ ua_chan_setfragments(kobj_t obj, void *d static int ua_chan_trigger(kobj_t obj, void *data, int go) { - if (!PCMTRIG_COMMON(go)) { - return (0); - } - if (go == PCMTRIG_START) { - return (uaudio_chan_start(data)); - } else { - return (uaudio_chan_stop(data)); + if (PCMTRIG_COMMON(go)) { + if (go == PCMTRIG_START) { + uaudio_chan_start(data); + } else { + uaudio_chan_stop(data); + } } + return (0); } static uint32_t From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:18:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1258E46F; Wed, 25 Mar 2015 13:18:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE69529; Wed, 25 Mar 2015 13:18:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDIbcs070798; Wed, 25 Mar 2015 13:18:37 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDIbDi070795; Wed, 25 Mar 2015 13:18:37 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251318.t2PDIbDi070795@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:18:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r280595 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:18:38 -0000 Author: hselasky Date: Wed Mar 25 13:18:36 2015 New Revision: 280595 URL: https://svnweb.freebsd.org/changeset/base/280595 Log: MFC r280322 and r280429: The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. PR: 198444 Modified: stable/8/sys/dev/sound/usb/uaudio.c stable/8/sys/dev/sound/usb/uaudio.h stable/8/sys/dev/sound/usb/uaudio_pcm.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:16:39 2015 (r280594) +++ stable/8/sys/dev/sound/usb/uaudio.c Wed Mar 25 13:18:36 2015 (r280595) @@ -218,26 +218,25 @@ struct uaudio_chan { uint32_t sample_rem; uint32_t sample_curr; uint32_t max_buf; + int32_t jitter_rem; + int32_t jitter_curr; + + int feedback_rate; uint32_t pcm_format[2]; uint16_t bytes_per_frame[2]; - uint8_t num_alt; - uint8_t cur_alt; - uint8_t set_alt; - uint8_t operation; + uint32_t intr_counter; + uint32_t running; + uint32_t num_alt; + uint32_t cur_alt; + uint32_t set_alt; + uint32_t operation; #define CHAN_OP_NONE 0 #define CHAN_OP_START 1 #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - - /* USB audio feedback endpoint state */ - struct { - uint16_t time; /* I/O interrupt count */ - int16_t constant; /* sample rate adjustment in Hz */ - int16_t remainder; /* current remainder */ - } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1096,6 +1095,11 @@ uaudio_attach_sub(device_t dev, kobj_cla uaudio_mixer_register_sysctl(sc, dev); + SYSCTL_ADD_INT(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, + "feedback_rate", CTLFLAG_RD, &sc->sc_play_chan.feedback_rate, + 0, "Feedback sample rate in Hz"); + return (0); /* success */ detach: @@ -1294,7 +1298,6 @@ uaudio_configure_msg_sub(struct uaudio_s chan->frames_per_second = fps; chan->sample_rem = chan_alt->sample_rate % fps; chan->sample_curr = 0; - chan->frames_per_second = fps; /* compute required buffer size */ buf_size = (chan->bytes_per_frame[1] * frames); @@ -1974,7 +1977,7 @@ uaudio_chan_play_sync_callback(struct us { struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; - uint64_t sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + uint64_t sample_rate; uint8_t buf[4]; uint64_t temp; int len; @@ -2017,6 +2020,8 @@ uaudio_chan_play_sync_callback(struct us temp *= 125ULL; + sample_rate = ch->usb_alt[ch->cur_alt].sample_rate; + /* auto adjust */ while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; @@ -2024,35 +2029,17 @@ uaudio_chan_play_sync_callback(struct us while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* - * Some USB audio devices only report a sample rate - * different from the nominal one when they want one - * more or less sample. Make sure we catch this case - * by pulling the sample rate offset slowly towards - * zero if the reported value is equal to the sample - * rate. - */ - if (temp > sample_rate) - ch->feedback.constant += 1; - else if (temp < sample_rate) - ch->feedback.constant -= 1; - else if (ch->feedback.constant > 0) - ch->feedback.constant--; - else if (ch->feedback.constant < 0) - ch->feedback.constant++; - - DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", - (int)temp, (int)sample_rate, (int)ch->feedback.constant); + DPRINTF("Comparing %d Hz :: %d Hz\n", + (int)temp, (int)sample_rate); /* - * Range check sync constant. We cannot change the - * number of samples per second by more than the value - * defined by "UAUDIO_IRQS": + * Use feedback value as fallback when there is no + * recording channel: */ - if (ch->feedback.constant > UAUDIO_IRQS) - ch->feedback.constant = UAUDIO_IRQS; - else if (ch->feedback.constant < -UAUDIO_IRQS) - ch->feedback.constant = -UAUDIO_IRQS; + if (ch->priv_sc->sc_rec_chan.num_alt == 0) + ch->jitter_curr = temp - sample_rate; + + ch->feedback_rate = temp; break; case USB_ST_SETUP: @@ -2066,43 +2053,98 @@ uaudio_chan_play_sync_callback(struct us } } +static int +uaudio_chan_is_async(struct uaudio_chan *ch, uint8_t alt) +{ + uint8_t attr = ch->usb_alt[alt].p_ed1->bmAttributes; + return (UE_GET_ISO_TYPE(attr) == UE_ISO_ASYNC); +} + static void uaudio_chan_play_callback(struct usb_xfer *xfer, usb_error_t error) { struct uaudio_chan *ch = usbd_xfer_softc(xfer); + struct uaudio_chan *ch_rec; struct usb_page_cache *pc; - uint32_t sample_size = ch->usb_alt[ch->cur_alt].sample_size; uint32_t mfl; uint32_t total; uint32_t blockcount; uint32_t n; uint32_t offset; + int sample_size; int actlen; int sumlen; - usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); - - if (ch->end == ch->start) { - DPRINTF("no buffer!\n"); + if (ch->running == 0 || ch->start == ch->end) { + DPRINTF("not running or no buffer!\n"); return; } + /* check if there is a record channel */ + if (ch->priv_sc->sc_rec_chan.num_alt > 0) + ch_rec = &ch->priv_sc->sc_rec_chan; + else + ch_rec = NULL; + + usbd_xfer_status(xfer, &actlen, &sumlen, NULL, NULL); + switch (USB_GET_STATE(xfer)) { + case USB_ST_SETUP: +tr_setup: + if (ch_rec != NULL) { + /* reset receive jitter counters */ + mtx_lock(ch_rec->pcm_mtx); + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + mtx_unlock(ch_rec->pcm_mtx); + } + + /* reset transmit jitter counters */ + ch->jitter_curr = 0; + ch->jitter_rem = 0; + + /* FALLTHROUGH */ case USB_ST_TRANSFERRED: -tr_transferred: if (actlen < sumlen) { DPRINTF("short transfer, " "%d of %d bytes\n", actlen, sumlen); } chn_intr(ch->pcm_ch); + /* + * Check for asynchronous playback endpoint and that + * the playback endpoint is properly configured: + */ + if (ch_rec != NULL && + uaudio_chan_is_async(ch, ch->cur_alt) != 0) { + mtx_lock(ch_rec->pcm_mtx); + if (ch_rec->cur_alt < ch_rec->num_alt) { + int64_t tx_jitter; + int64_t rx_rate; + + /* translate receive jitter into transmit jitter */ + tx_jitter = ch->usb_alt[ch->cur_alt].sample_rate; + tx_jitter = (tx_jitter * ch_rec->jitter_curr) + + ch->jitter_rem; + + /* reset receive jitter counters */ + ch_rec->jitter_curr = 0; + ch_rec->jitter_rem = 0; + + /* compute exact number of transmit jitter samples */ + rx_rate = ch_rec->usb_alt[ch_rec->cur_alt].sample_rate; + ch->jitter_curr += tx_jitter / rx_rate; + ch->jitter_rem = tx_jitter % rx_rate; + } + mtx_unlock(ch_rec->pcm_mtx); + } + /* start the SYNC transfer one time per second, if any */ - if (++(ch->feedback.time) >= UAUDIO_IRQS) { - ch->feedback.time = 0; + if (++(ch->intr_counter) >= UAUDIO_IRQS) { + ch->intr_counter = 0; usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } - case USB_ST_SETUP: mfl = usbd_xfer_max_framelen(xfer); if (ch->bytes_per_frame[1] > mfl) { @@ -2118,6 +2160,9 @@ tr_transferred: /* setup number of frames */ usbd_xfer_set_frames(xfer, blockcount); + /* get sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + /* reset total length */ total = 0; @@ -2133,31 +2178,23 @@ tr_transferred: frame_len = ch->bytes_per_frame[0]; } - if (n == (blockcount - 1)) { - /* - * Update sync remainder and check if - * we should transmit more or less - * data: - */ - ch->feedback.remainder += ch->feedback.constant; - if (ch->feedback.remainder >= UAUDIO_IRQS) { - ch->feedback.remainder -= UAUDIO_IRQS; - DPRINTFN(6, "sending one sample more\n"); - if ((frame_len + sample_size) <= mfl) - frame_len += sample_size; - } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { - ch->feedback.remainder += UAUDIO_IRQS; - DPRINTFN(6, "sending one sample less\n"); - if (frame_len >= sample_size) - frame_len -= sample_size; - } + /* handle free running clock case */ + if (ch->jitter_curr > 0 && + (frame_len + sample_size) <= mfl) { + DPRINTFN(6, "sending one sample more\n"); + ch->jitter_curr--; + frame_len += sample_size; + } else if (ch->jitter_curr < 0 && + frame_len >= sample_size) { + DPRINTFN(6, "sending one sample less\n"); + ch->jitter_curr++; + frame_len -= sample_size; } - usbd_xfer_set_frame_len(xfer, n, frame_len); total += frame_len; } - DPRINTFN(6, "transfer %d bytes\n", total); + DPRINTFN(6, "transferring %d bytes\n", total); offset = 0; @@ -2165,28 +2202,25 @@ tr_transferred: while (total > 0) { n = (ch->end - ch->cur); - if (n > total) { + if (n > total) n = total; - } + usbd_copy_in(pc, offset, ch->cur, n); total -= n; ch->cur += n; offset += n; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } - usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_transferred; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2202,36 +2236,59 @@ uaudio_chan_record_callback(struct usb_x struct uaudio_chan *ch = usbd_xfer_softc(xfer); struct usb_page_cache *pc; uint32_t offset0; - uint32_t offset1; uint32_t mfl; int m; int n; int len; int actlen; int nframes; - int blockcount; - - usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); - mfl = usbd_xfer_max_framelen(xfer); + int expected_bytes; + int sample_size; - if (ch->end == ch->start) { + if (ch->start == ch->end) { DPRINTF("no buffer!\n"); return; } + usbd_xfer_status(xfer, &actlen, NULL, NULL, &nframes); + mfl = usbd_xfer_max_framelen(xfer); + switch (USB_GET_STATE(xfer)) { case USB_ST_TRANSFERRED: - DPRINTFN(6, "transferred %d bytes\n", actlen); - offset0 = 0; pc = usbd_xfer_get_frame(xfer, 0); + /* try to compute the number of expected bytes */ + ch->sample_curr += (ch->sample_rem * ch->intr_frames); + + /* compute number of expected bytes */ + expected_bytes = (ch->intr_frames * ch->bytes_per_frame[0]) + + ((ch->sample_curr / ch->frames_per_second) * + (ch->bytes_per_frame[1] - ch->bytes_per_frame[0])); + + /* keep remainder */ + ch->sample_curr %= ch->frames_per_second; + + /* get current sample size */ + sample_size = ch->usb_alt[ch->cur_alt].sample_size; + for (n = 0; n != nframes; n++) { + uint32_t offset1 = offset0; - offset1 = offset0; len = usbd_xfer_frame_len(xfer, n); + /* make sure we only receive complete samples */ + len = len - (len % sample_size); + + /* subtract bytes received from expected payload */ + expected_bytes -= len; + + /* don't receive data when not ready */ + if (ch->running == 0 || ch->cur_alt != ch->set_alt) + continue; + + /* fill ring buffer with samples, if any */ while (len > 0) { m = (ch->end - ch->cur); @@ -2245,33 +2302,46 @@ uaudio_chan_record_callback(struct usb_x offset1 += m; ch->cur += m; - if (ch->cur >= ch->end) { + if (ch->cur >= ch->end) ch->cur = ch->start; - } } offset0 += mfl; } - chn_intr(ch->pcm_ch); + /* update current jitter */ + ch->jitter_curr -= (expected_bytes / sample_size); + + /* don't allow a huge amount of jitter to accumulate */ + nframes = 2 * ch->intr_frames; + + /* range check current jitter */ + if (ch->jitter_curr < -nframes) + ch->jitter_curr = -nframes; + else if (ch->jitter_curr > nframes) + ch->jitter_curr = nframes; + + DPRINTFN(6, "transferred %d bytes, jitter %d samples\n", + actlen, ch->jitter_curr); + + if (ch->running != 0) + chn_intr(ch->pcm_ch); case USB_ST_SETUP: tr_setup: - blockcount = ch->intr_frames; + nframes = ch->intr_frames; - usbd_xfer_set_frames(xfer, blockcount); - for (n = 0; n < blockcount; n++) { + usbd_xfer_set_frames(xfer, nframes); + for (n = 0; n != nframes; n++) usbd_xfer_set_frame_len(xfer, n, mfl); - } usbd_transfer_submit(xfer); break; default: /* Error */ - if (error == USB_ERR_CANCELLED) { - break; - } - goto tr_setup; + if (error != USB_ERR_CANCELLED) + goto tr_setup; + break; } } @@ -2344,13 +2414,7 @@ int uaudio_chan_set_param_blocksize(struct uaudio_chan *ch, uint32_t blocksize) { uint32_t temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); - sndbuf_setup(ch->pcm_buf, ch->buf, temp); - - ch->start = ch->buf; - ch->end = ch->buf + temp; - ch->cur = ch->buf; - return (temp / 2); } @@ -2364,8 +2428,11 @@ uaudio_chan_set_param_fragments(struct u int uaudio_chan_set_param_speed(struct uaudio_chan *ch, uint32_t speed) { + struct uaudio_softc *sc; uint8_t x; + sc = ch->priv_sc; + for (x = 0; x < ch->num_alt; x++) { if (ch->usb_alt[x].sample_rate < speed) { /* sample rate is too low */ @@ -2376,7 +2443,9 @@ uaudio_chan_set_param_speed(struct uaudi if (x != 0) x--; + usb_proc_explore_lock(sc->sc_udev); ch->set_alt = x; + usb_proc_explore_unlock(sc->sc_udev); DPRINTF("Selecting alt %d\n", (int)x); @@ -2447,16 +2516,16 @@ uaudio_chan_set_param_format(struct uaud return (0); } -int -uaudio_chan_start(struct uaudio_chan *ch) +static void +uaudio_chan_start_sub(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; int do_start = 0; - usb_proc_explore_lock(sc->sc_udev); if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_start = 1; } else { @@ -2465,28 +2534,81 @@ uaudio_chan_start(struct uaudio_chan *ch &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - - /* reset feedback endpoint state */ - memset(&ch->feedback, 0, sizeof(ch->feedback)); - if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); } - return (0); } -int -uaudio_chan_stop(struct uaudio_chan *ch) +static int +uaudio_chan_need_both(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running != 0 && + uaudio_chan_is_async(&sc->sc_play_chan, + sc->sc_play_chan.set_alt) != 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +static int +uaudio_chan_need_none(struct uaudio_softc *sc) +{ + return (sc->sc_play_chan.num_alt > 0 && + sc->sc_play_chan.running == 0 && + sc->sc_rec_chan.num_alt > 0 && + sc->sc_rec_chan.running == 0); +} + +void +uaudio_chan_start(struct uaudio_chan *ch) { struct uaudio_softc *sc = ch->priv_sc; - int do_stop = 0; + /* make operation atomic */ usb_proc_explore_lock(sc->sc_udev); + + /* check if not running */ + if (ch->running == 0) { + uint32_t temp; + + /* get current buffer size */ + temp = 2 * uaudio_get_buffer_size(ch, ch->set_alt); + + /* set running flag */ + ch->running = 1; + + /* ensure the hardware buffer is reset */ + ch->start = ch->buf; + ch->end = ch->buf + temp; + ch->cur = ch->buf; + + if (uaudio_chan_need_both(sc)) { + /* + * Start both endpoints because of need for + * jitter information: + */ + uaudio_chan_start_sub(&sc->sc_rec_chan); + uaudio_chan_start_sub(&sc->sc_play_chan); + } else { + uaudio_chan_start_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); +} + +static void +uaudio_chan_stop_sub(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + int do_stop = 0; + if (ch->operation != CHAN_OP_DRAIN) { if (ch->cur_alt == ch->set_alt && - ch->operation == CHAN_OP_NONE) { + ch->operation == CHAN_OP_NONE && + mtx_owned(ch->pcm_mtx) != 0) { /* save doing the explore task */ do_stop = 1; } else { @@ -2495,13 +2617,44 @@ uaudio_chan_stop(struct uaudio_chan *ch) &sc->sc_config_msg[0], &sc->sc_config_msg[1]); } } - usb_proc_explore_unlock(sc->sc_udev); - if (do_stop) { usbd_transfer_stop(ch->xfer[0]); usbd_transfer_stop(ch->xfer[1]); } - return (0); +} + +void +uaudio_chan_stop(struct uaudio_chan *ch) +{ + struct uaudio_softc *sc = ch->priv_sc; + + /* make operation atomic */ + usb_proc_explore_lock(sc->sc_udev); + + /* check if running */ + if (ch->running != 0) { + /* clear running flag */ + ch->running = 0; + + if (uaudio_chan_need_both(sc)) { + /* + * Leave the endpoints running because we need + * information about jitter! + */ + } else if (uaudio_chan_need_none(sc)) { + /* + * Stop both endpoints in case the one was used for + * jitter information: + */ + uaudio_chan_stop_sub(&sc->sc_rec_chan); + uaudio_chan_stop_sub(&sc->sc_play_chan); + } else { + uaudio_chan_stop_sub(ch); + } + } + + /* exit atomic operation */ + usb_proc_explore_unlock(sc->sc_udev); } /*========================================================================* Modified: stable/8/sys/dev/sound/usb/uaudio.h ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.h Wed Mar 25 13:16:39 2015 (r280594) +++ stable/8/sys/dev/sound/usb/uaudio.h Wed Mar 25 13:18:36 2015 (r280595) @@ -54,8 +54,8 @@ extern struct pcmchan_matrix *uaudio_cha uint32_t format); extern int uaudio_chan_set_param_format(struct uaudio_chan *ch, uint32_t format); -extern int uaudio_chan_start(struct uaudio_chan *ch); -extern int uaudio_chan_stop(struct uaudio_chan *ch); +extern void uaudio_chan_start(struct uaudio_chan *ch); +extern void uaudio_chan_stop(struct uaudio_chan *ch); extern int uaudio_mixer_init_sub(struct uaudio_softc *sc, struct snd_mixer *m); extern int uaudio_mixer_uninit_sub(struct uaudio_softc *sc); Modified: stable/8/sys/dev/sound/usb/uaudio_pcm.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio_pcm.c Wed Mar 25 13:16:39 2015 (r280594) +++ stable/8/sys/dev/sound/usb/uaudio_pcm.c Wed Mar 25 13:18:36 2015 (r280595) @@ -81,14 +81,14 @@ ua_chan_setfragments(kobj_t obj, void *d static int ua_chan_trigger(kobj_t obj, void *data, int go) { - if (!PCMTRIG_COMMON(go)) { - return (0); - } - if (go == PCMTRIG_START) { - return (uaudio_chan_start(data)); - } else { - return (uaudio_chan_stop(data)); + if (PCMTRIG_COMMON(go)) { + if (go == PCMTRIG_START) { + uaudio_chan_start(data); + } else { + uaudio_chan_stop(data); + } } + return (0); } static uint32_t From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:18:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 720C259F; Wed, 25 Mar 2015 13:18:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AF9A51; Wed, 25 Mar 2015 13:18:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDIsRE070896; Wed, 25 Mar 2015 13:18:54 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDIqM1070879; Wed, 25 Mar 2015 13:18:52 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251318.t2PDIqM1070879@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:18:52 +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: r280596 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:18:54 -0000 Author: arybchik Date: Wed Mar 25 13:18:51 2015 New Revision: 280596 URL: https://svnweb.freebsd.org/changeset/base/280596 Log: MFC: 279351 sfxge: expect required init_state on data path and in periodic calls With the patch applied the number of instruction events is 1% less and number of mispredicted branch events is 5% less under multistream TCP traffic load close to line rate. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c stable/10/sys/dev/sfxge/sfxge_intr.c stable/10/sys/dev/sfxge/sfxge_port.c stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_ev.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_ev.c Wed Mar 25 13:18:51 2015 (r280596) @@ -98,7 +98,7 @@ sfxge_ev_rx(void *arg, uint32_t label, u KASSERT(evq->index == rxq->index, ("evq->index != rxq->index")); - if (rxq->init_state != SFXGE_RXQ_STARTED) + if (__predict_false(rxq->init_state != SFXGE_RXQ_STARTED)) goto done; expected = rxq->pending++ & rxq->ptr_mask; @@ -251,7 +251,7 @@ sfxge_ev_tx(void *arg, uint32_t label, u KASSERT(evq->index == txq->evq_index, ("evq->index != txq->evq_index")); - if (txq->init_state != SFXGE_TXQ_STARTED) + if (__predict_false(txq->init_state != SFXGE_TXQ_STARTED)) goto done; stop = (id + 1) & txq->ptr_mask; @@ -428,7 +428,7 @@ sfxge_ev_stat_update(struct sfxge_softc SFXGE_ADAPTER_LOCK(sc); - if (sc->evq[0]->init_state != SFXGE_EVQ_STARTED) + if (__predict_false(sc->evq[0]->init_state != SFXGE_EVQ_STARTED)) goto out; now = ticks; @@ -593,8 +593,8 @@ sfxge_ev_qpoll(struct sfxge_evq *evq) SFXGE_EVQ_LOCK(evq); - if (evq->init_state != SFXGE_EVQ_STARTING && - evq->init_state != SFXGE_EVQ_STARTED) { + if (__predict_false(evq->init_state != SFXGE_EVQ_STARTING && + evq->init_state != SFXGE_EVQ_STARTED)) { rc = EINVAL; goto fail; } Modified: stable/10/sys/dev/sfxge/sfxge_intr.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_intr.c Wed Mar 25 13:18:51 2015 (r280596) @@ -130,7 +130,7 @@ sfxge_intr_message(void *arg) KASSERT(intr->type == EFX_INTR_MESSAGE, ("intr->type != EFX_INTR_MESSAGE")); - if (intr->state != SFXGE_INTR_STARTED) + if (__predict_false(intr->state != SFXGE_INTR_STARTED)) return; (void)efx_intr_status_message(enp, index, &fatal); Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 13:18:51 2015 (r280596) @@ -50,7 +50,7 @@ sfxge_mac_stat_update(struct sfxge_softc SFXGE_PORT_LOCK_ASSERT_OWNED(port); - if (port->init_state != SFXGE_PORT_STARTED) { + if (__predict_false(port->init_state != SFXGE_PORT_STARTED)) { rc = 0; goto out; } @@ -179,7 +179,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND SFXGE_PORT_LOCK(port); if (port->wanted_fc != fcntl) { - if (port->init_state == SFXGE_PORT_STARTED) + if (__predict_false(port->init_state == SFXGE_PORT_STARTED)) error = efx_mac_fcntl_set(sc->enp, port->wanted_fc, B_TRUE); @@ -210,7 +210,8 @@ sfxge_port_link_fc_handler(SYSCTL_HANDLE port = &sc->port; SFXGE_PORT_LOCK(port); - if (port->init_state == SFXGE_PORT_STARTED && SFXGE_LINK_UP(sc)) + if (__predict_true(port->init_state == SFXGE_PORT_STARTED) && + SFXGE_LINK_UP(sc)) efx_mac_fcntl_get(sc->enp, &wanted_fc, &link_fc); else link_fc = 0; @@ -265,7 +266,7 @@ sfxge_mac_poll_work(void *arg, int npend SFXGE_PORT_LOCK(port); - if (port->init_state != SFXGE_PORT_STARTED) + if (__predict_false(port->init_state != SFXGE_PORT_STARTED)) goto done; /* This may sleep waiting for MCDI completion */ @@ -332,7 +333,7 @@ sfxge_mac_filter_set(struct sfxge_softc * lock is held in sleeping thread. Both problems are repeatable * on LAG with LACP proto bring up. */ - if (port->init_state == SFXGE_PORT_STARTED) + if (__predict_true(port->init_state == SFXGE_PORT_STARTED)) rc = sfxge_mac_filter_set_locked(sc); else rc = 0; @@ -456,7 +457,7 @@ sfxge_phy_stat_update(struct sfxge_softc SFXGE_PORT_LOCK_ASSERT_OWNED(port); - if (port->init_state != SFXGE_PORT_STARTED) { + if (__predict_false(port->init_state != SFXGE_PORT_STARTED)) { rc = 0; goto out; } Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:18:51 2015 (r280596) @@ -209,7 +209,7 @@ sfxge_rx_qfill(struct sfxge_rxq *rxq, un SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); - if (rxq->init_state != SFXGE_RXQ_STARTED) + if (__predict_false(rxq->init_state != SFXGE_RXQ_STARTED)) return; rxfill = rxq->added - rxq->completed; @@ -269,7 +269,7 @@ void sfxge_rx_qrefill(struct sfxge_rxq *rxq) { - if (rxq->init_state != SFXGE_RXQ_STARTED) + if (__predict_false(rxq->init_state != SFXGE_RXQ_STARTED)) return; /* Make sure the queue is full */ @@ -760,7 +760,7 @@ sfxge_rx_qcomplete(struct sfxge_rxq *rxq rx_desc = &rxq->queue[id]; m = rx_desc->mbuf; - if (rxq->init_state != SFXGE_RXQ_STARTED) + if (__predict_false(rxq->init_state != SFXGE_RXQ_STARTED)) goto discard; if (rx_desc->flags & (EFX_ADDR_MISMATCH | EFX_DISCARD)) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:18:36 2015 (r280595) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:18:51 2015 (r280596) @@ -311,7 +311,7 @@ static int sfxge_tx_queue_mbuf(struct sf if (mbuf->m_pkthdr.csum_flags & CSUM_TSO) prefetch_read_many(mbuf->m_data); - if (txq->init_state != SFXGE_TXQ_STARTED) { + if (__predict_false(txq->init_state != SFXGE_TXQ_STARTED)) { rc = EINTR; goto reject; } @@ -1142,7 +1142,7 @@ sfxge_tx_qunblock(struct sfxge_txq *txq) SFXGE_EVQ_LOCK_ASSERT_OWNED(evq); - if (txq->init_state != SFXGE_TXQ_STARTED) + if (__predict_false(txq->init_state != SFXGE_TXQ_STARTED)) return; SFXGE_TXQ_LOCK(txq); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:28:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 26155931; Wed, 25 Mar 2015 13:28:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F83419B; Wed, 25 Mar 2015 13:28:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDSESk075861; Wed, 25 Mar 2015 13:28:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDSEOk075860; Wed, 25 Mar 2015 13:28:14 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251328.t2PDSEOk075860@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:28:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280597 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:28:15 -0000 Author: hselasky Date: Wed Mar 25 13:28:13 2015 New Revision: 280597 URL: https://svnweb.freebsd.org/changeset/base/280597 Log: Add DA_Q_NO_RC16 quirk for USB mass storage device. PR: 198647 MFC after: 1 week Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Mar 25 13:18:51 2015 (r280596) +++ head/sys/cam/scsi/scsi_da.c Wed Mar 25 13:28:13 2015 (r280597) @@ -1182,6 +1182,13 @@ static struct da_quirk_entry da_quirk_ta { T_DIRECT, SIP_MEDIA_REMOVABLE, "Innostor", "Innostor*", "*" }, /*quirks*/DA_Q_NO_RC16 }, + { + /* + * MX-ES USB Drive by Mach Xtreme + */ + { T_DIRECT, SIP_MEDIA_REMOVABLE, "MX", "MXUB3SES*", "*"}, + /*quirks*/DA_Q_NO_RC16 + }, }; static disk_strategy_t dastrategy; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:32:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE52DBBA; Wed, 25 Mar 2015 13:32:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C74292B5; Wed, 25 Mar 2015 13:32:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDWSRL080227; Wed, 25 Mar 2015 13:32:28 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDWSS0080226; Wed, 25 Mar 2015 13:32:28 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503251332.t2PDWSS0080226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 25 Mar 2015 13:32:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280598 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:32:29 -0000 Author: hselasky Date: Wed Mar 25 13:32:27 2015 New Revision: 280598 URL: https://svnweb.freebsd.org/changeset/base/280598 Log: Add definition of the ISOCHRONOUS endpoint usage bits. Refer to the USB v2.0 specification for more information. MFC after: 1 week Modified: head/sys/dev/usb/usb.h Modified: head/sys/dev/usb/usb.h ============================================================================== --- head/sys/dev/usb/usb.h Wed Mar 25 13:28:13 2015 (r280597) +++ head/sys/dev/usb/usb.h Wed Mar 25 13:32:27 2015 (r280598) @@ -542,6 +542,11 @@ struct usb_endpoint_descriptor { #define UE_ISO_ADAPT 0x08 #define UE_ISO_SYNC 0x0c #define UE_GET_ISO_TYPE(a) ((a) & UE_ISO_TYPE) +#define UE_ISO_USAGE 0x30 +#define UE_ISO_USAGE_DATA 0x00 +#define UE_ISO_USAGE_FEEDBACK 0x10 +#define UE_ISO_USAGE_IMPLICT_FB 0x20 +#define UE_GET_ISO_USAGE(a) ((a) & UE_ISO_USAGE) uWord wMaxPacketSize; #define UE_ZERO_MPS 0xFFFF /* for internal use only */ uByte bInterval; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:41:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F8D4E78; Wed, 25 Mar 2015 13:41:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F91358; Wed, 25 Mar 2015 13:41:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDfRST084424; Wed, 25 Mar 2015 13:41:27 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDfRm8084140; Wed, 25 Mar 2015 13:41:27 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251341.t2PDfRm8084140@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:41: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: r280599 - in stable/10: share/man/man4 sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:41:28 -0000 Author: arybchik Date: Wed Mar 25 13:41:26 2015 New Revision: 280599 URL: https://svnweb.freebsd.org/changeset/base/280599 Log: MFC: 280160 sfxge: add tunables to control LRO parameters on driver load time Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/share/man/man4/sfxge.4 stable/10/sys/dev/sfxge/sfxge_rx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/sfxge.4 ============================================================================== --- stable/10/share/man/man4/sfxge.4 Wed Mar 25 13:32:27 2015 (r280598) +++ stable/10/share/man/man4/sfxge.4 Wed Mar 25 13:41:26 2015 (r280599) @@ -120,6 +120,27 @@ The value must be greater than or equal The maximum number of allocated RSS channels for the Nth adapter. If set to 0 or unset, the number of channels is determined by the number of CPU cores. +.It Va hw.sfxge.lro.table_size +Size of the LRO hash table. +Must be a power of 2. +A larger table means we can accelerate a larger number of streams. +.It Va hw.sfxge.lro.chain_max +The maximum length of a hash chain. +If chains get too long then the lookup time increases and may exceed +the benefit of LRO. +.It Va hw.sfxge.lro.idle_ticks +The maximum time (in ticks) that a connection can be idle before it's LRO +state is discarded. +.It Va hw.sfxge.lro.slow_start_packets +Number of packets with payload that must arrive in-order before a connection +is eligible for LRO. +The idea is we should avoid coalescing segments when the sender is in +slow-start because reducing the ACK rate can damage performance. +.It Va hw.sfxge.lro.loss_packets +Number of packets with payload that must arrive in-order following loss +before a connection is eligible for LRO. +The idea is we should avoid coalescing segments when the sender is recovering +from loss, because reducing the ACK rate can damage performance. .El .Sh SUPPORT For general information and support, Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:32:27 2015 (r280598) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:41:26 2015 (r280599) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -56,20 +57,38 @@ __FBSDID("$FreeBSD$"); #define RX_REFILL_THRESHOLD(_entries) (EFX_RXQ_LIMIT(_entries) * 9 / 10) +SYSCTL_NODE(_hw_sfxge, OID_AUTO, lro, CTLFLAG_RD, NULL, + "Large receive offload (LRO) parameters"); + +#define SFXGE_LRO_PARAM(_param) SFXGE_PARAM(lro._param) + /* Size of the LRO hash table. Must be a power of 2. A larger table * means we can accelerate a larger number of streams. */ static unsigned lro_table_size = 128; +TUNABLE_INT(SFXGE_LRO_PARAM(table_size), &lro_table_size); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, table_size, CTLFLAG_RDTUN, + &lro_table_size, 0, + "Size of the LRO hash table (must be a power of 2)"); /* Maximum length of a hash chain. If chains get too long then the lookup * time increases and may exceed the benefit of LRO. */ static unsigned lro_chain_max = 20; +TUNABLE_INT(SFXGE_LRO_PARAM(chain_max), &lro_chain_max); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, chain_max, CTLFLAG_RDTUN, + &lro_chain_max, 0, + "The maximum length of a hash chain"); /* Maximum time (in ticks) that a connection can be idle before it's LRO * state is discarded. */ static unsigned lro_idle_ticks; /* initialised in sfxge_rx_init() */ +TUNABLE_INT(SFXGE_LRO_PARAM(idle_ticks), &lro_idle_ticks); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, idle_ticks, CTLFLAG_RDTUN, + &lro_idle_ticks, 0, + "The maximum time (in ticks) that a connection can be idle " + "before it's LRO state is discarded"); /* Number of packets with payload that must arrive in-order before a * connection is eligible for LRO. The idea is we should avoid coalescing @@ -77,6 +96,11 @@ static unsigned lro_idle_ticks; /* initi * can damage performance. */ static int lro_slow_start_packets = 2000; +TUNABLE_INT(SFXGE_LRO_PARAM(slow_start_packets), &lro_slow_start_packets); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, slow_start_packets, CTLFLAG_RDTUN, + &lro_slow_start_packets, 0, + "Number of packets with payload that must arrive in-order before " + "a connection is eligible for LRO"); /* Number of packets with payload that must arrive in-order following loss * before a connection is eligible for LRO. The idea is we should avoid @@ -84,6 +108,11 @@ static int lro_slow_start_packets = 2000 * reducing the ACK rate can damage performance. */ static int lro_loss_packets = 20; +TUNABLE_INT(SFXGE_LRO_PARAM(loss_packets), &lro_loss_packets); +SYSCTL_UINT(_hw_sfxge_lro, OID_AUTO, loss_packets, CTLFLAG_RDTUN, + &lro_loss_packets, 0, + "Number of packets with payload that must arrive in-order " + "following loss before a connection is eligible for LRO"); /* Flags for sfxge_lro_conn::l2_id; must not collide with EVL_VLID_MASK */ #define SFXGE_LRO_L2_ID_VLAN 0x4000 @@ -1200,6 +1229,13 @@ sfxge_rx_init(struct sfxge_softc *sc) int index; int rc; + if (!ISP2(lro_table_size)) { + log(LOG_ERR, "%s=%u must be power of 2", + SFXGE_LRO_PARAM(table_size), lro_table_size); + rc = EINVAL; + goto fail_lro_table_size; + } + if (lro_idle_ticks == 0) lro_idle_ticks = hz / 10 + 1; /* 100 ms */ @@ -1226,5 +1262,7 @@ fail: sfxge_rx_qfini(sc, index); sc->rxq_count = 0; + +fail_lro_table_size: return (rc); } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:42:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A273FC2; Wed, 25 Mar 2015 13:42:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22EC75EB; Wed, 25 Mar 2015 13:42:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDgc7o085107; Wed, 25 Mar 2015 13:42:38 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDgcA5085105; Wed, 25 Mar 2015 13:42:38 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251342.t2PDgcA5085105@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:42: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: r280600 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:42:38 -0000 Author: arybchik Date: Wed Mar 25 13:42:37 2015 New Revision: 280600 URL: https://svnweb.freebsd.org/changeset/base/280600 Log: MFC: 280161 sfxge: move deferred packet list statistics to dedicated node It is done to structure sysctl and do not mix with Tx queue statistics to be added. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:41:26 2015 (r280599) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:42:37 2015 (r280600) @@ -1379,11 +1379,13 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u enum sfxge_txq_type type, unsigned int evq_index) { char name[16]; + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->dev); struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; #ifdef SFXGE_HAVE_MQ struct sfxge_tx_dpl *stdp; + struct sysctl_oid *dpl_node; #endif efsys_mem_t *esmp; unsigned int nmaps; @@ -1432,10 +1434,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u } snprintf(name, sizeof(name), "%u", txq_index); - txq_node = SYSCTL_ADD_NODE( - device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(sc->txqs_node), - OID_AUTO, name, CTLFLAG_RD, NULL, ""); + txq_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(sc->txqs_node), + OID_AUTO, name, CTLFLAG_RD, NULL, ""); if (txq_node == NULL) { rc = ENOMEM; goto fail_txq_node; @@ -1475,21 +1475,25 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SFXGE_TXQ_LOCK_INIT(txq, device_get_nameunit(sc->dev), txq_index); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_get_count", CTLFLAG_RD | CTLFLAG_STATS, + dpl_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(txq_node), OID_AUTO, + "dpl", CTLFLAG_RD, NULL, + "Deferred packet list statistics"); + if (dpl_node == NULL) { + rc = ENOMEM; + goto fail_dpl_node; + } + + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "get_count", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_count, 0, ""); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_get_non_tcp_count", CTLFLAG_RD | CTLFLAG_STATS, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "get_non_tcp_count", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_non_tcp_count, 0, ""); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "get_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_get_hiwat, 0, ""); - SYSCTL_ADD_UINT(device_get_sysctl_ctx(sc->dev), - SYSCTL_CHILDREN(txq_node), OID_AUTO, - "dpl_put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, + "put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_put_hiwat, 0, ""); #endif @@ -1500,6 +1504,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_dpl_node: fail_tx_dpl_put_max: fail_tx_dpl_get_max: fail3: From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:44:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98F0F1B5; Wed, 25 Mar 2015 13:44:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 80F03600; Wed, 25 Mar 2015 13:44:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDi3i8085363; Wed, 25 Mar 2015 13:44:03 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDi2go085360; Wed, 25 Mar 2015 13:44:02 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251344.t2PDi2go085360@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:44:02 +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: r280601 - in stable/10/sys: dev/sfxge modules/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:44:03 -0000 Author: arybchik Date: Wed Mar 25 13:44:01 2015 New Revision: 280601 URL: https://svnweb.freebsd.org/changeset/base/280601 Log: MFC: 280162 sfxge: adding version info to device description The information is required for NIC update and config tools. Submitted by: Artem V. Andreev Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Added: stable/10/sys/dev/sfxge/sfxge_version.h - copied unchanged from r280162, head/sys/dev/sfxge/sfxge_version.h Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/modules/sfxge/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:42:37 2015 (r280600) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:44:01 2015 (r280601) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include "sfxge.h" #include "sfxge_rx.h" +#include "sfxge_version.h" #define SFXGE_CAP (IFCAP_VLAN_MTU | \ IFCAP_HWCSUM | IFCAP_VLAN_HWCSUM | IFCAP_TSO | \ @@ -472,6 +473,12 @@ sfxge_create(struct sfxge_softc *sc) if ((error = efx_nic_probe(enp)) != 0) goto fail5; + SYSCTL_ADD_STRING(device_get_sysctl_ctx(dev), + SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), + OID_AUTO, "version", CTLFLAG_RD, + SFXGE_VERSION_STRING, 0, + "Driver version"); + /* Initialize the NVRAM. */ if ((error = efx_nvram_init(enp)) != 0) goto fail6; Copied: stable/10/sys/dev/sfxge/sfxge_version.h (from r280162, head/sys/dev/sfxge/sfxge_version.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/dev/sfxge/sfxge_version.h Wed Mar 25 13:44:01 2015 (r280601, copy of r280162, head/sys/dev/sfxge/sfxge_version.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2015 Solarflare Communications, Inc. + * All rights reserved. + * + * This software was developed in part by OKTET Labs under contract for + * Solarflare Communications, Inc. + * + * 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$ + */ + +#ifndef _SFXGE_VERSION_H +#define _SFXGE_VERSION_H + +#define SFXGE_VERSION_STRING "v3.3.4.6363" + +#endif /* _SFXGE_DRIVER_VERSION_H */ Modified: stable/10/sys/modules/sfxge/Makefile ============================================================================== --- stable/10/sys/modules/sfxge/Makefile Wed Mar 25 13:42:37 2015 (r280600) +++ stable/10/sys/modules/sfxge/Makefile Wed Mar 25 13:44:01 2015 (r280601) @@ -11,7 +11,7 @@ SRCS+= opt_inet.h opt_sched.h SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c SRCS+= sfxge_intr.c sfxge_mcdi.c SRCS+= sfxge_port.c sfxge_rx.c sfxge_tx.c -SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h +SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${.CURDIR}/../../dev/sfxge/common SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:45:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5519E2FA; Wed, 25 Mar 2015 13:45:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3DF7A610; Wed, 25 Mar 2015 13:45:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDjL1E085626; Wed, 25 Mar 2015 13:45:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDjLlR085625; Wed, 25 Mar 2015 13:45:21 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251345.t2PDjLlR085625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:45:21 +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: r280602 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:45:21 -0000 Author: arybchik Date: Wed Mar 25 13:45:20 2015 New Revision: 280602 URL: https://svnweb.freebsd.org/changeset/base/280602 Log: MFC: 280163 sfxge: prefetch txq->common if TxQ is started only Transmit may be called when TxQ is not started yet (i.e. txq->common is invalid). TxQ state is checked below when mbuf is processed and dropped if TxQ is not started. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:44:01 2015 (r280601) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:45:20 2015 (r280602) @@ -423,8 +423,10 @@ sfxge_tx_qdpl_drain(struct sfxge_txq *tx stdp = &txq->dpl; pushed = txq->added; - prefetch_read_many(sc->enp); - prefetch_read_many(txq->common); + if (__predict_true(txq->init_state == SFXGE_TXQ_STARTED)) { + prefetch_read_many(sc->enp); + prefetch_read_many(txq->common); + } mbuf = stdp->std_get; count = stdp->std_get_count; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:46:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89A8C44A; Wed, 25 Mar 2015 13:46:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72A3F627; Wed, 25 Mar 2015 13:46:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDkVTj085834; Wed, 25 Mar 2015 13:46:31 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDkVXp085833; Wed, 25 Mar 2015 13:46:31 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251346.t2PDkVXp085833@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:46: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: r280603 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:46:31 -0000 Author: arybchik Date: Wed Mar 25 13:46:30 2015 New Revision: 280603 URL: https://svnweb.freebsd.org/changeset/base/280603 Log: MFC: 280164 sfxge: increase default put-list limit to 1024 Drops are observed under multi-stream TCP traffic due to put-list overflow with limit equal to 64. Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:45:20 2015 (r280602) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:46:30 2015 (r280603) @@ -81,7 +81,7 @@ struct sfxge_tx_mapping { #define SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT (64 * 1024) #define SFXGE_TX_DPL_GET_NON_TCP_PKT_LIMIT_DEFAULT 1024 -#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 64 +#define SFXGE_TX_DPL_PUT_PKT_LIMIT_DEFAULT 1024 /* * Deferred packet list. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:47:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00AD558C; Wed, 25 Mar 2015 13:47:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3CA5638; Wed, 25 Mar 2015 13:47:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDlnqS086047; Wed, 25 Mar 2015 13:47:49 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDlnDs086046; Wed, 25 Mar 2015 13:47:49 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251347.t2PDlnDs086046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:47:49 +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: r280604 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:47:50 -0000 Author: arybchik Date: Wed Mar 25 13:47:48 2015 New Revision: 280604 URL: https://svnweb.freebsd.org/changeset/base/280604 Log: MFC: 280374 sfxge: assert either kernel or internal copy of interface flags ioctl to put interface down sets ifp->if_flags which holds the intended administratively defined state and calls driver callback to apply it. When everything is done, driver updates internal copy of interface flags sc->if_flags which holds the operational state. So, transmit from Rx path is possible when interface is intended to be administratively down in accordance with ifp->if_flags, but not applied yet and the operational state is up in accordance with sc->if_flags. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2075 Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:46:30 2015 (r280603) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:47:48 2015 (r280604) @@ -676,7 +676,16 @@ sfxge_if_transmit(struct ifnet *ifp, str sc = (struct sfxge_softc *)ifp->if_softc; - KASSERT(ifp->if_flags & IFF_UP, ("interface not up")); + /* + * Transmit may be called when interface is up from the kernel + * point of view, but not yet up (in progress) from the driver + * point of view. I.e. link aggregation bring up. + * Transmit may be called when interface is up from the driver + * point of view, but already down from the kernel point of + * view. I.e. Rx when interface shutdown is in progress. + */ + KASSERT((ifp->if_flags & IFF_UP) || (sc->if_flags & IFF_UP), + ("interface not up")); /* Pick the desired transmit queue. */ if (m->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:48:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74E526CF; Wed, 25 Mar 2015 13:48:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53815645; Wed, 25 Mar 2015 13:48:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDmt2l086256; Wed, 25 Mar 2015 13:48:55 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDmtHA086255; Wed, 25 Mar 2015 13:48:55 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251348.t2PDmtHA086255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:48:55 +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: r280605 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:48:55 -0000 Author: arybchik Date: Wed Mar 25 13:48:54 2015 New Revision: 280605 URL: https://svnweb.freebsd.org/changeset/base/280605 Log: MFC: 280375 sfxge: add barriers to BAR write macros In theory the barriers are required to cope with write combining and reordering. Two barriers are added (sometimes merged to one): 1. Before the first write to guarantee that previous writes to the region have been done 2. Before the last write to guarantee that write to the last dword/qword is done after previous writes Barriers are inserted before in the assumption that it is better to postpone barriers as much as it is possible (more chances that the operation has already been already done and barrier does not stall CPU). On x86 and amd64 bus space write barriers are just compiler memory barriers which are definitely required. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2077 Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:47:48 2015 (r280604) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:48:54 2015 (r280605) @@ -786,6 +786,14 @@ typedef struct efsys_bar_s { EFSYS_PROBE2(bar_writed, unsigned int, (_offset), \ uint32_t, (_edp)->ed_u32[0]); \ \ + /* \ + * Make sure that previous writes to the dword have \ + * been done. It should be cheaper than barrier just \ + * after the write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_dword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_edp)->ed_u32[0]); \ @@ -809,6 +817,14 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ + /* \ + * Make sure that previous writes to the qword have \ + * been done. It should be cheaper than barrier just \ + * after the write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_qword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_8((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eqp)->eq_u64[0]); \ @@ -829,9 +845,25 @@ typedef struct efsys_bar_s { uint32_t, (_eqp)->eq_u32[1], \ uint32_t, (_eqp)->eq_u32[0]); \ \ + /* \ + * Make sure that previous writes to the qword have \ + * been done. It should be cheaper than barrier just \ + * after the last write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_qword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eqp)->eq_u32[0]); \ + /* \ + * It should be guaranteed that the last dword comes \ + * the last, so barrier entire qword to be sure that \ + * neither above nor below writes are reordered. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_qword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 4, (_eqp)->eq_u32[1]); \ @@ -858,9 +890,25 @@ typedef struct efsys_bar_s { uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ \ + /* \ + * Make sure that previous writes to the oword have \ + * been done. It should be cheaper than barrier just \ + * after the last write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_8((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eop)->eo_u64[0]); \ + /* \ + * It should be guaranteed that the last qword comes \ + * the last, so barrier entire oword to be sure that \ + * neither above nor below writes are reordered. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_8((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 8, (_eop)->eo_u64[1]); \ @@ -888,6 +936,14 @@ typedef struct efsys_bar_s { uint32_t, (_eop)->eo_u32[1], \ uint32_t, (_eop)->eo_u32[0]); \ \ + /* \ + * Make sure that previous writes to the oword have \ + * been done. It should be cheaper than barrier just \ + * after the last write below. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset), (_eop)->eo_u32[0]); \ @@ -897,6 +953,14 @@ typedef struct efsys_bar_s { bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 8, (_eop)->eo_u32[2]); \ + /* \ + * It should be guaranteed that the last dword comes \ + * the last, so barrier entire oword to be sure that \ + * neither above nor below writes are reordered. \ + */ \ + bus_space_barrier((_esbp)->esb_tag, (_esbp)->esb_handle,\ + (_offset), sizeof (efx_oword_t), \ + BUS_SPACE_BARRIER_WRITE); \ bus_space_write_stream_4((_esbp)->esb_tag, \ (_esbp)->esb_handle, \ (_offset) + 12, (_eop)->eo_u32[3]); \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:50:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CBA387A; Wed, 25 Mar 2015 13:50:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C65E65F; Wed, 25 Mar 2015 13:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDofZA087200; Wed, 25 Mar 2015 13:50:41 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDodSD087190; Wed, 25 Mar 2015 13:50:39 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251350.t2PDodSD087190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:50: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: r280606 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:50:41 -0000 Author: arybchik Date: Wed Mar 25 13:50:38 2015 New Revision: 280606 URL: https://svnweb.freebsd.org/changeset/base/280606 Log: MFC: 280376 sfxge: remove obsolete Tx non-multi queue support Tx multi queue is added in FreeBSD 8.0. So, the changeset drops earlier versions support. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2081 Modified: stable/10/sys/dev/sfxge/sfxge.c stable/10/sys/dev/sfxge/sfxge.h stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_tx.c stable/10/sys/dev/sfxge/sfxge_tx.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge.c Wed Mar 25 13:50:38 2015 (r280606) @@ -329,19 +329,8 @@ sfxge_ifnet_init(struct ifnet *ifp, stru ether_ifattach(ifp, encp->enc_mac_addr); -#ifdef SFXGE_HAVE_MQ ifp->if_transmit = sfxge_if_transmit; ifp->if_qflush = sfxge_if_qflush; -#else - ifp->if_start = sfxge_if_start; - IFQ_SET_MAXLEN(&ifp->if_snd, sc->txq_entries - 1); - ifp->if_snd.ifq_drv_maxlen = sc->txq_entries - 1; - IFQ_SET_READY(&ifp->if_snd); - - snprintf(sc->tx_lock_name, sizeof(sc->tx_lock_name), - "%s:tx", device_get_nameunit(sc->dev)); - mtx_init(&sc->tx_lock, sc->tx_lock_name, NULL, MTX_DEF); -#endif if ((rc = sfxge_port_ifmedia_init(sc)) != 0) goto fail; Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:50:38 2015 (r280606) @@ -66,12 +66,6 @@ #ifndef IFM_10G_KX4 #define IFM_10G_KX4 IFM_10G_CX4 #endif -#if __FreeBSD_version >= 800054 -/* Networking core is multiqueue aware. We can manage our own TX - * queues and use m_pkthdr.flowid. - */ -#define SFXGE_HAVE_MQ -#endif #if (__FreeBSD_version >= 800501 && __FreeBSD_version < 900000) || \ __FreeBSD_version >= 900003 #define SFXGE_HAVE_DESCRIBE_INTR @@ -242,11 +236,7 @@ struct sfxge_softc { struct sfxge_rxq *rxq[SFXGE_RX_SCALE_MAX]; unsigned int rx_indir_table[SFXGE_RX_SCALE_MAX]; -#ifdef SFXGE_HAVE_MQ struct sfxge_txq *txq[SFXGE_TXQ_NTYPES + SFXGE_RX_SCALE_MAX]; -#else - struct sfxge_txq *txq[SFXGE_TXQ_NTYPES]; -#endif struct ifmedia media; @@ -254,11 +244,6 @@ struct sfxge_softc { size_t rx_buffer_size; uma_zone_t rx_buffer_zone; -#ifndef SFXGE_HAVE_MQ - struct mtx tx_lock __aligned(CACHE_LINE_SIZE); - char tx_lock_name[SFXGE_LOCK_NAME_MAX]; -#endif - unsigned int evq_count; unsigned int rxq_count; unsigned int txq_count; Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 13:50:38 2015 (r280606) @@ -326,14 +326,12 @@ sfxge_rx_deliver(struct sfxge_softc *sc, if (rx_desc->flags & EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; -#ifdef SFXGE_HAVE_MQ /* The hash covers a 4-tuple for TCP only */ if (rx_desc->flags & EFX_PKT_TCP) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); m->m_flags |= M_FLOWID; } -#endif m->m_data += sc->rx_prefix_size; m->m_len = rx_desc->size - sc->rx_prefix_size; m->m_pkthdr.len = m->m_len; @@ -380,10 +378,9 @@ sfxge_lro_deliver(struct sfxge_lro_state memcpy(c_th + 1, c->th_last + 1, optlen); } -#ifdef SFXGE_HAVE_MQ m->m_pkthdr.flowid = c->conn_hash; m->m_flags |= M_FLOWID; -#endif + m->m_pkthdr.csum_flags = csum_flags; __sfxge_rx_deliver(sc, m); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:50:38 2015 (r280606) @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #define SFXGE_TXQ_BLOCK_LEVEL(_entries) \ (EFX_TXQ_LIMIT(_entries) - SFXGE_TSO_MAX_DESC) -#ifdef SFXGE_HAVE_MQ #define SFXGE_PARAM_TX_DPL_GET_MAX SFXGE_PARAM(tx_dpl_get_max) static int sfxge_tx_dpl_get_max = SFXGE_TX_DPL_GET_PKT_LIMIT_DEFAULT; @@ -109,8 +108,6 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p &sfxge_tx_dpl_put_max, 0, "Maximum number of any packets in deferred packet put-list"); -#endif - /* Forward declarations. */ static void sfxge_tx_qdpl_service(struct sfxge_txq *txq); @@ -160,8 +157,6 @@ sfxge_tx_qcomplete(struct sfxge_txq *txq } } -#ifdef SFXGE_HAVE_MQ - static unsigned int sfxge_is_mbuf_non_tcp(struct mbuf *mbuf) { @@ -225,8 +220,6 @@ sfxge_tx_qdpl_swizzle(struct sfxge_txq * stdp->std_get_non_tcp_count += non_tcp_count; } -#endif /* SFXGE_HAVE_MQ */ - static void sfxge_tx_qreap(struct sfxge_txq *txq) { @@ -401,8 +394,6 @@ reject: return (rc); } -#ifdef SFXGE_HAVE_MQ - /* * Drain the deferred packet list into the transmit queue. */ @@ -708,88 +699,6 @@ sfxge_if_transmit(struct ifnet *ifp, str return (rc); } -#else /* !SFXGE_HAVE_MQ */ - -static void sfxge_if_start_locked(struct ifnet *ifp) -{ - struct sfxge_softc *sc = ifp->if_softc; - struct sfxge_txq *txq; - struct mbuf *mbuf; - unsigned int pushed[SFXGE_TXQ_NTYPES]; - unsigned int q_index; - - if ((ifp->if_drv_flags & (IFF_DRV_RUNNING|IFF_DRV_OACTIVE)) != - IFF_DRV_RUNNING) - return; - - if (!sc->port.link_up) - return; - - for (q_index = 0; q_index < SFXGE_TXQ_NTYPES; q_index++) { - txq = sc->txq[q_index]; - pushed[q_index] = txq->added; - } - - while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { - IFQ_DRV_DEQUEUE(&ifp->if_snd, mbuf); - if (mbuf == NULL) - break; - - ETHER_BPF_MTAP(ifp, mbuf); /* packet capture */ - - /* Pick the desired transmit queue. */ - if (mbuf->m_pkthdr.csum_flags & (CSUM_DELAY_DATA | CSUM_TSO)) - q_index = SFXGE_TXQ_IP_TCP_UDP_CKSUM; - else if (mbuf->m_pkthdr.csum_flags & CSUM_DELAY_IP) - q_index = SFXGE_TXQ_IP_CKSUM; - else - q_index = SFXGE_TXQ_NON_CKSUM; - txq = sc->txq[q_index]; - - if (sfxge_tx_queue_mbuf(txq, mbuf) != 0) - continue; - - if (txq->blocked) { - ifp->if_drv_flags |= IFF_DRV_OACTIVE; - break; - } - - /* Push the fragments to the hardware in batches. */ - if (txq->added - pushed[q_index] >= SFXGE_TX_BATCH) { - efx_tx_qpush(txq->common, txq->added); - pushed[q_index] = txq->added; - } - } - - for (q_index = 0; q_index < SFXGE_TXQ_NTYPES; q_index++) { - txq = sc->txq[q_index]; - if (txq->added != pushed[q_index]) - efx_tx_qpush(txq->common, txq->added); - } -} - -void sfxge_if_start(struct ifnet *ifp) -{ - struct sfxge_softc *sc = ifp->if_softc; - - SFXGE_TXQ_LOCK(sc->txq[0]); - sfxge_if_start_locked(ifp); - SFXGE_TXQ_UNLOCK(sc->txq[0]); -} - -static void -sfxge_tx_qdpl_service(struct sfxge_txq *txq) -{ - struct ifnet *ifp = txq->sc->ifnet; - - SFXGE_TXQ_LOCK_ASSERT_OWNED(txq); - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - sfxge_if_start_locked(ifp); - SFXGE_TXQ_UNLOCK(txq); -} - -#endif /* SFXGE_HAVE_MQ */ - /* * Software "TSO". Not quite as good as doing it in hardware, but * still faster than segmenting in the stack. @@ -1378,9 +1287,7 @@ sfxge_tx_qfini(struct sfxge_softc *sc, u sc->txq[index] = NULL; -#ifdef SFXGE_HAVE_MQ SFXGE_TXQ_LOCK_DESTROY(txq); -#endif free(txq, M_SFXGE); } @@ -1394,10 +1301,8 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u struct sysctl_oid *txq_node; struct sfxge_txq *txq; struct sfxge_evq *evq; -#ifdef SFXGE_HAVE_MQ struct sfxge_tx_dpl *stdp; struct sysctl_oid *dpl_node; -#endif efsys_mem_t *esmp; unsigned int nmaps; int rc; @@ -1456,7 +1361,6 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u (rc = tso_init(txq)) != 0) goto fail3; -#ifdef SFXGE_HAVE_MQ if (sfxge_tx_dpl_get_max <= 0) { log(LOG_ERR, "%s=%d must be greater than 0", SFXGE_PARAM_TX_DPL_GET_MAX, sfxge_tx_dpl_get_max); @@ -1506,7 +1410,6 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(dpl_node), OID_AUTO, "put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_put_hiwat, 0, ""); -#endif txq->type = type; txq->evq_index = evq_index; @@ -1613,11 +1516,7 @@ sfxge_tx_init(struct sfxge_softc *sc) KASSERT(intr->state == SFXGE_INTR_INITIALIZED, ("intr->state != SFXGE_INTR_INITIALIZED")); -#ifdef SFXGE_HAVE_MQ sc->txq_count = SFXGE_TXQ_NTYPES - 1 + sc->intr.n_alloc; -#else - sc->txq_count = SFXGE_TXQ_NTYPES; -#endif sc->txqs_node = SYSCTL_ADD_NODE( device_get_sysctl_ctx(sc->dev), Modified: stable/10/sys/dev/sfxge/sfxge_tx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:48:54 2015 (r280605) +++ stable/10/sys/dev/sfxge/sfxge_tx.h Wed Mar 25 13:50:38 2015 (r280606) @@ -128,12 +128,6 @@ enum sfxge_txq_type { #define SFXGE_TX_BATCH 64 -#ifdef SFXGE_HAVE_MQ -#define SFXGE_TX_LOCK(txq) (&(txq)->lock) -#else -#define SFXGE_TX_LOCK(txq) (&(txq)->sc->tx_lock) -#endif - #define SFXGE_TXQ_LOCK_INIT(_txq, _ifname, _txq_index) \ do { \ struct sfxge_txq *__txq = (_txq); \ @@ -147,13 +141,13 @@ enum sfxge_txq_type { #define SFXGE_TXQ_LOCK_DESTROY(_txq) \ mtx_destroy(&(_txq)->lock) #define SFXGE_TXQ_LOCK(_txq) \ - mtx_lock(SFXGE_TX_LOCK(_txq)) + mtx_lock(&(_txq)->lock) #define SFXGE_TXQ_TRYLOCK(_txq) \ - mtx_trylock(SFXGE_TX_LOCK(_txq)) + mtx_trylock(&(_txq)->lock) #define SFXGE_TXQ_UNLOCK(_txq) \ - mtx_unlock(SFXGE_TX_LOCK(_txq)) + mtx_unlock(&(_txq)->lock) #define SFXGE_TXQ_LOCK_ASSERT_OWNED(_txq) \ - mtx_assert(SFXGE_TX_LOCK(_txq), MA_OWNED) + mtx_assert(&(_txq)->lock, MA_OWNED) struct sfxge_txq { @@ -186,13 +180,9 @@ struct sfxge_txq { /* The following fields change more often, and are used mostly * on the initiation path */ -#ifdef SFXGE_HAVE_MQ struct mtx lock __aligned(CACHE_LINE_SIZE); struct sfxge_tx_dpl dpl; /* Deferred packet list. */ unsigned int n_pend_desc; -#else - unsigned int n_pend_desc __aligned(CACHE_LINE_SIZE); -#endif unsigned int added; unsigned int reaped; /* Statistics */ @@ -226,11 +216,7 @@ extern int sfxge_tx_start(struct sfxge_s extern void sfxge_tx_stop(struct sfxge_softc *sc); extern void sfxge_tx_qcomplete(struct sfxge_txq *txq, struct sfxge_evq *evq); extern void sfxge_tx_qflush_done(struct sfxge_txq *txq); -#ifdef SFXGE_HAVE_MQ extern void sfxge_if_qflush(struct ifnet *ifp); extern int sfxge_if_transmit(struct ifnet *ifp, struct mbuf *m); -#else -extern void sfxge_if_start(struct ifnet *ifp); -#endif #endif From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:51:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F2C2E9CE; Wed, 25 Mar 2015 13:51:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB6B7763; Wed, 25 Mar 2015 13:51:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDpeZu090142; Wed, 25 Mar 2015 13:51:40 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDpef5090141; Wed, 25 Mar 2015 13:51:40 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251351.t2PDpef5090141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:51: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: r280607 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:51:41 -0000 Author: arybchik Date: Wed Mar 25 13:51:39 2015 New Revision: 280607 URL: https://svnweb.freebsd.org/changeset/base/280607 Log: MFC: 280377 sfxge: add statistics for each Tx queue Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2082 Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:50:38 2015 (r280606) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:51:39 2015 (r280607) @@ -109,6 +109,26 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_dpl_p "Maximum number of any packets in deferred packet put-list"); +static const struct { + const char *name; + size_t offset; +} sfxge_tx_stats[] = { +#define SFXGE_TX_STAT(name, member) \ + { #name, offsetof(struct sfxge_txq, member) } + SFXGE_TX_STAT(tso_bursts, tso_bursts), + SFXGE_TX_STAT(tso_packets, tso_packets), + SFXGE_TX_STAT(tso_long_headers, tso_long_headers), + SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), + SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), + SFXGE_TX_STAT(tx_collapses, collapses), + SFXGE_TX_STAT(tx_drops, drops), + SFXGE_TX_STAT(tx_get_overflow, get_overflow), + SFXGE_TX_STAT(tx_get_non_tcp_overflow, get_non_tcp_overflow), + SFXGE_TX_STAT(tx_put_overflow, put_overflow), + SFXGE_TX_STAT(tx_netdown_drops, netdown_drops), +}; + + /* Forward declarations. */ static void sfxge_tx_qdpl_service(struct sfxge_txq *txq); static void sfxge_tx_qlist_post(struct sfxge_txq *txq); @@ -1258,6 +1278,30 @@ fail: return (rc); } +static int +sfxge_txq_stat_init(struct sfxge_txq *txq, struct sysctl_oid *txq_node) +{ + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(txq->sc->dev); + struct sysctl_oid *stat_node; + unsigned int id; + + stat_node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(txq_node), OID_AUTO, + "stats", CTLFLAG_RD, NULL, + "Tx queue statistics"); + if (stat_node == NULL) + return (ENOMEM); + + for (id = 0; id < nitems(sfxge_tx_stats); id++) { + SYSCTL_ADD_ULONG( + ctx, SYSCTL_CHILDREN(stat_node), OID_AUTO, + sfxge_tx_stats[id].name, CTLFLAG_RD | CTLFLAG_STATS, + (unsigned long *)((caddr_t)txq + sfxge_tx_stats[id].offset), + ""); + } + + return (0); +} + /** * Destroy a transmit queue. */ @@ -1411,6 +1455,10 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u "put_hiwat", CTLFLAG_RD | CTLFLAG_STATS, &stdp->std_put_hiwat, 0, ""); + rc = sfxge_txq_stat_init(txq, txq_node); + if (rc != 0) + goto fail_txq_stat_init; + txq->type = type; txq->evq_index = evq_index; txq->txq_index = txq_index; @@ -1418,6 +1466,7 @@ sfxge_tx_qinit(struct sfxge_softc *sc, u return (0); +fail_txq_stat_init: fail_dpl_node: fail_tx_dpl_put_max: fail_tx_dpl_get_max: @@ -1436,25 +1485,6 @@ fail: return (rc); } -static const struct { - const char *name; - size_t offset; -} sfxge_tx_stats[] = { -#define SFXGE_TX_STAT(name, member) \ - { #name, offsetof(struct sfxge_txq, member) } - SFXGE_TX_STAT(tso_bursts, tso_bursts), - SFXGE_TX_STAT(tso_packets, tso_packets), - SFXGE_TX_STAT(tso_long_headers, tso_long_headers), - SFXGE_TX_STAT(tso_pdrop_too_many, tso_pdrop_too_many), - SFXGE_TX_STAT(tso_pdrop_no_rsrc, tso_pdrop_no_rsrc), - SFXGE_TX_STAT(tx_collapses, collapses), - SFXGE_TX_STAT(tx_drops, drops), - SFXGE_TX_STAT(tx_get_overflow, get_overflow), - SFXGE_TX_STAT(tx_get_non_tcp_overflow, get_non_tcp_overflow), - SFXGE_TX_STAT(tx_put_overflow, put_overflow), - SFXGE_TX_STAT(tx_netdown_drops, netdown_drops), -}; - static int sfxge_tx_stat_handler(SYSCTL_HANDLER_ARGS) { From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:52:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 427E5B14; Wed, 25 Mar 2015 13:52:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11C74777; Wed, 25 Mar 2015 13:52:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDqVWQ090324; Wed, 25 Mar 2015 13:52:31 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDqVm9090323; Wed, 25 Mar 2015 13:52:31 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251352.t2PDqVm9090323@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:52: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: r280608 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:52:32 -0000 Author: arybchik Date: Wed Mar 25 13:52:31 2015 New Revision: 280608 URL: https://svnweb.freebsd.org/changeset/base/280608 Log: MFC: 280378 sfxge: FreeBSD before 10 does not have bus_space_*_8 on amd64 bus_space_*_8() are not always macros, so it is not correct to use #ifndef. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2083 Modified: stable/10/sys/dev/sfxge/common/efsys.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efsys.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:51:39 2015 (r280607) +++ stable/10/sys/dev/sfxge/common/efsys.h Wed Mar 25 13:52:31 2015 (r280608) @@ -94,13 +94,20 @@ extern "C" { #define ISP2(x) (((x) & ((x) - 1)) == 0) #endif -#if defined(__x86_64__) +#if defined(__x86_64__) && __FreeBSD_version >= 1000000 + +#define SFXGE_USE_BUS_SPACE_8 1 + #if !defined(bus_space_read_stream_8) + #define bus_space_read_stream_8(t, h, o) \ bus_space_read_8((t), (h), (o)) + #define bus_space_write_stream_8(t, h, o, v) \ bus_space_write_8((t), (h), (o), (v)) + #endif + #endif #define ENOTACTIVE EINVAL @@ -663,7 +670,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #define EFSYS_BAR_READQ(_esbp, _offset, _eqp) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -804,7 +811,7 @@ typedef struct efsys_bar_s { _NOTE(CONSTANTCONDITION) \ } while (B_FALSE) -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #define EFSYS_BAR_WRITEQ(_esbp, _offset, _eqp) \ do { \ _NOTE(CONSTANTCONDITION) \ @@ -873,7 +880,7 @@ typedef struct efsys_bar_s { } while (B_FALSE) #endif -#if defined(__x86_64__) +#if defined(SFXGE_USE_BUS_SPACE_8) #define EFSYS_BAR_WRITEO(_esbp, _offset, _eop, _lock) \ do { \ _NOTE(CONSTANTCONDITION) \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:53:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55AD0C8D; Wed, 25 Mar 2015 13:53:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E3F979F; Wed, 25 Mar 2015 13:53:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDrTO2090502; Wed, 25 Mar 2015 13:53:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDrTni090501; Wed, 25 Mar 2015 13:53:29 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251353.t2PDrTni090501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:53: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: r280609 - stable/10/sys/dev/sfxge/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:53:29 -0000 Author: arybchik Date: Wed Mar 25 13:53:28 2015 New Revision: 280609 URL: https://svnweb.freebsd.org/changeset/base/280609 Log: MFC: 280379 sfxge: do not check MCDI status word This is a temporary workaround until we determine a reliable sequence of operations for detecting MC reboots. Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2084 Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx_mcdi.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 13:52:31 2015 (r280608) +++ stable/10/sys/dev/sfxge/common/efx_mcdi.c Wed Mar 25 13:53:28 2015 (r280609) @@ -213,6 +213,14 @@ static int efx_mcdi_poll_reboot( __in efx_nic_t *enp) { +#ifndef EFX_GRACEFUL_MC_REBOOT + /* + * This function is not being used properly. + * Until its callers are fixed, it should always return 0. + */ + _NOTE(ARGUNUSED(enp)) + return (0); +#else efx_mcdi_iface_t *emip = &(enp->en_u.siena.enu_mip); unsigned int rebootr; efx_dword_t dword; @@ -236,6 +244,7 @@ efx_mcdi_poll_reboot( return (EINTR); else return (EIO); +#endif } __checkReturn boolean_t From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:54:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48C68DF2; Wed, 25 Mar 2015 13:54:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 320B97BE; Wed, 25 Mar 2015 13:54:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDsToT090693; Wed, 25 Mar 2015 13:54:29 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDsTka090692; Wed, 25 Mar 2015 13:54:29 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251354.t2PDsTka090692@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:54: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: r280610 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:54:30 -0000 Author: arybchik Date: Wed Mar 25 13:54:28 2015 New Revision: 280610 URL: https://svnweb.freebsd.org/changeset/base/280610 Log: MFC: 280380 sfxge: remove unnecessary and wrong prediction Sponsored by: Solarflare Communications, Inc. Original Differential Revision: https://reviews.freebsd.org/D2085 Modified: stable/10/sys/dev/sfxge/sfxge_port.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_port.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 13:53:28 2015 (r280609) +++ stable/10/sys/dev/sfxge/sfxge_port.c Wed Mar 25 13:54:28 2015 (r280610) @@ -179,7 +179,7 @@ sfxge_port_wanted_fc_handler(SYSCTL_HAND SFXGE_PORT_LOCK(port); if (port->wanted_fc != fcntl) { - if (__predict_false(port->init_state == SFXGE_PORT_STARTED)) + if (port->init_state == SFXGE_PORT_STARTED) error = efx_mac_fcntl_set(sc->enp, port->wanted_fc, B_TRUE); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:55:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C292FF47; Wed, 25 Mar 2015 13:55:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB84E7D3; Wed, 25 Mar 2015 13:55:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDtbDK090941; Wed, 25 Mar 2015 13:55:37 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDtbfV090940; Wed, 25 Mar 2015 13:55:37 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251355.t2PDtbfV090940@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:55: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: r280611 - stable/10/sys/modules/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:55:37 -0000 Author: arybchik Date: Wed Mar 25 13:55:36 2015 New Revision: 280611 URL: https://svnweb.freebsd.org/changeset/base/280611 Log: MFC: 280431 sfxge: cleanup: remove trailing whitespaces Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/modules/sfxge/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/sfxge/Makefile ============================================================================== --- stable/10/sys/modules/sfxge/Makefile Wed Mar 25 13:54:28 2015 (r280610) +++ stable/10/sys/modules/sfxge/Makefile Wed Mar 25 13:55:36 2015 (r280611) @@ -14,7 +14,7 @@ SRCS+= sfxge_port.c sfxge_rx.c sfxge_tx. SRCS+= sfxge.h sfxge_rx.h sfxge_tx.h sfxge_version.h .PATH: ${.CURDIR}/../../dev/sfxge/common -SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c +SRCS+= efx_ev.c efx_intr.c efx_mac.c efx_mcdi.c efx_nic.c SRCS+= efx_nvram.c efx_phy.c efx_port.c efx_rx.c efx_sram.c efx_tx.c SRCS+= efx_vpd.c efx_wol.c SRCS+= efsys.h @@ -22,7 +22,7 @@ SRCS+= efx.h efx_impl.h efx_mcdi.h efx_r SRCS+= efx_regs_mcdi.h efx_regs_pci.h efx_types.h SRCS+= siena_mac.c siena_nic.c siena_nvram.c siena_phy.c -SRCS+= siena_sram.c siena_vpd.c +SRCS+= siena_sram.c siena_vpd.c SRCS+= siena_flash.h siena_impl.h DEBUG_FLAGS= -DDEBUG=1 From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:56:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EDC23121; Wed, 25 Mar 2015 13:56:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D67FC7E4; Wed, 25 Mar 2015 13:56:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDuhKM091149; Wed, 25 Mar 2015 13:56:43 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDuhqb091148; Wed, 25 Mar 2015 13:56:43 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251356.t2PDuhqb091148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:56:43 +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: r280612 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:56:44 -0000 Author: arybchik Date: Wed Mar 25 13:56:42 2015 New Revision: 280612 URL: https://svnweb.freebsd.org/changeset/base/280612 Log: MFC: 280432 sfxge: cleanup: add a blank line before each #if to improve readability Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:55:36 2015 (r280611) +++ stable/10/sys/dev/sfxge/sfxge.h Wed Mar 25 13:56:42 2015 (r280612) @@ -54,25 +54,32 @@ */ #define CACHE_LINE_SIZE 128 #endif + #ifndef IFCAP_LINKSTATE #define IFCAP_LINKSTATE 0 #endif + #ifndef IFCAP_VLAN_HWTSO #define IFCAP_VLAN_HWTSO 0 #endif + #ifndef IFM_10G_T #define IFM_10G_T IFM_UNKNOWN #endif + #ifndef IFM_10G_KX4 #define IFM_10G_KX4 IFM_10G_CX4 #endif + #if (__FreeBSD_version >= 800501 && __FreeBSD_version < 900000) || \ __FreeBSD_version >= 900003 #define SFXGE_HAVE_DESCRIBE_INTR #endif + #ifdef IFM_ETH_RXPAUSE #define SFXGE_HAVE_PAUSE_MEDIAOPTS #endif + #ifndef CTLTYPE_U64 #define CTLTYPE_U64 CTLTYPE_QUAD #endif From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 13:57:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 155002DE; Wed, 25 Mar 2015 13:57:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2F947ED; Wed, 25 Mar 2015 13:57:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PDvtkJ091348; Wed, 25 Mar 2015 13:57:55 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PDvtkR091347; Wed, 25 Mar 2015 13:57:55 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251357.t2PDvtkR091347@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 13:57:55 +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: r280613 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 13:57:56 -0000 Author: arybchik Date: Wed Mar 25 13:57:54 2015 New Revision: 280613 URL: https://svnweb.freebsd.org/changeset/base/280613 Log: MFC: 280433 sfxge: cleanup: fix index variable type to match upper boundary type Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:56:42 2015 (r280612) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Wed Mar 25 13:57:54 2015 (r280613) @@ -667,7 +667,7 @@ void sfxge_if_qflush(struct ifnet *ifp) { struct sfxge_softc *sc; - int i; + unsigned int i; sc = ifp->if_softc; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 14:10:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3F67923; Wed, 25 Mar 2015 14:10:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3618951; Wed, 25 Mar 2015 14:10:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PEALh6096743; Wed, 25 Mar 2015 14:10:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PEAKYX096739; Wed, 25 Mar 2015 14:10:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503251410.t2PEAKYX096739@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Wed, 25 Mar 2015 14:10: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: r280615 - in stable/10/sys: dev/sfxge modules/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 14:10:22 -0000 Author: arybchik Date: Wed Mar 25 14:10:20 2015 New Revision: 280615 URL: https://svnweb.freebsd.org/changeset/base/280615 Log: MFC: 279398 sfxge: compile out LRO if kernel is compiled without IPv4 and IPv6 Sponsored by: Solarflare Communications, Inc. Approved by: gnn (mentor) MFC: 279411 Unbreak 'make depend' with sfxge by removing debugging code activated in the INET || INET6 case X-MFC with: r279398 Pointyhat to: arybchik Modified: stable/10/sys/dev/sfxge/sfxge_rx.c stable/10/sys/dev/sfxge/sfxge_rx.h stable/10/sys/modules/sfxge/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 14:05:51 2015 (r280614) +++ stable/10/sys/dev/sfxge/sfxge_rx.c Wed Mar 25 14:10:20 2015 (r280615) @@ -57,6 +57,8 @@ __FBSDID("$FreeBSD$"); #define RX_REFILL_THRESHOLD(_entries) (EFX_RXQ_LIMIT(_entries) * 9 / 10) +#ifdef SFXGE_LRO + SYSCTL_NODE(_hw_sfxge, OID_AUTO, lro, CTLFLAG_RD, NULL, "Large receive offload (LRO) parameters"); @@ -136,6 +138,8 @@ static unsigned long ipv6_addr_cmp(const #endif } +#endif /* SFXGE_LRO */ + void sfxge_rx_qflush_done(struct sfxge_rxq *rxq) { @@ -342,6 +346,8 @@ sfxge_rx_deliver(struct sfxge_softc *sc, rx_desc->mbuf = NULL; } +#ifdef SFXGE_LRO + static void sfxge_lro_deliver(struct sfxge_lro_state *st, struct sfxge_lro_conn *c) { @@ -760,6 +766,20 @@ static void sfxge_lro_end_of_burst(struc sfxge_lro_purge_idle(rxq, t); } +#else /* !SFXGE_LRO */ + +static void +sfxge_lro(struct sfxge_rxq *rxq, struct sfxge_rx_sw_desc *rx_buf) +{ +} + +static void +sfxge_lro_end_of_burst(struct sfxge_rxq *rxq) +{ +} + +#endif /* SFXGE_LRO */ + void sfxge_rx_qcomplete(struct sfxge_rxq *rxq, boolean_t eop) { @@ -1040,6 +1060,8 @@ fail: return (rc); } +#ifdef SFXGE_LRO + static void sfxge_lro_init(struct sfxge_rxq *rxq) { struct sfxge_lro_state *st = &rxq->lro; @@ -1092,6 +1114,20 @@ static void sfxge_lro_fini(struct sfxge_ st->conns = NULL; } +#else + +static void +sfxge_lro_init(struct sfxge_rxq *rxq) +{ +} + +static void +sfxge_lro_fini(struct sfxge_rxq *rxq) +{ +} + +#endif /* SFXGE_LRO */ + static void sfxge_rx_qfini(struct sfxge_softc *sc, unsigned int index) { @@ -1162,6 +1198,7 @@ static const struct { } sfxge_rx_stats[] = { #define SFXGE_RX_STAT(name, member) \ { #name, offsetof(struct sfxge_rxq, member) } +#ifdef SFXGE_LRO SFXGE_RX_STAT(lro_merges, lro.n_merges), SFXGE_RX_STAT(lro_bursts, lro.n_bursts), SFXGE_RX_STAT(lro_slow_start, lro.n_slow_start), @@ -1170,6 +1207,7 @@ static const struct { SFXGE_RX_STAT(lro_new_stream, lro.n_new_stream), SFXGE_RX_STAT(lro_drop_idle, lro.n_drop_idle), SFXGE_RX_STAT(lro_drop_closed, lro.n_drop_closed) +#endif }; static int @@ -1226,6 +1264,7 @@ sfxge_rx_init(struct sfxge_softc *sc) int index; int rc; +#ifdef SFXGE_LRO if (!ISP2(lro_table_size)) { log(LOG_ERR, "%s=%u must be power of 2", SFXGE_LRO_PARAM(table_size), lro_table_size); @@ -1235,6 +1274,7 @@ sfxge_rx_init(struct sfxge_softc *sc) if (lro_idle_ticks == 0) lro_idle_ticks = hz / 10 + 1; /* 100 ms */ +#endif intr = &sc->intr; @@ -1260,6 +1300,8 @@ fail: sc->rxq_count = 0; +#ifdef SFXGE_LRO fail_lro_table_size: +#endif return (rc); } Modified: stable/10/sys/dev/sfxge/sfxge_rx.h ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 14:05:51 2015 (r280614) +++ stable/10/sys/dev/sfxge/sfxge_rx.h Wed Mar 25 14:10:20 2015 (r280615) @@ -32,6 +32,13 @@ #ifndef _SFXGE_RX_H #define _SFXGE_RX_H +#include "opt_inet.h" +#include "opt_inet6.h" + +#if defined(INET) || defined(INET6) +#define SFXGE_LRO 1 +#endif + #define SFXGE_MAGIC_RESERVED 0x8000 #define SFXGE_MAGIC_DMAQ_LABEL_WIDTH 6 @@ -59,6 +66,8 @@ struct sfxge_rx_sw_desc { int size; }; +#ifdef SFXGE_LRO + /** * struct sfxge_lro_conn - Connection state for software LRO * @link: Link for hash table and free list. @@ -139,6 +148,8 @@ struct sfxge_lro_state { unsigned n_drop_closed; }; +#endif /* SFXGE_LRO */ + enum sfxge_flush_state { SFXGE_FLUSH_DONE = 0, SFXGE_FLUSH_PENDING, @@ -167,7 +178,9 @@ struct sfxge_rxq { unsigned int pending; unsigned int completed; unsigned int loopback; +#ifdef SFXGE_LRO struct sfxge_lro_state lro; +#endif unsigned int refill_threshold; struct callout refill_callout; unsigned int refill_delay; Modified: stable/10/sys/modules/sfxge/Makefile ============================================================================== --- stable/10/sys/modules/sfxge/Makefile Wed Mar 25 14:05:51 2015 (r280614) +++ stable/10/sys/modules/sfxge/Makefile Wed Mar 25 14:10:20 2015 (r280615) @@ -1,11 +1,13 @@ # $FreeBSD$ +.include + KMOD= sfxge SFXGE= ${.CURDIR}/../../dev/sfxge SRCS= device_if.h bus_if.h pci_if.h -SRCS+= opt_inet.h opt_sched.h +SRCS+= opt_inet.h opt_inet6.h opt_sched.h .PATH: ${.CURDIR}/../../dev/sfxge SRCS+= sfxge.c sfxge_dma.c sfxge_ev.c @@ -27,4 +29,16 @@ SRCS+= siena_flash.h siena_impl.h DEBUG_FLAGS= -DDEBUG=1 +.if !defined(KERNBUILDDIR) +.if ${MK_INET_SUPPORT} != "no" +opt_inet.h: + @echo "#define INET 1" > ${.TARGET} +.endif + +.if ${MK_INET6_SUPPORT} != "no" +opt_inet6.h: + @echo "#define INET6 1" > ${.TARGET} +.endif +.endif + .include From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 15:51:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A013B4C3; Wed, 25 Mar 2015 15:51:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A98F995; Wed, 25 Mar 2015 15:51:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PFpgH6048560; Wed, 25 Mar 2015 15:51:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PFpg9n048556; Wed, 25 Mar 2015 15:51:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503251551.t2PFpg9n048556@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 25 Mar 2015 15:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280621 - in head/sys: i386/conf sparc64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 15:51:42 -0000 Author: jhb Date: Wed Mar 25 15:51:41 2015 New Revision: 280621 URL: https://svnweb.freebsd.org/changeset/base/280621 Log: Apply r276208 to non-amd64 NOTES files as well to fix tinderbox builds run under a system using vt(4) instead of syscons(4): Use compiled in default keymaps which are available both in syscons and vt. Modified: head/sys/i386/conf/NOTES head/sys/sparc64/conf/NOTES Modified: head/sys/i386/conf/NOTES ============================================================================== --- head/sys/i386/conf/NOTES Wed Mar 25 14:36:17 2015 (r280620) +++ head/sys/i386/conf/NOTES Wed Mar 25 15:51:41 2015 (r280621) @@ -433,7 +433,7 @@ hint.atkbd.0.irq="1" # Options for atkbd: options ATKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptions ATKBD_DFLT_KEYMAP=jp.106 +makeoptions ATKBD_DFLT_KEYMAP=fr.dvorak # `flags' for atkbd: # 0x01 Force detection of keyboard, else we always assume a keyboard Modified: head/sys/sparc64/conf/NOTES ============================================================================== --- head/sys/sparc64/conf/NOTES Wed Mar 25 14:36:17 2015 (r280620) +++ head/sys/sparc64/conf/NOTES Wed Mar 25 15:51:41 2015 (r280621) @@ -67,7 +67,7 @@ device atkbd # Options for atkbd: options ATKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptions ATKBD_DFLT_KEYMAP=jp.106 +makeoptions ATKBD_DFLT_KEYMAP=fr.dvorak # `flags' for atkbd: # 0x01 Force detection of keyboard, else we always assume a keyboard @@ -84,7 +84,7 @@ options SUNKBD_EMULATE_ATKBD # allows t # in share/syscons/keymaps, required # for SUNKBD_DFLT_KEYMAP and kbdmux options SUNKBD_DFLT_KEYMAP # specify the built-in keymap -makeoptions SUNKBD_DFLT_KEYMAP=jp.106 +makeoptions SUNKBD_DFLT_KEYMAP=fr.dvorak ##################################################################### From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 15:57:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F33D934; Wed, 25 Mar 2015 15:57:56 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B924AA92; Wed, 25 Mar 2015 15:57:54 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2PFvp0q011710 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 25 Mar 2015 18:57:51 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2PFvpBp011709; Wed, 25 Mar 2015 18:57:51 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 25 Mar 2015 18:57:51 +0300 From: Gleb Smirnoff To: "Andrey V. Elsukov" Subject: Re: svn commit: r280444 - head/sys/netinet6 Message-ID: <20150325155751.GE64665@FreeBSD.org> References: <201503241645.t2OGjpoe066993@svn.freebsd.org> <5512AF84.2000303@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5512AF84.2000303@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 15:57:56 -0000 On Wed, Mar 25, 2015 at 03:52:20PM +0300, Andrey V. Elsukov wrote: A> On 24.03.2015 19:45, Gleb Smirnoff wrote: A> > Author: glebius A> > Date: Tue Mar 24 16:45:50 2015 A> > New Revision: 280444 A> > URL: https://svnweb.freebsd.org/changeset/base/280444 A> > A> > Log: A> > Move ip6_sprintf() declaration from in6_var.h to in6.h. This is a simple A> > function that works with in6_addr and it is not related to the INET6 A> > stack implementation. A> A> maybe it will be better just remove ip6_sprintf() and use inet_ntop() A> instead? That's up to you, guys. My aim was to remove yet another user of if_var.h -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 16:01:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39A05BC0; Wed, 25 Mar 2015 16:01:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 241EBBB3; Wed, 25 Mar 2015 16:01:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PG1lm4055576; Wed, 25 Mar 2015 16:01:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PG1kde055575; Wed, 25 Mar 2015 16:01:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503251601.t2PG1kde055575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 25 Mar 2015 16:01:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280622 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 16:01:47 -0000 Author: glebius Date: Wed Mar 25 16:01:46 2015 New Revision: 280622 URL: https://svnweb.freebsd.org/changeset/base/280622 Log: Fix couple of fallouts from r280280. The first one is a simple typo, where counter was incremented on parent, instead of vlan(4) interface. The second is more complicated. Historically, in our stack the incoming packets are accounted in drivers, while incoming bytes for Ethernet drivers are accounted in ether_input_internal(). Thus, it should be removed from vlan(4) driver. Sponsored by: Netflix Sponsored by: Nginx, Inc. Modified: head/sys/net/if_vlan.c Modified: head/sys/net/if_vlan.c ============================================================================== --- head/sys/net/if_vlan.c Wed Mar 25 15:51:41 2015 (r280621) +++ head/sys/net/if_vlan.c Wed Mar 25 16:01:46 2015 (r280622) @@ -1163,8 +1163,7 @@ vlan_input(struct ifnet *ifp, struct mbu TRUNK_RUNLOCK(trunk); m->m_pkthdr.rcvif = ifv->ifv_ifp; - if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); - if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len); + if_inc_counter(ifv->ifv_ifp, IFCOUNTER_IPACKETS, 1); /* Pass it back through the parent's input routine. */ (*ifp->if_input)(ifv->ifv_ifp, m); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 16:54:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5408299; Wed, 25 Mar 2015 16:54:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ED701FC; Wed, 25 Mar 2015 16:54:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PGscIb080066; Wed, 25 Mar 2015 16:54:38 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PGscPg080065; Wed, 25 Mar 2015 16:54:38 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503251654.t2PGscPg080065@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 25 Mar 2015 16:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280626 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 16:54:39 -0000 Author: pfg Date: Wed Mar 25 16:54:37 2015 New Revision: 280626 URL: https://svnweb.freebsd.org/changeset/base/280626 Log: Clean sparse spaces. Modified: head/include/stdlib.h Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Wed Mar 25 16:40:08 2015 (r280625) +++ head/include/stdlib.h Wed Mar 25 16:54:37 2015 (r280626) @@ -277,9 +277,9 @@ int cgetustr(char *, const char *, char int daemon(int, int); char *devname(__dev_t, __mode_t); -char *devname_r(__dev_t, __mode_t, char *, int); +char *devname_r(__dev_t, __mode_t, char *, int); char *fdevname(int); -char *fdevname_r(int, char *, int); +char *fdevname_r(int, char *, int); int getloadavg(double [], int); const char * getprogname(void); From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 17:58:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD2BD27A; Wed, 25 Mar 2015 17:58:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6FC4B65; Wed, 25 Mar 2015 17:58:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PHwkoY009858; Wed, 25 Mar 2015 17:58:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PHwkOq009857; Wed, 25 Mar 2015 17:58:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503251758.t2PHwkOq009857@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 25 Mar 2015 17:58:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r280628 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 17:58:47 -0000 Author: gjb Date: Wed Mar 25 17:58:44 2015 New Revision: 280628 URL: https://svnweb.freebsd.org/changeset/base/280628 Log: Document SA-15:06. Sponsored by: The FreeBSD Foundation Modified: stable/8/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/8/release/doc/share/xml/security.xml ============================================================================== --- stable/8/release/doc/share/xml/security.xml Wed Mar 25 17:20:59 2015 (r280627) +++ stable/8/release/doc/share/xml/security.xml Wed Mar 25 17:58:44 2015 (r280628) @@ -231,6 +231,13 @@ Remote denial of service vulnerability + + + FreeBSD-SA-15:06.openssl + 19 March 2015 + Multiple vulnerabilities + From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 17:58:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF6A127B; Wed, 25 Mar 2015 17:58:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99486B66; Wed, 25 Mar 2015 17:58:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PHwllR009865; Wed, 25 Mar 2015 17:58:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PHwlmQ009864; Wed, 25 Mar 2015 17:58:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503251758.t2PHwlmQ009864@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 25 Mar 2015 17:58:47 +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: r280628 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 17:58:47 -0000 Author: gjb Date: Wed Mar 25 17:58:44 2015 New Revision: 280628 URL: https://svnweb.freebsd.org/changeset/base/280628 Log: Document SA-15:06. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml stable/8/release/doc/share/xml/security.xml Modified: stable/9/release/doc/share/xml/security.xml ============================================================================== --- stable/9/release/doc/share/xml/security.xml Wed Mar 25 17:20:59 2015 (r280627) +++ stable/9/release/doc/share/xml/security.xml Wed Mar 25 17:58:44 2015 (r280628) @@ -126,6 +126,13 @@ Remote denial of service vulnerability + + + FreeBSD-SA-15:06.openssl + 19 March 2015 + Multiple vulnerabilities + From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 17:58:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18E03279; Wed, 25 Mar 2015 17:58:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01E03B64; Wed, 25 Mar 2015 17:58:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PHwjxQ009852; Wed, 25 Mar 2015 17:58:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PHwjX4009851; Wed, 25 Mar 2015 17:58:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503251758.t2PHwjX4009851@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 25 Mar 2015 17:58:45 +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: r280628 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 17:58:46 -0000 Author: gjb Date: Wed Mar 25 17:58:44 2015 New Revision: 280628 URL: https://svnweb.freebsd.org/changeset/base/280628 Log: Document SA-15:06. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/8/release/doc/share/xml/security.xml stable/9/release/doc/share/xml/security.xml Modified: stable/10/release/doc/share/xml/security.xml ============================================================================== --- stable/10/release/doc/share/xml/security.xml Wed Mar 25 17:20:59 2015 (r280627) +++ stable/10/release/doc/share/xml/security.xml Wed Mar 25 17:58:44 2015 (r280628) @@ -79,6 +79,13 @@ 25 February 2015 Integer overflow in IGMP protocol + + + FreeBSD-SA-15:06.openssl + 19 March 2015 + Multiple vulnerabilities + From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 18:02:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1461C7B9; Wed, 25 Mar 2015 18:02:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F35B5C30; Wed, 25 Mar 2015 18:02:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PI277f014101; Wed, 25 Mar 2015 18:02:07 GMT (envelope-from culot@FreeBSD.org) Received: (from culot@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PI27lL014100; Wed, 25 Mar 2015 18:02:07 GMT (envelope-from culot@FreeBSD.org) Message-Id: <201503251802.t2PI27lL014100@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: culot set sender to culot@FreeBSD.org using -f From: Frederic Culot Date: Wed, 25 Mar 2015 18:02:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280629 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 18:02:08 -0000 Author: culot (ports committer) Date: Wed Mar 25 18:02:06 2015 New Revision: 280629 URL: https://svnweb.freebsd.org/changeset/base/280629 Log: Update the portmgr members list Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot ============================================================================== --- head/share/misc/organization.dot Wed Mar 25 17:58:44 2015 (r280628) +++ head/share/misc/organization.dot Wed Mar 25 18:02:06 2015 (r280629) @@ -30,7 +30,7 @@ coresecretary [label="Core Team Secretar doccommitters [label="Doc/www Committers\ndoc-committers@FreeBSD.org"] doceng [label="Documentation Engineering Team\ndoceng@FreeBSD.org\ngjb, blackend,\ngabor, hrs"] portscommitters [label="Ports Committers\nports-committers@FreeBSD.org"] -portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\ndecke, erwin, mat, swills"] +portmgr [label="Port Management Team\nportmgr@FreeBSD.org\nantoine, bapt, bdrewery,\nerwin, mat, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secretary@FreeBSD.org\nculot"] re [label="Primary Release Engineering Team\nre@FreeBSD.org\nkib, blackend, jpaetzel, hrs, kensmith"] secteam [label="Security Team\nsecteam@FreeBSD.org\nsimon, qingli, delphij,\nremko, philip, stas, cperciva,\ncsjp, rwatson, miwi, bz"] From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 18:56:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B55672B7; Wed, 25 Mar 2015 18:56:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FEA71C8; Wed, 25 Mar 2015 18:56:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PIucxP038710; Wed, 25 Mar 2015 18:56:38 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PIuaMv038702; Wed, 25 Mar 2015 18:56:36 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201503251856.t2PIuaMv038702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Wed, 25 Mar 2015 18:56:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280630 - in head: lib/libfetch sys/sys usr.bin/fetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 18:56:38 -0000 Author: jkim Date: Wed Mar 25 18:56:36 2015 New Revision: 280630 URL: https://svnweb.freebsd.org/changeset/base/280630 Log: Remove defunct SSLv2 support from fetch(1) and fetch(3). Modified: head/lib/libfetch/common.c head/lib/libfetch/fetch.3 head/sys/sys/param.h head/usr.bin/fetch/fetch.1 head/usr.bin/fetch/fetch.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Wed Mar 25 18:02:06 2015 (r280629) +++ head/lib/libfetch/common.c Wed Mar 25 18:56:36 2015 (r280630) @@ -672,9 +672,7 @@ fetch_ssl_setup_transport_layer(SSL_CTX { long ssl_ctx_options; - ssl_ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET; - if (getenv("SSL_ALLOW_SSL2") == NULL) - ssl_ctx_options |= SSL_OP_NO_SSLv2; + ssl_ctx_options = SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_TICKET; if (getenv("SSL_ALLOW_SSL3") == NULL) ssl_ctx_options |= SSL_OP_NO_SSLv3; if (getenv("SSL_NO_TLS1") != NULL) Modified: head/lib/libfetch/fetch.3 ============================================================================== --- head/lib/libfetch/fetch.3 Wed Mar 25 18:02:06 2015 (r280629) +++ head/lib/libfetch/fetch.3 Wed Mar 25 18:56:36 2015 (r280630) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 15, 2014 +.Dd March 25, 2015 .Dt FETCH 3 .Os .Sh NAME @@ -441,10 +441,8 @@ By default allows TLSv1 and newer when negotiating the connecting with the remote peer. You can change this behavior by setting the -.Ev SSL_ALLOW_SSL2 -and .Ev SSL_ALLOW_SSL3 -environment variables to allow SSLv2 and SSLv3, respectively, and +environment variable to allow SSLv3 and .Ev SSL_NO_TLS1 , .Ev SSL_NO_TLS1_1 and .Ev SSL_NO_TLS1_2 @@ -646,8 +644,6 @@ which proxies should not be used. Same as .Ev NO_PROXY , for compatibility. -.It Ev SSL_ALLOW_SSL2 -Allow SSL version 2 when negotiating the connection (not recommended). .It Ev SSL_ALLOW_SSL3 Allow SSL version 3 when negotiating the connection (not recommended). .It Ev SSL_CA_CERT_FILE Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Wed Mar 25 18:02:06 2015 (r280629) +++ head/sys/sys/param.h Wed Mar 25 18:56:36 2015 (r280630) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100066 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100067 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/usr.bin/fetch/fetch.1 ============================================================================== --- head/usr.bin/fetch/fetch.1 Wed Mar 25 18:02:06 2015 (r280629) +++ head/usr.bin/fetch/fetch.1 Wed Mar 25 18:56:36 2015 (r280630) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2014 +.Dd March 25, 2015 .Dt FETCH 1 .Os .Sh NAME @@ -39,7 +39,6 @@ .Sh SYNOPSIS .Nm .Op Fl 146AadFlMmnPpqRrsUv -.Op Fl -allow-sslv2 .Op Fl B Ar bytes .Op Fl -bind-address= Ns Ar host .Op Fl -ca-cert= Ns Ar file @@ -113,9 +112,6 @@ Some broken Web sites will return a redi error when the requested object does not exist. .It Fl a , -retry Automatically retry the transfer upon soft failures. -.It Fl -allow-sslv2 -[SSL] -Allow SSL version 2 when negotiating the connection. .It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes Specify the read buffer size in bytes. The default is 16,384 bytes. @@ -350,7 +346,6 @@ for a description of additional environm .Ev NETRC , .Ev NO_PROXY , .Ev no_proxy , -.Ev SSL_ALLOW_SSL2 , .Ev SSL_CA_CERT_FILE , .Ev SSL_CA_CERT_PATH , .Ev SSL_CLIENT_CERT_FILE , Modified: head/usr.bin/fetch/fetch.c ============================================================================== --- head/usr.bin/fetch/fetch.c Wed Mar 25 18:02:06 2015 (r280629) +++ head/usr.bin/fetch/fetch.c Wed Mar 25 18:56:36 2015 (r280630) @@ -102,7 +102,6 @@ enum options OPTION_HTTP_REFERER, OPTION_HTTP_USER_AGENT, OPTION_NO_PROXY, - OPTION_SSL_ALLOW_SSL2, OPTION_SSL_CA_CERT_FILE, OPTION_SSL_CA_CERT_PATH, OPTION_SSL_CLIENT_CERT_FILE, @@ -154,7 +153,6 @@ static struct option longopts[] = { "referer", required_argument, NULL, OPTION_HTTP_REFERER }, { "user-agent", required_argument, NULL, OPTION_HTTP_USER_AGENT }, { "no-proxy", required_argument, NULL, OPTION_NO_PROXY }, - { "allow-sslv2", no_argument, NULL, OPTION_SSL_ALLOW_SSL2 }, { "ca-cert", required_argument, NULL, OPTION_SSL_CA_CERT_FILE }, { "ca-path", required_argument, NULL, OPTION_SSL_CA_CERT_PATH }, { "cert", required_argument, NULL, OPTION_SSL_CLIENT_CERT_FILE }, @@ -845,17 +843,17 @@ static void usage(void) { fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n", -"usage: fetch [-146AadFlMmnPpqRrsUv] [--allow-sslv2] [-B bytes]", -" [--bind-address=host] [--ca-cert=file] [--ca-path=dir] [--cert=file]", -" [--crl=file] [-i file] [--key=file] [-N file] [--no-passive]", -" [--no-proxy=list] [--no-sslv3] [--no-tlsv1] [--no-verify-hostname]", -" [--no-verify-peer] [-o file] [--referer=URL] [-S bytes] [-T seconds]", +"usage: fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [--bind-address=host]", +" [--ca-cert=file] [--ca-path=dir] [--cert=file] [--crl=file]", +" [-i file] [--key=file] [-N file] [--no-passive] [--no-proxy=list]", +" [--no-sslv3] [--no-tlsv1] [--no-verify-hostname] [--no-verify-peer]", +" [-o file] [--referer=URL] [-S bytes] [-T seconds]", " [--user-agent=agent-string] [-w seconds] URL ...", -" fetch [-146AadFlMmnPpqRrsUv] [--allow-sslv2] [-B bytes]", -" [--bind-address=host] [--ca-cert=file] [--ca-path=dir] [--cert=file]", -" [--crl=file] [-i file] [--key=file] [-N file] [--no-passive]", -" [--no-proxy=list] [--no-sslv3] [--no-tlsv1] [--no-verify-hostname]", -" [--no-verify-peer] [-o file] [--referer=URL] [-S bytes] [-T seconds]", +" fetch [-146AadFlMmnPpqRrsUv] [-B bytes] [--bind-address=host]", +" [--ca-cert=file] [--ca-path=dir] [--cert=file] [--crl=file]", +" [-i file] [--key=file] [-N file] [--no-passive] [--no-proxy=list]", +" [--no-sslv3] [--no-tlsv1] [--no-verify-hostname] [--no-verify-peer]", +" [-o file] [--referer=URL] [-S bytes] [-T seconds]", " [--user-agent=agent-string] [-w seconds] -h host -f file [-c dir]"); } @@ -1004,9 +1002,6 @@ main(int argc, char *argv[]) case OPTION_NO_PROXY: setenv("NO_PROXY", optarg, 1); break; - case OPTION_SSL_ALLOW_SSL2: - setenv("SSL_ALLOW_SSL2", "", 1); - break; case OPTION_SSL_CA_CERT_FILE: setenv("SSL_CA_CERT_FILE", optarg, 1); break; From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 20:15:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1282C83E; Wed, 25 Mar 2015 20:15:30 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (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 9322DC83; Wed, 25 Mar 2015 20:15:29 +0000 (UTC) Received: by wgdm6 with SMTP id m6so40900024wgd.2; Wed, 25 Mar 2015 13:15:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=BgOwk2XQY3iZ6GEFotLMdYbmEgWMsELIC9uBuXvAIkg=; b=0Kb3ehhreeR+90EhBia1weGXi4BS+9iOwku8wW41J+Q90cMVcUOROsDngJrjFxMdmq eLvEXON0X8tOQ2t6kASbdPSVmhUoeM29D2wsHJfax71IpHR45lY/OIR/4Q77Y7cSsmC5 pk+wWEleedRQRoFm+0q2nO0W1u5StkydBg7IFIWGly9T6glv2s/AD9lGGLP11kluSVl/ C2i4CzXevVpg8TGWij/8Y0OugdvhRWgAIIP6m2xcBu3R9VCea3zRveBFzLeJuDsKHeIU iGZdhNYbNIq7iQwY1hA+/jCAZ7u6HMcN76UAXF3GInSYEj8mSp+b/8G5yV92Q3SYt8HC 9Qgw== X-Received: by 10.180.221.232 with SMTP id qh8mr40505608wic.19.1427314527993; Wed, 25 Mar 2015 13:15:27 -0700 (PDT) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by mx.google.com with ESMTPSA id j9sm5212461wjy.18.2015.03.25.13.15.26 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Mar 2015 13:15:27 -0700 (PDT) Date: Wed, 25 Mar 2015 21:15:24 +0100 From: Mateusz Guzik To: Bruce Evans Subject: Re: svn commit: r280407 - head/sys/kern Message-ID: <20150325201524.GB14280@dft-labs.eu> References: <201503240010.t2O0ACZb089906@svn.freebsd.org> <20150324135350.N1665@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150324135350.N1665@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 20:15:30 -0000 On Tue, Mar 24, 2015 at 03:58:14PM +1100, Bruce Evans wrote: > On Tue, 24 Mar 2015, Mateusz Guzik wrote: > > >Log: > > filedesc: microoptimize fget_unlocked by getting rid of fd < 0 branch > > This has no effect. Compilers optimize to the equivalent of the the > unsigned cast hack if this is good. On x86, it is good since no > instructions are needed for the conversion, and the only difference > between the code generated by > > if (fd >= fdt->fdt_nfiles) > > and > > if (fd < 0 || fd >= fdt->fdt_nfiles) > > is to change from jl (jump if less than) to jb (jump if below) (both > jumps over the if clause). Negative values satisfy jl but not jb. > I would not commit the change if it did not affect generated assembly at least on amd64. if (fd < 0 || fd >= fdt->fdt_nfiles): 0xffffffff807d147d : sub $0x38,%rsp 0xffffffff807d1481 : test %esi,%esi 0xffffffff807d1483 : js 0xffffffff807d15b8 0xffffffff807d1489 : mov (%rdi),%rbx 0xffffffff807d148c : cmp %esi,(%rbx) 0xffffffff807d148e : jle 0xffffffff807d15bf if ((u_int)fd >= fdt->fdt_nfiles): 0xffffffff807d147d : sub $0x38,%rsp 0xffffffff807d1481 : mov (%rdi),%rbx 0xffffffff807d1484 : cmp %esi,(%rbx) 0xffffffff807d1486 : jbe 0xffffffff807d15a8 I did not check other archs prior to the commit. This is clang 3.6 as present in head. Sources compiled with -O2. Also see below for other compiler test. > > Casting fd to an unsigned type simplifies fd range coparison to mere checking > > if the result is bigger than the table. > > No, it obfuscates the range comparison. > It is a standard hack which is hard to misread and which seems to add a slight benefit (see below). > On some arches, conversion to unsigned is slow. Then compilers should > optimize in the opposite direction by first undoing the bogus cast to > get back to the range check and then optimizing the range check using > the best strategy. Compilers should probably first undo the bogus > cast even on x86, so as to reduce to the range check case. Range checks > are more important and more uniform than bogus casts, so they are more > likely to be optimized. Similarly if fd has type u_int to begin with. It affects assembly on all arm, powerpc64 and mips64 as well. Both arm and powerpc just get rid of zero-test and use the same instructions to perform the other comparison. I only found a difference on mips64 which used sltu instead of slt (but still got rid of the zero-check). Granted I don't know mips instruction costs and I don't have the real hadrware to benchark on. Seems like a win for most architectures anyway. > > >Modified: head/sys/kern/kern_descrip.c > >============================================================================== > >--- head/sys/kern/kern_descrip.c Tue Mar 24 00:01:30 2015 (r280406) > >+++ head/sys/kern/kern_descrip.c Tue Mar 24 00:10:11 2015 (r280407) > >@@ -2342,7 +2342,7 @@ fget_unlocked(struct filedesc *fdp, int > >#endif > > > > fdt = fdp->fd_files; > >- if (fd < 0 || fd >= fdt->fdt_nfiles) > >+ if ((u_int)fd >= fdt->fdt_nfiles) > > return (EBADF); > > /* > > * Fetch the descriptor locklessly. We avoid fdrop() races by > [..] > - fget_locked() seems to be unchanged recently, so it doesn't have the > obfuscation. fget_unlocked() is newer than the unobfuscated version > of fget_locked(). It is in a different file, but may have copied the > unobfuscated range check from fget_locked(). This commit restores the > obfuscation to it alone. > This definitely should be synced one way or the other, thanks for pointing this out. > There are now some other range checks in kern_desc.c that are missing > the obfuscation: grepping for "fd <" gives: > - a magic treatment for negative fd's in closefrom() Well I'll start with a short note that I don't know what's up with uap->lowfd = 0; instead of retuning with EINVAL. Anyay, the cast there would not have any use. > - the range check in an unobfuscated by confusing form in fdisused(). > The check has to be inverted since it is in a KASSERT(), and the > inversion is done by reversing the inequalities. Correct, this likely should also be synced (one way or the other). > - similarly in fdalloc(). > Same. > I used to use this hack a lot 30 years ago, but stopped when compilers > got better 20-25 years ago. > I wrote a toy program and checked e.g. gcc5 and it still did not optimise zero-test away. In fact I would argue the optimisation in question is impossible unless upper limit check is against a constant in (0, INT_MAX) range or against a var whose range is known at compile time. In particular this is problematic for negative values. Consider: int fd, limit; ............ if (fd < 0 || fd >= limit) Let's have fd = -5 and limit = -4. Should the fd < 0 check be dropped by the compiler and the expression turned into (u_int)fd >= limit, the coparison would be false thus changing the outcome. As such, I prefer to keep the cast. -- Mateusz Guzik From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 20:57:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1B19100; Wed, 25 Mar 2015 20:57:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD95DF0; Wed, 25 Mar 2015 20:57:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PKv9Rn096919; Wed, 25 Mar 2015 20:57:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PKv9G2096918; Wed, 25 Mar 2015 20:57:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503252057.t2PKv9G2096918@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 25 Mar 2015 20:57:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280631 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 20:57:09 -0000 Author: emaste Date: Wed Mar 25 20:57:08 2015 New Revision: 280631 URL: https://svnweb.freebsd.org/changeset/base/280631 Log: Force MK_INCLUDES for the legacy stage As legacy executes "make installincludes" we don't want it to be disabled by a src.conf setting. Reviewed by: imp MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2143 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Mar 25 18:56:36 2015 (r280630) +++ head/Makefile.inc1 Wed Mar 25 20:57:08 2015 (r280631) @@ -259,7 +259,8 @@ BMAKE= MAKEOBJDIRPREFIX=${WORLDTMP} \ -DNO_PIC MK_PROFILE=no -DNO_SHARED \ -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \ MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \ - MK_LLDB=no MK_TESTS=no + MK_LLDB=no MK_TESTS=no \ + MK_INCLUDES=yes # build-tools stage TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 20:57:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC4D1251; Wed, 25 Mar 2015 20:57:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5E80101; Wed, 25 Mar 2015 20:57:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PKvvqV097048; Wed, 25 Mar 2015 20:57:57 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PKvtXT097039; Wed, 25 Mar 2015 20:57:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503252057.t2PKvtXT097039@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 25 Mar 2015 20:57:55 +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: r280632 - in stable/10: sys/kern sys/sys usr.sbin/jail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 20:57:58 -0000 Author: ian Date: Wed Mar 25 20:57:54 2015 New Revision: 280632 URL: https://svnweb.freebsd.org/changeset/base/280632 Log: MFC r279361, r279395, r279396: Allow the kern.osrelease and kern.osreldate sysctl values to be set in a jail's creation parameters. This allows the kernel version to be reliably spoofed within the jail whether examined directly with sysctl or indirectly with the uname -r and -K options. Export the new osreldate and osrelease jail parms in jail_get(2). Fix line wrap. Modified: stable/10/sys/kern/imgact_elf.c stable/10/sys/kern/init_main.c stable/10/sys/kern/kern_jail.c stable/10/sys/kern/kern_mib.c stable/10/sys/sys/jail.h stable/10/usr.sbin/jail/jail.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/imgact_elf.c ============================================================================== --- stable/10/sys/kern/imgact_elf.c Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/kern/imgact_elf.c Wed Mar 25 20:57:54 2015 (r280632) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -996,7 +997,8 @@ __elfN(freebsd_fixup)(register_t **stack AUXARGS_ENTRY(pos, AT_BASE, args->base); if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, AT_EXECPATH, imgp->execpathp); - AUXARGS_ENTRY(pos, AT_OSRELDATE, osreldate); + AUXARGS_ENTRY(pos, AT_OSRELDATE, + imgp->proc->p_ucred->cr_prison->pr_osreldate); if (imgp->canary != 0) { AUXARGS_ENTRY(pos, AT_CANARY, imgp->canary); AUXARGS_ENTRY(pos, AT_CANARYLEN, imgp->canarylen); Modified: stable/10/sys/kern/init_main.c ============================================================================== --- stable/10/sys/kern/init_main.c Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/kern/init_main.c Wed Mar 25 20:57:54 2015 (r280632) @@ -493,7 +493,7 @@ proc0_init(void *dummy __unused) td->td_flags = TDF_INMEM; td->td_pflags = TDP_KTHREAD; td->td_cpuset = cpuset_thread0(); - prison0.pr_cpuset = cpuset_ref(td->td_cpuset); + prison0_init(); p->p_peers = 0; p->p_leader = p; p->p_reaper = p; Modified: stable/10/sys/kern/kern_jail.c ============================================================================== --- stable/10/sys/kern/kern_jail.c Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/kern/kern_jail.c Wed Mar 25 20:57:54 2015 (r280632) @@ -238,6 +238,19 @@ static int jail_default_devfs_rsnum = JA static unsigned jail_max_af_ips = 255; #endif +/* + * Initialize the parts of prison0 that can't be static-initialized with + * constants. This is called from proc0_init() after creating thread0 cpuset. + */ +void +prison0_init(void) +{ + + prison0.pr_cpuset = cpuset_ref(thread0.td_cpuset); + prison0.pr_osreldate = osreldate; + strlcpy(prison0.pr_osrelease, osrelease, sizeof(prison0.pr_osrelease)); +} + #ifdef INET static int qcmp_v4(const void *ip1, const void *ip2) @@ -537,7 +550,7 @@ kern_jail_set(struct thread *td, struct struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; char *domain, *errmsg, *host, *name, *namelc, *p, *path, *uuid; - char *g_path; + char *g_path, *osrelstr; #if defined(INET) || defined(INET6) struct prison *tppr; void *op; @@ -547,7 +560,7 @@ kern_jail_set(struct thread *td, struct int created, cuflags, descend, enforce, error, errmsg_len, errmsg_pos; int gotchildmax, gotenforce, gothid, gotrsnum, gotslevel; int fi, jid, jsys, len, level; - int childmax, rsnum, slevel; + int childmax, osreldt, rsnum, slevel; int fullpath_disabled; #if defined(INET) || defined(INET6) int ii, ij; @@ -962,6 +975,46 @@ kern_jail_set(struct thread *td, struct } } + error = vfs_getopt(opts, "osrelease", (void **)&osrelstr, &len); + if (error == ENOENT) + osrelstr = NULL; + else if (error != 0) + goto done_free; + else { + if (flags & JAIL_UPDATE) { + error = EINVAL; + vfs_opterror(opts, + "osrelease cannot be changed after creation"); + goto done_errmsg; + } + if (len == 0 || len >= OSRELEASELEN) { + error = EINVAL; + vfs_opterror(opts, + "osrelease string must be 1-%d bytes long", + OSRELEASELEN - 1); + goto done_errmsg; + } + } + + error = vfs_copyopt(opts, "osreldate", &osreldt, sizeof(osreldt)); + if (error == ENOENT) + osreldt = 0; + else if (error != 0) + goto done_free; + else { + if (flags & JAIL_UPDATE) { + error = EINVAL; + vfs_opterror(opts, + "osreldate cannot be changed after creation"); + goto done_errmsg; + } + if (osreldt == 0) { + error = EINVAL; + vfs_opterror(opts, "osreldate cannot be 0"); + goto done_errmsg; + } + } + /* * Grab the allprison lock before letting modules check their * parameters. Once we have it, do not let go so we'll have a @@ -1290,6 +1343,12 @@ kern_jail_set(struct thread *td, struct pr->pr_enforce_statfs = JAIL_DEFAULT_ENFORCE_STATFS; pr->pr_devfs_rsnum = ppr->pr_devfs_rsnum; + pr->pr_osreldate = osreldt ? osreldt : ppr->pr_osreldate; + if (osrelstr == NULL) + strcpy(pr->pr_osrelease, ppr->pr_osrelease); + else + strcpy(pr->pr_osrelease, osrelstr); + LIST_INIT(&pr->pr_children); mtx_init(&pr->pr_mtx, "jail mutex", NULL, MTX_DEF | MTX_DUPOK); @@ -2126,6 +2185,13 @@ kern_jail_get(struct thread *td, struct error = vfs_setopt(opts, "nodying", &i, sizeof(i)); if (error != 0 && error != ENOENT) goto done_deref; + error = vfs_setopt(opts, "osreldate", &pr->pr_osreldate, + sizeof(pr->pr_osreldate)); + if (error != 0 && error != ENOENT) + goto done_deref; + error = vfs_setopts(opts, "osrelease", pr->pr_osrelease); + if (error != 0 && error != ENOENT) + goto done_deref; /* Get the module parameters. */ mtx_unlock(&pr->pr_mtx); @@ -4321,12 +4387,20 @@ sysctl_jail_param(SYSCTL_HANDLER_ARGS) return (0); } +/* + * CTLFLAG_RDTUN in the following indicates jail parameters that can be set at + * jail creation time but cannot be changed in an existing jail. + */ SYSCTL_JAIL_PARAM(, jid, CTLTYPE_INT | CTLFLAG_RDTUN, "I", "Jail ID"); SYSCTL_JAIL_PARAM(, parent, CTLTYPE_INT | CTLFLAG_RD, "I", "Jail parent ID"); SYSCTL_JAIL_PARAM_STRING(, name, CTLFLAG_RW, MAXHOSTNAMELEN, "Jail name"); SYSCTL_JAIL_PARAM_STRING(, path, CTLFLAG_RDTUN, MAXPATHLEN, "Jail root path"); SYSCTL_JAIL_PARAM(, securelevel, CTLTYPE_INT | CTLFLAG_RW, "I", "Jail secure level"); +SYSCTL_JAIL_PARAM(, osreldate, CTLTYPE_INT | CTLFLAG_RDTUN, "I", + "Jail value for kern.osreldate and uname -K"); +SYSCTL_JAIL_PARAM_STRING(, osrelease, CTLFLAG_RDTUN, OSRELEASELEN, + "Jail value for kern.osrelease and uname -r"); SYSCTL_JAIL_PARAM(, enforce_statfs, CTLTYPE_INT | CTLFLAG_RW, "I", "Jail cannot see all mounted file systems"); SYSCTL_JAIL_PARAM(, devfs_ruleset, CTLTYPE_INT | CTLFLAG_RW, Modified: stable/10/sys/kern/kern_mib.c ============================================================================== --- stable/10/sys/kern/kern_mib.c Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/kern/kern_mib.c Wed Mar 25 20:57:54 2015 (r280632) @@ -90,9 +90,6 @@ SYSCTL_ROOT_NODE(OID_AUTO, regression, C SYSCTL_STRING(_kern, OID_AUTO, ident, CTLFLAG_RD|CTLFLAG_MPSAFE, kern_ident, 0, "Kernel identifier"); -SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD|CTLFLAG_MPSAFE| - CTLFLAG_CAPRD, osrelease, 0, "Operating system release"); - SYSCTL_INT(_kern, KERN_OSREV, osrevision, CTLFLAG_RD|CTLFLAG_CAPRD, SYSCTL_NULL_INT_PTR, BSD, "Operating system revision"); @@ -105,13 +102,6 @@ SYSCTL_STRING(_kern, OID_AUTO, compiler_ SYSCTL_STRING(_kern, KERN_OSTYPE, ostype, CTLFLAG_RD|CTLFLAG_MPSAFE| CTLFLAG_CAPRD, ostype, 0, "Operating system type"); -/* - * NOTICE: The *userland* release date is available in - * /usr/include/osreldate.h - */ -SYSCTL_INT(_kern, KERN_OSRELDATE, osreldate, CTLFLAG_RD|CTLFLAG_CAPRD, - &osreldate, 0, "Kernel release date"); - SYSCTL_INT(_kern, KERN_MAXPROC, maxproc, CTLFLAG_RDTUN, &maxproc, 0, "Maximum number of processes"); @@ -429,6 +419,48 @@ SYSCTL_PROC(_kern, KERN_HOSTID, hostid, CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, NULL, 0, sysctl_hostid, "LU", "Host ID"); +/* + * The osrelease string is copied from the global (osrelease in vers.c) into + * prison0 by a sysinit and is inherited by child jails if not changed at jail + * creation, so we always return the copy from the current prison data. + */ +static int +sysctl_osrelease(SYSCTL_HANDLER_ARGS) +{ + struct prison *pr; + + pr = req->td->td_ucred->cr_prison; + return (SYSCTL_OUT(req, pr->pr_osrelease, strlen(pr->pr_osrelease) + 1)); + +} + +SYSCTL_PROC(_kern, KERN_OSRELEASE, osrelease, + CTLTYPE_STRING | CTLFLAG_CAPRD | CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, 0, sysctl_osrelease, "A", "Operating system release"); + +/* + * The osreldate number is copied from the global (osreldate in vers.c) into + * prison0 by a sysinit and is inherited by child jails if not changed at jail + * creation, so we always return the value from the current prison data. + */ +static int +sysctl_osreldate(SYSCTL_HANDLER_ARGS) +{ + struct prison *pr; + + pr = req->td->td_ucred->cr_prison; + return (SYSCTL_OUT(req, &pr->pr_osreldate, sizeof(pr->pr_osreldate))); + +} + +/* + * NOTICE: The *userland* release date is available in + * /usr/include/osreldate.h + */ +SYSCTL_PROC(_kern, KERN_OSRELDATE, osreldate, + CTLTYPE_INT | CTLFLAG_CAPRD | CTLFLAG_RD | CTLFLAG_MPSAFE, + NULL, 0, sysctl_osreldate, "I", "Kernel release date"); + SYSCTL_NODE(_kern, OID_AUTO, features, CTLFLAG_RD, 0, "Kernel Features"); #ifdef COMPAT_FREEBSD4 Modified: stable/10/sys/sys/jail.h ============================================================================== --- stable/10/sys/sys/jail.h Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/sys/sys/jail.h Wed Mar 25 20:57:54 2015 (r280632) @@ -134,6 +134,7 @@ MALLOC_DECLARE(M_PRISON); #include #define HOSTUUIDLEN 64 +#define OSRELEASELEN 32 struct racct; struct prison_racct; @@ -177,13 +178,15 @@ struct prison { int pr_securelevel; /* (p) securelevel */ int pr_enforce_statfs; /* (p) statfs permission */ int pr_devfs_rsnum; /* (p) devfs ruleset */ - int pr_spare[4]; + int pr_spare[3]; + int pr_osreldate; /* (c) kern.osreldate value */ unsigned long pr_hostid; /* (p) jail hostid */ char pr_name[MAXHOSTNAMELEN]; /* (p) admin jail name */ char pr_path[MAXPATHLEN]; /* (c) chroot path */ char pr_hostname[MAXHOSTNAMELEN]; /* (p) jail hostname */ char pr_domainname[MAXHOSTNAMELEN]; /* (p) jail domainname */ char pr_hostuuid[HOSTUUIDLEN]; /* (p) jail hostuuid */ + char pr_osrelease[OSRELEASELEN]; /* (c) kern.osrelease value */ }; struct prison_racct { @@ -364,6 +367,7 @@ void getcredhostname(struct ucred *, cha void getcreddomainname(struct ucred *, char *, size_t); void getcredhostuuid(struct ucred *, char *, size_t); void getcredhostid(struct ucred *, unsigned long *); +void prison0_init(void); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); int prison_owns_vnet(struct ucred *); Modified: stable/10/usr.sbin/jail/jail.8 ============================================================================== --- stable/10/usr.sbin/jail/jail.8 Wed Mar 25 20:57:08 2015 (r280631) +++ stable/10/usr.sbin/jail/jail.8 Wed Mar 25 20:57:54 2015 (r280632) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 6, 2015 +.Dd February 25, 2015 .Dt JAIL 8 .Os .Sh NAME @@ -276,7 +276,7 @@ Then there are pseudo-parameters that ar .Nm itself. .Pp -Jails have a set a core parameters, and kernel modules can add their own +Jails have a set of core parameters, and kernel modules can add their own jail parameters. The current set of available parameters can be retrieved via .Dq Nm sysctl Fl d Va security.jail.param . @@ -471,6 +471,14 @@ The .Va jid of the parent of this jail, or zero if this is a top-level jail (read-only). +.It Va osrelease +The string for the jail's +.Va kern.osrelease +sysctl and uname -r. +.It Va osreldate +The number for the jail's +.Va kern.osreldate +and uname -K. .It Va allow.* Some restrictions of the jail environment may be set on a per-jail basis. From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 21:41:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99CE6D81; Wed, 25 Mar 2015 21:41:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85224836; Wed, 25 Mar 2015 21:41:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PLfLcg019047; Wed, 25 Mar 2015 21:41:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PLfLNn019046; Wed, 25 Mar 2015 21:41:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503252141.t2PLfLNn019046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 25 Mar 2015 21:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280634 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 21:41:21 -0000 Author: tuexen Date: Wed Mar 25 21:41:20 2015 New Revision: 280634 URL: https://svnweb.freebsd.org/changeset/base/280634 Log: Use the reference count of the right SCTP inp. Joint work with rrs@ MFC after: 3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed Mar 25 21:31:36 2015 (r280633) +++ head/sys/netinet/sctp_usrreq.c Wed Mar 25 21:41:20 2015 (r280634) @@ -6953,7 +6953,7 @@ sctp_listen(struct socket *so, int backl SCTP_INP_DECR_REF(tinp); return (EADDRINUSE); } else if (tinp) { - SCTP_INP_DECR_REF(inp); + SCTP_INP_DECR_REF(tinp); } } } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 21:53:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5685F9; Wed, 25 Mar 2015 21:53:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97C9F94C; Wed, 25 Mar 2015 21:53:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PLrIV8025857; Wed, 25 Mar 2015 21:53:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PLrInc025854; Wed, 25 Mar 2015 21:53:18 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503252153.t2PLrInc025854@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 25 Mar 2015 21:53:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280636 - head/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 21:53:18 -0000 Author: pfg Date: Wed Mar 25 21:53:17 2015 New Revision: 280636 URL: https://svnweb.freebsd.org/changeset/base/280636 Log: Temporarily revert 280458. GCC is still carries an old version of cdefs.h which doesn't accept multiple parameters for the nonnull attribute. Since this issue probably affects many ports in the tree we will revert it for now until gcc gets fixed. Modified: head/include/pthread.h head/include/signal.h Modified: head/include/pthread.h ============================================================================== --- head/include/pthread.h Wed Mar 25 21:53:16 2015 (r280635) +++ head/include/pthread.h Wed Mar 25 21:53:17 2015 (r280636) @@ -144,23 +144,19 @@ struct _pthread_cleanup_info { */ __BEGIN_DECLS int pthread_atfork(void (*)(void), void (*)(void), void (*)(void)); -int pthread_attr_destroy(pthread_attr_t *) __nonnull(1); +int pthread_attr_destroy(pthread_attr_t *); int pthread_attr_getstack(const pthread_attr_t * __restrict, - void ** __restrict, size_t * __restrict) - __nonnull(1, 2, 3); -int pthread_attr_getstacksize(const pthread_attr_t *, size_t *) - __nonnull(1, 2); + void ** __restrict, size_t * __restrict); +int pthread_attr_getstacksize(const pthread_attr_t *, size_t *); int pthread_attr_getguardsize(const pthread_attr_t *, size_t *); int pthread_attr_getstackaddr(const pthread_attr_t *, void **); -int pthread_attr_getdetachstate(const pthread_attr_t *, int *) - __nonnull(1, 2); -int pthread_attr_init(pthread_attr_t *) __nonnull(1); -int pthread_attr_setstacksize(pthread_attr_t *, size_t) __nonnull(1); -int pthread_attr_setguardsize(pthread_attr_t *, size_t) __nonnull(1); -int pthread_attr_setstack(pthread_attr_t *, void *, size_t) - __nonnull(1); +int pthread_attr_getdetachstate(const pthread_attr_t *, int *); +int pthread_attr_init(pthread_attr_t *); +int pthread_attr_setstacksize(pthread_attr_t *, size_t); +int pthread_attr_setguardsize(pthread_attr_t *, size_t); +int pthread_attr_setstack(pthread_attr_t *, void *, size_t); int pthread_attr_setstackaddr(pthread_attr_t *, void *); -int pthread_attr_setdetachstate(pthread_attr_t *, int) __nonnull(1); +int pthread_attr_setdetachstate(pthread_attr_t *, int); int pthread_barrier_destroy(pthread_barrier_t *); int pthread_barrier_init(pthread_barrier_t *, const pthread_barrierattr_t *, unsigned); @@ -168,7 +164,7 @@ int pthread_barrier_wait(pthread_barrie int pthread_barrierattr_destroy(pthread_barrierattr_t *); int pthread_barrierattr_getpshared(const pthread_barrierattr_t *, int *); -int pthread_barrierattr_init(pthread_barrierattr_t *) __nonnull(1); +int pthread_barrierattr_init(pthread_barrierattr_t *); int pthread_barrierattr_setpshared(pthread_barrierattr_t *, int); #define pthread_cleanup_push(cleanup_routine, cleanup_arg) \ @@ -184,96 +180,85 @@ int pthread_barrierattr_setpshared(pthr __pthread_cleanup_pop_imp(execute); \ } -int pthread_condattr_destroy(pthread_condattr_t *) __nonnull(1); +int pthread_condattr_destroy(pthread_condattr_t *); int pthread_condattr_getclock(const pthread_condattr_t *, - clockid_t *) __nonnull(1, 2); -int pthread_condattr_getpshared(const pthread_condattr_t *, int *) - __nonnull(1, 2); -int pthread_condattr_init(pthread_condattr_t *) __nonnull(1); -int pthread_condattr_setclock(pthread_condattr_t *, clockid_t) - __nonnull(1); -int pthread_condattr_setpshared(pthread_condattr_t *, int) - __nonnull(1); -int pthread_cond_broadcast(pthread_cond_t *) - __nonnull(1); -int pthread_cond_destroy(pthread_cond_t *) - __nonnull(1); + clockid_t *); +int pthread_condattr_getpshared(const pthread_condattr_t *, int *); +int pthread_condattr_init(pthread_condattr_t *); +int pthread_condattr_setclock(pthread_condattr_t *, clockid_t); +int pthread_condattr_setpshared(pthread_condattr_t *, int); +int pthread_cond_broadcast(pthread_cond_t *); +int pthread_cond_destroy(pthread_cond_t *); int pthread_cond_init(pthread_cond_t *, - const pthread_condattr_t *) __nonnull(1); -int pthread_cond_signal(pthread_cond_t *) __nonnull(1); + const pthread_condattr_t *); +int pthread_cond_signal(pthread_cond_t *); int pthread_cond_timedwait(pthread_cond_t *, pthread_mutex_t *__mutex, const struct timespec *) - __nonnull(1, 2, 3) __requires_exclusive(*__mutex); + __requires_exclusive(*__mutex); int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *__mutex) - __nonnull(1, 2) __requires_exclusive(*__mutex); + __requires_exclusive(*__mutex); int pthread_create(pthread_t *, const pthread_attr_t *, - void *(*) (void *), void *) __nonnull(1, 3); + void *(*) (void *), void *); int pthread_detach(pthread_t); int pthread_equal(pthread_t, pthread_t); void pthread_exit(void *) __dead2; void *pthread_getspecific(pthread_key_t); -int pthread_getcpuclockid(pthread_t, clockid_t *) __nonnull(2); +int pthread_getcpuclockid(pthread_t, clockid_t *); int pthread_join(pthread_t, void **); int pthread_key_create(pthread_key_t *, - void (*) (void *)) __nonnull(1); + void (*) (void *)); int pthread_key_delete(pthread_key_t); -int pthread_mutexattr_init(pthread_mutexattr_t *) __nonnull(1); -int pthread_mutexattr_destroy(pthread_mutexattr_t *) __nonnull(1); +int pthread_mutexattr_init(pthread_mutexattr_t *); +int pthread_mutexattr_destroy(pthread_mutexattr_t *); int pthread_mutexattr_getpshared(const pthread_mutexattr_t *, - int *) __nonnull(1, 2); -int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *) - __nonnull(1, 2); -int pthread_mutexattr_settype(pthread_mutexattr_t *, int) - __nonnull(1); -int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int) - __nonnull(1); + int *); +int pthread_mutexattr_gettype(pthread_mutexattr_t *, int *); +int pthread_mutexattr_settype(pthread_mutexattr_t *, int); +int pthread_mutexattr_setpshared(pthread_mutexattr_t *, int); int pthread_mutex_destroy(pthread_mutex_t *__mutex) - __nonnull(1) __requires_unlocked(*__mutex); + __requires_unlocked(*__mutex); int pthread_mutex_init(pthread_mutex_t *__mutex, const pthread_mutexattr_t *) - __nonnull(1) __requires_unlocked(*__mutex); + __requires_unlocked(*__mutex); int pthread_mutex_lock(pthread_mutex_t *__mutex) - __nonnull(1) __locks_exclusive(*__mutex); + __locks_exclusive(*__mutex); int pthread_mutex_trylock(pthread_mutex_t *__mutex) - __nonnull(1) __trylocks_exclusive(0, *__mutex); + __trylocks_exclusive(0, *__mutex); int pthread_mutex_timedlock(pthread_mutex_t *__mutex, const struct timespec *) - __nonnull(1, 2) __trylocks_exclusive(0, *__mutex); + __trylocks_exclusive(0, *__mutex); int pthread_mutex_unlock(pthread_mutex_t *__mutex) - __nonnull(1) __unlocks(*__mutex); -int pthread_once(pthread_once_t *, void (*) (void)) __nonnull(1, 2); + __unlocks(*__mutex); +int pthread_once(pthread_once_t *, void (*) (void)); int pthread_rwlock_destroy(pthread_rwlock_t *__rwlock) - __nonnull(1) __requires_unlocked(*__rwlock); + __requires_unlocked(*__rwlock); int pthread_rwlock_init(pthread_rwlock_t *__rwlock, const pthread_rwlockattr_t *) - __nonnull(1) __requires_unlocked(*__rwlock); + __requires_unlocked(*__rwlock); int pthread_rwlock_rdlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __locks_shared(*__rwlock); + __locks_shared(*__rwlock); int pthread_rwlock_timedrdlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __nonnull(1, 2) __trylocks_shared(0, *__rwlock); + __trylocks_shared(0, *__rwlock); int pthread_rwlock_timedwrlock(pthread_rwlock_t *__rwlock, const struct timespec *) - __nonnull(1, 2) __trylocks_exclusive(0, *__rwlock); + __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_tryrdlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __trylocks_shared(0, *__rwlock); + __trylocks_shared(0, *__rwlock); int pthread_rwlock_trywrlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __trylocks_exclusive(0, *__rwlock); + __trylocks_exclusive(0, *__rwlock); int pthread_rwlock_unlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __unlocks(*__rwlock); + __unlocks(*__rwlock); int pthread_rwlock_wrlock(pthread_rwlock_t *__rwlock) - __nonnull(1) __locks_exclusive(*__rwlock); -int pthread_rwlockattr_destroy(pthread_rwlockattr_t *) - __nonnull(1); + __locks_exclusive(*__rwlock); +int pthread_rwlockattr_destroy(pthread_rwlockattr_t *); int pthread_rwlockattr_getkind_np(const pthread_rwlockattr_t *, int *); int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *, - int *) __nonnull(1, 2); -int pthread_rwlockattr_init(pthread_rwlockattr_t *) - __nonnull(1); + int *); +int pthread_rwlockattr_init(pthread_rwlockattr_t *); int pthread_rwlockattr_setkind_np(pthread_rwlockattr_t *, int); -int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int) - __nonnull(1); +int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int); pthread_t pthread_self(void); int pthread_setspecific(pthread_key_t, const void *); @@ -310,20 +295,18 @@ int pthread_mutexattr_setprotocol(pthre int pthread_attr_getinheritsched(const pthread_attr_t *, int *); int pthread_attr_getschedparam(const pthread_attr_t *, - struct sched_param *) __nonnull(1, 2); -int pthread_attr_getschedpolicy(const pthread_attr_t *, int *) - __nonnull(1, 2); -int pthread_attr_getscope(const pthread_attr_t *, int *) - __nonnull(1, 2); + struct sched_param *); +int pthread_attr_getschedpolicy(const pthread_attr_t *, int *); +int pthread_attr_getscope(const pthread_attr_t *, int *); int pthread_attr_setinheritsched(pthread_attr_t *, int); int pthread_attr_setschedparam(pthread_attr_t *, - const struct sched_param *) __nonnull(1, 2); -int pthread_attr_setschedpolicy(pthread_attr_t *, int) __nonnull(1); -int pthread_attr_setscope(pthread_attr_t *, int) __nonnull(1); + const struct sched_param *); +int pthread_attr_setschedpolicy(pthread_attr_t *, int); +int pthread_attr_setscope(pthread_attr_t *, int); int pthread_getschedparam(pthread_t pthread, int *, - struct sched_param *) __nonnull(2, 3); + struct sched_param *); int pthread_setschedparam(pthread_t, int, - const struct sched_param *) __nonnull(3); + const struct sched_param *); #if __XSI_VISIBLE int pthread_getconcurrency(void); int pthread_setconcurrency(int); Modified: head/include/signal.h ============================================================================== --- head/include/signal.h Wed Mar 25 21:53:16 2015 (r280635) +++ head/include/signal.h Wed Mar 25 21:53:17 2015 (r280636) @@ -78,10 +78,10 @@ int sigdelset(sigset_t *, int); int sigemptyset(sigset_t *); int sigfillset(sigset_t *); int sigismember(const sigset_t *, int); -int sigpending(sigset_t *) __nonnull(1); +int sigpending(sigset_t *); int sigprocmask(int, const sigset_t * __restrict, sigset_t * __restrict); -int sigsuspend(const sigset_t *) __nonnull(1); -int sigwait(const sigset_t * __restrict, int * __restrict) __nonnull(1, 2); +int sigsuspend(const sigset_t *); +int sigwait(const sigset_t * __restrict, int * __restrict); #endif #if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 600 From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 21:59:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4D9BB587; Wed, 25 Mar 2015 21:59:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F102994; Wed, 25 Mar 2015 21:59:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PLxbs8026851; Wed, 25 Mar 2015 21:59:37 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PLxbpo026850; Wed, 25 Mar 2015 21:59:37 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201503252159.t2PLxbpo026850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 25 Mar 2015 21:59:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280639 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 21:59:38 -0000 Author: imp Date: Wed Mar 25 21:59:36 2015 New Revision: 280639 URL: https://svnweb.freebsd.org/changeset/base/280639 Log: Add some more explanation to the different phases of the build. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Mar 25 21:57:03 2015 (r280638) +++ head/Makefile.inc1 Wed Mar 25 21:59:36 2015 (r280639) @@ -209,7 +209,9 @@ INSTALLTMP!= /usr/bin/mktemp -d -u -t in # 1. legacy stage [BMAKE] # This stage is responsible for creating compatibility # shims that are needed by the bootstrap-tools, -# build-tools and cross-tools stages. +# build-tools and cross-tools stages. These are generally +# APIs that tools from one of those three stages need to +# build that aren't present on the host. # 1. bootstrap-tools stage [BMAKE] # This stage is responsible for creating programs that # are needed for backward compatibility reasons. They @@ -220,7 +222,7 @@ INSTALLTMP!= /usr/bin/mktemp -d -u -t in # the build process. # 3. cross-tools stage [XMAKE] # This stage is responsible for creating any tools that -# are needed for cross-builds. A cross-compiler is one +# are needed for building the system. A cross-compiler is one # of them. # 4. world stage [WMAKE] # This stage actually builds the world. @@ -1222,7 +1224,9 @@ update: # # -# legacy: Build compatibility shims for the next three targets +# legacy: Build compatibility shims for the next three targets. This is a minimal +# set of tools and shims necessary to compensate for older systems which don't have +# the APIs that the targets built in bootstrap-tools, build-tools or cross-tools. # legacy: .if ${BOOTSTRAPPING} < 800107 && ${BOOTSTRAPPING} != 0 @@ -1240,7 +1244,10 @@ legacy: .endfor # -# bootstrap-tools: Build tools needed for compatibility +# bootstrap-tools: Build tools needed for compatibility. These are binaries that +# are built to build other binaries in the system. However, the focus of these +# binaries is usually quite narrow. Bootstrap tools use the host's compiler and +# libraries, augmented by -legacy. # _bt= _bootstrap-tools @@ -1446,7 +1453,9 @@ kernel-tools: .MAKE -p ${MAKEOBJDIRPREFIX}/usr >/dev/null # -# cross-tools: Build cross-building tools +# cross-tools: All the tools needed to build the rest of the system after +# we get done with the earlier stages. It is the last set of tools needed +# to begin building the target binaries. # .if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 22:08:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E89FA78B; Wed, 25 Mar 2015 22:08:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D37F6A76; Wed, 25 Mar 2015 22:08:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PM84gR031536; Wed, 25 Mar 2015 22:08:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PM83Su031525; Wed, 25 Mar 2015 22:08:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503252208.t2PM83Su031525@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Wed, 25 Mar 2015 22:08:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280640 - head/release/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 22:08:05 -0000 Author: gjb Date: Wed Mar 25 22:08:02 2015 New Revision: 280640 URL: https://svnweb.freebsd.org/changeset/base/280640 Log: Crochet sources moved to a new home; update accordingly. MFC after: 3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/BEAGLEBONE.conf head/release/arm/PANDABOARD.conf head/release/arm/RPI-B.conf head/release/arm/WANDBOARD-QUAD.conf head/release/arm/ZEDBOARD.conf Modified: head/release/arm/BEAGLEBONE.conf ============================================================================== --- head/release/arm/BEAGLEBONE.conf Wed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/BEAGLEBONE.conf Wed Mar 25 22:08:02 2015 (r280640) @@ -32,6 +32,6 @@ load_target_env() { export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1" export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="BEAGLEBONE" - export CROCHETSRC="https://github.com/kientzle/crochet-freebsd" + export CROCHETSRC="https://github.com/freebsd/crochet" export CROCHETBRANCH="trunk@r744" } Modified: head/release/arm/PANDABOARD.conf ============================================================================== --- head/release/arm/PANDABOARD.conf Wed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/PANDABOARD.conf Wed Mar 25 22:08:02 2015 (r280640) @@ -32,6 +32,6 @@ load_target_env() { export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1" export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="PANDABOARD" - export CROCHETSRC="https://github.com/kientzle/crochet-freebsd" + export CROCHETSRC="https://github.com/freebsd/crochet" export CROCHETBRANCH="trunk@r744" } Modified: head/release/arm/RPI-B.conf ============================================================================== --- head/release/arm/RPI-B.conf Wed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/RPI-B.conf Wed Mar 25 22:08:02 2015 (r280640) @@ -32,7 +32,7 @@ load_target_env() { export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1" export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="RPI-B" - export CROCHETSRC="https://github.com/kientzle/crochet-freebsd" + export CROCHETSRC="https://github.com/freebsd/crochet" export CROCHETBRANCH="trunk@r744" export UBOOTSRC="https://github.com/gonzoua/u-boot-pi" export UBOOTBRANCH="trunk" Modified: head/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- head/release/arm/WANDBOARD-QUAD.conf Wed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/WANDBOARD-QUAD.conf Wed Mar 25 22:08:02 2015 (r280640) @@ -32,6 +32,6 @@ load_target_env() { export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1" export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="WANDBOARD-QUAD" - export CROCHETSRC="https://github.com/kientzle/crochet-freebsd" + export CROCHETSRC="https://github.com/freebsd/crochet" export CROCHETBRANCH="trunk@r744" } Modified: head/release/arm/ZEDBOARD.conf ============================================================================== --- head/release/arm/ZEDBOARD.conf Wed Mar 25 21:59:36 2015 (r280639) +++ head/release/arm/ZEDBOARD.conf Wed Mar 25 22:08:02 2015 (r280640) @@ -31,6 +31,6 @@ load_target_env() { export XDEV_FLAGS="WITH_GCC=1 WITH_GCC_BOOTSTRAP=1 WITHOUT_CLANG_IS_CC=1" export XDEV_FLAGS="${XDEV_FLAGS} MK_TESTS=no" export KERNEL="ZEDBOARD" - export CROCHETSRC="https://github.com/kientzle/crochet-freebsd" + export CROCHETSRC="https://github.com/freebsd/crochet" export CROCHETBRANCH="trunk@r744" } From owner-svn-src-all@FreeBSD.ORG Wed Mar 25 22:45:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACE7BEF1; Wed, 25 Mar 2015 22:45:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97C8DE44; Wed, 25 Mar 2015 22:45:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2PMjtMA052492; Wed, 25 Mar 2015 22:45:55 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2PMjtgc052491; Wed, 25 Mar 2015 22:45:55 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503252245.t2PMjtgc052491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Wed, 25 Mar 2015 22:45:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280642 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 22:45:55 -0000 Author: tuexen Date: Wed Mar 25 22:45:54 2015 New Revision: 280642 URL: https://svnweb.freebsd.org/changeset/base/280642 Log: Make sure that we don't free an SCTP shared key too early. Thanks to Pouyan Sepehrdad from Qualcomm Product Security Initiative for reporting the issue. MFC after: 3 days Modified: head/sys/netinet/sctp_auth.c Modified: head/sys/netinet/sctp_auth.c ============================================================================== --- head/sys/netinet/sctp_auth.c Wed Mar 25 22:35:08 2015 (r280641) +++ head/sys/netinet/sctp_auth.c Wed Mar 25 22:45:54 2015 (r280642) @@ -576,13 +576,12 @@ sctp_auth_key_release(struct sctp_tcb *s /* decrement the ref count */ if (skey) { - sctp_free_sharedkey(skey); SCTPDBG(SCTP_DEBUG_AUTH2, "%s: stcb %p key %u refcount release to %d\n", __FUNCTION__, (void *)stcb, key_id, skey->refcount); /* see if a notification should be generated */ - if ((skey->refcount <= 1) && (skey->deactivated)) { + if ((skey->refcount <= 2) && (skey->deactivated)) { /* notify ULP that key is no longer used */ sctp_ulp_notify(SCTP_NOTIFY_AUTH_FREE_KEY, stcb, key_id, 0, so_locked); @@ -590,6 +589,7 @@ sctp_auth_key_release(struct sctp_tcb *s "%s: stcb %p key %u no longer used, %d\n", __FUNCTION__, (void *)stcb, key_id, skey->refcount); } + sctp_free_sharedkey(skey); } } From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 01:51:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25CA7BE6; Thu, 26 Mar 2015 01:51:03 +0000 (UTC) Received: from mail110.syd.optusnet.com.au (mail110.syd.optusnet.com.au [211.29.132.97]) by mx1.freebsd.org (Postfix) with ESMTP id 85E1F36E; Thu, 26 Mar 2015 01:51:02 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail110.syd.optusnet.com.au (Postfix) with ESMTPS id 8C78878407C; Thu, 26 Mar 2015 12:50:52 +1100 (AEDT) Date: Thu, 26 Mar 2015 12:50:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mateusz Guzik Subject: Re: svn commit: r280407 - head/sys/kern In-Reply-To: <20150325201524.GB14280@dft-labs.eu> Message-ID: <20150326103908.G993@besplex.bde.org> References: <201503240010.t2O0ACZb089906@svn.freebsd.org> <20150324135350.N1665@besplex.bde.org> <20150325201524.GB14280@dft-labs.eu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=gTxjnMf5gfhHc4B0dfAA:9 a=WDFHsLVgq9RVs6JP:21 a=H6X1VPRX2YTj_r_X:21 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 01:51:03 -0000 On Wed, 25 Mar 2015, Mateusz Guzik wrote: > On Tue, Mar 24, 2015 at 03:58:14PM +1100, Bruce Evans wrote: >> On Tue, 24 Mar 2015, Mateusz Guzik wrote: >> >>> Log: >>> filedesc: microoptimize fget_unlocked by getting rid of fd < 0 branch >> >> This has no effect. Compilers optimize to the equivalent of the the >> unsigned cast hack if this is good. On x86, it is good since no >> instructions are needed for the conversion, and the only difference >> between the code generated by >> >> if (fd >= fdt->fdt_nfiles) >> >> and >> >> if (fd < 0 || fd >= fdt->fdt_nfiles) >> >> is to change from jl (jump if less than) to jb (jump if below) (both >> jumps over the if clause). Negative values satisfy jl but not jb. > > I would not commit the change if it did not affect generated assembly at > least on amd64. Interesting. All compilers that I tested (gcc-4.2, gcc-4.8 and clang pessimize this). clang generates especially fancy "optimizations" which actually give pessimizations of 1-4 cycles for time and 15-25 bytes for space (larger time penalties from the space pessimization in real use where everything doesnt fit in the I-cache. gcc-4.8 only gives a 1 cycle time pessimization plus the 5-10 bytes of space pessimizations for the extra instructions for this, with less fancy scheduling that is easier to untangle to remove the 1-cycle pessimization. Micro- Benchmark program below. > if (fd < 0 || fd >= fdt->fdt_nfiles): > 0xffffffff807d147d : sub $0x38,%rsp > 0xffffffff807d1481 : test %esi,%esi > 0xffffffff807d1483 : js 0xffffffff807d15b8 objdump output is of low quality, especially on 64-bit arches where the 0xff... numbers are twice as bloated. This is the extra branch. In the micro-benchmark, clang pre-loads a pointer to the volatile return values and jumps to common code to load the value. This is its main pessimization relative to gcc. clang also generates code that runs into itself. It generates 2 loads of one of the pointers. This is mostly a space pessimization, except it may be necessary for the rest of the fancy scheduling to cost only 1 cycle. Here the return value for the error case is constant and the return value for the other case is variable, so this pessimization is inhibited. In the microbenchmark with the return values changed to non-volatile, clang does a fancier "optimization" involving pre-loading the values, then conditional moves. This gives an additional pessimization of 1 cycle. > 0xffffffff807d1489 : mov (%rdi),%rbx > 0xffffffff807d148c : cmp %esi,(%rbx) Here rbx is naturally a pointer, so this is the best comparison instruction. In the micro-benchmark, at least with the volatile limit, both clang and gcc-4.8 load a pointer to the limit instead of doing a cmp on the memory variable. Old versions of gcc know that this is usually bad, and have options -fforce-addr and -fforce-mem to change the default of not doing this. In the micro-benchmark, this just wastes space. In real use, loading the pointer to volatile data or loading non-volatile data is best if the variable is accessed more than once and the register pressure is not large. > 0xffffffff807d148e : jle 0xffffffff807d15bf > > if ((u_int)fd >= fdt->fdt_nfiles): > 0xffffffff807d147d : sub $0x38,%rsp > 0xffffffff807d1481 : mov (%rdi),%rbx > 0xffffffff807d1484 : cmp %esi,(%rbx) > 0xffffffff807d1486 : jbe 0xffffffff807d15a8 > > I did not check other archs prior to the commit. > > This is clang 3.6 as present in head. Sources compiled with -O2. Also > see below for other compiler test. > >>> Casting fd to an unsigned type simplifies fd range coparison to mere checking >>> if the result is bigger than the table. >> >> No, it obfuscates the range comparison. > > It is a standard hack which is hard to misread and which seems to add a > slight benefit (see below). Because the compiler doesn't actually do it. I'm sure compilers sometimes do it. Apparently just when the top limit is constant. > ... > It affects assembly on all arm, powerpc64 and mips64 as well. Both arm > and powerpc just get rid of zero-test and use the same instructions to > perform the other comparison. I only found a difference on mips64 which > used sltu instead of slt (but still got rid of the zero-check). Getting rid of the zero test should give what I want. The code might differ due to register allocation. Are arm and powerpc still using gcc? > [..] >> - fget_locked() seems to be unchanged recently, so it doesn't have the >> obfuscation. fget_unlocked() is newer than the unobfuscated version >> of fget_locked(). It is in a different file, but may have copied the >> unobfuscated range check from fget_locked(). This commit restores the >> obfuscation to it alone. > > This definitely should be synced one way or the other, thanks for > pointing this out. To the unobfuscated version :-). > I wrote a toy program and checked e.g. gcc5 and it still did not > optimise zero-test away. > > In fact I would argue the optimisation in question is impossible unless > upper limit check is against a constant in (0, INT_MAX) range or against > a var whose range is known at compile time. Argh. That must be it, or possibly -fno-wrapv. I get the same results with and without wrapv. > In particular this is problematic for negative values. > > Consider: > int fd, limit; > ............ > if (fd < 0 || fd >= limit) > > Let's have fd = -5 and limit = -4. > > Should the fd < 0 check be dropped by the compiler and the expression > turned into (u_int)fd >= limit, the coparison would be false thus > changing the outcome. Wrapv doesn't affect this. Compilers can use wrapping behaviour internally for some things, but not for signed comparisons. E.g., on x86 for (fd >= limit) they can check the flags after (fd - limit). The flags are the same as after cmp(fd, limit). But the non-wrapping flag (ge) must be used, not the wrapping flag (ae). > As such, I prefer to keep the cast. Now I dislike the cast even more. The sign conversions are especially delicate. If the limit were u_int, then the sign conversions would happen without the cast, and are even more confusing since they are implicit. The limits for fd's are intentionally signed, the same as for fd's, since otherwise there would be lots of confusing automatic conversions and compiler warnings for some of them. BTW, sysctl limits like maxfiles and maxfilesperproc are signed. Foot- shooting is correctly allowed for these like for most sysctls, so they can be set to preposterous negative limits as well as to preposterously large positive ones, unlike for the corresponding rlimit. So the comparison (fd < (limit = -4)) may happen in practice. In practice, other sign extension bugs usually occur first. The first reference to maxfiles* in kern_descrip.c has 3 and a half sign/extension overflow bugs including one for maxfilesperproc. It uses min() to convert maxfilesperproc to u_int. It does the same for the other arg after first truncating the arg's value from 64 bits signed to 32 bits signed (not even to 32 bits unsigned to give defined behaviour and to match min()'s type). min() gives a 32-bit unsigned value. This is assigned to a td_retval[0], which is 32 bits signed on 32-bit arches and 64-bit signed on 64-bit arches, so there is only a bug on half of the arches for the final step. Problems don't accur in practice because the rlimit is clamped to well below 0x7fffffff. Values near RLIM_INFINITY are allowed for mose limits but not the files limit. Pseudo-infinite values like 0x7fffffff00000001 would become 1 after truncation. Micro-benchmark program: X #include X X volatile int err = 1; X volatile int ok = 0; X volatile int toplimit = 20; X X int __noinline X foo(int x) X { X if (x < 0 || x >= toplimit) X return (err); X return (ok); X } X X int X main(void) X { X int errcount, i; X X errcount = 0; X for (i = 0; i < 266681953; i++) /* the magic number is tsc_freq/10 */ X errcount += foo(i); X printf("errcount = %d\n", errcount); X } Since the optimization that I wanted is invalid, this is just a benchmark of how far away the compiler is from generating optimal code. Timing on freefall: clang: 7 cycles clang: 7 cycles (with manual editing... didn't help, tended to harm) clang: 6 cycles (with above changed to use unsigned hack) gcc-4.8: 6 cycles gcc-4.8: 5 cycles (with manual editing of asm output to get the invalid opt) gcc-4.8: 5 cycles (with above changed to use unsigned hack) This is with -O. Other "optimizations are mostly pessimizations: clang -O2: no change gcc-4.8 -O2: 1 cycle slower clang with __predict_true(): 1 cycles slower clang with __predict_false(): 2 cycles slower (slower with the correct pred!) gcc-48 with __predict_false() or __predict_false() in above: no change Adding __predict_*() to the above with the unsigned hacks makes no further change. The bad code generated by clang for the above is: X movl $err, %eax X testl %edi, %edi X js .LBB0_3 X # BB#1: # %lor.lhs.false X movl toplimit(%rip), %ecx X movl $ok, %eax X cmpl %edi, %ecx X jg .LBB0_3 X # BB#2: # %select.mid X movl $err, %eax X .LBB0_3: # %return X movl (%rax), %eax X popq %rbp X retq This uses fancy scheduling of a bad method to lose by only 1 cycle relative to gcc. The loss is from pre-loading pointers so as to jump to a common load at the end. It seems stupid to load $err twice, but this saves 1 cycle. __predict_false() gives the following changes: X --- z.s~ 2015-03-26 01:11:17.825573000 +0000 X +++ z.s 2015-03-26 01:10:47.728912000 +0000 X @@ -19,10 +19,10 @@ X js .LBB0_3 X -# BB#1: # %lor.lhs.false X +# BB#1: # %lor.rhs X movl toplimit(%rip), %ecx X - movl $ok, %eax X + movl $err, %eax X cmpl %edi, %ecx X - jg .LBB0_3 X + jle .LBB0_3 X # BB#2: # %select.mid X - movl $err, %eax X -.LBB0_3: # %return X + movl $ok, %eax X +.LBB0_3: # %lor.end X movl (%rax), %eax This costs 2 cycles. It leaves a doubled load of $err which makes no sense now since the code no longer runs into itself and the second load is redundant. The extra instruction might be useful as padding, but is actually negatively useful. Removing it reduces the loss to 1 cycle relative to the unpredicted version, by giving essentially the same code as the unpredicted version with my editing to avoid the apparently-unnecessary doubled load. __predict_true() loses only 1 cycle, essentially by producing the above without the extra instruction. That it, it takes 8 cycles. 2 more than gcc and 3 more than the best seen with the unsigned hack. These cycle counts intentionally include many for loop and function call overhead. I used a function and many volatile variables to prevent most things being calculated a compile time. With __inline instead of __noinline, most or all variants take about 2.7 cycles with clang (I think 2 cycles is the minimum loop overhead and other operations run in parallel with the loop and themselves). gcc-4.8 then takes 2.7 cycles with the unsigned hack but 3.5 cycles without it. gcc's not so fancy scheduling loses instead of wins when it is inlined. In real code, the optimizer has even more chances to do fancy scheduling to hide the latency of extra branches, but 1 more branch may thrash branch prediction caches. Anyway, you won't be able to measure 1-cycle optimizations in real code. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 02:14:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7D0841F3; Thu, 26 Mar 2015 02:14:19 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 3DEE67D1; Thu, 26 Mar 2015 02:14:18 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id B14B6D67098; Thu, 26 Mar 2015 13:14:06 +1100 (AEDT) Date: Thu, 26 Mar 2015 13:14:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" Subject: Re: svn commit: r280636 - head/include In-Reply-To: <201503252153.t2PLrInc025854@svn.freebsd.org> Message-ID: <20150326130403.W993@besplex.bde.org> References: <201503252153.t2PLrInc025854@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=A5NVYcmG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=v8WTfNS-EKsu7SCtGhkA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 02:14:19 -0000 On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: > Log: > Temporarily revert 280458. > > GCC is still carries an old version of cdefs.h which doesn't > accept multiple parameters for the nonnull attribute. > > Since this issue probably affects many ports in the tree > we will revert it for now until gcc gets fixed. Note that sys/cdefs.h is supposed to work with any version of gcc back to gcc-1, and does mostly work back to at least gcc-2.95. The whole point of sys/cdefs.h is to provide compatibity macros for old and other non-default compilers. Standard compilers don't even have __attribute__(()). So no changes in future versions of gcc will fix the previous commit. The ifdefs for __nonnull() seem to be broken. They assume that all versions of gcc >= 3.3 support the same semantics for __nonnull() and that no non-gcc compiler supports the __nonnull__() attribute. Non-gcc compilers like clang get this by pretending to be gcc. Non-gcc compilers like icc tend to not get this by not pretending to be gcc. __nonnull__() is one of the few attributes that is only a hint, so definining it as nothing when it is not known to work is correct. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 02:31:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A42D87A; Thu, 26 Mar 2015 02:31:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFFA49AC; Thu, 26 Mar 2015 02:31:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q2V3nd061460; Thu, 26 Mar 2015 02:31:03 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q2V3PB061459; Thu, 26 Mar 2015 02:31:03 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201503260231.t2Q2V3PB061459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Thu, 26 Mar 2015 02:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org Subject: svn commit: r280653 - X-SVN-Group: defaults MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 02:31:05 -0000 Author: rpaulo Date: Thu Mar 26 02:31:03 2015 New Revision: 280653 URL: https://svnweb.freebsd.org/changeset/base/280653 Log: Add auto-props for .lua files. Modified: Directory Properties: / (props changed) From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 03:02:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00F3F718 for ; Thu, 26 Mar 2015 03:02:43 +0000 (UTC) Received: from nm24-vm0.bullet.mail.bf1.yahoo.com (nm24-vm0.bullet.mail.bf1.yahoo.com [98.139.213.161]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB8C9E72 for ; Thu, 26 Mar 2015 03:02:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427338961; bh=Gbdd5CZL0zRAxssAqWXw1QOreYLPdOubTlPCI4dmPgk=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=NtV9g/Awzsbkdj0MiY6dReOt+gBGgyK1wpB2cR0a6DEoZ8YHJeKCicG5iEmjEhhr5QHM4fEvubdhJisp4cUKiKl9PToP9XXX3jNnYAy/eAJptvj3CppY4/iFJMaw3XEOBMTYeR7CSTlzUUjnFJ/3OwFDDHMa7Dd1xzofq2RXh4OSJ9iDn/9b6GXHeYCPHbNvToZ4e1B9P6ixNVOWh6kKrIounugkF/ARqkIf+Yx2PX6UnvRtGOXjuPlxrfVnw1cOKlikUDiOF/S6Rnfx5l3EWTAAPtNMRoFsuMpqTVJ22xZ8Zdu1Ylrbg4VHxgKmiKucBELxwWrM9g7c6b7MXh/SgA== Received: from [98.139.170.181] by nm24.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 03:02:41 -0000 Received: from [98.139.211.192] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 03:02:41 -0000 Received: from [127.0.0.1] by smtp201.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 03:02:41 -0000 X-Yahoo-Newman-Id: 794932.28704.bm@smtp201.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: _mZHH4MVM1nKvZMFPRykiG1JoFz0EHlR7vyNcTvbGOMibGb u9XUpQ7HulhdNwrBhXy01aqxO0m7NbDg8A3R0Nt5HngPRKGwRNE4.GijFvrG Qe4mNT_IfMD.BISosb9FswOuQAmTvq5bUj.wjN8k69UPAWfLA0bExjQZk4zB qnu2PgNqSeVN499Dhy0KgvIFBP_dG4F5vPgyGGyvSyBCtfq2V_qYTnzDYCzH E5jIN18rDoqFuuLGvFY0j2JUWeqzEhGh1HfzUvYNvd.HsMq0GtTGChM_Q8CP fNHEokBbqpLFYbWf5yDczEvXH6d7cCAvYSVYngpc9SRDZ1EmkqSQlqYqcxjP LY2vmIcS1n_FDn7tBBtAWoXRR23p26lq0Tqt6aYeZlrZD5oNhL9BFeqr0FKH dWoN2eUk3UL.q2KuKxtM.zlrKEa8Hd.sErLl7vWU8olfg0e1kloDpWRTnO9j G0kU.x0Z_bUtwJeA9.4x7xJC6sUnRad.cILWsV8rjnqEvFnxI5hthImG4MRp .dvRsupKE3Et.M6VTPzlVTnTr9dcpWEamGpj4NdkiH6OhFRyqk.mn4pgbgr2 T_yylqfRtQVbcKvOQ6Jkke4MC6AmDW4jjNxbKkTtoOiv12WB55x3ttLnx7Iy OmxqtdEC9mOabCY1T3dVGXZlYvIADt0lfVZnMgW5K2Dkp34XZyNiY75Yvl46 AgtnvW8w- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <551376D4.4030003@FreeBSD.org> Date: Wed, 25 Mar 2015 22:02:44 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r280636 - head/include References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> In-Reply-To: <20150326130403.W993@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 03:02:44 -0000 On 03/25/15 21:14, Bruce Evans wrote: > On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: > >> Log: >> Temporarily revert 280458. >> >> GCC is still carries an old version of cdefs.h which doesn't >> accept multiple parameters for the nonnull attribute. >> >> Since this issue probably affects many ports in the tree >> we will revert it for now until gcc gets fixed. > > Note that sys/cdefs.h is supposed to work with any version of > gcc back to gcc-1, and does mostly work back to at least gcc-2.95. > The whole point of sys/cdefs.h is to provide compatibity macros > for old and other non-default compilers. Standard compilers don't > even have __attribute__(()). So no changes in future versions > of gcc will fix the previous commit. > cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. > The ifdefs for __nonnull() seem to be broken. They assume that > all versions of gcc >= 3.3 support the same semantics for __nonnull() > and that no non-gcc compiler supports the __nonnull__() attribute. All versions of gcc >= 3.3 support the same semantics for __nonnull(). Unfortunately an older revision of cdefs.h was only accepting one argument while gcc accepts multiple arguments just fine. > Non-gcc compilers like clang get this by pretending to be gcc. Clang claims support for gcc attributes [1] and has a __has_attribute() macro for testing. It also reports itself as gcc 4.2 for compatibility so we don't need to test for availability for the older attributes. > > Non-gcc compilers like icc tend to not get this by not pretending to > be gcc. __nonnull__() is one of the few attributes that is only a > hint, so definining it as nothing when it is not known to work is > correct. > The reason why I had to revert the change is actually a systematic bug in gcc: during it's build process gcc generates a new cdefs.h from our headers. Attempting to use an older gcc from ports that was build with the broken mono-parameter __nonnull() ended up causing breakage in any code using signal.h or pthreads.h. The lesson here is to update gcc every time cdefs.h is updated (I will be updating it at least once more[2]) and, in my case, I'll have to wait a couple of weeks after committing a cdefs.h change before using the new attributes to give time for people to update their gcc* ports, and I'll likely have to note it in UPDATING too, JIC. Cheers, Pedro. [1] http://clang.llvm.org/docs/LanguageExtensions.html#feature-checking-macros [2] https://reviews.freebsd.org/D2107 From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 04:55:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89939475; Thu, 26 Mar 2015 04:55:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A007A87; Thu, 26 Mar 2015 04:55:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q4tN6S031072; Thu, 26 Mar 2015 04:55:23 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q4tNeH031071; Thu, 26 Mar 2015 04:55:23 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260455.t2Q4tNeH031071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 04:55:23 +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: r280657 - stable/10/sys/dev/sis X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 04:55:23 -0000 Author: yongari Date: Thu Mar 26 04:55:22 2015 New Revision: 280657 URL: https://svnweb.freebsd.org/changeset/base/280657 Log: MFC r275816: Fix a bug introdiced in r217548. According to NS DP83815 data sheet, RX filter should be disabled before programming. Previously it was clearing wrong bits so RX filter was not disabled in RX filter configuration. MFC r277048: Enable receive filter in sis_rxfilter(). While I'm here add a check for driver running state for multicast filter handling. Modified: stable/10/sys/dev/sis/if_sis.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sis/if_sis.c ============================================================================== --- stable/10/sys/dev/sis/if_sis.c Thu Mar 26 03:43:38 2015 (r280656) +++ stable/10/sys/dev/sis/if_sis.c Thu Mar 26 04:55:22 2015 (r280657) @@ -757,7 +757,8 @@ sis_rxfilter_ns(struct sis_softc *sc) if_maddr_runlock(ifp); } - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + /* Turn the receive filter on */ + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } @@ -779,7 +780,7 @@ sis_rxfilter_sis(struct sis_softc *sc) filter = CSR_READ_4(sc, SIS_RXFILT_CTL); if (filter & SIS_RXFILTCTL_ENABLE) { - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter & ~SIS_RXFILT_CTL); + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter & ~SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } filter &= ~(SIS_RXFILTCTL_ALLPHYS | SIS_RXFILTCTL_BROAD | @@ -819,7 +820,8 @@ sis_rxfilter_sis(struct sis_softc *sc) CSR_WRITE_4(sc, SIS_RXFILT_DATA, hashes[i]); } - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + /* Turn the receive filter on */ + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } @@ -2014,8 +2016,6 @@ sis_initl(struct sis_softc *sc) } sis_rxfilter(sc); - /* Turn the receive filter on */ - SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ENABLE); /* * Load the address of the RX and TX lists. @@ -2137,7 +2137,8 @@ sis_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: SIS_LOCK(sc); - sis_rxfilter(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + sis_rxfilter(sc); SIS_UNLOCK(sc); break; case SIOCGIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 04:58:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5B115BA; Thu, 26 Mar 2015 04:58:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86769A9D; Thu, 26 Mar 2015 04:58:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q4wmTX031545; Thu, 26 Mar 2015 04:58:48 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q4wmBp031544; Thu, 26 Mar 2015 04:58:48 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260458.t2Q4wmBp031544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 04:58:48 +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: r280658 - stable/9/sys/dev/sis X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 04:58:48 -0000 Author: yongari Date: Thu Mar 26 04:58:47 2015 New Revision: 280658 URL: https://svnweb.freebsd.org/changeset/base/280658 Log: MFC r275816: Fix a bug introdiced in r217548. According to NS DP83815 data sheet, RX filter should be disabled before programming. Previously it was clearing wrong bits so RX filter was not disabled in RX filter configuration. MFC r277048: Enable receive filter in sis_rxfilter(). While I'm here add a check for driver running state for multicast filter handling. Modified: stable/9/sys/dev/sis/if_sis.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sis/if_sis.c ============================================================================== --- stable/9/sys/dev/sis/if_sis.c Thu Mar 26 04:55:22 2015 (r280657) +++ stable/9/sys/dev/sis/if_sis.c Thu Mar 26 04:58:47 2015 (r280658) @@ -757,7 +757,8 @@ sis_rxfilter_ns(struct sis_softc *sc) if_maddr_runlock(ifp); } - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + /* Turn the receive filter on */ + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } @@ -779,7 +780,7 @@ sis_rxfilter_sis(struct sis_softc *sc) filter = CSR_READ_4(sc, SIS_RXFILT_CTL); if (filter & SIS_RXFILTCTL_ENABLE) { - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter & ~SIS_RXFILT_CTL); + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter & ~SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } filter &= ~(SIS_RXFILTCTL_ALLPHYS | SIS_RXFILTCTL_BROAD | @@ -819,7 +820,8 @@ sis_rxfilter_sis(struct sis_softc *sc) CSR_WRITE_4(sc, SIS_RXFILT_DATA, hashes[i]); } - CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter); + /* Turn the receive filter on */ + CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE); CSR_READ_4(sc, SIS_RXFILT_CTL); } @@ -2015,8 +2017,6 @@ sis_initl(struct sis_softc *sc) } sis_rxfilter(sc); - /* Turn the receive filter on */ - SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ENABLE); /* * Load the address of the RX and TX lists. @@ -2138,7 +2138,8 @@ sis_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: SIS_LOCK(sc); - sis_rxfilter(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + sis_rxfilter(sc); SIS_UNLOCK(sc); break; case SIOCGIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:07:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31083753; Thu, 26 Mar 2015 05:07:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 01789BB2; Thu, 26 Mar 2015 05:07:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q57JrW036285; Thu, 26 Mar 2015 05:07:19 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q57Jk7036284; Thu, 26 Mar 2015 05:07:19 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260507.t2Q57Jk7036284@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:07:19 +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: r280659 - stable/10/sys/dev/nge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:07:20 -0000 Author: yongari Date: Thu Mar 26 05:07:18 2015 New Revision: 280659 URL: https://svnweb.freebsd.org/changeset/base/280659 Log: MFC r277050: Receive filter configuration is done in nge_rxfilter(). Remove unnecessary filter configuration code in nge_init_locked(). While I'm here add a check for driver running state for multicast filter handling. Also remove unnecessary assignment to error variable since it is cleared in the function entry. Modified: stable/10/sys/dev/nge/if_nge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/nge/if_nge.c ============================================================================== --- stable/10/sys/dev/nge/if_nge.c Thu Mar 26 04:58:47 2015 (r280658) +++ stable/10/sys/dev/nge/if_nge.c Thu Mar 26 05:07:18 2015 (r280659) @@ -2102,27 +2102,6 @@ nge_init_locked(struct nge_softc *sc) */ nge_list_tx_init(sc); - /* - * For the NatSemi chip, we have to explicitly enable the - * reception of ARP frames, as well as turn on the 'perfect - * match' filter where we store the station address, otherwise - * we won't receive unicasts meant for this host. - */ - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_ARP); - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_PERFECT); - - /* - * Set the capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) { - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_BROAD); - } else { - NGE_CLRBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_BROAD); - } - - /* Turn the receive filter on. */ - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_ENABLE); - /* Set Rx filter. */ nge_rxfilter(sc); @@ -2335,9 +2314,9 @@ nge_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: NGE_LOCK(sc); - nge_rxfilter(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + nge_rxfilter(sc); NGE_UNLOCK(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:08:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C97F388D; Thu, 26 Mar 2015 05:08:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A492BB9; Thu, 26 Mar 2015 05:08:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q58aD3036497; Thu, 26 Mar 2015 05:08:36 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q58ama036496; Thu, 26 Mar 2015 05:08:36 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260508.t2Q58ama036496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:08:36 +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: r280660 - stable/9/sys/dev/nge X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:08:36 -0000 Author: yongari Date: Thu Mar 26 05:08:35 2015 New Revision: 280660 URL: https://svnweb.freebsd.org/changeset/base/280660 Log: MFC r277050: Receive filter configuration is done in nge_rxfilter(). Remove unnecessary filter configuration code in nge_init_locked(). While I'm here add a check for driver running state for multicast filter handling. Also remove unnecessary assignment to error variable since it is cleared in the function entry. Modified: stable/9/sys/dev/nge/if_nge.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/nge/if_nge.c ============================================================================== --- stable/9/sys/dev/nge/if_nge.c Thu Mar 26 05:07:18 2015 (r280659) +++ stable/9/sys/dev/nge/if_nge.c Thu Mar 26 05:08:35 2015 (r280660) @@ -2102,27 +2102,6 @@ nge_init_locked(struct nge_softc *sc) */ nge_list_tx_init(sc); - /* - * For the NatSemi chip, we have to explicitly enable the - * reception of ARP frames, as well as turn on the 'perfect - * match' filter where we store the station address, otherwise - * we won't receive unicasts meant for this host. - */ - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_ARP); - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_PERFECT); - - /* - * Set the capture broadcast bit to capture broadcast frames. - */ - if (ifp->if_flags & IFF_BROADCAST) { - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_BROAD); - } else { - NGE_CLRBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_BROAD); - } - - /* Turn the receive filter on. */ - NGE_SETBIT(sc, NGE_RXFILT_CTL, NGE_RXFILTCTL_ENABLE); - /* Set Rx filter. */ nge_rxfilter(sc); @@ -2335,9 +2314,9 @@ nge_ioctl(struct ifnet *ifp, u_long comm case SIOCADDMULTI: case SIOCDELMULTI: NGE_LOCK(sc); - nge_rxfilter(sc); + if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) + nge_rxfilter(sc); NGE_UNLOCK(sc); - error = 0; break; case SIOCGIFMEDIA: case SIOCSIFMEDIA: From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:12:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65733B7C; Thu, 26 Mar 2015 05:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FCEFC7A; Thu, 26 Mar 2015 05:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q5CV6U040492; Thu, 26 Mar 2015 05:12:31 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q5CVHV040491; Thu, 26 Mar 2015 05:12:31 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260512.t2Q5CVHV040491@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:12: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: r280661 - stable/10/sys/dev/alc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:12:31 -0000 Author: yongari Date: Thu Mar 26 05:12:30 2015 New Revision: 280661 URL: https://svnweb.freebsd.org/changeset/base/280661 Log: MFC r277907: Correct device description message. Modified: stable/10/sys/dev/alc/if_alc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/alc/if_alc.c ============================================================================== --- stable/10/sys/dev/alc/if_alc.c Thu Mar 26 05:08:35 2015 (r280660) +++ stable/10/sys/dev/alc/if_alc.c Thu Mar 26 05:12:30 2015 (r280661) @@ -113,11 +113,11 @@ static struct alc_ident alc_ident_table[ { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8161, 9 * 1024, "Atheros AR8161 PCIe Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8162, 9 * 1024, - "Atheros AR8161 PCIe Fast Ethernet" }, + "Atheros AR8162 PCIe Fast Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8171, 9 * 1024, - "Atheros AR8161 PCIe Gigabit Ethernet" }, + "Atheros AR8171 PCIe Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8172, 9 * 1024, - "Atheros AR8161 PCIe Fast Ethernet" }, + "Atheros AR8172 PCIe Fast Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2200, 9 * 1024, "Killer E2200 Gigabit Ethernet" }, { 0, 0, 0, NULL} From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:13:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E074BCAC; Thu, 26 Mar 2015 05:13:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CAB5CC80; Thu, 26 Mar 2015 05:13:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q5D42a040614; Thu, 26 Mar 2015 05:13:04 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q5D42t040613; Thu, 26 Mar 2015 05:13:04 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260513.t2Q5D42t040613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280662 - stable/9/sys/dev/alc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:13:05 -0000 Author: yongari Date: Thu Mar 26 05:13:03 2015 New Revision: 280662 URL: https://svnweb.freebsd.org/changeset/base/280662 Log: MFC r277907: Correct device description message. Modified: stable/9/sys/dev/alc/if_alc.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/alc/if_alc.c ============================================================================== --- stable/9/sys/dev/alc/if_alc.c Thu Mar 26 05:12:30 2015 (r280661) +++ stable/9/sys/dev/alc/if_alc.c Thu Mar 26 05:13:03 2015 (r280662) @@ -113,11 +113,11 @@ static struct alc_ident alc_ident_table[ { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8161, 9 * 1024, "Atheros AR8161 PCIe Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8162, 9 * 1024, - "Atheros AR8161 PCIe Fast Ethernet" }, + "Atheros AR8162 PCIe Fast Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8171, 9 * 1024, - "Atheros AR8161 PCIe Gigabit Ethernet" }, + "Atheros AR8171 PCIe Gigabit Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_AR8172, 9 * 1024, - "Atheros AR8161 PCIe Fast Ethernet" }, + "Atheros AR8172 PCIe Fast Ethernet" }, { VENDORID_ATHEROS, DEVICEID_ATHEROS_E2200, 9 * 1024, "Killer E2200 Gigabit Ethernet" }, { 0, 0, 0, NULL} From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:17:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6049E32; Thu, 26 Mar 2015 05:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B094FC9C; Thu, 26 Mar 2015 05:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q5HLeG041238; Thu, 26 Mar 2015 05:17:21 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q5HLnP041237; Thu, 26 Mar 2015 05:17:21 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260517.t2Q5HLnP041237@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:17:21 +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: r280663 - stable/10/sys/dev/bce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:17:21 -0000 Author: yongari Date: Thu Mar 26 05:17:20 2015 New Revision: 280663 URL: https://svnweb.freebsd.org/changeset/base/280663 Log: MFC r279223: Correct a typo. Modified: stable/10/sys/dev/bce/if_bcereg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/10/sys/dev/bce/if_bcereg.h Thu Mar 26 05:13:03 2015 (r280662) +++ stable/10/sys/dev/bce/if_bcereg.h Thu Mar 26 05:17:20 2015 (r280663) @@ -464,7 +464,7 @@ /* Returns FALSE in "defects" per 2^31 - 1 calls, otherwise returns TRUE. */ #define DB_RANDOMFALSE(defects) (random() > defects) #define DB_OR_RANDOMFALSE(defects) || (random() > defects) -#define DB_AND_RANDOMFALSE(defects) && (random() > ddfects) +#define DB_AND_RANDOMFALSE(defects) && (random() > defects) /* Returns TRUE in "defects" per 2^31 - 1 calls, otherwise returns FALSE. */ #define DB_RANDOMTRUE(defects) (random() < defects) From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:18:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADE66F67; Thu, 26 Mar 2015 05:18:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 97F0BCA4; Thu, 26 Mar 2015 05:18:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q5IIOG041410; Thu, 26 Mar 2015 05:18:18 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q5II2R041409; Thu, 26 Mar 2015 05:18:18 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260518.t2Q5II2R041409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:18:18 +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: r280664 - stable/9/sys/dev/bce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:18:18 -0000 Author: yongari Date: Thu Mar 26 05:18:17 2015 New Revision: 280664 URL: https://svnweb.freebsd.org/changeset/base/280664 Log: MFC r279223: Correct a typo. Modified: stable/9/sys/dev/bce/if_bcereg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bce/if_bcereg.h ============================================================================== --- stable/9/sys/dev/bce/if_bcereg.h Thu Mar 26 05:17:20 2015 (r280663) +++ stable/9/sys/dev/bce/if_bcereg.h Thu Mar 26 05:18:17 2015 (r280664) @@ -465,7 +465,7 @@ /* Returns FALSE in "defects" per 2^31 - 1 calls, otherwise returns TRUE. */ #define DB_RANDOMFALSE(defects) (random() > defects) #define DB_OR_RANDOMFALSE(defects) || (random() > defects) -#define DB_AND_RANDOMFALSE(defects) && (random() > ddfects) +#define DB_AND_RANDOMFALSE(defects) && (random() > defects) /* Returns TRUE in "defects" per 2^31 - 1 calls, otherwise returns FALSE. */ #define DB_RANDOMTRUE(defects) (random() < defects) From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:20:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08647130; Thu, 26 Mar 2015 05:20:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E79CCCB0; Thu, 26 Mar 2015 05:20:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q5KJZM041753; Thu, 26 Mar 2015 05:20:19 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q5KJ6G041751; Thu, 26 Mar 2015 05:20:19 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201503260520.t2Q5KJ6G041751@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Thu, 26 Mar 2015 05:20:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280665 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:20:20 -0000 Author: rpaulo Date: Thu Mar 26 05:20:18 2015 New Revision: 280665 URL: https://svnweb.freebsd.org/changeset/base/280665 Log: Add comments about CTLFLAG_RDTUN vs. TUNABLE_INT_FETCH. Requested by: julian Modified: head/sys/vm/memguard.c head/sys/vm/vm_page.c Modified: head/sys/vm/memguard.c ============================================================================== --- head/sys/vm/memguard.c Thu Mar 26 05:18:17 2015 (r280664) +++ head/sys/vm/memguard.c Thu Mar 26 05:20:18 2015 (r280665) @@ -69,7 +69,7 @@ static SYSCTL_NODE(_vm, OID_AUTO, memgua static u_int vm_memguard_divisor; SYSCTL_UINT(_vm_memguard, OID_AUTO, divisor, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &vm_memguard_divisor, - 0, "(kmem_size/memguard_divisor) == memguard submap size"); + 0, "(kmem_size/memguard_divisor) == memguard submap size"); /* * Short description (ks_shortdesc) of memory type to monitor. @@ -162,6 +162,7 @@ memguard_fudge(unsigned long km_size, co u_long mem_pgs, parent_size; vm_memguard_divisor = 10; + /* CTFLAG_RDTUN doesn't work during the early boot process. */ TUNABLE_INT_FETCH("vm.memguard.divisor", &vm_memguard_divisor); parent_size = vm_map_max(parent_map) - vm_map_min(parent_map) + Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Thu Mar 26 05:18:17 2015 (r280664) +++ head/sys/vm/vm_page.c Thu Mar 26 05:20:18 2015 (r280665) @@ -349,6 +349,9 @@ vm_page_startup(vm_offset_t vaddr) /* * Allocate memory for use when boot strapping the kernel memory * allocator. + * + * CTFLAG_RDTUN doesn't work during the early boot process, so we must + * manually fetch the value. */ TUNABLE_INT_FETCH("vm.boot_pages", &boot_pages); new_end = end - (boot_pages * UMA_SLAB_SIZE); From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:44:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 205E851C; Thu, 26 Mar 2015 05:44:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0243CF1E; Thu, 26 Mar 2015 05:44:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q5iMg2054949; Thu, 26 Mar 2015 05:44:22 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q5iMa9054947; Thu, 26 Mar 2015 05:44:22 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260544.t2Q5iMa9054947@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:44: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: r280667 - stable/10/sys/dev/mii X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:44:23 -0000 Author: yongari Date: Thu Mar 26 05:44:21 2015 New Revision: 280667 URL: https://svnweb.freebsd.org/changeset/base/280667 Log: MFC r279903,279941: Add RTL8211F gigabit PHY support. PR: 197265 Modified: stable/10/sys/dev/mii/rgephy.c stable/10/sys/dev/mii/rgephyreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mii/rgephy.c ============================================================================== --- stable/10/sys/dev/mii/rgephy.c Thu Mar 26 05:37:44 2015 (r280666) +++ stable/10/sys/dev/mii/rgephy.c Thu Mar 26 05:44:21 2015 (r280667) @@ -85,6 +85,7 @@ static int rgephy_service(struct mii_sof static void rgephy_status(struct mii_softc *); static int rgephy_mii_phy_auto(struct mii_softc *, int); static void rgephy_reset(struct mii_softc *); +static int rgephy_linkup(struct mii_softc *); static void rgephy_loop(struct mii_softc *); static void rgephy_load_dspcode(struct mii_softc *); @@ -147,7 +148,7 @@ static int rgephy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) { struct ifmedia_entry *ife = mii->mii_media.ifm_cur; - int reg, speed, gig, anar; + int speed, gig, anar; switch (cmd) { case MII_POLLSTAT: @@ -249,20 +250,9 @@ setit: * Check to see if we have link. If we do, we don't * need to restart the autonegotiation process. */ - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && - sc->mii_mpd_rev >= 2) { - /* RTL8211B(L) */ - reg = PHY_READ(sc, RGEPHY_MII_SSR); - if (reg & RGEPHY_SSR_LINK) { - sc->mii_ticks = 0; - break; - } - } else { - reg = PHY_READ(sc, RL_GMEDIASTAT); - if (reg & RL_GMEDIASTAT_LINK) { - sc->mii_ticks = 0; - break; - } + if (rgephy_linkup(sc) != 0) { + sc->mii_ticks = 0; + break; } /* Announce link loss right after it happens. */ @@ -295,6 +285,33 @@ setit: return (0); } +static int +rgephy_linkup(struct mii_softc *sc) +{ + int linkup; + uint16_t reg; + + linkup = 0; + if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && + sc->mii_mpd_rev >= RGEPHY_8211B) { + if (sc->mii_mpd_rev == RGEPHY_8211F) { + reg = PHY_READ(sc, RGEPHY_F_MII_SSR); + if (reg & RGEPHY_F_SSR_LINK) + linkup++; + } else { + reg = PHY_READ(sc, RGEPHY_MII_SSR); + if (reg & RGEPHY_SSR_LINK) + linkup++; + } + } else { + reg = PHY_READ(sc, RL_GMEDIASTAT); + if (reg & RL_GMEDIASTAT_LINK) + linkup++; + } + + return (linkup); +} + static void rgephy_status(struct mii_softc *sc) { @@ -305,18 +322,10 @@ rgephy_status(struct mii_softc *sc) mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && sc->mii_mpd_rev >= 2) { - ssr = PHY_READ(sc, RGEPHY_MII_SSR); - if (ssr & RGEPHY_SSR_LINK) - mii->mii_media_status |= IFM_ACTIVE; - } else { - bmsr = PHY_READ(sc, RL_GMEDIASTAT); - if (bmsr & RL_GMEDIASTAT_LINK) - mii->mii_media_status |= IFM_ACTIVE; - } + if (rgephy_linkup(sc) != 0) + mii->mii_media_status |= IFM_ACTIVE; bmsr = PHY_READ(sc, RGEPHY_MII_BMSR); - bmcr = PHY_READ(sc, RGEPHY_MII_BMCR); if (bmcr & RGEPHY_BMCR_ISO) { mii->mii_media_active |= IFM_NONE; @@ -335,26 +344,50 @@ rgephy_status(struct mii_softc *sc) } } - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && sc->mii_mpd_rev >= 2) { - ssr = PHY_READ(sc, RGEPHY_MII_SSR); - switch (ssr & RGEPHY_SSR_SPD_MASK) { - case RGEPHY_SSR_S1000: - mii->mii_media_active |= IFM_1000_T; - break; - case RGEPHY_SSR_S100: - mii->mii_media_active |= IFM_100_TX; - break; - case RGEPHY_SSR_S10: - mii->mii_media_active |= IFM_10_T; - break; - default: - mii->mii_media_active |= IFM_NONE; - break; + if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && + sc->mii_mpd_rev >= RGEPHY_8211B) { + if (sc->mii_mpd_rev == RGEPHY_8211F) { + ssr = PHY_READ(sc, RGEPHY_F_MII_SSR); + switch (ssr & RGEPHY_F_SSR_SPD_MASK) { + case RGEPHY_F_SSR_S1000: + mii->mii_media_active |= IFM_1000_T; + break; + case RGEPHY_F_SSR_S100: + mii->mii_media_active |= IFM_100_TX; + break; + case RGEPHY_F_SSR_S10: + mii->mii_media_active |= IFM_10_T; + break; + default: + mii->mii_media_active |= IFM_NONE; + break; + } + if (ssr & RGEPHY_F_SSR_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + + } else { + ssr = PHY_READ(sc, RGEPHY_MII_SSR); + switch (ssr & RGEPHY_SSR_SPD_MASK) { + case RGEPHY_SSR_S1000: + mii->mii_media_active |= IFM_1000_T; + break; + case RGEPHY_SSR_S100: + mii->mii_media_active |= IFM_100_TX; + break; + case RGEPHY_SSR_S10: + mii->mii_media_active |= IFM_10_T; + break; + default: + mii->mii_media_active |= IFM_NONE; + break; + } + if (ssr & RGEPHY_SSR_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; } - if (ssr & RGEPHY_SSR_FDX) - mii->mii_media_active |= IFM_FDX; - else - mii->mii_media_active |= IFM_HDX; } else { bmsr = PHY_READ(sc, RL_GMEDIASTAT); if (bmsr & RL_GMEDIASTAT_1000MBPS) @@ -408,7 +441,7 @@ rgephy_loop(struct mii_softc *sc) int i; if (sc->mii_mpd_model != MII_MODEL_REALTEK_RTL8251 && - sc->mii_mpd_rev < 2) { + sc->mii_mpd_rev < RGEPHY_8211B) { PHY_WRITE(sc, RGEPHY_MII_BMCR, RGEPHY_BMCR_PDOWN); DELAY(1000); } @@ -442,7 +475,7 @@ rgephy_load_dspcode(struct mii_softc *sc int val; if (sc->mii_mpd_model == MII_MODEL_REALTEK_RTL8251 || - sc->mii_mpd_rev >= 2) + sc->mii_mpd_rev >= RGEPHY_8211B) return; PHY_WRITE(sc, 31, 0x0001); @@ -493,22 +526,34 @@ rgephy_reset(struct mii_softc *sc) { uint16_t pcr, ssr; - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && sc->mii_mpd_rev == 3) { - /* RTL8211C(L) */ - ssr = PHY_READ(sc, RGEPHY_MII_SSR); - if ((ssr & RGEPHY_SSR_ALDPS) != 0) { - ssr &= ~RGEPHY_SSR_ALDPS; - PHY_WRITE(sc, RGEPHY_MII_SSR, ssr); + switch (sc->mii_mpd_rev) { + case RGEPHY_8211F: + pcr = PHY_READ(sc, RGEPHY_F_MII_PCR1); + if ((pcr & RGEPHY_F_PCR1_MDI_MM) != 0) { + pcr &= ~RGEPHY_F_PCR1_MDI_MM; + PHY_WRITE(sc, RGEPHY_F_MII_PCR1, pcr); } - } - - if (sc->mii_mpd_rev >= 2) { - pcr = PHY_READ(sc, RGEPHY_MII_PCR); - if ((pcr & RGEPHY_PCR_MDIX_AUTO) == 0) { - pcr &= ~RGEPHY_PCR_MDI_MASK; - pcr |= RGEPHY_PCR_MDIX_AUTO; - PHY_WRITE(sc, RGEPHY_MII_PCR, pcr); + break; + case RGEPHY_8211C: + if ((sc->mii_flags & MIIF_PHYPRIV0) == 0) { + /* RTL8211C(L) */ + ssr = PHY_READ(sc, RGEPHY_MII_SSR); + if ((ssr & RGEPHY_SSR_ALDPS) != 0) { + ssr &= ~RGEPHY_SSR_ALDPS; + PHY_WRITE(sc, RGEPHY_MII_SSR, ssr); + } } + /* FALLTHROUGH */ + default: + if (sc->mii_mpd_rev >= RGEPHY_8211B) { + pcr = PHY_READ(sc, RGEPHY_MII_PCR); + if ((pcr & RGEPHY_PCR_MDIX_AUTO) == 0) { + pcr &= ~RGEPHY_PCR_MDI_MASK; + pcr |= RGEPHY_PCR_MDIX_AUTO; + PHY_WRITE(sc, RGEPHY_MII_PCR, pcr); + } + } + break; } mii_phy_reset(sc); Modified: stable/10/sys/dev/mii/rgephyreg.h ============================================================================== --- stable/10/sys/dev/mii/rgephyreg.h Thu Mar 26 05:37:44 2015 (r280666) +++ stable/10/sys/dev/mii/rgephyreg.h Thu Mar 26 05:44:21 2015 (r280667) @@ -35,6 +35,10 @@ #ifndef _DEV_MII_RGEPHYREG_H_ #define _DEV_MII_RGEPHYREG_H_ +#define RGEPHY_8211B 2 +#define RGEPHY_8211C 3 +#define RGEPHY_8211F 6 + /* * RealTek 8169S/8110S gigE PHY registers */ @@ -162,4 +166,21 @@ #define RGEPHY_SSR_ALDPS 0x0008 /* RTL8211C(L) only */ #define RGEPHY_SSR_JABBER 0x0001 /* Jabber */ +/* RTL8211F */ +#define RGEPHY_F_MII_PCR1 0x18 /* PHY Specific control register 1 */ +#define RGEPHY_F_PCR1_MDI_MM 0x0200 /* MDI / MDIX Manual Mode */ +#define RGEPHY_F_PCR1_MDI_MODE 0x0100 /* MDI Mode (0=MDIX,1=MDI) */ +#define RGEPHY_F_PCR1_ALDPS_EN 0x0004 /* Link Down Power Saving Enable */ + +/* RTL8211F */ +#define RGEPHY_F_MII_SSR 0x1A /* PHY Specific status register */ +#define RGEPHY_F_SSR_S1000 0x0020 /* 1000Mbps */ +#define RGEPHY_F_SSR_S100 0x0010 /* 100Mbps */ +#define RGEPHY_F_SSR_S10 0x0000 /* 10Mbps */ +#define RGEPHY_F_SSR_SPD_MASK 0x0030 +#define RGEPHY_F_SSR_FDX 0x0008 /* full duplex */ +#define RGEPHY_F_SSR_LINK 0x0004 /* link up */ +#define RGEPHY_F_SSR_MDI 0x0002 /* MDI/MDIX */ +#define RGEPHY_F_SSR_JABBER 0x0001 /* Jabber */ + #endif /* _DEV_RGEPHY_MIIREG_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 05:45:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5FF4664; Thu, 26 Mar 2015 05:45:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86DFFF2E; Thu, 26 Mar 2015 05:45:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q5jMXb055180; Thu, 26 Mar 2015 05:45:22 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q5jMCh055178; Thu, 26 Mar 2015 05:45:22 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201503260545.t2Q5jMCh055178@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Thu, 26 Mar 2015 05:45:22 +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: r280668 - stable/9/sys/dev/mii X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 05:45:22 -0000 Author: yongari Date: Thu Mar 26 05:45:21 2015 New Revision: 280668 URL: https://svnweb.freebsd.org/changeset/base/280668 Log: MFC r279903,279941: Add RTL8211F gigabit PHY support. PR: 197265 Modified: stable/9/sys/dev/mii/rgephy.c stable/9/sys/dev/mii/rgephyreg.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mii/rgephy.c ============================================================================== --- stable/9/sys/dev/mii/rgephy.c Thu Mar 26 05:44:21 2015 (r280667) +++ stable/9/sys/dev/mii/rgephy.c Thu Mar 26 05:45:21 2015 (r280668) @@ -85,6 +85,7 @@ static int rgephy_service(struct mii_sof static void rgephy_status(struct mii_softc *); static int rgephy_mii_phy_auto(struct mii_softc *, int); static void rgephy_reset(struct mii_softc *); +static int rgephy_linkup(struct mii_softc *); static void rgephy_loop(struct mii_softc *); static void rgephy_load_dspcode(struct mii_softc *); @@ -147,7 +148,7 @@ static int rgephy_service(struct mii_softc *sc, struct mii_data *mii, int cmd) { struct ifmedia_entry *ife = mii->mii_media.ifm_cur; - int reg, speed, gig, anar; + int speed, gig, anar; switch (cmd) { case MII_POLLSTAT: @@ -249,20 +250,9 @@ setit: * Check to see if we have link. If we do, we don't * need to restart the autonegotiation process. */ - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && - sc->mii_mpd_rev >= 2) { - /* RTL8211B(L) */ - reg = PHY_READ(sc, RGEPHY_MII_SSR); - if (reg & RGEPHY_SSR_LINK) { - sc->mii_ticks = 0; - break; - } - } else { - reg = PHY_READ(sc, RL_GMEDIASTAT); - if (reg & RL_GMEDIASTAT_LINK) { - sc->mii_ticks = 0; - break; - } + if (rgephy_linkup(sc) != 0) { + sc->mii_ticks = 0; + break; } /* Announce link loss right after it happens. */ @@ -295,6 +285,33 @@ setit: return (0); } +static int +rgephy_linkup(struct mii_softc *sc) +{ + int linkup; + uint16_t reg; + + linkup = 0; + if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && + sc->mii_mpd_rev >= RGEPHY_8211B) { + if (sc->mii_mpd_rev == RGEPHY_8211F) { + reg = PHY_READ(sc, RGEPHY_F_MII_SSR); + if (reg & RGEPHY_F_SSR_LINK) + linkup++; + } else { + reg = PHY_READ(sc, RGEPHY_MII_SSR); + if (reg & RGEPHY_SSR_LINK) + linkup++; + } + } else { + reg = PHY_READ(sc, RL_GMEDIASTAT); + if (reg & RL_GMEDIASTAT_LINK) + linkup++; + } + + return (linkup); +} + static void rgephy_status(struct mii_softc *sc) { @@ -305,18 +322,10 @@ rgephy_status(struct mii_softc *sc) mii->mii_media_status = IFM_AVALID; mii->mii_media_active = IFM_ETHER; - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && sc->mii_mpd_rev >= 2) { - ssr = PHY_READ(sc, RGEPHY_MII_SSR); - if (ssr & RGEPHY_SSR_LINK) - mii->mii_media_status |= IFM_ACTIVE; - } else { - bmsr = PHY_READ(sc, RL_GMEDIASTAT); - if (bmsr & RL_GMEDIASTAT_LINK) - mii->mii_media_status |= IFM_ACTIVE; - } + if (rgephy_linkup(sc) != 0) + mii->mii_media_status |= IFM_ACTIVE; bmsr = PHY_READ(sc, RGEPHY_MII_BMSR); - bmcr = PHY_READ(sc, RGEPHY_MII_BMCR); if (bmcr & RGEPHY_BMCR_ISO) { mii->mii_media_active |= IFM_NONE; @@ -335,26 +344,50 @@ rgephy_status(struct mii_softc *sc) } } - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && sc->mii_mpd_rev >= 2) { - ssr = PHY_READ(sc, RGEPHY_MII_SSR); - switch (ssr & RGEPHY_SSR_SPD_MASK) { - case RGEPHY_SSR_S1000: - mii->mii_media_active |= IFM_1000_T; - break; - case RGEPHY_SSR_S100: - mii->mii_media_active |= IFM_100_TX; - break; - case RGEPHY_SSR_S10: - mii->mii_media_active |= IFM_10_T; - break; - default: - mii->mii_media_active |= IFM_NONE; - break; + if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && + sc->mii_mpd_rev >= RGEPHY_8211B) { + if (sc->mii_mpd_rev == RGEPHY_8211F) { + ssr = PHY_READ(sc, RGEPHY_F_MII_SSR); + switch (ssr & RGEPHY_F_SSR_SPD_MASK) { + case RGEPHY_F_SSR_S1000: + mii->mii_media_active |= IFM_1000_T; + break; + case RGEPHY_F_SSR_S100: + mii->mii_media_active |= IFM_100_TX; + break; + case RGEPHY_F_SSR_S10: + mii->mii_media_active |= IFM_10_T; + break; + default: + mii->mii_media_active |= IFM_NONE; + break; + } + if (ssr & RGEPHY_F_SSR_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; + + } else { + ssr = PHY_READ(sc, RGEPHY_MII_SSR); + switch (ssr & RGEPHY_SSR_SPD_MASK) { + case RGEPHY_SSR_S1000: + mii->mii_media_active |= IFM_1000_T; + break; + case RGEPHY_SSR_S100: + mii->mii_media_active |= IFM_100_TX; + break; + case RGEPHY_SSR_S10: + mii->mii_media_active |= IFM_10_T; + break; + default: + mii->mii_media_active |= IFM_NONE; + break; + } + if (ssr & RGEPHY_SSR_FDX) + mii->mii_media_active |= IFM_FDX; + else + mii->mii_media_active |= IFM_HDX; } - if (ssr & RGEPHY_SSR_FDX) - mii->mii_media_active |= IFM_FDX; - else - mii->mii_media_active |= IFM_HDX; } else { bmsr = PHY_READ(sc, RL_GMEDIASTAT); if (bmsr & RL_GMEDIASTAT_1000MBPS) @@ -408,7 +441,7 @@ rgephy_loop(struct mii_softc *sc) int i; if (sc->mii_mpd_model != MII_MODEL_REALTEK_RTL8251 && - sc->mii_mpd_rev < 2) { + sc->mii_mpd_rev < RGEPHY_8211B) { PHY_WRITE(sc, RGEPHY_MII_BMCR, RGEPHY_BMCR_PDOWN); DELAY(1000); } @@ -442,7 +475,7 @@ rgephy_load_dspcode(struct mii_softc *sc int val; if (sc->mii_mpd_model == MII_MODEL_REALTEK_RTL8251 || - sc->mii_mpd_rev >= 2) + sc->mii_mpd_rev >= RGEPHY_8211B) return; PHY_WRITE(sc, 31, 0x0001); @@ -493,22 +526,34 @@ rgephy_reset(struct mii_softc *sc) { uint16_t pcr, ssr; - if ((sc->mii_flags & MIIF_PHYPRIV0) == 0 && sc->mii_mpd_rev == 3) { - /* RTL8211C(L) */ - ssr = PHY_READ(sc, RGEPHY_MII_SSR); - if ((ssr & RGEPHY_SSR_ALDPS) != 0) { - ssr &= ~RGEPHY_SSR_ALDPS; - PHY_WRITE(sc, RGEPHY_MII_SSR, ssr); + switch (sc->mii_mpd_rev) { + case RGEPHY_8211F: + pcr = PHY_READ(sc, RGEPHY_F_MII_PCR1); + if ((pcr & RGEPHY_F_PCR1_MDI_MM) != 0) { + pcr &= ~RGEPHY_F_PCR1_MDI_MM; + PHY_WRITE(sc, RGEPHY_F_MII_PCR1, pcr); } - } - - if (sc->mii_mpd_rev >= 2) { - pcr = PHY_READ(sc, RGEPHY_MII_PCR); - if ((pcr & RGEPHY_PCR_MDIX_AUTO) == 0) { - pcr &= ~RGEPHY_PCR_MDI_MASK; - pcr |= RGEPHY_PCR_MDIX_AUTO; - PHY_WRITE(sc, RGEPHY_MII_PCR, pcr); + break; + case RGEPHY_8211C: + if ((sc->mii_flags & MIIF_PHYPRIV0) == 0) { + /* RTL8211C(L) */ + ssr = PHY_READ(sc, RGEPHY_MII_SSR); + if ((ssr & RGEPHY_SSR_ALDPS) != 0) { + ssr &= ~RGEPHY_SSR_ALDPS; + PHY_WRITE(sc, RGEPHY_MII_SSR, ssr); + } } + /* FALLTHROUGH */ + default: + if (sc->mii_mpd_rev >= RGEPHY_8211B) { + pcr = PHY_READ(sc, RGEPHY_MII_PCR); + if ((pcr & RGEPHY_PCR_MDIX_AUTO) == 0) { + pcr &= ~RGEPHY_PCR_MDI_MASK; + pcr |= RGEPHY_PCR_MDIX_AUTO; + PHY_WRITE(sc, RGEPHY_MII_PCR, pcr); + } + } + break; } mii_phy_reset(sc); Modified: stable/9/sys/dev/mii/rgephyreg.h ============================================================================== --- stable/9/sys/dev/mii/rgephyreg.h Thu Mar 26 05:44:21 2015 (r280667) +++ stable/9/sys/dev/mii/rgephyreg.h Thu Mar 26 05:45:21 2015 (r280668) @@ -35,6 +35,10 @@ #ifndef _DEV_MII_RGEPHYREG_H_ #define _DEV_MII_RGEPHYREG_H_ +#define RGEPHY_8211B 2 +#define RGEPHY_8211C 3 +#define RGEPHY_8211F 6 + /* * RealTek 8169S/8110S gigE PHY registers */ @@ -162,4 +166,21 @@ #define RGEPHY_SSR_ALDPS 0x0008 /* RTL8211C(L) only */ #define RGEPHY_SSR_JABBER 0x0001 /* Jabber */ +/* RTL8211F */ +#define RGEPHY_F_MII_PCR1 0x18 /* PHY Specific control register 1 */ +#define RGEPHY_F_PCR1_MDI_MM 0x0200 /* MDI / MDIX Manual Mode */ +#define RGEPHY_F_PCR1_MDI_MODE 0x0100 /* MDI Mode (0=MDIX,1=MDI) */ +#define RGEPHY_F_PCR1_ALDPS_EN 0x0004 /* Link Down Power Saving Enable */ + +/* RTL8211F */ +#define RGEPHY_F_MII_SSR 0x1A /* PHY Specific status register */ +#define RGEPHY_F_SSR_S1000 0x0020 /* 1000Mbps */ +#define RGEPHY_F_SSR_S100 0x0010 /* 100Mbps */ +#define RGEPHY_F_SSR_S10 0x0000 /* 10Mbps */ +#define RGEPHY_F_SSR_SPD_MASK 0x0030 +#define RGEPHY_F_SSR_FDX 0x0008 /* full duplex */ +#define RGEPHY_F_SSR_LINK 0x0004 /* link up */ +#define RGEPHY_F_SSR_MDI 0x0002 /* MDI/MDIX */ +#define RGEPHY_F_SSR_JABBER 0x0001 /* Jabber */ + #endif /* _DEV_RGEPHY_MIIREG_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 06:38:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76755180; Thu, 26 Mar 2015 06:38:03 +0000 (UTC) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 37C175F4; Thu, 26 Mar 2015 06:38:03 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 881654249AD; Thu, 26 Mar 2015 17:37:54 +1100 (AEDT) Date: Thu, 26 Mar 2015 17:37:53 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pedro Giffuni Subject: Re: svn commit: r280636 - head/include In-Reply-To: <551376D4.4030003@FreeBSD.org> Message-ID: <20150326170535.U2239@besplex.bde.org> References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=aE7OyBw8yOmdTJHGsokA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 06:38:03 -0000 On Wed, 25 Mar 2015, Pedro Giffuni wrote: > On 03/25/15 21:14, Bruce Evans wrote: >> On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: >> >>> Log: >>> Temporarily revert 280458. >>> >>> GCC is still carries an old version of cdefs.h which doesn't >>> accept multiple parameters for the nonnull attribute. >>> Since this issue probably affects many ports in the tree >>> we will revert it for now until gcc gets fixed. >> >> Note that sys/cdefs.h is supposed to work with any version of >> gcc back to gcc-1, and does mostly work back to at least gcc-2.95. >> The whole point of sys/cdefs.h is to provide compatibity macros >> for old and other non-default compilers. Standard compilers don't >> even have __attribute__(()). So no changes in future versions >> of gcc will fix the previous commit. >> > cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. I now remember other bugs in it. I think you put the varargs stuff in the non-gcc version. That won't work compilers that don't support varargs for macros. Neither will not changing the non-gcc version. glibc (2.6 at least) avoids using varargs in its __nonnull() macro by using the same portable method that is used in many optional debugging statements including FreeBSD's KASSERT(). (KASSERT() is broken as designed. It never needed this since it wasn't implmented until several years after C99 standardized varargs for macros.) The macro takes a single arg consisting of a normal list of args enclosed in parentheses. The extra parentheses are not passed to the __attribute__() list. All invocations of the macro must be ugly to supply the parantheses. The parentheses give a large syntactic difference, so the ugliness cannot be fixed easily by switching to varargs macros. For KASSERT(), there would be about 7500 in /usr/src lines to clean up. For __nonnull(), there would be only about lines 160 in /usr/src to change. Mostly __nonnull(1) -> __nonnull((1)). But __nonnull() is more likely to be (mis)used in ports. > The reason why I had to revert the change is actually a systematic > bug in gcc: during it's build process gcc generates a new cdefs.h > from our headers. Attempting to use an older gcc from ports > that was build with the broken mono-parameter __nonnull() ended > up causing breakage in any code using signal.h or pthreads.h. I see. gcc's "fixed" headers cause lots of problems. > The lesson here is to update gcc every time cdefs.h is updated Whenever a "fixed" header is changed. Bruce From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 08:36:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 084FF601; Thu, 26 Mar 2015 08:36:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCA951D2; Thu, 26 Mar 2015 08:36:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q8a9rm034303; Thu, 26 Mar 2015 08:36:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q8a9WG034302; Thu, 26 Mar 2015 08:36:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503260836.t2Q8a9WG034302@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Mar 2015 08:36:09 +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: r280678 - stable/10/sys/geom/mirror X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 08:36:10 -0000 Author: mav Date: Thu Mar 26 08:36:08 2015 New Revision: 280678 URL: https://svnweb.freebsd.org/changeset/base/280678 Log: MFC r279913: Fix couple BIO_DELETE bugs in geom_mirror. Do not report GEOM::candelete if none of providers support BIO_DELETE. If consumer still requests BIO_DELETE, report error instead of hanging. Modified: stable/10/sys/geom/mirror/g_mirror.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/geom/mirror/g_mirror.c ============================================================================== --- stable/10/sys/geom/mirror/g_mirror.c Thu Mar 26 07:28:32 2015 (r280677) +++ stable/10/sys/geom/mirror/g_mirror.c Thu Mar 26 08:36:08 2015 (r280678) @@ -1027,6 +1027,23 @@ g_mirror_sync_done(struct bio *bp) } static void +g_mirror_candelete(struct bio *bp) +{ + struct g_mirror_softc *sc; + struct g_mirror_disk *disk; + int *val; + + sc = bp->bio_to->geom->softc; + LIST_FOREACH(disk, &sc->sc_disks, d_next) { + if (disk->d_flags & G_MIRROR_DISK_FLAG_CANDELETE) + break; + } + val = (int *)bp->bio_data; + *val = (disk != NULL); + g_io_deliver(bp, 0); +} + +static void g_mirror_kernel_dump(struct bio *bp) { struct g_mirror_softc *sc; @@ -1120,9 +1137,10 @@ g_mirror_start(struct bio *bp) g_mirror_flush(sc, bp); return; case BIO_GETATTR: - if (g_handleattr_int(bp, "GEOM::candelete", 1)) + if (!strcmp(bp->bio_attribute, "GEOM::candelete")) { + g_mirror_candelete(bp); return; - else if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { + } else if (strcmp("GEOM::kerneldump", bp->bio_attribute) == 0) { g_mirror_kernel_dump(bp); return; } @@ -1686,6 +1704,10 @@ g_mirror_register_request(struct bio *bp ("Consumer %s not opened (r%dw%de%d).", cp->provider->name, cp->acr, cp->acw, cp->ace)); } + if (bioq_first(&queue) == NULL) { + g_io_deliver(bp, EOPNOTSUPP); + return; + } while ((cbp = bioq_takefirst(&queue)) != NULL) { G_MIRROR_LOGREQ(3, cbp, "Sending request."); cp = cbp->bio_caller1; From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 08:38:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F18A847; Thu, 26 Mar 2015 08:38:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30F8E1F5; Thu, 26 Mar 2015 08:38:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q8ctnI034776; Thu, 26 Mar 2015 08:38:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q8csGi034774; Thu, 26 Mar 2015 08:38:54 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503260838.t2Q8csGi034774@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Mar 2015 08:38:54 +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: r280679 - stable/10/sbin/camcontrol X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 08:38:55 -0000 Author: mav Date: Thu Mar 26 08:38:53 2015 New Revision: 280679 URL: https://svnweb.freebsd.org/changeset/base/280679 Log: MFC r280249: Add camcontrol subcommands to control APM and AAM levels. Sponsored by: iXsystems, Inc. Modified: stable/10/sbin/camcontrol/camcontrol.8 stable/10/sbin/camcontrol/camcontrol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/camcontrol/camcontrol.8 ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.8 Thu Mar 26 08:36:08 2015 (r280678) +++ stable/10/sbin/camcontrol/camcontrol.8 Thu Mar 26 08:38:53 2015 (r280679) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 31, 2014 +.Dd March 19, 2015 .Dt CAMCONTROL 8 .Os .Sh NAME @@ -239,6 +239,16 @@ .Op device id .Op generic args .Nm +.Ic apm +.Op device id +.Op generic args +.Op Fl l Ar level +.Nm +.Ic aam +.Op device id +.Op generic args +.Op Fl l Ar level +.Nm .Ic fwdownload .Op device id .Op generic args @@ -1291,6 +1301,19 @@ Value 0 disables timer. Put ATA device into SLEEP state. Note that the only way get device out of this state may be reset. +.It Ic apm +It optional parameter +.Pq Fl l +specified, enables and sets advanced power management level, where +1 -- minimum power, 127 -- maximum performance with standby, +128 -- minimum power without standby, 254 -- maximum performance. +If not specified -- APM is disabled. +.It Ic aam +It optional parameter +.Pq Fl l +specified, enables and sets automatic acoustic management level, where +1 -- minimum noise, 254 -- maximum performance. +If not specified -- AAM is disabled. .It Ic security Update or report security settings, using an ATA identify command (0xec). By default, Modified: stable/10/sbin/camcontrol/camcontrol.c ============================================================================== --- stable/10/sbin/camcontrol/camcontrol.c Thu Mar 26 08:36:08 2015 (r280678) +++ stable/10/sbin/camcontrol/camcontrol.c Thu Mar 26 08:38:53 2015 (r280679) @@ -96,7 +96,9 @@ typedef enum { CAM_CMD_SECURITY = 0x0000001d, CAM_CMD_HPA = 0x0000001e, CAM_CMD_SANITIZE = 0x0000001f, - CAM_CMD_PERSIST = 0x00000020 + CAM_CMD_PERSIST = 0x00000020, + CAM_CMD_APM = 0x00000021, + CAM_CMD_AAM = 0x00000022 } cam_cmdmask; typedef enum { @@ -216,6 +218,8 @@ static struct camcontrol_opts option_tab {"idle", CAM_CMD_IDLE, CAM_ARG_NONE, "t:"}, {"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"}, {"sleep", CAM_CMD_SLEEP, CAM_ARG_NONE, ""}, + {"apm", CAM_CMD_APM, CAM_ARG_NONE, "l:"}, + {"aam", CAM_CMD_AAM, CAM_ARG_NONE, "l:"}, {"fwdownload", CAM_CMD_DOWNLOAD_FW, CAM_ARG_NONE, "f:ys"}, {"security", CAM_CMD_SECURITY, CAM_ARG_NONE, "d:e:fh:k:l:qs:T:U:y"}, {"hpa", CAM_CMD_HPA, CAM_ARG_NONE, "Pflp:qs:U:y"}, @@ -1406,7 +1410,7 @@ atacapprint(struct ata_params *parm) parm->enabled.command2 & ATA_SUPPORT_APM ? "yes" : "no"); if (parm->support.command2 & ATA_SUPPORT_APM) { printf(" %d/0x%02X\n", - parm->apm_value, parm->apm_value); + parm->apm_value & 0xff, parm->apm_value & 0xff); } else printf("\n"); printf("automatic acoustic management %s %s", @@ -8001,6 +8005,68 @@ bailout: return (retval); } +static int +ataaxm(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout) +{ + union ccb *ccb; + int retval = 0; + int l = -1; + int c; + u_char cmd, sc; + + ccb = cam_getccb(device); + + if (ccb == NULL) { + warnx("%s: error allocating ccb", __func__); + return (1); + } + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'l': + l = atoi(optarg); + break; + default: + break; + } + } + sc = 0; + if (strcmp(argv[1], "apm") == 0) { + if (l == -1) + cmd = 0x85; + else { + cmd = 0x05; + sc = l; + } + } else /* aam */ { + if (l == -1) + cmd = 0xC2; + else { + cmd = 0x42; + sc = l; + } + } + + retval = ata_do_28bit_cmd(device, + ccb, + /*retries*/retry_count, + /*flags*/CAM_DIR_NONE, + /*protocol*/AP_PROTO_NON_DATA, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SETFEATURES, + /*features*/cmd, + /*lba*/0, + /*sector_count*/sc, + /*data_ptr*/NULL, + /*dxfer_len*/0, + /*timeout*/timeout ? timeout : 30 * 1000, + /*quiet*/1); + + cam_freeccb(ccb); + return (retval); +} + #endif /* MINIMALISTIC */ void @@ -8058,6 +8124,8 @@ usage(int printlong) " camcontrol idle [dev_id][generic args][-t time]\n" " camcontrol standby [dev_id][generic args][-t time]\n" " camcontrol sleep [dev_id][generic args]\n" +" camcontrol apm [dev_id][generic args][-l level]\n" +" camcontrol aam [dev_id][generic args][-l level]\n" " camcontrol fwdownload [dev_id][generic args] <-f fw_image> [-y][-s]\n" " camcontrol security [dev_id][generic args]\n" " <-d pwd | -e pwd | -f | -h pwd | -k pwd>\n" @@ -8578,6 +8646,11 @@ main(int argc, char **argv) error = atapm(cam_dev, argc, argv, combinedopt, retry_count, timeout); break; + case CAM_CMD_APM: + case CAM_CMD_AAM: + error = ataaxm(cam_dev, argc, argv, + combinedopt, retry_count, timeout); + break; case CAM_CMD_SECURITY: error = atasecurity(cam_dev, retry_count, timeout, argc, argv, combinedopt); From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 09:13:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E91DEEE; Thu, 26 Mar 2015 09:13:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDE22806; Thu, 26 Mar 2015 09:13:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2Q9DHNQ052799; Thu, 26 Mar 2015 09:13:17 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2Q9DHL6052798; Thu, 26 Mar 2015 09:13:17 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201503260913.t2Q9DHL6052798@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 26 Mar 2015 09:13:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280680 - head/usr.bin/top X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 09:13:18 -0000 Author: kevlo Date: Thu Mar 26 09:13:16 2015 New Revision: 280680 URL: https://svnweb.freebsd.org/changeset/base/280680 Log: Print size_t's with %zu rather than "%zd. Reviewed by: bde Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c ============================================================================== --- head/usr.bin/top/machine.c Thu Mar 26 08:38:53 2015 (r280679) +++ head/usr.bin/top/machine.c Thu Mar 26 09:13:16 2015 (r280680) @@ -373,7 +373,7 @@ machine_init(struct statics *statics, ch size = sizeof(long) * maxcpu * CPUSTATES; times = malloc(size); if (times == NULL) - err(1, "malloc %zd bytes", size); + err(1, "malloc %zu bytes", size); if (sysctlbyname("kern.cp_times", times, &size, NULL, 0) == -1) err(1, "sysctlbyname kern.cp_times"); pcpu_cp_time = calloc(1, size); @@ -1004,7 +1004,7 @@ format_next_process(caddr_t handle, char argbuflen = cmdlen * 4; argbuf = (char *)malloc(argbuflen + 1); if (argbuf == NULL) { - warn("malloc(%zd)", argbuflen + 1); + warn("malloc(%zu)", argbuflen + 1); free(cmdbuf); return NULL; } From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 10:25:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7962DD79; Thu, 26 Mar 2015 10:25:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 62D27F69; Thu, 26 Mar 2015 10:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QAPGnm085542; Thu, 26 Mar 2015 10:25:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QAPGLr085541; Thu, 26 Mar 2015 10:25:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503261025.t2QAPGLr085541@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 26 Mar 2015 10:25:16 +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: r280681 - stable/10/share/man/man4 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 10:25:16 -0000 Author: hselasky Date: Thu Mar 26 10:25:15 2015 New Revision: 280681 URL: https://svnweb.freebsd.org/changeset/base/280681 Log: MFC r280262 and r280263: Add more known bugs to the USB audio manual page. Modified: stable/10/share/man/man4/snd_uaudio.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/snd_uaudio.4 ============================================================================== --- stable/10/share/man/man4/snd_uaudio.4 Thu Mar 26 09:13:16 2015 (r280680) +++ stable/10/share/man/man4/snd_uaudio.4 Thu Mar 26 10:25:15 2015 (r280681) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2011 +.Dd March 19, 2015 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -91,12 +91,27 @@ by The .Tn PCM framework in -.Fx , -as of this writing, does not handle device un-registrations in a properly -abstracted manner, i.e., a detach request is refused by the -.Tn PCM -framework if the device is in use. -It is necessary to allow the device un-registration to complete -successfully, otherwise the +.Fx +only supports synchronous device detach. +That means all mixer and DSP character devices belonging to a given +USB audio device must be closed when receiving an error on a DSP read, +a DSP write or a DSP IOCTL request. +Else the USB audio driver will wait for this to happen, preventing +enumeration of new devices on the parenting USB controller. +.Pp +Some USB audio devices might refuse to work properly unless the sample +rate is configured the same for both recording and playback, even if +only simplex is used. +See the +.Va dev.pcm.%d.[play|rec].vchanrate +sysctls. +.Pp +The .Tn PCM -layer will panic. +framework in +.Fx +currently doesn't support the full set of USB audio mixer +controls. +Some mixer controls are only available as +.Va dev.pcm.%d.mixer +sysctls. From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 10:26:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E711EEAE; Thu, 26 Mar 2015 10:26:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B511BF75; Thu, 26 Mar 2015 10:26:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QAQQqx085747; Thu, 26 Mar 2015 10:26:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QAQQpt085746; Thu, 26 Mar 2015 10:26:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503261026.t2QAQQpt085746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 26 Mar 2015 10:26:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r280682 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 10:26:27 -0000 Author: hselasky Date: Thu Mar 26 10:26:25 2015 New Revision: 280682 URL: https://svnweb.freebsd.org/changeset/base/280682 Log: MFC r280262 and r280263: Add more known bugs to the USB audio manual page. Modified: stable/9/share/man/man4/snd_uaudio.4 Directory Properties: stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/snd_uaudio.4 ============================================================================== --- stable/9/share/man/man4/snd_uaudio.4 Thu Mar 26 10:25:15 2015 (r280681) +++ stable/9/share/man/man4/snd_uaudio.4 Thu Mar 26 10:26:25 2015 (r280682) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2011 +.Dd March 19, 2015 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -91,12 +91,27 @@ by The .Tn PCM framework in -.Fx , -as of this writing, does not handle device un-registrations in a properly -abstracted manner, i.e., a detach request is refused by the -.Tn PCM -framework if the device is in use. -It is necessary to allow the device un-registration to complete -successfully, otherwise the +.Fx +only supports synchronous device detach. +That means all mixer and DSP character devices belonging to a given +USB audio device must be closed when receiving an error on a DSP read, +a DSP write or a DSP IOCTL request. +Else the USB audio driver will wait for this to happen, preventing +enumeration of new devices on the parenting USB controller. +.Pp +Some USB audio devices might refuse to work properly unless the sample +rate is configured the same for both recording and playback, even if +only simplex is used. +See the +.Va dev.pcm.%d.[play|rec].vchanrate +sysctls. +.Pp +The .Tn PCM -layer will panic. +framework in +.Fx +currently doesn't support the full set of USB audio mixer +controls. +Some mixer controls are only available as +.Va dev.pcm.%d.mixer +sysctls. From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 10:27:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DDF00FEF; Thu, 26 Mar 2015 10:27:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE8BAF82; Thu, 26 Mar 2015 10:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QARe5f085966; Thu, 26 Mar 2015 10:27:40 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QARe88085965; Thu, 26 Mar 2015 10:27:40 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503261027.t2QARe88085965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 26 Mar 2015 10:27:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r280683 - stable/8/share/man/man4 X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 10:27:41 -0000 Author: hselasky Date: Thu Mar 26 10:27:39 2015 New Revision: 280683 URL: https://svnweb.freebsd.org/changeset/base/280683 Log: MFC r280262 and r280263: Add more known bugs to the USB audio manual page. Modified: stable/8/share/man/man4/snd_uaudio.4 Directory Properties: stable/8/share/ (props changed) stable/8/share/man/ (props changed) stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/snd_uaudio.4 ============================================================================== --- stable/8/share/man/man4/snd_uaudio.4 Thu Mar 26 10:26:25 2015 (r280682) +++ stable/8/share/man/man4/snd_uaudio.4 Thu Mar 26 10:27:39 2015 (r280683) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 24, 2011 +.Dd March 19, 2015 .Dt SND_UAUDIO 4 .Os .Sh NAME @@ -98,12 +98,27 @@ by The .Tn PCM framework in -.Fx , -as of this writing, does not handle device un-registrations in a properly -abstracted manner, i.e., a detach request is refused by the -.Tn PCM -framework if the device is in use. -It is necessary to allow the device un-registration to complete -successfully, otherwise the +.Fx +only supports synchronous device detach. +That means all mixer and DSP character devices belonging to a given +USB audio device must be closed when receiving an error on a DSP read, +a DSP write or a DSP IOCTL request. +Else the USB audio driver will wait for this to happen, preventing +enumeration of new devices on the parenting USB controller. +.Pp +Some USB audio devices might refuse to work properly unless the sample +rate is configured the same for both recording and playback, even if +only simplex is used. +See the +.Va dev.pcm.%d.[play|rec].vchanrate +sysctls. +.Pp +The .Tn PCM -layer will panic. +framework in +.Fx +currently doesn't support the full set of USB audio mixer +controls. +Some mixer controls are only available as +.Va dev.pcm.%d.mixer +sysctls. From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 10:44:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1D514FE; Thu, 26 Mar 2015 10:44:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBCF91DD; Thu, 26 Mar 2015 10:44:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QAiG2q094786; Thu, 26 Mar 2015 10:44:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QAiGt8094785; Thu, 26 Mar 2015 10:44:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503261044.t2QAiGt8094785@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 26 Mar 2015 10:44:16 +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: r280684 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 10:44:18 -0000 Author: kib Date: Thu Mar 26 10:44:16 2015 New Revision: 280684 URL: https://svnweb.freebsd.org/changeset/base/280684 Log: MFC r280254: Provide definitions for all descriptors types in the DMAR invalidation queue. Modified: stable/10/sys/x86/iommu/intel_reg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_reg.h ============================================================================== --- stable/10/sys/x86/iommu/intel_reg.h Thu Mar 26 10:27:39 2015 (r280683) +++ stable/10/sys/x86/iommu/intel_reg.h Thu Mar 26 10:44:16 2015 (r280684) @@ -180,7 +180,7 @@ typedef struct dmar_irte { /* IOTLB Register Offset */ #define DMAR_ECAP_SC (1 << 7) /* Snoop Control */ #define DMAR_ECAP_PT (1 << 6) /* Pass Through */ -#define DMAR_ECAP_EIM (1 << 4) /* Extended Interrupt Mode */ +#define DMAR_ECAP_EIM (1 << 4) /* Extended Interrupt Mode (x2APIC) */ #define DMAR_ECAP_IR (1 << 3) /* Interrupt Remapping */ #define DMAR_ECAP_DI (1 << 2) /* Device IOTLB */ #define DMAR_ECAP_QI (1 << 1) /* Queued Invalidation */ @@ -320,8 +320,8 @@ typedef struct dmar_irte { #define DMAR_IQ_DESCR_SZ (1 << DMAR_IQ_DESCR_SZ_SHIFT) /* Descriptor size */ -#define DMAR_IQ_DESCR_CTX_INV 0x1 /* Context-cache Invalidate - Descriptor */ +/* Context-cache Invalidate Descriptor */ +#define DMAR_IQ_DESCR_CTX_INV 0x1 #define DMAR_IQ_DESCR_CTX_GLOB (0x1 << 4) /* Granularity: Global */ #define DMAR_IQ_DESCR_CTX_DOM (0x2 << 4) /* Granularity: Domain */ #define DMAR_IQ_DESCR_CTX_DEV (0x3 << 4) /* Granularity: Device */ @@ -329,7 +329,8 @@ typedef struct dmar_irte { #define DMAR_IQ_DESCR_CTX_SRC(x) (((uint64_t)(x)) << 32) /* Source Id */ #define DMAR_IQ_DESCR_CTX_FM(x) (((uint64_t)(x)) << 48) /* Function Mask */ -#define DMAR_IQ_DESCR_IOTLB_INV 0x2 /* IOTLB Invalidate Descriptor */ +/* IOTLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_IOTLB_INV 0x2 #define DMAR_IQ_DESCR_IOTLB_GLOB (0x1 << 4) /* Granularity: Global */ #define DMAR_IQ_DESCR_IOTLB_DOM (0x2 << 4) /* Granularity: Domain */ #define DMAR_IQ_DESCR_IOTLB_PAGE (0x3 << 4) /* Granularity: Page */ @@ -337,17 +338,31 @@ typedef struct dmar_irte { #define DMAR_IQ_DESCR_IOTLB_DR (1 << 7) /* Drain Reads */ #define DMAR_IQ_DESCR_IOTLB_DID(x) (((uint32_t)(x)) << 16) /* Domain Id */ -#define DMAR_IQ_DESCR_IEC_INV 0x4 /* Invalidate Interrupt Entry Cache */ +/* Device-TLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_DTLB_INV 0x3 + +/* Invalidate Interrupt Entry Cache */ +#define DMAR_IQ_DESCR_IEC_INV 0x4 #define DMAR_IQ_DESCR_IEC_IDX (1 << 4) /* Index-Selective Invalidation */ #define DMAR_IQ_DESCR_IEC_IIDX(x) (((uint64_t)x) << 32) /* Interrupt Index */ #define DMAR_IQ_DESCR_IEC_IM(x) ((x) << 27) /* Index Mask */ -#define DMAR_IQ_DESCR_WAIT_ID 0x5 /* Invalidation Wait Descriptor */ +/* Invalidation Wait Descriptor */ +#define DMAR_IQ_DESCR_WAIT_ID 0x5 #define DMAR_IQ_DESCR_WAIT_IF (1 << 4) /* Interrupt Flag */ #define DMAR_IQ_DESCR_WAIT_SW (1 << 5) /* Status Write */ #define DMAR_IQ_DESCR_WAIT_FN (1 << 6) /* Fence */ #define DMAR_IQ_DESCR_WAIT_SD(x) (((uint64_t)(x)) << 32) /* Status Data */ +/* Extended IOTLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_EIOTLB_INV 0x6 + +/* PASID-Cache Invalidate Descriptor */ +#define DMAR_IQ_DESCR_PASIDC_INV 0x7 + +/* Extended Device-TLB Invalidate Descriptor */ +#define DMAR_IQ_DESCR_EDTLB_INV 0x8 + /* Invalidation Queue Head register */ #define DMAR_IQH_REG 0x80 #define DMAR_IQH_MASK 0x7fff0 /* Next cmd index mask */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 11:02:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A416835; Thu, 26 Mar 2015 11:02:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 850A73F0; Thu, 26 Mar 2015 11:02:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QB2UjL003953; Thu, 26 Mar 2015 11:02:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QB2UhA003952; Thu, 26 Mar 2015 11:02:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503261102.t2QB2UhA003952@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Mar 2015 11:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280685 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 11:02:30 -0000 Author: mav Date: Thu Mar 26 11:02:29 2015 New Revision: 280685 URL: https://svnweb.freebsd.org/changeset/base/280685 Log: When searching for provider by name, prefer non-withered one. MFC after: 2 weeks Modified: head/sys/geom/geom_subr.c Modified: head/sys/geom/geom_subr.c ============================================================================== --- head/sys/geom/geom_subr.c Thu Mar 26 10:44:16 2015 (r280684) +++ head/sys/geom/geom_subr.c Thu Mar 26 11:02:29 2015 (r280685) @@ -683,21 +683,27 @@ g_provider_by_name(char const *arg) { struct g_class *cp; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *wpp; if (strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) arg += sizeof(_PATH_DEV) - 1; + wpp = NULL; LIST_FOREACH(cp, &g_classes, class) { LIST_FOREACH(gp, &cp->geom, geom) { LIST_FOREACH(pp, &gp->provider, provider) { - if (!strcmp(arg, pp->name)) + if (strcmp(arg, pp->name) != 0) + continue; + if ((gp->flags & G_GEOM_WITHER) == 0 && + (pp->flags & G_PF_WITHER) == 0) return (pp); + else + wpp = pp; } } } - return (NULL); + return (wpp); } void From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 11:19:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 002B7C2F; Thu, 26 Mar 2015 11:19:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEB5A775; Thu, 26 Mar 2015 11:19:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QBJPT0009431; Thu, 26 Mar 2015 11:19:25 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QBJPnH009430; Thu, 26 Mar 2015 11:19:25 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503261119.t2QBJPnH009430@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Mar 2015 11:19:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280686 - head/sys/geom X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 11:19:26 -0000 Author: mav Date: Thu Mar 26 11:19:24 2015 New Revision: 280686 URL: https://svnweb.freebsd.org/changeset/base/280686 Log: Report withered providers as such alike to GEOMs. MFC after: 2 weeks Modified: head/sys/geom/geom_dump.c Modified: head/sys/geom/geom_dump.c ============================================================================== --- head/sys/geom/geom_dump.c Thu Mar 26 11:02:29 2015 (r280685) +++ head/sys/geom/geom_dump.c Thu Mar 26 11:19:24 2015 (r280686) @@ -216,7 +216,9 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t %u\n", pp->sectorsize); sbuf_printf(sb, "\t %u\n", pp->stripesize); sbuf_printf(sb, "\t %u\n", pp->stripeoffset); - if (pp->geom->flags & G_GEOM_WITHER) + if (pp->flags & G_PF_WITHER) + sbuf_printf(sb, "\t \n"); + else if (pp->geom->flags & G_GEOM_WITHER) ; else if (pp->geom->dumpconf != NULL) { sbuf_printf(sb, "\t \n"); From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 12:17:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 023DEA18; Thu, 26 Mar 2015 12:17:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E12D5DF6; Thu, 26 Mar 2015 12:17:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QCHmbV037161; Thu, 26 Mar 2015 12:17:48 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QCHlPf037147; Thu, 26 Mar 2015 12:17:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503261217.t2QCHlPf037147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Mar 2015 12:17:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280687 - in head: lib/libgeom sbin/geom/class/part sys/geom/part X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 12:17:49 -0000 Author: mav Date: Thu Mar 26 12:17:47 2015 New Revision: 280687 URL: https://svnweb.freebsd.org/changeset/base/280687 Log: Make GEOM_PART work in presence of previous withered self. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/lib/libgeom/geom_xml2tree.c head/sbin/geom/class/part/geom_part.c head/sys/geom/part/g_part.c Modified: head/lib/libgeom/geom_xml2tree.c ============================================================================== --- head/lib/libgeom/geom_xml2tree.c Thu Mar 26 11:19:24 2015 (r280686) +++ head/lib/libgeom/geom_xml2tree.c Thu Mar 26 12:17:47 2015 (r280687) @@ -186,6 +186,7 @@ static void EndElement(void *userData, const char *name) { struct mystate *mt; + struct gconf *c; struct gconfig *gc; char *p; @@ -259,7 +260,14 @@ EndElement(void *userData, const char *n return; } - if (mt->config != NULL) { + if (mt->config != NULL || (!strcmp(name, "wither") && + (mt->provider != NULL || mt->geom != NULL))) { + if (mt->config != NULL) + c = mt->config; + else if (mt->provider != NULL) + c = &mt->provider->lg_config; + else + c = &mt->geom->lg_config; gc = calloc(1, sizeof *gc); if (gc == NULL) { mt->error = errno; @@ -270,14 +278,15 @@ EndElement(void *userData, const char *n } gc->lg_name = strdup(name); if (gc->lg_name == NULL) { + free(gc); mt->error = errno; XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; } - gc->lg_val = p; - LIST_INSERT_HEAD(mt->config, gc, lg_config); + gc->lg_val = p ? p : strdup("1"); + LIST_INSERT_HEAD(c, gc, lg_config); return; } Modified: head/sbin/geom/class/part/geom_part.c ============================================================================== --- head/sbin/geom/class/part/geom_part.c Thu Mar 26 11:19:24 2015 (r280686) +++ head/sbin/geom/class/part/geom_part.c Thu Mar 26 12:17:47 2015 (r280687) @@ -207,15 +207,20 @@ find_class(struct gmesh *mesh, const cha static struct ggeom * find_geom(struct gclass *classp, const char *name) { - struct ggeom *gp; + struct ggeom *gp, *wgp; if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) name += sizeof(_PATH_DEV) - 1; + wgp = NULL; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (strcmp(gp->lg_name, name) == 0) + if (strcmp(gp->lg_name, name) != 0) + continue; + if (find_geomcfg(gp, "wither") == NULL) return (gp); + else + wgp = gp; } - return (NULL); + return (wgp); } static const char * @@ -609,6 +614,8 @@ gpart_show_geom(struct ggeom *gp, const off_t length, secsz; int idx, wblocks, wname, wmax; + if (find_geomcfg(gp, "wither")) + return; scheme = find_geomcfg(gp, "scheme"); if (scheme == NULL) errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name); Modified: head/sys/geom/part/g_part.c ============================================================================== --- head/sys/geom/part/g_part.c Thu Mar 26 11:19:24 2015 (r280686) +++ head/sys/geom/part/g_part.c Thu Mar 26 12:17:47 2015 (r280687) @@ -452,7 +452,8 @@ g_part_find_geom(const char *name) { struct g_geom *gp; LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(name, gp->name)) + if ((gp->flags & G_GEOM_WITHER) == 0 && + strcmp(name, gp->name) == 0) break; } return (gp); @@ -474,10 +475,6 @@ g_part_parm_geom(struct gctl_req *req, c gctl_error(req, "%d %s '%s'", EINVAL, name, gname); return (EINVAL); } - if ((gp->flags & G_GEOM_WITHER) != 0) { - gctl_error(req, "%d %s", ENXIO, gname); - return (ENXIO); - } *v = gp; return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 12:52:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C0F9342; Thu, 26 Mar 2015 12:52:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 079F920C; Thu, 26 Mar 2015 12:52:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QCqL9w055381; Thu, 26 Mar 2015 12:52:21 GMT (envelope-from ru@FreeBSD.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QCqL6Y055380; Thu, 26 Mar 2015 12:52:21 GMT (envelope-from ru@FreeBSD.org) Message-Id: <201503261252.t2QCqL6Y055380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ru set sender to ru@FreeBSD.org using -f From: Ruslan Ermilov Date: Thu, 26 Mar 2015 12:52:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280688 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 12:52:22 -0000 Author: ru Date: Thu Mar 26 12:52:21 2015 New Revision: 280688 URL: https://svnweb.freebsd.org/changeset/base/280688 Log: Corrected descriptions of net.inet.icmp.icmplim and icmplim_output. Reviewed by: pluknet Modified: head/share/man/man4/icmp.4 Modified: head/share/man/man4/icmp.4 ============================================================================== --- head/share/man/man4/icmp.4 Thu Mar 26 12:17:47 2015 (r280687) +++ head/share/man/man4/icmp.4 Thu Mar 26 12:52:21 2015 (r280688) @@ -28,7 +28,7 @@ .\" @(#)icmp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 30, 2014 +.Dd March 26, 2015 .Dt ICMP 4 .Os .Sh NAME @@ -177,13 +177,11 @@ Defaults to 0. .It Va icmplim .Pq Vt integer Bandwidth limit for ICMP replies in packets/second. -Used when -.Va icmplim_output -is non-zero. +If set to zero, no limiting will occur. Defaults to 200. .It Va icmplim_output .Pq Vt boolean -Enable/disable bandwidth limiting of ICMP replies. +Enable/disable logging of ICMP replies bandwidth limiting. Defaults to true. .It Va drop_redirect .Pq Vt boolean From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 12:58:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46F605BD; Thu, 26 Mar 2015 12:58:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32CAC23E; Thu, 26 Mar 2015 12:58:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QCwUsD056335; Thu, 26 Mar 2015 12:58:30 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QCwUVj056334; Thu, 26 Mar 2015 12:58:30 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503261258.t2QCwUVj056334@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 26 Mar 2015 12:58:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280689 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 12:58:31 -0000 Author: gjb Date: Thu Mar 26 12:58:30 2015 New Revision: 280689 URL: https://svnweb.freebsd.org/changeset/base/280689 Log: Remove duplicate AH_DEBUG_ALQ option. Sponsored by: The FreeBSD Foundation Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Thu Mar 26 12:52:21 2015 (r280688) +++ head/sys/mips/conf/AR91XX_BASE Thu Mar 26 12:58:30 2015 (r280689) @@ -68,7 +68,6 @@ device ath_ahb # Atheros host bus glue options ATH_DEBUG options ATH_DIAGAPI option ATH_ENABLE_11N -option AH_DEBUG_ALQ # Don't bother compiling the whole HAL - AH_SUPPORT_AR9130 breaks the # rest of the 11n chipset support at the moment and the pre-AR5212 From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 13:22:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DAAE2BBB; Thu, 26 Mar 2015 13:22:07 +0000 (UTC) Received: from mailrelay103.isp.belgacom.be (mailrelay103.isp.belgacom.be [195.238.20.130]) by mx1.freebsd.org (Postfix) with ESMTP id BBBF0751; Thu, 26 Mar 2015 13:22:06 +0000 (UTC) X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=ZT6Ny9SzQUL0U4sOn6xM6rLbT25dGdPOAe/imaXRw80= c=1 sm=2 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=Fbp1fs8650Vf3TmiwTgA:9 a=CjuIK1q_8ugA:10 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BTDgCkBhRV/8q28VFcgwaBLMsiAoFaTQEBAQEBAX1BAYNSAQEBAwEnExwREhALDgoJJQ8qHgYBEognDAHLBwEBAQEBAQEBAgEBAQEBARyLIYR2B4QtAQSaPoEcgzCHGIhJIoICHIFRPTGBAiSBHQEBAQ Received: from 202.182-241-81.adsl-dyn.isp.belgacom.be (HELO kalimero.tijl.coosemans.org) ([81.241.182.202]) by relay.skynet.be with ESMTP; 26 Mar 2015 14:20:54 +0100 Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org [127.0.0.1]) by kalimero.tijl.coosemans.org (8.14.9/8.14.9) with ESMTP id t2QDKqnX002451; Thu, 26 Mar 2015 14:20:53 +0100 (CET) (envelope-from tijl@FreeBSD.org) Date: Thu, 26 Mar 2015 14:20:52 +0100 From: Tijl Coosemans To: Bruce Evans , Pedro Giffuni Subject: Re: svn commit: r280636 - head/include Message-ID: <20150326142052.6789dd50@kalimero.tijl.coosemans.org> In-Reply-To: <20150326170535.U2239@besplex.bde.org> References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> <20150326170535.U2239@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, gerald@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 13:22:08 -0000 On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans wrote: > On Wed, 25 Mar 2015, Pedro Giffuni wrote: >> On 03/25/15 21:14, Bruce Evans wrote: >>> On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: >>>> Log: >>>> Temporarily revert 280458. >>>> >>>> GCC is still carries an old version of cdefs.h which doesn't >>>> accept multiple parameters for the nonnull attribute. >>>> Since this issue probably affects many ports in the tree >>>> we will revert it for now until gcc gets fixed. >>> >>> Note that sys/cdefs.h is supposed to work with any version of >>> gcc back to gcc-1, and does mostly work back to at least gcc-2.95. >>> The whole point of sys/cdefs.h is to provide compatibity macros >>> for old and other non-default compilers. Standard compilers don't >>> even have __attribute__(()). So no changes in future versions >>> of gcc will fix the previous commit. >> >> cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. > > I now remember other bugs in it. I think you put the varargs stuff > in the non-gcc version. That won't work compilers that don't support > varargs for macros. Neither will not changing the non-gcc version. > > glibc (2.6 at least) avoids using varargs in its __nonnull() macro > by using the same portable method that is used in many optional > debugging statements including FreeBSD's KASSERT(). (KASSERT() is > broken as designed. It never needed this since it wasn't implmented > until several years after C99 standardized varargs for macros.) > The macro takes a single arg consisting of a normal list of args > enclosed in parentheses. The extra parentheses are not passed to > the __attribute__() list. All invocations of the macro must be > ugly to supply the parantheses. The parentheses give a large > syntactic difference, so the ugliness cannot be fixed easily by > switching to varargs macros. For KASSERT(), there would be about > 7500 in /usr/src lines to clean up. For __nonnull(), there would > be only about lines 160 in /usr/src to change. Mostly > __nonnull(1) -> __nonnull((1)). But __nonnull() is more likely to > be (mis)used in ports. Maybe introduce a __nonnull_all macro and leave __nonnull varargs-free: #define __nonnull(x) __attribute__((__nonnull__(x))) #define __nonnull_all __attribute__((__nonnull__)) Then in the rare cases where multiple arguments must be nonnull but __nonnull_all doesn't apply you can use multiple __nonnull: int f(void *, void *, void *) __nonnull(1) __nonnull(2); >> The reason why I had to revert the change is actually a systematic >> bug in gcc: during it's build process gcc generates a new cdefs.h >> from our headers. Attempting to use an older gcc from ports >> that was build with the broken mono-parameter __nonnull() ended >> up causing breakage in any code using signal.h or pthreads.h. > > I see. gcc's "fixed" headers cause lots of problems. I've complained about this multiple times in the past. The gcc ports should not install these "fixed" headers. Pedro, by reverting this commit you only allow this problem to persist, so please reapply it. You also shouldn't wait weeks before applying the next commit. No amount of waiting is enough. There will always be users bitten by it. The problem is in the ports. It needs to be fixed there. If you receive any problem reports that are caused by this gcc problem, forward them to the gcc port maintainer. From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 13:31:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39C3AD93; Thu, 26 Mar 2015 13:31:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 254C17A2; Thu, 26 Mar 2015 13:31:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QDV4vn072959; Thu, 26 Mar 2015 13:31:04 GMT (envelope-from pluknet@FreeBSD.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QDV4gs072958; Thu, 26 Mar 2015 13:31:04 GMT (envelope-from pluknet@FreeBSD.org) Message-Id: <201503261331.t2QDV4gs072958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pluknet set sender to pluknet@FreeBSD.org using -f From: Sergey Kandaurov Date: Thu, 26 Mar 2015 13:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280690 - head/sys/netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 13:31:05 -0000 Author: pluknet Date: Thu Mar 26 13:31:04 2015 New Revision: 280690 URL: https://svnweb.freebsd.org/changeset/base/280690 Log: Static'ize pf_fillup_fragment body to match its declaration. Missed in 278925. Modified: head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Thu Mar 26 12:58:30 2015 (r280689) +++ head/sys/netpfil/pf/pf_norm.c Thu Mar 26 13:31:04 2015 (r280690) @@ -386,7 +386,7 @@ pf_create_fragment(u_short *reason) return (frent); } -struct pf_fragment * +static struct pf_fragment * pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, u_short *reason) { From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 14:06:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9BF3B05 for ; Thu, 26 Mar 2015 14:06:00 +0000 (UTC) Received: from nm30-vm0.bullet.mail.bf1.yahoo.com (nm30-vm0.bullet.mail.bf1.yahoo.com [98.139.213.126]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DB19CD3 for ; Thu, 26 Mar 2015 14:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427378753; bh=fanq69AOzJQgyp7EJbEz1wdzbTRgFeU66Ath7UjgmuY=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=r3/quHvntN5r+XJdMctmZ2X48kCMoN1XbA0qYfpM8srZveVWjOjJ3dKTk4cDhTvzi1Sd8kIycLSw4y34po8Mb5siZj7nLQH8t3lrp1xL4Q5eBI/aCYDyRd3ZaGvgYnbOcby7HtZS+tsGqouHny2aiXTIbxonM/u8LaH2voGDbMCLm7ZCpTjdxYwQ2dkQpokPkUPEY1BP5lomkdDEC5yNGaO40BAag4zgH41AKjcjWD5U0Qcn8PlGo6XdsJd3dIcoap4CJa/JMs6cCsysyom0ewy40a2FKcnXoPwW/Ob8lizzuvcDpSJCRhzuqq4S/pxxoiicmsNchklugUTgEp+Scg== Received: from [98.139.170.178] by nm30.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:05:53 -0000 Received: from [98.139.211.202] by tm21.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:05:53 -0000 Received: from [127.0.0.1] by smtp211.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:05:53 -0000 X-Yahoo-Newman-Id: 998110.51619.bm@smtp211.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: i71NvMUVM1nzfRQypWgQ8i_w6_1FtjyenJPpmU8.kuJXc_Y P_PBJG5HJaPW9PHsUa4xWQvgnebHQStNY9qLoweyV7imVboH6TYX9DopV3ow 6NQ1CY1DepBBObK9GLBKpvnfRH0POJTV7Pn3AohAv.MJFGcxCUpOPFAiSg55 TRyaJWVzCRunWUvhz1GBPfTtkX3_89CSbWYKciSMC1pWDlOYiFV_3a15NvfV ljCb2NGEyWjnYTF51m121cmmUxmaJIPALEBJq2hySTw7Dr9605DngtLMU0r4 LxA4Vx8CDTeDVlBx18xcCB9Sa41aUte9Vaj72ZoxsolXYz2kaUYAlGTK_KA. Gd.M2Db1IfqTOQmpfuxWjs4NF83Ij0CxE7xvnwnecDjud1unok691D1kU4ld VvMTZs7F6HstHPaVwcUio4AffDecjWL25_RJRpTJ9u698QzG.XLjmuGvF3py 6z79crkXFQH6B75dwZ0m2OgCP3Ty3btGVFAMcDVueLJdKcmrP77oTUcyjRUC Hq_lvEh2b5TQMJJNh_SAMe9Ix1DxgaDYSSCpWs4RB1.t.v.Lgn5V1OTcBShy c1f4RWKwHoHSmBsTL9QuY9w8JnTw9iSyy39MyB3axXChX369e3GafYwvzm4b WsmhpxCFfr40- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55141244.7030408@FreeBSD.org> Date: Thu, 26 Mar 2015 09:05:56 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r280636 - head/include References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> <20150326170535.U2239@besplex.bde.org> In-Reply-To: <20150326170535.U2239@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 14:06:00 -0000 On 03/26/15 01:37, Bruce Evans wrote: > On Wed, 25 Mar 2015, Pedro Giffuni wrote: > >> On 03/25/15 21:14, Bruce Evans wrote: >>> On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: >>> >>>> Log: >>>> Temporarily revert 280458. >>>> >>>> GCC is still carries an old version of cdefs.h which doesn't >>>> accept multiple parameters for the nonnull attribute. >>>> Since this issue probably affects many ports in the tree >>>> we will revert it for now until gcc gets fixed. >>> >>> Note that sys/cdefs.h is supposed to work with any version of >>> gcc back to gcc-1, and does mostly work back to at least gcc-2.95. >>> The whole point of sys/cdefs.h is to provide compatibity macros >>> for old and other non-default compilers. Standard compilers don't >>> even have __attribute__(()). So no changes in future versions >>> of gcc will fix the previous commit. >>> >> cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. > > I now remember other bugs in it. I think you put the varargs stuff > in the non-gcc version. That won't work compilers that don't support > varargs for macros. Neither will not changing the non-gcc version. > According to the gcc documentation [1] "Variadic macros are a new feature in C99. GNU CPP has supported them for a long time, but only with a named variable argument (‘args...’, not ‘...’ and |__VA_ARGS__|). If you are concerned with portability to previous versions of GCC, you should use only named variable arguments. On the other hand, if you are concerned with portability to other conforming implementations of C99, you should use only |__VA_ARGS__|." I gave priority for C99 conformant compilers instead of older (which?) gcc versions. > glibc (2.6 at least) avoids using varargs in its __nonnull() macro > by using the same portable method that is used in many optional > debugging statements including FreeBSD's KASSERT(). I will take a look at KASSERT(), I normally avoid looking at glibc as it is likely to have GNUisms, and maybe even license issues. > (KASSERT() is > broken as designed. It never needed this since it wasn't implmented > until several years after C99 standardized varargs for macros.) > The macro takes a single arg consisting of a normal list of args > enclosed in parentheses. Hmm.. I think Android's Bionic libc does the same, it's really ugly. Thanks, Pedro. [1] https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 14:25:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A97BB32 for ; Thu, 26 Mar 2015 14:25:25 +0000 (UTC) Received: from nm31-vm6.bullet.mail.bf1.yahoo.com (nm31-vm6.bullet.mail.bf1.yahoo.com [72.30.239.14]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6EDFC8 for ; Thu, 26 Mar 2015 14:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427379587; bh=I1/8+vU7azXSOPWkj37nXHkSj7rGpyDnmIxzGFZYyLs=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=rioYwe9WloZS644vuwNbAOVph0amgv3cUtNVlsWGEDHwg73aP0V+QmXyBmQLMOuNJWzhTlgjWgEzjvSnnVIISEs4AgxUJTziff9N1abo/H3u6GVh1KtejVYmAVFYhuYqnGpJe8S5UZFWgmRH/58+xY+8aI2CVTujfnVPcKQr5N+AyBCl1NS2DIgEB2Fw/Dp5iToBlSOZfunn9bW5l9cV4eJzpgWgPmIrKaZWR3eYayMmFr33nqOAG/QFuQAyjnoxVwY5PxJoUtoYxFBpM7bgu+WM0MRo8oXHo6Xdc849AN6sJbimr/Gv7Jaoj8PRVa92bBH+e0hy+axWr2qbrIunRg== Received: from [98.139.170.181] by nm31.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:19:47 -0000 Received: from [98.139.211.201] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:19:47 -0000 Received: from [127.0.0.1] by smtp210.mail.bf1.yahoo.com with NNFMP; 26 Mar 2015 14:19:47 -0000 X-Yahoo-Newman-Id: 206948.76965.bm@smtp210.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: glBnX_oVM1lEqEV9o.sQ6ZaKe3PKFCkg2cMp8SioFdK5Zbz lFKwhKcaZnaV7RNXW6YlLoGKnwWKm1PwKFGM3FK_94mP9fIMtFbhBffOl4Fs slBG166zyXg0r6zIgjWRRTGa8jM7_66Z.ZWEsKNDf2f_sJih0iJnu0zl2ehS tVcQaGT9NUf3r6Nb6XLsqwHuKOzGUK2uuVwYDH6HaCcZMuVchbItqeUEZYla Is5n1.FP1RS9xvkSgfPK0ArL4u3IaTlotB4Il76jnK1QDrSjHyzxSPccSM5r 7T3gCmyOzWiYaVeng_qbcktDTIp_aEIipjH0h3n9jo8zPA6QPLgeSMLnFzF2 1jthkw5YzR.46G.9MnSoxQbUtepuJUlJSc142_KOemYGRMMsquMKRYYeIo.9 ekO4CFxXodzydXUrVnEUJ3nNpfSGkGBss0rhEvPZjVu2uTl9iy0.GZUuKbnS MlIa_VsSpHMMxeY82H0qr.JYBqaQF4lVkvMjP3HieTJ9ZyT23bKi3KvdMNhS 28buJsYMbaepD0Cq3Klo94Y___Q-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <55141584.6030600@FreeBSD.org> Date: Thu, 26 Mar 2015 09:19:48 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Tijl Coosemans , Bruce Evans Subject: Re: svn commit: r280636 - head/include References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> <20150326170535.U2239@besplex.bde.org> <20150326142052.6789dd50@kalimero.tijl.coosemans.org> In-Reply-To: <20150326142052.6789dd50@kalimero.tijl.coosemans.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, gerald@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 14:25:25 -0000 On 03/26/15 08:20, Tijl Coosemans wrote: > On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans wrote: >> --- snip --- >> >> glibc (2.6 at least) avoids using varargs in its __nonnull() macro >> by using the same portable method that is used in many optional >> debugging statements including FreeBSD's KASSERT(). (KASSERT() is >> broken as designed. It never needed this since it wasn't implmented >> until several years after C99 standardized varargs for macros.) >> The macro takes a single arg consisting of a normal list of args >> enclosed in parentheses. The extra parentheses are not passed to >> the __attribute__() list. All invocations of the macro must be >> ugly to supply the parantheses. The parentheses give a large >> syntactic difference, so the ugliness cannot be fixed easily by >> switching to varargs macros. For KASSERT(), there would be about >> 7500 in /usr/src lines to clean up. For __nonnull(), there would >> be only about lines 160 in /usr/src to change. Mostly >> __nonnull(1) -> __nonnull((1)). But __nonnull() is more likely to >> be (mis)used in ports. > Maybe introduce a __nonnull_all macro and leave __nonnull varargs-free: > > #define __nonnull(x) __attribute__((__nonnull__(x))) > #define __nonnull_all __attribute__((__nonnull__)) > > Then in the rare cases where multiple arguments must be nonnull but > __nonnull_all doesn't apply you can use multiple __nonnull: > > int f(void *, void *, void *) __nonnull(1) __nonnull(2); > the __all extension takes more space than the extra parenthesis. I honestly see no reason to cope with pre-C99 compilers. The base compilers accept the standard varargs fine, for previous compilers we will ignore non standard varargs and use the null implementation. >>> The reason why I had to revert the change is actually a systematic >>> bug in gcc: during it's build process gcc generates a new cdefs.h >>> from our headers. Attempting to use an older gcc from ports >>> that was build with the broken mono-parameter __nonnull() ended >>> up causing breakage in any code using signal.h or pthreads.h. >> I see. gcc's "fixed" headers cause lots of problems. > I've complained about this multiple times in the past. The gcc ports > should not install these "fixed" headers. Yes it is a gcc bug. And I already forwarded the issue to the gcc maintainer. > Pedro, by reverting this commit you only allow this problem to persist, > so please reapply it. You also shouldn't wait weeks before applying > the next commit. No amount of waiting is enough. There will always be > users bitten by it. The problem is in the ports. It needs to be fixed > there. If you receive any problem reports that are caused by this gcc > problem, forward them to the gcc port maintainer. > There's no good reason not to be nice with our developers. I will update cdefs with a week anticipation and point them to update gcc after the header changes. I will MFC the cdefs updates but not the header changes. Pedro. From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 14:41:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB7231C0; Thu, 26 Mar 2015 14:41:43 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 83F861A2; Thu, 26 Mar 2015 14:41:43 +0000 (UTC) Received: from coleburn.avinity.tv (host-229-161-243.77.avinity.tv [77.243.161.229]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id B4A4B5C48; Thu, 26 Mar 2015 15:41:36 +0100 (CET) Subject: Re: svn commit: r280636 - head/include Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_CFE69B44-2AD2-434E-A929-914F083897A9"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b6 From: Dimitry Andric In-Reply-To: <20150326142052.6789dd50@kalimero.tijl.coosemans.org> Date: Thu, 26 Mar 2015 15:41:26 +0100 Message-Id: <9AFF932D-77B3-4574-BC95-DDD3B95AC8A2@FreeBSD.org> References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> <20150326170535.U2239@besplex.bde.org> <20150326142052.6789dd50@kalimero.tijl.coosemans.org> To: Tijl Coosemans X-Mailer: Apple Mail (2.2070.6) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Pedro Giffuni , Bruce Evans , svn-src-head@freebsd.org, gerald@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 14:41:43 -0000 --Apple-Mail=_CFE69B44-2AD2-434E-A929-914F083897A9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 26 Mar 2015, at 14:20, Tijl Coosemans wrote: >=20 > On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans = wrote: >> On Wed, 25 Mar 2015, Pedro Giffuni wrote: ... >>> The reason why I had to revert the change is actually a systematic >>> bug in gcc: during it's build process gcc generates a new cdefs.h >>> from our headers. Attempting to use an older gcc from ports >>> that was build with the broken mono-parameter __nonnull() ended >>> up causing breakage in any code using signal.h or pthreads.h. >>=20 >> I see. gcc's "fixed" headers cause lots of problems. >=20 > I've complained about this multiple times in the past. The gcc ports > should not install these "fixed" headers. Indeed. See also this recent discussion on -current: = https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055111.html= where a "fixed" stdio.h (from a gcc port) causes trouble. -Dimitry --Apple-Mail=_CFE69B44-2AD2-434E-A929-914F083897A9 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----- Version: GnuPG/MacGPG2 v2.0.27 iEYEARECAAYFAlUUGpsACgkQsF6jCi4glqMxqgCeIe+a0GyeYIPKtUx5PhdfE2BA lYAAnjMbDoOqZdWqohQKoMD+k/DpqnX1 =hyAN -----END PGP SIGNATURE----- --Apple-Mail=_CFE69B44-2AD2-434E-A929-914F083897A9-- From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 14:51:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6854627; Thu, 26 Mar 2015 14:51:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B129D394; Thu, 26 Mar 2015 14:51:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QEpQXf013005; Thu, 26 Mar 2015 14:51:26 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QEpP1N013001; Thu, 26 Mar 2015 14:51:25 GMT (envelope-from br@FreeBSD.org) Message-Id: <201503261451.t2QEpP1N013001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Thu, 26 Mar 2015 14:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280691 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 14:51:26 -0000 Author: br Date: Thu Mar 26 14:51:24 2015 New Revision: 280691 URL: https://svnweb.freebsd.org/changeset/base/280691 Log: Add 64 byte linesize cache flushing routines for L1 instruction, L1 data and L2 data caches. Sponsored by: HEIF5 Modified: head/sys/mips/include/cache_mipsNN.h head/sys/mips/include/cache_r4k.h head/sys/mips/mips/cache.c head/sys/mips/mips/cache_mipsNN.c Modified: head/sys/mips/include/cache_mipsNN.h ============================================================================== --- head/sys/mips/include/cache_mipsNN.h Thu Mar 26 13:31:04 2015 (r280690) +++ head/sys/mips/include/cache_mipsNN.h Thu Mar 26 14:51:24 2015 (r280691) @@ -43,37 +43,50 @@ void mipsNN_cache_init(struct mips_cpuin void mipsNN_icache_sync_all_16(void); void mipsNN_icache_sync_all_32(void); +void mipsNN_icache_sync_all_64(void); +void mipsNN_icache_sync_all_128(void); void mipsNN_icache_sync_range_16(vm_offset_t, vm_size_t); void mipsNN_icache_sync_range_32(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_64(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_128(vm_offset_t, vm_size_t); void mipsNN_icache_sync_range_index_16(vm_offset_t, vm_size_t); void mipsNN_icache_sync_range_index_32(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_index_64(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_index_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_all_16(void); void mipsNN_pdcache_wbinv_all_32(void); +void mipsNN_pdcache_wbinv_all_64(void); +void mipsNN_pdcache_wbinv_all_128(void); void mipsNN_pdcache_wbinv_range_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_range_32(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_64(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_range_index_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_index_64(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_inv_range_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_inv_range_32(vm_offset_t, vm_size_t); +void mipsNN_pdcache_inv_range_64(vm_offset_t, vm_size_t); +void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_32(vm_offset_t, vm_size_t); -void mipsNN_icache_sync_all_128(void); -void mipsNN_icache_sync_range_128(vm_offset_t, vm_size_t); -void mipsNN_icache_sync_range_index_128(vm_offset_t, vm_size_t); -void mipsNN_pdcache_wbinv_all_128(void); -void mipsNN_pdcache_wbinv_range_128(vm_offset_t, vm_size_t); -void mipsNN_pdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); -void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wb_range_64(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_all_32(void); -void mipsNN_sdcache_wbinv_range_32(vm_offset_t, vm_size_t); -void mipsNN_sdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); -void mipsNN_sdcache_inv_range_32(vm_offset_t, vm_size_t); -void mipsNN_sdcache_wb_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_all_64(void); void mipsNN_sdcache_wbinv_all_128(void); +void mipsNN_sdcache_wbinv_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_range_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_index_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_inv_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_inv_range_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_inv_range_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wb_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wb_range_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_wb_range_128(vm_offset_t, vm_size_t); #endif /* _MACHINE_CACHE_MIPSNN_H_ */ Modified: head/sys/mips/include/cache_r4k.h ============================================================================== --- head/sys/mips/include/cache_r4k.h Thu Mar 26 13:31:04 2015 (r280690) +++ head/sys/mips/include/cache_r4k.h Thu Mar 26 14:51:24 2015 (r280691) @@ -114,6 +114,25 @@ do { \ } while (/*CONSTCOND*/0) /* + * cache_r4k_op_8lines_64: + * + * Perform the specified cache operation on 8 64-byte cache lines. + */ +#define cache_r4k_op_8lines_64(va, op) \ +do { \ + __asm __volatile( \ + ".set noreorder \n\t" \ + "cache %1, 0x000(%0); cache %1, 0x040(%0) \n\t" \ + "cache %1, 0x080(%0); cache %1, 0x0c0(%0) \n\t" \ + "cache %1, 0x100(%0); cache %1, 0x140(%0) \n\t" \ + "cache %1, 0x180(%0); cache %1, 0x1c0(%0) \n\t" \ + ".set reorder" \ + : \ + : "r" (va), "i" (op) \ + : "memory"); \ +} while (/*CONSTCOND*/0) + +/* * cache_r4k_op_32lines_16: * * Perform the specified cache operation on 32 16-byte @@ -178,6 +197,38 @@ do { \ } while (/*CONSTCOND*/0) /* + * cache_r4k_op_32lines_64: + * + * Perform the specified cache operation on 32 64-byte + * cache lines. + */ +#define cache_r4k_op_32lines_64(va, op) \ +do { \ + __asm __volatile( \ + ".set noreorder \n\t" \ + "cache %1, 0x000(%0); cache %1, 0x040(%0); \n\t" \ + "cache %1, 0x080(%0); cache %1, 0x0c0(%0); \n\t" \ + "cache %1, 0x100(%0); cache %1, 0x140(%0); \n\t" \ + "cache %1, 0x180(%0); cache %1, 0x1c0(%0); \n\t" \ + "cache %1, 0x200(%0); cache %1, 0x240(%0); \n\t" \ + "cache %1, 0x280(%0); cache %1, 0x2c0(%0); \n\t" \ + "cache %1, 0x300(%0); cache %1, 0x340(%0); \n\t" \ + "cache %1, 0x380(%0); cache %1, 0x3c0(%0); \n\t" \ + "cache %1, 0x400(%0); cache %1, 0x440(%0); \n\t" \ + "cache %1, 0x480(%0); cache %1, 0x4c0(%0); \n\t" \ + "cache %1, 0x500(%0); cache %1, 0x540(%0); \n\t" \ + "cache %1, 0x580(%0); cache %1, 0x5c0(%0); \n\t" \ + "cache %1, 0x600(%0); cache %1, 0x640(%0); \n\t" \ + "cache %1, 0x680(%0); cache %1, 0x6c0(%0); \n\t" \ + "cache %1, 0x700(%0); cache %1, 0x740(%0); \n\t" \ + "cache %1, 0x780(%0); cache %1, 0x7c0(%0); \n\t" \ + ".set reorder" \ + : \ + : "r" (va), "i" (op) \ + : "memory"); \ +} while (/*CONSTCOND*/0) + +/* * cache_r4k_op_32lines_128: * * Perform the specified cache operation on 32 128-byte Modified: head/sys/mips/mips/cache.c ============================================================================== --- head/sys/mips/mips/cache.c Thu Mar 26 13:31:04 2015 (r280690) +++ head/sys/mips/mips/cache.c Thu Mar 26 14:51:24 2015 (r280691) @@ -104,6 +104,13 @@ mips_config_cache(struct mips_cpuinfo * mips_cache_ops.mco_icache_sync_range_index = mipsNN_icache_sync_range_index_32; break; + case 64: + mips_cache_ops.mco_icache_sync_all = mipsNN_icache_sync_all_64; + mips_cache_ops.mco_icache_sync_range = + mipsNN_icache_sync_range_64; + mips_cache_ops.mco_icache_sync_range_index = + mipsNN_icache_sync_range_index_64; + break; case 128: mips_cache_ops.mco_icache_sync_all = mipsNN_icache_sync_all_128; mips_cache_ops.mco_icache_sync_range = @@ -170,6 +177,21 @@ mips_config_cache(struct mips_cpuinfo * mipsNN_pdcache_wb_range_32; #endif break; + case 64: + mips_cache_ops.mco_pdcache_wbinv_all = + mips_cache_ops.mco_intern_pdcache_wbinv_all = + mipsNN_pdcache_wbinv_all_64; + mips_cache_ops.mco_pdcache_wbinv_range = + mipsNN_pdcache_wbinv_range_64; + mips_cache_ops.mco_pdcache_wbinv_range_index = + mips_cache_ops.mco_intern_pdcache_wbinv_range_index = + mipsNN_pdcache_wbinv_range_index_64; + mips_cache_ops.mco_pdcache_inv_range = + mipsNN_pdcache_inv_range_64; + mips_cache_ops.mco_pdcache_wb_range = + mips_cache_ops.mco_intern_pdcache_wb_range = + mipsNN_pdcache_wb_range_64; + break; case 128: mips_cache_ops.mco_pdcache_wbinv_all = mips_cache_ops.mco_intern_pdcache_wbinv_all = @@ -275,6 +297,18 @@ mips_config_cache(struct mips_cpuinfo * mips_cache_ops.mco_sdcache_wb_range = mipsNN_sdcache_wb_range_32; break; + case 64: + mips_cache_ops.mco_sdcache_wbinv_all = + mipsNN_sdcache_wbinv_all_64; + mips_cache_ops.mco_sdcache_wbinv_range = + mipsNN_sdcache_wbinv_range_64; + mips_cache_ops.mco_sdcache_wbinv_range_index = + mipsNN_sdcache_wbinv_range_index_64; + mips_cache_ops.mco_sdcache_inv_range = + mipsNN_sdcache_inv_range_64; + mips_cache_ops.mco_sdcache_wb_range = + mipsNN_sdcache_wb_range_64; + break; case 128: mips_cache_ops.mco_sdcache_wbinv_all = mipsNN_sdcache_wbinv_all_128; Modified: head/sys/mips/mips/cache_mipsNN.c ============================================================================== --- head/sys/mips/mips/cache_mipsNN.c Thu Mar 26 13:31:04 2015 (r280690) +++ head/sys/mips/mips/cache_mipsNN.c Thu Mar 26 14:51:24 2015 (r280691) @@ -52,6 +52,9 @@ __FBSDID("$FreeBSD$"); #define round_line32(x) (((x) + 31) & ~31) #define trunc_line32(x) ((x) & ~31) +#define round_line64(x) (((x) + 63) & ~63) +#define trunc_line64(x) ((x) & ~63) + #define round_line128(x) (((x) + 127) & ~127) #define trunc_line128(x) ((x) & ~127) @@ -213,6 +216,29 @@ mipsNN_icache_sync_all_32(void) } void +mipsNN_icache_sync_all_64(void) +{ + vm_offset_t va, eva; + + va = MIPS_PHYS_TO_KSEG0(0); + eva = va + picache_size; + + /* + * Since we're hitting the whole thing, we don't have to + * worry about the N different "ways". + */ + + mips_intern_dcache_wbinv_all(); + + while (va < eva) { + cache_r4k_op_32lines_64(va, CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); + va += (32 * 64); + } + + SYNC; +} + +void mipsNN_icache_sync_range_16(vm_offset_t va, vm_size_t size) { vm_offset_t eva; @@ -259,6 +285,29 @@ mipsNN_icache_sync_range_32(vm_offset_t } void +mipsNN_icache_sync_range_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line64(va + size); + va = trunc_line64(va); + + mips_intern_dcache_wb_range(va, (eva - va)); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); + va += 64; + } + + SYNC; +} + +void mipsNN_icache_sync_range_index_16(vm_offset_t va, vm_size_t size) { vm_offset_t eva, tmpva; @@ -345,6 +394,49 @@ mipsNN_icache_sync_range_index_32(vm_off } void +mipsNN_icache_sync_range_index_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva, tmpva; + int i, stride, loopcount; + + /* + * Since we're doing Index ops, we expect to not be able + * to access the address we've been given. So, get the + * bits that determine the cache index, and make a KSEG0 + * address out of them. + */ + va = MIPS_PHYS_TO_KSEG0(va & picache_way_mask); + + eva = round_line64(va + size); + va = trunc_line64(va); + + /* + * GCC generates better code in the loops if we reference local + * copies of these global variables. + */ + stride = picache_stride; + loopcount = picache_loopcount; + + mips_intern_dcache_wbinv_range_index(va, (eva - va)); + + while ((eva - va) >= (8 * 64)) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_r4k_op_8lines_64(tmpva, + CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); + va += 8 * 64; + } + + while (va < eva) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_op_r4k_line(tmpva, + CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); + va += 64; + } +} + +void mipsNN_pdcache_wbinv_all_16(void) { vm_offset_t va, eva; @@ -389,6 +481,28 @@ mipsNN_pdcache_wbinv_all_32(void) } void +mipsNN_pdcache_wbinv_all_64(void) +{ + vm_offset_t va, eva; + + va = MIPS_PHYS_TO_KSEG0(0); + eva = va + pdcache_size; + + /* + * Since we're hitting the whole thing, we don't have to + * worry about the N different "ways". + */ + + while (va < eva) { + cache_r4k_op_32lines_64(va, + CACHE_R4K_D|CACHEOP_R4K_INDEX_WB_INV); + va += (32 * 64); + } + + SYNC; +} + +void mipsNN_pdcache_wbinv_range_16(vm_offset_t va, vm_size_t size) { vm_offset_t eva; @@ -433,6 +547,28 @@ mipsNN_pdcache_wbinv_range_32(vm_offset_ } void +mipsNN_pdcache_wbinv_range_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line64(va + size); + va = trunc_line64(va); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, + CACHE_R4K_D|CACHEOP_R4K_HIT_WB_INV); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB_INV); + va += 64; + } + + SYNC; +} + +void mipsNN_pdcache_wbinv_range_index_16(vm_offset_t va, vm_size_t size) { vm_offset_t eva, tmpva; @@ -513,6 +649,47 @@ mipsNN_pdcache_wbinv_range_index_32(vm_o va += 32; } } + +void +mipsNN_pdcache_wbinv_range_index_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva, tmpva; + int i, stride, loopcount; + + /* + * Since we're doing Index ops, we expect to not be able + * to access the address we've been given. So, get the + * bits that determine the cache index, and make a KSEG0 + * address out of them. + */ + va = MIPS_PHYS_TO_KSEG0(va & pdcache_way_mask); + + eva = round_line64(va + size); + va = trunc_line64(va); + + /* + * GCC generates better code in the loops if we reference local + * copies of these global variables. + */ + stride = pdcache_stride; + loopcount = pdcache_loopcount; + + while ((eva - va) >= (8 * 64)) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_r4k_op_8lines_64(tmpva, + CACHE_R4K_D|CACHEOP_R4K_INDEX_WB_INV); + va += 8 * 64; + } + + while (va < eva) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_op_r4k_line(tmpva, + CACHE_R4K_D|CACHEOP_R4K_INDEX_WB_INV); + va += 64; + } +} void mipsNN_pdcache_inv_range_16(vm_offset_t va, vm_size_t size) @@ -557,6 +734,27 @@ mipsNN_pdcache_inv_range_32(vm_offset_t } void +mipsNN_pdcache_inv_range_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line64(va + size); + va = trunc_line64(va); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, CACHE_R4K_D|CACHEOP_R4K_HIT_INV); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_INV); + va += 64; + } + + SYNC; +} + +void mipsNN_pdcache_wb_range_16(vm_offset_t va, vm_size_t size) { vm_offset_t eva; @@ -598,6 +796,26 @@ mipsNN_pdcache_wb_range_32(vm_offset_t v SYNC; } +void +mipsNN_pdcache_wb_range_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line64(va + size); + va = trunc_line64(va); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB); + va += 64; + } + + SYNC; +} #ifdef CPU_CNMIPS @@ -882,6 +1100,19 @@ mipsNN_sdcache_wbinv_all_32(void) } void +mipsNN_sdcache_wbinv_all_64(void) +{ + vm_offset_t va = MIPS_PHYS_TO_KSEG0(0); + vm_offset_t eva = va + sdcache_size; + + while (va < eva) { + cache_r4k_op_32lines_64(va, + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); + va += (32 * 64); + } +} + +void mipsNN_sdcache_wbinv_range_32(vm_offset_t va, vm_size_t size) { vm_offset_t eva = round_line32(va + size); @@ -901,6 +1132,25 @@ mipsNN_sdcache_wbinv_range_32(vm_offset_ } void +mipsNN_sdcache_wbinv_range_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva = round_line64(va + size); + + va = trunc_line64(va); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, + CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB_INV); + va += 64; + } +} + +void mipsNN_sdcache_wbinv_range_index_32(vm_offset_t va, vm_size_t size) { vm_offset_t eva; @@ -929,6 +1179,34 @@ mipsNN_sdcache_wbinv_range_index_32(vm_o } void +mipsNN_sdcache_wbinv_range_index_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + /* + * Since we're doing Index ops, we expect to not be able + * to access the address we've been given. So, get the + * bits that determine the cache index, and make a KSEG0 + * address out of them. + */ + va = MIPS_PHYS_TO_KSEG0(va & (sdcache_size - 1)); + + eva = round_line64(va + size); + va = trunc_line64(va); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, + CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_INDEX_WB_INV); + va += 64; + } +} + +void mipsNN_sdcache_inv_range_32(vm_offset_t va, vm_size_t size) { vm_offset_t eva = round_line32(va + size); @@ -947,6 +1225,24 @@ mipsNN_sdcache_inv_range_32(vm_offset_t } void +mipsNN_sdcache_inv_range_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva = round_line64(va + size); + + va = trunc_line64(va); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_INV); + va += 64; + } +} + +void mipsNN_sdcache_wb_range_32(vm_offset_t va, vm_size_t size) { vm_offset_t eva = round_line32(va + size); @@ -965,6 +1261,24 @@ mipsNN_sdcache_wb_range_32(vm_offset_t v } void +mipsNN_sdcache_wb_range_64(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva = round_line64(va + size); + + va = trunc_line64(va); + + while ((eva - va) >= (32 * 64)) { + cache_r4k_op_32lines_64(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); + va += (32 * 64); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_SD|CACHEOP_R4K_HIT_WB); + va += 64; + } +} + +void mipsNN_sdcache_wbinv_all_128(void) { vm_offset_t va = MIPS_PHYS_TO_KSEG0(0); From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 14:55:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 976FC8BB; Thu, 26 Mar 2015 14:55:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68F313DF; Thu, 26 Mar 2015 14:55:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QEtNBb014730; Thu, 26 Mar 2015 14:55:23 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QEtNqv014729; Thu, 26 Mar 2015 14:55:23 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201503261455.t2QEtNqv014729@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 26 Mar 2015 14:55:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280692 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 14:55:23 -0000 Author: jhibbits Date: Thu Mar 26 14:55:22 2015 New Revision: 280692 URL: https://svnweb.freebsd.org/changeset/base/280692 Log: Make several modules unconditionally built, there's no need for them to be hidden. These modules pass a tinderbox build. Discussed with: ian and others MFC after: 1 month Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Mar 26 14:51:24 2015 (r280691) +++ head/sys/modules/Makefile Thu Mar 26 14:55:22 2015 (r280692) @@ -108,7 +108,7 @@ SUBDIR= \ ${_et} \ ${_ex} \ ${_exca} \ - ${_ext2fs} \ + ext2fs \ ${_fatm} \ fdc \ fdescfs \ @@ -132,7 +132,7 @@ SUBDIR= \ ${_hptrr} \ hwpmc \ ${_hyperv} \ - ${_i2c} \ + i2c \ ${_ibcore} \ ${_ibcs2} \ ${_ichwd} \ @@ -315,11 +315,11 @@ SUBDIR= \ siis \ sis \ sk \ - ${_smbfs} \ + smbfs \ sn \ ${_snc} \ snp \ - ${_sound} \ + sound \ ${_speaker} \ ${_splash} \ ${_sppp} \ @@ -498,10 +498,8 @@ _em= em _ep= ep _et= et _exca= exca -_ext2fs= ext2fs _fe= fe _filemon= filemon -_i2c= i2c .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ibcore= ibcore .endif @@ -530,8 +528,6 @@ _rdma= rdma _safe= safe _scsi_low= scsi_low _si= si -_smbfs= smbfs -_sound= sound _speaker= speaker _splash= splash _sppp= sppp @@ -688,7 +684,6 @@ _snc= snc .if ${MACHINE_CPUARCH} == "arm" _cfi= cfi _cpsw= cpsw -_sound= sound .endif .if ${MACHINE_CPUARCH} == "powerpc" @@ -709,14 +704,11 @@ _nvram= powermac_nvram _opensolaris= opensolaris .endif _pccard= pccard -_smbfs= smbfs -_sound= sound _wi= wi .endif .if ${MACHINE_ARCH} == "powerpc64" _drm2= drm2 -_i2c= i2c .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs .endif @@ -726,13 +718,10 @@ _zfs= zfs _auxio= auxio _em= em _epic= epic -_i2c= i2c _igb= igb .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris .endif -_smbfs= smbfs -_sound= sound .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs .endif From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 15:27:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16DC05A5; Thu, 26 Mar 2015 15:27:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02D049C5; Thu, 26 Mar 2015 15:27:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QFRdcU029241; Thu, 26 Mar 2015 15:27:39 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QFRdCC029240; Thu, 26 Mar 2015 15:27:39 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201503261527.t2QFRdCC029240@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 26 Mar 2015 15:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280696 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 15:27:40 -0000 Author: kp Date: Thu Mar 26 15:27:38 2015 New Revision: 280696 URL: https://svnweb.freebsd.org/changeset/base/280696 Log: Add myself (kp) to committers-src.dot Approved by: philip (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Thu Mar 26 15:25:01 2015 (r280695) +++ head/share/misc/committers-src.dot Thu Mar 26 15:27:38 2015 (r280696) @@ -211,6 +211,7 @@ kensmith [label="Ken Smith\nkensmith@Fre kevlo [label="Kevin Lo\nkevlo@FreeBSD.org\n2006/07/23"] kib [label="Konstantin Belousov\nkib@FreeBSD.org\n2006/06/03"] kmacy [label="Kip Macy\nkmacy@FreeBSD.org\n2005/06/01"] +kp [label="Kristof Provost\nkp@FreeBSD.org\n2015/03/22"] le [label="Lukas Ertl\nle@FreeBSD.org\n2004/02/02"] loos [label="Luiz Otavio O Souza\nloos@FreeBSD.org\n2013/07/03"] lstewart [label="Lawrence Stewart\nlstewart@FreeBSD.org\n2008/10/06"] @@ -446,6 +447,7 @@ gnn -> np gnn -> davide gnn -> arybchik gnn -> erj +gnn -> kp grehan -> bryanv @@ -624,6 +626,7 @@ philip -> ed philip -> jls philip -> matteo philip -> uqs +philip -> kp phk -> jkoshy phk -> mux From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 15:40:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 095E7BD3; Thu, 26 Mar 2015 15:40:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8462BAF; Thu, 26 Mar 2015 15:40:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QFenfV037705; Thu, 26 Mar 2015 15:40:49 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QFem4u037702; Thu, 26 Mar 2015 15:40:48 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201503261540.t2QFem4u037702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Thu, 26 Mar 2015 15:40:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280697 - head/usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 15:40:50 -0000 Author: rrs Date: Thu Mar 26 15:40:47 2015 New Revision: 280697 URL: https://svnweb.freebsd.org/changeset/base/280697 Log: Update the manual page to be a bit more sane. It still may need some work, but at least now it will read properly. (gnn you are still on the hook to help out with this like you committed). Sponsored by: Netflix. Added: head/usr.sbin/pmcstudy/pmcstudy.8 (contents, props changed) Deleted: head/usr.sbin/pmcstudy/pmcstudy.1 Modified: head/usr.sbin/pmcstudy/Makefile head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/Makefile ============================================================================== --- head/usr.sbin/pmcstudy/Makefile Thu Mar 26 15:27:38 2015 (r280696) +++ head/usr.sbin/pmcstudy/Makefile Thu Mar 26 15:40:47 2015 (r280697) @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= pmcstudy +MAN= pmcstudy.8 SRCS= pmcstudy.c eval_expr.c CFLAGS+= -Wall -Werror Added: head/usr.sbin/pmcstudy/pmcstudy.8 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:40:47 2015 (r280697) @@ -0,0 +1,131 @@ +.\" Copyright (c) 2015 +.\" Netflix Inc. +.\" +.\" 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 REGENTS 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 REGENTS 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 Mar 26, 2015 +.Dt PMCSTUDY 1 +.Os +.Sh NAME +.Nm pmcstudy +.Nd Perform various study's on a systems overall PMC's. +.Sh SYNOPSIS +.Nm +.Oo Fl i Ar inputfile | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc +.Nm +.Fl i Ar inputfile +.Nm +.Fl v +.Nm +.Fl m Ar max +.Nm +.Fl e Ar exp-name +.Nm +.Fl E Ar your-expr +.Nm +.Fl h +.Nm +.Fl H +.Nm +.Fl T +.Sh DESCRIPTION +The +.Nm +program is designed to run various tests against your systems +performance. There are roughly 20-22 canned tests that setup specific +PMC's and then run various formulas on the output information. +These formulas can be found in Intel documentation "Using Intel Vtune +amplifier xe on NNN Generation Intel Core Processors". The NNN is either +2nd, 3rd or 4th generation i.e. Sandy Bridge, Ivy Bridge and Haswell. +Currently the program only works on these three Intel processor types. +.Sh OPTIONS +The following options are available: +.Bl -tag -width indent +.It Fl i Ar filename +If this option is supplied, instead of running a +.Xr pmcstat 8 +command to collecte the current running information the filename will be read +in as input instead. +.It Fl H +This option will display the complete list of canned formulas that can be run including +there names which can be input to the +.Fl e +option. +.It Fl e Ar name +Execute the canned test +.Ar name +on the running kernel. +.It Fl h +If you add this option to the +.Fl e +option the test will not execute but instead give you a small description +of the test that would run. +.It Fl T +This option will execute a test of every PMC to validate that they are working +on your system. If a PMC does not show up in this test chances +are the kernel hwpmc driver needs updating with new PMC information. +.It Fl m Ar num +This option can restrict the number of one second samples that will +be collected by your system when running a test (it bounds the +time the test will run). Without this option the test will run +for 1024 seconds or until the user types ctrl-c. +.It Fl v +The verbose option adds debugging output to the command. +.It Fl E Ar expression +This option can be used by those that have there own ideas +on what formulas that you want to run. The expression given to +the +.Fl E +option is a "formula". The formula can declare directly the PMC's by name +or you can use an abbreviation %NNN. To find out the abbreviations +on your system you may run the +.Fl L +option. +An example of a formula of your own might be +.Fl E +"FP_ASSIST.ANY / INST_RETIRED.ANY_P" or using the abbreviations on a +Haswell machine you would type +.Fl E +" %176 / %150". You must have spaces between each entry and +you may use paraenthisis to prioritize the operators. Add (+), Subtract (-), +Divide (/) and Multiplication (*) are supported. You may also introduce +constant numbers as well. So for example you can do a standard efficency +test like +.FL E +"UOPS_RETIRED.RETIRE_SLOTS / (4 * CPU_CLK_UNHALTED.THREAD_P)". + +.It Fl L +This option will list all known PMC's and there abbreviation (%NNN). +.Sh SEE ALSO +.Xr pmc 3 , +.Xr pmclog 3 , +.Xr hwpmc 4 , +.Xr pmcstat 8 , +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 11.0. +.Sh AUTHORS +.An Randall Stewart Aq Mt rrs@FreeBSD.org Modified: head/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.c Thu Mar 26 15:27:38 2015 (r280696) +++ head/usr.sbin/pmcstudy/pmcstudy.c Thu Mar 26 15:40:47 2015 (r280697) @@ -2139,7 +2139,11 @@ test_for_a_pmc(const char *pmc, int out_ printf(" "); } } - printf("%s", &line[j]); + if (len) { + printf("%s", &line[j]); + } else { + printf("\n"); + } goto out; } } From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 15:43:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E100ADC0; Thu, 26 Mar 2015 15:43:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC9E3C87; Thu, 26 Mar 2015 15:43:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QFhwAY038104; Thu, 26 Mar 2015 15:43:58 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QFhwpT038102; Thu, 26 Mar 2015 15:43:58 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201503261543.t2QFhwpT038102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Thu, 26 Mar 2015 15:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280698 - head/usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 15:43:59 -0000 Author: rrs Date: Thu Mar 26 15:43:57 2015 New Revision: 280698 URL: https://svnweb.freebsd.org/changeset/base/280698 Log: Opps its section 8 not 1 silly. MFC after: 3 days Sponsored by: Netflix Modified: head/usr.sbin/pmcstudy/pmcstudy.8 Modified: head/usr.sbin/pmcstudy/pmcstudy.8 ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:40:47 2015 (r280697) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:43:57 2015 (r280698) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd Mar 26, 2015 -.Dt PMCSTUDY 1 +.Dt PMCSTUDY 8 .Os .Sh NAME .Nm pmcstudy From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 15:54:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2564030D; Thu, 26 Mar 2015 15:54:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 064E3DBD; Thu, 26 Mar 2015 15:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QFstd7043095; Thu, 26 Mar 2015 15:54:55 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QFstDh043094; Thu, 26 Mar 2015 15:54:55 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201503261554.t2QFstDh043094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Thu, 26 Mar 2015 15:54:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280699 - head/usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 15:54:56 -0000 Author: brueffer Date: Thu Mar 26 15:54:54 2015 New Revision: 280699 URL: https://svnweb.freebsd.org/changeset/base/280699 Log: Rough first mdoc, spelling and grammar cleanup pass. Modified: head/usr.sbin/pmcstudy/pmcstudy.8 Modified: head/usr.sbin/pmcstudy/pmcstudy.8 ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:43:57 2015 (r280698) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:54:54 2015 (r280699) @@ -29,14 +29,14 @@ .Os .Sh NAME .Nm pmcstudy -.Nd Perform various study's on a systems overall PMC's. +.Nd Perform various studies on a system's overall PMCs. .Sh SYNOPSIS .Nm .Oo Fl i Ar inputfile | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc -.Nm -.Fl i Ar inputfile .Nm -.Fl v +.Fl i Ar inputfile +.Nm +.Fl v .Nm .Fl m Ar max .Nm @@ -53,23 +53,25 @@ The .Nm program is designed to run various tests against your systems -performance. There are roughly 20-22 canned tests that setup specific -PMC's and then run various formulas on the output information. +performance. +There are roughly 20-22 canned tests that setup specific +PMCs and then run various formulas on the output information. These formulas can be found in Intel documentation "Using Intel Vtune -amplifier xe on NNN Generation Intel Core Processors". The NNN is either -2nd, 3rd or 4th generation i.e. Sandy Bridge, Ivy Bridge and Haswell. +amplifier xe on NNN Generation Intel Core Processors". +The NNN is either +2nd, 3rd or 4th generation i.e., Sandy Bridge, Ivy Bridge and Haswell. Currently the program only works on these three Intel processor types. .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl i Ar filename If this option is supplied, instead of running a -.Xr pmcstat 8 -command to collecte the current running information the filename will be read +.Xr pmcstat 8 +command to collect the current running information the filename will be read in as input instead. .It Fl H This option will display the complete list of canned formulas that can be run including -there names which can be input to the +their names which can be input to the .Fl e option. .It Fl e Ar name @@ -83,22 +85,28 @@ option the test will not execute but ins of the test that would run. .It Fl T This option will execute a test of every PMC to validate that they are working -on your system. If a PMC does not show up in this test chances -are the kernel hwpmc driver needs updating with new PMC information. +on your system. +If a PMC does not show up in this test chances +are the kernel +.Xr hwpmc 4 +driver needs updating with new PMC information. .It Fl m Ar num This option can restrict the number of one second samples that will be collected by your system when running a test (it bounds the -time the test will run). Without this option the test will run +time the test will run). +Without this option the test will run for 1024 seconds or until the user types ctrl-c. .It Fl v The verbose option adds debugging output to the command. .It Fl E Ar expression -This option can be used by those that have there own ideas -on what formulas that you want to run. The expression given to -the +This option can be used by those that have their own ideas +on what formulas they want to run. +The expression given to the .Fl E -option is a "formula". The formula can declare directly the PMC's by name -or you can use an abbreviation %NNN. To find out the abbreviations +option is a "formula". +The formula can declare directly the PMCs by name +or you can use an abbreviation %NNN. +To find out the abbreviations on your system you may run the .Fl L option. @@ -107,21 +115,25 @@ An example of a formula of your own migh "FP_ASSIST.ANY / INST_RETIRED.ANY_P" or using the abbreviations on a Haswell machine you would type .Fl E -" %176 / %150". You must have spaces between each entry and -you may use paraenthisis to prioritize the operators. Add (+), Subtract (-), -Divide (/) and Multiplication (*) are supported. You may also introduce -constant numbers as well. So for example you can do a standard efficency +" %176 / %150". +You must have spaces between each entry and +you may use parentheses to prioritize the operators. +Add (+), Subtract (-), +Divide (/) and Multiplication (*) are supported. +You may also introduce +constant numbers. +For example you can do a standard efficency test like -.FL E +.Fl E "UOPS_RETIRED.RETIRE_SLOTS / (4 * CPU_CLK_UNHALTED.THREAD_P)". - .It Fl L -This option will list all known PMC's and there abbreviation (%NNN). +This option will list all known PMCs and their abbreviation (%NNN). +.El .Sh SEE ALSO .Xr pmc 3 , .Xr pmclog 3 , .Xr hwpmc 4 , -.Xr pmcstat 8 , +.Xr pmcstat 8 .Sh HISTORY The .Nm From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 16:00:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82DC8681; Thu, 26 Mar 2015 16:00:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56453EDA; Thu, 26 Mar 2015 16:00:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QG0aI5045102; Thu, 26 Mar 2015 16:00:36 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QG0as2045101; Thu, 26 Mar 2015 16:00:36 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503261600.t2QG0as2045101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 26 Mar 2015 16:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280700 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 16:00:36 -0000 Author: pfg Date: Thu Mar 26 16:00:35 2015 New Revision: 280700 URL: https://svnweb.freebsd.org/changeset/base/280700 Log: Introduce some allocation function attributes. Bring support for two gcc function attributes that are likely to be used in our system headers: __alloc_size The alloc_size attribute is used to tell the compiler that the function return value points to memory, where the size is given by one or two of the functions parameters. __result_use_check Causes a warning to be emitted if a caller of the function with this attribute does not use its return value. This is known in gcc as "warn_unused_result" but we considered the original naming unsuitable for an attribute. The __alloc_size attribute required some workarounds for lint(1). Both attributes are supported by clang. Also see: D2107 MFC after: 3 days Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Thu Mar 26 15:54:54 2015 (r280699) +++ head/sys/sys/cdefs.h Thu Mar 26 16:00:35 2015 (r280700) @@ -40,6 +40,9 @@ * Testing against Clang-specific extensions. */ +#ifndef __has_attribute +#define __has_attribute(x) 0 +#endif #ifndef __has_extension #define __has_extension __has_feature #endif @@ -209,6 +212,7 @@ #define __unused #define __packed #define __aligned(x) +#define __alloc_size(...) #define __section(x) #define __weak #else @@ -233,6 +237,11 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) +#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) +#else +#define __alloc_size(...) +#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) @@ -242,7 +251,7 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#endif +#endif /* lint */ #if !__GNUC_PREREQ__(2, 95) #define __alignof(x) __offsetof(struct { char __a; x __b; }, __b) @@ -363,8 +372,10 @@ #if __GNUC_PREREQ__(3, 4) #define __fastcall __attribute__((__fastcall__)) +#define __result_use_check __attribute__((__warn_unused_result__)) #else #define __fastcall +#define __result_use_check #endif #if __GNUC_PREREQ__(4, 1) From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 17:13:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAE5FB9F; Thu, 26 Mar 2015 17:13:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6CDCA0F; Thu, 26 Mar 2015 17:13:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QHDCOl081061; Thu, 26 Mar 2015 17:13:12 GMT (envelope-from kp@FreeBSD.org) Received: (from kp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QHDCBY081060; Thu, 26 Mar 2015 17:13:12 GMT (envelope-from kp@FreeBSD.org) Message-Id: <201503261713.t2QHDCBY081060@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kp set sender to kp@FreeBSD.org using -f From: Kristof Provost Date: Thu, 26 Mar 2015 17:13:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280701 - head/usr.bin/ministat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 17:13:12 -0000 Author: kp Date: Thu Mar 26 17:13:11 2015 New Revision: 280701 URL: https://svnweb.freebsd.org/changeset/base/280701 Log: Clarify the ministat default width The man page states that: '-w width Width of ASCII-art plot in characters, default is 74.' This is not entirely correct. The mini-help is more accurate: '-w : width of graph/test output (default 74 or terminal width)' In other words: the man page fails to explain that ministat will default to the terminal width, not 74. It will only fall back to 74 if stdout is not a TTY. Submitted by: Ben Hutchings Approved by: philip (mentor) Modified: head/usr.bin/ministat/ministat.1 Modified: head/usr.bin/ministat/ministat.1 ============================================================================== --- head/usr.bin/ministat/ministat.1 Thu Mar 26 16:00:35 2015 (r280700) +++ head/usr.bin/ministat/ministat.1 Thu Mar 26 17:13:11 2015 (r280701) @@ -68,7 +68,9 @@ See .Xr strtok 3 for details. .It Fl w Ar width -Width of ASCII-art plot in characters, default is 74. +Width of ASCII-art plot in characters. +The default is the terminal width, or 74 if standard output is not a +terminal. .El .Pp A sample output could look like this: From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 17:21:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D662DB9; Thu, 26 Mar 2015 17:21:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89554A7A; Thu, 26 Mar 2015 17:21:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QHLD7b083020; Thu, 26 Mar 2015 17:21:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QHLDCB083019; Thu, 26 Mar 2015 17:21:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503261721.t2QHLDCB083019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 26 Mar 2015 17:21:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280702 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 17:21:13 -0000 Author: mav Date: Thu Mar 26 17:21:12 2015 New Revision: 280702 URL: https://svnweb.freebsd.org/changeset/base/280702 Log: Make swapper release orphaned (lost) GEOM provider. Swap device is still reported as enabled, and system still may crash later if some swapped-out kernel pages were lost with the device, but at least GEOM and CAM can now release the lost disk, allowing it to be reconnected. MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Thu Mar 26 17:13:11 2015 (r280701) +++ head/sys/vm/swap_pager.c Thu Mar 26 17:21:12 2015 (r280702) @@ -2563,18 +2563,42 @@ DECLARE_GEOM_CLASS(g_swap_class, g_class static void +swapgeom_close_ev(void *arg, int flags) +{ + struct g_consumer *cp; + + cp = arg; + g_access(cp, -1, -1, 0); + g_detach(cp); + g_destroy_consumer(cp); +} + +static void swapgeom_done(struct bio *bp2) { + struct swdevt *sp; struct buf *bp; + struct g_consumer *cp; + int destroy; bp = bp2->bio_caller2; + cp = bp2->bio_from; bp->b_ioflags = bp2->bio_flags; if (bp2->bio_error) bp->b_ioflags |= BIO_ERROR; bp->b_resid = bp->b_bcount - bp2->bio_completed; bp->b_error = bp2->bio_error; bufdone(bp); + mtx_lock(&sw_dev_mtx); + destroy = ((--cp->index) == 0 && cp->private); + if (destroy) { + sp = bp2->bio_caller1; + sp->sw_id = NULL; + } + mtx_unlock(&sw_dev_mtx); g_destroy_bio(bp2); + if (destroy) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } static void @@ -2583,13 +2607,17 @@ swapgeom_strategy(struct buf *bp, struct struct bio *bio; struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); cp = sp->sw_id; if (cp == NULL) { + mtx_unlock(&sw_dev_mtx); bp->b_error = ENXIO; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return; } + cp->index++; + mtx_unlock(&sw_dev_mtx); if (bp->b_iocmd == BIO_WRITE) bio = g_new_bio(); else @@ -2601,6 +2629,7 @@ swapgeom_strategy(struct buf *bp, struct return; } + bio->bio_caller1 = sp; bio->bio_caller2 = bp; bio->bio_cmd = bp->b_iocmd; bio->bio_offset = (bp->b_blkno - sp->sw_first) * PAGE_SIZE; @@ -2624,31 +2653,36 @@ static void swapgeom_orphan(struct g_consumer *cp) { struct swdevt *sp; + int destroy; mtx_lock(&sw_dev_mtx); - TAILQ_FOREACH(sp, &swtailq, sw_list) - if (sp->sw_id == cp) + TAILQ_FOREACH(sp, &swtailq, sw_list) { + if (sp->sw_id == cp) { sp->sw_flags |= SW_CLOSING; + break; + } + } + cp->private = (void *)(uintptr_t)1; + destroy = ((sp != NULL) && (cp->index == 0)); + if (destroy) + sp->sw_id = NULL; mtx_unlock(&sw_dev_mtx); -} - -static void -swapgeom_close_ev(void *arg, int flags) -{ - struct g_consumer *cp; - - cp = arg; - g_access(cp, -1, -1, 0); - g_detach(cp); - g_destroy_consumer(cp); + if (destroy) + swapgeom_close_ev(cp, 0); } static void swapgeom_close(struct thread *td, struct swdevt *sw) { + struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); + cp = sw->sw_id; + sw->sw_id = NULL; + mtx_unlock(&sw_dev_mtx); /* XXX: direct call when Giant untangled */ - g_waitfor_event(swapgeom_close_ev, sw->sw_id, M_WAITOK, NULL); + if (cp != NULL) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } @@ -2689,6 +2723,8 @@ swapongeom_ev(void *arg, int flags) if (gp == NULL) gp = g_new_geomf(&g_swap_class, "swap"); cp = g_new_consumer(gp); + cp->index = 0; /* Number of active I/Os. */ + cp->private = NULL; /* Orphanization flag */ g_attach(cp, pp); /* * XXX: Everytime you think you can improve the margin for From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 17:29:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6AC641E8; Thu, 26 Mar 2015 17:29:41 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (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 07513BF8; Thu, 26 Mar 2015 17:29:41 +0000 (UTC) Received: by wibgn9 with SMTP id gn9so95661410wib.1; Thu, 26 Mar 2015 10:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=BkjcZFiCCkFb0Qz+DRyZ5qrx6wefgMhIlq4aIqAFMqo=; b=bfzBDibo1Dk33AC0vmOHLPZ0nc74TlwLsvxpf7vBI0Mb5RcWQh166BVg5Yqz0ZFrDY GjcsgJfKd3A7hLWnlAOGWQmmjvuGrH6Jf2Gm95uRDiUvwXE8NKMQil/XbhA35sOuBLlG qId4Wi0EMRHeDfOk5KTyQRoGKHY0b19A6u0ozVbEhTjoLjW9/6s4g/gse8auLzy7n8uZ 8a1jrGUI8tRxAcsNnNXXuoCXKddi6FHLmsOm0h9xQHq24wS2UGItdCJTFa7dsQMhq/t0 OYJ8OOLCQVjfLperXVOrfwimL8eHkRw/Df6COetSyvfhFNMnh75xW8lPGnghRz7VbInt Y1WA== X-Received: by 10.194.110.233 with SMTP id id9mr30370556wjb.136.1427390979539; Thu, 26 Mar 2015 10:29:39 -0700 (PDT) Received: from brick.home (evj112.neoplus.adsl.tpnet.pl. [83.20.207.112]) by mx.google.com with ESMTPSA id dc9sm26227454wib.9.2015.03.26.10.29.38 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Mar 2015 10:29:38 -0700 (PDT) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Thu, 26 Mar 2015 18:29:36 +0100 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: =?iso-8859-1?Q?Jean-S=E9bastien_P=E9dron?= Subject: Re: svn commit: r280183 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/drm2/ttm modules modules/drm2 modules/drm2/drm2 modules/drm2/radeonkms Message-ID: <20150326172936.GA3999@brick.home> Mail-Followup-To: =?iso-8859-1?Q?Jean-S=E9bastien_P=E9dron?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201503171850.t2HIoYJr045422@svn.freebsd.org> <20150317202954.GA8030@brick.home> <5508A468.9050802@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5508A468.9050802@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 17:29:41 -0000 On 0317T2302, Jean-Sébastien Pédron wrote: > On 17.03.2015 21:29, Edward Tomasz NapieraÅ‚a wrote: > >> o Support for the setmaster/dropmaster ioctls. For instance, they > >> are used to run multiple X servers simultaneously. > > > > Does it fix fast user switching in Xorg/GNOME, by any chance? > > Maybe, I don't know how this works in GNOME. But as long as it relies on > two X sessions running at the same time, then yes it surely helps. I've just tested, and user switching in GNOME works now. Yay! From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 17:51:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0C9BC8D; Thu, 26 Mar 2015 17:51:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB60DEC6; Thu, 26 Mar 2015 17:51:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QHpCo2098072; Thu, 26 Mar 2015 17:51:12 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QHpCWM098071; Thu, 26 Mar 2015 17:51:12 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503261751.t2QHpCWM098071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 26 Mar 2015 17:51: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: r280703 - stable/10/sys/modules/drm2 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 17:51:12 -0000 Author: emaste Date: Thu Mar 26 17:51:11 2015 New Revision: 280703 URL: https://svnweb.freebsd.org/changeset/base/280703 Log: MFC r270572: drm/i915: Disable the build of i915 on PC98 This module is of no use on this platform. Modified: stable/10/sys/modules/drm2/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/modules/drm2/Makefile ============================================================================== --- stable/10/sys/modules/drm2/Makefile Thu Mar 26 17:21:12 2015 (r280702) +++ stable/10/sys/modules/drm2/Makefile Thu Mar 26 17:51:11 2015 (r280703) @@ -3,6 +3,7 @@ .include .if ${MACHINE_CPUARCH} == "amd64" +_i915kms= i915kms _radeonkms= radeonkms . if ${MK_SOURCELESS_UCODE} != "no" _radeonkmsfw= radeonkmsfw @@ -11,6 +12,7 @@ _radeonkmsfw= radeonkmsfw .if ${MACHINE_CPUARCH} == "i386" . if ${MACHINE} != "pc98" +_i915kms= i915kms _radeonkms= radeonkms . if ${MK_SOURCELESS_UCODE} != "no" _radeonkmsfw= radeonkmsfw @@ -20,7 +22,7 @@ _radeonkmsfw= radeonkmsfw SUBDIR = \ drm2 \ - i915kms \ + ${_i915kms} \ ${_radeonkms} \ ${_radeonkmsfw} From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 18:25:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82107AA1; Thu, 26 Mar 2015 18:25:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D5C5389; Thu, 26 Mar 2015 18:25:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QIPsrw014818; Thu, 26 Mar 2015 18:25:54 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QIPsMO014817; Thu, 26 Mar 2015 18:25:54 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503261825.t2QIPsMO014817@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 26 Mar 2015 18:25:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280704 - head/contrib/gcc/config/aarch64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 18:25:54 -0000 Author: andrew Date: Thu Mar 26 18:25:53 2015 New Revision: 280704 URL: https://svnweb.freebsd.org/changeset/base/280704 Log: Also define DWARF_FRAME_REGISTERS. This is used to size arrays, without this exceptions could write over the stack. Sponsored by: The FreeBSD Foundation Modified: head/contrib/gcc/config/aarch64/aarch64.h Modified: head/contrib/gcc/config/aarch64/aarch64.h ============================================================================== --- head/contrib/gcc/config/aarch64/aarch64.h Thu Mar 26 17:51:11 2015 (r280703) +++ head/contrib/gcc/config/aarch64/aarch64.h Thu Mar 26 18:25:53 2015 (r280704) @@ -1,3 +1,3 @@ -/* $FreeBSD */ #define FIRST_PSEUDO_REGISTER 67 +#define DWARF_FRAME_REGISTERS 97 From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 18:44:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E18C3ED; Thu, 26 Mar 2015 18:44:54 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D102A7CB; Thu, 26 Mar 2015 18:44:52 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2QIihMb018841 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 26 Mar 2015 21:44:43 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2QIigvX018840; Thu, 26 Mar 2015 21:44:42 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 26 Mar 2015 21:44:42 +0300 From: Gleb Smirnoff To: Randall Stewart Subject: Re: svn commit: r280697 - head/usr.sbin/pmcstudy Message-ID: <20150326184442.GM64665@FreeBSD.org> References: <201503261540.t2QFem4u037702@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503261540.t2QFem4u037702@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 18:44:55 -0000 Randall, On Thu, Mar 26, 2015 at 03:40:48PM +0000, Randall Stewart wrote: R> Added: R> head/usr.sbin/pmcstudy/pmcstudy.8 (contents, props changed) R> Deleted: R> head/usr.sbin/pmcstudy/pmcstudy.1 Now you need to add pmcstudy.1 to ObsoleteFiles.inc. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 18:45:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4591A229; Thu, 26 Mar 2015 18:45:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 312617CD; Thu, 26 Mar 2015 18:45:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QIixqx023958; Thu, 26 Mar 2015 18:44:59 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QIixAN023957; Thu, 26 Mar 2015 18:44:59 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503261844.t2QIixAN023957@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 26 Mar 2015 18: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: r280705 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 18:45:00 -0000 Author: ae Date: Thu Mar 26 18:44:59 2015 New Revision: 280705 URL: https://svnweb.freebsd.org/changeset/base/280705 Log: MFC r280236: To avoid a possible race, release the reference to ifa after return from nd6_dad_na_input(). Modified: stable/10/sys/netinet6/nd6_nbr.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/10/sys/netinet6/nd6_nbr.c Thu Mar 26 18:25:53 2015 (r280704) +++ stable/10/sys/netinet6/nd6_nbr.c Thu Mar 26 18:44:59 2015 (r280705) @@ -700,8 +700,8 @@ nd6_na_input(struct mbuf *m, int off, in */ if (ifa && (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE)) { - ifa_free(ifa); nd6_dad_na_input(ifa); + ifa_free(ifa); goto freeit; } From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 18:45:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA26637A; Thu, 26 Mar 2015 18:45:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A58987E1; Thu, 26 Mar 2015 18:45:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QIjqJm024173; Thu, 26 Mar 2015 18:45:52 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QIjqvw024172; Thu, 26 Mar 2015 18:45:52 GMT (envelope-from np@FreeBSD.org) Message-Id: <201503261845.t2QIjqvw024172@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Thu, 26 Mar 2015 18:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280706 - head/sys/dev/cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 18:45:52 -0000 Author: np Date: Thu Mar 26 18:45:51 2015 New Revision: 280706 URL: https://svnweb.freebsd.org/changeset/base/280706 Log: cxgbe(4): provide the exact RSS hash type instead of a catch-all value to the upper layers. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c ============================================================================== --- head/sys/dev/cxgbe/t4_sge.c Thu Mar 26 18:44:59 2015 (r280705) +++ head/sys/dev/cxgbe/t4_sge.c Thu Mar 26 18:45:51 2015 (r280706) @@ -1736,6 +1736,12 @@ t4_eth_rx(struct sge_iq *iq, const struc #if defined(INET) || defined(INET6) struct lro_ctrl *lro = &rxq->lro; #endif + static const int sw_hashtype[4][2] = { + {M_HASHTYPE_NONE, M_HASHTYPE_NONE}, + {M_HASHTYPE_RSS_IPV4, M_HASHTYPE_RSS_IPV6}, + {M_HASHTYPE_RSS_TCP_IPV4, M_HASHTYPE_RSS_TCP_IPV6}, + {M_HASHTYPE_RSS_UDP_IPV4, M_HASHTYPE_RSS_UDP_IPV6}, + }; KASSERT(m0 != NULL, ("%s: no payload with opcode %02x", __func__, rss->opcode)); @@ -1745,7 +1751,7 @@ t4_eth_rx(struct sge_iq *iq, const struc m0->m_data += fl_pktshift; m0->m_pkthdr.rcvif = ifp; - M_HASHTYPE_SET(m0, M_HASHTYPE_OPAQUE); + M_HASHTYPE_SET(m0, sw_hashtype[rss->hash_type][rss->ipv6]); m0->m_pkthdr.flowid = be32toh(rss->hash_val); if (cpl->csum_calc && !cpl->err_vec) { From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 18:51:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7297562; Thu, 26 Mar 2015 18:51:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1EB6819; Thu, 26 Mar 2015 18:51:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QIp1RP025516; Thu, 26 Mar 2015 18:51:01 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QIp1r7025514; Thu, 26 Mar 2015 18:51:01 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503261851.t2QIp1r7025514@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 26 Mar 2015 18:51:01 +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: r280707 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 18:51:02 -0000 Author: ae Date: Thu Mar 26 18:51:00 2015 New Revision: 280707 URL: https://svnweb.freebsd.org/changeset/base/280707 Log: MFC r280236: To avoid a possible race, release the reference to ifa after return from nd6_dad_na_input(). Modified: stable/9/sys/netinet6/nd6_nbr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/9/sys/netinet6/nd6_nbr.c Thu Mar 26 18:45:51 2015 (r280706) +++ stable/9/sys/netinet6/nd6_nbr.c Thu Mar 26 18:51:00 2015 (r280707) @@ -696,8 +696,8 @@ nd6_na_input(struct mbuf *m, int off, in */ if (ifa && (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE)) { - ifa_free(ifa); nd6_dad_na_input(ifa); + ifa_free(ifa); goto freeit; } From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 19:33:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 53F46179; Thu, 26 Mar 2015 19:33:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2509BD2B; Thu, 26 Mar 2015 19:33:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QJX8qD047484; Thu, 26 Mar 2015 19:33:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QJX8A2047483; Thu, 26 Mar 2015 19:33:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503261933.t2QJX8A2047483@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 26 Mar 2015 19:33:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280709 - head/sys/arm/mv/armadaxp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 19:33:08 -0000 Author: ian Date: Thu Mar 26 19:33:07 2015 New Revision: 280709 URL: https://svnweb.freebsd.org/changeset/base/280709 Log: Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying the startup trampoline code. The old code allocated a kva page, mapped it using using pmap_kenter_nocache(), then freed the kva without destroying the mapping. This is the only use of pmap_kenter_nocache() in the system, so redoing this one use of allows it to be garbage collected in the near future. Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c ============================================================================== --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Thu Mar 26 19:13:54 2015 (r280708) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Thu Mar 26 19:33:07 2015 (r280709) @@ -106,7 +106,7 @@ void platform_mp_start_ap(void) { uint32_t reg, *src, *dst, cpu_num, div_val, cputype; - vm_offset_t smp_boot, pmu_boot_off; + vm_offset_t pmu_boot_off; /* * Initialization procedure depends on core revision, * in this step CHIP ID is checked to choose proper procedure @@ -114,22 +114,18 @@ platform_mp_start_ap(void) cputype = cpufunc_id(); cputype &= CPU_ID_CPU_MASK; - smp_boot = kva_alloc(PAGE_SIZE); - pmap_kenter_nocache(smp_boot, 0xffff0000); - dst = (uint32_t *) smp_boot; /* * Set the PA of CPU0 Boot Address Redirect register used in * mptramp according to the actual SoC registers' base address. */ pmu_boot_off = (CPU_PMU(0) - MV_BASE) + CPU_PMU_BOOT; mptramp_pmu_boot = fdt_immr_pa + pmu_boot_off; - + dst = pmap_mapdev(0xffff0000, PAGE_SIZE); for (src = (uint32_t *)mptramp; src < (uint32_t *)mptramp_end; src++, dst++) { *dst = *src; } - kva_free(smp_boot, PAGE_SIZE); - + pmap_unmapdev((vm_offset_t)dst, PAGE_SIZE); if (cputype == CPU_ID_MV88SV584X_V7) { /* Core rev A0 */ div_val = read_cpu_clkdiv(CPU_DIVCLK_CTRL2_RATIO_FULL1); From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 20:08:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2BCAD65; Thu, 26 Mar 2015 20:08:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE2A611E; Thu, 26 Mar 2015 20:08:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QK8QOg062451; Thu, 26 Mar 2015 20:08:26 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QK8QCk062450; Thu, 26 Mar 2015 20:08:26 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201503262008.t2QK8QCk062450@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Thu, 26 Mar 2015 20:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280710 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 20:08:27 -0000 Author: rrs Date: Thu Mar 26 20:08:25 2015 New Revision: 280710 URL: https://svnweb.freebsd.org/changeset/base/280710 Log: Per Gleb, add the pmcstudy.1.gz which was moved to pmcstudy.8.gz Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Mar 26 19:33:07 2015 (r280709) +++ head/ObsoleteFiles.inc Thu Mar 26 20:08:25 2015 (r280710) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20150326 +OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz # 20150315: new clang import which bumps version from 3.5.1 to 3.6.0. OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_pclmul.h From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 21:10:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D4E789C; Thu, 26 Mar 2015 21:10:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E35FB3A; Thu, 26 Mar 2015 21:10:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QLAi4N092420; Thu, 26 Mar 2015 21:10:44 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QLAhf6092416; Thu, 26 Mar 2015 21:10:43 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201503262110.t2QLAhf6092416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Thu, 26 Mar 2015 21:10:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280711 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 21:10:44 -0000 Author: andrew Date: Thu Mar 26 21:10:42 2015 New Revision: 280711 URL: https://svnweb.freebsd.org/changeset/base/280711 Log: Add more arm64 machine dependent headers. With this we now have the minimum set of machine headers needed to build the userland toolchain. Differential Revision: https://reviews.freebsd.org/D2148 Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/include/frame.h (contents, props changed) head/sys/arm64/include/ptrace.h (contents, props changed) head/sys/arm64/include/reg.h (contents, props changed) head/sys/arm64/include/sysarch.h (contents, props changed) Added: head/sys/arm64/include/frame.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/frame.h Thu Mar 26 21:10:42 2015 (r280711) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef _MACHINE_FRAME_H_ +#define _MACHINE_FRAME_H_ + +#ifndef LOCORE + +#include +#include + +/* + * NOTE: keep this structure in sync with struct reg and struct mcontext. + */ +struct trapframe { + uint64_t tf_sp; + uint64_t tf_lr; + uint64_t tf_elr; + uint64_t tf_spsr; + uint64_t tf_x[30]; +}; + +/* + * Signal frame, pushedonto the user stack + */ +struct sigframe { + siginfo_t sf_si; /* actual saved siginfo */ + ucontext_t sf_uc; /* actual saved ucontext */ +}; + +/* + * There is no fixed frame layout, other than to be 16-byte aligned + */ +struct frame { + int dummy; +}; + +#endif /* !LOCORE */ + +#endif /* !_MACHINE_FRAME_H_ */ Added: head/sys/arm64/include/ptrace.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/ptrace.h Thu Mar 26 21:10:42 2015 (r280711) @@ -0,0 +1 @@ +/* $FreeBSD$ */ Added: head/sys/arm64/include/reg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/reg.h Thu Mar 26 21:10:42 2015 (r280711) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2014-2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * 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$ + */ + +#ifndef _MACHINE_REG_H_ +#define _MACHINE_REG_H_ + +struct reg { + uint64_t x[30]; + uint64_t lr; + uint64_t sp; + uint64_t elr; + uint32_t spsr; +}; + +struct fpreg { + __uint128_t fp_q[32]; + uint32_t fp_sr; + uint32_t fp_cr; +}; + +struct dbreg { + int dummy; +}; + +#ifdef _KERNEL +/* + * XXX these interfaces are MI, so they should be declared in a MI place. + */ +int fill_regs(struct thread *, struct reg *); +int set_regs(struct thread *, struct reg *); +int fill_fpregs(struct thread *, struct fpreg *); +int set_fpregs(struct thread *, struct fpreg *); +int fill_dbregs(struct thread *, struct dbreg *); +int set_dbregs(struct thread *, struct dbreg *); +#endif + +#endif /* !_MACHINE_REG_H_ */ Added: head/sys/arm64/include/sysarch.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/sysarch.h Thu Mar 26 21:10:42 2015 (r280711) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 1993 The Regents of the University of California. + * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * from: FreeBSD: src/sys/i386/include/sysarch.h,v 1.14 2000/09/21 + * $FreeBSD$ + */ + +/* + * Architecture specific syscalls (arm64) + */ +#ifndef _MACHINE_SYSARCH_H_ +#define _MACHINE_SYSARCH_H_ + +#ifndef _KERNEL + +__BEGIN_DECLS +int sysarch(int _number, void *_args); +__END_DECLS + +#endif + +#endif /* !_MACHINE_SYSARCH_H_ */ From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 21:13:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1B5FA06; Thu, 26 Mar 2015 21:13:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9B25CB66; Thu, 26 Mar 2015 21:13:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QLDuAB095171; Thu, 26 Mar 2015 21:13:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QLDscD095158; Thu, 26 Mar 2015 21:13:54 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503262113.t2QLDscD095158@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 26 Mar 2015 21:13:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280712 - in head/sys: arm/arm arm/include conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 21:13:56 -0000 Author: ian Date: Thu Mar 26 21:13:53 2015 New Revision: 280712 URL: https://svnweb.freebsd.org/changeset/base/280712 Log: New pmap code for armv6. Disabled by default, option ARM_NEW_PMAP enables it. This is pretty much a complete rewrite based on the existing i386 code. The patches have been circulating for a couple years and have been looked at by plenty of people, but I'm not putting anybody on the hook as having reviewed this in any formal sense except myself. After this has gotten wider testing from the user community, ARM_NEW_PMAP will become the default and various dregs of the old pmap code will be removed. Submitted by: Svatopluk Kraus , Michal Meloun Added: head/sys/arm/arm/pmap-v6-new.c (contents, props changed) head/sys/arm/include/pmap-v6.h (contents, props changed) head/sys/arm/include/pmap_var.h (contents, props changed) head/sys/arm/include/pte-v6.h (contents, props changed) Modified: head/sys/arm/arm/genassym.c head/sys/arm/arm/machdep.c head/sys/arm/arm/mem.c head/sys/arm/arm/minidump_machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/swtch.S head/sys/arm/include/machdep.h head/sys/arm/include/pcb.h head/sys/arm/include/pmap.h head/sys/arm/include/pte.h head/sys/arm/include/sf_buf.h head/sys/arm/include/smp.h head/sys/arm/include/vm.h head/sys/arm/include/vmparam.h head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/arm/genassym.c ============================================================================== --- head/sys/arm/arm/genassym.c Thu Mar 26 21:10:42 2015 (r280711) +++ head/sys/arm/arm/genassym.c Thu Mar 26 21:13:53 2015 (r280712) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -58,12 +59,19 @@ __FBSDID("$FreeBSD$"); ASSYM(KERNBASE, KERNBASE); ASSYM(PCB_NOALIGNFLT, PCB_NOALIGNFLT); +#ifdef ARM_NEW_PMAP +ASSYM(CPU_ASID_KERNEL,CPU_ASID_KERNEL); +#endif ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); +#ifndef ARM_NEW_PMAP ASSYM(PCB_DACR, offsetof(struct pcb, pcb_dacr)); +#endif ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); +#ifndef ARM_NEW_PMAP ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec)); +#endif ASSYM(PCB_R4, offsetof(struct pcb, pcb_regs.sf_r4)); ASSYM(PCB_R5, offsetof(struct pcb, pcb_regs.sf_r5)); ASSYM(PCB_R6, offsetof(struct pcb, pcb_regs.sf_r6)); @@ -131,7 +139,6 @@ ASSYM(PC_CURPMAP, offsetof(struct pcpu, #endif ASSYM(PAGE_SIZE, PAGE_SIZE); -ASSYM(PDESIZE, PDESIZE); ASSYM(PMAP_DOMAIN_KERNEL, PMAP_DOMAIN_KERNEL); #ifdef PMAP_INCLUDE_PTE_SYNC ASSYM(PMAP_INCLUDE_PTE_SYNC, 1); @@ -145,8 +152,13 @@ ASSYM(TRAPFRAMESIZE, sizeof(struct trapf ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(MAXCPU, MAXCPU); +ASSYM(_NCPUWORDS, _NCPUWORDS); ASSYM(NIRQ, NIRQ); ASSYM(PCPU_SIZE, sizeof(struct pcpu)); +ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace)); +ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); +ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); +ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); ASSYM(DCACHE_LINE_SIZE, offsetof(struct cpuinfo, dcache_line_size)); ASSYM(DCACHE_LINE_MASK, offsetof(struct cpuinfo, dcache_line_mask)); Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Thu Mar 26 21:10:42 2015 (r280711) +++ head/sys/arm/arm/machdep.c Thu Mar 26 21:13:53 2015 (r280712) @@ -138,6 +138,14 @@ int _min_bzero_size = 0; extern int *end; #ifdef FDT +vm_paddr_t pmap_pa; + +#ifdef ARM_NEW_PMAP +vm_offset_t systempage; +vm_offset_t irqstack; +vm_offset_t undstack; +vm_offset_t abtstack; +#else /* * This is the number of L2 page tables required for covering max * (hypothetical) memsize of 4GB and all kernel mappings (vectors, msgbuf, @@ -147,15 +155,13 @@ extern int *end; static struct pv_addr kernel_pt_table[KERNEL_PT_MAX]; -vm_paddr_t pmap_pa; - struct pv_addr systempage; static struct pv_addr msgbufpv; struct pv_addr irqstack; struct pv_addr undstack; struct pv_addr abtstack; static struct pv_addr kernelstack; - +#endif #endif #if defined(LINUX_BOOT_ABI) @@ -381,9 +387,11 @@ cpu_startup(void *dummy) vm_pager_bufferinit(); pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack + USPACE_SVC_STACK_TOP; - vector_page_setprot(VM_PROT_READ); pmap_set_pcb_pagedir(pmap_kernel(), pcb); +#ifndef ARM_NEW_PMAP + vector_page_setprot(VM_PROT_READ); pmap_postinit(); +#endif #ifdef ARM_TP_ADDRESS #ifdef ARM_CACHE_LOCK_ENABLE pmap_kenter_user(ARM_TP_ADDRESS, ARM_TP_ADDRESS); @@ -1003,6 +1011,19 @@ init_proc0(vm_offset_t kstack) pcpup->pc_curpcb = thread0.td_pcb; } +#ifdef ARM_NEW_PMAP +void +set_stackptrs(int cpu) +{ + + set_stackptr(PSR_IRQ32_MODE, + irqstack + ((IRQ_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); + set_stackptr(PSR_ABT32_MODE, + abtstack + ((ABT_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); + set_stackptr(PSR_UND32_MODE, + undstack + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); +} +#else void set_stackptrs(int cpu) { @@ -1014,6 +1035,7 @@ set_stackptrs(int cpu) set_stackptr(PSR_UND32_MODE, undstack.pv_va + ((UND_STACK_SIZE * PAGE_SIZE) * (cpu + 1))); } +#endif #ifdef FDT static char * @@ -1048,6 +1070,7 @@ print_kenv(void) debugf(" %x %s\n", (uint32_t)cp, cp); } +#ifndef ARM_NEW_PMAP void * initarm(struct arm_boot_params *abp) { @@ -1316,4 +1339,181 @@ initarm(struct arm_boot_params *abp) return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } +#else /* !ARM_NEW_PMAP */ +void * +initarm(struct arm_boot_params *abp) +{ + struct mem_region mem_regions[FDT_MEM_REGIONS]; + vm_paddr_t lastaddr; + vm_offset_t dtbp, kernelstack, dpcpu; + uint32_t memsize; + char *env; + void *kmdp; + int err_devmap, mem_regions_sz; + + /* get last allocated physical address */ + arm_physmem_kernaddr = abp->abp_physaddr; + lastaddr = parse_boot_param(abp) - KERNVIRTADDR + arm_physmem_kernaddr; + + memsize = 0; + set_cpufuncs(); + cpuinfo_init(); + + /* + * Find the dtb passed in by the boot loader. + */ + kmdp = preload_search_by_type("elf kernel"); + if (kmdp != NULL) + dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t); + else + dtbp = (vm_offset_t)NULL; +#if defined(FDT_DTB_STATIC) + /* + * In case the device tree blob was not retrieved (from metadata) try + * to use the statically embedded one. + */ + if (dtbp == (vm_offset_t)NULL) + dtbp = (vm_offset_t)&fdt_static_dtb; #endif + + if (OF_install(OFW_FDT, 0) == FALSE) + panic("Cannot install FDT"); + + if (OF_init((void *)dtbp) != 0) + panic("OF_init failed with the found device tree"); + + /* Grab physical memory regions information from device tree. */ + if (fdt_get_mem_regions(mem_regions, &mem_regions_sz, &memsize) != 0) + panic("Cannot get physical memory regions"); + arm_physmem_hardware_regions(mem_regions, mem_regions_sz); + + /* Grab reserved memory regions information from device tree. */ + if (fdt_get_reserved_regions(mem_regions, &mem_regions_sz) == 0) + arm_physmem_exclude_regions(mem_regions, mem_regions_sz, + EXFLAG_NODUMP | EXFLAG_NOALLOC); + + /* + * Set TEX remapping registers. + * Setup kernel page tables and switch to kernel L1 page table. + */ + pmap_set_tex(); + pmap_bootstrap_prepare(lastaddr); + + /* + * Now that proper page tables are installed, call cpu_setup() to enable + * instruction and data caches and other chip-specific features. + */ + cpu_setup(""); + + /* Platform-specific initialisation */ + platform_probe_and_attach(); + pcpu0_init(); + + /* Do basic tuning, hz etc */ + init_param1(); + + /* + * Allocate a page for the system page mapped to 0xffff0000 + * This page will just contain the system vectors and can be + * shared by all processes. + */ + systempage = pmap_preboot_get_pages(1); + + /* Map the vector page. */ + pmap_preboot_map_pages(systempage, ARM_VECTORS_HIGH, 1); + if (virtual_end >= ARM_VECTORS_HIGH) + virtual_end = ARM_VECTORS_HIGH - 1; + + /* Allocate dynamic per-cpu area. */ + dpcpu = pmap_preboot_get_vpages(DPCPU_SIZE / PAGE_SIZE); + dpcpu_init((void *)dpcpu, 0); + + /* Allocate stacks for all modes */ + irqstack = pmap_preboot_get_vpages(IRQ_STACK_SIZE * MAXCPU); + abtstack = pmap_preboot_get_vpages(ABT_STACK_SIZE * MAXCPU); + undstack = pmap_preboot_get_vpages(UND_STACK_SIZE * MAXCPU ); + kernelstack = pmap_preboot_get_vpages(KSTACK_PAGES * MAXCPU); + + /* Allocate message buffer. */ + msgbufp = (void *)pmap_preboot_get_vpages( + round_page(msgbufsize) / PAGE_SIZE); + + /* + * Pages were allocated during the secondary bootstrap for the + * stacks for different CPU modes. + * We must now set the r13 registers in the different CPU modes to + * point to these stacks. + * Since the ARM stacks use STMFD etc. we must set r13 to the top end + * of the stack memory. + */ + set_stackptrs(0); + mutex_init(); + + /* Establish static device mappings. */ + err_devmap = platform_devmap_init(); + arm_devmap_bootstrap(0, NULL); + vm_max_kernel_address = platform_lastaddr(); + + /* + * Only after the SOC registers block is mapped we can perform device + * tree fixups, as they may attempt to read parameters from hardware. + */ + OF_interpret("perform-fixup", 0); + platform_gpio_init(); + cninit(); + + debugf("initarm: console initialized\n"); + debugf(" arg1 kmdp = 0x%08x\n", (uint32_t)kmdp); + debugf(" boothowto = 0x%08x\n", boothowto); + debugf(" dtbp = 0x%08x\n", (uint32_t)dtbp); + debugf(" lastaddr1: 0x%08x\n", lastaddr); + print_kenv(); + + env = kern_getenv("kernelname"); + if (env != NULL) + strlcpy(kernelname, env, sizeof(kernelname)); + + if (err_devmap != 0) + printf("WARNING: could not fully configure devmap, error=%d\n", + err_devmap); + + platform_late_init(); + + /* + * We must now clean the cache again.... + * Cleaning may be done by reading new data to displace any + * dirty data in the cache. This will have happened in setttb() + * but since we are boot strapping the addresses used for the read + * may have just been remapped and thus the cache could be out + * of sync. A re-clean after the switch will cure this. + * After booting there are no gross relocations of the kernel thus + * this problem will not occur after initarm(). + */ + /* Set stack for exception handlers */ + undefined_init(); + init_proc0(kernelstack); + arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); + enable_interrupts(PSR_A); + pmap_bootstrap(0); + + /* Exclude the kernel (and all the things we allocated which immediately + * follow the kernel) from the VM allocation pool but not from crash + * dumps. virtual_avail is a global variable which tracks the kva we've + * "allocated" while setting up pmaps. + * + * Prepare the list of physical memory available to the vm subsystem. + */ + arm_physmem_exclude_region(abp->abp_physaddr, + pmap_preboot_get_pages(0) - abp->abp_physaddr, EXFLAG_NOALLOC); + arm_physmem_init_kernel_globals(); + + init_param2(physmem); + /* Init message buffer. */ + msgbufinit(msgbufp, msgbufsize); + kdb_init(); + return ((void *)STACKALIGN(thread0.td_pcb)); + +} + +#endif /* !ARM_NEW_PMAP */ +#endif /* FDT */ Modified: head/sys/arm/arm/mem.c ============================================================================== --- head/sys/arm/arm/mem.c Thu Mar 26 21:10:42 2015 (r280711) +++ head/sys/arm/arm/mem.c Thu Mar 26 21:13:53 2015 (r280712) @@ -113,6 +113,9 @@ memrw(struct cdev *dev, struct uio *uio, return (EINVAL); sx_xlock(&tmppt_lock); pmap_kenter((vm_offset_t)_tmppt, v); +#ifdef ARM_NEW_PMAP + pmap_tlb_flush(kernel_pmap, (vm_offset_t)_tmppt); +#endif o = (int)uio->uio_offset & PAGE_MASK; c = (u_int)(PAGE_SIZE - ((int)iov->iov_base & PAGE_MASK)); c = min(c, (u_int)(PAGE_SIZE - o)); Modified: head/sys/arm/arm/minidump_machdep.c ============================================================================== --- head/sys/arm/arm/minidump_machdep.c Thu Mar 26 21:10:42 2015 (r280711) +++ head/sys/arm/arm/minidump_machdep.c Thu Mar 26 21:13:53 2015 (r280712) @@ -61,7 +61,10 @@ CTASSERT(sizeof(struct kerneldumpheader) uint32_t *vm_page_dump; int vm_page_dump_size; +#ifndef ARM_NEW_PMAP + static struct kerneldumpheader kdh; + static off_t dumplo; /* Handle chunked writes. */ @@ -473,8 +476,20 @@ fail: else printf("\n** DUMP FAILED (ERROR %d) **\n", error); return (error); + return (0); } +#else /* ARM_NEW_PMAP */ + +int +minidumpsys(struct dumperinfo *di) +{ + + return (0); +} + +#endif + void dump_add_page(vm_paddr_t pa) { Modified: head/sys/arm/arm/mp_machdep.c ============================================================================== --- head/sys/arm/arm/mp_machdep.c Thu Mar 26 21:10:42 2015 (r280711) +++ head/sys/arm/arm/mp_machdep.c Thu Mar 26 21:13:53 2015 (r280712) @@ -48,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -151,10 +152,20 @@ init_secondary(int cpu) uint32_t loop_counter; int start = 0, end = 0; +#ifdef ARM_NEW_PMAP + pmap_set_tex(); + reinit_mmu(pmap_kern_ttb, (1<<6) | (1<< 0), (1<<6) | (1<< 0)); + cpu_setup(""); + + /* Provide stack pointers for other processor modes. */ + set_stackptrs(cpu); + + enable_interrupts(PSR_A); +#else /* ARM_NEW_PMAP */ cpu_setup(NULL); setttb(pmap_pa); cpu_tlb_flushID(); - +#endif /* ARM_NEW_PMAP */ pc = &__pcpu[cpu]; /* @@ -166,10 +177,10 @@ init_secondary(int cpu) pcpu_init(pc, cpu, sizeof(struct pcpu)); dpcpu_init(dpcpu[cpu - 1], cpu); - +#ifndef ARM_NEW_PMAP /* Provide stack pointers for other processor modes. */ set_stackptrs(cpu); - +#endif /* Signal our startup to BSP */ atomic_add_rel_32(&mp_naps, 1); @@ -298,6 +309,12 @@ ipi_handler(void *arg) CTR1(KTR_SMP, "%s: IPI_TLB", __func__); cpufuncs.cf_tlb_flushID(); break; +#ifdef ARM_NEW_PMAP + case IPI_LAZYPMAP: + CTR1(KTR_SMP, "%s: IPI_LAZYPMAP", __func__); + pmap_lazyfix_action(); + break; +#endif default: panic("Unknown IPI 0x%0x on cpu %d", ipi, curcpu); } Added: head/sys/arm/arm/pmap-v6-new.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/arm/pmap-v6-new.c Thu Mar 26 21:13:53 2015 (r280712) @@ -0,0 +1,6723 @@ +/*- + * Copyright (c) 1991 Regents of the University of California. + * Copyright (c) 1994 John S. Dyson + * Copyright (c) 1994 David Greenman + * Copyright (c) 2005-2010 Alan L. Cox + * Copyright (c) 2014 Svatopluk Kraus + * Copyright (c) 2014 Michal Meloun + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * the Systems Programming Group of the University of Utah Computer + * Science Department and William Jolitz of UUNET Technologies Inc. + * + * 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. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * from: @(#)pmap.c 7.7 (Berkeley) 5/12/91 + */ +/*- + * Copyright (c) 2003 Networks Associates Technology, Inc. + * All rights reserved. + * + * This software was developed for the FreeBSD Project by Jake Burkholder, + * Safeport Network Services, and Network Associates Laboratories, the + * Security Research Division of Network Associates, Inc. under + * DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the DARPA + * CHATS research program. + * + * 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Manages physical address maps. + * + * Since the information managed by this module is + * also stored by the logical address mapping module, + * this module may throw away valid virtual-to-physical + * mappings at almost any time. However, invalidations + * of virtual-to-physical mappings must be done as + * requested. + * + * In order to cope with hardware architectures which + * make virtual-to-physical map invalidates expensive, + * this module may delay invalidate or reduced protection + * operations until such time as they are actually + * necessary. This module is given full information as + * to which processors are currently using which maps, + * and to when physical maps must be made correct. + */ + +#include "opt_vm.h" +#include "opt_pmap.h" +#include "opt_ddb.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef SMP +#include +#else +#include +#endif + +#ifdef DDB +#include +#endif + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#ifdef SMP +#include +#endif + +#ifndef PMAP_SHPGPERPROC +#define PMAP_SHPGPERPROC 200 +#endif + +#ifndef DIAGNOSTIC +#define PMAP_INLINE __inline +#else +#define PMAP_INLINE +#endif + +#ifdef PMAP_DEBUG +static void pmap_zero_page_check(vm_page_t m); +void pmap_debug(int level); +int pmap_pid_dump(int pid); +void pmap_pvdump(vm_paddr_t pa); + +#define PDEBUG(_lev_,_stat_) \ + if (pmap_debug_level >= (_lev_)) \ + ((_stat_)) +#define dprintf printf +int pmap_debug_level = 1; +#else /* PMAP_DEBUG */ +#define PDEBUG(_lev_,_stat_) /* Nothing */ +#define dprintf(x, arg...) +#endif /* PMAP_DEBUG */ + +/* + * Level 2 page tables map definion ('max' is excluded). + */ + +#define PT2V_MIN_ADDRESS ((vm_offset_t)PT2MAP) +#define PT2V_MAX_ADDRESS ((vm_offset_t)PT2MAP + PT2MAP_SIZE) + +#define UPT2V_MIN_ADDRESS ((vm_offset_t)PT2MAP) +#define UPT2V_MAX_ADDRESS \ + ((vm_offset_t)(PT2MAP + (KERNBASE >> PT2MAP_SHIFT))) + +/* + * Promotion to a 1MB (PTE1) page mapping requires that the corresponding + * 4KB (PTE2) page mappings have identical settings for the following fields: + */ +#define PTE2_PROMOTE (PTE2_V | PTE2_A | PTE2_NM | PTE2_S | PTE2_NG | \ + PTE2_NX | PTE2_RO | PTE2_U | PTE2_W | \ + PTE2_ATTR_MASK) + +#define PTE1_PROMOTE (PTE1_V | PTE1_A | PTE1_NM | PTE1_S | PTE1_NG | \ + PTE1_NX | PTE1_RO | PTE1_U | PTE1_W | \ + PTE1_ATTR_MASK) + +#define ATTR_TO_L1(l2_attr) ((((l2_attr) & L2_TEX0) ? L1_S_TEX0 : 0) | \ + (((l2_attr) & L2_C) ? L1_S_C : 0) | \ + (((l2_attr) & L2_B) ? L1_S_B : 0) | \ + (((l2_attr) & PTE2_A) ? PTE1_A : 0) | \ + (((l2_attr) & PTE2_NM) ? PTE1_NM : 0) | \ + (((l2_attr) & PTE2_S) ? PTE1_S : 0) | \ + (((l2_attr) & PTE2_NG) ? PTE1_NG : 0) | \ + (((l2_attr) & PTE2_NX) ? PTE1_NX : 0) | \ + (((l2_attr) & PTE2_RO) ? PTE1_RO : 0) | \ + (((l2_attr) & PTE2_U) ? PTE1_U : 0) | \ + (((l2_attr) & PTE2_W) ? PTE1_W : 0)) + +#define ATTR_TO_L2(l1_attr) ((((l1_attr) & L1_S_TEX0) ? L2_TEX0 : 0) | \ + (((l1_attr) & L1_S_C) ? L2_C : 0) | \ + (((l1_attr) & L1_S_B) ? L2_B : 0) | \ + (((l1_attr) & PTE1_A) ? PTE2_A : 0) | \ + (((l1_attr) & PTE1_NM) ? PTE2_NM : 0) | \ + (((l1_attr) & PTE1_S) ? PTE2_S : 0) | \ + (((l1_attr) & PTE1_NG) ? PTE2_NG : 0) | \ + (((l1_attr) & PTE1_NX) ? PTE2_NX : 0) | \ + (((l1_attr) & PTE1_RO) ? PTE2_RO : 0) | \ + (((l1_attr) & PTE1_U) ? PTE2_U : 0) | \ + (((l1_attr) & PTE1_W) ? PTE2_W : 0)) + +/* + * PTE2 descriptors creation macros. + */ +#define PTE2_KPT(pa) PTE2_KERN(pa, PTE2_AP_KRW, pt_memattr) +#define PTE2_KPT_NG(pa) PTE2_KERN_NG(pa, PTE2_AP_KRW, pt_memattr) + +#define PTE2_KRW(pa) PTE2_KERN(pa, PTE2_AP_KRW, PTE2_ATTR_NORMAL) +#define PTE2_KRO(pa) PTE2_KERN(pa, PTE2_AP_KR, PTE2_ATTR_NORMAL) + +#define PV_STATS +#ifdef PV_STATS +#define PV_STAT(x) do { x ; } while (0) +#else +#define PV_STAT(x) do { } while (0) +#endif + +/* + * The boot_pt1 is used temporary in very early boot stage as L1 page table. + * We can init many things with no memory allocation thanks to its static + * allocation and this brings two main advantages: + * (1) other cores can be started very simply, + * (2) various boot loaders can be supported as its arguments can be processed + * in virtual address space and can be moved to safe location before + * first allocation happened. + * Only disadvantage is that boot_pt1 is used only in very early boot stage. + * However, the table is uninitialized and so lays in bss. Therefore kernel + * image size is not influenced. + * + * QQQ: In the future, maybe, boot_pt1 can be used for soft reset and + * CPU suspend/resume game. + */ +extern pt1_entry_t boot_pt1[]; + +vm_paddr_t base_pt1; +pt1_entry_t *kern_pt1; +pt2_entry_t *kern_pt2tab; +pt2_entry_t *PT2MAP; + +static uint32_t ttb_flags; +static vm_memattr_t pt_memattr; +ttb_entry_t pmap_kern_ttb; + +/* XXX use converion function*/ +#define PTE2_ATTR_NORMAL VM_MEMATTR_DEFAULT +#define PTE1_ATTR_NORMAL ATTR_TO_L1(PTE2_ATTR_NORMAL) + +struct pmap kernel_pmap_store; +LIST_HEAD(pmaplist, pmap); +static struct pmaplist allpmaps; +static struct mtx allpmaps_lock; + +vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ +vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ + +static vm_offset_t kernel_vm_end_new; +vm_offset_t kernel_vm_end = KERNBASE + NKPT2PG * NPT2_IN_PG * PTE1_SIZE; +vm_offset_t vm_max_kernel_address; +vm_paddr_t kernel_l1pa; + +static struct rwlock __aligned(CACHE_LINE_SIZE) pvh_global_lock; + +/* + * Data for the pv entry allocation mechanism + */ +static TAILQ_HEAD(pch, pv_chunk) pv_chunks = TAILQ_HEAD_INITIALIZER(pv_chunks); +static int pv_entry_count = 0, pv_entry_max = 0, pv_entry_high_water = 0; +static struct md_page *pv_table; /* XXX: Is it used only the list in md_page? */ +static int shpgperproc = PMAP_SHPGPERPROC; + +struct pv_chunk *pv_chunkbase; /* KVA block for pv_chunks */ +int pv_maxchunks; /* How many chunks we have KVA for */ +vm_offset_t pv_vafree; /* freelist stored in the PTE */ + +vm_paddr_t first_managed_pa; +#define pa_to_pvh(pa) (&pv_table[pte1_index(pa - first_managed_pa)]) + +/* + * All those kernel PT submaps that BSD is so fond of + */ +struct sysmaps { + struct mtx lock; + pt2_entry_t *CMAP1; + pt2_entry_t *CMAP2; + pt2_entry_t *CMAP3; + caddr_t CADDR1; + caddr_t CADDR2; + caddr_t CADDR3; +}; +static struct sysmaps sysmaps_pcpu[MAXCPU]; +static pt2_entry_t *CMAP3; +static caddr_t CADDR3; +caddr_t _tmppt = 0; + +struct msgbuf *msgbufp = 0; /* XXX move it to machdep.c */ + +/* + * Crashdump maps. + */ +static caddr_t crashdumpmap; + +static pt2_entry_t *PMAP1 = 0, *PMAP2; +static pt2_entry_t *PADDR1 = 0, *PADDR2; +#ifdef DDB +static pt2_entry_t *PMAP3; +static pt2_entry_t *PADDR3; +static int PMAP3cpu __unused; /* for SMP only */ +#endif +#ifdef SMP +static int PMAP1cpu; +static int PMAP1changedcpu; +SYSCTL_INT(_debug, OID_AUTO, PMAP1changedcpu, CTLFLAG_RD, + &PMAP1changedcpu, 0, + "Number of times pmap_pte2_quick changed CPU with same PMAP1"); +#endif +static int PMAP1changed; +SYSCTL_INT(_debug, OID_AUTO, PMAP1changed, CTLFLAG_RD, + &PMAP1changed, 0, + "Number of times pmap_pte2_quick changed PMAP1"); +static int PMAP1unchanged; +SYSCTL_INT(_debug, OID_AUTO, PMAP1unchanged, CTLFLAG_RD, + &PMAP1unchanged, 0, + "Number of times pmap_pte2_quick didn't change PMAP1"); +static struct mtx PMAP2mutex; + +static __inline void pt2_wirecount_init(vm_page_t m); +static boolean_t pmap_demote_pte1(pmap_t pmap, pt1_entry_t *pte1p, + vm_offset_t va); +void cache_icache_sync_fresh(vm_offset_t va, vm_paddr_t pa, vm_size_t size); + +/* + * Function to set the debug level of the pmap code. + */ +#ifdef PMAP_DEBUG +void +pmap_debug(int level) +{ + + pmap_debug_level = level; + dprintf("pmap_debug: level=%d\n", pmap_debug_level); +} +#endif /* PMAP_DEBUG */ + +/* + * This table must corespond with memory attribute configuration in vm.h. + * First entry is used for normal system mapping. + * + * Device memory is always marked as shared. + * Normal memory is shared only in SMP . + * Not outer shareable bits are not used yet. + * Class 6 cannot be used on ARM11. + */ +#define TEXDEF_TYPE_SHIFT 0 +#define TEXDEF_TYPE_MASK 0x3 +#define TEXDEF_INNER_SHIFT 2 +#define TEXDEF_INNER_MASK 0x3 +#define TEXDEF_OUTER_SHIFT 4 +#define TEXDEF_OUTER_MASK 0x3 +#define TEXDEF_NOS_SHIFT 6 +#define TEXDEF_NOS_MASK 0x1 + +#define TEX(t, i, o, s) \ + ((t) << TEXDEF_TYPE_SHIFT) | \ + ((i) << TEXDEF_INNER_SHIFT) | \ + ((o) << TEXDEF_OUTER_SHIFT | \ + ((s) << TEXDEF_NOS_SHIFT)) + +static uint32_t tex_class[8] = { +/* type inner cache outer cache */ + TEX(PRRR_MEM, NMRR_WB_WA, NMRR_WB_WA, 0), /* 0 - ATTR_WB_WA */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 1 - ATTR_NOCACHE */ + TEX(PRRR_DEV, NMRR_NC, NMRR_NC, 0), /* 2 - ATTR_DEVICE */ + TEX(PRRR_SO, NMRR_NC, NMRR_NC, 0), /* 3 - ATTR_SO */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 4 - NOT USED YET */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 5 - NOT USED YET */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 6 - NOT USED YET */ + TEX(PRRR_MEM, NMRR_NC, NMRR_NC, 0), /* 7 - NOT USED YET */ +}; +#undef TEX + +/* + * Convert TEX definition entry to TTB flags. + */ +static uint32_t +encode_ttb_flags(int idx) +{ + uint32_t inner, outer, nos, reg; + + inner = (tex_class[idx] >> TEXDEF_INNER_SHIFT) & + TEXDEF_INNER_MASK; + outer = (tex_class[idx] >> TEXDEF_OUTER_SHIFT) & + TEXDEF_OUTER_MASK; + nos = (tex_class[idx] >> TEXDEF_NOS_SHIFT) & + TEXDEF_NOS_MASK; + + reg = nos << 5; + reg |= outer << 3; + if (cpuinfo.coherent_walk) + reg |= (inner & 0x1) << 6; + reg |= (inner & 0x2) >> 1; +#ifdef SMP + reg |= 1 << 1; +#endif + return reg; +} + +/* + * Set TEX remapping registers in current CPU. + */ +void +pmap_set_tex(void) +{ + uint32_t prrr, nmrr; + uint32_t type, inner, outer, nos; + int i; + +#ifdef PMAP_PTE_NOCACHE + /* XXX fixme */ + if (cpuinfo.coherent_walk) { + pt_memattr = VM_MEMATTR_WB_WA; + ttb_flags = encode_ttb_flags(0); + } + else { + pt_memattr = VM_MEMATTR_NOCACHE; + ttb_flags = encode_ttb_flags(1); + } +#else + pt_memattr = VM_MEMATTR_WB_WA; + ttb_flags = encode_ttb_flags(0); +#endif + + prrr = 0; + nmrr = 0; + + /* Build remapping register from TEX classes. */ + for (i = 0; i < 8; i++) { + type = (tex_class[i] >> TEXDEF_TYPE_SHIFT) & + TEXDEF_TYPE_MASK; + inner = (tex_class[i] >> TEXDEF_INNER_SHIFT) & + TEXDEF_INNER_MASK; + outer = (tex_class[i] >> TEXDEF_OUTER_SHIFT) & + TEXDEF_OUTER_MASK; + nos = (tex_class[i] >> TEXDEF_NOS_SHIFT) & + TEXDEF_NOS_MASK; + + prrr |= type << (i * 2); + prrr |= nos << (i + 24); + nmrr |= inner << (i * 2); + nmrr |= outer << (i * 2 + 16); + } + /* Add shareable bits for device memory. */ + prrr |= PRRR_DS0 | PRRR_DS1; + + /* Add shareable bits for normal memory in SMP case. */ +#ifdef SMP + prrr |= PRRR_NS1; +#endif + cp15_prrr_set(prrr); + cp15_nmrr_set(nmrr); + + /* Caches are disabled, so full TLB flush should be enough. */ + tlb_flush_all_local(); +} + +/* + * KERNBASE must be multiple of NPT2_IN_PG * PTE1_SIZE. In other words, + * KERNBASE is mapped by first L2 page table in L2 page table page. It + * meets same constrain due to PT2MAP being placed just under KERNBASE. + */ +CTASSERT((KERNBASE & (NPT2_IN_PG * PTE1_SIZE - 1)) == 0); +CTASSERT((KERNBASE - VM_MAXUSER_ADDRESS) >= PT2MAP_SIZE); + +/* + * In crazy dreams, PAGE_SIZE could be a multiple of PTE2_SIZE in general. + * For now, anyhow, the following check must be fulfilled. + */ +CTASSERT(PAGE_SIZE == PTE2_SIZE); +/* + * We don't want to mess up MI code with all MMU and PMAP definitions, + * so some things, which depend on other ones, are defined independently. + * Now, it is time to check that we don't screw up something. + */ +CTASSERT(PDRSHIFT == PTE1_SHIFT); +/* + * Check L1 and L2 page table entries definitions consistency. + */ +CTASSERT(NB_IN_PT1 == (sizeof(pt1_entry_t) * NPTE1_IN_PT1)); +CTASSERT(NB_IN_PT2 == (sizeof(pt2_entry_t) * NPTE2_IN_PT2)); +/* + * Check L2 page tables page consistency. + */ +CTASSERT(PAGE_SIZE == (NPT2_IN_PG * NB_IN_PT2)); +CTASSERT((1 << PT2PG_SHIFT) == NPT2_IN_PG); +/* + * Check PT2TAB consistency. + * PT2TAB_ENTRIES is defined as a division of NPTE1_IN_PT1 by NPT2_IN_PG. + * This should be done without remainder. + */ +CTASSERT(NPTE1_IN_PT1 == (PT2TAB_ENTRIES * NPT2_IN_PG)); + +/* + * A PT2MAP magic. + * + * All level 2 page tables (PT2s) are mapped continuously and accordingly + * into PT2MAP address space. As PT2 size is less than PAGE_SIZE, this can + * be done only if PAGE_SIZE is a multiple of PT2 size. All PT2s in one page + * must be used together, but not necessary at once. The first PT2 in a page + * must map things on correctly aligned address and the others must follow + * in right order. + */ +#define NB_IN_PT2TAB (PT2TAB_ENTRIES * sizeof(pt2_entry_t)) +#define NPT2_IN_PT2TAB (NB_IN_PT2TAB / NB_IN_PT2) +#define NPG_IN_PT2TAB (NB_IN_PT2TAB / PAGE_SIZE) + +/* + * Check PT2TAB consistency. + * NPT2_IN_PT2TAB is defined as a division of NB_IN_PT2TAB by NB_IN_PT2. + * NPG_IN_PT2TAB is defined as a division of NB_IN_PT2TAB by PAGE_SIZE. + * The both should be done without remainder. + */ +CTASSERT(NB_IN_PT2TAB == (NPT2_IN_PT2TAB * NB_IN_PT2)); +CTASSERT(NB_IN_PT2TAB == (NPG_IN_PT2TAB * PAGE_SIZE)); +/* + * The implementation was made general, however, with the assumption + * bellow in mind. In case of another value of NPG_IN_PT2TAB, + * the code should be once more rechecked. + */ +CTASSERT(NPG_IN_PT2TAB == 1); + +/* + * Get offset of PT2 in a page + * associated with given PT1 index. + */ +static __inline u_int +page_pt2off(u_int pt1_idx) +{ + + return ((pt1_idx & PT2PG_MASK) * NB_IN_PT2); +} + +/* + * Get physical address of PT2 + * associated with given PT2s page and PT1 index. + */ +static __inline vm_paddr_t +page_pt2pa(vm_paddr_t pgpa, u_int pt1_idx) +{ + + return (pgpa + page_pt2off(pt1_idx)); +} + +/* + * Get first entry of PT2 + * associated with given PT2s page and PT1 index. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 21:58:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F946713; Thu, 26 Mar 2015 21:58:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00B4BF62; Thu, 26 Mar 2015 21:58:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QLw6Yw014615; Thu, 26 Mar 2015 21:58:06 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QLw6v2014614; Thu, 26 Mar 2015 21:58:06 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201503262158.t2QLw6v2014614@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Thu, 26 Mar 2015 21:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280713 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 21:58:07 -0000 Author: jilles Date: Thu Mar 26 21:58:06 2015 New Revision: 280713 URL: https://svnweb.freebsd.org/changeset/base/280713 Log: setmode(): Use sysctl kern.proc.umask instead of umask() if possible. The kern.proc.umask. sysctl allows querying the umask without temporarily modifying it. Modified: head/lib/libc/gen/setmode.c Modified: head/lib/libc/gen/setmode.c ============================================================================== --- head/lib/libc/gen/setmode.c Thu Mar 26 21:13:53 2015 (r280712) +++ head/lib/libc/gen/setmode.c Thu Mar 26 21:58:06 2015 (r280713) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include #include @@ -68,6 +69,7 @@ typedef struct bitcmd { #define CMD2_OBITS 0x08 #define CMD2_UBITS 0x10 +static mode_t getumask(void); static BITCMD *addcmd(BITCMD *, mode_t, mode_t, mode_t, mode_t); static void compress_mode(BITCMD *); #ifdef SETMODE_DEBUG @@ -169,7 +171,6 @@ setmode(const char *p) int serrno; char op, *ep; BITCMD *set, *saveset, *endset; - sigset_t sigset, sigoset; mode_t mask, perm, permXbits, who; long perml; int equalopdone; @@ -182,15 +183,9 @@ setmode(const char *p) /* * Get a copy of the mask for the permissions that are mask relative. - * Flip the bits, we want what's not set. Since it's possible that - * the caller is opening files inside a signal handler, protect them - * as best we can. + * Flip the bits, we want what's not set. */ - sigfillset(&sigset); - (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset); - (void)umask(mask = umask(0)); - mask = ~mask; - (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL); + mask = ~getumask(); setlen = SET_LEN + 2; @@ -346,6 +341,35 @@ out: return NULL; } +static mode_t +getumask(void) +{ + sigset_t sigset, sigoset; + size_t len; + mode_t mask; + u_short smask; + + /* + * First try requesting the umask without temporarily modifying it. + * Note that this does not work if the sysctl + * security.bsd.unprivileged_proc_debug is set to 0. + */ + len = sizeof(smask); + if (sysctl((int[4]){ CTL_KERN, KERN_PROC, KERN_PROC_UMASK, getpid() }, + 4, &smask, &len, NULL, 0) == 0) + return (smask); + + /* + * Since it's possible that the caller is opening files inside a signal + * handler, protect them as best we can. + */ + sigfillset(&sigset); + (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset); + (void)umask(mask = umask(0)); + (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL); + return (mask); +} + static BITCMD * addcmd(BITCMD *set, mode_t op, mode_t who, mode_t oparg, mode_t mask) { From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 22:05:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65F70B65; Thu, 26 Mar 2015 22:05:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36B1DAA; Thu, 26 Mar 2015 22:05:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QM5Xu1019182; Thu, 26 Mar 2015 22:05:33 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QM5WPY019180; Thu, 26 Mar 2015 22:05:32 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503262205.t2QM5WPY019180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Thu, 26 Mar 2015 22:05:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280714 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 22:05:33 -0000 Author: tuexen Date: Thu Mar 26 22:05:31 2015 New Revision: 280714 URL: https://svnweb.freebsd.org/changeset/base/280714 Log: Improve the selection of the destination address of SACK chunks. This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755 and is joint work with rrs@. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Mar 26 21:58:06 2015 (r280713) +++ head/sys/netinet/sctp_output.c Thu Mar 26 22:05:31 2015 (r280714) @@ -10409,32 +10409,17 @@ sctp_send_sack(struct sctp_tcb *stcb, in a_chk->sent = SCTP_DATAGRAM_UNSENT; a_chk->whoTo = NULL; - if ((asoc->numduptsns) || - (!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE))) { + if (!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE)) { /*- - * Ok, we have some duplicates or the destination for the - * sack is unreachable, lets see if we can select an - * alternate than asoc->last_data_chunk_from + * Ok, the destination for the SACK is unreachable, lets see if + * we can select an alternate to asoc->last_data_chunk_from */ - if ((asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE) && - (asoc->used_alt_onsack > asoc->numnets)) { - /* We used an alt last time, don't this time */ - a_chk->whoTo = NULL; - } else { - asoc->used_alt_onsack++; - a_chk->whoTo = sctp_find_alternate_net(stcb, asoc->last_data_chunk_from, 0); - } + a_chk->whoTo = sctp_find_alternate_net(stcb, asoc->last_data_chunk_from, 0); if (a_chk->whoTo == NULL) { /* Nope, no alternate */ a_chk->whoTo = asoc->last_data_chunk_from; - asoc->used_alt_onsack = 0; } } else { - /* - * No duplicates so we use the last place we received data - * from. - */ - asoc->used_alt_onsack = 0; a_chk->whoTo = asoc->last_data_chunk_from; } if (a_chk->whoTo) { Modified: head/sys/netinet/sctp_structs.h ============================================================================== --- head/sys/netinet/sctp_structs.h Thu Mar 26 21:58:06 2015 (r280713) +++ head/sys/netinet/sctp_structs.h Thu Mar 26 22:05:31 2015 (r280714) @@ -1174,7 +1174,6 @@ struct sctp_association { struct sctp_scoping scope; /* flags to handle send alternate net tracking */ - uint8_t used_alt_onsack; uint8_t used_alt_asconfack; uint8_t fast_retran_loss_recovery; uint8_t sat_t3_loss_recovery; From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 22:34:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9E1F2AF; Thu, 26 Mar 2015 22:34:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A43AA3E3; Thu, 26 Mar 2015 22:34:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QMYSUH033059; Thu, 26 Mar 2015 22:34:28 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QMYSKf033058; Thu, 26 Mar 2015 22:34:28 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201503262234.t2QMYSKf033058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 26 Mar 2015 22:34:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280716 - head/sbin/md5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 22:34:28 -0000 Author: delphij Date: Thu Mar 26 22:34:27 2015 New Revision: 280716 URL: https://svnweb.freebsd.org/changeset/base/280716 Log: - Correct type for checkAgainst. - Staticify flags that are not used outside the file scope. PR: bin/193471 Submitted by: Robert Sprowson MFC after: 2 weeks Modified: head/sbin/md5/md5.c Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Thu Mar 26 22:31:55 2015 (r280715) +++ head/sbin/md5/md5.c Thu Mar 26 22:34:27 2015 (r280716) @@ -42,11 +42,11 @@ __FBSDID("$FreeBSD$"); #define TEST_BLOCK_COUNT 100000 #define MDTESTCOUNT 8 -int qflag; -int rflag; -int sflag; -unsigned char* checkAgainst; -int checksFailed; +static int qflag; +static int rflag; +static int sflag; +static char* checkAgainst; +static int checksFailed; typedef void (DIGEST_Init)(void *); typedef void (DIGEST_Update)(void *, const unsigned char *, size_t); From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 22:37:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E49C5504; Thu, 26 Mar 2015 22:37:09 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AD9AA5EB; Thu, 26 Mar 2015 22:37:09 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t2QMb2EC009428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 26 Mar 2015 15:37:02 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t2QMb2V3009427; Thu, 26 Mar 2015 15:37:02 -0700 (PDT) (envelope-from jmg) Date: Thu, 26 Mar 2015 15:37:02 -0700 From: John-Mark Gurney To: Hans Petter Selasky Subject: Re: svn commit: r280442 - head/sys/dev/sound/pcm Message-ID: <20150326223701.GO51048@funkthat.com> References: <201503241631.t2OGVNwe060578@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503241631.t2OGVNwe060578@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Thu, 26 Mar 2015 15:37:02 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 22:37:10 -0000 Hans Petter Selasky wrote this message on Tue, Mar 24, 2015 at 16:31 +0000: > Author: hselasky > Date: Tue Mar 24 16:31:22 2015 > New Revision: 280442 > URL: https://svnweb.freebsd.org/changeset/base/280442 > > Log: > Make all PCM core sysctls tunable and remove redundant TUNABLE() > statements. This allows for setting all PCM core parameters in the > kernel environment through loader.conf(5) or kenv(1) which is useful > for pluggable PCM devices like USB audio devices which might be > plugged after that sysctl.conf(5) is executed. should we make sysctl.conf set all vars as tunables too then? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 23:37:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 67FB8D70; Thu, 26 Mar 2015 23:37:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53058C79; Thu, 26 Mar 2015 23:37:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QNb4uT062762; Thu, 26 Mar 2015 23:37:04 GMT (envelope-from rodrigc@FreeBSD.org) Received: (from rodrigc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QNb4r2062761; Thu, 26 Mar 2015 23:37:04 GMT (envelope-from rodrigc@FreeBSD.org) Message-Id: <201503262337.t2QNb4r2062761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rodrigc set sender to rodrigc@FreeBSD.org using -f From: Craig Rodrigues Date: Thu, 26 Mar 2015 23:37:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280719 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 23:37:04 -0000 Author: rodrigc Date: Thu Mar 26 23:37:03 2015 New Revision: 280719 URL: https://svnweb.freebsd.org/changeset/base/280719 Log: Add --sysroot to the compiler flags for clang or gcc external toolchains Before this fix, --sysroot was only added to the compiler flags if a clang external toolchain was used. Reviewed by: imp Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Mar 26 22:50:35 2015 (r280718) +++ head/Makefile.inc1 Thu Mar 26 23:37:03 2015 (r280719) @@ -384,9 +384,9 @@ DEPFLAGS+= -I${WORLDTMP}/usr/include/c++ TARGET_ABI?= unknown TARGET_TRIPLE?= ${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XCFLAGS+= -target ${TARGET_TRIPLE} +.endif XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} XCXXFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} -.endif .else .if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${CROSS_BINUTILS_PREFIX} From owner-svn-src-all@FreeBSD.ORG Thu Mar 26 23:40:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B1083122; Thu, 26 Mar 2015 23:40:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C06BCA8; Thu, 26 Mar 2015 23:40:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2QNeNtZ063282; Thu, 26 Mar 2015 23:40:23 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2QNeNfS063281; Thu, 26 Mar 2015 23:40:23 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201503262340.t2QNeNfS063281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 26 Mar 2015 23:40:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280720 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Mar 2015 23:40:23 -0000 Author: ae Date: Thu Mar 26 23:40:22 2015 New Revision: 280720 URL: https://svnweb.freebsd.org/changeset/base/280720 Log: Fix a possible mbuf leak on interface departure. Reported by: Alexandre Martins Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Thu Mar 26 23:37:03 2015 (r280719) +++ head/sys/net/if_lagg.c Thu Mar 26 23:40:22 2015 (r280720) @@ -1669,7 +1669,11 @@ lagg_input(struct ifnet *ifp, struct mbu ETHER_BPF_MTAP(scifp, m); - m = (lp->lp_detaching == 0) ? lagg_proto_input(sc, lp, m) : NULL; + if (lp->lp_detaching != 0) { + m_freem(m); + m = NULL; + } else + m = lagg_proto_input(sc, lp, m); if (m != NULL) { if (scifp->if_flags & IFF_MONITOR) { From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 00:12:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1842AE21; Fri, 27 Mar 2015 00:12:48 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1564100; Fri, 27 Mar 2015 00:12:47 +0000 (UTC) Received: from [192.168.1.73] (75-48-79-118.lightspeed.cncrca.sbcglobal.net [75.48.79.118]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B4739B913; Thu, 26 Mar 2015 20:12:45 -0400 (EDT) Message-ID: <5514A07B.70302@FreeBSD.org> Date: Thu, 26 Mar 2015 17:12:43 -0700 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Randall Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: Re: svn commit: r280455 - in stable/10: lib/libpmc sys/amd64/conf sys/dev/hwpmc sys/sys usr.sbin usr.sbin/pmcstudy References: <201503242000.t2OK0Cbg065573@svn.freebsd.org> In-Reply-To: <201503242000.t2OK0Cbg065573@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 26 Mar 2015 20:12:46 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 00:12:48 -0000 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 The change to GENERIC looks like it slipped in by accident? Neither of the commits to HEAD enabled hwpmc in GENERIC AFAICT. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 00:37:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 87E368A4; Fri, 27 Mar 2015 00:37:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5848536C; Fri, 27 Mar 2015 00:37:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R0bgU9091803; Fri, 27 Mar 2015 00:37:42 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R0bg6g091798; Fri, 27 Mar 2015 00:37:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201503270037.t2R0bg6g091798@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 27 Mar 2015 00:37:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280721 - in head: etc/defaults etc/periodic/daily share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 00:37:43 -0000 Author: jhb Date: Fri Mar 27 00:37:41 2015 New Revision: 280721 URL: https://svnweb.freebsd.org/changeset/base/280721 Log: Allow additional flags to be passed to netstat -i in the daily status check. In particular, this allows an administrator to specify "-h" for human readable output if that is preferred. The default setting passes "-d", so that can be excluded by using a custom setting. Differential Revision: https://reviews.freebsd.org/D2034 Submitted by: Lystopad Aleksandr (patch to add option for -h) Reviewed by: bz MFC after: 1 week Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/420.status-network head/share/man/man5/periodic.conf.5 Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Thu Mar 26 23:40:22 2015 (r280720) +++ head/etc/defaults/periodic.conf Fri Mar 27 00:37:41 2015 (r280721) @@ -113,6 +113,7 @@ daily_status_gconcat_enable="NO" # Che # 420.status-network daily_status_network_enable="YES" # Check network status daily_status_network_usedns="YES" # DNS lookups are ok +daily_status_network_netstat_flags="-d" # netstat(1) flags # 430.status-rwho daily_status_rwho_enable="YES" # Check system status Modified: head/etc/periodic/daily/420.status-network ============================================================================== --- head/etc/periodic/daily/420.status-network Thu Mar 26 23:40:22 2015 (r280720) +++ head/etc/periodic/daily/420.status-network Fri Mar 27 00:37:41 2015 (r280721) @@ -16,12 +16,14 @@ case "$daily_status_network_enable" in echo "" echo "Network interface status:" + flags="${daily_status_network_netstat_flags}" case "$daily_status_network_usedns" in [Yy][Ee][Ss]) - netstat -id && rc=0 || rc=3;; + ;; *) - netstat -idn && rc=0 || rc=3;; - esac;; + flags="${flags} -n";; + esac + netstat -i ${flags} && rc=0 || rc=3;; *) rc=0;; esac Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Thu Mar 26 23:40:22 2015 (r280720) +++ head/share/man/man5/periodic.conf.5 Fri Mar 27 00:37:41 2015 (r280721) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2015 +.Dd March 26, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -401,6 +401,16 @@ Set to .Dq Li YES if you want to run .Nm netstat Fl i . +.It Va daily_status_network_netstat_flags +.Pq Vt str +Set to additional arguments for the +.Xr netstat 1 +utility when +.Va daily_status_network_enable +is set to +.Dq Li YES . +The default is +.Fl d . .It Va daily_status_network_usedns .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 00:40:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D6959A5C; Fri, 27 Mar 2015 00:40:31 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 80CD438F; Fri, 27 Mar 2015 00:40:31 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 63A34D6384D; Fri, 27 Mar 2015 11:40:28 +1100 (AEDT) Date: Fri, 27 Mar 2015 11:40:27 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: "Pedro F. Giffuni" Subject: Re: svn commit: r280700 - head/sys/sys In-Reply-To: <201503261600.t2QG0as2045101@svn.freebsd.org> Message-ID: <20150327104018.D994@besplex.bde.org> References: <201503261600.t2QG0as2045101@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=9wEU9czeM3SnHlj6lUEA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 00:40:32 -0000 On Thu, 26 Mar 2015, Pedro F. Giffuni wrote: > Log: > Introduce some allocation function attributes. > > Bring support for two gcc function attributes that are likely to be used > in our system headers: > ... > The __alloc_size attribute required some workarounds for lint(1). > Both attributes are supported by clang. It is broken for all non-C99 compilers, the same as __nonull(). lint may be one of these, depending on implementation details and on how well it supports non-C99 mode (I think it knows almost nothing of C99, but uses cpp and is not careful to kill C99 features). FreeBSD even has a non-C90 compiler (modulo bugs). It is named c89. Even the compilers that implement most of C99 have a C90 mode. This is specifed by the compiler flag -std=c89 or -std=gnu89. The follow breakage happens for ... and/or __VA_ARGS__: - c89 -E on ... alone q.c:1:13: warning: variadic macros are a C99 feature [-Wvariadic-macros] #define foo(...) ^ foo(1, 2, 3) then expands to nothing. - c89 -E on ... and __VA_ARGS__: Same warning. __VA_ARGS__ then expands as in C99. - clang -E -std=c89: Same as in C99. -std=c89 is not very std. - clang -E -std=c89 -pedantic Same as for c89. c89 uses -pedantic so as to be more std. - gcc295 -E -std=c89: z.c:1: warning: invalid character in macro parameter name z.c:1: badly punctuated parameter list in `#define' foo(1, 2, 3) then expands to nothing for the empty macro and __VA_ARGS__ expands as in C99. -std=c89 actually works for gcc295 - gcc34 -E -std=c89 [-pedantic], - gcc42 -E -std=c89 [-pedantic]: Like clang, but with a better error message: q.c:1:13: warning: anonymous variadic macros were introduced in C99 - gcc48 -E -std=c89 [-pedantic]: Like clang, except the error message has not regressed so far (it is verbose as in clang, but missing colorization). - TenDRA 5.0.0 (an actual C90 compiler. I sometimes use this for its better diagnostics. Though very verbose, the references to C90 section numbers are useful): "z4.c", line 1: Error: [ISO C90 6.8.3]: Badly punctuated parameters for macro 'foo'. "z4.c", line 3: Error: [ISO C90 6.8.3]: Macro 'foo' applied with 3 arguments, not 0. TenDRA has its own headers which are very clean, but to use it even to do syntax checks, you have to use the system headers (tcc -Ysystem). > Modified: head/sys/sys/cdefs.h > ============================================================================== > --- head/sys/sys/cdefs.h Thu Mar 26 15:54:54 2015 (r280699) > +++ head/sys/sys/cdefs.h Thu Mar 26 16:00:35 2015 (r280700) > @@ -209,6 +212,7 @@ > #define __unused > #define __packed > #define __aligned(x) > +#define __alloc_size(...) > #define __section(x) > #define __weak > #else The first bug is here. This is for lint. This is supposed to give a null macro, but actually gives a syntax error except for C99 compilers. > @@ -233,6 +237,11 @@ > #define __aligned(x) __attribute__((__aligned__(x))) > #define __section(x) __attribute__((__section__(x))) > #endif > +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) > +#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) This is broken by namespace pollution. alloc_size is in the application namespace. It must be spelled with underscores like all the other attributes in the macros. The "..." in this is broken in c89 mode. Passing the #if only guarantees that the attribute is supported. It doesn't guarantee that "..." is supported. The name of the attribute may be relevant here too. We want most the special macros to work in c89 and other strict standard modes. Their names are spelled with underscores to make this possible. Standard modes turn off gcc features like asm() and even "inline". Perhaps they do the same for alloc_size(). > +#else > +#define __alloc_size(...) > +#endif Similarly for all hard-coded uses of "...". This #else clause is supposed to give compatibility for all compilers that don't support alloc_size(). But most of these compilers also don't support "...", so this almost never works. > @@ -363,8 +372,10 @@ > > #if __GNUC_PREREQ__(3, 4) > #define __fastcall __attribute__((__fastcall__)) > +#define __result_use_check __attribute__((__warn_unused_result__)) > #else > #define __fastcall > +#define __result_use_check > #endif Changes like this are correct since they don't depend on compiler-[option]- dependent syntactic features. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 00:42:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0A48BBF; Fri, 27 Mar 2015 00:42:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1029622; Fri, 27 Mar 2015 00:42:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R0gqxx095837; Fri, 27 Mar 2015 00:42:52 GMT (envelope-from ken@FreeBSD.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R0gqFQ095836; Fri, 27 Mar 2015 00:42:52 GMT (envelope-from ken@FreeBSD.org) Message-Id: <201503270042.t2R0gqFQ095836@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ken set sender to ken@FreeBSD.org using -f From: "Kenneth D. Merry" Date: Fri, 27 Mar 2015 00:42:52 +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: r280722 - stable/10/sys/cam/ctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 00:42:53 -0000 Author: ken Date: Fri Mar 27 00:42:51 2015 New Revision: 280722 URL: https://svnweb.freebsd.org/changeset/base/280722 Log: MFC revision 280463 ------------------------------------------------------------------------ r280463 | ken | 2015-03-24 15:42:28 -0600 (Tue, 24 Mar 2015) | 5 lines Remove some #if 0'ed code that apparently confuses cscope. Requested by: Peter Xu MFC after: 3 days ------------------------------------------------------------------------ Sponsored by: Spectra Logic Modified: stable/10/sys/cam/ctl/ctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ctl/ctl.c ============================================================================== --- stable/10/sys/cam/ctl/ctl.c Fri Mar 27 00:37:41 2015 (r280721) +++ stable/10/sys/cam/ctl/ctl.c Fri Mar 27 00:42:51 2015 (r280722) @@ -12154,9 +12154,6 @@ ctl_lun_reset(struct ctl_lun *lun, union /* * Run through the OOA queue and abort each I/O. */ -#if 0 - TAILQ_FOREACH((struct ctl_io_hdr *)xio, &lun->ooa_queue, ooa_links) { -#endif for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { xio->io_hdr.flags |= CTL_FLAG_ABORT | CTL_FLAG_ABORT_STATUS; @@ -12337,9 +12334,6 @@ ctl_abort_task(union ctl_io *io) * untagged command to abort, simply abort the first untagged command * we come to. We only allow one untagged command at a time of course. */ -#if 0 - TAILQ_FOREACH((struct ctl_io_hdr *)xio, &lun->ooa_queue, ooa_links) { -#endif for (xio = (union ctl_io *)TAILQ_FIRST(&lun->ooa_queue); xio != NULL; xio = (union ctl_io *)TAILQ_NEXT(&xio->io_hdr, ooa_links)) { #if 0 @@ -12377,7 +12371,7 @@ ctl_abort_task(union ctl_io *io) #if 0 if (((xio->scsiio.tag_type == CTL_TAG_UNTAGGED) && (io->taskio.tag_type == CTL_TAG_UNTAGGED)) - || (xio->scsiio.tag_num == io->taskio.tag_num)) { + || (xio->scsiio.tag_num == io->taskio.tag_num)) #endif /* * XXX KDM we've got problems with FC, because it From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 01:29:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D78815BC for ; Fri, 27 Mar 2015 01:29:00 +0000 (UTC) Received: from nm28.bullet.mail.bf1.yahoo.com (nm28.bullet.mail.bf1.yahoo.com [98.139.212.187]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8A15AA22 for ; Fri, 27 Mar 2015 01:29:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427419738; bh=+Zm2L2dj4emWqg91Cd3XpzAheHaT742fFh4s8LVKSaE=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject; b=ewKDX3yzHNG1nwrvEbMm5mXZEFpQRDQrNOGEFEjVaGOkA3EWB97h2bFJFqK/i6cpqqHei/lWd69nsouGUSFLPeN4hr13cCV3wfIwUWt3h7Po2V/nDi8tUGnaQcCqRjK/Ppp6ZdtbV3nr+Oc7UzH72p4FlRnbQysRHZ1RiqoNy6mjiNzCeMFGFpe58UHuDVhxotZDD5bYrDuqyeqVrApgk8Z0+ceuDT9xud/KqRUxzb0gHuFrBEDvOXaCJah5tabnbAFsMbRk1GWNI528KqAxoDqxEDck5U7XuLpcy6zlQl1fMRssgO3uk1sGOb8wLa+ph2zKmTajEsD5YVjFtfmB7g== Received: from [98.139.170.178] by nm28.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2015 01:28:58 -0000 Received: from [98.139.213.14] by tm21.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2015 01:28:58 -0000 Received: from [127.0.0.1] by smtp114.mail.bf1.yahoo.com with NNFMP; 27 Mar 2015 01:28:58 -0000 X-Yahoo-Newman-Id: 747230.74692.bm@smtp114.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Eao.k9MVM1m2rNkeaBcUeXHZQYiAK1WOMtwOC0uz2RhBYfI kHCOCae29ytWqvt7.FxPOhdX8Jxg04Zj7F9rvu4WWxJ6w6FtF4DWS9FRucHl kZ9BfoXrCE_LV_HPmoyJKIULEmlK8lvt0iFCOc8WqsCXaDj_lFDiqRWmuiyz lp_zwvL3BXgVxaki92rNta9kfUILBRFiZGSmGb5prKFKTl6HhAH7XZd1jBGX 9fb2ntdlHA6vb6CJQ2qvV1iwq7u4VviRKoM4EBvKtPQN4CPhT6fswh22p.Cx xR4sv6Sc5DROWrR1657fKbPAx0g_63cNeBmrriTYlu2CAntfCv3QU0x96l6. xAznR1TOkFnIt6fRIHjw4yu.bZpgS5fa2wQSQJwht8gO1IXikH8NOBrccQCE 1xWu4BsVOmrpKh5HIQY72_tRhNEHHY4z6UTyvsgUtDBhG_xGVf3_srnlLQQl wMGCKLKSz6GRbNtGVFwxtRaa2jAU8g9bkAcujsrY8b766MOCb.o76gQAx0rG OLqWedtEaAkwrbfUYY5V3APJV_Q4lLOkd X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280700 - head/sys/sys From: Pedro Giffuni In-Reply-To: <20150327104018.D994@besplex.bde.org> Date: Thu, 26 Mar 2015 20:28:54 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <2EC15229-DE96-4200-A905-803028B22707@FreeBSD.org> References: <201503261600.t2QG0as2045101@svn.freebsd.org> <20150327104018.D994@besplex.bde.org> To: Bruce Evans X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 01:29:00 -0000 > Il giorno 26/mar/2015, alle ore 19:40, Bruce Evans = ha scritto: >=20 > On Thu, 26 Mar 2015, Pedro F. Giffuni wrote: >=20 >> Log: >> Introduce some allocation function attributes. >>=20 >> Bring support for two gcc function attributes that are likely to be = used >> in our system headers: >> ... >> The __alloc_size attribute required some workarounds for lint(1). >> Both attributes are supported by clang. >=20 > It is broken for all non-C99 compilers, the same as __nonull(). lint > may be one of these, depending on implementation details and on how > well it supports non-C99 mode (I think it knows almost nothing of > C99, but uses cpp and is not careful to kill C99 features). >=20 It is not a bug, it=E2=80=99s a feature. I did check and variadic macros were introduced in gcc 2.95. the = __nonnull() stuff requires gcc 3.3. __alloc_size requires gcc 4.3. All compilers we = use in base and support in FreeBSD have the feature. For the base system it doesn=E2=80=99t really make sense to hold new = features to support inferior compilers. If you need an older compiler it may be = perhaps to support a new platform and I recall gcc 2.95 doesn=E2=80=99t even = support amd64. > FreeBSD even has a non-C90 compiler (modulo bugs). It is named c89. = Even the compilers that implement most of C99 have a C90 mode. This > is specifed by the compiler flag -std=3Dc89 or -std=3Dgnu89. >=20 OK. you can cause breakage by using old modes.This may have to be = evaluated running an exp run on the ports tree. =20 > The follow breakage happens for ... and/or __VA_ARGS__: >=20 > - c89 -E on ... alone > q.c:1:13: warning: variadic macros are a C99 feature = [-Wvariadic-macros] > #define foo(...) > ^ > foo(1, 2, 3) then expands to nothing. >=20 > - c89 -E on ... and __VA_ARGS__: > Same warning. __VA_ARGS__ then expands as in C99. >=20 > - clang -E -std=3Dc89: > Same as in C99. -std=3Dc89 is not very std. >=20 > - clang -E -std=3Dc89 -pedantic > Same as for c89. c89 uses -pedantic so as to be more std. >=20 > - gcc295 -E -std=3Dc89: > z.c:1: warning: invalid character in macro parameter name > z.c:1: badly punctuated parameter list in `#define' >=20 > foo(1, 2, 3) then expands to nothing for the empty macro > and __VA_ARGS__ expands as in C99. -std=3Dc89 actually works > for gcc295 >=20 > - gcc34 -E -std=3Dc89 [-pedantic], > - gcc42 -E -std=3Dc89 [-pedantic]: > Like clang, but with a better error message: >=20 > q.c:1:13: warning: anonymous variadic macros were introduced in C99 >=20 > - gcc48 -E -std=3Dc89 [-pedantic]: > Like clang, except the error message has not regressed so far (it > is verbose as in clang, but missing colorization). >=20 The above are all warnings. You can usually get around those by setting options and those won=E2=80=99t stop your code from building. > - TenDRA 5.0.0 (an actual C90 compiler. I sometimes use this for its > better diagnostics. Though very verbose, the references to C90 > section numbers are useful): >=20 TenDRA is awesome. I recall it uses it=E2=80=99s own C headers with = different compatibility modes so it won=E2=80=99t be affected by cdefs.h and the use of such macros in = our headers. > "z4.c", line 1: Error: > [ISO C90 6.8.3]: Badly punctuated parameters for macro 'foo'. >=20 > "z4.c", line 3: Error: > [ISO C90 6.8.3]: Macro 'foo' applied with 3 arguments, not 0. >=20 > TenDRA has its own headers which are very clean, but to use it > even to do syntax checks, you have to use the system headers > (tcc -Ysystem). >=20 >> Modified: head/sys/sys/cdefs.h >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/sys/cdefs.h Thu Mar 26 15:54:54 2015 = (r280699) >> +++ head/sys/sys/cdefs.h Thu Mar 26 16:00:35 2015 = (r280700) >> @@ -209,6 +212,7 @@ >> #define __unused >> #define __packed >> #define __aligned(x) >> +#define __alloc_size(...) >> #define __section(x) >> #define __weak >> #else >=20 > The first bug is here. This is for lint. This is supposed to give a > null macro, but actually gives a syntax error except for C99 = compilers. >=20 I tried to update lint and fix it. I did the former and I failed the = later. Other BSDs (Dragonfly and OpenBSD) were less patient ;). Compilers without some level of C99 compliance are likely to have much = bigger problems to compile FreeBSD. If someone with real need for such support submits s = fix I=E2=80=99ll be glad to commit it, but at this time I would really like to use __alloc_size( = 1, 2) for calloc(). >> @@ -233,6 +237,11 @@ >> #define __aligned(x) __attribute__((__aligned__(x))) >> #define __section(x) __attribute__((__section__(x))) >> #endif >> +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) >> +#define __alloc_size(...) = __attribute__((alloc_size(__VA_ARGS__))) >=20 > This is broken by namespace pollution. alloc_size is in the = application > namespace. It must be spelled with underscores like all the other > attributes in the macros. >=20 I overlooked that, thank you! > The "..." in this is broken in c89 mode. Passing the #if only = guarantees > that the attribute is supported. It doesn't guarantee that "..." is > supported. The name of the attribute may be relevant here too. We = want > most the special macros to work in c89 and other strict standard = modes. > Their names are spelled with underscores to make this possible. = Standard > modes turn off gcc features like asm() and even "inline". Perhaps = they > do the same for alloc_size(). >=20 >> +#else >> +#define __alloc_size(...) >> +#endif >=20 > Similarly for all hard-coded uses of "...". This #else clause is = supposed > to give compatibility for all compilers that don't support = alloc_size(). > But most of these compilers also don't support "...", so this almost > never works. >=20 >> @@ -363,8 +372,10 @@ >>=20 >> #if __GNUC_PREREQ__(3, 4) >> #define __fastcall __attribute__((__fastcall__)) >> +#define __result_use_check = __attribute__((__warn_unused_result__)) >> #else >> #define __fastcall >> +#define __result_use_check >> #endif >=20 > Changes like this are correct since they don't depend on = compiler-[option]- > dependent syntactic features. >=20 Pedro. From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 01:58:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E101BF6E; Fri, 27 Mar 2015 01:58:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B21FDD24; Fri, 27 Mar 2015 01:58:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R1wkTq028895; Fri, 27 Mar 2015 01:58:46 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R1wj6Y028888; Fri, 27 Mar 2015 01:58:45 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201503270158.t2R1wj6Y028888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Fri, 27 Mar 2015 01:58:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280725 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 01:58:47 -0000 Author: grehan Date: Fri Mar 27 01:58:44 2015 New Revision: 280725 URL: https://svnweb.freebsd.org/changeset/base/280725 Log: Move legacy interrupt allocation for virtio devices to common code. There are a number of assumptions about legacy interrupts always being available in virtio so don't allow back-ends to make the decision to support them. This fixes the issue seen with virtio-rnd on OpenBSD. MSI-x vectors were not being used, and the virtio-rnd backend wasn't allocating a legacy interrupt resulting in a bhyve assert and guest exit. Reported by: Julian Hsiao, madoka at nyanisore dot net Reviewed by: neel MFC after: 1 week Modified: head/usr.sbin/bhyve/pci_virtio_block.c head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/virtio.c Modified: head/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 01:48:54 2015 (r280724) +++ head/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 01:58:44 2015 (r280725) @@ -370,8 +370,6 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_STORAGE); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_BLOCK); - pci_lintr_request(pi); - if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) { blockif_close(sc->bc); free(sc); Modified: head/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_net.c Fri Mar 27 01:48:54 2015 (r280724) +++ head/usr.sbin/bhyve/pci_virtio_net.c Fri Mar 27 01:58:44 2015 (r280725) @@ -640,8 +640,6 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); - pci_lintr_request(pi); - /* link always up */ sc->vsc_config.status = 1; Modified: head/usr.sbin/bhyve/virtio.c ============================================================================== --- head/usr.sbin/bhyve/virtio.c Fri Mar 27 01:48:54 2015 (r280724) +++ head/usr.sbin/bhyve/virtio.c Fri Mar 27 01:58:44 2015 (r280725) @@ -148,8 +148,13 @@ vi_intr_init(struct virtio_softc *vs, in return (1); } else vs->vs_flags &= ~VIRTIO_USE_MSIX; + /* Only 1 MSI vector for bhyve */ pci_emul_add_msicap(vs->vs_pi, 1); + + /* Legacy interrupts are mandatory for virtio devices */ + pci_lintr_request(vs->vs_pi); + return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 02:01:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BC2164; Fri, 27 Mar 2015 02:01:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9A40DCA; Fri, 27 Mar 2015 02:01:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R21NrX030362; Fri, 27 Mar 2015 02:01:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R21NvR030361; Fri, 27 Mar 2015 02:01:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201503270201.t2R21NvR030361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 27 Mar 2015 02:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280726 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 02:01:24 -0000 Author: pfg Date: Fri Mar 27 02:01:22 2015 New Revision: 280726 URL: https://svnweb.freebsd.org/changeset/base/280726 Log: Fix __size_alloc() Use underscore for the attributes name: this should fix the use of the attributes in macros for lint(1). Suggested by: bde X-MFC with: r280700 Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Fri Mar 27 01:58:44 2015 (r280725) +++ head/sys/sys/cdefs.h Fri Mar 27 02:01:22 2015 (r280726) @@ -212,7 +212,6 @@ #define __unused #define __packed #define __aligned(x) -#define __alloc_size(...) #define __section(x) #define __weak #else @@ -237,11 +236,6 @@ #define __aligned(x) __attribute__((__aligned__(x))) #define __section(x) __attribute__((__section__(x))) #endif -#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) -#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) -#else -#define __alloc_size(...) -#endif #if defined(__INTEL_COMPILER) #define __dead2 __attribute__((__noreturn__)) #define __pure2 __attribute__((__const__)) @@ -384,6 +378,12 @@ #define __returns_twice #endif +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) +#define __alloc_size(...) __attribute__((__alloc_size__(__VA_ARGS__))) +#else +#define __alloc_size(...) +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define __func__ NULL From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 02:35:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAD9B7D2; Fri, 27 Mar 2015 02:35:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C449CE; Fri, 27 Mar 2015 02:35:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R2ZC6Q047156; Fri, 27 Mar 2015 02:35:12 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R2ZCwp047154; Fri, 27 Mar 2015 02:35:12 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201503270235.t2R2ZCwp047154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Mar 2015 02:35:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280727 - in head: share/mk sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 02:35:12 -0000 Author: imp Date: Fri Mar 27 02:35:11 2015 New Revision: 280727 URL: https://svnweb.freebsd.org/changeset/base/280727 Log: Add support for specifying unsupported / broken options that override any defaults or user specified actions on the command line. This would be useful for specifying features that are always broken or that cannot make sense on a specific architecture, like ACPI on pc98 or EISA on !i386 (!x86 usage of EISA is broken and there's no supported hardware that could have it in any event). Any items in __ALWAYS_NO_OPTIONS are forced to "no" regardless of other settings. Differential Revision: https://reviews.freebsd.org/D2011 Modified: head/share/mk/bsd.mkopt.mk head/sys/conf/kern.opts.mk Modified: head/share/mk/bsd.mkopt.mk ============================================================================== --- head/share/mk/bsd.mkopt.mk Fri Mar 27 02:01:22 2015 (r280726) +++ head/share/mk/bsd.mkopt.mk Fri Mar 27 02:35:11 2015 (r280727) @@ -67,6 +67,15 @@ MK_${var}:= no # MK_* options which are always no, usually because they are # unsupported/badly broken on this architecture. # +.for var in ${__ALWAYS_NO_OPTIONS} +MK_${var}:= no +.endfor +.undef __ALWAYS_NO_OPTIONS + +# +# MK_* options which are always no, usually because they are +# unsupported/badly broken on this architecture. +# .for var in ${BROKEN_OPTIONS} MK_${var}:= no .endfor Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Fri Mar 27 02:01:22 2015 (r280726) +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015 (r280727) @@ -120,6 +120,16 @@ MK_${var}:= no #end of bsd.mkopt.mk expanded inline. # +# MK_* options which are always no, usually because they are +# unsupported/badly broken on this architecture. +# +.for var in ${__ALWAYS_NO_OPTIONS} +MK_${var}:= no +.endfor +.undef __ALWAYS_NO_OPTIONS +#end of bsd.mkopt.mk expanded inline. + +# # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 02:35:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D63D890E; Fri, 27 Mar 2015 02:35:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1A7AD3; Fri, 27 Mar 2015 02:35:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R2ZQLb047221; Fri, 27 Mar 2015 02:35:26 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R2ZQeA047220; Fri, 27 Mar 2015 02:35:26 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201503270235.t2R2ZQeA047220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Mar 2015 02:35:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280728 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 02:35:26 -0000 Author: imp Date: Fri Mar 27 02:35:25 2015 New Revision: 280728 URL: https://svnweb.freebsd.org/changeset/base/280728 Log: Categorize certain kernel builds as being broken in certain places. Differential Revision: https://reviews.freebsd.org/D2011 Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015 (r280727) +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:25 2015 (r280728) @@ -75,6 +75,34 @@ BROKEN_OPTIONS+= EISA BROKEN_OPTIONS+= OFED .endif +# Options that cannot be turned on this architecture, usually because +# of compilation or other issues so severe it cannot be used even +# on an experimental basis +__ALWAYS_NO_OPTIONS= + +# Things that don't work based on the CPU +.if ${MACHINE_CPUARCH} == "arm" +__ALWAYS_NO_OPTIONS+= CDDL ZFS +.endif + +.if ${MACHINE_CPUARCH} == "mips" +__ALWAYS_NO_OPTIONS+= CDDL ZFS +.endif + +.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpc64" +__ALWAYS_NO_OPTIONS+= ZFS +.endif + +# Things that don't work because the kernel doesn't have the support +# for them. +.if ${MACHINE} != "i386" +__ALWAYS_NO_OPTIONS+= EISA +.endif + +.if ${MACHINE} != "i386" && ${MACHINE} != "amd64" +__ALWAYS_NO_OPTIONS+= OFED +.endif + # expanded inline from bsd.mkopt.mk to avoid share/mk dependency # Those that default to yes From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 02:35:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7516A48; Fri, 27 Mar 2015 02:35:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2FC4D7; Fri, 27 Mar 2015 02:35:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R2ZYhe047274; Fri, 27 Mar 2015 02:35:34 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R2ZYma047273; Fri, 27 Mar 2015 02:35:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201503270235.t2R2ZYma047273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Mar 2015 02:35:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280729 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 02:35:34 -0000 Author: imp Date: Fri Mar 27 02:35:33 2015 New Revision: 280729 URL: https://svnweb.freebsd.org/changeset/base/280729 Log: sym and cxgb build on arm, add them to the build. Differential Revision: https://reviews.freebsd.org/D514 Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Mar 27 02:35:25 2015 (r280728) +++ head/sys/modules/Makefile Fri Mar 27 02:35:33 2015 (r280729) @@ -466,7 +466,7 @@ _syscons= syscons _vpo= vpo .endif -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if ${MACHINE_CPUARCH} != "mips" # no BUS_SPACE_UNSPECIFIED # No barrier instruction support (specific to this driver) _sym= sym From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 03:05:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4FF295F7; Fri, 27 Mar 2015 03:05:15 +0000 (UTC) Received: from st11p02mm-asmtp001.mac.com (st11p02mm-asmtp001.mac.com [17.172.220.236]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23F2F6EB; Fri, 27 Mar 2015 03:05:14 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp001.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NLU00A0NOJNJE50@st11p02mm-asmtp001.mac.com>; Fri, 27 Mar 2015 03:04:41 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-03-26_05:2015-03-26,2015-03-26,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1503270031 Content-type: text/plain; charset=us-ascii MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280728 - head/sys/conf From: Rui Paulo In-reply-to: <201503270235.t2R2ZQeA047220@svn.freebsd.org> Date: Thu, 26 Mar 2015 20:04:35 -0700 Content-transfer-encoding: quoted-printable Message-id: <2AF9E0A0-3B9B-4AF0-89B9-FEBA7FEFCA8B@me.com> References: <201503270235.t2R2ZQeA047220@svn.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 03:05:15 -0000 On Mar 26, 2015, at 19:35, Warner Losh wrote: >=20 > Author: imp > Date: Fri Mar 27 02:35:25 2015 > New Revision: 280728 > URL: https://svnweb.freebsd.org/changeset/base/280728 >=20 > Log: > Categorize certain kernel builds as being broken in certain places. >=20 > Differential Revision: https://reviews.freebsd.org/D2011 >=20 > Modified: > head/sys/conf/kern.opts.mk >=20 > Modified: head/sys/conf/kern.opts.mk > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015 = (r280727) > +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:25 2015 = (r280728) > @@ -75,6 +75,34 @@ BROKEN_OPTIONS+=3D EISA > BROKEN_OPTIONS+=3D OFED > .endif >=20 > +# Options that cannot be turned on this architecture, usually because > +# of compilation or other issues so severe it cannot be used even > +# on an experimental basis > +__ALWAYS_NO_OPTIONS=3D > + > +# Things that don't work based on the CPU > +.if ${MACHINE_CPUARCH} =3D=3D "arm" > +__ALWAYS_NO_OPTIONS+=3D CDDL ZFS > +.endif This isn't entirely true. With a properly tuned ARC and kmem size, ZFS = seems to work on a BeagleBone. There have been reports on the = freebsd-arm mailing list this month. Based on my understanding of your = previous commit, it looks like this can't be overridden which is a = problem. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 05:15:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D2C9647 for ; Fri, 27 Mar 2015 05:15:38 +0000 (UTC) Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) (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 204722C3 for ; Fri, 27 Mar 2015 05:15:37 +0000 (UTC) Received: by igcxg11 with SMTP id xg11so11254240igc.0 for ; Thu, 26 Mar 2015 22:15:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=e4PK8aJR8BvZNoz31K8kLEo8e9M1BJ7v6xa77FzVe+c=; b=LmyC52CVPOTVkErziHNSBrz4TAwOkOhFCPEzvt1PXK2z0xhNbkwdZAyjv8HGWrrOWX rPFByLj8TrjXB7pBmV2YqKrZXs2oE3Fq+rmcgfkBdnIWqvZMlwxyKcE0hDBkrjWJ8jdg Jw30IvNI0GofpPdCrZxtJ7Kv9BtizsJNoh1wxz4CTQgX9GtCoQNa05iHFCSy3gCZTu3D SrrjAd4zqoYS8qyUmdU3WQmDej7Li4FzOM9Z1x/ILMNtgcldQGw1t8iY7ZiLU1FcVM+Y QTGLojyW3JOGhLWQO8RpJxCEjuEsTYK4sn3fyRwETH2wcYaZi8O75RgNuSQh8KzJuZXC 4q9Q== X-Gm-Message-State: ALoCoQk1bd3rygkeFhLhNre9/Q1myktZCMvNblxcD340mYS9v6pmC9VeV+ceI6I9fITn/do7RZii X-Received: by 10.107.135.75 with SMTP id j72mr26840907iod.0.1427431450504; Thu, 26 Mar 2015 21:44:10 -0700 (PDT) Received: from netflix-mac.bsdimp.com ([50.253.99.174]) by mx.google.com with ESMTPSA id k9sm690190ige.6.2015.03.26.21.44.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 26 Mar 2015 21:44:09 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r280728 - head/sys/conf Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FABA8285-A2C0-4EAF-8274-7F37835C0CC4"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: <2AF9E0A0-3B9B-4AF0-89B9-FEBA7FEFCA8B@me.com> Date: Thu, 26 Mar 2015 22:44:08 -0600 Message-Id: References: <201503270235.t2R2ZQeA047220@svn.freebsd.org> <2AF9E0A0-3B9B-4AF0-89B9-FEBA7FEFCA8B@me.com> To: Rui Paulo X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 05:15:38 -0000 --Apple-Mail=_FABA8285-A2C0-4EAF-8274-7F37835C0CC4 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 26, 2015, at 9:04 PM, Rui Paulo wrote: >=20 > On Mar 26, 2015, at 19:35, Warner Losh wrote: >>=20 >> Author: imp >> Date: Fri Mar 27 02:35:25 2015 >> New Revision: 280728 >> URL: https://svnweb.freebsd.org/changeset/base/280728 >>=20 >> Log: >> Categorize certain kernel builds as being broken in certain places. >>=20 >> Differential Revision: https://reviews.freebsd.org/D2011 >>=20 >> Modified: >> head/sys/conf/kern.opts.mk >>=20 >> Modified: head/sys/conf/kern.opts.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015 = (r280727) >> +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:25 2015 = (r280728) >> @@ -75,6 +75,34 @@ BROKEN_OPTIONS+=3D EISA >> BROKEN_OPTIONS+=3D OFED >> .endif >>=20 >> +# Options that cannot be turned on this architecture, usually = because >> +# of compilation or other issues so severe it cannot be used even >> +# on an experimental basis >> +__ALWAYS_NO_OPTIONS=3D >> + >> +# Things that don't work based on the CPU >> +.if ${MACHINE_CPUARCH} =3D=3D "arm" >> +__ALWAYS_NO_OPTIONS+=3D CDDL ZFS >> +.endif >=20 > This isn't entirely true. With a properly tuned ARC and kmem size, = ZFS seems to work on a BeagleBone. There have been reports on the = freebsd-arm mailing list this month. Based on my understanding of your = previous commit, it looks like this can't be overridden which is a = problem. Yea, the ships passed in the night. I=E2=80=99ve had these changes in my = tree for a while. However, It kinda can be overridden by compiling the modules directly. = Since the actual module=E2=80=99s Makefiles don=E2=80=99t depend on this, I = think we=E2=80=99re OK. Can you test building a kernel on the BBB you have and let me know if it produces = working ZFS? Warner --Apple-Mail=_FABA8285-A2C0-4EAF-8274-7F37835C0CC4 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 iQIcBAEBCgAGBQJVFOAYAAoJEGwc0Sh9sBEAQ20P+wdYD6mPNGufXCsb+YdQ9T50 Dsp0d2aYyQ+aTt1CACd+sPOiYjdYZpRZNPkrvvT2uPTcbTAGSv0bdiaZ5Pp5qa42 7IIn2xNPL9tWDMs5GwlqmFwRsInmwbmYCFM8i8ppPHK+H1tdvFWSE0OtG7/w4hhj Q6uPYKEEZogRgQUWiobHCM0Dj5Qi//TNRzxcr13e3Ip1sPcMy2XimlmocV2gsRWD e1HfH+rc4HrAe5Tl+5HtVuuF66jK3/jpWEHIRkhRiPCn2KwRuJ1sHGyhgYKAp6te tK4vUdqC07eI9kGhAQGaQ7KVCMqP+jEGDxJsMcP597Qm7qIW6xGbj4tATl85wCYB pGE2uQsVThjfRrwkekL0zwvsgmU5LhE+bXLK+Yk4vFbVKD/1QXu1+mqwg9MuXLnB uC8xOy1My+W+BolwyluN/FPjLEyodz4m/csX9f/6rHaEz3vR+oGsJPEdGeLFLFiI lQK30BJ70J66KTIWji0p2Dajbrfc5OVu8IP27Qfpmb/i42d5VperQIMcSRy8BNyE 7/uD8pivOoBwuH0+ihXdzmxnbQZLU6hruWGb9qQ1ZQVqUzoJ/Q9UseXBv9eI+0Id BiWhwDNrApTjNMRQ9Di+FFEeMGCBMYxhsBq1mrNGxMYPQwQaRPJZhWINPQecUtkk tFfHMX3SNmiEKi+c6nRz =MQSJ -----END PGP SIGNATURE----- --Apple-Mail=_FABA8285-A2C0-4EAF-8274-7F37835C0CC4-- From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 07:55:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 882DECA3; Fri, 27 Mar 2015 07:55:24 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 39F5238A; Fri, 27 Mar 2015 07:55:24 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 3B07525D3AA0; Fri, 27 Mar 2015 07:55:12 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 946E4C76FE0; Fri, 27 Mar 2015 07:55:11 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 7_z6AAFwvpkF; Fri, 27 Mar 2015 07:55:09 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:5997:9da1:5d8e:de02] (unknown [IPv6:fde9:577b:c1a9:4410:5997:9da1:5d8e:de02]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 7C481C76FD0; Fri, 27 Mar 2015 07:55:09 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280728 - head/sys/conf From: "Bjoern A. Zeeb" In-Reply-To: <201503270235.t2R2ZQeA047220@svn.freebsd.org> Date: Fri, 27 Mar 2015 07:54:37 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201503270235.t2R2ZQeA047220@svn.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 07:55:24 -0000 > On 27 Mar 2015, at 02:35 , Warner Losh wrote: >=20 > Author: imp > Date: Fri Mar 27 02:35:25 2015 > New Revision: 280728 > URL: https://svnweb.freebsd.org/changeset/base/280728 >=20 > Log: > Categorize certain kernel builds as being broken in certain places. >=20 > Differential Revision: https://reviews.freebsd.org/D2011 >=20 > Modified: > head/sys/conf/kern.opts.mk >=20 > Modified: head/sys/conf/kern.opts.mk > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015 = (r280727) > +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:25 2015 = (r280728) > @@ -75,6 +75,34 @@ BROKEN_OPTIONS+=3D EISA > BROKEN_OPTIONS+=3D OFED > .endif >=20 > +# Options that cannot be turned on this architecture, usually because > +# of compilation or other issues so severe it cannot be used even > +# on an experimental basis > +__ALWAYS_NO_OPTIONS=3D > + > +# Things that don't work based on the CPU > +.if ${MACHINE_CPUARCH} =3D=3D "arm" > +__ALWAYS_NO_OPTIONS+=3D CDDL ZFS > +.endif > + > +.if ${MACHINE_CPUARCH} =3D=3D "mips" > +__ALWAYS_NO_OPTIONS+=3D CDDL ZFS > +.endif > + Wouldn=E2=80=99t this also mean no Dtrace on arm or mips? Please revert = this. =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:41:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACA4CBFC; Fri, 27 Mar 2015 08:41:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EEB2A84; Fri, 27 Mar 2015 08:41:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8foJ3019904; Fri, 27 Mar 2015 08:41:50 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8foL1019903; Fri, 27 Mar 2015 08:41:50 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270841.t2R8foL1019903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:41:50 +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: r280731 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:41:50 -0000 Author: mav Date: Fri Mar 27 08:41:49 2015 New Revision: 280731 URL: https://svnweb.freebsd.org/changeset/base/280731 Log: MFC r279975: Use ahci_write_fis_d2h() for commands completion. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 03:55:04 2015 (r280730) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:41:49 2015 (r280731) @@ -773,8 +773,8 @@ handle_identify(struct ahci_port *p, int hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); if (p->atapi || hdr->prdtl == 0) { - p->tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; - p->is |= AHCI_P_IX_TFE; + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); } else { uint16_t buf[256]; uint64_t sectors; @@ -852,19 +852,16 @@ handle_identify(struct ahci_port *p, int } ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); - p->tfd = ATA_S_DSC | ATA_S_READY; - p->is |= AHCI_P_IX_DP; - p->ci &= ~(1 << slot); + ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); } - ahci_generate_intr(p->pr_sc); } static void handle_atapi_identify(struct ahci_port *p, int slot, uint8_t *cfis) { if (!p->atapi) { - p->tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; - p->is |= AHCI_P_IX_TFE; + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); } else { uint16_t buf[256]; @@ -895,11 +892,8 @@ handle_atapi_identify(struct ahci_port * buf[88] = (1 << 14 | 0x7f); ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); - p->tfd = ATA_S_DSC | ATA_S_READY; - p->is |= AHCI_P_IX_DHR; - p->ci &= ~(1 << slot); + ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); } - ahci_generate_intr(p->pr_sc); } static void @@ -1480,9 +1474,7 @@ ahci_handle_cmd(struct ahci_port *p, int p->mult_sectors = cfis[12]; p->tfd = ATA_S_DSC | ATA_S_READY; } - p->is |= AHCI_P_IX_DP; - p->ci &= ~(1 << slot); - ahci_generate_intr(p->pr_sc); + ahci_write_fis_d2h(p, slot, cfis, p->tfd); break; case ATA_READ_DMA: case ATA_WRITE_DMA: @@ -1518,17 +1510,15 @@ ahci_handle_cmd(struct ahci_port *p, int break; case ATA_PACKET_CMD: if (!p->atapi) { - p->tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; - p->is |= AHCI_P_IX_TFE; - ahci_generate_intr(p->pr_sc); + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); } else handle_packet_cmd(p, slot, cfis); break; default: WPRINTF("Unsupported cmd:%02x\n", cfis[2]); - p->tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; - p->is |= AHCI_P_IX_TFE; - ahci_generate_intr(p->pr_sc); + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); break; } } From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:42:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCE57D3E; Fri, 27 Mar 2015 08:42:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE355A96; Fri, 27 Mar 2015 08:42:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8guQY020095; Fri, 27 Mar 2015 08:42:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8gurt020094; Fri, 27 Mar 2015 08:42:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270842.t2R8gurt020094@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:42:56 +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: r280732 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:42:57 -0000 Author: mav Date: Fri Mar 27 08:42:55 2015 New Revision: 280732 URL: https://svnweb.freebsd.org/changeset/base/280732 Log: MFC r279960: Add support for PIO variants of READ/WRITE commands for AHCI disks. AHCI API hides all PIO specifics, so this functionality is almost free. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:41:49 2015 (r280731) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:42:55 2015 (r280732) @@ -520,12 +520,14 @@ ahci_handle_dma(struct ahci_port *p, int readop = 1; prdt += seek; - if (cfis[2] == ATA_WRITE_DMA || cfis[2] == ATA_WRITE_DMA48 || - cfis[2] == ATA_WRITE_FPDMA_QUEUED) + if (cfis[2] == ATA_WRITE || cfis[2] == ATA_WRITE48 || + cfis[2] == ATA_WRITE_MUL || cfis[2] == ATA_WRITE_MUL48 || + cfis[2] == ATA_WRITE_DMA || cfis[2] == ATA_WRITE_DMA48 || + cfis[2] == ATA_WRITE_FPDMA_QUEUED) readop = 0; if (cfis[2] == ATA_WRITE_FPDMA_QUEUED || - cfis[2] == ATA_READ_FPDMA_QUEUED) { + cfis[2] == ATA_READ_FPDMA_QUEUED) { lba = ((uint64_t)cfis[10] << 40) | ((uint64_t)cfis[9] << 32) | ((uint64_t)cfis[8] << 24) | @@ -536,7 +538,9 @@ ahci_handle_dma(struct ahci_port *p, int if (!len) len = 65536; ncq = 1; - } else if (cfis[2] == ATA_READ_DMA48 || cfis[2] == ATA_WRITE_DMA48) { + } else if (cfis[2] == ATA_READ48 || cfis[2] == ATA_WRITE48 || + cfis[2] == ATA_READ_MUL48 || cfis[2] == ATA_WRITE_MUL48 || + cfis[2] == ATA_READ_DMA48 || cfis[2] == ATA_WRITE_DMA48) { lba = ((uint64_t)cfis[10] << 40) | ((uint64_t)cfis[9] << 32) | ((uint64_t)cfis[8] << 24) | @@ -1476,6 +1480,14 @@ ahci_handle_cmd(struct ahci_port *p, int } ahci_write_fis_d2h(p, slot, cfis, p->tfd); break; + case ATA_READ: + case ATA_WRITE: + case ATA_READ48: + case ATA_WRITE48: + case ATA_READ_MUL: + case ATA_WRITE_MUL: + case ATA_READ_MUL48: + case ATA_WRITE_MUL48: case ATA_READ_DMA: case ATA_WRITE_DMA: case ATA_READ_DMA48: From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:43:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6031E75; Fri, 27 Mar 2015 08:43:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0826AA0; Fri, 27 Mar 2015 08:43:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8hkap020260; Fri, 27 Mar 2015 08:43:46 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8hkxL020256; Fri, 27 Mar 2015 08:43:46 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270843.t2R8hkxL020256@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:43:46 +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: r280733 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:43:46 -0000 Author: mav Date: Fri Mar 27 08:43:45 2015 New Revision: 280733 URL: https://svnweb.freebsd.org/changeset/base/280733 Log: MFC r279965: Polish AHCI disk identify data and fix speed negotiation. Modified: stable/10/usr.sbin/bhyve/ahci.h stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/ahci.h ============================================================================== --- stable/10/usr.sbin/bhyve/ahci.h Fri Mar 27 08:42:55 2015 (r280732) +++ stable/10/usr.sbin/bhyve/ahci.h Fri Mar 27 08:43:45 2015 (r280733) @@ -96,13 +96,14 @@ #define ATA_SS_SPD_NO_SPEED 0x00000000 #define ATA_SS_SPD_GEN1 0x00000010 #define ATA_SS_SPD_GEN2 0x00000020 -#define ATA_SS_SPD_GEN3 0x00000040 +#define ATA_SS_SPD_GEN3 0x00000030 #define ATA_SS_IPM_MASK 0x00000f00 #define ATA_SS_IPM_NO_DEVICE 0x00000000 #define ATA_SS_IPM_ACTIVE 0x00000100 #define ATA_SS_IPM_PARTIAL 0x00000200 #define ATA_SS_IPM_SLUMBER 0x00000600 +#define ATA_SS_IPM_DEVSLEEP 0x00000800 #define ATA_SERROR 14 #define ATA_SE_DATA_CORRECTED 0x00000001 @@ -133,17 +134,19 @@ #define ATA_SC_SPD_NO_SPEED 0x00000000 #define ATA_SC_SPD_SPEED_GEN1 0x00000010 #define ATA_SC_SPD_SPEED_GEN2 0x00000020 -#define ATA_SC_SPD_SPEED_GEN3 0x00000040 +#define ATA_SC_SPD_SPEED_GEN3 0x00000030 #define ATA_SC_IPM_MASK 0x00000f00 #define ATA_SC_IPM_NONE 0x00000000 #define ATA_SC_IPM_DIS_PARTIAL 0x00000100 #define ATA_SC_IPM_DIS_SLUMBER 0x00000200 +#define ATA_SC_IPM_DIS_DEVSLEEP 0x00000400 #define ATA_SACTIVE 16 #define AHCI_MAX_PORTS 32 #define AHCI_MAX_SLOTS 32 +#define AHCI_MAX_IRQS 16 /* SATA AHCI v1.0 register defines */ #define AHCI_CAP 0x00 @@ -208,6 +211,9 @@ #define AHCI_CAP2_BOH 0x00000001 #define AHCI_CAP2_NVMP 0x00000002 #define AHCI_CAP2_APST 0x00000004 +#define AHCI_CAP2_SDS 0x00000008 +#define AHCI_CAP2_SADM 0x00000010 +#define AHCI_CAP2_DESO 0x00000020 #define AHCI_OFFSET 0x100 #define AHCI_STEP 0x80 @@ -265,6 +271,7 @@ #define AHCI_P_CMD_ACTIVE 0x10000000 #define AHCI_P_CMD_PARTIAL 0x20000000 #define AHCI_P_CMD_SLUMBER 0x60000000 +#define AHCI_P_CMD_DEVSLEEP 0x80000000 #define AHCI_P_TFD 0x20 #define AHCI_P_SIG 0x24 @@ -284,6 +291,17 @@ #define AHCI_P_FBS_ADO_SHIFT 12 #define AHCI_P_FBS_DWE 0x000f0000 #define AHCI_P_FBS_DWE_SHIFT 16 +#define AHCI_P_DEVSLP 0x44 +#define AHCI_P_DEVSLP_ADSE 0x00000001 +#define AHCI_P_DEVSLP_DSP 0x00000002 +#define AHCI_P_DEVSLP_DETO 0x000003fc +#define AHCI_P_DEVSLP_DETO_SHIFT 2 +#define AHCI_P_DEVSLP_MDAT 0x00007c00 +#define AHCI_P_DEVSLP_MDAT_SHIFT 10 +#define AHCI_P_DEVSLP_DITO 0x01ff8000 +#define AHCI_P_DEVSLP_DITO_SHIFT 15 +#define AHCI_P_DEVSLP_DM 0x0e000000 +#define AHCI_P_DEVSLP_DM_SHIFT 25 /* Just to be sure, if building as module. */ #if MAXPHYS < 512 * 1024 Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:42:55 2015 (r280732) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:43:45 2015 (r280733) @@ -431,7 +431,6 @@ ahci_port_stop(struct ahci_port *p) static void ahci_port_reset(struct ahci_port *pr) { - pr->sctl = 0; pr->serr = 0; pr->sact = 0; pr->xfermode = ATA_UDMA6; @@ -443,8 +442,11 @@ ahci_port_reset(struct ahci_port *pr) pr->tfd = 0x7F; return; } - pr->ssts = ATA_SS_DET_PHY_ONLINE | ATA_SS_SPD_GEN2 | - ATA_SS_IPM_ACTIVE; + pr->ssts = ATA_SS_DET_PHY_ONLINE | ATA_SS_IPM_ACTIVE; + if (pr->sctl & ATA_SC_SPD_MASK) + pr->ssts |= (pr->sctl & ATA_SC_SPD_MASK); + else + pr->ssts |= ATA_SS_SPD_GEN3; pr->tfd = (1 << 8) | ATA_S_DSC | ATA_S_DMA; if (!pr->atapi) { pr->sig = PxSIG_ATA; @@ -470,6 +472,7 @@ ahci_reset(struct pci_ahci_softc *sc) for (i = 0; i < sc->ports; i++) { sc->port[i].ie = 0; sc->port[i].is = 0; + sc->port[i].sctl = 0; ahci_port_reset(&sc->port[i]); } } @@ -808,26 +811,36 @@ handle_identify(struct ahci_port *p, int buf[53] = (1 << 1 | 1 << 2); if (p->mult_sectors) buf[59] = (0x100 | p->mult_sectors); - buf[60] = sectors; - buf[61] = (sectors >> 16); + if (sectors <= 0x0fffffff) { + buf[60] = sectors; + buf[61] = (sectors >> 16); + } else { + buf[60] = 0xffff; + buf[61] = 0x0fff; + } buf[63] = 0x7; if (p->xfermode & ATA_WDMA0) buf[63] |= (1 << ((p->xfermode & 7) + 8)); buf[64] = 0x3; - buf[65] = 100; - buf[66] = 100; - buf[67] = 100; - buf[68] = 100; + buf[65] = 120; + buf[66] = 120; + buf[67] = 120; + buf[68] = 120; buf[69] = 0; buf[75] = 31; - buf[76] = (1 << 8 | 1 << 2); + buf[76] = (ATA_SATA_GEN1 | ATA_SATA_GEN2 | ATA_SATA_GEN3 | + ATA_SUPPORT_NCQ); buf[80] = 0x1f0; buf[81] = 0x28; - buf[82] = (1 << 5 | 1 << 14); - buf[83] = (1 << 10 | 1 << 12 | 1 << 13 | 1 << 14); + buf[82] = (ATA_SUPPORT_POWERMGT | ATA_SUPPORT_WRITECACHE| + ATA_SUPPORT_LOOKAHEAD | ATA_SUPPORT_NOP); + buf[83] = (ATA_SUPPORT_ADDRESS48 | ATA_SUPPORT_FLUSHCACHE | + ATA_SUPPORT_FLUSHCACHE48 | 1 << 14); buf[84] = (1 << 14); - buf[85] = (1 << 5 | 1 << 14); - buf[86] = (1 << 10 | 1 << 12 | 1 << 13); + buf[85] = (ATA_SUPPORT_POWERMGT | ATA_SUPPORT_WRITECACHE| + ATA_SUPPORT_LOOKAHEAD | ATA_SUPPORT_NOP); + buf[86] = (ATA_SUPPORT_ADDRESS48 | ATA_SUPPORT_FLUSHCACHE | + ATA_SUPPORT_FLUSHCACHE48); buf[87] = (1 << 14); buf[88] = 0x7f; if (p->xfermode & ATA_UDMA0) @@ -854,6 +867,7 @@ handle_identify(struct ahci_port *p, int buf[117] = sectsz / 2; buf[118] = ((sectsz / 2) >> 16); } + buf[222] = 0x1020; ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); @@ -1851,10 +1865,10 @@ pci_ahci_port_write(struct pci_ahci_soft WPRINTF("pci_ahci_port: read only registers 0x%"PRIx64"\n", offset); break; case AHCI_P_SCTL: + p->sctl = value; if (!(p->cmd & AHCI_P_CMD_ST)) { if (value & ATA_SC_DET_RESET) ahci_port_reset(p); - p->sctl = value; } break; case AHCI_P_SERR: From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:44:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05524BC; Fri, 27 Mar 2015 08:44:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3DD1AB2; Fri, 27 Mar 2015 08:44:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8iwYm020483; Fri, 27 Mar 2015 08:44:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8iwUD020482; Fri, 27 Mar 2015 08:44:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270844.t2R8iwUD020482@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:44:58 +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: r280734 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:44:59 -0000 Author: mav Date: Fri Mar 27 08:44:58 2015 New Revision: 280734 URL: https://svnweb.freebsd.org/changeset/base/280734 Log: MFC r279967: Change prdbc value reporting. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:43:45 2015 (r280733) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:44:58 2015 (r280734) @@ -1663,6 +1663,9 @@ ata_ioreq_cb(struct blockif_req *br, int */ STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); + if (!err) + hdr->prdbc = aior->done; + if (dsm) { if (aior->done != aior->len && !err) { ahci_handle_dsm_trim(p, slot, cfis, aior->done); @@ -1678,13 +1681,8 @@ ata_ioreq_cb(struct blockif_req *br, int if (!err && aior->done == aior->len) { tfd = ATA_S_READY | ATA_S_DSC; - if (ncq) - hdr->prdbc = 0; - else - hdr->prdbc = aior->len; } else { tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; - hdr->prdbc = 0; if (ncq) p->serr |= (1 << slot); } @@ -1739,6 +1737,9 @@ atapi_ioreq_cb(struct blockif_req *br, i */ STAILQ_INSERT_TAIL(&p->iofhd, aior, io_flist); + if (!err) + hdr->prdbc = aior->done; + if (pending && !err) { atapi_read(p, slot, cfis, aior->done, hdr->prdtl - pending); goto out; @@ -1746,12 +1747,10 @@ atapi_ioreq_cb(struct blockif_req *br, i if (!err && aior->done == aior->len) { tfd = ATA_S_READY | ATA_S_DSC; - hdr->prdbc = aior->len; } else { p->sense_key = ATA_SENSE_ILLEGAL_REQUEST; p->asc = 0x21; tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; - hdr->prdbc = 0; } cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:46:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 333F34C5; Fri, 27 Mar 2015 08:46:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E058AE3; Fri, 27 Mar 2015 08:46:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8kC0f021002; Fri, 27 Mar 2015 08:46:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8kCbX021001; Fri, 27 Mar 2015 08:46:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270846.t2R8kCbX021001@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:46: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: r280735 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:46:13 -0000 Author: mav Date: Fri Mar 27 08:46:12 2015 New Revision: 280735 URL: https://svnweb.freebsd.org/changeset/base/280735 Log: MFC r279968: Remove incorrect SERR register setting. At this point we have nothing to report through that register. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:44:58 2015 (r280734) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:46:12 2015 (r280735) @@ -1683,8 +1683,6 @@ ata_ioreq_cb(struct blockif_req *br, int tfd = ATA_S_READY | ATA_S_DSC; } else { tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; - if (ncq) - p->serr |= (1 << slot); } if (ncq) { From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:47:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A30BD60D; Fri, 27 Mar 2015 08:47:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D22DB28; Fri, 27 Mar 2015 08:47:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8l3CQ021166; Fri, 27 Mar 2015 08:47:03 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8l3Sf021165; Fri, 27 Mar 2015 08:47:03 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270847.t2R8l3Sf021165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:47: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: r280736 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:47:03 -0000 Author: mav Date: Fri Mar 27 08:47:02 2015 New Revision: 280736 URL: https://svnweb.freebsd.org/changeset/base/280736 Log: MFC r279975: Improve NCQ errors reporting for virtual AHCI disks. While this implementation is still not perfect, previous was just broken. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:46:12 2015 (r280735) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:47:02 2015 (r280736) @@ -134,6 +134,7 @@ struct ahci_port { int reset; int mult_sectors; uint8_t xfermode; + uint8_t err_cfis[20]; uint8_t sense_key; uint8_t asc; uint32_t pending; @@ -299,18 +300,27 @@ ahci_write_fis_piosetup(struct ahci_port } static void -ahci_write_fis_sdb(struct ahci_port *p, int slot, uint32_t tfd) +ahci_write_fis_sdb(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t tfd) { uint8_t fis[8]; uint8_t error; error = (tfd >> 8) & 0xff; memset(fis, 0, sizeof(fis)); - fis[0] = error; + fis[0] = FIS_TYPE_SETDEVBITS; + fis[1] = (1 << 6); fis[2] = tfd & 0x77; - *(uint32_t *)(fis + 4) = (1 << slot); - if (fis[2] & ATA_S_ERROR) + fis[3] = error; + if (fis[2] & ATA_S_ERROR) { p->is |= AHCI_P_IX_TFE; + p->err_cfis[0] = slot; + p->err_cfis[2] = tfd & 0x77; + p->err_cfis[3] = error; + memcpy(&p->err_cfis[4], cfis + 4, 16); + } else { + *(uint32_t *)(fis + 4) = (1 << slot); + p->sact &= ~(1 << slot); + } p->tfd = tfd; ahci_write_fis(p, FIS_TYPE_SETDEVBITS, fis); } @@ -337,9 +347,13 @@ ahci_write_fis_d2h(struct ahci_port *p, fis[11] = cfis[11]; fis[12] = cfis[12]; fis[13] = cfis[13]; - if (fis[2] & ATA_S_ERROR) + if (fis[2] & ATA_S_ERROR) { p->is |= AHCI_P_IX_TFE; - else + p->err_cfis[0] = 0x80; + p->err_cfis[2] = tfd & 0xff; + p->err_cfis[3] = error; + memcpy(&p->err_cfis[4], cfis + 4, 16); + } else p->ci &= ~(1 << slot); p->tfd = tfd; ahci_write_fis(p, FIS_TYPE_REGD2H, fis); @@ -774,6 +788,29 @@ write_prdt(struct ahci_port *p, int slot } static void +ahci_handle_read_log(struct ahci_port *p, int slot, uint8_t *cfis) +{ + struct ahci_cmd_hdr *hdr; + uint8_t buf[512]; + + hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); + if (p->atapi || hdr->prdtl == 0 || cfis[4] != 0x10 || + cfis[5] != 0 || cfis[9] != 0 || cfis[12] != 1 || cfis[13] != 0) { + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + return; + } + + memset(buf, 0, sizeof(buf)); + memcpy(buf, p->err_cfis, sizeof(p->err_cfis)); + + if (cfis[2] == ATA_READ_LOG_EXT) + ahci_write_fis_piosetup(p); + write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); + ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); +} + +static void handle_identify(struct ahci_port *p, int slot, uint8_t *cfis) { struct ahci_cmd_hdr *hdr; @@ -840,7 +877,7 @@ handle_identify(struct ahci_port *p, int buf[85] = (ATA_SUPPORT_POWERMGT | ATA_SUPPORT_WRITECACHE| ATA_SUPPORT_LOOKAHEAD | ATA_SUPPORT_NOP); buf[86] = (ATA_SUPPORT_ADDRESS48 | ATA_SUPPORT_FLUSHCACHE | - ATA_SUPPORT_FLUSHCACHE48); + ATA_SUPPORT_FLUSHCACHE48 | 1 << 15); buf[87] = (1 << 14); buf[88] = 0x7f; if (p->xfermode & ATA_UDMA0) @@ -867,6 +904,8 @@ handle_identify(struct ahci_port *p, int buf[117] = sectsz / 2; buf[118] = ((sectsz / 2) >> 16); } + buf[119] = (ATA_SUPPORT_RWLOGDMAEXT | 1 << 14); + buf[120] = (ATA_SUPPORT_RWLOGDMAEXT | 1 << 14); buf[222] = 0x1020; ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); @@ -1523,6 +1562,10 @@ ahci_handle_cmd(struct ahci_port *p, int ahci_write_fis_d2h(p, slot, cfis, (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); break; + case ATA_READ_LOG_EXT: + case ATA_READ_LOG_DMA_EXT: + ahci_handle_read_log(p, slot, cfis); + break; case ATA_STANDBY_CMD: break; case ATA_NOP: @@ -1685,10 +1728,9 @@ ata_ioreq_cb(struct blockif_req *br, int tfd = (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR; } - if (ncq) { - p->sact &= ~(1 << slot); - ahci_write_fis_sdb(p, slot, tfd); - } else + if (ncq) + ahci_write_fis_sdb(p, slot, cfis, tfd); + else ahci_write_fis_d2h(p, slot, cfis, tfd); /* From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:47:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F94C73A; Fri, 27 Mar 2015 08:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D6662B35; Fri, 27 Mar 2015 08:47:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8lHZf021249; Fri, 27 Mar 2015 08:47:17 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8lHrI021245; Fri, 27 Mar 2015 08:47:17 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201503270847.t2R8lHrI021245@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Fri, 27 Mar 2015 08:47:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280737 - in head/sys: arm/include dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:47:18 -0000 Author: bz Date: Fri Mar 27 08:47:16 2015 New Revision: 280737 URL: https://svnweb.freebsd.org/changeset/base/280737 Log: Rather than defining our own magic checks here use INKERNEL() for the PMC_IN_KERNEL() macro definition. Add missing macros to extract the return address (LR) from the trapframe. Discussed with: andrew Obtained from: Cambridge/L41 Sponsored by: DARPA, AFRL MFC after: 2 weeks Modified: head/sys/arm/include/pmc_mdep.h head/sys/dev/hwpmc/hwpmc_arm.c Modified: head/sys/arm/include/pmc_mdep.h ============================================================================== --- head/sys/arm/include/pmc_mdep.h Fri Mar 27 08:47:02 2015 (r280736) +++ head/sys/arm/include/pmc_mdep.h Fri Mar 27 08:47:16 2015 (r280737) @@ -56,8 +56,7 @@ union pmc_md_pmc { #define PMC_IN_KERNEL_STACK(S,START,END) \ ((S) >= (START) && (S) < (END)) -#define PMC_IN_KERNEL(va) (((va) >= USRSTACK) && \ - ((va) < VM_MAX_KERNEL_ADDRESS)) +#define PMC_IN_KERNEL(va) INKERNEL((va)) #define PMC_IN_USERSPACE(va) ((va) <= VM_MAXUSER_ADDRESS) @@ -65,6 +64,8 @@ union pmc_md_pmc { #define PMC_TRAPFRAME_TO_FP(TF) ((TF)->tf_r11) #define PMC_TRAPFRAME_TO_SVC_SP(TF) ((TF)->tf_svc_sp) #define PMC_TRAPFRAME_TO_USR_SP(TF) ((TF)->tf_usr_sp) +#define PMC_TRAPFRAME_TO_SVC_LR(TF) ((TF)->tf_svc_lr) +#define PMC_TRAPFRAME_TO_USR_LR(TF) ((TF)->tf_usr_lr) /* Build a fake kernel trapframe from current instruction pointer. */ #define PMC_FAKE_TRAPFRAME(TF) \ Modified: head/sys/dev/hwpmc/hwpmc_arm.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_arm.c Fri Mar 27 08:47:02 2015 (r280736) +++ head/sys/dev/hwpmc/hwpmc_arm.c Fri Mar 27 08:47:16 2015 (r280737) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:47:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7AB788C; Fri, 27 Mar 2015 08:47:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A837CB4F; Fri, 27 Mar 2015 08:47:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8ltUE021378; Fri, 27 Mar 2015 08:47:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8ltBL021377; Fri, 27 Mar 2015 08:47:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270847.t2R8ltBL021377@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:47:55 +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: r280738 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:47:56 -0000 Author: mav Date: Fri Mar 27 08:47:54 2015 New Revision: 280738 URL: https://svnweb.freebsd.org/changeset/base/280738 Log: MFC r279976: Add support for NCQ variant of DSM TRIM for virtual AHCI disks. The code is not really tested yet due to lack of initiator support. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:47:16 2015 (r280737) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:47:54 2015 (r280738) @@ -703,8 +703,13 @@ ahci_handle_dsm_trim(struct ahci_port *p int err; uint8_t buf[512]; - len = (uint16_t)cfis[13] << 8 | cfis[12]; - len *= 512; + if (cfis[2] == ATA_DATA_SET_MANAGEMENT) { + len = (uint16_t)cfis[13] << 8 | cfis[12]; + len *= 512; + } else { /* ATA_SEND_FPDMA_QUEUED */ + len = (uint16_t)cfis[11] << 8 | cfis[3]; + len *= 512; + } read_prdt(p, slot, cfis, buf, sizeof(buf)); next: @@ -867,6 +872,8 @@ handle_identify(struct ahci_port *p, int buf[75] = 31; buf[76] = (ATA_SATA_GEN1 | ATA_SATA_GEN2 | ATA_SATA_GEN3 | ATA_SUPPORT_NCQ); + buf[77] = (ATA_SUPPORT_RCVSND_FPDMA_QUEUED | + (p->ssts & ATA_SS_SPD_MASK) >> 3); buf[80] = 0x1f0; buf[81] = 0x28; buf[82] = (ATA_SUPPORT_POWERMGT | ATA_SUPPORT_WRITECACHE| @@ -1562,6 +1569,16 @@ ahci_handle_cmd(struct ahci_port *p, int ahci_write_fis_d2h(p, slot, cfis, (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); break; + case ATA_SEND_FPDMA_QUEUED: + if ((cfis[13] & 0x1f) == ATA_SFPDMA_DSM && + cfis[17] == 0 && cfis[16] == ATA_DSM_TRIM && + cfis[11] == 0 && cfis[13] == 1) { + ahci_handle_dsm_trim(p, slot, cfis, 0); + break; + } + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + break; case ATA_READ_LOG_EXT: case ATA_READ_LOG_DMA_EXT: ahci_handle_read_log(p, slot, cfis); @@ -1689,9 +1706,12 @@ ata_ioreq_cb(struct blockif_req *br, int hdr = (struct ahci_cmd_hdr *)(p->cmd_lst + slot * AHCI_CL_SIZE); if (cfis[2] == ATA_WRITE_FPDMA_QUEUED || - cfis[2] == ATA_READ_FPDMA_QUEUED) + cfis[2] == ATA_READ_FPDMA_QUEUED || + cfis[2] == ATA_SEND_FPDMA_QUEUED) ncq = 1; - if (cfis[2] == ATA_DATA_SET_MANAGEMENT) + if (cfis[2] == ATA_DATA_SET_MANAGEMENT || + (cfis[2] == ATA_SEND_FPDMA_QUEUED && + (cfis[13] & 0x1f) == ATA_SFPDMA_DSM)) dsm = 1; pthread_mutex_lock(&sc->mtx); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:48:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 333669EB; Fri, 27 Mar 2015 08:48:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E7E9B64; Fri, 27 Mar 2015 08:48:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8midj021575; Fri, 27 Mar 2015 08:48:44 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8miQS021574; Fri, 27 Mar 2015 08:48:44 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270848.t2R8miQS021574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:48:44 +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: r280739 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:48:45 -0000 Author: mav Date: Fri Mar 27 08:48:44 2015 New Revision: 280739 URL: https://svnweb.freebsd.org/changeset/base/280739 Log: MFC r279977: Fix NOP and IDLE commands for virtual AHCI disks. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:47:54 2015 (r280738) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:48:44 2015 (r280739) @@ -1583,10 +1583,13 @@ ahci_handle_cmd(struct ahci_port *p, int case ATA_READ_LOG_DMA_EXT: ahci_handle_read_log(p, slot, cfis); break; - case ATA_STANDBY_CMD: - break; case ATA_NOP: + ahci_write_fis_d2h(p, slot, cfis, + (ATA_E_ABORT << 8) | ATA_S_READY | ATA_S_ERROR); + break; + case ATA_STANDBY_CMD: case ATA_STANDBY_IMMEDIATE: + case ATA_IDLE_CMD: case ATA_IDLE_IMMEDIATE: case ATA_SLEEP: ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:49:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D890B34; Fri, 27 Mar 2015 08:49:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 57F99B71; Fri, 27 Mar 2015 08:49:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8nYb5021731; Fri, 27 Mar 2015 08:49:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8nYI1021730; Fri, 27 Mar 2015 08:49:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270849.t2R8nYI1021730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:49:34 +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: r280740 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:49:34 -0000 Author: mav Date: Fri Mar 27 08:49:33 2015 New Revision: 280740 URL: https://svnweb.freebsd.org/changeset/base/280740 Log: MFC r279979: Slightly polish virtual AHCI CD reporting. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:48:44 2015 (r280739) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:49:33 2015 (r280740) @@ -86,6 +86,7 @@ enum sata_fis_type { #define READ_TOC 0x43 #define GET_EVENT_STATUS_NOTIFICATION 0x4A #define MODE_SENSE_10 0x5A +#define REPORT_LUNS 0xA0 #define READ_12 0xA8 #define READ_CD 0xBE @@ -874,7 +875,7 @@ handle_identify(struct ahci_port *p, int ATA_SUPPORT_NCQ); buf[77] = (ATA_SUPPORT_RCVSND_FPDMA_QUEUED | (p->ssts & ATA_SS_SPD_MASK) >> 3); - buf[80] = 0x1f0; + buf[80] = 0x3f0; buf[81] = 0x28; buf[82] = (ATA_SUPPORT_POWERMGT | ATA_SUPPORT_WRITECACHE| ATA_SUPPORT_LOOKAHEAD | ATA_SUPPORT_NOP); @@ -940,20 +941,28 @@ handle_atapi_identify(struct ahci_port * buf[53] = (1 << 2 | 1 << 1); buf[62] = 0x3f; buf[63] = 7; + if (p->xfermode & ATA_WDMA0) + buf[63] |= (1 << ((p->xfermode & 7) + 8)); buf[64] = 3; - buf[65] = 100; - buf[66] = 100; - buf[67] = 100; - buf[68] = 100; - buf[76] = (1 << 2 | 1 << 1); + buf[65] = 120; + buf[66] = 120; + buf[67] = 120; + buf[68] = 120; + buf[76] = (ATA_SATA_GEN1 | ATA_SATA_GEN2 | ATA_SATA_GEN3); + buf[77] = ((p->ssts & ATA_SS_SPD_MASK) >> 3); buf[78] = (1 << 5); - buf[80] = (0x1f << 4); - buf[82] = (1 << 4); + buf[80] = 0x3f0; + buf[82] = (ATA_SUPPORT_POWERMGT | ATA_SUPPORT_PACKET | + ATA_SUPPORT_RESET | ATA_SUPPORT_NOP); buf[83] = (1 << 14); buf[84] = (1 << 14); - buf[85] = (1 << 4); + buf[85] = (ATA_SUPPORT_POWERMGT | ATA_SUPPORT_PACKET | + ATA_SUPPORT_RESET | ATA_SUPPORT_NOP); buf[87] = (1 << 14); - buf[88] = (1 << 14 | 0x7f); + buf[88] = 0x7f; + if (p->xfermode & ATA_UDMA0) + buf[88] |= (1 << ((p->xfermode & 7) + 8)); + buf[222] = 0x1020; ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); @@ -966,22 +975,41 @@ atapi_inquiry(struct ahci_port *p, int s uint8_t buf[36]; uint8_t *acmd; int len; + uint32_t tfd; acmd = cfis + 0x40; - buf[0] = 0x05; - buf[1] = 0x80; - buf[2] = 0x00; - buf[3] = 0x21; - buf[4] = 31; - buf[5] = 0; - buf[6] = 0; - buf[7] = 0; - atapi_string(buf + 8, "BHYVE", 8); - atapi_string(buf + 16, "BHYVE DVD-ROM", 16); - atapi_string(buf + 32, "001", 4); + if (acmd[1] & 1) { /* VPD */ + if (acmd[2] == 0) { /* Supported VPD pages */ + buf[0] = 0x05; + buf[1] = 0; + buf[2] = 0; + buf[3] = 1; + buf[4] = 0; + len = 4 + buf[3]; + } else { + p->sense_key = ATA_SENSE_ILLEGAL_REQUEST; + p->asc = 0x24; + tfd = (p->sense_key << 12) | ATA_S_READY | ATA_S_ERROR; + cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; + ahci_write_fis_d2h(p, slot, cfis, tfd); + return; + } + } else { + buf[0] = 0x05; + buf[1] = 0x80; + buf[2] = 0x00; + buf[3] = 0x21; + buf[4] = 31; + buf[5] = 0; + buf[6] = 0; + buf[7] = 0; + atapi_string(buf + 8, "BHYVE", 8); + atapi_string(buf + 16, "BHYVE DVD-ROM", 16); + atapi_string(buf + 32, "001", 4); + len = sizeof(buf); + } - len = sizeof(buf); if (len > acmd[4]) len = acmd[4]; cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; @@ -1185,6 +1213,19 @@ atapi_read_toc(struct ahci_port *p, int } static void +atapi_report_luns(struct ahci_port *p, int slot, uint8_t *cfis) +{ + uint8_t buf[16]; + + memset(buf, 0, sizeof(buf)); + buf[3] = 8; + + cfis[4] = (cfis[4] & ~7) | ATA_I_CMD | ATA_I_IN; + write_prdt(p, slot, cfis, buf, sizeof(buf)); + ahci_write_fis_d2h(p, slot, cfis, ATA_S_READY | ATA_S_DSC); +} + +static void atapi_read(struct ahci_port *p, int slot, uint8_t *cfis, uint32_t done, int seek) { @@ -1453,6 +1494,9 @@ handle_packet_cmd(struct ahci_port *p, i case READ_TOC: atapi_read_toc(p, slot, cfis); break; + case REPORT_LUNS: + atapi_report_luns(p, slot, cfis); + break; case READ_10: case READ_12: atapi_read(p, slot, cfis, 0, 0); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:50:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 897DAC92; Fri, 27 Mar 2015 08:50:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A135B7E; Fri, 27 Mar 2015 08:50:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8oRdl022422; Fri, 27 Mar 2015 08:50:27 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8oRSb022421; Fri, 27 Mar 2015 08:50:27 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270850.t2R8oRSb022421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:50: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: r280741 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:50:27 -0000 Author: mav Date: Fri Mar 27 08:50:26 2015 New Revision: 280741 URL: https://svnweb.freebsd.org/changeset/base/280741 Log: MFC r279987: Add checksums to identify data and NCQ command error log. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:49:33 2015 (r280740) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:50:26 2015 (r280741) @@ -794,6 +794,17 @@ write_prdt(struct ahci_port *p, int slot } static void +ahci_checksum(uint8_t *buf, int size) +{ + int i; + uint8_t sum = 0; + + for (i = 0; i < size - 1; i++) + sum += buf[i]; + buf[size - 1] = 0x100 - sum; +} + +static void ahci_handle_read_log(struct ahci_port *p, int slot, uint8_t *cfis) { struct ahci_cmd_hdr *hdr; @@ -809,6 +820,7 @@ ahci_handle_read_log(struct ahci_port *p memset(buf, 0, sizeof(buf)); memcpy(buf, p->err_cfis, sizeof(p->err_cfis)); + ahci_checksum(buf, sizeof(buf)); if (cfis[2] == ATA_READ_LOG_EXT) ahci_write_fis_piosetup(p); @@ -915,6 +927,8 @@ handle_identify(struct ahci_port *p, int buf[119] = (ATA_SUPPORT_RWLOGDMAEXT | 1 << 14); buf[120] = (ATA_SUPPORT_RWLOGDMAEXT | 1 << 14); buf[222] = 0x1020; + buf[255] = 0x00a5; + ahci_checksum((uint8_t *)buf, sizeof(buf)); ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); @@ -963,6 +977,8 @@ handle_atapi_identify(struct ahci_port * if (p->xfermode & ATA_UDMA0) buf[88] |= (1 << ((p->xfermode & 7) + 8)); buf[222] = 0x1020; + buf[255] = 0x00a5; + ahci_checksum((uint8_t *)buf, sizeof(buf)); ahci_write_fis_piosetup(p); write_prdt(p, slot, cfis, (void *)buf, sizeof(buf)); ahci_write_fis_d2h(p, slot, cfis, ATA_S_DSC | ATA_S_READY); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:51:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F3C1DC9; Fri, 27 Mar 2015 08:51:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 098F8C1B; Fri, 27 Mar 2015 08:51:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8pKZ4022586; Fri, 27 Mar 2015 08:51:20 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8pKBq022585; Fri, 27 Mar 2015 08:51:20 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270851.t2R8pKBq022585@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:51: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: r280742 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:51:21 -0000 Author: mav Date: Fri Mar 27 08:51:20 2015 New Revision: 280742 URL: https://svnweb.freebsd.org/changeset/base/280742 Log: MFC r280004: Give block I/O interface multiple (8) execution threads. On parallel random I/O this allows better utilize wide storage pools. To not confuse prefetcher on linear I/O, consecutive requests are executed sequentially, following the same logic as was earlier implemented in CTL. Benchmarks of virtual AHCI disk, backed by ZVOL on RAID10 pool of 4 HDDs, show ~3.5 times random read performance improvements, while no degradation on linear I/O. Modified: stable/10/usr.sbin/bhyve/block_if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/block_if.c ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:50:26 2015 (r280741) +++ stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:51:20 2015 (r280742) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG 0xb109b109 #define BLOCKIF_MAXREQ 33 +#define BLOCKIF_NUMTHR 8 enum blockop { BOP_READ, @@ -65,6 +66,7 @@ enum blockop { enum blockstat { BST_FREE, + BST_BLOCK, BST_PEND, BST_BUSY, BST_DONE @@ -76,6 +78,7 @@ struct blockif_elem { enum blockop be_op; enum blockstat be_status; pthread_t be_tid; + off_t be_block; }; struct blockif_ctxt { @@ -88,16 +91,15 @@ struct blockif_ctxt { int bc_sectsz; int bc_psectsz; int bc_psectoff; - pthread_t bc_btid; + int bc_closing; + pthread_t bc_btid[BLOCKIF_NUMTHR]; pthread_mutex_t bc_mtx; pthread_cond_t bc_cond; - int bc_closing; /* Request elements and free/pending/busy queues */ TAILQ_HEAD(, blockif_elem) bc_freeq; TAILQ_HEAD(, blockif_elem) bc_pendq; TAILQ_HEAD(, blockif_elem) bc_busyq; - u_int bc_req_count; struct blockif_elem bc_reqs[BLOCKIF_MAXREQ]; }; @@ -116,58 +118,83 @@ static int blockif_enqueue(struct blockif_ctxt *bc, struct blockif_req *breq, enum blockop op) { - struct blockif_elem *be; - - assert(bc->bc_req_count < BLOCKIF_MAXREQ); + struct blockif_elem *be, *tbe; + off_t off; + int i; be = TAILQ_FIRST(&bc->bc_freeq); assert(be != NULL); assert(be->be_status == BST_FREE); - TAILQ_REMOVE(&bc->bc_freeq, be, be_link); - be->be_status = BST_PEND; be->be_req = breq; be->be_op = op; + switch (op) { + case BOP_READ: + case BOP_WRITE: + case BOP_DELETE: + off = breq->br_offset; + for (i = 0; i < breq->br_iovcnt; i++) + off += breq->br_iov[i].iov_len; + break; + default: + off = OFF_MAX; + } + be->be_block = off; + TAILQ_FOREACH(tbe, &bc->bc_pendq, be_link) { + if (tbe->be_block == breq->br_offset) + break; + } + if (tbe == NULL) { + TAILQ_FOREACH(tbe, &bc->bc_busyq, be_link) { + if (tbe->be_block == breq->br_offset) + break; + } + } + if (tbe == NULL) + be->be_status = BST_PEND; + else + be->be_status = BST_BLOCK; TAILQ_INSERT_TAIL(&bc->bc_pendq, be, be_link); - - bc->bc_req_count++; - - return (0); + return (be->be_status == BST_PEND); } static int -blockif_dequeue(struct blockif_ctxt *bc, struct blockif_elem **bep) +blockif_dequeue(struct blockif_ctxt *bc, pthread_t t, struct blockif_elem **bep) { struct blockif_elem *be; - if (bc->bc_req_count == 0) - return (ENOENT); - - be = TAILQ_FIRST(&bc->bc_pendq); - assert(be != NULL); - assert(be->be_status == BST_PEND); + TAILQ_FOREACH(be, &bc->bc_pendq, be_link) { + if (be->be_status == BST_PEND) + break; + assert(be->be_status == BST_BLOCK); + } + if (be == NULL) + return (0); TAILQ_REMOVE(&bc->bc_pendq, be, be_link); be->be_status = BST_BUSY; - be->be_tid = bc->bc_btid; + be->be_tid = t; TAILQ_INSERT_TAIL(&bc->bc_busyq, be, be_link); - *bep = be; - - return (0); + return (1); } static void blockif_complete(struct blockif_ctxt *bc, struct blockif_elem *be) { - assert(be->be_status == BST_DONE); + struct blockif_elem *tbe; - TAILQ_REMOVE(&bc->bc_busyq, be, be_link); + if (be->be_status == BST_DONE || be->be_status == BST_BUSY) + TAILQ_REMOVE(&bc->bc_busyq, be, be_link); + else + TAILQ_REMOVE(&bc->bc_pendq, be, be_link); + TAILQ_FOREACH(tbe, &bc->bc_pendq, be_link) { + if (tbe->be_req->br_offset == be->be_block) + tbe->be_status = BST_PEND; + } be->be_tid = 0; be->be_status = BST_FREE; be->be_req = NULL; TAILQ_INSERT_TAIL(&bc->bc_freeq, be, be_link); - - bc->bc_req_count--; } static void @@ -228,28 +255,27 @@ blockif_thr(void *arg) { struct blockif_ctxt *bc; struct blockif_elem *be; + pthread_t t; bc = arg; + t = pthread_self(); + pthread_mutex_lock(&bc->bc_mtx); for (;;) { - pthread_mutex_lock(&bc->bc_mtx); - while (!blockif_dequeue(bc, &be)) { + while (blockif_dequeue(bc, t, &be)) { pthread_mutex_unlock(&bc->bc_mtx); blockif_proc(bc, be); pthread_mutex_lock(&bc->bc_mtx); blockif_complete(bc, be); } - pthread_cond_wait(&bc->bc_cond, &bc->bc_mtx); - pthread_mutex_unlock(&bc->bc_mtx); - - /* - * Check ctxt status here to see if exit requested - */ + /* Check ctxt status here to see if exit requested */ if (bc->bc_closing) - pthread_exit(NULL); + break; + pthread_cond_wait(&bc->bc_cond, &bc->bc_mtx); } + pthread_mutex_unlock(&bc->bc_mtx); - /* Not reached */ + pthread_exit(NULL); return (NULL); } @@ -388,16 +414,16 @@ blockif_open(const char *optstr, const c TAILQ_INIT(&bc->bc_freeq); TAILQ_INIT(&bc->bc_pendq); TAILQ_INIT(&bc->bc_busyq); - bc->bc_req_count = 0; for (i = 0; i < BLOCKIF_MAXREQ; i++) { bc->bc_reqs[i].be_status = BST_FREE; TAILQ_INSERT_HEAD(&bc->bc_freeq, &bc->bc_reqs[i], be_link); } - pthread_create(&bc->bc_btid, NULL, blockif_thr, bc); - - snprintf(tname, sizeof(tname), "blk-%s", ident); - pthread_set_name_np(bc->bc_btid, tname); + for (i = 0; i < BLOCKIF_NUMTHR; i++) { + pthread_create(&bc->bc_btid[i], NULL, blockif_thr, bc); + snprintf(tname, sizeof(tname), "blk-%s-%d", ident, i); + pthread_set_name_np(bc->bc_btid[i], tname); + } return (bc); } @@ -411,13 +437,13 @@ blockif_request(struct blockif_ctxt *bc, err = 0; pthread_mutex_lock(&bc->bc_mtx); - if (bc->bc_req_count < BLOCKIF_MAXREQ) { + if (!TAILQ_EMPTY(&bc->bc_freeq)) { /* * Enqueue and inform the block i/o thread * that there is work available */ - blockif_enqueue(bc, breq, op); - pthread_cond_signal(&bc->bc_cond); + if (blockif_enqueue(bc, breq, op)) + pthread_cond_signal(&bc->bc_cond); } else { /* * Callers are not allowed to enqueue more than @@ -483,11 +509,7 @@ blockif_cancel(struct blockif_ctxt *bc, /* * Found it. */ - TAILQ_REMOVE(&bc->bc_pendq, be, be_link); - be->be_status = BST_FREE; - be->be_req = NULL; - TAILQ_INSERT_TAIL(&bc->bc_freeq, be, be_link); - bc->bc_req_count--; + blockif_complete(bc, be); pthread_mutex_unlock(&bc->bc_mtx); return (0); @@ -548,7 +570,7 @@ int blockif_close(struct blockif_ctxt *bc) { void *jval; - int err; + int err, i; err = 0; @@ -558,8 +580,9 @@ blockif_close(struct blockif_ctxt *bc) * Stop the block i/o thread */ bc->bc_closing = 1; - pthread_cond_signal(&bc->bc_cond); - pthread_join(bc->bc_btid, &jval); + pthread_cond_broadcast(&bc->bc_cond); + for (i = 0; i < BLOCKIF_NUMTHR; i++) + pthread_join(bc->bc_btid[i], &jval); /* XXX Cancel queued i/o's ??? */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:53:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15E89F17; Fri, 27 Mar 2015 08:53:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F3C1CC30; Fri, 27 Mar 2015 08:52:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8qxqD025751; Fri, 27 Mar 2015 08:52:59 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8qw68025740; Fri, 27 Mar 2015 08:52:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270852.t2R8qw68025740@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:52:58 +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: r280743 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:53:00 -0000 Author: mav Date: Fri Mar 27 08:52:57 2015 New Revision: 280743 URL: https://svnweb.freebsd.org/changeset/base/280743 Log: MFC r280026, r280041: Modify virtqueue helpers added in r253440 to allow queuing. Original virtqueue design allows queued and out-of-order processing, but helpers added in r253440 suppose only direct blocking in-order one. It could be fine for network, etc., but it is a huge limitation for storage devices. Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c stable/10/usr.sbin/bhyve/pci_virtio_net.c stable/10/usr.sbin/bhyve/pci_virtio_rnd.c stable/10/usr.sbin/bhyve/virtio.c stable/10/usr.sbin/bhyve/virtio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:51:20 2015 (r280742) +++ stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:52:57 2015 (r280743) @@ -170,9 +170,9 @@ pci_vtblk_proc(struct pci_vtblk_softc *s int writeop, type; off_t offset; struct iovec iov[VTBLK_MAXSEGS + 2]; - uint16_t flags[VTBLK_MAXSEGS + 2]; + uint16_t idx, flags[VTBLK_MAXSEGS + 2]; - n = vq_getchain(vq, iov, VTBLK_MAXSEGS + 2, flags); + n = vq_getchain(vq, &idx, iov, VTBLK_MAXSEGS + 2, flags); /* * The first descriptor will be the read-only fixed header, @@ -258,7 +258,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s * Return the descriptor back to the host. * We wrote 1 byte (our status) to host. */ - vq_relchain(vq, 1); + vq_relchain(vq, idx, 1); } static void @@ -266,7 +266,6 @@ pci_vtblk_notify(void *vsc, struct vqueu { struct pci_vtblk_softc *sc = vsc; - vq_startchains(vq); while (vq_has_descs(vq)) pci_vtblk_proc(sc, vq); vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ Modified: stable/10/usr.sbin/bhyve/pci_virtio_net.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_net.c Fri Mar 27 08:51:20 2015 (r280742) +++ stable/10/usr.sbin/bhyve/pci_virtio_net.c Fri Mar 27 08:52:57 2015 (r280743) @@ -288,6 +288,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc struct vqueue_info *vq; void *vrx; int len, n; + uint16_t idx; /* * Should never be called without a valid tap fd @@ -310,7 +311,6 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc * Check for available rx buffers */ vq = &sc->vsc_queues[VTNET_RXQ]; - vq_startchains(vq); if (!vq_has_descs(vq)) { /* * Drop the packet and try later. Interrupt on @@ -325,7 +325,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc /* * Get descriptor chain. */ - n = vq_getchain(vq, iov, VTNET_MAXSEGS, NULL); + n = vq_getchain(vq, &idx, iov, VTNET_MAXSEGS, NULL); assert(n >= 1 && n <= VTNET_MAXSEGS); /* @@ -342,6 +342,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc * No more packets, but still some avail ring * entries. Interrupt if needed/appropriate. */ + vq_retchain(vq); vq_endchains(vq, 0); return; } @@ -362,7 +363,7 @@ pci_vtnet_tap_rx(struct pci_vtnet_softc /* * Release this chain and handle more chains. */ - vq_relchain(vq, len + sc->rx_vhdrlen); + vq_relchain(vq, idx, len + sc->rx_vhdrlen); } while (vq_has_descs(vq)); /* Interrupt if needed, including for NOTIFY_ON_EMPTY. */ @@ -401,13 +402,14 @@ pci_vtnet_proctx(struct pci_vtnet_softc struct iovec iov[VTNET_MAXSEGS + 1]; int i, n; int plen, tlen; + uint16_t idx; /* * Obtain chain of descriptors. The first one is * really the header descriptor, so we need to sum * up two lengths: packet length and transfer length. */ - n = vq_getchain(vq, iov, VTNET_MAXSEGS, NULL); + n = vq_getchain(vq, &idx, iov, VTNET_MAXSEGS, NULL); assert(n >= 1 && n <= VTNET_MAXSEGS); plen = 0; tlen = iov[0].iov_len; @@ -420,7 +422,7 @@ pci_vtnet_proctx(struct pci_vtnet_softc pci_vtnet_tap_tx(sc, &iov[1], n - 1, plen); /* chain is processed, release it and set tlen */ - vq_relchain(vq, tlen); + vq_relchain(vq, idx, tlen); } static void @@ -479,7 +481,6 @@ pci_vtnet_tx_thread(void *param) sc->tx_in_progress = 1; pthread_mutex_unlock(&sc->tx_mtx); - vq_startchains(vq); do { /* * Run through entries, placing them into Modified: stable/10/usr.sbin/bhyve/pci_virtio_rnd.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_rnd.c Fri Mar 27 08:51:20 2015 (r280742) +++ stable/10/usr.sbin/bhyve/pci_virtio_rnd.c Fri Mar 27 08:52:57 2015 (r280743) @@ -103,18 +103,17 @@ pci_vtrnd_notify(void *vsc, struct vqueu struct iovec iov; struct pci_vtrnd_softc *sc; int len; + uint16_t idx; sc = vsc; - vq_startchains(vq); - if (sc->vrsc_fd < 0) { vq_endchains(vq, 0); return; } while (vq_has_descs(vq)) { - vq_getchain(vq, &iov, 1, NULL); + vq_getchain(vq, &idx, &iov, 1, NULL); len = read(sc->vrsc_fd, iov.iov_base, iov.iov_len); @@ -126,7 +125,7 @@ pci_vtrnd_notify(void *vsc, struct vqueu /* * Release this chain and handle more */ - vq_relchain(vq, len); + vq_relchain(vq, idx, len); } vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ } Modified: stable/10/usr.sbin/bhyve/virtio.c ============================================================================== --- stable/10/usr.sbin/bhyve/virtio.c Fri Mar 27 08:51:20 2015 (r280742) +++ stable/10/usr.sbin/bhyve/virtio.c Fri Mar 27 08:52:57 2015 (r280743) @@ -97,6 +97,7 @@ vi_reset_dev(struct virtio_softc *vs) for (vq = vs->vs_queues, i = 0; i < nvq; vq++, i++) { vq->vq_flags = 0; vq->vq_last_avail = 0; + vq->vq_save_used = 0; vq->vq_pfn = 0; vq->vq_msix_idx = VIRTIO_MSI_NO_VECTOR; } @@ -188,6 +189,7 @@ vi_vq_init(struct virtio_softc *vs, uint /* Mark queue as allocated, and start at 0 when we use it. */ vq->vq_flags = VQ_ALLOC; vq->vq_last_avail = 0; + vq->vq_save_used = 0; } /* @@ -247,12 +249,12 @@ _vq_record(int i, volatile struct virtio * that vq_has_descs() does one). */ int -vq_getchain(struct vqueue_info *vq, +vq_getchain(struct vqueue_info *vq, uint16_t *pidx, struct iovec *iov, int n_iov, uint16_t *flags) { int i; u_int ndesc, n_indir; - u_int idx, head, next; + u_int idx, next; volatile struct virtio_desc *vdir, *vindir, *vp; struct vmctx *ctx; struct virtio_softc *vs; @@ -295,8 +297,8 @@ vq_getchain(struct vqueue_info *vq, * index, but we just abort if the count gets excessive. */ ctx = vs->vs_pi->pi_vmctx; - head = vq->vq_avail->va_ring[idx & (vq->vq_qsize - 1)]; - next = head; + *pidx = next = vq->vq_avail->va_ring[idx & (vq->vq_qsize - 1)]; + vq->vq_last_avail++; for (i = 0; i < VQ_MAX_DESCRIPTORS; next = vdir->vd_next) { if (next >= vq->vq_qsize) { fprintf(stderr, @@ -370,16 +372,29 @@ loopy: } /* - * Return the currently-first request chain to the guest, setting - * its I/O length to the provided value. + * Return the currently-first request chain back to the available queue. * * (This chain is the one you handled when you called vq_getchain() * and used its positive return value.) */ void -vq_relchain(struct vqueue_info *vq, uint32_t iolen) +vq_retchain(struct vqueue_info *vq) { - uint16_t head, uidx, mask; + + vq->vq_last_avail--; +} + +/* + * Return specified request chain to the guest, setting its I/O length + * to the provided value. + * + * (This chain is the one you handled when you called vq_getchain() + * and used its positive return value.) + */ +void +vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen) +{ + uint16_t uidx, mask; volatile struct vring_used *vuh; volatile struct virtio_used *vue; @@ -395,11 +410,10 @@ vq_relchain(struct vqueue_info *vq, uint */ mask = vq->vq_qsize - 1; vuh = vq->vq_used; - head = vq->vq_avail->va_ring[vq->vq_last_avail++ & mask]; uidx = vuh->vu_idx; vue = &vuh->vu_ring[uidx++ & mask]; - vue->vu_idx = head; /* ie, vue->id = head */ + vue->vu_idx = idx; vue->vu_tlen = iolen; vuh->vu_idx = uidx; } @@ -436,8 +450,8 @@ vq_endchains(struct vqueue_info *vq, int * entire avail was processed, we need to interrupt always. */ vs = vq->vq_vs; - new_idx = vq->vq_used->vu_idx; old_idx = vq->vq_save_used; + vq->vq_save_used = new_idx = vq->vq_used->vu_idx; if (used_all_avail && (vs->vs_negotiated_caps & VIRTIO_F_NOTIFY_ON_EMPTY)) intr = 1; Modified: stable/10/usr.sbin/bhyve/virtio.h ============================================================================== --- stable/10/usr.sbin/bhyve/virtio.h Fri Mar 27 08:51:20 2015 (r280742) +++ stable/10/usr.sbin/bhyve/virtio.h Fri Mar 27 08:52:57 2015 (r280743) @@ -425,20 +425,6 @@ vq_has_descs(struct vqueue_info *vq) } /* - * Called by virtio driver as it starts processing chains. Each - * completed chain (obtained from vq_getchain()) is released by - * calling vq_relchain(), then when all are done, vq_endchains() - * can tell if / how-many chains were processed and know whether - * and how to generate an interrupt. - */ -static inline void -vq_startchains(struct vqueue_info *vq) -{ - - vq->vq_save_used = vq->vq_used->vu_idx; -} - -/* * Deliver an interrupt to guest on the given virtual queue * (if possible, or a generic MSI interrupt if not using MSI-X). */ @@ -465,9 +451,10 @@ int vi_intr_init(struct virtio_softc *vs void vi_reset_dev(struct virtio_softc *); void vi_set_io_bar(struct virtio_softc *, int); -int vq_getchain(struct vqueue_info *vq, +int vq_getchain(struct vqueue_info *vq, uint16_t *pidx, struct iovec *iov, int n_iov, uint16_t *flags); -void vq_relchain(struct vqueue_info *vq, uint32_t iolen); +void vq_retchain(struct vqueue_info *vq); +void vq_relchain(struct vqueue_info *vq, uint16_t idx, uint32_t iolen); void vq_endchains(struct vqueue_info *vq, int used_all_avail); uint64_t vi_pci_read(struct vmctx *ctx, int vcpu, struct pci_devinst *pi, From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:54:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8366E3; Fri, 27 Mar 2015 08:54:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88FA6C3D; Fri, 27 Mar 2015 08:54:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8s00F025928; Fri, 27 Mar 2015 08:54:00 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8s0tx025919; Fri, 27 Mar 2015 08:54:00 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270854.t2R8s0tx025919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:53: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: r280744 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:54:00 -0000 Author: mav Date: Fri Mar 27 08:53:59 2015 New Revision: 280744 URL: https://svnweb.freebsd.org/changeset/base/280744 Log: MFC r280037: Rewrite virtio block device driver to work asynchronously and use the block I/O interface. Asynchronous operation, based on r280026 change, allows to not block virtual CPU during I/O processing, that on slow/busy storage can take seconds. Use of recently improved block I/O interface allows to process multiple requests same time, that improves random I/O performance on wide storages. Benchmarks of virtual disk, backed by ZVOL on RAID10 pool of 4 HDDs, show ~3.5 times random read performance improvements, while no degradation on linear I/O. Guest CPU usage during test dropped from 100% to almost zero. Modified: stable/10/usr.sbin/bhyve/block_if.c stable/10/usr.sbin/bhyve/pci_virtio_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/block_if.c ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:52:57 2015 (r280743) +++ stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:53:59 2015 (r280744) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG 0xb109b109 -#define BLOCKIF_MAXREQ 33 +#define BLOCKIF_MAXREQ 64 #define BLOCKIF_NUMTHR 8 enum blockop { Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:52:57 2015 (r280743) +++ stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:53:59 2015 (r280744) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include "bhyverun.h" #include "pci_emul.h" #include "virtio.h" +#include "block_if.h" #define VTBLK_RINGSZ 64 @@ -120,6 +121,13 @@ static int pci_vtblk_debug; #define DPRINTF(params) if (pci_vtblk_debug) printf params #define WPRINTF(params) printf params +struct pci_vtblk_ioreq { + struct blockif_req io_req; + struct pci_vtblk_softc *io_sc; + uint8_t *io_status; + uint16_t io_idx; +}; + /* * Per-device softc */ @@ -127,10 +135,10 @@ struct pci_vtblk_softc { struct virtio_softc vbsc_vs; pthread_mutex_t vsc_mtx; struct vqueue_info vbsc_vq; - int vbsc_fd; - int vbsc_ischr; - struct vtblk_config vbsc_cfg; + struct vtblk_config vbsc_cfg; + struct blockif_ctxt *bc; char vbsc_ident[VTBLK_BLK_ID_BYTES]; + struct pci_vtblk_ioreq vbsc_ios[VTBLK_RINGSZ]; }; static void pci_vtblk_reset(void *); @@ -160,10 +168,34 @@ pci_vtblk_reset(void *vsc) } static void +pci_vtblk_done(struct blockif_req *br, int err) +{ + struct pci_vtblk_ioreq *io = br->br_param; + struct pci_vtblk_softc *sc = io->io_sc; + + /* convert errno into a virtio block error return */ + if (err == EOPNOTSUPP || err == ENOSYS) + *io->io_status = VTBLK_S_UNSUPP; + else if (err != 0) + *io->io_status = VTBLK_S_IOERR; + else + *io->io_status = VTBLK_S_OK; + + /* + * Return the descriptor back to the host. + * We wrote 1 byte (our status) to host. + */ + pthread_mutex_lock(&sc->vsc_mtx); + vq_relchain(&sc->vbsc_vq, io->io_idx, 1); + vq_endchains(&sc->vbsc_vq, 0); + pthread_mutex_unlock(&sc->vsc_mtx); +} + +static void pci_vtblk_proc(struct pci_vtblk_softc *sc, struct vqueue_info *vq) { struct virtio_blk_hdr *vbh; - uint8_t *status; + struct pci_vtblk_ioreq *io; int i, n; int err; int iolen; @@ -184,11 +216,14 @@ pci_vtblk_proc(struct pci_vtblk_softc *s */ assert(n >= 2 && n <= VTBLK_MAXSEGS + 2); + io = &sc->vbsc_ios[idx]; assert((flags[0] & VRING_DESC_F_WRITE) == 0); assert(iov[0].iov_len == sizeof(struct virtio_blk_hdr)); vbh = iov[0].iov_base; - - status = iov[--n].iov_base; + memcpy(&io->io_req.br_iov, &iov[1], sizeof(struct iovec) * (n - 2)); + io->io_req.br_iovcnt = n - 2; + io->io_req.br_offset = vbh->vbh_sector * DEV_BSIZE; + io->io_status = iov[--n].iov_base; assert(iov[n].iov_len == 1); assert(flags[n] & VRING_DESC_F_WRITE); @@ -200,8 +235,6 @@ pci_vtblk_proc(struct pci_vtblk_softc *s type = vbh->vbh_type & ~VBH_FLAG_BARRIER; writeop = (type == VBH_OP_WRITE); - offset = vbh->vbh_sector * DEV_BSIZE; - iolen = 0; for (i = 1; i < n; i++) { /* @@ -217,48 +250,28 @@ pci_vtblk_proc(struct pci_vtblk_softc *s DPRINTF(("virtio-block: %s op, %d bytes, %d segs, offset %ld\n\r", writeop ? "write" : "read/ident", iolen, i - 1, offset)); - err = 0; switch (type) { + case VBH_OP_READ: + err = blockif_read(sc->bc, &io->io_req); + break; case VBH_OP_WRITE: - if (pwritev(sc->vbsc_fd, iov + 1, i - 1, offset) < 0) - err = errno; + err = blockif_write(sc->bc, &io->io_req); break; - case VBH_OP_READ: - if (preadv(sc->vbsc_fd, iov + 1, i - 1, offset) < 0) - err = errno; + case VBH_OP_FLUSH: + case VBH_OP_FLUSH_OUT: + err = blockif_flush(sc->bc, &io->io_req); break; case VBH_OP_IDENT: /* Assume a single buffer */ strlcpy(iov[1].iov_base, sc->vbsc_ident, MIN(iov[1].iov_len, sizeof(sc->vbsc_ident))); - err = 0; - break; - case VBH_OP_FLUSH: - case VBH_OP_FLUSH_OUT: - if (sc->vbsc_ischr) { - if (ioctl(sc->vbsc_fd, DIOCGFLUSH)) - err = errno; - } else if (fsync(sc->vbsc_fd)) - err = errno; - break; + pci_vtblk_done(&io->io_req, 0); + return; default: - err = -ENOSYS; - break; + pci_vtblk_done(&io->io_req, EOPNOTSUPP); + return; } - - /* convert errno into a virtio block error return */ - if (err == -ENOSYS) - *status = VTBLK_S_UNSUPP; - else if (err != 0) - *status = VTBLK_S_IOERR; - else - *status = VTBLK_S_OK; - - /* - * Return the descriptor back to the host. - * We wrote 1 byte (our status) to host. - */ - vq_relchain(vq, idx, 1); + assert(err == 0); } static void @@ -268,19 +281,18 @@ pci_vtblk_notify(void *vsc, struct vqueu while (vq_has_descs(vq)) pci_vtblk_proc(sc, vq); - vq_endchains(vq, 1); /* Generate interrupt if appropriate. */ } static int pci_vtblk_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) { - struct stat sbuf; + char bident[sizeof("XX:X:X")]; + struct blockif_ctxt *bctxt; MD5_CTX mdctx; u_char digest[16]; struct pci_vtblk_softc *sc; - off_t size, sts, sto; - int fd; - int sectsz; + off_t size; + int i, sectsz, sts, sto; if (opts == NULL) { printf("virtio-block: backing device required\n"); @@ -290,43 +302,26 @@ pci_vtblk_init(struct vmctx *ctx, struct /* * The supplied backing file has to exist */ - fd = open(opts, O_RDWR); - if (fd < 0) { + snprintf(bident, sizeof(bident), "%d:%d", pi->pi_slot, pi->pi_func); + bctxt = blockif_open(opts, bident); + if (bctxt == NULL) { perror("Could not open backing file"); return (1); } - if (fstat(fd, &sbuf) < 0) { - perror("Could not stat backing file"); - close(fd); - return (1); - } - - /* - * Deal with raw devices - */ - size = sbuf.st_size; - sectsz = DEV_BSIZE; - sts = sto = 0; - if (S_ISCHR(sbuf.st_mode)) { - if (ioctl(fd, DIOCGMEDIASIZE, &size) < 0 || - ioctl(fd, DIOCGSECTORSIZE, §sz)) { - perror("Could not fetch dev blk/sector size"); - close(fd); - return (1); - } - assert(size != 0); - assert(sectsz != 0); - if (ioctl(fd, DIOCGSTRIPESIZE, &sts) == 0 && sts > 0) - ioctl(fd, DIOCGSTRIPEOFFSET, &sto); - } else - sts = sbuf.st_blksize; + size = blockif_size(bctxt); + sectsz = blockif_sectsz(bctxt); + blockif_psectsz(bctxt, &sts, &sto); sc = calloc(1, sizeof(struct pci_vtblk_softc)); - - /* record fd of storage device/file */ - sc->vbsc_fd = fd; - sc->vbsc_ischr = S_ISCHR(sbuf.st_mode); + sc->bc = bctxt; + for (i = 0; i < VTBLK_RINGSZ; i++) { + struct pci_vtblk_ioreq *io = &sc->vbsc_ios[i]; + io->io_req.br_callback = pci_vtblk_done; + io->io_req.br_param = io; + io->io_sc = sc; + io->io_idx = i; + } pthread_mutex_init(&sc->vsc_mtx, NULL); @@ -375,8 +370,11 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_lintr_request(pi); - if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) + if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) { + blockif_close(sc->bc); + free(sc); return (1); + } vi_set_io_bar(&sc->vbsc_vs, 0); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:54:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2766221B; Fri, 27 Mar 2015 08:54:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC46FC49; Fri, 27 Mar 2015 08:54:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8sutn026109; Fri, 27 Mar 2015 08:54:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8suRp026108; Fri, 27 Mar 2015 08:54:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270854.t2R8suRp026108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:54:56 +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: r280745 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:54:57 -0000 Author: mav Date: Fri Mar 27 08:54:55 2015 New Revision: 280745 URL: https://svnweb.freebsd.org/changeset/base/280745 Log: MFC r280040: Give AHCI disk serial based on backing file path same as for virtio block. It is still not good that they may intersect on different hosts, but that is better then intersecting on the same host. Modified: stable/10/usr.sbin/bhyve/pci_ahci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_ahci.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:53:59 2015 (r280744) +++ stable/10/usr.sbin/bhyve/pci_ahci.c Fri Mar 27 08:54:55 2015 (r280745) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "bhyverun.h" #include "pci_emul.h" @@ -131,6 +132,7 @@ struct ahci_port { struct pci_ahci_softc *pr_sc; uint8_t *cmd_lst; uint8_t *rfis; + char ident[20 + 1]; int atapi; int reset; int mult_sectors; @@ -855,8 +857,7 @@ handle_identify(struct ahci_port *p, int buf[1] = cyl; buf[3] = heads; buf[6] = sech; - /* TODO emulate different serial? */ - ata_string((uint8_t *)(buf+10), "123456", 20); + ata_string((uint8_t *)(buf+10), p->ident, 20); ata_string((uint8_t *)(buf+23), "001", 8); ata_string((uint8_t *)(buf+27), "BHYVE SATA DISK", 40); buf[47] = (0x8000 | 128); @@ -946,8 +947,7 @@ handle_atapi_identify(struct ahci_port * memset(buf, 0, sizeof(buf)); buf[0] = (2 << 14 | 5 << 8 | 1 << 7 | 2 << 5); - /* TODO emulate different serial? */ - ata_string((uint8_t *)(buf+10), "123456", 20); + ata_string((uint8_t *)(buf+10), p->ident, 20); ata_string((uint8_t *)(buf+23), "001", 8); ata_string((uint8_t *)(buf+27), "BHYVE SATA DVD ROM", 40); buf[49] = (1 << 9 | 1 << 8); @@ -2167,6 +2167,8 @@ pci_ahci_init(struct vmctx *ctx, struct struct blockif_ctxt *bctxt; struct pci_ahci_softc *sc; int ret, slots; + MD5_CTX mdctx; + u_char digest[16]; ret = 0; @@ -2204,6 +2206,16 @@ pci_ahci_init(struct vmctx *ctx, struct sc->port[0].pr_sc = sc; /* + * Create an identifier for the backing file. Use parts of the + * md5 sum of the filename + */ + MD5Init(&mdctx); + MD5Update(&mdctx, opts, strlen(opts)); + MD5Final(digest, &mdctx); + sprintf(sc->port[0].ident, "BHYVE-%02X%02X-%02X%02X-%02X%02X", + digest[0], digest[1], digest[2], digest[3], digest[4], digest[5]); + + /* * Allocate blockif request structures and add them * to the free list */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:55:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9D7A364; Fri, 27 Mar 2015 08:55:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A155DC59; Fri, 27 Mar 2015 08:55:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8tt0P026333; Fri, 27 Mar 2015 08:55:55 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8tt60026332; Fri, 27 Mar 2015 08:55:55 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270855.t2R8tt60026332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:55:55 +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: r280746 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:55:55 -0000 Author: mav Date: Fri Mar 27 08:55:54 2015 New Revision: 280746 URL: https://svnweb.freebsd.org/changeset/base/280746 Log: MFC r280042: Close potential race on blockif_close(). Reported by: vangyzen Modified: stable/10/usr.sbin/bhyve/block_if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/block_if.c ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:54:55 2015 (r280745) +++ stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:55:54 2015 (r280746) @@ -579,7 +579,9 @@ blockif_close(struct blockif_ctxt *bc) /* * Stop the block i/o thread */ + pthread_mutex_lock(&bc->bc_mtx); bc->bc_closing = 1; + pthread_mutex_unlock(&bc->bc_mtx); pthread_cond_broadcast(&bc->bc_cond); for (i = 0; i < BLOCKIF_NUMTHR; i++) pthread_join(bc->bc_btid[i], &jval); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:56:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9244F4A3; Fri, 27 Mar 2015 08:56:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CB85C6A; Fri, 27 Mar 2015 08:56:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8ujYi026502; Fri, 27 Mar 2015 08:56:45 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8ujvl026501; Fri, 27 Mar 2015 08:56:45 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270856.t2R8ujvl026501@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:56:45 +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: r280747 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:56:45 -0000 Author: mav Date: Fri Mar 27 08:56:44 2015 New Revision: 280747 URL: https://svnweb.freebsd.org/changeset/base/280747 Log: MFC r280044: According to Linux and QEMU, s/n equal to buffer is not zero-terminated. This makes same s/n reported for both virtio and AHCI drivers. Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:55:54 2015 (r280746) +++ stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:56:44 2015 (r280747) @@ -263,7 +263,9 @@ pci_vtblk_proc(struct pci_vtblk_softc *s break; case VBH_OP_IDENT: /* Assume a single buffer */ - strlcpy(iov[1].iov_base, sc->vbsc_ident, + /* S/n equal to buffer is not zero-terminated. */ + memset(iov[1].iov_base, 0, iov[1].iov_len); + strncpy(iov[1].iov_base, sc->vbsc_ident, MIN(iov[1].iov_len, sizeof(sc->vbsc_ident))); pci_vtblk_done(&io->io_req, 0); return; From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:57:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 338687A6; Fri, 27 Mar 2015 08:57:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E463C85; Fri, 27 Mar 2015 08:57:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8vcsv026772; Fri, 27 Mar 2015 08:57:38 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8vcUs026771; Fri, 27 Mar 2015 08:57:38 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270857.t2R8vcUs026771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:57: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: r280748 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:57:39 -0000 Author: mav Date: Fri Mar 27 08:57:38 2015 New Revision: 280748 URL: https://svnweb.freebsd.org/changeset/base/280748 Log: MFC r280126: Pre-allocate one extra request per processing thread. Processing threads call callbacks before freeing requests. As result, new requests may arrive before old ones are freed. Modified: stable/10/usr.sbin/bhyve/block_if.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/block_if.c ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:56:44 2015 (r280747) +++ stable/10/usr.sbin/bhyve/block_if.c Fri Mar 27 08:57:38 2015 (r280748) @@ -54,8 +54,8 @@ __FBSDID("$FreeBSD$"); #define BLOCKIF_SIG 0xb109b109 -#define BLOCKIF_MAXREQ 64 #define BLOCKIF_NUMTHR 8 +#define BLOCKIF_MAXREQ (64 + BLOCKIF_NUMTHR) enum blockop { BOP_READ, From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:58:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 963808DE; Fri, 27 Mar 2015 08:58:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66BADC91; Fri, 27 Mar 2015 08:58:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8wVFQ026947; Fri, 27 Mar 2015 08:58:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8wUmR026945; Fri, 27 Mar 2015 08:58:30 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270858.t2R8wUmR026945@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:58: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: r280749 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:58:31 -0000 Author: mav Date: Fri Mar 27 08:58:30 2015 New Revision: 280749 URL: https://svnweb.freebsd.org/changeset/base/280749 Log: MFC r280133: Increase S/G list size of 32 to 33 entries. 32 entries are not enough for the worst case of misaligned 128KB request, that made FreeBSD to chunk large quests in odd pieces. Modified: stable/10/usr.sbin/bhyve/block_if.h stable/10/usr.sbin/bhyve/pci_virtio_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/block_if.h ============================================================================== --- stable/10/usr.sbin/bhyve/block_if.h Fri Mar 27 08:57:38 2015 (r280748) +++ stable/10/usr.sbin/bhyve/block_if.h Fri Mar 27 08:58:30 2015 (r280749) @@ -39,7 +39,7 @@ #include #include -#define BLOCKIF_IOV_MAX 32 /* not practical to be IOV_MAX */ +#define BLOCKIF_IOV_MAX 33 /* not practical to be IOV_MAX */ struct blockif_req { struct iovec br_iov[BLOCKIF_IOV_MAX]; Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:57:38 2015 (r280748) +++ stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:58:30 2015 (r280749) @@ -55,8 +55,6 @@ __FBSDID("$FreeBSD$"); #define VTBLK_RINGSZ 64 -#define VTBLK_MAXSEGS 32 - #define VTBLK_S_OK 0 #define VTBLK_S_IOERR 1 #define VTBLK_S_UNSUPP 2 @@ -201,10 +199,10 @@ pci_vtblk_proc(struct pci_vtblk_softc *s int iolen; int writeop, type; off_t offset; - struct iovec iov[VTBLK_MAXSEGS + 2]; - uint16_t idx, flags[VTBLK_MAXSEGS + 2]; + struct iovec iov[BLOCKIF_IOV_MAX + 2]; + uint16_t idx, flags[BLOCKIF_IOV_MAX + 2]; - n = vq_getchain(vq, &idx, iov, VTBLK_MAXSEGS + 2, flags); + n = vq_getchain(vq, &idx, iov, BLOCKIF_IOV_MAX + 2, flags); /* * The first descriptor will be the read-only fixed header, @@ -214,7 +212,7 @@ pci_vtblk_proc(struct pci_vtblk_softc *s * XXX - note - this fails on crash dump, which does a * VIRTIO_BLK_T_FLUSH with a zero transfer length */ - assert(n >= 2 && n <= VTBLK_MAXSEGS + 2); + assert(n >= 2 && n <= BLOCKIF_IOV_MAX + 2); io = &sc->vbsc_ios[idx]; assert((flags[0] & VRING_DESC_F_WRITE) == 0); @@ -347,7 +345,7 @@ pci_vtblk_init(struct vmctx *ctx, struct /* setup virtio block config space */ sc->vbsc_cfg.vbc_capacity = size / DEV_BSIZE; /* 512-byte units */ sc->vbsc_cfg.vbc_size_max = 0; /* not negotiated */ - sc->vbsc_cfg.vbc_seg_max = VTBLK_MAXSEGS; + sc->vbsc_cfg.vbc_seg_max = BLOCKIF_IOV_MAX; sc->vbsc_cfg.vbc_geometry.cylinders = 0; /* no geometry */ sc->vbsc_cfg.vbc_geometry.heads = 0; sc->vbsc_cfg.vbc_geometry.sectors = 0; From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 08:59:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C3660A1A; Fri, 27 Mar 2015 08:59:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0ABC99; Fri, 27 Mar 2015 08:59:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R8xMkH027118; Fri, 27 Mar 2015 08:59:22 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R8xM3E027117; Fri, 27 Mar 2015 08:59:22 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270859.t2R8xM3E027117@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 08:59: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: r280750 - stable/10/usr.sbin/bhyve X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 08:59:22 -0000 Author: mav Date: Fri Mar 27 08:59:21 2015 New Revision: 280750 URL: https://svnweb.freebsd.org/changeset/base/280750 Log: MFC r280154: Report that we may have write cache, and that we do support FLUSH. Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/bhyve/pci_virtio_block.c ============================================================================== --- stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:58:30 2015 (r280749) +++ stable/10/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 08:59:21 2015 (r280750) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); /* Capability bits */ #define VTBLK_F_SEG_MAX (1 << 2) /* Maximum request segments */ #define VTBLK_F_BLK_SIZE (1 << 6) /* cfg block size valid */ +#define VTBLK_F_FLUSH (1 << 9) /* Cache flush support */ #define VTBLK_F_TOPOLOGY (1 << 10) /* Optimal I/O alignment */ /* @@ -72,6 +73,7 @@ __FBSDID("$FreeBSD$"); #define VTBLK_S_HOSTCAPS \ ( VTBLK_F_SEG_MAX | \ VTBLK_F_BLK_SIZE | \ + VTBLK_F_FLUSH | \ VTBLK_F_TOPOLOGY | \ VIRTIO_RING_F_INDIRECT_DESC ) /* indirect descriptors */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 09:01:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CBB8D23; Fri, 27 Mar 2015 09:01:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07514CC1; Fri, 27 Mar 2015 09:01:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R91Q8w030364; Fri, 27 Mar 2015 09:01:26 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R91QSK030363; Fri, 27 Mar 2015 09:01:26 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270901.t2R91QSK030363@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 09:01: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: r280751 - stable/10/usr.sbin/powerd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 09:01:27 -0000 Author: mav Date: Fri Mar 27 09:01:25 2015 New Revision: 280751 URL: https://svnweb.freebsd.org/changeset/base/280751 Log: MFC r280286: Add comment explaining existing powerd behavior on SMP systems. Modified: stable/10/usr.sbin/powerd/powerd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/powerd/powerd.c ============================================================================== --- stable/10/usr.sbin/powerd/powerd.c Fri Mar 27 08:59:21 2015 (r280750) +++ stable/10/usr.sbin/powerd/powerd.c Fri Mar 27 09:01:25 2015 (r280751) @@ -127,6 +127,12 @@ static int devd_pipe = -1; #define DEVD_RETRY_INTERVAL 60 /* seconds */ static struct timeval tried_devd; +/* + * This function returns summary load of all CPUs. It was made so + * intentionally to not reduce performance in scenarios when several + * threads are processing requests as a pipeline -- running one at + * a time on different CPUs and waiting for each other. + */ static int read_usage_times(int *load) { From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 09:04:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A454DF65; Fri, 27 Mar 2015 09:04:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EE53D71; Fri, 27 Mar 2015 09:04:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R94WNs031516; Fri, 27 Mar 2015 09:04:32 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R94WFI031515; Fri, 27 Mar 2015 09:04:32 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270904.t2R94WFI031515@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 09:04:32 +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: r280752 - stable/9/usr.sbin/powerd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 09:04:32 -0000 Author: mav Date: Fri Mar 27 09:04:31 2015 New Revision: 280752 URL: https://svnweb.freebsd.org/changeset/base/280752 Log: MFC r280286: Add comment explaining existing powerd behavior on SMP systems. Modified: stable/9/usr.sbin/powerd/powerd.c Directory Properties: stable/9/ (props changed) stable/9/usr.sbin/ (props changed) stable/9/usr.sbin/powerd/ (props changed) Modified: stable/9/usr.sbin/powerd/powerd.c ============================================================================== --- stable/9/usr.sbin/powerd/powerd.c Fri Mar 27 09:01:25 2015 (r280751) +++ stable/9/usr.sbin/powerd/powerd.c Fri Mar 27 09:04:31 2015 (r280752) @@ -126,6 +126,12 @@ static int devd_pipe = -1; #define DEVD_RETRY_INTERVAL 60 /* seconds */ static struct timeval tried_devd; +/* + * This function returns summary load of all CPUs. It was made so + * intentionally to not reduce performance in scenarios when several + * threads are processing requests as a pipeline -- running one at + * a time on different CPUs and waiting for each other. + */ static int read_usage_times(int *load) { From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 09:28:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E337A9C5; Fri, 27 Mar 2015 09:28:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD252FEC; Fri, 27 Mar 2015 09:28:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R9SVKK042993; Fri, 27 Mar 2015 09:28:31 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R9SVle042992; Fri, 27 Mar 2015 09:28:31 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270928.t2R9SVle042992@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 09:28: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: r280753 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 09:28:32 -0000 Author: mav Date: Fri Mar 27 09:28:30 2015 New Revision: 280753 URL: https://svnweb.freebsd.org/changeset/base/280753 Log: MFC r279927: Make DIOCGATTR in device mode handle "GEOM::candelete". Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Mar 27 09:04:31 2015 (r280752) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Fri Mar 27 09:28:30 2015 (r280753) @@ -3131,7 +3131,9 @@ zvol_d_ioctl(struct cdev *dev, u_long cm struct diocgattr_arg *arg = (struct diocgattr_arg *)data; uint64_t refd, avail, usedobjs, availobjs; - if (strcmp(arg->name, "blocksavail") == 0) { + if (strcmp(arg->name, "GEOM::candelete") == 0) + arg->value.i = 1; + else if (strcmp(arg->name, "blocksavail") == 0) { dmu_objset_space(zv->zv_objset, &refd, &avail, &usedobjs, &availobjs); arg->value.off = avail / DEV_BSIZE; From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 09:31:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85144B51; Fri, 27 Mar 2015 09:31:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6F3AA10D; Fri, 27 Mar 2015 09:31:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R9VTls046275; Fri, 27 Mar 2015 09:31:29 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R9VSsn046273; Fri, 27 Mar 2015 09:31:28 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270931.t2R9VSsn046273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 09:31:28 +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: r280754 - in stable/10/sys: cam/ata 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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 09:31:29 -0000 Author: mav Date: Fri Mar 27 09:31:28 2015 New Revision: 280754 URL: https://svnweb.freebsd.org/changeset/base/280754 Log: MFC r270832 (by imp): Add a few defines and packet types for SATA 3.2 and FPDMA (First Party DMA). Modified: stable/10/sys/cam/ata/ata_all.c stable/10/sys/sys/ata.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/ata/ata_all.c ============================================================================== --- stable/10/sys/cam/ata/ata_all.c Fri Mar 27 09:28:30 2015 (r280753) +++ stable/10/sys/cam/ata/ata_all.c Fri Mar 27 09:31:28 2015 (r280754) @@ -108,6 +108,9 @@ ata_op_string(struct ata_cmd *cmd) case 0x51: return ("CONFIGURE_STREAM"); case 0x60: return ("READ_FPDMA_QUEUED"); case 0x61: return ("WRITE_FPDMA_QUEUED"); + case 0x63: return ("NCQ_NON_DATA"); + case 0x64: return ("SEND_FPDMA_QUEUED"); + case 0x65: return ("RECEIVE_FPDMA_QUEUED"); case 0x67: if (cmd->features == 0xec) return ("SEP_ATTN IDENTIFY"); Modified: stable/10/sys/sys/ata.h ============================================================================== --- stable/10/sys/sys/ata.h Fri Mar 27 09:28:30 2015 (r280753) +++ stable/10/sys/sys/ata.h Fri Mar 27 09:31:28 2015 (r280754) @@ -370,6 +370,7 @@ struct ata_params { #define ATA_READ_LOG_DMA_EXT 0x47 /* read log DMA ext - PIO Data-In */ #define ATA_READ_FPDMA_QUEUED 0x60 /* read DMA NCQ */ #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */ +#define ATA_NCQ_NON_DATA 0x63 /* NCQ non-data command */ #define ATA_SEND_FPDMA_QUEUED 0x64 /* send DMA NCQ */ #define ATA_RECV_FPDMA_QUEUED 0x65 /* recieve DMA NCQ */ #define ATA_SEP_ATTN 0x67 /* SEP request */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 09:32:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 223FDCAD; Fri, 27 Mar 2015 09:32:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D2A9129; Fri, 27 Mar 2015 09:32:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2R9WYT0047105; Fri, 27 Mar 2015 09:32:34 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2R9WY9a047104; Fri, 27 Mar 2015 09:32:34 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503270932.t2R9WY9a047104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 09:32:34 +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: r280755 - stable/10/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-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 09:32:35 -0000 Author: mav Date: Fri Mar 27 09:32:34 2015 New Revision: 280755 URL: https://svnweb.freebsd.org/changeset/base/280755 Log: MFC r273445 (by imp): Add defines for various FIRST PARTY DMA SEND subcommands. Modified: stable/10/sys/sys/ata.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/sys/ata.h ============================================================================== --- stable/10/sys/sys/ata.h Fri Mar 27 09:31:28 2015 (r280754) +++ stable/10/sys/sys/ata.h Fri Mar 27 09:32:34 2015 (r280755) @@ -372,6 +372,10 @@ struct ata_params { #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */ #define ATA_NCQ_NON_DATA 0x63 /* NCQ non-data command */ #define ATA_SEND_FPDMA_QUEUED 0x64 /* send DMA NCQ */ +#define ATA_SFPDMA_DSM 0x00 /* Data set management */ +#define ATA_SFPDMA_DSM_TRIM 0x01 /* Set trim bit in auxilary */ +#define ATA_SFPDMA_HYBRID_EVICT 0x01 /* Hybrid Evict */ +#define ATA_SFPDMA_WLDMA 0x02 /* Write Log DMA EXT */ #define ATA_RECV_FPDMA_QUEUED 0x65 /* recieve DMA NCQ */ #define ATA_SEP_ATTN 0x67 /* SEP request */ #define ATA_SEEK 0x70 /* seek */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 10:00:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 803A691E; Fri, 27 Mar 2015 10:00:25 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 36EFD62A; Fri, 27 Mar 2015 10:00:25 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YbR3n-0002ja-0R; Fri, 27 Mar 2015 13:00:15 +0300 Date: Fri, 27 Mar 2015 13:00:14 +0300 From: Slawa Olhovchenkov To: Warner Losh Subject: Re: svn commit: r280727 - in head: share/mk sys/conf Message-ID: <20150327100014.GA74532@zxy.spb.ru> References: <201503270235.t2R2ZCwp047154@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503270235.t2R2ZCwp047154@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 10:00:25 -0000 On Fri, Mar 27, 2015 at 02:35:12AM +0000, Warner Losh wrote: > Author: imp > Date: Fri Mar 27 02:35:11 2015 > New Revision: 280727 > URL: https://svnweb.freebsd.org/changeset/base/280727 > > Log: > Add support for specifying unsupported / broken options that override > any defaults or user specified actions on the command line. This would > be useful for specifying features that are always broken or that > cannot make sense on a specific architecture, like ACPI on pc98 or > EISA on !i386 (!x86 usage of EISA is broken and there's no supported > hardware that could have it in any event). Any items in > __ALWAYS_NO_OPTIONS are forced to "no" regardless of other settings. Alpha 21064 support EISA. FreeBSD support Digi EISA card. From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 11:01:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65A8ADE4; Fri, 27 Mar 2015 11:01:48 +0000 (UTC) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 23946EC2; Fri, 27 Mar 2015 11:01:47 +0000 (UTC) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id F184BD64414; Fri, 27 Mar 2015 22:01:37 +1100 (AEDT) Date: Fri, 27 Mar 2015 22:01:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Tijl Coosemans Subject: Re: svn commit: r280636 - head/include In-Reply-To: <20150326142052.6789dd50@kalimero.tijl.coosemans.org> Message-ID: <20150327214341.E2629@besplex.bde.org> References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> <20150326170535.U2239@besplex.bde.org> <20150326142052.6789dd50@kalimero.tijl.coosemans.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=ZuzUdbLG c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=13UMWzg37cEECB_ZgkkA:9 a=CjuIK1q_8ugA:10 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, Pedro Giffuni , Bruce Evans , svn-src-head@freebsd.org, gerald@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 11:01:48 -0000 On Thu, 26 Mar 2015, Tijl Coosemans wrote: > On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans wrote: >> On Wed, 25 Mar 2015, Pedro Giffuni wrote: >>> On 03/25/15 21:14, Bruce Evans wrote: >>>> On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: >>>>> Log: >>>>> Temporarily revert 280458. >>>>> >>>>> GCC is still carries an old version of cdefs.h which doesn't >>>>> accept multiple parameters for the nonnull attribute. >>>>> Since this issue probably affects many ports in the tree >>>>> we will revert it for now until gcc gets fixed. >>>> >>>> Note that sys/cdefs.h is supposed to work with any version of >>>> gcc back to gcc-1, and does mostly work back to at least gcc-2.95. >>>> The whole point of sys/cdefs.h is to provide compatibity macros >>>> for old and other non-default compilers. Standard compilers don't >>>> even have __attribute__(()). So no changes in future versions >>>> of gcc will fix the previous commit. >>> >>> cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. >> >> I now remember other bugs in it. I think you put the varargs stuff >> in the non-gcc version. That won't work compilers that don't support >> varargs for macros. Neither will not changing the non-gcc version. I confirmed the complete brokenness of the varargs stuff for the non-C99 case. >> glibc (2.6 at least) avoids using varargs in its __nonnull() macro >> by using the same portable method that is used in many optional >> debugging statements including FreeBSD's KASSERT(). ... > > Maybe introduce a __nonnull_all macro and leave __nonnull varargs-free: > > #define __nonnull(x) __attribute__((__nonnull__(x))) > #define __nonnull_all __attribute__((__nonnull__)) > > Then in the rare cases where multiple arguments must be nonnull but > __nonnull_all doesn't apply you can use multiple __nonnull: > > int f(void *, void *, void *) __nonnull(1) __nonnull(2); Good idea. There aren't many functions that accept null for some pointer args but not others. The multiple __nonnull() method is already used a lot. E.g., in sys/systm.h it is used 11 times. systm.h also gives many examples where __nonnull_all cannot be used. It cannot be used for the strto* family because endptr can be null, or for the copyinstr() family for similar reasons (a value may be returned indirectly but the pointer for this is null if this value is not needed). >> I see. gcc's "fixed" headers cause lots of problems. > > I've complained about this multiple times in the past. The gcc ports > should not install these "fixed" headers. Is this easy to do, and does it work without problems? It might be easier and would be safet to install everything and change the default include path in a way that can be changed back at runtime. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 11:14:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DDF71C5; Fri, 27 Mar 2015 11:14:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED37129; Fri, 27 Mar 2015 11:14:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RBED1X094846; Fri, 27 Mar 2015 11:14:13 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RBEDkn094845; Fri, 27 Mar 2015 11:14:13 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503271114.t2RBEDkn094845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 11:14:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280756 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 11:14:14 -0000 Author: mav Date: Fri Mar 27 11:14:12 2015 New Revision: 280756 URL: https://svnweb.freebsd.org/changeset/base/280756 Log: Fix bug on memory allocation error in split method. While there, use bioq_takefirst() in place where it is convenient. MFC after: 1 week Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Mar 27 09:32:34 2015 (r280755) +++ head/sys/geom/mirror/g_mirror.c Fri Mar 27 11:14:12 2015 (r280756) @@ -1582,7 +1582,7 @@ g_mirror_request_split(struct g_mirror_s cbp = g_clone_bio(bp); if (cbp == NULL) { while ((cbp = bioq_takefirst(&queue)) != NULL) - bioq_remove(&queue, cbp); + g_destroy_bio(cbp);; if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_io_deliver(bp, bp->bio_error); @@ -1865,7 +1865,7 @@ g_mirror_worker(void *arg) */ /* Get first request from the queue. */ mtx_lock(&sc->sc_queue_mtx); - bp = bioq_first(&sc->sc_queue); + bp = bioq_takefirst(&sc->sc_queue); if (bp == NULL) { if ((sc->sc_flags & G_MIRROR_DEVICE_FLAG_DESTROY) != 0) { @@ -1893,7 +1893,6 @@ g_mirror_worker(void *arg) G_MIRROR_DEBUG(5, "%s: I'm here 4.", __func__); continue; } - bioq_remove(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (bp->bio_from->geom == sc->sc_sync.ds_geom && From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 12:44:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C7F7BA5; Fri, 27 Mar 2015 12:44:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D0C0CDF; Fri, 27 Mar 2015 12:44:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RCiUW7037118; Fri, 27 Mar 2015 12:44:30 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RCiT9W037115; Fri, 27 Mar 2015 12:44:29 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503271244.t2RCiT9W037115@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 12:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280757 - in head/sys/geom: mirror raid X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 12:44:30 -0000 Author: mav Date: Fri Mar 27 12:44:28 2015 New Revision: 280757 URL: https://svnweb.freebsd.org/changeset/base/280757 Log: Remove request sorting from GEOM_MIRROR and GEOM_RAID. When CPU is not busy, those queues are typically empty. When CPU is busy, then one more extra sorting is the last thing it needs. If specific device (HDD) really needs sorting, then it will be done later by CAM. This supposed to fix livelock reported for mirror of two SSDs, when UFS fires zillion of BIO_DELETE requests, that totally blocks I/O subsystem by pointless sorting of requests and responses under single mutex lock. MFC after: 2 weeks Modified: head/sys/geom/mirror/g_mirror.c head/sys/geom/raid/g_raid.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Mar 27 11:14:12 2015 (r280756) +++ head/sys/geom/mirror/g_mirror.c Fri Mar 27 12:44:28 2015 (r280757) @@ -888,7 +888,7 @@ g_mirror_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_REGULAR; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -975,7 +975,7 @@ g_mirror_regular_request(struct bio *bp) else { pbp->bio_error = 0; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, pbp); + bioq_insert_tail(&sc->sc_queue, pbp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); @@ -1015,7 +1015,7 @@ g_mirror_sync_done(struct bio *bp) sc = bp->bio_from->geom->softc; bp->bio_cflags = G_MIRROR_BIO_FLAG_SYNC; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); wakeup(sc); } @@ -1144,7 +1144,7 @@ g_mirror_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); G_MIRROR_DEBUG(4, "%s: Waking up %p.", __func__, sc); wakeup(sc); Modified: head/sys/geom/raid/g_raid.c ============================================================================== --- head/sys/geom/raid/g_raid.c Fri Mar 27 11:14:12 2015 (r280756) +++ head/sys/geom/raid/g_raid.c Fri Mar 27 12:44:28 2015 (r280757) @@ -1132,7 +1132,7 @@ g_raid_start(struct bio *bp) return; } mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) { G_RAID_DEBUG1(4, sc, "Waking up %p.", sc); @@ -1344,7 +1344,7 @@ g_raid_unlock_range(struct g_raid_volume (intmax_t)(lp->l_offset+lp->l_length)); mtx_lock(&sc->sc_queue_mtx); while ((bp = bioq_takefirst(&vol->v_locked)) != NULL) - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); free(lp, M_RAID); return (0); @@ -1438,7 +1438,7 @@ g_raid_disk_done(struct bio *bp) sd = bp->bio_caller1; sc = sd->sd_softc; mtx_lock(&sc->sc_queue_mtx); - bioq_disksort(&sc->sc_queue, bp); + bioq_insert_tail(&sc->sc_queue, bp); mtx_unlock(&sc->sc_queue_mtx); if (!dumping) wakeup(sc); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 12:45:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBD40CEE; Fri, 27 Mar 2015 12:45:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6F58CED; Fri, 27 Mar 2015 12:45:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RCjLmd037311; Fri, 27 Mar 2015 12:45:21 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RCjLQY037309; Fri, 27 Mar 2015 12:45:21 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201503271245.t2RCjLQY037309@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 27 Mar 2015 12:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280758 - head/sys/geom/mirror X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 12:45:22 -0000 Author: mav Date: Fri Mar 27 12:45:20 2015 New Revision: 280758 URL: https://svnweb.freebsd.org/changeset/base/280758 Log: Remove extra semicolon. MFC after: 1 week Modified: head/sys/geom/mirror/g_mirror.c Modified: head/sys/geom/mirror/g_mirror.c ============================================================================== --- head/sys/geom/mirror/g_mirror.c Fri Mar 27 12:44:28 2015 (r280757) +++ head/sys/geom/mirror/g_mirror.c Fri Mar 27 12:45:20 2015 (r280758) @@ -1582,7 +1582,7 @@ g_mirror_request_split(struct g_mirror_s cbp = g_clone_bio(bp); if (cbp == NULL) { while ((cbp = bioq_takefirst(&queue)) != NULL) - g_destroy_bio(cbp);; + g_destroy_bio(cbp); if (bp->bio_error == 0) bp->bio_error = ENOMEM; g_io_deliver(bp, bp->bio_error); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 13:27:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82878BE6; Fri, 27 Mar 2015 13:27:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5357D181; Fri, 27 Mar 2015 13:27:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RDR0jT056121; Fri, 27 Mar 2015 13:27:00 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RDQxd3056112; Fri, 27 Mar 2015 13:26:59 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201503271326.t2RDQxd3056112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Fri, 27 Mar 2015 13:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280759 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 13:27:00 -0000 Author: fabient Date: Fri Mar 27 13:26:59 2015 New Revision: 280759 URL: https://svnweb.freebsd.org/changeset/base/280759 Log: On multi CPU systems, we may emit successive packets with the same id. Fix the race by using an atomic operation. Differential Revision: https://reviews.freebsd.org/D2141 Obtained from: emeric.poupon@stormshield.eu MFC after: 1 week Sponsored by: Stormshield Modified: head/sys/netinet/ip_output.c head/sys/netinet/ip_var.h Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Mar 27 12:45:20 2015 (r280758) +++ head/sys/netinet/ip_output.c Fri Mar 27 13:26:59 2015 (r280759) @@ -91,7 +91,7 @@ __FBSDID("$FreeBSD$"); #include -VNET_DEFINE(u_short, ip_id); +VNET_DEFINE(uint32_t, ip_id); #ifdef MBUF_STRESS_TEST static int mbuf_frag_size = 0; Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Fri Mar 27 12:45:20 2015 (r280758) +++ head/sys/netinet/ip_var.h Fri Mar 27 13:26:59 2015 (r280759) @@ -174,7 +174,7 @@ struct inpcb; struct route; struct sockopt; -VNET_DECLARE(u_short, ip_id); /* ip packet ctr, for ids */ +VNET_DECLARE(uint32_t, ip_id); /* ip packet ctr, for ids */ VNET_DECLARE(int, ip_defttl); /* default IP ttl */ VNET_DECLARE(int, ipforwarding); /* ip forwarding */ #ifdef IPSTEALTH @@ -228,7 +228,7 @@ struct in_ifaddr * void ip_savecontrol(struct inpcb *, struct mbuf **, struct ip *, struct mbuf *); void ip_slowtimo(void); -u_int16_t ip_randomid(void); +uint16_t ip_randomid(void); int rip_ctloutput(struct socket *, struct sockopt *); void rip_ctlinput(int, struct sockaddr *, void *); void rip_init(void); @@ -305,8 +305,18 @@ extern int (*ip_dn_io_ptr)(struct mbuf * VNET_DECLARE(int, ip_do_randomid); #define V_ip_do_randomid VNET(ip_do_randomid) -#define ip_newid() ((V_ip_do_randomid != 0) ? ip_randomid() : \ - htons(V_ip_id++)) +static __inline uint16_t +ip_newid(void) +{ + uint16_t res; + + if (V_ip_do_randomid != 0) + return (ip_randomid()); + else { + res = atomic_fetchadd_32(&V_ip_id, 1) & 0xFFFF; + return (htons(res)); + } +} #endif /* _KERNEL */ From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 13:51:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC5B1DB5; Fri, 27 Mar 2015 13:51:38 +0000 (UTC) Received: from mail.soaustin.net (pancho.soaustin.net [76.74.250.40]) by mx1.freebsd.org (Postfix) with ESMTP id 8C3A8758; Fri, 27 Mar 2015 13:51:37 +0000 (UTC) Received: by mail.soaustin.net (Postfix, from userid 502) id 29BDB56082; Fri, 27 Mar 2015 08:51:37 -0500 (CDT) Date: Fri, 27 Mar 2015 08:51:37 -0500 From: Mark Linimon To: Slawa Olhovchenkov Subject: Re: svn commit: r280727 - in head: share/mk sys/conf Message-ID: <20150327135136.GA2397@lonesome.com> References: <201503270235.t2R2ZCwp047154@svn.freebsd.org> <20150327100014.GA74532@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150327100014.GA74532@zxy.spb.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 13:51:38 -0000 On Fri, Mar 27, 2015 at 01:00:14PM +0300, Slawa Olhovchenkov wrote: > Alpha 21064 support EISA. Alpha is no longer supported in FreeBSD. mcl From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 13:55:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DE6DF8; Fri, 27 Mar 2015 13:55:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E41E7A1; Fri, 27 Mar 2015 13:55:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RDtvoU071070; Fri, 27 Mar 2015 13:55:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RDtuLt071068; Fri, 27 Mar 2015 13:55:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503271355.t2RDtuLt071068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Mar 2015 13:55:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280760 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 13:55:57 -0000 Author: kib Date: Fri Mar 27 13:55:56 2015 New Revision: 280760 URL: https://svnweb.freebsd.org/changeset/base/280760 Log: Fix the hand after the immediate reboot when the following command sequence is performed on UFS SU+J rootfs: cp -Rp /sbin/init /sbin/init.old mv -f /sbin/init.old /sbin/init Hang occurs on the rootfs unmount. There are two issues: 1. Removed init binary, which is still mapped, creates a reference to the removed vnode. The inodeblock for such vnode must have active inodedep, which is (eventually) linked through the unlinked list. This means that ffs_sync(MNT_SUSPEND) cannot succeed, because number of softdep workitems for the mp is always > 0. FFS is suspended during unmount, so unmount just hangs. 2. As noted above, the inodedep is linked eventually. It is not linked until the superblock is written. But at the vfs_unmountall() time, when the rootfs is unmounted, the call is made to ffs_unmount()->ffs_sync() before vflush(), and ffs_sync() only calls ffs_sbupdate() after all workitems are flushed. It is masked for normal system operations, because syncer works in parallel and eventually flushes superblock. Syncer is stopped when rootfs unmounted, so ffs_sync() must do sb update on its own. Correct the issues listed above. For MNT_SUSPEND, count the number of linked unlinked inodedeps (this is not a typo) and substract the count of such workitems from the total. For the second issue, the ffs_sbupdate() is called right after device sync in ffs_sync() loop. There is third problem, occuring with both SU and SU+J. The softdep_waitidle() loop, which waits for softdep_flush() thread to clear the worklist, only waits 20ms max. It seems that the 1 tick, specified for msleep(9), was a typo. Add fsync(devvp, MNT_WAIT) call to softdep_waitidle(), which seems to significantly help the softdep thread, and change the MNT_LAZY update at the reboot time to MNT_WAIT for similar reasons. Note that userspace cannot create more work while devvp is flushed, since the mount point is always suspended before the call to softdep_waitidle() in unmount or remount path. PR: 195458 In collaboration with: gjb, pho Reviewed by: mckusick Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vfsops.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Mar 27 13:26:59 2015 (r280759) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Mar 27 13:55:56 2015 (r280760) @@ -1885,8 +1885,8 @@ softdep_flushworklist(oldmnt, countp, td struct thread *td; { struct vnode *devvp; - int count, error = 0; struct ufsmount *ump; + int count, error; /* * Alternately flush the block device associated with the mount @@ -1895,6 +1895,7 @@ softdep_flushworklist(oldmnt, countp, td * are found. */ *countp = 0; + error = 0; ump = VFSTOUFS(oldmnt); devvp = ump->um_devvp; while ((count = softdep_process_worklist(oldmnt, 1)) > 0) { @@ -1902,37 +1903,47 @@ softdep_flushworklist(oldmnt, countp, td vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); error = VOP_FSYNC(devvp, MNT_WAIT, td); VOP_UNLOCK(devvp, 0); - if (error) + if (error != 0) break; } return (error); } +#define SU_WAITIDLE_RETRIES 20 static int softdep_waitidle(struct mount *mp, int flags __unused) { struct ufsmount *ump; - int error; - int i; + struct vnode *devvp; + struct thread *td; + int error, i; ump = VFSTOUFS(mp); + devvp = ump->um_devvp; + td = curthread; + error = 0; ACQUIRE_LOCK(ump); - for (i = 0; i < 10 && ump->softdep_deps; i++) { + for (i = 0; i < SU_WAITIDLE_RETRIES && ump->softdep_deps != 0; i++) { ump->softdep_req = 1; KASSERT((flags & FORCECLOSE) == 0 || ump->softdep_on_worklist == 0, ("softdep_waitidle: work added after flush")); - msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM, "softdeps", 1); + msleep(&ump->softdep_deps, LOCK_PTR(ump), PVM | PDROP, + "softdeps", 10 * hz); + vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); + error = VOP_FSYNC(devvp, MNT_WAIT, td); + VOP_UNLOCK(devvp, 0); + if (error != 0) + break; + ACQUIRE_LOCK(ump); } ump->softdep_req = 0; - FREE_LOCK(ump); - error = 0; - if (i == 10) { + if (i == SU_WAITIDLE_RETRIES && error == 0 && ump->softdep_deps != 0) { error = EBUSY; printf("softdep_waitidle: Failed to flush worklist for %p\n", mp); } - + FREE_LOCK(ump); return (error); } @@ -7637,17 +7648,13 @@ check_inode_unwritten(inodedep) return (1); } -/* - * Try to free an inodedep structure. Return 1 if it could be freed. - */ static int -free_inodedep(inodedep) +check_inodedep_free(inodedep) struct inodedep *inodedep; { LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); - if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || - (inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || + if ((inodedep->id_state & ALLCOMPLETE) != ALLCOMPLETE || !LIST_EMPTY(&inodedep->id_dirremhd) || !LIST_EMPTY(&inodedep->id_pendinghd) || !LIST_EMPTY(&inodedep->id_bufwait) || @@ -7662,6 +7669,21 @@ free_inodedep(inodedep) inodedep->id_nlinkdelta != 0 || inodedep->id_savedino1 != NULL) return (0); + return (1); +} + +/* + * Try to free an inodedep structure. Return 1 if it could be freed. + */ +static int +free_inodedep(inodedep) + struct inodedep *inodedep; +{ + + LOCK_OWNED(VFSTOUFS(inodedep->id_list.wk_mp)); + if ((inodedep->id_state & (ONWORKLIST | UNLINKED)) != 0 || + !check_inodedep_free(inodedep)) + return (0); if (inodedep->id_state & ONDEPLIST) LIST_REMOVE(inodedep, id_deps); LIST_REMOVE(inodedep, id_hash); @@ -13846,7 +13868,8 @@ softdep_check_suspend(struct mount *mp, { struct bufobj *bo; struct ufsmount *ump; - int error; + struct inodedep *inodedep; + int error, unlinked; bo = &devvp->v_bufobj; ASSERT_BO_WLOCKED(bo); @@ -13907,6 +13930,20 @@ softdep_check_suspend(struct mount *mp, break; } + unlinked = 0; + if (MOUNTEDSUJ(mp)) { + for (inodedep = TAILQ_FIRST(&ump->softdep_unlinked); + inodedep != NULL; + inodedep = TAILQ_NEXT(inodedep, id_unlinked)) { + if ((inodedep->id_state & (UNLINKED | UNLINKLINKS | + UNLINKONLIST)) != (UNLINKED | UNLINKLINKS | + UNLINKONLIST) || + !check_inodedep_free(inodedep)) + continue; + unlinked++; + } + } + /* * Reasons for needing more work before suspend: * - Dirty buffers on devvp. @@ -13916,8 +13953,8 @@ softdep_check_suspend(struct mount *mp, error = 0; if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0 || - softdep_depcnt != 0 || - ump->softdep_deps != 0 || + softdep_depcnt != unlinked || + ump->softdep_deps != unlinked || softdep_accdepcnt != ump->softdep_accdeps || secondary_writes != 0 || mp->mnt_secondary_writes != 0 || Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Fri Mar 27 13:26:59 2015 (r280759) +++ head/sys/ufs/ffs/ffs_vfsops.c Fri Mar 27 13:55:56 2015 (r280760) @@ -1502,8 +1502,11 @@ ffs_sync(mp, waitfor) if (fs->fs_fmod != 0 && fs->fs_ronly != 0 && ump->um_fsckpid == 0) panic("%s: ffs_sync: modification on read-only filesystem", fs->fs_fsmnt); - if (waitfor == MNT_LAZY) - return (ffs_sync_lazy(mp)); + if (waitfor == MNT_LAZY) { + if (!rebooting) + return (ffs_sync_lazy(mp)); + waitfor = MNT_NOWAIT; + } /* * Write back each (modified) inode. @@ -1560,7 +1563,7 @@ loop: /* * Force stale filesystem control information to be flushed. */ - if (waitfor == MNT_WAIT) { + if (waitfor == MNT_WAIT || rebooting) { if ((error = softdep_flushworklist(ump->um_mountp, &count, td))) allerror = error; /* Flushed work items may create new vnodes to clean */ @@ -1577,9 +1580,12 @@ loop: if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { BO_UNLOCK(bo); vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - if ((error = VOP_FSYNC(devvp, waitfor, td)) != 0) - allerror = error; + error = VOP_FSYNC(devvp, waitfor, td); VOP_UNLOCK(devvp, 0); + if (MOUNTEDSOFTDEP(mp) && (error == 0 || error == EAGAIN)) + error = ffs_sbupdate(ump, waitfor, 0); + if (error != 0) + allerror = error; if (allerror == 0 && waitfor == MNT_WAIT) goto loop; } else if (suspend != 0) { From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 14:15:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 280DEBC5; Fri, 27 Mar 2015 14:15:36 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 D3870A41; Fri, 27 Mar 2015 14:15:35 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YbV2q-000Daa-85; Fri, 27 Mar 2015 17:15:32 +0300 Date: Fri, 27 Mar 2015 17:15:32 +0300 From: Slawa Olhovchenkov To: Mark Linimon Subject: Re: svn commit: r280727 - in head: share/mk sys/conf Message-ID: <20150327141532.GY23643@zxy.spb.ru> References: <201503270235.t2R2ZCwp047154@svn.freebsd.org> <20150327100014.GA74532@zxy.spb.ru> <20150327135136.GA2397@lonesome.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150327135136.GA2397@lonesome.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 14:15:36 -0000 On Fri, Mar 27, 2015 at 08:51:37AM -0500, Mark Linimon wrote: > On Fri, Mar 27, 2015 at 01:00:14PM +0300, Slawa Olhovchenkov wrote: > > Alpha 21064 support EISA. > > Alpha is no longer supported in FreeBSD. I am lost this. From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 14:31:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1626531E for ; Fri, 27 Mar 2015 14:31:03 +0000 (UTC) Received: from nm26-vm0.bullet.mail.bf1.yahoo.com (nm26-vm0.bullet.mail.bf1.yahoo.com [98.139.213.74]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C03F2CD2 for ; Fri, 27 Mar 2015 14:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1427466656; bh=XSPFV9xIUYSuHt/+KhCwQ2Pcc7YtfujJAdm3JfrpWVI=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=jD8ACa0+G8+RI2xjoCVrFZJb9W6WKkYlk0cgv1pZWl/otKiLkk04Aoyx4ibqtRznyvLL5QVf0j8Yvy6iBRDk7dOgIWReTGmbMAsrhv48muVnyoyNfCe8VoDBi6o9efnuaQ1Y/A+P7c4QQDxaKTR7pTjrl/wSb2UMoLOuHr1reZO3EFyHOJzFNd5brOWBsKOGXsuW3AC7D+DN/xxybornCbx5UATtjtRNCqmX4vlL8X+/m9Cjscq3tvU+Iv1EFQI94cVIZZ9lm2mjpEKi5r8vQF5CXt57+X9VrRqdyEQK/26T2ARyDHNkMEZ4pW/uYKZEGcFwXlS7X/S6ENXidBRoHA== Received: from [98.139.170.181] by nm26.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2015 14:30:56 -0000 Received: from [68.142.230.75] by tm24.bullet.mail.bf1.yahoo.com with NNFMP; 27 Mar 2015 14:30:56 -0000 Received: from [127.0.0.1] by smtp232.mail.bf1.yahoo.com with NNFMP; 27 Mar 2015 14:30:56 -0000 X-Yahoo-Newman-Id: 828470.53953.bm@smtp232.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: qnXk8CQVM1kCR7_9R9dM6B2.nMlvwhKE3v4jdsP6Cvi29NG bgpNTkElV_jHuYU4TH_PwMzft8bw5l5o8_0j.yNuFNicgLRYKGgNTH_ImWEi qQCDnU0AgeumDuRAtlcWg1B_Bxq4ol8nfyE_YGVugzHxGsGQ57.YedcouKUO z3mEDX3zdadyMvc.tojpfyS5UCflnzmnDwoFur7dwQZ4HX7Z5cnqzILBFyST RBZ_bimQwlVFveX8XGXWxtZ.6cRezWuaP7yPIPYgOGVnFgro7UChWxAEh19E K5yNO6LwgtkZZR6wa3tf2mKhE.frfQ4IklPpnm6zHm0hpmTodkP0kcTJ0ktl rZ3Ml52Qxglx1UIHqzkLrufiBdYIPh5l9e9VWhecJEIH4IyffjFnni_xKZg4 UefYJjud42lSUmXZ8EIqYdZHHjcwMm7Exr4tiCTsH9o7ibJZFGONqBDFBuHC PNq63Ngfs9Aj9ZpapvLYBqXoFefMRCgzRsG2Vtpya10xx50fr1FO16OECh1F xes24FCpjmPay4jmVb0jT4rJ_UOM_JVsj X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <551569A6.9010601@FreeBSD.org> Date: Fri, 27 Mar 2015 09:31:02 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Bruce Evans , Tijl Coosemans Subject: Re: svn commit: r280636 - head/include References: <201503252153.t2PLrInc025854@svn.freebsd.org> <20150326130403.W993@besplex.bde.org> <551376D4.4030003@FreeBSD.org> <20150326170535.U2239@besplex.bde.org> <20150326142052.6789dd50@kalimero.tijl.coosemans.org> <20150327214341.E2629@besplex.bde.org> In-Reply-To: <20150327214341.E2629@besplex.bde.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, gerald@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 14:31:03 -0000 On 03/27/15 06:01, Bruce Evans wrote: > On Thu, 26 Mar 2015, Tijl Coosemans wrote: > >> On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans >> wrote: >>> On Wed, 25 Mar 2015, Pedro Giffuni wrote: >>>> On 03/25/15 21:14, Bruce Evans wrote: >>>>> On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: >>>>>> Log: >>>>>> Temporarily revert 280458. >>>>>> >>>>>> GCC is still carries an old version of cdefs.h which doesn't >>>>>> accept multiple parameters for the nonnull attribute. >>>>>> Since this issue probably affects many ports in the tree >>>>>> we will revert it for now until gcc gets fixed. >>>>> >>>>> Note that sys/cdefs.h is supposed to work with any version of >>>>> gcc back to gcc-1, and does mostly work back to at least gcc-2.95. >>>>> The whole point of sys/cdefs.h is to provide compatibity macros >>>>> for old and other non-default compilers. Standard compilers don't >>>>> even have __attribute__(()). So no changes in future versions >>>>> of gcc will fix the previous commit. >>>> >>>> cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. >>> >>> I now remember other bugs in it. I think you put the varargs stuff >>> in the non-gcc version. That won't work compilers that don't support >>> varargs for macros. Neither will not changing the non-gcc version. > > I confirmed the complete brokenness of the varargs stuff for the > non-C99 case. > Hmm ... disabling existing compiler features to get a -Wall error doesn't qualify as complete brokenness. since gcc 2.95 C99 supports vararg macros we are basically talking about support for gcc 2.8 here. >>> glibc (2.6 at least) avoids using varargs in its __nonnull() macro >>> by using the same portable method that is used in many optional >>> debugging statements including FreeBSD's KASSERT(). ... >> >> Maybe introduce a __nonnull_all macro and leave __nonnull varargs-free: >> >> #define __nonnull(x) __attribute__((__nonnull__(x))) >> #define __nonnull_all __attribute__((__nonnull__)) >> >> Then in the rare cases where multiple arguments must be nonnull but >> __nonnull_all doesn't apply you can use multiple __nonnull: >> >> int f(void *, void *, void *) __nonnull(1) __nonnull(2); > > Good idea. There aren't many functions that accept null for some > pointer args but not others. > > The multiple __nonnull() method is already used a lot. E.g., in > sys/systm.h it is used 11 times. systm.h also gives many examples > where __nonnull_all cannot be used. It cannot be used for the > strto* family because endptr can be null, or for the copyinstr() > family for similar reasons (a value may be returned indirectly > but the pointer for this is null if this value is not needed). > This would become very long for some of the functions in pthread.h. I can accept reverting the variadic macro merge in 10-stable but I really think FreeBSD 11 has to move on. Pedro. From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 14:40:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C326F646; Fri, 27 Mar 2015 14:40:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE594DF3; Fri, 27 Mar 2015 14:40:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2REexS7091857; Fri, 27 Mar 2015 14:40:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2REex0u091855; Fri, 27 Mar 2015 14:40:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503271440.t2REex0u091855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Mar 2015 14:40:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280761 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 14:40:59 -0000 Author: emaste Date: Fri Mar 27 14:40:58 2015 New Revision: 280761 URL: https://svnweb.freebsd.org/changeset/base/280761 Log: Remove ALPHA leftover Modified: head/sys/sys/kerneldump.h Modified: head/sys/sys/kerneldump.h ============================================================================== --- head/sys/sys/kerneldump.h Fri Mar 27 13:55:56 2015 (r280760) +++ head/sys/sys/kerneldump.h Fri Mar 27 14:40:58 2015 (r280761) @@ -66,7 +66,6 @@ struct kerneldumpheader { uint32_t version; #define KERNELDUMPVERSION 1 uint32_t architectureversion; -#define KERNELDUMP_ALPHA_VERSION 1 #define KERNELDUMP_AMD64_VERSION 2 #define KERNELDUMP_ARM_VERSION 1 #define KERNELDUMP_I386_VERSION 2 From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 15:43:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98333180; Fri, 27 Mar 2015 15:43:26 +0000 (UTC) Received: from relay.mailchannels.net (aso-006-i440.relay.mailchannels.net [23.91.64.121]) by mx1.freebsd.org (Postfix) with ESMTP id 622DA7E5; Fri, 27 Mar 2015 15:43:24 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (ip-10-237-13-110.us-west-2.compute.internal [10.237.13.110]) by relay.mailchannels.net (Postfix) with ESMTPA id D641B100010; Fri, 27 Mar 2015 15:43:17 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [10.83.15.107]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Fri, 27 Mar 2015 15:43:18 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427470997977:701782904 X-MC-Ingress-Time: 1427470997976 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YbWPl-0003Aq-2d; Fri, 27 Mar 2015 15:43:17 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t2RFhFlO050079; Fri, 27 Mar 2015 09:43:15 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19ADVCdaMVOhcj7rtIrXu5H Message-ID: <1427470995.91374.7.camel@freebsd.org> Subject: Re: svn commit: r280760 - head/sys/ufs/ffs From: Ian Lepore To: Konstantin Belousov Date: Fri, 27 Mar 2015 09:43:15 -0600 In-Reply-To: <201503271355.t2RDtuLt071068@svn.freebsd.org> References: <201503271355.t2RDtuLt071068@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 15:43:26 -0000 On Fri, 2015-03-27 at 13:55 +0000, Konstantin Belousov wrote: > Author: kib > Date: Fri Mar 27 13:55:56 2015 > New Revision: 280760 > URL: https://svnweb.freebsd.org/changeset/base/280760 > > Log: > Fix the hand after the immediate reboot when the following command > sequence is performed on UFS SU+J rootfs: > cp -Rp /sbin/init /sbin/init.old > mv -f /sbin/init.old /sbin/init > > Hang occurs on the rootfs unmount. There are two issues: > > 1. Removed init binary, which is still mapped, creates a reference to > the removed vnode. The inodeblock for such vnode must have active > inodedep, which is (eventually) linked through the unlinked list. This > means that ffs_sync(MNT_SUSPEND) cannot succeed, because number of > softdep workitems for the mp is always > 0. FFS is suspended during > unmount, so unmount just hangs. > > 2. As noted above, the inodedep is linked eventually. It is not > linked until the superblock is written. But at the vfs_unmountall() > time, when the rootfs is unmounted, the call is made to > ffs_unmount()->ffs_sync() before vflush(), and ffs_sync() only calls > ffs_sbupdate() after all workitems are flushed. It is masked for > normal system operations, because syncer works in parallel and > eventually flushes superblock. Syncer is stopped when rootfs > unmounted, so ffs_sync() must do sb update on its own. > > Correct the issues listed above. For MNT_SUSPEND, count the number of > linked unlinked inodedeps (this is not a typo) and substract the count > of such workitems from the total. For the second issue, the > ffs_sbupdate() is called right after device sync in ffs_sync() loop. > > There is third problem, occuring with both SU and SU+J. The > softdep_waitidle() loop, which waits for softdep_flush() thread to > clear the worklist, only waits 20ms max. It seems that the 1 tick, > specified for msleep(9), was a typo. > > Add fsync(devvp, MNT_WAIT) call to softdep_waitidle(), which seems to > significantly help the softdep thread, and change the MNT_LAZY update > at the reboot time to MNT_WAIT for similar reasons. Note that > userspace cannot create more work while devvp is flushed, since the > mount point is always suspended before the call to softdep_waitidle() > in unmount or remount path. > > PR: 195458 > In collaboration with: gjb, pho > Reviewed by: mckusick > Sponsored by: The FreeBSD Foundation > MFC after: 2 weeks > > Modified: > head/sys/ufs/ffs/ffs_softdep.c > head/sys/ufs/ffs/ffs_vfsops.c This is causing warning: function declaration isn't a prototype on platforms that still compile with old gcc. Simple fix, but I thought you might want to do the commit so you can get an mfc reminder along with the main commit. -- Ian Index: sys/ufs/ffs/ffs_softdep.c =================================================================== --- sys/ufs/ffs/ffs_softdep.c (revision 280761) +++ sys/ufs/ffs/ffs_softdep.c (working copy) @@ -804,6 +804,7 @@ static struct indirdep *indirdep_lookup(struct mou struct buf *); static void cancel_indirdep(struct indirdep *, struct buf *, struct freeblks *); +static int check_inodedep_free(struct inodedep *); static void free_indirdep(struct indirdep *); static void free_diradd(struct diradd *, struct workhead *); static void merge_diradd(struct inodedep *, struct diradd *); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 15:46:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B42D4A6; Fri, 27 Mar 2015 15:46:00 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 02DDA81B; Fri, 27 Mar 2015 15:45:59 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2RFjrpQ087845 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 27 Mar 2015 17:45:53 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2RFjrpQ087845 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2RFjr0Y087844; Fri, 27 Mar 2015 17:45:53 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 27 Mar 2015 17:45:53 +0200 From: Konstantin Belousov To: Ian Lepore Subject: Re: svn commit: r280760 - head/sys/ufs/ffs Message-ID: <20150327154552.GN2379@kib.kiev.ua> References: <201503271355.t2RDtuLt071068@svn.freebsd.org> <1427470995.91374.7.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1427470995.91374.7.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 15:46:00 -0000 On Fri, Mar 27, 2015 at 09:43:15AM -0600, Ian Lepore wrote: > On Fri, 2015-03-27 at 13:55 +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Fri Mar 27 13:55:56 2015 > > New Revision: 280760 > > URL: https://svnweb.freebsd.org/changeset/base/280760 > > > > Log: > > Fix the hand after the immediate reboot when the following command > > sequence is performed on UFS SU+J rootfs: > > cp -Rp /sbin/init /sbin/init.old > > mv -f /sbin/init.old /sbin/init > > > > Hang occurs on the rootfs unmount. There are two issues: > > > > 1. Removed init binary, which is still mapped, creates a reference to > > the removed vnode. The inodeblock for such vnode must have active > > inodedep, which is (eventually) linked through the unlinked list. This > > means that ffs_sync(MNT_SUSPEND) cannot succeed, because number of > > softdep workitems for the mp is always > 0. FFS is suspended during > > unmount, so unmount just hangs. > > > > 2. As noted above, the inodedep is linked eventually. It is not > > linked until the superblock is written. But at the vfs_unmountall() > > time, when the rootfs is unmounted, the call is made to > > ffs_unmount()->ffs_sync() before vflush(), and ffs_sync() only calls > > ffs_sbupdate() after all workitems are flushed. It is masked for > > normal system operations, because syncer works in parallel and > > eventually flushes superblock. Syncer is stopped when rootfs > > unmounted, so ffs_sync() must do sb update on its own. > > > > Correct the issues listed above. For MNT_SUSPEND, count the number of > > linked unlinked inodedeps (this is not a typo) and substract the count > > of such workitems from the total. For the second issue, the > > ffs_sbupdate() is called right after device sync in ffs_sync() loop. > > > > There is third problem, occuring with both SU and SU+J. The > > softdep_waitidle() loop, which waits for softdep_flush() thread to > > clear the worklist, only waits 20ms max. It seems that the 1 tick, > > specified for msleep(9), was a typo. > > > > Add fsync(devvp, MNT_WAIT) call to softdep_waitidle(), which seems to > > significantly help the softdep thread, and change the MNT_LAZY update > > at the reboot time to MNT_WAIT for similar reasons. Note that > > userspace cannot create more work while devvp is flushed, since the > > mount point is always suspended before the call to softdep_waitidle() > > in unmount or remount path. > > > > PR: 195458 > > In collaboration with: gjb, pho > > Reviewed by: mckusick > > Sponsored by: The FreeBSD Foundation > > MFC after: 2 weeks > > > > Modified: > > head/sys/ufs/ffs/ffs_softdep.c > > head/sys/ufs/ffs/ffs_vfsops.c > > This is causing warning: function declaration isn't a prototype on > platforms that still compile with old gcc. Simple fix, but I thought > you might want to do the commit so you can get an mfc reminder along > with the main commit. > > -- Ian > > Index: sys/ufs/ffs/ffs_softdep.c > =================================================================== > --- sys/ufs/ffs/ffs_softdep.c (revision 280761) > +++ sys/ufs/ffs/ffs_softdep.c (working copy) > @@ -804,6 +804,7 @@ static struct indirdep *indirdep_lookup(struct mou > struct buf *); > static void cancel_indirdep(struct indirdep *, struct buf *, > struct freeblks *); > +static int check_inodedep_free(struct inodedep *); > static void free_indirdep(struct indirdep *); > static void free_diradd(struct diradd *, struct workhead *); > static void merge_diradd(struct inodedep *, struct diradd *); > Yes, thank you. I was already notified and trying to compile ppc GENERIC64 kernel to confirm the same fix. Did you compile-tested the change on arm with gcc ? If so, I will just commit it. From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 15:49:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F26470C; Fri, 27 Mar 2015 15:49:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A89E865; Fri, 27 Mar 2015 15:49:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RFnMnB025142; Fri, 27 Mar 2015 15:49:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RFnMcb025141; Fri, 27 Mar 2015 15:49:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503271549.t2RFnMcb025141@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 27 Mar 2015 15:49:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280763 - head/sys/ufs/ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 15:49:22 -0000 Author: kib Date: Fri Mar 27 15:49:21 2015 New Revision: 280763 URL: https://svnweb.freebsd.org/changeset/base/280763 Log: Fix build (with gcc). Reported by: bz, ian Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Fri Mar 27 15:06:31 2015 (r280762) +++ head/sys/ufs/ffs/ffs_softdep.c Fri Mar 27 15:49:21 2015 (r280763) @@ -738,6 +738,7 @@ static int softdep_process_worklist(stru static int softdep_waitidle(struct mount *, int); static void drain_output(struct vnode *); static struct buf *getdirtybuf(struct buf *, struct rwlock *, int); +static int check_inodedep_free(struct inodedep *); static void clear_remove(struct mount *); static void clear_inodedeps(struct mount *); static void unlinked_inodedep(struct mount *, struct inodedep *); From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 16:16:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D226531E; Fri, 27 Mar 2015 16:16:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3691C65; Fri, 27 Mar 2015 16:16:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RGGP9W039035; Fri, 27 Mar 2015 16:16:25 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RGGOKJ039030; Fri, 27 Mar 2015 16:16:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503271616.t2RGGOKJ039030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 27 Mar 2015 16:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280764 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 16:16:25 -0000 Author: hselasky Date: Fri Mar 27 16:16:23 2015 New Revision: 280764 URL: https://svnweb.freebsd.org/changeset/base/280764 Log: Fixes for the LinuxAPI completion wrappers: - make sure the timeout computations are always above zero by using the existing "linux_timer_jiffies_until()" function. Negative timeouts can result in undefined behaviour. - declare all completion functions like external symbols and move the code to the LinuxAPI kernel module. - add a proper prefix to all LinuxAPI kernel functions to avoid namespace collision with other parts of the FreeBSD kernel. - clean up header file inclusions in the linux/completion.h, linux/in.h and linux/fs.h header files. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/completion.h head/sys/ofed/include/linux/fs.h head/sys/ofed/include/linux/in.h head/sys/ofed/include/linux/linux_compat.c Modified: head/sys/ofed/include/linux/completion.h ============================================================================== --- head/sys/ofed/include/linux/completion.h Fri Mar 27 15:49:21 2015 (r280763) +++ head/sys/ofed/include/linux/completion.h Fri Mar 27 16:16:23 2015 (r280764) @@ -32,124 +32,35 @@ #include -#include -#include -#include -#include -#include - struct completion { unsigned int done; }; -#define INIT_COMPLETION(c) ((c).done = 0) -#define init_completion(c) ((c)->done = 0) - -static inline void -_complete_common(struct completion *c, int all) -{ - int wakeup_swapper; - - sleepq_lock(c); - c->done++; - if (all) - wakeup_swapper = sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); - else - wakeup_swapper = sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); - sleepq_release(c); - if (wakeup_swapper) - kick_proc0(); -} - -#define complete(c) _complete_common(c, 0) -#define complete_all(c) _complete_common(c, 1) - -/* - * Indefinite wait for done != 0 with or without signals. - */ -static inline long -_wait_for_common(struct completion *c, int flags) -{ - - flags |= SLEEPQ_SLEEP; - for (;;) { - sleepq_lock(c); - if (c->done) - break; - sleepq_add(c, NULL, "completion", flags, 0); - if (flags & SLEEPQ_INTERRUPTIBLE) { - if (sleepq_wait_sig(c, 0) != 0) - return (-ERESTARTSYS); - } else - sleepq_wait(c, 0); - } - c->done--; - sleepq_release(c); - - return (0); -} - -#define wait_for_completion(c) _wait_for_common(c, 0) -#define wait_for_completion_interuptible(c) \ - _wait_for_common(c, SLEEPQ_INTERRUPTIBLE) - -static inline long -_wait_for_timeout_common(struct completion *c, long timeout, int flags) -{ - long end; - - end = ticks + timeout; - flags |= SLEEPQ_SLEEP; - for (;;) { - sleepq_lock(c); - if (c->done) - break; - sleepq_add(c, NULL, "completion", flags, 0); - sleepq_set_timeout(c, end - ticks); - if (flags & SLEEPQ_INTERRUPTIBLE) { - if (sleepq_timedwait_sig(c, 0) != 0) - return (-ERESTARTSYS); - } else - sleepq_timedwait(c, 0); - } - c->done--; - sleepq_release(c); - timeout = end - ticks; - - return (timeout > 0 ? timeout : 1); -} - -#define wait_for_completion_timeout(c, timeout) \ - _wait_for_timeout_common(c, timeout, 0) -#define wait_for_completion_interruptible_timeout(c, timeout) \ - _wait_for_timeout_common(c, timeout, SLEEPQ_INTERRUPTIBLE) - -static inline int -try_wait_for_completion(struct completion *c) -{ - int isdone; - - isdone = 1; - sleepq_lock(c); - if (c->done) - c->done--; - else - isdone = 0; - sleepq_release(c); - return (isdone); -} - -static inline int -completion_done(struct completion *c) -{ - int isdone; - - isdone = 1; - sleepq_lock(c); - if (c->done == 0) - isdone = 0; - sleepq_release(c); - return (isdone); -} +#define INIT_COMPLETION(c) \ + ((c).done = 0) +#define init_completion(c) \ + ((c)->done = 0) +#define complete(c) \ + linux_complete_common((c), 0) +#define complete_all(c) \ + linux_complete_common((c), 1) +#define wait_for_completion(c) \ + linux_wait_for_common((c), 0) +#define wait_for_completion_interuptible(c) \ + linux_wait_for_common((c), 1) +#define wait_for_completion_timeout(c, timeout) \ + linux_wait_for_timeout_common((c), (timeout), 0) +#define wait_for_completion_interruptible_timeout(c, timeout) \ + linux_wait_for_timeout_common((c), (timeout), 1) +#define try_wait_for_completion(c) \ + linux_try_wait_for_completion(c) +#define completion_done(c) \ + linux_completion_done(c) + +extern void linux_complete_common(struct completion *, int); +extern long linux_wait_for_common(struct completion *, int); +extern long linux_wait_for_timeout_common(struct completion *, long, int); +extern int linux_try_wait_for_completion(struct completion *); +extern int linux_completion_done(struct completion *); -#endif /* _LINUX_COMPLETION_H_ */ +#endif /* _LINUX_COMPLETION_H_ */ Modified: head/sys/ofed/include/linux/fs.h ============================================================================== --- head/sys/ofed/include/linux/fs.h Fri Mar 27 15:49:21 2015 (r280763) +++ head/sys/ofed/include/linux/fs.h Fri Mar 27 16:16:23 2015 (r280764) @@ -29,6 +29,8 @@ #ifndef _LINUX_FS_H_ #define _LINUX_FS_H_ +#include +#include #include #include #include Modified: head/sys/ofed/include/linux/in.h ============================================================================== --- head/sys/ofed/include/linux/in.h Fri Mar 27 15:49:21 2015 (r280763) +++ head/sys/ofed/include/linux/in.h Fri Mar 27 16:16:23 2015 (r280764) @@ -31,6 +31,9 @@ #include "opt_inet.h" +#include +#include +#include #include #include Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Fri Mar 27 15:49:21 2015 (r280763) +++ head/sys/ofed/include/linux/linux_compat.c Fri Mar 27 16:16:23 2015 (r280764) @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include #include #include @@ -781,6 +783,117 @@ linux_timer_init(void *arg) } SYSINIT(linux_timer, SI_SUB_DRIVERS, SI_ORDER_FIRST, linux_timer_init, NULL); +void +linux_complete_common(struct completion *c, int all) +{ + int wakeup_swapper; + + sleepq_lock(c); + c->done++; + if (all) + wakeup_swapper = sleepq_broadcast(c, SLEEPQ_SLEEP, 0, 0); + else + wakeup_swapper = sleepq_signal(c, SLEEPQ_SLEEP, 0, 0); + sleepq_release(c); + if (wakeup_swapper) + kick_proc0(); +} + +/* + * Indefinite wait for done != 0 with or without signals. + */ +long +linux_wait_for_common(struct completion *c, int flags) +{ + + if (flags != 0) + flags = SLEEPQ_INTERRUPTIBLE | SLEEPQ_SLEEP; + else + flags = SLEEPQ_SLEEP; + for (;;) { + sleepq_lock(c); + if (c->done) + break; + sleepq_add(c, NULL, "completion", flags, 0); + if (flags & SLEEPQ_INTERRUPTIBLE) { + if (sleepq_wait_sig(c, 0) != 0) + return (-ERESTARTSYS); + } else + sleepq_wait(c, 0); + } + c->done--; + sleepq_release(c); + + return (0); +} + +/* + * Time limited wait for done != 0 with or without signals. + */ +long +linux_wait_for_timeout_common(struct completion *c, long timeout, int flags) +{ + long end = jiffies + timeout; + + if (flags != 0) + flags = SLEEPQ_INTERRUPTIBLE | SLEEPQ_SLEEP; + else + flags = SLEEPQ_SLEEP; + for (;;) { + int ret; + + sleepq_lock(c); + if (c->done) + break; + sleepq_add(c, NULL, "completion", flags, 0); + sleepq_set_timeout(c, linux_timer_jiffies_until(end)); + if (flags & SLEEPQ_INTERRUPTIBLE) + ret = sleepq_timedwait_sig(c, 0); + else + ret = sleepq_timedwait(c, 0); + if (ret != 0) { + /* check for timeout or signal */ + if (ret == EWOULDBLOCK) + return (0); + else + return (-ERESTARTSYS); + } + } + c->done--; + sleepq_release(c); + + /* return how many jiffies are left */ + return (linux_timer_jiffies_until(end)); +} + +int +linux_try_wait_for_completion(struct completion *c) +{ + int isdone; + + isdone = 1; + sleepq_lock(c); + if (c->done) + c->done--; + else + isdone = 0; + sleepq_release(c); + return (isdone); +} + +int +linux_completion_done(struct completion *c) +{ + int isdone; + + isdone = 1; + sleepq_lock(c); + if (c->done == 0) + isdone = 0; + sleepq_release(c); + return (isdone); +} + static void linux_compat_init(void *arg) { From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 16:36:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E45EBE4 for ; Fri, 27 Mar 2015 16:36:33 +0000 (UTC) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) (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 1A0ABF0D for ; Fri, 27 Mar 2015 16:36:32 +0000 (UTC) Received: by pabxg6 with SMTP id xg6so100371930pab.0 for ; Fri, 27 Mar 2015 09:36:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:message-id:references:to; bh=iTlBxWzE97hG+QF2rmgzdPNxJn+XnVl52AzIKjbHfrk=; b=aX7Pn1aP4Gnf+dQ7WDyXUGLzyPzFoSaBEKIfXlO7IkhTjT6OsqDtb1EmE7J5I5d0nX Vlig1R6gG3+ysnP7tsl3VhnT+Q4TniQ5IQgzPDdpYxTU8r/obtAMFG9SEdRFv81c//uP Yem4z18VM0Eh85s9/Bxm9xVEoArX5+eBGJUGvHijlfvWGBsu0ERCoPeqQF/xoDB37FPX M0E5KJex7tjYo77mGdJdcK+Ib+tguVkZukD0DhYFf4mcjUX8iVxQn02Zs+MLYz+UkE87 P1mzEFOeIuzYzMWa4zQABT9d3fUDk0qQkNUfq4J8MEpIBiTP2cWYUeztym9Ns4ZSCPWN h0pA== X-Gm-Message-State: ALoCoQk3HNHzncVn0d5MCZ/bVgY6NOLrm0jWjuG+WZixL7q/f2PO9pj41zkXVDKN3MRcXcy98Pvp X-Received: by 10.68.110.37 with SMTP id hx5mr36967756pbb.46.1427474186169; Fri, 27 Mar 2015 09:36:26 -0700 (PDT) Received: from [10.64.24.166] ([69.53.236.236]) by mx.google.com with ESMTPSA id ed5sm2651100pbd.19.2015.03.27.09.36.18 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Mar 2015 09:36:18 -0700 (PDT) Sender: Warner Losh Subject: Re: svn commit: r280728 - head/sys/conf Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Content-Type: multipart/signed; boundary="Apple-Mail=_35DE64ED-764A-4F1A-BDF4-9AAC59A2DF0A"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b6 From: Warner Losh In-Reply-To: Date: Fri, 27 Mar 2015 10:36:15 -0600 Message-Id: <7F5C3FC3-3306-458E-83A2-5E67F8F78688@bsdimp.com> References: <201503270235.t2R2ZQeA047220@svn.freebsd.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 16:36:33 -0000 --Apple-Mail=_35DE64ED-764A-4F1A-BDF4-9AAC59A2DF0A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Mar 27, 2015, at 1:54 AM, Bjoern A. Zeeb wrote: >=20 >=20 >> On 27 Mar 2015, at 02:35 , Warner Losh wrote: >>=20 >> Author: imp >> Date: Fri Mar 27 02:35:25 2015 >> New Revision: 280728 >> URL: https://svnweb.freebsd.org/changeset/base/280728 >>=20 >> Log: >> Categorize certain kernel builds as being broken in certain places. >>=20 >> Differential Revision: https://reviews.freebsd.org/D2011 >>=20 >> Modified: >> head/sys/conf/kern.opts.mk >>=20 >> Modified: head/sys/conf/kern.opts.mk >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015 = (r280727) >> +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:25 2015 = (r280728) >> @@ -75,6 +75,34 @@ BROKEN_OPTIONS+=3D EISA >> BROKEN_OPTIONS+=3D OFED >> .endif >>=20 >> +# Options that cannot be turned on this architecture, usually = because >> +# of compilation or other issues so severe it cannot be used even >> +# on an experimental basis >> +__ALWAYS_NO_OPTIONS=3D >> + >> +# Things that don't work based on the CPU >> +.if ${MACHINE_CPUARCH} =3D=3D "arm" >> +__ALWAYS_NO_OPTIONS+=3D CDDL ZFS >> +.endif >> + >> +.if ${MACHINE_CPUARCH} =3D=3D "mips" >> +__ALWAYS_NO_OPTIONS+=3D CDDL ZFS >> +.endif >> + >=20 >=20 > Wouldn=E2=80=99t this also mean no Dtrace on arm or mips? Please = revert this. This just enshrines what=E2=80=99s already in the sys/modules/Makefiles. = It already wasn=E2=80=99t building them for arm or mips. This doesn=E2=80=99t change that. It also = doesn=E2=80=99t change the ability of people to add these to the list of files that are built. = The module files don=E2=80=99t check. There=E2=80=99s nothing to revert. Warner --Apple-Mail=_35DE64ED-764A-4F1A-BDF4-9AAC59A2DF0A 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 iQIcBAEBCgAGBQJVFYcAAAoJEGwc0Sh9sBEA3HEP/2ow0ZHhaZZLiOdUHC3JF0sM oP+ih3yf6mWjrgVbAwSwMVPng66m5uKmwMy6yk6cCSL5h4ZgilOA64toIGDAMOEI Y6LXGhXoLEPZFKZt8DLBwjsOMPOsM0uUL4hNtye7MiSOgCkXEHU5ul7lh1eq8/Le tF0vqTvBmvM1QWMKi7hOWyi3NVoFKLEtHMFjN5MjXTRHHjf2UJdCu2YksWxQDIlT u1iD+ZQ2Rdp76cNCmQHJeMk7Pw129t2xvgiNT8qhhlTpYuem4+anHGmnyTu2mS5f JeOiDB6aF+ME0n1KVctOls1ojRMX3KKm5cdten3ob6BtZ7/cjqjFsuWCr6gdZs3u h0P7K9+nrwNSOeEIys+8wZyPjbSays1JSZxo/zf70Xdt+E6HlWEj9jeHvp2oZwSq GK5xm3mrs2WUDMCX3T1bkCxF1XLfxwwu46291Hp7/WsRyZ4Vytn6d89AxEZR2tD6 XWxVxzsznmZsaNoVIDGVJe9HA7RZ11C0rbMhkg2agRRAj/mHKArIUPCKFsVPoihx FhL76gD44tu6Jw4PRLf0CSHVfqQ3y3ZyQu9ZzQVPBKURVf7x0BrtOT5PJzz/h4B3 vHvgElEz04AIz3YbduBN5vY11K7z9CD2/eC/AHikr5oXkQwkAzXd/j9nf2SXXlgH Vc1FmjsyhFDRne2fRgrL =9GCT -----END PGP SIGNATURE----- --Apple-Mail=_35DE64ED-764A-4F1A-BDF4-9AAC59A2DF0A-- From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 17:15:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4867A7F9; Fri, 27 Mar 2015 17:15:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 334D7666; Fri, 27 Mar 2015 17:15:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RHFIQH067585; Fri, 27 Mar 2015 17:15:18 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RHFIhl067584; Fri, 27 Mar 2015 17:15:18 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201503271715.t2RHFIhl067584@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Fri, 27 Mar 2015 17:15:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280765 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 17:15:19 -0000 Author: brueffer Date: Fri Mar 27 17:15:17 2015 New Revision: 280765 URL: https://svnweb.freebsd.org/changeset/base/280765 Log: Mention support for 16h family processors, added in r263169. PR: 198933 Submitted by: isoa@kapsi.fi MFC after: 1 week Modified: head/share/man/man4/amdtemp.4 Modified: head/share/man/man4/amdtemp.4 ============================================================================== --- head/share/man/man4/amdtemp.4 Fri Mar 27 16:16:23 2015 (r280764) +++ head/share/man/man4/amdtemp.4 Fri Mar 27 17:15:17 2015 (r280765) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 23, 2012 +.Dd March 27, 2015 .Dt AMDTEMP 4 .Os .Sh NAME @@ -53,7 +53,7 @@ The driver provides support for the on-die digital thermal sensor present in .Tn AMD -Family 0Fh, 10h, 11h, 12h, 14h, and 15h processors. +Family 0Fh, 10h, 11h, 12h, 14h, 15h, and 16h processors. .Pp For Family 0Fh processors, the .Nm @@ -64,7 +64,7 @@ The driver also creates in the corresponding CPU device's sysctl tree, displaying the maximum temperature of the two sensors located in each CPU core. .Pp -For Family 10h, 11h, 12h, 14h, and 15h processors, the driver reports each +For Family 10h, 11h, 12h, 14h, 15h and 16h processors, the driver reports each package's temperature through a sysctl node, named .Va dev.amdtemp.%d.core0.sensor0 . The driver also creates From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 17:36:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD55717E; Fri, 27 Mar 2015 17:36:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EDF3972; Fri, 27 Mar 2015 17:36:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RHaNUF077091; Fri, 27 Mar 2015 17:36:23 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RHaNL8077090; Fri, 27 Mar 2015 17:36:23 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201503271736.t2RHaNL8077090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Mar 2015 17:36:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280766 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 17:36:23 -0000 Author: imp Date: Fri Mar 27 17:36:22 2015 New Revision: 280766 URL: https://svnweb.freebsd.org/changeset/base/280766 Log: Add a note of clarification. MK_* variables only control what modules are built by default. You can still override that with MODULES_EXTRA for experimental features like ZFS and dtrace on some architectures. Also note that kernel config files are not affected by MK_ options listed, though some targets might be. Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk ============================================================================== --- head/sys/conf/kern.opts.mk Fri Mar 27 17:15:17 2015 (r280765) +++ head/sys/conf/kern.opts.mk Fri Mar 27 17:36:22 2015 (r280766) @@ -51,6 +51,10 @@ __DEFAULT_NO_OPTIONS = \ # Some options are totally broken on some architectures. We disable # them. If you need to enable them on an experimental basis, you # must change this code. +# Note: These only apply to the list of modules we build by default +# and sometimes what is in the opt_*.h files by default. +# Kernel config files are unaffected, though some targets can be +# affected by KERNEL_SYMBOLS, FORMAT_EXTENSIONS, CTF and SSP. # Things that don't work based on the CPU .if ${MACHINE_CPUARCH} == "arm" @@ -75,34 +79,6 @@ BROKEN_OPTIONS+= EISA BROKEN_OPTIONS+= OFED .endif -# Options that cannot be turned on this architecture, usually because -# of compilation or other issues so severe it cannot be used even -# on an experimental basis -__ALWAYS_NO_OPTIONS= - -# Things that don't work based on the CPU -.if ${MACHINE_CPUARCH} == "arm" -__ALWAYS_NO_OPTIONS+= CDDL ZFS -.endif - -.if ${MACHINE_CPUARCH} == "mips" -__ALWAYS_NO_OPTIONS+= CDDL ZFS -.endif - -.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpc64" -__ALWAYS_NO_OPTIONS+= ZFS -.endif - -# Things that don't work because the kernel doesn't have the support -# for them. -.if ${MACHINE} != "i386" -__ALWAYS_NO_OPTIONS+= EISA -.endif - -.if ${MACHINE} != "i386" && ${MACHINE} != "amd64" -__ALWAYS_NO_OPTIONS+= OFED -.endif - # expanded inline from bsd.mkopt.mk to avoid share/mk dependency # Those that default to yes @@ -148,16 +124,6 @@ MK_${var}:= no #end of bsd.mkopt.mk expanded inline. # -# MK_* options which are always no, usually because they are -# unsupported/badly broken on this architecture. -# -.for var in ${__ALWAYS_NO_OPTIONS} -MK_${var}:= no -.endfor -.undef __ALWAYS_NO_OPTIONS -#end of bsd.mkopt.mk expanded inline. - -# # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 18:23:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82B97DE3; Fri, 27 Mar 2015 18:23:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6E016F7B; Fri, 27 Mar 2015 18:23:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RIN8so000294; Fri, 27 Mar 2015 18:23:08 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RIN7sX000292; Fri, 27 Mar 2015 18:23:07 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201503271823.t2RIN7sX000292@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 27 Mar 2015 18:23:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280767 - head/sbin/md5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 18:23:08 -0000 Author: delphij Date: Fri Mar 27 18:23:06 2015 New Revision: 280767 URL: https://svnweb.freebsd.org/changeset/base/280767 Log: Fix remaining warnings. MFC after: 2 weeks Modified: head/sbin/md5/Makefile head/sbin/md5/md5.c Modified: head/sbin/md5/Makefile ============================================================================== --- head/sbin/md5/Makefile Fri Mar 27 17:36:22 2015 (r280766) +++ head/sbin/md5/Makefile Fri Mar 27 18:23:06 2015 (r280767) @@ -13,9 +13,6 @@ MLINKS= md5.1 rmd160.1 \ md5.1 sha256.1 \ md5.1 sha512.1 -NO_WMISSING_VARIABLE_DECLARATIONS= -WFORMAT?= 1 - LIBADD= md .include Modified: head/sbin/md5/md5.c ============================================================================== --- head/sbin/md5/md5.c Fri Mar 27 17:36:22 2015 (r280766) +++ head/sbin/md5/md5.c Fri Mar 27 18:23:06 2015 (r280767) @@ -91,7 +91,7 @@ typedef union { /* algorithm function table */ -struct Algorithm_t Algorithm[] = { +static struct Algorithm_t Algorithm[] = { { "md5", "MD5", &MD5TestOutput, (DIGEST_Init*)&MD5Init, (DIGEST_Update*)&MD5_Update, (DIGEST_End*)&MD5End, &MD5Data, &MD5File }, @@ -282,7 +282,7 @@ MDTimeTrial(Algorithm_t *alg) * Digests a reference suite of strings and prints the results. */ -const char *MDTestInput[MDTESTCOUNT] = { +static const char *MDTestInput[MDTESTCOUNT] = { "", "a", "abc", From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 19:08:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3597B69D; Fri, 27 Mar 2015 19:08:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 205BA69C; Fri, 27 Mar 2015 19:08:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RJ8BO9019650; Fri, 27 Mar 2015 19:08:11 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RJ8BtS019649; Fri, 27 Mar 2015 19:08:11 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201503271908.t2RJ8BtS019649@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 27 Mar 2015 19:08:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280768 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 19:08:12 -0000 Author: hselasky Date: Fri Mar 27 19:08:11 2015 New Revision: 280768 URL: https://svnweb.freebsd.org/changeset/base/280768 Log: Fix variable casting: - Jiffies or ticks in FreeBSD have integer type and are not long. MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/jiffies.h Modified: head/sys/ofed/include/linux/jiffies.h ============================================================================== --- head/sys/ofed/include/linux/jiffies.h Fri Mar 27 18:23:06 2015 (r280767) +++ head/sys/ofed/include/linux/jiffies.h Fri Mar 27 19:08:11 2015 (r280768) @@ -45,14 +45,12 @@ msecs_to_jiffies(int msec) return (tvtohz(&tv)); } - #define jiffies ticks #define jiffies_to_msecs(x) (((int64_t)(x)) * 1000 / hz) - -#define time_after(a, b) ((long)(b) - (long)(a) < 0) +#define time_after(a, b) ((int)((b) - (a)) < 0) #define time_before(a, b) time_after(b,a) -#define time_after_eq(a, b) ((long)(a) - (long)(b) >= 0) +#define time_after_eq(a, b) ((int)((a) - (b)) >= 0) #define time_before_eq(a, b) time_after_eq(b, a) #define HZ hz From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 19:34:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8DC43FBB; Fri, 27 Mar 2015 19:34:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 787F0AAD; Fri, 27 Mar 2015 19:34:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RJYP2D033282; Fri, 27 Mar 2015 19:34:25 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RJYPpO033281; Fri, 27 Mar 2015 19:34:25 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503271934.t2RJYPpO033281@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Mar 2015 19:34:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280769 - head/usr.sbin/crunch/crunchide X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 19:34:25 -0000 Author: emaste Date: Fri Mar 27 19:34:24 2015 New Revision: 280769 URL: https://svnweb.freebsd.org/changeset/base/280769 Log: crunchide: arm64 support Submitted by: andrew@ Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/crunch/crunchide/Makefile Modified: head/usr.sbin/crunch/crunchide/Makefile ============================================================================== --- head/usr.sbin/crunch/crunchide/Makefile Fri Mar 27 19:08:11 2015 (r280768) +++ head/usr.sbin/crunch/crunchide/Makefile Fri Mar 27 19:34:24 2015 (r280769) @@ -10,7 +10,8 @@ CFLAGS+=-DNLIST_AOUT SRCS+= exec_aout.c .endif -.if ${TARGET_ARCH} == amd64 || ${TARGET_ARCH} == powerpc64 || \ +.if ${TARGET_ARCH} == aarch64 || ${TARGET_ARCH} == amd64 || \ + ${TARGET_ARCH} == powerpc64 || \ ${TARGET_ARCH} == sparc64 || ${TARGET_ARCH:Mmips64*} CFLAGS+=-DNLIST_ELF64 SRCS+= exec_elf64.c From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 19:42:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB985318; Fri, 27 Mar 2015 19:42:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9650CBE7; Fri, 27 Mar 2015 19:42:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RJgdRQ037844; Fri, 27 Mar 2015 19:42:39 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RJgdvf037843; Fri, 27 Mar 2015 19:42:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503271942.t2RJgdvf037843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 27 Mar 2015 19:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280770 - head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 19:42:39 -0000 Author: emaste Date: Fri Mar 27 19:42:38 2015 New Revision: 280770 URL: https://svnweb.freebsd.org/changeset/base/280770 Log: lldb: Move debug register output into __amd64__ This debug register diagnostic is really only applicable to amd64 at present. Sponsored by: The FreeBSD Foundation Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Modified: head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Fri Mar 27 19:34:24 2015 (r280769) +++ head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp Fri Mar 27 19:42:38 2015 (r280770) @@ -112,8 +112,6 @@ PtraceWrapper(int req, lldb::pid_t pid, log->Printf("PT_GETREGS: bp=0x%lx", r->r_rbp); log->Printf("PT_GETREGS: ax=0x%lx", r->r_rax); } -#endif -#ifndef __powerpc__ if (req == PT_GETDBREGS || req == PT_SETDBREGS) { struct dbreg *r = (struct dbreg *) addr; char setget = (req == PT_GETDBREGS) ? 'G' : 'S'; From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 21:47:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3548BA7D; Fri, 27 Mar 2015 21:47:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2015BBF1; Fri, 27 Mar 2015 21:47:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RLlFWu095232; Fri, 27 Mar 2015 21:47:15 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RLlFiN095231; Fri, 27 Mar 2015 21:47:15 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201503272147.t2RLlFiN095231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 27 Mar 2015 21:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280771 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 21:47:16 -0000 Author: imp Date: Fri Mar 27 21:47:15 2015 New Revision: 280771 URL: https://svnweb.freebsd.org/changeset/base/280771 Log: Revert the __ALWAYS_NO stuff. It had already been committed as BROKEN. Modified: head/share/mk/bsd.mkopt.mk Modified: head/share/mk/bsd.mkopt.mk ============================================================================== --- head/share/mk/bsd.mkopt.mk Fri Mar 27 19:42:38 2015 (r280770) +++ head/share/mk/bsd.mkopt.mk Fri Mar 27 21:47:15 2015 (r280771) @@ -67,15 +67,6 @@ MK_${var}:= no # MK_* options which are always no, usually because they are # unsupported/badly broken on this architecture. # -.for var in ${__ALWAYS_NO_OPTIONS} -MK_${var}:= no -.endfor -.undef __ALWAYS_NO_OPTIONS - -# -# MK_* options which are always no, usually because they are -# unsupported/badly broken on this architecture. -# .for var in ${BROKEN_OPTIONS} MK_${var}:= no .endfor From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 23:10:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAC66CD3; Fri, 27 Mar 2015 23:10:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4960638; Fri, 27 Mar 2015 23:10:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2RNAH0u035004; Fri, 27 Mar 2015 23:10:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2RNAGsn035000; Fri, 27 Mar 2015 23:10:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201503272310.t2RNAGsn035000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 27 Mar 2015 23:10:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280772 - in head/sys: conf dev/fdt dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 23:10:17 -0000 Author: ian Date: Fri Mar 27 23:10:15 2015 New Revision: 280772 URL: https://svnweb.freebsd.org/changeset/base/280772 Log: Make simplebus a base class of ofwbus. This allows the elimination of duplicated code in the two classes, and also allows devices in FDT-based systems to declare simplebus as their parent and still work correctly when the FDT data describes the device at the root of the tree rather than as a child of a simplebus (which is common for interrupt, clock, and power controllers). Differential Revision: https://reviews.freebsd.org/D1990 Submitted by: Michal Meloun Modified: head/sys/conf/files.powerpc head/sys/dev/fdt/simplebus.c head/sys/dev/fdt/simplebus.h head/sys/dev/ofw/ofwbus.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Fri Mar 27 21:47:15 2015 (r280771) +++ head/sys/conf/files.powerpc Fri Mar 27 23:10:15 2015 (r280772) @@ -29,6 +29,8 @@ dev/adb/adb_buttons.c optional adb dev/agp/agp_apple.c optional agp powermac dev/fb/fb.c optional sc dev/fdt/fdt_powerpc.c optional fdt +# ofwbus depends on simplebus. +dev/fdt/simplebus.c optional aim | fdt dev/hwpmc/hwpmc_powerpc.c optional hwpmc dev/hwpmc/hwpmc_mpc7xxx.c optional hwpmc dev/hwpmc/hwpmc_ppc970.c optional hwpmc Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Fri Mar 27 21:47:15 2015 (r280771) +++ head/sys/dev/fdt/simplebus.c Fri Mar 27 23:10:15 2015 (r280772) @@ -49,7 +49,10 @@ static struct resource *simplebus_alloc_ int *, u_long, u_long, u_long, u_int); static void simplebus_probe_nomatch(device_t bus, device_t child); static int simplebus_print_child(device_t bus, device_t child); - +static device_t simplebus_add_child(device_t dev, u_int order, + const char *name, int unit); +static struct resource_list *simplebus_get_resource_list(device_t bus, + device_t child); /* * ofw_bus interface */ @@ -62,8 +65,6 @@ static const struct ofw_bus_devinfo *sim static int simplebus_fill_ranges(phandle_t node, struct simplebus_softc *sc); -static struct simplebus_devinfo *simplebus_setup_dinfo(device_t dev, - phandle_t node); /* * Driver methods. @@ -72,10 +73,17 @@ static device_method_t simplebus_methods /* Device interface */ DEVMETHOD(device_probe, simplebus_probe), DEVMETHOD(device_attach, simplebus_attach), + DEVMETHOD(device_detach, bus_generic_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ + DEVMETHOD(bus_add_child, simplebus_add_child), DEVMETHOD(bus_print_child, simplebus_print_child), DEVMETHOD(bus_probe_nomatch, simplebus_probe_nomatch), + DEVMETHOD(bus_read_ivar, bus_generic_read_ivar), + DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), DEVMETHOD(bus_alloc_resource, simplebus_alloc_resource), @@ -83,7 +91,10 @@ static device_method_t simplebus_methods DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), DEVMETHOD(bus_adjust_resource, bus_generic_adjust_resource), + DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), + DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), + DEVMETHOD(bus_get_resource_list, simplebus_get_resource_list), /* ofw_bus interface */ DEVMETHOD(ofw_bus_get_devinfo, simplebus_get_devinfo), @@ -132,13 +143,33 @@ static int simplebus_attach(device_t dev) { struct simplebus_softc *sc; - struct simplebus_devinfo *di; phandle_t node; - device_t cdev; - node = ofw_bus_get_node(dev); sc = device_get_softc(dev); + simplebus_init(dev, 0); + if (simplebus_fill_ranges(sc->node, sc) < 0) { + device_printf(dev, "could not get ranges\n"); + return (ENXIO); + } + + /* + * In principle, simplebus could have an interrupt map, but ignore that + * for now + */ + + for (node = OF_child(sc->node); node > 0; node = OF_peer(node)) + simplebus_add_device(dev, node, 0, NULL, -1, NULL); + return (bus_generic_attach(dev)); +} + +void +simplebus_init(device_t dev, phandle_t node) +{ + struct simplebus_softc *sc; + sc = device_get_softc(dev); + if (node == 0) + node = ofw_bus_get_node(dev); sc->dev = dev; sc->node = node; @@ -149,33 +180,6 @@ simplebus_attach(device_t dev) OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); sc->scells = 1; OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); - - if (simplebus_fill_ranges(node, sc) < 0) { - device_printf(dev, "could not get ranges\n"); - return (ENXIO); - } - - /* - * In principle, simplebus could have an interrupt map, but ignore that - * for now - */ - - for (node = OF_child(node); node > 0; node = OF_peer(node)) { - if ((di = simplebus_setup_dinfo(dev, node)) == NULL) - continue; - cdev = device_add_child(dev, NULL, -1); - if (cdev == NULL) { - device_printf(dev, "<%s>: device_add_child failed\n", - di->obdinfo.obd_name); - resource_list_free(&di->rl); - ofw_bus_gen_destroy_devinfo(&di->obdinfo); - free(di, M_DEVBUF); - continue; - } - device_set_ivars(cdev, di); - } - - return (bus_generic_attach(dev)); } static int @@ -227,17 +231,21 @@ simplebus_fill_ranges(phandle_t node, st return (sc->nranges); } -static struct simplebus_devinfo * -simplebus_setup_dinfo(device_t dev, phandle_t node) +struct simplebus_devinfo * +simplebus_setup_dinfo(device_t dev, phandle_t node, + struct simplebus_devinfo *di) { struct simplebus_softc *sc; struct simplebus_devinfo *ndi; sc = device_get_softc(dev); - - ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + if (di == NULL) + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + else + ndi = di; if (ofw_bus_gen_setup_devinfo(&ndi->obdinfo, node) != 0) { - free(ndi, M_DEVBUF); + if (di == NULL) + free(ndi, M_DEVBUF); return (NULL); } @@ -248,6 +256,48 @@ simplebus_setup_dinfo(device_t dev, phan return (ndi); } +device_t +simplebus_add_device(device_t dev, phandle_t node, u_int order, + const char *name, int unit, struct simplebus_devinfo *di) +{ + struct simplebus_devinfo *ndi; + device_t cdev; + + if ((ndi = simplebus_setup_dinfo(dev, node, di)) == NULL) + return (NULL); + cdev = device_add_child_ordered(dev, order, name, unit); + if (cdev == NULL) { + device_printf(dev, "<%s>: device_add_child failed\n", + ndi->obdinfo.obd_name); + resource_list_free(&ndi->rl); + ofw_bus_gen_destroy_devinfo(&ndi->obdinfo); + if (di == NULL) + free(ndi, M_DEVBUF); + return (NULL); + } + device_set_ivars(cdev, ndi); + + return(cdev); +} + +static device_t +simplebus_add_child(device_t dev, u_int order, const char *name, int unit) +{ + device_t cdev; + struct simplebus_devinfo *ndi; + + cdev = device_add_child_ordered(dev, order, name, unit); + if (cdev == NULL) + return (NULL); + + ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); + ndi->obdinfo.obd_node = -1; + resource_list_init(&ndi->rl); + device_set_ivars(cdev, ndi); + + return (cdev); +} + static const struct ofw_bus_devinfo * simplebus_get_devinfo(device_t bus __unused, device_t child) { @@ -257,6 +307,15 @@ simplebus_get_devinfo(device_t bus __unu return (&ndi->obdinfo); } +static struct resource_list * +simplebus_get_resource_list(device_t bus __unused, device_t child) +{ + struct simplebus_devinfo *ndi; + + ndi = device_get_ivars(child); + return (&ndi->rl); +} + static struct resource * simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -335,9 +394,11 @@ simplebus_probe_nomatch(device_t bus, de if (!bootverbose) return; + compat = ofw_bus_get_compat(child); + if (compat == NULL) + return; name = ofw_bus_get_name(child); type = ofw_bus_get_type(child); - compat = ofw_bus_get_compat(child); device_printf(bus, "<%s>", name != NULL ? name : "unknown"); simplebus_print_res(device_get_ivars(child)); @@ -345,9 +406,7 @@ simplebus_probe_nomatch(device_t bus, de printf(" disabled"); if (type) printf(" type %s", type); - if (compat) - printf(" compat %s", compat); - printf(" (no driver attached)\n"); + printf(" compat %s (no driver attached)\n", compat); } static int Modified: head/sys/dev/fdt/simplebus.h ============================================================================== --- head/sys/dev/fdt/simplebus.h Fri Mar 27 21:47:15 2015 (r280771) +++ head/sys/dev/fdt/simplebus.h Fri Mar 27 23:10:15 2015 (r280772) @@ -26,8 +26,10 @@ * $FreeBSD$ */ -#ifndef _FDT_SIMPLEBUS_PRIVATE_H -#define _FDT_SIMPLEBUS_PRIVATE_H +#ifndef _FDT_SIMPLEBUS_H +#define _FDT_SIMPLEBUS_H + +#include /* FDT simplebus */ DECLARE_CLASS(simplebus_driver); @@ -53,4 +55,10 @@ struct simplebus_devinfo { struct ofw_bus_devinfo obdinfo; struct resource_list rl; }; -#endif /* _FDT_SIMPLEBUS_PRIVATE_H */ + +void simplebus_init(device_t dev, phandle_t node); +device_t simplebus_add_device(device_t dev, phandle_t node, u_int order, + const char *name, int unit, struct simplebus_devinfo *di); +struct simplebus_devinfo *simplebus_setup_dinfo(device_t dev, phandle_t node, + struct simplebus_devinfo *di); +#endif /* _FDT_SIMPLEBUS_H */ Modified: head/sys/dev/ofw/ofwbus.c ============================================================================== --- head/sys/dev/ofw/ofwbus.c Fri Mar 27 21:47:15 2015 (r280771) +++ head/sys/dev/ofw/ofwbus.c Fri Mar 27 23:10:15 2015 (r280772) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -62,13 +63,8 @@ __FBSDID("$FreeBSD$"); * */ -struct ofwbus_devinfo { - struct ofw_bus_devinfo ndi_obdinfo; - struct resource_list ndi_rl; -}; - struct ofwbus_softc { - uint32_t acells, scells; + struct simplebus_softc simplebus_sc; struct rman sc_intr_rman; struct rman sc_mem_rman; }; @@ -76,113 +72,31 @@ struct ofwbus_softc { static device_identify_t ofwbus_identify; static device_probe_t ofwbus_probe; static device_attach_t ofwbus_attach; -static bus_print_child_t ofwbus_print_child; -static bus_add_child_t ofwbus_add_child; -static bus_probe_nomatch_t ofwbus_probe_nomatch; static bus_alloc_resource_t ofwbus_alloc_resource; static bus_adjust_resource_t ofwbus_adjust_resource; static bus_release_resource_t ofwbus_release_resource; -static bus_get_resource_list_t ofwbus_get_resource_list; -static ofw_bus_get_devinfo_t ofwbus_get_devinfo; - -static int ofwbus_inlist(const char *, const char *const *); -static struct ofwbus_devinfo * ofwbus_setup_dinfo(device_t, phandle_t); -static void ofwbus_destroy_dinfo(struct ofwbus_devinfo *); -static int ofwbus_print_res(struct ofwbus_devinfo *); static device_method_t ofwbus_methods[] = { /* Device interface */ DEVMETHOD(device_identify, ofwbus_identify), DEVMETHOD(device_probe, ofwbus_probe), DEVMETHOD(device_attach, ofwbus_attach), - DEVMETHOD(device_detach, bus_generic_detach), - DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, bus_generic_suspend), - DEVMETHOD(device_resume, bus_generic_resume), /* Bus interface */ - DEVMETHOD(bus_print_child, ofwbus_print_child), - DEVMETHOD(bus_probe_nomatch, ofwbus_probe_nomatch), - DEVMETHOD(bus_read_ivar, bus_generic_read_ivar), - DEVMETHOD(bus_write_ivar, bus_generic_write_ivar), - DEVMETHOD(bus_add_child, ofwbus_add_child), - DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), DEVMETHOD(bus_alloc_resource, ofwbus_alloc_resource), DEVMETHOD(bus_adjust_resource, ofwbus_adjust_resource), DEVMETHOD(bus_release_resource, ofwbus_release_resource), - DEVMETHOD(bus_set_resource, bus_generic_rl_set_resource), - DEVMETHOD(bus_get_resource, bus_generic_rl_get_resource), - DEVMETHOD(bus_get_resource_list, ofwbus_get_resource_list), - DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), - DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), - DEVMETHOD(bus_config_intr, bus_generic_config_intr), - DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), - DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - - /* ofw_bus interface */ - DEVMETHOD(ofw_bus_get_devinfo, ofwbus_get_devinfo), - DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), - DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), - DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), - DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), - DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), DEVMETHOD_END }; -static driver_t ofwbus_driver = { - "ofwbus", - ofwbus_methods, - sizeof(struct ofwbus_softc) -}; +DEFINE_CLASS_1(ofwbus, ofwbus_driver, ofwbus_methods, + sizeof(struct ofwbus_softc), simplebus_driver); static devclass_t ofwbus_devclass; EARLY_DRIVER_MODULE(ofwbus, nexus, ofwbus_driver, ofwbus_devclass, 0, 0, BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE); MODULE_VERSION(ofwbus, 1); -static const char *const ofwbus_excl_name[] = { - "FJSV,system", - "aliases", - "associations", - "chosen", - "cmp", - "counter-timer", /* No separate device; handled by psycho/sbus */ - "failsafe", - "memory", - "openprom", - "options", - "packages", - "physical-memory", - "rsc", - "sgcn", - "todsg", - "virtual-memory", - NULL -}; - -static const char *const ofwbus_excl_type[] = { - "core", - "cpu", - NULL -}; - -static int -ofwbus_inlist(const char *name, const char *const *list) -{ - int i; - - if (name == NULL) - return (0); - for (i = 0; list[i] != NULL; i++) - if (strcmp(name, list[i]) == 0) - return (1); - return (0); -} - -#define OFWBUS_EXCLUDED(name, type) \ - (ofwbus_inlist((name), ofwbus_excl_name) || \ - ((type) != NULL && ofwbus_inlist((type), ofwbus_excl_type))) - static void ofwbus_identify(driver_t *driver, device_t parent) { @@ -190,7 +104,7 @@ ofwbus_identify(driver_t *driver, device /* Check if Open Firmware has been instantiated */ if (OF_peer(0) == 0) return; - + if (device_find_child(parent, "ofwbus", -1) == NULL) BUS_ADD_CHILD(parent, 0, "ofwbus", -1); } @@ -206,10 +120,9 @@ ofwbus_probe(device_t dev) static int ofwbus_attach(device_t dev) { - struct ofwbus_devinfo *ndi; struct ofwbus_softc *sc; - device_t cdev; phandle_t node; + struct ofw_bus_devinfo obd; sc = device_get_softc(dev); @@ -221,6 +134,11 @@ ofwbus_attach(device_t dev) if (node == -1) return (ENXIO); + /* + * ofwbus bus starts on unamed node in FDT, so we cannot make + * ofw_bus_devinfo from it. Pass node to simplebus_init directly. + */ + simplebus_init(dev, node); sc->sc_intr_rman.rm_type = RMAN_ARRAY; sc->sc_intr_rman.rm_descr = "Interrupts"; sc->sc_mem_rman.rm_type = RMAN_ARRAY; @@ -237,78 +155,16 @@ ofwbus_attach(device_t dev) bus_generic_probe(dev); /* - * Some important numbers - */ - sc->acells = 2; - OF_getencprop(node, "#address-cells", &sc->acells, sizeof(sc->acells)); - sc->scells = 1; - OF_getencprop(node, "#size-cells", &sc->scells, sizeof(sc->scells)); - - /* * Now walk the OFW tree and attach top-level devices. */ for (node = OF_child(node); node > 0; node = OF_peer(node)) { - if ((ndi = ofwbus_setup_dinfo(dev, node)) == NULL) + if (ofw_bus_gen_setup_devinfo(&obd, node) != 0) continue; - cdev = device_add_child(dev, NULL, -1); - if (cdev == NULL) { - device_printf(dev, "<%s>: device_add_child failed\n", - ndi->ndi_obdinfo.obd_name); - ofwbus_destroy_dinfo(ndi); - continue; - } - device_set_ivars(cdev, ndi); + simplebus_add_device(dev, node, 0, NULL, -1, NULL); } return (bus_generic_attach(dev)); } -static device_t -ofwbus_add_child(device_t dev, u_int order, const char *name, int unit) -{ - device_t cdev; - struct ofwbus_devinfo *ndi; - - cdev = device_add_child_ordered(dev, order, name, unit); - if (cdev == NULL) - return (NULL); - - ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); - ndi->ndi_obdinfo.obd_node = -1; - resource_list_init(&ndi->ndi_rl); - device_set_ivars(cdev, ndi); - - return (cdev); -} - -static int -ofwbus_print_child(device_t bus, device_t child) -{ - int rv; - - rv = bus_print_child_header(bus, child); - rv += ofwbus_print_res(device_get_ivars(child)); - rv += bus_print_child_footer(bus, child); - return (rv); -} - -static void -ofwbus_probe_nomatch(device_t bus, device_t child) -{ - const char *name, *type; - - if (!bootverbose) - return; - - name = ofw_bus_get_name(child); - type = ofw_bus_get_type(child); - - device_printf(bus, "<%s>", - name != NULL ? name : "unknown"); - ofwbus_print_res(device_get_ivars(child)); - printf(" type %s (no driver attached)\n", - type != NULL ? type : "unknown"); -} - static struct resource * ofwbus_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -323,14 +179,15 @@ ofwbus_alloc_resource(device_t bus, devi passthrough = (device_get_parent(child) != bus); sc = device_get_softc(bus); rle = NULL; - if (!passthrough && isdefault) { rle = resource_list_find(BUS_GET_RESOURCE_LIST(bus, child), type, *rid); - if (rle == NULL) + if (rle == NULL) { + if (bootverbose) + device_printf(bus, "no default resources for " + "rid = %d, type = %d\n", *rid, type); return (NULL); - if (rle->res != NULL) - panic("%s: resource entry is busy", __func__); + } start = rle->start; count = ulmax(count, rle->count); end = ulmax(rle->end, start + count - 1); @@ -417,72 +274,3 @@ ofwbus_release_resource(device_t bus, de } return (rman_release_resource(r)); } - -static struct resource_list * -ofwbus_get_resource_list(device_t bus __unused, device_t child) -{ - struct ofwbus_devinfo *ndi; - - ndi = device_get_ivars(child); - return (&ndi->ndi_rl); -} - -static const struct ofw_bus_devinfo * -ofwbus_get_devinfo(device_t bus __unused, device_t child) -{ - struct ofwbus_devinfo *ndi; - - ndi = device_get_ivars(child); - return (&ndi->ndi_obdinfo); -} - -static struct ofwbus_devinfo * -ofwbus_setup_dinfo(device_t dev, phandle_t node) -{ - struct ofwbus_softc *sc; - struct ofwbus_devinfo *ndi; - const char *nodename; - - sc = device_get_softc(dev); - - ndi = malloc(sizeof(*ndi), M_DEVBUF, M_WAITOK | M_ZERO); - if (ofw_bus_gen_setup_devinfo(&ndi->ndi_obdinfo, node) != 0) { - free(ndi, M_DEVBUF); - return (NULL); - } - nodename = ndi->ndi_obdinfo.obd_name; - if (OFWBUS_EXCLUDED(nodename, ndi->ndi_obdinfo.obd_type)) { - ofw_bus_gen_destroy_devinfo(&ndi->ndi_obdinfo); - free(ndi, M_DEVBUF); - return (NULL); - } - - resource_list_init(&ndi->ndi_rl); - ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->ndi_rl); - ofw_bus_intr_to_rl(dev, node, &ndi->ndi_rl); - - return (ndi); -} - -static void -ofwbus_destroy_dinfo(struct ofwbus_devinfo *ndi) -{ - - resource_list_free(&ndi->ndi_rl); - ofw_bus_gen_destroy_devinfo(&ndi->ndi_obdinfo); - free(ndi, M_DEVBUF); -} - -static int -ofwbus_print_res(struct ofwbus_devinfo *ndi) -{ - int rv; - - rv = 0; - rv += resource_list_print_type(&ndi->ndi_rl, "mem", SYS_RES_MEMORY, - "%#lx"); - rv += resource_list_print_type(&ndi->ndi_rl, "irq", SYS_RES_IRQ, - "%ld"); - return (rv); -} - From owner-svn-src-all@FreeBSD.ORG Fri Mar 27 23:11:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F2E0E90; Fri, 27 Mar 2015 23:11:25 +0000 (UTC) Received: from st11p02mm-asmtp002.mac.com (st11p02mm-asmtpout002.mac.com [17.172.220.237]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 72759651; Fri, 27 Mar 2015 23:11:24 +0000 (UTC) Received: from fukuyama.hsd1.ca.comcast.net (unknown [73.162.13.215]) by st11p02mm-asmtp002.mac.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4 2014)) with ESMTPSA id <0NLW00LHY8EOR640@st11p02mm-asmtp002.mac.com>; Fri, 27 Mar 2015 23:11:16 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-03-27_08:2015-03-27,2015-03-27,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1412110000 definitions=main-1503270226 Content-type: text/plain; charset=utf-8 MIME-version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280728 - head/sys/conf From: Rui Paulo In-reply-to: Date: Fri, 27 Mar 2015 16:11:12 -0700 Content-transfer-encoding: quoted-printable Message-id: References: <201503270235.t2R2ZQeA047220@svn.freebsd.org> <2AF9E0A0-3B9B-4AF0-89B9-FEBA7FEFCA8B@me.com> To: Warner Losh X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 23:11:25 -0000 On Mar 26, 2015, at 21:44, Warner Losh wrote: > Yea, the ships passed in the night. I=E2=80=99ve had these changes in = my tree for a while. >=20 > However, It kinda can be overridden by compiling the modules directly. = Since > the actual module=E2=80=99s Makefiles don=E2=80=99t depend on this, I = think we=E2=80=99re OK. Can you test > building a kernel on the BBB you have and let me know if it produces = working ZFS? As long as this change works with MODULES_OVERRIDE, I'm fine with it. -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 01:11:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBBBC281; Sat, 28 Mar 2015 01:11:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9CBFA30E; Sat, 28 Mar 2015 01:11:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S1BK4s092515; Sat, 28 Mar 2015 01:11:20 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S1BJFu092507; Sat, 28 Mar 2015 01:11:19 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201503280111.t2S1BJFu092507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 28 Mar 2015 01:11:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280773 - head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 01:11:20 -0000 Author: markj Date: Sat Mar 28 01:11:18 2015 New Revision: 280773 URL: https://svnweb.freebsd.org/changeset/base/280773 Log: tcp provider tests: sleep for a bit after closing the socket so that libdtrace has a chance to capture the traced data. MFC after: 1 week Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4remotetcp.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.localtcpstate.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.remotetcpstate.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh Fri Mar 27 23:10:15 2015 (r280772) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/ip/tst.ipv4localtcp.ksh Sat Mar 28 01:11:18 2015 (r280773) @@ -73,6 +73,7 @@ cat > test.pl <<-EOPERL Timeout => 3); die "Could not connect to host $local port $tcpport" unless \$s; close \$s; + sleep(2); EOPERL $dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < test.pl <<-EOPERL Timeout => 3); die "Could not connect to host $dest port $tcpport" unless \$s; close \$s; + sleep(2); EOPERL $dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < test.pl <<-EOPERL die "Could not connect to host $local port $tcpport" unless \$s; print \$s "testing state machine transitions"; close \$s; + sleep(2); EOPERL $dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < test.pl <<-EOPERL die "Could not connect to host $dest port $tcpport" unless \$s; print \$s "testing state machine transitions"; close \$s; + sleep(2); EOPERL $dtrace -c '/usr/bin/perl test.pl' -qs /dev/stdin < Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3AAFAC66; Sat, 28 Mar 2015 02:36:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C431C65; Sat, 28 Mar 2015 02:36:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S2aoPl032744; Sat, 28 Mar 2015 02:36:50 GMT (envelope-from jeff@FreeBSD.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S2aoeI032743; Sat, 28 Mar 2015 02:36:50 GMT (envelope-from jeff@FreeBSD.org) Message-Id: <201503280236.t2S2aoeI032743@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jeff set sender to jeff@FreeBSD.org using -f From: Jeff Roberson Date: Sat, 28 Mar 2015 02:36:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280774 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 02:36:51 -0000 Author: jeff Date: Sat Mar 28 02:36:49 2015 New Revision: 280774 URL: https://svnweb.freebsd.org/changeset/base/280774 Log: - Eliminate pagequeue locking in the dirty code in vm_pageout_scan(). - Use a more precise series of tests to see if the page changed while we were locking the vnode. Reviewed by: alc Sponsored by: EMC / Isilon Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Mar 28 01:11:18 2015 (r280773) +++ head/sys/vm/vm_pageout.c Sat Mar 28 02:36:49 2015 (r280774) @@ -1157,6 +1157,7 @@ vm_pageout_scan(struct vm_domain *vmd, i int swap_pageouts_ok; struct vnode *vp = NULL; struct mount *mp = NULL; + vm_pindex_t pindex; if ((object->type != OBJT_SWAP) && (object->type != OBJT_DEFAULT)) { swap_pageouts_ok = 1; @@ -1217,6 +1218,7 @@ vm_pageout_scan(struct vm_domain *vmd, i KASSERT(mp != NULL, ("vp %p with NULL v_mount", vp)); vm_object_reference_locked(object); + pindex = m->pindex; VM_OBJECT_WUNLOCK(object); lockmode = MNT_SHARED_WRITES(vp->v_mount) ? LK_SHARED : LK_EXCLUSIVE; @@ -1231,17 +1233,18 @@ vm_pageout_scan(struct vm_domain *vmd, i } VM_OBJECT_WLOCK(object); vm_page_lock(m); - vm_pagequeue_lock(pq); - queues_locked = TRUE; /* - * The page might have been moved to another - * queue during potential blocking in vget() - * above. The page might have been freed and - * reused for another vnode. + * While the object and page were unlocked, + * the page may have been + * (1) moved to a different queue, + * (2) reallocated to a different object, + * (3) reallocated to a different offset, or + * (4) cleaned. */ if (m->queue != PQ_INACTIVE || m->object != object || - TAILQ_NEXT(m, plinks.q) != &vmd->vmd_marker) { + m->pindex != pindex || + m->dirty == 0) { vm_page_unlock(m); if (object->flags & OBJ_MIGHTBEDIRTY) vnodes_skipped++; @@ -1271,8 +1274,6 @@ vm_pageout_scan(struct vm_domain *vmd, i vnodes_skipped++; goto unlock_and_continue; } - vm_pagequeue_unlock(pq); - queues_locked = FALSE; } /* @@ -1293,10 +1294,6 @@ unlock_and_continue: vm_page_lock_assert(m, MA_NOTOWNED); VM_OBJECT_WUNLOCK(object); if (mp != NULL) { - if (queues_locked) { - vm_pagequeue_unlock(pq); - queues_locked = FALSE; - } if (vp != NULL) vput(vp); vm_object_deallocate(object); From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 02:41:47 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FA46DFE; Sat, 28 Mar 2015 02:41:47 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (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 0628BD2F; Sat, 28 Mar 2015 02:41:46 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2S2fWcQ078499; Fri, 27 Mar 2015 18:41:36 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503280241.t2S2fWcQ078499@gw.catspoiler.org> Date: Fri, 27 Mar 2015 19:41:32 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm To: alc@FreeBSD.org In-Reply-To: <201503211756.t2LHuumt035234@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, clusteradm@FreeBSD.org, portmgr@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 02:41:47 -0000 On 21 Mar, Alan Cox wrote: > Author: alc > Date: Sat Mar 21 17:56:55 2015 > New Revision: 280327 > URL: https://svnweb.freebsd.org/changeset/base/280327 > > Log: > Introduce vm_object_color() and use it in mmap(2) to set the color of > named objects to zero before the virtual address is selected. Previously, > the color setting was delayed until after the virtual address was > selected. In rtld, this delay effectively prevented the mapping of a > shared library's code section using superpages. Now, for example, we see > the first 1 MB of libc's code on armv6 mapped by a superpage after we've > gotten through the initial cold misses that bring the first 1 MB of code > into memory. (With the page clustering that we perform on read faults, > this happens quickly.) > > Differential Revision: https://reviews.freebsd.org/D2013 > Reviewed by: jhb, kib > Tested by: Svatopluk Kraus (armv6) > MFC after: 6 weeks > > Modified: > head/sys/kern/kern_exec.c > head/sys/vm/vm_fault.c > head/sys/vm/vm_mmap.c > head/sys/vm/vm_object.h > head/sys/vm/vnode_pager.c This change appears to have partially broken package building. I recently set up a package building machine running 11.0-CURRENT r280642 and found that it was unable to build openjdk7 packages inside FreeBSD 8.4 and 9.3 poudriere jails, for both i386 and amd64. [snip] Compiling ../generated/adfiles/ad_x86_64_gen.cpp rm -f ad_x86_64_gen.o c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_format.o.d -o ad_x86_64_format.o ../generated/adfiles/ad_x86_64_format.cpp c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_gen.o.d -o ad_x86_64_gen.o ../generated/adfiles/ad_x86_64_gen.cpp Compiling ../generated/adfiles/ad_x86_64_misc.cpp rm -f ad_x86_64_misc.o c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_misc.o.d -o ad_x86_64_misc.o ../generated/adfiles/ad_x86_64_misc.cpp /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/compiler/abstractCompiler.cpp:1: fatal error: had to relocate PCH compilation terminated. /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/utilities/accessFlags.cpp:1: fatal error: had to relocate PCH compilation terminated. /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'abstractCompiler.o' failed gmake[6]: *** [abstractCompiler.o] Error 1 gmake[6]: *** Waiting for unfinished jobs.... ../generated/adfiles/ad_x86_64.cpp:1: fatal error: had to relocate PCH compilation terminated. ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to relocate PCH compilation terminated. /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'accessFlags.o' failed gmake[6]: *** [accessFlags.o] Error 1 /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed gmake[6]: *** [ad_x86_64_clone.o] Error 1 /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64.o' failed gmake[6]: *** [ad_x86_64.o] Error 1 ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to relocate PCH compilation terminated. /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed gmake[6]: *** [ad_x86_64_expand.o] Error 1 ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to relocate PCH compilation terminated. ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to relocate PCH compilation terminated. /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed gmake[6]: *** [ad_x86_64_gen.o] Error 1 /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed gmake[6]: *** [ad_x86_64_misc.o] Error 1 ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to relocate PCH compilation terminated. /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_format.o' failed gmake[6]: *** [ad_x86_64_format.o] Error 1 gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/top.make:128: recipe for target 'the_vm' failed gmake[5]: *** [the_vm] Error 2 gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makefile:292: recipe for target 'product' failed gmake[4]: *** [product] Error 2 gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir' Makefile:191: recipe for target 'generic_build2' failed gmake[3]: *** [generic_build2] Error 2 gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' Makefile:151: recipe for target 'product' failed gmake[2]: *** [product] Error 2 gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed gmake[1]: *** [hotspot-build] Error 2 gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk' Makefile:251: recipe for target 'build_product_image' failed gmake: *** [build_product_image] Error 2 ===> Compilation failed unexpectedly. I was not seeing this problem on my older package builder running 10.1-STABLE. Since this problem has not shown up on the FreeBSD package building cluster, I got suspicious that the change was quite recent. This old gcc bug report: led me to suspect mmap(). The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a couple of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a NULL first argument is used. The address that gets returned is stashed away and the region is unmapped. Then a later call in mmap_gt_pch_use_address() passes this saved address to mmap() as a hint. It expects the mapped region to get mapped to the same base address. If this does not happen, the above error is the result. If I go back to kernel source r280326, which immediately preceeds the above commit, I am able to successfully build openjdk7. I recommend that any machines in the ports cluster being used to build packages for FreeBSD 8 and 9 avoid upgrading past r280326 until this issue is resolved. I have not observed any problems building packages for FreeBSD 10 and 11. From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 02:55:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 422152A5; Sat, 28 Mar 2015 02:55:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 13A4BE3B; Sat, 28 Mar 2015 02:55:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S2tHJB041553; Sat, 28 Mar 2015 02:55:17 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S2tHcL041552; Sat, 28 Mar 2015 02:55:17 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201503280255.t2S2tHcL041552@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 28 Mar 2015 02:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280775 - head/sys/amd64/vmm/io X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 02:55:18 -0000 Author: neel Date: Sat Mar 28 02:55:16 2015 New Revision: 280775 URL: https://svnweb.freebsd.org/changeset/base/280775 Log: Fix the RTC device model to operate correctly in 12-hour mode. The following table documents the values in the RTC 'hour' field in the two modes: Hour-of-the-day 12-hour mode 24-hour mode 12 AM 12 0 [1-11] AM [1-11] [1-11] 12 PM 0x80 | 12 12 [1-11] PM 0x80 | [1-11] [13-23] Reported by: Julian Hsiao (madoka@nyanisore.net) MFC after: 1 week Modified: head/sys/amd64/vmm/io/vrtc.c Modified: head/sys/amd64/vmm/io/vrtc.c ============================================================================== --- head/sys/amd64/vmm/io/vrtc.c Sat Mar 28 02:36:49 2015 (r280774) +++ head/sys/amd64/vmm/io/vrtc.c Sat Mar 28 02:55:16 2015 (r280775) @@ -214,9 +214,27 @@ secs_to_rtc(time_t rtctime, struct vrtc rtc->sec = rtcset(rtc, ct.sec); rtc->min = rtcset(rtc, ct.min); - hour = ct.hour; - if ((rtc->reg_b & RTCSB_24HR) == 0) - hour = (hour % 12) + 1; /* convert to a 12-hour format */ + if (rtc->reg_b & RTCSB_24HR) { + hour = ct.hour; + } else { + /* + * Convert to the 12-hour format. + */ + switch (ct.hour) { + case 0: /* 12 AM */ + case 12: /* 12 PM */ + hour = 12; + break; + default: + /* + * The remaining 'ct.hour' values are interpreted as: + * [1 - 11] -> 1 - 11 AM + * [13 - 23] -> 1 - 11 PM + */ + hour = ct.hour % 12; + break; + } + } rtc->hour = rtcset(rtc, hour); @@ -287,9 +305,26 @@ rtc_to_secs(struct vrtc *vrtc) } error = rtcget(rtc, hour, &ct.hour); if ((rtc->reg_b & RTCSB_24HR) == 0) { - ct.hour -= 1; - if (pm) - ct.hour += 12; + if (ct.hour >= 1 && ct.hour <= 12) { + /* + * Convert from 12-hour format to internal 24-hour + * representation as follows: + * + * 12-hour format ct.hour + * 12 AM 0 + * 1 - 11 AM 1 - 11 + * 12 PM 12 + * 1 - 11 PM 13 - 23 + */ + if (ct.hour == 12) + ct.hour = 0; + if (pm) + ct.hour += 12; + } else { + VM_CTR2(vm, "Invalid RTC 12-hour format %#x/%d", + rtc->hour, ct.hour); + goto fail; + } } if (error || ct.hour < 0 || ct.hour > 23) { From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 05:11:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE60047D; Sat, 28 Mar 2015 05:11:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98734E65; Sat, 28 Mar 2015 05:11:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S5BI9c006687; Sat, 28 Mar 2015 05:11:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S5BGd7006681; Sat, 28 Mar 2015 05:11:16 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201503280511.t2S5BGd7006681@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 28 Mar 2015 05:11:16 +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: r280777 - stable/10/release/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 05:11:18 -0000 Author: gjb Date: Sat Mar 28 05:11:16 2015 New Revision: 280777 URL: https://svnweb.freebsd.org/changeset/base/280777 Log: MFC r280640: Crochet sources moved to a new home; update accordingly. Sponsored by: The FreeBSD Foundation Modified: stable/10/release/arm/BEAGLEBONE.conf stable/10/release/arm/PANDABOARD.conf stable/10/release/arm/RPI-B.conf stable/10/release/arm/WANDBOARD-QUAD.conf stable/10/release/arm/ZEDBOARD.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/release/arm/BEAGLEBONE.conf ============================================================================== --- stable/10/release/arm/BEAGLEBONE.conf Sat Mar 28 05:09:09 2015 (r280776) +++ stable/10/release/arm/BEAGLEBONE.conf Sat Mar 28 05:11:16 2015 (r280777) @@ -24,7 +24,7 @@ XDEV="arm" XDEV_ARCH="armv6" XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="BEAGLEBONE" -CROCHETSRC="https://github.com/kientzle/crochet-freebsd" +CROCHETSRC="https://github.com/freebsd/crochet" CROCHETBRANCH="trunk@r744" set +a Modified: stable/10/release/arm/PANDABOARD.conf ============================================================================== --- stable/10/release/arm/PANDABOARD.conf Sat Mar 28 05:09:09 2015 (r280776) +++ stable/10/release/arm/PANDABOARD.conf Sat Mar 28 05:11:16 2015 (r280777) @@ -24,7 +24,7 @@ XDEV="arm" XDEV_ARCH="armv6" XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="PANDABOARD" -CROCHETSRC="https://github.com/kientzle/crochet-freebsd" +CROCHETSRC="https://github.com/freebsd/crochet" CROCHETBRANCH="trunk@r744" set +a Modified: stable/10/release/arm/RPI-B.conf ============================================================================== --- stable/10/release/arm/RPI-B.conf Sat Mar 28 05:09:09 2015 (r280776) +++ stable/10/release/arm/RPI-B.conf Sat Mar 28 05:11:16 2015 (r280777) @@ -24,7 +24,7 @@ XDEV="arm" XDEV_ARCH="armv6" XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="RPI-B" -CROCHETSRC="https://github.com/kientzle/crochet-freebsd" +CROCHETSRC="https://github.com/freebsd/crochet" CROCHETBRANCH="trunk@r744" UBOOTSRC="https://github.com/gonzoua/u-boot-pi" UBOOTBRANCH="trunk" Modified: stable/10/release/arm/WANDBOARD-QUAD.conf ============================================================================== --- stable/10/release/arm/WANDBOARD-QUAD.conf Sat Mar 28 05:09:09 2015 (r280776) +++ stable/10/release/arm/WANDBOARD-QUAD.conf Sat Mar 28 05:11:16 2015 (r280777) @@ -24,7 +24,7 @@ XDEV="arm" XDEV_ARCH="armv6" XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="WANDBOARD-QUAD" -CROCHETSRC="https://github.com/kientzle/crochet-freebsd" +CROCHETSRC="https://github.com/freebsd/crochet" CROCHETBRANCH="trunk@r744" set +a Modified: stable/10/release/arm/ZEDBOARD.conf ============================================================================== --- stable/10/release/arm/ZEDBOARD.conf Sat Mar 28 05:09:09 2015 (r280776) +++ stable/10/release/arm/ZEDBOARD.conf Sat Mar 28 05:11:16 2015 (r280777) @@ -23,7 +23,7 @@ XDEV="arm" XDEV_ARCH="armv6" XDEV_FLAGS="WITH_GCC=1 WITH_GNUCXX=1 WITHOUT_CLANG_IS_CC=1" KERNEL="ZEDBOARD" -CROCHETSRC="https://github.com/kientzle/crochet-freebsd" +CROCHETSRC="https://github.com/freebsd/crochet" CROCHETBRANCH="trunk@r744" set +a From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 06:54:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A66A5FA7; Sat, 28 Mar 2015 06:54:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9164F8AA; Sat, 28 Mar 2015 06:54:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S6sJn5053626; Sat, 28 Mar 2015 06:54:19 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S6sJSK053625; Sat, 28 Mar 2015 06:54:19 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503280654.t2S6sJSK053625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Mar 2015 06:54:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280779 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 06:54:19 -0000 Author: adrian Date: Sat Mar 28 06:54:18 2015 New Revision: 280779 URL: https://svnweb.freebsd.org/changeset/base/280779 Log: Set VM_KMEM_SIZE_SCALE=1 for the AR91xx SoCs. Without this the autotuning fails for small amounts of RAM (32mb), which all the AR91xx shipping products seemed to have. Thanks to gjb for reminding me to re-test this stuff. Tested: * AR91xx, TP-Link TL-WR1043nd v1 Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE ============================================================================== --- head/sys/mips/conf/AR91XX_BASE Sat Mar 28 05:16:52 2015 (r280778) +++ head/sys/mips/conf/AR91XX_BASE Sat Mar 28 06:54:18 2015 (r280779) @@ -26,6 +26,9 @@ options DDB options KDB options ALQ +# For small memory footprints +options VM_KMEM_SIZE_SCALE=1 + options SCHED_4BSD #4BSD scheduler options INET #InterNETworking options INET6 #InterNETworking From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 08:34:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D3B80E10; Sat, 28 Mar 2015 08:34:54 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B4C893CC; Sat, 28 Mar 2015 08:34:53 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2S8YhoE029617 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 28 Mar 2015 11:34:43 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2S8YhdQ029616; Sat, 28 Mar 2015 11:34:43 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 28 Mar 2015 11:34:43 +0300 From: Gleb Smirnoff To: Fabien Thomas Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150328083443.GV64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503271326.t2RDQxd3056112@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 08:34:54 -0000 On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote: F> Author: fabient F> Date: Fri Mar 27 13:26:59 2015 F> New Revision: 280759 F> URL: https://svnweb.freebsd.org/changeset/base/280759 F> F> Log: F> On multi CPU systems, we may emit successive packets with the same id. F> Fix the race by using an atomic operation. F> F> Differential Revision: https://reviews.freebsd.org/D2141 F> Obtained from: emeric.poupon@stormshield.eu F> MFC after: 1 week F> Sponsored by: Stormshield The D2141 says that benchmarking were done in presence of IPSEC, which of course is the bottleneck and performance of this instruction can't be benchmarked in its presence. Anyway, I believe that results of right benchmark would still show little difference between atomic and non-atomic increment of a shared value. I think we can use per-cpu ID counters, each CPU incrementing its own. If we start with random values, then probability of two packets with the same ID emitting at the allowed timeframe will be acceptably small. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 08:55:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C87DB154; Sat, 28 Mar 2015 08:55:14 +0000 (UTC) Received: from vlakno.cz (mail.vlakno.cz [91.217.96.224]) by mx1.freebsd.org (Postfix) with ESMTP id 8D2DD78B; Sat, 28 Mar 2015 08:55:13 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 67F8D1D95AB9; Sat, 28 Mar 2015 09:54:25 +0100 (CET) Date: Sat, 28 Mar 2015 09:54:25 +0100 From: Roman Divacky To: Xin LI Subject: Re: svn commit: r280767 - head/sbin/md5 Message-ID: <20150328085425.GA99099@vlakno.cz> References: <201503271823.t2RIN7sX000292@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503271823.t2RIN7sX000292@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 08:55:14 -0000 > Modified: head/sbin/md5/md5.c > ============================================================================== > --- head/sbin/md5/md5.c Fri Mar 27 17:36:22 2015 (r280766) > +++ head/sbin/md5/md5.c Fri Mar 27 18:23:06 2015 (r280767) > @@ -91,7 +91,7 @@ typedef union { > > /* algorithm function table */ > > -struct Algorithm_t Algorithm[] = { > +static struct Algorithm_t Algorithm[] = { > { "md5", "MD5", &MD5TestOutput, (DIGEST_Init*)&MD5Init, > (DIGEST_Update*)&MD5_Update, (DIGEST_End*)&MD5End, > &MD5Data, &MD5File }, > @@ -282,7 +282,7 @@ MDTimeTrial(Algorithm_t *alg) > * Digests a reference suite of strings and prints the results. > */ Can this be static const? From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 09:02:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DC6D46E; Sat, 28 Mar 2015 09:02:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED706864; Sat, 28 Mar 2015 09:02:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S92KHw013243; Sat, 28 Mar 2015 09:02:20 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S92K0p013242; Sat, 28 Mar 2015 09:02:20 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503280902.t2S92K0p013242@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 28 Mar 2015 09:02:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280780 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 09:02:21 -0000 Author: kib Date: Sat Mar 28 09:02:19 2015 New Revision: 280780 URL: https://svnweb.freebsd.org/changeset/base/280780 Log: The #ss fault handler erronously does not check for the fault originated from the return to usermode. #ss must be handled same as #np. Reported by: Andrew Lutomirski through secteam Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/amd64/amd64/trap.c Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Sat Mar 28 06:54:18 2015 (r280779) +++ head/sys/amd64/amd64/trap.c Sat Mar 28 09:02:19 2015 (r280780) @@ -443,8 +443,6 @@ trap(struct trapframe *frame) goto out; case T_STKFLT: /* stack fault */ - break; - case T_PROTFLT: /* general protection fault */ case T_SEGNPFLT: /* segment not present fault */ if (td->td_intr_nesting_level != 0) From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 09:03:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F0F25DF; Sat, 28 Mar 2015 09:03:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AEE5872; Sat, 28 Mar 2015 09:03:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S93t7b013453; Sat, 28 Mar 2015 09:03:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S93tgH013452; Sat, 28 Mar 2015 09:03:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503280903.t2S93tgH013452@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 28 Mar 2015 09:03:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280781 - head/sys/amd64/amd64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 09:03:55 -0000 Author: kib Date: Sat Mar 28 09:03:54 2015 New Revision: 280781 URL: https://svnweb.freebsd.org/changeset/base/280781 Log: Make it possible for the signal handler to act on #ss. Load the canonical user data segment' selector into %ss when calling the handler. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/machdep.c Modified: head/sys/amd64/amd64/machdep.c ============================================================================== --- head/sys/amd64/amd64/machdep.c Sat Mar 28 09:02:19 2015 (r280780) +++ head/sys/amd64/amd64/machdep.c Sat Mar 28 09:03:54 2015 (r280781) @@ -443,6 +443,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs->tf_rflags &= ~(PSL_T | PSL_D); regs->tf_cs = _ucodesel; regs->tf_ds = _udatasel; + regs->tf_ss = _udatasel; regs->tf_es = _udatasel; regs->tf_fs = _ufssel; regs->tf_gs = _ugssel; From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 09:08:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 373CB74E; Sat, 28 Mar 2015 09:08:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22818895; Sat, 28 Mar 2015 09:08:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2S98wcc014073; Sat, 28 Mar 2015 09:08:58 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2S98voR014072; Sat, 28 Mar 2015 09:08:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201503280908.t2S98voR014072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sat, 28 Mar 2015 09:08:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280782 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 09:08:58 -0000 Author: tuexen Date: Sat Mar 28 09:08:57 2015 New Revision: 280782 URL: https://svnweb.freebsd.org/changeset/base/280782 Log: Add an SCTP symbol which was missed in https://svnweb.freebsd.org/base?view=revision&revision=169622 This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197783 Thanks to Jukka Ukkonen for reporting the bug and providing a fix. MFC after: 3 days Modified: head/lib/libc/net/Symbol.map Modified: head/lib/libc/net/Symbol.map ============================================================================== --- head/lib/libc/net/Symbol.map Sat Mar 28 09:03:54 2015 (r280781) +++ head/lib/libc/net/Symbol.map Sat Mar 28 09:08:57 2015 (r280782) @@ -124,6 +124,7 @@ FBSD_1.0 { in6addr_nodelocal_allnodes; in6addr_linklocal_allnodes; sctp_getaddrlen; + sctp_getassocid; sctp_bindx; sctp_connectx; sctp_peeloff; From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 09:13:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5873F901; Sat, 28 Mar 2015 09:13:43 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (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 D7610942; Sat, 28 Mar 2015 09:13:42 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t2S9Dbsg029481 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sat, 28 Mar 2015 11:13:37 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t2S9Dbsg029481 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t2S9Dau3029480; Sat, 28 Mar 2015 11:13:37 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 28 Mar 2015 11:13:36 +0200 From: Konstantin Belousov To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r280780 - head/sys/amd64/amd64 Message-ID: <20150328091336.GT2379@kib.kiev.ua> References: <201503280902.t2S92K0p013242@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201503280902.t2S92K0p013242@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 09:13:43 -0000 On Sat, Mar 28, 2015 at 09:02:20AM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Mar 28 09:02:19 2015 > New Revision: 280780 > URL: https://svnweb.freebsd.org/changeset/base/280780 > > Log: > The #ss fault handler erronously does not check for the fault > originated from the return to usermode. #ss must be handled same as > #np. Note that this is an omission in r275833. I fixed the wrong gs base for #ss and #np, but failed to note the lack of required check for iretd faulting on the way to usermode for #ss. So this is not a 'security' issue, only the local DoS: kernel excessively panics instead of delivering trap to userspace. From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 10:20:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1A53627; Sat, 28 Mar 2015 10:20:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7308FE94; Sat, 28 Mar 2015 10:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SAKLEA047878; Sat, 28 Mar 2015 10:20:21 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SAKKfg047876; Sat, 28 Mar 2015 10:20:20 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201503281020.t2SAKKfg047876@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Sat, 28 Mar 2015 10:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280783 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 10:20:21 -0000 Author: arybchik Date: Sat Mar 28 10:20:20 2015 New Revision: 280783 URL: https://svnweb.freebsd.org/changeset/base/280783 Log: sfxge: set correct RSS hash type instead of opaque Reviewed by: adrian, gnn Sponsored by: Solarflare Communications, Inc. Differential Revision: https://reviews.freebsd.org/D2124 Modified: head/sys/dev/sfxge/sfxge_rx.c head/sys/dev/sfxge/sfxge_version.h Modified: head/sys/dev/sfxge/sfxge_rx.c ============================================================================== --- head/sys/dev/sfxge/sfxge_rx.c Sat Mar 28 09:08:57 2015 (r280782) +++ head/sys/dev/sfxge/sfxge_rx.c Sat Mar 28 10:20:20 2015 (r280783) @@ -330,11 +330,16 @@ sfxge_rx_deliver(struct sfxge_softc *sc, if (rx_desc->flags & EFX_CKSUM_TCPUDP) csum_flags |= CSUM_DATA_VALID | CSUM_PSEUDO_HDR; - /* The hash covers a 4-tuple for TCP only */ - if (rx_desc->flags & EFX_PKT_TCP) { + if (rx_desc->flags & (EFX_PKT_IPV4 | EFX_PKT_IPV6)) { m->m_pkthdr.flowid = EFX_RX_HASH_VALUE(EFX_RX_HASHALG_TOEPLITZ, mtod(m, uint8_t *)); - M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + /* The hash covers a 4-tuple for TCP only */ + M_HASHTYPE_SET(m, + (rx_desc->flags & EFX_PKT_IPV4) ? + ((rx_desc->flags & EFX_PKT_TCP) ? + M_HASHTYPE_RSS_TCP_IPV4 : M_HASHTYPE_RSS_IPV4) : + ((rx_desc->flags & EFX_PKT_TCP) ? + M_HASHTYPE_RSS_TCP_IPV6 : M_HASHTYPE_RSS_IPV6)); } m->m_data += sc->rx_prefix_size; m->m_len = rx_desc->size - sc->rx_prefix_size; @@ -385,7 +390,9 @@ sfxge_lro_deliver(struct sfxge_lro_state } m->m_pkthdr.flowid = c->conn_hash; - M_HASHTYPE_SET(m, M_HASHTYPE_OPAQUE); + M_HASHTYPE_SET(m, + SFXGE_LRO_CONN_IS_TCPIPV4(c) ? + M_HASHTYPE_RSS_TCP_IPV4 : M_HASHTYPE_RSS_TCP_IPV6); m->m_pkthdr.csum_flags = csum_flags; __sfxge_rx_deliver(sc, m); Modified: head/sys/dev/sfxge/sfxge_version.h ============================================================================== --- head/sys/dev/sfxge/sfxge_version.h Sat Mar 28 09:08:57 2015 (r280782) +++ head/sys/dev/sfxge/sfxge_version.h Sat Mar 28 10:20:20 2015 (r280783) @@ -32,6 +32,6 @@ #ifndef _SFXGE_VERSION_H #define _SFXGE_VERSION_H -#define SFXGE_VERSION_STRING "v3.3.4.6363" +#define SFXGE_VERSION_STRING "v3.3.4.6365" #endif /* _SFXGE_DRIVER_VERSION_H */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 12:23:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96781A82; Sat, 28 Mar 2015 12:23:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81568C86; Sat, 28 Mar 2015 12:23:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SCNGjU009391; Sat, 28 Mar 2015 12:23:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SCNGUc009390; Sat, 28 Mar 2015 12:23:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201503281223.t2SCNGUc009390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 28 Mar 2015 12:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280784 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 12:23:16 -0000 Author: dim Date: Sat Mar 28 12:23:15 2015 New Revision: 280784 URL: https://svnweb.freebsd.org/changeset/base/280784 Log: Re-enable using -mllvm -enable-load-pre=false in CLANG_OPT_SMALL for clang versions before 3.5.0. This should enable building head's version of sys/boot/i386/boot2 on 9.x and 10.x again. Reported by: bz Modified: head/share/mk/bsd.sys.mk Modified: head/share/mk/bsd.sys.mk ============================================================================== --- head/share/mk/bsd.sys.mk Sat Mar 28 10:20:20 2015 (r280783) +++ head/share/mk/bsd.sys.mk Sat Mar 28 12:23:15 2015 (r280784) @@ -131,6 +131,8 @@ CLANG_OPT_SMALL= -mstack-alignment=8 -ml -mllvm -simplifycfg-dup-ret .if ${COMPILER_VERSION} >= 30500 CLANG_OPT_SMALL+= -mllvm -enable-gvn=false +.else +CLANG_OPT_SMALL+= -mllvm -enable-load-pre=false .endif CFLAGS.clang+= -Qunused-arguments .if ${MACHINE_CPUARCH} == "sparc64" From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 12:50:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C8C5F74; Sat, 28 Mar 2015 12:50:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85AB9E97; Sat, 28 Mar 2015 12:50:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SCoQrw020307; Sat, 28 Mar 2015 12:50:26 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SCoOkt020297; Sat, 28 Mar 2015 12:50:24 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201503281250.t2SCoOkt020297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Sat, 28 Mar 2015 12:50:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 12:50:26 -0000 Author: rrs Date: Sat Mar 28 12:50:24 2015 New Revision: 280785 URL: https://svnweb.freebsd.org/changeset/base/280785 Log: Change the callout to supply -1 to indicate we are not changing CPU, also add protection against invalid CPU's as well as split c_flags and c_iflags so that if a user plays with the active flag (the one expected to be played with by callers in MPSAFE) without a lock, it won't adversely affect the callout system by causing a corrupt list. This also means that all callers need to use the macros and *not* play with the falgs directly (like netgraph used to). Differential Revision: htts://reviews.freebsd.org/D1894 Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky tested by hiren and netflix. Sponsored by: Netflix Inc. Modified: head/sys/kern/kern_timeout.c head/sys/netgraph/atm/sscop/ng_sscop_cust.h head/sys/netgraph/atm/uni/ng_uni_cust.h head/sys/sys/_callout.h head/sys/sys/callout.h Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Sat Mar 28 12:23:15 2015 (r280784) +++ head/sys/kern/kern_timeout.c Sat Mar 28 12:50:24 2015 (r280785) @@ -163,6 +163,7 @@ struct callout_cpu { sbintime_t cc_lastscan; void *cc_cookie; u_int cc_bucket; + u_int cc_inited; char cc_ktr_event_name[20]; }; @@ -266,6 +267,7 @@ callout_callwheel_init(void *dummy) * XXX: Clip callout to result of previous function of maxusers * maximum 384. This is still huge, but acceptable. */ + memset(cc_cpu, 0, sizeof(cc_cpu)); ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); @@ -307,6 +309,7 @@ callout_cpu_init(struct callout_cpu *cc, mtx_init(&cc->cc_lock, "callout", NULL, MTX_SPIN | MTX_RECURSE); SLIST_INIT(&cc->cc_callfree); + cc->cc_inited = 1; cc->cc_callwheel = malloc(sizeof(struct callout_list) * callwheelsize, M_CALLOUT, M_WAITOK); for (i = 0; i < callwheelsize; i++) @@ -322,7 +325,7 @@ callout_cpu_init(struct callout_cpu *cc, for (i = 0; i < ncallout; i++) { c = &cc->cc_callout[i]; callout_init(c, 0); - c->c_flags = CALLOUT_LOCAL_ALLOC; + c->c_iflags = CALLOUT_LOCAL_ALLOC; SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle); } } @@ -477,7 +480,7 @@ callout_process(sbintime_t now) * Consumer told us the callout may be run * directly from hardware interrupt context. */ - if (tmp->c_flags & CALLOUT_DIRECT) { + if (tmp->c_iflags & CALLOUT_DIRECT) { #ifdef CALLOUT_PROFILING ++depth_dir; #endif @@ -497,7 +500,7 @@ callout_process(sbintime_t now) LIST_REMOVE(tmp, c_links.le); TAILQ_INSERT_TAIL(&cc->cc_expireq, tmp, c_links.tqe); - tmp->c_flags |= CALLOUT_PROCESSED; + tmp->c_iflags |= CALLOUT_PROCESSED; tmp = tmpn; } continue; @@ -583,8 +586,9 @@ callout_cc_add(struct callout *c, struct if (sbt < cc->cc_lastscan) sbt = cc->cc_lastscan; c->c_arg = arg; - c->c_flags |= (CALLOUT_ACTIVE | CALLOUT_PENDING); - c->c_flags &= ~CALLOUT_PROCESSED; + c->c_iflags |= CALLOUT_PENDING; + c->c_iflags &= ~CALLOUT_PROCESSED; + c->c_flags |= CALLOUT_ACTIVE; c->c_func = func; c->c_time = sbt; c->c_precision = precision; @@ -614,7 +618,7 @@ static void callout_cc_del(struct callout *c, struct callout_cpu *cc) { - if ((c->c_flags & CALLOUT_LOCAL_ALLOC) == 0) + if ((c->c_iflags & CALLOUT_LOCAL_ALLOC) == 0) return; c->c_func = NULL; SLIST_INSERT_HEAD(&cc->cc_callfree, c, c_links.sle); @@ -633,7 +637,7 @@ softclock_call_cc(struct callout *c, str struct lock_class *class; struct lock_object *c_lock; uintptr_t lock_status; - int c_flags; + int c_iflags; #ifdef SMP struct callout_cpu *new_cc; void (*new_func)(void *); @@ -648,9 +652,10 @@ softclock_call_cc(struct callout *c, str static timeout_t *lastfunc; #endif - KASSERT((c->c_flags & (CALLOUT_PENDING | CALLOUT_ACTIVE)) == - (CALLOUT_PENDING | CALLOUT_ACTIVE), - ("softclock_call_cc: pend|act %p %x", c, c->c_flags)); + KASSERT((c->c_iflags & CALLOUT_PENDING) == CALLOUT_PENDING, + ("softclock_call_cc: pend %p %x", c, c->c_iflags)); + KASSERT((c->c_flags & CALLOUT_ACTIVE) == CALLOUT_ACTIVE, + ("softclock_call_cc: act %p %x", c, c->c_flags)); class = (c->c_lock != NULL) ? LOCK_CLASS(c->c_lock) : NULL; lock_status = 0; if (c->c_flags & CALLOUT_SHAREDLOCK) { @@ -662,11 +667,11 @@ softclock_call_cc(struct callout *c, str c_lock = c->c_lock; c_func = c->c_func; c_arg = c->c_arg; - c_flags = c->c_flags; - if (c->c_flags & CALLOUT_LOCAL_ALLOC) - c->c_flags = CALLOUT_LOCAL_ALLOC; + c_iflags = c->c_iflags; + if (c->c_iflags & CALLOUT_LOCAL_ALLOC) + c->c_iflags = CALLOUT_LOCAL_ALLOC; else - c->c_flags &= ~CALLOUT_PENDING; + c->c_iflags &= ~CALLOUT_PENDING; cc_exec_curr(cc, direct) = c; cc_exec_cancel(cc, direct) = false; @@ -729,7 +734,7 @@ softclock_call_cc(struct callout *c, str #endif KTR_STATE0(KTR_SCHED, "callout", cc->cc_ktr_event_name, "idle"); CTR1(KTR_CALLOUT, "callout %p finished", c); - if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) + if ((c_iflags & CALLOUT_RETURNUNLOCKED) == 0) class->lc_unlock(c_lock); skip: CC_LOCK(cc); @@ -749,14 +754,14 @@ skip: * It should be assert here that the callout is not * destroyed but that is not easy. */ - c->c_flags &= ~CALLOUT_DFRMIGRATION; + c->c_iflags &= ~CALLOUT_DFRMIGRATION; } cc_exec_waiting(cc, direct) = false; CC_UNLOCK(cc); wakeup(&cc_exec_waiting(cc, direct)); CC_LOCK(cc); } else if (cc_cce_migrating(cc, direct)) { - KASSERT((c_flags & CALLOUT_LOCAL_ALLOC) == 0, + KASSERT((c_iflags & CALLOUT_LOCAL_ALLOC) == 0, ("Migrating legacy callout %p", c)); #ifdef SMP /* @@ -783,7 +788,7 @@ skip: callout_cc_del(c, cc); return; } - c->c_flags &= ~CALLOUT_DFRMIGRATION; + c->c_iflags &= ~CALLOUT_DFRMIGRATION; new_cc = callout_cpu_switch(c, cc, new_cpu); flags = (direct) ? C_DIRECT_EXEC : 0; @@ -799,14 +804,14 @@ skip: * If the current callout is locally allocated (from * timeout(9)) then put it on the freelist. * - * Note: we need to check the cached copy of c_flags because + * Note: we need to check the cached copy of c_iflags because * if it was not local, then it's not safe to deref the * callout pointer. */ - KASSERT((c_flags & CALLOUT_LOCAL_ALLOC) == 0 || - c->c_flags == CALLOUT_LOCAL_ALLOC, + KASSERT((c_iflags & CALLOUT_LOCAL_ALLOC) == 0 || + c->c_iflags == CALLOUT_LOCAL_ALLOC, ("corrupted callout")); - if (c_flags & CALLOUT_LOCAL_ALLOC) + if (c_iflags & CALLOUT_LOCAL_ALLOC) callout_cc_del(c, cc); } @@ -943,8 +948,16 @@ callout_reset_sbt_on(struct callout *c, sbintime_t to_sbt, pr; struct callout_cpu *cc; int cancelled, direct; + int ignore_cpu=0; cancelled = 0; + if (cpu == -1) { + ignore_cpu = 1; + } else if ((cpu >= MAXCPU) || + (cc_cpu[cpu].cc_inited == 0)) { + /* Invalid CPU spec */ + panic("Invalid CPU in callout %d", cpu); + } if (flags & C_ABSOLUTE) { to_sbt = sbt; } else { @@ -986,24 +999,29 @@ callout_reset_sbt_on(struct callout *c, if (pr > precision) precision = pr; } - /* - * Don't allow migration of pre-allocated callouts lest they - * become unbalanced. - */ - if (c->c_flags & CALLOUT_LOCAL_ALLOC) - cpu = c->c_cpu; /* * This flag used to be added by callout_cc_add, but the * first time you call this we could end up with the * wrong direct flag if we don't do it before we add. */ if (flags & C_DIRECT_EXEC) { - c->c_flags |= CALLOUT_DIRECT; + direct = 1; + } else { + direct = 0; } - direct = (c->c_flags & CALLOUT_DIRECT) != 0; KASSERT(!direct || c->c_lock == NULL, ("%s: direct callout %p has lock", __func__, c)); cc = callout_lock(c); + /* + * Don't allow migration of pre-allocated callouts lest they + * become unbalanced or handle the case where the user does + * not care. + */ + if ((c->c_iflags & CALLOUT_LOCAL_ALLOC) || + ignore_cpu) { + cpu = c->c_cpu; + } + if (cc_exec_curr(cc, direct) == c) { /* * We're being asked to reschedule a callout which is @@ -1043,15 +1061,17 @@ callout_reset_sbt_on(struct callout *c, } #endif } - if (c->c_flags & CALLOUT_PENDING) { - if ((c->c_flags & CALLOUT_PROCESSED) == 0) { + if (c->c_iflags & CALLOUT_PENDING) { + if ((c->c_iflags & CALLOUT_PROCESSED) == 0) { if (cc_exec_next(cc) == c) cc_exec_next(cc) = LIST_NEXT(c, c_links.le); LIST_REMOVE(c, c_links.le); - } else + } else { TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe); + } cancelled = 1; - c->c_flags &= ~(CALLOUT_ACTIVE | CALLOUT_PENDING); + c->c_iflags &= ~ CALLOUT_PENDING; + c->c_flags &= ~ CALLOUT_ACTIVE; } #ifdef SMP @@ -1083,7 +1103,8 @@ callout_reset_sbt_on(struct callout *c, cc_migration_prec(cc, direct) = precision; cc_migration_func(cc, direct) = ftn; cc_migration_arg(cc, direct) = arg; - c->c_flags |= (CALLOUT_DFRMIGRATION | CALLOUT_ACTIVE | CALLOUT_PENDING); + c->c_iflags |= (CALLOUT_DFRMIGRATION | CALLOUT_PENDING); + c->c_flags |= CALLOUT_ACTIVE; CTR6(KTR_CALLOUT, "migration of %p func %p arg %p in %d.%08x to %u deferred", c, c->c_func, c->c_arg, (int)(to_sbt >> 32), @@ -1145,14 +1166,19 @@ _callout_stop_safe(struct callout *c, in } } else use_lock = 0; - direct = (c->c_flags & CALLOUT_DIRECT) != 0; + if (c->c_iflags & CALLOUT_DIRECT) { + direct = 1; + } else { + direct = 0; + } sq_locked = 0; old_cc = NULL; again: cc = callout_lock(c); - if ((c->c_flags & (CALLOUT_DFRMIGRATION | CALLOUT_ACTIVE | CALLOUT_PENDING)) == - (CALLOUT_DFRMIGRATION | CALLOUT_ACTIVE | CALLOUT_PENDING)) { + if ((c->c_iflags & (CALLOUT_DFRMIGRATION | CALLOUT_PENDING)) == + (CALLOUT_DFRMIGRATION | CALLOUT_PENDING) && + ((c->c_flags & CALLOUT_ACTIVE) == CALLOUT_ACTIVE)) { /* * Special case where this slipped in while we * were migrating *as* the callout is about to @@ -1165,7 +1191,8 @@ again: * on one yet). When the callout wheel runs, * it will ignore this callout. */ - c->c_flags &= ~(CALLOUT_PENDING|CALLOUT_ACTIVE); + c->c_iflags &= ~CALLOUT_PENDING; + c->c_flags &= ~CALLOUT_ACTIVE; not_on_a_list = 1; } else { not_on_a_list = 0; @@ -1193,7 +1220,7 @@ again: * don't attempt to remove it from the queue. We can try to * stop it by other means however. */ - if (!(c->c_flags & CALLOUT_PENDING)) { + if (!(c->c_iflags & CALLOUT_PENDING)) { c->c_flags &= ~CALLOUT_ACTIVE; /* @@ -1281,6 +1308,16 @@ again: c, c->c_func, c->c_arg); KASSERT(!cc_cce_migrating(cc, direct), ("callout wrongly scheduled for migration")); + if (callout_migrating(c)) { + c->c_iflags &= ~CALLOUT_DFRMIGRATION; +#ifdef SMP + cc_migration_cpu(cc, direct) = CPUBLOCK; + cc_migration_time(cc, direct) = 0; + cc_migration_prec(cc, direct) = 0; + cc_migration_func(cc, direct) = NULL; + cc_migration_arg(cc, direct) = NULL; +#endif + } CC_UNLOCK(cc); KASSERT(!sq_locked, ("sleepqueue chain locked")); return (1); @@ -1293,7 +1330,7 @@ again: * but we can't stop the one thats running so * we return 0. */ - c->c_flags &= ~CALLOUT_DFRMIGRATION; + c->c_iflags &= ~CALLOUT_DFRMIGRATION; #ifdef SMP /* * We can't call cc_cce_cleanup here since @@ -1322,17 +1359,19 @@ again: if (sq_locked) sleepq_release(&cc_exec_waiting(cc, direct)); - c->c_flags &= ~(CALLOUT_ACTIVE | CALLOUT_PENDING); + c->c_iflags &= ~CALLOUT_PENDING; + c->c_flags &= ~CALLOUT_ACTIVE; CTR3(KTR_CALLOUT, "cancelled %p func %p arg %p", c, c->c_func, c->c_arg); if (not_on_a_list == 0) { - if ((c->c_flags & CALLOUT_PROCESSED) == 0) { + if ((c->c_iflags & CALLOUT_PROCESSED) == 0) { if (cc_exec_next(cc) == c) cc_exec_next(cc) = LIST_NEXT(c, c_links.le); LIST_REMOVE(c, c_links.le); - } else + } else { TAILQ_REMOVE(&cc->cc_expireq, c, c_links.tqe); + } } callout_cc_del(c, cc); CC_UNLOCK(cc); @@ -1345,10 +1384,10 @@ callout_init(struct callout *c, int mpsa bzero(c, sizeof *c); if (mpsafe) { c->c_lock = NULL; - c->c_flags = CALLOUT_RETURNUNLOCKED; + c->c_iflags = CALLOUT_RETURNUNLOCKED; } else { c->c_lock = &Giant.lock_object; - c->c_flags = 0; + c->c_iflags = 0; } c->c_cpu = timeout_cpu; } @@ -1365,7 +1404,7 @@ _callout_init_lock(struct callout *c, st KASSERT(lock == NULL || !(LOCK_CLASS(lock)->lc_flags & (LC_SPINLOCK | LC_SLEEPABLE)), ("%s: invalid lock class", __func__)); - c->c_flags = flags & (CALLOUT_RETURNUNLOCKED | CALLOUT_SHAREDLOCK); + c->c_iflags = flags & (CALLOUT_RETURNUNLOCKED | CALLOUT_SHAREDLOCK); c->c_cpu = timeout_cpu; } Modified: head/sys/netgraph/atm/sscop/ng_sscop_cust.h ============================================================================== --- head/sys/netgraph/atm/sscop/ng_sscop_cust.h Sat Mar 28 12:23:15 2015 (r280784) +++ head/sys/netgraph/atm/sscop/ng_sscop_cust.h Sat Mar 28 12:50:24 2015 (r280785) @@ -115,7 +115,7 @@ typedef struct callout sscop_timer_t; ng_callout(&(S)->t_##T, (S)->aarg, NULL, \ hz * (S)->timer##T / 1000, T##_func, (S), 0); \ } while (0) -#define TIMER_ISACT(S, T) ((S)->t_##T.c_flags & (CALLOUT_PENDING)) +#define TIMER_ISACT(S, T) (callout_pending(&(S)->t_##T)) /* * This assumes, that the user argument is the node pointer. Modified: head/sys/netgraph/atm/uni/ng_uni_cust.h ============================================================================== --- head/sys/netgraph/atm/uni/ng_uni_cust.h Sat Mar 28 12:23:15 2015 (r280784) +++ head/sys/netgraph/atm/uni/ng_uni_cust.h Sat Mar 28 12:50:24 2015 (r280785) @@ -87,8 +87,8 @@ struct uni_timer { #define _TIMER_STOP(UNI,FIELD) do { \ ng_uncallout(&FIELD.c, (UNI)->arg); \ } while (0) -#define TIMER_ISACT(UNI,T) ((UNI)->T.c.c_flags & (CALLOUT_ACTIVE | \ - CALLOUT_PENDING)) +#define TIMER_ISACT(UNI,T) (callout_active(&(UNI)->T.c) || \ + callout_pending(&(UNI)->T.c)) #define _TIMER_START(UNI,ARG,FIELD,DUE,FUNC) do { \ _TIMER_STOP(UNI, FIELD); \ ng_callout(&FIELD.c, (UNI)->arg, NULL, \ Modified: head/sys/sys/_callout.h ============================================================================== --- head/sys/sys/_callout.h Sat Mar 28 12:23:15 2015 (r280784) +++ head/sys/sys/_callout.h Sat Mar 28 12:50:24 2015 (r280785) @@ -57,7 +57,8 @@ struct callout { void *c_arg; /* function argument */ void (*c_func)(void *); /* function to call */ struct lock_object *c_lock; /* lock to handle */ - int c_flags; /* state of this entry */ + int c_flags; /* User State */ + int c_iflags; /* Internal State */ volatile int c_cpu; /* CPU we're scheduled on */ }; Modified: head/sys/sys/callout.h ============================================================================== --- head/sys/sys/callout.h Sat Mar 28 12:23:15 2015 (r280784) +++ head/sys/sys/callout.h Sat Mar 28 12:50:24 2015 (r280785) @@ -63,8 +63,23 @@ struct callout_handle { }; #ifdef _KERNEL +/* + * Note the flags field is actually *two* fields. The c_flags + * field is the one that caller operations that may, or may not have + * a lock touches i.e. callout_deactivate(). The other, the c_iflags, + * is the internal flags that *must* be kept correct on which the + * callout system depend on i.e. callout_migrating() & callout_pending(), + * these are used internally by the callout system to determine which + * list and other critical internal state. Callers *should not* use the + * c_flags field directly but should use the macros! + * + * If the caller wants to keep the c_flags field sane they + * should init with a mutex *or* if using the older + * mpsafe option, they *must* lock there own lock + * before calling callout_deactivate(). + */ #define callout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) -#define callout_migrating(c) ((c)->c_flags & CALLOUT_DFRMIGRATION) +#define callout_migrating(c) ((c)->c_iflags & CALLOUT_DFRMIGRATION) #define callout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) #define callout_drain(c) _callout_stop_safe(c, 1) void callout_init(struct callout *, int); @@ -78,11 +93,11 @@ void _callout_init_lock(struct callout * #define callout_init_rw(c, rw, flags) \ _callout_init_lock((c), ((rw) != NULL) ? &(rw)->lock_object : \ NULL, (flags)) -#define callout_pending(c) ((c)->c_flags & CALLOUT_PENDING) +#define callout_pending(c) ((c)->c_iflags & CALLOUT_PENDING) int callout_reset_sbt_on(struct callout *, sbintime_t, sbintime_t, void (*)(void *), void *, int, int); #define callout_reset_sbt(c, sbt, pr, fn, arg, flags) \ - callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), (c)->c_cpu, (flags)) + callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), -1, (flags)) #define callout_reset_sbt_curcpu(c, sbt, pr, fn, arg, flags) \ callout_reset_sbt_on((c), (sbt), (pr), (fn), (arg), PCPU_GET(cpuid),\ (flags)) @@ -90,14 +105,14 @@ int callout_reset_sbt_on(struct callout callout_reset_sbt_on((c), tick_sbt * (to_ticks), 0, (fn), (arg), \ (cpu), C_HARDCLOCK) #define callout_reset(c, on_tick, fn, arg) \ - callout_reset_on((c), (on_tick), (fn), (arg), (c)->c_cpu) + callout_reset_on((c), (on_tick), (fn), (arg), -1) #define callout_reset_curcpu(c, on_tick, fn, arg) \ callout_reset_on((c), (on_tick), (fn), (arg), PCPU_GET(cpuid)) #define callout_schedule_sbt_on(c, sbt, pr, cpu, flags) \ callout_reset_sbt_on((c), (sbt), (pr), (c)->c_func, (c)->c_arg, \ (cpu), (flags)) #define callout_schedule_sbt(c, sbt, pr, flags) \ - callout_schedule_sbt_on((c), (sbt), (pr), (c)->c_cpu, (flags)) + callout_schedule_sbt_on((c), (sbt), (pr), -1, (flags)) #define callout_schedule_sbt_curcpu(c, sbt, pr, flags) \ callout_schedule_sbt_on((c), (sbt), (pr), PCPU_GET(cpuid), (flags)) int callout_schedule(struct callout *, int); From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 13:33:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56636647; Sat, 28 Mar 2015 13:33:48 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0747C340; Sat, 28 Mar 2015 13:33:47 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 5508825D3A98; Sat, 28 Mar 2015 13:33:37 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 6A127C77058; Sat, 28 Mar 2015 13:33:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id DXHnYV_6Q3N4; Sat, 28 Mar 2015 13:33:34 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3] (unknown [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B4880C7700C; Sat, 28 Mar 2015 13:33:32 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: "Bjoern A. Zeeb" In-Reply-To: <201503281250.t2SCoOkt020297@svn.freebsd.org> Date: Sat, 28 Mar 2015 13:33:00 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <233AB248-B7A0-4A45-AB1B-6807D17C98B6@FreeBSD.org> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> To: Randall Stewart X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 13:33:48 -0000 > On 28 Mar 2015, at 12:50 , Randall Stewart wrote: >=20 > Author: rrs > Date: Sat Mar 28 12:50:24 2015 > New Revision: 280785 > URL: https://svnweb.freebsd.org/changeset/base/280785 >=20 > Log: > Change the callout to supply -1 to indicate we are not changing > CPU, also add protection against invalid CPU's as well as > split c_flags and c_iflags so that if a user plays with the active > flag (the one expected to be played with by callers in MPSAFE) = without > a lock, it won't adversely affect the callout system by causing a = corrupt > list. This also means that all callers need to use the macros and = *not* > play with the falgs directly (like netgraph used to). >=20 > Differential Revision: htts://reviews.freebsd.org/D1894 > Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky > tested by hiren and netflix. > Sponsored by: Netflix Inc. >=20 > Modified: > head/sys/kern/kern_timeout.c > head/sys/netgraph/atm/sscop/ng_sscop_cust.h > head/sys/netgraph/atm/uni/ng_uni_cust.h > head/sys/sys/_callout.h > head/sys/sys/callout.h I seem mips kernels starting to fail; might also be gcc kernels; = can=E2=80=99t say yet but you should fix this anyway please: /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c: In function = 'callout_callwheel_init': /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c:270: error: = convert_for_assignment: incompatible type for argument 1 of 'memset' /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c: In function = 'callout_reset_sbt_on': /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c:957: error: subscripted = value is neither array nor pointer =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 14:27:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A1F2F09; Sat, 28 Mar 2015 14:27:07 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 196059B1; Sat, 28 Mar 2015 14:27:07 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id CEDC625D3A9B; Sat, 28 Mar 2015 14:27:03 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id C7C62C7707C; Sat, 28 Mar 2015 14:27:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id nE4RHmqVU5NL; Sat, 28 Mar 2015 14:27:01 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3] (unknown [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B7079C7700C; Sat, 28 Mar 2015 14:27:00 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: "Bjoern A. Zeeb" In-Reply-To: <233AB248-B7A0-4A45-AB1B-6807D17C98B6@FreeBSD.org> Date: Sat, 28 Mar 2015 14:26:44 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <8CD30EE9-C338-40E9-ADB6-BE6AB5CE82F4@FreeBSD.org> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <233AB248-B7A0-4A45-AB1B-6807D17C98B6@FreeBSD.org> To: Randall Stewart X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 14:27:07 -0000 > On 28 Mar 2015, at 13:33 , Bjoern A. Zeeb wrote: >=20 >=20 >> On 28 Mar 2015, at 12:50 , Randall Stewart wrote: >>=20 >> Author: rrs >> Date: Sat Mar 28 12:50:24 2015 >> New Revision: 280785 >> URL: https://svnweb.freebsd.org/changeset/base/280785 >>=20 >> Log: >> Change the callout to supply -1 to indicate we are not changing >> CPU, also add protection against invalid CPU's as well as >> split c_flags and c_iflags so that if a user plays with the active >> flag (the one expected to be played with by callers in MPSAFE) = without >> a lock, it won't adversely affect the callout system by causing a = corrupt >> list. This also means that all callers need to use the macros and = *not* >> play with the falgs directly (like netgraph used to). >>=20 >> Differential Revision: htts://reviews.freebsd.org/D1894 >> Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky >> tested by hiren and netflix. >> Sponsored by: Netflix Inc. >>=20 >> Modified: >> head/sys/kern/kern_timeout.c >> head/sys/netgraph/atm/sscop/ng_sscop_cust.h >> head/sys/netgraph/atm/uni/ng_uni_cust.h >> head/sys/sys/_callout.h >> head/sys/sys/callout.h >=20 > I seem mips kernels starting to fail; might also be gcc kernels; = can=E2=80=99t say yet but you should fix this anyway please: >=20 > /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c: In function = 'callout_callwheel_init': > /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c:270: error: = convert_for_assignment: incompatible type for argument 1 of 'memset' > /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c: In function = 'callout_reset_sbt_on': > /scratch/tmp/bz/head.svn/sys/kern/kern_timeout.c:957: error: = subscripted value is neither array nor pointer Ah it=E2=80=99s !SMP it seems which is broken; oh well; looking. =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 15:07:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AF6626F; Sat, 28 Mar 2015 15:07:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8603ADA9; Sat, 28 Mar 2015 15:07:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SF7K0f085538; Sat, 28 Mar 2015 15:07:20 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SF7KfH085537; Sat, 28 Mar 2015 15:07:20 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201503281507.t2SF7KfH085537@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 28 Mar 2015 15:07:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280786 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 15:07:20 -0000 Author: bz Date: Sat Mar 28 15:07:19 2015 New Revision: 280786 URL: https://svnweb.freebsd.org/changeset/base/280786 Log: Try to unbreak !SMP kernels broken in r280785 by using the proper macros to access cc_cpu. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Sat Mar 28 12:50:24 2015 (r280785) +++ head/sys/kern/kern_timeout.c Sat Mar 28 15:07:19 2015 (r280786) @@ -267,7 +267,7 @@ callout_callwheel_init(void *dummy) * XXX: Clip callout to result of previous function of maxusers * maximum 384. This is still huge, but acceptable. */ - memset(cc_cpu, 0, sizeof(cc_cpu)); + memset(CC_CPU(0), 0, sizeof(cc_cpu)); ncallout = imin(16 + maxproc + maxfiles, 18508); TUNABLE_INT_FETCH("kern.ncallout", &ncallout); @@ -954,7 +954,7 @@ callout_reset_sbt_on(struct callout *c, if (cpu == -1) { ignore_cpu = 1; } else if ((cpu >= MAXCPU) || - (cc_cpu[cpu].cc_inited == 0)) { + ((CC_CPU(cpu))->cc_inited == 0)) { /* Invalid CPU spec */ panic("Invalid CPU in callout %d", cpu); } From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 16:06:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6B802F2; Sat, 28 Mar 2015 16:06:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D14503F7; Sat, 28 Mar 2015 16:06:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SG6lZO015539; Sat, 28 Mar 2015 16:06:47 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SG6lNP015538; Sat, 28 Mar 2015 16:06:47 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503281606.t2SG6lNP015538@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sat, 28 Mar 2015 16:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280787 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 16:06:48 -0000 Author: glebius Date: Sat Mar 28 16:06:46 2015 New Revision: 280787 URL: https://svnweb.freebsd.org/changeset/base/280787 Log: Initialize random IP ID engine via SYSINIT() instead of doing that on first packet. This allow to use M_WAITOK and cut down some error handling. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_id.c Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Sat Mar 28 15:07:19 2015 (r280786) +++ head/sys/netinet/ip_id.c Sat Mar 28 16:06:46 2015 (r280787) @@ -91,18 +91,17 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); -static u_int16_t *id_array = NULL; -static bitstr_t *id_bits = NULL; -static int array_ptr = 0; -static int array_size = 8192; -static int random_id_collisions = 0; -static int random_id_total = 0; +static uint16_t *id_array; +static bitstr_t *id_bits; +static int array_ptr; +static int array_size; +static int random_id_collisions; +static int random_id_total; static struct mtx ip_id_mtx; -static void ip_initid(void); +static void ip_initid(int); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS); - -MTX_SYSINIT(ip_id_mtx, &ip_id_mtx, "ip_id_mtx", MTX_DEF); +static void ip_sysinitid(void); SYSCTL_DECL(_net_inet_ip); SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, CTLTYPE_INT|CTLFLAG_RW, @@ -120,73 +119,44 @@ sysctl_ip_id_change(SYSCTL_HANDLER_ARGS) new = array_size; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { - if (new >= 512 && new <= 32768) { - mtx_lock(&ip_id_mtx); - array_size = new; - ip_initid(); - mtx_unlock(&ip_id_mtx); - } else + if (new >= 512 && new <= 32768) + ip_initid(new); + else error = EINVAL; } return (error); } -/* - * ip_initid() runs with a mutex held and may execute in a network context. - * As a result, it uses M_NOWAIT. Ideally, we would always do this - * allocation from the sysctl contact and have it be an invariant that if - * this random ID allocation mode is selected, the buffers are present. This - * would also avoid potential network context failures of IP ID generation. - */ static void -ip_initid(void) +ip_initid(int new_size) { + uint16_t *new_array; + bitstr_t *new_bits; - mtx_assert(&ip_id_mtx, MA_OWNED); + new_array = malloc(new_size * sizeof(uint16_t), M_IPID, + M_WAITOK | M_ZERO); + new_bits = malloc(bitstr_size(65536), M_IPID, M_WAITOK | M_ZERO); + mtx_lock(&ip_id_mtx); if (id_array != NULL) { free(id_array, M_IPID); free(id_bits, M_IPID); } + id_array = new_array; + id_bits = new_bits; + array_size = new_size; + array_ptr = 0; random_id_collisions = 0; random_id_total = 0; - array_ptr = 0; - id_array = (u_int16_t *) malloc(array_size * sizeof(u_int16_t), - M_IPID, M_NOWAIT | M_ZERO); - id_bits = (bitstr_t *) malloc(bitstr_size(65536), M_IPID, - M_NOWAIT | M_ZERO); - if (id_array == NULL || id_bits == NULL) { - /* Neither or both. */ - if (id_array != NULL) { - free(id_array, M_IPID); - id_array = NULL; - } - if (id_bits != NULL) { - free(id_bits, M_IPID); - id_bits = NULL; - } - } + mtx_unlock(&ip_id_mtx); } -u_int16_t +uint16_t ip_randomid(void) { - u_int16_t new_id; + uint16_t new_id; mtx_lock(&ip_id_mtx); - if (id_array == NULL) - ip_initid(); - - /* - * Fail gracefully; return a fixed id if memory allocation failed; - * ideally we wouldn't do allocation in this context in order to - * avoid the possibility of this failure mode. - */ - if (id_array == NULL) { - mtx_unlock(&ip_id_mtx); - return (1); - } - /* * To avoid a conflict with the zeros that the array is initially * filled with, we never hand out an id of zero. @@ -207,3 +177,12 @@ ip_randomid(void) mtx_unlock(&ip_id_mtx); return (new_id); } + +static void +ip_sysinitid(void) +{ + + mtx_init(&ip_id_mtx, "ip_id_mtx", NULL, MTX_DEF); + ip_initid(8192); +} +SYSINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ip_sysinitid, NULL); From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 16:59:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25593F6E; Sat, 28 Mar 2015 16:59:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 076CEA7C; Sat, 28 Mar 2015 16:59:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SGxw9S039530; Sat, 28 Mar 2015 16:59:58 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SGxwXf039529; Sat, 28 Mar 2015 16:59:58 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201503281659.t2SGxwXf039529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Sat, 28 Mar 2015 16:59:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280788 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 16:59:59 -0000 Author: glebius Date: Sat Mar 28 16:59:57 2015 New Revision: 280788 URL: https://svnweb.freebsd.org/changeset/base/280788 Log: VNETalize random IP ID engine. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_id.c Modified: head/sys/netinet/ip_id.c ============================================================================== --- head/sys/netinet/ip_id.c Sat Mar 28 16:06:46 2015 (r280787) +++ head/sys/netinet/ip_id.c Sat Mar 28 16:59:57 2015 (r280788) @@ -85,38 +85,51 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include + +#include + #include #include -#include static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); -static uint16_t *id_array; -static bitstr_t *id_bits; -static int array_ptr; -static int array_size; -static int random_id_collisions; -static int random_id_total; -static struct mtx ip_id_mtx; +static VNET_DEFINE(uint16_t *, id_array); +static VNET_DEFINE(bitstr_t *, id_bits); +static VNET_DEFINE(int, array_ptr); +static VNET_DEFINE(int, array_size); +static VNET_DEFINE(int, random_id_collisions); +static VNET_DEFINE(int, random_id_total); +static VNET_DEFINE(struct mtx, ip_id_mtx); +#define V_id_array VNET(id_array) +#define V_id_bits VNET(id_bits) +#define V_array_ptr VNET(array_ptr) +#define V_array_size VNET(array_size) +#define V_random_id_collisions VNET(random_id_collisions) +#define V_random_id_total VNET(random_id_total) +#define V_ip_id_mtx VNET(ip_id_mtx) static void ip_initid(int); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS); -static void ip_sysinitid(void); +static void ipid_sysinit(void); +static void ipid_sysuninit(void); SYSCTL_DECL(_net_inet_ip); -SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, CTLTYPE_INT|CTLFLAG_RW, - &array_size, 0, sysctl_ip_id_change, "IU", "IP ID Array size"); -SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id_collisions, CTLFLAG_RD, - &random_id_collisions, 0, "Count of IP ID collisions"); -SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id_total, CTLFLAG_RD, - &random_id_total, 0, "Count of IP IDs created"); +SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_VNET, + &VNET_NAME(array_size), 0, sysctl_ip_id_change, "IU", "IP ID Array size"); +SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id_collisions, + CTLFLAG_RD | CTLFLAG_VNET, + &VNET_NAME(random_id_collisions), 0, "Count of IP ID collisions"); +SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id_total, CTLFLAG_RD | CTLFLAG_VNET, + &VNET_NAME(random_id_total), 0, "Count of IP IDs created"); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS) { int error, new; - new = array_size; + new = V_array_size; error = sysctl_handle_int(oidp, &new, 0, req); if (error == 0 && req->newptr) { if (new >= 512 && new <= 32768) @@ -137,18 +150,18 @@ ip_initid(int new_size) M_WAITOK | M_ZERO); new_bits = malloc(bitstr_size(65536), M_IPID, M_WAITOK | M_ZERO); - mtx_lock(&ip_id_mtx); - if (id_array != NULL) { - free(id_array, M_IPID); - free(id_bits, M_IPID); + mtx_lock(&V_ip_id_mtx); + if (V_id_array != NULL) { + free(V_id_array, M_IPID); + free(V_id_bits, M_IPID); } - id_array = new_array; - id_bits = new_bits; - array_size = new_size; - array_ptr = 0; - random_id_collisions = 0; - random_id_total = 0; - mtx_unlock(&ip_id_mtx); + V_id_array = new_array; + V_id_bits = new_bits; + V_array_size = new_size; + V_array_ptr = 0; + V_random_id_collisions = 0; + V_random_id_total = 0; + mtx_unlock(&V_ip_id_mtx); } uint16_t @@ -156,7 +169,7 @@ ip_randomid(void) { uint16_t new_id; - mtx_lock(&ip_id_mtx); + mtx_lock(&V_ip_id_mtx); /* * To avoid a conflict with the zeros that the array is initially * filled with, we never hand out an id of zero. @@ -164,25 +177,35 @@ ip_randomid(void) new_id = 0; do { if (new_id != 0) - random_id_collisions++; + V_random_id_collisions++; arc4rand(&new_id, sizeof(new_id), 0); - } while (bit_test(id_bits, new_id) || new_id == 0); - bit_clear(id_bits, id_array[array_ptr]); - bit_set(id_bits, new_id); - id_array[array_ptr] = new_id; - array_ptr++; - if (array_ptr == array_size) - array_ptr = 0; - random_id_total++; - mtx_unlock(&ip_id_mtx); + } while (bit_test(V_id_bits, new_id) || new_id == 0); + bit_clear(V_id_bits, V_id_array[V_array_ptr]); + bit_set(V_id_bits, new_id); + V_id_array[V_array_ptr] = new_id; + V_array_ptr++; + if (V_array_ptr == V_array_size) + V_array_ptr = 0; + V_random_id_total++; + mtx_unlock(&V_ip_id_mtx); return (new_id); } static void -ip_sysinitid(void) +ipid_sysinit(void) { - mtx_init(&ip_id_mtx, "ip_id_mtx", NULL, MTX_DEF); + mtx_init(&V_ip_id_mtx, "ip_id_mtx", NULL, MTX_DEF); ip_initid(8192); } -SYSINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ip_sysinitid, NULL); +VNET_SYSINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipid_sysinit, NULL); + +static void +ipid_sysuninit(void) +{ + + mtx_destroy(&V_ip_id_mtx); + free(V_id_array, M_IPID); + free(V_id_bits, M_IPID); +} +VNET_SYSUNINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipid_sysuninit, NULL); From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 17:23:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF5B08F8; Sat, 28 Mar 2015 17:23:20 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AEAF1D40; Sat, 28 Mar 2015 17:23:20 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t2SHNDux038563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Mar 2015 10:23:13 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t2SHNDRw038562; Sat, 28 Mar 2015 10:23:13 -0700 (PDT) (envelope-from jmg) Date: Sat, 28 Mar 2015 10:23:13 -0700 From: John-Mark Gurney To: Gleb Smirnoff Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150328172313.GC51048@funkthat.com> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150328083443.GV64665@FreeBSD.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 28 Mar 2015 10:23:13 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 17:23:21 -0000 Gleb Smirnoff wrote this message on Sat, Mar 28, 2015 at 11:34 +0300: > On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote: > F> Author: fabient > F> Date: Fri Mar 27 13:26:59 2015 > F> New Revision: 280759 > F> URL: https://svnweb.freebsd.org/changeset/base/280759 > F> > F> Log: > F> On multi CPU systems, we may emit successive packets with the same id. > F> Fix the race by using an atomic operation. > F> > F> Differential Revision: https://reviews.freebsd.org/D2141 > F> Obtained from: emeric.poupon@stormshield.eu > F> MFC after: 1 week > F> Sponsored by: Stormshield > > The D2141 says that benchmarking were done in presence of IPSEC, which > of course is the bottleneck and performance of this instruction can't > be benchmarked in its presence. Anyway, I believe that results of > right benchmark would still show little difference between atomic and > non-atomic increment of a shared value. > > I think we can use per-cpu ID counters, each CPU incrementing its > own. If we start with random values, then probability of two packets with > the same ID emitting at the allowed timeframe will be acceptably small. Please do not use per-cpu id counters.. That will just push the duplicate ids to being more rare, but just as much of a problem... Please read: https://tools.ietf.org/html/rfc6864 And then implement one hased upon source/dest/protocol... Thanks. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 17:29:15 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98B1FAAD for ; Sat, 28 Mar 2015 17:29:15 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 7671DD77 for ; Sat, 28 Mar 2015 17:29:15 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SHTFZF067992 for ; Sat, 28 Mar 2015 17:29:15 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2SHTFFY067990 for svn-src-all@FreeBSD.org; Sat, 28 Mar 2015 17:29:15 GMT (envelope-from bdrewery) Received: (qmail 23948 invoked from network); 28 Mar 2015 12:29:05 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 28 Mar 2015 12:29:05 -0500 Message-ID: <5516E4EA.60201@FreeBSD.org> Date: Sat, 28 Mar 2015 12:29:14 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Don Lewis , alc@FreeBSD.org Subject: Re: svn commit: r280327 - in head/sys: kern vm References: <201503280241.t2S2fWcQ078499@gw.catspoiler.org> In-Reply-To: <201503280241.t2S2fWcQ078499@gw.catspoiler.org> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9U3ngmVQRHrRd1wngbqhuv8MgLOFQaHQi" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, clusteradm@FreeBSD.org, portmgr@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 17:29:15 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9U3ngmVQRHrRd1wngbqhuv8MgLOFQaHQi Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/27/2015 9:41 PM, Don Lewis wrote: > On 21 Mar, Alan Cox wrote: >> Author: alc >> Date: Sat Mar 21 17:56:55 2015 >> New Revision: 280327 >> URL: https://svnweb.freebsd.org/changeset/base/280327 >> >> Log: >> Introduce vm_object_color() and use it in mmap(2) to set the color o= f >> named objects to zero before the virtual address is selected. Previ= ously, >> the color setting was delayed until after the virtual address was >> selected. In rtld, this delay effectively prevented the mapping of = a >> shared library's code section using superpages. Now, for example, w= e see >> the first 1 MB of libc's code on armv6 mapped by a superpage after w= e've >> gotten through the initial cold misses that bring the first 1 MB of = code >> into memory. (With the page clustering that we perform on read faul= ts, >> this happens quickly.) >> =20 >> Differential Revision: https://reviews.freebsd.org/D2013 >> Reviewed by: jhb, kib >> Tested by: Svatopluk Kraus (armv6) >> MFC after: 6 weeks >> >> Modified: >> head/sys/kern/kern_exec.c >> head/sys/vm/vm_fault.c >> head/sys/vm/vm_mmap.c >> head/sys/vm/vm_object.h >> head/sys/vm/vnode_pager.c >=20 > This change appears to have partially broken package building. >=20 > I recently set up a package building machine running 11.0-CURRENT > r280642 and found that it was unable to build openjdk7 packages inside > FreeBSD 8.4 and 9.3 poudriere jails, for both i386 and amd64. >=20 > [snip] > Compiling ../generated/adfiles/ad_x86_64_gen.cpp > rm -f ad_x86_64_gen.o > c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr= /ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/u= sr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/p= orts/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs= /usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../gene= rated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET=3D= "\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\"am= d64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector -fn= o-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_= MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -= DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! > -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMI= LY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_= x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -= DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pip= e -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-frame= -pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compare= -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_forma= t.o.d -o ad_x86_64_format.o ../generated/adfiles/ad_x86_64_format.cpp=20 > c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr= /ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/u= sr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/p= orts/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs= /usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../gene= rated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET=3D= "\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\"am= d64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector -fn= o-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_= MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -= DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! > -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMI= LY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_= x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -= DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pip= e -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-frame= -pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compare= -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_gen.o= =2Ed -o ad_x86_64_gen.o ../generated/adfiles/ad_x86_64_gen.cpp=20 > Compiling ../generated/adfiles/ad_x86_64_misc.cpp > rm -f ad_x86_64_misc.o > c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr= /ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/u= sr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/p= orts/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs= /usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wr= kdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../gene= rated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET=3D= "\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\"am= d64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector -fn= o-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_= MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -= DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! > -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMI= LY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_= x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -= DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pip= e -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-frame= -pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compare= -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_misc.= o.d -o ad_x86_64_misc.o ../generated/adfiles/ad_x86_64_misc.cpp=20 > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/comp= iler/abstractCompiler.cpp:1: fatal error: had to relocate PCH > compilation terminated. > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/util= ities/accessFlags.cpp:1: fatal error: had to relocate PCH > compilation terminated. > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'abstractCompiler.o' failed > gmake[6]: *** [abstractCompiler.o] Error 1 > gmake[6]: *** Waiting for unfinished jobs.... > ../generated/adfiles/ad_x86_64.cpp:1: fatal error: had to relocate PCH > compilation terminated. Are you using ccache? > ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to relocat= e PCH > compilation terminated. > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'accessFlags.o' failed > gmake[6]: *** [accessFlags.o] Error 1 > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed > gmake[6]: *** [ad_x86_64_clone.o] Error 1 > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'ad_x86_64.o' failed > gmake[6]: *** [ad_x86_64.o] Error 1 > ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to reloca= te PCH > compilation terminated. > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed > gmake[6]: *** [ad_x86_64_expand.o] Error 1 > ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to relocate = PCH > compilation terminated. > ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to relocate= PCH > compilation terminated. > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed > gmake[6]: *** [ad_x86_64_gen.o] Error 1 > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed > gmake[6]: *** [ad_x86_64_misc.o] Error 1 > ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to reloca= te PCH > compilation terminated. > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/rules.make:149: recipe for target 'ad_x86_64_format.o' failed > gmake[6]: *** [ad_x86_64_format.o] Error 1 > gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/open= jdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefile= s/top.make:128: recipe for target 'the_vm' failed > gmake[5]: *** [the_vm] Error 2 > gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/open= jdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' > /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makefile= :292: recipe for target 'product' failed > gmake[4]: *** [product] Error 2 > gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/open= jdk/build/bsd-amd64/hotspot/outputdir' > Makefile:191: recipe for target 'generic_build2' failed > gmake[3]: *** [generic_build2] Error 2 > gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/open= jdk/hotspot/make' > Makefile:151: recipe for target 'product' failed > gmake[2]: *** [product] Error 2 > gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/open= jdk/hotspot/make' > make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed > gmake[1]: *** [hotspot-build] Error 2 > gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/open= jdk' > Makefile:251: recipe for target 'build_product_image' failed > gmake: *** [build_product_image] Error 2 > =3D=3D=3D> Compilation failed unexpectedly. >=20 > I was not seeing this problem on my older package builder running > 10.1-STABLE. Since this problem has not shown up on the FreeBSD packag= e > building cluster, I got suspicious that the change was quite recent. >=20 > This old gcc bug report: > led me to suspec= t > mmap(). >=20 > The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a couple= > of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a > NULL first argument is used. The address that gets returned is stashed= > away and the region is unmapped. Then a later call in > mmap_gt_pch_use_address() passes this saved address to mmap() as a > hint. It expects the mapped region to get mapped to the same base > address. If this does not happen, the above error is the result. I don't know what I'm talking about but that doesn't sound like a very safe assumption for the gcc code to make. >=20 > If I go back to kernel source r280326, which immediately preceeds the > above commit, I am able to successfully build openjdk7. >=20 > I recommend that any machines in the ports cluster being used to build > packages for FreeBSD 8 and 9 avoid upgrading past r280326 until this > issue is resolved. I have not observed any problems building packages > for FreeBSD 10 and 11. >=20 Is it 100% for you before and after? I've seen this error come up randomly where a rebuild will succeed. or fail. --=20 Regards, Bryan Drewery --9U3ngmVQRHrRd1wngbqhuv8MgLOFQaHQi Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVFuTqAAoJEDXXcbtuRpfPzgsIAMif2+GyWXX6xhsK+fWU7PGV yHJWEvIPtF+0V0xMjRaIuB4F5uppZs2Pg2DqRHg4xTejyN7l1W8dTj9KdSlpKf7T /CCV4r/lZLMR+/qYuTS16K5TZ5M4gGO7iSsrcCMnP/YyPDV2D32kle9fLTTi4lb2 oGvjoox9kA4xwHDgq6NeXNXB6snQfVBQDssrUtmYbxuJF5nV8Shs0nW6L9I7qaB0 InON+BE8wWJ69t8bF8EGrbjWJaffYeDcRwXxE4SKNEYYXkqpLcFQCJa2TDD2Fu8j wlb6qTbkO6NZ/p8qet7JpQ15QZ4sHWYlOrvqsrkMtdCjPfNNQe/jjB1u44C+Yl0= =xId4 -----END PGP SIGNATURE----- --9U3ngmVQRHrRd1wngbqhuv8MgLOFQaHQi-- From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 17:46:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5103528; Sat, 28 Mar 2015 17:46:00 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 64932F3A; Sat, 28 Mar 2015 17:46:00 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B2F6D25D37D1; Sat, 28 Mar 2015 17:45:56 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D5E49C77058; Sat, 28 Mar 2015 17:45:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id j_oOoFXc2a_T; Sat, 28 Mar 2015 17:45:54 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3] (unknown [IPv6:fde9:577b:c1a9:4410:b88f:8a06:70f:7ed3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 0BBA7C7700C; Sat, 28 Mar 2015 17:45:52 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280759 - head/sys/netinet From: "Bjoern A. Zeeb" In-Reply-To: <20150328172313.GC51048@funkthat.com> Date: Sat, 28 Mar 2015 17:45:20 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.2070.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 17:46:00 -0000 > On 28 Mar 2015, at 17:23 , John-Mark Gurney wrote: >=20 > Gleb Smirnoff wrote this message on Sat, Mar 28, 2015 at 11:34 +0300: >> On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote: >> F> Author: fabient >> F> Date: Fri Mar 27 13:26:59 2015 >> F> New Revision: 280759 >> F> URL: https://svnweb.freebsd.org/changeset/base/280759 >> F>=20 >> F> Log: >> F> On multi CPU systems, we may emit successive packets with the = same id. >> F> Fix the race by using an atomic operation. >> F> =20 >> F> Differential Revision: https://reviews.freebsd.org/D2141 >> F> Obtained from: emeric.poupon@stormshield.eu >> F> MFC after: 1 week >> F> Sponsored by: Stormshield >>=20 >> The D2141 says that benchmarking were done in presence of IPSEC, = which >> of course is the bottleneck and performance of this instruction can't >> be benchmarked in its presence. Anyway, I believe that results of >> right benchmark would still show little difference between atomic and >> non-atomic increment of a shared value. >>=20 >> I think we can use per-cpu ID counters, each CPU incrementing its >> own. If we start with random values, then probability of two packets = with >> the same ID emitting at the allowed timeframe will be acceptably = small. >=20 > Please do not use per-cpu id counters.. That will just push the > duplicate ids to being more rare, but just as much of a problem... >=20 > Please read: > https://tools.ietf.org/html/rfc6864 >=20 > And then implement one hased upon source/dest/protocol=E2=80=A6 and if someone is interested in reviving this as well (read the old = thread from then on net@) https://people.freebsd.org/~bz/20110313-01-rfc6056.diff =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 17:56:12 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3CB5922; Sat, 28 Mar 2015 17:56:11 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (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 B149F72; Sat, 28 Mar 2015 17:56:10 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id t2SHq0m4018414; Sat, 28 Mar 2015 12:56:03 -0500 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp2.rice.edu with ESMTP id 1tdas4rfy9-1; Sat, 28 Mar 2015 12:56:02 -0500 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id F33164C01FE; Sat, 28 Mar 2015 12:56:01 -0500 (CDT) Message-ID: <5516EB31.7000309@rice.edu> Date: Sat, 28 Mar 2015 12:56:01 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Bryan Drewery , Don Lewis , alc@FreeBSD.org Subject: Re: svn commit: r280327 - in head/sys: kern vm References: <201503280241.t2S2fWcQ078499@gw.catspoiler.org> <5516E4EA.60201@FreeBSD.org> In-Reply-To: <5516E4EA.60201@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=1.8279923352793e-08 kscore.compositescore=4.63935834194018e-10 circleOfTrustscore=0 compositescore=0.605526357678523 suspectscore=3 recipient_domain_to_sender_totalscore=0 phishscore=0 bulkscore=0 kscore.is_spamscore=0 rbsscore=0.605526357678523 recipient_to_sender_totalscore=0 recipient_domain_to_sender_domain_totalscore=0 spamscore=0 recipient_to_sender_domain_totalscore=0 urlsuspectscore=0.0055263576785225 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1503280183 Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, clusteradm@FreeBSD.org, portmgr@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 17:56:12 -0000 On 03/28/2015 12:29, Bryan Drewery wrote: > On 3/27/2015 9:41 PM, Don Lewis wrote: >> On 21 Mar, Alan Cox wrote: >>> Author: alc >>> Date: Sat Mar 21 17:56:55 2015 >>> New Revision: 280327 >>> URL: https://svnweb.freebsd.org/changeset/base/280327 >>> >>> Log: >>> Introduce vm_object_color() and use it in mmap(2) to set the color = of >>> named objects to zero before the virtual address is selected. Prev= iously, >>> the color setting was delayed until after the virtual address was >>> selected. In rtld, this delay effectively prevented the mapping of= a >>> shared library's code section using superpages. Now, for example, = we see >>> the first 1 MB of libc's code on armv6 mapped by a superpage after = we've >>> gotten through the initial cold misses that bring the first 1 MB of= code >>> into memory. (With the page clustering that we perform on read fau= lts, >>> this happens quickly.) >>> =20 >>> Differential Revision: https://reviews.freebsd.org/D2013 >>> Reviewed by: jhb, kib >>> Tested by: Svatopluk Kraus (armv6) >>> MFC after: 6 weeks >>> >>> Modified: >>> head/sys/kern/kern_exec.c >>> head/sys/vm/vm_fault.c >>> head/sys/vm/vm_mmap.c >>> head/sys/vm/vm_object.h >>> head/sys/vm/vnode_pager.c >> This change appears to have partially broken package building. >> >> I recently set up a package building machine running 11.0-CURRENT >> r280642 and found that it was unable to build openjdk7 packages inside= >> FreeBSD 8.4 and 9.3 poudriere jails, for both i386 and amd64. >> >> [snip] >> Compiling ../generated/adfiles/ad_x86_64_gen.cpp >> rm -f ad_x86_64_gen.o >> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/us= r/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/= usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/= ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdir= s/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/w= rkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../gen= erated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET= =3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\= "amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector = -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_AR= CH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_6= 4 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! >> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAM= ILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd= _x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 = -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pi= pe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fram= e-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compar= e -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_form= at.o.d -o ad_x86_64_format.o ../generated/adfiles/ad_x86_64_format.cpp=20 >> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/us= r/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/= usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/= ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdir= s/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/w= rkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../gen= erated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET= =3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\= "amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector = -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_AR= CH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_6= 4 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! >> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAM= ILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd= _x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 = -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pi= pe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fram= e-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compar= e -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_gen.= o.d -o ad_x86_64_gen.o ../generated/adfiles/ad_x86_64_gen.cpp=20 >> Compiling ../generated/adfiles/ad_x86_64_misc.cpp >> rm -f ad_x86_64_misc.o >> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/us= r/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/= usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/= ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdir= s/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/w= rkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkd= irs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../gen= erated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET= =3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D\= "amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector = -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_AR= CH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_6= 4 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! >> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAM= ILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd= _x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 = -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pi= pe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fram= e-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compar= e -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_misc= =2Eo.d -o ad_x86_64_misc.o ../generated/adfiles/ad_x86_64_misc.cpp=20 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/com= piler/abstractCompiler.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/uti= lities/accessFlags.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'abstractCompiler.o' failed >> gmake[6]: *** [abstractCompiler.o] Error 1 >> gmake[6]: *** Waiting for unfinished jobs.... >> ../generated/adfiles/ad_x86_64.cpp:1: fatal error: had to relocate PCH= >> compilation terminated. > Are you using ccache? > >> ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to reloca= te PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'accessFlags.o' failed >> gmake[6]: *** [accessFlags.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed >> gmake[6]: *** [ad_x86_64_clone.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'ad_x86_64.o' failed >> gmake[6]: *** [ad_x86_64.o] Error 1 >> ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to reloc= ate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed >> gmake[6]: *** [ad_x86_64_expand.o] Error 1 >> ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to relocate= PCH >> compilation terminated. >> ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to relocat= e PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed >> gmake[6]: *** [ad_x86_64_gen.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed >> gmake[6]: *** [ad_x86_64_misc.o] Error 1 >> ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to reloc= ate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/rules.make:149: recipe for target 'ad_x86_64_format.o' failed >> gmake[6]: *** [ad_x86_64_format.o] Error 1 >> gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/ope= njdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefil= es/top.make:128: recipe for target 'the_vm' failed >> gmake[5]: *** [the_vm] Error 2 >> gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/ope= njdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makefil= e:292: recipe for target 'product' failed >> gmake[4]: *** [product] Error 2 >> gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/ope= njdk/build/bsd-amd64/hotspot/outputdir' >> Makefile:191: recipe for target 'generic_build2' failed >> gmake[3]: *** [generic_build2] Error 2 >> gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/ope= njdk/hotspot/make' >> Makefile:151: recipe for target 'product' failed >> gmake[2]: *** [product] Error 2 >> gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/ope= njdk/hotspot/make' >> make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed >> gmake[1]: *** [hotspot-build] Error 2 >> gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/ope= njdk' >> Makefile:251: recipe for target 'build_product_image' failed >> gmake: *** [build_product_image] Error 2 >> =3D=3D=3D> Compilation failed unexpectedly. >> >> I was not seeing this problem on my older package builder running >> 10.1-STABLE. Since this problem has not shown up on the FreeBSD packa= ge >> building cluster, I got suspicious that the change was quite recent. >> >> This old gcc bug report: >> led me to suspe= ct >> mmap(). >> >> The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a coupl= e >> of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a >> NULL first argument is used. The address that gets returned is stashe= d >> away and the region is unmapped. Then a later call in >> mmap_gt_pch_use_address() passes this saved address to mmap() as a >> hint. It expects the mapped region to get mapped to the same base >> address. If this does not happen, the above error is the result. > I don't know what I'm talking about but that doesn't sound like a very > safe assumption for the gcc code to make. Your intuition is correct. It is not. And, in fact, under Solaris and Linux, gcc does not make this assumption. I suspect that the solution used by gcc under Solaris would work for us. However, that would entail modifying gcc in older branches. Is arm still using gcc as the default compiler on HEAD? >> If I go back to kernel source r280326, which immediately preceeds the >> above commit, I am able to successfully build openjdk7. >> >> I recommend that any machines in the ports cluster being used to build= >> packages for FreeBSD 8 and 9 avoid upgrading past r280326 until this >> issue is resolved. I have not observed any problems building packages= >> for FreeBSD 10 and 11. >> > Is it 100% for you before and after? I've seen this error come up > randomly where a rebuild will succeed. or fail. > > From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:03:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 795BCC0A; Sat, 28 Mar 2015 18:03:28 +0000 (UTC) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (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 3BE82170; Sat, 28 Mar 2015 18:03:28 +0000 (UTC) Received: by igcau2 with SMTP id au2so49200039igc.1; Sat, 28 Mar 2015 11:03:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=iZk9clyMxPuZV3S/0VSmZdEvH5c4xF/DyqS05XW4WDk=; b=TNTj4Jg4+9zeeODpAHSFCWBWB6TwDro/8HMQo5ecHDobTsxP4pxjwed0oiFoiLMPy8 86XJlN1vZuzqSYC4L+KAZkducqVejOqoJcCuJgJnHu5ql3ooW4N3zTliVpOxiJmL/5qZ gxOBOpBrbohckY6St+I3Drbwd8BLAeajx2+dH0R5uZPav9l1/Quy6FbhjogjoRbKbmuz SxXdvKjgIQ/I7uKpL7lJW5oK2gyOUFDbu4ZX5jry5PBCrwR1NBdRRVu3f8ckcyovkv5r hgIojRo/6V8LbDjoE+Q5XK4OS13qVISlhVR/Oa2+rSzxZr2F7Tp27Oqym0TwwQr7UB3u Xieg== MIME-Version: 1.0 X-Received: by 10.42.41.200 with SMTP id q8mr47596757ice.61.1427565807773; Sat, 28 Mar 2015 11:03:27 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sat, 28 Mar 2015 11:03:27 -0700 (PDT) In-Reply-To: <5516EB31.7000309@rice.edu> References: <201503280241.t2S2fWcQ078499@gw.catspoiler.org> <5516E4EA.60201@FreeBSD.org> <5516EB31.7000309@rice.edu> Date: Sat, 28 Mar 2015 11:03:27 -0700 X-Google-Sender-Auth: CJ_Y3W_ummfH7O-mC4f08Vt88wk Message-ID: Subject: Re: svn commit: r280327 - in head/sys: kern vm From: Adrian Chadd To: Alan Cox Content-Type: text/plain; charset=UTF-8 Cc: "src-committers@freebsd.org" , Alan Cox , Don Lewis , Bryan Drewery , portmgr@freebsd.org, "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , clusteradm@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:03:28 -0000 Hm, at least MIPS is still using gcc-4.2. Shall we fix gcc in the tree to stop this from happening? I think that's the most sane thing to do, if a bit tedious. -adrian From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:04:26 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E974FD81 for ; Sat, 28 Mar 2015 18:04:26 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 C644A17C for ; Sat, 28 Mar 2015 18:04:26 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SI4Qvo080779 for ; Sat, 28 Mar 2015 18:04:26 GMT (envelope-from bdrewery@freefall.freebsd.org) Received: (from bdrewery@localhost) by freefall.freebsd.org (8.14.9/8.14.9/Submit) id t2SI4QCv080775 for svn-src-all@FreeBSD.org; Sat, 28 Mar 2015 18:04:26 GMT (envelope-from bdrewery) Received: (qmail 7759 invoked from network); 28 Mar 2015 13:04:22 -0500 Received: from unknown (HELO ?10.10.1.139?) (freebsd@shatow.net@10.10.1.139) by sweb.xzibition.com with ESMTPA; 28 Mar 2015 13:04:22 -0500 Message-ID: <5516ED2F.9050509@FreeBSD.org> Date: Sat, 28 Mar 2015 13:04:31 -0500 From: Bryan Drewery Organization: FreeBSD User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Alan Cox , Don Lewis , alc@FreeBSD.org Subject: Re: svn commit: r280327 - in head/sys: kern vm References: <201503280241.t2S2fWcQ078499@gw.catspoiler.org> <5516E4EA.60201@FreeBSD.org> <5516EB31.7000309@rice.edu> In-Reply-To: <5516EB31.7000309@rice.edu> OpenPGP: id=6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iVFgCRVrGl86UTRFEXrakgUNsTsWDsE6P" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, clusteradm@FreeBSD.org, portmgr@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:04:27 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iVFgCRVrGl86UTRFEXrakgUNsTsWDsE6P Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 3/28/2015 12:56 PM, Alan Cox wrote: > On 03/28/2015 12:29, Bryan Drewery wrote: >> On 3/27/2015 9:41 PM, Don Lewis wrote: >>> On 21 Mar, Alan Cox wrote: >>>> Author: alc >>>> Date: Sat Mar 21 17:56:55 2015 >>>> New Revision: 280327 >>>> URL: https://svnweb.freebsd.org/changeset/base/280327 >>>> >>>> Log: >>>> Introduce vm_object_color() and use it in mmap(2) to set the color= of >>>> named objects to zero before the virtual address is selected. Pre= viously, >>>> the color setting was delayed until after the virtual address was >>>> selected. In rtld, this delay effectively prevented the mapping o= f a >>>> shared library's code section using superpages. Now, for example,= we see >>>> the first 1 MB of libc's code on armv6 mapped by a superpage after= we've >>>> gotten through the initial cold misses that bring the first 1 MB o= f code >>>> into memory. (With the page clustering that we perform on read fa= ults, >>>> this happens quickly.) >>>> =20 >>>> Differential Revision: https://reviews.freebsd.org/D2013 >>>> Reviewed by: jhb, kib >>>> Tested by: Svatopluk Kraus (armv6) >>>> MFC after: 6 weeks >>>> >>>> Modified: >>>> head/sys/kern/kern_exec.c >>>> head/sys/vm/vm_fault.c >>>> head/sys/vm/vm_mmap.c >>>> head/sys/vm/vm_object.h >>>> head/sys/vm/vnode_pager.c >>> This change appears to have partially broken package building. >>> >>> I recently set up a package building machine running 11.0-CURRENT >>> r280642 and found that it was unable to build openjdk7 packages insid= e >>> FreeBSD 8.4 and 9.3 poudriere jails, for both i386 and amd64. >>> >>> [snip] >>> Compiling ../generated/adfiles/ad_x86_64_gen.cpp >>> rm -f ad_x86_64_gen.o >>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/u= sr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs= /usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr= /ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrk= dirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/= wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrk= dirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../ge= nerated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGE= T=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D= \"amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector= -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_A= RCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_= 64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! >>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FA= MILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bs= d_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2= -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -p= ipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fra= me-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compa= re -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_for= mat.o.d -o ad_x86_64_format.o ../generated/adfiles/ad_x86_64_format.cpp=20 >>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/u= sr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs= /usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr= /ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrk= dirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/= wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrk= dirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../ge= nerated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGE= T=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D= \"amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector= -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_A= RCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_= 64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! >>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FA= MILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bs= d_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2= -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -p= ipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fra= me-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compa= re -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_gen= =2Eo.d -o ad_x86_64_gen.o ../generated/adfiles/ad_x86_64_gen.cpp=20 >>> Compiling ../generated/adfiles/ad_x86_64_misc.cpp >>> rm -f ad_x86_64_misc.o >>> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/u= sr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs= /usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr= /ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrk= dirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdi= rs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/= wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrk= dirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../ge= nerated -DHOTSPOT_RELEASE_VERSION=3D"\"24.76-b04\"" -DHOTSPOT_BUILD_TARGE= T=3D"\"product\"" -DHOTSPOT_BUILD_USER=3D"\"root\"" -DHOTSPOT_LIB_ARCH=3D= \"amd64\" -DHOTSPOT_VM_DISTRO=3D"\"OpenJDK\"" -O2 -pipe -fstack-protector= -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_A= RCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_= 64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fno! >>> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FA= MILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bs= d_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2= -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -p= ipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=3D1 -fno-omit-fra= me-pointer -DINCLUDE_TRACE=3D1 -Wpointer-arith -Wconversion -Wsign-compa= re -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_mis= c.o.d -o ad_x86_64_misc.o ../generated/adfiles/ad_x86_64_misc.cpp=20 >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/co= mpiler/abstractCompiler.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/ut= ilities/accessFlags.cpp:1: fatal error: had to relocate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'abstractCompiler.o' failed >>> gmake[6]: *** [abstractCompiler.o] Error 1 >>> gmake[6]: *** Waiting for unfinished jobs.... >>> ../generated/adfiles/ad_x86_64.cpp:1: fatal error: had to relocate PC= H >>> compilation terminated. >> Are you using ccache? >> >>> ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to reloc= ate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'accessFlags.o' failed >>> gmake[6]: *** [accessFlags.o] Error 1 >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed >>> gmake[6]: *** [ad_x86_64_clone.o] Error 1 >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'ad_x86_64.o' failed >>> gmake[6]: *** [ad_x86_64.o] Error 1 >>> ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to relo= cate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed >>> gmake[6]: *** [ad_x86_64_expand.o] Error 1 >>> ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to relocat= e PCH >>> compilation terminated. >>> ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to reloca= te PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed >>> gmake[6]: *** [ad_x86_64_gen.o] Error 1 >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed >>> gmake[6]: *** [ad_x86_64_misc.o] Error 1 >>> ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to relo= cate PCH >>> compilation terminated. >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/rules.make:149: recipe for target 'ad_x86_64_format.o' failed >>> gmake[6]: *** [ad_x86_64_format.o] Error 1 >>> gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/op= enjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefi= les/top.make:128: recipe for target 'the_vm' failed >>> gmake[5]: *** [the_vm] Error 2 >>> gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/op= enjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >>> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makefi= le:292: recipe for target 'product' failed >>> gmake[4]: *** [product] Error 2 >>> gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/op= enjdk/build/bsd-amd64/hotspot/outputdir' >>> Makefile:191: recipe for target 'generic_build2' failed >>> gmake[3]: *** [generic_build2] Error 2 >>> gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/op= enjdk/hotspot/make' >>> Makefile:151: recipe for target 'product' failed >>> gmake[2]: *** [product] Error 2 >>> gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/op= enjdk/hotspot/make' >>> make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed >>> gmake[1]: *** [hotspot-build] Error 2 >>> gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/op= enjdk' >>> Makefile:251: recipe for target 'build_product_image' failed >>> gmake: *** [build_product_image] Error 2 >>> =3D=3D=3D> Compilation failed unexpectedly. >>> >>> I was not seeing this problem on my older package builder running >>> 10.1-STABLE. Since this problem has not shown up on the FreeBSD pack= age >>> building cluster, I got suspicious that the change was quite recent. >>> >>> This old gcc bug report: >>> led me to susp= ect >>> mmap(). >>> >>> The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a coup= le >>> of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a >>> NULL first argument is used. The address that gets returned is stash= ed >>> away and the region is unmapped. Then a later call in >>> mmap_gt_pch_use_address() passes this saved address to mmap() as a >>> hint. It expects the mapped region to get mapped to the same base >>> address. If this does not happen, the above error is the result. >> I don't know what I'm talking about but that doesn't sound like a very= >> safe assumption for the gcc code to make. >=20 >=20 > Your intuition is correct. It is not. And, in fact, under Solaris and= > Linux, gcc does not make this assumption. >=20 > I suspect that the solution used by gcc under Solaris would work for > us. However, that would entail modifying gcc in older branches. We could probably just disable PCH usage in the build as well, at least when using GCC. --=20 Regards, Bryan Drewery --iVFgCRVrGl86UTRFEXrakgUNsTsWDsE6P Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJVFu0vAAoJEDXXcbtuRpfPV+cH/0LUVdJIxb41IWo0G9fsNACD 08wHdor1zPvQofLrSxo/SQM2XBTsyQDwKf70TPyvk9gFRsHp9AATR9TU7Uufv/YD WOQCta1oA2Tdbn9w5L40WUDJOOIMI8X8hNvcPrxVqv6/fr6SB9JvCOxWCmAbtVsK bz8jwR/pCVk9EPCjeZQ3hVO0Y+strNrti7UjC03BTZxDSKBxvjZ87v52itblXuaD iclp+JgdZh8JJH6JgxANNEL3p9Ao6HYJB700OjrTjFYtmozrXRQrKNFYV5z2tTB9 SUw8oQLCMUt/UGOJcdcdietptGBjhmwDHsuhQkBHUR2vb5TOcvAD78/m+mmj3B4= =vEXc -----END PGP SIGNATURE----- --iVFgCRVrGl86UTRFEXrakgUNsTsWDsE6P-- From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:18:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 813211F6; Sat, 28 Mar 2015 18:18:39 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DB57E2D5; Sat, 28 Mar 2015 18:18:37 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2SIIXkI031766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 28 Mar 2015 21:18:33 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2SIIXBB031765; Sat, 28 Mar 2015 21:18:33 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 28 Mar 2015 21:18:33 +0300 From: Gleb Smirnoff To: John-Mark Gurney Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150328181833.GX64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150328172313.GC51048@funkthat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:18:39 -0000 On Sat, Mar 28, 2015 at 10:23:13AM -0700, John-Mark Gurney wrote: J> > On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote: J> > F> Author: fabient J> > F> Date: Fri Mar 27 13:26:59 2015 J> > F> New Revision: 280759 J> > F> URL: https://svnweb.freebsd.org/changeset/base/280759 J> > F> J> > F> Log: J> > F> On multi CPU systems, we may emit successive packets with the same id. J> > F> Fix the race by using an atomic operation. J> > F> J> > F> Differential Revision: https://reviews.freebsd.org/D2141 J> > F> Obtained from: emeric.poupon@stormshield.eu J> > F> MFC after: 1 week J> > F> Sponsored by: Stormshield J> > J> > The D2141 says that benchmarking were done in presence of IPSEC, which J> > of course is the bottleneck and performance of this instruction can't J> > be benchmarked in its presence. Anyway, I believe that results of J> > right benchmark would still show little difference between atomic and J> > non-atomic increment of a shared value. J> > J> > I think we can use per-cpu ID counters, each CPU incrementing its J> > own. If we start with random values, then probability of two packets with J> > the same ID emitting at the allowed timeframe will be acceptably small. J> J> Please do not use per-cpu id counters.. That will just push the J> duplicate ids to being more rare, but just as much of a problem... J> J> Please read: J> https://tools.ietf.org/html/rfc6864 J> J> And then implement one hased upon source/dest/protocol... I know about this RFC, but using per-cpu ID counter if a low hanging fruit and is improvement. What is important not only improvement in terms of lowering probability of collision, but also easy improvement in performance, since now global ip_id increment is a cache line thrasher. So, I don't see how existense of the RFC blocks introducing an easy improvement. And if anyone works on implementing the RFC, he shouldn't care what is in head before his work, either global or per-cpu counter. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:22:38 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8AD093D2; Sat, 28 Mar 2015 18:22:38 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (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 DC1FD388; Sat, 28 Mar 2015 18:22:37 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2SIMM1k081552; Sat, 28 Mar 2015 10:22:26 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503281822.t2SIMM1k081552@gw.catspoiler.org> Date: Sat, 28 Mar 2015 11:22:22 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm To: bdrewery@FreeBSD.org In-Reply-To: <5516E4EA.60201@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: src-committers@FreeBSD.org, alc@FreeBSD.org, svn-src-all@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:22:38 -0000 On 28 Mar, Bryan Drewery wrote: > On 3/27/2015 9:41 PM, Don Lewis wrote: >> On 21 Mar, Alan Cox wrote: >>> Author: alc >>> Date: Sat Mar 21 17:56:55 2015 >>> New Revision: 280327 >>> URL: https://svnweb.freebsd.org/changeset/base/280327 >>> >>> Log: >>> Introduce vm_object_color() and use it in mmap(2) to set the color of >>> named objects to zero before the virtual address is selected. Previously, >>> the color setting was delayed until after the virtual address was >>> selected. In rtld, this delay effectively prevented the mapping of a >>> shared library's code section using superpages. Now, for example, we see >>> the first 1 MB of libc's code on armv6 mapped by a superpage after we've >>> gotten through the initial cold misses that bring the first 1 MB of code >>> into memory. (With the page clustering that we perform on read faults, >>> this happens quickly.) >>> >>> Differential Revision: https://reviews.freebsd.org/D2013 >>> Reviewed by: jhb, kib >>> Tested by: Svatopluk Kraus (armv6) >>> MFC after: 6 weeks >>> >>> Modified: >>> head/sys/kern/kern_exec.c >>> head/sys/vm/vm_fault.c >>> head/sys/vm/vm_mmap.c >>> head/sys/vm/vm_object.h >>> head/sys/vm/vnode_pager.c >> >> This change appears to have partially broken package building. >> >> I recently set up a package building machine running 11.0-CURRENT >> r280642 and found that it was unable to build openjdk7 packages inside >> FreeBSD 8.4 and 9.3 poudriere jails, for both i386 and amd64. >> >> [snip] >> Compiling ../generated/adfiles/ad_x86_64_gen.cpp >> rm -f ad_x86_64_gen.o >> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -! fno! >> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_format.o.d -o ad_x86_64_format.o ../generated/adfiles/ad_x86_64_format.cpp >> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -! fno! >> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_gen.o.d -o ad_x86_64_gen.o ../generated/adfiles/ad_x86_64_gen.cpp >> Compiling ../generated/adfiles/ad_x86_64_misc.cpp >> rm -f ad_x86_64_misc.o >> c++ -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 -DPRODUCT -I. -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/prims -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/precompiled -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/cpu/x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os_cpu/bsd_x86/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/bsd/vm -I/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/os/posix/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"24.76-b04\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"root\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -O2 -pipe -fstack-protector -fno-strict-aliasing -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -! fno! >> -rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -DTARGET_OS_FAMILY_bsd -DTARGET_ARCH_x86 -DTARGET_ARCH_MODEL_x86_64 -DTARGET_OS_ARCH_bsd_x86 -DTARGET_OS_ARCH_MODEL_bsd_x86_64 -DTARGET_COMPILER_gcc -DCOMPILER2 -DCOMPILER1 -fPIC -fno-rtti -fno-exceptions -pthread -fcheck-new -m64 -pipe -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -fno-omit-frame-pointer -DINCLUDE_TRACE=1 -Wpointer-arith -Wconversion -Wsign-compare -c -fpch-deps -MMD -MP -MF ../generated/dependencies/ad_x86_64_misc.o.d -o ad_x86_64_misc.o ../generated/adfiles/ad_x86_64_misc.cpp >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/compiler/abstractCompiler.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/src/share/vm/utilities/accessFlags.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'abstractCompiler.o' failed >> gmake[6]: *** [abstractCompiler.o] Error 1 >> gmake[6]: *** Waiting for unfinished jobs.... >> ../generated/adfiles/ad_x86_64.cpp:1: fatal error: had to relocate PCH >> compilation terminated. > > Are you using ccache? Nope. >> ../generated/adfiles/ad_x86_64_clone.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'accessFlags.o' failed >> gmake[6]: *** [accessFlags.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_clone.o' failed >> gmake[6]: *** [ad_x86_64_clone.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64.o' failed >> gmake[6]: *** [ad_x86_64.o] Error 1 >> ../generated/adfiles/ad_x86_64_expand.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_expand.o' failed >> gmake[6]: *** [ad_x86_64_expand.o] Error 1 >> ../generated/adfiles/ad_x86_64_gen.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> ../generated/adfiles/ad_x86_64_misc.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_gen.o' failed >> gmake[6]: *** [ad_x86_64_gen.o] Error 1 >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_misc.o' failed >> gmake[6]: *** [ad_x86_64_misc.o] Error 1 >> ../generated/adfiles/ad_x86_64_format.cpp:1: fatal error: had to relocate PCH >> compilation terminated. >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/rules.make:149: recipe for target 'ad_x86_64_format.o' failed >> gmake[6]: *** [ad_x86_64_format.o] Error 1 >> gmake[6]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/makefiles/top.make:128: recipe for target 'the_vm' failed >> gmake[5]: *** [the_vm] Error 2 >> gmake[5]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir/bsd_amd64_compiler2/product' >> /wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make/bsd/Makefile:292: recipe for target 'product' failed >> gmake[4]: *** [product] Error 2 >> gmake[4]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/build/bsd-amd64/hotspot/outputdir' >> Makefile:191: recipe for target 'generic_build2' failed >> gmake[3]: *** [generic_build2] Error 2 >> gmake[3]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' >> Makefile:151: recipe for target 'product' failed >> gmake[2]: *** [product] Error 2 >> gmake[2]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk/hotspot/make' >> make/hotspot-rules.gmk:111: recipe for target 'hotspot-build' failed >> gmake[1]: *** [hotspot-build] Error 2 >> gmake[1]: Leaving directory '/wrkdirs/usr/ports/java/openjdk7/work/openjdk' >> Makefile:251: recipe for target 'build_product_image' failed >> gmake: *** [build_product_image] Error 2 >> ===> Compilation failed unexpectedly. >> >> I was not seeing this problem on my older package builder running >> 10.1-STABLE. Since this problem has not shown up on the FreeBSD package >> building cluster, I got suspicious that the change was quite recent. >> >> This old gcc bug report: >> led me to suspect >> mmap(). >> >> The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a couple >> of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a >> NULL first argument is used. The address that gets returned is stashed >> away and the region is unmapped. Then a later call in >> mmap_gt_pch_use_address() passes this saved address to mmap() as a >> hint. It expects the mapped region to get mapped to the same base >> address. If this does not happen, the above error is the result. > > I don't know what I'm talking about but that doesn't sound like a very > safe assumption for the gcc code to make. Yeah, I was pretty freaked out what I saw that. I'm not sure if it does this in one process or if it expects this to be repeatable between processes. I'm suspicious that it might be the latter. The first process would compile the headers and stash some of data structure in an mmap()ed file. The second process would then mmap() the file to use for compiling some code. If it landed at a different address the second time around, then all of the embedded pointers would be garbage. >> >> If I go back to kernel source r280326, which immediately preceeds the >> above commit, I am able to successfully build openjdk7. >> >> I recommend that any machines in the ports cluster being used to build >> packages for FreeBSD 8 and 9 avoid upgrading past r280326 until this >> issue is resolved. I have not observed any problems building packages >> for FreeBSD 10 and 11. >> > > Is it 100% for you before and after? I've seen this error come up > randomly where a rebuild will succeed. or fail. It's been 100% fatal for me when building openjdk7 in FreeBSD 8 and 9 jails. I've seen some other randomish-looking failures, but I didn't investigate whether they were the same, or just the usual random port breakage. If I can find some time, I'll go digging back through the logs. From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:26:13 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E25366D; Sat, 28 Mar 2015 18:26:13 +0000 (UTC) Received: from gw.catspoiler.org (cl-1657.chi-02.us.sixxs.net [IPv6:2001:4978:f:678::2]) (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 0104E3B0; Sat, 28 Mar 2015 18:26:12 +0000 (UTC) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.13.3/8.13.3) with ESMTP id t2SIPi6d081565; Sat, 28 Mar 2015 10:25:48 -0800 (PST) (envelope-from truckman@FreeBSD.org) Message-Id: <201503281825.t2SIPi6d081565@gw.catspoiler.org> Date: Sat, 28 Mar 2015 11:25:44 -0700 (PDT) From: Don Lewis Subject: Re: svn commit: r280327 - in head/sys: kern vm To: alc@rice.edu In-Reply-To: <5516EB31.7000309@rice.edu> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Cc: src-committers@FreeBSD.org, alc@FreeBSD.org, svn-src-all@FreeBSD.org, bdrewery@FreeBSD.org, portmgr@FreeBSD.org, svn-src-head@FreeBSD.org, clusteradm@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:26:13 -0000 On 28 Mar, Alan Cox wrote: > On 03/28/2015 12:29, Bryan Drewery wrote: >> On 3/27/2015 9:41 PM, Don Lewis wrote: >>> I was not seeing this problem on my older package builder running >>> 10.1-STABLE. Since this problem has not shown up on the FreeBSD package >>> building cluster, I got suspicious that the change was quite recent. >>> >>> This old gcc bug report: >>> led me to suspect >>> mmap(). >>> >>> The old gcc source file /usr/src/contrib/gcc/ggc-common.c does a couple >>> of mmap() calls. Tne first is in mmap_gt_pch_get_address() where a >>> NULL first argument is used. The address that gets returned is stashed >>> away and the region is unmapped. Then a later call in >>> mmap_gt_pch_use_address() passes this saved address to mmap() as a >>> hint. It expects the mapped region to get mapped to the same base >>> address. If this does not happen, the above error is the result. >> I don't know what I'm talking about but that doesn't sound like a very >> safe assumption for the gcc code to make. > > > Your intuition is correct. It is not. And, in fact, under Solaris and > Linux, gcc does not make this assumption. > > I suspect that the solution used by gcc under Solaris would work for > us. However, that would entail modifying gcc in older branches. That's somewhat problematic because we use releases + official updates for package building. To continue doing this, we'd have to treat the gcc fix as an EN. From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:29:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98216845; Sat, 28 Mar 2015 18:29:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 82D58400; Sat, 28 Mar 2015 18:29:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SITEJF081850; Sat, 28 Mar 2015 18:29:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SITErS081849; Sat, 28 Mar 2015 18:29:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201503281829.t2SITErS081849@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 28 Mar 2015 18:29:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280789 - head/contrib/llvm/tools/lldb/source/Core X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:29:14 -0000 Author: emaste Date: Sat Mar 28 18:29:13 2015 New Revision: 280789 URL: https://svnweb.freebsd.org/changeset/base/280789 Log: Import lldb r233478: Fix build failure on Freebsd with gcc 4.9. llvm.org/pr23051 Submitted by: rodrigc Modified: head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp Modified: head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp ============================================================================== --- head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp Sat Mar 28 16:59:57 2015 (r280788) +++ head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp Sat Mar 28 18:29:13 2015 (r280789) @@ -4886,7 +4886,7 @@ struct string_pair struct Db { - typedef String String; + typedef ::String String; typedef Vector sub_type; typedef Vector template_param_type; Vector names; From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:57:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A288465; Sat, 28 Mar 2015 18:57:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64C0792B; Sat, 28 Mar 2015 18:57:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SIvFUM096551; Sat, 28 Mar 2015 18:57:15 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SIvErQ096549; Sat, 28 Mar 2015 18:57:14 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201503281857.t2SIvErQ096549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 28 Mar 2015 18:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280790 - in head/sys: conf dev/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:57:15 -0000 Author: bz Date: Sat Mar 28 18:57:13 2015 New Revision: 280790 URL: https://svnweb.freebsd.org/changeset/base/280790 Log: Remove all the handcrafted assembly in hwpmc_armv7.c and use the common (autogenerated) versions. Removes extra vertical space, and makes it easier to grep for usage throughout the tree. Conditionally compile only for arm6 [1] (yes sounds odd but is right). Submitted by: andrew [1] Reviewed by: gnn, andrew (ian earlier version I think) Differential Revision: https://reviews.freebsd.org/D2159 Obtained from: Cambridge/L41 Sponsored by: DARPA, AFRL Modified: head/sys/conf/files.arm head/sys/dev/hwpmc/hwpmc_armv7.c Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Sat Mar 28 18:29:13 2015 (r280789) +++ head/sys/conf/files.arm Sat Mar 28 18:57:13 2015 (r280790) @@ -72,7 +72,7 @@ crypto/des/des_enc.c optional crypto | dev/fb/fb.c optional sc dev/fdt/fdt_arm_platform.c optional platform fdt dev/hwpmc/hwpmc_arm.c optional hwpmc -dev/hwpmc/hwpmc_armv7.c optional hwpmc +dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6 dev/kbd/kbd.c optional sc | vt dev/syscons/scgfbrndr.c optional sc dev/syscons/scterm-teken.c optional sc Modified: head/sys/dev/hwpmc/hwpmc_armv7.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_armv7.c Sat Mar 28 18:29:13 2015 (r280789) +++ head/sys/dev/hwpmc/hwpmc_armv7.c Sat Mar 28 18:57:13 2015 (r280790) @@ -97,47 +97,6 @@ struct armv7_cpu { static struct armv7_cpu **armv7_pcpu; /* - * Performance Monitor Control Register - */ -static __inline uint32_t -armv7_pmnc_read(void) -{ - uint32_t reg; - - __asm __volatile("mrc p15, 0, %0, c9, c12, 0" : "=r" (reg)); - - return (reg); -} - -static __inline void -armv7_pmnc_write(uint32_t reg) -{ - - __asm __volatile("mcr p15, 0, %0, c9, c12, 0" : : "r" (reg)); -} - -/* - * Clock Counter Register (PMCCNTR) - * Counts processor clock cycles. - */ -static __inline uint32_t -armv7_ccnt_read(void) -{ - uint32_t reg; - - __asm __volatile("mrc p15, 0, %0, c9, c13, 0" : "=r" (reg)); - - return (reg); -} - -static __inline void -armv7_ccnt_write(uint32_t reg) -{ - - __asm __volatile("mcr p15, 0, %0, c9, c13, 0" : : "r" (reg)); -} - -/* * Interrupt Enable Set Register */ static __inline void @@ -146,8 +105,7 @@ armv7_interrupt_enable(uint32_t pmc) uint32_t reg; reg = (1 << pmc); - - __asm __volatile("mcr p15, 0, %0, c9, c14, 1" : : "r" (reg)); + cp15_pminten_set(reg); } /* @@ -159,48 +117,7 @@ armv7_interrupt_disable(uint32_t pmc) uint32_t reg; reg = (1 << pmc); - - __asm __volatile("mcr p15, 0, %0, c9, c14, 2" : : "r" (reg)); -} - -/* - * Overflow Flag Register - */ -static __inline uint32_t -armv7_flag_read(void) -{ - uint32_t reg; - - __asm __volatile("mrc p15, 0, %0, c9, c12, 3" : "=r" (reg)); - - return (reg); -} - -static __inline void -armv7_flag_write(uint32_t reg) -{ - - __asm __volatile("mcr p15, 0, %0, c9, c12, 3" : : "r" (reg)); -} - -/* - * Event Selection Register - */ -static __inline void -armv7_evtsel_write(uint32_t reg) -{ - - __asm __volatile("mcr p15, 0, %0, c9, c13, 1" : : "r" (reg)); -} - -/* - * PMSELR - */ -static __inline void -armv7_select_counter(unsigned int pmc) -{ - - __asm __volatile("mcr p15, 0, %0, c9, c12, 5" : : "r" (pmc)); + cp15_pminten_clr(reg); } /* @@ -212,8 +129,7 @@ armv7_counter_enable(unsigned int pmc) uint32_t reg; reg = (1 << pmc); - - __asm __volatile("mcr p15, 0, %0, c9, c12, 1" : : "r" (reg)); + cp15_pmcnten_set(reg); } /* @@ -225,8 +141,7 @@ armv7_counter_disable(unsigned int pmc) uint32_t reg; reg = (1 << pmc); - - __asm __volatile("mcr p15, 0, %0, c9, c12, 2" : : "r" (reg)); + cp15_pmcnten_clr(reg); } /* @@ -235,24 +150,21 @@ armv7_counter_disable(unsigned int pmc) static uint32_t armv7_pmcn_read(unsigned int pmc) { - uint32_t reg = 0; - - KASSERT(pmc < 4, ("[armv7,%d] illegal PMC number %d", __LINE__, pmc)); - armv7_select_counter(pmc); - __asm __volatile("mrc p15, 0, %0, c9, c13, 2" : "=r" (reg)); + KASSERT(pmc < armv7_npmcs, ("%s: illegal PMC number %d", __func__, pmc)); - return (reg); + cp15_pmselr_set(pmc); + return (cp15_pmxevcntr_get()); } static uint32_t armv7_pmcn_write(unsigned int pmc, uint32_t reg) { - KASSERT(pmc < 4, ("[armv7,%d] illegal PMC number %d", __LINE__, pmc)); + KASSERT(pmc < armv7_npmcs, ("%s: illegal PMC number %d", __func__, pmc)); - armv7_select_counter(pmc); - __asm __volatile("mcr p15, 0, %0, c9, c13, 2" : : "r" (reg)); + cp15_pmselr_set(pmc); + cp15_pmxevcntr_set(reg); return (reg); } @@ -309,7 +221,7 @@ armv7_read_pmc(int cpu, int ri, pmc_valu pm = armv7_pcpu[cpu]->pc_armv7pmcs[ri].phw_pmc; if (pm->pm_md.pm_armv7.pm_armv7_evsel == 0xFF) - tmp = armv7_ccnt_read(); + tmp = cp15_pmccntr_get(); else tmp = armv7_pmcn_read(ri); @@ -340,7 +252,7 @@ armv7_write_pmc(int cpu, int ri, pmc_val PMCDBG(MDP,WRI,1,"armv7-write cpu=%d ri=%d v=%jx", cpu, ri, v); if (pm->pm_md.pm_armv7.pm_armv7_evsel == 0xFF) - armv7_ccnt_write(v); + cp15_pmccntr_set(v); else armv7_pmcn_write(ri, v); @@ -384,8 +296,8 @@ armv7_start_pmc(int cpu, int ri) /* * Configure the event selection. */ - armv7_select_counter(ri); - armv7_evtsel_write(config); + cp15_pmselr_set(ri); + cp15_pmxevtyper_set(config); /* * Enable the PMC. @@ -459,12 +371,12 @@ armv7_intr(int cpu, struct trapframe *tf else reg = (1 << ri); - if ((armv7_flag_read() & reg) == 0) { + if ((cp15_pmovsr_get() & reg) == 0) { continue; } /* Clear Overflow Flag */ - armv7_flag_write(reg); + cp15_pmovsr_set(reg); retval = 1; /* Found an interrupting PMC. */ if (pm->pm_state != PMC_STATE_RUNNING) @@ -573,9 +485,9 @@ armv7_pcpu_init(struct pmc_mdep *md, int } /* Enable unit */ - pmnc = armv7_pmnc_read(); + pmnc = cp15_pmcr_get(); pmnc |= ARMV7_PMNC_ENABLE; - armv7_pmnc_write(pmnc); + cp15_pmcr_set(pmnc); return 0; } @@ -585,9 +497,9 @@ armv7_pcpu_fini(struct pmc_mdep *md, int { uint32_t pmnc; - pmnc = armv7_pmnc_read(); + pmnc = cp15_pmcr_get(); pmnc &= ~ARMV7_PMNC_ENABLE; - armv7_pmnc_write(pmnc); + cp15_pmcr_set(pmnc); return 0; } @@ -599,7 +511,7 @@ pmc_armv7_initialize() struct pmc_classdep *pcd; int reg; - reg = armv7_pmnc_read(); + reg = cp15_pmcr_get(); armv7_npmcs = (reg >> ARMV7_PMNC_N_SHIFT) & \ ARMV7_PMNC_N_MASK; From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 18:59:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F39805B9; Sat, 28 Mar 2015 18:59:11 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (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 740B593C; Sat, 28 Mar 2015 18:59:11 +0000 (UTC) Received: by lagg8 with SMTP id g8so92085072lag.1; Sat, 28 Mar 2015 11:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bH0+YS5ArTVXDQ4R/M7ak5e2a7oL4WoSvAZExMvLqgU=; b=HYiGEY0Upf8nGGX0i6fLtAJ9WaW5ALwQ9cbzJdL+iViqG0wQT7c0BZBcdjHffoTLr1 gSbPESf1LC6JbE1C8+dbrG+LBi1Yr08nFzHjWuC914TuHnlNJ432NxIaxHWcg8Gmk+r9 /O+dUnxUR9LDe20LlK4ZBU0KWMgQNVCAlc+Dj7o/KDetisJ522oo50wjiodOE8rILlpn By3clEKAoF3U+YxNMaudimf5a0ZQJpYX841hQ9URr6azNM6bB84N25A9pUAHBc0Bu8N/ b6csOR45UemvlDmB72i0cThwBZle53FkBMNCjz743ua8IUsfxYaISx9WeY3/GxqwA5NZ pUwA== MIME-Version: 1.0 X-Received: by 10.152.179.139 with SMTP id dg11mr22512627lac.28.1427569149130; Sat, 28 Mar 2015 11:59:09 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.66.3 with HTTP; Sat, 28 Mar 2015 11:59:09 -0700 (PDT) In-Reply-To: <201503281250.t2SCoOkt020297@svn.freebsd.org> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> Date: Sat, 28 Mar 2015 11:59:09 -0700 X-Google-Sender-Auth: vLAy_MdoO7_bCV_zgzdiPIH9-z0 Message-ID: Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Davide Italiano To: Randall Stewart Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 18:59:12 -0000 On Sat, Mar 28, 2015 at 5:50 AM, Randall Stewart wrote: > Author: rrs > Date: Sat Mar 28 12:50:24 2015 > New Revision: 280785 > URL: https://svnweb.freebsd.org/changeset/base/280785 > > Log: > Change the callout to supply -1 to indicate we are not changing > CPU, also add protection against invalid CPU's as well as > split c_flags and c_iflags so that if a user plays with the active > flag (the one expected to be played with by callers in MPSAFE) without > a lock, it won't adversely affect the callout system by causing a corrupt > list. This also means that all callers need to use the macros and *not* > play with the falgs directly (like netgraph used to). > trim [...] > Modified: head/sys/sys/_callout.h > ============================================================================== > --- head/sys/sys/_callout.h Sat Mar 28 12:23:15 2015 (r280784) > +++ head/sys/sys/_callout.h Sat Mar 28 12:50:24 2015 (r280785) > @@ -57,7 +57,8 @@ struct callout { > void *c_arg; /* function argument */ > void (*c_func)(void *); /* function to call */ > struct lock_object *c_lock; /* lock to handle */ > - int c_flags; /* state of this entry */ > + int c_flags; /* User State */ > + int c_iflags; /* Internal State */ > volatile int c_cpu; /* CPU we're scheduled on */ > }; > I skimmed this quickly, and I'm afraid I think this breaks the KBI, increasing size of struct callout. That said, if it's true and you agree, you should at least bump FreeBSD version number. In an ideal world, you should avoid breaking for bugfixes and not architecural changes. -- Davide From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 19:01:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 93DD571A; Sat, 28 Mar 2015 19:01:27 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 45B489E1; Sat, 28 Mar 2015 19:01:27 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 27E1625D3A97; Sat, 28 Mar 2015 19:01:23 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id BAA13C7707C; Sat, 28 Mar 2015 19:01:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 0ScPqVeQqxDo; Sat, 28 Mar 2015 19:01:21 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f40b:6d60:9f0a:8c25] (unknown [IPv6:fde9:577b:c1a9:4410:f40b:6d60:9f0a:8c25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1B867C7700C; Sat, 28 Mar 2015 19:01:20 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: svn commit: r280790 - in head/sys: conf dev/hwpmc From: "Bjoern A. Zeeb" In-Reply-To: <201503281857.t2SIvErQ096549@svn.freebsd.org> Date: Sat, 28 Mar 2015 19:01:20 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201503281857.t2SIvErQ096549@svn.freebsd.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-Mailer: Apple Mail (2.2070.6) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 19:01:27 -0000 > On 28 Mar 2015, at 18:57 , Bjoern A. Zeeb wrote: >=20 > Author: bz > Date: Sat Mar 28 18:57:13 2015 > New Revision: 280790 > URL: https://svnweb.freebsd.org/changeset/base/280790 >=20 > Log: > Remove all the handcrafted assembly in hwpmc_armv7.c and use the > common (autogenerated) versions. Removes extra vertical space, > and makes it easier to grep for usage throughout the tree. > Conditionally compile only for arm6 [1] (yes sounds odd but is = right). >=20 > Submitted by: andrew [1] > Reviewed by: gnn, andrew (ian earlier version I think) and ian (I missed the official review for the latest version; sorry) > Differential Revision: https://reviews.freebsd.org/D2159 > Obtained from: Cambridge/L41 > Sponsored by: DARPA, AFRL >=20 > Modified: > head/sys/conf/files.arm > head/sys/dev/hwpmc/hwpmc_armv7.c =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 19:16:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C5DB0D70; Sat, 28 Mar 2015 19:16:32 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D66A4B60; Sat, 28 Mar 2015 19:16:31 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t2SJGTVL032220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 28 Mar 2015 22:16:29 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t2SJGTJh032219; Sat, 28 Mar 2015 22:16:29 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sat, 28 Mar 2015 22:16:29 +0300 From: Gleb Smirnoff To: Fabien Thomas Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150328191629.GY64665@FreeBSD.org> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="TBNym+cBXeFsS4Vs" Content-Disposition: inline In-Reply-To: <20150328083443.GV64665@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 19:16:32 -0000 --TBNym+cBXeFsS4Vs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Mar 28, 2015 at 11:34:43AM +0300, Gleb Smirnoff wrote: T> On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote: T> F> Author: fabient T> F> Date: Fri Mar 27 13:26:59 2015 T> F> New Revision: 280759 T> F> URL: https://svnweb.freebsd.org/changeset/base/280759 T> F> T> F> Log: T> F> On multi CPU systems, we may emit successive packets with the same id. T> F> Fix the race by using an atomic operation. T> F> T> F> Differential Revision: https://reviews.freebsd.org/D2141 T> F> Obtained from: emeric.poupon@stormshield.eu T> F> MFC after: 1 week T> F> Sponsored by: Stormshield T> T> The D2141 says that benchmarking were done in presence of IPSEC, which T> of course is the bottleneck and performance of this instruction can't T> be benchmarked in its presence. Anyway, I believe that results of T> right benchmark would still show little difference between atomic and T> non-atomic increment of a shared value. T> T> I think we can use per-cpu ID counters, each CPU incrementing its T> own. If we start with random values, then probability of two packets with T> the same ID emitting at the allowed timeframe will be acceptably small. Here I've made a patch. It will apply only to fresh head, though. To apply it to stable/10 you probably need to replay these two commits before: r280787, r280788. I'd appreciate if you test it in your environments, where you observed IP id collisions. -- Totus tuus, Glebius. --TBNym+cBXeFsS4Vs Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ip_newid-pcpu.diff" Index: ip_id.c =================================================================== --- ip_id.c (revision 280788) +++ ip_id.c (working copy) @@ -74,9 +74,10 @@ * enabled. */ -#include +#include +#include +#include #include -#include #include #include #include @@ -83,7 +84,7 @@ #include #include #include -#include +#include #include #include @@ -92,8 +93,10 @@ #include #include +/* + * Random ID state engine. + */ static MALLOC_DEFINE(M_IPID, "ipid", "randomized ip id state"); - static VNET_DEFINE(uint16_t *, id_array); static VNET_DEFINE(bitstr_t *, id_bits); static VNET_DEFINE(int, array_ptr); @@ -109,6 +112,12 @@ #define V_random_id_total VNET(random_id_total) #define V_ip_id_mtx VNET(ip_id_mtx) +/* + * Non-random ID state engine is simply a per-cpu counter. + */ +static VNET_DEFINE(counter_u64_t, ip_id); +#define V_ip_id VNET(ip_id) + static void ip_initid(int); static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS); static void ipid_sysinit(void); @@ -191,6 +200,14 @@ return (new_id); } +uint16_t +ip_newid(void) +{ + + counter_u64_add(V_ip_id, 1); + return (htons((*(uint64_t *)zpcpu_get(V_ip_id)) & 0xffff)); +} + static void ipid_sysinit(void) { @@ -197,6 +214,9 @@ mtx_init(&V_ip_id_mtx, "ip_id_mtx", NULL, MTX_DEF); ip_initid(8192); + V_ip_id = counter_u64_alloc(M_WAITOK); + for (int i = 0; i < mp_ncpus; i++) + arc4rand(zpcpu_get_cpu(V_ip_id, i), sizeof(uint64_t), 0); } VNET_SYSINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipid_sysinit, NULL); @@ -207,5 +227,6 @@ mtx_destroy(&V_ip_id_mtx); free(V_id_array, M_IPID); free(V_id_bits, M_IPID); + counter_u64_free(V_ip_id); } VNET_SYSUNINIT(ip_id, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, ipid_sysuninit, NULL); Index: ip_input.c =================================================================== --- ip_input.c (revision 280779) +++ ip_input.c (working copy) @@ -331,8 +331,6 @@ struct protosw *pr; int i; - V_ip_id = time_second & 0xffff; - TAILQ_INIT(&V_in_ifaddrhead); V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask); Index: ip_output.c =================================================================== --- ip_output.c (revision 280779) +++ ip_output.c (working copy) @@ -91,8 +91,6 @@ #include -VNET_DEFINE(uint32_t, ip_id); - #ifdef MBUF_STRESS_TEST static int mbuf_frag_size = 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, mbuf_frag_size, CTLFLAG_RW, Index: ip_var.h =================================================================== --- ip_var.h (revision 280779) +++ ip_var.h (working copy) @@ -174,7 +174,6 @@ struct route; struct sockopt; -VNET_DECLARE(uint32_t, ip_id); /* ip packet ctr, for ids */ VNET_DECLARE(int, ip_defttl); /* default IP ttl */ VNET_DECLARE(int, ipforwarding); /* ip forwarding */ #ifdef IPSTEALTH @@ -229,6 +228,7 @@ struct mbuf *); void ip_slowtimo(void); uint16_t ip_randomid(void); +uint16_t ip_newid(void); int rip_ctloutput(struct socket *, struct sockopt *); void rip_ctlinput(int, struct sockaddr *, void *); void rip_init(void); @@ -305,19 +305,7 @@ VNET_DECLARE(int, ip_do_randomid); #define V_ip_do_randomid VNET(ip_do_randomid) -static __inline uint16_t -ip_newid(void) -{ - uint16_t res; - if (V_ip_do_randomid != 0) - return (ip_randomid()); - else { - res = atomic_fetchadd_32(&V_ip_id, 1) & 0xFFFF; - return (htons(res)); - } -} - #endif /* _KERNEL */ #endif /* !_NETINET_IP_VAR_H_ */ --TBNym+cBXeFsS4Vs-- From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 19:34:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 953B04BF; Sat, 28 Mar 2015 19:34:01 +0000 (UTC) Received: from relay.mailchannels.net (aso-006-i440.relay.mailchannels.net [23.91.64.121]) by mx1.freebsd.org (Postfix) with ESMTP id 61CE4D4C; Sat, 28 Mar 2015 19:33:59 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (ip-10-33-12-218.us-west-2.compute.internal [10.33.12.218]) by relay.mailchannels.net (Postfix) with ESMTPA id 9F2F01205A7; Sat, 28 Mar 2015 19:33:52 +0000 (UTC) X-Sender-Id: duocircle|x-authuser|hippie Received: from smtp4.ore.mailhop.org (smtp4.ore.mailhop.org [10.45.8.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:2500 (trex/5.4.8); Sat, 28 Mar 2015 19:33:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: duocircle|x-authuser|hippie X-MailChannels-Auth-Id: duocircle X-MC-Loop-Signature: 1427571232747:1848504596 X-MC-Ingress-Time: 1427571232747 Received: from c-73-34-117-227.hsd1.co.comcast.net ([73.34.117.227] helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YbwUQ-0005Re-GI; Sat, 28 Mar 2015 19:33:50 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t2SJXnTk052752; Sat, 28 Mar 2015 13:33:49 -0600 (MDT) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18b7Pz4VYq2PSkNzUaGWksy Message-ID: <1427571229.20823.1.camel@freebsd.org> Subject: Re: svn commit: r280790 - in head/sys: conf dev/hwpmc From: Ian Lepore To: "Bjoern A. Zeeb" Date: Sat, 28 Mar 2015 13:33:49 -0600 In-Reply-To: References: <201503281857.t2SIvErQ096549@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-AuthUser: hippie Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 19:34:01 -0000 On Sat, 2015-03-28 at 19:01 +0000, Bjoern A. Zeeb wrote: > > On 28 Mar 2015, at 18:57 , Bjoern A. Zeeb wrote: > > > > Author: bz > > Date: Sat Mar 28 18:57:13 2015 > > New Revision: 280790 > > URL: https://svnweb.freebsd.org/changeset/base/280790 > > > > Log: > > Remove all the handcrafted assembly in hwpmc_armv7.c and use the > > common (autogenerated) versions. Removes extra vertical space, > > and makes it easier to grep for usage throughout the tree. > > Conditionally compile only for arm6 [1] (yes sounds odd but is right). > > > > Submitted by: andrew [1] > > Reviewed by: gnn, andrew (ian earlier version I think) > > and ian (I missed the official review for the latest version; sorry) > No problem. IMO, if a commit references a phab revision, there's no need to list individual reviewers as well, since the phab info already contains all that. -- Ian From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 19:59:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0EA18D1E; Sat, 28 Mar 2015 19:59:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEC95F85; Sat, 28 Mar 2015 19:59:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SJxYX2025687; Sat, 28 Mar 2015 19:59:34 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SJxYOW025686; Sat, 28 Mar 2015 19:59:34 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503281959.t2SJxYOW025686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Mar 2015 19:59:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280791 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 19:59:35 -0000 Author: adrian Date: Sat Mar 28 19:59:33 2015 New Revision: 280791 URL: https://svnweb.freebsd.org/changeset/base/280791 Log: Add the MAC address hints for arge0/arge1 on the CARAMBOLA2. Obtained from: Linux OpenWRT Modified: head/sys/mips/conf/CARAMBOLA2.hints Modified: head/sys/mips/conf/CARAMBOLA2.hints ============================================================================== --- head/sys/mips/conf/CARAMBOLA2.hints Sat Mar 28 18:57:13 2015 (r280790) +++ head/sys/mips/conf/CARAMBOLA2.hints Sat Mar 28 19:59:33 2015 (r280791) @@ -23,11 +23,13 @@ hint.arswitch.0.is_gmii=1 # arge1 <-> sw # arge0 - MII, autoneg, phy(4) hint.arge.0.phymask=0x10 # PHY4 hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus +hint.arge.0.eeprommac=0x1fff0000 # arge1 - GMII, 1000/full hint.arge.1.phymask=0x0 # No directly mapped PHYs hint.arge.1.media=1000 hint.arge.1.fduplex=1 +hint.arge.1.eeprommac=0x1fff0006 # Where the ART is - last 64k in the flash # 0x9fff1000 ? From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 20:43:35 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1906CB18; Sat, 28 Mar 2015 20:43:35 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id E6BD7763; Sat, 28 Mar 2015 20:43:34 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t2SKhX9K040665 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 28 Mar 2015 13:43:33 -0700 (PDT) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t2SKhX48040664; Sat, 28 Mar 2015 13:43:33 -0700 (PDT) (envelope-from jmg) Date: Sat, 28 Mar 2015 13:43:33 -0700 From: John-Mark Gurney To: Gleb Smirnoff Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150328204333.GF51048@funkthat.com> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> <20150328181833.GX64665@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150328181833.GX64665@FreeBSD.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Sat, 28 Mar 2015 13:43:34 -0700 (PDT) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 20:43:35 -0000 Gleb Smirnoff wrote this message on Sat, Mar 28, 2015 at 21:18 +0300: > On Sat, Mar 28, 2015 at 10:23:13AM -0700, John-Mark Gurney wrote: > J> > On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote: > J> > F> Author: fabient > J> > F> Date: Fri Mar 27 13:26:59 2015 > J> > F> New Revision: 280759 > J> > F> URL: https://svnweb.freebsd.org/changeset/base/280759 > J> > F> > J> > F> Log: > J> > F> On multi CPU systems, we may emit successive packets with the same id. > J> > F> Fix the race by using an atomic operation. > J> > F> > J> > F> Differential Revision: https://reviews.freebsd.org/D2141 > J> > F> Obtained from: emeric.poupon@stormshield.eu > J> > F> MFC after: 1 week > J> > F> Sponsored by: Stormshield > J> > > J> > The D2141 says that benchmarking were done in presence of IPSEC, which > J> > of course is the bottleneck and performance of this instruction can't > J> > be benchmarked in its presence. Anyway, I believe that results of > J> > right benchmark would still show little difference between atomic and > J> > non-atomic increment of a shared value. > J> > > J> > I think we can use per-cpu ID counters, each CPU incrementing its > J> > own. If we start with random values, then probability of two packets with > J> > the same ID emitting at the allowed timeframe will be acceptably small. > J> > J> Please do not use per-cpu id counters.. That will just push the > J> duplicate ids to being more rare, but just as much of a problem... > J> > J> Please read: > J> https://tools.ietf.org/html/rfc6864 > J> > J> And then implement one hased upon source/dest/protocol... > > I know about this RFC, but using per-cpu ID counter if a low hanging > fruit and is improvement. What is important not only improvement in > terms of lowering probability of collision, but also easy improvement in > performance, since now global ip_id increment is a cache line thrasher. > > So, I don't see how existense of the RFC blocks introducing an easy > improvement. And if anyone works on implementing the RFC, he shouldn't > care what is in head before his work, either global or per-cpu counter. Your comment: "fix the race", to me reads that it was a final solution, not simply a stop gap... If you had simply said that this is a stop gap till someone properly implements RFC6864, that would make it obvious that you were aware of it.. Nothing in your commit message said that you were aware that this wasn't the correct final solution... Information like that should be included in the commit message so people don't assume that this is the final solution... Anyways, are we really sending so many fragments that we are thrashing the cache line? I'd imagine a much lower hanging fruit is only provide ip_id when a non-atomic packet is being sent... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 20:48:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7F2ED07; Sat, 28 Mar 2015 20:48:51 +0000 (UTC) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::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 56A1F7B5; Sat, 28 Mar 2015 20:48:51 +0000 (UTC) Received: by lbbug6 with SMTP id ug6so84387755lbb.3; Sat, 28 Mar 2015 13:48:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=zvnTn6GEkzPXfpsdzeuvF1DDsoG08X3TNGhNuNcAVHM=; b=L4WlsnYt2PyNpusJCZncmGyUDhC8mD5W0I57zqvVlo+eI0Sb9MYTn85xwIyub2pruB FdvQ1z2GfGgCaivZQcVJZMudeSjnr/GjGQFuL9fn0LaUzc3rYoILinJW8W1NN5KK66GB FCXISJrZ6VLuJ5LSLPqi/X0MCxPJcrlVQchPvEQpMUCpS1dxkjWRX8eLQBbE0rDPTRW8 nvbP5psGyuY2uGAsU/IgkrsHmDeia7/J/JHR++/9t4nMmFa8HIknfM3zXrb7QYgjn4B/ YhPRnSSRY/KP/Vqk7p+ikNYniYugx7EnA8CJRxk4sMCB2THFlWmCDS2R1PlBCyUl8X+C 2pCg== MIME-Version: 1.0 X-Received: by 10.152.197.34 with SMTP id ir2mr22647768lac.36.1427575729402; Sat, 28 Mar 2015 13:48:49 -0700 (PDT) Sender: davide.italiano@gmail.com Received: by 10.25.66.3 with HTTP; Sat, 28 Mar 2015 13:48:49 -0700 (PDT) In-Reply-To: <4E7E0A0A-5125-4F3A-AC0C-D428A972C954@netflix.com> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <4E7E0A0A-5125-4F3A-AC0C-D428A972C954@netflix.com> Date: Sat, 28 Mar 2015 13:48:49 -0700 X-Google-Sender-Auth: 37bm3_91U9W0TZW_1SvKN9DesQA Message-ID: Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Davide Italiano To: Randall Stewart Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 20:48:52 -0000 On Sat, Mar 28, 2015 at 12:04 PM, Randall Stewart wrote: > Hmm does the KPI include the size of the callout structure (which is > private)? > It's KBI, not KPI. > If so I suppose we could change the c_flags/c_iflags to > ushort =E2=80=A6 > I'm not familiar with your changes enough to suggest/propose a fix. As I previously mentioned, this looks suspicious KBI-wise to me, and I reported to you. --=20 Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 21:21:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 264CA64D; Sat, 28 Mar 2015 21:21:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07ECFB8A; Sat, 28 Mar 2015 21:21:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SLLe82067874; Sat, 28 Mar 2015 21:21:40 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SLLeW8067873; Sat, 28 Mar 2015 21:21:40 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201503282121.t2SLLeW8067873@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 28 Mar 2015 21:21:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280792 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 21:21:41 -0000 Author: vangyzen Date: Sat Mar 28 21:21:40 2015 New Revision: 280792 URL: https://svnweb.freebsd.org/changeset/base/280792 Log: Clean up some cosmetic nits in kern_umtx.c, found during recent work in this area and by the Clang static analyzer. Remove some dead assignments. Fix a typo in a panic string. Use umtx_pi_disown() instead of duplicate code. Use an existing variable instead of curthread. Approved by: kib (mentor) MFC after: 3 days Sponsored by: Dell Inc Modified: head/sys/kern/kern_umtx.c Modified: head/sys/kern/kern_umtx.c ============================================================================== --- head/sys/kern/kern_umtx.c Sat Mar 28 19:59:33 2015 (r280791) +++ head/sys/kern/kern_umtx.c Sat Mar 28 21:21:40 2015 (r280792) @@ -912,7 +912,7 @@ kern_umtx_wake(struct thread *td, void * is_private ? THREAD_SHARE : AUTO_SHARE, &key)) != 0) return (ret); umtxq_lock(&key); - ret = umtxq_signal(&key, n_wake); + umtxq_signal(&key, n_wake); umtxq_unlock(&key); umtx_key_release(&key); return (0); @@ -1440,7 +1440,7 @@ umtx_pi_setowner(struct umtx_pi *pi, str uq_owner = owner->td_umtxq; mtx_assert(&umtx_lock, MA_OWNED); if (pi->pi_owner != NULL) - panic("pi_ower != NULL"); + panic("pi_owner != NULL"); pi->pi_owner = owner; TAILQ_INSERT_TAIL(&uq_owner->uq_pi_contested, pi, pi_link); } @@ -1464,9 +1464,8 @@ umtx_pi_disown(struct umtx_pi *pi) static int umtx_pi_claim(struct umtx_pi *pi, struct thread *owner) { - struct umtx_q *uq, *uq_owner; + struct umtx_q *uq; - uq_owner = owner->td_umtxq; mtx_lock(&umtx_lock); if (pi->pi_owner == owner) { mtx_unlock(&umtx_lock); @@ -1612,11 +1611,8 @@ umtx_pi_unref(struct umtx_pi *pi) KASSERT(pi->pi_refcount > 0, ("invalid reference count")); if (--pi->pi_refcount == 0) { mtx_lock(&umtx_lock); - if (pi->pi_owner != NULL) { - TAILQ_REMOVE(&pi->pi_owner->td_umtxq->uq_pi_contested, - pi, pi_link); - pi->pi_owner = NULL; - } + if (pi->pi_owner != NULL) + umtx_pi_disown(pi); KASSERT(TAILQ_EMPTY(&pi->pi_blocked), ("blocked queue not empty")); mtx_unlock(&umtx_lock); @@ -1876,7 +1872,7 @@ do_unlock_pi(struct thread *td, struct u mtx_lock(&umtx_lock); pi = uq_first->uq_pi_blocked; KASSERT(pi != NULL, ("pi == NULL?")); - if (pi->pi_owner != curthread) { + if (pi->pi_owner != td) { mtx_unlock(&umtx_lock); umtxq_unbusy(&key); umtxq_unlock(&key); @@ -1884,7 +1880,7 @@ do_unlock_pi(struct thread *td, struct u /* userland messed the mutex */ return (EPERM); } - uq_me = curthread->td_umtxq; + uq_me = td->td_umtxq; umtx_pi_disown(pi); /* get highest priority thread which is still sleeping. */ uq_first = TAILQ_FIRST(&pi->pi_blocked); @@ -1900,9 +1896,9 @@ do_unlock_pi(struct thread *td, struct u pri = UPRI(uq_first2->uq_thread); } } - thread_lock(curthread); - sched_lend_user_prio(curthread, pri); - thread_unlock(curthread); + thread_lock(td); + sched_lend_user_prio(td, pri); + thread_unlock(td); mtx_unlock(&umtx_lock); if (uq_first) umtxq_signal_thread(uq_first); From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 21:28:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDC038C6; Sat, 28 Mar 2015 21:28:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90CA6BC8; Sat, 28 Mar 2015 21:28:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SLSN36068873; Sat, 28 Mar 2015 21:28:23 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SLSNg3068870; Sat, 28 Mar 2015 21:28:23 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201503282128.t2SLSNg3068870@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sat, 28 Mar 2015 21:28:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280793 - head/usr.sbin/pmcstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 21:28:23 -0000 Author: vangyzen Date: Sat Mar 28 21:28:22 2015 New Revision: 280793 URL: https://svnweb.freebsd.org/changeset/base/280793 Log: pmcstat.8: fix -a flag description; improve -m flag to match The -a flag reads a file saved by -O, not -o. The -m flag requires the -R flag. Copy that paragraph from -a. Reviewed by: adrian Approved by: kib (mentor) MFC after: 1 week Sponsored by: Dell Inc Modified: head/usr.sbin/pmcstat/pmcstat.8 head/usr.sbin/pmcstat/pmcstat.c Modified: head/usr.sbin/pmcstat/pmcstat.8 ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.8 Sat Mar 28 21:21:40 2015 (r280792) +++ head/usr.sbin/pmcstat/pmcstat.8 Sat Mar 28 21:28:22 2015 (r280793) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Oct 27, 2014 +.Dd March 27, 2015 .Dt PMCSTAT 8 .Os .Sh NAME @@ -236,7 +236,7 @@ This option requires the .Fl R option to read in samples that were previously collected and saved with the -.Fl o +.Fl O option. .It Fl c Ar cpu-spec Set the cpus for subsequent system mode PMCs specified on the @@ -301,6 +301,12 @@ is a this information is sent to the output file specified by the .Fl o option. +This option requires the +.Fl R +option to read in samples that were previously collected and +saved with the +.Fl O +option. .It Fl n Ar rate Set the default sampling rate for subsequent sampling mode PMCs specified on the command line. Modified: head/usr.sbin/pmcstat/pmcstat.c ============================================================================== --- head/usr.sbin/pmcstat/pmcstat.c Sat Mar 28 21:21:40 2015 (r280792) +++ head/usr.sbin/pmcstat/pmcstat.c Sat Mar 28 21:28:22 2015 (r280793) @@ -940,7 +940,7 @@ main(int argc, char **argv) errx(EX_USAGE, "ERROR: options -T and -l are mutually " "exclusive."); - /* -m option is allowed with -R only. */ + /* -a and -m require -R */ if (args.pa_flags & FLAG_DO_ANNOTATE && args.pa_inputpath == NULL) errx(EX_USAGE, "ERROR: option %s requires an input file", args.pa_plugin == PMCSTAT_PL_ANNOTATE ? "-m" : "-a"); From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 21:34:08 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47A66A4B; Sat, 28 Mar 2015 21:34:08 +0000 (UTC) Received: from zxy.spb.ru (zxy.spb.ru [195.70.199.98]) (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 F164CC79; Sat, 28 Mar 2015 21:34:07 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YbyMm-0002N8-2e; Sun, 29 Mar 2015 00:34:04 +0300 Date: Sun, 29 Mar 2015 00:34:04 +0300 From: Slawa Olhovchenkov To: John-Mark Gurney Subject: Re: svn commit: r280759 - head/sys/netinet Message-ID: <20150328213403.GB74532@zxy.spb.ru> References: <201503271326.t2RDQxd3056112@svn.freebsd.org> <20150328083443.GV64665@FreeBSD.org> <20150328172313.GC51048@funkthat.com> <20150328181833.GX64665@FreeBSD.org> <20150328204333.GF51048@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150328204333.GF51048@funkthat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: slw@zxy.spb.ru X-SA-Exim-Scanned: No (on zxy.spb.ru); SAEximRunCond expanded to false Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Gleb Smirnoff , src-committers@FreeBSD.org, Fabien Thomas X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 21:34:08 -0000 On Sat, Mar 28, 2015 at 01:43:33PM -0700, John-Mark Gurney wrote: > Gleb Smirnoff wrote this message on Sat, Mar 28, 2015 at 21:18 +0300: > > On Sat, Mar 28, 2015 at 10:23:13AM -0700, John-Mark Gurney wrote: > > J> > On Fri, Mar 27, 2015 at 01:26:59PM +0000, Fabien Thomas wrote: > > J> > F> Author: fabient > > J> > F> Date: Fri Mar 27 13:26:59 2015 > > J> > F> New Revision: 280759 > > J> > F> URL: https://svnweb.freebsd.org/changeset/base/280759 > > J> > F> > > J> > F> Log: > > J> > F> On multi CPU systems, we may emit successive packets with the same id. > > J> > F> Fix the race by using an atomic operation. > > J> > F> > > J> > F> Differential Revision: https://reviews.freebsd.org/D2141 > > J> > F> Obtained from: emeric.poupon@stormshield.eu > > J> > F> MFC after: 1 week > > J> > F> Sponsored by: Stormshield > > J> > > > J> > The D2141 says that benchmarking were done in presence of IPSEC, which > > J> > of course is the bottleneck and performance of this instruction can't > > J> > be benchmarked in its presence. Anyway, I believe that results of > > J> > right benchmark would still show little difference between atomic and > > J> > non-atomic increment of a shared value. > > J> > > > J> > I think we can use per-cpu ID counters, each CPU incrementing its > > J> > own. If we start with random values, then probability of two packets with > > J> > the same ID emitting at the allowed timeframe will be acceptably small. > > J> > > J> Please do not use per-cpu id counters.. That will just push the > > J> duplicate ids to being more rare, but just as much of a problem... > > J> > > J> Please read: > > J> https://tools.ietf.org/html/rfc6864 > > J> > > J> And then implement one hased upon source/dest/protocol... > > > > I know about this RFC, but using per-cpu ID counter if a low hanging > > fruit and is improvement. What is important not only improvement in > > terms of lowering probability of collision, but also easy improvement in > > performance, since now global ip_id increment is a cache line thrasher. > > > > So, I don't see how existense of the RFC blocks introducing an easy > > improvement. And if anyone works on implementing the RFC, he shouldn't > > care what is in head before his work, either global or per-cpu counter. > > Your comment: "fix the race", to me reads that it was a final solution, > not simply a stop gap... > > If you had simply said that this is a stop gap till someone properly > implements RFC6864, that would make it obvious that you were aware of > it.. Nothing in your commit message said that you were aware that this > wasn't the correct final solution... Information like that should be > included in the commit message so people don't assume that this is the > final solution... > > Anyways, are we really sending so many fragments that we are thrashing > the cache line? I'd imagine a much lower hanging fruit is only provide > ip_id when a non-atomic packet is being sent... In this case may be do range allocation of ID (per-CPU)? For example, allocate 128 ID, not one ID? From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 21:39:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B51A2DBB; Sat, 28 Mar 2015 21:39:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0878CD4; Sat, 28 Mar 2015 21:39:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SLdhaU073691; Sat, 28 Mar 2015 21:39:43 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SLdhjw073690; Sat, 28 Mar 2015 21:39:43 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201503282139.t2SLdhjw073690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sat, 28 Mar 2015 21:39:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280794 - head/sys/powerpc/booke X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 21:39:43 -0000 Author: jhibbits Date: Sat Mar 28 21:39:42 2015 New Revision: 280794 URL: https://svnweb.freebsd.org/changeset/base/280794 Log: Wrap #ifdef guards around pmap_bootstrap ap. It's only used in SMP, and building without SMP causes a build failure. MFC after: 1 month Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c ============================================================================== --- head/sys/powerpc/booke/pmap.c Sat Mar 28 21:28:22 2015 (r280793) +++ head/sys/powerpc/booke/pmap.c Sat Mar 28 21:39:42 2015 (r280794) @@ -262,7 +262,9 @@ static vm_offset_t ptbl_buf_pool_vabase; /* Pointer to ptbl_buf structures. */ static struct ptbl_buf *ptbl_bufs; +#ifdef SMP void pmap_bootstrap_ap(volatile uint32_t *); +#endif /* * Kernel MMU interface @@ -1329,6 +1331,7 @@ mmu_booke_bootstrap(mmu_t mmu, vm_offset debugf("mmu_booke_bootstrap: exit\n"); } +#ifdef SMP void pmap_bootstrap_ap(volatile uint32_t *trcp __unused) { @@ -1349,6 +1352,7 @@ pmap_bootstrap_ap(volatile uint32_t *trc set_mas4_defaults(); } +#endif /* * Get the physical page address for the given pmap/virtual address. From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 23:02:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0E415BA; Sat, 28 Mar 2015 23:02:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC946817; Sat, 28 Mar 2015 23:02:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SN20Tp014997; Sat, 28 Mar 2015 23:02:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SN20Kd014996; Sat, 28 Mar 2015 23:02:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503282302.t2SN20Kd014996@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Mar 2015 23:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280795 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 23:02:01 -0000 Author: adrian Date: Sat Mar 28 23:01:59 2015 New Revision: 280795 URL: https://svnweb.freebsd.org/changeset/base/280795 Log: Remove the second MODULES_OVERRIDE; add if_vlan to the list. Modified: head/sys/mips/conf/AR933X_BASE Modified: head/sys/mips/conf/AR933X_BASE ============================================================================== --- head/sys/mips/conf/AR933X_BASE Sat Mar 28 21:39:42 2015 (r280794) +++ head/sys/mips/conf/AR933X_BASE Sat Mar 28 23:01:59 2015 (r280795) @@ -20,8 +20,7 @@ files "../atheros/files.ar71xx" hints "AR933X_BASE.hints" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols -makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr hwpmc ipfw" -makeoptions MODULES_OVERRIDE="" +makeoptions MODULES_OVERRIDE="random gpio ar71xx if_gif if_vlan if_gre if_bridge bridgestp usb wlan wlan_xauth wlan_acl wlan_wep wlan_tkip wlan_ccmp wlan_rssadapt wlan_amrr hwpmc ipfw" options DDB options KDB From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 23:20:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C2B8A8D; Sat, 28 Mar 2015 23:20:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB3F597F; Sat, 28 Mar 2015 23:20:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SNKljd022235; Sat, 28 Mar 2015 23:20:47 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SNKlPd022234; Sat, 28 Mar 2015 23:20:47 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503282320.t2SNKlPd022234@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Mar 2015 23:20:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280796 - head/sys/dev/etherswitch/arswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 23:20:48 -0000 Author: adrian Date: Sat Mar 28 23:20:46 2015 New Revision: 280796 URL: https://svnweb.freebsd.org/changeset/base/280796 Log: Turns out the AR933x looks like the AR7240/AR7241 switch as far as VLAN configuration is concerned. So, remove the now-erroneous comment. Tested: * AR9331 - Carambola2, with transmitting dot1q tagged packets around. Modified: head/sys/dev/etherswitch/arswitch/arswitch_vlans.c Modified: head/sys/dev/etherswitch/arswitch/arswitch_vlans.c ============================================================================== --- head/sys/dev/etherswitch/arswitch/arswitch_vlans.c Sat Mar 28 23:01:59 2015 (r280795) +++ head/sys/dev/etherswitch/arswitch/arswitch_vlans.c Sat Mar 28 23:20:46 2015 (r280796) @@ -51,7 +51,6 @@ #include "etherswitch_if.h" /* - * XXX TODO: teach about the AR933x SoC switch * XXX TODO: teach about the AR934x SoC switch */ From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 23:30:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A560D89; Sat, 28 Mar 2015 23:30:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56381B53; Sat, 28 Mar 2015 23:30:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SNUqvp027824; Sat, 28 Mar 2015 23:30:52 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SNUqkc027823; Sat, 28 Mar 2015 23:30:52 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503282330.t2SNUqkc027823@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 28 Mar 2015 23:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280797 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 23:30:52 -0000 Author: kib Date: Sat Mar 28 23:30:51 2015 New Revision: 280797 URL: https://svnweb.freebsd.org/changeset/base/280797 Log: Make debug.vmem_check a tunable. It is useful to set it early. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/subr_vmem.c Modified: head/sys/kern/subr_vmem.c ============================================================================== --- head/sys/kern/subr_vmem.c Sat Mar 28 23:20:46 2015 (r280796) +++ head/sys/kern/subr_vmem.c Sat Mar 28 23:30:51 2015 (r280797) @@ -172,7 +172,7 @@ struct vmem_btag { #if defined(DIAGNOSTIC) static int enable_vmem_check = 1; -SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RW, +SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RWTUN, &enable_vmem_check, 0, "Enable vmem check"); static void vmem_check(vmem_t *); #endif From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 23:40:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC7DEFCE; Sat, 28 Mar 2015 23:40:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A60EFC3E; Sat, 28 Mar 2015 23:40:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SNeVHh031781; Sat, 28 Mar 2015 23:40:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SNeUXf031777; Sat, 28 Mar 2015 23:40:30 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503282340.t2SNeUXf031777@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Mar 2015 23:40:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280798 - head/sys/mips/atheros X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 23:40:31 -0000 Author: adrian Date: Sat Mar 28 23:40:29 2015 New Revision: 280798 URL: https://svnweb.freebsd.org/changeset/base/280798 Log: Begin moving support for board MAC addresses over to being explicitly defined. A lot of these dinky atheros based MIPS boards don't have a nice, well, anything consistent defining their MAC addresses for things. The Atheros reference design boards will happily put MAC addresses into the wifi module calibration data like they should, and individual ethernet MAC addresses into the calibration area in flash. That makes my life easy - "hint.arge.X.eeprommac=" reads from that flash address to extract a MAC, and everything works fine. However, aside from some very well behaved vendors (eg the Carambola 2 board), everyone else does something odd. eg: * a MAC address in the environment (eg ubiquiti routerstation/RSPRO) that you derive arge0/arge1 MAC addresses from. * a MAC address in flash that you derive arge0/arge1 MAC addresses from. * The wifi devices having their own MAC addresses in calibration data, like normal. * The wifi devices having a fixed, default or garbage value for a MAC address in calibration data, and it has to be derived from the system MAC. So to support this complete nonsense of a situation, there needs to be a few hacks: * The "board" MAC address needs to be derived from somewhere and squirreled away. For now it's either redboot or a MAC address stored in calibration flash. * Then, a "map" set of hints to populate kenv with some MAC addresses that are derived/local, based on the board address. Each board has a totally different idea of what you do to derive things, so each map entry has an "offset" (+ve or -ve) that's added to the board MAC address. * Then if_arge (and later, if_ath) should check kenv for said hint and if it's found, use that rather than the EEPROM MAC address - which may be totally garbage and not actually work right. In order to do this, I've undone some of the custom redboot expecting hacks in if_arge and the stuff that magically adds one to the MAC address supplied by the board - instead, as I continue to test this out on more hardware, I'll update the hints file with a map explaining (a) where the board MAC should come from, and (b) what offsets to use for each device. The aim is to have all of the tplink, dlink and other random hardware we run on have valid MAC addresses at boot, so (a) people don't get random B:S:D:x:x:x ethernet MACs, and (b) the wifi MAC is valid so it works rather than trying to use an invalid address that actually upsets systems (think: multicast bit set in BSSID.) Tested: * TP-Link TL_WDR3600 - subsequent commits will add the hints map and the if_ath support. TODO: * Since this is -HEAD, and I'm all for debugging, there's a lot of printf()s in here. They'll eventually go under bootverbose. * I'd like to turn the macaddr routines into something available to all drivers - too many places hand-roll random MAC addresses and parser stuff. I'd rather it just be shared code. However, that'll require more formal review. * More boards. Modified: head/sys/mips/atheros/ar71xx_macaddr.c head/sys/mips/atheros/ar71xx_macaddr.h head/sys/mips/atheros/ar71xx_machdep.c head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/ar71xx_macaddr.c ============================================================================== --- head/sys/mips/atheros/ar71xx_macaddr.c Sat Mar 28 23:30:51 2015 (r280797) +++ head/sys/mips/atheros/ar71xx_macaddr.c Sat Mar 28 23:40:29 2015 (r280798) @@ -33,6 +33,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include /* @@ -40,6 +42,7 @@ __FBSDID("$FreeBSD$"); * device on-board, but instead need to derive them from a single MAC * address stored somewhere. */ +uint8_t ar71xx_board_mac_addr[ETHER_ADDR_LEN]; /* * Initialise a MAC address 'dst' from a MAC address 'src'. Modified: head/sys/mips/atheros/ar71xx_macaddr.h ============================================================================== --- head/sys/mips/atheros/ar71xx_macaddr.h Sat Mar 28 23:30:51 2015 (r280797) +++ head/sys/mips/atheros/ar71xx_macaddr.h Sat Mar 28 23:40:29 2015 (r280798) @@ -30,6 +30,8 @@ #ifndef __ATHEROS_AR71XX_MACADDR_H__ #define __ATHEROS_AR71XX_MACADDR_H__ +extern uint8_t ar71xx_board_mac_addr[ETHER_ADDR_LEN]; + extern int ar71xx_mac_addr_init(unsigned char *dst, const unsigned char *src, int offset, int is_local); extern int ar71xx_mac_addr_random_init(unsigned char *dst); Modified: head/sys/mips/atheros/ar71xx_machdep.c ============================================================================== --- head/sys/mips/atheros/ar71xx_machdep.c Sat Mar 28 23:30:51 2015 (r280797) +++ head/sys/mips/atheros/ar71xx_machdep.c Sat Mar 28 23:40:29 2015 (r280798) @@ -56,12 +56,12 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include extern char edata[], end[]; -uint32_t ar711_base_mac[ETHER_ADDR_LEN]; /* 4KB static data aread to keep a copy of the bootload env until the dynamic kenv is setup */ char boot1_env[4096]; @@ -117,11 +117,13 @@ platform_reset(void) /* * Obtain the MAC address via the Redboot environment. */ -static void +static int ar71xx_redboot_get_macaddr(void) { char *var; - int count = 0; + int count = 0, i; + uint32_t macaddr[ETHER_ADDR_LEN]; + uint8_t tmpmac[ETHER_ADDR_LEN]; /* * "ethaddr" is passed via envp on RedBoot platforms @@ -130,14 +132,25 @@ ar71xx_redboot_get_macaddr(void) if ((var = kern_getenv("ethaddr")) != NULL || (var = kern_getenv("kmac")) != NULL) { count = sscanf(var, "%x%*c%x%*c%x%*c%x%*c%x%*c%x", - &ar711_base_mac[0], &ar711_base_mac[1], - &ar711_base_mac[2], &ar711_base_mac[3], - &ar711_base_mac[4], &ar711_base_mac[5]); - if (count < 6) - memset(ar711_base_mac, 0, - sizeof(ar711_base_mac)); + &macaddr[0], &macaddr[1], + &macaddr[2], &macaddr[3], + &macaddr[4], &macaddr[5]); + + if (count < 6) { + memset(macaddr, 0, + sizeof(macaddr)); + } else { + for (i = 0; i < ETHER_ADDR_LEN; i++) + tmpmac[i] = macaddr[i] & 0xff; + (void) ar71xx_mac_addr_init(ar71xx_board_mac_addr, + tmpmac, + 0, /* offset */ + 0); /* is_local */ + } freeenv(var); + return (0); } + return (-1); } #ifdef AR71XX_ENV_ROUTERBOOT @@ -168,6 +181,129 @@ ar71xx_routerboot_get_mem(int argc, char } #endif +/* + * Handle initialising the MAC address from a specific EEPROM + * offset. + * + * This is done during (very) early boot. + * + * hint.ar71xx.0.eeprom_mac_addr=
    + * hint.ar71xx.0.eeprom_mac_isascii=<0|1> + */ +static int +ar71xx_platform_read_eeprom_mac(void) +{ + long eeprom_mac_addr = 0; + const char *mac; + int i, readascii = 0; + uint8_t macaddr[ETHER_ADDR_LEN]; + + if (resource_long_value("ar71xx", 0, "eeprom_mac_addr", + &eeprom_mac_addr) != 0) + return (-1); + + /* get a pointer to the EEPROM MAC address */ + + mac = (const char *) MIPS_PHYS_TO_KSEG1(eeprom_mac_addr); + + /* Check if it's ASCII or not */ + if (resource_int_value("ar71xx", 0, "eeprom_mac_isascii", + &readascii) == 0 && readascii == 1) { + printf("ar71xx: Overriding MAC from EEPROM (ascii)\n"); + for (i = 0; i < 6; i++) { + macaddr[i] = strtol(&(mac[i*3]), NULL, 16); + } + } else { + printf("ar71xx: Overriding MAC from EEPROM\n"); + for (i = 0; i < 6; i++) { + macaddr[i] = mac[i]; + } + } + + /* Set the default board MAC */ + (void) ar71xx_mac_addr_init(ar71xx_board_mac_addr, + macaddr, + 0, /* offset */ + 0); /* is_local */ + printf("ar71xx: Board MAC: %6D\n", ar71xx_board_mac_addr, ":"); + return (0); +} + +/* + * Populate a kenv hint for the given device based on the given + * MAC address and offset. + * + * Returns 0 if ok, < 0 on error. + */ +static int +ar71xx_platform_set_mac_hint(const char *dev, int unit, + const uint8_t *macaddr, int offset, int islocal) +{ + char macstr[32]; + uint8_t lclmac[ETHER_ADDR_LEN]; + char devstr[32]; + + /* Initialise the MAC address, plus/minus the offset */ + if (ar71xx_mac_addr_init(lclmac, macaddr, offset, islocal) != 0) { + return (-1); + } + + /* Turn it into a string */ + snprintf(macstr, 32, "%6D", lclmac, ":"); + snprintf(devstr, 32, "hint.%s.%d.macaddr", dev, unit); + + printf(" %s => %s\n", devstr, macstr); + + /* Call setenv */ + if (kern_setenv(devstr, macstr) != 0) { + printf("%s: failed to set hint (%s => %s)\n", + __func__, + devstr, + macstr); + return (-1); + } + + return (0); +} + +/* + * Iterate through the list of boot time hints that populate + * a device MAC address hint based on the "board" MAC address. + * + * ar71xx_mac_map.X.devid= + * ar71xx_mac_map.X.unitid= + * ar71xx_mac_map.X.offset= + * ar71xx_mac_map.X.is_local=<1 or 0> + */ +static int +ar71xx_platform_check_mac_hints(void) +{ + int i; + const char *devid; + int offset, is_local, unitid; + + for (i = 0; i < 8; i++) { + if (resource_string_value("ar71xx_mac_map", i, "devid", + &devid) != 0) + break; + if (resource_int_value("ar71xx_mac_map", i, "unitid", + &unitid) != 0) + break; + if (resource_int_value("ar71xx_mac_map", i, "offset", + &offset) != 0) + break; + if (resource_int_value("ar71xx_mac_map", i, "is_local", + &is_local) != 0) + break; + printf("ar71xx: devid '%s.%d', MAC offset '%d'\n", + devid, unitid, offset); + (void) ar71xx_platform_set_mac_hint(devid, unitid, + ar71xx_board_mac_addr, offset, is_local); + } + + return (0); +} + void platform_start(__register_t a0 __unused, __register_t a1 __unused, __register_t a2 __unused, __register_t a3 __unused) @@ -208,8 +344,11 @@ platform_start(__register_t a0 __unused, for (i = 0; envp[i]; i += 2) { if (strcmp(envp[i], "memsize") == 0) realmem = btoc(strtoul(envp[i+1], NULL, 16)); + else if (strcmp(envp[i], "bootverbose") == 0) + bootverbose = btoc(strtoul(envp[i+1], NULL, 10)); } } + bootverbose = 1; #ifdef AR71XX_ENV_ROUTERBOOT /* @@ -302,9 +441,7 @@ platform_start(__register_t a0 __unused, else printf ("envp is invalid\n"); - /* Redboot if_arge MAC address is in the environment */ - ar71xx_redboot_get_macaddr(); - + /* Platform setup */ init_param2(physmem); mips_cpu_init(); pmap_bootstrap(); @@ -326,6 +463,15 @@ platform_start(__register_t a0 __unused, */ ar71xx_init_gmac(); + /* Redboot if_arge MAC address is in the environment */ + (void) ar71xx_redboot_get_macaddr(); + + /* Various other boards need things to come out of EEPROM */ + (void) ar71xx_platform_read_eeprom_mac(); + + /* Initialise the MAC address hint map */ + ar71xx_platform_check_mac_hints(); + kdb_init(); #ifdef KDB if (boothowto & RB_KDB) Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Sat Mar 28 23:30:51 2015 (r280797) +++ head/sys/mips/atheros/if_arge.c Sat Mar 28 23:40:29 2015 (r280798) @@ -90,6 +90,8 @@ MODULE_VERSION(arge, 1); #include "miibus_if.h" +#include + #include #include /* XXX tsk! */ #include /* XXX tsk! */ @@ -240,12 +242,6 @@ DRIVER_MODULE(argemdio, nexus, argemdio_ DRIVER_MODULE(mdio, argemdio, mdio_driver, mdio_devclass, 0, 0); #endif -/* - * RedBoot passes MAC address to entry point as environment - * variable. platfrom_start parses it and stores in this variable - */ -extern uint32_t ar711_base_mac[ETHER_ADDR_LEN]; - static struct mtx miibus_mtx; MTX_SYSINIT(miibus_mtx, &miibus_mtx, "arge mii lock", MTX_DEF); @@ -567,19 +563,57 @@ arge_attach(device_t dev) { struct ifnet *ifp; struct arge_softc *sc; - int error = 0, rid; - int is_base_mac_empty, i; + int error = 0, rid, i; uint32_t hint; long eeprom_mac_addr = 0; int miicfg = 0; int readascii = 0; int local_mac = 0; + uint8_t local_macaddr[ETHER_ADDR_LEN]; + char * local_macstr; + char devid_str[32]; + int count; sc = device_get_softc(dev); sc->arge_dev = dev; sc->arge_mac_unit = device_get_unit(dev); /* + * See if there's a "board" MAC address hint available for + * this particular device. + * + * This is in the environment - it'd be nice to use the resource_*() + * routines, but at the moment the system is booting, the resource hints + * are set to the 'static' map so they're not pulling from kenv. + */ + snprintf(devid_str, 32, "hint.%s.%d.macaddr", + device_get_name(dev), + device_get_unit(dev)); + if ((local_macstr = kern_getenv(devid_str)) != NULL) { + uint32_t tmpmac[ETHER_ADDR_LEN]; + + /* Have a MAC address; should use it */ + device_printf(dev, "Overriding MAC address from environment: '%s'\n", + local_macstr); + + /* Extract out the MAC address */ + /* XXX this should all be a generic method */ + count = sscanf(local_macstr, "%x%*c%x%*c%x%*c%x%*c%x%*c%x", + &tmpmac[0], &tmpmac[1], + &tmpmac[2], &tmpmac[3], + &tmpmac[4], &tmpmac[5]); + if (count == 6) { + /* Valid! */ + local_mac = 1; + for (i = 0; i < ETHER_ADDR_LEN; i++) + local_macaddr[i] = tmpmac[i]; + } + /* Done! */ + freeenv(local_macstr); + local_macstr = NULL; + } + + /* * Some units (eg the TP-Link WR-1043ND) do not have a convenient * EEPROM location to read the ethernet MAC address from. * OpenWRT simply snaffles it from a fixed location. @@ -593,8 +627,8 @@ arge_attach(device_t dev) * an array of numbers. Expose a hint to turn on this conversion * feature via strtol() */ - if (resource_long_value(device_get_name(dev), device_get_unit(dev), - "eeprommac", &eeprom_mac_addr) == 0) { + if (local_mac == 0 && resource_long_value(device_get_name(dev), + device_get_unit(dev), "eeprommac", &eeprom_mac_addr) == 0) { local_mac = 1; int i; const char *mac = @@ -604,11 +638,11 @@ arge_attach(device_t dev) "readascii", &readascii) == 0) { device_printf(dev, "Vendor stores MAC in ASCII format\n"); for (i = 0; i < 6; i++) { - ar711_base_mac[i] = strtol(&(mac[i*3]), NULL, 16); + local_macaddr[i] = strtol(&(mac[i*3]), NULL, 16); } } else { for (i = 0; i < 6; i++) { - ar711_base_mac[i] = mac[i]; + local_macaddr[i] = mac[i]; } } } @@ -732,14 +766,11 @@ arge_attach(device_t dev) ifp->if_capabilities |= IFCAP_POLLING; #endif - is_base_mac_empty = 1; - for (i = 0; i < ETHER_ADDR_LEN; i++) { - sc->arge_eaddr[i] = ar711_base_mac[i] & 0xff; - if (sc->arge_eaddr[i] != 0) - is_base_mac_empty = 0; - } - - if (is_base_mac_empty) { + /* If there's a local mac defined, copy that in */ + if (local_mac == 1) { + (void) ar71xx_mac_addr_init(sc->arge_eaddr, + local_macaddr, 0, 0); + } else { /* * No MAC address configured. Generate the random one. */ @@ -749,23 +780,6 @@ arge_attach(device_t dev) (void) ar71xx_mac_addr_random_init(sc->arge_eaddr); } - /* - * This is a little hairy and stupid. - * - * For some older boards, the arge1 mac isn't pulled from anywhere. - * It's just assumed the MAC is the base MAC + 1. - * - * For other boards, there's multiple MAC addresses stored in EEPROM. - * - * So, if we did read the eeprommac for this particular interface, - * let's use the address as given. Otherwise, just add the MAC unit - * counter to it. - * - * XXX TODO: we really should handle MAC byte wraparound! - */ - if (local_mac == 0 && sc->arge_mac_unit != 0) - sc->arge_eaddr[5] += sc->arge_mac_unit; - if (arge_dma_alloc(sc) != 0) { error = ENXIO; goto fail; From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 23:41:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A1DA26C; Sat, 28 Mar 2015 23:41:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CEB1C4B; Sat, 28 Mar 2015 23:41:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SNfOak032387; Sat, 28 Mar 2015 23:41:24 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SNfOZc032386; Sat, 28 Mar 2015 23:41:24 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503282341.t2SNfOZc032386@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Mar 2015 23:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280799 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 23:41:24 -0000 Author: adrian Date: Sat Mar 28 23:41:23 2015 New Revision: 280799 URL: https://svnweb.freebsd.org/changeset/base/280799 Log: Update if_ath(4) to check for "hint.ath.X.macaddr" for an override MAC address. This is used by the AR71xx platform code to choose a local MAC based on the "board MAC address", versus whatever potentially invalid/garbage values are stored in the Atheros calibration data. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Sat Mar 28 23:40:29 2015 (r280798) +++ head/sys/dev/ath/if_ath.c Sat Mar 28 23:41:23 2015 (r280799) @@ -510,6 +510,60 @@ ath_setup_hal_config(struct ath_softc *s } +/* + * Attempt to fetch the MAC address from the kernel environment. + * + * Returns 0, macaddr in macaddr if successful; -1 otherwise. + */ +static int +ath_fetch_mac_kenv(struct ath_softc *sc, uint8_t *macaddr) +{ + char devid_str[32]; + int local_mac = 0; + char *local_macstr; + + /* + * Fetch from the kenv rather than using hints. + * + * Hints would be nice but the transition to dynamic + * hints/kenv doesn't happen early enough for this + * to work reliably (eg on anything embedded.) + */ + snprintf(devid_str, 32, "hint.%s.%d.macaddr", + device_get_name(sc->sc_dev), + device_get_unit(sc->sc_dev)); + + if ((local_macstr = kern_getenv(devid_str)) != NULL) { + uint32_t tmpmac[ETHER_ADDR_LEN]; + int count; + int i; + + /* Have a MAC address; should use it */ + device_printf(sc->sc_dev, + "Overriding MAC address from environment: '%s'\n", + local_macstr); + + /* Extract out the MAC address */ + count = sscanf(local_macstr, "%x%*c%x%*c%x%*c%x%*c%x%*c%x", + &tmpmac[0], &tmpmac[1], + &tmpmac[2], &tmpmac[3], + &tmpmac[4], &tmpmac[5]); + if (count == 6) { + /* Valid! */ + local_mac = 1; + for (i = 0; i < ETHER_ADDR_LEN; i++) + macaddr[i] = tmpmac[i]; + } + /* Done! */ + freeenv(local_macstr); + local_macstr = NULL; + } + + if (local_mac) + return (0); + return (-1); +} + #define HAL_MODE_HT20 (HAL_MODE_11NG_HT20 | HAL_MODE_11NA_HT20) #define HAL_MODE_HT40 \ (HAL_MODE_11NG_HT40PLUS | HAL_MODE_11NG_HT40MINUS | \ @@ -1149,8 +1203,10 @@ ath_attach(u_int16_t devid, struct ath_s */ sc->sc_hasveol = ath_hal_hasveol(ah); - /* get mac address from hardware */ - ath_hal_getmac(ah, macaddr); + /* get mac address from kenv first, then hardware */ + if (ath_fetch_mac_kenv(sc, macaddr) < 0) + ath_hal_getmac(ah, macaddr); + if (sc->sc_hasbmask) ath_hal_getbssidmask(ah, sc->sc_hwbssidmask); From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 23:43:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E9A1D3DD; Sat, 28 Mar 2015 23:43:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D4997C65; Sat, 28 Mar 2015 23:43:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t2SNh0ow033685; Sat, 28 Mar 2015 23:43:00 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t2SNh0Xw033684; Sat, 28 Mar 2015 23:43:00 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201503282343.t2SNh0Xw033684@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 28 Mar 2015 23:43:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280800 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 23:43:01 -0000 Author: adrian Date: Sat Mar 28 23:42:59 2015 New Revision: 280800 URL: https://svnweb.freebsd.org/changeset/base/280800 Log: Add hints to set the board MAC address and derived values for each interface. This allows the TL-WDR3600 to use the correct MAC address for ath0, ath1 and arge0. arge1 isn't used; until I disable it entirely it'll just show up with a randomly generated MAC. Modified: head/sys/mips/conf/TL-WDR4300.hints Modified: head/sys/mips/conf/TL-WDR4300.hints ============================================================================== --- head/sys/mips/conf/TL-WDR4300.hints Sat Mar 28 23:41:23 2015 (r280799) +++ head/sys/mips/conf/TL-WDR4300.hints Sat Mar 28 23:42:59 2015 (r280800) @@ -21,6 +21,29 @@ hint.argemdio.0.order=0 # + AR934X_ETH_CFG_RGMII_GMAC0 (1 << 0) hint.ar934x_gmac.0.gmac_cfg=0x1 +# Board mac address is at 0x1f01fc00. +# ath0: offset 0 +# ath1: offset -1 +# arge0: offset -2 +# arge1: not hooked up; doesn't matter +hint.ar71xx.0.eeprom_mac_addr=0x1f01fc00 +hint.ar71xx.0.eeprom_mac_isascii=0 + +hint.ar71xx_mac_map.0.devid=ath +hint.ar71xx_mac_map.0.unitid=0 +hint.ar71xx_mac_map.0.offset=0 +hint.ar71xx_mac_map.0.is_local=0 + +hint.ar71xx_mac_map.1.devid=ath +hint.ar71xx_mac_map.1.unitid=1 +hint.ar71xx_mac_map.1.offset=-1 +hint.ar71xx_mac_map.1.is_local=0 + +hint.ar71xx_mac_map.2.devid=arge +hint.ar71xx_mac_map.2.unitid=0 +hint.ar71xx_mac_map.2.offset=-2 +hint.ar71xx_mac_map.2.is_local=0 + # GMAC0 here - connected to an AR8327 hint.arswitch.0.at="mdio0" hint.arswitch.0.is_7240=0 @@ -63,9 +86,6 @@ hint.arge.0.fduplex=1 hint.arge.0.miimode=3 # RGMII hint.arge.0.pll_1000=0x06000000 -# MAC for arge0 is the first 6 bytes of the ART -hint.arge.0.eeprommac=0x1f01fc00 - # mdiobus1 on arge1 hint.argemdio.1.at="nexus0" hint.argemdio.1.maddr=0x1a000000 From owner-svn-src-all@FreeBSD.ORG Sat Mar 28 23:53:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8381613; Sat, 28 Mar 2015 23:53:46 +0000 (UTC) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (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 6C8B1D53; Sat, 28 Mar 2015 23:53:46 +0000 (UTC) Received: by igcxg11 with SMTP id xg11so46569595igc.0; Sat, 28 Mar 2015 16:53:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=g0JK9t7p87KuCs/RpO5gQ2/2mmFBJrFMLQS6Yo0Z+eQ=; b=WReWrPUYDWgWVEOo9XzMEVaujAF8ialM37YD0FmvGfYbZUegG7jmDX+QnqBePXRaXq BrEo8eMtWpcM9u70V9kZMYGnXrHhhGALOrePKpNA3e3JqD27pCE4udtfmzmsDgECuQgy InvU5Yqajd5NrQPUCafZZYRmJAMqgHJGThaeIlGQGOWlDc8gi0aDIcxmWOCF2it0j9vf xRSp/sN8luvSHLK6qgXSes8uvgCF5r99h07ODjoKylgq/YTSbKgPhrrxqC+rZ9LJl5vR jdezZGJTvYpemouPkAkF4W9sN65dreJ2L7ghiSRXCQSV53Z3SvWHdeLD1hbr2g19pz47 DJeg== MIME-Version: 1.0 X-Received: by 10.107.5.131 with SMTP id 125mr38126464iof.88.1427586825639; Sat, 28 Mar 2015 16:53:45 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.17.194 with HTTP; Sat, 28 Mar 2015 16:53:45 -0700 (PDT) In-Reply-To: <201503281250.t2SCoOkt020297@svn.freebsd.org> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> Date: Sat, 28 Mar 2015 16:53:45 -0700 X-Google-Sender-Auth: 63CBlDG9YRKydWpetGBVYl1xF90 Message-ID: Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys From: Adrian Chadd To: Randall Stewart Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 23:53:46 -0000 Hi, There's been at least one report of a regression on -current. i haven't tried this on various MIPS hardware devices yet. -adrian