From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 00:26:19 2015 Return-Path: Delivered-To: svn-src-head@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 30ED6F4E; Sun, 11 Jan 2015 00:26: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 1C4F195F; Sun, 11 Jan 2015 00:26: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 t0B0QIoN056251; Sun, 11 Jan 2015 00:26:18 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B0QI6B056250; Sun, 11 Jan 2015 00:26:18 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501110026.t0B0QI6B056250@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Jan 2015 00:26:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276952 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 00:26:19 -0000 Author: mav Date: Sun Jan 11 00:26:18 2015 New Revision: 276952 URL: https://svnweb.freebsd.org/changeset/base/276952 Log: Add LBA as secondary sort key for synchronous I/O requests. On FreeBSD gethrtime() implemented via getnanouptime(), that has 1ms (1/hz) precision. It makes primary sort key (timestamp) collision very possible. In such situations sorting by secondary key of LBA is much more reasonable then by totally meaningless zio pointer value. With this change on multi-threaded synchronous ZVOL read I've measured 10% throughput increase and average latency reduction. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sat Jan 10 23:43:39 2015 (r276951) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sun Jan 11 00:26:18 2015 (r276952) @@ -301,6 +301,11 @@ vdev_queue_timestamp_compare(const void if (z1->io_timestamp > z2->io_timestamp) return (1); + if (z1->io_offset < z2->io_offset) + return (-1); + if (z1->io_offset > z2->io_offset) + return (1); + if (z1 < z2) return (-1); if (z1 > z2) From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 07:52:01 2015 Return-Path: Delivered-To: svn-src-head@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 29F91816; Sun, 11 Jan 2015 07:52: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 15C8E1B6; Sun, 11 Jan 2015 07:52: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 t0B7q0jw062854; Sun, 11 Jan 2015 07:52:00 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B7pwHe062831; Sun, 11 Jan 2015 07:51:58 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501110751.t0B7pwHe062831@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 11 Jan 2015 07:51:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276959 - in head/sys/dev/cxgb: . common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 07:52:01 -0000 Author: np Date: Sun Jan 11 07:51:58 2015 New Revision: 276959 URL: https://svnweb.freebsd.org/changeset/base/276959 Log: cxgb: replace r273280 with a more comprehensive fix. Poll for link state when the link is down, even for interrupt capable PHYs. Allow PHYs to report a dubious "partial" link. If this state is seen 3 consecutive times (each check is ~1s apart) then reset the PHY. This is a workaround for a situation where repeatedly toggling the link from the peer gets the AEL2005 PHY into a state where it never establishes a PCS block lock even when everything is in order. MFC after: 1 week Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c head/sys/dev/cxgb/common/cxgb_aq100x.c head/sys/dev/cxgb/common/cxgb_common.h head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c head/sys/dev/cxgb/common/cxgb_t3_hw.c head/sys/dev/cxgb/common/cxgb_tn1010.c head/sys/dev/cxgb/common/cxgb_vsc8211.c head/sys/dev/cxgb/cxgb_main.c Modified: head/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 11 07:51:58 2015 (r276959) @@ -283,10 +283,10 @@ static int ael1002_intr_noop(struct cphy /* * Get link status for a 10GBASE-R device. */ -static int get_link_status_r(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_r(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -296,10 +296,16 @@ static int get_link_status_r(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & stat1 & (stat2 >> 12)) & 1; - if (*link_ok == 0) - return (0); + stat0 &= 1; + stat1 &= 1; + stat2 = (stat2 >> 12) & 1; + if (stat0 & stat1 & stat2) + *link_state = PHY_LINK_UP; + else if (stat0 == 1 && stat1 == 0 && stat2 == 1) + *link_state = PHY_LINK_PARTIAL; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -1345,10 +1351,8 @@ static int ael2005_intr_handler(struct c return ret; ret |= cause; - if (!ret) { - (void) ael2005_reset(phy, 0); + if (!ret) ret |= cphy_cause_link_change; - } return ret; } @@ -2156,10 +2160,10 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, /* * Get link status for a 10GBASE-X device. */ -static int get_link_status_x(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_x(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -2169,7 +2173,10 @@ static int get_link_status_x(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1; + if ((stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1) + *link_state = PHY_LINK_UP; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -2230,10 +2237,10 @@ static int xaui_direct_reset(struct cphy return 0; } -static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok, +static int xaui_direct_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int status; adapter_t *adapter = phy->adapter; @@ -2245,7 +2252,7 @@ static int xaui_direct_get_link_status(s XGM_REG(A_XGM_SERDES_STAT2, phy->addr)) | t3_read_reg(adapter, XGM_REG(A_XGM_SERDES_STAT3, phy->addr)); - *link_ok = !(status & F_LOWSIG0); + *link_state = status & F_LOWSIG0 ? PHY_LINK_DOWN : PHY_LINK_UP; } if (speed) *speed = SPEED_10000; Modified: head/sys/dev/cxgb/common/cxgb_aq100x.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 11 07:51:58 2015 (r276959) @@ -350,7 +350,7 @@ aq100x_set_speed_duplex(struct cphy *phy } static int -aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex, +aq100x_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { int err; @@ -440,8 +440,8 @@ aq100x_get_link_status(struct cphy *phy, link = 1; done: - if (link_ok) - *link_ok = link; + if (link_state) + *link_state = link ? PHY_LINK_UP : PHY_LINK_DOWN; return (0); } Modified: head/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- head/sys/dev/cxgb/common/cxgb_common.h Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_common.h Sun Jan 11 07:51:58 2015 (r276959) @@ -543,6 +543,12 @@ enum { phy_modtype_unknown }; +enum { + PHY_LINK_DOWN = 0, + PHY_LINK_UP, + PHY_LINK_PARTIAL +}; + /* PHY operations */ struct cphy_ops { int (*reset)(struct cphy *phy, int wait); @@ -558,7 +564,7 @@ struct cphy_ops { int (*advertise)(struct cphy *phy, unsigned int advertise_map); int (*set_loopback)(struct cphy *phy, int mmd, int dir, int enable); int (*set_speed_duplex)(struct cphy *phy, int speed, int duplex); - int (*get_link_status)(struct cphy *phy, int *link_ok, int *speed, + int (*get_link_status)(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc); int (*power_down)(struct cphy *phy, int enable); }; @@ -567,6 +573,7 @@ struct cphy_ops { struct cphy { u8 addr; /* PHY address */ u8 modtype; /* PHY module type */ + u8 rst; unsigned int priv; /* scratch pad */ unsigned int caps; /* PHY capabilities */ adapter_t *adapter; /* associated adapter */ Modified: head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 11 07:51:58 2015 (r276959) @@ -185,7 +185,7 @@ static int mv88e1xxx_set_loopback(struct on ? BMCR_LOOPBACK : 0); } -static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_ok, +static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { u32 status; @@ -206,8 +206,9 @@ static int mv88e1xxx_get_link_status(str else sp = SPEED_1000; } - if (link_ok) - *link_ok = (status & V_PSSR_LINK) != 0; + if (link_state) + *link_state = status & V_PSSR_LINK ? PHY_LINK_UP : + PHY_LINK_DOWN; if (speed) *speed = sp; if (duplex) Modified: head/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 11 07:51:58 2015 (r276959) @@ -1520,7 +1520,7 @@ static void t3_clear_faults(adapter_t *a */ void t3_link_changed(adapter_t *adapter, int port_id) { - int link_ok, speed, duplex, fc, link_fault; + int link_ok, speed, duplex, fc, link_fault, link_state; struct port_info *pi = adap2pinfo(adapter, port_id); struct cphy *phy = &pi->phy; struct cmac *mac = &pi->mac; @@ -1532,7 +1532,14 @@ void t3_link_changed(adapter_t *adapter, fc = lc->fc; link_fault = 0; - phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + phy->ops->get_link_status(phy, &link_state, &speed, &duplex, &fc); + link_ok = (link_state == PHY_LINK_UP); + if (link_state != PHY_LINK_PARTIAL) + phy->rst = 0; + else if (++phy->rst == 3) { + phy->ops->reset(phy, 0); + phy->rst = 0; + } if (link_ok == 0) pi->link_fault = LF_NO; Modified: head/sys/dev/cxgb/common/cxgb_tn1010.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 11 07:51:58 2015 (r276959) @@ -129,7 +129,7 @@ static int tn1010_advertise(struct cphy ADVERTISE_LOOP_TIMING); } -static int tn1010_get_link_status(struct cphy *phy, int *link_ok, +static int tn1010_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int status, lpa, adv; @@ -139,8 +139,9 @@ static int tn1010_get_link_status(struct if (err) return err; - if (link_ok) - *link_ok = (status & F_LINK_STAT) != 0; + if (link_state) + *link_state = status & F_LINK_STAT ? PHY_LINK_UP : + PHY_LINK_DOWN; if (G_ANEG_STAT(status) == ANEG_COMPLETE) { sp = (status & F_ANEG_SPEED_1G) ? SPEED_1000 : SPEED_10000; Modified: head/sys/dev/cxgb/common/cxgb_vsc8211.c ============================================================================== --- head/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 11 07:51:58 2015 (r276959) @@ -129,7 +129,7 @@ static int vsc8211_autoneg_restart(struc BMCR_ANRESTART); } -static int vsc8211_get_link_status(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -141,7 +141,7 @@ static int vsc8211_get_link_status(struc if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -150,7 +150,8 @@ static int vsc8211_get_link_status(struc err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; @@ -201,7 +202,7 @@ static int vsc8211_get_link_status(struc return 0; } -static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -213,7 +214,7 @@ static int vsc8211_get_link_status_fiber if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -222,7 +223,8 @@ static int vsc8211_get_link_status_fiber err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; Modified: head/sys/dev/cxgb/cxgb_main.c ============================================================================== --- head/sys/dev/cxgb/cxgb_main.c Sun Jan 11 07:13:23 2015 (r276958) +++ head/sys/dev/cxgb/cxgb_main.c Sun Jan 11 07:51:58 2015 (r276959) @@ -2289,7 +2289,8 @@ check_link_status(void *arg, int pending t3_link_changed(sc, pi->port_id); - if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ)) + if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ) || + pi->link_config.link_ok == 0) callout_reset(&pi->link_check_ch, hz, link_check_callout, pi); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 09:25:02 2015 Return-Path: Delivered-To: svn-src-head@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 958F3445; Sun, 11 Jan 2015 09:25: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 81920ADF; Sun, 11 Jan 2015 09:25: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 t0B9P2hD005369; Sun, 11 Jan 2015 09:25:02 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0B9P2Sg005368; Sun, 11 Jan 2015 09:25:02 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501110925.t0B9P2Sg005368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 11 Jan 2015 09:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276962 - head/lib/liblzma X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 09:25:02 -0000 Author: bapt Date: Sun Jan 11 09:25:01 2015 New Revision: 276962 URL: https://svnweb.freebsd.org/changeset/base/276962 Log: Do not regenerate and install liblzma.pc when only build libraries aka do not regenerate while generating 32bits libs Reported by: antoine Modified: head/lib/liblzma/Makefile Modified: head/lib/liblzma/Makefile ============================================================================== --- head/lib/liblzma/Makefile Sun Jan 11 08:40:01 2015 (r276961) +++ head/lib/liblzma/Makefile Sun Jan 11 09:25:01 2015 (r276962) @@ -148,12 +148,13 @@ CFLAGS+= -DSYMBOL_VERSIONING CLEANFILES+= liblzma.pc +.if !defined(LIBRARIES_ONLY) all: liblzma.pc liblzma.pc: liblzma.pc.in @sed -e 's,@prefix@,/usr,g ; \ s,@exec_prefix@,/usr,g ; \ - s,@libdir@,${LIBDIR},g ; \ - s,@includedir@,${INCLUDEDIR},g ; \ + s,@libdir@,/usr/lib,g ; \ + s,@includedir@,/usr/include,g ; \ s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ s,@PTHREAD_CFLAGS@,,g ; \ @@ -162,5 +163,6 @@ liblzma.pc: liblzma.pc.in beforeinstall: @${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ liblzma.pc ${DESTDIR}${LIBDATADIR}/pkgconfig +.endif .include From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 10:26:50 2015 Return-Path: Delivered-To: svn-src-head@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 9DE7BEB0; Sun, 11 Jan 2015 10:26: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 89655FB7; Sun, 11 Jan 2015 10:26: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 t0BAQoJV033715; Sun, 11 Jan 2015 10:26:50 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BAQo8a033714; Sun, 11 Jan 2015 10:26:50 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501111026.t0BAQo8a033714@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 11 Jan 2015 10:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276963 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 10:26:50 -0000 Author: andrew Date: Sun Jan 11 10:26:49 2015 New Revision: 276963 URL: https://svnweb.freebsd.org/changeset/base/276963 Log: Rework the GIC driver to ease the import of the arm_intrng branch. The common code has been pulled out to static functions. Modified: head/sys/arm/arm/gic.c Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Jan 11 09:25:01 2015 (r276962) +++ head/sys/arm/arm/gic.c Sun Jan 11 10:26:49 2015 (r276963) @@ -155,10 +155,10 @@ arm_gic_probe(device_t dev) return (BUS_PROBE_DEFAULT); } -void -gic_init_secondary(void) +static void +arm_gic_init_secondary(device_t dev) { - struct arm_gic_softc *sc = arm_gic_sc; + struct arm_gic_softc *sc = device_get_softc(dev); int i; for (i = 0; i < sc->nirqs; i += 4) @@ -311,21 +311,9 @@ arm_gic_attach(device_t dev) return (0); } -static void -gic_post_filter(void *arg) -{ - struct arm_gic_softc *sc = arm_gic_sc; - uintptr_t irq = (uintptr_t) arg; - - if (irq > GIC_LAST_IPI) - arm_irq_memory_barrier(irq); - gic_c_write_4(sc, GICC_EOIR, irq); -} - -int -arm_get_next_irq(int last_irq) +static int +arm_gic_next_irq(struct arm_gic_softc *sc, int last_irq) { - struct arm_gic_softc *sc = arm_gic_sc; uint32_t active_irq; active_irq = gic_c_read_4(sc, GICC_IAR); @@ -348,31 +336,11 @@ arm_get_next_irq(int last_irq) return active_irq; } -void -arm_mask_irq(uintptr_t nb) -{ - struct arm_gic_softc *sc = arm_gic_sc; - - gic_d_write_4(sc, GICD_ICENABLER(nb >> 5), (1UL << (nb & 0x1F))); - gic_c_write_4(sc, GICC_EOIR, nb); -} - -void -arm_unmask_irq(uintptr_t nb) -{ - struct arm_gic_softc *sc = arm_gic_sc; - - if (nb > GIC_LAST_IPI) - arm_irq_memory_barrier(nb); - gic_d_write_4(sc, GICD_ISENABLER(nb >> 5), (1UL << (nb & 0x1F))); -} - static int -gic_config_irq(int irq, enum intr_trigger trig, +arm_gic_config(device_t dev, int irq, enum intr_trigger trig, enum intr_polarity pol) { - struct arm_gic_softc *sc = arm_gic_sc; - device_t dev = sc->gic_dev; + struct arm_gic_softc *sc = device_get_softc(dev); uint32_t reg; uint32_t mask; @@ -421,11 +389,32 @@ invalid_args: return (EINVAL); } + +static void +arm_gic_mask(device_t dev, int irq) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + gic_d_write_4(sc, GICD_ICENABLER(irq >> 5), (1UL << (irq & 0x1F))); + gic_c_write_4(sc, GICC_EOIR, irq); +} + +static void +arm_gic_unmask(device_t dev, int irq) +{ + struct arm_gic_softc *sc = device_get_softc(dev); + + if (irq > GIC_LAST_IPI) + arm_irq_memory_barrier(irq); + + gic_d_write_4(sc, GICD_ISENABLER(irq >> 5), (1UL << (irq & 0x1F))); +} + #ifdef SMP -void -pic_ipi_send(cpuset_t cpus, u_int ipi) +static void +arm_gic_ipi_send(device_t dev, cpuset_t cpus, u_int ipi) { - struct arm_gic_softc *sc = arm_gic_sc; + struct arm_gic_softc *sc = device_get_softc(dev); uint32_t val = 0, i; for (i = 0; i < MAXCPU; i++) @@ -435,8 +424,8 @@ pic_ipi_send(cpuset_t cpus, u_int ipi) gic_d_write_4(sc, GICD_SGIR(0), val | ipi); } -int -pic_ipi_read(int i) +static int +arm_gic_ipi_read(device_t dev, int i) { if (i != -1) { @@ -452,9 +441,79 @@ pic_ipi_read(int i) return (0x3ff); } +static void +arm_gic_ipi_clear(device_t dev, int ipi) +{ + /* no-op */ +} +#endif + +static void +gic_post_filter(void *arg) +{ + struct arm_gic_softc *sc = arm_gic_sc; + uintptr_t irq = (uintptr_t) arg; + + if (irq > GIC_LAST_IPI) + arm_irq_memory_barrier(irq); + gic_c_write_4(sc, GICC_EOIR, irq); +} + +static int +gic_config_irq(int irq, enum intr_trigger trig, enum intr_polarity pol) +{ + + return (arm_gic_config(arm_gic_sc->gic_dev, irq, trig, pol)); +} + +void +arm_mask_irq(uintptr_t nb) +{ + + arm_gic_mask(arm_gic_sc->gic_dev, nb); +} + +void +arm_unmask_irq(uintptr_t nb) +{ + + arm_gic_unmask(arm_gic_sc->gic_dev, nb); +} + +int +arm_get_next_irq(int last_irq) +{ + + return (arm_gic_next_irq(arm_gic_sc, last_irq)); +} + +void +gic_init_secondary(void) +{ + + arm_gic_init_secondary(arm_gic_sc->gic_dev); +} + +#ifdef SMP +void +pic_ipi_send(cpuset_t cpus, u_int ipi) +{ + + arm_gic_ipi_send(arm_gic_sc->gic_dev, cpus, ipi); +} + +int +pic_ipi_read(int i) +{ + + return (arm_gic_ipi_read(arm_gic_sc->gic_dev, i)); +} + void pic_ipi_clear(int ipi) { + + arm_gic_ipi_clear(arm_gic_sc->gic_dev, ipi); } #endif From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 15:00:09 2015 Return-Path: Delivered-To: svn-src-head@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 7A560480; Sun, 11 Jan 2015 15:00: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 654C7BA8; Sun, 11 Jan 2015 15:00: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 t0BF09RA070473; Sun, 11 Jan 2015 15:00:09 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BF08xT070470; Sun, 11 Jan 2015 15:00:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111500.t0BF08xT070470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 15:00:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276981 - head/contrib/ofed/libmlx4/src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 15:00:09 -0000 Author: hselasky Date: Sun Jan 11 15:00:08 2015 New Revision: 276981 URL: https://svnweb.freebsd.org/changeset/base/276981 Log: Fix support for ConnectX2 hardware. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/contrib/ofed/libmlx4/src/mlx4-abi.h head/contrib/ofed/libmlx4/src/mlx4.c head/contrib/ofed/libmlx4/src/mlx4.h Modified: head/contrib/ofed/libmlx4/src/mlx4-abi.h ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4-abi.h Sun Jan 11 14:49:18 2015 (r276980) +++ head/contrib/ofed/libmlx4/src/mlx4-abi.h Sun Jan 11 15:00:08 2015 (r276981) @@ -38,6 +38,13 @@ #define MLX4_UVERBS_MIN_ABI_VERSION 2 #define MLX4_UVERBS_MAX_ABI_VERSION 4 +struct mlx4_alloc_ucontext_resp_v3 { + struct ibv_get_context_resp ibv_resp; + __u32 qp_tab_size; + __u16 bf_reg_size; + __u16 bf_regs_per_page; +}; + struct mlx4_alloc_ucontext_resp { struct ibv_get_context_resp ibv_resp; __u32 dev_caps; Modified: head/contrib/ofed/libmlx4/src/mlx4.c ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4.c Sun Jan 11 14:49:18 2015 (r276980) +++ head/contrib/ofed/libmlx4/src/mlx4.c Sun Jan 11 15:00:08 2015 (r276981) @@ -142,8 +142,10 @@ static struct ibv_context *mlx4_alloc_co struct mlx4_context *context; struct ibv_get_context cmd; struct mlx4_alloc_ucontext_resp resp; + struct mlx4_alloc_ucontext_resp_v3 resp_v3; int i; struct ibv_device_attr dev_attrs; + unsigned int bf_reg_size; context = calloc(1, sizeof *context); if (!context) @@ -151,11 +153,26 @@ static struct ibv_context *mlx4_alloc_co context->ibv_ctx.cmd_fd = cmd_fd; - if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, - &resp.ibv_resp, sizeof resp)) - goto err_free; + if (to_mdev(ibdev)->driver_abi_ver > 3) { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp.ibv_resp, sizeof resp)) + goto err_free; + + context->num_qps = resp.qp_tab_size; + context->num_xrc_srqs = resp.qp_tab_size; + bf_reg_size = resp.bf_reg_size; + context->cqe_size = resp.cqe_size; + } else { + if (ibv_cmd_get_context(&context->ibv_ctx, &cmd, sizeof cmd, + &resp_v3.ibv_resp, sizeof resp_v3)) + goto err_free; + + context->num_qps = resp_v3.qp_tab_size; + context->num_xrc_srqs = resp_v3.qp_tab_size; + bf_reg_size = resp_v3.bf_reg_size; + context->cqe_size = 32; + } - context->num_qps = resp.qp_tab_size; context->qp_table_shift = ffs(context->num_qps) - 1 - MLX4_QP_TABLE_BITS; context->qp_table_mask = (1 << context->qp_table_shift) - 1; @@ -163,7 +180,6 @@ static struct ibv_context *mlx4_alloc_co for (i = 0; i < MLX4_QP_TABLE_SIZE; ++i) context->qp_table[i].refcnt = 0; - context->num_xrc_srqs = resp.qp_tab_size; context->xrc_srq_table_shift = ffs(context->num_xrc_srqs) - 1 - MLX4_XRC_SRQ_TABLE_BITS; context->xrc_srq_table_mask = (1 << context->xrc_srq_table_shift) - 1; @@ -182,7 +198,7 @@ static struct ibv_context *mlx4_alloc_co if (context->uar == MAP_FAILED) goto err_free; - if (resp.bf_reg_size) { + if (bf_reg_size) { context->bf_page = mmap(NULL, to_mdev(ibdev)->page_size, PROT_WRITE, MAP_SHARED, cmd_fd, to_mdev(ibdev)->page_size); @@ -192,7 +208,7 @@ static struct ibv_context *mlx4_alloc_co context->bf_page = NULL; context->bf_buf_size = 0; } else { - context->bf_buf_size = resp.bf_reg_size / 2; + context->bf_buf_size = bf_reg_size / 2; context->bf_offset = 0; pthread_spin_init(&context->bf_lock, PTHREAD_PROCESS_PRIVATE); } @@ -201,7 +217,6 @@ static struct ibv_context *mlx4_alloc_co context->bf_buf_size = 0; } - context->cqe_size = resp.cqe_size; pthread_spin_init(&context->uar_lock, PTHREAD_PROCESS_PRIVATE); context->ibv_ctx.ops = mlx4_ctx_ops; @@ -294,6 +309,7 @@ found: dev->ibv_dev.ops = mlx4_dev_ops; dev->page_size = sysconf(_SC_PAGESIZE); + dev->driver_abi_ver = abi_version; return &dev->ibv_dev; } Modified: head/contrib/ofed/libmlx4/src/mlx4.h ============================================================================== --- head/contrib/ofed/libmlx4/src/mlx4.h Sun Jan 11 14:49:18 2015 (r276980) +++ head/contrib/ofed/libmlx4/src/mlx4.h Sun Jan 11 15:00:08 2015 (r276981) @@ -162,6 +162,7 @@ enum { struct mlx4_device { struct ibv_device ibv_dev; int page_size; + int driver_abi_ver; }; struct mlx4_db_page; From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 16:15:32 2015 Return-Path: Delivered-To: svn-src-head@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 DB23FE12; Sun, 11 Jan 2015 16:15: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 AC68D231; Sun, 11 Jan 2015 16:15: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 t0BGFWb2007052; Sun, 11 Jan 2015 16:15:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BGFWSr007050; Sun, 11 Jan 2015 16:15:32 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501111615.t0BGFWSr007050@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 11 Jan 2015 16:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276982 - in head: share/man/man9 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:15:33 -0000 Author: hselasky Date: Sun Jan 11 16:15:31 2015 New Revision: 276982 URL: https://svnweb.freebsd.org/changeset/base/276982 Log: Remove no longer used "M_FLOWID" flag and update the netisr manpage. This patch completes process started by r275358. Sponsored by: Mellanox Technologies Modified: head/share/man/man9/netisr.9 head/sys/sys/mbuf.h Modified: head/share/man/man9/netisr.9 ============================================================================== --- head/share/man/man9/netisr.9 Sun Jan 11 15:00:08 2015 (r276981) +++ head/share/man/man9/netisr.9 Sun Jan 11 16:15:31 2015 (r276982) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 22, 2010 +.Dd January 11, 2015 .Dt NETISR 9 .Os .Sh NAME @@ -126,13 +126,13 @@ MIB names, so should not contain whitesp Protocol handler function that will be invoked on each packet received for the protocol. .It Vt netisr_m2flow_t Va nh_m2flow -Optional protocol function to generate a flow ID and set -.Dv M_FLOWID -for packets that do not enter +Optional protocol function to generate a flow ID and set a valid +hashtype for packets that enter the .Nm with -.Dv M_FLOWID -defined. +.Dv M_HASHTYPE_GET(m) +equal to +.Dv M_HASHTYPE_NONE . Will be used only with .Dv NETISR_POLICY_FLOW . .It Vt netisr_m2cpuid_t Va nh_m2cpuid Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Jan 11 15:00:08 2015 (r276981) +++ head/sys/sys/mbuf.h Sun Jan 11 16:15:31 2015 (r276982) @@ -221,7 +221,7 @@ struct mbuf { #define M_MCAST 0x00000020 /* send/received as link-level multicast */ #define M_PROMISC 0x00000040 /* packet was not for us */ #define M_VLANTAG 0x00000080 /* ether_vtag is valid */ -#define M_FLOWID 0x00000100 /* deprecated: flowid is valid */ +#define M_UNUSED_8 0x00000100 /* --available-- */ #define M_NOFREE 0x00000200 /* do not free mbuf, embedded in cluster */ #define M_PROTO1 0x00001000 /* protocol-specific */ @@ -248,7 +248,7 @@ struct mbuf { * Flags preserved when copying m_pkthdr. */ #define M_COPYFLAGS \ - (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG|M_FLOWID| \ + (M_PKTHDR|M_EOR|M_RDONLY|M_BCAST|M_MCAST|M_PROMISC|M_VLANTAG| \ M_PROTOFLAGS) /* @@ -256,7 +256,7 @@ struct mbuf { */ #define M_FLAG_BITS \ "\20\1M_EXT\2M_PKTHDR\3M_EOR\4M_RDONLY\5M_BCAST\6M_MCAST" \ - "\7M_PROMISC\10M_VLANTAG\11M_FLOWID" + "\7M_PROMISC\10M_VLANTAG" #define M_FLAG_PROTOBITS \ "\15M_PROTO1\16M_PROTO2\17M_PROTO3\20M_PROTO4\21M_PROTO5" \ "\22M_PROTO6\23M_PROTO7\24M_PROTO8\25M_PROTO9\26M_PROTO10" \ From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 16:36:40 2015 Return-Path: Delivered-To: svn-src-head@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 E7DD7356; Sun, 11 Jan 2015 16:36: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 D373E5F9; Sun, 11 Jan 2015 16:36: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 t0BGaewK016734; Sun, 11 Jan 2015 16:36:40 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BGael1016733; Sun, 11 Jan 2015 16:36:40 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501111636.t0BGael1016733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 11 Jan 2015 16:36:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276983 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:36:41 -0000 Author: mav Date: Sun Jan 11 16:36:39 2015 New Revision: 276983 URL: https://svnweb.freebsd.org/changeset/base/276983 Log: When aggregating TRIM segments, move the new one to the list end. New segment at the list head may block all TRIM requests until txg of that segment can be processed. On my random I/O tests this change reduce peak TRIM list length from 650 to 450 segments. Hopefully it should reduce TRIM burstiness when list processing is unblocked. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 11 16:15:31 2015 (r276982) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Sun Jan 11 16:36:39 2015 (r276983) @@ -244,17 +244,23 @@ trim_map_segment_add(trim_map_t *tm, uin ts_after->ts_start = ts_before->ts_start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); kmem_free(ts_before, sizeof (*ts_before)); } else if (merge_before) { TRIM_MAP_SINC(tm, end - ts_before->ts_end); ts_before->ts_end = end; ts_before->ts_txg = txg; ts_before->ts_time = time; + list_remove(&tm->tm_head, ts_before); + list_insert_tail(&tm->tm_head, ts_before); } else if (merge_after) { TRIM_MAP_SINC(tm, ts_after->ts_start - start); ts_after->ts_start = start; ts_after->ts_txg = txg; ts_after->ts_time = time; + list_remove(&tm->tm_head, ts_after); + list_insert_tail(&tm->tm_head, ts_after); } else { TRIM_MAP_SINC(tm, end - start); TRIM_MAP_QINC(tm); From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 16:46:46 2015 Return-Path: Delivered-To: svn-src-head@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 93A1C4F1; Sun, 11 Jan 2015 16:46: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 7E2096C9; Sun, 11 Jan 2015 16:46: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 t0BGkkRY021475; Sun, 11 Jan 2015 16:46:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BGkiCR021466; Sun, 11 Jan 2015 16:46:44 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501111646.t0BGkiCR021466@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Sun, 11 Jan 2015 16:46:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276984 - in head/sys/arm: allwinner/a20 altera/socfpga arm freescale/imx include rockchip samsung/exynos ti/omap4 xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 16:46:46 -0000 Author: andrew Date: Sun Jan 11 16:46:43 2015 New Revision: 276984 URL: https://svnweb.freebsd.org/changeset/base/276984 Log: Rename gic_init_secondary to arm_init_secondary_ic to help with the merge of the arm_intrng project branch. Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/arm/gic.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/include/intr.h head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c ============================================================================== --- head/sys/arm/allwinner/a20/a20_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/allwinner/a20/a20_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -57,7 +57,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/altera/socfpga/socfpga_mp.c ============================================================================== --- head/sys/arm/altera/socfpga/socfpga_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/altera/socfpga/socfpga_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -84,7 +84,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/arm/gic.c ============================================================================== --- head/sys/arm/arm/gic.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/arm/gic.c Sun Jan 11 16:46:43 2015 (r276984) @@ -488,7 +488,7 @@ arm_get_next_irq(int last_irq) } void -gic_init_secondary(void) +arm_init_secondary_ic(void) { arm_gic_init_secondary(arm_gic_sc->gic_dev); Modified: head/sys/arm/freescale/imx/imx6_mp.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/freescale/imx/imx6_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -66,7 +66,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/include/intr.h ============================================================================== --- head/sys/arm/include/intr.h Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/include/intr.h Sun Jan 11 16:46:43 2015 (r276984) @@ -85,7 +85,7 @@ extern int (*arm_config_irq)(int irq, en void arm_irq_memory_barrier(uintptr_t); -void gic_init_secondary(void); +void arm_init_secondary_ic(void); int gic_decode_fdt(uint32_t iparentnode, uint32_t *intrcells, int *interrupt, int *trig, int *pol); Modified: head/sys/arm/rockchip/rk30xx_mp.c ============================================================================== --- head/sys/arm/rockchip/rk30xx_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/rockchip/rk30xx_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -79,7 +79,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/samsung/exynos/exynos5_mp.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos5_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/samsung/exynos/exynos5_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -70,7 +70,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/ti/omap4/omap4_mp.c ============================================================================== --- head/sys/arm/ti/omap4/omap4_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/ti/omap4/omap4_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Sun Jan 11 16:36:39 2015 (r276983) +++ head/sys/arm/xilinx/zy7_mp.c Sun Jan 11 16:46:43 2015 (r276984) @@ -43,7 +43,7 @@ void platform_mp_init_secondary(void) { - gic_init_secondary(); + arm_init_secondary_ic(); } void From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 17:00:25 2015 Return-Path: Delivered-To: svn-src-head@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 E67E37EC; Sun, 11 Jan 2015 17:00: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 D2AA6807; Sun, 11 Jan 2015 17:00: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 t0BH0PcE027915; Sun, 11 Jan 2015 17:00:25 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BH0PDc027914; Sun, 11 Jan 2015 17:00:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501111700.t0BH0PDc027914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 17:00:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276985 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 17:00:26 -0000 Author: ian Date: Sun Jan 11 17:00:24 2015 New Revision: 276985 URL: https://svnweb.freebsd.org/changeset/base/276985 Log: Store the shadow command/mode register in the softc, not a local static var. Submitted by: Michal Meloun 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 Sun Jan 11 16:46:43 2015 (r276984) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 11 17:00:24 2015 (r276985) @@ -124,6 +124,7 @@ struct bcm_sdhci_softc { bus_dma_tag_t sc_dma_tag; bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; + uint32_t cmd_and_mode; }; static int bcm_sdhci_probe(device_t); @@ -341,6 +342,14 @@ bcm_sdhci_read_2(device_t dev, struct sd struct bcm_sdhci_softc *sc = device_get_softc(dev); uint32_t val = RD4(sc, off & ~3); + /* + * Standard 32-bit handling of command and transfer mode. + */ + if (off == SDHCI_TRANSFER_MODE) { + return (sc->cmd_and_mode >> 16); + } else if (off == SDHCI_COMMAND_FLAGS) { + return (sc->cmd_and_mode & 0x0000ffff); + } return ((val >> (off & 3)*8) & 0xffff); } @@ -375,16 +384,15 @@ static void bcm_sdhci_write_2(device_t dev, struct sdhci_slot *slot, bus_size_t off, uint16_t val) { struct bcm_sdhci_softc *sc = device_get_softc(dev); - static uint32_t cmd_and_trandfer_mode; uint32_t val32; if (off == SDHCI_COMMAND_FLAGS) - val32 = cmd_and_trandfer_mode; + val32 = sc->cmd_and_mode; else val32 = RD4(sc, off & ~3); val32 &= ~(0xffff << (off & 3)*8); val32 |= (val << (off & 3)*8); if (off == SDHCI_TRANSFER_MODE) - cmd_and_trandfer_mode = val32; + sc->cmd_and_mode = val32; else WR4(sc, off & ~3, val32); } From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 18:43:46 2015 Return-Path: Delivered-To: svn-src-head@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 4FF0B259; Sun, 11 Jan 2015 18: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 22B8D155; Sun, 11 Jan 2015 18: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 t0BIhkqj078317; Sun, 11 Jan 2015 18:43:46 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BIhjrs078316; Sun, 11 Jan 2015 18:43:45 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501111843.t0BIhjrs078316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 11 Jan 2015 18:43:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276993 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 18:43:46 -0000 Author: adrian Date: Sun Jan 11 18:43:45 2015 New Revision: 276993 URL: https://svnweb.freebsd.org/changeset/base/276993 Log: Switch around the order of static inline to be in line with how it's used elsewhere, and to keep gcc-4.7 happy. This is a request from the DragonflyBSD project. Modified: head/sys/net80211/ieee80211_ratectl.h Modified: head/sys/net80211/ieee80211_ratectl.h ============================================================================== --- head/sys/net80211/ieee80211_ratectl.h Sun Jan 11 18:39:27 2015 (r276992) +++ head/sys/net80211/ieee80211_ratectl.h Sun Jan 11 18:43:45 2015 (r276993) @@ -62,13 +62,13 @@ void ieee80211_ratectl_set(struct ieee80 MALLOC_DECLARE(M_80211_RATECTL); -static void __inline +static __inline void ieee80211_ratectl_deinit(struct ieee80211vap *vap) { vap->iv_rate->ir_deinit(vap); } -static void __inline +static __inline void ieee80211_ratectl_node_init(struct ieee80211_node *ni) { const struct ieee80211vap *vap = ni->ni_vap; @@ -76,7 +76,7 @@ ieee80211_ratectl_node_init(struct ieee8 vap->iv_rate->ir_node_init(ni); } -static void __inline +static __inline void ieee80211_ratectl_node_deinit(struct ieee80211_node *ni) { const struct ieee80211vap *vap = ni->ni_vap; @@ -92,14 +92,14 @@ ieee80211_ratectl_rate(struct ieee80211_ return vap->iv_rate->ir_rate(ni, arg, iarg); } -static void __inline +static __inline void ieee80211_ratectl_tx_complete(const struct ieee80211vap *vap, const struct ieee80211_node *ni, int status, void *arg1, void *arg2) { vap->iv_rate->ir_tx_complete(vap, ni, status, arg1, arg2); } -static void __inline +static __inline void ieee80211_ratectl_tx_update(const struct ieee80211vap *vap, const struct ieee80211_node *ni, void *arg1, void *arg2, void *arg3) { @@ -108,7 +108,7 @@ ieee80211_ratectl_tx_update(const struct vap->iv_rate->ir_tx_update(vap, ni, arg1, arg2, arg3); } -static void __inline +static __inline void ieee80211_ratectl_setinterval(const struct ieee80211vap *vap, int msecs) { if (vap->iv_rate->ir_setinterval == NULL) From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:36 2015 Return-Path: Delivered-To: svn-src-head@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 4585579A; Sun, 11 Jan 2015 19: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 323C826F; Sun, 11 Jan 2015 19: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 t0BJ0aM2086562; Sun, 11 Jan 2015 19:00:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0aeL086561; Sun, 11 Jan 2015 19:00:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0aeL086561@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276996 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:36 -0000 Author: gjb Date: Sun Jan 11 19:00:35 2015 New Revision: 276996 URL: https://svnweb.freebsd.org/changeset/base/276996 Log: Document r274085, vt(4) is now default. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 18:56:16 2015 (r276995) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:35 2015 (r276996) @@ -195,6 +195,14 @@ device, providing access to HPET from userspace. + The &man.vt.4; driver has been made the + default system console driver. The &man.syscons.4; driver is + still available, and can be enabled by adding + kern.vty=sc in &man.loader.conf.5;. + Alternatively, &man.syscons.4; can be enabled at boot time by + entering set kern.vty=sc at the + &man.loader.8; prompt. + Virtualization Support From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:39 2015 Return-Path: Delivered-To: svn-src-head@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 A37738E5; Sun, 11 Jan 2015 19:00: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 8FC2C270; Sun, 11 Jan 2015 19:00: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 t0BJ0dnY086612; Sun, 11 Jan 2015 19:00:39 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0dxL086610; Sun, 11 Jan 2015 19:00:39 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0dxL086610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276997 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:39 -0000 Author: gjb Date: Sun Jan 11 19:00:38 2015 New Revision: 276997 URL: https://svnweb.freebsd.org/changeset/base/276997 Log: Document r274246, gre(4) overhaul, me(4) addition. Add Yandex LLC to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:35 2015 (r276996) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:38 2015 (r276997) @@ -319,6 +319,11 @@ driver is analogous to &man.vlan.4;, but is designed to be better suited for large, multiple-tenant datacenter environments. + + The &man.gre.4; driver has been + significantly overhauled, and has been split into two + separate modules, &man.gre.4; and &man.me.4;. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:00:35 2015 (r276996) +++ head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:00:38 2015 (r276997) @@ -29,3 +29,5 @@ + + From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:42 2015 Return-Path: Delivered-To: svn-src-head@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 92BDA9D3; Sun, 11 Jan 2015 19:00: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 7F85C271; Sun, 11 Jan 2015 19:00: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 t0BJ0gSv086662; Sun, 11 Jan 2015 19:00:42 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0g9e086661; Sun, 11 Jan 2015 19:00:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0g9e086661@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276998 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:42 -0000 Author: gjb Date: Sun Jan 11 19:00:41 2015 New Revision: 276998 URL: https://svnweb.freebsd.org/changeset/base/276998 Log: Document r274386, apci(4) and pci(4) fix for ACPI S3 state. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:38 2015 (r276997) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:41 2015 (r276998) @@ -203,6 +203,11 @@ entering set kern.vty=sc at the &man.loader.8; prompt. + An issue that could cause a system to + hang when entering ACPI S3 + state (suspend to RAM) has been corrected + in the &man.acpi.4; and &man.pci.4; drivers. + Virtualization Support From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:45 2015 Return-Path: Delivered-To: svn-src-head@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 48132B07; Sun, 11 Jan 2015 19:00: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 35415272; Sun, 11 Jan 2015 19:00: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 t0BJ0jV2086713; Sun, 11 Jan 2015 19:00:45 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0jWg086712; Sun, 11 Jan 2015 19:00:45 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0jWg086712@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r276999 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:45 -0000 Author: gjb Date: Sun Jan 11 19:00:44 2015 New Revision: 276999 URL: https://svnweb.freebsd.org/changeset/base/276999 Log: Document r274394, bsdconfig(8) skips initial tzetup(8) screen if run within a VM. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:41 2015 (r276998) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:44 2015 (r276999) @@ -606,6 +606,13 @@ applications to work over compatible NICs. + The &man.bsdconfig.8; utility has been + updated to skip the initial &man.tzsetup.8; + UTC versus wall-clock time prompt when run + in a virtual machine, determined when the + kern.vm_guest &man.sysctl.8; is set to + 1. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:50 2015 Return-Path: Delivered-To: svn-src-head@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 AD080E2B; Sun, 11 Jan 2015 19:00: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 9A653276; Sun, 11 Jan 2015 19:00: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 t0BJ0ocX087365; Sun, 11 Jan 2015 19:00:50 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0oiI087364; Sun, 11 Jan 2015 19:00:50 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0oiI087364@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277001 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:50 -0000 Author: gjb Date: Sun Jan 11 19:00:49 2015 New Revision: 277001 URL: https://svnweb.freebsd.org/changeset/base/277001 Log: Document r274960, elfdump(1) cap_limits support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:47 2015 (r277000) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:49 2015 (r277001) @@ -618,6 +618,10 @@ kern.vm_guest &man.sysctl.8; is set to 1. + The &man.elfdump.1; utility has been + updated to support capability mode provided by + &man.capsicum.4;. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:56 2015 Return-Path: Delivered-To: svn-src-head@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 36CD110C; Sun, 11 Jan 2015 19:00: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 237CF282; Sun, 11 Jan 2015 19:00: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 t0BJ0uMM087469; Sun, 11 Jan 2015 19:00:56 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0u04087468; Sun, 11 Jan 2015 19:00:56 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0u04087468@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277003 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:56 -0000 Author: gjb Date: Sun Jan 11 19:00:55 2015 New Revision: 277003 URL: https://svnweb.freebsd.org/changeset/base/277003 Log: Document r275171, r275190: hpwmc(4) performance counter sampling fixes for G4 and G5 class processors. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:52 2015 (r277002) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:55 2015 (r277003) @@ -213,6 +213,10 @@ certain &arch.powerpc; hardware, such as aluminum PowerBook ®. + The &man.hwpmc.4; + driver has been updated to correct performance counter sampling + on G4 (MPC74xxx) and G5 class processors. + Virtualization Support From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:53 2015 Return-Path: Delivered-To: svn-src-head@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 846C7F4D; Sun, 11 Jan 2015 19:00: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 71CCB27B; Sun, 11 Jan 2015 19:00: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 t0BJ0rRa087415; Sun, 11 Jan 2015 19:00:53 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0rnr087414; Sun, 11 Jan 2015 19:00:53 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0rnr087414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277002 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:53 -0000 Author: gjb Date: Sun Jan 11 19:00:52 2015 New Revision: 277002 URL: https://svnweb.freebsd.org/changeset/base/277002 Log: Document r274987, gpio(3) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:49 2015 (r277001) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:52 2015 (r277002) @@ -622,6 +622,10 @@ updated to support capability mode provided by &man.capsicum.4;. + The &man.gpio.3; library has been added, + providing a wrapper around the &man.gpio.4; kernel + interface. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:47 2015 Return-Path: Delivered-To: svn-src-head@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 E0061C22; Sun, 11 Jan 2015 19:00: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 CD67A275; Sun, 11 Jan 2015 19:00: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 t0BJ0l5G087313; Sun, 11 Jan 2015 19:00:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0l09087312; Sun, 11 Jan 2015 19:00:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0l09087312@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277000 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:48 -0000 Author: gjb Date: Sun Jan 11 19:00:47 2015 New Revision: 277000 URL: https://svnweb.freebsd.org/changeset/base/277000 Log: Document r274733, PMU power-button event support for certain PowerBooks. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:44 2015 (r276999) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:47 2015 (r277000) @@ -208,6 +208,11 @@ state (suspend to RAM) has been corrected in the &man.acpi.4; and &man.pci.4; drivers. + The power management unit + subsystem has been updated to support power button events on + certain &arch.powerpc; hardware, such as aluminum + PowerBook ®. + Virtualization Support From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:02 2015 Return-Path: Delivered-To: svn-src-head@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 6D1983BB; Sun, 11 Jan 2015 19: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 59F5D287; Sun, 11 Jan 2015 19: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 t0BJ120h087606; Sun, 11 Jan 2015 19:01:02 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ111c087604; Sun, 11 Jan 2015 19:01:01 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ111c087604@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277005 - in head/release/doc: en_US.ISO8859-1/relnotes share/xml X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:02 -0000 Author: gjb Date: Sun Jan 11 19:01:01 2015 New Revision: 277005 URL: https://svnweb.freebsd.org/changeset/base/277005 Log: Document r275461, CTL port/LUN limits increased. Add iXsystems to sponsors.ent. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml head/release/doc/share/xml/sponsor.ent Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:58 2015 (r277004) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:01 2015 (r277005) @@ -433,6 +433,12 @@ The asr(4) driver has been removed, and is no longer supported. + + The + &man.ctl.4; subsystem has been updated, increasing the ports + limit from 128 to 256, + and LUN limit from 256 + to 1024. Modified: head/release/doc/share/xml/sponsor.ent ============================================================================== --- head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:00:58 2015 (r277004) +++ head/release/doc/share/xml/sponsor.ent Sun Jan 11 19:01:01 2015 (r277005) @@ -23,6 +23,8 @@ + + From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:00:59 2015 Return-Path: Delivered-To: svn-src-head@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 080DB1FF; Sun, 11 Jan 2015 19:00: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 E9AF3285; Sun, 11 Jan 2015 19:00: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 t0BJ0wnV087537; Sun, 11 Jan 2015 19:00:58 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ0wCK087536; Sun, 11 Jan 2015 19:00:58 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111900.t0BJ0wCK087536@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:00:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277004 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:00:59 -0000 Author: gjb Date: Sun Jan 11 19:00:58 2015 New Revision: 277004 URL: https://svnweb.freebsd.org/changeset/base/277004 Log: Document r275299, mrouted rc(8) script removal from base. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:55 2015 (r277003) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:00:58 2015 (r277004) @@ -649,6 +649,11 @@ class="directory">${LOCALBASE}/etc/rc.conf.d/. If LOCALBASE is unset, it defaults to /usr/local. + + The mrouted + &man.rc.8; script has been removed from the base system. An + equivalent script is available from the net/mrouted port. From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:05 2015 Return-Path: Delivered-To: svn-src-head@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 446994AC; Sun, 11 Jan 2015 19:01: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 318F328C; Sun, 11 Jan 2015 19:01: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 t0BJ15mi087656; Sun, 11 Jan 2015 19:01:05 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ15sG087655; Sun, 11 Jan 2015 19:01:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ15sG087655@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277006 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:05 -0000 Author: gjb Date: Sun Jan 11 19:01:04 2015 New Revision: 277006 URL: https://svnweb.freebsd.org/changeset/base/277006 Log: Document r275680, fstyp(8) addition. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:01 2015 (r277005) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:04 2015 (r277006) @@ -636,6 +636,10 @@ providing a wrapper around the &man.gpio.4; kernel interface. + The + &man.fstyp.8; utility has been added, which is used to determine + the filesystem on a specified device. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:07 2015 Return-Path: Delivered-To: svn-src-head@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 E2F865E0; Sun, 11 Jan 2015 19:01: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 CFAFD29A; Sun, 11 Jan 2015 19:01: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 t0BJ17CP087708; Sun, 11 Jan 2015 19:01:07 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ17ow087707; Sun, 11 Jan 2015 19:01:07 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ17ow087707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277007 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:08 -0000 Author: gjb Date: Sun Jan 11 19:01:07 2015 New Revision: 277007 URL: https://svnweb.freebsd.org/changeset/base/277007 Log: Fix indentation for r270096 entry. While here, remove the leading 'r' from the revision tag. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:04 2015 (r277006) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:07 2015 (r277007) @@ -444,15 +444,15 @@ File Systems - The - new filesystem automount facility, &man.autofs.5;, has been - added. The new &man.autofs.5; facility is similar to that - found in other &unix;-like operating systems, such as - OS X™ and Solaris™. The &man.autofs.5; - facility uses a &sun;-compatible &man.auto.master.5; - configuration file, and is administered with the - &man.automount.8; userland utility, and the - &man.automountd.8; and &man.autounmountd.8; daemons. + The + new filesystem automount facility, &man.autofs.5;, has been + added. The new &man.autofs.5; facility is similar to that + found in other &unix;-like operating systems, such as + OS X™ and Solaris™. The &man.autofs.5; + facility uses a &sun;-compatible &man.auto.master.5; + configuration file, and is administered with the + &man.automount.8; userland utility, and the &man.automountd.8; + and &man.autounmountd.8; daemons. ZFS From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:10 2015 Return-Path: Delivered-To: svn-src-head@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 8F482716; Sun, 11 Jan 2015 19: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 7C5D329C; Sun, 11 Jan 2015 19: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 t0BJ1ATD087754; Sun, 11 Jan 2015 19:01:10 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1AI2087753; Sun, 11 Jan 2015 19:01:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1AI2087753@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277008 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:10 -0000 Author: gjb Date: Sun Jan 11 19:01:09 2015 New Revision: 277008 URL: https://svnweb.freebsd.org/changeset/base/277008 Log: Document r275718, binutils PowerPC relocations update. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:07 2015 (r277007) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:09 2015 (r277008) @@ -719,6 +719,10 @@ OpenSSL has been updated to version 1.0.1j. + + The binutils + suite of utilities has been updated to include upstream patches + that add new relocations for &arch.powerpc; support. From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:13 2015 Return-Path: Delivered-To: svn-src-head@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 3D0A384A; Sun, 11 Jan 2015 19:01: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 2A8612A6; Sun, 11 Jan 2015 19:01: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 t0BJ1DwJ087810; Sun, 11 Jan 2015 19:01:13 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1DXt087809; Sun, 11 Jan 2015 19:01:13 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1DXt087809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277009 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:13 -0000 Author: gjb Date: Sun Jan 11 19:01:12 2015 New Revision: 277009 URL: https://svnweb.freebsd.org/changeset/base/277009 Log: Document r275732, OpenCrypto support for AES-ICM and AES-GCM. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:09 2015 (r277008) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:12 2015 (r277009) @@ -217,6 +217,13 @@ driver has been updated to correct performance counter sampling on G4 (MPC74xxx) and G5 class processors. + The + OpenCrypto framework has been updated + to include AES-ICM and + AES-GCM modes, both of which have also been + added to the &man.aesni.4; driver. + Virtualization Support From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:15 2015 Return-Path: Delivered-To: svn-src-head@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 D2D2598D; Sun, 11 Jan 2015 19:01: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 BCCB32A9; Sun, 11 Jan 2015 19:01: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 t0BJ1Fub087870; Sun, 11 Jan 2015 19:01:15 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1Fk2087869; Sun, 11 Jan 2015 19:01:15 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1Fk2087869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277010 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:16 -0000 Author: gjb Date: Sun Jan 11 19:01:15 2015 New Revision: 277010 URL: https://svnweb.freebsd.org/changeset/base/277010 Log: Document r275748, arc_meta_limit now exposed through kernel statistics. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:12 2015 (r277009) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:15 2015 (r277010) @@ -464,7 +464,13 @@ ZFS -   + The arc_meta_limit + statistics are now visible through the + kstat &man.sysctl.8;. As a result of + this change, the vfs.zfs.arc_meta_used + &man.sysctl.8; has been removed, and replaced with the + kstat.zfs.misc.arcstats.arc_meta_used + &man.sysctl.8;. From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:18 2015 Return-Path: Delivered-To: svn-src-head@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 8BFC6AE9; Sun, 11 Jan 2015 19:01: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 754292AE; Sun, 11 Jan 2015 19:01: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 t0BJ1Igd087928; Sun, 11 Jan 2015 19:01:18 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1IwE087927; Sun, 11 Jan 2015 19:01:18 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1IwE087927@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277011 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:18 -0000 Author: gjb Date: Sun Jan 11 19:01:17 2015 New Revision: 277011 URL: https://svnweb.freebsd.org/changeset/base/277011 Log: Document r275874, bsdinstall(8) now uses dpv(3) when extracting the distribution packages. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:15 2015 (r277010) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:17 2015 (r277011) @@ -653,6 +653,10 @@ &man.fstyp.8; utility has been added, which is used to determine the filesystem on a specified device. + The &man.bsdinstall.8; utility has been + updated to use the new &man.dpv.3; library to display progress + when extracting the &os; distributions. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:21 2015 Return-Path: Delivered-To: svn-src-head@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 52095C06; Sun, 11 Jan 2015 19:01: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 3F561340; Sun, 11 Jan 2015 19:01: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 t0BJ1LMQ087973; Sun, 11 Jan 2015 19:01:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1LHh087972; Sun, 11 Jan 2015 19:01:21 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1LHh087972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277012 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:21 -0000 Author: gjb Date: Sun Jan 11 19:01:20 2015 New Revision: 277012 URL: https://svnweb.freebsd.org/changeset/base/277012 Log: Document r275963, CPU frequency/voltage control driver for RPI. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:17 2015 (r277011) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:20 2015 (r277012) @@ -275,6 +275,11 @@ An issue that could cause instability when detecting SD cards on the Raspberry Pi SOC has been fixed. + + The bcm2835_cpufreq + driver has been added, which supports CPU + frequency and voltage control on the Raspberry Pi + SOC. From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:24 2015 Return-Path: Delivered-To: svn-src-head@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 28335D7D; Sun, 11 Jan 2015 19:01: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 15812354; Sun, 11 Jan 2015 19:01: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 t0BJ1NR3088034; Sun, 11 Jan 2015 19:01:23 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1NGC088033; Sun, 11 Jan 2015 19:01:23 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1NGC088033@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277013 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:24 -0000 Author: gjb Date: Sun Jan 11 19:01:23 2015 New Revision: 277013 URL: https://svnweb.freebsd.org/changeset/base/277013 Log: Document r276551, texinfo and info page removal. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:20 2015 (r277012) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:23 2015 (r277013) @@ -745,6 +745,13 @@ The binutils suite of utilities has been updated to include upstream patches that add new relocations for &arch.powerpc; support. + + The texinfo + utility and info pages were removed from the + base system. The print/texinfo port should be + installed on systems where info pages are + needed. From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:29 2015 Return-Path: Delivered-To: svn-src-head@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 4632EFCD; Sun, 11 Jan 2015 19:01: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 31E6F35A; Sun, 11 Jan 2015 19:01: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 t0BJ1TvK088133; Sun, 11 Jan 2015 19:01:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1TCR088132; Sun, 11 Jan 2015 19:01:29 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1TCR088132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277015 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:29 -0000 Author: gjb Date: Sun Jan 11 19:01:28 2015 New Revision: 277015 URL: https://svnweb.freebsd.org/changeset/base/277015 Log: Fix the release notes article.xml file to confirm with FDP style, specifically reindenting the entire file for tag alignment, rewrapping lines where necessary. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:25 2015 (r277014) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:28 2015 (r277015) @@ -8,365 +8,586 @@ %vendor; ]> -
- &os; &release.current; Release Notes +
- The &os; Project + + &os; &release.current; Release Notes - $FreeBSD$ + The &os; Project - + $FreeBSD$ + + + + + 2015 + The &os; Documentation + Project + + + + &tm-attrib.freebsd; + &tm-attrib.ibm; + &tm-attrib.ieee; + &tm-attrib.intel; + &tm-attrib.sparc; + &tm-attrib.general; + + + + The release notes for &os; &release.current; contain + a summary of the changes made to the &os; base system on the + &release.branch; development line. This document lists + applicable security advisories that were issued since the last + release, as well as significant changes to the &os; kernel and + userland. Some brief remarks on upgrading are also + presented. + + + + + Introduction + + This document contains the release notes for &os; + &release.current;. It describes recently added, changed, or + deleted features of &os;. It also provides some notes on + upgrading from previous versions of &os;. + + The &release.type; distribution to + which these release notes apply represents the latest point + along the &release.branch; development branch since + &release.branch; was created. Information regarding pre-built, + binary &release.type; distributions along this branch can be + found at &release.url;. + + The &release.type; distribution to + which these release notes apply represents a point along the + &release.branch; development branch between &release.prev; and + the future &release.next;. Information regarding pre-built, + binary &release.type; distributions along this branch can be + found at &release.url;. + + This distribution of &os; + &release.current; is a &release.type; distribution. It can be + found at &release.url; or + any of its mirrors. More information on obtaining this (or + other) &release.type; distributions of &os; can be found in the + Obtaining + &os; appendix to the &os; + Handbook. + + All users are encouraged to consult the release errata + before installing &os;. The errata document is updated with + late-breaking information discovered late in the + release cycle or after the release. Typically, it contains + information on known bugs, security advisories, and corrections + to documentation. An up-to-date copy of the errata for &os; + &release.current; can be found on the &os; Web site. + + + + What's New + + This section describes the most user-visible new or changed + features in &os; since &release.prev;. In general, changes + described here are unique to the &release.branch; branch unless + specifically marked as &merged; features. + + Typical release note items document recent security + advisories issued after &release.prev;, new drivers or hardware + support, new commands or options, major bug fixes, or + contributed software upgrades. They may also list changes to + major ports/packages or release engineering practices. Clearly + the release notes cannot list every single change made to &os; + between releases; this document focuses primarily on security + advisories, user-visible changes, and major architectural + improvements. + + + Security Advisories + + No advisories. + + + + + Kernel Changes + + Support for GPS ports has been added to + &man.uhso.4;. + + The if_nf10bmac(4) + device has been added, providing support for NetFPGA-10G + Embedded CPU Ethernet Core. + + + The if_nf10bmac(4) driver operates on + the FPGA, and is not suited for the PCI host + interface. + + + The &man.full.4; device has been added, + and the lindev(4) device has been removed. + Prior to this change, lindev(4) provided + only the /dev/full character device, + returning ENOSPC on write attempts. As + this device is not specific to &linux;, a native &os; version + has been added. + + The &man.mpr.4; + device has been added, providing support for LSI Fusion-MPT + 3 12Gb SCSI/SATA controllers. + + The &man.mrsas.4; driver has been added, + providing support for LSI MegaRAID SAS controllers. The + &man.mfi.4; driver will attach to the controller, by default. + To enable &man.mrsas.4; add + hw.mfi.mrsas_enable=1 to + /boot/loader.conf, which turns off + &man.mfi.4; device probing. + + + At this time, the &man.mfiutil.8; utility and the &os; + version of MegaCLI and + StorCli do not work with + &man.mrsas.4;. + + + A kernel bug that inhibited proper + functionality of the dev.cpu.0.freq + &man.sysctl.8; on &intel; processors with Turbo + Boost ™ enabled has been fixed. + + The IMAGACT_BINMISC + kernel configuration option has been enabled by default, + which enables application execution through emulators, such + as Qemu. + + Support for the &man.cxgbe.4; Terminator + 5 (T5) 10G/40G cards has been added to &man.netmap.4;. + + The VT kernel + configuration file has been removed, and the &man.vt.4; + driver is included in the GENERIC kernel. + To enable &man.vt.4;, enter set kern.vty=vt + at the &man.loader.8; prompt during boot, or add + kern.vty=vt to &man.loader.conf.5; and + reboot the system. + + Support for + &man.dtrace.1; stack tracing has been fixed for + &os;/&arch.powerpc;, using the trapexit() + and asttrapexit() functions instead of + checking within addressed kernel space. + + Hardware context support has been + added to the drm/i915 driver, adding + support for Mesa 9.2 and + later. + + The &man.vt.4; driver has been updated, + replacing the bitmapped kern.vt.spclkeys + &man.sysctl.8; with individual + kern.vt.kbd_* variants. + + The &man.hpet.4; driver has been updated + to create a + /dev/hpetN + device, providing access to HPET from + userspace. + + The &man.vt.4; driver has been made the + default system console driver. The &man.syscons.4; driver is + still available, and can be enabled by adding + kern.vty=sc in &man.loader.conf.5;. + Alternatively, &man.syscons.4; can be enabled at boot time by + entering set kern.vty=sc at the + &man.loader.8; prompt. + + An issue that could cause a system to + hang when entering ACPI + S3 state (suspend to + RAM) has been corrected in the &man.acpi.4; + and &man.pci.4; drivers. + + The power management unit + subsystem has been updated to support power button events on + certain &arch.powerpc; hardware, such as aluminum + PowerBook ®. + + The &man.hwpmc.4; + driver has been updated to correct performance counter + sampling on G4 (MPC74xxx) and G5 class processors. + + The + OpenCrypto framework has been + updated to include AES-ICM and + AES-GCM modes, both of which have also been + added to the &man.aesni.4; driver. + + + Virtualization Support + + Support for the Virtual + Interrupt Delivery feature of &intel; VT-x is + enabled if supported by the CPU. This feature can be + disabled by running sysctl + hw.vmm.vmx.use_apic_vid=0. Additionally, to + persist this setting across reboots, add + hw.vmm.vmx.use_apic_vid=0 to + /etc/sysctl.conf. + + Support for Posted Interrupt + Processing is enabled if supported by the CPU. + This feature can be disabled by running sysctl + hw.vmm.vmx.use_apic_pir=0. Additionally, to + persist this setting across reboots, add + hw.vmm.vmx.use_apic_pir=0 to + /etc/sysctl.conf. + + Unmapped IO support has been added to + &man.virtio_blk.4;. + + Unmapped IO support has been added to + &man.virtio_scsi.4;. + + The &man.virtio_random.4; driver has + been added to harvest entropy from the host system. + + Support for running + a &os;/&arch.amd64; Xen guest + instance as PVH guest has been added. + PVH mode, short for + Para-Virtualized Hardware, uses + para-virtualized drivers for boot and I/O, and uses hardware + virtualization extensions for all other tasks, without the + need for emulation. + + The &man.virtio.console.4; driver has + been added, which provides an interface to VirtIO console + devices through a &man.tty.4; device. + + + + ARM Support + + The &man.nand.4; device is enabled for + ARM devices by default. + + An issue that could cause + instability when detecting SD cards on + the Raspberry Pi SOC has been + fixed. + + The bcm2835_cpufreq + driver has been added, which supports CPU + frequency and voltage control on the Raspberry Pi + SOC. + - - 2015 - The &os; Documentation - Project - - - - &tm-attrib.freebsd; - &tm-attrib.ibm; - &tm-attrib.ieee; - &tm-attrib.intel; - &tm-attrib.sparc; - &tm-attrib.general; - - - - The release notes for &os; &release.current; contain - a summary of the changes made to the &os; base system on the - &release.branch; development line. This document lists - applicable security advisories that were issued since the last - release, as well as significant changes to the &os; kernel and - userland. Some brief remarks on upgrading are also - presented. - - - - - Introduction - - This document contains the release notes for &os; - &release.current;. It describes recently added, changed, or - deleted features of &os;. It also provides some notes on - upgrading from previous versions of &os;. - - The &release.type; distribution to which - these release notes apply represents the latest point along the - &release.branch; development branch since &release.branch; was - created. Information regarding pre-built, binary &release.type; - distributions along this branch can be found at &release.url;. - - The &release.type; distribution to - which these release notes apply represents a point along the - &release.branch; development branch between &release.prev; and the - future &release.next;. Information regarding pre-built, binary - &release.type; distributions along this branch can be found at - &release.url;. - - This distribution of &os; - &release.current; is a &release.type; distribution. It can be - found at &release.url; or - any of its mirrors. More information on obtaining this (or other) - &release.type; distributions of &os; can be found in the Obtaining - &os; appendix to the &os; Handbook. - - All users are encouraged to consult the release errata before - installing &os;. The errata document is updated with - late-breaking information discovered late in the - release cycle or after the release. Typically, it contains - information on known bugs, security advisories, and corrections to - documentation. An up-to-date copy of the errata for &os; - &release.current; can be found on the &os; Web site. - - - - What's New - - This section describes the most user-visible new or changed - features in &os; since &release.prev;. In general, changes - described here are unique to the &release.branch; branch unless - specifically marked as &merged; features. - - Typical release note items document recent security advisories - issued after &release.prev;, new drivers or hardware support, new - commands or options, major bug fixes, or contributed software - upgrades. They may also list changes to major ports/packages or - release engineering practices. Clearly the release notes cannot - list every single change made to &os; between releases; this - document focuses primarily on security advisories, user-visible - changes, and major architectural improvements. - - - Security Advisories - - No advisories. - - - - - Kernel Changes - - Support for GPS ports has been added to - &man.uhso.4;. - - The if_nf10bmac(4) - device has been added, providing support for NetFPGA-10G - Embedded CPU Ethernet Core. - - - The if_nf10bmac(4) driver operates on - the FPGA, and is not suited for the PCI host interface. - - - The &man.full.4; device has been added, - and the lindev(4) device has been removed. - Prior to this change, lindev(4) provided only - the /dev/full character device, returning - ENOSPC on write attempts. As this device is - not specific to &linux;, a native &os; version has been - added. - - The &man.mpr.4; - device has been added, providing support for LSI Fusion-MPT - 3 12Gb SCSI/SATA controllers. - - The &man.mrsas.4; driver has been added, - providing support for LSI MegaRAID SAS controllers. The - &man.mfi.4; driver will attach to the controller, by default. - To enable &man.mrsas.4; add - hw.mfi.mrsas_enable=1 to - /boot/loader.conf, which turns off - &man.mfi.4; device probing. - - - At this time, the &man.mfiutil.8; utility and - the &os; version of - MegaCLI and - StorCli do not work with - &man.mrsas.4;. - - - A kernel bug that inhibited proper - functionality of the dev.cpu.0.freq - &man.sysctl.8; on &intel; processors with Turbo - Boost ™ enabled has been fixed. - - The IMAGACT_BINMISC - kernel configuration option has been enabled by default, - which enables application execution through emulators, such - as Qemu. - - Support for the &man.cxgbe.4; Terminator 5 - (T5) 10G/40G cards has been added to &man.netmap.4;. - - The VT kernel - configuration file has been removed, and the &man.vt.4; - driver is included in the GENERIC kernel. - To enable &man.vt.4;, enter set kern.vty=vt - at the &man.loader.8; prompt during boot, or add - kern.vty=vt to &man.loader.conf.5; and - reboot the system. - - Support for &man.dtrace.1; - stack tracing has been fixed for &os;/&arch.powerpc;, using the - trapexit() and - asttrapexit() functions instead of checking - within addressed kernel space. - - Hardware context support has been - added to the drm/i915 driver, adding - support for Mesa 9.2 and - later. - - The &man.vt.4; driver has been updated, - replacing the bitmapped kern.vt.spclkeys - &man.sysctl.8; with individual kern.vt.kbd_* - variants. - - The &man.hpet.4; driver has been updated - to create a - /dev/hpetN - device, providing access to HPET from - userspace. - - The &man.vt.4; driver has been made the - default system console driver. The &man.syscons.4; driver is - still available, and can be enabled by adding - kern.vty=sc in &man.loader.conf.5;. - Alternatively, &man.syscons.4; can be enabled at boot time by - entering set kern.vty=sc at the - &man.loader.8; prompt. - - An issue that could cause a system to - hang when entering ACPI S3 - state (suspend to RAM) has been corrected - in the &man.acpi.4; and &man.pci.4; drivers. - - The power management unit - subsystem has been updated to support power button events on - certain &arch.powerpc; hardware, such as aluminum - PowerBook ®. - - The &man.hwpmc.4; - driver has been updated to correct performance counter sampling - on G4 (MPC74xxx) and G5 class processors. - - The - OpenCrypto framework has been updated - to include AES-ICM and - AES-GCM modes, both of which have also been - added to the &man.aesni.4; driver. - - - Virtualization Support - - Support for the Virtual Interrupt - Delivery feature of &intel; VT-x is enabled if - supported by the CPU. This feature can be disabled by running - sysctl hw.vmm.vmx.use_apic_vid=0. - Additionally, to persist this setting across reboots, add - hw.vmm.vmx.use_apic_vid=0 to - /etc/sysctl.conf. - - Support for Posted Interrupt - Processing is enabled if supported by the CPU. This - feature can be disabled by running sysctl - hw.vmm.vmx.use_apic_pir=0. Additionally, to - persist this setting across reboots, add - hw.vmm.vmx.use_apic_pir=0 to - /etc/sysctl.conf. - - Unmapped IO support has been added to - &man.virtio_blk.4;. - - Unmapped IO support has been added to - &man.virtio_scsi.4;. - - The &man.virtio_random.4; driver has - been added to harvest entropy from the host system. - - Support for running a &os;/&arch.amd64; - Xen guest instance as - PVH guest has been added. - PVH mode, short for Para-Virtualized - Hardware, uses para-virtualized drivers for boot - and I/O, and uses hardware virtualization extensions for all - other tasks, without the need for emulation. - - The &man.virtio.console.4; driver has - been added, which provides an interface to VirtIO console - devices through a &man.tty.4; device. - - - - ARM Support - - The &man.nand.4; device is enabled for - ARM devices by default. - - An issue that could cause - instability when detecting SD cards on the - Raspberry Pi SOC has been fixed. - - The bcm2835_cpufreq - driver has been added, which supports CPU - frequency and voltage control on the Raspberry Pi - SOC. - - - - Boot Loader Changes - -   - - - - Hardware Support - - The &man.asmc.4; driver has been updated - to support the &apple; MacMini 3,1. - - Support for &os;/ia64 has been dropped - as of &os; 11. - - - Multimedia Support + + Boot Loader Changes   - + + + + Hardware Support - - Network Interface Support + The &man.asmc.4; driver has been + updated to support the &apple; MacMini 3,1. - Support for Broadcom chipsets - BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has - been added to &man.bge.4;. - - Support for the &intel; - Centrino™ Wireless-N 135 chipset has been - added. - - Firmware for &intel; - Centrino™ Wireless-N 105 devices has been added - to the base system. - - The deprecated nve(4) driver has been - removed. Users of NVIDIA nForce MCP network adapters are - advised to use the &man.nfe.4; driver instead, which has been - the default driver for this hardware since &os; 7.0. - - The &man.ath.hal.4; driver has been - updated to support the Atheros AR1111 chipset. - - Support for the &intel; - Centrino™ Wireless-N 105 chipset has been - added. - - A bug in &man.ipfw.4; that could - potentially lead to a kernel panic when using - &man.dummynet.4; at layer 2 has been fixed. - - The &man.alc.4; driver has been - updated to support AR816x and AR817x ethernet - controllers. - - The &man.vxlan.4; driver has been - added, which creates a virtual Layer 2 (Ethernet) network - overlaid in a Layer 3 (IP/UDP) network. The &man.vxlan.4; - driver is analogous to &man.vlan.4;, but is designed to be - better suited for large, multiple-tenant datacenter - environments. - - The &man.gre.4; driver has been - significantly overhauled, and has been split into two - separate modules, &man.gre.4; and &man.me.4;. - - - - - Network Protocols - - Support for the IPX network transport - protocol has been removed, and will not be supported in - &os; 11 and later releases. - - Support for PLPMTUD - blackhole detection (RFC 4821) has been - added to the &man.tcp.4; stack, disabled by default. New - control tunables have been added: + Support for &os;/ia64 has been dropped + as of &os; 11. + + + Multimedia Support + +   + + + + Network Interface Support + + Support for Broadcom chipsets + BCM57764, BCM57767, BCM57782, BCM57786 and BCM57787 has + been added to &man.bge.4;. + + Support for the &intel; + Centrino™ Wireless-N 135 chipset has been + added. + + Firmware for &intel; Centrino™ + Wireless-N 105 devices has been added to the base + system. + + The deprecated nve(4) driver has + been removed. Users of NVIDIA nForce MCP network adapters + are advised to use the &man.nfe.4; driver instead, which + has been the default driver for this hardware since + &os; 7.0. + + The &man.ath.hal.4; driver has been + updated to support the Atheros AR1111 chipset. + + Support for the &intel; + Centrino™ Wireless-N 105 chipset has been + added. + + A bug in &man.ipfw.4; that could + potentially lead to a kernel panic when using + &man.dummynet.4; at layer 2 has been fixed. + + The &man.alc.4; driver has been + updated to support AR816x and AR817x ethernet + controllers. + + The &man.vxlan.4; driver has been + added, which creates a virtual Layer 2 (Ethernet) network + overlaid in a Layer 3 (IP/UDP) network. The &man.vxlan.4; + driver is analogous to &man.vlan.4;, but is designed to be + better suited for large, multiple-tenant datacenter + environments. + + The &man.gre.4; driver has been + significantly overhauled, and has been split into two + separate modules, &man.gre.4; and &man.me.4;. + + + + + Network Protocols + + Support for the IPX network transport + protocol has been removed, and will not be supported in + &os; 11 and later releases. + + Support for PLPMTUD + blackhole detection (RFC 4821) has been + added to the &man.tcp.4; stack, disabled by default. New + control tunables have been added: + + + + + + + + Tunable + Description + + + + + + net.inet.tcp.pmtud_blackhole_detection + Enables or disables PLPMTUD + blackhole detection + + + + net.inet.tcp.pmtud_blackhole_mss + MSS to try for IPv4 + + + + net.inet.tcp.v6pmtud_blackhole_mss + MSS to try for IPv6 + + + + + + New monitoring &man.sysctl.8;s haven been added: + + + + + + + + Tunable + Description + + + + + + net.inet.tcp.pmtud_blackhole_activated + Number of times the code was activated to + attempt downshifting the + MSS + + + + net.inet.tcp.pmtud_blackhole_min_activated + Number of times the blackhole + MSS was used in an attempt to + downshift + + + + net.inet.tcp.pmtud_blackhole_failed + Number of times that the blackhole failed to + connect after downshifting the + MSS + + + + + + + + Disks and Storage + + Support for the + disklabel64 partitioning scheme has been + added to &man.gpart.8;. + + The asr(4) driver + has been removed, and is no longer supported. + + The + &man.ctl.4; subsystem has been updated, increasing the ports + limit from 128 to 256, + and LUN limit from 256 + to 1024. + + + + File Systems + + The + new filesystem automount facility, &man.autofs.5;, has been + added. The new &man.autofs.5; facility is similar to that + found in other &unix;-like operating systems, such as + OS X™ and Solaris™. The &man.autofs.5; + facility uses a &sun;-compatible &man.auto.master.5; + configuration file, and is administered with the + &man.automount.8; userland utility, and the + &man.automountd.8; and &man.autounmountd.8; daemons. + + + ZFS + + The + arc_meta_limit statistics are now + visible through the kstat + &man.sysctl.8;. As a result of this change, the + vfs.zfs.arc_meta_used &man.sysctl.8; + has been removed, and replaced with the + kstat.zfs.misc.arcstats.arc_meta_used + &man.sysctl.8;. + + + + + + Userland Changes + + The &man.casperd.8; daemon has been + added, which provides access to functionality that is not + available in the capability mode + sandbox. + + When unable to load a kernel module with + &man.kldload.8;, a message informing to view output of + &man.dmesg.8; is now printed, opposed to the previous output + Exec format error.. + + Allow &man.pciconf.8; to identify PCI + devices that are attached to a driver to be identified by + their device name instead of just the selector. Additionally, + an optional device argument to the -l flag + to restrict the output to only listing details about a single + device. + + A new flag, onifconsole + has been added to /etc/ttys. This allows + the system to provide a login prompt via serial console if the + device is an active kernel console, otherwise it is equivalent + to off. + + Support for displaying VPD for PCI + devices via &man.pciconf.8; has been added. + + &man.ping.8; protects against malicious + network packets using the Capsicum framework to drop + privileges. + + &os;/&arch.i386; guests can be run under + bhyve. + + The &man.ps.1; utility has been + updated to include the -J flag, used to + filter output by matching &man.jail.8; IDs and names. + Additionally, argument 0 can be used to + -J to only list processes running on the + host system. + + The &man.top.1; utility has been updated + to filter by &man.jail.8; ID or name, in followup to the + &man.ps.1; change in r265229. + + The Blowfish &man.crypt.3; default + format has been changed to + $2b$. + + The &man.pmcstat.8; utility has been + updated to include a new flag, -l, which + ends event collection after the specified number of + seconds. + + The default &man.newsyslog.conf.5; now + includes files in the + /etc/newsyslog.conf.d/ and + /usr/local/etc/newsyslog.conf.d/ + directories by default for &man.newsyslog.8;. + + The &man.readline.3; library is now + statically linked in software within the base system, and the + shared library is no longer installed, allowing the Ports + Collection to use a modern version of the library. + + The &man.mailwrapper.8; utility has been + updated to use &man.mailer.conf.5; from the + LOCALBASE environment variable, which + defaults to /usr/local + if unset. + + The &man.ps.1; utility has been updated + to include a new keyword, tracer, which + displays the PID of the tracing + process. + + Support for adding empty partitions has + been added to the &man.mkimg.1; utility. + + The &man.primes.6; utility has been + updated to correctly enumerate prime numbers between + 4295098369 and + 3825123056546413050, which prior to this + change, it would be possible for returned values to be + incorrectly identified as prime numbers. + + The &man.mkimg.1; utility has been + updated to include three options used to print information + about &man.mkimg.1; itself: @@ -374,426 +595,224 @@ - Tunable - Description + Option + Output - net.inet.tcp.pmtud_blackhole_detection - Enables or disables PLPMTUD - blackhole detection + --version + The current version of the &man.mkimg.1; + utility - net.inet.tcp.pmtud_blackhole_mss - MSS to try for IPv4 + --formats + The disk image file formats supported by + &man.mkimg.1; - net.inet.tcp.v6pmtud_blackhole_mss - MSS to try for IPv6 + --schemes + The partition schemes supported by + &man.mkimg.1; - New monitoring &man.sysctl.8;s haven been added: + The &man.strptime.3; library has been + updated to add support for POSIX-2001 + features %U and + %W. + + The &os; installation utility, + &man.bsdinstall.8;, has been updated to set the + canmount &man.zfs.8; property to + off for the /var dataset, preventing the + contents of directories within /var from conflicting when + using multiple boot environments, such as that provided by + sysutils/beadm. + + The MK_ARM_EABI + &man.src.conf.5; option has been removed. + + Userland &man.ctf.5; support in *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 19:01:26 2015 Return-Path: Delivered-To: svn-src-head@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 AB7FAEB1; Sun, 11 Jan 2015 19:01: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 98F64356; Sun, 11 Jan 2015 19:01: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 t0BJ1QPY088079; Sun, 11 Jan 2015 19:01:26 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BJ1QVo088078; Sun, 11 Jan 2015 19:01:26 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501111901.t0BJ1QVo088078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 19:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277014 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 19:01:26 -0000 Author: gjb Date: Sun Jan 11 19:01:25 2015 New Revision: 277014 URL: https://svnweb.freebsd.org/changeset/base/277014 Log: Add a comment in the release notes XML file to note the last revision, to make it easier to keep track of where the last update(s) left off. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:23 2015 (r277013) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:01:25 2015 (r277014) @@ -15,6 +15,8 @@ $FreeBSD$ + + 2015 The &os; Documentation From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 20:04:36 2015 Return-Path: Delivered-To: svn-src-head@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 B18F0CA5; Sun, 11 Jan 2015 20:04: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 9E06AAF0; Sun, 11 Jan 2015 20:04: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 t0BK4anF018041; Sun, 11 Jan 2015 20:04:36 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BK4ago018040; Sun, 11 Jan 2015 20:04:36 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501112004.t0BK4ago018040@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 20:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277019 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:04:36 -0000 Author: gjb Date: Sun Jan 11 20:04:35 2015 New Revision: 277019 URL: https://svnweb.freebsd.org/changeset/base/277019 Log: Document r271539, bsdinstall(8) parition editor and sade(8) now support ZFS natively. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 19:41:52 2015 (r277018) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 20:04:35 2015 (r277019) @@ -681,6 +681,10 @@ updated to use the new &man.dpv.3; library to display progress when extracting the &os; distributions. + The &man.bsdinstall.8; partition editor + and &man.sade.8; utility have been updated to include native + ZFS support. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 20:07:08 2015 Return-Path: Delivered-To: svn-src-head@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 41ADDE0B; Sun, 11 Jan 2015 20:07: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 2E47BB0D; Sun, 11 Jan 2015 20:07: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 t0BK78hd018410; Sun, 11 Jan 2015 20:07:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BK78lK018409; Sun, 11 Jan 2015 20:07:08 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501112007.t0BK78lK018409@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sun, 11 Jan 2015 20:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277020 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:07:08 -0000 Author: gjb Date: Sun Jan 11 20:07:07 2015 New Revision: 277020 URL: https://svnweb.freebsd.org/changeset/base/277020 Log: Fix ordering by SVN revision. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 20:04:35 2015 (r277019) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 20:07:07 2015 (r277020) @@ -578,6 +578,10 @@ Support for adding empty partitions has been added to the &man.mkimg.1; utility. + The &man.bsdinstall.8; partition editor + and &man.sade.8; utility have been updated to include native + ZFS support. + The &man.primes.6; utility has been updated to correctly enumerate prime numbers between 4295098369 and @@ -681,10 +685,6 @@ updated to use the new &man.dpv.3; library to display progress when extracting the &os; distributions. - The &man.bsdinstall.8; partition editor - and &man.sade.8; utility have been updated to include native - ZFS support. - <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 20:27:16 2015 Return-Path: Delivered-To: svn-src-head@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 EEEA17F6; Sun, 11 Jan 2015 20:27: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 D08F8D05; Sun, 11 Jan 2015 20:27: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 t0BKRGSC028262; Sun, 11 Jan 2015 20:27:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BKRF0A028255; Sun, 11 Jan 2015 20:27:15 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501112027.t0BKRF0A028255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Jan 2015 20:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277023 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:27:17 -0000 Author: kib Date: Sun Jan 11 20:27:15 2015 New Revision: 277023 URL: https://svnweb.freebsd.org/changeset/base/277023 Log: Right now, for non-coherent DMARs, page table update code flushes the cache for whole page containing modified pte, and more, only last page in the series of the consequtive pages is flushed (i.e. the affected mappings should be larger than 2MB). Avoid excessive flushing and do missed neccessary flushing, by splitting invalidation and unmapping. For now, flush exactly the range of the changed pte. This is still somewhat bigger than neccessary, since pte is 8 bytes, while cache flush line is at least 32 bytes. The originator of the issue reports that after the change, 'dmar_bus_dmamap_unload went from 13,288 cycles down to 3,257. dmar_bus_dmamap_load_buffer went from 9,686 cycles down to 3,517. and I am now able to get line 1GbE speed with Netperf TCP (even with 1K message size).' Diagnosed and tested by: Nadav Amit Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_ctx.c head/sys/x86/iommu/intel_dmar.h head/sys/x86/iommu/intel_idpgtbl.c head/sys/x86/iommu/intel_utils.c Modified: head/sys/x86/iommu/intel_ctx.c ============================================================================== --- head/sys/x86/iommu/intel_ctx.c Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_ctx.c Sun Jan 11 20:27:15 2015 (r277023) @@ -97,7 +97,8 @@ dmar_ensure_ctx_page(struct dmar_unit *d re += bus; dmar_pte_store(&re->r1, DMAR_ROOT_R1_P | (DMAR_ROOT_R1_CTP_MASK & VM_PAGE_TO_PHYS(ctxm))); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_flush_root_to_ram(dmar, re); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; } @@ -158,6 +159,7 @@ ctx_id_entry_init(struct dmar_ctx *ctx, (DMAR_CTX1_ASR_MASK & VM_PAGE_TO_PHYS(ctx_root)) | DMAR_CTX1_P); } + dmar_flush_ctx_to_ram(unit, ctxp); } static int @@ -364,7 +366,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev ctx->domain = alloc_unrl(dmar->domids); if (ctx->domain == -1) { DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf, true); + dmar_unmap_pgtbl(sf); dmar_ctx_dtr(ctx, true, true); TD_PINNED_ASSERT; return (NULL); @@ -389,7 +391,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev } else { dmar_ctx_dtr(ctx1, true, true); } - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); } ctx->refs++; if ((ctx->flags & DMAR_CTX_RMRR) != 0) @@ -480,7 +482,7 @@ dmar_free_ctx_locked(struct dmar_unit *d if (ctx->refs > 1) { ctx->refs--; DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; return; } @@ -496,6 +498,7 @@ dmar_free_ctx_locked(struct dmar_unit *d */ dmar_pte_clear(&ctxp->ctx1); ctxp->ctx2 = 0; + dmar_flush_ctx_to_ram(dmar, ctxp); dmar_inv_ctx_glob(dmar); if ((dmar->hw_ecap & DMAR_ECAP_DI) != 0) { if (dmar->qi_enabled) @@ -513,7 +516,7 @@ dmar_free_ctx_locked(struct dmar_unit *d taskqueue_drain(dmar->delayed_taskqueue, &ctx->unload_task); KASSERT(TAILQ_EMPTY(&ctx->unload_entries), ("unfinished unloads %p", ctx)); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); free_unr(dmar->domids, ctx->domain); dmar_ctx_dtr(ctx, true, true); TD_PINNED_ASSERT; Modified: head/sys/x86/iommu/intel_dmar.h ============================================================================== --- head/sys/x86/iommu/intel_dmar.h Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_dmar.h Sun Jan 11 20:27:15 2015 (r277023) @@ -228,11 +228,14 @@ struct vm_page *dmar_pgalloc(vm_object_t void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags); void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, struct sf_buf **sf); -void dmar_unmap_pgtbl(struct sf_buf *sf, bool coherent); +void dmar_unmap_pgtbl(struct sf_buf *sf); int dmar_load_root_entry_ptr(struct dmar_unit *unit); int dmar_inv_ctx_glob(struct dmar_unit *unit); int dmar_inv_iotlb_glob(struct dmar_unit *unit); int dmar_flush_write_bufs(struct dmar_unit *unit); +void dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst); +void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst); +void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst); int dmar_enable_translation(struct dmar_unit *unit); int dmar_disable_translation(struct dmar_unit *unit); bool dmar_barrier_enter(struct dmar_unit *dmar, u_int barrier_id); Modified: head/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- head/sys/x86/iommu/intel_idpgtbl.c Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_idpgtbl.c Sun Jan 11 20:27:15 2015 (r277023) @@ -146,7 +146,7 @@ ctx_idmap_nextlvl(struct idpgtbl *tbl, i } } /* ctx_get_idmap_pgtbl flushes CPU cache if needed. */ - dmar_unmap_pgtbl(sf, true); + dmar_unmap_pgtbl(sf); VM_OBJECT_WLOCK(tbl->pgtbl_obj); } @@ -361,7 +361,7 @@ ctx_pgtbl_map_pte(struct dmar_ctx *ctx, pte = (dmar_pte_t *)sf_buf_kva(*sf); } else { if (*sf != NULL) - dmar_unmap_pgtbl(*sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(*sf); *idxp = idx; retry: pte = dmar_map_pgtbl(ctx->pgtbl_obj, idx, flags, sf); @@ -397,9 +397,10 @@ retry: } dmar_pte_store(&ptep->pte, DMAR_PTE_R | DMAR_PTE_W | VM_PAGE_TO_PHYS(m)); + dmar_flush_pte_to_ram(ctx->dmar, ptep); sf_buf_page(sfp)->wire_count += 1; m->wire_count--; - dmar_unmap_pgtbl(sfp, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sfp); /* Only executed once. */ goto retry; } @@ -467,20 +468,19 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, if (pte == NULL) { KASSERT((flags & DMAR_PGF_WAITOK) == 0, ("failed waitable pte alloc %p", ctx)); - if (sf != NULL) { - dmar_unmap_pgtbl(sf, - DMAR_IS_COHERENT(ctx->dmar)); - } + if (sf != NULL) + dmar_unmap_pgtbl(sf); ctx_unmap_buf_locked(ctx, base1, base - base1, flags); TD_PINNED_ASSERT; return (ENOMEM); } dmar_pte_store(&pte->pte, VM_PAGE_TO_PHYS(ma[pi]) | pflags | (superpage ? DMAR_PTE_SP : 0)); + dmar_flush_pte_to_ram(ctx->dmar, pte); sf_buf_page(sf)->wire_count += 1; } if (sf != NULL) - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; return (0); } @@ -567,9 +567,10 @@ ctx_unmap_clear_pte(struct dmar_ctx *ctx vm_page_t m; dmar_pte_clear(&pte->pte); + dmar_flush_pte_to_ram(ctx->dmar, pte); m = sf_buf_page(*sf); if (free_sf) { - dmar_unmap_pgtbl(*sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(*sf); *sf = NULL; } m->wire_count--; @@ -651,7 +652,7 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); } if (sf != NULL) - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sf); /* * See 11.1 Write Buffer Flushing for an explanation why RWBF * can be ignored there. Modified: head/sys/x86/iommu/intel_utils.c ============================================================================== --- head/sys/x86/iommu/intel_utils.c Sun Jan 11 20:22:12 2015 (r277022) +++ head/sys/x86/iommu/intel_utils.c Sun Jan 11 20:27:15 2015 (r277023) @@ -354,20 +354,46 @@ dmar_map_pgtbl(vm_object_t obj, vm_pinde } void -dmar_unmap_pgtbl(struct sf_buf *sf, bool coherent) +dmar_unmap_pgtbl(struct sf_buf *sf) { - vm_page_t m; - m = sf_buf_page(sf); sf_buf_free(sf); sched_unpin(); +} + +static void +dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) +{ + if (DMAR_IS_COHERENT(unit)) + return; /* * If DMAR does not snoop paging structures accesses, flush * CPU cache to memory. */ - if (!coherent) - pmap_invalidate_cache_pages(&m, 1); + pmap_invalidate_cache_range((uintptr_t)dst, (uintptr_t)dst + sz, + TRUE); +} + +void +dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); +} + +void +dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); +} + +void +dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); } /* From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 20:48:30 2015 Return-Path: Delivered-To: svn-src-head@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 E731AD10; Sun, 11 Jan 2015 20: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 D493EEA9; Sun, 11 Jan 2015 20:48: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 t0BKmU6k038088; Sun, 11 Jan 2015 20:48:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BKmUEG038087; Sun, 11 Jan 2015 20:48:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112048.t0BKmUEG038087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 20:48:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277025 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:48:31 -0000 Author: ian Date: Sun Jan 11 20:48:29 2015 New Revision: 277025 URL: https://svnweb.freebsd.org/changeset/base/277025 Log: Fix an off by one in ppsratecheck(). If you asked for N=1 you'd get one, but for any N>1 you'd get N-1 packets/events per second. Modified: head/sys/kern/kern_time.c Modified: head/sys/kern/kern_time.c ============================================================================== --- head/sys/kern/kern_time.c Sun Jan 11 20:35:34 2015 (r277024) +++ head/sys/kern/kern_time.c Sun Jan 11 20:48:29 2015 (r277025) @@ -982,7 +982,7 @@ ppsratecheck(struct timeval *lasttime, i return (maxpps != 0); } else { (*curpps)++; /* NB: ignore potential overflow */ - return (maxpps < 0 || *curpps < maxpps); + return (maxpps < 0 || *curpps <= maxpps); } } From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 20:55:17 2015 Return-Path: Delivered-To: svn-src-head@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 B13A4EBC; Sun, 11 Jan 2015 20:55: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 9E6B4F6D; Sun, 11 Jan 2015 20:55: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 t0BKtHl7042531; Sun, 11 Jan 2015 20:55:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BKtHVJ042530; Sun, 11 Jan 2015 20:55:17 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112055.t0BKtHVJ042530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 20:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277026 - head/sys/dev/mmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 20:55:17 -0000 Author: ian Date: Sun Jan 11 20:55:16 2015 New Revision: 277026 URL: https://svnweb.freebsd.org/changeset/base/277026 Log: Rate-limit error logging to 5 lines per second, so that when an sdcard goes bad it doesn't lock up the console with continuous output. Modified: head/sys/dev/mmc/mmcsd.c Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Sun Jan 11 20:48:29 2015 (r277025) +++ head/sys/dev/mmc/mmcsd.c Sun Jan 11 20:55:16 2015 (r277026) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -86,6 +87,8 @@ struct mmcsd_softc { daddr_t eblock, eend; /* Range remaining after the last erase. */ int running; int suspend; + int log_count; + struct timeval log_time; }; static const char *errmsg[] = @@ -99,6 +102,8 @@ static const char *errmsg[] = "NO MEMORY" }; +#define LOG_PPS 5 /* Log no more than 5 errors per second. */ + /* bus entry points */ static int mmcsd_attach(device_t dev); static int mmcsd_detach(device_t dev); @@ -389,8 +394,10 @@ mmcsd_rw(struct mmcsd_softc *sc, struct } MMCBUS_WAIT_FOR_REQUEST(mmcbr, dev, &req); if (req.cmd->error != MMC_ERR_NONE) { - device_printf(dev, "Error indicated: %d %s\n", - req.cmd->error, mmcsd_errmsg(req.cmd->error)); + if (ppsratecheck(&sc->log_time, &sc->log_count, LOG_PPS)) { + device_printf(dev, "Error indicated: %d %s\n", + req.cmd->error, mmcsd_errmsg(req.cmd->error)); + } break; } block += numblocks; From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 21:25:05 2015 Return-Path: Delivered-To: svn-src-head@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 025BF5E1; Sun, 11 Jan 2015 21:25: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 C9B792B5; Sun, 11 Jan 2015 21:25: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 t0BLP4v8057008; Sun, 11 Jan 2015 21:25:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLP4mx057006; Sun, 11 Jan 2015 21:25:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112125.t0BLP4mx057006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 21:25:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277027 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:25:05 -0000 Author: ian Date: Sun Jan 11 21:25:03 2015 New Revision: 277027 URL: https://svnweb.freebsd.org/changeset/base/277027 Log: Handle the possibility that SDHCI_PLATFORM_START_TRANSFER() can fail, by moving the handling of curcmd->error != 0 to the end of the interrupt handler. Also make sdhci_finish_data() idempotent by moving the setting of slot->data_done = 1 down past the point where the busdma buffer is unmapped. This allows for the possibility that the finish routine can get called from multiple places when handling errors. Modified: head/sys/dev/sdhci/sdhci.c Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sun Jan 11 20:55:16 2015 (r277026) +++ head/sys/dev/sdhci/sdhci.c Sun Jan 11 21:25:03 2015 (r277027) @@ -984,7 +984,6 @@ sdhci_finish_data(struct sdhci_slot *slo { struct mmc_data *data = slot->curcmd->data; - slot->data_done = 1; /* Interrupt aggregation: Restore command interrupt. * Auxiliary restore point for the case when data interrupt * happened first. */ @@ -993,7 +992,7 @@ sdhci_finish_data(struct sdhci_slot *slo slot->intmask |= SDHCI_INT_RESPONSE); } /* Unload rest of data from DMA buffer. */ - if (slot->flags & SDHCI_USE_DMA) { + if (!slot->data_done && (slot->flags & SDHCI_USE_DMA)) { if (data->flags & MMC_DATA_READ) { size_t left = data->len - slot->offset; bus_dmamap_sync(slot->dmatag, slot->dmamap, @@ -1004,6 +1003,7 @@ sdhci_finish_data(struct sdhci_slot *slo bus_dmamap_sync(slot->dmatag, slot->dmamap, BUS_DMASYNC_POSTWRITE); } + slot->data_done = 1; /* If there was error - reset the host. */ if (slot->curcmd->error) { sdhci_reset(slot, SDHCI_RESET_CMD); @@ -1171,12 +1171,7 @@ sdhci_data_irq(struct sdhci_slot *slot, } if (slot->curcmd->error) { /* No need to continue after any error. */ - if (slot->flags & PLATFORM_DATA_STARTED) { - slot->flags &= ~PLATFORM_DATA_STARTED; - SDHCI_PLATFORM_FINISH_TRANSFER(slot->bus, slot); - } else - sdhci_finish_data(slot); - return; + goto done; } /* Handle PIO interrupt. */ @@ -1233,6 +1228,15 @@ sdhci_data_irq(struct sdhci_slot *slot, } else sdhci_finish_data(slot); } +done: + if (slot->curcmd != NULL && slot->curcmd->error != 0) { + if (slot->flags & PLATFORM_DATA_STARTED) { + slot->flags &= ~PLATFORM_DATA_STARTED; + SDHCI_PLATFORM_FINISH_TRANSFER(slot->bus, slot); + } else + sdhci_finish_data(slot); + return; + } } static void From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 21:27:48 2015 Return-Path: Delivered-To: svn-src-head@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 00A90772; Sun, 11 Jan 2015 21:27: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 D77AE2DE; Sun, 11 Jan 2015 21:27: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 t0BLRleQ057369; Sun, 11 Jan 2015 21:27:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLRlk1057368; Sun, 11 Jan 2015 21:27:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501112127.t0BLRlk1057368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 11 Jan 2015 21:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277028 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:27:48 -0000 Author: ian Date: Sun Jan 11 21:27:46 2015 New Revision: 277028 URL: https://svnweb.freebsd.org/changeset/base/277028 Log: Check for and handle failures of bus_dmamap_load(). The driver currently requires that each 512 byte IO be in a single contiguous buffer, but if a buffer crosses a page boundary and the physical pages aren't contiguous you can get an EFBIG failure (too many segments). The driver really should handle multiple segment IO, but before adding that I wanted to make sure that it's handling failure properly while the failure is easily recreatable. 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 Sun Jan 11 21:25:03 2015 (r277027) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 11 21:27:46 2015 (r277028) @@ -125,6 +125,10 @@ struct bcm_sdhci_softc { bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; uint32_t cmd_and_mode; + bus_addr_t dmamap_seg_addrs[1]; + bus_size_t dmamap_seg_sizes[1]; + int dmamap_seg_count; + int dmamap_status; }; static int bcm_sdhci_probe(device_t); @@ -141,16 +145,19 @@ static void bcm_sdhci_dma_intr(int ch, v mtx_unlock(&_sc->sc_mtx); static void -bcm_dmamap_cb(void *arg, bus_dma_segment_t *segs, - int nseg, int err) +bcm_sdhci_dmacb(void *arg, bus_dma_segment_t *segs, int nseg, int err) { - bus_addr_t *addr; + struct bcm_sdhci_softc *sc = arg; + int i; - if (err) - return; + sc->dmamap_status = err; + sc->dmamap_seg_count = nseg; - addr = (bus_addr_t*)arg; - *addr = segs[0].ds_addr; + /* Note nseg is guaranteed to be zero if err is non-zero. */ + for (i = 0; i < nseg; i++) { + sc->dmamap_seg_addrs[i] = segs[i].ds_addr; + sc->dmamap_seg_sizes[i] = segs[i].ds_len; + } } static int @@ -426,7 +433,6 @@ bcm_sdhci_dma_intr(int ch, void *arg) struct bcm_sdhci_softc *sc = (struct bcm_sdhci_softc *)arg; struct sdhci_slot *slot = &sc->sc_slot; uint32_t reg, mask; - bus_addr_t pmem; vm_paddr_t pdst, psrc; size_t len; int left, sync_op; @@ -476,22 +482,31 @@ bcm_sdhci_dma_intr(int ch, void *arg) SDHCI_INT_STATUS, mask); /* continue next DMA transfer */ - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + - slot->offset, left, bcm_dmamap_cb, &pmem, 0); - if (slot->curcmd->data->flags & MMC_DATA_READ) { - psrc = sc->sc_sdhci_buffer_phys; - pdst = pmem; - sync_op = BUS_DMASYNC_PREREAD; + slot->offset, left, bcm_sdhci_dmacb, sc, + BUS_DMA_NOWAIT) != 0 || sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + sdhci_finish_data(slot); } else { - psrc = pmem; - pdst = sc->sc_sdhci_buffer_phys; - sync_op = BUS_DMASYNC_PREWRITE; - } - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); - if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, left)) { - /* XXX stop xfer, other error recovery? */ - device_printf(sc->sc_dev, "failed DMA start\n"); + if (slot->curcmd->data->flags & MMC_DATA_READ) { + psrc = sc->sc_sdhci_buffer_phys; + pdst = sc->dmamap_seg_addrs[0]; + sync_op = BUS_DMASYNC_PREREAD; + } else { + psrc = sc->dmamap_seg_addrs[0]; + pdst = sc->sc_sdhci_buffer_phys; + sync_op = BUS_DMASYNC_PREWRITE; + } + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, + sync_op); + if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, + left)) { + device_printf(sc->sc_dev, + "failed DMA start\n"); + slot->curcmd->error = MMC_ERR_FAILED; + sdhci_finish_data(slot); + } } } else { /* wait for next data by INT */ @@ -508,67 +523,75 @@ bcm_sdhci_dma_intr(int ch, void *arg) } static void -bcm_sdhci_read_dma(struct sdhci_slot *slot) +bcm_sdhci_read_dma(device_t dev, struct sdhci_slot *slot) { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - bus_addr_t paddr; if (sc->sc_dma_inuse) { device_printf(sc->sc_dev, "DMA in use\n"); return; } - sc->sc_dma_inuse = 1; - left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, ("%s: len = %d, not word-aligned", __func__, left)); + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + (uint8_t *)slot->curcmd->data->data + slot->offset, left, + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } + + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, + BUS_DMASYNC_PREREAD); + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, BCM_DMA_INC_ADDR, (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, - (uint8_t *)slot->curcmd->data->data + slot->offset, left, - bcm_dmamap_cb, &paddr, 0); + /* Disable INT */ + slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); + bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREREAD); + sc->sc_dma_inuse = 1; /* DMA start */ if (bcm_dma_start(sc->sc_dma_ch, sc->sc_sdhci_buffer_phys, - paddr, left) != 0) + sc->dmamap_seg_addrs[0], left) != 0) device_printf(sc->sc_dev, "failed DMA start\n"); } static void -bcm_sdhci_write_dma(struct sdhci_slot *slot) +bcm_sdhci_write_dma(device_t dev, struct sdhci_slot *slot) { struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - bus_addr_t paddr; if (sc->sc_dma_inuse) { device_printf(sc->sc_dev, "DMA in use\n"); return; } - sc->sc_dma_inuse = 1; - left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); KASSERT((left & 3) == 0, ("%s: len = %d, not word-aligned", __func__, left)); - bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, + if (bus_dmamap_load(sc->sc_dma_tag, sc->sc_dma_map, (uint8_t *)slot->curcmd->data->data + slot->offset, left, - bcm_dmamap_cb, &paddr, 0); + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, BCM_DMA_INC_ADDR, @@ -579,8 +602,14 @@ bcm_sdhci_write_dma(struct sdhci_slot *s bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, BUS_DMASYNC_PREWRITE); + /* Disable INT */ + slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); + bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); + + sc->sc_dma_inuse = 1; + /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, paddr, + if (bcm_dma_start(sc->sc_dma_ch, sc->dmamap_seg_addrs[0], sc->sc_sdhci_buffer_phys, left) != 0) device_printf(sc->sc_dev, "failed DMA start\n"); } @@ -609,15 +638,11 @@ bcm_sdhci_start_transfer(device_t dev, s uint32_t *intmask) { - /* Disable INT */ - slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); - bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - /* DMA transfer FIFO 1KB */ if (slot->curcmd->data->flags & MMC_DATA_READ) - bcm_sdhci_read_dma(slot); + bcm_sdhci_read_dma(dev, slot); else - bcm_sdhci_write_dma(slot); + bcm_sdhci_write_dma(dev, slot); } static void From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 21:27:51 2015 Return-Path: Delivered-To: svn-src-head@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 0AD8578D; Sun, 11 Jan 2015 21:27:51 +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 73B732DF; Sun, 11 Jan 2015 21:27:50 +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 t0BLRiqK029766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 11 Jan 2015 23:27:44 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0BLRiqK029766 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0BLRiZY029765; Sun, 11 Jan 2015 23:27:44 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 11 Jan 2015 23:27:44 +0200 From: Konstantin Belousov To: Baptiste Daroussin Subject: Re: svn commit: r276962 - head/lib/liblzma Message-ID: <20150111212744.GE42409@kib.kiev.ua> References: <201501110925.t0B9P2Sg005368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501110925.t0B9P2Sg005368@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 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:27:51 -0000 On Sun, Jan 11, 2015 at 09:25:02AM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Sun Jan 11 09:25:01 2015 > New Revision: 276962 > URL: https://svnweb.freebsd.org/changeset/base/276962 > > Log: > Do not regenerate and install liblzma.pc when only build libraries > aka do not regenerate while generating 32bits libs > > Reported by: antoine > > Modified: > head/lib/liblzma/Makefile > > Modified: head/lib/liblzma/Makefile > ============================================================================== > --- head/lib/liblzma/Makefile Sun Jan 11 08:40:01 2015 (r276961) > +++ head/lib/liblzma/Makefile Sun Jan 11 09:25:01 2015 (r276962) > @@ -148,12 +148,13 @@ CFLAGS+= -DSYMBOL_VERSIONING > > CLEANFILES+= liblzma.pc > > +.if !defined(LIBRARIES_ONLY) > all: liblzma.pc I think that much better define to differentiate on would be COMPAT_32BIT. That said, head and stable/10 should be almost clean now for allowing ports and third-party software to work with cc -m32. I think that this commit makes it in other direction. Could the .pc files for base system provided by some port ? > liblzma.pc: liblzma.pc.in > @sed -e 's,@prefix@,/usr,g ; \ > s,@exec_prefix@,/usr,g ; \ > - s,@libdir@,${LIBDIR},g ; \ > - s,@includedir@,${INCLUDEDIR},g ; \ > + s,@libdir@,/usr/lib,g ; \ > + s,@includedir@,/usr/include,g ; \ > s,@PACKAGE_URL@,http://tukaani.org/xz/,g ; \ > s,@PACKAGE_VERSION@,${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH},g ; \ > s,@PTHREAD_CFLAGS@,,g ; \ > @@ -162,5 +163,6 @@ liblzma.pc: liblzma.pc.in > beforeinstall: > @${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ > liblzma.pc ${DESTDIR}${LIBDATADIR}/pkgconfig > +.endif > > .include From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 21:44:57 2015 Return-Path: Delivered-To: svn-src-head@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 7280CCA7; Sun, 11 Jan 2015 21:44: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 5EF05664; Sun, 11 Jan 2015 21:44: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 t0BLivb3066575; Sun, 11 Jan 2015 21:44:57 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLivEg066574; Sun, 11 Jan 2015 21:44:57 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112144.t0BLivEg066574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 21:44:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277030 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:44:57 -0000 Author: tuexen Date: Sun Jan 11 21:44:56 2015 New Revision: 277030 URL: https://svnweb.freebsd.org/changeset/base/277030 Log: Remove dead code. Reported by: Coverity CID: 748666 MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Jan 11 21:39:28 2015 (r277029) +++ head/sys/netinet/sctp_pcb.c Sun Jan 11 21:44:56 2015 (r277030) @@ -2166,11 +2166,6 @@ sctp_findassoc_by_vtag(struct sockaddr * SCTP_INP_INFO_RLOCK(); head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(vtag, SCTP_BASE_INFO(hashasocmark))]; - if (head == NULL) { - /* invalid vtag */ - SCTP_INP_INFO_RUNLOCK(); - return (NULL); - } LIST_FOREACH(stcb, head, sctp_asocs) { SCTP_INP_RLOCK(stcb->sctp_ep); if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_ALLGONE) { @@ -6751,10 +6746,6 @@ sctp_is_vtag_good(uint32_t tag, uint16_t SCTP_INP_INFO_RLOCK(); head = &SCTP_BASE_INFO(sctp_asochash)[SCTP_PCBHASH_ASOC(tag, SCTP_BASE_INFO(hashasocmark))]; - if (head == NULL) { - /* invalid vtag */ - goto skip_vtag_check; - } LIST_FOREACH(stcb, head, sctp_asocs) { /* * We choose not to lock anything here. TCB's can't be @@ -6778,8 +6769,6 @@ sctp_is_vtag_good(uint32_t tag, uint16_t return (0); } } -skip_vtag_check: - chain = &SCTP_BASE_INFO(vtag_timewait)[(tag % SCTP_STACK_VTAG_HASH_SIZE)]; /* Now what about timed wait ? */ LIST_FOREACH(twait_block, chain, sctp_nxt_tagblock) { From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 21:55:31 2015 Return-Path: Delivered-To: svn-src-head@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 5C4C9F1E; Sun, 11 Jan 2015 21:55: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 48E9279D; Sun, 11 Jan 2015 21:55: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 t0BLtVjZ071361; Sun, 11 Jan 2015 21:55:31 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BLtVY8071359; Sun, 11 Jan 2015 21:55:31 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112155.t0BLtVY8071359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 21:55:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277031 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 21:55:31 -0000 Author: tuexen Date: Sun Jan 11 21:55:30 2015 New Revision: 277031 URL: https://svnweb.freebsd.org/changeset/base/277031 Log: Remove dead code. Reported by: Coverity CID: 748665 MFC after: 1 week Modified: head/sys/netinet/sctp_pcb.c Modified: head/sys/netinet/sctp_pcb.c ============================================================================== --- head/sys/netinet/sctp_pcb.c Sun Jan 11 21:44:56 2015 (r277030) +++ head/sys/netinet/sctp_pcb.c Sun Jan 11 21:55:30 2015 (r277031) @@ -1441,9 +1441,6 @@ sctp_findassociation_ep_addr(struct sctp } head = &inp->sctp_tcbhash[SCTP_PCBHASH_ALLADDR(rport, inp->sctp_hashmark)]; - if (head == NULL) { - goto null_return; - } LIST_FOREACH(stcb, head, sctp_tcbhash) { if (stcb->rport != rport) { /* remote port does not match */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 22:02:28 2015 Return-Path: Delivered-To: svn-src-head@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 CEBF513A; Sun, 11 Jan 2015 22:02:28 +0000 (UTC) Received: from mail-wi0-x22e.google.com (mail-wi0-x22e.google.com [IPv6:2a00:1450:400c:c05::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EB9E85E; Sun, 11 Jan 2015 22:02:28 +0000 (UTC) Received: by mail-wi0-f174.google.com with SMTP id h11so11210463wiw.1; Sun, 11 Jan 2015 14:02:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=gnF/H7JYZ6zsSXnK+SmzXUxFToFU+ioi0QwRQR315Qc=; b=t5ZQqL/3Yjb2NOgID8c7sN8kOyj56ofUfDD06oc7Ohv+B/tIJspU1NmzCJ9542pRMO 4FkwUbWZFDH6sOt5QWnr9O/N6c39ILWQG3bICyip5FliQfEYbNLTVHCLsbahLGmx6mvT FVMZ+7tsE77OWnuD3YoBs/W3hNMZUVuPlY8zQJPQe5XarkQK/THKVCrFZaf3tW7eMgTj dJdFeJyH2BxVehhjQxEdMBv81p9v/R51VNf6po49f0/KNqJ6a2aKvaZmDjRoShPq54JC Iu5NB+LRqdpD/udhDPBfKrQ/5d65xHbDo94OErqRKkctOtdfpRxjL52zw635+n6TxC/Z TcbA== X-Received: by 10.180.93.1 with SMTP id cq1mr24292320wib.2.1421013747012; Sun, 11 Jan 2015 14:02:27 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id r3sm7704101wic.10.2015.01.11.14.02.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Jan 2015 14:02:26 -0800 (PST) Sender: Baptiste Daroussin Date: Sun, 11 Jan 2015 23:02:24 +0100 From: Baptiste Daroussin To: Konstantin Belousov Subject: Re: svn commit: r276962 - head/lib/liblzma Message-ID: <20150111220223.GB17273@ivaldir.etoilebsd.net> References: <201501110925.t0B9P2Sg005368@svn.freebsd.org> <20150111212744.GE42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="E39vaYmALEf/7YXx" Content-Disposition: inline In-Reply-To: <20150111212744.GE42409@kib.kiev.ua> 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:02:29 -0000 --E39vaYmALEf/7YXx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 11, 2015 at 11:27:44PM +0200, Konstantin Belousov wrote: > On Sun, Jan 11, 2015 at 09:25:02AM +0000, Baptiste Daroussin wrote: > > Author: bapt > > Date: Sun Jan 11 09:25:01 2015 > > New Revision: 276962 > > URL: https://svnweb.freebsd.org/changeset/base/276962 > >=20 > > Log: > > Do not regenerate and install liblzma.pc when only build libraries > > aka do not regenerate while generating 32bits libs > > =20 > > Reported by: antoine > >=20 > > Modified: > > head/lib/liblzma/Makefile > >=20 > > Modified: head/lib/liblzma/Makefile > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=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/lib/liblzma/Makefile Sun Jan 11 08:40:01 2015 (r276961) > > +++ head/lib/liblzma/Makefile Sun Jan 11 09:25:01 2015 (r276962) > > @@ -148,12 +148,13 @@ CFLAGS+=3D -DSYMBOL_VERSIONING > > =20 > > CLEANFILES+=3D liblzma.pc > > =20 > > +.if !defined(LIBRARIES_ONLY) > > all: liblzma.pc > I think that much better define to differentiate on would be COMPAT_32BIT. >=20 > That said, head and stable/10 should be almost clean now for allowing > ports and third-party software to work with cc -m32. I think > that this commit makes it in other direction. >=20 > Could the .pc files for base system provided by some port ? >=20 I think the best would probably be to create a bsd.pc.mk which act a bit li= ke bsd.incs.mk Concerning pushing all of those .pc files into a port, I'm not against it, actually it would be even simpler for ports as it will affect all the ports= at once. But on the other hands that would mean on port with different content based on OSVERSIONS, I think keeping it in base would be more accurate. Best regards, Bapt --E39vaYmALEf/7YXx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlSy8uwACgkQ8kTtMUmk6ExuTgCfTcaURcUPyfcMSiqi8fdQYKPD CUgAniUtyx7rfNo2nZONj2d08Ym1dQOp =WDgi -----END PGP SIGNATURE----- --E39vaYmALEf/7YXx-- From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 22:16:37 2015 Return-Path: Delivered-To: svn-src-head@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 0267640A; Sun, 11 Jan 2015 22:16: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 E08A9968; Sun, 11 Jan 2015 22:16: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 t0BMGa3k080875; Sun, 11 Jan 2015 22:16:36 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BMGWwq080852; Sun, 11 Jan 2015 22:16:32 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501112216.t0BMGWwq080852@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 11 Jan 2015 22:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277032 - in head/lib: libc/compat-43 libc/gen libc/include libc/sys libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:16:37 -0000 Author: kib Date: Sun Jan 11 22:16:31 2015 New Revision: 277032 URL: https://svnweb.freebsd.org/changeset/base/277032 Log: Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. Translate some syscalls into their more generic counterpart, and remove translated syscalls from the table. List of the affected syscalls: creat, open -> openat raise -> thr_kill sleep, usleep -> nanosleep pause -> sigsuspend wait, wait3, waitpid -> wait4 Suggested and reviewed by: jilles (previous version) Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/compat-43/Symbol.map head/lib/libc/compat-43/creat.c head/lib/libc/gen/Symbol.map head/lib/libc/gen/pause.c head/lib/libc/gen/raise.c head/lib/libc/gen/sleep.c head/lib/libc/gen/usleep.c head/lib/libc/gen/wait.c head/lib/libc/gen/wait3.c head/lib/libc/gen/waitpid.c head/lib/libc/include/libc_private.h head/lib/libc/sys/interposing_table.c head/lib/libc/sys/open.c head/lib/libthr/thread/thr_private.h head/lib/libthr/thread/thr_sig.c head/lib/libthr/thread/thr_syscalls.c Modified: head/lib/libc/compat-43/Symbol.map ============================================================================== --- head/lib/libc/compat-43/Symbol.map Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/compat-43/Symbol.map Sun Jan 11 22:16:31 2015 (r277032) @@ -28,5 +28,4 @@ FBSD_1.2 { FBSDprivate_1.0 { __creat; _creat; - __libc_creat; }; Modified: head/lib/libc/compat-43/creat.c ============================================================================== --- head/lib/libc/compat-43/creat.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/compat-43/creat.c Sun Jan 11 22:16:31 2015 (r277032) @@ -38,21 +38,16 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" -__weak_reference(__libc_creat, __creat); -__weak_reference(__libc_creat, _creat); +__weak_reference(__creat, creat); +__weak_reference(__creat, _creat); #pragma weak creat int -creat(const char *path, mode_t mode) +__creat(const char *path, mode_t mode) { - return (((int (*)(const char *, mode_t)) - __libc_interposing[INTERPOS_creat])(path, mode)); + return (((int (*)(int, const char *, int, ...)) + __libc_interposing[INTERPOS_openat])(AT_FDCWD, path, O_WRONLY | + O_CREAT | O_TRUNC, mode)); } -int -__libc_creat(const char *path, mode_t mode) -{ - - return(__sys_open(path, O_WRONLY | O_CREAT | O_TRUNC, mode)); -} Modified: head/lib/libc/gen/Symbol.map ============================================================================== --- head/lib/libc/gen/Symbol.map Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/Symbol.map Sun Jan 11 22:16:31 2015 (r277032) @@ -533,14 +533,7 @@ FBSDprivate_1.0 { _libc_sem_post_compat; _libc_sem_getvalue_compat; - __libc_pause; - __libc_raise; - __libc_sleep; __libc_tcdrain; - __libc_usleep; - __libc_wait; - __libc_wait3; - __libc_waitpid; __elf_aux_vector; __pthread_map_stacks_exec; Modified: head/lib/libc/gen/pause.c ============================================================================== --- head/lib/libc/gen/pause.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/pause.c Sun Jan 11 22:16:31 2015 (r277032) @@ -33,10 +33,8 @@ static char sccsid[] = "@(#)pause.c 8.1 #include __FBSDID("$FreeBSD$"); -#include "namespace.h" #include #include -#include "un-namespace.h" #include "libc_private.h" @@ -44,23 +42,14 @@ __FBSDID("$FreeBSD$"); * Backwards compatible pause. */ int -__libc_pause(void) +__pause(void) { sigset_t oset; - if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1) + if (sigprocmask(SIG_BLOCK, NULL, &oset) == -1) return (-1); - return (_sigsuspend(&oset)); + return (sigsuspend(&oset)); } -#pragma weak pause -int -pause(void) -{ - - return (((int (*)(void)) - __libc_interposing[INTERPOS_pause])()); -} - -__weak_reference(__libc_pause, __pause); -__weak_reference(__libc_pause, _pause); +__weak_reference(__pause, pause); +__weak_reference(__pause, _pause); Modified: head/lib/libc/gen/raise.c ============================================================================== --- head/lib/libc/gen/raise.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/raise.c Sun Jan 11 22:16:31 2015 (r277032) @@ -38,21 +38,15 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -__weak_reference(__libc_raise, __raise); -__weak_reference(__libc_raise, _raise); +__weak_reference(__raise, raise); +__weak_reference(__raise, _raise); -#pragma weak raise int -raise(int s) +__raise(int s) { + long id; - return (((int (*)(int)) - __libc_interposing[INTERPOS_raise])(s)); -} - -int -__libc_raise(int s) -{ - - return (kill(getpid(), s)); + if (__sys_thr_self(&id) == -1) + return (-1); + return (__sys_thr_kill(id, s)); } Modified: head/lib/libc/gen/sleep.c ============================================================================== --- head/lib/libc/gen/sleep.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/sleep.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,17 +42,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak sleep unsigned int -sleep(unsigned int seconds) -{ - - return (((unsigned int (*)(unsigned int)) - __libc_interposing[INTERPOS_sleep])(seconds)); -} - -unsigned int -__libc_sleep(unsigned int seconds) +__sleep(unsigned int seconds) { struct timespec time_to_sleep; struct timespec time_remaining; @@ -62,17 +53,19 @@ __libc_sleep(unsigned int seconds) * the maximum value for a time_t is >= INT_MAX. */ if (seconds > INT_MAX) - return (seconds - INT_MAX + __libc_sleep(INT_MAX)); + return (seconds - INT_MAX + __sleep(INT_MAX)); time_to_sleep.tv_sec = seconds; time_to_sleep.tv_nsec = 0; - if (_nanosleep(&time_to_sleep, &time_remaining) != -1) + if (((int (*)(const struct timespec *, struct timespec *)) + __libc_interposing[INTERPOS_nanosleep])( + &time_to_sleep, &time_remaining) != -1) return (0); if (errno != EINTR) return (seconds); /* best guess */ return (time_remaining.tv_sec + - (time_remaining.tv_nsec != 0)); /* round up */ + (time_remaining.tv_nsec != 0)); /* round up */ } -__weak_reference(__libc_sleep, __sleep); -__weak_reference(__libc_sleep, _sleep); +__weak_reference(__sleep, sleep); +__weak_reference(__sleep, _sleep); Modified: head/lib/libc/gen/usleep.c ============================================================================== --- head/lib/libc/gen/usleep.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/usleep.c Sun Jan 11 22:16:31 2015 (r277032) @@ -40,24 +40,16 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak usleep int -usleep(useconds_t useconds) -{ - - return (((int (*)(useconds_t)) - __libc_interposing[INTERPOS_usleep])(useconds)); -} - -int -__libc_usleep(useconds_t useconds) +__usleep(useconds_t useconds) { struct timespec time_to_sleep; time_to_sleep.tv_nsec = (useconds % 1000000) * 1000; time_to_sleep.tv_sec = useconds / 1000000; - return (_nanosleep(&time_to_sleep, NULL)); + return (((int (*)(const struct timespec *, struct timespec *)) + __libc_interposing[INTERPOS_nanosleep])(&time_to_sleep, NULL)); } -__weak_reference(__libc_usleep, __usleep); -__weak_reference(__libc_usleep, _usleep); +__weak_reference(__usleep, usleep); +__weak_reference(__usleep, _usleep); Modified: head/lib/libc/gen/wait.c ============================================================================== --- head/lib/libc/gen/wait.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/wait.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,21 +42,13 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak wait pid_t -wait(int *istat) +__wait(int *istat) { - return (((pid_t (*)(int *)) - __libc_interposing[INTERPOS_wait])(istat)); + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, 0, NULL)); } -pid_t -__libc_wait(int *istat) -{ - - return (__sys_wait4(WAIT_ANY, istat, 0, NULL)); -} - -__weak_reference(__libc_wait, __wait); -__weak_reference(__libc_wait, _wait); +__weak_reference(__wait, wait); +__weak_reference(__wait, _wait); Modified: head/lib/libc/gen/wait3.c ============================================================================== --- head/lib/libc/gen/wait3.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/wait3.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,20 +42,12 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak wait3 pid_t -wait3(int *istat, int options, struct rusage *rup) +__wait3(int *istat, int options, struct rusage *rup) { - return (((pid_t (*)(int *, int, struct rusage *)) - __libc_interposing[INTERPOS_wait3])(istat, options, rup)); + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, options, rup)); } -__weak_reference(__libc_wait3, __wait3); - -pid_t -__libc_wait3(int *istat, int options, struct rusage *rup) -{ - - return (__sys_wait4(WAIT_ANY, istat, options, rup)); -} +__weak_reference(__wait3, wait3); Modified: head/lib/libc/gen/waitpid.c ============================================================================== --- head/lib/libc/gen/waitpid.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/gen/waitpid.c Sun Jan 11 22:16:31 2015 (r277032) @@ -42,21 +42,13 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" -#pragma weak waitpid pid_t -waitpid(pid_t pid, int *istat, int options) +__waitpid(pid_t pid, int *istat, int options) { - return (((pid_t (*)(pid_t, int *, int)) - __libc_interposing[INTERPOS_waitpid])(pid, istat, options)); + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(pid, istat, options, NULL)); } -pid_t -__libc_waitpid(pid_t pid, int *istat, int options) -{ - - return (__sys_wait4(pid, istat, options, NULL)); -} - -__weak_reference(__libc_waitpid, __waitpid); -__weak_reference(__libc_waitpid, _waitpid); +__weak_reference(__waitpid, waitpid); +__weak_reference(__waitpid, _waitpid); Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/include/libc_private.h Sun Jan 11 22:16:31 2015 (r277032) @@ -187,17 +187,14 @@ enum { INTERPOS_aio_suspend, INTERPOS_close, INTERPOS_connect, - INTERPOS_creat, INTERPOS_fcntl, INTERPOS_fsync, INTERPOS_fork, INTERPOS_msync, INTERPOS_nanosleep, - INTERPOS_open, INTERPOS_openat, INTERPOS_poll, INTERPOS_pselect, - INTERPOS_raise, INTERPOS_recvfrom, INTERPOS_recvmsg, INTERPOS_select, @@ -212,16 +209,10 @@ enum { INTERPOS_sigwaitinfo, INTERPOS_swapcontext, INTERPOS_system, - INTERPOS_sleep, INTERPOS_tcdrain, - INTERPOS_usleep, - INTERPOS_pause, INTERPOS_read, INTERPOS_readv, - INTERPOS_wait, - INTERPOS_wait3, INTERPOS_wait4, - INTERPOS_waitpid, INTERPOS_write, INTERPOS_writev, INTERPOS__pthread_mutex_init_calloc_cb, @@ -353,23 +344,17 @@ int __sys_sigwait(const __sigset_t *, i int __sys_sigwaitinfo(const __sigset_t *, struct __siginfo *); int __sys_swapcontext(struct __ucontext *, const struct __ucontext *); +int __sys_thr_kill(long, int); +int __sys_thr_self(long *); int __sys_truncate(const char *, __off_t); __pid_t __sys_wait4(__pid_t, int *, int, struct rusage *); __ssize_t __sys_write(int, const void *, __size_t); __ssize_t __sys_writev(int, const struct iovec *, int); -int __libc_creat(const char *path, __mode_t mode); -int __libc_pause(void); -int __libc_raise(int); int __libc_sigwait(const __sigset_t * __restrict, int * restrict sig); int __libc_system(const char *); -unsigned int __libc_sleep(unsigned int); int __libc_tcdrain(int); -int __libc_usleep(__useconds_t); -__pid_t __libc_wait(int *); -__pid_t __libc_wait3(int *, int, struct rusage *); -__pid_t __libc_waitpid(__pid_t, int *, int); int __fcntl_compat(int fd, int cmd, ...); /* execve() with PATH processing to implement posix_spawnp() */ Modified: head/lib/libc/sys/interposing_table.c ============================================================================== --- head/lib/libc/sys/interposing_table.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/sys/interposing_table.c Sun Jan 11 22:16:31 2015 (r277032) @@ -44,17 +44,14 @@ interpos_func_t __libc_interposing[INTER SLOT(aio_suspend, __sys_aio_suspend), SLOT(close, __sys_close), SLOT(connect, __sys_connect), - SLOT(creat, __libc_creat), SLOT(fcntl, __fcntl_compat), SLOT(fsync, __sys_fsync), SLOT(fork, __sys_fork), SLOT(msync, __sys_msync), SLOT(nanosleep, __sys_nanosleep), - SLOT(open, __sys_open), SLOT(openat, __sys_openat), SLOT(poll, __sys_poll), SLOT(pselect, __sys_pselect), - SLOT(raise, __libc_raise), SLOT(read, __sys_read), SLOT(readv, __sys_readv), SLOT(recvfrom, __sys_recvfrom), @@ -71,14 +68,8 @@ interpos_func_t __libc_interposing[INTER SLOT(sigwaitinfo, __sys_sigwaitinfo), SLOT(swapcontext, __sys_swapcontext), SLOT(system, __libc_system), - SLOT(sleep, __libc_sleep), SLOT(tcdrain, __libc_tcdrain), - SLOT(usleep, __libc_usleep), - SLOT(pause, __libc_pause), - SLOT(wait, __libc_wait), - SLOT(wait3, __libc_wait3), SLOT(wait4, __sys_wait4), - SLOT(waitpid, __libc_waitpid), SLOT(write, __sys_write), SLOT(writev, __sys_writev), SLOT(_pthread_mutex_init_calloc_cb, _pthread_mutex_init_calloc_cb_stub), Modified: head/lib/libc/sys/open.c ============================================================================== --- head/lib/libc/sys/open.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libc/sys/open.c Sun Jan 11 22:16:31 2015 (r277032) @@ -54,6 +54,6 @@ open(const char *path, int flags, ...) } else { mode = 0; } - return (((int (*)(const char *, int, ...)) - __libc_interposing[INTERPOS_open])(path, flags, mode)); + return (((int (*)(int, const char *, int, ...)) + __libc_interposing[INTERPOS_openat])(AT_FDCWD, path, flags, mode)); } Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libthr/thread/thr_private.h Sun Jan 11 22:16:31 2015 (r277032) @@ -917,8 +917,6 @@ void _thr_stack_fix_protection(struct pt int *__error_threaded(void) __hidden; void __thr_interpose_libc(void) __hidden; pid_t __thr_fork(void); -int __thr_pause(void) __hidden; -int __thr_raise(int sig); int __thr_setcontext(const ucontext_t *ucp); int __thr_sigaction(int sig, const struct sigaction *act, struct sigaction *oact) __hidden; Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libthr/thread/thr_sig.c Sun Jan 11 22:16:31 2015 (r277032) @@ -515,23 +515,6 @@ _thr_signal_deinit(void) } int -__thr_pause(void) -{ - sigset_t oset; - - if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1) - return (-1); - return (__thr_sigsuspend(&oset)); -} - -int -__thr_raise(int sig) -{ - - return (_thr_send_sig(_get_curthread(), sig)); -} - -int __thr_sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { struct sigaction newact, oldact, oldact2; Modified: head/lib/libthr/thread/thr_syscalls.c ============================================================================== --- head/lib/libthr/thread/thr_syscalls.c Sun Jan 11 21:55:30 2015 (r277031) +++ head/lib/libthr/thread/thr_syscalls.c Sun Jan 11 22:16:31 2015 (r277032) @@ -99,10 +99,6 @@ __FBSDID("$FreeBSD$"); extern int __fcntl_compat(int, int, ...); #endif -/* - * Cancellation behavior: - * If thread is canceled, no socket is created. - */ static int __thr_accept(int s, struct sockaddr *addr, socklen_t *addrlen) { @@ -189,25 +185,6 @@ __thr_connect(int fd, const struct socka return (ret); } - -/* - * Cancellation behavior: - * If thread is canceled, file is not created. - */ -static int -__thr_creat(const char *path, mode_t mode) -{ - struct pthread *curthread; - int ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_creat(path, mode); - _thr_cancel_leave(curthread, ret == -1); - - return (ret); -} - /* * Cancellation behavior: * According to specification, only F_SETLKW is a cancellation point. @@ -300,35 +277,6 @@ __thr_nanosleep(const struct timespec *t * If the thread is canceled, file is not opened. */ static int -__thr_open(const char *path, int flags,...) -{ - struct pthread *curthread; - int mode, ret; - va_list ap; - - /* Check if the file is being created: */ - if ((flags & O_CREAT) != 0) { - /* Get the creation mode: */ - va_start(ap, flags); - mode = va_arg(ap, int); - va_end(ap); - } else { - mode = 0; - } - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __sys_open(path, flags, mode); - _thr_cancel_leave(curthread, ret == -1); - - return (ret); -} - -/* - * Cancellation behavior: - * If the thread is canceled, file is not opened. - */ -static int __thr_openat(int fd, const char *path, int flags, ...) { struct pthread *curthread; @@ -523,19 +471,6 @@ __thr_sendto(int s, const void *m, size_ return (ret); } -static unsigned int -__thr_sleep(unsigned int seconds) -{ - struct pthread *curthread; - unsigned int ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_sleep(seconds); - _thr_cancel_leave(curthread, 1); - return (ret); -} - static int __thr_system(const char *string) { @@ -567,55 +502,6 @@ __thr_tcdrain(int fd) return (ret); } -static int -__thr_usleep(useconds_t useconds) -{ - struct pthread *curthread; - int ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_usleep(useconds); - _thr_cancel_leave(curthread, 1); - return (ret); -} - -/* - * Cancellation behavior: - * Thread may be canceled at start, but if the system call returns - * a child pid, the thread is not canceled. - */ -static pid_t -__thr_wait(int *istat) -{ - struct pthread *curthread; - pid_t ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_wait(istat); - _thr_cancel_leave(curthread, ret <= 0); - return (ret); -} - -/* - * Cancellation behavior: - * Thread may be canceled at start, but if the system call returns - * a child pid, the thread is not canceled. - */ -static pid_t -__thr_wait3(int *status, int options, struct rusage *rusage) -{ - struct pthread *curthread; - pid_t ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_wait3(status, options, rusage); - _thr_cancel_leave(curthread, ret <= 0); - return (ret); -} - /* * Cancellation behavior: * Thread may be canceled at start, but if the system call returns @@ -636,24 +522,6 @@ __thr_wait4(pid_t pid, int *status, int /* * Cancellation behavior: - * Thread may be canceled at start, but if the system call returns - * a child pid, the thread is not canceled. - */ -static pid_t -__thr_waitpid(pid_t wpid, int *status, int options) -{ - struct pthread *curthread; - pid_t ret; - - curthread = _get_curthread(); - _thr_cancel_enter(curthread); - ret = __libc_waitpid(wpid, status, options); - _thr_cancel_leave(curthread, ret <= 0); - return (ret); -} - -/* - * Cancellation behavior: * Thread may be canceled at start, but if the thread wrote some data, * it is not canceled. */ @@ -701,17 +569,14 @@ __thr_interpose_libc(void) SLOT(aio_suspend); SLOT(close); SLOT(connect); - SLOT(creat); SLOT(fcntl); SLOT(fsync); SLOT(fork); SLOT(msync); SLOT(nanosleep); - SLOT(open); SLOT(openat); SLOT(poll); SLOT(pselect); - SLOT(raise); SLOT(read); SLOT(readv); SLOT(recvfrom); @@ -728,14 +593,8 @@ __thr_interpose_libc(void) SLOT(sigwaitinfo); SLOT(swapcontext); SLOT(system); - SLOT(sleep); SLOT(tcdrain); - SLOT(usleep); - SLOT(pause); - SLOT(wait); - SLOT(wait3); SLOT(wait4); - SLOT(waitpid); SLOT(write); SLOT(writev); #undef SLOT From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 22:23:40 2015 Return-Path: Delivered-To: svn-src-head@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 F215E5A5; Sun, 11 Jan 2015 22:23: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 DDF08A36; Sun, 11 Jan 2015 22:23: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 t0BMNdnx085174; Sun, 11 Jan 2015 22:23:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BMNdAY085173; Sun, 11 Jan 2015 22:23:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112223.t0BMNdAY085173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 22:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277033 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:23:40 -0000 Author: tuexen Date: Sun Jan 11 22:23:39 2015 New Revision: 277033 URL: https://svnweb.freebsd.org/changeset/base/277033 Log: Remove dead code. Reported by: Coverity CID: 748660, 748661 MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sun Jan 11 22:16:31 2015 (r277032) +++ head/sys/netinet/sctp_asconf.c Sun Jan 11 22:23:39 2015 (r277033) @@ -1419,7 +1419,6 @@ sctp_asconf_queue_sa_delete(struct sctp_ { struct sctp_ifa *ifa; struct sctp_asconf_addr *aa, *aa_next; - uint32_t vrf_id; if (stcb == NULL) { return (-1); @@ -1451,12 +1450,7 @@ sctp_asconf_queue_sa_delete(struct sctp_ } /* for each aa */ /* find any existing ifa-- NOTE ifa CAN be allowed to be NULL */ - if (stcb) { - vrf_id = stcb->asoc.vrf_id; - } else { - vrf_id = SCTP_DEFAULT_VRFID; - } - ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED); + ifa = sctp_find_ifa_by_addr(sa, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED); /* adding new request to the queue */ SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), @@ -2782,7 +2776,6 @@ sctp_process_initack_addresses(struct sc struct sctp_ipv4addr_param addr4_store; #endif - uint32_t vrf_id; SCTPDBG(SCTP_DEBUG_ASCONF2, "processing init-ack addresses\n"); if (stcb == NULL) /* Un-needed check for SA */ @@ -2850,12 +2843,7 @@ sctp_process_initack_addresses(struct sc } /* see if this address really (still) exists */ - if (stcb) { - vrf_id = stcb->asoc.vrf_id; - } else { - vrf_id = SCTP_DEFAULT_VRFID; - } - sctp_ifa = sctp_find_ifa_by_addr(&store.sa, vrf_id, + sctp_ifa = sctp_find_ifa_by_addr(&store.sa, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED); if (sctp_ifa == NULL) { /* address doesn't exist anymore */ From owner-svn-src-head@FreeBSD.ORG Sun Jan 11 22:49:21 2015 Return-Path: Delivered-To: svn-src-head@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 392E697B; Sun, 11 Jan 2015 22:49: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 24E77BEC; Sun, 11 Jan 2015 22:49: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 t0BMnLv2095145; Sun, 11 Jan 2015 22:49:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0BMnK9G095144; Sun, 11 Jan 2015 22:49:20 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501112249.t0BMnK9G095144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 11 Jan 2015 22:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277034 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jan 2015 22:49:21 -0000 Author: tuexen Date: Sun Jan 11 22:49:20 2015 New Revision: 277034 URL: https://svnweb.freebsd.org/changeset/base/277034 Log: Remove dead code. Reported by: Coverity CID: 748663 MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jan 11 22:23:39 2015 (r277033) +++ head/sys/netinet/sctp_input.c Sun Jan 11 22:49:20 2015 (r277034) @@ -2595,7 +2595,7 @@ sctp_handle_cookie_echo(struct mbuf *m, /* This should not happen */ return (NULL); } - if ((*stcb == NULL) && to) { + if (*stcb == NULL) { /* Yep, lets check */ *stcb = sctp_findassociation_ep_addr(inp_p, to, netp, dst, NULL); if (*stcb == NULL) { @@ -2634,9 +2634,6 @@ sctp_handle_cookie_echo(struct mbuf *m, } } } - if (to == NULL) { - return (NULL); - } cookie_len -= SCTP_SIGNATURE_SIZE; if (*stcb == NULL) { /* this is the "normal" case... get a new TCB */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 02:08:14 2015 Return-Path: Delivered-To: svn-src-head@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 52D6FC52; Mon, 12 Jan 2015 02:08: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 3EB63EC7; Mon, 12 Jan 2015 02:08: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 t0C28E0T088406; Mon, 12 Jan 2015 02:08:14 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C28ETl088405; Mon, 12 Jan 2015 02:08:14 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501120208.t0C28ETl088405@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 12 Jan 2015 02:08:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277035 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:08:14 -0000 Author: gjb Date: Mon Jan 12 02:08:13 2015 New Revision: 277035 URL: https://svnweb.freebsd.org/changeset/base/277035 Log: Document r276881, libedit UTF-8 support and sh(1) unicode support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Sun Jan 11 22:49:20 2015 (r277034) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:08:13 2015 (r277035) @@ -685,6 +685,10 @@ updated to use the new &man.dpv.3; library to display progress when extracting the &os; distributions. + The libedit library + has been updated to support UTF-8, which + additionally provides unicode support to &man.sh.1;. + <acronym>ABI</acronym> Compatibility From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 02:10:46 2015 Return-Path: Delivered-To: svn-src-head@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 AD2F4DDC; Mon, 12 Jan 2015 02:10: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 99E5BED4; Mon, 12 Jan 2015 02:10: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 t0C2AkqJ089407; Mon, 12 Jan 2015 02:10:46 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C2Akwo089406; Mon, 12 Jan 2015 02:10:46 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501120210.t0C2Akwo089406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 12 Jan 2015 02:10:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277036 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:10:46 -0000 Author: gjb Date: Mon Jan 12 02:10:45 2015 New Revision: 277036 URL: https://svnweb.freebsd.org/changeset/base/277036 Log: Split the tag out of being a single-line. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:08:13 2015 (r277035) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:10:45 2015 (r277036) @@ -14,7 +14,9 @@ &os; &release.current; Release Notes - The &os; Project + + The &os; Project + $FreeBSD$ From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 02:29:24 2015 Return-Path: Delivered-To: svn-src-head@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 AB6D31EA; Mon, 12 Jan 2015 02:29: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 982E610A; Mon, 12 Jan 2015 02:29: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 t0C2TOcN097849; Mon, 12 Jan 2015 02:29:24 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C2TO14097848; Mon, 12 Jan 2015 02:29:24 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501120229.t0C2TO14097848@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 12 Jan 2015 02:29:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277037 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:29:24 -0000 Author: ian Date: Mon Jan 12 02:29:23 2015 New Revision: 277037 URL: https://svnweb.freebsd.org/changeset/base/277037 Log: Enable ALT_BREAK_TO_DEBUGGER for rpi. Modified: head/sys/arm/conf/RPI-B Modified: head/sys/arm/conf/RPI-B ============================================================================== --- head/sys/arm/conf/RPI-B Mon Jan 12 02:10:45 2015 (r277036) +++ head/sys/arm/conf/RPI-B Mon Jan 12 02:29:23 2015 (r277037) @@ -60,6 +60,7 @@ options VFP # Enable floating point h # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER +options ALT_BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 02:42:34 2015 Return-Path: Delivered-To: svn-src-head@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 ED3143A1; Mon, 12 Jan 2015 02:42: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 CF83926E; Mon, 12 Jan 2015 02:42: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 t0C2gY3p006295; Mon, 12 Jan 2015 02:42:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C2gYcp006294; Mon, 12 Jan 2015 02:42:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501120242.t0C2gYcp006294@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 12 Jan 2015 02:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277038 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 02:42:35 -0000 Author: ian Date: Mon Jan 12 02:42:33 2015 New Revision: 277038 URL: https://svnweb.freebsd.org/changeset/base/277038 Log: Handle dma mappings with more than one segment for rpi sdhci. The driver inherently does dma in 512 byte chunks, but it's possible that such a buffer can span two physically discontiguous pages (such as when a userland program does IO on the raw /dev/mmcsdN devices). Now the driver can handle a buffer that's split across two pages. It could in theory handle any number of segments now, but as long as IO is being done in 512 byte blocks it will never need more than two. 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 Mon Jan 12 02:29:23 2015 (r277037) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Mon Jan 12 02:42:33 2015 (r277038) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #define BCM2835_DEFAULT_SDHCI_FREQ 50 #define BCM_SDHCI_BUFFER_SIZE 512 +#define NUM_DMA_SEGS 2 #ifdef DEBUG #define dprintf(fmt, args...) do { printf("%s(): ", __func__); \ @@ -97,10 +98,6 @@ TUNABLE_INT("hw.bcm2835.sdhci.min_freq", TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); -struct bcm_sdhci_dmamap_arg { - bus_addr_t sc_dma_busaddr; -}; - struct bcm_sdhci_softc { device_t sc_dev; struct mtx sc_mtx; @@ -125,9 +122,10 @@ struct bcm_sdhci_softc { bus_dmamap_t sc_dma_map; vm_paddr_t sc_sdhci_buffer_phys; uint32_t cmd_and_mode; - bus_addr_t dmamap_seg_addrs[1]; - bus_size_t dmamap_seg_sizes[1]; + bus_addr_t dmamap_seg_addrs[NUM_DMA_SEGS]; + bus_size_t dmamap_seg_sizes[NUM_DMA_SEGS]; int dmamap_seg_count; + int dmamap_seg_index; int dmamap_status; }; @@ -255,7 +253,7 @@ bcm_sdhci_attach(device_t dev) err = bus_dma_tag_create(bus_get_dma_tag(dev), 1, 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - BCM_SDHCI_BUFFER_SIZE, 1, BCM_SDHCI_BUFFER_SIZE, + BCM_SDHCI_BUFFER_SIZE, NUM_DMA_SEGS, BCM_SDHCI_BUFFER_SIZE, BUS_DMA_ALLOCNOW, NULL, NULL, &sc->sc_dma_tag); @@ -428,18 +426,79 @@ bcm_sdhci_min_freq(device_t dev, struct } static void +bcm_sdhci_start_dma_seg(struct bcm_sdhci_softc *sc) +{ + struct sdhci_slot *slot; + vm_paddr_t pdst, psrc; + int err, idx, len, sync_op; + + slot = &sc->sc_slot; + idx = sc->dmamap_seg_index++; + len = sc->dmamap_seg_sizes[idx]; + slot->offset += len; + + if (slot->curcmd->data->flags & MMC_DATA_READ) { + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, + BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); + bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, + BCM_DMA_INC_ADDR, + (len & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); + psrc = sc->sc_sdhci_buffer_phys; + pdst = sc->dmamap_seg_addrs[idx]; + sync_op = BUS_DMASYNC_PREREAD; + } else { + bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, + BCM_DMA_INC_ADDR, + (len & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); + bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, + BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); + psrc = sc->dmamap_seg_addrs[idx]; + pdst = sc->sc_sdhci_buffer_phys; + sync_op = BUS_DMASYNC_PREWRITE; + } + + /* + * When starting a new DMA operation do the busdma sync operation, and + * disable SDCHI data interrrupts because we'll be driven by DMA + * interrupts (or SDHCI error interrupts) until the IO is done. + */ + if (idx == 0) { + bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); + slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | + SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); + bcm_sdhci_write_4(sc->sc_dev, &sc->sc_slot, SDHCI_SIGNAL_ENABLE, + slot->intmask); + } + + /* + * Start the DMA transfer. Only programming errors (like failing to + * allocate a channel) cause a non-zero return from bcm_dma_start(). + */ + err = bcm_dma_start(sc->sc_dma_ch, psrc, pdst, len); + KASSERT((err == 0), ("bcm2835_sdhci: failed DMA start")); +} + +static void bcm_sdhci_dma_intr(int ch, void *arg) { struct bcm_sdhci_softc *sc = (struct bcm_sdhci_softc *)arg; struct sdhci_slot *slot = &sc->sc_slot; uint32_t reg, mask; - vm_paddr_t pdst, psrc; - size_t len; int left, sync_op; mtx_lock(&slot->mtx); - len = bcm_dma_length(sc->sc_dma_ch); + /* + * If there are more segments for the current dma, start the next one. + * Otherwise unload the dma map and decide what to do next based on the + * status of the sdhci controller and whether there's more data left. + */ + if (sc->dmamap_seg_index < sc->dmamap_seg_count) { + bcm_sdhci_start_dma_seg(sc); + mtx_unlock(&slot->mtx); + return; + } + if (slot->curcmd->data->flags & MMC_DATA_READ) { sync_op = BUS_DMASYNC_POSTREAD; mask = SDHCI_INT_DATA_AVAIL; @@ -450,8 +509,8 @@ bcm_sdhci_dma_intr(int ch, void *arg) bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, sync_op); bus_dmamap_unload(sc->sc_dma_tag, sc->sc_dma_map); - slot->offset += len; - sc->sc_dma_inuse = 0; + sc->dmamap_seg_count = 0; + sc->dmamap_seg_index = 0; left = min(BCM_SDHCI_BUFFER_SIZE, slot->curcmd->data->len - slot->offset); @@ -475,7 +534,6 @@ bcm_sdhci_dma_intr(int ch, void *arg) else { /* already available? */ if (reg & mask) { - sc->sc_dma_inuse = 1; /* ACK for DATA_AVAIL or SPACE_AVAIL */ bcm_sdhci_write_4(slot->bus, slot, @@ -489,24 +547,7 @@ bcm_sdhci_dma_intr(int ch, void *arg) slot->curcmd->error = MMC_ERR_NO_MEMORY; sdhci_finish_data(slot); } else { - if (slot->curcmd->data->flags & MMC_DATA_READ) { - psrc = sc->sc_sdhci_buffer_phys; - pdst = sc->dmamap_seg_addrs[0]; - sync_op = BUS_DMASYNC_PREREAD; - } else { - psrc = sc->dmamap_seg_addrs[0]; - pdst = sc->sc_sdhci_buffer_phys; - sync_op = BUS_DMASYNC_PREWRITE; - } - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - sync_op); - if (bcm_dma_start(sc->sc_dma_ch, psrc, pdst, - left)) { - device_printf(sc->sc_dev, - "failed DMA start\n"); - slot->curcmd->error = MMC_ERR_FAILED; - sdhci_finish_data(slot); - } + bcm_sdhci_start_dma_seg(sc); } } else { /* wait for next data by INT */ @@ -528,7 +569,7 @@ bcm_sdhci_read_dma(device_t dev, struct struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - if (sc->sc_dma_inuse) { + if (sc->dmamap_seg_count != 0) { device_printf(sc->sc_dev, "DMA in use\n"); return; } @@ -547,25 +588,8 @@ bcm_sdhci_read_dma(device_t dev, struct return; } - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREREAD); - - bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, - BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); - bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, - BCM_DMA_INC_ADDR, - (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - - /* Disable INT */ - slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); - bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - - sc->sc_dma_inuse = 1; - /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, sc->sc_sdhci_buffer_phys, - sc->dmamap_seg_addrs[0], left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } static void @@ -574,7 +598,7 @@ bcm_sdhci_write_dma(device_t dev, struct struct bcm_sdhci_softc *sc = device_get_softc(slot->bus); size_t left; - if (sc->sc_dma_inuse) { + if (sc->dmamap_seg_count != 0) { device_printf(sc->sc_dev, "DMA in use\n"); return; } @@ -593,25 +617,8 @@ bcm_sdhci_write_dma(device_t dev, struct return; } - bcm_dma_setup_src(sc->sc_dma_ch, BCM_DMA_DREQ_NONE, - BCM_DMA_INC_ADDR, - (left & 0xf) ? BCM_DMA_32BIT : BCM_DMA_128BIT); - bcm_dma_setup_dst(sc->sc_dma_ch, BCM_DMA_DREQ_EMMC, - BCM_DMA_SAME_ADDR, BCM_DMA_32BIT); - - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREWRITE); - - /* Disable INT */ - slot->intmask &= ~(SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | SDHCI_INT_DATA_END); - bcm_sdhci_write_4(dev, slot, SDHCI_SIGNAL_ENABLE, slot->intmask); - - sc->sc_dma_inuse = 1; - /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, sc->dmamap_seg_addrs[0], - sc->sc_sdhci_buffer_phys, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } static int From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 03:06:29 2015 Return-Path: Delivered-To: svn-src-head@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 CF5FEA5F; Mon, 12 Jan 2015 03:06: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 BB6C47B2; Mon, 12 Jan 2015 03:06: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 t0C36Tcj017120; Mon, 12 Jan 2015 03:06:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C36TiX017119; Mon, 12 Jan 2015 03:06:29 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501120306.t0C36TiX017119@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 03:06:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277040 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 03:06:29 -0000 Author: emaste Date: Mon Jan 12 03:06:29 2015 New Revision: 277040 URL: https://svnweb.freebsd.org/changeset/base/277040 Log: Add ELF Tool Chain release notes Most recent import in r276398 and switch to ELF Tool Chain tools by default in r276796. Reviewed by: gjb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1501 Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 02:50:22 2015 (r277039) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Mon Jan 12 03:06:29 2015 (r277040) @@ -777,12 +777,26 @@ patches that add new relocations for &arch.powerpc; support. + The + ELF Tool Chain has been updated to + upstream revision r3136. + The texinfo utility and info pages were removed from the base system. The print/texinfo port should be installed on systems where info pages are needed. + + The ELF + object manipulation tools + addr2line, + elfcopy (strip), + nm, + size, and + strings were switched to the + versions from the ELF Tool Chain project. + From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 03:23:19 2015 Return-Path: Delivered-To: svn-src-head@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 2834731C; Mon, 12 Jan 2015 03:23: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 1329D9B2; Mon, 12 Jan 2015 03:23: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 t0C3NJcv026519; Mon, 12 Jan 2015 03:23:19 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C3NG0p026506; Mon, 12 Jan 2015 03:23:16 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501120323.t0C3NG0p026506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Mon, 12 Jan 2015 03:23:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277042 - in head/sys: arm/conf arm/ti arm/ti/am335x boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 03:23:19 -0000 Author: loos Date: Mon Jan 12 03:23:16 2015 New Revision: 277042 URL: https://svnweb.freebsd.org/changeset/base/277042 Log: Add support to turn off Beaglebone with poweroff(8) or shutdown(8) -p. To cut off the power we need to start the shutdown sequence by writing the OFF bit on PMIC. Once the PMIC is programmed the SoC needs to toggle the PMIC_PWR_ENABLE pin when it is ready for the PMIC to cut off the power. This is done by triggering the ALARM2 interrupt on SoC RTC. The RTC driver only works in power management mode which means it won't provide any kind of time keeping functionality. It only implements a way to trigger the ALARM2 interrupt when requested. Differential Revision: https://reviews.freebsd.org/D1489 Reviewed by: rpaulo MFC after: 2 weeks Added: head/sys/arm/ti/am335x/am335x_rtc.c (contents, props changed) head/sys/arm/ti/am335x/am335x_rtcreg.h (contents, props changed) head/sys/arm/ti/am335x/am335x_rtcvar.h (contents, props changed) Modified: head/sys/arm/conf/BEAGLEBONE head/sys/arm/ti/am335x/am335x_pmic.c head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/am335x/files.am335x head/sys/arm/ti/ti_prcm.h head/sys/boot/fdt/dts/arm/am335x.dtsi Modified: head/sys/arm/conf/BEAGLEBONE ============================================================================== --- head/sys/arm/conf/BEAGLEBONE Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/conf/BEAGLEBONE Mon Jan 12 03:23:16 2015 (r277042) @@ -101,6 +101,8 @@ device iic device ti_i2c device am335x_pmic # AM335x Power Management IC (TPC65217) +device am335x_rtc # RTC support (power management only) + # Console and misc device uart device uart_ns8250 Modified: head/sys/arm/ti/am335x/am335x_pmic.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_pmic.c Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/am335x/am335x_pmic.c Mon Jan 12 03:23:16 2015 (r277042) @@ -31,11 +31,13 @@ __FBSDID("$FreeBSD$"); */ #include #include +#include #include #include #include #include #include +#include #include #include @@ -46,6 +48,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include "iicbus_if.h" #define TPS65217A 0x7 @@ -56,6 +60,10 @@ __FBSDID("$FreeBSD$"); /* TPS65217 Reisters */ #define TPS65217_CHIPID_REG 0x00 #define TPS65217_STATUS_REG 0x0A +#define TPS65217_STATUS_OFF (1U << 7) +#define TPS65217_STATUS_ACPWR (1U << 3) +#define TPS65217_STATUS_USBPWR (1U << 2) +#define TPS65217_STATUS_BT (1U << 0) #define MAX_IIC_DATA_SIZE 2 @@ -66,6 +74,8 @@ struct am335x_pmic_softc { struct intr_config_hook enum_hook; }; +static void am335x_pmic_shutdown(void *, int); + static int am335x_pmic_read(device_t dev, uint8_t addr, uint8_t *data, uint8_t size) { @@ -77,7 +87,6 @@ am335x_pmic_read(device_t dev, uint8_t a return (iicbus_transfer(dev, msg, 2)); } -#ifdef notyet static int am335x_pmic_write(device_t dev, uint8_t address, uint8_t *data, uint8_t size) { @@ -95,7 +104,6 @@ am335x_pmic_write(device_t dev, uint8_t return (iicbus_transfer(dev, msg, 1)); } -#endif static int am335x_pmic_probe(device_t dev) @@ -146,6 +154,9 @@ am335x_pmic_start(void *xdev) am335x_pmic_read(dev, TPS65217_STATUS_REG, ®, 1); device_printf(dev, "%s powered by %s\n", name, pwr[(reg>>2)&0x03]); + EVENTHANDLER_REGISTER(shutdown_final, am335x_pmic_shutdown, dev, + SHUTDOWN_PRI_LAST); + config_intrhook_disestablish(&sc->enum_hook); } @@ -165,6 +176,22 @@ am335x_pmic_attach(device_t dev) return (0); } +static void +am335x_pmic_shutdown(void *xdev, int howto) +{ + device_t dev; + uint8_t reg; + + if (!(howto & RB_POWEROFF)) + return; + dev = (device_t)xdev; + /* Set the OFF bit on status register to start the shutdown sequence. */ + reg = TPS65217_STATUS_OFF; + am335x_pmic_write(dev, TPS65217_STATUS_REG, ®, 1); + /* Toggle pmic_pwr_enable to shutdown the PMIC. */ + am335x_rtc_pmic_pwr_toggle(); +} + static device_method_t am335x_pmic_methods[] = { DEVMETHOD(device_probe, am335x_pmic_probe), DEVMETHOD(device_attach, am335x_pmic_attach), Modified: head/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_prcm.c Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/am335x/am335x_prcm.c Mon Jan 12 03:23:16 2015 (r277042) @@ -118,6 +118,10 @@ __FBSDID("$FreeBSD$"); #define CLKSEL_TIMER6_CLK (CM_DPLL + 0x01C) #define CLKSEL_PRUSS_OCP_CLK (CM_DPLL + 0x030) +#define CM_RTC 0x800 +#define CM_RTC_RTC_CLKCTRL (CM_RTC + 0x000) +#define CM_RTC_CLKSTCTRL (CM_RTC + 0x004) + #define PRM_PER 0xC00 #define PRM_PER_RSTCTRL (PRM_PER + 0x00) @@ -295,7 +299,8 @@ struct ti_clock_dev ti_am335x_clk_devmap .clk_get_source_freq = NULL, }, - + /* RTC */ + AM335X_GENERIC_CLOCK_DEV(RTC_CLK), { INVALID_CLK_IDENT, NULL, NULL, NULL, NULL } }; @@ -363,6 +368,9 @@ static struct am335x_clk_details g_am335 _CLK_DETAIL(MAILBOX0_CLK, CM_PER_MAILBOX0_CLKCTRL, 0), _CLK_DETAIL(SPINLOCK0_CLK, CM_PER_SPINLOCK0_CLKCTRL, 0), + /* RTC module */ + _CLK_DETAIL(RTC_CLK, CM_RTC_RTC_CLKCTRL, 0), + { INVALID_CLK_IDENT, 0}, }; Added: head/sys/arm/ti/am335x/am335x_rtc.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_rtc.c Mon Jan 12 03:23:16 2015 (r277042) @@ -0,0 +1,211 @@ +/*- + * Copyright (c) 2015 Luiz Otavio O Souza + * 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 +#include +#include +#include + +#define RTC_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) +#define RTC_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) +#define RTC_LOCK_INIT(_sc) mtx_init(&(_sc)->sc_mtx, \ + device_get_nameunit(_sc->sc_dev), "am335x_rtc", MTX_DEF) +#define RTC_LOCK_DESTROY(_sc) mtx_destroy(&(_sc)->sc_mtx) + +#define RTC_READ4(_sc, reg) \ + bus_read_4((_sc)->sc_mem_res, reg) +#define RTC_WRITE4(_sc, reg, value) \ + bus_write_4((_sc)->sc_mem_res, reg, value) + +#define RTC_MAXIRQS 2 + +struct am335x_rtc_softc { + device_t sc_dev; + struct mtx sc_mtx; + struct resource *sc_irq_res[RTC_MAXIRQS]; + struct resource *sc_mem_res; +}; + +static struct am335x_rtc_softc *rtc_sc = NULL; +static struct resource_spec am335x_rtc_irq_spec[] = { + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 1, RF_ACTIVE }, + { -1, 0, 0 } +}; + +static int +am335x_rtc_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "ti,da830-rtc")) + return (ENXIO); + device_set_desc(dev, "AM335x RTC (power management mode)"); + + return (BUS_PROBE_DEFAULT); +} + +static int +am335x_rtc_attach(device_t dev) +{ + int rid; + struct am335x_rtc_softc *sc; + uint32_t rev; + + if (rtc_sc != NULL) + return (ENXIO); + rtc_sc = sc = device_get_softc(dev); + sc->sc_dev = dev; + rid = 0; + sc->sc_mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, + RF_ACTIVE); + if (!sc->sc_mem_res) { + device_printf(dev, "cannot allocate memory resources\n"); + return (ENXIO); + } + if (bus_alloc_resources(dev, am335x_rtc_irq_spec, sc->sc_irq_res) != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + device_printf(dev, "cannot allocate irq resources\n"); + return (ENXIO); + } + RTC_LOCK_INIT(sc); + + /* Enable the RTC module. */ + ti_prcm_clk_enable(RTC_CLK); + rev = RTC_READ4(sc, RTC_REVISION); + device_printf(dev, "AM335X RTC v%d.%d.%d\n", + (rev >> 8) & 0x7, (rev >> 6) & 0x3, rev & 0x3f); + /* Unlock the RTC. */ + RTC_WRITE4(sc, RTC_KICK0R, RTC_KICK0R_PASS); + RTC_WRITE4(sc, RTC_KICK1R, RTC_KICK1R_PASS); + /* Stop the RTC, we don't need it right now. */ + RTC_WRITE4(sc, RTC_CTRL, 0); + /* Disable interrupts. */ + RTC_WRITE4(sc, RTC_INTR, 0); + /* Ack any pending interrupt. */ + RTC_WRITE4(sc, RTC_STATUS, RTC_STATUS_ALARM2 | RTC_STATUS_ALARM); + /* Enable external clock (xtal) and 32 kHz clock. */ + RTC_WRITE4(sc, RTC_OSC, RTC_OSC_32KCLK_EN | RTC_OSC_32KCLK_SEL); + /* Enable pmic_pwr_enable. */ + RTC_WRITE4(sc, RTC_PMIC, PMIC_PWR_ENABLE); + + return (0); +} + +static int +am335x_rtc_detach(device_t dev) +{ + struct am335x_rtc_softc *sc; + + sc = device_get_softc(dev); + if (sc->sc_irq_res) + bus_release_resources(dev, am335x_rtc_irq_spec, sc->sc_irq_res); + if (sc->sc_mem_res) + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + RTC_LOCK_DESTROY(sc); + + return (0); +} + +void +am335x_rtc_pmic_pwr_toggle(void) +{ + int timeout; + struct clocktime ct; + struct timespec ts; + + /* + * We stop the RTC so we don't need to check the STATUS.BUSY bit + * before update ALARM2 registers. + */ + timeout = 10; + RTC_WRITE4(rtc_sc, RTC_CTRL, 0); + while (--timeout && RTC_READ4(rtc_sc, RTC_STATUS) & RTC_STATUS_RUN) + DELAY(100); + if (timeout == 0) { + device_printf(rtc_sc->sc_dev, "RTC does not stop.\n"); + return; + } + /* Program the ALARM2 to fire in 2 seconds. */ + ct.dow = 0; + ct.nsec = 0; + ct.sec = FROMBCD(RTC_READ4(rtc_sc, RTC_SECONDS) & 0x7f); + ct.min = FROMBCD(RTC_READ4(rtc_sc, RTC_MINUTES) & 0x7f); + ct.hour = FROMBCD(RTC_READ4(rtc_sc, RTC_HOURS) & 0x3f); + ct.day = FROMBCD(RTC_READ4(rtc_sc, RTC_DAYS) & 0x3f); + ct.mon = FROMBCD(RTC_READ4(rtc_sc, RTC_MONTHS) & 0x1f); + ct.year = FROMBCD(RTC_READ4(rtc_sc, RTC_YEARS) & 0xff); + ct.year += POSIX_BASE_YEAR; + clock_ct_to_ts(&ct, &ts); + ts.tv_sec += 2; + clock_ts_to_ct(&ts, &ct); + RTC_WRITE4(rtc_sc, RTC_ALARM2_SECONDS, TOBCD(ct.sec)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_MINUTES, TOBCD(ct.min)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_HOURS, TOBCD(ct.hour)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_DAYS, TOBCD(ct.day)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_MONTHS, TOBCD(ct.mon)); + RTC_WRITE4(rtc_sc, RTC_ALARM2_YEARS, TOBCD(ct.year - POSIX_BASE_YEAR)); + /* Enable ALARM2 interrupt. */ + RTC_WRITE4(rtc_sc, RTC_INTR, RTC_INTR_ALARM2); + /* Start count. */ + RTC_WRITE4(rtc_sc, RTC_CTRL, RTC_CTRL_RUN); +} + +static device_method_t am335x_rtc_methods[] = { + DEVMETHOD(device_probe, am335x_rtc_probe), + DEVMETHOD(device_attach, am335x_rtc_attach), + DEVMETHOD(device_detach, am335x_rtc_detach), + + DEVMETHOD_END +}; + +static driver_t am335x_rtc_driver = { + "am335x_rtc", + am335x_rtc_methods, + sizeof(struct am335x_rtc_softc), +}; + +static devclass_t am335x_rtc_devclass; + +DRIVER_MODULE(am335x_rtc, simplebus, am335x_rtc_driver, am335x_rtc_devclass, 0, 0); +MODULE_VERSION(am335x_rtc, 1); +MODULE_DEPEND(am335x_rtc, simplebus, 1, 1, 1); Added: head/sys/arm/ti/am335x/am335x_rtcreg.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_rtcreg.h Mon Jan 12 03:23:16 2015 (r277042) @@ -0,0 +1,76 @@ +/*- + * Copyright 2015 Luiz Otavio O Souza + * 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 _AM335X_RTCREG_H_ +#define _AM335X_RTCREG_H_ + +#define RTC_SECONDS 0x00 +#define RTC_MINUTES 0x04 +#define RTC_HOURS 0x08 +#define RTC_DAYS 0x0c +#define RTC_MONTHS 0x10 +#define RTC_YEARS 0x14 +#define RTC_WEEK 0x18 +#define RTC_CTRL 0x40 +#define RTC_CTRL_DISABLE (1U << 6) +#define RTC_CTRL_RUN (1U << 0) +#define RTC_STATUS 0x44 +#define RTC_STATUS_ALARM2 (1U << 7) +#define RTC_STATUS_ALARM (1U << 6) +#define RTC_STATUS_1D_EVENT (1U << 5) +#define RTC_STATUS_1H_EVENT (1U << 4) +#define RTC_STATUS_1M_EVENT (1U << 3) +#define RTC_STATUS_1S_EVENT (1U << 2) +#define RTC_STATUS_RUN (1U << 1) +#define RTC_STATUS_BUSY (1U << 0) +#define RTC_INTR 0x48 +#define RTC_INTR_ALARM2 (1U << 4) +#define RTC_INTR_ALARM (1U << 3) +#define RTC_INTR_TIMER (1U << 2) +#define RTC_OSC 0x54 +#define RTC_OSC_32KCLK_EN (1U << 6) +#define RTC_OSC_OSC32K_GZ (1U << 4) +#define RTC_OSC_32KCLK_SEL (1U << 3) +#define RTC_OSC_RES_SELECT (1U << 2) +#define RTC_OSC_SW2 (1U << 1) +#define RTC_OSC_SW1 (1U << 0) +#define RTC_KICK0R 0x6c +#define RTC_KICK0R_PASS 0x83e70b13 +#define RTC_KICK1R 0x70 +#define RTC_KICK1R_PASS 0x95a4f1e0 +#define RTC_REVISION 0x74 +#define RTC_ALARM2_SECONDS 0x80 +#define RTC_ALARM2_MINUTES 0x84 +#define RTC_ALARM2_HOURS 0x88 +#define RTC_ALARM2_DAYS 0x8c +#define RTC_ALARM2_MONTHS 0x90 +#define RTC_ALARM2_YEARS 0x94 +#define RTC_PMIC 0x98 +#define PMIC_PWR_ENABLE (1U << 16) + +#endif /* _AM335X_RTCREG_H_ */ Added: head/sys/arm/ti/am335x/am335x_rtcvar.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/ti/am335x/am335x_rtcvar.h Mon Jan 12 03:23:16 2015 (r277042) @@ -0,0 +1,34 @@ +/*- + * Copyright 2015 Luiz Otavio O Souza + * 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 _AM335X_RTCVAR_H_ +#define _AM335X_RTCVAR_H_ + +void am335x_rtc_pmic_pwr_toggle(void); + +#endif /* _AM335X_RTCVAR_H_ */ Modified: head/sys/arm/ti/am335x/files.am335x ============================================================================== --- head/sys/arm/ti/am335x/files.am335x Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/am335x/files.am335x Mon Jan 12 03:23:16 2015 (r277042) @@ -9,6 +9,7 @@ arm/ti/am335x/am335x_lcd_syscons.c optio arm/ti/am335x/am335x_pmic.c optional am335x_pmic arm/ti/am335x/am335x_prcm.c standard arm/ti/am335x/am335x_pwm.c standard +arm/ti/am335x/am335x_rtc.c optional am335x_rtc arm/ti/am335x/am335x_scm_padconf.c standard arm/ti/am335x/am335x_usbss.c optional musb fdt Modified: head/sys/arm/ti/ti_prcm.h ============================================================================== --- head/sys/arm/ti/ti_prcm.h Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/arm/ti/ti_prcm.h Mon Jan 12 03:23:16 2015 (r277042) @@ -164,6 +164,9 @@ typedef enum { TSC_ADC_CLK = 1800, + /* RTC module */ + RTC_CLK = 1900, + INVALID_CLK_IDENT } clk_ident_t; Modified: head/sys/boot/fdt/dts/arm/am335x.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 12 03:14:54 2015 (r277041) +++ head/sys/boot/fdt/dts/arm/am335x.dtsi Mon Jan 12 03:23:16 2015 (r277042) @@ -75,6 +75,13 @@ interrupt-parent = <&AINTC>; }; + rtc: rtc@44E3E000 { + compatible = "ti,da830-rtc"; + reg = <0x44E3E000 0x1000>; + interrupts = < 75 76 >; + interrupt-parent = <&AINTC>; + }; + adc0: adc@44E0D000 { compatible = "ti,adc"; reg = <0x44E0D000 0x2000>; From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 03:39:57 2015 Return-Path: Delivered-To: svn-src-head@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 A1AAB6FF; Mon, 12 Jan 2015 03:39: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 8EC22ADF; Mon, 12 Jan 2015 03:39: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 t0C3dvxZ032091; Mon, 12 Jan 2015 03:39:57 GMT (envelope-from grehan@FreeBSD.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C3dvF8032090; Mon, 12 Jan 2015 03:39:57 GMT (envelope-from grehan@FreeBSD.org) Message-Id: <201501120339.t0C3dvF8032090@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: grehan set sender to grehan@FreeBSD.org using -f From: Peter Grehan Date: Mon, 12 Jan 2015 03:39:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277043 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 03:39:57 -0000 Author: grehan Date: Mon Jan 12 03:39:56 2015 New Revision: 277043 URL: https://svnweb.freebsd.org/changeset/base/277043 Log: Add PCI ID for the Oxford Semiconductor OXPCIe952 device. Seen on the StarTech "1 Port Native ExpressCard RS232 Serial AdapterCard with 16950 UART" Reported and tested by: Michael Dexter MFC after: 1 week Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Mon Jan 12 03:23:16 2015 (r277042) +++ head/sys/dev/uart/uart_bus_pci.c Mon Jan 12 03:39:56 2015 (r277043) @@ -112,6 +112,8 @@ static const struct pci_id pci_ns8250_id 8 * DEFAULT_RCLK }, { 0x1415, 0x950b, 0xffff, 0, "Oxford Semiconductor OXCB950 Cardbus 16950 UART", 0x10, 16384000 }, +{ 0x1415, 0xc120, 0xffff, 0, "Oxford Semiconductor OXPCIe952 PCIe 16950 UART", + 0x10 }, { 0x14e4, 0x4344, 0xffff, 0, "Sony Ericsson GC89 PC Card", 0x10}, { 0x151f, 0x0000, 0xffff, 0, "TOPIC Semiconductor TP560 56k modem", 0x10 }, { 0x1fd4, 0x1999, 0x1fd4, 0x0001, "Sunix SER5xxxx Serial Port", 0x10, From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 06:34:25 2015 Return-Path: Delivered-To: svn-src-head@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 347E3C0A; Mon, 12 Jan 2015 06: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 16C76C54; Mon, 12 Jan 2015 06: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 t0C6YOd6015476; Mon, 12 Jan 2015 06:34:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C6YOfN015470; Mon, 12 Jan 2015 06:34:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501120634.t0C6YOfN015470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 12 Jan 2015 06:34:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277044 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 06:34:25 -0000 Author: hselasky Date: Mon Jan 12 06:34:23 2015 New Revision: 277044 URL: https://svnweb.freebsd.org/changeset/base/277044 Log: Increase the maximum number of dynamic USB quirks. USB memory stick devices which don't support the synchronize cache SCSI command are likely to also not support the prevent-allow medium removal SCSI command. PR: 185747 MFC after: 1 week Modified: head/sys/dev/usb/usb_freebsd.h head/sys/dev/usb/usb_freebsd_loader.h head/sys/dev/usb/usb_msctest.c Modified: head/sys/dev/usb/usb_freebsd.h ============================================================================== --- head/sys/dev/usb/usb_freebsd.h Mon Jan 12 03:39:56 2015 (r277043) +++ head/sys/dev/usb/usb_freebsd.h Mon Jan 12 06:34:23 2015 (r277044) @@ -88,7 +88,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: head/sys/dev/usb/usb_freebsd_loader.h ============================================================================== --- head/sys/dev/usb/usb_freebsd_loader.h Mon Jan 12 03:39:56 2015 (r277043) +++ head/sys/dev/usb/usb_freebsd_loader.h Mon Jan 12 06:34:23 2015 (r277044) @@ -83,7 +83,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: head/sys/dev/usb/usb_msctest.c ============================================================================== --- head/sys/dev/usb/usb_msctest.c Mon Jan 12 03:39:56 2015 (r277043) +++ head/sys/dev/usb/usb_msctest.c Mon Jan 12 06:34:23 2015 (r277044) @@ -718,10 +718,11 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache\n"); + DPRINTF("Device doesn't handle synchronize cache " + "and prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -748,10 +749,13 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache\n"); + "handle synchronize cache nor" + "prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; @@ -795,6 +799,7 @@ error: DPRINTF("Device did not respond, enabling all quirks\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY); /* Need to re-enumerate the device */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 07:29:36 2015 Return-Path: Delivered-To: svn-src-head@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 B70B64EB; Mon, 12 Jan 2015 07:29: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 A372613A; Mon, 12 Jan 2015 07:29: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 t0C7Tag2039333; Mon, 12 Jan 2015 07:29:36 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7Ta8C039332; Mon, 12 Jan 2015 07:29:36 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501120729.t0C7Ta8C039332@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 12 Jan 2015 07:29:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277046 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:29:36 -0000 Author: tuexen Date: Mon Jan 12 07:29:35 2015 New Revision: 277046 URL: https://svnweb.freebsd.org/changeset/base/277046 Log: Remove dead code. Reported by: Coverity CID: 1018053 MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Mon Jan 12 07:24:01 2015 (r277045) +++ head/sys/netinet/sctp_asconf.c Mon Jan 12 07:29:35 2015 (r277046) @@ -596,7 +596,7 @@ sctp_handle_asconf(struct mbuf *m, unsig uint32_t serial_num; struct mbuf *n, *m_ack, *m_result, *m_tail; struct sctp_asconf_ack_chunk *ack_cp; - struct sctp_asconf_paramhdr *aph, *ack_aph; + struct sctp_asconf_paramhdr *aph; struct sctp_ipv6addr_param *p_addr; unsigned int asconf_limit, cnt; int error = 0; /* did an error occur? */ @@ -679,13 +679,6 @@ sctp_handle_asconf(struct mbuf *m, unsig } /* param_length is already validated in process_control... */ offset += ntohs(p_addr->ph.param_length); /* skip lookup addr */ - - /* get pointer to first asconf param in ASCONF-ACK */ - ack_aph = (struct sctp_asconf_paramhdr *)(mtod(m_ack, caddr_t)+sizeof(struct sctp_asconf_ack_chunk)); - if (ack_aph == NULL) { - SCTPDBG(SCTP_DEBUG_ASCONF1, "Gak in asconf2\n"); - return; - } /* get pointer to first asconf param in ASCONF */ aph = (struct sctp_asconf_paramhdr *)sctp_m_getptr(m, offset, sizeof(struct sctp_asconf_paramhdr), (uint8_t *) & aparam_buf); if (aph == NULL) { From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 07:36:27 2015 Return-Path: Delivered-To: svn-src-head@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 3869168C; Mon, 12 Jan 2015 07:36: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 247AA204; Mon, 12 Jan 2015 07:36: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 t0C7aRPn043679; Mon, 12 Jan 2015 07:36:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7aPxW043673; Mon, 12 Jan 2015 07:36:25 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120736.t0C7aPxW043673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 07:36:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277047 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:36:27 -0000 Author: kib Date: Mon Jan 12 07:36:25 2015 New Revision: 277047 URL: https://svnweb.freebsd.org/changeset/base/277047 Log: For x86, read MAXPHYADDR, defined in SDM vol 3 4.1.4 Enumeration of Paging Features by CPUID as CPUID.80000008H:EAX[7:0], into variable cpu_maxphyaddr. Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/include/md_var.h head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/amd64/amd64/initcpu.c ============================================================================== --- head/sys/amd64/amd64/initcpu.c Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/amd64/amd64/initcpu.c Mon Jan 12 07:36:25 2015 (r277047) @@ -78,6 +78,7 @@ u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ +u_int cpu_maxphyaddr; /* Max phys addr width in bits */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: head/sys/amd64/include/md_var.h ============================================================================== --- head/sys/amd64/include/md_var.h Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/amd64/include/md_var.h Mon Jan 12 07:36:25 2015 (r277047) @@ -61,6 +61,7 @@ extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cpu_maxphyaddr; extern char ctx_switch_xsave[]; extern u_int hv_high; extern char hv_vendor[]; Modified: head/sys/i386/i386/initcpu.c ============================================================================== --- head/sys/i386/i386/initcpu.c Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/i386/i386/initcpu.c Mon Jan 12 07:36:25 2015 (r277047) @@ -107,6 +107,7 @@ u_int cpu_mon_mwait_flags; /* MONITOR/MW u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ u_int cyrix_did; /* Device ID of Cyrix CPU */ +u_int cpu_maxphyaddr; /* Max phys addr width in bits */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: head/sys/i386/include/md_var.h ============================================================================== --- head/sys/i386/include/md_var.h Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/i386/include/md_var.h Mon Jan 12 07:36:25 2015 (r277047) @@ -61,6 +61,7 @@ extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cpu_maxphyaddr; extern u_int cyrix_did; #if defined(I586_CPU) && !defined(NO_F00F_HACK) extern int has_f00f_bug; Modified: head/sys/x86/x86/identcpu.c ============================================================================== --- head/sys/x86/x86/identcpu.c Mon Jan 12 07:29:35 2015 (r277046) +++ head/sys/x86/x86/identcpu.c Mon Jan 12 07:36:25 2015 (r277047) @@ -1393,7 +1393,10 @@ identify_cpu(void) } if (cpu_exthigh >= 0x80000008) { do_cpuid(0x80000008, regs); + cpu_maxphyaddr = regs[0] & 0xff; cpu_procinfo2 = regs[2]; + } else { + cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32; } #ifdef __i386__ From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 07:37:07 2015 Return-Path: Delivered-To: svn-src-head@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 DDD747CA; Mon, 12 Jan 2015 07:37: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 C897920D; Mon, 12 Jan 2015 07:37: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 t0C7b7xE043810; Mon, 12 Jan 2015 07:37:07 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7b7XH043809; Mon, 12 Jan 2015 07:37:07 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201501120737.t0C7b7XH043809@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Mon, 12 Jan 2015 07:37:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277048 - head/sys/dev/sis X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:37:08 -0000 Author: yongari Date: Mon Jan 12 07:37:06 2015 New Revision: 277048 URL: https://svnweb.freebsd.org/changeset/base/277048 Log: Enable receive filter in sis_rxfilter(). While I'm here add a check for driver running state for multicast filter handling. Suggested by: brad@OpenBSD.org Modified: head/sys/dev/sis/if_sis.c Modified: head/sys/dev/sis/if_sis.c ============================================================================== --- head/sys/dev/sis/if_sis.c Mon Jan 12 07:36:25 2015 (r277047) +++ head/sys/dev/sis/if_sis.c Mon Jan 12 07:37:06 2015 (r277048) @@ -758,7 +758,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); } @@ -820,7 +821,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-head@FreeBSD.ORG Mon Jan 12 07:39:52 2015 Return-Path: Delivered-To: svn-src-head@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 EC6C593D; Mon, 12 Jan 2015 07:39: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 D8E5E219; Mon, 12 Jan 2015 07:39: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 t0C7dqDT044153; Mon, 12 Jan 2015 07:39:52 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7dqqJ044152; Mon, 12 Jan 2015 07:39:52 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501120739.t0C7dqqJ044152@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 12 Jan 2015 07:39:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277049 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:39:53 -0000 Author: tuexen Date: Mon Jan 12 07:39:52 2015 New Revision: 277049 URL: https://svnweb.freebsd.org/changeset/base/277049 Log: Remove dead code. Reported by: Coverity CID: 1018052 MFC after: 1 week Modified: head/sys/netinet/sctputil.c Modified: head/sys/netinet/sctputil.c ============================================================================== --- head/sys/netinet/sctputil.c Mon Jan 12 07:37:06 2015 (r277048) +++ head/sys/netinet/sctputil.c Mon Jan 12 07:39:52 2015 (r277049) @@ -5047,7 +5047,6 @@ sctp_find_ifa_by_addr(struct sockaddr *a vrf = sctp_find_vrf(vrf_id); if (vrf == NULL) { -stage_right: if (holds_lock == 0) SCTP_IPI_ADDR_RUNLOCK(); return (NULL); @@ -5067,15 +5066,6 @@ stage_right: return (NULL); } LIST_FOREACH(sctp_ifap, hash_head, next_bucket) { - if (sctp_ifap == NULL) { -#ifdef INVARIANTS - panic("Huh LIST_FOREACH corrupt"); - goto stage_right; -#else - SCTP_PRINTF("LIST corrupt of sctp_ifap's?\n"); - goto stage_right; -#endif - } if (addr->sa_family != sctp_ifap->address.sa.sa_family) continue; #ifdef INET From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 07:43:20 2015 Return-Path: Delivered-To: svn-src-head@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 B0975B3C; Mon, 12 Jan 2015 07:43: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 9CA2F2F1; Mon, 12 Jan 2015 07:43: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 t0C7hKTZ048037; Mon, 12 Jan 2015 07:43:20 GMT (envelope-from yongari@FreeBSD.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7hKvK048036; Mon, 12 Jan 2015 07:43:20 GMT (envelope-from yongari@FreeBSD.org) Message-Id: <201501120743.t0C7hKvK048036@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: yongari set sender to yongari@FreeBSD.org using -f From: Pyun YongHyeon Date: Mon, 12 Jan 2015 07:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277050 - head/sys/dev/nge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:43:20 -0000 Author: yongari Date: Mon Jan 12 07:43:19 2015 New Revision: 277050 URL: https://svnweb.freebsd.org/changeset/base/277050 Log: 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. Suggested by: brad@OpenBSD.org Modified: head/sys/dev/nge/if_nge.c Modified: head/sys/dev/nge/if_nge.c ============================================================================== --- head/sys/dev/nge/if_nge.c Mon Jan 12 07:39:52 2015 (r277049) +++ head/sys/dev/nge/if_nge.c Mon Jan 12 07:43:19 2015 (r277050) @@ -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-head@FreeBSD.ORG Mon Jan 12 07:48:23 2015 Return-Path: Delivered-To: svn-src-head@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 2CB1CCB7; Mon, 12 Jan 2015 07:48: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 0E867314; Mon, 12 Jan 2015 07:48: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 t0C7mMZ5048708; Mon, 12 Jan 2015 07:48:22 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7mMWc048707; Mon, 12 Jan 2015 07:48:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120748.t0C7mMWc048707@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 07:48:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277051 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:48:23 -0000 Author: kib Date: Mon Jan 12 07:48:22 2015 New Revision: 277051 URL: https://svnweb.freebsd.org/changeset/base/277051 Log: Fix several issues with /dev/mem and /dev/kmem devices on amd64. For /dev/mem, when requested physical address is not accessible by the direct map, do temporal remaping with the caching attribute 'uncached'. Limit the accessible addresses by MAXPHYADDR, since the architecture disallowes writing non-zero into reserved bits of ptes (or setting garbage into NX). For /dev/kmem, only access existing kernel mappings for direct map region. For all other addresses, obtain a physical address of the mapping and fall back to the /dev/mem mechanism. This ensures that /dev/kmem i/o does not fault even if the accessed region is changed in parallel, by using either direct map or temporal mapping. For both devices, operate on one page by iteration. Do not return error if any bytes were moved around, return the (partial) bytes count to userspace. Reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/mem.c Modified: head/sys/amd64/amd64/mem.c ============================================================================== --- head/sys/amd64/amd64/mem.c Mon Jan 12 07:43:19 2015 (r277050) +++ head/sys/amd64/amd64/mem.c Mon Jan 12 07:48:22 2015 (r277051) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -77,13 +78,15 @@ int memrw(struct cdev *dev, struct uio *uio, int flags) { struct iovec *iov; - u_long c, v, vd; - int error, o, sflags; - vm_offset_t addr, eaddr; + void *p; + ssize_t orig_resid; + u_long v, vd; + u_int c; + int error, sflags; error = 0; - c = 0; sflags = curthread_pflags_set(TDP_DEVMEMIO); + orig_resid = uio->uio_resid; while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -93,63 +96,68 @@ memrw(struct cdev *dev, struct uio *uio, panic("memrw"); continue; } - if (dev2unit(dev) == CDEV_MINOR_MEM) { - v = uio->uio_offset; -kmemphys: - o = v & PAGE_MASK; - c = min(uio->uio_resid, (u_int)(PAGE_SIZE - o)); - vd = PHYS_TO_DMAP_RAW(v); - if (vd < DMAP_MIN_ADDRESS || - (vd > DMAP_MIN_ADDRESS + dmaplimit && - vd <= DMAP_MAX_ADDRESS) || - (pmap_kextract(vd) == 0 && (v & PG_FRAME) != 0)) { - error = EFAULT; - goto ret; - } - error = uiomove((void *)vd, (int)c, uio); - continue; - } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { - v = uio->uio_offset; + v = uio->uio_offset; + c = ulmin(iov->iov_len, PAGE_SIZE - (u_int)(v & PAGE_MASK)); - if (v >= DMAP_MIN_ADDRESS && v < DMAP_MAX_ADDRESS) { - v = DMAP_TO_PHYS_RAW(v); - goto kmemphys; + switch (dev2unit(dev)) { + case CDEV_MINOR_KMEM: + /* + * Since c is clamped to be less or equal than + * PAGE_SIZE, the uiomove() call does not + * access past the end of the direct map. + */ + if (v >= DMAP_MIN_ADDRESS && + v < DMAP_MIN_ADDRESS + dmaplimit) { + error = uiomove((void *)v, c, uio); + break; } - c = iov->iov_len; + if (!kernacc((void *)v, c, uio->uio_rw == UIO_READ ? + VM_PROT_READ : VM_PROT_WRITE)) { + error = EFAULT; + break; + } /* - * Make sure that all of the pages are currently - * resident so that we don't create any zero-fill - * pages. + * If the extracted address is not accessible + * through the direct map, then we make a + * private (uncached) mapping because we can't + * depend on the existing kernel mapping + * remaining valid until the completion of + * uiomove(). + * + * XXX We cannot provide access to the + * physical page 0 mapped into KVA. */ - addr = trunc_page(v); - eaddr = round_page(v + c); - - if (addr < VM_MIN_KERNEL_ADDRESS) { + v = pmap_extract(kernel_pmap, v); + if (v == 0) { error = EFAULT; - goto ret; + break; } - for (; addr < eaddr; addr += PAGE_SIZE) { - if (pmap_extract(kernel_pmap, addr) == 0) { - error = EFAULT; - goto ret; - } + /* FALLTHROUGH */ + case CDEV_MINOR_MEM: + if (v < dmaplimit) { + vd = PHYS_TO_DMAP(v); + error = uiomove((void *)vd, c, uio); + break; } - if (!kernacc((caddr_t)(long)v, c, - uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) { + if (v >= (1ULL << cpu_maxphyaddr)) { error = EFAULT; - goto ret; + break; } - - error = uiomove((caddr_t)(long)v, (int)c, uio); - continue; + p = pmap_mapdev(v, PAGE_SIZE); + error = uiomove(p, c, uio); + pmap_unmapdev((vm_offset_t)p, PAGE_SIZE); + break; } - /* else panic! */ } -ret: curthread_pflags_restore(sflags); + /* + * Don't return error if any byte was written. Read and write + * can return error only if no i/o was performed. + */ + if (uio->uio_resid != orig_resid) + error = 0; return (error); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 07:50:56 2015 Return-Path: Delivered-To: svn-src-head@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 81559E45; Mon, 12 Jan 2015 07:50: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 6D2D5340; Mon, 12 Jan 2015 07:50: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 t0C7ouuN050616; Mon, 12 Jan 2015 07:50:56 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7ouIx050615; Mon, 12 Jan 2015 07:50:56 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120750.t0C7ouIx050615@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 07:50:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277052 - head/sys/amd64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:50:56 -0000 Author: kib Date: Mon Jan 12 07:50:55 2015 New Revision: 277052 URL: https://svnweb.freebsd.org/changeset/base/277052 Log: Revert r276600: PHYS_TO_DMAP_RAW() and DMAP_TO_PHYS_RAW() are no longer used, remove them. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/include/vmparam.h Modified: head/sys/amd64/include/vmparam.h ============================================================================== --- head/sys/amd64/include/vmparam.h Mon Jan 12 07:48:22 2015 (r277051) +++ head/sys/amd64/include/vmparam.h Mon Jan 12 07:50:55 2015 (r277052) @@ -183,8 +183,6 @@ #define VM_MAX_ADDRESS UPT_MAX_ADDRESS #define VM_MIN_ADDRESS (0) -#define PHYS_TO_DMAP_RAW(x) ((x) | DMAP_MIN_ADDRESS) -#define DMAP_TO_PHYS_RAW(x) ((x) & ~DMAP_MIN_ADDRESS) /* * XXX Allowing dmaplimit == 0 is a temporary workaround for vt(4) efifb's * early use of PHYS_TO_DMAP before the mapping is actually setup. This works @@ -195,14 +193,14 @@ KASSERT(dmaplimit == 0 || (x) < dmaplimit, \ ("physical address %#jx not covered by the DMAP", \ (uintmax_t)x)); \ - PHYS_TO_DMAP_RAW(x); }) + (x) | DMAP_MIN_ADDRESS; }) #define DMAP_TO_PHYS(x) ({ \ KASSERT((x) < (DMAP_MIN_ADDRESS + dmaplimit) && \ (x) >= DMAP_MIN_ADDRESS, \ ("virtual address %#jx not covered by the DMAP", \ (uintmax_t)x)); \ - DMAP_TO_PHYS_RAW(x); }) + (x) & ~DMAP_MIN_ADDRESS; }) /* * How many physical pages per kmem arena virtual page. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 07:55:17 2015 Return-Path: Delivered-To: svn-src-head@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 BE12CFB7; Mon, 12 Jan 2015 07:55: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 AAB903F8; Mon, 12 Jan 2015 07:55: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 t0C7tHGY053042; Mon, 12 Jan 2015 07:55:17 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C7tHKQ053041; Mon, 12 Jan 2015 07:55:17 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501120755.t0C7tHKQ053041@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 12 Jan 2015 07:55:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277053 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 07:55:17 -0000 Author: tuexen Date: Mon Jan 12 07:55:16 2015 New Revision: 277053 URL: https://svnweb.freebsd.org/changeset/base/277053 Log: Remove dead code. Reported by: Coverity CID: 748664 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 Jan 12 07:50:55 2015 (r277052) +++ head/sys/netinet/sctp_output.c Mon Jan 12 07:55:16 2015 (r277053) @@ -8917,12 +8917,11 @@ sctp_send_cookie_echo(struct mbuf *m, struct sctp_tmit_chunk *chk; uint16_t ptype, plen; + SCTP_TCB_LOCK_ASSERT(stcb); /* First find the cookie in the param area */ cookie = NULL; at = offset + sizeof(struct sctp_init_chunk); - - SCTP_TCB_LOCK_ASSERT(stcb); - do { + for (;;) { phdr = sctp_get_next_param(m, at, &parm, sizeof(parm)); if (phdr == NULL) { return (-3); @@ -8949,13 +8948,8 @@ sctp_send_cookie_echo(struct mbuf *m, break; } at += SCTP_SIZE32(plen); - } while (phdr); - if (cookie == NULL) { - /* Did not find the cookie */ - return (-3); } /* ok, we got the cookie lets change it into a cookie echo chunk */ - /* first the change from param to cookie */ hdr = mtod(cookie, struct sctp_chunkhdr *); hdr->chunk_type = SCTP_COOKIE_ECHO; From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 08:33:07 2015 Return-Path: Delivered-To: svn-src-head@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 31A384E4; Mon, 12 Jan 2015 08:33: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 1ADFD9A0; Mon, 12 Jan 2015 08:33: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 t0C8X7Lq071481; Mon, 12 Jan 2015 08:33:07 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C8X53s071470; Mon, 12 Jan 2015 08:33:05 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201501120833.t0C8X53s071470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 12 Jan 2015 08:33:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 08:33:07 -0000 Author: hiren Date: Mon Jan 12 08:33:04 2015 New Revision: 277054 URL: https://svnweb.freebsd.org/changeset/base/277054 Log: DCTCP (Data Center TCP) implementation. DCTCP congestion control algorithm aims to maximise throughput and minimise latency in data center networks by utilising the proportion of Explicit Congestion Notification (ECN) marked packets received from capable hardware as a congestion signal. Highlights: Implemented as a mod_cc(4) module. ECN (Explicit congestion notification) processing is done differently from RFC3168. Takes one-sided DCTCP into consideration where only one of the sides is using DCTCP and other is using standard ECN. IETF draft: http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00 Thesis report by Midori Kato: https://eggert.org/students/kato-thesis.pdf Submitted by: Midori Kato and Lars Eggert with help and modifications from hiren Differential Revision: https://reviews.freebsd.org/D604 Reviewed by: gnn Added: head/share/man/man4/cc_dctcp.4 (contents, props changed) head/sys/modules/cc/cc_dctcp/ head/sys/modules/cc/cc_dctcp/Makefile (contents, props changed) head/sys/netinet/cc/cc_dctcp.c (contents, props changed) Modified: head/share/man/man4/Makefile head/share/man/man4/mod_cc.4 head/sys/modules/cc/Makefile head/sys/netinet/cc.h head/sys/netinet/tcp_input.c Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Jan 12 07:55:16 2015 (r277053) +++ head/share/man/man4/Makefile Mon Jan 12 08:33:04 2015 (r277054) @@ -86,6 +86,7 @@ MAN= aac.4 \ cc_cdg.4 \ cc_chd.4 \ cc_cubic.4 \ + cc_dctcp.4 \ cc_hd.4 \ cc_htcp.4 \ cc_newreno.4 \ Added: head/share/man/man4/cc_dctcp.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/cc_dctcp.4 Mon Jan 12 08:33:04 2015 (r277054) @@ -0,0 +1,127 @@ +.\" +.\" Copyright (c) 2014 Midori Kato +.\" Copyright (c) 2014 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" Portions of this documentation were written at Keio University, Japan. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd January 12, 2015 +.Dt CC_DCTCP 4 +.Os +.Sh NAME +.Nm cc_dctcp +.Nd DCTCP Congestion Control Algorithm +.Sh DESCRIPTION +The DCTCP (data center TCP) congestion control algorithm aims to maximise +throughput and minimise latency in data center networks by utilising the +proportion of Explicit Congestion Notification (ECN) marks received from capable +hardware as a congestion signal. +.Pp +DCTCP uses fraction of ECN marked packets to update congestion window. The +window reduction ratio is always <= 1/2. Only when all of the packets are +marked, congestion window is halved. +.Pp +In order to keep the accuracy of the ECN marked fraction, a DCTCP receiver +mirrors back incoming (or missing) CE marks by setting (or clearing) ECE marks. +This feedback methodology is also adopted when the receiver uses delayed ACK. +.Pp +FreeBSD DCTCP implementation includes two minor modifications for the one-sided +deployment. Considering the situation that DCTCP is used as sender and classic +ECN is used as receiver, DCTCP sets the CWR flag as the reaction to the ECE +flag. In addition, when classic ECN is used as sender and DCTCP is used as +receiver, DCTCP avoids to mirror back ACKs only when the CWR flag is +set in the incoming packet. +.Pp +The other specifications are based on the paper and Internet Draft referenced +in the +.Sx SEE ALSO +section below. +.Sh MIB Variables +The algorithm exposes the following tunable variables in the +.Va net.inet.tcp.cc.dctcp +branch of the +.Xr sysctl 3 +MIB: +.Bl -tag -width ".Va alpha" +.It Va alpha +An initial estimator of the congestion on the link. +Default is 0. +.It Va dctcp_shift_g +An estimation gain in the alpha calculation. +Default is 16. +.It Va slowstart +A trigger to halve congestion window after slow start. +Default does nothing to halve window. +.Sh SEE ALSO +.Xr cc_chd 4 , +.Xr cc_cubic 4 , +.Xr cc_hd 4 , +.Xr cc_htcp 4 , +.Xr cc_newreno 4 , +.Xr cc_vegas 4 , +.Xr mod_cc 4 , +.Xr tcp 4 , +.Xr mod_cc 9 +.Rs +.%A "Mohammad Alizadeh" +.%A "Albert Greenberg" +.%A "David A. Maltz" +.%A "Jitendra Padhye" +.%A "Parveen Patel" +.%A "Balaji Prabhakar" +.%A "Sudipta Sengupta" +.%A "Murari Sridharan" +.%T "Data Center TCP (DCTCP)" +.%U "http://research.microsoft.com/pubs/121386/dctcp-public.pdf" +.%J "ACM SIGCOMM 2010" +.%D "July 2010" +.%P "63-74" +.Re +.Rs +.%A "Stephen Bensley" +.%A "Lars Eggert" +.%A "Dave Thaler" +.%T "Microsoft's Datacenter TCP (DCTCP): TCP Congestion Control for Datacenters" +.%U "http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-01" +.Re +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 11.0 . +.Pp +The module was first released in 2014 by Midori Kato studying at Keio +University, Japan. +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module and this manual page were written by +.An Midori Kato katoon@sfc.wide.ad.jp +and +.An Lars Eggert lars@netapp.com +with help and modifications from +.An Hiren Panchasara hiren@FreeBSD.org Modified: head/share/man/man4/mod_cc.4 ============================================================================== --- head/share/man/man4/mod_cc.4 Mon Jan 12 07:55:16 2015 (r277053) +++ head/share/man/man4/mod_cc.4 Mon Jan 12 08:33:04 2015 (r277054) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2014 +.Dd January 12, 2015 .Dt MOD_CC 4 .Os .Sh NAME @@ -78,6 +78,7 @@ MIB variable. .Xr cc_cdg 4 , .Xr cc_chd 4 , .Xr cc_cubic 4 , +.Xr cc_dctcp 4 , .Xr cc_hd 4 , .Xr cc_htcp 4 , .Xr cc_newreno 4 , Modified: head/sys/modules/cc/Makefile ============================================================================== --- head/sys/modules/cc/Makefile Mon Jan 12 07:55:16 2015 (r277053) +++ head/sys/modules/cc/Makefile Mon Jan 12 08:33:04 2015 (r277054) @@ -3,6 +3,7 @@ SUBDIR= cc_cdg \ cc_chd \ cc_cubic \ + cc_dctcp \ cc_hd \ cc_htcp \ cc_vegas Added: head/sys/modules/cc/cc_dctcp/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/cc/cc_dctcp/Makefile Mon Jan 12 08:33:04 2015 (r277054) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../../netinet/cc +KMOD= cc_dctcp +SRCS= cc_dctcp.c + +.include Modified: head/sys/netinet/cc.h ============================================================================== --- head/sys/netinet/cc.h Mon Jan 12 07:55:16 2015 (r277053) +++ head/sys/netinet/cc.h Mon Jan 12 08:33:04 2015 (r277054) @@ -90,6 +90,10 @@ struct cc_var { /* cc_var flags. */ #define CCF_ABC_SENTAWND 0x0001 /* ABC counted cwnd worth of bytes? */ #define CCF_CWND_LIMITED 0x0002 /* Are we currently cwnd limited? */ +#define CCF_DELACK 0x0004 /* Is this ack delayed? */ +#define CCF_ACKNOW 0x0008 /* Will this ack be sent now? */ +#define CCF_IPHDR_CE 0x0010 /* Does this packet set CE bit? */ +#define CCF_TCPHDR_CWR 0x0020 /* Does this packet set CWR bit? */ /* ACK types passed to the ack_received() hook. */ #define CC_ACK 0x0001 /* Regular in sequence ACK. */ @@ -143,6 +147,9 @@ struct cc_algo { /* Called when data transfer resumes after an idle period. */ void (*after_idle)(struct cc_var *ccv); + /* Called for an additional ECN processing apart from RFC3168. */ + void (*ecnpkt_handler)(struct cc_var *ccv); + STAILQ_ENTRY (cc_algo) entries; }; Added: head/sys/netinet/cc/cc_dctcp.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/netinet/cc/cc_dctcp.c Mon Jan 12 08:33:04 2015 (r277054) @@ -0,0 +1,474 @@ +/*- + * Copyright (c) 2007-2008 + * Swinburne University of Technology, Melbourne, Australia + * Copyright (c) 2009-2010 Lawrence Stewart + * Copyright (c) 2014 Midori Kato + * Copyright (c) 2014 The FreeBSD Foundation + * 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. + */ + +/* + * An implementation of the DCTCP algorithm for FreeBSD, based on + * "Data Center TCP (DCTCP)" by M. Alizadeh, A. Greenberg, D. A. Maltz, + * J. Padhye, P. Patel, B. Prabhakar, S. Sengupta, and M. Sridharan., + * in ACM Conference on SIGCOMM 2010, New York, USA, + * Originally released as the contribution of Microsoft Research project. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include + +#define CAST_PTR_INT(X) (*((int*)(X))) + +#define MAX_ALPHA_VALUE 1024 +static VNET_DEFINE(uint32_t, dctcp_alpha) = 0; +#define V_dctcp_alpha VNET(dctcp_alpha) +static VNET_DEFINE(uint32_t, dctcp_shift_g) = 4; +#define V_dctcp_shift_g VNET(dctcp_shift_g) +static VNET_DEFINE(uint32_t, dctcp_slowstart) = 0; +#define V_dctcp_slowstart VNET(dctcp_slowstart) + +struct dctcp { + int bytes_ecn; /* # of marked bytes during a RTT */ + int bytes_total; /* # of acked bytes during a RTT */ + int alpha; /* the fraction of marked bytes */ + int ce_prev; /* CE state of the last segment */ + int save_sndnxt; /* end sequence number of the current window */ + int ece_curr; /* ECE flag in this segment */ + int ece_prev; /* ECE flag in the last segment */ + uint32_t num_cong_events; /* # of congestion events */ +}; + +static MALLOC_DEFINE(M_dctcp, "dctcp data", + "Per connection data required for the dctcp algorithm"); + +static void dctcp_ack_received(struct cc_var *ccv, uint16_t type); +static void dctcp_after_idle(struct cc_var *ccv); +static void dctcp_cb_destroy(struct cc_var *ccv); +static int dctcp_cb_init(struct cc_var *ccv); +static void dctcp_cong_signal(struct cc_var *ccv, uint32_t type); +static void dctcp_conn_init(struct cc_var *ccv); +static void dctcp_post_recovery(struct cc_var *ccv); +static void dctcp_ecnpkt_handler(struct cc_var *ccv); +static void dctcp_update_alpha(struct cc_var *ccv); + +struct cc_algo dctcp_cc_algo = { + .name = "dctcp", + .ack_received = dctcp_ack_received, + .cb_destroy = dctcp_cb_destroy, + .cb_init = dctcp_cb_init, + .cong_signal = dctcp_cong_signal, + .conn_init = dctcp_conn_init, + .post_recovery = dctcp_post_recovery, + .ecnpkt_handler = dctcp_ecnpkt_handler, + .after_idle = dctcp_after_idle, +}; + +static void +dctcp_ack_received(struct cc_var *ccv, uint16_t type) +{ + struct dctcp *dctcp_data; + int bytes_acked = 0; + + dctcp_data = ccv->cc_data; + + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) { + /* + * DCTCP doesn't treat receipt of ECN marked packet as a + * congestion event. Thus, DCTCP always executes the ACK + * processing out of congestion recovery. + */ + if (IN_CONGRECOVERY(CCV(ccv, t_flags))) { + EXIT_CONGRECOVERY(CCV(ccv, t_flags)); + newreno_cc_algo.ack_received(ccv, type); + ENTER_CONGRECOVERY(CCV(ccv, t_flags)); + } else + newreno_cc_algo.ack_received(ccv, type); + + if (type == CC_DUPACK) + bytes_acked = CCV(ccv, t_maxseg); + + if (type == CC_ACK) + bytes_acked = ccv->bytes_this_ack; + + /* Update total bytes. */ + dctcp_data->bytes_total += bytes_acked; + + /* Update total marked bytes. */ + if (dctcp_data->ece_curr) { + if (!dctcp_data->ece_prev + && bytes_acked > CCV(ccv, t_maxseg)) { + dctcp_data->bytes_ecn += + (bytes_acked - CCV(ccv, t_maxseg)); + } else + dctcp_data->bytes_ecn += bytes_acked; + dctcp_data->ece_prev = 1; + } else { + if (dctcp_data->ece_prev + && bytes_acked > CCV(ccv, t_maxseg)) + dctcp_data->bytes_ecn += CCV(ccv, t_maxseg); + dctcp_data->ece_prev = 0; + } + dctcp_data->ece_curr = 0; + + /* + * Update the fraction of marked bytes at the end of + * current window size. + */ + if ((IN_FASTRECOVERY(CCV(ccv, t_flags)) && + SEQ_GEQ(ccv->curack, CCV(ccv, snd_recover))) || + (!IN_FASTRECOVERY(CCV(ccv, t_flags)) && + SEQ_GT(ccv->curack, dctcp_data->save_sndnxt))) + dctcp_update_alpha(ccv); + } else + newreno_cc_algo.ack_received(ccv, type); +} + +static void +dctcp_after_idle(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + + dctcp_data = ccv->cc_data; + + /* Initialize internal parameters after idle time */ + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); + dctcp_data->alpha = V_dctcp_alpha; + dctcp_data->ece_curr = 0; + dctcp_data->ece_prev = 0; + dctcp_data->num_cong_events = 0; + + dctcp_cc_algo.after_idle = newreno_cc_algo.after_idle; +} + +static void +dctcp_cb_destroy(struct cc_var *ccv) +{ + if (ccv->cc_data != NULL) + free(ccv->cc_data, M_dctcp); +} + +static int +dctcp_cb_init(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + + dctcp_data = malloc(sizeof(struct dctcp), M_dctcp, M_NOWAIT|M_ZERO); + + if (dctcp_data == NULL) + return (ENOMEM); + + /* Initialize some key variables with sensible defaults. */ + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + /* + * When alpha is set to 0 in the beggining, DCTCP sender transfers as + * much data as possible until the value converges which may expand the + * queueing delay at the switch. When alpha is set to 1, queueing delay + * is kept small. + * Throughput-sensitive applications should have alpha = 0 + * Latency-sensitive applications should have alpha = 1 + * + * Note: DCTCP draft suggests initial alpha to be 1 but we've decided to + * keep it 0 as default. + */ + dctcp_data->alpha = V_dctcp_alpha; + dctcp_data->save_sndnxt = 0; + dctcp_data->ce_prev = 0; + dctcp_data->ece_curr = 0; + dctcp_data->ece_prev = 0; + dctcp_data->num_cong_events = 0; + + ccv->cc_data = dctcp_data; + return (0); +} + +/* + * Perform any necessary tasks before we enter congestion recovery. + */ +static void +dctcp_cong_signal(struct cc_var *ccv, uint32_t type) +{ + struct dctcp *dctcp_data; + u_int win, mss; + + dctcp_data = ccv->cc_data; + win = CCV(ccv, snd_cwnd); + mss = CCV(ccv, t_maxseg); + + switch (type) { + case CC_NDUPACK: + if (!IN_FASTRECOVERY(CCV(ccv, t_flags))) { + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { + CCV(ccv, snd_ssthresh) = mss * + max(win / 2 / mss, 2); + dctcp_data->num_cong_events++; + } else { + /* cwnd has already updated as congestion + * recovery. Reverse cwnd value using + * snd_cwnd_prev and recalculate snd_ssthresh + */ + win = CCV(ccv, snd_cwnd_prev); + CCV(ccv, snd_ssthresh) = + max(win / 2 / mss, 2) * mss; + } + ENTER_RECOVERY(CCV(ccv, t_flags)); + } + break; + case CC_ECN: + /* + * Save current snd_cwnd when the host encounters both + * congestion recovery and fast recovery. + */ + CCV(ccv, snd_cwnd_prev) = win; + if (!IN_CONGRECOVERY(CCV(ccv, t_flags))) { + if (V_dctcp_slowstart && + dctcp_data->num_cong_events++ == 0) { + CCV(ccv, snd_ssthresh) = + mss * max(win / 2 / mss, 2); + dctcp_data->alpha = MAX_ALPHA_VALUE; + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); + } else + CCV(ccv, snd_ssthresh) = max((win - ((win * + dctcp_data->alpha) >> 11)) / mss, 2) * mss; + CCV(ccv, snd_cwnd) = CCV(ccv, snd_ssthresh); + ENTER_CONGRECOVERY(CCV(ccv, t_flags)); + } + dctcp_data->ece_curr = 1; + break; + case CC_RTO: + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) { + CCV(ccv, t_flags) |= TF_ECN_SND_CWR; + dctcp_update_alpha(ccv); + dctcp_data->save_sndnxt += CCV(ccv, t_maxseg); + dctcp_data->num_cong_events++; + } + break; + } +} + +static void +dctcp_conn_init(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + + dctcp_data = ccv->cc_data; + + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); +} + +/* + * Perform any necessary tasks before we exit congestion recovery. + */ +static void +dctcp_post_recovery(struct cc_var *ccv) +{ + dctcp_cc_algo.post_recovery = newreno_cc_algo.post_recovery; + + if (CCV(ccv, t_flags) & TF_ECN_PERMIT) + dctcp_update_alpha(ccv); +} + +/* + * Execute an additional ECN processing using ECN field in IP header and the CWR + * bit in TCP header. + * + * delay_ack == 0 - Delayed ACK disabled + * delay_ack == 1 - Delayed ACK enabled + */ + +static void +dctcp_ecnpkt_handler(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + uint32_t ccflag; + int delay_ack; + + dctcp_data = ccv->cc_data; + ccflag = ccv->flags; + delay_ack = 1; + + /* + * DCTCP responses an ACK immediately when the CE state + * in between this segment and the last segment is not same. + */ + if (ccflag & CCF_IPHDR_CE) { + if (!dctcp_data->ce_prev && (ccflag & CCF_DELACK)) + delay_ack = 0; + dctcp_data->ce_prev = 1; + CCV(ccv, t_flags) |= TF_ECN_SND_ECE; + } else { + if (dctcp_data->ce_prev && (ccflag & CCF_DELACK)) + delay_ack = 0; + dctcp_data->ce_prev = 0; + CCV(ccv, t_flags) &= ~TF_ECN_SND_ECE; + } + + /* DCTCP sets delayed ack when this segment sets the CWR flag. */ + if ((ccflag & CCF_DELACK) && (ccflag & CCF_TCPHDR_CWR)) + delay_ack = 1; + + if (delay_ack == 0) + ccv->flags |= CCF_ACKNOW; + else + ccv->flags &= ~CCF_ACKNOW; +} + +/* + * Update the fraction of marked bytes represented as 'alpha'. + * Also initialize several internal parameters at the end of this function. + */ +static void +dctcp_update_alpha(struct cc_var *ccv) +{ + struct dctcp *dctcp_data; + int alpha_prev; + + dctcp_data = ccv->cc_data; + alpha_prev = dctcp_data->alpha; + dctcp_data->bytes_total = max(dctcp_data->bytes_total, 1); + + /* + * Update alpha: alpha = (1 - g) * alpha + g * F. + * Here: + * g is weight factor + * recommaded to be set to 1/16 + * small g = slow convergence between competitive DCTCP flows + * large g = impacts low utilization of bandwidth at switches + * F is fraction of marked segments in last RTT + * updated every RTT + * Alpha must be round to 0 - MAX_ALPHA_VALUE. + */ + dctcp_data->alpha = min(alpha_prev - (alpha_prev >> V_dctcp_shift_g) + + (dctcp_data->bytes_ecn << (10 - V_dctcp_shift_g)) / + dctcp_data->bytes_total, MAX_ALPHA_VALUE); + + /* Initialize internal parameters for next alpha calculation */ + dctcp_data->bytes_ecn = 0; + dctcp_data->bytes_total = 0; + dctcp_data->save_sndnxt = CCV(ccv, snd_nxt); +} + +static int +dctcp_alpha_handler(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + + new = V_dctcp_alpha; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > 1) + error = EINVAL; + else { + if (new > MAX_ALPHA_VALUE) + V_dctcp_alpha = MAX_ALPHA_VALUE; + else + V_dctcp_alpha = new; + } + } + + return (error); +} + +static int +dctcp_shift_g_handler(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + + new = V_dctcp_shift_g; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > 1) + error = EINVAL; + else + V_dctcp_shift_g = new; + } + + return (error); +} + +static int +dctcp_slowstart_handler(SYSCTL_HANDLER_ARGS) +{ + uint32_t new; + int error; + + new = V_dctcp_slowstart; + error = sysctl_handle_int(oidp, &new, 0, req); + if (error == 0 && req->newptr != NULL) { + if (CAST_PTR_INT(req->newptr) > 1) + error = EINVAL; + else + V_dctcp_slowstart = new; + } + + return (error); +} + +SYSCTL_DECL(_net_inet_tcp_cc_dctcp); +SYSCTL_NODE(_net_inet_tcp_cc, OID_AUTO, dctcp, CTLFLAG_RW, NULL, + "dctcp congestion control related settings"); + +SYSCTL_PROC(_net_inet_tcp_cc_dctcp, OID_AUTO, alpha, + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(dctcp_alpha), 0, + &dctcp_alpha_handler, + "IU", "dctcp alpha parameter"); + +SYSCTL_PROC(_net_inet_tcp_cc_dctcp, OID_AUTO, shift_g, + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(dctcp_shift_g), 4, + &dctcp_shift_g_handler, + "IU", "dctcp shift parameter"); + +SYSCTL_PROC(_net_inet_tcp_cc_dctcp, OID_AUTO, slowstart, + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, &VNET_NAME(dctcp_slowstart), 0, + &dctcp_slowstart_handler, + "IU", "half CWND reduction after the first slow start"); + +DECLARE_CC_MODULE(dctcp, &dctcp_cc_algo); Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Mon Jan 12 07:55:16 2015 (r277053) +++ head/sys/netinet/tcp_input.c Mon Jan 12 08:33:04 2015 (r277054) @@ -498,6 +498,41 @@ do { \ (tlen <= tp->t_maxopd) && \ (V_tcp_delack_enabled || (tp->t_flags & TF_NEEDSYN))) +static void inline +cc_ecnpkt_handler(struct tcpcb *tp, struct tcphdr *th, uint8_t iptos) +{ + INP_WLOCK_ASSERT(tp->t_inpcb); + + if (CC_ALGO(tp)->ecnpkt_handler != NULL) { + switch (iptos & IPTOS_ECN_MASK) { + case IPTOS_ECN_CE: + tp->ccv->flags |= CCF_IPHDR_CE; + break; + case IPTOS_ECN_ECT0: + tp->ccv->flags &= ~CCF_IPHDR_CE; + break; + case IPTOS_ECN_ECT1: + tp->ccv->flags &= ~CCF_IPHDR_CE; + break; + } + + if (th->th_flags & TH_CWR) + tp->ccv->flags |= CCF_TCPHDR_CWR; + else + tp->ccv->flags &= ~CCF_TCPHDR_CWR; + + if (tp->t_flags & TF_DELACK) + tp->ccv->flags |= CCF_DELACK; + else + tp->ccv->flags &= ~CCF_DELACK; + + CC_ALGO(tp)->ecnpkt_handler(tp->ccv); + + if (tp->ccv->flags & CCF_ACKNOW) + tcp_timer_activate(tp, TT_DELACK, tcp_delacktime); + } +} + /* * TCP input handling is split into multiple parts: * tcp6_input is a thin wrapper around tcp_input for the extended @@ -1530,6 +1565,10 @@ tcp_do_segment(struct mbuf *m, struct tc TCPSTAT_INC(tcps_ecn_ect1); break; } + + /* Process a packet differently from RFC3168. */ + cc_ecnpkt_handler(tp, th, iptos); + /* Congestion experienced. */ if (thflags & TH_ECE) { cc_cong_signal(tp, th, CC_ECN); From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 08:58:10 2015 Return-Path: Delivered-To: svn-src-head@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 186F895D; Mon, 12 Jan 2015 08:58: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 0458EBAF; Mon, 12 Jan 2015 08:58: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 t0C8w9hN081398; Mon, 12 Jan 2015 08:58:09 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C8w8JM081390; Mon, 12 Jan 2015 08:58:08 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501120858.t0C8w8JM081390@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 12 Jan 2015 08:58:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277055 - in head/sys: amd64/amd64 kern 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 08:58:10 -0000 Author: kib Date: Mon Jan 12 08:58:07 2015 New Revision: 277055 URL: https://svnweb.freebsd.org/changeset/base/277055 Log: Revert r263475: TDP_DEVMEMIO no longer needed, since amd64 /dev/kmem does not access kernel mappings directly. Reviewed by: alc Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/amd64/amd64/mem.c head/sys/amd64/amd64/trap.c head/sys/kern/subr_trap.c head/sys/sys/proc.h head/sys/vm/vm_fault.c Modified: head/sys/amd64/amd64/mem.c ============================================================================== --- head/sys/amd64/amd64/mem.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/amd64/amd64/mem.c Mon Jan 12 08:58:07 2015 (r277055) @@ -82,10 +82,9 @@ memrw(struct cdev *dev, struct uio *uio, ssize_t orig_resid; u_long v, vd; u_int c; - int error, sflags; + int error; error = 0; - sflags = curthread_pflags_set(TDP_DEVMEMIO); orig_resid = uio->uio_resid; while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; @@ -151,7 +150,6 @@ memrw(struct cdev *dev, struct uio *uio, break; } } - curthread_pflags_restore(sflags); /* * Don't return error if any byte was written. Read and write * can return error only if no i/o was performed. Modified: head/sys/amd64/amd64/trap.c ============================================================================== --- head/sys/amd64/amd64/trap.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/amd64/amd64/trap.c Mon Jan 12 08:58:07 2015 (r277055) @@ -774,12 +774,6 @@ nogo: frame->tf_rip = (long)curpcb->pcb_onfault; return (0); } - if ((td->td_pflags & TDP_DEVMEMIO) != 0) { - KASSERT(curpcb->pcb_onfault != NULL, - ("/dev/mem without pcb_onfault")); - frame->tf_rip = (long)curpcb->pcb_onfault; - return (0); - } trap_fatal(frame, eva); return (-1); } Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/kern/subr_trap.c Mon Jan 12 08:58:07 2015 (r277055) @@ -157,8 +157,6 @@ userret(struct thread *td, struct trapfr td->td_rw_rlocks)); KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, ("userret: Returning with pagefaults disabled")); - KASSERT((td->td_pflags & TDP_DEVMEMIO) == 0, - ("userret: Returning with /dev/mem i/o leaked")); KASSERT(td->td_no_sleeping == 0, ("userret: Returning with sleep disabled")); KASSERT(td->td_pinned == 0 || (td->td_pflags & TDP_CALLCHAIN) != 0, Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/sys/proc.h Mon Jan 12 08:58:07 2015 (r277055) @@ -430,7 +430,7 @@ do { \ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ -#define TDP_DEVMEMIO 0x20000000 /* Accessing memory for /dev/mem */ +#define TDP_UNUSED29 0x20000000 /* --available-- */ #define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ /* Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Mon Jan 12 08:33:04 2015 (r277054) +++ head/sys/vm/vm_fault.c Mon Jan 12 08:58:07 2015 (r277055) @@ -334,10 +334,6 @@ RetryFault:; map_generation = fs.map->timestamp; if (fs.entry->eflags & MAP_ENTRY_NOFAULT) { - if ((curthread->td_pflags & TDP_DEVMEMIO) != 0) { - vm_map_unlock_read(fs.map); - return (KERN_FAILURE); - } panic("vm_fault: fault on nofault entry, addr: %lx", (u_long)vaddr); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 09:41:13 2015 Return-Path: Delivered-To: svn-src-head@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 EBCF71B7; Mon, 12 Jan 2015 09:41: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 D78D19E; Mon, 12 Jan 2015 09:41: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 t0C9fDEC001707; Mon, 12 Jan 2015 09:41:13 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9fDNn001706; Mon, 12 Jan 2015 09:41:13 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501120941.t0C9fDNn001706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 09:41:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277056 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:41:14 -0000 Author: glebius Date: Mon Jan 12 09:41:12 2015 New Revision: 277056 URL: https://svnweb.freebsd.org/changeset/base/277056 Log: Remove incorrect layering violating code that: a) assumed that ifqueue length is measured in bytes, instead of packets b) assumed that any interface has working ifqueue c) incremented global counter instead of ifi_oqdrops Sponsored by: Nginx, Inc. Modified: head/sys/netinet/ip_fastfwd.c Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Mon Jan 12 08:58:07 2015 (r277055) +++ head/sys/netinet/ip_fastfwd.c Mon Jan 12 09:41:12 2015 (r277056) @@ -495,17 +495,6 @@ passout: goto consumed; } -#ifndef ALTQ - /* - * Check if there is enough space in the interface queue - */ - if ((ifp->if_snd.ifq_len + ip_len / ifp->if_mtu + 1) >= - ifp->if_snd.ifq_maxlen) { - IPSTAT_INC(ips_odropped); - goto drop; - } -#endif - /* * Check if media link state of interface is not down */ From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 09:46:51 2015 Return-Path: Delivered-To: svn-src-head@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 2DCB4375; Mon, 12 Jan 2015 09:46: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 184C3E1; Mon, 12 Jan 2015 09:46: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 t0C9kp7c004930; Mon, 12 Jan 2015 09:46:51 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9komV004926; Mon, 12 Jan 2015 09:46:50 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501120946.t0C9komV004926@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 12 Jan 2015 09:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277057 - in head/contrib/unbound: . daemon doc services smallapp util X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:46:51 -0000 Author: des Date: Mon Jan 12 09:46:49 2015 New Revision: 277057 URL: https://svnweb.freebsd.org/changeset/base/277057 Log: MFV (r277045): merge upstream version of the local socket patch. Modified: head/contrib/unbound/config.h head/contrib/unbound/config.h.in head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/unbound.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/unbound.conf.5 head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/listen_dnsport.h head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/util/config_file.c head/contrib/unbound/util/config_file.h Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/config.h ============================================================================== --- head/contrib/unbound/config.h Mon Jan 12 09:41:12 2015 (r277056) +++ head/contrib/unbound/config.h Mon Jan 12 09:46:49 2015 (r277057) @@ -351,6 +351,9 @@ /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ /* #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST */ +/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ +#define HAVE_STRUCT_SOCKADDR_UN_SUN_LEN 1 + /* Define if you have Swig libraries and header files. */ /* #undef HAVE_SWIG */ Modified: head/contrib/unbound/config.h.in ============================================================================== --- head/contrib/unbound/config.h.in Mon Jan 12 09:41:12 2015 (r277056) +++ head/contrib/unbound/config.h.in Mon Jan 12 09:46:49 2015 (r277057) @@ -350,6 +350,9 @@ /* Define to 1 if `ipi_spec_dst' is a member of `struct in_pktinfo'. */ #undef HAVE_STRUCT_IN_PKTINFO_IPI_SPEC_DST +/* Define to 1 if `sun_len' is a member of `struct sockaddr_un'. */ +#undef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN + /* Define if you have Swig libraries and header files. */ #undef HAVE_SWIG Modified: head/contrib/unbound/configure ============================================================================== --- head/contrib/unbound/configure Mon Jan 12 09:41:12 2015 (r277056) +++ head/contrib/unbound/configure Mon Jan 12 09:46:49 2015 (r277057) @@ -1516,8 +1516,8 @@ Optional Packages: --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-sysroot[=DIR] Search for dependent libraries within DIR (or the - compiler's sysroot if not specified). + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). --with-pthreads use pthreads library, or --without-pthreads to disable threading support. --with-solaris-threads use solaris native thread library. @@ -6555,8 +6555,8 @@ esac -macro_version='2.4.2.418' -macro_revision='2.4.2.418' +macro_version='2.4.2' +macro_revision='1.3337' @@ -6570,7 +6570,7 @@ macro_revision='2.4.2.418' -ltmain=$ac_aux_dir/ltmain.sh +ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. @@ -6619,7 +6619,7 @@ func_echo_all () $ECHO "" } -case $ECHO in +case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 @@ -6812,19 +6812,19 @@ test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : - withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes + withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld -if test yes = "$GCC"; then +if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) - # gcc leaves a trailing carriage return, which upsets mingw + # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; @@ -6838,7 +6838,7 @@ $as_echo_n "checking for ld used by $CC. while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done - test -z "$LD" && LD=$ac_prog + test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. @@ -6849,7 +6849,7 @@ $as_echo_n "checking for ld used by $CC. with_gnu_ld=unknown ;; esac -elif test yes = "$with_gnu_ld"; then +elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else @@ -6860,32 +6860,32 @@ if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD=$ac_dir/$ac_prog + lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } @@ -6928,33 +6928,33 @@ if ${lt_cv_path_NM+:} false; then : else if test -n "$NM"; then # Let the user override the test. - lt_cv_path_NM=$NM + lt_cv_path_NM="$NM" else - lt_nm_to_check=${ac_tool_prefix}nm + lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. - tmp_nm=$ac_dir/$lt_tmp_nm - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then + tmp_nm="$ac_dir/$lt_tmp_nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. - # Adding the 'sed 1q' prevents false positives on HP-UX, which says: + # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" - break 2 + break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" - break 2 + break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but @@ -6965,15 +6965,15 @@ else esac fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } -if test no != "$lt_cv_path_NM"; then - NM=$lt_cv_path_NM +if test "$lt_cv_path_NM" != "no"; then + NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : @@ -7079,9 +7079,9 @@ esac fi fi - case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) - DUMPBIN="$DUMPBIN -symbols -headers" + DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: @@ -7089,8 +7089,8 @@ fi esac fi - if test : != "$DUMPBIN"; then - NM=$DUMPBIN + if test "$DUMPBIN" != ":"; then + NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm @@ -7141,7 +7141,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; the $as_echo_n "(cached) " >&6 else i=0 - teststring=ABCD + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -7181,7 +7181,7 @@ else lt_cv_sys_max_cmd_len=8192; ;; - bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) + netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` @@ -7231,23 +7231,22 @@ else ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len" && \ - test undefined != "$lt_cv_sys_max_cmd_len"; then + if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8; do + for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test X`env echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && - test 17 != "$i" # 1/2 MB should be enough + test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring @@ -7265,7 +7264,7 @@ else fi -if test -n "$lt_cv_sys_max_cmd_len"; then +if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else @@ -7283,6 +7282,30 @@ max_cmd_len=$lt_cv_sys_max_cmd_len : ${MV="mv -f"} : ${RM="rm -f"} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 +$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } +# Try some XSI features +xsi_shell=no +( _lt_dummy="a/b/c" + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ + && eval 'test $(( 1 + 1 )) -eq 2 \ + && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ + && xsi_shell=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 +$as_echo "$xsi_shell" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 +$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } +lt_shell_append=no +( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ + >/dev/null 2>&1 \ + && lt_shell_append=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 +$as_echo "$lt_shell_append" >&6; } + + if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else @@ -7405,13 +7428,13 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) - if test yes != "$GCC"; then + if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) - if test yes = "$GCC"; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -7539,13 +7562,13 @@ lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. -# 'unknown' -- same as none, but documents that we really don't know. +# `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path -# that responds to the $file_magic_cmd with a given extended regex. -# If you have 'file' or equivalent on your system and you're not sure -# whether 'pass_all' will *always* work, you probably want this one. +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) @@ -7572,7 +7595,8 @@ mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else @@ -7608,6 +7632,10 @@ freebsd* | dragonfly*) fi ;; +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + haiku*) lt_cv_deplibs_check_method=pass_all ;; @@ -7646,7 +7674,7 @@ irix5* | irix6* | nonstopux*) ;; # This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) +linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -7668,8 +7696,8 @@ newos6*) lt_cv_deplibs_check_method=pass_all ;; -openbsd* | bitrig*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then +openbsd*) + if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' @@ -7879,8 +7907,8 @@ else case $host_os in cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh; - # decide which one to use based on capabilities of $DLLTOOL + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib @@ -7892,7 +7920,7 @@ cygwin* | mingw* | pw32* | cegcc*) ;; *) # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd=$ECHO + lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac @@ -8046,7 +8074,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -eq "$ac_status"; then + if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 @@ -8054,7 +8082,7 @@ if ac_fn_c_try_compile "$LINENO"; then : ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - if test 0 -ne "$ac_status"; then + if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi @@ -8067,7 +8095,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } -if test no = "$lt_cv_ar_at_file"; then +if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file @@ -8284,7 +8312,7 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in - bitrig* | openbsd*) + openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) @@ -8416,7 +8444,7 @@ cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) - if test ia64 = "$host_cpu"; then + if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; @@ -8449,44 +8477,14 @@ case `$NM -V 2>&1` in symcode='[ABCDGIRSTW]' ;; esac -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Gets list of data symbols to import. - lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" - # Adjust the below global symbol transforms to fixup imported variables. - lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" - lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" - lt_c_name_lib_hook="\ - -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ - -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" -else - # Disable hooks by default. - lt_cv_sys_global_symbol_to_import= - lt_cdecl_hook= - lt_c_name_hook= - lt_c_name_lib_hook= -fi - # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n"\ -$lt_cdecl_hook\ -" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ -$lt_c_name_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" - -# Transform an extracted symbol line into symbol name with lib prefix and -# symbol address. -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ -$lt_c_name_lib_hook\ -" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ -" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ -" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -8504,24 +8502,21 @@ for ac_symprfx in "" "_"; do # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function, - # D for any global variable and I for any imported variable. + # Fake it for dumpbin and say T for any non-static function + # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ -" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ -" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ -" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ -" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ -" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ -" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ +" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ +" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ +" s[1]~/^[@?]/{print s[1], s[1]; next};"\ +" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" @@ -8569,11 +8564,11 @@ _LT_EOF if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE -/* DATA imports from DLLs on WIN32 can't be const, because runtime +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST -#elif defined __osf__ +#elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else @@ -8599,7 +8594,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF - $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; @@ -8619,13 +8614,13 @@ _LT_EOF mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS - LIBS=conftstm.$ac_objext + LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then + test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS @@ -8646,7 +8641,7 @@ _LT_EOF rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. - if test yes = "$pipe_works"; then + if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= @@ -8699,16 +8694,6 @@ fi - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } @@ -8721,9 +8706,9 @@ fi lt_sysroot= -case $with_sysroot in #( +case ${with_sysroot} in #( yes) - if test yes = "$GCC"; then + if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( @@ -8733,8 +8718,8 @@ case $with_sysroot in #( no|'') ;; #( *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 -$as_echo "$with_sysroot" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac @@ -8751,14 +8736,13 @@ if test "${enable_libtool_lock+set}" = s enableval=$enable_libtool_lock; fi -test no = "$enable_libtool_lock" || enable_libtool_lock=yes +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) - # Find out what ABI is being produced by ac_compile, and set mode - # options accordingly. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8767,25 +8751,24 @@ ia64-*-hpux*) test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) - HPUX_IA64_MODE=32 + HPUX_IA64_MODE="32" ;; *ELF-64*) - HPUX_IA64_MODE=64 + HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - if test yes = "$lt_cv_prog_gnu_ld"; then + if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" @@ -8814,50 +8797,9 @@ ia64-*-hpux*) rm -rf conftest* ;; -mips64*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - emul=elf - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - emul="${emul}32" - ;; - *64-bit*) - emul="${emul}64" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *MSB*) - emul="${emul}btsmip" - ;; - *LSB*) - emul="${emul}ltsmip" - ;; - esac - case `/usr/bin/file conftest.$ac_objext` in - *N32*) - emul="${emul}n32" - ;; - esac - LD="${LD-ld} -m $emul" - fi - rm -rf conftest* - ;; - x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. Note that the listed cases only cover the - # situations where additional linker options are needed (such as when - # doing 32-bit compilation for a host where ld defaults to 64-bit, or - # vice versa); the common cases where no linker options are needed do - # not appear in the list. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8871,14 +8813,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) - case `/usr/bin/file conftest.o` in - *x86-64*) - LD="${LD-ld} -m elf32_x86_64" - ;; - *) - LD="${LD-ld} -m elf_i386" - ;; - esac + LD="${LD-ld} -m elf_i386" ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" @@ -8923,7 +8858,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS=$CFLAGS + SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } @@ -8963,14 +8898,13 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } - if test yes != "$lt_cv_cc_needs_belf"; then + if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS=$SAVE_CFLAGS + CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) - # Find out what ABI is being produced by ac_compile, and set linker - # options accordingly. + # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 @@ -8982,7 +8916,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } case $lt_cv_prog_gnu_ld in yes*) case $host in - i?86-*-solaris*|x86_64-*-solaris*) + i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) @@ -8991,7 +8925,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then - LD=${LD-ld}_sol2 + LD="${LD-ld}_sol2" fi ;; *) @@ -9007,7 +8941,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } ;; esac -need_locks=$enable_libtool_lock +need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. @@ -9118,7 +9052,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test yes != "$lt_cv_path_mainfest_tool"; then +if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi @@ -9621,7 +9555,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no - if test -z "$LT_MULTI_MODULE"; then + if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the @@ -9639,7 +9573,7 @@ else cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. - elif test -f libconftest.dylib && test 0 = "$_lt_result"; then + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -9678,7 +9612,7 @@ else fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS + LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 @@ -9707,7 +9641,7 @@ _LT_EOF _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 - elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -9720,32 +9654,32 @@ fi $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) - _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac - if test yes = "$lt_cv_apple_cc_single_mod"; then + if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi - if test yes = "$lt_cv_ld_exported_symbols_list"; then - _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -9791,14 +9725,14 @@ if test "${enable_shared+set}" = set; th *) enable_shared=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9822,14 +9756,14 @@ if test "${enable_static+set}" = set; th *) enable_static=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9853,14 +9787,14 @@ if test "${with_pic+set}" = set; then : *) pic_mode=default # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9868,6 +9802,8 @@ else fi +test -z "$pic_mode" && pic_mode=default + @@ -9883,14 +9819,14 @@ if test "${enable_fast_install+set}" = s *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. - lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do - IFS=$lt_save_ifs + IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done - IFS=$lt_save_ifs + IFS="$lt_save_ifs" ;; esac else @@ -9908,7 +9844,7 @@ fi # This can be used to rebuild libtool when needed -LIBTOOL_DEPS=$ltmain +LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -9957,7 +9893,7 @@ test -z "$LN_S" && LN_S="ln -s" -if test -n "${ZSH_VERSION+set}"; then +if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi @@ -9996,7 +9932,7 @@ aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. - if test set != "${COLLECT_NAMES+set}"; then + if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi @@ -10007,14 +9943,14 @@ esac ofile=libtool can_build_shared=yes -# All known linkers require a '.a' archive for static linking (except MSVC, +# All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 09:48:47 2015 Return-Path: Delivered-To: svn-src-head@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 29E634CC; Mon, 12 Jan 2015 09:48: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 15A38F2; Mon, 12 Jan 2015 09:48: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 t0C9mkF9005222; Mon, 12 Jan 2015 09:48:46 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9mkMx005218; Mon, 12 Jan 2015 09:48:46 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501120948.t0C9mkMx005218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 09:48:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277058 - in head: share/man/man4 sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:48:47 -0000 Author: glebius Date: Mon Jan 12 09:48:45 2015 New Revision: 277058 URL: https://svnweb.freebsd.org/changeset/base/277058 Log: Remove the support for NGM_CISCO_GET_IPADDR message from ng_iface(4). The legitimacy of removal is proved by the fact that implementation contained a critical bug: the response allocated was sizeof(pointer), while should had been 2*sizeof(struct ng_cisco_ipaddr). The reason for ng_iface(4) to support ng_cisco(4) message isn't explained anywhere, and code comes from original Whistle import. Sponsored by: Nginx, Inc. Modified: head/share/man/man4/ng_iface.4 head/sys/netgraph/ng_iface.c Modified: head/share/man/man4/ng_iface.4 ============================================================================== --- head/share/man/man4/ng_iface.4 Mon Jan 12 09:46:49 2015 (r277057) +++ head/share/man/man4/ng_iface.4 Mon Jan 12 09:48:45 2015 (r277058) @@ -35,7 +35,7 @@ .\" $FreeBSD$ .\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $ .\" -.Dd October 28, 2005 +.Dd January 12, 2015 .Dt NG_IFACE 4 .Os .Sh NAME @@ -111,12 +111,6 @@ The interface must not currently be up. .It Dv NGM_IFACE_BROADCAST Pq Ic broadcast Set the interface to broadcast mode. The interface must not currently be up. -.It Dv NGM_CISCO_GET_IPADDR Pq Ic getipaddr -This message is defined by the -.Xr ng_cisco 4 -node type; see -.Xr ng_cisco 4 -for a description. .El .Sh SHUTDOWN This node shuts down upon receipt of a Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Mon Jan 12 09:46:49 2015 (r277057) +++ head/sys/netgraph/ng_iface.c Mon Jan 12 09:48:45 2015 (r277058) @@ -83,7 +83,6 @@ #include #include #include -#include #ifdef NG_SEPARATE_MALLOC static MALLOC_DEFINE(M_NETGRAPH_IFACE, "netgraph_iface", "netgraph iface node"); @@ -144,14 +143,6 @@ static iffam_p get_iffam_from_hook(priv_ static iffam_p get_iffam_from_name(const char *name); static hook_p *get_hook_from_iffam(priv_p priv, iffam_p iffam); -/* Parse type for struct ng_cisco_ipaddr */ -static const struct ng_parse_struct_field ng_cisco_ipaddr_type_fields[] - = NG_CISCO_IPADDR_TYPE_INFO; -static const struct ng_parse_type ng_cisco_ipaddr_type = { - &ng_parse_struct_type, - &ng_cisco_ipaddr_type_fields -}; - /* List of commands and how to convert arguments to/from ASCII */ static const struct ng_cmdlist ng_iface_cmds[] = { { @@ -176,13 +167,6 @@ static const struct ng_cmdlist ng_iface_ NULL }, { - NGM_CISCO_COOKIE, - NGM_CISCO_GET_IPADDR, - "getipaddr", - NULL, - &ng_cisco_ipaddr_type - }, - { NGM_IFACE_COOKIE, NGM_IFACE_GET_IFINDEX, "getifindex", @@ -652,43 +636,6 @@ ng_iface_rcvmsg(node_p node, item_p item break; } break; - case NGM_CISCO_COOKIE: - switch (msg->header.cmd) { - case NGM_CISCO_GET_IPADDR: /* we understand this too */ - { - struct ifaddr *ifa; - - /* Return the first configured IP address */ - if_addr_rlock(ifp); - TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { - struct ng_cisco_ipaddr *ips; - - if (ifa->ifa_addr->sa_family != AF_INET) - continue; - NG_MKRESPONSE(resp, msg, sizeof(ips), M_NOWAIT); - if (resp == NULL) { - error = ENOMEM; - break; - } - ips = (struct ng_cisco_ipaddr *)resp->data; - ips->ipaddr = ((struct sockaddr_in *) - ifa->ifa_addr)->sin_addr; - ips->netmask = ((struct sockaddr_in *) - ifa->ifa_netmask)->sin_addr; - break; - } - if_addr_runlock(ifp); - - /* No IP addresses on this interface? */ - if (ifa == NULL) - error = EADDRNOTAVAIL; - break; - } - default: - error = EINVAL; - break; - } - break; case NGM_FLOW_COOKIE: switch (msg->header.cmd) { case NGM_LINK_IS_UP: From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 09:50:43 2015 Return-Path: Delivered-To: svn-src-head@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 869F862D; Mon, 12 Jan 2015 09:50: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 72AA4192; Mon, 12 Jan 2015 09:50: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 t0C9ohfd006031; Mon, 12 Jan 2015 09:50:43 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0C9ohHJ006030; Mon, 12 Jan 2015 09:50:43 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501120950.t0C9ohHJ006030@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 09:50:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277059 - head/sys/netgraph X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 09:50:43 -0000 Author: glebius Date: Mon Jan 12 09:50:42 2015 New Revision: 277059 URL: https://svnweb.freebsd.org/changeset/base/277059 Log: When the node receives NGM_FLOW_COOKIE update the if_link_state, instead of playing with almost dead IFF_DRV_RUNNING flag. Sponsored by: Nginx, Inc. Modified: head/sys/netgraph/ng_iface.c Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Mon Jan 12 09:48:45 2015 (r277058) +++ head/sys/netgraph/ng_iface.c Mon Jan 12 09:50:42 2015 (r277059) @@ -639,10 +639,10 @@ ng_iface_rcvmsg(node_p node, item_p item case NGM_FLOW_COOKIE: switch (msg->header.cmd) { case NGM_LINK_IS_UP: - ifp->if_drv_flags |= IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_UP); break; case NGM_LINK_IS_DOWN: - ifp->if_drv_flags &= ~IFF_DRV_RUNNING; + if_link_state_change(ifp, LINK_STATE_DOWN); break; default: break; From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 10:40:29 2015 Return-Path: Delivered-To: svn-src-head@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 47E55165; Mon, 12 Jan 2015 10:40: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 1BA518A4; Mon, 12 Jan 2015 10:40: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 t0CAeSEH029269; Mon, 12 Jan 2015 10:40:28 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CAeS1i029268; Mon, 12 Jan 2015 10:40:28 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501121040.t0CAeS1i029268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 12 Jan 2015 10:40:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277063 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 10:40:29 -0000 Author: brueffer Date: Mon Jan 12 10:40:28 2015 New Revision: 277063 URL: https://svnweb.freebsd.org/changeset/base/277063 Log: Mdoc markup and style cleanup. Modified: head/share/man/man4/cc_dctcp.4 Modified: head/share/man/man4/cc_dctcp.4 ============================================================================== --- head/share/man/man4/cc_dctcp.4 Mon Jan 12 10:33:00 2015 (r277062) +++ head/share/man/man4/cc_dctcp.4 Mon Jan 12 10:40:28 2015 (r277063) @@ -40,18 +40,23 @@ throughput and minimise latency in data proportion of Explicit Congestion Notification (ECN) marks received from capable hardware as a congestion signal. .Pp -DCTCP uses fraction of ECN marked packets to update congestion window. The -window reduction ratio is always <= 1/2. Only when all of the packets are +DCTCP uses fraction of ECN marked packets to update congestion window. +The window reduction ratio is always <= 1/2. +Only when all of the packets are marked, congestion window is halved. .Pp In order to keep the accuracy of the ECN marked fraction, a DCTCP receiver mirrors back incoming (or missing) CE marks by setting (or clearing) ECE marks. This feedback methodology is also adopted when the receiver uses delayed ACK. .Pp -FreeBSD DCTCP implementation includes two minor modifications for the one-sided -deployment. Considering the situation that DCTCP is used as sender and classic +The +.Fx +DCTCP implementation includes two minor modifications for the one-sided +deployment. +Considering the situation that DCTCP is used as sender and classic ECN is used as receiver, DCTCP sets the CWR flag as the reaction to the ECE -flag. In addition, when classic ECN is used as sender and DCTCP is used as +flag. +In addition, when classic ECN is used as sender and DCTCP is used as receiver, DCTCP avoids to mirror back ACKs only when the CWR flag is set in the incoming packet. .Pp @@ -75,6 +80,7 @@ Default is 16. .It Va slowstart A trigger to halve congestion window after slow start. Default does nothing to halve window. +.El .Sh SEE ALSO .Xr cc_chd 4 , .Xr cc_cubic 4 , @@ -120,8 +126,8 @@ University, Japan. The .Nm congestion control module and this manual page were written by -.An Midori Kato katoon@sfc.wide.ad.jp +.An Midori Kato Mt katoon@sfc.wide.ad.jp and -.An Lars Eggert lars@netapp.com +.An Lars Eggert Mt lars@netapp.com with help and modifications from -.An Hiren Panchasara hiren@FreeBSD.org +.An Hiren Panchasara Mt hiren@FreeBSD.org From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 13:59:35 2015 Return-Path: Delivered-To: svn-src-head@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 EB0C9E99; Mon, 12 Jan 2015 13:59:35 +0000 (UTC) Received: from mail.jr-hosting.nl (mail.jr-hosting.nl [IPv6:2a01:4f8:210:34e4::25]) by mx1.freebsd.org (Postfix) with ESMTP id A51C5FC1; Mon, 12 Jan 2015 13:59:35 +0000 (UTC) Received: from [IPv6:2001:470:d701::4162:c374:cb35:4adf] (unknown [IPv6:2001:470:d701:0:4162:c374:cb35:4adf]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail.jr-hosting.nl (Postfix) with ESMTPSA id 3C452261E; Mon, 12 Jan 2015 14:59:19 +0100 (CET) DMARC-Filter: OpenDMARC Filter v1.3.0 mail.jr-hosting.nl 3C452261E Authentication-Results: mail.jr-hosting.nl/3C452261E; dmarc=none header.from=FreeBSD.org Subject: Re: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 From: Remko Lodder In-Reply-To: <201501120833.t0C8X53s071470@svn.freebsd.org> Date: Mon, 12 Jan 2015 14:59:18 +0100 Message-Id: References: <201501120833.t0C8X53s071470@svn.freebsd.org> To: Hiren Panchasara X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 13:59:36 -0000 --Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On 12 Jan 2015, at 09:33, Hiren Panchasara wrote: > > Author: hiren > Date: Mon Jan 12 08:33:04 2015 > New Revision: 277054 > URL: https://svnweb.freebsd.org/changeset/base/277054 > > Log: > DCTCP (Data Center TCP) implementation. Cool! Good work! -- /"\ Best regards, | remko@FreeBSD.org \ / Remko Lodder | remko@EFnet X http://www.evilcoder.org/ | / \ ASCII Ribbon Campaign | Against HTML Mail and News --Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769 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 - http://gpgtools.org iQIcBAEBAgAGBQJUs9M2AAoJEKjD27JZ84ywGI0P/idUx2kVQ8uapEa/vzU10qOJ p7CIHrvMEoI6eBwNPam+NcPLZxHKYDT3/pIppZC6kIDySJtgoYEJGAJ0/NE7YXeS ZxODc+N3/VjAC+ZFbiJu/2FKRKN0h/4sujR79AfE+2vcnoKIVZGikH3tdp8CM+AD FaE6/n2C0R5YckC+t2tAgK2Kal6ytERwRIrPLC2bzlURd4fQtxR9++QdaB5DCjHL HrHURfjFjqkxq8tNLnFlJOnKXMOxP3R2Mz3HQwsx6ED+/N74qrInDr+GAdtZNxLg 3KD3EIEtHzMGxNHS4ItlVgVMhMDASN1w03/scJzQpYWf4Nkex8hkcaIl4sRXhzeE /5MaXEymQiqwIOOd2HVObOOw8TgoMdY+X3ZPTmIAfU0FApj2ZztNKWMzxNameSMw shdUParl7MudzXh1ZIEIh+qKEyGvto+Mi0D4FG1WyzXruWmQZ7YUsxA3106CoxIR xdmg7IC/GkMoKDgfZXW38aCU2u4EwKcIqWuuJRiOT+GKg3V24kLH5DEd6Q+oS41i NJPM6P1sD6lcyCHoocRKNQhyCHXOa+su1UqoZnshGAp/aJbBoCyoI0VR2GqSVrM3 otn8T+QiCO0W8nd3hQpYVOd9/DQg+jo2QRDqWPDdWTqDVSJ793rQ/XsNkX+DqFgp WmtdPsFhTPuc9m5/yGBY =Z8yB -----END PGP SIGNATURE----- --Apple-Mail=_763D2ADB-0995-4102-AFA1-E9E7C6A57769-- From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 14:13:33 2015 Return-Path: Delivered-To: svn-src-head@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 53FAF28A for ; Mon, 12 Jan 2015 14:13:33 +0000 (UTC) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B36E21A for ; Mon, 12 Jan 2015 14:13:32 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C819C2088F for ; Mon, 12 Jan 2015 09:13:30 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Mon, 12 Jan 2015 09:13:30 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.net; h= x-sasl-enc:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=mesmtp; bh=0fRK1t1dczxzBwd4Q4HtanNxKXw=; b=HFzX41r18T/zutuI3I BPDAtPE2rWOb6UWtxGqEJX9YtA1UXYEzo/vcnO6KInfmv6cFngXq+1YkGcb8V9i9 HiPb9pLyhZ2BTn0T6rH3XdKZ9Ec8I9+70O21h34PdfTCkcIun9Wh1MgV5GSxmTJ2 kCKY3q3k3oq/DvOEhWX+U4PNo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=x-sasl-enc:message-id:date:from :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; s=smtpout; bh=0fRK1t1dczxzBwd4Q4Htan NxKXw=; b=Q0dKUsad4lVONYyROeFDpcKuVRJRLNrjdxzyyXj1yDJ6Sp2zr7/DbB FFB8wSu2Nhv9Pr4zzOLxpyEeXqdpeCkzEUpSUHStAdVO4I8h/PIl13+v5DtKsOMn MCMu1jkm9kCgKTINyzNW4N3S644OfUF+Eua+YRL0pgpeyGG8sr10M= X-Sasl-enc: DrE/wUzc2X6GJO7YvXOdJYG1ZT6Qz9fM1V+vfq62JlQB 1421072010 Received: from [192.168.1.81] (unknown [94.194.112.224]) by mail.messagingengine.com (Postfix) with ESMTPA id 0C0446800F6; Mon, 12 Jan 2015 09:13:29 -0500 (EST) Message-ID: <54B3D689.1020608@fastmail.net> Date: Mon, 12 Jan 2015 14:13:29 +0000 From: Bruce Simpson User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Hiren Panchasara , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc References: <201501120833.t0C8X53s071470@svn.freebsd.org> In-Reply-To: <201501120833.t0C8X53s071470@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:13:33 -0000 On 12/01/2015 08:33, Hiren Panchasara wrote: > Log: > DCTCP (Data Center TCP) implementation. > Right On Commander! From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 14:39:13 2015 Return-Path: Delivered-To: svn-src-head@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 2F93C7E5; Mon, 12 Jan 2015 14:39:13 +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 A4E6763F; Mon, 12 Jan 2015 14:39:12 +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 t0CEdAUH020058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 17:39:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CEdAwO020057; Mon, 12 Jan 2015 17:39:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 17:39:10 +0300 From: Gleb Smirnoff To: Luiz Otavio O Souza Subject: Re: svn commit: r276751 - head/sys/netinet Message-ID: <20150112143910.GL15484@FreeBSD.org> References: <201501061307.t06D7E0a001358@svn.freebsd.org> <20150107205203.GI15484@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: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:39:13 -0000 Luiz, On Fri, Jan 09, 2015 at 11:14:53AM -0200, Luiz Otavio O Souza wrote: L> On Wed, Jan 7, 2015 at 6:52 PM, Gleb Smirnoff wrote: L> > On Tue, Jan 06, 2015 at 01:07:14PM +0000, Luiz Otavio O Souza wrote: L> > L> Author: loos L> > L> Date: Tue Jan 6 13:07:13 2015 L> > L> New Revision: 276751 L> > L> URL: https://svnweb.freebsd.org/changeset/base/276751 L> > L> L> > L> Log: L> > L> Remove the check that prevent carp(4) advskew to be set to '0'. L> > L> L> > L> CARP devices are created with advskew set to '0' and once you set it to L> > L> any other value in the valid range (0..254) you can't set it back to zero. L> > L> L> > L> The code in question is also used to prevent that zeroed values overwrite L> > L> the CARP defaults when a new CARP device is created. Since advskew already L> > L> defaults to '0' for newly created devices and the new value is guaranteed L> > L> to be within the valid range, it is safe to overwrite it here. L> > L> L> > L> PR: 194672 L> > L> Reported by: cmb@pfsense.org L> > L> In collaboration with: garga L> > L> Tested by: garga L> > L> MFC after: 2 weeks L> > L> > Please correct me if I am wrong, but after this change any SIOCSVH will reset L> > the advskew to 0. L> > L> > For example, please try to: L> > L> > ifconfig igb0 vhid 1 advskew 100 L> > ifconfig igb0 vhid 1 pass foobar L> > L> > Now let's check the advskew: L> > L> > ifconfig igb0 L> L> Only if the SIOCSVH request is not initialized with data from SIOCGVH. L> L> ifconfig (at setcarp_callback()) will always read the existing values L> before issuing the SIOCSVH with the new values and this is what makes L> my change safe: L> L> # ifconfig em0 vhid 1 advskew 100 192.168.100.1/24 alias L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 1 advskew 100 L> # ifconfig em0 vhid 1 pass foobar L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 1 advskew 100 L> # ifconfig em0 vhid 1 advbase 5 L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 5 advskew 100 L> # ifconfig em0 vhid 1 advskew 0 L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 5 advskew 0 Thanks for checking that! Good that I was wrong. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 14:41:39 2015 Return-Path: Delivered-To: svn-src-head@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 B508E97B; Mon, 12 Jan 2015 14:41: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 33EE56E3; Mon, 12 Jan 2015 14:41:38 +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 t0CEfaQI020075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 17:41:36 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CEfaNG020074; Mon, 12 Jan 2015 17:41:36 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 17:41:36 +0300 From: Gleb Smirnoff To: "Bjoern A. Zeeb" Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150112144136.GM15484@FreeBSD.org> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:41:39 -0000 On Thu, Jan 08, 2015 at 12:49:45AM +0000, Bjoern A. Zeeb wrote: B> > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug B> > B> > and why couldn't it be fixed with having per-vnet thread? B> > B> B> > B> You don’t 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? B> > B> > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, B> > if you are speaking of "30000 whatever pf purging threads", then you B> > already mean “1 mln whatever processes". B> B> jail/VNETs can exist without a single process attached. B> B> But I guess the point is that there is only so much work we can do at the same time and we should be very careful in what we try to parallellellellize as with 5 vnets it might be fine, with a couple of thousand you may keep a system busy with itself. Let's admit that thousand of vnets all running pf is bizarre design and has no practical application. B> > Speaking of pf purging threads competing for resources. If someone wants B> > really independent pfs in vnets, then locks should be virtualized as well. B> B> No please don’t. The only places where we “virtualise†locks for VNETs is part of data structures which are vnet specific (virtualised). And the pf state tables (the data the purge threads work on) of course are vnet specific (virtualised). -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 14:52:44 2015 Return-Path: Delivered-To: svn-src-head@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 AB25BD51; Mon, 12 Jan 2015 14:52: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 96DE4858; Mon, 12 Jan 2015 14:52: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 t0CEqinw050795; Mon, 12 Jan 2015 14:52:44 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CEqihQ050794; Mon, 12 Jan 2015 14:52:44 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501121452.t0CEqihQ050794@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 14:52:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277072 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:52:44 -0000 Author: glebius Date: Mon Jan 12 14:52:43 2015 New Revision: 277072 URL: https://svnweb.freebsd.org/changeset/base/277072 Log: Do not go one layer down to check ifqueue length. First, not all drivers use ifqueue at all. Second, there is no point in this lockless check. Either positive or negative result of the check could be incorrect after a tick. Sponsored by: Nginx, Inc. Modified: head/sys/netinet6/ip6_output.c Modified: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Mon Jan 12 13:53:40 2015 (r277071) +++ head/sys/netinet6/ip6_output.c Mon Jan 12 14:52:43 2015 (r277072) @@ -905,8 +905,6 @@ passout: u_int32_t id = htonl(ip6_randomid()); u_char nextproto; - int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len; - /* * Too large for the destination or interface; * fragment if possible. @@ -924,18 +922,6 @@ passout: } /* - * Verify that we have any chance at all of being able to queue - * the packet or packet fragments - */ - if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) - < tlen /* - hlen */)) { - error = ENOBUFS; - IP6STAT_INC(ip6s_odropped); - goto bad; - } - - - /* * If the interface will not calculate checksums on * fragmented packets, then do it here. * XXX-BZ handle the hw offloading case. Need flags. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 14:55:19 2015 Return-Path: Delivered-To: svn-src-head@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 12D60F89; Mon, 12 Jan 2015 14:55:19 +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 8ED0486D; Mon, 12 Jan 2015 14:55:17 +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 t0CEtFiN020132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 17:55:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CEtF67020131; Mon, 12 Jan 2015 17:55:15 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 17:55:15 +0300 From: Gleb Smirnoff To: "Alexander V. Chernikov" Subject: Re: svn commit: r276844 - head/sys/netinet6 Message-ID: <20150112145515.GN15484@FreeBSD.org> References: <201501081802.t08I26nA010368@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501081802.t08I26nA010368@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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:55:19 -0000 On Thu, Jan 08, 2015 at 06:02:06PM +0000, Alexander V. Chernikov wrote: A> Author: melifaro A> Date: Thu Jan 8 18:02:05 2015 A> New Revision: 276844 A> URL: https://svnweb.freebsd.org/changeset/base/276844 A> A> Log: A> * Use newly-created nd6_grab_holdchain() function to retrieve lle A> hold mbuf chain instead of calling full-blown nd6_output_lle() A> for each packet. This simplifies both callers and nd6_output_lle() A> implementation. A> * Make nd6_output_lle() static and remove now-unused lle and chain A> arguments. A> * Rename nd6_output_flush() -> nd6_flush_holdchain() to be consistent. A> * Move all pre-send transmit hooks to newly-created nd6_output_ifp(). A> Now nd6_output(), nd6_output_lle() and nd6_flush_holdchain() are using A> it to send mbufs to if_output. A> * Remove SeND hook from nd6_na_input() because it was implemented A> incorrectly since the beginning (r211501): A> - it tagged initial input mbuf (m) instead of m_hold A> - tagging _all_ mbufs in holdchain seems to be wrong anyway. Thanks that you gathered into one place all instances of ifp->if_output(origifp, ... ^^^ ^^^^^^^ But this extremely ugly place still needs to be fixed :) -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 15:05:07 2015 Return-Path: Delivered-To: svn-src-head@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 534FB359; Mon, 12 Jan 2015 15:05:07 +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 C99E396A; Mon, 12 Jan 2015 15:05:06 +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 t0CF54T4020191 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 18:05:04 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CF54gW020190; Mon, 12 Jan 2015 18:05:04 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 18:05:04 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r276993 - head/sys/net80211 Message-ID: <20150112150504.GP15484@FreeBSD.org> References: <201501111843.t0BIhjrs078316@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501111843.t0BIhjrs078316@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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 15:05:07 -0000 On Sun, Jan 11, 2015 at 06:43:45PM +0000, Adrian Chadd wrote: A> Author: adrian A> Date: Sun Jan 11 18:43:45 2015 A> New Revision: 276993 A> URL: https://svnweb.freebsd.org/changeset/base/276993 A> A> Log: A> Switch around the order of static inline to be in line with how it's A> used elsewhere, and to keep gcc-4.7 happy. A> A> This is a request from the DragonflyBSD project. I'd suggest to also do s/__inline/inline/ in such sweeps due to "inline" being a C99 keyword, while __inline is a GNU-ism from pre-99 times. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 15:11:22 2015 Return-Path: Delivered-To: svn-src-head@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 E510F73B; Mon, 12 Jan 2015 15:11:22 +0000 (UTC) Received: from mail.ipfw.ru (mail.ipfw.ru [IPv6:2a01:4f8:120:6141::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 A8547A47; Mon, 12 Jan 2015 15:11:22 +0000 (UTC) Received: from [2a02:6b8:0:401:222:4dff:fe50:cd2f] (helo=ptichko.yndx.net) by mail.ipfw.ru with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128) (Exim 4.82 (FreeBSD)) (envelope-from ) id 1YAgeG-0009AB-PE; Mon, 12 Jan 2015 19:11:20 +0400 Message-ID: <54B3E3BE.7090302@FreeBSD.org> Date: Mon, 12 Jan 2015 18:09:50 +0300 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.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: r277072 - head/sys/netinet6 References: <201501121452.t0CEqihQ050794@svn.freebsd.org> In-Reply-To: <201501121452.t0CEqihQ050794@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 15:11:23 -0000 On 12.01.2015 17:52, Gleb Smirnoff wrote: > Author: glebius > Date: Mon Jan 12 14:52:43 2015 > New Revision: 277072 > URL: https://svnweb.freebsd.org/changeset/base/277072 > > Log: > Do not go one layer down to check ifqueue length. First, not all drivers > use ifqueue at all. Second, there is no point in this lockless check. > Either positive or negative result of the check could be incorrect after > a tick. Finally, no useless ifq_maxlen check! Thanks! > > Sponsored by: Nginx, Inc. > > Modified: > head/sys/netinet6/ip6_output.c > > Modified: head/sys/netinet6/ip6_output.c > ============================================================================== > --- head/sys/netinet6/ip6_output.c Mon Jan 12 13:53:40 2015 (r277071) > +++ head/sys/netinet6/ip6_output.c Mon Jan 12 14:52:43 2015 (r277072) > @@ -905,8 +905,6 @@ passout: > u_int32_t id = htonl(ip6_randomid()); > u_char nextproto; > > - int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len; > - > /* > * Too large for the destination or interface; > * fragment if possible. > @@ -924,18 +922,6 @@ passout: > } > > /* > - * Verify that we have any chance at all of being able to queue > - * the packet or packet fragments > - */ > - if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) > - < tlen /* - hlen */)) { > - error = ENOBUFS; > - IP6STAT_INC(ip6s_odropped); > - goto bad; > - } > - > - > - /* > * If the interface will not calculate checksums on > * fragmented packets, then do it here. > * XXX-BZ handle the hw offloading case. Need flags. > > From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 15:51:03 2015 Return-Path: Delivered-To: svn-src-head@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 1197FEC4; Mon, 12 Jan 2015 15:51:03 +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 D9BE9E29; Mon, 12 Jan 2015 15:51:02 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 41256B94E; Mon, 12 Jan 2015 10:51:01 -0500 (EST) From: John Baldwin To: Bryan Venteicher Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 Date: Mon, 12 Jan 2015 10:51 -0500 Message-ID: <6173473.uE5Sr5nj0c@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 12 Jan 2015 10:51:01 -0500 (EST) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , John Nielsen , Bryan Drewery X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 15:51:03 -0000 On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery wrote: > > On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > > > > > > wrote: > > > Bryan- > > > > > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher > > > > > > wrote: > > > > Author: bryanv > > > > Date: Fri Oct 10 06:08:59 2014 > > > > New Revision: 272886 > > > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > > > > > Log: > > > > Add context pointer and source address to the UDP tunnel callback > > > > > > > > These are needed for the forthcoming vxlan implementation. The > > > > context > > > > > > pointer means we do not have to use a spare pointer field in the > > > > inpcb, > > > > > > and the source address is required to populate vxlan's forwarding > > > > table. > > > > > > While I highly doubt there is an out of tree consumer of the UDP > > > > tunneling callback, this change may be a difficult to eventually > > > > MFC. > > > > > I noticed this comment while doing an MFC of vxlan to my local tree. > > > Do you think an MFC to 10-STABLE of this change (and vxlan > > > generally) will be feasible? Is there precedent for ABI changes like > > > this being sanctioned? Could symbol versioning help? > > > > > > I'd like to get some consensus on whether this commit is OK to MFC. With > > > this commit, vxlan should be an easy to MFC. > > > > Breaking ABI will potentially hurt packages. FreeBSD builds packages for > > the oldest supported release on a branch. If you break ABI in 10.2 while > > we are building packages for 10.1 then any packages using these > > interfaces may not work right or result in panics packages with kmods. > > Please consider that. > > The only user visible change of this commit would be the addition of a > field at the end of 'struct udpcb'. I don't think that is a problem, at > least a similar change didn't prevent the MFC of UDP Lite. > > The kernel part of this changes the UDP tunneling functions which I guess > there could be a 3rd party module out there, but I very highly doubt that, > based on how un-useful the previous interface was. Userland should not be impacted by this at all. (Nothing in userland cares about udpcb's internals.) I think there was only ever one consumer for the existing UDP tunneling code (bz@ knows what it is). I'm not sure where it lives. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:06:04 2015 Return-Path: Delivered-To: svn-src-head@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 E2586524; Mon, 12 Jan 2015 16:06:04 +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 967D6F7A; Mon, 12 Jan 2015 16:06:04 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YAhV4-0000es-BF; Mon, 12 Jan 2015 19:05:54 +0300 Date: Mon, 12 Jan 2015 19:05:54 +0300 From: Slawa Olhovchenkov To: Gleb Smirnoff Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150112160554.GA2190@zxy.spb.ru> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> <20150112144136.GM15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20150112144136.GM15484@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: Craig Rodrigues , src-committers@freebsd.org, svn-src-all@freebsd.org, Nikos Vassiliadis , svn-src-head@freebsd.org, "Bjoern A. Zeeb" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:06:05 -0000 On Mon, Jan 12, 2015 at 05:41:36PM +0300, Gleb Smirnoff wrote: > On Thu, Jan 08, 2015 at 12:49:45AM +0000, Bjoern A. Zeeb wrote: > B> > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug > B> > B> > and why couldn't it be fixed with having per-vnet thread? > B> > B> > B> > B> You don't 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? > B> > > B> > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, > B> > if you are speaking of "30000 whatever pf purging threads", then you > B> > already mean "1 mln whatever processes". > B> > B> jail/VNETs can exist without a single process attached. > B> > B> But I guess the point is that there is only so much work we can do at the same time and we should be very careful in what we try to parallellellellize as with 5 vnets it might be fine, with a couple of thousand you may keep a system busy with itself. > > Let's admit that thousand of vnets all running pf is bizarre design > and has no practical application. Hosted firewall/NAT for ISP/Data centers. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:06:41 2015 Return-Path: Delivered-To: svn-src-head@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 7141066C for ; Mon, 12 Jan 2015 16:06:41 +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 15EF6F85 for ; Mon, 12 Jan 2015 16:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421078799; bh=SxJuaduOvZc/TMkd6GtrS6ZjIo/6JlYjz5Wye/PnbQE=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=nvGf5awZkAtcaKfpM4W+LVVZ3lh6Gf7NFSG99lSBK0PiJtxxcBPaTQM1MPIVplTNFwc7g4MW+txyth/i1zqWtjBak4Wx95F18T95Cnci/Y36YepdtQC8yC1wCfR+r5Huu7itgJNYmsMtV9DUL4C/Fdeo78ZjyydYdJYvmyQLalMGf7tQ6j6fMxplEYUuAmr7g4ELv9gYZOciYlz7ALY4rlQa2UH9dDDao+1nGLm6U1HbZqkIONMNk2FDzO+P1TD8YUp0q0I7ZQ6i9I+Wj/SfmqBp+/6kD/SGIZvzRE1W2z0SmIr1d3BIP/GnyTp3qcSkutf5QEDr53Ba6NgETzb8RQ== Received: from [98.139.215.140] by nm26.bullet.mail.bf1.yahoo.com with NNFMP; 12 Jan 2015 16:06:39 -0000 Received: from [68.142.230.74] by tm11.bullet.mail.bf1.yahoo.com with NNFMP; 12 Jan 2015 16:06:39 -0000 Received: from [127.0.0.1] by smtp231.mail.bf1.yahoo.com with NNFMP; 12 Jan 2015 16:06:39 -0000 X-Yahoo-Newman-Id: 194937.52563.bm@smtp231.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: WzpJuQEVM1mKLSRjNmRUAdFG2nlQB39q6xDZArGZKPam42a wuG3b1MogB4YsLPLsh.OZ4ayNdv1TcevH1DfePzCK2KbSWn4im0HwsTOfATq aDdXoWE8z3BfMd.phehANCsh8FZ.h07gASDT.0O6Lf3F0K46piXr6e0zb1fs XBz6m4QUD1kXC3ShI4xnh7NyUFNduENAxRXLp32SsdAbomhJ1Ub_09a3TOh_ Dajis.R.aU1lgYQOTzwczjp3lsuR9b6NgSh9bDGrJgM4CaCqWpXa7h6gDtKp JS1ZwkxnRZ9NeTfxoN9t_e6X06jrSN8.M0pec7PAi7AtfwCRDcQLMgb1aKMH qP8VvUscPxe4okLcqHCsyEyLIfrYaJs0Im2VYRbcw1QN9y1LLAXIxexAaTuF WSHVKwR9ew7a0O0rItqARPom.9e1X4sZK0Oikj8ThX8cjQZghE663Ad2s_f4 WrrdF0ldqV_5TFLsmvVxAcRmvJY3_Bq6lC0hmovMPGJ.pt33_HomFMN2.poq HmFOZfIeCubfxhq9zBPqIGAUmIULfaCTZkVT74yBRMLIWDrYWK1IK.vjkVSz O2PnoQO9jGBCyBWfEy3EDNMNMmWA.Hvkptgu2s91puNYdsUTqJP41TWgxYsB Xod4dNDI9bLByBnGhmkPjr3NOYRcyBuGCq9ss4.hA_FRcx38qxSmZqzFq4to FkrWtOWJqCvtcbFuBjkz4ybKjEKuBA_Hxl1CB.oMkEhLW3bywaRSngFSXpIW I0IPwYxq4IO8Ku5cX_ZrIPHKni_cCpUaztt0X.AKVaX7Nl5ldc2SuWGV1a9e 4NU47PI4QwFnEyPaV3HUffz9zr2iskhN3PfRSkcCgdfSfowfqDKk57twJzUA fP.2c7dAbV37_7RBJD3u_YZ4nV4.9QKtLD7.yFu7daph.1u9A7.B3ljo_.18 eYILPp.zGnK4- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54B3F10F.70506@FreeBSD.org> Date: Mon, 12 Jan 2015 11:06:39 -0500 From: Pedro Giffuni Organization: FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Hiren Panchasara , Midori Kato , Lars Eggert , svn-src-head@freebsd.org Subject: Re: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc References: <201501120833.t0C8X53s071470@svn.freebsd.org> In-Reply-To: <201501120833.t0C8X53s071470@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:06:41 -0000 On 12/01/2015 03:33 a.m., Hiren Panchasara wrote: > Author: hiren > Date: Mon Jan 12 08:33:04 2015 > New Revision: 277054 > URL: https://svnweb.freebsd.org/changeset/base/277054 > > Log: > DCTCP (Data Center TCP) implementation. > > DCTCP congestion control algorithm aims to maximise throughput and minimise > latency in data center networks by utilising the proportion of Explicit > Congestion Notification (ECN) marked packets received from capable hardware as a > congestion signal. > > Highlights: > Implemented as a mod_cc(4) module. > ECN (Explicit congestion notification) processing is done differently from > RFC3168. > Takes one-sided DCTCP into consideration where only one of the sides is using > DCTCP and other is using standard ECN. > > IETF draft: http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00 > Thesis report by Midori Kato: https://eggert.org/students/kato-thesis.pdf > > Submitted by: Midori Kato and > Lars Eggert > with help and modifications from > hiren > Differential Revision: https://reviews.freebsd.org/D604 > Reviewed by: gnn Missing RelNotes= yes Huge thank you! FWIW, I thought the linux guys wouldn't take it over some GPL vs patent issue but apparently redhat pushed some muscle and just did it: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e3118e8359bb7c59555aca60c725106e6d78c5ce Not that I care much what they do ;). Pedro. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:07:56 2015 Return-Path: Delivered-To: svn-src-head@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 973A972A; Mon, 12 Jan 2015 16:07:56 +0000 (UTC) Received: from mail-we0-x22d.google.com (mail-we0-x22d.google.com [IPv6:2a00:1450:400c:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 29724F9D; Mon, 12 Jan 2015 16:07:56 +0000 (UTC) Received: by mail-we0-f173.google.com with SMTP id q58so19918476wes.4; Mon, 12 Jan 2015 08:07:54 -0800 (PST) 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=Ae4n1ZMRWsAvKClLIWZ9CsF2E54Ktr3oLZbLGPRuPoE=; b=TTAXrBC1jrAYdVnkG61Zunj8DM2KmbKc0evq1YUAX7mMC/H2MG/z1z1IHOmdLT/40r pEKTWYdvpq/MizY9sJp07A39xQjUaB19vnxtlVduI44cwXyWF8EzbN1LMH9rv5pZQbxo DrUs4BpRTtNGKgtxk/TL9xsSiiqalSjZiCTBVMokY70V0cEsrD3IR3UJ5ySQvdMOHIDF /1TaFB5x7JHjdL8tG5+iOy/axCnfn8P4hCWI0KIFwOyGtXkrGqwlzPmmwfhgY0g90AJF 0KLv0SbS1QDTIPcCrGz1geTjKEGnn4ljPL0K8juR7M+zo33fMrPftjrfdwGj9j/tIcRT MgpQ== MIME-Version: 1.0 X-Received: by 10.194.108.9 with SMTP id hg9mr10882811wjb.68.1421078874512; Mon, 12 Jan 2015 08:07:54 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 12 Jan 2015 08:07:54 -0800 (PST) In-Reply-To: <20150112150504.GP15484@FreeBSD.org> References: <201501111843.t0BIhjrs078316@svn.freebsd.org> <20150112150504.GP15484@FreeBSD.org> Date: Mon, 12 Jan 2015 08:07:54 -0800 X-Google-Sender-Auth: 6Yva0WFnSVthv3AhlwZUORs33-o Message-ID: Subject: Re: svn commit: r276993 - head/sys/net80211 From: Adrian Chadd To: Gleb Smirnoff 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:07:56 -0000 On 12 January 2015 at 07:05, Gleb Smirnoff wrote: > On Sun, Jan 11, 2015 at 06:43:45PM +0000, Adrian Chadd wrote: > A> Author: adrian > A> Date: Sun Jan 11 18:43:45 2015 > A> New Revision: 276993 > A> URL: https://svnweb.freebsd.org/changeset/base/276993 > A> > A> Log: > A> Switch around the order of static inline to be in line with how it's > A> used elsewhere, and to keep gcc-4.7 happy. > A> > A> This is a request from the DragonflyBSD project. > > I'd suggest to also do s/__inline/inline/ in such sweeps due to "inline" > being a C99 keyword, while __inline is a GNU-ism from pre-99 times. Sure thing. (I don't /think/ anyone tries compiling net80211 on anything pre-C99. Oh wait, crap, they do. Well, they can push me patches to create an INLINE #define or something.) -adrian > -- > Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:09:23 2015 Return-Path: Delivered-To: svn-src-head@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 21D568DB; Mon, 12 Jan 2015 16:09:23 +0000 (UTC) Received: from mail-wg0-x231.google.com (mail-wg0-x231.google.com [IPv6:2a00:1450:400c:c00::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A7841FB6; Mon, 12 Jan 2015 16:09:22 +0000 (UTC) Received: by mail-wg0-f49.google.com with SMTP id n12so20191682wgh.8; Mon, 12 Jan 2015 08:09:20 -0800 (PST) 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=zCPESMgXVlyrOfGKDxk3N90Nb5WMcYJvXeuWaH0/iTc=; b=krCRb8gl2LQcg5GozWEjz9Xui5IkCQ5VvjIUF0ucsUWPPYdCKM9qrUBW9piANzKitQ JczTjbkPje44mFj4gs+OJQUTHYioK1BT/AfrZeYXoKBVegkVQspsJ7LynnoXsu7GvmZ5 i2y+8/i4hb5ZMnY6AFoC49iVcKCbRyAxhMLmr0cp89R34fx/9zfK9+c3M1FP9+rB5V/O olFdrse7qTftXW9fXV/NbzYJH6nNU7N3zi+c1A5B85DMlC/zM+tMkTiK4oHolYOvoyyt esUrsgMs7HiRGdjk5dtd7ohfk0tMgUGMub8Tnq2jigngp8toAQfzP4FYGEh97zTT3Yk7 WWQg== MIME-Version: 1.0 X-Received: by 10.180.87.36 with SMTP id u4mr31443290wiz.20.1421078958894; Mon, 12 Jan 2015 08:09:18 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 12 Jan 2015 08:09:18 -0800 (PST) In-Reply-To: <54B3E3BE.7090302@FreeBSD.org> References: <201501121452.t0CEqihQ050794@svn.freebsd.org> <54B3E3BE.7090302@FreeBSD.org> Date: Mon, 12 Jan 2015 08:09:18 -0800 X-Google-Sender-Auth: AnpK01hhGdr_dKGJAp-8yJ6EfjI Message-ID: Subject: Re: svn commit: r277072 - head/sys/netinet6 From: Adrian Chadd To: "Alexander V. Chernikov" Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Gleb Smirnoff , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:09:23 -0000 On 12 January 2015 at 07:09, Alexander V. Chernikov wrote: > On 12.01.2015 17:52, Gleb Smirnoff wrote: >> Author: glebius >> Date: Mon Jan 12 14:52:43 2015 >> New Revision: 277072 >> URL: https://svnweb.freebsd.org/changeset/base/277072 >> >> Log: >> Do not go one layer down to check ifqueue length. First, not all drivers >> use ifqueue at all. Second, there is no point in this lockless check. >> Either positive or negative result of the check could be incorrect after >> a tick. > Finally, no useless ifq_maxlen check! Yeah, I killed it in the ipv4 world. Well, commented it out. It's been bogus ever since kernels became re-entrant and SMP. :( -adrian > Thanks! >> >> Sponsored by: Nginx, Inc. >> >> Modified: >> head/sys/netinet6/ip6_output.c >> >> Modified: head/sys/netinet6/ip6_output.c >> ============================================================================== >> --- head/sys/netinet6/ip6_output.c Mon Jan 12 13:53:40 2015 (r277071) >> +++ head/sys/netinet6/ip6_output.c Mon Jan 12 14:52:43 2015 (r277072) >> @@ -905,8 +905,6 @@ passout: >> u_int32_t id = htonl(ip6_randomid()); >> u_char nextproto; >> >> - int qslots = ifp->if_snd.ifq_maxlen - ifp->if_snd.ifq_len; >> - >> /* >> * Too large for the destination or interface; >> * fragment if possible. >> @@ -924,18 +922,6 @@ passout: >> } >> >> /* >> - * Verify that we have any chance at all of being able to queue >> - * the packet or packet fragments >> - */ >> - if (qslots <= 0 || ((u_int)qslots * (mtu - hlen) >> - < tlen /* - hlen */)) { >> - error = ENOBUFS; >> - IP6STAT_INC(ip6s_odropped); >> - goto bad; >> - } >> - >> - >> - /* >> * If the interface will not calculate checksums on >> * fragmented packets, then do it here. >> * XXX-BZ handle the hw offloading case. Need flags. >> >> > > From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:12:49 2015 Return-Path: Delivered-To: svn-src-head@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 9F13DB2E; Mon, 12 Jan 2015 16:12:49 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6828510B; Mon, 12 Jan 2015 16:12:49 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rl12so25939981iec.12; Mon, 12 Jan 2015 08:12:48 -0800 (PST) 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=ye7R0MabxHymeg+QnTZElOxVgAYS+8YpNkuahHp2Lmw=; b=fadmfrfffSq3y6fFj/2zt0b0llkpGfKB/sXMWQr16VvfY8ps65/1FWpUr73vNT2Bad PqAJF7WRgfVxCXXidLGDaEgRYAoU01ZznQbCGcj853KO9LeL/E2KrhPBFc4uhLMCUxcY ZTCUZNroa5NrZHWBdILFE6asE3XsLMwKMS7SwUnRJfbj4omrjdXLl35wHGNosubPr40O fxg5xC2I6HkO3GF4W7my4LxhJhjaviOCC+k8/JTQ8rEdvWYevbw2cTUK+KfrMB+N+Of7 5GqRJc+lFRoZisOElSPj+m8/J2WxoahwzIMzKG8TKYsJPwaKUe2iJtEMaXx6wbtqjigp 7Kzw== X-Received: by 10.50.7.34 with SMTP id g2mr16089595iga.36.1421079168625; Mon, 12 Jan 2015 08:12:48 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.71.228 with HTTP; Mon, 12 Jan 2015 08:12:18 -0800 (PST) In-Reply-To: <6173473.uE5Sr5nj0c@ralph.baldwin.cx> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> From: Bryan Venteicher Date: Mon, 12 Jan 2015 10:12:18 -0600 X-Google-Sender-Auth: FBDzLg6aVUDQOZBFWAXJ25vj0x0 Message-ID: Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 To: John Baldwin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:12:49 -0000 On Mon, Jan 12, 2015 at 9:51 AM, John Baldwin wrote: > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > > On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery > wrote: > > > On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > > > > > > > > wrote: > > > > Bryan- > > > > > > > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher < > bryanv@freebsd.org > > > > > > > > > wrote: > > > > > Author: bryanv > > > > > Date: Fri Oct 10 06:08:59 2014 > > > > > New Revision: 272886 > > > > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > > > > > > > Log: > > > > > Add context pointer and source address to the UDP tunnel > callback > > > > > > > > > > These are needed for the forthcoming vxlan implementation. The > > > > > > context > > > > > > > > pointer means we do not have to use a spare pointer field in > the > > > > > > inpcb, > > > > > > > > and the source address is required to populate vxlan's > forwarding > > > > > > table. > > > > > > > > While I highly doubt there is an out of tree consumer of the > UDP > > > > > tunneling callback, this change may be a difficult to > eventually > > > > > > MFC. > > > > > > > I noticed this comment while doing an MFC of vxlan to my local > tree. > > > > Do you think an MFC to 10-STABLE of this change (and vxlan > > > > generally) will be feasible? Is there precedent for ABI changes > like > > > > this being sanctioned? Could symbol versioning help? > > > > > > > > I'd like to get some consensus on whether this commit is OK to MFC. > With > > > > this commit, vxlan should be an easy to MFC. > > > > > > Breaking ABI will potentially hurt packages. FreeBSD builds packages > for > > > the oldest supported release on a branch. If you break ABI in 10.2 > while > > > we are building packages for 10.1 then any packages using these > > > interfaces may not work right or result in panics packages with kmods. > > > Please consider that. > > > > The only user visible change of this commit would be the addition of a > > field at the end of 'struct udpcb'. I don't think that is a problem, at > > least a similar change didn't prevent the MFC of UDP Lite. > > > > The kernel part of this changes the UDP tunneling functions which I guess > > there could be a 3rd party module out there, but I very highly doubt > that, > > based on how un-useful the previous interface was. > > Userland should not be impacted by this at all. (Nothing in userland cares > about udpcb's internals.) I think there was only ever one consumer for the > existing UDP tunneling code (bz@ knows what it is). I'm not sure where it > lives. > > The only in tree consumer is SCTP. > -- > John Baldwin > > From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:12:57 2015 Return-Path: Delivered-To: svn-src-head@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 902ADC66; Mon, 12 Jan 2015 16:12:57 +0000 (UTC) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 305B910E; Mon, 12 Jan 2015 16:12:57 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id n12so20210045wgh.6; Mon, 12 Jan 2015 08:12:55 -0800 (PST) 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=J+JFSwdqmPLZGD1y9mA5XPyQsHrWZHnlYvFnw5gMNU8=; b=KcQx57JldfxKEDSqEf6A4zvxkEKkf5zo94OBgo+Sn5a3Fl9dbfxriUF1C8DX1vNTmA b/cbchytXsNK9y04Ab/rkZxIwi/xr6xyz0+9jIsSGabPqKwbTyLEyqFr2TNCNR7KxEZq b2qRbefVxDIW3hTuQ7iOi1+FD0tIDgRc7fh1eO8JQxD2PBdMrCVUPOM3ES//oG8Fu1ze LzT17jXu39FdSqf/xmAvdifrzdBV3ekgO+NP89PsNa+t/UtreHf+hlzBTHzk/3Hw46Ux nAKDPCzWl5ra33dXrPusfDbZbu0JgWEFgaCXKP4/pcmZiBAhjy5RujKW5srztR8yOER7 /ztA== MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr60548561wjf.15.1421079175497; Mon, 12 Jan 2015 08:12:55 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 12 Jan 2015 08:12:55 -0800 (PST) In-Reply-To: <20150112160554.GA2190@zxy.spb.ru> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> <20150108003146.GL15484@FreeBSD.org> <63857483-2879-4620-87EF-FE76197AB99B@lists.zabbadoz.net> <20150112144136.GM15484@FreeBSD.org> <20150112160554.GA2190@zxy.spb.ru> Date: Mon, 12 Jan 2015 08:12:55 -0800 X-Google-Sender-Auth: dQQ1iyPt-8tpZgSIqpLBkrBNVic Message-ID: Subject: Re: svn commit: r276747 - head/sys/netpfil/pf From: Adrian Chadd To: Slawa Olhovchenkov Content-Type: text/plain; charset=UTF-8 Cc: Craig Rodrigues , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Nikos Vassiliadis , Gleb Smirnoff , "svn-src-head@freebsd.org" , "Bjoern A. Zeeb" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:12:57 -0000 On 12 January 2015 at 08:05, Slawa Olhovchenkov wrote: > On Mon, Jan 12, 2015 at 05:41:36PM +0300, Gleb Smirnoff wrote: > >> On Thu, Jan 08, 2015 at 12:49:45AM +0000, Bjoern A. Zeeb wrote: >> B> > B> > AFAIU, from the PR there is some panic fixed. What is the actual bug >> B> > B> > and why couldn't it be fixed with having per-vnet thread? >> B> > B> >> B> > B> You don't 30000 whatever pf purging threads on a system all running, possibly competing for some resources, e.g., locks? >> B> > >> B> > Isn't a vnet, which is a jail, already a set of a dozen of processes? So, >> B> > if you are speaking of "30000 whatever pf purging threads", then you >> B> > already mean "1 mln whatever processes". >> B> >> B> jail/VNETs can exist without a single process attached. >> B> >> B> But I guess the point is that there is only so much work we can do at the same time and we should be very careful in what we try to parallellellellize as with 5 vnets it might be fine, with a couple of thousand you may keep a system busy with itself. >> >> Let's admit that thousand of vnets all running pf is bizarre design >> and has no practical application. > > Hosted firewall/NAT for ISP/Data centers. Then let's bite the bullet and setup some per-"something" (maybe CPU, maybe RSS, etc) global taskqueues to run cooperative multitasked bits like this on. This isn't the only thing that we'll want to have potentially tens of thousands of, but not have tens of thousands of worker threads. -adrian From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:16:51 2015 Return-Path: Delivered-To: svn-src-head@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 5B9ABE9C; Mon, 12 Jan 2015 16:16:51 +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 D3BE414F; Mon, 12 Jan 2015 16:16:49 +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 t0CGGliW020854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 19:16:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CGGl4w020853; Mon, 12 Jan 2015 19:16:47 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 19:16:47 +0300 From: Gleb Smirnoff To: Adrian Chadd Subject: Re: svn commit: r277072 - head/sys/netinet6 Message-ID: <20150112161647.GQ15484@FreeBSD.org> References: <201501121452.t0CEqihQ050794@svn.freebsd.org> <54B3E3BE.7090302@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-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "Alexander V. Chernikov" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:16:51 -0000 On Mon, Jan 12, 2015 at 08:09:18AM -0800, Adrian Chadd wrote: A> On 12 January 2015 at 07:09, Alexander V. Chernikov A> wrote: A> > On 12.01.2015 17:52, Gleb Smirnoff wrote: A> >> Author: glebius A> >> Date: Mon Jan 12 14:52:43 2015 A> >> New Revision: 277072 A> >> URL: https://svnweb.freebsd.org/changeset/base/277072 A> >> A> >> Log: A> >> Do not go one layer down to check ifqueue length. First, not all drivers A> >> use ifqueue at all. Second, there is no point in this lockless check. A> >> Either positive or negative result of the check could be incorrect after A> >> a tick. A> > Finally, no useless ifq_maxlen check! A> A> Yeah, I killed it in the ipv4 world. Well, commented it out. It's been A> bogus ever since kernels became re-entrant and SMP. :( Another one (even with extra mistake) left in ip_fastfwd.c until today. One still left in SCTP output code, waiting for maintainers to review it. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 16:21:22 2015 Return-Path: Delivered-To: svn-src-head@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 E318E349; Mon, 12 Jan 2015 16:21:21 +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 9C4D6212; Mon, 12 Jan 2015 16:21:21 +0000 (UTC) Received: from new-host-4.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2AF70B915; Mon, 12 Jan 2015 11:21:19 -0500 (EST) Message-ID: <54B3F47E.5050206@baldwin.cx> Date: Mon, 12 Jan 2015 11:21:18 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Bryan Venteicher Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> In-Reply-To: X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 12 Jan 2015 11:21:19 -0500 (EST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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" , John Nielsen , Bryan Drewery X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 16:21:22 -0000 On 1/12/15 11:12 AM, Bryan Venteicher wrote: > > > On Mon, Jan 12, 2015 at 9:51 AM, John Baldwin > wrote: > > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > > On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery > > wrote: > > > On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > > > > On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen > > > > > > > > > >> wrote: > > > > Bryan- > > > > > > > > On Oct 10, 2014, at 12:09 AM, Bryan Venteicher > > > > > > > > > >> > wrote: > > > > > Author: bryanv > > > > > Date: Fri Oct 10 06:08:59 2014 > > > > > New Revision: 272886 > > > > > URL: https://svnweb.freebsd.org/changeset/base/272886 > > > > > > > > > > Log: > > > > > Add context pointer and source address to the UDP > tunnel callback > > > > > > > > > > These are needed for the forthcoming vxlan > implementation. The > > > > > > context > > > > > > > > pointer means we do not have to use a spare pointer > field in the > > > > > > inpcb, > > > > > > > > and the source address is required to populate > vxlan's forwarding > > > > > > table. > > > > > > > > While I highly doubt there is an out of tree consumer > of the UDP > > > > > tunneling callback, this change may be a difficult to > eventually > > > > > > MFC. > > > > > > > I noticed this comment while doing an MFC of vxlan to my > local tree. > > > > Do you think an MFC to 10-STABLE of this change (and vxlan > > > > generally) will be feasible? Is there precedent for ABI > changes like > > > > this being sanctioned? Could symbol versioning help? > > > > > > > > I'd like to get some consensus on whether this commit is OK > to MFC. With > > > > this commit, vxlan should be an easy to MFC. > > > > > > Breaking ABI will potentially hurt packages. FreeBSD builds > packages for > > > the oldest supported release on a branch. If you break ABI in > 10.2 while > > > we are building packages for 10.1 then any packages using these > > > interfaces may not work right or result in panics packages > with kmods. > > > Please consider that. > > > > The only user visible change of this commit would be the > addition of a > > field at the end of 'struct udpcb'. I don't think that is a > problem, at > > least a similar change didn't prevent the MFC of UDP Lite. > > > > The kernel part of this changes the UDP tunneling functions > which I guess > > there could be a 3rd party module out there, but I very highly > doubt that, > > based on how un-useful the previous interface was. > > Userland should not be impacted by this at all. (Nothing in > userland cares > about udpcb's internals.) I think there was only ever one > consumer for the > existing UDP tunneling code (bz@ knows what it is). I'm not sure > where it > lives. > > > > The only in tree consumer is SCTP. I thought there was some IPSEC use-case that was the original impetus for bz@ adding this? Bjoern really is the person to ask about that though. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 17:42:52 2015 Return-Path: Delivered-To: svn-src-head@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 3F54D703; Mon, 12 Jan 2015 17:42:52 +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 BAB7FDFB; Mon, 12 Jan 2015 17:42:51 +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 98D1825D3892; Mon, 12 Jan 2015 17:42:39 +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 D8E02C77058; Mon, 12 Jan 2015 17:42:38 +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 Bc6n-Fs87BCl; Mon, 12 Jan 2015 17:42:37 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id E8DA9C77072; Mon, 12 Jan 2015 17:42:33 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 From: "Bjoern A. Zeeb" In-Reply-To: <6173473.uE5Sr5nj0c@ralph.baldwin.cx> Date: Mon, 12 Jan 2015 17:42:34 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.1993) Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 17:42:52 -0000 > On 12 Jan 2015, at 15:51 , John Baldwin wrote: >=20 > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: >> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery = wrote: >>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: >>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>=20 >>>> > wrote: >>>> Bryan- >>>>=20 >>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher = >>>=20 >>>> > wrote: >>>>> Author: bryanv >>>>> Date: Fri Oct 10 06:08:59 2014 >>>>> New Revision: 272886 >>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 >>>>>=20 >>>>> Log: >>>>> Add context pointer and source address to the UDP tunnel callback >>>>>=20 >>>>> These are needed for the forthcoming vxlan implementation. The >>>=20 >>> context >>>=20 >>>>> pointer means we do not have to use a spare pointer field in the >>>=20 >>> inpcb, >>>=20 >>>>> and the source address is required to populate vxlan's forwarding >>>=20 >>> table. >>>=20 >>>>> While I highly doubt there is an out of tree consumer of the UDP >>>>> tunneling callback, this change may be a difficult to eventually >>>=20 >>> MFC. >>>=20 >>>> I noticed this comment while doing an MFC of vxlan to my local = tree. >>>> Do you think an MFC to 10-STABLE of this change (and vxlan >>>> generally) will be feasible? Is there precedent for ABI changes = like >>>> this being sanctioned? Could symbol versioning help? >>>>=20 >>>> I'd like to get some consensus on whether this commit is OK to MFC. = With >>>> this commit, vxlan should be an easy to MFC. >>>=20 >>> Breaking ABI will potentially hurt packages. FreeBSD builds packages = for >>> the oldest supported release on a branch. If you break ABI in 10.2 = while >>> we are building packages for 10.1 then any packages using these >>> interfaces may not work right or result in panics packages with = kmods. >>> Please consider that. >>=20 >> The only user visible change of this commit would be the addition of = a >> field at the end of 'struct udpcb'. I don't think that is a problem, = at >> least a similar change didn't prevent the MFC of UDP Lite. >>=20 >> The kernel part of this changes the UDP tunneling functions which I = guess >> there could be a 3rd party module out there, but I very highly doubt = that, >> based on how un-useful the previous interface was. >=20 > Userland should not be impacted by this at all. (Nothing in userland = cares > about udpcb's internals.) I think there was only ever one consumer = for the=20 > existing UDP tunneling code (bz@ knows what it is). I'm not sure = where it=20 > lives. If you are talking about u_tun_func then it came from SCTP over UDP = tunneling. tuexen and rrs are your friends. I was wondering if it could be used similarly for IPsec UDPencap but I = think that went nowhere back then. =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-head@FreeBSD.ORG Mon Jan 12 18:06:23 2015 Return-Path: Delivered-To: svn-src-head@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 E67C2EB2; Mon, 12 Jan 2015 18:06: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 D278FCB; Mon, 12 Jan 2015 18:06: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 t0CI6N2Q043821; Mon, 12 Jan 2015 18:06:23 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CI6NVx043820; Mon, 12 Jan 2015 18:06:23 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501121806.t0CI6NVx043820@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 18:06:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277077 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:06:24 -0000 Author: glebius Date: Mon Jan 12 18:06:22 2015 New Revision: 277077 URL: https://svnweb.freebsd.org/changeset/base/277077 Log: Do not go one layer down to check ifqueue length. First, not all drivers use ifqueue at all. Second, there is no point in this lockless check. Either positive or negative result of the check could be incorrect after a tick. Reviewed by: tuexen Sponsored by: Nginx, Inc. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Jan 12 16:18:34 2015 (r277076) +++ head/sys/netinet/sctp_output.c Mon Jan 12 18:06:22 2015 (r277077) @@ -7958,22 +7958,6 @@ again_one_more_time: } else { skip_data_for_this_net = 0; } - if ((net->ro.ro_rt) && (net->ro.ro_rt->rt_ifp)) { - /* - * if we have a route and an ifp check to see if we - * have room to send to this guy - */ - struct ifnet *ifp; - - ifp = net->ro.ro_rt->rt_ifp; - if ((ifp->if_snd.ifq_len + 2) >= ifp->if_snd.ifq_maxlen) { - SCTP_STAT_INCR(sctps_ifnomemqueued); - if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_LOG_MAXBURST_ENABLE) { - sctp_log_maxburst(stcb, net, ifp->if_snd.ifq_len, ifp->if_snd.ifq_maxlen, SCTP_MAX_IFP_APPLIED); - } - continue; - } - } switch (((struct sockaddr *)&net->ro._l_addr)->sa_family) { #ifdef INET case AF_INET: From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 18:13:40 2015 Return-Path: Delivered-To: svn-src-head@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 C30172D7; Mon, 12 Jan 2015 18:13: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 AD5091F7; Mon, 12 Jan 2015 18:13: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 t0CIDecs048194; Mon, 12 Jan 2015 18:13:40 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIDdI5048184; Mon, 12 Jan 2015 18:13:39 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501121813.t0CIDdI5048184@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 18:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277078 - in head/lib/libc: arm/gen gen mips/gen powerpc/gen powerpc64/gen sparc64/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:13:40 -0000 Author: emaste Date: Mon Jan 12 18:13:38 2015 New Revision: 277078 URL: https://svnweb.freebsd.org/changeset/base/277078 Log: Remove duplicate copies of trivial getcontextx.c Only i386 and amd64 provide a non-trivial __getcontextx(). Use a common trivial implementation in gen/ for other architectures, rather than copying the file to each MD subdirectory. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1472 Added: head/lib/libc/gen/trivial-getcontextx.c - copied unchanged from r277076, head/lib/libc/arm/gen/getcontextx.c Deleted: head/lib/libc/arm/gen/getcontextx.c head/lib/libc/mips/gen/getcontextx.c head/lib/libc/powerpc/gen/getcontextx.c head/lib/libc/powerpc64/gen/getcontextx.c head/lib/libc/sparc64/gen/getcontextx.c Modified: head/lib/libc/arm/gen/Makefile.inc head/lib/libc/mips/gen/Makefile.inc head/lib/libc/powerpc/gen/Makefile.inc head/lib/libc/powerpc64/gen/Makefile.inc head/lib/libc/sparc64/gen/Makefile.inc Modified: head/lib/libc/arm/gen/Makefile.inc ============================================================================== --- head/lib/libc/arm/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/arm/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -2,9 +2,10 @@ # $FreeBSD$ SRCS+= _ctx_start.S _setjmp.S _set_tp.c alloca.S fabs.c \ - getcontextx.c infinity.c ldexp.c makecontext.c \ + infinity.c ldexp.c makecontext.c \ __aeabi_read_tp.S setjmp.S signalcontext.c sigsetjmp.S flt_rounds.c \ - arm_initfini.c + arm_initfini.c \ + trivial-getcontextx.c .if ${MACHINE_ARCH} == "armv6hf" SRCS+= fpgetmask_vfp.c fpgetround_vfp.c fpgetsticky_vfp.c fpsetmask_vfp.c \ Copied: head/lib/libc/gen/trivial-getcontextx.c (from r277076, head/lib/libc/arm/gen/getcontextx.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/gen/trivial-getcontextx.c Mon Jan 12 18:13:38 2015 (r277078, copy of r277076, head/lib/libc/arm/gen/getcontextx.c) @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2011 Konstantin Belousov + * 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 ``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 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 + +int +__getcontextx_size(void) +{ + + return (sizeof(ucontext_t)); +} + +int +__fillcontextx2(char *ctx) +{ + + return (0); +} + +int +__fillcontextx(char *ctx) +{ + ucontext_t *ucp; + + ucp = (ucontext_t *)ctx; + return (getcontext(ucp)); +} + +__weak_reference(__getcontextx, getcontextx); + +ucontext_t * +__getcontextx(void) +{ + char *ctx; + int error; + + ctx = malloc(__getcontextx_size()); + if (ctx == NULL) + return (NULL); + if (__fillcontextx(ctx) == -1) { + error = errno; + free(ctx); + errno = error; + return (NULL); + } + return ((ucontext_t *)ctx); +} Modified: head/lib/libc/mips/gen/Makefile.inc ============================================================================== --- head/lib/libc/mips/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/mips/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -6,5 +6,6 @@ SRCS+= infinity.c fabs.c ldexp.c # SRCS+= flt_rounds.c fpgetmask.c fpgetround.c fpgetsticky.c fpsetmask.c \ # fpsetround.c fpsetsticky.c -SRCS+= _ctx_start.S _set_tp.c _setjmp.S getcontextx.c makecontext.c \ - setjmp.S signalcontext.c sigsetjmp.S +SRCS+= _ctx_start.S _set_tp.c _setjmp.S makecontext.c \ + setjmp.S signalcontext.c sigsetjmp.S \ + trivial-getcontextx.c Modified: head/lib/libc/powerpc/gen/Makefile.inc ============================================================================== --- head/lib/libc/powerpc/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/powerpc/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -1,9 +1,11 @@ # $FreeBSD$ SRCS += _ctx_start.S eabi.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ - fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \ + fpgetsticky.c fpsetmask.c fpsetround.c \ infinity.c ldexp.c makecontext.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ - _set_tp.c + _set_tp.c \ + trivial-getcontextx.c + Modified: head/lib/libc/powerpc64/gen/Makefile.inc ============================================================================== --- head/lib/libc/powerpc64/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/powerpc64/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -1,9 +1,10 @@ # $FreeBSD$ SRCS += _ctx_start.S fabs.S flt_rounds.c fpgetmask.c fpgetround.c \ - fpgetsticky.c fpsetmask.c fpsetround.c getcontextx.c \ + fpgetsticky.c fpsetmask.c fpsetround.c \ infinity.c ldexp.c makecontext.c _setjmp.S \ setjmp.S sigsetjmp.S signalcontext.c syncicache.c \ - _set_tp.c + _set_tp.c \ + trivial-getcontextx.c Modified: head/lib/libc/sparc64/gen/Makefile.inc ============================================================================== --- head/lib/libc/sparc64/gen/Makefile.inc Mon Jan 12 18:06:22 2015 (r277077) +++ head/lib/libc/sparc64/gen/Makefile.inc Mon Jan 12 18:13:38 2015 (r277078) @@ -2,5 +2,6 @@ SRCS+= _ctx_start.S _setjmp.S fabs.S fixunsdfsi.S flt_rounds.c fpgetmask.c \ fpgetround.c fpgetsticky.c fpsetmask.c fpsetround.c \ - getcontextx.c infinity.c ldexp.c makecontext.c \ - signalcontext.c setjmp.S sigsetjmp.S _set_tp.c + infinity.c ldexp.c makecontext.c \ + signalcontext.c setjmp.S sigsetjmp.S _set_tp.c \ + trivial-getcontextx.c From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 18:32:47 2015 Return-Path: Delivered-To: svn-src-head@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 D8C9A120; Mon, 12 Jan 2015 18:32: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 C441F69C; Mon, 12 Jan 2015 18:32: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 t0CIWkwR058071; Mon, 12 Jan 2015 18:32:46 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIWjd1058066; Mon, 12 Jan 2015 18:32:45 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501121832.t0CIWjd1058066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 12 Jan 2015 18:32:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277082 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:32:47 -0000 Author: jfv Date: Mon Jan 12 18:32:45 2015 New Revision: 277082 URL: https://svnweb.freebsd.org/changeset/base/277082 Log: Update to the shared code for Intel I40E drivers in preparation for the ixl 1.3.0 and ixlv 1.2.0 revisions. MFC after: 1 week Modified: head/sys/dev/ixl/i40e_adminq.c head/sys/dev/ixl/i40e_adminq.h head/sys/dev/ixl/i40e_adminq_cmd.h head/sys/dev/ixl/i40e_common.c head/sys/dev/ixl/i40e_lan_hmc.c head/sys/dev/ixl/i40e_nvm.c head/sys/dev/ixl/i40e_prototype.h head/sys/dev/ixl/i40e_register.h head/sys/dev/ixl/i40e_type.h head/sys/dev/ixl/i40e_virtchnl.h Modified: head/sys/dev/ixl/i40e_adminq.c ============================================================================== --- head/sys/dev/ixl/i40e_adminq.c Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq.c Mon Jan 12 18:32:45 2015 (r277082) @@ -589,10 +589,10 @@ enum i40e_status_code i40e_init_adminq(s if (ret_code != I40E_SUCCESS) goto init_adminq_free_asq; - if (i40e_is_vf(hw)) /* VF has no need of firmware */ - goto init_adminq_exit; - -/* There are some cases where the firmware may not be quite ready + /* VF has no need of firmware */ + if (i40e_is_vf(hw)) + goto init_adminq_exit; + /* There are some cases where the firmware may not be quite ready * for AdminQ operations, so we retry the AdminQ setup a few times * if we see timeouts in this first AQ call. */ @@ -600,6 +600,7 @@ enum i40e_status_code i40e_init_adminq(s ret_code = i40e_aq_get_firmware_version(hw, &hw->aq.fw_maj_ver, &hw->aq.fw_min_ver, + &hw->aq.fw_build, &hw->aq.api_maj_ver, &hw->aq.api_min_ver, NULL); @@ -625,7 +626,8 @@ enum i40e_status_code i40e_init_adminq(s /* pre-emptive resource lock release */ i40e_aq_release_resource(hw, I40E_NVM_RESOURCE_ID, 0, NULL); - hw->aq.nvm_busy = FALSE; + hw->aq.nvm_release_on_done = FALSE; + hw->nvmupd_state = I40E_NVMUPD_STATE_INIT; ret_code = i40e_aq_set_hmc_resource_profile(hw, I40E_HMC_PROFILE_DEFAULT, @@ -767,12 +769,6 @@ enum i40e_status_code i40e_asq_send_comm goto asq_send_command_exit; } - if (i40e_is_nvm_update_op(desc) && hw->aq.nvm_busy) { - i40e_debug(hw, I40E_DEBUG_AQ_MESSAGE, "AQTX: NVM busy.\n"); - status = I40E_ERR_NVM; - goto asq_send_command_exit; - } - details = I40E_ADMINQ_DETAILS(hw->aq.asq, hw->aq.asq.next_to_use); if (cmd_details) { i40e_memcpy(details, @@ -924,9 +920,6 @@ enum i40e_status_code i40e_asq_send_comm status = I40E_ERR_ADMIN_QUEUE_TIMEOUT; } - if (!status && i40e_is_nvm_update_op(desc)) - hw->aq.nvm_busy = TRUE; - asq_send_command_error: i40e_release_spinlock(&hw->aq.asq_spinlock); asq_send_command_exit: @@ -1042,7 +1035,6 @@ clean_arq_element_out: i40e_release_spinlock(&hw->aq.arq_spinlock); if (i40e_is_nvm_update_op(&e->desc)) { - hw->aq.nvm_busy = FALSE; if (hw->aq.nvm_release_on_done) { i40e_release_nvm(hw); hw->aq.nvm_release_on_done = FALSE; Modified: head/sys/dev/ixl/i40e_adminq.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq.h Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq.h Mon Jan 12 18:32:45 2015 (r277082) @@ -36,6 +36,7 @@ #define _I40E_ADMINQ_H_ #include "i40e_osdep.h" +#include "i40e_status.h" #include "i40e_adminq_cmd.h" #define I40E_ADMINQ_DESC(R, i) \ @@ -100,9 +101,9 @@ struct i40e_adminq_info { u16 asq_buf_size; /* send queue buffer size */ u16 fw_maj_ver; /* firmware major version */ u16 fw_min_ver; /* firmware minor version */ + u32 fw_build; /* firmware build number */ u16 api_maj_ver; /* api major version */ u16 api_min_ver; /* api minor version */ - bool nvm_busy; bool nvm_release_on_done; struct i40e_spinlock asq_spinlock; /* Send queue spinlock */ @@ -115,7 +116,7 @@ struct i40e_adminq_info { /* general information */ #define I40E_AQ_LARGE_BUF 512 -#define I40E_ASQ_CMD_TIMEOUT 100 /* msecs */ +#define I40E_ASQ_CMD_TIMEOUT 250 /* msecs */ void i40e_fill_default_direct_cmd_desc(struct i40e_aq_desc *desc, u16 opcode); Modified: head/sys/dev/ixl/i40e_adminq_cmd.h ============================================================================== --- head/sys/dev/ixl/i40e_adminq_cmd.h Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_adminq_cmd.h Mon Jan 12 18:32:45 2015 (r277082) @@ -263,6 +263,9 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_lldp_delete_tlv = 0x0A04, i40e_aqc_opc_lldp_stop = 0x0A05, i40e_aqc_opc_lldp_start = 0x0A06, + i40e_aqc_opc_get_cee_dcb_cfg = 0x0A07, + i40e_aqc_opc_lldp_set_local_mib = 0x0A08, + i40e_aqc_opc_lldp_stop_start_spec_agent = 0x0A09, /* Tunnel commands */ i40e_aqc_opc_add_udp_tunnel = 0x0B00, @@ -275,6 +278,8 @@ enum i40e_admin_queue_opc { /* OEM commands */ i40e_aqc_opc_oem_parameter_change = 0xFE00, i40e_aqc_opc_oem_device_status_change = 0xFE01, + i40e_aqc_opc_oem_ocsd_initialize = 0xFE02, + i40e_aqc_opc_oem_ocbb_initialize = 0xFE03, /* debug commands */ i40e_aqc_opc_debug_get_deviceid = 0xFF00, @@ -283,7 +288,6 @@ enum i40e_admin_queue_opc { i40e_aqc_opc_debug_write_reg = 0xFF04, i40e_aqc_opc_debug_modify_reg = 0xFF07, i40e_aqc_opc_debug_dump_internals = 0xFF08, - i40e_aqc_opc_debug_modify_internals = 0xFF09, }; /* command structures and indirect data structures */ @@ -417,6 +421,7 @@ struct i40e_aqc_list_capabilities_elemen #define I40E_AQ_CAP_ID_VSI 0x0017 #define I40E_AQ_CAP_ID_DCB 0x0018 #define I40E_AQ_CAP_ID_FCOE 0x0021 +#define I40E_AQ_CAP_ID_ISCSI 0x0022 #define I40E_AQ_CAP_ID_RSS 0x0040 #define I40E_AQ_CAP_ID_RXQ 0x0041 #define I40E_AQ_CAP_ID_TXQ 0x0042 @@ -461,8 +466,11 @@ struct i40e_aqc_arp_proxy_data { __le32 pfpm_proxyfc; __le32 ip_addr; u8 mac_addr[6]; + u8 reserved[2]; }; +I40E_CHECK_STRUCT_LEN(0x14, i40e_aqc_arp_proxy_data); + /* Set NS Proxy Table Entry Command (indirect 0x0105) */ struct i40e_aqc_ns_proxy_data { __le16 table_idx_mac_addr_0; @@ -488,6 +496,8 @@ struct i40e_aqc_ns_proxy_data { u8 ipv6_addr_1[16]; }; +I40E_CHECK_STRUCT_LEN(0x3c, i40e_aqc_ns_proxy_data); + /* Manage LAA Command (0x0106) - obsolete */ struct i40e_aqc_mng_laa { __le16 command_flags; @@ -498,6 +508,8 @@ struct i40e_aqc_mng_laa { u8 reserved2[6]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_mng_laa); + /* Manage MAC Address Read Command (indirect 0x0107) */ struct i40e_aqc_mac_address_read { __le16 command_flags; @@ -569,6 +581,8 @@ struct i40e_aqc_get_switch_config_header u8 reserved[12]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_get_switch_config_header_resp); + struct i40e_aqc_switch_config_element_resp { u8 element_type; #define I40E_AQ_SW_ELEM_TYPE_MAC 1 @@ -594,6 +608,8 @@ struct i40e_aqc_switch_config_element_re __le16 element_info; }; +I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_config_element_resp); + /* Get Switch Configuration (indirect 0x0200) * an array of elements are returned in the response buffer * the first in the array is the header, remainder are elements @@ -603,6 +619,8 @@ struct i40e_aqc_get_switch_config_resp { struct i40e_aqc_switch_config_element_resp element[1]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_get_switch_config_resp); + /* Add Statistics (direct 0x0201) * Remove Statistics (direct 0x0202) */ @@ -668,6 +686,8 @@ struct i40e_aqc_switch_resource_alloc_el u8 reserved2[6]; }; +I40E_CHECK_STRUCT_LEN(0x10, i40e_aqc_switch_resource_alloc_element_resp); + /* Add VSI (indirect 0x0210) * this indirect command uses struct i40e_aqc_vsi_properties_data * as the indirect buffer (128 bytes) @@ -1099,6 +1119,8 @@ struct i40e_aqc_remove_tag { u8 reserved[12]; }; +I40E_CHECK_CMD_LENGTH(i40e_aqc_remove_tag); + /* Add multicast E-Tag (direct 0x0257) * del multicast E-Tag (direct 0x0258) only uses pv_seid and etag fields * and no external data @@ -1214,7 +1236,7 @@ struct i40e_aqc_add_remove_cloud_filters } ipaddr; __le16 flags; #define I40E_AQC_ADD_CLOUD_FILTER_SHIFT 0 -#define I40E_AQC_ADD_CLOUD_FILTER_MASK (0x3F << \ +#define I40E_AQC_ADD_CLOUD_FILTER_MASK (0x3F << \ I40E_AQC_ADD_CLOUD_FILTER_SHIFT) /* 0x0000 reserved */ #define I40E_AQC_ADD_CLOUD_FILTER_OIP 0x0001 @@ -1247,7 +1269,7 @@ struct i40e_aqc_add_remove_cloud_filters u8 reserved[4]; __le16 queue_number; #define I40E_AQC_ADD_CLOUD_QUEUE_SHIFT 0 -#define I40E_AQC_ADD_CLOUD_QUEUE_MASK (0x3F << \ +#define I40E_AQC_ADD_CLOUD_QUEUE_MASK (0x7FF << \ I40E_AQC_ADD_CLOUD_QUEUE_SHIFT) u8 reserved2[14]; /* response section */ @@ -1366,6 +1388,8 @@ struct i40e_aqc_configure_vsi_ets_sla_bw u8 reserved1[28]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_configure_vsi_ets_sla_bw_data); + /* Configure VSI Bandwidth Allocation per Traffic Type (indirect 0x0407) * responds with i40e_aqc_qs_handles_resp */ @@ -1377,6 +1401,8 @@ struct i40e_aqc_configure_vsi_tc_bw_data __le16 qs_handles[8]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_configure_vsi_tc_bw_data); + /* Query vsi bw configuration (indirect 0x0408) */ struct i40e_aqc_query_vsi_bw_config_resp { u8 tc_valid_bits; @@ -1390,6 +1416,8 @@ struct i40e_aqc_query_vsi_bw_config_resp u8 reserved3[23]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_query_vsi_bw_config_resp); + /* Query VSI Bandwidth Allocation per Traffic Type (indirect 0x040A) */ struct i40e_aqc_query_vsi_ets_sla_config_resp { u8 tc_valid_bits; @@ -1401,6 +1429,8 @@ struct i40e_aqc_query_vsi_ets_sla_config __le16 tc_bw_max[2]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_query_vsi_ets_sla_config_resp); + /* Configure Switching Component Bandwidth Limit (direct 0x0410) */ struct i40e_aqc_configure_switching_comp_bw_limit { __le16 seid; @@ -1428,6 +1458,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved2[96]; }; +I40E_CHECK_STRUCT_LEN(0x80, i40e_aqc_configure_switching_comp_ets_data); + /* Configure Switching Component Bandwidth Limits per Tc (indirect 0x0416) */ struct i40e_aqc_configure_switching_comp_ets_bw_limit_data { u8 tc_valid_bits; @@ -1439,6 +1471,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved1[28]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_configure_switching_comp_ets_bw_limit_data); + /* Configure Switching Component Bandwidth Allocation per Tc * (indirect 0x0417) */ @@ -1450,6 +1484,8 @@ struct i40e_aqc_configure_switching_comp u8 reserved1[20]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_configure_switching_comp_bw_config_data); + /* Query Switching Component Configuration (indirect 0x0418) */ struct i40e_aqc_query_switching_comp_ets_config_resp { u8 tc_valid_bits; @@ -1460,6 +1496,8 @@ struct i40e_aqc_query_switching_comp_ets u8 reserved2[23]; }; +I40E_CHECK_STRUCT_LEN(0x40, i40e_aqc_query_switching_comp_ets_config_resp); + /* Query PhysicalPort ETS Configuration (indirect 0x0419) */ struct i40e_aqc_query_port_ets_config_resp { u8 reserved[4]; @@ -1475,6 +1513,8 @@ struct i40e_aqc_query_port_ets_config_re u8 reserved3[32]; }; +I40E_CHECK_STRUCT_LEN(0x44, i40e_aqc_query_port_ets_config_resp); + /* Query Switching Component Bandwidth Allocation per Traffic Type * (indirect 0x041A) */ @@ -1489,6 +1529,8 @@ struct i40e_aqc_query_switching_comp_bw_ __le16 tc_bw_max[2]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_query_switching_comp_bw_config_resp); + /* Suspend/resume port TX traffic * (direct 0x041B and 0x041C) uses the generic SEID struct */ @@ -1502,6 +1544,8 @@ struct i40e_aqc_configure_partition_bw_d u8 max_bw[16]; /* bandwidth limit */ }; +I40E_CHECK_STRUCT_LEN(0x22, i40e_aqc_configure_partition_bw_data); + /* Get and set the active HMC resource profile and status. * (direct 0x0500) and (direct 0x0501) */ @@ -1584,6 +1628,8 @@ struct i40e_aqc_module_desc { u8 reserved2[8]; }; +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_module_desc); + struct i40e_aq_get_phy_abilities_resp { __le32 phy_type; /* bitmap using the above enum for offsets */ u8 link_speed; /* bitmap using the above enum bit patterns */ @@ -1612,6 +1658,8 @@ struct i40e_aq_get_phy_abilities_resp { struct i40e_aqc_module_desc qualified_module[I40E_AQ_PHY_MAX_QMS]; }; +I40E_CHECK_STRUCT_LEN(0x218, i40e_aq_get_phy_abilities_resp); + /* Set PHY Config (direct 0x0601) */ struct i40e_aq_set_phy_config { /* same bits as above in all */ __le32 phy_type; @@ -1795,12 +1843,12 @@ I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_updat /* NVM Config Read (indirect 0x0704) */ struct i40e_aqc_nvm_config_read { __le16 cmd_flags; -#define ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1 -#define ANVM_READ_SINGLE_FEATURE 0 -#define ANVM_READ_MULTIPLE_FEATURES 1 +#define I40E_AQ_ANVM_SINGLE_OR_MULTIPLE_FEATURES_MASK 1 +#define I40E_AQ_ANVM_READ_SINGLE_FEATURE 0 +#define I40E_AQ_ANVM_READ_MULTIPLE_FEATURES 1 __le16 element_count; - __le16 element_id; /* Feature/field ID */ - u8 reserved[2]; + __le16 element_id; /* Feature/field ID */ + __le16 element_id_msw; /* MSWord of field ID */ __le32 address_high; __le32 address_low; }; @@ -1818,21 +1866,31 @@ struct i40e_aqc_nvm_config_write { I40E_CHECK_CMD_LENGTH(i40e_aqc_nvm_config_write); +/* Used for 0x0704 as well as for 0x0705 commands */ +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT 1 +#define I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_MASK (1 << I40E_AQ_ANVM_FEATURE_OR_IMMEDIATE_SHIFT) +#define I40E_AQ_ANVM_FEATURE 0 +#define I40E_AQ_ANVM_IMMEDIATE_FIELD (1 << FEATURE_OR_IMMEDIATE_SHIFT) struct i40e_aqc_nvm_config_data_feature { __le16 feature_id; - __le16 instance_id; +#define I40E_AQ_ANVM_FEATURE_OPTION_OEM_ONLY 0x01 +#define I40E_AQ_ANVM_FEATURE_OPTION_DWORD_MAP 0x08 +#define I40E_AQ_ANVM_FEATURE_OPTION_POR_CSR 0x10 __le16 feature_options; __le16 feature_selection; }; +I40E_CHECK_STRUCT_LEN(0x6, i40e_aqc_nvm_config_data_feature); + struct i40e_aqc_nvm_config_data_immediate_field { -#define ANVM_FEATURE_OR_IMMEDIATE_MASK 0x2 - __le16 field_id; - __le16 instance_id; + __le32 field_id; + __le32 field_value; __le16 field_options; - __le16 field_value; + __le16 reserved; }; +I40E_CHECK_STRUCT_LEN(0xc, i40e_aqc_nvm_config_data_immediate_field); + /* Send to PF command (indirect 0x0801) id is only used by PF * Send to VF command (indirect 0x0802) id is only used by PF * Send to Peer PF command (indirect 0x0803) @@ -1995,9 +2053,77 @@ struct i40e_aqc_lldp_start { I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_start); -/* Apply MIB changes (0x0A07) - * uses the generic struc as it contains no data +/* Get CEE DCBX Oper Config (0x0A07) + * uses the generic descriptor struct + * returns below as indirect response + */ + +#define I40E_AQC_CEE_APP_FCOE_SHIFT 0x0 +#define I40E_AQC_CEE_APP_FCOE_MASK (0x7 << I40E_AQC_CEE_APP_FCOE_SHIFT) +#define I40E_AQC_CEE_APP_ISCSI_SHIFT 0x3 +#define I40E_AQC_CEE_APP_ISCSI_MASK (0x7 << I40E_AQC_CEE_APP_ISCSI_SHIFT) +#define I40E_AQC_CEE_APP_FIP_SHIFT 0x8 +#define I40E_AQC_CEE_APP_FIP_MASK (0x7 << I40E_AQC_CEE_APP_FIP_SHIFT) +#define I40E_AQC_CEE_PG_STATUS_SHIFT 0x0 +#define I40E_AQC_CEE_PG_STATUS_MASK (0x7 << I40E_AQC_CEE_PG_STATUS_SHIFT) +#define I40E_AQC_CEE_PFC_STATUS_SHIFT 0x3 +#define I40E_AQC_CEE_PFC_STATUS_MASK (0x7 << I40E_AQC_CEE_PFC_STATUS_SHIFT) +#define I40E_AQC_CEE_APP_STATUS_SHIFT 0x8 +#define I40E_AQC_CEE_APP_STATUS_MASK (0x7 << I40E_AQC_CEE_APP_STATUS_SHIFT) +struct i40e_aqc_get_cee_dcb_cfg_v1_resp { + u8 reserved1; + u8 oper_num_tc; + u8 oper_prio_tc[4]; + u8 reserved2; + u8 oper_tc_bw[8]; + u8 oper_pfc_en; + u8 reserved3; + __le16 oper_app_prio; + u8 reserved4; + __le16 tlv_status; +}; + +I40E_CHECK_STRUCT_LEN(0x18, i40e_aqc_get_cee_dcb_cfg_v1_resp); + +struct i40e_aqc_get_cee_dcb_cfg_resp { + u8 oper_num_tc; + u8 oper_prio_tc[4]; + u8 oper_tc_bw[8]; + u8 oper_pfc_en; + __le16 oper_app_prio; + __le32 tlv_status; + u8 reserved[12]; +}; + +I40E_CHECK_STRUCT_LEN(0x20, i40e_aqc_get_cee_dcb_cfg_resp); + +/* Set Local LLDP MIB (indirect 0x0A08) + * Used to replace the local MIB of a given LLDP agent. e.g. DCBx + */ +struct i40e_aqc_lldp_set_local_mib { +#define SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT 0 +#define SET_LOCAL_MIB_AC_TYPE_DCBX_MASK (1 << SET_LOCAL_MIB_AC_TYPE_DCBX_SHIFT) + u8 type; + u8 reserved0; + __le16 length; + u8 reserved1[4]; + __le32 address_high; + __le32 address_low; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_set_local_mib); + +/* Stop/Start LLDP Agent (direct 0x0A09) + * Used for stopping/starting specific LLDP agent. e.g. DCBx */ +struct i40e_aqc_lldp_stop_start_specific_agent { +#define I40E_AQC_START_SPECIFIC_AGENT_SHIFT 0 +#define I40E_AQC_START_SPECIFIC_AGENT_MASK (1 << I40E_AQC_START_SPECIFIC_AGENT_SHIFT) + u8 command; + u8 reserved[15]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_lldp_stop_start_specific_agent); /* Add Udp Tunnel command and completion (direct 0x0B00) */ struct i40e_aqc_add_udp_tunnel { @@ -2073,7 +2199,8 @@ struct i40e_aqc_oem_param_change { #define I40E_AQ_OEM_PARAM_TYPE_BW_CTL 1 #define I40E_AQ_OEM_PARAM_MAC 2 __le32 param_value1; - u8 param_value2[8]; + __le16 param_value2; + u8 reserved[6]; }; I40E_CHECK_CMD_LENGTH(i40e_aqc_oem_param_change); @@ -2087,6 +2214,28 @@ struct i40e_aqc_oem_state_change { I40E_CHECK_CMD_LENGTH(i40e_aqc_oem_state_change); +/* Initialize OCSD (0xFE02, direct) */ +struct i40e_aqc_opc_oem_ocsd_initialize { + u8 type_status; + u8 reserved1[3]; + __le32 ocsd_memory_block_addr_high; + __le32 ocsd_memory_block_addr_low; + __le32 requested_update_interval; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_opc_oem_ocsd_initialize); + +/* Initialize OCBB (0xFE03, direct) */ +struct i40e_aqc_opc_oem_ocbb_initialize { + u8 type_status; + u8 reserved1[3]; + __le32 ocbb_memory_block_addr_high; + __le32 ocbb_memory_block_addr_low; + u8 reserved2[4]; +}; + +I40E_CHECK_CMD_LENGTH(i40e_aqc_opc_oem_ocbb_initialize); + /* debug commands */ /* get device id (0xFF00) uses the generic structure */ Modified: head/sys/dev/ixl/i40e_common.c ============================================================================== --- head/sys/dev/ixl/i40e_common.c Mon Jan 12 18:20:37 2015 (r277081) +++ head/sys/dev/ixl/i40e_common.c Mon Jan 12 18:32:45 2015 (r277082) @@ -95,47 +95,51 @@ void i40e_debug_aq(struct i40e_hw *hw, e { struct i40e_aq_desc *aq_desc = (struct i40e_aq_desc *)desc; u16 len = LE16_TO_CPU(aq_desc->datalen); - u8 *aq_buffer = (u8 *)buffer; - u32 data[4]; - u32 i = 0; + u8 *buf = (u8 *)buffer; + u16 i = 0; if ((!(mask & hw->debug_mask)) || (desc == NULL)) return; i40e_debug(hw, mask, "AQ CMD: opcode 0x%04X, flags 0x%04X, datalen 0x%04X, retval 0x%04X\n", - aq_desc->opcode, aq_desc->flags, aq_desc->datalen, - aq_desc->retval); + LE16_TO_CPU(aq_desc->opcode), + LE16_TO_CPU(aq_desc->flags), + LE16_TO_CPU(aq_desc->datalen), + LE16_TO_CPU(aq_desc->retval)); i40e_debug(hw, mask, "\tcookie (h,l) 0x%08X 0x%08X\n", - aq_desc->cookie_high, aq_desc->cookie_low); + LE32_TO_CPU(aq_desc->cookie_high), + LE32_TO_CPU(aq_desc->cookie_low)); i40e_debug(hw, mask, "\tparam (0,1) 0x%08X 0x%08X\n", - aq_desc->params.internal.param0, - aq_desc->params.internal.param1); + LE32_TO_CPU(aq_desc->params.internal.param0), + LE32_TO_CPU(aq_desc->params.internal.param1)); i40e_debug(hw, mask, "\taddr (h,l) 0x%08X 0x%08X\n", - aq_desc->params.external.addr_high, - aq_desc->params.external.addr_low); + LE32_TO_CPU(aq_desc->params.external.addr_high), + LE32_TO_CPU(aq_desc->params.external.addr_low)); if ((buffer != NULL) && (aq_desc->datalen != 0)) { - i40e_memset(data, 0, sizeof(data), I40E_NONDMA_MEM); i40e_debug(hw, mask, "AQ CMD Buffer:\n"); if (buf_len < len) len = buf_len; - for (i = 0; i < len; i++) { - data[((i % 16) / 4)] |= - ((u32)aq_buffer[i]) << (8 * (i % 4)); - if ((i % 16) == 15) { - i40e_debug(hw, mask, - "\t0x%04X %08X %08X %08X %08X\n", - i - 15, data[0], data[1], data[2], - data[3]); - i40e_memset(data, 0, sizeof(data), - I40E_NONDMA_MEM); - } + /* write the full 16-byte chunks */ + for (i = 0; i < (len - 16); i += 16) + i40e_debug(hw, mask, + "\t0x%04X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", + i, buf[i], buf[i+1], buf[i+2], buf[i+3], + buf[i+4], buf[i+5], buf[i+6], buf[i+7], + buf[i+8], buf[i+9], buf[i+10], buf[i+11], + buf[i+12], buf[i+13], buf[i+14], buf[i+15]); + /* write whatever's left over without overrunning the buffer */ + if (i < len) { + char d_buf[80]; + int j = 0; + + memset(d_buf, 0, sizeof(d_buf)); + j += sprintf(d_buf, "\t0x%04X ", i); + while (i < len) + j += sprintf(&d_buf[j], " %02X", buf[i++]); + i40e_debug(hw, mask, "%s\n", d_buf); } - if ((i % 16) != 0) - i40e_debug(hw, mask, "\t0x%04X %08X %08X %08X %08X\n", - i - (i % 16), data[0], data[1], data[2], - data[3]); } } @@ -546,6 +550,30 @@ struct i40e_rx_ptype_decoded i40e_ptype_ /** + * i40e_validate_mac_addr - Validate unicast MAC address + * @mac_addr: pointer to MAC address + * + * Tests a MAC address to ensure it is a valid Individual Address + **/ +enum i40e_status_code i40e_validate_mac_addr(u8 *mac_addr) +{ + enum i40e_status_code status = I40E_SUCCESS; + + DEBUGFUNC("i40e_validate_mac_addr"); + + /* Broadcast addresses ARE multicast addresses + * Make sure it is not a multicast address + * Reject the zero address + */ + if (I40E_IS_MULTICAST(mac_addr) || + (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && + mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)) + status = I40E_ERR_INVALID_MAC_ADDR; + + return status; +} + +/** * i40e_init_shared_code - Initialize the shared code * @hw: pointer to hardware structure * @@ -560,7 +588,7 @@ struct i40e_rx_ptype_decoded i40e_ptype_ enum i40e_status_code i40e_init_shared_code(struct i40e_hw *hw) { enum i40e_status_code status = I40E_SUCCESS; - u32 reg; + u32 port, ari, func_rid; DEBUGFUNC("i40e_init_shared_code"); @@ -575,18 +603,17 @@ enum i40e_status_code i40e_init_shared_c hw->phy.get_link_info = TRUE; - /* Determine port number */ - reg = rd32(hw, I40E_PFGEN_PORTNUM); - reg = ((reg & I40E_PFGEN_PORTNUM_PORT_NUM_MASK) >> - I40E_PFGEN_PORTNUM_PORT_NUM_SHIFT); - hw->port = (u8)reg; - - /* Determine the PF number based on the PCI fn */ - reg = rd32(hw, I40E_GLPCI_CAPSUP); - if (reg & I40E_GLPCI_CAPSUP_ARI_EN_MASK) - hw->pf_id = (u8)((hw->bus.device << 3) | hw->bus.func); + /* Determine port number and PF number*/ + port = (rd32(hw, I40E_PFGEN_PORTNUM) & I40E_PFGEN_PORTNUM_PORT_NUM_MASK) + >> I40E_PFGEN_PORTNUM_PORT_NUM_SHIFT; + hw->port = (u8)port; + ari = (rd32(hw, I40E_GLPCI_CAPSUP) & I40E_GLPCI_CAPSUP_ARI_EN_MASK) >> + I40E_GLPCI_CAPSUP_ARI_EN_SHIFT; + func_rid = rd32(hw, I40E_PF_FUNC_RID); + if (ari) + hw->pf_id = (u8)(func_rid & 0xff); else - hw->pf_id = (u8)hw->bus.func; + hw->pf_id = (u8)(func_rid & 0x7); status = i40e_init_nvm(hw); return status; @@ -728,25 +755,60 @@ void i40e_pre_tx_queue_cfg(struct i40e_h } /** - * i40e_validate_mac_addr - Validate unicast MAC address - * @mac_addr: pointer to MAC address + * i40e_read_pba_string - Reads part number string from EEPROM + * @hw: pointer to hardware structure + * @pba_num: stores the part number string from the EEPROM + * @pba_num_size: part number string buffer length * - * Tests a MAC address to ensure it is a valid Individual Address + * Reads the part number string from the EEPROM. **/ -enum i40e_status_code i40e_validate_mac_addr(u8 *mac_addr) +enum i40e_status_code i40e_read_pba_string(struct i40e_hw *hw, u8 *pba_num, + u32 pba_num_size) { enum i40e_status_code status = I40E_SUCCESS; + u16 pba_word = 0; + u16 pba_size = 0; + u16 pba_ptr = 0; + u16 i = 0; + + status = i40e_read_nvm_word(hw, I40E_SR_PBA_FLAGS, &pba_word); + if ((status != I40E_SUCCESS) || (pba_word != 0xFAFA)) { + DEBUGOUT("Failed to read PBA flags or flag is invalid.\n"); + return status; + } - DEBUGFUNC("i40e_validate_mac_addr"); + status = i40e_read_nvm_word(hw, I40E_SR_PBA_BLOCK_PTR, &pba_ptr); + if (status != I40E_SUCCESS) { + DEBUGOUT("Failed to read PBA Block pointer.\n"); + return status; + } - /* Broadcast addresses ARE multicast addresses - * Make sure it is not a multicast address - * Reject the zero address + status = i40e_read_nvm_word(hw, pba_ptr, &pba_size); + if (status != I40E_SUCCESS) { + DEBUGOUT("Failed to read PBA Block size.\n"); + return status; + } + + /* Subtract one to get PBA word count (PBA Size word is included in + * total size) */ - if (I40E_IS_MULTICAST(mac_addr) || - (mac_addr[0] == 0 && mac_addr[1] == 0 && mac_addr[2] == 0 && - mac_addr[3] == 0 && mac_addr[4] == 0 && mac_addr[5] == 0)) - status = I40E_ERR_INVALID_MAC_ADDR; + pba_size--; + if (pba_num_size < (((u32)pba_size * 2) + 1)) { + DEBUGOUT("Buffer to small for PBA data.\n"); + return I40E_ERR_PARAM; + } + + for (i = 0; i < pba_size; i++) { + status = i40e_read_nvm_word(hw, (pba_ptr + 1) + i, &pba_word); + if (status != I40E_SUCCESS) { + DEBUGOUT1("Failed to read PBA Block word %d.\n", i); + return status; + } + + pba_num[(i * 2)] = (pba_word >> 8) & 0xFF; + pba_num[(i * 2) + 1] = pba_word & 0xFF; + } + pba_num[(pba_size * 2)] = '\0'; return status; } @@ -799,7 +861,7 @@ static enum i40e_media_type i40e_get_med return media; } -#define I40E_PF_RESET_WAIT_COUNT 100 +#define I40E_PF_RESET_WAIT_COUNT 110 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure @@ -818,8 +880,9 @@ enum i40e_status_code i40e_pf_reset(stru * The grst delay value is in 100ms units, and we'll wait a * couple counts longer to be sure we don't just miss the end. */ - grst_del = rd32(hw, I40E_GLGEN_RSTCTL) & I40E_GLGEN_RSTCTL_GRSTDEL_MASK - >> I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; + grst_del = (rd32(hw, I40E_GLGEN_RSTCTL) & + I40E_GLGEN_RSTCTL_GRSTDEL_MASK) >> + I40E_GLGEN_RSTCTL_GRSTDEL_SHIFT; for (cnt = 0; cnt < grst_del + 2; cnt++) { reg = rd32(hw, I40E_GLGEN_RSTAT); if (!(reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK)) @@ -1010,8 +1073,11 @@ static u32 i40e_led_is_mine(struct i40e_ return gpio_val; } -#define I40E_LED0 22 +#define I40E_COMBINED_ACTIVITY 0xA +#define I40E_FILTER_ACTIVITY 0xE #define I40E_LINK_ACTIVITY 0xC +#define I40E_MAC_ACTIVITY 0xD +#define I40E_LED0 22 /** * i40e_led_get - return current on/off mode @@ -1024,6 +1090,7 @@ static u32 i40e_led_is_mine(struct i40e_ **/ u32 i40e_led_get(struct i40e_hw *hw) { + u32 current_mode = 0; u32 mode = 0; int i; @@ -1036,6 +1103,20 @@ u32 i40e_led_get(struct i40e_hw *hw) if (!gpio_val) continue; + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + switch (current_mode) { + case I40E_COMBINED_ACTIVITY: + case I40E_FILTER_ACTIVITY: + case I40E_MAC_ACTIVITY: + continue; + default: + break; + } + mode = (gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT; break; @@ -1055,6 +1136,7 @@ u32 i40e_led_get(struct i40e_hw *hw) **/ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink) { + u32 current_mode = 0; int i; if (mode & 0xfffffff0) @@ -1069,6 +1151,20 @@ void i40e_led_set(struct i40e_hw *hw, u3 if (!gpio_val) continue; + /* ignore gpio LED src mode entries related to the activity + * LEDs + */ + current_mode = ((gpio_val & I40E_GLGEN_GPIO_CTL_LED_MODE_MASK) + >> I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT); + switch (current_mode) { + case I40E_COMBINED_ACTIVITY: + case I40E_FILTER_ACTIVITY: + case I40E_MAC_ACTIVITY: + continue; + default: + break; + } + gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK; /* this & is a bit of paranoia, but serves as a range check */ gpio_val |= ((mode << I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT) & @@ -1077,8 +1173,10 @@ void i40e_led_set(struct i40e_hw *hw, u3 if (mode == I40E_LINK_ACTIVITY) blink = FALSE; - gpio_val |= (blink ? 1 : 0) << - I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT; + if (blink) + gpio_val |= (1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); + else + gpio_val &= ~(1 << I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT); wr32(hw, I40E_GLGEN_GPIO_CTL(i), gpio_val); break; @@ -1207,7 +1305,7 @@ enum i40e_status_code i40e_set_fc(struct return status; } - memset(&config, 0, sizeof(struct i40e_aq_set_phy_config)); + memset(&config, 0, sizeof(config)); /* clear the old pause settings */ config.abilities = abilities.abilities & ~(I40E_AQ_PHY_FLAG_PAUSE_TX) & ~(I40E_AQ_PHY_FLAG_PAUSE_RX); @@ -1230,14 +1328,14 @@ enum i40e_status_code i40e_set_fc(struct *aq_failures |= I40E_SET_FC_AQ_FAIL_SET; } /* Update the link info */ - status = i40e_update_link_info(hw, TRUE); + status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); if (status) { /* Wait a little bit (on 40G cards it sometimes takes a really * long time for link to come back from the atomic reset) * and try once more */ i40e_msec_delay(1000); - status = i40e_update_link_info(hw, TRUE); + status = i40e_aq_get_link_info(hw, TRUE, NULL, NULL); } if (status) *aq_failures |= I40E_SET_FC_AQ_FAIL_UPDATE; @@ -1375,7 +1473,7 @@ enum i40e_status_code i40e_aq_get_link_i /* save off old link status information */ i40e_memcpy(&hw->phy.link_info_old, hw_link_info, - sizeof(struct i40e_link_status), I40E_NONDMA_TO_NONDMA); + sizeof(*hw_link_info), I40E_NONDMA_TO_NONDMA); /* update link status */ hw_link_info->phy_type = (enum i40e_aq_phy_type)resp->phy_type; @@ -1412,7 +1510,7 @@ enum i40e_status_code i40e_aq_get_link_i /* save link status information */ if (link) - i40e_memcpy(link, hw_link_info, sizeof(struct i40e_link_status), + i40e_memcpy(link, hw_link_info, sizeof(*hw_link_info), I40E_NONDMA_TO_NONDMA); /* flag cleared so helper functions don't call AQ again */ @@ -1423,36 +1521,6 @@ aq_get_link_info_exit: } /** - * i40e_update_link_info - * @hw: pointer to the hw struct - * @enable_lse: enable/disable LinkStatusEvent reporting - * - * Returns the link status of the adapter - **/ -enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw, - bool enable_lse) -{ - struct i40e_aq_get_phy_abilities_resp abilities; - enum i40e_status_code status; - - status = i40e_aq_get_link_info(hw, enable_lse, NULL, NULL); - if (status) - return status; - - status = i40e_aq_get_phy_capabilities(hw, FALSE, false, - &abilities, NULL); - if (status) - return status; - - if (abilities.abilities & I40E_AQ_PHY_AN_ENABLED) - hw->phy.link_info.an_enabled = TRUE; - else - hw->phy.link_info.an_enabled = FALSE; - - return status; -} - -/** * i40e_aq_set_phy_int_mask * @hw: pointer to the hw struct * @mask: interrupt mask to be set @@ -1904,6 +1972,7 @@ enum i40e_status_code i40e_aq_get_switch * @hw: pointer to the hw struct * @fw_major_version: firmware major version * @fw_minor_version: firmware minor version + * @fw_build: firmware build number * @api_major_version: major queue version * @api_minor_version: minor queue version * @cmd_details: pointer to command details structure or NULL @@ -1912,6 +1981,7 @@ enum i40e_status_code i40e_aq_get_switch **/ enum i40e_status_code i40e_aq_get_firmware_version(struct i40e_hw *hw, u16 *fw_major_version, u16 *fw_minor_version, + u32 *fw_build, u16 *api_major_version, u16 *api_minor_version, struct i40e_asq_cmd_details *cmd_details) { @@ -1929,6 +1999,8 @@ enum i40e_status_code i40e_aq_get_firmwa *fw_major_version = LE16_TO_CPU(resp->fw_major); if (fw_minor_version != NULL) *fw_minor_version = LE16_TO_CPU(resp->fw_minor); + if (fw_build != NULL) + *fw_build = LE32_TO_CPU(resp->fw_build); if (api_major_version != NULL) *api_major_version = LE16_TO_CPU(resp->api_major); if (api_minor_version != NULL) @@ -1969,7 +2041,7 @@ enum i40e_status_code i40e_aq_send_drive i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_driver_version); - desc.flags |= CPU_TO_LE16(I40E_AQ_FLAG_SI); + desc.flags |= CPU_TO_LE16(I40E_AQ_FLAG_BUF | I40E_AQ_FLAG_RD); cmd->driver_major_ver = dv->major_version; cmd->driver_minor_ver = dv->minor_version; cmd->driver_build_ver = dv->build_version; @@ -2173,7 +2245,7 @@ enum i40e_status_code i40e_aq_add_macvla if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_macvlan_element_data); + buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_macvlan); @@ -2215,7 +2287,7 @@ enum i40e_status_code i40e_aq_remove_mac if (count == 0 || !mv_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_remove_macvlan_element_data); + buf_size = count * sizeof(*mv_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan); @@ -2255,7 +2327,7 @@ enum i40e_status_code i40e_aq_add_vlan(s if (count == 0 || !v_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_remove_vlan_element_data); + buf_size = count * sizeof(*v_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_add_vlan); @@ -2295,7 +2367,7 @@ enum i40e_status_code i40e_aq_remove_vla if (count == 0 || !v_list || !hw) return I40E_ERR_PARAM; - buf_size = count * sizeof(struct i40e_aqc_add_remove_vlan_element_data); + buf_size = count * sizeof(*v_list); /* prep the rest of the request */ i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_vlan); @@ -2353,6 +2425,41 @@ enum i40e_status_code i40e_aq_send_msg_t } /** + * i40e_aq_debug_read_register *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 18:43:36 2015 Return-Path: Delivered-To: svn-src-head@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 7FCC26DD; Mon, 12 Jan 2015 18:43: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 6AD2F892; Mon, 12 Jan 2015 18:43: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 t0CIhaMB067583; Mon, 12 Jan 2015 18:43:36 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CIhYnW067569; Mon, 12 Jan 2015 18:43:34 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501121843.t0CIhYnW067569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 12 Jan 2015 18:43:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:43:36 -0000 Author: jfv Date: Mon Jan 12 18:43:34 2015 New Revision: 277084 URL: https://svnweb.freebsd.org/changeset/base/277084 Log: Intel I40E driver updates: if_ixl to version 1.3.0, if_ixlv to version 1.2.0 - Major change in both drivers is to add RSS support - In ixl fix some interface speed related issues, dual speed was not changing correctly, KR/X media was not displaying correctly (this has a workaround until a more robust media handling is in place) - Add a warning when using Dell NPAR and the speed is less than 10G - Wrap a queue hung message in IXL_DEBUG, as it is non-fatal, and without tuning can display excessively MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl.h head/sys/dev/ixl/ixl_txrx.c head/sys/modules/ixl/Makefile head/sys/modules/ixlv/Makefile Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/if_ixl.c Mon Jan 12 18:43:34 2015 (r277084) @@ -34,13 +34,14 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" #include "ixl_pf.h" /********************************************************************* * Driver version *********************************************************************/ -char ixl_driver_version[] = "1.2.8"; +char ixl_driver_version[] = "1.3.0"; /********************************************************************* * PCI Device ID Table @@ -174,7 +175,7 @@ static void ixl_stat_update48(struct i40 static void ixl_stat_update32(struct i40e_hw *, u32, bool, u64 *, u64 *); -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_phy_abilities(SYSCTL_HANDLER_ARGS); static int ixl_sysctl_sw_filter_list(SYSCTL_HANDLER_ARGS); @@ -427,7 +428,7 @@ ixl_attach(device_t dev) OID_AUTO, "dynamic_tx_itr", CTLFLAG_RW, &ixl_dynamic_tx_itr, 0, "Dynamic TX ITR"); -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, "link_status", CTLTYPE_STRING | CTLFLAG_RD, @@ -662,8 +663,9 @@ ixl_attach(device_t dev) /* Reset port's advertised speeds */ if (!i40e_is_40G_device(hw->device_id)) { - pf->advertised_speed = 0x7; - ixl_set_advertised_speeds(pf, 0x7); + pf->advertised_speed = + (hw->device_id == I40E_DEV_ID_10G_BASE_T) ? 0x7 : 0x6; + ixl_set_advertised_speeds(pf, pf->advertised_speed); } /* Register for VLAN events */ @@ -1407,6 +1409,12 @@ ixl_media_status(struct ifnet * ifp, str case I40E_PHY_TYPE_10GBASE_SFPP_CU: ifmr->ifm_active |= IFM_10G_TWINAX; break; + case I40E_PHY_TYPE_10GBASE_KR: + /* + ** this is not technically correct + ** but FreeBSD does not have the media + ** type defined yet, so its a compromise. + */ case I40E_PHY_TYPE_10GBASE_SR: ifmr->ifm_active |= IFM_10G_SR; break; @@ -1721,8 +1729,10 @@ ixl_local_timer(void *arg) vsi->active_queues |= ((u64)1 << que->me); } if (que->busy >= IXL_MAX_TX_BUSY) { +#ifdef IXL_DEBUG device_printf(dev,"Warning queue %d " "appears to be hung!\n", i); +#endif que->busy = IXL_QUEUE_HUNG; ++hung; } @@ -1765,6 +1775,15 @@ ixl_update_link_status(struct ixl_pf *pf "Full Duplex", ixl_fc_string[fc]); } vsi->link_active = TRUE; + /* + ** Warn user if link speed on NPAR enabled + ** partition is not at least 10GB + */ + if (hw->func_caps.npar_enable && + (hw->phy.link_info.link_speed == I40E_LINK_SPEED_1GB || + hw->phy.link_info.link_speed == I40E_LINK_SPEED_100MB)) + device_printf(dev, "The partition detected link" + "speed that is less than 10Gbps\n"); if_link_state_change(ifp, LINK_STATE_UP); } } else { /* Link down */ @@ -1901,6 +1920,7 @@ ixl_assign_vsi_msix(struct ixl_pf *pf) /* Now set up the stations */ for (int i = 0; i < vsi->num_queues; i++, vector++, que++) { + int cpu_id = i; rid = vector + 1; txr = &que->txr; que->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -1921,14 +1941,23 @@ ixl_assign_vsi_msix(struct ixl_pf *pf) } bus_describe_intr(dev, que->res, que->tag, "q%d", i); /* Bind the vector to a CPU */ - bus_bind_intr(dev, que->res, i); +#ifdef RSS + cpu_id = rss_getcpu(i % rss_getnumbuckets()); +#endif + bus_bind_intr(dev, que->res, cpu_id); que->msix = vector; TASK_INIT(&que->tx_task, 0, ixl_deferred_mq_start, que); TASK_INIT(&que->task, 0, ixl_handle_que, que); que->tq = taskqueue_create_fast("ixl_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); - taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que", - device_get_nameunit(pf->dev)); +#ifdef RSS + taskqueue_start_threads_pinned(&que->tq, 1, PI_NET, + cpu_id, "%s (bucket %d)", + device_get_nameunit(dev), cpu_id); +#else + taskqueue_start_threads(&que->tq, 1, PI_NET, + "%s que", device_get_nameunit(dev)); +#endif } return (0); @@ -1995,6 +2024,12 @@ ixl_init_msix(struct ixl_pf *pf) if ((ixl_max_queues != 0) && (ixl_max_queues <= queues)) queues = ixl_max_queues; +#ifdef RSS + /* If we're doing RSS, clamp at the number of RSS buckets */ + if (queues > rss_getnumbuckets()) + queues = rss_getnumbuckets(); +#endif + /* ** Want one vector (RX/TX pair) per queue ** plus an additional for the admin queue. @@ -2015,6 +2050,25 @@ ixl_init_msix(struct ixl_pf *pf) "Using MSIX interrupts with %d vectors\n", vectors); pf->msix = vectors; pf->vsi.num_queues = queues; +#ifdef RSS + /* + * If we're doing RSS, the number of queues needs to + * match the number of RSS buckets that are configured. + * + * + If there's more queues than RSS buckets, we'll end + * up with queues that get no traffic. + * + * + If there's more RSS buckets than queues, we'll end + * up having multiple RSS buckets map to the same queue, + * so there'll be some contention. + */ + if (queues != rss_getnumbuckets()) { + device_printf(dev, + "%s: queues (%d) != RSS buckets (%d)" + "; performance will be impacted.\n", + __func__, queues, rss_getnumbuckets()); + } +#endif return (vectors); } msi: @@ -2383,7 +2437,8 @@ ixl_setup_interface(device_t dev, struct if (aq_error == I40E_ERR_UNKNOWN_PHY) { /* Need delay to detect fiber correctly */ i40e_msec_delay(200); - aq_error = i40e_aq_get_phy_capabilities(hw, FALSE, TRUE, &abilities_resp, NULL); + aq_error = i40e_aq_get_phy_capabilities(hw, FALSE, + TRUE, &abilities_resp, NULL); if (aq_error == I40E_ERR_UNKNOWN_PHY) device_printf(dev, "Unknown PHY type detected!\n"); else @@ -3043,7 +3098,6 @@ ixl_add_sysctls_eth_stats(struct sysctl_ "Multicast Packets Transmitted"}, {ð_stats->tx_broadcast, "bcast_pkts_txd", "Broadcast Packets Transmitted"}, - {ð_stats->tx_discards, "tx_discards", "Discarded TX packets"}, // end {0,0,0} }; @@ -3126,19 +3180,45 @@ static void ixl_config_rss(struct ixl_vs struct ixl_pf *pf = (struct ixl_pf *)vsi->back; struct i40e_hw *hw = vsi->hw; u32 lut = 0; - u64 set_hena, hena; - int i, j; + u64 set_hena = 0, hena; + int i, j, que_id; +#ifdef RSS + u32 rss_hash_config; + u32 rss_seed[IXL_KEYSZ]; +#else + u32 rss_seed[IXL_KEYSZ] = {0x41b01687, + 0x183cfd8c, 0xce880440, 0x580cbc3c, + 0x35897377, 0x328b25e1, 0x4fa98922, + 0xb7d90c14, 0xd5bad70d, 0xcd15a2c1}; +#endif - static const u32 seed[I40E_PFQF_HKEY_MAX_INDEX + 1] = {0x41b01687, - 0x183cfd8c, 0xce880440, 0x580cbc3c, 0x35897377, - 0x328b25e1, 0x4fa98922, 0xb7d90c14, 0xd5bad70d, - 0xcd15a2c1, 0xe8580225, 0x4a1e9d11, 0xfe5731be}; +#ifdef RSS + /* Fetch the configured RSS key */ + rss_getkey((uint8_t *) &rss_seed); +#endif /* Fill out hash function seed */ - for (i = 0; i <= I40E_PFQF_HKEY_MAX_INDEX; i++) - wr32(hw, I40E_PFQF_HKEY(i), seed[i]); + for (i = 0; i < IXL_KEYSZ; i++) + wr32(hw, I40E_PFQF_HKEY(i), rss_seed[i]); /* Enable PCTYPES for RSS: */ +#ifdef RSS + rss_hash_config = rss_gethashconfig(); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) + set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; +#else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | @@ -3151,7 +3231,7 @@ static void ixl_config_rss(struct ixl_vs ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6) | ((u64)1 << I40E_FILTER_PCTYPE_L2_PAYLOAD); - +#endif hena = (u64)rd32(hw, I40E_PFQF_HENA(0)) | ((u64)rd32(hw, I40E_PFQF_HENA(1)) << 32); hena |= set_hena; @@ -3162,8 +3242,19 @@ static void ixl_config_rss(struct ixl_vs for (i = j = 0; i < pf->hw.func_caps.rss_table_size; i++, j++) { if (j == vsi->num_queues) j = 0; +#ifdef RSS + /* + * Fetch the RSS bucket id for the given indirection entry. + * Cap it at the number of configured buckets (which is + * num_queues.) + */ + que_id = rss_get_indirection_to_bucket(i); + que_id = que_id % adapter->num_queues; +#else + que_id = j; +#endif /* lut = 4-byte sliding window of 4 lut entries */ - lut = (lut << 8) | (j & + lut = (lut << 8) | (que_id & ((0x1 << pf->hw.func_caps.rss_table_entry_width) - 1)); /* On i = 3, we have 4 entries in lut; write to the register */ if ((i & 3) == 3) @@ -3401,7 +3492,7 @@ ixl_add_hw_filters(struct ixl_vsi *vsi, a = malloc(sizeof(struct i40e_aqc_add_macvlan_element_data) * cnt, M_DEVBUF, M_NOWAIT | M_ZERO); if (a == NULL) { - device_printf(dev, "add hw filter failed to get memory\n"); + device_printf(dev, "add_hw_filters failed to get memory\n"); return; } @@ -3426,8 +3517,8 @@ ixl_add_hw_filters(struct ixl_vsi *vsi, if (j > 0) { err = i40e_aq_add_macvlan(hw, vsi->seid, a, j, NULL); if (err) - device_printf(dev, "aq_add_macvlan failure %d\n", - hw->aq.asq_last_status); + device_printf(dev, "aq_add_macvlan err %d, aq_error %d\n", + err, hw->aq.asq_last_status); else vsi->hw_filters_add += j; } @@ -3476,6 +3567,7 @@ ixl_del_hw_filters(struct ixl_vsi *vsi, err = i40e_aq_remove_macvlan(hw, vsi->seid, d, j, NULL); /* NOTE: returns ENOENT every time but seems to work fine, so we'll ignore that specific error. */ + // TODO: Does this still occur on current firmwares? if (err && hw->aq.asq_last_status != I40E_AQ_RC_ENOENT) { int sc = 0; for (int i = 0; i < j; i++) @@ -3828,29 +3920,6 @@ ixl_update_stats_counters(struct ixl_pf pf->stat_offsets_loaded, &osd->link_xoff_tx, &nsd->link_xoff_tx); - /* Priority flow control stats */ -#if 0 - for (int i = 0; i < 8; i++) { - ixl_stat_update32(hw, I40E_GLPRT_PXONRXC(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xon_rx[i], - &nsd->priority_xon_rx[i]); - ixl_stat_update32(hw, I40E_GLPRT_PXONTXC(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xon_tx[i], - &nsd->priority_xon_tx[i]); - ixl_stat_update32(hw, I40E_GLPRT_PXOFFTXC(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xoff_tx[i], - &nsd->priority_xoff_tx[i]); - ixl_stat_update32(hw, - I40E_GLPRT_RXON2OFFCNT(hw->port, i), - pf->stat_offsets_loaded, - &osd->priority_xon_2_xoff[i], - &nsd->priority_xon_2_xoff[i]); - } -#endif - /* Packet size stats rx */ ixl_stat_update48(hw, I40E_GLPRT_PRC64H(hw->port), I40E_GLPRT_PRC64L(hw->port), @@ -4377,6 +4446,15 @@ ixl_set_advertised_speeds(struct ixl_pf return (EAGAIN); } + /* + ** This seems a bit heavy handed, but we + ** need to get a reinit on some devices + */ + IXL_PF_LOCK(pf); + ixl_stop(pf); + ixl_init_locked(pf); + IXL_PF_UNLOCK(pf); + return (0); } @@ -4521,7 +4599,7 @@ ixl_sysctl_show_fw(SYSCTL_HANDLER_ARGS) } -#ifdef IXL_DEBUG +#ifdef IXL_DEBUG_SYSCTL static int ixl_sysctl_link_status(SYSCTL_HANDLER_ARGS) { @@ -4630,6 +4708,16 @@ ixl_sysctl_sw_filter_list(SYSCTL_HANDLER #define IXL_SW_RES_SIZE 0x14 static int +ixl_res_alloc_cmp(const void *a, const void *b) +{ + const struct i40e_aqc_switch_resource_alloc_element_resp *one, *two; + one = (struct i40e_aqc_switch_resource_alloc_element_resp *)a; + two = (struct i40e_aqc_switch_resource_alloc_element_resp *)b; + + return ((int)one->resource_type - (int)two->resource_type); +} + +static int ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_ARGS) { struct ixl_pf *pf = (struct ixl_pf *)arg1; @@ -4647,6 +4735,7 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A return (ENOMEM); } + bzero(resp, sizeof(resp)); error = i40e_aq_get_switch_resource_alloc(hw, &num_entries, resp, IXL_SW_RES_SIZE, @@ -4657,9 +4746,14 @@ ixl_sysctl_hw_res_alloc(SYSCTL_HANDLER_A sbuf_delete(buf); return error; } - device_printf(dev, "Num_entries: %d\n", num_entries); + + /* Sort entries by type for display */ + qsort(resp, num_entries, + sizeof(struct i40e_aqc_switch_resource_alloc_element_resp), + &ixl_res_alloc_cmp); sbuf_cat(buf, "\n"); + sbuf_printf(buf, "# of entries: %d\n", num_entries); sbuf_printf(buf, "Type | Guaranteed | Total | Used | Un-allocated\n" " | (this) | (all) | (this) | (all) \n"); @@ -4864,5 +4958,5 @@ ixl_sysctl_dump_txd(SYSCTL_HANDLER_ARGS) sbuf_delete(buf); return error; } -#endif +#endif /* IXL_DEBUG_SYSCTL */ Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/if_ixlv.c Mon Jan 12 18:43:34 2015 (r277084) @@ -34,13 +34,14 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" #include "ixlv.h" /********************************************************************* * Driver version *********************************************************************/ -char ixlv_driver_version[] = "1.1.18"; +char ixlv_driver_version[] = "1.2.0"; /********************************************************************* * PCI Device ID Table @@ -1161,7 +1162,11 @@ ixlv_init_msix(struct ixlv_sc *sc) /* Override with hardcoded value if sane */ if ((ixlv_max_queues != 0) && (ixlv_max_queues <= queues)) queues = ixlv_max_queues; - +#ifdef RSS + /* If we're doing RSS, clamp at the number of RSS buckets */ + if (queues > rss_getnumbuckets()) + queues = rss_getnumbuckets(); +#endif /* Enforce the VF max value */ if (queues > IXLV_MAX_QUEUES) queues = IXLV_MAX_QUEUES; @@ -1181,6 +1186,26 @@ ixlv_init_msix(struct ixlv_sc *sc) goto fail; } +#ifdef RSS + /* + * If we're doing RSS, the number of queues needs to + * match the number of RSS buckets that are configured. + * + * + If there's more queues than RSS buckets, we'll end + * up with queues that get no traffic. + * + * + If there's more RSS buckets than queues, we'll end + * up having multiple RSS buckets map to the same queue, + * so there'll be some contention. + */ + if (queues != rss_getnumbuckets()) { + device_printf(dev, + "%s: queues (%d) != RSS buckets (%d)" + "; performance will be impacted.\n", + __func__, queues, rss_getnumbuckets()); + } +#endif + if (pci_alloc_msix(dev, &vectors) == 0) { device_printf(sc->dev, "Using MSIX interrupts with %d vectors\n", vectors); @@ -1352,6 +1377,7 @@ ixlv_assign_msix(struct ixlv_sc *sc) int error, rid, vector = 1; for (int i = 0; i < vsi->num_queues; i++, vector++, que++) { + int cpu_id = i; rid = vector + 1; txr = &que->txr; que->res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, @@ -1372,15 +1398,25 @@ ixlv_assign_msix(struct ixlv_sc *sc) } bus_describe_intr(dev, que->res, que->tag, "que %d", i); /* Bind the vector to a CPU */ - bus_bind_intr(dev, que->res, i); +#ifdef RSS + cpu_id = rss_getcpu(i % rss_getnumbuckets()); +#endif + bus_bind_intr(dev, que->res, cpu_id); que->msix = vector; vsi->que_mask |= (u64)(1 << que->msix); TASK_INIT(&que->tx_task, 0, ixl_deferred_mq_start, que); TASK_INIT(&que->task, 0, ixlv_handle_que, que); que->tq = taskqueue_create_fast("ixlv_que", M_NOWAIT, taskqueue_thread_enqueue, &que->tq); - taskqueue_start_threads(&que->tq, 1, PI_NET, "%s que", - device_get_nameunit(sc->dev)); +#ifdef RSS + taskqueue_start_threads_pinned(&que->tq, 1, PI_NET, + cpu_id, "%s (bucket %d)", + device_get_nameunit(dev), cpu_id); +#else + taskqueue_start_threads(&que->tq, 1, PI_NET, + "%s que", device_get_nameunit(dev)); +#endif + } return (0); @@ -2521,16 +2557,18 @@ ixlv_config_rss(struct ixlv_sc *sc) struct i40e_hw *hw = &sc->hw; struct ixl_vsi *vsi = &sc->vsi; u32 lut = 0; - u64 set_hena, hena; - int i, j; - - /* set up random bits */ - static const u32 seed[I40E_VFQF_HKEY_MAX_INDEX + 1] = { - 0x794221b4, 0xbca0c5ab, 0x6cd5ebd9, 0x1ada6127, - 0x983b3aa1, 0x1c4e71eb, 0x7f6328b2, 0xfcdc0da0, - 0xc135cafa, 0x7a6f7e2d, 0xe7102d28, 0x163cd12e, - 0x4954b126 }; - + u64 set_hena = 0, hena; + int i, j, que_id; +#ifdef RSS + u32 rss_hash_config; + u32 rss_seed[IXL_KEYSZ]; +#else + u32 rss_seed[IXL_KEYSZ] = {0x41b01687, + 0x183cfd8c, 0xce880440, 0x580cbc3c, + 0x35897377, 0x328b25e1, 0x4fa98922, + 0xb7d90c14, 0xd5bad70d, 0xcd15a2c1}; +#endif + /* Don't set up RSS if using a single queue */ if (vsi->num_queues == 1) { wr32(hw, I40E_VFQF_HENA(0), 0); @@ -2539,11 +2577,32 @@ ixlv_config_rss(struct ixlv_sc *sc) return; } +#ifdef RSS + /* Fetch the configured RSS key */ + rss_getkey((uint8_t *) &rss_seed); +#endif /* Fill out hash function seed */ - for (i = 0; i <= I40E_VFQF_HKEY_MAX_INDEX; i++) - wr32(hw, I40E_VFQF_HKEY(i), seed[i]); + for (i = 0; i <= IXL_KEYSZ; i++) + wr32(hw, I40E_VFQF_HKEY(i), rss_seed[i]); /* Enable PCTYPES for RSS: */ +#ifdef RSS + rss_hash_config = rss_gethashconfig(); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV4) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); + if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) + set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; +#else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_TCP) | @@ -2556,7 +2615,7 @@ ixlv_config_rss(struct ixlv_sc *sc) ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6) | ((u64)1 << I40E_FILTER_PCTYPE_L2_PAYLOAD); - +#endif hena = (u64)rd32(hw, I40E_VFQF_HENA(0)) | ((u64)rd32(hw, I40E_VFQF_HENA(1)) << 32); hena |= set_hena; @@ -2564,16 +2623,26 @@ ixlv_config_rss(struct ixlv_sc *sc) wr32(hw, I40E_VFQF_HENA(1), (u32)(hena >> 32)); /* Populate the LUT with max no. of queues in round robin fashion */ - for (i = 0, j = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; j++) { + for (i = 0, j = 0; i <= I40E_VFQF_HLUT_MAX_INDEX; i++, j++) { if (j == vsi->num_queues) j = 0; +#ifdef RSS + /* + * Fetch the RSS bucket id for the given indirection entry. + * Cap it at the number of configured buckets (which is + * num_queues.) + */ + que_id = rss_get_indirection_to_bucket(i); + que_id = que_id % adapter->num_queues; +#else + que_id = j; +#endif /* lut = 4-byte sliding window of 4 lut entries */ - lut = (lut << 8) | (j & 0xF); + lut = (lut << 8) | (que_id & 0xF); /* On i = 3, we have 4 entries in lut; write to the register */ - if ((j & 3) == 3) { + if ((i & 3) == 3) { wr32(hw, I40E_VFQF_HLUT(i), lut); DDPRINTF(sc->dev, "HLUT(%2d): %#010x", i, lut); - i++; } } ixl_flush(hw); Modified: head/sys/dev/ixl/ixl.h ============================================================================== --- head/sys/dev/ixl/ixl.h Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/ixl.h Mon Jan 12 18:43:34 2015 (r277084) @@ -93,7 +93,7 @@ #include "i40e_type.h" #include "i40e_prototype.h" -#ifdef IXL_DEBUG +#if defined(IXL_DEBUG) || defined(IXL_DEBUG_SYSCTL) #include #define MAC_FORMAT "%02x:%02x:%02x:%02x:%02x:%02x" @@ -101,7 +101,13 @@ (mac_addr)[0], (mac_addr)[1], (mac_addr)[2], (mac_addr)[3], \ (mac_addr)[4], (mac_addr)[5] #define ON_OFF_STR(is_set) ((is_set) ? "On" : "Off") +#endif /* IXL_DEBUG || IXL_DEBUG_SYSCTL */ +#ifdef IXL_DEBUG +/* Enable debug sysctls */ +#ifndef IXL_DEBUG_SYSCTL +#define IXL_DEBUG_SYSCTL 1 +#endif #define _DBG_PRINTF(S, ...) printf("%s: " S "\n", __func__, ##__VA_ARGS__) #define _DEV_DBG_PRINTF(dev, S, ...) device_printf(dev, "%s: " S "\n", __func__, ##__VA_ARGS__) @@ -128,7 +134,7 @@ #define HW_DEBUGOUT(...) if (DEBUG_HW) _DBG_PRINTF(__VA_ARGS__) -#else +#else /* no IXL_DEBUG */ #define DEBUG_INIT 0 #define DEBUG_IOCTL 0 #define DEBUG_HW 0 @@ -144,7 +150,7 @@ #define IOCTL_DBG_IF2(...) #define IOCTL_DBG_IF(...) #define HW_DEBUGOUT(...) -#endif +#endif /* IXL_DEBUG */ /* Tunables */ @@ -214,6 +220,7 @@ #define IXL_MAX_TSO_SEGS 66 #define IXL_SPARSE_CHAIN 6 #define IXL_QUEUE_HUNG 0x80000000 +#define IXL_KEYSZ 10 /* ERJ: hardware can support ~1.5k filters between all functions */ #define IXL_MAX_FILTERS 256 Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:43:34 2015 (r277084) @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m struct tx_ring *txr; int err, i; - /* check if flowid is set */ - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) + /* Which queue to use */ + if ((m->m_flags & M_FLOWID) != 0) i = m->m_pkthdr.flowid % vsi->num_queues; else i = curcpu % vsi->num_queues; @@ -1089,8 +1089,8 @@ int ixl_init_rx_ring(struct ixl_queue *que) { struct rx_ring *rxr = &que->rxr; - struct ixl_vsi *vsi = que->vsi; #if defined(INET6) || defined(INET) + struct ixl_vsi *vsi = que->vsi; struct ifnet *ifp = vsi->ifp; struct lro_ctrl *lro = &rxr->lro; #endif @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); sendmp->m_pkthdr.flowid = que->msix; - M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); + sendmp->m_flags |= M_FLOWID; } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, Modified: head/sys/modules/ixl/Makefile ============================================================================== --- head/sys/modules/ixl/Makefile Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/modules/ixl/Makefile Mon Jan 12 18:43:34 2015 (r277084) @@ -4,7 +4,7 @@ KMOD = if_ixl SRCS = device_if.h bus_if.h pci_if.h opt_bdg.h -SRCS += opt_inet.h opt_inet6.h +SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS += if_ixl.c ixl_txrx.c i40e_osdep.c # Shared source Modified: head/sys/modules/ixlv/Makefile ============================================================================== --- head/sys/modules/ixlv/Makefile Mon Jan 12 18:38:09 2015 (r277083) +++ head/sys/modules/ixlv/Makefile Mon Jan 12 18:43:34 2015 (r277084) @@ -4,7 +4,7 @@ KMOD = if_ixlv SRCS = device_if.h bus_if.h pci_if.h opt_bdg.h -SRCS += opt_inet.h opt_inet6.h +SRCS += opt_inet.h opt_inet6.h opt_rss.h SRCS += if_ixlv.c ixlvc.c ixl_txrx.c i40e_osdep.c # Shared source From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 18:55:37 2015 Return-Path: Delivered-To: svn-src-head@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 08C0F8D2; Mon, 12 Jan 2015 18:55:37 +0000 (UTC) Received: from mail-lb0-x229.google.com (mail-lb0-x229.google.com [IPv6:2a00:1450:4010:c04::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79EEFAC9; Mon, 12 Jan 2015 18:55:36 +0000 (UTC) Received: by mail-lb0-f169.google.com with SMTP id p9so19197517lbv.0; Mon, 12 Jan 2015 10:55:34 -0800 (PST) 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=L8EsyhAUcwsl0LT7IFPkQSCsaW3YrECIQXh2fjayj3s=; b=xn8HD5dNLe2KdToop531+PfygLkV2qhB3YWp+F8mzNSfXt6Ce3LtWywRm9WAxfZh/W Snwtm/d9npirDjMGbolu2Hd8twaokRmZni3fMOWcplRg+QIqx4hh2snI5pCRMghi8rGv zXGTFd+he+fKUIY/J2S6pDSwhrvk8G9y9jI8TtL/4B7nhCfYp88e9lLTBwKFkjvc2/DX vfAVNAlOP6qvFemU6faDkDKLU7uM09ISNtl+oWGQcIwfjg2eTiE2jAQ6HzMt2zZSgeVc r5Y++5COldRgb1UIn5t+D0Mq1cWDJFcJ9GfjTpYwaBmRLN7e/wrJj0aq1m91ymuuuhTj OuSA== MIME-Version: 1.0 X-Received: by 10.152.23.98 with SMTP id l2mr37971903laf.46.1421088934676; Mon, 12 Jan 2015 10:55:34 -0800 (PST) Sender: crodr001@gmail.com Received: by 10.112.141.5 with HTTP; Mon, 12 Jan 2015 10:55:34 -0800 (PST) In-Reply-To: <201501121843.t0CIhYnW067569@svn.freebsd.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> Date: Mon, 12 Jan 2015 10:55:34 -0800 X-Google-Sender-Auth: a_O_7zRYAS402xxfhiCuneABfdg Message-ID: Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv From: Craig Rodrigues To: Jack F Vogel Content-Type: text/plain; charset=ISO-8859-1 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:55:37 -0000 On Mon, Jan 12, 2015 at 10:43 AM, Jack F Vogel wrote: > Author: jfv > Date: Mon Jan 12 18:43:34 2015 > New Revision: 277084 > URL: https://svnweb.freebsd.org/changeset/base/277084 > > Log: > Intel I40E driver updates: > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > In future please set the Relnotes: flag in your commit log message for this type of commit so that Release Engineering can properly keep track of this type of commit for the release notes. This was added in the past year, see: https://www.freebsd.org/doc/en/articles/committers-guide/commit-log-message.html -- Craig From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 18:58:49 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B59B7AF7; Mon, 12 Jan 2015 18:58:48 +0000 (UTC) Date: Mon, 12 Jan 2015 18:58:42 +0000 From: Glen Barber To: Craig Rodrigues Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv Message-ID: <20150112185842.GR1400@hub.FreeBSD.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Uw+RRa3pmtkgiNaD" Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Jack F Vogel , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 18:58:49 -0000 --Uw+RRa3pmtkgiNaD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 12, 2015 at 10:55:34AM -0800, Craig Rodrigues wrote: > On Mon, Jan 12, 2015 at 10:43 AM, Jack F Vogel wrote: >=20 > > Author: jfv > > Date: Mon Jan 12 18:43:34 2015 > > New Revision: 277084 > > URL: https://svnweb.freebsd.org/changeset/base/277084 > > > > Log: > > Intel I40E driver updates: > > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > > >=20 > In future please set the Relnotes: flag in your commit log message for th= is > type of commit so that Release Engineering can > properly keep track of this type of commit for the release notes. This w= as > added in the past year, see: > https://www.freebsd.org/doc/en/articles/committers-guide/commit-log-messa= ge.html >=20 FWIW, we need a manual page for ixl(4) and ixlv(4) before it can be added to the release notes page. (I've already emailed Jack about this privately, following one of his recent commits.) Glen --Uw+RRa3pmtkgiNaD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUtBliAAoJEAMUWKVHj+KTLegP/2bro9rk6HSKpZyvwLAMQjYv OOnJOR894CtGmL1Do6uQJKi1eMBSmm6R3pviRdug8p9l8xN8VJMvY4C5ymtzpr3x X7F42iX5DvweQ59scNXHOvxeA9tCZDVPwwTuRBR0Fr03WWsLqjEa6E18jneQ/y+m Yd2sEsvTyz53Fd7QM1mZpGd4rzlvDBy2MCz0bgjeAZ5Hn7Q1gcIIw2wCgUY3G5xP D7C7jpolnXiDRn+3m1Y9eaMHsEetzxaSQO0yXyi7bUwx7QBWkZzswm2YV8CbDfAz 7jkFEHBgmHmxnAKuBaTWHiY611Q/CpevwbXjGZyPR95SyNHX9DZ0IDUCLAU2Wpve 6RlCEgLqSM48pjWtGg3BqnWSEU5WBP5UuWM2+OSMC/fMKTfgQWGjEbn27xpfOB2i Wu9TK+M7xKcooZ47nyXjQHr3X4Iw8ul++Z+9ZRym8aO8R6yiUE04be+cgYrFns2k vA+MWuYxOmMbea5p3izL7paMWmFlLZ7M9o8UGiECFTZQq3zkOJHOjMSahEPoAWld /tGSe3OKoQrKosXUp2XMk/VYmRYoyKqYiH21cCLvMrOb6Qc2d+aNsK9csc4Nvhxq mAWDqbH+sQ8KvQbl5niQzgpbxRW2CBOSadJ3boDbLEJZtMv7k/LON2MjvlehuRcY ze8KjzL+jV71lMkwju/x =l5kH -----END PGP SIGNATURE----- --Uw+RRa3pmtkgiNaD-- From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 19:26:32 2015 Return-Path: Delivered-To: svn-src-head@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 915E3CF0; Mon, 12 Jan 2015 19:26: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 7D81BEE7; Mon, 12 Jan 2015 19:26: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 t0CJQW2h087538; Mon, 12 Jan 2015 19:26:32 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CJQWHI087537; Mon, 12 Jan 2015 19:26:32 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501121926.t0CJQWHI087537@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 12 Jan 2015 19:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277085 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 19:26:32 -0000 Author: brueffer Date: Mon Jan 12 19:26:31 2015 New Revision: 277085 URL: https://svnweb.freebsd.org/changeset/base/277085 Log: Fix a typo in the FFS maxbpg option, it was erroneously spelled maxbpf. The error exists in the NetBSD upstream version as well and will be reported back. PR: 196598 Submitted by: Dan McGregor MFC after: 1 week Modified: head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Mon Jan 12 18:43:34 2015 (r277084) +++ head/usr.sbin/makefs/ffs.c Mon Jan 12 19:26:31 2015 (r277085) @@ -191,7 +191,7 @@ ffs_parse_opts(const char *option, fsinf "bytes per inode" }, { "minfree", &ffs_opts->minfree, 0, 99, "minfree" }, - { "maxbpf", &ffs_opts->maxbpg, 1, INT_MAX, + { "maxbpg", &ffs_opts->maxbpg, 1, INT_MAX, "max blocks per file in a cg" }, { "avgfilesize", &ffs_opts->avgfilesize,1, INT_MAX, "expected average file size" }, From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 19:47:45 2015 Return-Path: Delivered-To: svn-src-head@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 C53E744F; Mon, 12 Jan 2015 19:47:45 +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 554871CB; Mon, 12 Jan 2015 19:47:45 +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 9497A25D3A42; Mon, 12 Jan 2015 19:47:42 +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 C202DC7706D; Mon, 12 Jan 2015 19:47:41 +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 tfpGE97616zp; Mon, 12 Jan 2015 19:47:40 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 8FCFFC77058; Mon, 12 Jan 2015 19:47:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv From: "Bjoern A. Zeeb" In-Reply-To: <201501121843.t0CIhYnW067569@svn.freebsd.org> Date: Mon, 12 Jan 2015 19:47:39 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <43BD685C-77C4-42C8-9143-4BD59916EDFB@FreeBSD.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> To: Jack F Vogel X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 19:47:46 -0000 > On 12 Jan 2015, at 18:43 , Jack F Vogel wrote: >=20 > Author: jfv > Date: Mon Jan 12 18:43:34 2015 > New Revision: 277084 > URL: https://svnweb.freebsd.org/changeset/base/277084 >=20 > Log: > Intel I40E driver updates: > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > - Major change in both drivers is to add RSS support > - In ixl fix some interface speed related issues, dual > speed was not changing correctly, KR/X media was not > displaying correctly (this has a workaround until a > more robust media handling is in place) > - Add a warning when using Dell NPAR and the speed is > less than 10G > - Wrap a queue hung message in IXL_DEBUG, as it is non-fatal, > and without tuning can display excessively >=20 > MFC after: 1 week >=20 > Modified: > head/sys/dev/ixl/if_ixl.c > head/sys/dev/ixl/if_ixlv.c > head/sys/dev/ixl/ixl.h > head/sys/dev/ixl/ixl_txrx.c There is no M_FLOWID in HEAD anymore. Build failure. > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=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/dev/ixl/ixl_txrx.c Mon Jan 12 18:38:09 2015 = (r277083) > +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:43:34 2015 = (r277084) > @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m > struct tx_ring *txr; > int err, i; >=20 > - /* check if flowid is set */ > - if (M_HASHTYPE_GET(m) !=3D M_HASHTYPE_NONE) > + /* Which queue to use */ > + if ((m->m_flags & M_FLOWID) !=3D 0) > i =3D m->m_pkthdr.flowid % vsi->num_queues; > else > i =3D curcpu % vsi->num_queues; > @@ -1089,8 +1089,8 @@ int > ixl_init_rx_ring(struct ixl_queue *que) > { > struct rx_ring *rxr =3D &que->rxr; > - struct ixl_vsi *vsi =3D que->vsi; > #if defined(INET6) || defined(INET) > + struct ixl_vsi *vsi =3D que->vsi; > struct ifnet *ifp =3D vsi->ifp; > struct lro_ctrl *lro =3D &rxr->lro; > #endif > @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou > if ((ifp->if_capenable & IFCAP_RXCSUM) !=3D 0) > ixl_rx_checksum(sendmp, status, error, = ptype); > sendmp->m_pkthdr.flowid =3D que->msix; > - M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); > + sendmp->m_flags |=3D M_FLOWID; > } > next_desc: > bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, >=20 =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-head@FreeBSD.ORG Mon Jan 12 20:07:13 2015 Return-Path: Delivered-To: svn-src-head@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 546ABC42; Mon, 12 Jan 2015 20:07:13 +0000 (UTC) Received: from mail-wg0-x230.google.com (mail-wg0-x230.google.com [IPv6:2a00:1450:400c:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EAC99639; Mon, 12 Jan 2015 20:07:12 +0000 (UTC) Received: by mail-wg0-f48.google.com with SMTP id l2so21421980wgh.7; Mon, 12 Jan 2015 12:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RoTFgHtq2M/CIjgUh6AOuz5+ii5OxJ8Grkrf76QgnHo=; b=aKcXrgsi+Z/t8Xst6RSQ3S4ouujd/C4BRt1HPvBPlIYBZno8E0eStHBnRtPopVcOI5 eM/YIAl7nBZTYioiEiiMmnFHzbfwZPg1+/2c44sNBBmD0cRW0JOYqAhaUDCNXsZx1cWl cYzds4kDpd+1YxzYNnCaPuoIL5SWjK2wU2aRDgpgK5CgPBW2eJw7rU0bMRqQ6lSD7SEA RI4PgwBY31CE2flonxsQyQ0ranH3F/IVf3r4VxkQphXmMKJxerTsOoeNMFTJUH2BBfbm YkTuhKKDrcAZP5yk96wxTfdJHzjjjbH6p6BDwby8vBi0e84QUbX6O51DiGh8lkHvYzFl Jrsw== MIME-Version: 1.0 X-Received: by 10.194.19.131 with SMTP id f3mr30935673wje.46.1421093231359; Mon, 12 Jan 2015 12:07:11 -0800 (PST) Received: by 10.194.101.106 with HTTP; Mon, 12 Jan 2015 12:07:11 -0800 (PST) In-Reply-To: <43BD685C-77C4-42C8-9143-4BD59916EDFB@FreeBSD.org> References: <201501121843.t0CIhYnW067569@svn.freebsd.org> <43BD685C-77C4-42C8-9143-4BD59916EDFB@FreeBSD.org> Date: Mon, 12 Jan 2015 12:07:11 -0800 Message-ID: Subject: Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv From: Jack Vogel To: "Bjoern A. Zeeb" Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Jack F Vogel , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:07:13 -0000 Opps, missing chunk, fix coming. Jack On Mon, Jan 12, 2015 at 11:47 AM, Bjoern A. Zeeb wrote: > > > On 12 Jan 2015, at 18:43 , Jack F Vogel wrote: > > > > Author: jfv > > Date: Mon Jan 12 18:43:34 2015 > > New Revision: 277084 > > URL: https://svnweb.freebsd.org/changeset/base/277084 > > > > Log: > > Intel I40E driver updates: > > if_ixl to version 1.3.0, if_ixlv to version 1.2.0 > > - Major change in both drivers is to add RSS support > > - In ixl fix some interface speed related issues, dual > > speed was not changing correctly, KR/X media was not > > displaying correctly (this has a workaround until a > > more robust media handling is in place) > > - Add a warning when using Dell NPAR and the speed is > > less than 10G > > - Wrap a queue hung message in IXL_DEBUG, as it is non-fatal, > > and without tuning can display excessively > > > > MFC after: 1 week > > > > Modified: > > head/sys/dev/ixl/if_ixl.c > > head/sys/dev/ixl/if_ixlv.c > > head/sys/dev/ixl/ixl.h > > head/sys/dev/ixl/ixl_txrx.c > > There is no M_FLOWID in HEAD anymore. Build failure. > > > > ============================================================================== > > --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:38:09 2015 > (r277083) > > +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 18:43:34 2015 > (r277084) > > @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m > > struct tx_ring *txr; > > int err, i; > > > > - /* check if flowid is set */ > > - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) > > + /* Which queue to use */ > > + if ((m->m_flags & M_FLOWID) != 0) > > i = m->m_pkthdr.flowid % vsi->num_queues; > > else > > i = curcpu % vsi->num_queues; > > @@ -1089,8 +1089,8 @@ int > > ixl_init_rx_ring(struct ixl_queue *que) > > { > > struct rx_ring *rxr = &que->rxr; > > - struct ixl_vsi *vsi = que->vsi; > > #if defined(INET6) || defined(INET) > > + struct ixl_vsi *vsi = que->vsi; > > struct ifnet *ifp = vsi->ifp; > > struct lro_ctrl *lro = &rxr->lro; > > #endif > > @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou > > if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) > > ixl_rx_checksum(sendmp, status, error, > ptype); > > sendmp->m_pkthdr.flowid = que->msix; > > - M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); > > + sendmp->m_flags |= M_FLOWID; > > } > > next_desc: > > bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, > > > > -- > 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-head@FreeBSD.ORG Mon Jan 12 20:59:08 2015 Return-Path: Delivered-To: svn-src-head@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 5DDB131F; Mon, 12 Jan 2015 20:59: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 30998C57; Mon, 12 Jan 2015 20:59: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 t0CKx8r9030578; Mon, 12 Jan 2015 20:59:08 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CKx8rd030577; Mon, 12 Jan 2015 20:59:08 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501122059.t0CKx8rd030577@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Mon, 12 Jan 2015 20:59:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277088 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 20:59:08 -0000 Author: jfv Date: Mon Jan 12 20:59:07 2015 New Revision: 277088 URL: https://svnweb.freebsd.org/changeset/base/277088 Log: Missing RSS support added, this fixes the build, but the code in the RX side was complicated by recent changes and will need some further tweaking. Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 20:27:06 2015 (r277087) +++ head/sys/dev/ixl/ixl_txrx.c Mon Jan 12 20:59:07 2015 (r277088) @@ -65,14 +65,33 @@ ixl_mq_start(struct ifnet *ifp, struct m struct ixl_queue *que; struct tx_ring *txr; int err, i; +#ifdef RSS + u32 bucket_id; +#endif - /* Which queue to use */ - if ((m->m_flags & M_FLOWID) != 0) - i = m->m_pkthdr.flowid % vsi->num_queues; - else + /* + ** Which queue to use: + ** + ** When doing RSS, map it to the same outbound + ** queue as the incoming flow would be mapped to. + ** If everything is setup correctly, it should be + ** the same bucket that the current CPU we're on is. + */ + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) { +#ifdef RSS + if (rss_hash2bucket(m->m_pkthdr.flowid, + M_HASHTYPE_GET(m), &bucket_id) == 0) { + i = bucket_id % vsi->num_queues; + } else +#endif + i = m->m_pkthdr.flowid % vsi->num_queues; + } else i = curcpu % vsi->num_queues; - - /* Check for a hung queue and pick alternative */ + /* + ** This may not be perfect, but until something + ** better comes along it will keep from scheduling + ** on stalled queues. + */ if (((1 << i) & vsi->active_queues) == 0) i = ffsl(vsi->active_queues); @@ -1542,8 +1561,11 @@ ixl_rxeof(struct ixl_queue *que, int cou rxr->bytes += sendmp->m_pkthdr.len; if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); +#ifdef RSS + /* XXX Work in Progress, fix the build for now */ +#endif sendmp->m_pkthdr.flowid = que->msix; - sendmp->m_flags |= M_FLOWID; + M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 21:28:11 2015 Return-Path: Delivered-To: svn-src-head@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 5EEDEE1E; Mon, 12 Jan 2015 21:28: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 4B323F52; Mon, 12 Jan 2015 21:28: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 t0CLSBHE045115; Mon, 12 Jan 2015 21:28:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CLSBlH045114; Mon, 12 Jan 2015 21:28:11 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501122128.t0CLSBlH045114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 12 Jan 2015 21:28:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277089 - head/contrib/compiler-rt/lib/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:28:11 -0000 Author: dim Date: Mon Jan 12 21:28:10 2015 New Revision: 277089 URL: https://svnweb.freebsd.org/changeset/base/277089 Log: Pull in r225610 from upstream compiler-rt trunk (by Roman Divacky): Add FreeBSD support for __clear_cache. Modified: head/contrib/compiler-rt/lib/builtins/clear_cache.c Modified: head/contrib/compiler-rt/lib/builtins/clear_cache.c ============================================================================== --- head/contrib/compiler-rt/lib/builtins/clear_cache.c Mon Jan 12 20:59:07 2015 (r277088) +++ head/contrib/compiler-rt/lib/builtins/clear_cache.c Mon Jan 12 21:28:10 2015 (r277089) @@ -13,6 +13,11 @@ #if __APPLE__ #include #endif +#if defined(__FreeBSD__) && defined(__arm__) + #include + #include +#endif + #if defined(__NetBSD__) && defined(__arm__) #include #endif @@ -39,7 +44,7 @@ void __clear_cache(void *start, void *en * so there is nothing to do */ #elif defined(__arm__) && !defined(__APPLE__) - #if defined(__NetBSD__) + #if defined(__FreeBSD__) || defined(__NetBSD__) struct arm_sync_icache_args arg; arg.addr = (uintptr_t)start; From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 21:55:50 2015 Return-Path: Delivered-To: svn-src-head@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 5B4A89D1; Mon, 12 Jan 2015 21:55: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 3C29C30F; Mon, 12 Jan 2015 21:55: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 t0CLtoST059104; Mon, 12 Jan 2015 21:55:50 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CLtnmE059101; Mon, 12 Jan 2015 21:55:49 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501122155.t0CLtnmE059101@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Mon, 12 Jan 2015 21:55:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277092 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 21:55:50 -0000 Author: emaste Date: Mon Jan 12 21:55:48 2015 New Revision: 277092 URL: https://svnweb.freebsd.org/changeset/base/277092 Log: ANSIfy msdosfs Add a few cases and style(9) fixes missed in r276887 Sponsored by: The FreeBSD Foundation Modified: head/sys/fs/msdosfs/msdosfs_conv.c head/sys/fs/msdosfs/msdosfs_fat.c head/sys/fs/msdosfs/msdosfs_lookup.c Modified: head/sys/fs/msdosfs/msdosfs_conv.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_conv.c Mon Jan 12 21:34:31 2015 (r277091) +++ head/sys/fs/msdosfs/msdosfs_conv.c Mon Jan 12 21:55:48 2015 (r277092) @@ -295,12 +295,8 @@ dos2unixfn(u_char dn[11], u_char *un, in * 3 if conversion was successful and generation number was inserted */ int -unix2dosfn(un, dn, unlen, gen, pmp) - const u_char *un; - u_char dn[12]; - size_t unlen; - u_int gen; - struct msdosfsmount *pmp; +unix2dosfn(const u_char *un, u_char dn[12], size_t unlen, u_int gen, + struct msdosfsmount *pmp) { ssize_t i, j; int l; @@ -519,13 +515,8 @@ done: * i.e. doesn't consist solely of blanks and dots */ int -unix2winfn(un, unlen, wep, cnt, chksum, pmp) - const u_char *un; - size_t unlen; - struct winentry *wep; - int cnt; - int chksum; - struct msdosfsmount *pmp; +unix2winfn(const u_char *un, size_t unlen, struct winentry *wep, int cnt, + int chksum, struct msdosfsmount *pmp) { u_int8_t *wcp; int i, end; @@ -588,12 +579,8 @@ unix2winfn(un, unlen, wep, cnt, chksum, * Returns the checksum or -1 if no match */ int -winChkName(nbp, un, unlen, chksum, pmp) - struct mbnambuf *nbp; - const u_char *un; - size_t unlen; - int chksum; - struct msdosfsmount *pmp; +winChkName(struct mbnambuf *nbp, const u_char *un, size_t unlen, int chksum, + struct msdosfsmount *pmp) { size_t len; u_int16_t c1, c2; @@ -638,11 +625,8 @@ winChkName(nbp, un, unlen, chksum, pmp) * Returns the checksum or -1 if impossible */ int -win2unixfn(nbp, wep, chksum, pmp) - struct mbnambuf *nbp; - struct winentry *wep; - int chksum; - struct msdosfsmount *pmp; +win2unixfn(struct mbnambuf *nbp, struct winentry *wep, int chksum, + struct msdosfsmount *pmp) { u_char *c, tmpbuf[5]; u_int8_t *cp; @@ -745,10 +729,7 @@ winChksum(u_int8_t *name) * Determine the number of slots necessary for Win95 names */ int -winSlotCnt(un, unlen, pmp) - const u_char *un; - size_t unlen; - struct msdosfsmount *pmp; +winSlotCnt(const u_char *un, size_t unlen, struct msdosfsmount *pmp) { size_t wlen; char wn[WIN_MAXLEN * 2 + 1], *wnp; @@ -773,9 +754,7 @@ winSlotCnt(un, unlen, pmp) * Determine the number of bytes neccessary for Win95 names */ size_t -winLenFixup(un, unlen) - const u_char* un; - size_t unlen; +winLenFixup(const u_char *un, size_t unlen) { for (un += unlen; unlen > 0; unlen--) if (*--un != ' ' && *un != '.') Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Mon Jan 12 21:34:31 2015 (r277091) +++ head/sys/fs/msdosfs/msdosfs_fat.c Mon Jan 12 21:55:48 2015 (r277092) @@ -111,6 +111,7 @@ fatblock(struct msdosfsmount *pmp, u_lon * If this pointer is null then don't return this quantity. * cnp - address of where to place the filesystem relative cluster number. * If this pointer is null then don't return this quantity. + * sp - pointer to returned block size * * NOTE: Either bnp or cnp must be non-null. * This function has one side effect. If the requested file relative cluster @@ -443,7 +444,8 @@ clusterfree(struct msdosfsmount *pmp, u_ * the msdosfsmount structure. This is left to the caller. */ int -fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, u_long newcontents) +fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents, + u_long newcontents) { int error; u_long readcn; Modified: head/sys/fs/msdosfs/msdosfs_lookup.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_lookup.c Mon Jan 12 21:34:31 2015 (r277091) +++ head/sys/fs/msdosfs/msdosfs_lookup.c Mon Jan 12 21:55:48 2015 (r277092) @@ -929,6 +929,9 @@ readde(struct denode *dep, struct buf ** * and will truncate the file to 0 length. When the vnode containing the * denode is needed for some other purpose by VFS it will call * msdosfs_reclaim() which will remove the denode from the denode cache. + * + * pdep directory where the entry is removed + * dep file to be removed */ int removede(struct denode *pdep, struct denode *dep) @@ -998,7 +1001,7 @@ removede(struct denode *pdep, struct den * Create a unique DOS name in dvp */ int -uniqdosname(struct denode *dep,struct componentname *cnp, u_char *cp) +uniqdosname(struct denode *dep, struct componentname *cnp, u_char *cp) { struct msdosfsmount *pmp = dep->de_pmp; struct direntry *dentp; From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 22:27:42 2015 Return-Path: Delivered-To: svn-src-head@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 6DA021A0; Mon, 12 Jan 2015 22:27: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 5909F887; Mon, 12 Jan 2015 22:27: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 t0CMRgNC073447; Mon, 12 Jan 2015 22:27:42 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CMRdKA073432; Mon, 12 Jan 2015 22:27:39 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501122227.t0CMRdKA073432@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Mon, 12 Jan 2015 22:27:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277093 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 22:27:42 -0000 Author: glebius Date: Mon Jan 12 22:27:38 2015 New Revision: 277093 URL: https://svnweb.freebsd.org/changeset/base/277093 Log: In miibus(4) drivers provide functions that allow to get NIC driver name and NIC driver softc via the device(9) tree, instead of going dirty through the ifnet(9) layer. Differential Revision: D1506 Reviewed by: imp, jhb Modified: head/sys/dev/mii/brgphy.c head/sys/dev/mii/ciphy.c head/sys/dev/mii/e1000phy.c head/sys/dev/mii/ip1000phy.c head/sys/dev/mii/jmphy.c head/sys/dev/mii/mii.c head/sys/dev/mii/miivar.h head/sys/dev/mii/mlphy.c head/sys/dev/mii/nsphy.c head/sys/dev/mii/rgephy.c head/sys/dev/mii/rlphy.c head/sys/dev/mii/tlphy.c Modified: head/sys/dev/mii/brgphy.c ============================================================================== --- head/sys/dev/mii/brgphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/brgphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -198,7 +198,6 @@ brgphy_attach(device_t dev) struct bge_softc *bge_sc = NULL; struct bce_softc *bce_sc = NULL; struct mii_softc *sc; - if_t ifp; bsc = device_get_softc(dev); sc = &bsc->mii_sc; @@ -207,13 +206,12 @@ brgphy_attach(device_t dev) &brgphy_funcs, 0); bsc->serdes_flags = 0; - ifp = sc->mii_pdata->mii_ifp; /* Find the MAC driver associated with this PHY. */ - if (strcmp(if_getdname(ifp), "bge") == 0) - bge_sc = if_getsoftc(ifp); - else if (strcmp(if_getdname(ifp), "bce") == 0) - bce_sc = if_getsoftc(ifp); + if (mii_dev_mac_match(dev, "bge")) + bge_sc = mii_dev_mac_softc(dev); + else if (mii_dev_mac_match(dev, "bce")) + bce_sc = mii_dev_mac_softc(dev); /* Handle any special cases based on the PHY ID */ switch (sc->mii_mpd_oui) { @@ -933,11 +931,10 @@ brgphy_reset(struct mii_softc *sc) ifp = sc->mii_pdata->mii_ifp; /* Find the driver associated with this PHY. */ - if (strcmp(if_getdname(ifp), "bge") == 0) { - bge_sc = if_getsoftc(ifp); - } else if (strcmp(if_getdname(ifp), "bce") == 0) { - bce_sc = if_getsoftc(ifp); - } + if (mii_phy_mac_match(sc, "bge")) + bge_sc = mii_phy_mac_softc(sc); + else if (mii_phy_mac_match(sc, "bce")) + bce_sc = mii_phy_mac_softc(sc); if (bge_sc) { /* Fix up various bugs */ Modified: head/sys/dev/mii/ciphy.c ============================================================================== --- head/sys/dev/mii/ciphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/ciphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -303,8 +303,7 @@ ciphy_fixup(struct mii_softc *sc) status = PHY_READ(sc, CIPHY_MII_AUXCSR); speed = status & CIPHY_AUXCSR_SPEED; - if (strcmp(device_get_name(device_get_parent(sc->mii_dev)), - "nfe") == 0) { + if (mii_phy_mac_match(sc, "nfe")) { /* need to set for 2.5V RGMII for NVIDIA adapters */ val = PHY_READ(sc, CIPHY_MII_ECTL1); val &= ~(CIPHY_ECTL1_IOVOL | CIPHY_ECTL1_INTSEL); Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/e1000phy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -139,8 +139,7 @@ e1000phy_attach(device_t dev) mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &e1000phy_funcs, 0); ifp = sc->mii_pdata->mii_ifp; - if (strcmp(if_getdname(ifp), "msk") == 0 && - (sc->mii_flags & MIIF_MACPRIV0) != 0) + if (mii_dev_mac_match(dev, "msk") && (sc->mii_flags & MIIF_MACPRIV0) != 0) sc->mii_flags |= MIIF_PHYPRIV0; switch (sc->mii_mpd_model) { Modified: head/sys/dev/mii/ip1000phy.c ============================================================================== --- head/sys/dev/mii/ip1000phy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/ip1000phy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -110,7 +110,7 @@ ip1000phy_attach(device_t dev) ma = device_get_ivars(dev); flags = MIIF_NOISOLATE | MIIF_NOMANPAUSE; if (MII_MODEL(ma->mii_id2) == MII_MODEL_xxICPLUS_IP1000A && - strcmp(if_getdname(ma->mii_data->mii_ifp), "stge") == 0 && + mii_dev_mac_match(dev, "stge") && (miibus_get_flags(dev) & MIIF_MACPRIV0) != 0) flags |= MIIF_PHYPRIV0; mii_phy_dev_attach(dev, flags, &ip1000phy_funcs, 1); Modified: head/sys/dev/mii/jmphy.c ============================================================================== --- head/sys/dev/mii/jmphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/jmphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -105,7 +105,7 @@ jmphy_attach(device_t dev) ma = device_get_ivars(dev); flags = 0; - if (strcmp(if_getdname(ma->mii_data->mii_ifp), "jme") == 0 && + if (mii_dev_mac_match(dev, "jme") && (miibus_get_flags(dev) & MIIF_MACPRIV0) != 0) flags |= MIIF_PHYPRIV0; mii_phy_dev_attach(dev, flags, &jmphy_funcs, 1); Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/mii.c Mon Jan 12 22:27:38 2015 (r277093) @@ -645,3 +645,33 @@ mii_oui(u_int id1, u_int id2) (mii_bitreverse((h >> 8) & 0xff) << 8) | mii_bitreverse(h & 0xff)); } + +int +mii_phy_mac_match(struct mii_softc *mii, const char *name) +{ + + return (strcmp(device_get_name(device_get_parent(mii->mii_dev)), + name) == 0); +} + +int +mii_dev_mac_match(device_t parent, const char *name) +{ + + return (strcmp(device_get_name(device_get_parent( + device_get_parent(parent))), name) == 0); +} + +void * +mii_phy_mac_softc(struct mii_softc *mii) +{ + + return (device_get_softc(device_get_parent(mii->mii_dev))); +} + +void * +mii_dev_mac_softc(device_t parent) +{ + + return (device_get_softc(device_get_parent(device_get_parent(parent)))); +} Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/miivar.h Mon Jan 12 22:27:38 2015 (r277093) @@ -263,6 +263,10 @@ void mii_phy_reset(struct mii_softc *); void mii_phy_setmedia(struct mii_softc *sc); void mii_phy_update(struct mii_softc *, int); int mii_phy_tick(struct mii_softc *); +int mii_phy_mac_match(struct mii_softc *, const char *); +int mii_dev_mac_match(device_t, const char *); +void *mii_phy_mac_softc(struct mii_softc *); +void *mii_dev_mac_softc(device_t); const struct mii_phydesc * mii_phy_match(const struct mii_attach_args *ma, const struct mii_phydesc *mpd); Modified: head/sys/dev/mii/mlphy.c ============================================================================== --- head/sys/dev/mii/mlphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/mlphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -128,8 +128,7 @@ mlphy_probe(dev) * encountered the 6692 on an Olicom card with a ThunderLAN * controller chip. */ - if (strcmp(device_get_name(device_get_parent(device_get_parent(dev))), - "tl") != 0) + if (!mii_dev_mac_match(dev, "tl")) return (ENXIO); device_set_desc(dev, "Micro Linear 6692 media interface"); Modified: head/sys/dev/mii/nsphy.c ============================================================================== --- head/sys/dev/mii/nsphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/nsphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -129,15 +129,13 @@ nsphy_probe(device_t dev) static int nsphy_attach(device_t dev) { - const char *nic; u_int flags; - nic = device_get_name(device_get_parent(device_get_parent(dev))); flags = MIIF_NOMANPAUSE; /* * Am79C971 wedge when isolating all of their external PHYs. */ - if (strcmp(nic, "pcn") == 0) + if (mii_dev_mac_match(dev,"pcn")) flags |= MIIF_NOISOLATE; mii_phy_dev_attach(dev, flags, &nsphy_funcs, 1); return (0); @@ -186,7 +184,7 @@ nsphy_service(struct mii_softc *sc, stru */ reg |= 0x0100 | 0x0400; - if (strcmp(if_getdname(mii->mii_ifp), "fxp") == 0) + if (mii_phy_mac_match(sc, "fxp")) PHY_WRITE(sc, MII_NSPHY_PCR, reg); mii_phy_setmedia(sc); Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/rgephy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -119,7 +119,7 @@ rgephy_attach(device_t dev) sc = device_get_softc(dev); ma = device_get_ivars(dev); flags = 0; - if (strcmp(if_getdname(ma->mii_data->mii_ifp), "re") == 0) + if (mii_dev_mac_match(dev, "re")) flags |= MIIF_PHYPRIV0; mii_phy_dev_attach(dev, flags, &rgephy_funcs, 0); Modified: head/sys/dev/mii/rlphy.c ============================================================================== --- head/sys/dev/mii/rlphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/rlphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -108,15 +108,13 @@ static const struct mii_phy_funcs rlphy_ static int rlphy_probe(device_t dev) { - const char *nic; int rv; rv = mii_phy_dev_probe(dev, rlphys, BUS_PROBE_DEFAULT); if (rv <= 0) return (rv); - nic = device_get_name(device_get_parent(device_get_parent(dev))); - if (strcmp(nic, "rl") == 0 || strcmp(nic, "re") == 0) + if (mii_dev_mac_match(dev, "rl") || mii_dev_mac_match(dev, "re")) return (mii_phy_dev_probe(dev, rlintphys, BUS_PROBE_DEFAULT)); return (ENXIO); } Modified: head/sys/dev/mii/tlphy.c ============================================================================== --- head/sys/dev/mii/tlphy.c Mon Jan 12 21:55:48 2015 (r277092) +++ head/sys/dev/mii/tlphy.c Mon Jan 12 22:27:38 2015 (r277093) @@ -130,8 +130,7 @@ static int tlphy_probe(device_t dev) { - if (strcmp(device_get_name(device_get_parent(device_get_parent(dev))), - "tl") != 0) + if (!mii_dev_mac_match(dev, "tl")) return (ENXIO); return (mii_phy_dev_probe(dev, tlphys, BUS_PROBE_DEFAULT)); } From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 22:38:56 2015 Return-Path: Delivered-To: svn-src-head@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 637A26D9; Mon, 12 Jan 2015 22:38: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 4F7F89A1; Mon, 12 Jan 2015 22:38: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 t0CMcui6078505; Mon, 12 Jan 2015 22:38:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CMcuMb078504; Mon, 12 Jan 2015 22:38:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501122238.t0CMcuMb078504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 12 Jan 2015 22:38:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277096 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 22:38:56 -0000 Author: mav Date: Mon Jan 12 22:38:55 2015 New Revision: 277096 URL: https://svnweb.freebsd.org/changeset/base/277096 Log: Skip extra bcopy() when scrubbing vdev without redundancy. According to profiler, this bcopy() can use about 10% of CPU time. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Mon Jan 12 22:36:50 2015 (r277095) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c Mon Jan 12 22:38:55 2015 (r277096) @@ -435,7 +435,8 @@ vdev_mirror_io_start(zio_t *zio) mm = vdev_mirror_map_init(zio); if (zio->io_type == ZIO_TYPE_READ) { - if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing) { + if ((zio->io_flags & ZIO_FLAG_SCRUB) && !mm->mm_replacing && + mm->mm_children > 1) { /* * For scrubbing reads we need to allocate a read * buffer for each child and issue reads to all From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 23:20:20 2015 Return-Path: Delivered-To: svn-src-head@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 72874DB4; Mon, 12 Jan 2015 23:20:20 +0000 (UTC) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail-n.franken.de", Issuer "Thawte DV SSL CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 00BB6D98; Mon, 12 Jan 2015 23:20:19 +0000 (UTC) Received: from [192.168.1.200] (p508F271C.dip0.t-ipconnect.de [80.143.39.28]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id BABC71C104DC5; Tue, 13 Jan 2015 00:20:15 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 From: Michael Tuexen In-Reply-To: <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> Date: Tue, 13 Jan 2015 00:20:14 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <7A28D39E-7C21-4081-83E0-656F8082D525@fh-muenster.de> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1993) Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , John Baldwin , "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 23:20:20 -0000 > On 12 Jan 2015, at 18:42, Bjoern A. Zeeb wrote: >=20 >=20 >> On 12 Jan 2015, at 15:51 , John Baldwin wrote: >>=20 >> On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: >>> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery = wrote: >>>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: >>>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>>=20 >>>>> > wrote: >>>>> Bryan- >>>>>=20 >>>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher = >>>>=20 >>>>> > wrote: >>>>>> Author: bryanv >>>>>> Date: Fri Oct 10 06:08:59 2014 >>>>>> New Revision: 272886 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 >>>>>>=20 >>>>>> Log: >>>>>> Add context pointer and source address to the UDP tunnel callback >>>>>>=20 >>>>>> These are needed for the forthcoming vxlan implementation. The >>>>=20 >>>> context >>>>=20 >>>>>> pointer means we do not have to use a spare pointer field in the >>>>=20 >>>> inpcb, >>>>=20 >>>>>> and the source address is required to populate vxlan's forwarding >>>>=20 >>>> table. >>>>=20 >>>>>> While I highly doubt there is an out of tree consumer of the UDP >>>>>> tunneling callback, this change may be a difficult to eventually >>>>=20 >>>> MFC. >>>>=20 >>>>> I noticed this comment while doing an MFC of vxlan to my local = tree. >>>>> Do you think an MFC to 10-STABLE of this change (and vxlan >>>>> generally) will be feasible? Is there precedent for ABI changes = like >>>>> this being sanctioned? Could symbol versioning help? >>>>>=20 >>>>> I'd like to get some consensus on whether this commit is OK to = MFC. With >>>>> this commit, vxlan should be an easy to MFC. >>>>=20 >>>> Breaking ABI will potentially hurt packages. FreeBSD builds = packages for >>>> the oldest supported release on a branch. If you break ABI in 10.2 = while >>>> we are building packages for 10.1 then any packages using these >>>> interfaces may not work right or result in panics packages with = kmods. >>>> Please consider that. >>>=20 >>> The only user visible change of this commit would be the addition of = a >>> field at the end of 'struct udpcb'. I don't think that is a problem, = at >>> least a similar change didn't prevent the MFC of UDP Lite. >>>=20 >>> The kernel part of this changes the UDP tunneling functions which I = guess >>> there could be a 3rd party module out there, but I very highly doubt = that, >>> based on how un-useful the previous interface was. >>=20 >> Userland should not be impacted by this at all. (Nothing in userland = cares >> about udpcb's internals.) I think there was only ever one consumer = for the=20 >> existing UDP tunneling code (bz@ knows what it is). I'm not sure = where it=20 >> lives. >=20 > If you are talking about u_tun_func then it came from SCTP over UDP = tunneling. tuexen and rrs are your friends. rrs implemented it to support SCTP over UDP over IPv[46]. To be more = precisely, to receive such packets. Best regards Michael >=20 > I was wondering if it could be used similarly for IPsec UDPencap but I = think that went nowhere back then. >=20 > =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." >=20 >=20 >=20 From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 23:33:41 2015 Return-Path: Delivered-To: svn-src-head@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 E14F0FA1; Mon, 12 Jan 2015 23:33: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 CD311F09; Mon, 12 Jan 2015 23:33: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 t0CNXfbS006033; Mon, 12 Jan 2015 23:33:41 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0CNXfbw006032; Mon, 12 Jan 2015 23:33:41 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201501122333.t0CNXfbw006032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Mon, 12 Jan 2015 23:33:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277097 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 23:33:42 -0000 Author: jmg Date: Mon Jan 12 23:33:40 2015 New Revision: 277097 URL: https://svnweb.freebsd.org/changeset/base/277097 Log: fix IV size of XTS to be correct at 8 bytes.. That is what both the AES-NI code and the software code expects.. Modified: head/share/man/man7/crypto.7 Modified: head/share/man/man7/crypto.7 ============================================================================== --- head/share/man/man7/crypto.7 Mon Jan 12 22:38:55 2015 (r277096) +++ head/share/man/man7/crypto.7 Mon Jan 12 23:33:40 2015 (r277097) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 12, 2014 +.Dd January 2, 2015 .Dt CRYPTO 7 .Os .Sh NAME @@ -105,7 +105,7 @@ Note: You must provide an IV on every ca .It Dv CRYPTO_AES_XTS .Bl -tag -width "Block size :" -compact -offset indent .It IV size : -16 +8 .It Block size : 16 .It Key size : From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 00:00:11 2015 Return-Path: Delivered-To: svn-src-head@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 C2D5070F; Tue, 13 Jan 2015 00:00: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 A35831A8; Tue, 13 Jan 2015 00:00: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 t0D00BJj016735; Tue, 13 Jan 2015 00:00:11 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D00A6q016730; Tue, 13 Jan 2015 00:00:10 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201501130000.t0D00A6q016730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Tue, 13 Jan 2015 00:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277098 - in head/sys/dev: fdt ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:00:11 -0000 Author: zbb Date: Tue Jan 13 00:00:09 2015 New Revision: 277098 URL: https://svnweb.freebsd.org/changeset/base/277098 Log: Introduce ofw_bus_reg_to_rl() to replace part of common bus code Instead of reusing the same reg parsing code, create one, common function that puts reg contents to the resource list. Address cells and size cells are passed rather than acquired here so that any bus can have different default values. Obtained from: Semihalf Reviewed by: andrew, ian, nwhitehorn Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/fdt/simplebus.c head/sys/dev/ofw/ofw_bus_subr.c head/sys/dev/ofw/ofw_bus_subr.h head/sys/dev/ofw/ofwbus.c Modified: head/sys/dev/fdt/simplebus.c ============================================================================== --- head/sys/dev/fdt/simplebus.c Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/fdt/simplebus.c Tue Jan 13 00:00:09 2015 (r277098) @@ -253,10 +253,6 @@ simplebus_setup_dinfo(device_t dev, phan { struct simplebus_softc *sc; struct simplebus_devinfo *ndi; - uint32_t *reg; - uint64_t phys, size; - int i, j, k; - int nreg; sc = device_get_softc(dev); @@ -267,32 +263,7 @@ simplebus_setup_dinfo(device_t dev, phan } resource_list_init(&ndi->rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); - if (nreg == -1) - nreg = 0; - if (nreg % (sc->acells + sc->scells) != 0) { - if (bootverbose) - device_printf(dev, "Malformed reg property on <%s>\n", - ndi->obdinfo.obd_name); - nreg = 0; - } - - for (i = 0, k = 0; i < nreg; i += sc->acells + sc->scells, k++) { - phys = size = 0; - for (j = 0; j < sc->acells; j++) { - phys <<= 32; - phys |= reg[i + j]; - } - for (j = 0; j < sc->scells; j++) { - size <<= 32; - size |= reg[i + sc->acells + j]; - } - - resource_list_add(&ndi->rl, SYS_RES_MEMORY, k, - phys, phys + size - 1, size); - } - free(reg, M_OFWPROP); - + ofw_bus_reg_to_rl(dev, node, sc->acells, sc->scells, &ndi->rl); ofw_bus_intr_to_rl(dev, node, &ndi->rl); return (ndi); Modified: head/sys/dev/ofw/ofw_bus_subr.c ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.c Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/ofw/ofw_bus_subr.c Tue Jan 13 00:00:09 2015 (r277098) @@ -370,6 +370,54 @@ ofw_bus_search_intrmap(void *intr, int i } int +ofw_bus_reg_to_rl(device_t dev, phandle_t node, pcell_t acells, pcell_t scells, + struct resource_list *rl) +{ + uint64_t phys, size; + ssize_t i, j, rid, nreg, ret; + uint32_t *reg; + char *name; + + /* + * This may be just redundant when having ofw_bus_devinfo + * but makes this routine independent of it. + */ + ret = OF_getencprop_alloc(node, "name", sizeof(*name), (void **)&name); + if (ret == -1) + name = NULL; + + ret = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); + nreg = (ret == -1) ? 0 : ret; + + if (nreg % (acells + scells) != 0) { + if (bootverbose) + device_printf(dev, "Malformed reg property on <%s>\n", + (name == NULL) ? "unknown" : name); + nreg = 0; + } + + for (i = 0, rid = 0; i < nreg; i += acells + scells, rid++) { + phys = size = 0; + for (j = 0; j < acells; j++) { + phys <<= 32; + phys |= reg[i + j]; + } + for (j = 0; j < scells; j++) { + size <<= 32; + size |= reg[i + acells + j]; + } + /* Skip the dummy reg property of glue devices like ssm(4). */ + if (size != 0) + resource_list_add(rl, SYS_RES_MEMORY, rid, + phys, phys + size - 1, size); + } + free(name, M_OFWPROP); + free(reg, M_OFWPROP); + + return (0); +} + +int ofw_bus_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl) { phandle_t iparent; Modified: head/sys/dev/ofw/ofw_bus_subr.h ============================================================================== --- head/sys/dev/ofw/ofw_bus_subr.h Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/ofw/ofw_bus_subr.h Tue Jan 13 00:00:09 2015 (r277098) @@ -73,6 +73,8 @@ int ofw_bus_search_intrmap(void *, int, void *, void *, int, phandle_t *); /* Routines for parsing device-tree data into resource lists. */ +int ofw_bus_reg_to_rl(device_t, phandle_t, pcell_t, pcell_t, + struct resource_list *); int ofw_bus_intr_to_rl(device_t, phandle_t, struct resource_list *); /* Helper to get device status property */ Modified: head/sys/dev/ofw/ofwbus.c ============================================================================== --- head/sys/dev/ofw/ofwbus.c Mon Jan 12 23:33:40 2015 (r277097) +++ head/sys/dev/ofw/ofwbus.c Tue Jan 13 00:00:09 2015 (r277098) @@ -442,10 +442,6 @@ ofwbus_setup_dinfo(device_t dev, phandle struct ofwbus_softc *sc; struct ofwbus_devinfo *ndi; const char *nodename; - uint32_t *reg; - uint64_t phys, size; - int i, j, rid; - int nreg; sc = device_get_softc(dev); @@ -462,33 +458,7 @@ ofwbus_setup_dinfo(device_t dev, phandle } resource_list_init(&ndi->ndi_rl); - nreg = OF_getencprop_alloc(node, "reg", sizeof(*reg), (void **)®); - if (nreg == -1) - nreg = 0; - if (nreg % (sc->acells + sc->scells) != 0) { - if (bootverbose) - device_printf(dev, "Malformed reg property on <%s>\n", - nodename); - nreg = 0; - } - - for (i = 0, rid = 0; i < nreg; i += sc->acells + sc->scells, rid++) { - phys = size = 0; - for (j = 0; j < sc->acells; j++) { - phys <<= 32; - phys |= reg[i + j]; - } - for (j = 0; j < sc->scells; j++) { - size <<= 32; - size |= reg[i + sc->acells + j]; - } - /* Skip the dummy reg property of glue devices like ssm(4). */ - if (size != 0) - resource_list_add(&ndi->ndi_rl, SYS_RES_MEMORY, rid, - phys, phys + size - 1, size); - } - free(reg, M_OFWPROP); - + 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); From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 00:04:23 2015 Return-Path: Delivered-To: svn-src-head@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 ED87B8E1; Tue, 13 Jan 2015 00:04: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 D90A7263; Tue, 13 Jan 2015 00:04: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 t0D04NgY021611; Tue, 13 Jan 2015 00:04:23 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D04NMj021610; Tue, 13 Jan 2015 00:04:23 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501130004.t0D04NMj021610@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Tue, 13 Jan 2015 00:04:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277099 - head/usr.bin/sed X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:04:24 -0000 Author: pfg Date: Tue Jan 13 00:04:22 2015 New Revision: 277099 URL: https://svnweb.freebsd.org/changeset/base/277099 Log: Replace __inline GNUism with the standard inline. MFC after: 1 week Modified: head/usr.bin/sed/process.c Modified: head/usr.bin/sed/process.c ============================================================================== --- head/usr.bin/sed/process.c Tue Jan 13 00:00:09 2015 (r277098) +++ head/usr.bin/sed/process.c Tue Jan 13 00:04:22 2015 (r277099) @@ -67,7 +67,7 @@ static SPACE HS, PS, SS, YS; #define hs HS.space #define hsl HS.len -static __inline int applies(struct s_command *); +static inline int applies(struct s_command *); static void do_tr(struct s_tr *); static void flush_appends(void); static void lputs(char *, size_t); @@ -288,7 +288,7 @@ new: if (!nflag && !pd) * Return TRUE if the command applies to the current line. Sets the start * line for process ranges. Interprets the non-select (``!'') flag. */ -static __inline int +static inline int applies(struct s_command *cp) { int r; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 00:11:57 2015 Return-Path: Delivered-To: svn-src-head@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 B30A8B9B; Tue, 13 Jan 2015 00:11: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 84E9C377; Tue, 13 Jan 2015 00: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 t0D0BvLw026056; Tue, 13 Jan 2015 00:11:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D0BvRD026054; Tue, 13 Jan 2015 00:11:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501130011.t0D0BvRD026054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 13 Jan 2015 00:11:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277100 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:11:57 -0000 Author: kib Date: Tue Jan 13 00:11:56 2015 New Revision: 277100 URL: https://svnweb.freebsd.org/changeset/base/277100 Log: Add quirk to override default BAR(5) rid for AHCI. Use it for Cavium AHCI. Submitted by: Michaе┌ Stanek Reviewed by: imp (previous version) MFC after: 1 week Modified: head/sys/dev/ahci/ahci.h head/sys/dev/ahci/ahci_pci.c Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Jan 13 00:04:22 2015 (r277099) +++ head/sys/dev/ahci/ahci.h Tue Jan 13 00:11:56 2015 (r277100) @@ -572,6 +572,7 @@ enum ahci_err_type { #define AHCI_Q_ATI_PMP_BUG 0x2000 #define AHCI_Q_MAXIO_64K 0x4000 #define AHCI_Q_SATA1_UNIT0 0x8000 /* need better method for this */ +#define AHCI_Q_ABAR0 0x10000 #define AHCI_Q_BIT_STRING \ "\020" \ Modified: head/sys/dev/ahci/ahci_pci.c ============================================================================== --- head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:04:22 2015 (r277099) +++ head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:11:56 2015 (r277100) @@ -287,6 +287,7 @@ static const struct { {0x11841039, 0x00, "SiS 966", 0}, {0x11851039, 0x00, "SiS 968", 0}, {0x01861039, 0x00, "SiS 968", 0}, + {0xa01c177d, 0x00, "ThunderX SATA", AHCI_Q_ABAR0}, {0x00000000, 0x00, NULL, 0} }; @@ -386,12 +387,16 @@ ahci_pci_attach(device_t dev) pci_get_subvendor(dev) == 0x1043 && pci_get_subdevice(dev) == 0x81e4) ctlr->quirks |= AHCI_Q_SATA1_UNIT0; - /* if we have a memory BAR(5) we are likely on an AHCI part */ ctlr->vendorid = pci_get_vendor(dev); ctlr->deviceid = pci_get_device(dev); ctlr->subvendorid = pci_get_subvendor(dev); ctlr->subdeviceid = pci_get_subdevice(dev); - ctlr->r_rid = PCIR_BAR(5); + + /* Default AHCI Base Address is BAR(5), Cavium uses BAR(0) */ + if (ctlr->quirks & AHCI_Q_ABAR0) + ctlr->r_rid = PCIR_BAR(0); + else + ctlr->r_rid = PCIR_BAR(5); if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &ctlr->r_rid, RF_ACTIVE))) return ENXIO; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 00:20:37 2015 Return-Path: Delivered-To: svn-src-head@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 16F15A0; Tue, 13 Jan 2015 00:20: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 DE6FA3DC; Tue, 13 Jan 2015 00:20: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 t0D0Ka8R028455; Tue, 13 Jan 2015 00:20:36 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D0KaOX028453; Tue, 13 Jan 2015 00:20:36 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501130020.t0D0KaOX028453@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Tue, 13 Jan 2015 00:20:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277101 - in head/sys/cam: ata scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 00:20:37 -0000 Author: imp Date: Tue Jan 13 00:20:35 2015 New Revision: 277101 URL: https://svnweb.freebsd.org/changeset/base/277101 Log: Explain a bit of tricky code dealing with trims and how it prevents starvation. These side effects aren't obvious without extremely careful study, and are important to do just so. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Tue Jan 13 00:11:56 2015 (r277100) +++ head/sys/cam/ata/ata_da.c Tue Jan 13 00:20:35 2015 (r277101) @@ -1790,6 +1790,16 @@ adadone(struct cam_periph *periph, union TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->trim_req.bps, bio_queue); + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * trim_running set to 0 before the call above to allow + * other I/O to progress when many BIO_DELETE requests + * are pushed down. We set trim_running to 0 and call + * daschedule again so that we don't stall if there are + * no other I/Os pending apart from BIO_DELETEs. + */ softc->trim_running = 0; adaschedule(periph); cam_periph_unlock(periph); Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Tue Jan 13 00:11:56 2015 (r277100) +++ head/sys/cam/scsi/scsi_da.c Tue Jan 13 00:20:35 2015 (r277101) @@ -3018,6 +3018,16 @@ dadone(struct cam_periph *periph, union TAILQ_INIT(&queue); TAILQ_CONCAT(&queue, &softc->delete_run_queue.queue, bio_queue); softc->delete_run_queue.insert_point = NULL; + /* + * Normally, the xpt_release_ccb() above would make sure + * that when we have more work to do, that work would + * get kicked off. However, we specifically keep + * delete_running set to 0 before the call above to + * allow other I/O to progress when many BIO_DELETE + * requests are pushed down. We set delete_running to 0 + * and call daschedule again so that we don't stall if + * there are no other I/Os pending apart from BIO_DELETEs. + */ softc->delete_running = 0; daschedule(periph); cam_periph_unlock(periph); From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 01:28:39 2015 Return-Path: Delivered-To: svn-src-head@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 2BF43D7A for ; Tue, 13 Jan 2015 01:28:39 +0000 (UTC) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5622C70 for ; Tue, 13 Jan 2015 01:28:38 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hi2so767792wib.2 for ; Mon, 12 Jan 2015 17:28:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=PcsYgXvK+KVdTbHmIIPA2Jc6zfqqHbFm173takTwHP0=; b=d8xe3G6+Q6hGsAofE+hKvVp0iQ4jZHVO3nkSP8Y5y8uHppzV9davvADo+z2dK34NTs skhI6+Tu+54iS7esmKlniDvJ4hWoASDZ1nduQNpan1aLfSs4RxbRtQYEKVmaUNB4ztmE KUdqBa/4TLWT9QxfQjQzjDZcHU8hy6NUPb0ZIPjSFpS6V7up4E40MaVJWnETov+EIcW3 qYuQuVC5Xn8EykrsP+MBfbiR5qetuLCPo0CRLdA4Iu/riW6gDEWyEF4y0r9vtk0sSMGu 8Z5hemMlORzBKN5ln/pJgdiSnyzmbEctAMa33y1CBHF5fMFaLVkDsI6YMDZ5bmPXahuw DVzg== X-Gm-Message-State: ALoCoQkefpHpPikaP/kG0YY/2cjZ7ERHW+4n2o7KXJ3OIBw/aZohllVskiwwGqALyVmRvBSzkiRX X-Received: by 10.194.190.46 with SMTP id gn14mr110571wjc.36.1421112067015; Mon, 12 Jan 2015 17:21:07 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id s9sm12249516wiz.12.2015.01.12.17.21.06 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jan 2015 17:21:06 -0800 (PST) From: Steven Hartland X-Google-Original-From: Steven Hartland Message-ID: <54B472FC.4090808@freebsd.org> Date: Tue, 13 Jan 2015 01:21:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277100 - head/sys/dev/ahci References: <201501130011.t0D0BvRD026054@svn.freebsd.org> In-Reply-To: <201501130011.t0D0BvRD026054@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 01:28:39 -0000 Looks like this missed the addition of the new quirk to AHCI_Q_BIT_STRING. On 13/01/2015 00:11, Konstantin Belousov wrote: > Author: kib > Date: Tue Jan 13 00:11:56 2015 > New Revision: 277100 > URL: https://svnweb.freebsd.org/changeset/base/277100 > > Log: > Add quirk to override default BAR(5) rid for AHCI. > Use it for Cavium AHCI. > > Submitted by: Michaе┌ Stanek > Reviewed by: imp (previous version) > MFC after: 1 week > > Modified: > head/sys/dev/ahci/ahci.h > head/sys/dev/ahci/ahci_pci.c > > Modified: head/sys/dev/ahci/ahci.h > ============================================================================== > --- head/sys/dev/ahci/ahci.h Tue Jan 13 00:04:22 2015 (r277099) > +++ head/sys/dev/ahci/ahci.h Tue Jan 13 00:11:56 2015 (r277100) > @@ -572,6 +572,7 @@ enum ahci_err_type { > #define AHCI_Q_ATI_PMP_BUG 0x2000 > #define AHCI_Q_MAXIO_64K 0x4000 > #define AHCI_Q_SATA1_UNIT0 0x8000 /* need better method for this */ > +#define AHCI_Q_ABAR0 0x10000 > > #define AHCI_Q_BIT_STRING \ > "\020" \ > > Modified: head/sys/dev/ahci/ahci_pci.c > ============================================================================== > --- head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:04:22 2015 (r277099) > +++ head/sys/dev/ahci/ahci_pci.c Tue Jan 13 00:11:56 2015 (r277100) > @@ -287,6 +287,7 @@ static const struct { > {0x11841039, 0x00, "SiS 966", 0}, > {0x11851039, 0x00, "SiS 968", 0}, > {0x01861039, 0x00, "SiS 968", 0}, > + {0xa01c177d, 0x00, "ThunderX SATA", AHCI_Q_ABAR0}, > {0x00000000, 0x00, NULL, 0} > }; > > @@ -386,12 +387,16 @@ ahci_pci_attach(device_t dev) > pci_get_subvendor(dev) == 0x1043 && > pci_get_subdevice(dev) == 0x81e4) > ctlr->quirks |= AHCI_Q_SATA1_UNIT0; > - /* if we have a memory BAR(5) we are likely on an AHCI part */ > ctlr->vendorid = pci_get_vendor(dev); > ctlr->deviceid = pci_get_device(dev); > ctlr->subvendorid = pci_get_subvendor(dev); > ctlr->subdeviceid = pci_get_subdevice(dev); > - ctlr->r_rid = PCIR_BAR(5); > + > + /* Default AHCI Base Address is BAR(5), Cavium uses BAR(0) */ > + if (ctlr->quirks & AHCI_Q_ABAR0) > + ctlr->r_rid = PCIR_BAR(0); > + else > + ctlr->r_rid = PCIR_BAR(5); > if (!(ctlr->r_mem = bus_alloc_resource_any(dev, SYS_RES_MEMORY, > &ctlr->r_rid, RF_ACTIVE))) > return ENXIO; > From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 01:40:13 2015 Return-Path: Delivered-To: svn-src-head@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 1D3EDE44; Tue, 13 Jan 2015 01:40: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 08C89DD3; Tue, 13 Jan 2015 01:40: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 t0D1eCor065290; Tue, 13 Jan 2015 01:40:12 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D1eC1l065289; Tue, 13 Jan 2015 01:40:12 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501130140.t0D1eC1l065289@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 13 Jan 2015 01:40:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277102 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 01:40:13 -0000 Author: np Date: Tue Jan 13 01:40:12 2015 New Revision: 277102 URL: https://svnweb.freebsd.org/changeset/base/277102 Log: cxgbe/iw_cxgbe: allow any size during the initial MPA exchange. MFC after: 1 month Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 00:20:35 2015 (r277101) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 01:40:12 2015 (r277102) @@ -955,18 +955,14 @@ send_mpa_req(struct c4iw_ep *ep) if (mpa_rev_to_use == 2) mpalen += sizeof(struct mpa_v2_conn_params); - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) { +failed: connect_reply_upcall(ep, -ENOMEM); return; } - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REQ, sizeof(mpa->key)); mpa->flags = (crc_enabled ? MPA_CRC : 0) | (markers_enabled ? MPA_MARKERS : 0) | @@ -1013,11 +1009,18 @@ send_mpa_req(struct c4iw_ep *ep) CTR2(KTR_IW_CXGBE, "%s:smr7 %p", __func__, ep); } - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); - if (err) { - connect_reply_upcall(ep, -ENOMEM); - return; + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + goto failed; } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + ep->com.thread); + if (err) + goto failed; START_EP_TIMER(ep); state_set(&ep->com, MPA_REQ_SENT); @@ -1044,22 +1047,11 @@ static int send_mpa_reject(struct c4iw_e ep->mpa_attr.version, mpalen); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - printf("%s - cannot alloc mbuf!\n", __func__); - CTR2(KTR_IW_CXGBE, "%s:smrej2 %p", __func__, ep); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; - memset(mpa, 0, sizeof(*mpa)); + memset(mpa, 0, mpalen); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = MPA_REJECT; mpa->revision = mpa_rev; @@ -1091,7 +1083,15 @@ static int send_mpa_reject(struct c4iw_e if (plen) memcpy(mpa->private_data, pdata, plen); - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); if (!err) ep->snd_seq += mpalen; CTR4(KTR_IW_CXGBE, "%s:smrejE %p %u %d", __func__, ep, ep->hwtid, err); @@ -1117,21 +1117,10 @@ static int send_mpa_reply(struct c4iw_ep mpalen += sizeof(struct mpa_v2_conn_params); } - if (mpalen > MHLEN) - CXGBE_UNIMPLEMENTED(__func__); - - m = m_gethdr(M_NOWAIT, MT_DATA); - if (m == NULL) { - - CTR2(KTR_IW_CXGBE, "%s:smrep2 %p", __func__, ep); - printf("%s - cannot alloc mbuf!\n", __func__); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + if (mpa == NULL) return (-ENOMEM); - } - - mpa = mtod(m, struct mpa_message *); - m->m_len = mpalen; - m->m_pkthdr.len = mpalen; memset(mpa, 0, sizeof(*mpa)); memcpy(mpa->key, MPA_KEY_REP, sizeof(mpa->key)); mpa->flags = (ep->mpa_attr.crc_enabled ? MPA_CRC : 0) | @@ -1182,9 +1171,18 @@ static int send_mpa_reply(struct c4iw_ep if (plen) memcpy(mpa->private_data, pdata, plen); + m = m_getm(NULL, mpalen, M_NOWAIT, MT_DATA); + if (m == NULL) { + free(mpa, M_CXGBE); + return (-ENOMEM); + } + m_copyback(m, 0, mpalen, (void *)mpa); + free(mpa, M_CXGBE); + + state_set(&ep->com, MPA_REP_SENT); ep->snd_seq += mpalen; - err = sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, + err = -sosend(ep->com.so, NULL, NULL, m, NULL, MSG_DONTWAIT, ep->com.thread); CTR3(KTR_IW_CXGBE, "%s:smrepE %p %d", __func__, ep, err); return err; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 05:32:52 2015 Return-Path: Delivered-To: svn-src-head@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 CAA23AE4; Tue, 13 Jan 2015 05:32: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 B61CA800; Tue, 13 Jan 2015 05:32: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 t0D5WqYw077736; Tue, 13 Jan 2015 05:32:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D5WqeN077734; Tue, 13 Jan 2015 05:32:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501130532.t0D5WqeN077734@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 13 Jan 2015 05:32:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277103 - in head/sys/dev/xen: netback netfront X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 05:32:52 -0000 Author: delphij Date: Tue Jan 13 05:32:51 2015 New Revision: 277103 URL: https://svnweb.freebsd.org/changeset/base/277103 Log: Use the common codepath to handle SIOCGIFADDR. Before this change, the current code handles SIOCGIFADDR the same way with SIOCSIFADDR, which involves full arp_ifinit, et al. They should be unnecessary for SIOCGIFADDR case. Differential Revision: https://reviews.freebsd.org/D1508 Reviewed by: glebius MFC after: 2 weeks Modified: head/sys/dev/xen/netback/netback.c head/sys/dev/xen/netfront/netfront.c Modified: head/sys/dev/xen/netback/netback.c ============================================================================== --- head/sys/dev/xen/netback/netback.c Tue Jan 13 01:40:12 2015 (r277102) +++ head/sys/dev/xen/netback/netback.c Tue Jan 13 05:32:51 2015 (r277103) @@ -2251,7 +2251,6 @@ xnb_ioctl(struct ifnet *ifp, u_long cmd, mtx_unlock(&xnb->sc_lock); break; case SIOCSIFADDR: - case SIOCGIFADDR: #ifdef INET mtx_lock(&xnb->sc_lock); if (ifa->ifa_addr->sa_family == AF_INET) { Modified: head/sys/dev/xen/netfront/netfront.c ============================================================================== --- head/sys/dev/xen/netfront/netfront.c Tue Jan 13 01:40:12 2015 (r277102) +++ head/sys/dev/xen/netfront/netfront.c Tue Jan 13 05:32:51 2015 (r277103) @@ -1741,7 +1741,6 @@ xn_ioctl(struct ifnet *ifp, u_long cmd, int mask, error = 0; switch(cmd) { case SIOCSIFADDR: - case SIOCGIFADDR: #ifdef INET XN_LOCK(sc); if (ifa->ifa_addr->sa_family == AF_INET) { From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 06:22:25 2015 Return-Path: Delivered-To: svn-src-head@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 59944308; Tue, 13 Jan 2015 06:22: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 45D2AC57; Tue, 13 Jan 2015 06:22: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 t0D6MPPl001252; Tue, 13 Jan 2015 06:22:25 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D6MPYP001251; Tue, 13 Jan 2015 06:22:25 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501130622.t0D6MPYP001251@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Jan 2015 06:22:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277104 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 06:22:25 -0000 Author: glebius Date: Tue Jan 13 06:22:24 2015 New Revision: 277104 URL: https://svnweb.freebsd.org/changeset/base/277104 Log: Remove unused fields. Modified: head/sys/dev/mii/miivar.h Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Tue Jan 13 05:32:51 2015 (r277103) +++ head/sys/dev/mii/miivar.h Tue Jan 13 06:22:24 2015 (r277104) @@ -45,13 +45,6 @@ struct mii_softc; /* - * Callbacks from MII layer into network interface device driver. - */ -typedef int (*mii_readreg_t)(struct device *, int, int); -typedef void (*mii_writereg_t)(struct device *, int, int, int); -typedef void (*mii_statchg_t)(struct device *); - -/* * A network interface driver has one of these structures in its softc. * It is the interface from the network interface driver to the MII * layer. @@ -73,13 +66,6 @@ struct mii_data { */ u_int mii_media_status; u_int mii_media_active; - - /* - * Calls from MII layer into network interface driver. - */ - mii_readreg_t mii_readreg; - mii_writereg_t mii_writereg; - mii_statchg_t mii_statchg; }; typedef struct mii_data mii_data_t; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 06:22:56 2015 Return-Path: Delivered-To: svn-src-head@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 B0B97448; Tue, 13 Jan 2015 06:22: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 9CED7C5F; Tue, 13 Jan 2015 06:22: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 t0D6MuJN001357; Tue, 13 Jan 2015 06:22:56 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D6Mumt001356; Tue, 13 Jan 2015 06:22:56 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501130622.t0D6Mumt001356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Jan 2015 06:22:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277105 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 06:22:56 -0000 Author: glebius Date: Tue Jan 13 06:22:55 2015 New Revision: 277105 URL: https://svnweb.freebsd.org/changeset/base/277105 Log: - Remove unused variable. - Wrap long line. Modified: head/sys/dev/mii/e1000phy.c Modified: head/sys/dev/mii/e1000phy.c ============================================================================== --- head/sys/dev/mii/e1000phy.c Tue Jan 13 06:22:24 2015 (r277104) +++ head/sys/dev/mii/e1000phy.c Tue Jan 13 06:22:55 2015 (r277105) @@ -132,14 +132,13 @@ static int e1000phy_attach(device_t dev) { struct mii_softc *sc; - if_t ifp; sc = device_get_softc(dev); mii_phy_dev_attach(dev, MIIF_NOMANPAUSE, &e1000phy_funcs, 0); - ifp = sc->mii_pdata->mii_ifp; - if (mii_dev_mac_match(dev, "msk") && (sc->mii_flags & MIIF_MACPRIV0) != 0) + if (mii_dev_mac_match(dev, "msk") && + (sc->mii_flags & MIIF_MACPRIV0) != 0) sc->mii_flags |= MIIF_PHYPRIV0; switch (sc->mii_mpd_model) { From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 06:56:05 2015 Return-Path: Delivered-To: svn-src-head@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 E8899C40; Tue, 13 Jan 2015 06:56: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 D4D37F2C; Tue, 13 Jan 2015 06:56: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 t0D6u5CX016111; Tue, 13 Jan 2015 06:56:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D6u5NH016109; Tue, 13 Jan 2015 06:56:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501130656.t0D6u5NH016109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Tue, 13 Jan 2015 06:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277108 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 06:56:06 -0000 Author: glebius Date: Tue Jan 13 06:56:04 2015 New Revision: 277108 URL: https://svnweb.freebsd.org/changeset/base/277108 Log: Remove unused variables. CID: 1262431 CID: 1262430 Modified: head/sys/dev/mii/jmphy.c head/sys/dev/mii/rgephy.c Modified: head/sys/dev/mii/jmphy.c ============================================================================== --- head/sys/dev/mii/jmphy.c Tue Jan 13 06:27:02 2015 (r277107) +++ head/sys/dev/mii/jmphy.c Tue Jan 13 06:56:04 2015 (r277108) @@ -100,10 +100,8 @@ jmphy_probe(device_t dev) static int jmphy_attach(device_t dev) { - struct mii_attach_args *ma; u_int flags; - ma = device_get_ivars(dev); flags = 0; if (mii_dev_mac_match(dev, "jme") && (miibus_get_flags(dev) & MIIF_MACPRIV0) != 0) Modified: head/sys/dev/mii/rgephy.c ============================================================================== --- head/sys/dev/mii/rgephy.c Tue Jan 13 06:27:02 2015 (r277107) +++ head/sys/dev/mii/rgephy.c Tue Jan 13 06:56:04 2015 (r277108) @@ -113,11 +113,9 @@ static int rgephy_attach(device_t dev) { struct mii_softc *sc; - struct mii_attach_args *ma; u_int flags; sc = device_get_softc(dev); - ma = device_get_ivars(dev); flags = 0; if (mii_dev_mac_match(dev, "re")) flags |= MIIF_PHYPRIV0; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 07:49:09 2015 Return-Path: Delivered-To: svn-src-head@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 974E1968; Tue, 13 Jan 2015 07:49: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 69D0260E; Tue, 13 Jan 2015 07:49: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 t0D7n9oo040283; Tue, 13 Jan 2015 07:49:09 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D7n8jv040279; Tue, 13 Jan 2015 07:49:08 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201501130749.t0D7n8jv040279@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 13 Jan 2015 07:49:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277116 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 07:49:09 -0000 Author: ganbold Date: Tue Jan 13 07:49:07 2015 New Revision: 277116 URL: https://svnweb.freebsd.org/changeset/base/277116 Log: Add CPU ID for ARM Cortex A17. Approved by: stas (mentor) Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Jan 13 07:46:21 2015 (r277115) +++ head/sys/arm/arm/cpufunc.c Tue Jan 13 07:49:07 2015 (r277116) @@ -1071,6 +1071,7 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA15R1 || cputype == CPU_ID_CORTEXA15R2 || cputype == CPU_ID_CORTEXA15R3 || + cputype == CPU_ID_CORTEXA17 || cputype == CPU_ID_KRAIT ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Tue Jan 13 07:46:21 2015 (r277115) +++ head/sys/arm/arm/identcpu.c Tue Jan 13 07:49:07 2015 (r277116) @@ -193,6 +193,8 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA15R3, CPU_CLASS_CORTEXA, "Cortex A15-r3", generic_steppings }, + { CPU_ID_CORTEXA17, CPU_CLASS_CORTEXA, "Cortex A17", + generic_steppings }, { CPU_ID_KRAIT, CPU_CLASS_KRAIT, "Krait", generic_steppings }, Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Tue Jan 13 07:46:21 2015 (r277115) +++ head/sys/arm/include/armreg.h Tue Jan 13 07:49:07 2015 (r277116) @@ -137,6 +137,7 @@ #define CPU_ID_CORTEXA15R1 0x411fc0f0 #define CPU_ID_CORTEXA15R2 0x412fc0f0 #define CPU_ID_CORTEXA15R3 0x413fc0f0 +#define CPU_ID_CORTEXA17 0x410fc0d0 #define CPU_ID_KRAIT 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ #define CPU_ID_TI925T 0x54029250 #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 08:20:19 2015 Return-Path: Delivered-To: svn-src-head@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 75ABFD4D; Tue, 13 Jan 2015 08:20:19 +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 025228FC; Tue, 13 Jan 2015 08:20:18 +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 t0D8KCkU020861 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 13 Jan 2015 10:20:13 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0D8KCkU020861 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0D8KCSF020860; Tue, 13 Jan 2015 10:20:12 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 13 Jan 2015 10:20:12 +0200 From: Konstantin Belousov To: Steven Hartland Subject: Re: svn commit: r277100 - head/sys/dev/ahci Message-ID: <20150113082012.GI42409@kib.kiev.ua> References: <201501130011.t0D0BvRD026054@svn.freebsd.org> <54B472FC.4090808@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B472FC.4090808@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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 08:20:19 -0000 On Tue, Jan 13, 2015 at 01:21:00AM +0000, Steven Hartland wrote: > Looks like this missed the addition of the new quirk to AHCI_Q_BIT_STRING. Thank you for noting. See the patch below. Is anything else amiss ? Index: sys/dev/ahci/ahci.h =================================================================== --- sys/dev/ahci/ahci.h (revision 277100) +++ sys/dev/ahci/ahci.h (working copy) @@ -591,7 +591,8 @@ "\015NOMSI" \ "\016ATI_PMP_BUG" \ "\017MAXIO_64K" \ - "\020SATA1_UNIT0" + "\020SATA1_UNIT0" \ + "\021ABAR0" int ahci_attach(device_t dev); int ahci_detach(device_t dev); From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 09:16:17 2015 Return-Path: Delivered-To: svn-src-head@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 0528932F for ; Tue, 13 Jan 2015 09:16:17 +0000 (UTC) Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE178EA1 for ; Tue, 13 Jan 2015 09:16:16 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id q59so1635759wes.8 for ; Tue, 13 Jan 2015 01:16:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=sc5Brqph9AIcJJlN/9BvN7hNGRfGyNm3BKm9kcyQS0U=; b=kYi2Cj4xWknty2G/MFbNuMhGhmcVfVcKtwZcSiDEN2OtBGLUuaLP/5ylvfGte17VfT WwANeMgae2c5AB4OZxvGwG6XUANmIw3VgGS8bwBI4FvNDnPWfgfJ4HzX/nRVNDhhA6gy jiLIM9FiQW+Y91sXRy4/rM+fLLty0NPi/epyqjlPGKeO1+59Rboozbf54nzi7Qr291Su FawU57cJald9iAhrsvKhMNCE6KlbR0Z+yQtPEwDkBPfPnY6K4OG2m3yOh3JdUC64jRmv m+kFpOR0o7mxYUCM1qHl0uM6sMhYhHL4YXC03y03njpVx2Qms+40wwICB5D0KcuSFxaV 38pg== X-Gm-Message-State: ALoCoQl0y0GmF6nPcs6CuwrMUVNIFweyGL+8HXZjoQyDs4vQYr4cp7j5nXV5GpWPYQz4Q/wxaOsC X-Received: by 10.195.13.104 with SMTP id ex8mr14053929wjd.12.1421140569103; Tue, 13 Jan 2015 01:16:09 -0800 (PST) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by mx.google.com with ESMTPSA id i15sm24873299wjq.22.2015.01.13.01.16.08 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jan 2015 01:16:08 -0800 (PST) Message-ID: <54B4E24D.9070305@multiplay.co.uk> Date: Tue, 13 Jan 2015 09:15:57 +0000 From: Steven Hartland User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277100 - head/sys/dev/ahci References: <201501130011.t0D0BvRD026054@svn.freebsd.org> <54B472FC.4090808@freebsd.org> <20150113082012.GI42409@kib.kiev.ua> In-Reply-To: <20150113082012.GI42409@kib.kiev.ua> 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 09:16:17 -0000 On 13/01/2015 08:20, Konstantin Belousov wrote: > On Tue, Jan 13, 2015 at 01:21:00AM +0000, Steven Hartland wrote: >> Looks like this missed the addition of the new quirk to AHCI_Q_BIT_STRING. > Thank you for noting. > > See the patch below. Is anything else amiss ? > > Index: sys/dev/ahci/ahci.h > =================================================================== > --- sys/dev/ahci/ahci.h (revision 277100) > +++ sys/dev/ahci/ahci.h (working copy) > @@ -591,7 +591,8 @@ > "\015NOMSI" \ > "\016ATI_PMP_BUG" \ > "\017MAXIO_64K" \ > - "\020SATA1_UNIT0" > + "\020SATA1_UNIT0" \ > + "\021ABAR0" > > int ahci_attach(device_t dev); > int ahci_detach(device_t dev); Yep that's the puppy, everything else looks good :) From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 09:50:16 2015 Return-Path: Delivered-To: svn-src-head@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 58990968; Tue, 13 Jan 2015 09:50: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 45098267; Tue, 13 Jan 2015 09:50: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 t0D9oGfZ096859; Tue, 13 Jan 2015 09:50:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0D9oGqk096858; Tue, 13 Jan 2015 09:50:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501130950.t0D9oGqk096858@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 13 Jan 2015 09:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277126 - head/sys/dev/ahci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 09:50:16 -0000 Author: kib Date: Tue Jan 13 09:50:15 2015 New Revision: 277126 URL: https://svnweb.freebsd.org/changeset/base/277126 Log: Complete r277100: add AHCI_Q_ABAR0 tp AHCI_Q_BIT_STRING. Noted and reviewed by: smh MFC after: 6 days Modified: head/sys/dev/ahci/ahci.h Modified: head/sys/dev/ahci/ahci.h ============================================================================== --- head/sys/dev/ahci/ahci.h Tue Jan 13 09:29:34 2015 (r277125) +++ head/sys/dev/ahci/ahci.h Tue Jan 13 09:50:15 2015 (r277126) @@ -591,7 +591,8 @@ enum ahci_err_type { "\015NOMSI" \ "\016ATI_PMP_BUG" \ "\017MAXIO_64K" \ - "\020SATA1_UNIT0" + "\020SATA1_UNIT0" \ + "\021ABAR0" int ahci_attach(device_t dev); int ahci_detach(device_t dev); From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 11:49:02 2015 Return-Path: Delivered-To: svn-src-head@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 B5D56D6E; Tue, 13 Jan 2015 11:49:02 +0000 (UTC) Received: from mail-ob0-x22c.google.com (mail-ob0-x22c.google.com [IPv6:2607:f8b0:4003:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75B7E114; Tue, 13 Jan 2015 11:49:02 +0000 (UTC) Received: by mail-ob0-f172.google.com with SMTP id va8so2063751obc.3; Tue, 13 Jan 2015 03:49:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=4G8F9gV23jhZPKTbUiDRWSWN2uolgaIrzyGq65r4twI=; b=vPLG7iO8NAI8IHO/nKwX7oJBhPX9JstEJD0+uR1R683SJZ+On0N65EiA9p3OiYKgop 5/Aseb/drHZQgZFnaCA4V18LrigebsUde1BqurpwPnpWGOy12qnCcmoc474hj9RupT4T DGURnT3gD+QwQrNbKArKXnVjMrCuHXnyBPG7aRdMilZW4YZizOgCimYhLXUYMM0tYuB1 jPfb+NtL7uI93WS4y1RC4YLEG/WppTgEM7fj0JwOvmahZ9NtX3GuIL46kHfY8s5OsBZC cjj48KuJu8SXZ8SzyThgE8aQvvstiKSe47Y6XHmyemgx5MfkxsQKaJC71N7+Hc4jFb/+ JNbA== MIME-Version: 1.0 X-Received: by 10.202.231.209 with SMTP id e200mr19450466oih.63.1421149741842; Tue, 13 Jan 2015 03:49:01 -0800 (PST) Received: by 10.182.156.71 with HTTP; Tue, 13 Jan 2015 03:49:01 -0800 (PST) In-Reply-To: <54B3F10F.70506@FreeBSD.org> References: <201501120833.t0C8X53s071470@svn.freebsd.org> <54B3F10F.70506@FreeBSD.org> Date: Tue, 13 Jan 2015 20:49:01 +0900 Message-ID: Subject: Re: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc From: Midori Kato To: Pedro Giffuni Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, Lars Eggert , Hiren Panchasara X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 11:49:02 -0000 Hi Pedro, Thank you for your mention about the patent problem. Thanks to Hiren and Lars support, we have already discuss patent with microsoft people. But I am not sure that we must care about Linux because we worked on our implementation without linux. Let's wait and see if redhat people say about it. Again, thank you for your interest to dctcp implementation :) Regards, -- Midori 2015-01-13 1:06 GMT+09:00 Pedro Giffuni : > > On 12/01/2015 03:33 a.m., Hiren Panchasara wrote: > >> Author: hiren >> Date: Mon Jan 12 08:33:04 2015 >> New Revision: 277054 >> URL: https://svnweb.freebsd.org/changeset/base/277054 >> >> Log: >> DCTCP (Data Center TCP) implementation. >> DCTCP congestion control algorithm aims to maximise throughput and >> minimise >> latency in data center networks by utilising the proportion of Explicit >> Congestion Notification (ECN) marked packets received from capable >> hardware as a >> congestion signal. >> Highlights: >> Implemented as a mod_cc(4) module. >> ECN (Explicit congestion notification) processing is done differently >> from >> RFC3168. >> Takes one-sided DCTCP into consideration where only one of the sides >> is using >> DCTCP and other is using standard ECN. >> IETF draft: http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00 >> Thesis report by Midori Kato: https://eggert.org/students/ >> kato-thesis.pdf >> Submitted by: Midori Kato and >> Lars Eggert >> with help and modifications from >> hiren >> Differential Revision: https://reviews.freebsd.org/D604 >> Reviewed by: gnn >> > > Missing > > RelNotes= yes > > Huge thank you! > > FWIW, I thought the linux guys wouldn't take it over some GPL vs patent > issue but apparently redhat pushed some muscle and just did it: > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id= > e3118e8359bb7c59555aca60c725106e6d78c5ce > > Not that I care much what they do ;). > > Pedro. > > From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 13:32:19 2015 Return-Path: Delivered-To: svn-src-head@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 62E7CDC0; Tue, 13 Jan 2015 13:32: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 4E654E84; Tue, 13 Jan 2015 13:32: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 t0DDWJ5G004520; Tue, 13 Jan 2015 13:32:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DDWJNb004519; Tue, 13 Jan 2015 13:32:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131332.t0DDWJNb004519@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 13:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277127 - head/sys/fs/cuse X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 13:32:19 -0000 Author: hselasky Date: Tue Jan 13 13:32:18 2015 New Revision: 277127 URL: https://svnweb.freebsd.org/changeset/base/277127 Log: Don't use POLLNVAL as a return value from the client side poll function. Many existing clients don't understand POLLNVAL and instead relies on an error code from the read(), write() or ioctl() system call. Also make sure we wakeup any client pollers before the cuse server is closing, so they don't wait forever for an event. Modified: head/sys/fs/cuse/cuse.c Modified: head/sys/fs/cuse/cuse.c ============================================================================== --- head/sys/fs/cuse/cuse.c Tue Jan 13 09:50:15 2015 (r277126) +++ head/sys/fs/cuse/cuse.c Tue Jan 13 13:32:18 2015 (r277127) @@ -142,6 +142,7 @@ static struct cuse_server *cuse_alloc_un static int cuse_alloc_unit_id[CUSE_DEVICES_MAX]; static struct cuse_memory cuse_mem[CUSE_ALLOC_UNIT_MAX]; +static void cuse_server_wakeup_all_client_locked(struct cuse_server *pcs); static void cuse_client_kqfilter_read_detach(struct knote *kn); static void cuse_client_kqfilter_write_detach(struct knote *kn); static int cuse_client_kqfilter_read_event(struct knote *kn, long hint); @@ -648,6 +649,8 @@ cuse_server_free(void *arg) return; } cuse_server_is_closing(pcs); + /* final client wakeup, if any */ + cuse_server_wakeup_all_client_locked(pcs); TAILQ_REMOVE(&cuse_server_head, pcs, entry); @@ -716,6 +719,9 @@ cuse_server_close(struct cdev *dev, int cuse_lock(); cuse_server_is_closing(pcs); + /* final client wakeup, if any */ + cuse_server_wakeup_all_client_locked(pcs); + knlist_clear(&pcs->selinfo.si_note, 1); cuse_unlock(); @@ -920,6 +926,18 @@ cuse_server_wakeup_locked(struct cuse_se KNOTE_LOCKED(&pcs->selinfo.si_note, 0); } +static void +cuse_server_wakeup_all_client_locked(struct cuse_server *pcs) +{ + struct cuse_client *pcc; + + TAILQ_FOREACH(pcc, &pcs->hcli, entry) { + pcc->cflags |= (CUSE_CLI_KNOTE_NEED_READ | + CUSE_CLI_KNOTE_NEED_WRITE); + } + cuse_server_wakeup_locked(pcs); +} + static int cuse_free_unit_by_id_locked(struct cuse_server *pcs, int id) { @@ -1226,11 +1244,7 @@ cuse_server_ioctl(struct cdev *dev, unsi * We don't know which direction caused the event. * Wakeup both! */ - TAILQ_FOREACH(pcc, &pcs->hcli, entry) { - pcc->cflags |= (CUSE_CLI_KNOTE_NEED_READ | - CUSE_CLI_KNOTE_NEED_WRITE); - } - cuse_server_wakeup_locked(pcs); + cuse_server_wakeup_all_client_locked(pcs); cuse_unlock(); break; @@ -1677,7 +1691,7 @@ cuse_client_poll(struct cdev *dev, int e error = cuse_client_get(&pcc); if (error != 0) - return (POLLNVAL); + goto pollnval; temp = 0; @@ -1705,8 +1719,10 @@ cuse_client_poll(struct cdev *dev, int e error = cuse_client_receive_command_locked(pccmd, 0, 0); cuse_unlock(); + cuse_cmd_unlock(pccmd); + if (error < 0) { - revents = POLLNVAL; + goto pollnval; } else { revents = 0; if (error & CUSE_POLL_READ) @@ -1716,10 +1732,12 @@ cuse_client_poll(struct cdev *dev, int e if (error & CUSE_POLL_ERROR) revents |= (events & POLLHUP); } - - cuse_cmd_unlock(pccmd); - return (revents); + + pollnval: + /* XXX many clients don't understand POLLNVAL */ + return (events & (POLLHUP | POLLPRI | POLLIN | + POLLRDNORM | POLLOUT | POLLWRNORM)); } static int From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 13:59:49 2015 Return-Path: Delivered-To: svn-src-head@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 59BC2774; Tue, 13 Jan 2015 13:59: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 45301189; Tue, 13 Jan 2015 13:59: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 t0DDxnKT014922; Tue, 13 Jan 2015 13:59:49 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DDxnXP014921; Tue, 13 Jan 2015 13:59:49 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501131359.t0DDxnXP014921@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 13 Jan 2015 13:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277128 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 13:59:49 -0000 Author: trasz Date: Tue Jan 13 13:59:48 2015 New Revision: 277128 URL: https://svnweb.freebsd.org/changeset/base/277128 Log: Fix detection of ext2/ext3 filesystems that lack labels. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/fstyp/ext2fs.c Modified: head/usr.sbin/fstyp/ext2fs.c ============================================================================== --- head/usr.sbin/fstyp/ext2fs.c Tue Jan 13 13:32:18 2015 (r277127) +++ head/usr.sbin/fstyp/ext2fs.c Tue Jan 13 13:59:48 2015 (r277128) @@ -78,12 +78,6 @@ fstyp_ext2fs(FILE *fp, char *label, size if (s_volume_name[0] == '/') s_volume_name += 1; - /* Check for volume label */ - if (s_volume_name[0] == '\0') { - free(fs); - return (1); - } - strlcpy(label, s_volume_name, size); free(fs); From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 14:03:58 2015 Return-Path: Delivered-To: svn-src-head@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 A8EE1A87; Tue, 13 Jan 2015 14:03: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 9350B268; Tue, 13 Jan 2015 14:03: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 t0DE3wZX019117; Tue, 13 Jan 2015 14:03:58 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DE3vOh019109; Tue, 13 Jan 2015 14:03:57 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501131403.t0DE3vOh019109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 13 Jan 2015 14:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277129 - in head/sys: conf dev/usb dev/usb/template X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 14:03:58 -0000 Author: br Date: Tue Jan 13 14:03:56 2015 New Revision: 277129 URL: https://svnweb.freebsd.org/changeset/base/277129 Log: Add usb template SERIALNET allowing us to have both USB CDC Ethernet and USB CDC Modem same time by single cable. Reviewed by: hselasky@ Added: head/sys/dev/usb/template/usb_template_serialnet.c (contents, props changed) Modified: head/sys/conf/files head/sys/dev/usb/template/usb_template.c head/sys/dev/usb/template/usb_template.h head/sys/dev/usb/usb_ioctl.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/conf/files Tue Jan 13 14:03:56 2015 (r277129) @@ -2559,6 +2559,7 @@ dev/usb/template/usb_template_mouse.c op dev/usb/template/usb_template_msc.c optional usb_template dev/usb/template/usb_template_mtp.c optional usb_template dev/usb/template/usb_template_phone.c optional usb_template +dev/usb/template/usb_template_serialnet.c optional usb_template # # USB END # Modified: head/sys/dev/usb/template/usb_template.c ============================================================================== --- head/sys/dev/usb/template/usb_template.c Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/dev/usb/template/usb_template.c Tue Jan 13 14:03:56 2015 (r277129) @@ -1371,6 +1371,9 @@ usb_temp_setup_by_index(struct usb_devic case USB_TEMP_PHONE: err = usb_temp_setup(udev, &usb_template_phone); break; + case USB_TEMP_SERIALNET: + err = usb_temp_setup(udev, &usb_template_serialnet); + break; default: return (USB_ERR_INVAL); } Modified: head/sys/dev/usb/template/usb_template.h ============================================================================== --- head/sys/dev/usb/template/usb_template.h Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/dev/usb/template/usb_template.h Tue Jan 13 14:03:56 2015 (r277129) @@ -106,6 +106,7 @@ extern const struct usb_temp_device_desc extern const struct usb_temp_device_desc usb_template_msc; extern const struct usb_temp_device_desc usb_template_mtp; extern const struct usb_temp_device_desc usb_template_phone; +extern const struct usb_temp_device_desc usb_template_serialnet; usb_error_t usb_temp_setup(struct usb_device *, const struct usb_temp_device_desc *); Added: head/sys/dev/usb/template/usb_template_serialnet.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/usb/template/usb_template_serialnet.c Tue Jan 13 14:03:56 2015 (r277129) @@ -0,0 +1,387 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237) + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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. + */ +/* + * This file contains the USB template for USB Networking and Serial + */ + +#include +__FBSDID("$FreeBSD$"); + +#ifdef USB_GLOBAL_INCLUDE_FILE +#include USB_GLOBAL_INCLUDE_FILE +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#endif /* USB_GLOBAL_INCLUDE_FILE */ + +#define MODEM_IFACE_0 0 +#define MODEM_IFACE_1 1 + +enum { + STRING_LANG_INDEX, + STRING_MODEM_INDEX, + STRING_ETH_MAC_INDEX, + STRING_ETH_CONTROL_INDEX, + STRING_ETH_DATA_INDEX, + STRING_ETH_CONFIG_INDEX, + STRING_CONFIG_INDEX, + STRING_VENDOR_INDEX, + STRING_PRODUCT_INDEX, + STRING_SERIAL_INDEX, + STRING_MAX, +}; + +#define STRING_MODEM \ + "U\0S\0B\0 \0M\0o\0d\0e\0m\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_ETH_MAC \ + "2\0A\0002\0003\0004\0005\0006\0007\08\09\0A\0B" + +#define STRING_ETH_CONTROL \ + "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 " \ + "\0C\0o\0m\0m\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_ETH_DATA \ + "U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0D\0a\0t\0a\0 " \ + "\0I\0n\0t\0e\0r\0f\0a\0c\0e" + +#define STRING_CONFIG \ + "D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g\0u\0r\0a\0t\0i\0o\0n" + +#define STRING_VENDOR \ + "T\0h\0e\0 \0F\0r\0e\0e\0B\0S\0D\0 \0P\0r\0o\0j\0e\0c\0t" + +#define STRING_PRODUCT \ + "S\0E\0R\0I\0A\0L\0N\0E\0T" + +#define STRING_SERIAL \ + "J\0a\0n\0u\0a\0r\0y\0 \0002\0000\0001\0005" + +/* make the real string descriptors */ + +USB_MAKE_STRING_DESC(STRING_MODEM, string_modem); +USB_MAKE_STRING_DESC(STRING_ETH_MAC, string_eth_mac); +USB_MAKE_STRING_DESC(STRING_ETH_CONTROL, string_eth_control); +USB_MAKE_STRING_DESC(STRING_ETH_DATA, string_eth_data); +USB_MAKE_STRING_DESC(STRING_CONFIG, string_serialnet_config); +USB_MAKE_STRING_DESC(STRING_VENDOR, string_serialnet_vendor); +USB_MAKE_STRING_DESC(STRING_PRODUCT, string_serialnet_product); +USB_MAKE_STRING_DESC(STRING_SERIAL, string_serialnet_serial); + +/* prototypes */ + +static usb_temp_get_string_desc_t serialnet_get_string_desc; + +static const struct usb_cdc_union_descriptor eth_union_desc = { + .bLength = sizeof(eth_union_desc), + .bDescriptorType = UDESC_CS_INTERFACE, + .bDescriptorSubtype = UDESCSUB_CDC_UNION, + .bMasterInterface = 0, /* this is automatically updated */ + .bSlaveInterface[0] = 1, /* this is automatically updated */ +}; + +static const struct usb_cdc_header_descriptor eth_header_desc = { + .bLength = sizeof(eth_header_desc), + .bDescriptorType = UDESC_CS_INTERFACE, + .bDescriptorSubtype = UDESCSUB_CDC_HEADER, + .bcdCDC[0] = 0x10, + .bcdCDC[1] = 0x01, +}; + +static const struct usb_cdc_ethernet_descriptor eth_enf_desc = { + .bLength = sizeof(eth_enf_desc), + .bDescriptorType = UDESC_CS_INTERFACE, + .bDescriptorSubtype = UDESCSUB_CDC_ENF, + .iMacAddress = STRING_ETH_MAC_INDEX, + .bmEthernetStatistics = {0, 0, 0, 0}, + .wMaxSegmentSize = {0xEA, 0x05},/* 1514 bytes */ + .wNumberMCFilters = {0, 0}, + .bNumberPowerFilters = 0, +}; + +static const void *eth_control_if_desc[] = { + ð_union_desc, + ð_header_desc, + ð_enf_desc, + NULL, +}; + +static const struct usb_temp_packet_size bulk_mps = { + .mps[USB_SPEED_FULL] = 64, + .mps[USB_SPEED_HIGH] = 512, +}; + +static const struct usb_temp_packet_size intr_mps = { + .mps[USB_SPEED_FULL] = 8, + .mps[USB_SPEED_HIGH] = 8, +}; + +static const struct usb_temp_endpoint_desc bulk_in_ep = { + .pPacketSize = &bulk_mps, +#ifdef USB_HIP_IN_EP_0 + .bEndpointAddress = USB_HIP_IN_EP_0, +#else + .bEndpointAddress = UE_DIR_IN, +#endif + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc bulk_out_ep = { + .pPacketSize = &bulk_mps, +#ifdef USB_HIP_OUT_EP_0 + .bEndpointAddress = USB_HIP_OUT_EP_0, +#else + .bEndpointAddress = UE_DIR_OUT, +#endif + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc intr_in_ep = { + .pPacketSize = &intr_mps, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_INTERRUPT, +}; + +static const struct usb_temp_endpoint_desc *eth_intr_endpoints[] = { + &intr_in_ep, + NULL, +}; + +static const struct usb_temp_interface_desc eth_control_interface = { + .ppEndpoints = eth_intr_endpoints, + .ppRawDesc = eth_control_if_desc, + .bInterfaceClass = UICLASS_CDC, + .bInterfaceSubClass = UISUBCLASS_ETHERNET_NETWORKING_CONTROL_MODEL, + .bInterfaceProtocol = 0, + .iInterface = STRING_ETH_CONTROL_INDEX, +}; + +static const struct usb_temp_endpoint_desc *eth_data_endpoints[] = { + &bulk_in_ep, + &bulk_out_ep, + NULL, +}; + +static const struct usb_temp_interface_desc eth_data_null_interface = { + .ppEndpoints = NULL, /* no endpoints */ + .bInterfaceClass = UICLASS_CDC_DATA, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = STRING_ETH_DATA_INDEX, +}; + +static const struct usb_temp_interface_desc eth_data_interface = { + .ppEndpoints = eth_data_endpoints, + .bInterfaceClass = UICLASS_CDC_DATA, + .bInterfaceSubClass = UISUBCLASS_DATA, + .bInterfaceProtocol = 0, + .iInterface = STRING_ETH_DATA_INDEX, + .isAltInterface = 1, /* this is an alternate setting */ +}; + +static const struct usb_temp_packet_size modem_bulk_mps = { + .mps[USB_SPEED_LOW] = 8, + .mps[USB_SPEED_FULL] = 64, + .mps[USB_SPEED_HIGH] = 512, +}; + +static const struct usb_temp_packet_size modem_intr_mps = { + .mps[USB_SPEED_LOW] = 8, + .mps[USB_SPEED_FULL] = 8, + .mps[USB_SPEED_HIGH] = 8, +}; + +static const struct usb_temp_interval modem_intr_interval = { + .bInterval[USB_SPEED_LOW] = 8, /* 8ms */ + .bInterval[USB_SPEED_FULL] = 8, /* 8ms */ + .bInterval[USB_SPEED_HIGH] = 7, /* 8ms */ +}; + +static const struct usb_temp_endpoint_desc modem_ep_0 = { + .pPacketSize = &modem_intr_mps, + .pIntervals = &modem_intr_interval, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_INTERRUPT, +}; + +static const struct usb_temp_endpoint_desc modem_ep_1 = { + .pPacketSize = &modem_bulk_mps, + .bEndpointAddress = UE_DIR_OUT, + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc modem_ep_2 = { + .pPacketSize = &modem_bulk_mps, + .bEndpointAddress = UE_DIR_IN, + .bmAttributes = UE_BULK, +}; + +static const struct usb_temp_endpoint_desc *modem_iface_0_ep[] = { + &modem_ep_0, + NULL, +}; + +static const struct usb_temp_endpoint_desc *modem_iface_1_ep[] = { + &modem_ep_1, + &modem_ep_2, + NULL, +}; + +static const uint8_t modem_raw_desc_0[] = { + 0x05, 0x24, 0x00, 0x10, 0x01 +}; + +static const uint8_t modem_raw_desc_1[] = { + 0x05, 0x24, 0x06, MODEM_IFACE_0, MODEM_IFACE_1 +}; + +static const uint8_t modem_raw_desc_2[] = { + 0x05, 0x24, 0x01, 0x03, MODEM_IFACE_1 +}; + +static const uint8_t modem_raw_desc_3[] = { + 0x04, 0x24, 0x02, 0x07 +}; + +static const void *modem_iface_0_desc[] = { + &modem_raw_desc_0, + &modem_raw_desc_1, + &modem_raw_desc_2, + &modem_raw_desc_3, + NULL, +}; + +static const struct usb_temp_interface_desc modem_iface_0 = { + .ppRawDesc = modem_iface_0_desc, + .ppEndpoints = modem_iface_0_ep, + .bInterfaceClass = 2, + .bInterfaceSubClass = 2, + .bInterfaceProtocol = 1, + .iInterface = STRING_MODEM_INDEX, +}; + +static const struct usb_temp_interface_desc modem_iface_1 = { + .ppEndpoints = modem_iface_1_ep, + .bInterfaceClass = 10, + .bInterfaceSubClass = 0, + .bInterfaceProtocol = 0, + .iInterface = STRING_MODEM_INDEX, +}; + +static const struct usb_temp_interface_desc *serialnet_interfaces[] = { + &modem_iface_0, + &modem_iface_1, + ð_control_interface, + ð_data_null_interface, + ð_data_interface, + NULL, +}; + +static const struct usb_temp_config_desc serialnet_config_desc = { + .ppIfaceDesc = serialnet_interfaces, + .bmAttributes = UC_BUS_POWERED, + .bMaxPower = 25, /* 50 mA */ + .iConfiguration = STRING_CONFIG_INDEX, +}; +static const struct usb_temp_config_desc *serialnet_configs[] = { + &serialnet_config_desc, + NULL, +}; + +const struct usb_temp_device_desc usb_template_serialnet = { + .getStringDesc = &serialnet_get_string_desc, + .ppConfigDesc = serialnet_configs, + .idVendor = USB_TEMPLATE_VENDOR, + .idProduct = 0x0001, + .bcdDevice = 0x0100, + .bDeviceClass = UDCLASS_COMM, + .bDeviceSubClass = 0, + .bDeviceProtocol = 0, + .iManufacturer = STRING_VENDOR_INDEX, + .iProduct = STRING_PRODUCT_INDEX, + .iSerialNumber = STRING_SERIAL_INDEX, +}; + +/*------------------------------------------------------------------------* + * serialnet_get_string_desc + * + * Return values: + * NULL: Failure. No such string. + * Else: Success. Pointer to string descriptor is returned. + *------------------------------------------------------------------------*/ +static const void * +serialnet_get_string_desc(uint16_t lang_id, uint8_t string_index) +{ + static const void *ptr[STRING_MAX] = { + [STRING_LANG_INDEX] = &usb_string_lang_en, + [STRING_MODEM_INDEX] = &string_modem, + [STRING_ETH_MAC_INDEX] = &string_eth_mac, + [STRING_ETH_CONTROL_INDEX] = &string_eth_control, + [STRING_ETH_DATA_INDEX] = &string_eth_data, + [STRING_CONFIG_INDEX] = &string_serialnet_config, + [STRING_VENDOR_INDEX] = &string_serialnet_vendor, + [STRING_PRODUCT_INDEX] = &string_serialnet_product, + [STRING_SERIAL_INDEX] = &string_serialnet_serial, + }; + + if (string_index == 0) { + return (&usb_string_lang_en); + } + if (lang_id != 0x0409) { + return (NULL); + } + if (string_index < STRING_MAX) { + return (ptr[string_index]); + } + return (NULL); +} Modified: head/sys/dev/usb/usb_ioctl.h ============================================================================== --- head/sys/dev/usb/usb_ioctl.h Tue Jan 13 13:59:48 2015 (r277128) +++ head/sys/dev/usb/usb_ioctl.h Tue Jan 13 14:03:56 2015 (r277129) @@ -65,6 +65,7 @@ enum { USB_TEMP_KBD, /* USB Keyboard */ USB_TEMP_MOUSE, /* USB Mouse */ USB_TEMP_PHONE, /* USB Phone */ + USB_TEMP_SERIALNET, /* USB CDC Ethernet and Modem */ USB_TEMP_MAX, }; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 14:15:01 2015 Return-Path: Delivered-To: svn-src-head@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 17401DCA; Tue, 13 Jan 2015 14:15: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 039E43E5; Tue, 13 Jan 2015 14:15: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 t0DEF0XD024018; Tue, 13 Jan 2015 14:15:00 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DEF0vF024017; Tue, 13 Jan 2015 14:15:00 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501131415.t0DEF0vF024017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Tue, 13 Jan 2015 14:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277130 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 14:15:01 -0000 Author: bz Date: Tue Jan 13 14:15:00 2015 New Revision: 277130 URL: https://svnweb.freebsd.org/changeset/base/277130 Log: Move the vsi variable outside of the #ifdef block to unbreak NOIP kernels after r277084. MFC after: 6 days X-MFC with: r277084 Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 14:03:56 2015 (r277129) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 14:15:00 2015 (r277130) @@ -1108,8 +1108,8 @@ int ixl_init_rx_ring(struct ixl_queue *que) { struct rx_ring *rxr = &que->rxr; -#if defined(INET6) || defined(INET) struct ixl_vsi *vsi = que->vsi; +#if defined(INET6) || defined(INET) struct ifnet *ifp = vsi->ifp; struct lro_ctrl *lro = &rxr->lro; #endif From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 14:26:06 2015 Return-Path: Delivered-To: svn-src-head@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 3F0E2830; Tue, 13 Jan 2015 14:26: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 29CD9790; Tue, 13 Jan 2015 14:26: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 t0DEQ61W029629; Tue, 13 Jan 2015 14:26:06 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DEQ6XH029628; Tue, 13 Jan 2015 14:26:06 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131426.t0DEQ6XH029628@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 14:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277131 - head/sys/modules/usb/template X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 14:26:06 -0000 Author: hselasky Date: Tue Jan 13 14:26:05 2015 New Revision: 277131 URL: https://svnweb.freebsd.org/changeset/base/277131 Log: Add new USB template to the USB template module. Modified: head/sys/modules/usb/template/Makefile Modified: head/sys/modules/usb/template/Makefile ============================================================================== --- head/sys/modules/usb/template/Makefile Tue Jan 13 14:15:00 2015 (r277130) +++ head/sys/modules/usb/template/Makefile Tue Jan 13 14:26:05 2015 (r277131) @@ -39,6 +39,7 @@ SRCS= opt_bus.h opt_usb.h device_if.h bu usb_template_mouse.c \ usb_template_msc.c \ usb_template_mtp.c \ - usb_template_phone.c + usb_template_phone.c \ + usb_template_serialnet.c .include From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 15:04:30 2015 Return-Path: Delivered-To: svn-src-head@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 5FA0E6DA; Tue, 13 Jan 2015 15:04: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 3FF70B98; Tue, 13 Jan 2015 15:04: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 t0DF4US3049288; Tue, 13 Jan 2015 15:04:30 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DF4TCG049283; Tue, 13 Jan 2015 15:04:29 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501131504.t0DF4TCG049283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 13 Jan 2015 15:04:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277132 - in head/sys: arm/samsung/exynos dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:04:30 -0000 Author: br Date: Tue Jan 13 15:04:28 2015 New Revision: 277132 URL: https://svnweb.freebsd.org/changeset/base/277132 Log: Rename Exynos UART driver. No functional change. Submitted by: Michal Meloun Modified: head/sys/arm/samsung/exynos/exynos_uart.c head/sys/dev/uart/uart.h head/sys/dev/uart/uart_bus_fdt.c Modified: head/sys/arm/samsung/exynos/exynos_uart.c ============================================================================== --- head/sys/arm/samsung/exynos/exynos_uart.c Tue Jan 13 14:26:05 2015 (r277131) +++ head/sys/arm/samsung/exynos/exynos_uart.c Tue Jan 13 15:04:28 2015 (r277132) @@ -50,17 +50,17 @@ __FBSDID("$FreeBSD$"); #define DEF_CLK 100000000 static int sscomspeed(long, long); -static int s3c24x0_uart_param(struct uart_bas *, int, int, int, int); +static int exynos4210_uart_param(struct uart_bas *, int, int, int, int); /* * Low-level UART interface. */ -static int s3c2410_probe(struct uart_bas *bas); -static void s3c2410_init(struct uart_bas *bas, int, int, int, int); -static void s3c2410_term(struct uart_bas *bas); -static void s3c2410_putc(struct uart_bas *bas, int); -static int s3c2410_rxready(struct uart_bas *bas); -static int s3c2410_getc(struct uart_bas *bas, struct mtx *mtx); +static int exynos4210_probe(struct uart_bas *bas); +static void exynos4210_init(struct uart_bas *bas, int, int, int, int); +static void exynos4210_term(struct uart_bas *bas); +static void exynos4210_putc(struct uart_bas *bas, int); +static int exynos4210_rxready(struct uart_bas *bas); +static int exynos4210_getc(struct uart_bas *bas, struct mtx *mtx); extern SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs; @@ -76,7 +76,7 @@ sscomspeed(long speed, long frequency) } static int -s3c24x0_uart_param(struct uart_bas *bas, int baudrate, int databits, +exynos4210_uart_param(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { int brd, ulcon; @@ -127,38 +127,38 @@ s3c24x0_uart_param(struct uart_bas *bas, return (0); } -struct uart_ops uart_s3c2410_ops = { - .probe = s3c2410_probe, - .init = s3c2410_init, - .term = s3c2410_term, - .putc = s3c2410_putc, - .rxready = s3c2410_rxready, - .getc = s3c2410_getc, +struct uart_ops uart_exynos4210_ops = { + .probe = exynos4210_probe, + .init = exynos4210_init, + .term = exynos4210_term, + .putc = exynos4210_putc, + .rxready = exynos4210_rxready, + .getc = exynos4210_getc, }; static int -s3c2410_probe(struct uart_bas *bas) +exynos4210_probe(struct uart_bas *bas) { return (0); } static void -s3c2410_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, +exynos4210_init(struct uart_bas *bas, int baudrate, int databits, int stopbits, int parity) { if (bas->rclk == 0) bas->rclk = DEF_CLK; - KASSERT(bas->rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(bas->rclk != 0, ("exynos4210_init: Invalid rclk")); uart_setreg(bas, SSCOM_UCON, 0); uart_setreg(bas, SSCOM_UFCON, UFCON_TXTRIGGER_8 | UFCON_RXTRIGGER_8 | UFCON_TXFIFO_RESET | UFCON_RXFIFO_RESET | UFCON_FIFO_ENABLE); - s3c24x0_uart_param(bas, baudrate, databits, stopbits, parity); + exynos4210_uart_param(bas, baudrate, databits, stopbits, parity); /* Enable UART. */ uart_setreg(bas, SSCOM_UCON, UCON_TXMODE_INT | UCON_RXMODE_INT | @@ -167,13 +167,13 @@ s3c2410_init(struct uart_bas *bas, int b } static void -s3c2410_term(struct uart_bas *bas) +exynos4210_term(struct uart_bas *bas) { /* XXX */ } static void -s3c2410_putc(struct uart_bas *bas, int c) +exynos4210_putc(struct uart_bas *bas, int c) { while ((bus_space_read_4(bas->bst, bas->bsh, SSCOM_UFSTAT) & @@ -184,7 +184,7 @@ s3c2410_putc(struct uart_bas *bas, int c } static int -s3c2410_rxready(struct uart_bas *bas) +exynos4210_rxready(struct uart_bas *bas) { return ((uart_getreg(bas, SSCOM_UTRSTAT) & UTRSTAT_RXREADY) == @@ -192,7 +192,7 @@ s3c2410_rxready(struct uart_bas *bas) } static int -s3c2410_getc(struct uart_bas *bas, struct mtx *mtx) +exynos4210_getc(struct uart_bas *bas, struct mtx *mtx) { int utrstat; @@ -205,34 +205,34 @@ s3c2410_getc(struct uart_bas *bas, struc return (bus_space_read_1(bas->bst, bas->bsh, SSCOM_URXH)); } -static int s3c2410_bus_probe(struct uart_softc *sc); -static int s3c2410_bus_attach(struct uart_softc *sc); -static int s3c2410_bus_flush(struct uart_softc *, int); -static int s3c2410_bus_getsig(struct uart_softc *); -static int s3c2410_bus_ioctl(struct uart_softc *, int, intptr_t); -static int s3c2410_bus_ipend(struct uart_softc *); -static int s3c2410_bus_param(struct uart_softc *, int, int, int, int); -static int s3c2410_bus_receive(struct uart_softc *); -static int s3c2410_bus_setsig(struct uart_softc *, int); -static int s3c2410_bus_transmit(struct uart_softc *); - -static kobj_method_t s3c2410_methods[] = { - KOBJMETHOD(uart_probe, s3c2410_bus_probe), - KOBJMETHOD(uart_attach, s3c2410_bus_attach), - KOBJMETHOD(uart_flush, s3c2410_bus_flush), - KOBJMETHOD(uart_getsig, s3c2410_bus_getsig), - KOBJMETHOD(uart_ioctl, s3c2410_bus_ioctl), - KOBJMETHOD(uart_ipend, s3c2410_bus_ipend), - KOBJMETHOD(uart_param, s3c2410_bus_param), - KOBJMETHOD(uart_receive, s3c2410_bus_receive), - KOBJMETHOD(uart_setsig, s3c2410_bus_setsig), - KOBJMETHOD(uart_transmit, s3c2410_bus_transmit), +static int exynos4210_bus_probe(struct uart_softc *sc); +static int exynos4210_bus_attach(struct uart_softc *sc); +static int exynos4210_bus_flush(struct uart_softc *, int); +static int exynos4210_bus_getsig(struct uart_softc *); +static int exynos4210_bus_ioctl(struct uart_softc *, int, intptr_t); +static int exynos4210_bus_ipend(struct uart_softc *); +static int exynos4210_bus_param(struct uart_softc *, int, int, int, int); +static int exynos4210_bus_receive(struct uart_softc *); +static int exynos4210_bus_setsig(struct uart_softc *, int); +static int exynos4210_bus_transmit(struct uart_softc *); + +static kobj_method_t exynos4210_methods[] = { + KOBJMETHOD(uart_probe, exynos4210_bus_probe), + KOBJMETHOD(uart_attach, exynos4210_bus_attach), + KOBJMETHOD(uart_flush, exynos4210_bus_flush), + KOBJMETHOD(uart_getsig, exynos4210_bus_getsig), + KOBJMETHOD(uart_ioctl, exynos4210_bus_ioctl), + KOBJMETHOD(uart_ipend, exynos4210_bus_ipend), + KOBJMETHOD(uart_param, exynos4210_bus_param), + KOBJMETHOD(uart_receive, exynos4210_bus_receive), + KOBJMETHOD(uart_setsig, exynos4210_bus_setsig), + KOBJMETHOD(uart_transmit, exynos4210_bus_transmit), {0, 0 } }; int -s3c2410_bus_probe(struct uart_softc *sc) +exynos4210_bus_probe(struct uart_softc *sc) { sc->sc_txfifosz = 16; @@ -242,7 +242,7 @@ s3c2410_bus_probe(struct uart_softc *sc) } static int -s3c2410_bus_attach(struct uart_softc *sc) +exynos4210_bus_attach(struct uart_softc *sc) { sc->sc_hwiflow = 0; @@ -252,7 +252,7 @@ s3c2410_bus_attach(struct uart_softc *sc } static int -s3c2410_bus_transmit(struct uart_softc *sc) +exynos4210_bus_transmit(struct uart_softc *sc) { int i; int reg; @@ -260,7 +260,7 @@ s3c2410_bus_transmit(struct uart_softc * uart_lock(sc->sc_hwmtx); for (i = 0; i < sc->sc_txdatasz; i++) { - s3c2410_putc(&sc->sc_bas, sc->sc_txbuf[i]); + exynos4210_putc(&sc->sc_bas, sc->sc_txbuf[i]); uart_barrier(&sc->sc_bas); } @@ -277,14 +277,14 @@ s3c2410_bus_transmit(struct uart_softc * } static int -s3c2410_bus_setsig(struct uart_softc *sc, int sig) +exynos4210_bus_setsig(struct uart_softc *sc, int sig) { return (0); } static int -s3c2410_bus_receive(struct uart_softc *sc) +exynos4210_bus_receive(struct uart_softc *sc) { struct uart_bas *bas; @@ -297,7 +297,7 @@ s3c2410_bus_receive(struct uart_softc *s } static int -s3c2410_bus_param(struct uart_softc *sc, int baudrate, int databits, +exynos4210_bus_param(struct uart_softc *sc, int baudrate, int databits, int stopbits, int parity) { int error; @@ -305,10 +305,10 @@ s3c2410_bus_param(struct uart_softc *sc, if (sc->sc_bas.rclk == 0) sc->sc_bas.rclk = DEF_CLK; - KASSERT(sc->sc_bas.rclk != 0, ("s3c2410_init: Invalid rclk")); + KASSERT(sc->sc_bas.rclk != 0, ("exynos4210_init: Invalid rclk")); uart_lock(sc->sc_hwmtx); - error = s3c24x0_uart_param(&sc->sc_bas, baudrate, databits, stopbits, + error = exynos4210_uart_param(&sc->sc_bas, baudrate, databits, stopbits, parity); uart_unlock(sc->sc_hwmtx); @@ -316,7 +316,7 @@ s3c2410_bus_param(struct uart_softc *sc, } static int -s3c2410_bus_ipend(struct uart_softc *sc) +exynos4210_bus_ipend(struct uart_softc *sc) { uint32_t ints; uint32_t txempty, rxready; @@ -352,31 +352,31 @@ s3c2410_bus_ipend(struct uart_softc *sc) } static int -s3c2410_bus_flush(struct uart_softc *sc, int what) +exynos4210_bus_flush(struct uart_softc *sc, int what) { return (0); } static int -s3c2410_bus_getsig(struct uart_softc *sc) +exynos4210_bus_getsig(struct uart_softc *sc) { return (0); } static int -s3c2410_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) +exynos4210_bus_ioctl(struct uart_softc *sc, int request, intptr_t data) { return (EINVAL); } -struct uart_class uart_s3c2410_class = { - "s3c2410 class", - s3c2410_methods, +struct uart_class uart_exynos4210_class = { + "exynos4210 class", + exynos4210_methods, 1, - .uc_ops = &uart_s3c2410_ops, + .uc_ops = &uart_exynos4210_ops, .uc_range = 8, .uc_rclk = 0, }; Modified: head/sys/dev/uart/uart.h ============================================================================== --- head/sys/dev/uart/uart.h Tue Jan 13 14:26:05 2015 (r277131) +++ head/sys/dev/uart/uart.h Tue Jan 13 15:04:28 2015 (r277132) @@ -78,6 +78,7 @@ extern struct uart_class uart_cdnc_class extern struct uart_class uart_ti8250_class __attribute__((weak)); extern struct uart_class uart_vybrid_class __attribute__((weak)); extern struct uart_class at91_usart_class __attribute__((weak)); +extern struct uart_class uart_exynos4210_class __attribute__((weak)); #ifdef FDT struct ofw_compat_data; Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Tue Jan 13 14:26:05 2015 (r277131) +++ head/sys/dev/uart/uart_bus_fdt.c Tue Jan 13 15:04:28 2015 (r277132) @@ -74,7 +74,7 @@ static struct ofw_compat_data compat_dat {"atmel,at91rm9200-usart",(uintptr_t)&at91_usart_class}, {"atmel,at91sam9260-usart",(uintptr_t)&at91_usart_class}, {"cadence,uart", (uintptr_t)&uart_cdnc_class}, - {"exynos", (uintptr_t)&uart_s3c2410_class}, + {"exynos", (uintptr_t)&uart_exynos4210_class}, {"fsl,imx6q-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx53-uart", (uintptr_t)&uart_imx_class}, {"fsl,imx51-uart", (uintptr_t)&uart_imx_class}, From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 15:18:55 2015 Return-Path: Delivered-To: svn-src-head@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 93C2BB9C; Tue, 13 Jan 2015 15:18: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 7F3C6CD5; Tue, 13 Jan 2015 15:18: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 t0DFItPm054461; Tue, 13 Jan 2015 15:18:55 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DFItl0054460; Tue, 13 Jan 2015 15:18:55 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501131518.t0DFItl0054460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 13 Jan 2015 15:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277133 - head/contrib/elftoolchain/libdwarf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:18:55 -0000 Author: emaste Date: Tue Jan 13 15:18:54 2015 New Revision: 277133 URL: https://svnweb.freebsd.org/changeset/base/277133 Log: libdwarf: add missing break Reported by: Coverity CID: 1193315 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libdwarf/dwarf_attrval.c Modified: head/contrib/elftoolchain/libdwarf/dwarf_attrval.c ============================================================================== --- head/contrib/elftoolchain/libdwarf/dwarf_attrval.c Tue Jan 13 15:04:28 2015 (r277132) +++ head/contrib/elftoolchain/libdwarf/dwarf_attrval.c Tue Jan 13 15:18:54 2015 (r277133) @@ -125,6 +125,7 @@ dwarf_attrval_signed(Dwarf_Die die, Dwar break; case DW_FORM_data4: *valp = (int32_t) at->u[0].s64; + break; case DW_FORM_data8: case DW_FORM_sdata: *valp = at->u[0].s64; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 15:32:31 2015 Return-Path: Delivered-To: svn-src-head@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 475BB66B for ; Tue, 13 Jan 2015 15:32:31 +0000 (UTC) Received: from nm9-vm0.bullet.mail.bf1.yahoo.com (nm9-vm0.bullet.mail.bf1.yahoo.com [98.139.213.154]) (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 ED70BEA7 for ; Tue, 13 Jan 2015 15:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421163149; bh=pftecdPczcGJGJclGu81+npj/Ar1OXycO/mjkzWo85g=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=WqusxKOnxez6sSTNdwQ04Mn+UJmNNHjWLGejPG16OMMwMc2gUgVMp5aqiwsFtm/O5f+Gqbt0hz3IfQTGEgp+4sH5KgxJJqW5gFvTXMZc4kDRwaC6SLAQG1PQwZ1tcb4DmwX2LNjn46iDncGOk//wcxG4/uCAiaTdA0wvgD0yf8eWFHM46IUdTQVWoBA9/2vFBe7LfVtBKAHBkUaKRwn/Nx5fNfHyzwGqfx3unb9C8L+S8oY9P/ua4j8q/N0meDJGHKqZp1VB9WP9bwMxB5zBUOUHF+HGfetzyNpO/VdQzET/9rAy4klauNgb3Azbj28UrTiW3PKy52AROKQ9P/OCow== Received: from [98.139.215.143] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 13 Jan 2015 15:32:29 -0000 Received: from [98.139.211.195] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 13 Jan 2015 15:32:29 -0000 Received: from [127.0.0.1] by smtp204.mail.bf1.yahoo.com with NNFMP; 13 Jan 2015 15:32:28 -0000 X-Yahoo-Newman-Id: 962031.74697.bm@smtp204.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 6BI5Q0UVM1mTuWyGUK31d3VAZwFrTkkibx5E8rDhwWFpsyw _jjsWpyQSE_ui1HXY8nAcHOnJB5I6p_x.y6eP_qi8.36wCISyeZnpGV7Ugem FxiaAN47bp5jvMBcGLrsxPHqJF6rBbtj6zSD3cWTnxCfP83NxAylzGsoHqqJ UYk46MIWyMSL1riNYECQ.dn4y6pTMKRV9ZELjpYCnCU_wXH1yrUt6iUcsxvs 6ivnW4A4aRX8pjt0gPYQT4zOxhyyecpDoXT6N62YhohUnG850DLS2v6NtAua adAuPUUHDO7wb8GR_3zMZ7ld0F7bpWUlhnjGvluVyYFobRuuuNyKwUSyzeHZ CWx9AFV8RaZdN91U5r7gVIMgkrBbj4juKTOfQTBQzyC_T0Xj0Kslp2WEYgcF KYzEXFXsWfYDZ9amx2dKe6TmEivJmKPRJ.GLgxXH2_2jNZjl_AYIp.bQ3MP1 GJP7yBe7Ptlfz3QMCIZVCm22KRW6QhZxCM79LYEh9g.0H8CS1vmgC2IEXou9 pn7WksAVyYLqzIwDvka.WN25x8Rs8r3vkLCBFeI9CCnaQrJ57qmBNLBwktVG Qtjio6J4gJO6BcI.4lfbi2fxtVBVN3YsjX1CCgea79lSCo_HwfNtyyxzo.VH cCYKgp_h_nidMsFYDshNtAG4Sws3sIC4I8unJ5xJwRQ89bYn.4sUoS40VLGA 2u5kh45rTKaVQLrmNIZXki95BdHSlcHAFhW4aTHZyNKJdTKh_4_3CQA7aIPT BeDZadRcwK2hJHOR6WxodqScNaC0YKGAy6yIu8FA8JVlL4UtcmVHz6CrEsSI XTQZFwvp1MD7ru2JevuuEs9JjVt6dSS8TNAtn6QLoIe9PB7T53CQ.cvKlvzv 9y4dWhiaE X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54B53A8D.4050000@FreeBSD.org> Date: Tue, 13 Jan 2015 10:32:29 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Midori Kato Subject: Re: svn commit: r277054 - in head: share/man/man4 sys/modules/cc sys/modules/cc/cc_dctcp sys/netinet sys/netinet/cc References: <201501120833.t0C8X53s071470@svn.freebsd.org> <54B3F10F.70506@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, Lars Eggert , Hiren Panchasara X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:32:31 -0000 Midori-san; I am aware of the patent issue as we spoke about it with George (gnn@) at BSDCan. It's not really an issue for us, and if you find more patent under the same free-use conditions, feel free to send patches :). The linux guys are aware of the patent but I agree that the issues linux might have are none of our business. Thank you all involved in the DCTCP implementation: it's great to see FreeBSD's networking implementation getting better! Best regards, Pedro. On 01/13/15 06:49, Midori Kato wrote: > Hi Pedro, > > Thank you for your mention about the patent problem. > Thanks to Hiren and Lars support, we have already discuss patent with > microsoft people. But I am not sure that we must care about Linux > because we worked on our implementation without linux. Let's wait and > see if redhat people say about it. > > Again, thank you for your interest to dctcp implementation :) > > Regards, > -- Midori > > > 2015-01-13 1:06 GMT+09:00 Pedro Giffuni >: > > > On 12/01/2015 03:33 a.m., Hiren Panchasara wrote: > > Author: hiren > Date: Mon Jan 12 08:33:04 2015 > New Revision: 277054 > URL: https://svnweb.freebsd.org/changeset/base/277054 > > Log: > DCTCP (Data Center TCP) implementation. > DCTCP congestion control algorithm aims to maximise > throughput and minimise > latency in data center networks by utilising the proportion > of Explicit > Congestion Notification (ECN) marked packets received from > capable hardware as a > congestion signal. > Highlights: > Implemented as a mod_cc(4) module. > ECN (Explicit congestion notification) processing is done > differently from > RFC3168. > Takes one-sided DCTCP into consideration where only one of > the sides is using > DCTCP and other is using standard ECN. > IETF draft: > http://tools.ietf.org/html/draft-bensley-tcpm-dctcp-00 > Thesis report by Midori Kato: > https://eggert.org/students/kato-thesis.pdf > Submitted by: Midori Kato > and > Lars Eggert > > with help and modifications from > hiren > Differential Revision: https://reviews.freebsd.org/D604 > Reviewed by: gnn > > > Missing > > RelNotes= yes > > Huge thank you! > > FWIW, I thought the linux guys wouldn't take it over some GPL vs > patent issue but apparently redhat pushed some muscle and just did it: > > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=e3118e8359bb7c59555aca60c725106e6d78c5ce > > Not that I care much what they do ;). > > Pedro. > > From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 15:55:16 2015 Return-Path: Delivered-To: svn-src-head@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 D318D435; Tue, 13 Jan 2015 15:55:15 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8F4EB175; Tue, 13 Jan 2015 15:55:15 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id tr6so3482074ieb.7; Tue, 13 Jan 2015 07:55:15 -0800 (PST) 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=mZjPfg49ANjWl3cxw/f2b9aD7uRAgIYwoCVvJZdUXlo=; b=JkxTpglg67KNqTPpbb5PJ3THN8rR6nQx+io5eEsm7PYHiUqV9KJ+SpWVkiO+hWIlPS IomSrHIJYucW3yVyVFYnj/ItgUafFxxs2t6Oz8wM/aQfYx9Tv+UOUS4DuPOkf+SS38bd 9WETRXI1Y0n8k9X9om8ZoDk0zCFqlyauDf0OflOt1qpzHYdQz0CFP0xNNa4sLm/2mUNu WcLDie1yqHPd27IhkIyZglqTrmyefOA60njC5nRn51lx3Og1sk2ajJYBofKFSYVLH2pF TM3YDzW/sbr78+L8A7f66LjDj3+lAvCY6n48059jmGdmcojLtSNOcZt0rL/Lo0ZUppgT hJEg== X-Received: by 10.42.103.7 with SMTP id k7mr29294727ico.33.1421164514661; Tue, 13 Jan 2015 07:55:14 -0800 (PST) MIME-Version: 1.0 Sender: mr.kodiak@gmail.com Received: by 10.64.71.228 with HTTP; Tue, 13 Jan 2015 07:54:44 -0800 (PST) In-Reply-To: <7A28D39E-7C21-4081-83E0-656F8082D525@fh-muenster.de> References: <201410100609.s9A690NU067686@svn.freebsd.org> <54AC6F4E.1000707@FreeBSD.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> <7A28D39E-7C21-4081-83E0-656F8082D525@fh-muenster.de> From: Bryan Venteicher Date: Tue, 13 Jan 2015 09:54:44 -0600 X-Google-Sender-Auth: OU3AoN3pAAxE6cfuNEqChxmjqbE Message-ID: Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 To: Michael Tuexen Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , John Baldwin , "Bjoern A. Zeeb" , "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 15:55:16 -0000 On Mon, Jan 12, 2015 at 5:20 PM, Michael Tuexen wrote: > > > On 12 Jan 2015, at 18:42, Bjoern A. Zeeb wrote: > > > > > >> On 12 Jan 2015, at 15:51 , John Baldwin wrote: > >> > >> On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > >>> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery > wrote: > >>>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > >>>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>>> > >>>>> > wrote: > >>>>> Bryan- > >>>>> > >>>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher >>>>> > >>>>> > wrote: > >>>>>> Author: bryanv > >>>>>> Date: Fri Oct 10 06:08:59 2014 > >>>>>> New Revision: 272886 > >>>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 > >>>>>> > >>>>>> Log: > >>>>>> Add context pointer and source address to the UDP tunnel callback > >>>>>> > >>>>>> These are needed for the forthcoming vxlan implementation. The > >>>> > >>>> context > >>>> > >>>>>> pointer means we do not have to use a spare pointer field in the > >>>> > >>>> inpcb, > >>>> > >>>>>> and the source address is required to populate vxlan's forwarding > >>>> > >>>> table. > >>>> > >>>>>> While I highly doubt there is an out of tree consumer of the UDP > >>>>>> tunneling callback, this change may be a difficult to eventually > >>>> > >>>> MFC. > >>>> > >>>>> I noticed this comment while doing an MFC of vxlan to my local > tree. > >>>>> Do you think an MFC to 10-STABLE of this change (and vxlan > >>>>> generally) will be feasible? Is there precedent for ABI changes > like > >>>>> this being sanctioned? Could symbol versioning help? > >>>>> > >>>>> I'd like to get some consensus on whether this commit is OK to MFC. > With > >>>>> this commit, vxlan should be an easy to MFC. > >>>> > >>>> Breaking ABI will potentially hurt packages. FreeBSD builds packages > for > >>>> the oldest supported release on a branch. If you break ABI in 10.2 > while > >>>> we are building packages for 10.1 then any packages using these > >>>> interfaces may not work right or result in panics packages with kmod= s. > >>>> Please consider that. > >>> > >>> The only user visible change of this commit would be the addition of = a > >>> field at the end of 'struct udpcb'. I don't think that is a problem, = at > >>> least a similar change didn't prevent the MFC of UDP Lite. > >>> > >>> The kernel part of this changes the UDP tunneling functions which I > guess > >>> there could be a 3rd party module out there, but I very highly doubt > that, > >>> based on how un-useful the previous interface was. > >> > >> Userland should not be impacted by this at all. (Nothing in userland > cares > >> about udpcb's internals.) I think there was only ever one consumer fo= r > the > >> existing UDP tunneling code (bz@ knows what it is). I'm not sure > where it > >> lives. > > > > If you are talking about u_tun_func then it came from SCTP over UDP > tunneling. tuexen and rrs are your friends. > rrs implemented it to support SCTP over UDP over IPv[46]. To be more > precisely, to > receive such packets. > > So I am just being overly cautious and this change is fine to MFC? Best regards > Michael > > > > I was wondering if it could be used similarly for IPsec UDPencap but I > think that went nowhere back then. > > > > =E2=80=94 > > Bjoern A. Zeeb Charles Haddon Spurgeon= : > > "Friendship is one of the sweetest joys of life. Many might have faile= d > > beneath the bitterness of their trial had they not found a friend." > > > > > > > > From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 16:06:39 2015 Return-Path: Delivered-To: svn-src-head@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 640F694D; Tue, 13 Jan 2015 16: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 4FAA42F1; Tue, 13 Jan 2015 16: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 t0DG6dxB079446; Tue, 13 Jan 2015 16:06:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DG6dJT079445; Tue, 13 Jan 2015 16:06:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131606.t0DG6dJT079445@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 16:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277134 - head/sys/boot/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:06:39 -0000 Author: hselasky Date: Tue Jan 13 16:06:38 2015 New Revision: 277134 URL: https://svnweb.freebsd.org/changeset/base/277134 Log: Add new USB template to the USB bootloader module. Modified: head/sys/boot/usb/usbcore.mk Modified: head/sys/boot/usb/usbcore.mk ============================================================================== --- head/sys/boot/usb/usbcore.mk Tue Jan 13 15:18:54 2015 (r277133) +++ head/sys/boot/usb/usbcore.mk Tue Jan 13 16:06:38 2015 (r277134) @@ -142,6 +142,7 @@ KSRCS+= usb_template_mouse.c KSRCS+= usb_template_kbd.c KSRCS+= usb_template_audio.c KSRCS+= usb_template_phone.c +KSRCS+= usb_template_serialnet.c # # USB mass storage support From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 16:18:32 2015 Return-Path: Delivered-To: svn-src-head@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 853BCE37; Tue, 13 Jan 2015 16:18: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 711A5614; Tue, 13 Jan 2015 16:18: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 t0DGIWH4084582; Tue, 13 Jan 2015 16:18:32 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DGIWiK084581; Tue, 13 Jan 2015 16:18:32 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501131618.t0DGIWiK084581@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Tue, 13 Jan 2015 16:18:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277135 - head/sys/dev/cxgbe/iw_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:18:32 -0000 Author: np Date: Tue Jan 13 16:18:31 2015 New Revision: 277135 URL: https://svnweb.freebsd.org/changeset/base/277135 Log: cxgbe/iw_cxgbe: fix whitespace nit in r277102. Reported by: stefanf@ Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c Modified: head/sys/dev/cxgbe/iw_cxgbe/cm.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 16:06:38 2015 (r277134) +++ head/sys/dev/cxgbe/iw_cxgbe/cm.c Tue Jan 13 16:18:31 2015 (r277135) @@ -955,7 +955,7 @@ send_mpa_req(struct c4iw_ep *ep) if (mpa_rev_to_use == 2) mpalen += sizeof(struct mpa_v2_conn_params); - mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); + mpa = malloc(mpalen, M_CXGBE, M_NOWAIT); if (mpa == NULL) { failed: connect_reply_upcall(ep, -ENOMEM); From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 16:37:45 2015 Return-Path: Delivered-To: svn-src-head@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 7AF4597E; Tue, 13 Jan 2015 16:37: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 5AFA78AB; Tue, 13 Jan 2015 16:37: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 t0DGbj8v094280; Tue, 13 Jan 2015 16:37:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DGbipG094270; Tue, 13 Jan 2015 16:37:44 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501131637.t0DGbipG094270@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 13 Jan 2015 16:37:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277136 - in head/sys/dev/usb: . controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 16:37:45 -0000 Author: hselasky Date: Tue Jan 13 16:37:43 2015 New Revision: 277136 URL: https://svnweb.freebsd.org/changeset/base/277136 Log: Resolve a special case deadlock: When two or more threads are simultaneously detaching kernel drivers on the same USB device we can get stuck in the "usb_wait_pending_ref_locked()" function because the conditions needed for allowing detach are not met. The "destroy_dev()" function waits for all system calls involving the given character device to return. Character device system calls may lock the USB enumeration lock, which is also held when "destroy_dev()" is called. This can sometimes lead to a deadlock not noticed by WITNESS. The current solution is to ensure the calling thread is the only one holding the USB enumeration lock and prevent other threads from getting refs while a USB device detach is ongoing. This turned out not to be sufficient. To solve this deadlock we could use "destroy_dev_sched()" to schedule the device destruction in the background, but then we don't know when it is safe to free() the private data of the character device. Instead a callback function is executed by the USB explore process to kill off any leftover USB character devices synchronously after the USB device explore code is finished and the USB enumeration lock is no longer locked. This makes porting easier and also ensures us that character devices must eventually go away after a USB device detach. While at it ensure that "flag_iserror" is only written when "priv_mtx" is locked, which is protecting it. MFC after: 5 days Modified: head/sys/dev/usb/controller/usb_controller.c head/sys/dev/usb/usb_bus.h head/sys/dev/usb/usb_dev.c head/sys/dev/usb/usb_device.c head/sys/dev/usb/usb_device.h Modified: head/sys/dev/usb/controller/usb_controller.c ============================================================================== --- head/sys/dev/usb/controller/usb_controller.c Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/controller/usb_controller.c Tue Jan 13 16:37:43 2015 (r277136) @@ -59,6 +59,7 @@ #include #include #include +#include #include #include @@ -219,6 +220,11 @@ usb_detach(device_t dev) usb_proc_mwait(USB_BUS_EXPLORE_PROC(bus), &bus->detach_msg[0], &bus->detach_msg[1]); +#if USB_HAVE_UGEN + /* Wait for cleanup to complete */ + usb_proc_mwait(USB_BUS_EXPLORE_PROC(bus), + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); +#endif USB_BUS_UNLOCK(bus); #if USB_HAVE_PER_BUS_PROCESS @@ -631,6 +637,32 @@ usb_bus_shutdown(struct usb_proc_msg *pm USB_BUS_LOCK(bus); } +/*------------------------------------------------------------------------* + * usb_bus_cleanup + * + * This function is used to cleanup leftover USB character devices. + *------------------------------------------------------------------------*/ +#if USB_HAVE_UGEN +static void +usb_bus_cleanup(struct usb_proc_msg *pm) +{ + struct usb_bus *bus; + struct usb_fs_privdata *pd; + + bus = ((struct usb_bus_msg *)pm)->bus; + + while ((pd = LIST_FIRST(&bus->pd_cleanup_list)) != NULL) { + + LIST_REMOVE(pd, pd_next); + USB_BUS_UNLOCK(bus); + + usb_destroy_dev_sync(pd); + + USB_BUS_LOCK(bus); + } +} +#endif + static void usb_power_wdog(void *arg) { @@ -813,6 +845,14 @@ usb_attach_sub(device_t dev, struct usb_ bus->shutdown_msg[1].hdr.pm_callback = &usb_bus_shutdown; bus->shutdown_msg[1].bus = bus; +#if USB_HAVE_UGEN + LIST_INIT(&bus->pd_cleanup_list); + bus->cleanup_msg[0].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[0].bus = bus; + bus->cleanup_msg[1].hdr.pm_callback = &usb_bus_cleanup; + bus->cleanup_msg[1].bus = bus; +#endif + #if USB_HAVE_PER_BUS_PROCESS /* Create USB explore and callback processes */ Modified: head/sys/dev/usb/usb_bus.h ============================================================================== --- head/sys/dev/usb/usb_bus.h Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_bus.h Tue Jan 13 16:37:43 2015 (r277136) @@ -27,6 +27,8 @@ #ifndef _USB_BUS_H_ #define _USB_BUS_H_ +struct usb_fs_privdata; + /* * The following structure defines the USB explore message sent to the USB * explore process. @@ -83,6 +85,10 @@ struct usb_bus { struct usb_bus_msg resume_msg[2]; struct usb_bus_msg reset_msg[2]; struct usb_bus_msg shutdown_msg[2]; +#if USB_HAVE_UGEN + struct usb_bus_msg cleanup_msg[2]; + LIST_HEAD(,usb_fs_privdata) pd_cleanup_list; +#endif /* * This mutex protects the USB hardware: */ Modified: head/sys/dev/usb/usb_dev.c ============================================================================== --- head/sys/dev/usb/usb_dev.c Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_dev.c Tue Jan 13 16:37:43 2015 (r277136) @@ -293,8 +293,8 @@ error: usbd_enum_unlock(cpd->udev); if (crd->is_uref) { - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); DPRINTFN(2, "fail\n"); @@ -365,8 +365,8 @@ usb_unref_device(struct usb_cdev_privdat } if (crd->is_uref) { crd->is_uref = 0; - cpd->udev->refcount--; - cv_broadcast(&cpd->udev->ref_cv); + if (--(cpd->udev->refcount) == 0) + cv_broadcast(&cpd->udev->ref_cv); } mtx_unlock(&usb_ref_lock); } @@ -592,12 +592,12 @@ usb_fifo_free(struct usb_fifo *f) /* decrease refcount */ f->refcount--; - /* prevent any write flush */ - f->flag_iserror = 1; /* need to wait until all callers have exited */ while (f->refcount != 0) { mtx_unlock(&usb_ref_lock); /* avoid LOR */ mtx_lock(f->priv_mtx); + /* prevent write flush, if any */ + f->flag_iserror = 1; /* get I/O thread out of any sleep state */ if (f->flag_sleeping) { f->flag_sleeping = 0; Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_device.c Tue Jan 13 16:37:43 2015 (r277136) @@ -448,68 +448,29 @@ usb_endpoint_foreach(struct usb_device * return (NULL); } -#if USB_HAVE_UGEN -static uint16_t -usb_get_refcount(struct usb_device *udev) -{ - if (usb_proc_is_called_from(USB_BUS_EXPLORE_PROC(udev->bus)) || - usb_proc_is_called_from(USB_BUS_CONTROL_XFER_PROC(udev->bus))) - return (1); - return (2); -} -#endif - /*------------------------------------------------------------------------* - * usb_wait_pending_ref_locked + * usb_wait_pending_refs * * This function will wait for any USB references to go away before - * returning and disable further USB device refcounting on the - * specified USB device. This function is used when detaching a USB - * device. + * returning. This function is used before freeing a USB device. *------------------------------------------------------------------------*/ static void -usb_wait_pending_ref_locked(struct usb_device *udev) +usb_wait_pending_refs(struct usb_device *udev) { #if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); + DPRINTF("Refcount = %d\n", (int)udev->refcount); + mtx_lock(&usb_ref_lock); + udev->refcount--; while (1) { /* wait for any pending references to go away */ - mtx_lock(&usb_ref_lock); - if (udev->refcount == refcount) { - /* prevent further refs being taken */ + if (udev->refcount == 0) { + /* prevent further refs being taken, if any */ udev->refcount = USB_DEV_REF_MAX; - mtx_unlock(&usb_ref_lock); break; } - usbd_enum_unlock(udev); cv_wait(&udev->ref_cv, &usb_ref_lock); - mtx_unlock(&usb_ref_lock); - (void) usbd_enum_lock(udev); } -#endif -} - -/*------------------------------------------------------------------------* - * usb_ref_restore_locked - * - * This function will restore the reference count value after a call - * to "usb_wait_pending_ref_locked()". - *------------------------------------------------------------------------*/ -static void -usb_ref_restore_locked(struct usb_device *udev) -{ -#if USB_HAVE_UGEN - const uint16_t refcount = usb_get_refcount(udev); - - DPRINTF("Refcount = %d\n", (int)refcount); - - /* restore reference count and wakeup waiters, if any */ - mtx_lock(&usb_ref_lock); - udev->refcount = refcount; - cv_broadcast(&udev->ref_cv); mtx_unlock(&usb_ref_lock); #endif } @@ -1186,9 +1147,6 @@ usb_detach_device(struct usb_device *ude sx_assert(&udev->enum_sx, SA_LOCKED); - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* * First detach the child to give the child's detach routine a * chance to detach the sub-devices in the correct order. @@ -1215,8 +1173,6 @@ usb_detach_device(struct usb_device *ude usb_detach_device_sub(udev, &iface->subdev, &iface->pnpinfo, flag); } - - usb_ref_restore_locked(udev); } /*------------------------------------------------------------------------* @@ -2033,14 +1989,43 @@ usb_make_dev(struct usb_device *udev, co } void +usb_destroy_dev_sync(struct usb_fs_privdata *pd) +{ + DPRINTFN(1, "Destroying device at ugen%d.%d\n", + pd->bus_index, pd->dev_index); + + /* + * Destroy character device synchronously. After this + * all system calls are returned. Can block. + */ + destroy_dev(pd->cdev); + + free(pd, M_USBDEV); +} + +void usb_destroy_dev(struct usb_fs_privdata *pd) { + struct usb_bus *bus; + if (pd == NULL) return; - destroy_dev(pd->cdev); + mtx_lock(&usb_ref_lock); + bus = devclass_get_softc(usb_devclass_ptr, pd->bus_index); + mtx_unlock(&usb_ref_lock); - free(pd, M_USBDEV); + if (bus == NULL) { + usb_destroy_dev_sync(pd); + return; + } + + USB_BUS_LOCK(bus); + LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); + /* get cleanup going */ + usb_proc_msignal(USB_BUS_EXPLORE_PROC(bus), + &bus->cleanup_msg[0], &bus->cleanup_msg[1]); + USB_BUS_UNLOCK(bus); } static void @@ -2191,6 +2176,9 @@ usb_free_device(struct usb_device *udev, &udev->cs_msg[0], &udev->cs_msg[1]); USB_BUS_UNLOCK(udev->bus); + /* wait for all references to go away */ + usb_wait_pending_refs(udev); + sx_destroy(&udev->enum_sx); sx_destroy(&udev->sr_sx); @@ -2676,14 +2664,8 @@ usb_fifo_free_wrap(struct usb_device *ud /* no need to free this FIFO */ continue; } - /* wait for pending refs to go away */ - usb_wait_pending_ref_locked(udev); - /* free this FIFO */ usb_fifo_free(f); - - /* restore refcount */ - usb_ref_restore_locked(udev); } } #endif Modified: head/sys/dev/usb/usb_device.h ============================================================================== --- head/sys/dev/usb/usb_device.h Tue Jan 13 16:18:31 2015 (r277135) +++ head/sys/dev/usb/usb_device.h Tue Jan 13 16:37:43 2015 (r277136) @@ -293,6 +293,7 @@ struct usb_device *usb_alloc_device(devi struct usb_fs_privdata *usb_make_dev(struct usb_device *, const char *, int, int, int, uid_t, gid_t, int); void usb_destroy_dev(struct usb_fs_privdata *); +void usb_destroy_dev_sync(struct usb_fs_privdata *); #endif usb_error_t usb_probe_and_attach(struct usb_device *udev, uint8_t iface_index); From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 18:03:04 2015 Return-Path: Delivered-To: svn-src-head@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 92ACB9D3; Tue, 13 Jan 2015 18:03:04 +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 65158315; Tue, 13 Jan 2015 18:03:04 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6C467B93B; Tue, 13 Jan 2015 13:03:02 -0500 (EST) From: John Baldwin To: "Bjoern A. Zeeb" Subject: Re: svn commit: r272886 - in head/sys: netinet netinet6 Date: Mon, 12 Jan 2015 14:54:21 -0500 Message-ID: <9249494.lCU21bPJgC@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> References: <201410100609.s9A690NU067686@svn.freebsd.org> <6173473.uE5Sr5nj0c@ralph.baldwin.cx> <88ADFC71-FD44-4012-9814-1771D31646FF@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 13 Jan 2015 13:03:02 -0500 (EST) Cc: "src-committers@freebsd.org" , John Nielsen , Bryan Venteicher , "svn-src-all@freebsd.org" , Bryan Drewery , "svn-src-head@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 18:03:04 -0000 On Monday, January 12, 2015 05:42:34 PM Bjoern A. Zeeb wrote: > > On 12 Jan 2015, at 15:51 , John Baldwin wrote: > > > > On Tuesday, January 06, 2015 07:07:11 PM Bryan Venteicher wrote: > >> On Tue, Jan 6, 2015 at 5:27 PM, Bryan Drewery wrote: > >>> On 1/6/2015 4:00 PM, Bryan Venteicher wrote: > >>>> On Tue, Jan 6, 2015 at 2:52 PM, John Nielsen >>>> > >>>> > wrote: > >>>> Bryan- > >>>> > >>>> On Oct 10, 2014, at 12:09 AM, Bryan Venteicher >>>>> > >>>> > wrote: > >>>>> Author: bryanv > >>>>> Date: Fri Oct 10 06:08:59 2014 > >>>>> New Revision: 272886 > >>>>> URL: https://svnweb.freebsd.org/changeset/base/272886 > >>>>> > >>>>> Log: > >>>>> Add context pointer and source address to the UDP tunnel callback > >>>>> > >>>>> These are needed for the forthcoming vxlan implementation. The > >>> > >>> context > >>> > >>>>> pointer means we do not have to use a spare pointer field in the > >>> > >>> inpcb, > >>> > >>>>> and the source address is required to populate vxlan's forwarding > >>> > >>> table. > >>> > >>>>> While I highly doubt there is an out of tree consumer of the UDP > >>>>> tunneling callback, this change may be a difficult to eventually > >>> > >>> MFC. > >>> > >>>> I noticed this comment while doing an MFC of vxlan to my local tree. > >>>> Do you think an MFC to 10-STABLE of this change (and vxlan > >>>> generally) will be feasible? Is there precedent for ABI changes like > >>>> this being sanctioned? Could symbol versioning help? > >>>> > >>>> I'd like to get some consensus on whether this commit is OK to MFC. > >>>> With > >>>> this commit, vxlan should be an easy to MFC. > >>> > >>> Breaking ABI will potentially hurt packages. FreeBSD builds packages for > >>> the oldest supported release on a branch. If you break ABI in 10.2 while > >>> we are building packages for 10.1 then any packages using these > >>> interfaces may not work right or result in panics packages with kmods. > >>> Please consider that. > >> > >> The only user visible change of this commit would be the addition of a > >> field at the end of 'struct udpcb'. I don't think that is a problem, at > >> least a similar change didn't prevent the MFC of UDP Lite. > >> > >> The kernel part of this changes the UDP tunneling functions which I guess > >> there could be a 3rd party module out there, but I very highly doubt > >> that, > >> based on how un-useful the previous interface was. > > > > Userland should not be impacted by this at all. (Nothing in userland > > cares > > about udpcb's internals.) I think there was only ever one consumer for > > the > > existing UDP tunneling code (bz@ knows what it is). I'm not sure where it > > lives. > > If you are talking about u_tun_func then it came from SCTP over UDP > tunneling. tuexen and rrs are your friends. > > I was wondering if it could be used similarly for IPsec UDPencap but I think > that went nowhere back then. It is the IPsec UDPencap case I was thinking of. If that is a dead end then the only consumer is already in-tree, so in this case I think this is ok to MFC (but remember to bump __FreeBSD_version). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 18:56:30 2015 Return-Path: Delivered-To: svn-src-head@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 6FD63B67; Tue, 13 Jan 2015 18:56: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 41BEAB70; Tue, 13 Jan 2015 18:56: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 t0DIuU8M061694; Tue, 13 Jan 2015 18:56:30 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DIuUE0061693; Tue, 13 Jan 2015 18:56:30 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501131856.t0DIuUE0061693@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Tue, 13 Jan 2015 18:56:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277143 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 18:56:30 -0000 Author: jfv Date: Tue Jan 13 18:56:29 2015 New Revision: 277143 URL: https://svnweb.freebsd.org/changeset/base/277143 Log: Complete the RX side RSS code: parse the encoded portion of the RX descriptor to determine the correct hash type. MFC after:1 week Modified: head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 18:56:28 2015 (r277142) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 18:56:29 2015 (r277143) @@ -1364,6 +1364,63 @@ ixl_rx_discard(struct rx_ring *rxr, int return; } +#ifdef RSS +/* +** i40e_ptype_to_hash: parse the packet type +** to determine the appropriate hash. +*/ +static inline int +ixl_ptype_to_hash(u8 ptype) +{ + struct i40e_rx_ptype_decoded decoded; + u8 ex = 0 + + decode = decode_rx_desc_ptype(ptype); + ex = decoded.outer_frag; + + if (!decoded.known) + return M_HASHTYPE_OPAQUE; + + if (decoded.outer_ip == I40E_RX_PTYPE_OUTER_L2) + return M_HASHTYPE_OPAQUE; + + /* Note: anything that gets to this point is IP */ + if (decoded.outer_ip_ver == I40E_RX_PTYPE_OUTER_IPV6) { + switch (decoded.inner_prot) { + case I40E_RX_PTYPE_INNER_PROT_TCP: + if (ex) + return M_HASHTYPE_RSS_TCP_IPV6_EX; + else + return M_HASHTYPE_RSS_TCP_IPV6; + case I40E_RX_PTYPE_INNER_PROT_UDP: + if (ex) + return M_HASHTYPE_RSS_UDP_IPV6_EX; + else + return M_HASHTYPE_RSS_UDP_IPV6; + default: + if (ex) + return M_HASHTYPE_RSS_IPV6_EX; + else + return M_HASHTYPE_RSS_IPV6; + } + } + if (decoded.outer_ip_ver == I40E_RX_PTYPE_OUTER_IPV4) { + switch (decoded.inner_prot) { + case I40E_RX_PTYPE_INNER_PROT_TCP: + return M_HASHTYPE_RSS_TCP_IPV4; + case I40E_RX_PTYPE_INNER_PROT_UDP: + if (ex) + return M_HASHTYPE_RSS_UDP_IPV4_EX; + else + return M_HASHTYPE_RSS_UDP_IPV4; + default: + return M_HASHTYPE_RSS_IPV4; + } + } + /* We should never get here!! */ + return M_HASHTYPE_OPAQUE; +} +#endif /* RSS */ /********************************************************************* * @@ -1562,10 +1619,13 @@ ixl_rxeof(struct ixl_queue *que, int cou if ((ifp->if_capenable & IFCAP_RXCSUM) != 0) ixl_rx_checksum(sendmp, status, error, ptype); #ifdef RSS - /* XXX Work in Progress, fix the build for now */ -#endif + sendmp->m_pkthdr.flowid = + le32toh(cur->wb.qword0.hi_dword.rss); + M_HASHTYPE_SET(sendmp, ixl_ptype_to_hash(ptype)); +#else sendmp->m_pkthdr.flowid = que->msix; M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE); +#endif } next_desc: bus_dmamap_sync(rxr->dma.tag, rxr->dma.map, From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 19:54:49 2015 Return-Path: Delivered-To: svn-src-head@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 5DBD8FC6; Tue, 13 Jan 2015 19: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 3E488261; Tue, 13 Jan 2015 19: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 t0DJsntr090238; Tue, 13 Jan 2015 19:54:49 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DJslhB090231; Tue, 13 Jan 2015 19:54:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501131954.t0DJslhB090231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 13 Jan 2015 19:54:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277146 - in head: etc/mtree lib lib/libclang_rt tools/build/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 19:54:49 -0000 Author: dim Date: Tue Jan 13 19:54:47 2015 New Revision: 277146 URL: https://svnweb.freebsd.org/changeset/base/277146 Log: Connect libclang_rt to the build, for specific architectures. This contains the libraries for Address Sanitizer (asan), Undefined Behavior Sanitizer (ubsan) and Profile Guided Optimization. ASan is a fast memory error detector. It can detect the following types of bugs: Out-of-bounds accesses to heap, stack and globals Use-after-free Use-after-return (to some extent) Double-free, invalid free Memory leaks (experimental) Typical slowdown introduced by AddressSanitizer is 2x. UBSan is a fast and compatible undefined behavior checker. It enables a number of undefined behavior checks that have small runtime cost and no impact on address space layout or ABI. PLEASE NOTE: the sanitizers still have some rough edges on FreeBSD, particularly on i386. These will hopefully be smoothed out in the coming time. Differential Revision: https://reviews.freebsd.org/D1505 Modified: head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/Makefile head/lib/libclang_rt/Makefile head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/etc/mtree/BSD.debug.dist ============================================================================== --- head/etc/mtree/BSD.debug.dist Tue Jan 13 19:38:43 2015 (r277145) +++ head/etc/mtree/BSD.debug.dist Tue Jan 13 19:54:47 2015 (r277146) @@ -24,6 +24,14 @@ games .. lib + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. engines .. i18n Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Tue Jan 13 19:38:43 2015 (r277145) +++ head/etc/mtree/BSD.usr.dist Tue Jan 13 19:54:47 2015 (r277146) @@ -14,6 +14,14 @@ lib aout .. + clang + 3.5.0 + lib + freebsd + .. + .. + .. + .. compat aout .. Modified: head/lib/Makefile ============================================================================== --- head/lib/Makefile Tue Jan 13 19:38:43 2015 (r277145) +++ head/lib/Makefile Tue Jan 13 19:54:47 2015 (r277146) @@ -13,6 +13,7 @@ SUBDIR_ORDERED= ${_csu} \ libc \ libc_nonshared \ libcompiler_rt \ + ${_libclang_rt} \ ${_libcplusplus} \ ${_libcxxrt} \ libelf \ @@ -211,6 +212,15 @@ _libcom_err= libcom_err _libldns= libldns .endif +# The libraries under libclang_rt can only be built by clang, and only make +# sense to build when clang is enabled at all. Furthermore, they can only be +# built for certain architectures. +.if ${MK_CLANG} != "no" && ${COMPILER_TYPE} == "clang" && \ + (${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb")) +_libclang_rt= libclang_rt +.endif + .if ${MK_LIBCPLUSPLUS} != "no" _libcxxrt= libcxxrt _libcplusplus= libc++ Modified: head/lib/libclang_rt/Makefile ============================================================================== --- head/lib/libclang_rt/Makefile Tue Jan 13 19:38:43 2015 (r277145) +++ head/lib/libclang_rt/Makefile Tue Jan 13 19:54:47 2015 (r277146) @@ -1,10 +1,18 @@ # $FreeBSD$ -SUBDIR= asan\ - asan_cxx\ - profile\ - san\ - ubsan\ - ubsan_cxx +.include + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" +SUBDIR+= asan\ + asan_cxx\ + san\ + ubsan\ + ubsan_cxx +.endif + +.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" || \ + (${MACHINE_CPUARCH} == "arm" && ${MACHINE_ARCH} != "armeb") +SUBDIR+= profile +.endif .include Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Tue Jan 13 19:38:43 2015 (r277145) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Tue Jan 13 19:54:47 2015 (r277146) @@ -527,6 +527,23 @@ OLD_FILES+=usr/include/clang/3.5.0/xmmin OLD_FILES+=usr/include/clang/3.5.0/xopintrin.h OLD_DIRS+=usr/include/clang/3.5.0 OLD_DIRS+=usr/include/clang +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.5.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.5.0/lib +OLD_DIRS+=usr/lib/clang/3.5.0 +OLD_DIRS+=usr/lib/clang OLD_FILES+=usr/share/doc/llvm/clang/LICENSE.TXT OLD_DIRS+=usr/share/doc/llvm/clang OLD_FILES+=usr/share/doc/llvm/COPYRIGHT.regex From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 20:37:58 2015 Return-Path: Delivered-To: svn-src-head@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 36F78A1A; Tue, 13 Jan 2015 20:37: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 0901592E; Tue, 13 Jan 2015 20:37: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 t0DKbvUh009966; Tue, 13 Jan 2015 20:37:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DKbvb1009965; Tue, 13 Jan 2015 20:37:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501132037.t0DKbvb1009965@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 13 Jan 2015 20:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277147 - head/lib/libmagic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 20:37:58 -0000 Author: dim Date: Tue Jan 13 20:37:57 2015 New Revision: 277147 URL: https://svnweb.freebsd.org/changeset/base/277147 Log: Since the merge of file 5.21 in r276415 and r276416, stable/9 and stable/10 cannot be built from FreeBSD 8.x. This is because the build-tools stage requires libmagic, but lib/libmagic/config.h was generated on head, and it now enables using the xlocale.h APIs, which are not supported on 8.x (and on 9.x before __FreeBSD_version 900506). See also the start of this thread on -stable: https://lists.freebsd.org/pipermail/freebsd-stable/2015-January/081521.html To fix this, conditionalize the use of xlocale.h APIs to make bootstrapping from older FreeBSD versions work correctly. Reviewed by: delphij MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D1518 Modified: head/lib/libmagic/config.h Modified: head/lib/libmagic/config.h ============================================================================== --- head/lib/libmagic/config.h Tue Jan 13 19:54:47 2015 (r277146) +++ head/lib/libmagic/config.h Tue Jan 13 20:37:57 2015 (r277147) @@ -1,5 +1,13 @@ /* $FreeBSD$ */ +/* Get __FreeBSD_version. */ +#include + +/* Only specific versions of FreeBSD support xlocale */ +#if __FreeBSD_version >= 1000002 || (__FreeBSD_version < 1000000 && __FreeBSD_version >= 900506) +#define FREEBSD_XLOCALE_SUPPORT 1 +#endif + /* config.h. Generated from config.h.in by configure. */ /* config.h.in. Generated from configure.ac by autoheader. */ @@ -48,7 +56,9 @@ #define HAVE_FORK 1 /* Define to 1 if you have the `freelocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_FREELOCALE 1 +#endif /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #define HAVE_FSEEKO 1 @@ -102,7 +112,9 @@ #define HAVE_MMAP 1 /* Define to 1 if you have the `newlocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_NEWLOCALE 1 +#endif /* Define to 1 if you have the `pread' function. */ #define HAVE_PREAD 1 @@ -195,7 +207,9 @@ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `uselocale' function. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_USELOCALE 1 +#endif /* Define to 1 if you have the `utime' function. */ #define HAVE_UTIME 1 @@ -235,7 +249,9 @@ #define HAVE_WORKING_VFORK 1 /* Define to 1 if you have the header file. */ +#ifdef FREEBSD_XLOCALE_SUPPORT #define HAVE_XLOCALE_H 1 +#endif /* Define to 1 if you have the header file. */ #define HAVE_ZLIB_H 1 From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 22:00:49 2015 Return-Path: Delivered-To: svn-src-head@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 8CBEA222; Tue, 13 Jan 2015 22:00: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 77B99267; Tue, 13 Jan 2015 22:00: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 t0DM0nH0051706; Tue, 13 Jan 2015 22:00:49 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DM0lCO051690; Tue, 13 Jan 2015 22:00:47 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501132200.t0DM0lCO051690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 13 Jan 2015 22:00:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277149 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 22:00:49 -0000 Author: neel Date: Tue Jan 13 22:00:47 2015 New Revision: 277149 URL: https://svnweb.freebsd.org/changeset/base/277149 Log: 'struct vm_exception' was intended to be used only as the collateral for the VM_INJECT_EXCEPTION ioctl. However it morphed into other uses like keeping track pending exceptions for a vcpu. This in turn causes confusion because some fields in 'struct vm_exception' like 'vcpuid' make sense only in the ioctl context. It also makes it harder to add or remove structure fields. Fix this by using 'struct vm_exception' only to communicate information from userspace to vmm.ko when injecting an exception. Also, add a field 'restart_instruction' to 'struct vm_exception'. This field is set to '1' for exceptions where the faulting instruction is restarted after the exception is handled. MFC after: 1 week Modified: head/sys/amd64/include/vmm.h head/sys/amd64/include/vmm_dev.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_dev.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/include/vmm.h Tue Jan 13 22:00:47 2015 (r277149) @@ -289,7 +289,7 @@ struct vpmtmr *vm_pmtmr(struct vm *vm); struct vrtc *vm_rtc(struct vm *vm); /* - * Inject exception 'vme' into the guest vcpu. This function returns 0 on + * Inject exception 'vector' into the guest vcpu. This function returns 0 on * success and non-zero on failure. * * Wrapper functions like 'vm_inject_gp()' should be preferred to calling @@ -299,7 +299,8 @@ struct vrtc *vm_rtc(struct vm *vm); * This function should only be called in the context of the thread that is * executing this vcpu. */ -int vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *vme); +int vm_inject_exception(struct vm *vm, int vcpuid, int vector, int err_valid, + uint32_t errcode, int restart_instruction); /* * This function is called after a VM-exit that occurred during exception or @@ -628,4 +629,6 @@ vm_inject_ss(void *vm, int vcpuid, int e void vm_inject_pf(void *vm, int vcpuid, int error_code, uint64_t cr2); +int vm_restart_instruction(void *vm, int vcpuid); + #endif /* _VMM_H_ */ Modified: head/sys/amd64/include/vmm_dev.h ============================================================================== --- head/sys/amd64/include/vmm_dev.h Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/include/vmm_dev.h Tue Jan 13 22:00:47 2015 (r277149) @@ -63,6 +63,7 @@ struct vm_exception { int vector; uint32_t error_code; int error_code_valid; + int restart_instruction; }; struct vm_lapic_msi { Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/amd/svm.c Tue Jan 13 22:00:47 2015 (r277149) @@ -1201,7 +1201,6 @@ svm_vmexit(struct svm_softc *svm_sc, int struct vmcb_state *state; struct vmcb_ctrl *ctrl; struct svm_regctx *ctx; - struct vm_exception exception; uint64_t code, info1, info2, val; uint32_t eax, ecx, edx; int error, errcode_valid, handled, idtvec, reflect; @@ -1315,6 +1314,7 @@ svm_vmexit(struct svm_softc *svm_sc, int /* fallthru */ default: errcode_valid = 0; + info1 = 0; break; } KASSERT(vmexit->inst_length == 0, ("invalid inst_length (%d) " @@ -1323,17 +1323,10 @@ svm_vmexit(struct svm_softc *svm_sc, int if (reflect) { /* Reflect the exception back into the guest */ - bzero(&exception, sizeof(struct vm_exception)); - exception.vector = idtvec; - if (errcode_valid) { - exception.error_code = info1; - exception.error_code_valid = 1; - } VCPU_CTR2(svm_sc->vm, vcpu, "Reflecting exception " - "%d/%#x into the guest", exception.vector, - exception.error_code); - error = vm_inject_exception(svm_sc->vm, vcpu, - &exception); + "%d/%#x into the guest", idtvec, (int)info1); + error = vm_inject_exception(svm_sc->vm, vcpu, idtvec, + errcode_valid, info1, 0); KASSERT(error == 0, ("%s: vm_inject_exception error %d", __func__, error)); } Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/intel/vmx.c Tue Jan 13 22:00:47 2015 (r277149) @@ -1784,7 +1784,7 @@ vmexit_inst_emul(struct vm_exit *vmexit, { struct vm_guest_paging *paging; uint32_t csar; - + paging = &vmexit->u.inst_emul.paging; vmexit->exitcode = VM_EXITCODE_INST_EMUL; @@ -2073,12 +2073,11 @@ emulate_rdmsr(struct vmx *vmx, int vcpui static int vmx_exit_process(struct vmx *vmx, int vcpu, struct vm_exit *vmexit) { - int error, handled, in; + int error, errcode, errcode_valid, handled, in; struct vmxctx *vmxctx; struct vlapic *vlapic; struct vm_inout_str *vis; struct vm_task_switch *ts; - struct vm_exception vmexc; uint32_t eax, ecx, edx, idtvec_info, idtvec_err, intr_info, inst_info; uint32_t intr_type, intr_vec, reason; uint64_t exitintinfo, qual, gpa; @@ -2263,6 +2262,7 @@ vmx_exit_process(struct vmx *vmx, int vc case EXIT_REASON_MTF: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_MTRAP, 1); vmexit->exitcode = VM_EXITCODE_MTRAP; + vmexit->inst_length = 0; break; case EXIT_REASON_PAUSE: vmm_stat_incr(vmx->vm, vcpu, VMEXIT_PAUSE, 1); @@ -2389,15 +2389,15 @@ vmx_exit_process(struct vmx *vmx, int vc vmcs_write(VMCS_ENTRY_INST_LENGTH, vmexit->inst_length); /* Reflect all other exceptions back into the guest */ - bzero(&vmexc, sizeof(struct vm_exception)); - vmexc.vector = intr_vec; + errcode_valid = errcode = 0; if (intr_info & VMCS_INTR_DEL_ERRCODE) { - vmexc.error_code_valid = 1; - vmexc.error_code = vmcs_read(VMCS_EXIT_INTR_ERRCODE); + errcode_valid = 1; + errcode = vmcs_read(VMCS_EXIT_INTR_ERRCODE); } VCPU_CTR2(vmx->vm, vcpu, "Reflecting exception %d/%#x into " - "the guest", vmexc.vector, vmexc.error_code); - error = vm_inject_exception(vmx->vm, vcpu, &vmexc); + "the guest", intr_vec, errcode); + error = vm_inject_exception(vmx->vm, vcpu, intr_vec, + errcode_valid, errcode, 0); KASSERT(error == 0, ("%s: vm_inject_exception error %d", __func__, error)); return (1); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/vmm.c Tue Jan 13 22:00:47 2015 (r277149) @@ -101,8 +101,10 @@ struct vcpu { uint64_t exitintinfo; /* (i) events pending at VM exit */ int nmi_pending; /* (i) NMI pending */ int extint_pending; /* (i) INTR pending */ - struct vm_exception exception; /* (x) exception collateral */ int exception_pending; /* (i) exception pending */ + int exc_vector; /* (x) exception collateral */ + int exc_errcode_valid; + uint32_t exc_errcode; struct savefpu *guestfpu; /* (a,i) guest fpu state */ uint64_t guest_xcr0; /* (i) guest %xcr0 register */ void *stats; /* (a,i) statistics */ @@ -1223,7 +1225,7 @@ vm_handle_paging(struct vm *vm, int vcpu return (EFAULT); done: /* restart execution at the faulting instruction */ - vme->inst_length = 0; + vm_restart_instruction(vm, vcpuid); return (0); } @@ -1526,6 +1528,20 @@ restart: } int +vm_restart_instruction(void *arg, int vcpuid) +{ + struct vcpu *vcpu; + struct vm *vm = arg; + + if (vcpuid < 0 || vcpuid >= VM_MAXCPU) + return (EINVAL); + + vcpu = &vm->vcpu[vcpuid]; + vcpu->exitinfo.inst_length = 0; + return (0); +} + +int vm_exit_intinfo(struct vm *vm, int vcpuid, uint64_t info) { struct vcpu *vcpu; @@ -1655,11 +1671,11 @@ vcpu_exception_intinfo(struct vcpu *vcpu uint64_t info = 0; if (vcpu->exception_pending) { - info = vcpu->exception.vector & 0xff; + info = vcpu->exc_vector & 0xff; info |= VM_INTINFO_VALID | VM_INTINFO_HWEXCEPTION; - if (vcpu->exception.error_code_valid) { + if (vcpu->exc_errcode_valid) { info |= VM_INTINFO_DEL_ERRCODE; - info |= (uint64_t)vcpu->exception.error_code << 32; + info |= (uint64_t)vcpu->exc_errcode << 32; } } return (info); @@ -1684,7 +1700,7 @@ vm_entry_intinfo(struct vm *vm, int vcpu info2 = vcpu_exception_intinfo(vcpu); vcpu->exception_pending = 0; VCPU_CTR2(vm, vcpuid, "Exception %d delivered: %#lx", - vcpu->exception.vector, info2); + vcpu->exc_vector, info2); } if ((info1 & VM_INTINFO_VALID) && (info2 & VM_INTINFO_VALID)) { @@ -1722,7 +1738,8 @@ vm_get_intinfo(struct vm *vm, int vcpuid } int -vm_inject_exception(struct vm *vm, int vcpuid, struct vm_exception *exception) +vm_inject_exception(struct vm *vm, int vcpuid, int vector, int errcode_valid, + uint32_t errcode, int restart_instruction) { struct vcpu *vcpu; int error; @@ -1730,7 +1747,7 @@ vm_inject_exception(struct vm *vm, int v if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); - if (exception->vector < 0 || exception->vector >= 32) + if (vector < 0 || vector >= 32) return (EINVAL); /* @@ -1738,15 +1755,14 @@ vm_inject_exception(struct vm *vm, int v * the guest. It is a derived exception that results from specific * combinations of nested faults. */ - if (exception->vector == IDT_DF) + if (vector == IDT_DF) return (EINVAL); vcpu = &vm->vcpu[vcpuid]; if (vcpu->exception_pending) { VCPU_CTR2(vm, vcpuid, "Unable to inject exception %d due to " - "pending exception %d", exception->vector, - vcpu->exception.vector); + "pending exception %d", vector, vcpu->exc_vector); return (EBUSY); } @@ -1760,9 +1776,14 @@ vm_inject_exception(struct vm *vm, int v KASSERT(error == 0, ("%s: error %d clearing interrupt shadow", __func__, error)); + if (restart_instruction) + vm_restart_instruction(vm, vcpuid); + vcpu->exception_pending = 1; - vcpu->exception = *exception; - VCPU_CTR1(vm, vcpuid, "Exception %d pending", exception->vector); + vcpu->exc_vector = vector; + vcpu->exc_errcode = errcode; + vcpu->exc_errcode_valid = errcode_valid; + VCPU_CTR1(vm, vcpuid, "Exception %d pending", vector); return (0); } @@ -1770,28 +1791,15 @@ void vm_inject_fault(void *vmarg, int vcpuid, int vector, int errcode_valid, int errcode) { - struct vm_exception exception; - struct vm_exit *vmexit; struct vm *vm; - int error; + int error, restart_instruction; vm = vmarg; + restart_instruction = 1; - exception.vector = vector; - exception.error_code = errcode; - exception.error_code_valid = errcode_valid; - error = vm_inject_exception(vm, vcpuid, &exception); + error = vm_inject_exception(vm, vcpuid, vector, errcode_valid, + errcode, restart_instruction); KASSERT(error == 0, ("vm_inject_exception error %d", error)); - - /* - * A fault-like exception allows the instruction to be restarted - * after the exception handler returns. - * - * By setting the inst_length to 0 we ensure that the instruction - * pointer remains at the faulting instruction. - */ - vmexit = vm_exitinfo(vm, vcpuid); - vmexit->inst_length = 0; } void Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Tue Jan 13 21:29:24 2015 (r277148) +++ head/sys/amd64/vmm/vmm_dev.c Tue Jan 13 22:00:47 2015 (r277149) @@ -310,7 +310,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long c break; case VM_INJECT_EXCEPTION: vmexc = (struct vm_exception *)data; - error = vm_inject_exception(sc->vm, vmexc->cpuid, vmexc); + error = vm_inject_exception(sc->vm, vmexc->cpuid, + vmexc->vector, vmexc->error_code_valid, vmexc->error_code, + vmexc->restart_instruction); break; case VM_INJECT_NMI: vmnmi = (struct vm_nmi *)data; From owner-svn-src-head@FreeBSD.ORG Tue Jan 13 22:13:31 2015 Return-Path: Delivered-To: svn-src-head@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 8DA396D5; Tue, 13 Jan 2015 22:13: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 5FDF13B4; Tue, 13 Jan 2015 22: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 t0DMDVIu059619; Tue, 13 Jan 2015 22:13:31 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0DMDUFs059616; Tue, 13 Jan 2015 22:13:30 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501132213.t0DMDUFs059616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Tue, 13 Jan 2015 22:13:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277151 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2015 22:13:31 -0000 Author: jfv Date: Tue Jan 13 22:13:30 2015 New Revision: 277151 URL: https://svnweb.freebsd.org/changeset/base/277151 Log: Cleanup some bogus code in the RSS config, and add the include for the rss option file. And bump the version. MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Tue Jan 13 22:13:03 2015 (r277150) +++ head/sys/dev/ixl/if_ixl.c Tue Jan 13 22:13:30 2015 (r277151) @@ -41,7 +41,7 @@ /********************************************************************* * Driver version *********************************************************************/ -char ixl_driver_version[] = "1.3.0"; +char ixl_driver_version[] = "1.3.1"; /********************************************************************* * PCI Device ID Table @@ -3212,12 +3212,12 @@ static void ixl_config_rss(struct ixl_vs set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6_EX) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6); if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); - if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) - set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; #else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 22:13:03 2015 (r277150) +++ head/sys/dev/ixl/ixl_txrx.c Tue Jan 13 22:13:30 2015 (r277151) @@ -40,6 +40,7 @@ #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_rss.h" #include "ixl.h" /* Local Prototypes */ From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 01:23:52 2015 Return-Path: Delivered-To: svn-src-head@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 8058CEAA; Wed, 14 Jan 2015 01:23: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 51D1BAA1; Wed, 14 Jan 2015 01:23: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 t0E1NqL1049770; Wed, 14 Jan 2015 01:23:52 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E1NpF6049767; Wed, 14 Jan 2015 01:23:51 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201501140123.t0E1NpF6049767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Wed, 14 Jan 2015 01:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277156 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 01:23:52 -0000 Author: ganbold Date: Wed Jan 14 01:23:50 2015 New Revision: 277156 URL: https://svnweb.freebsd.org/changeset/base/277156 Log: Correct cpu type, it was rather Cortex A12 R0. Approved by: stas (mentor) Modified: head/sys/arm/arm/cpufunc.c head/sys/arm/arm/identcpu.c head/sys/arm/include/armreg.h Modified: head/sys/arm/arm/cpufunc.c ============================================================================== --- head/sys/arm/arm/cpufunc.c Tue Jan 13 22:51:44 2015 (r277155) +++ head/sys/arm/arm/cpufunc.c Wed Jan 14 01:23:50 2015 (r277156) @@ -1067,11 +1067,11 @@ set_cpufuncs() cputype == CPU_ID_CORTEXA9R1 || cputype == CPU_ID_CORTEXA9R2 || cputype == CPU_ID_CORTEXA9R3 || + cputype == CPU_ID_CORTEXA12R0 || cputype == CPU_ID_CORTEXA15R0 || cputype == CPU_ID_CORTEXA15R1 || cputype == CPU_ID_CORTEXA15R2 || cputype == CPU_ID_CORTEXA15R3 || - cputype == CPU_ID_CORTEXA17 || cputype == CPU_ID_KRAIT ) { cpufuncs = cortexa_cpufuncs; cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ Modified: head/sys/arm/arm/identcpu.c ============================================================================== --- head/sys/arm/arm/identcpu.c Tue Jan 13 22:51:44 2015 (r277155) +++ head/sys/arm/arm/identcpu.c Wed Jan 14 01:23:50 2015 (r277156) @@ -185,6 +185,8 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA9R3, CPU_CLASS_CORTEXA, "Cortex A9-r3", generic_steppings }, + { CPU_ID_CORTEXA12R0, CPU_CLASS_CORTEXA, "Cortex A12-r0", + generic_steppings }, { CPU_ID_CORTEXA15R0, CPU_CLASS_CORTEXA, "Cortex A15-r0", generic_steppings }, { CPU_ID_CORTEXA15R1, CPU_CLASS_CORTEXA, "Cortex A15-r1", @@ -193,8 +195,6 @@ const struct cpuidtab cpuids[] = { generic_steppings }, { CPU_ID_CORTEXA15R3, CPU_CLASS_CORTEXA, "Cortex A15-r3", generic_steppings }, - { CPU_ID_CORTEXA17, CPU_CLASS_CORTEXA, "Cortex A17", - generic_steppings }, { CPU_ID_KRAIT, CPU_CLASS_KRAIT, "Krait", generic_steppings }, Modified: head/sys/arm/include/armreg.h ============================================================================== --- head/sys/arm/include/armreg.h Tue Jan 13 22:51:44 2015 (r277155) +++ head/sys/arm/include/armreg.h Wed Jan 14 01:23:50 2015 (r277156) @@ -133,11 +133,11 @@ #define CPU_ID_CORTEXA9R1 0x411fc090 #define CPU_ID_CORTEXA9R2 0x412fc090 #define CPU_ID_CORTEXA9R3 0x413fc090 +#define CPU_ID_CORTEXA12R0 0x410fc0d0 #define CPU_ID_CORTEXA15R0 0x410fc0f0 #define CPU_ID_CORTEXA15R1 0x411fc0f0 #define CPU_ID_CORTEXA15R2 0x412fc0f0 #define CPU_ID_CORTEXA15R3 0x413fc0f0 -#define CPU_ID_CORTEXA17 0x410fc0d0 #define CPU_ID_KRAIT 0x510f06f0 /* Snapdragon S4 Pro/APQ8064 */ #define CPU_ID_TI925T 0x54029250 #define CPU_ID_MV88FR131 0x56251310 /* Marvell Feroceon 88FR131 Core */ From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 02:18:30 2015 Return-Path: Delivered-To: svn-src-head@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 8FF4B7CA; Wed, 14 Jan 2015 02:18: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 7B370F26; Wed, 14 Jan 2015 02:18: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 t0E2IUMu073617; Wed, 14 Jan 2015 02:18:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E2IUQY073616; Wed, 14 Jan 2015 02:18:30 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501140218.t0E2IUQY073616@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 14 Jan 2015 02:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277157 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 02:18:30 -0000 Author: nwhitehorn Date: Wed Jan 14 02:18:29 2015 New Revision: 277157 URL: https://svnweb.freebsd.org/changeset/base/277157 Log: Do not remap Open Firmware mappings covered by the direct map. It's pointless and wastes resources. MFC after: 1 week Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Wed Jan 14 01:23:50 2015 (r277156) +++ head/sys/powerpc/aim/mmu_oea64.c Wed Jan 14 02:18:29 2015 (r277157) @@ -224,6 +224,8 @@ uma_zone_t moea64_mpvo_zone; /* zone for #define BPVO_POOL_SIZE 327680 static struct pvo_entry *moea64_bpvo_pool; static int moea64_bpvo_pool_index = 0; +SYSCTL_INT(_machdep, OID_AUTO, moea64_allocated_bpvo_entries, CTLFLAG_RD, + &moea64_bpvo_pool_index, 0, ""); #define VSID_NBPW (sizeof(u_int32_t) * 8) #ifdef __powerpc64__ @@ -534,6 +536,11 @@ moea64_add_ofw_mappings(mmu_t mmup, phan DISABLE_TRANS(msr); for (off = 0; off < translations[i].om_len; off += PAGE_SIZE) { + /* If this address is direct-mapped, skip remapping */ + if (hw_direct_map && translations[i].om_va == pa_base && + moea64_calc_wimg(pa_base + off, VM_MEMATTR_DEFAULT) == LPTE_M) + continue; + if (moea64_pvo_find_va(kernel_pmap, translations[i].om_va + off) != NULL) continue; From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 03:52:42 2015 Return-Path: Delivered-To: svn-src-head@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 05766E26; Wed, 14 Jan 2015 03:52: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 E5F51C47; Wed, 14 Jan 2015 03:52: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 t0E3qfIH020360; Wed, 14 Jan 2015 03:52:41 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E3qfHq020359; Wed, 14 Jan 2015 03:52:41 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501140352.t0E3qfHq020359@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 14 Jan 2015 03:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277158 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 03:52:42 -0000 Author: jamie Date: Wed Jan 14 03:52:41 2015 New Revision: 277158 URL: https://svnweb.freebsd.org/changeset/base/277158 Log: Don't set prison's pr_ip4s or pr_ip6s to -1. PR: 196474 MFC after: 3 days Modified: head/sys/kern/kern_jail.c Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Jan 14 02:18:29 2015 (r277157) +++ head/sys/kern/kern_jail.c Wed Jan 14 03:52:41 2015 (r277158) @@ -800,7 +800,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET error = vfs_getopt(opts, "ip4.addr", &op, &ip4s); if (error == ENOENT) - ip4s = (pr_flags & PR_IP4_DISABLE) ? 0 : -1; + ip4s = 0; else if (error != 0) goto done_free; else if (ip4s & (sizeof(*ip4) - 1)) { @@ -858,7 +858,7 @@ kern_jail_set(struct thread *td, struct #ifdef INET6 error = vfs_getopt(opts, "ip6.addr", &op, &ip6s); if (error == ENOENT) - ip6s = (pr_flags & PR_IP6_DISABLE) ? 0 : -1; + ip6s = 0; else if (error != 0) goto done_free; else if (ip6s & (sizeof(*ip6) - 1)) { From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 04:50:30 2015 Return-Path: Delivered-To: svn-src-head@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 F2DF4950; Wed, 14 Jan 2015 04: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 DEED91BF; Wed, 14 Jan 2015 04: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 t0E4oTsg045223; Wed, 14 Jan 2015 04:50:29 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E4oTLn045220; Wed, 14 Jan 2015 04:50:29 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201501140450.t0E4oTLn045220@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Wed, 14 Jan 2015 04:50:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277159 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 04:50:30 -0000 Author: jamie Date: Wed Jan 14 04:50:28 2015 New Revision: 277159 URL: https://svnweb.freebsd.org/changeset/base/277159 Log: Remove the prison flags PR_IP4_DISABLE and PR_IP6_DISABLE, which have been write-only for as long as they've existed. Modified: head/sys/kern/kern_jail.c head/sys/sys/jail.h Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Wed Jan 14 03:52:41 2015 (r277158) +++ head/sys/kern/kern_jail.c Wed Jan 14 04:50:28 2015 (r277159) @@ -187,10 +187,10 @@ struct jailsys_flags { { "vnet", 0, PR_VNET }, #endif #ifdef INET - { "ip4", PR_IP4_USER | PR_IP4_DISABLE, PR_IP4_USER }, + { "ip4", PR_IP4_USER, PR_IP4_USER }, #endif #ifdef INET6 - { "ip6", PR_IP6_USER | PR_IP6_DISABLE, PR_IP6_USER }, + { "ip6", PR_IP6_USER, PR_IP6_USER }, #endif }; const size_t pr_flag_jailsys_size = sizeof(pr_flag_jailsys); @@ -807,11 +807,9 @@ kern_jail_set(struct thread *td, struct error = EINVAL; goto done_free; } else { - ch_flags |= PR_IP4_USER | PR_IP4_DISABLE; - if (ip4s == 0) - pr_flags |= PR_IP4_USER | PR_IP4_DISABLE; - else { - pr_flags = (pr_flags & ~PR_IP4_DISABLE) | PR_IP4_USER; + ch_flags |= PR_IP4_USER; + pr_flags |= PR_IP4_USER; + if (ip4s > 0) { ip4s /= sizeof(*ip4); if (ip4s > jail_max_af_ips) { error = EINVAL; @@ -865,11 +863,9 @@ kern_jail_set(struct thread *td, struct error = EINVAL; goto done_free; } else { - ch_flags |= PR_IP6_USER | PR_IP6_DISABLE; - if (ip6s == 0) - pr_flags |= PR_IP6_USER | PR_IP6_DISABLE; - else { - pr_flags = (pr_flags & ~PR_IP6_DISABLE) | PR_IP6_USER; + ch_flags |= PR_IP6_USER; + pr_flags |= PR_IP6_USER; + if (ip6s > 0) { ip6s /= sizeof(*ip6); if (ip6s > jail_max_af_ips) { error = EINVAL; @@ -1249,8 +1245,7 @@ kern_jail_set(struct thread *td, struct { #ifdef INET if (!(ch_flags & PR_IP4_USER)) - pr->pr_flags |= - PR_IP4 | PR_IP4_USER | PR_IP4_DISABLE; + pr->pr_flags |= PR_IP4 | PR_IP4_USER; else if (!(pr_flags & PR_IP4_USER)) { pr->pr_flags |= ppr->pr_flags & PR_IP4; if (ppr->pr_ip4 != NULL) { @@ -1265,8 +1260,7 @@ kern_jail_set(struct thread *td, struct #endif #ifdef INET6 if (!(ch_flags & PR_IP6_USER)) - pr->pr_flags |= - PR_IP6 | PR_IP6_USER | PR_IP6_DISABLE; + pr->pr_flags |= PR_IP6 | PR_IP6_USER; else if (!(pr_flags & PR_IP6_USER)) { pr->pr_flags |= ppr->pr_flags & PR_IP6; if (ppr->pr_ip6 != NULL) { @@ -2724,7 +2718,6 @@ prison_restrict_ip4(struct prison *pr, s } } if (pr->pr_ip4s == 0) { - pr->pr_flags |= PR_IP4_DISABLE; free(pr->pr_ip4, M_PRISON); pr->pr_ip4 = NULL; } @@ -3065,7 +3058,6 @@ prison_restrict_ip6(struct prison *pr, s } } if (pr->pr_ip6s == 0) { - pr->pr_flags |= PR_IP6_DISABLE; free(pr->pr_ip6, M_PRISON); pr->pr_ip6 = NULL; } Modified: head/sys/sys/jail.h ============================================================================== --- head/sys/sys/jail.h Wed Jan 14 03:52:41 2015 (r277158) +++ head/sys/sys/jail.h Wed Jan 14 04:50:28 2015 (r277159) @@ -201,8 +201,6 @@ struct prison_racct { #define PR_IP4_USER 0x00000004 /* Restrict IPv4 addresses */ #define PR_IP6_USER 0x00000008 /* Restrict IPv6 addresses */ #define PR_VNET 0x00000010 /* Virtual network stack */ -#define PR_IP4_DISABLE 0x00000020 /* Disable IPv4 */ -#define PR_IP6_DISABLE 0x00000040 /* Disable IPv6 */ #define PR_IP4_SADDRSEL 0x00000080 /* Do IPv4 src addr sel. or use the */ /* primary jail address. */ #define PR_IP6_SADDRSEL 0x00000100 /* Do IPv6 src addr sel. or use the */ From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 05:41:29 2015 Return-Path: Delivered-To: svn-src-head@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 85FE3882; Wed, 14 Jan 2015 05:41: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 72CE7993; Wed, 14 Jan 2015 05:41: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 t0E5fTgb069984; Wed, 14 Jan 2015 05:41:29 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5fTtg069982; Wed, 14 Jan 2015 05:41:29 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501140541.t0E5fTtg069982@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Jan 2015 05:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277162 - in head/sys/modules: cardbus cbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:41:29 -0000 Author: imp Date: Wed Jan 14 05:41:28 2015 New Revision: 277162 URL: https://svnweb.freebsd.org/changeset/base/277162 Log: On x86 force NEW_PCIB, since that's the default. While this option would be picked up for kernel builds, it isn't picked up for old-fashioned builds. Without this option, PCI bus numbers are busted for modules build iteratively. Modified: head/sys/modules/cardbus/Makefile head/sys/modules/cbb/Makefile Modified: head/sys/modules/cardbus/Makefile ============================================================================== --- head/sys/modules/cardbus/Makefile Wed Jan 14 05:32:16 2015 (r277161) +++ head/sys/modules/cardbus/Makefile Wed Jan 14 05:41:28 2015 (r277162) @@ -6,4 +6,8 @@ KMOD= cardbus SRCS= cardbus.c cardbus_cis.c cardbus_device.c \ device_if.h bus_if.h card_if.h power_if.h pci_if.h pcib_if.h +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +CFLAGS += -DNEW_PCIB +.endif + .include Modified: head/sys/modules/cbb/Makefile ============================================================================== --- head/sys/modules/cbb/Makefile Wed Jan 14 05:32:16 2015 (r277161) +++ head/sys/modules/cbb/Makefile Wed Jan 14 05:41:28 2015 (r277162) @@ -6,4 +6,8 @@ KMOD= cbb SRCS= pccbb.c pccbb_isa.c pccbb_pci.c \ device_if.h bus_if.h power_if.h card_if.h isa_if.h pci_if.h pcib_if.h +.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64" +CFLAGS += -DNEW_PCIB +.endif + .include From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 05:41:32 2015 Return-Path: Delivered-To: svn-src-head@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 141589AF; Wed, 14 Jan 2015 05:41: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 01E60994; Wed, 14 Jan 2015 05:41: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 t0E5fV2F070033; Wed, 14 Jan 2015 05:41:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5fV00070032; Wed, 14 Jan 2015 05:41:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501140541.t0E5fV00070032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Jan 2015 05:41:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277163 - head/sys/dev/cardbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:41:32 -0000 Author: imp Date: Wed Jan 14 05:41:31 2015 New Revision: 277163 URL: https://svnweb.freebsd.org/changeset/base/277163 Log: Add a rather obnoxious warning if you don't have NEW_PCIB defined since it's a total crap shoot if things will work. Modified: head/sys/dev/cardbus/cardbus.c Modified: head/sys/dev/cardbus/cardbus.c ============================================================================== --- head/sys/dev/cardbus/cardbus.c Wed Jan 14 05:41:28 2015 (r277162) +++ head/sys/dev/cardbus/cardbus.c Wed Jan 14 05:41:31 2015 (r277163) @@ -106,6 +106,8 @@ cardbus_attach(device_t cbdev) device_printf(cbdev, "failed to allocate bus number\n"); return (ENXIO); } +#else + device_printf(cbdev, "Your bus numbers may be AFU\n"); #endif return (0); } From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 05:41:35 2015 Return-Path: Delivered-To: svn-src-head@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 453DAB01; Wed, 14 Jan 2015 05:41: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 29433996; Wed, 14 Jan 2015 05:41: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 t0E5fZr9070094; Wed, 14 Jan 2015 05:41:35 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E5fYQN070078; Wed, 14 Jan 2015 05:41:34 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501140541.t0E5fYQN070078@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Wed, 14 Jan 2015 05:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277164 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 05:41:35 -0000 Author: imp Date: Wed Jan 14 05:41:33 2015 New Revision: 277164 URL: https://svnweb.freebsd.org/changeset/base/277164 Log: Various interrelated fixes to make suspend / resume work better. We now can suspend / resume and unload / load cbb and cardbus without errors on my Lenovo T400, which wasn't possible before. Cards suspending and resuming in the CardBus slot not yet tested. o Enable memory cycles to the bridge early (as part of the new cbb_pci_bridge_init). This fixes the Bad VCC errors which were caused by the code accessing the device registers with this cleared. The suspend / resume process clears it. o Refactor suspend / resume into bus specific code (though the ISA code is just stubbed). This isn't strictly necessary, but makes the initializaiton code more uniform and should be more bullet proof in the face of variant behavior among cardbus bridges. o Fixup comments in the power-up sequence to reflect reality. These comments were written for one regime of power-up, but not updated as things were revised. o Add a paranoid small delay (100ms) to cover noisy cards powering down. o Fix some debugging prints to be easier to grep from dmesg. Sponsored by: Netflix Modified: head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbb.c Wed Jan 14 05:41:33 2015 (r277164) @@ -477,7 +477,7 @@ cbb_event_thread(void *arg) */ mtx_lock(&Giant); status = cbb_get(sc, CBB_SOCKET_STATE); - DPRINTF(("Status is 0x%x\n", status)); + DEVPRINTF((sc->dev, "Status is %#x\n", status)); if (!CBB_CARD_PRESENT(status)) { not_a_card = 0; /* We know card type */ cbb_removal(sc); @@ -800,13 +800,14 @@ cbb_power(device_t brdev, int volts) if (on) { mtx_lock(&sc->mtx); cnt = sc->powerintr; + /* * We have a shortish timeout of 500ms here. Some bridges do - * not generate a POWER_CYCLE event for 16-bit cards. In - * those cases, we have to cope the best we can, and having - * only a short delay is better than the alternatives. Others - * raise the power cycle a smidge before it is really ready. - * We deal with those below. + * not generate a POWER_CYCLE event for 16-bit cards. In those + * cases, we have to cope the best we can, and having only a + * short delay is better than the alternatives. Others raise + * the power cycle a smidge before it is really ready. We deal + * with those below. */ sane = 10; while (!(cbb_get(sc, CBB_SOCKET_STATE) & CBB_STATE_POWER_CYCLE) && @@ -816,19 +817,18 @@ cbb_power(device_t brdev, int volts) /* * Relax for 100ms. Some bridges appear to assert this signal - * right away, but before the card has stabilized. Other - * cards need need more time to cope up reliabily. - * Experiments with troublesome setups show this to be a - * "cheap" way to enhance reliabilty. We need not do this for - * "off" since we don't touch the card after we turn it off. + * right away, but before the card has stabilized. Other cards + * need need more time to cope up reliabily. Experiments with + * troublesome setups show this to be a "cheap" way to enhance + * reliabilty. */ pause("cbbPwr", min(hz / 10, 1)); /* - * The TOPIC95B requires a little bit extra time to get its - * act together, so delay for an additional 100ms. Also as - * documented below, it doesn't seem to set the POWER_CYCLE - * bit, so don't whine if it never came on. + * The TOPIC95B requires a little bit extra time to get its act + * together, so delay for an additional 100ms. Also as + * documented below, it doesn't seem to set the POWER_CYCLE bit, + * so don't whine if it never came on. */ if (sc->chipset == CB_TOPIC95) pause("cbb95B", hz / 10); @@ -838,26 +838,27 @@ cbb_power(device_t brdev, int volts) /* * After the power is good, we can turn off the power interrupt. - * However, the PC Card standard says that we must delay turning the - * CD bit back on for a bit to allow for bouncyness on power down - * (recall that we don't wait above for a power down, since we don't - * get an interrupt for that). We're called either from the suspend - * code in which case we don't want to turn card change on again, or - * we're called from the card insertion code, in which case the cbb - * thread will turn it on for us before it waits to be woken by a - * change event. + * However, the PC Card standard says that we must delay turning the CD + * bit back on for a bit to allow for bouncyness on power down. We just + * pause a little below to cover that. Most bridges don't seem to need + * this delay. * - * NB: Topic95B doesn't set the power cycle bit. we assume that - * both it and the TOPIC95 behave the same. + * NB: Topic95B doesn't set the power cycle bit. We assume that + * both it and the TOPIC95 behave the same, though despite efforts + * to find one, the author never could locate a laptop with a TOPIC95 + * in it. */ cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_POWER); status = cbb_get(sc, CBB_SOCKET_STATE); if (on && sc->chipset != CB_TOPIC95) { if ((status & CBB_STATE_POWER_CYCLE) == 0) device_printf(sc->dev, "Power not on?\n"); + } else { + pause("cbbDwn", hz / 10); } if (status & CBB_STATE_BAD_VCC_REQ) { - device_printf(sc->dev, "Bad Vcc requested\n"); + device_printf(sc->dev, "Bad Vcc requested status %#x %dV\n", + status, volts); /* * Turn off the power, and try again. Retrigger other * active interrupts via force register. From NetBSD @@ -1563,61 +1564,6 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t self) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(self); - - error = bus_generic_suspend(self); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -int -cbb_resume(device_t self) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); - uint32_t tmp; - - /* - * In the APM and early ACPI era, BIOSes saved the PCI config - * registers. As chips became more complicated, that functionality moved - * into the ACPI code / tables. We must therefore, restore the settings - * we made here to make sure the device come back. Transitions to Dx - * from D0 and back to D0 cause the bridge to lose its config space, so - * all the bus mappings and such are preserved. - * - * For most drivers, the PCI layer handles this saving. However, since - * there's much black magic and arcane art hidden in these few lines of - * code that would be difficult to transition into the PCI - * layer. chipinit was several years of trial and error to write. - */ - pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((self, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - - sc->chipinit(sc); - - /* reset interrupt -- Do we really need to do this? */ - tmp = cbb_get(sc, CBB_SOCKET_EVENT); - cbb_set(sc, CBB_SOCKET_EVENT, tmp); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* Signal the thread to wakeup. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(self); - - return (error); -} - -int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: head/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- head/sys/dev/pccbb/pccbb_isa.c Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbb_isa.c Wed Jan 14 05:41:33 2015 (r277164) @@ -203,13 +203,27 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } +static int +cbb_isa_suspend(device_t dev) +{ + + return 0; +} + +static int +cbb_isa_resume(device_t dev) +{ + + return 0; +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_isa_suspend), + DEVMETHOD(device_resume, cbb_isa_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbb_pci.c Wed Jan 14 05:41:33 2015 (r277164) @@ -301,6 +301,41 @@ cbb_print_config(device_t dev) printf("\n"); } +static void +cbb_pci_bridge_init(device_t brdev) +{ + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + u_int32_t membase, irq; + + if (pci_get_powerstate(brdev) != PCI_POWERSTATE_D0) { + /* Reset the power state. */ + device_printf(brdev, "chip is in D%d power mode " + "-- setting to D0\n", pci_get_powerstate(brdev)); + pci_set_powerstate(brdev, PCI_POWERSTATE_D0); + } + membase = rman_get_start(sc->base_res); + irq = rman_get_start(sc->irq_res); + + pci_write_config(brdev, CBBR_SOCKBASE, membase, 4); + pci_write_config(brdev, PCIR_INTLINE, irq, 4); + PCI_ENABLE_IO(device_get_parent(brdev), brdev, SYS_RES_MEMORY); + + exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); + sc->chipinit(sc); + + /* reset 16-bit pcmcia bus */ + exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); + + /* turn off power */ + cbb_power(brdev, CARD_OFF); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* reset interrupt */ + cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); +} + static int cbb_pci_attach(device_t brdev) { @@ -345,11 +380,9 @@ cbb_pci_attach(device_t brdev) sc->bst = rman_get_bustag(sc->base_res); sc->bsh = rman_get_bushandle(sc->base_res); - exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); sc->exca[0].flags |= EXCA_HAS_MEMREG_WIN; sc->exca[0].chipset = EXCA_CARDBUS; sc->chipinit = cbb_chipinit; - sc->chipinit(sc); /*Sysctls*/ sctx = device_get_sysctl_ctx(brdev); @@ -427,17 +460,7 @@ cbb_pci_attach(device_t brdev) goto err; } - /* reset 16-bit pcmcia bus */ - exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); - - /* turn off power */ - cbb_power(brdev, CARD_OFF); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* reset interrupt */ - cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); + cbb_pci_bridge_init(brdev); if (bootverbose) cbb_print_config(brdev); @@ -877,14 +900,45 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } +static int +cbb_pci_suspend(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(brdev); + + error = bus_generic_suspend(brdev); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +static int +cbb_pci_resume(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + + /* Reinitialize the hardware, ala attach */ + cbb_pci_bridge_init(brdev); + + /* Signal the thread to wakeup to see if we have any cards to work with. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(brdev); + + return (error); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_pci_suspend), + DEVMETHOD(device_resume, cbb_pci_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbbvar.h ============================================================================== --- head/sys/dev/pccbb/pccbbvar.h Wed Jan 14 05:41:31 2015 (r277163) +++ head/sys/dev/pccbb/pccbbvar.h Wed Jan 14 05:41:33 2015 (r277164) @@ -134,11 +134,9 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); -int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 06:46:26 2015 Return-Path: Delivered-To: svn-src-head@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 865D85E5; Wed, 14 Jan 2015 06:46: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 74130F00; Wed, 14 Jan 2015 06:46: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 t0E6kQgp000519; Wed, 14 Jan 2015 06:46:26 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E6kQ7u000518; Wed, 14 Jan 2015 06:46:26 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501140646.t0E6kQ7u000518@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 06:46:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277165 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 06:46:26 -0000 Author: hselasky Date: Wed Jan 14 06:46:25 2015 New Revision: 277165 URL: https://svnweb.freebsd.org/changeset/base/277165 Log: Fix spelling. Modified: head/lib/libusb/libusb.3 Modified: head/lib/libusb/libusb.3 ============================================================================== --- head/lib/libusb/libusb.3 Wed Jan 14 05:41:33 2015 (r277164) +++ head/lib/libusb/libusb.3 Wed Jan 14 06:46:25 2015 (r277165) @@ -42,9 +42,9 @@ The .Nm library contains interfaces for directly managing a usb device. The current implementation supports v1.0 of the libusb API. -.Sh LIBRARY INITIALISATION / DEINITIALISATION +.Sh LIBRARY INITIALISATION AND DEINITIALISATION .Ft int -.Fn libusb_init libusb_context **ctx +.Fn libusb_init "libusb_context **ctx" This function initialises libusb. It must be called at the beginning of the program, before other libusb routines are used. From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 07:01:23 2015 Return-Path: Delivered-To: svn-src-head@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 49ADF846; Wed, 14 Jan 2015 07: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 2BBDFFB; Wed, 14 Jan 2015 07: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 t0E71NLf007446; Wed, 14 Jan 2015 07:01:23 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E71MPY007439; Wed, 14 Jan 2015 07:01:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501140701.t0E71MPY007439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 14 Jan 2015 07:01:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277166 - in head/sys: conf powerpc/include powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 07:01:23 -0000 Author: jhibbits Date: Wed Jan 14 07:01:21 2015 New Revision: 277166 URL: https://svnweb.freebsd.org/changeset/base/277166 Log: Add Altivec/VMX register support to ptrace. MFC after: 2 weeks Relnotes: yes Added: head/sys/powerpc/powerpc/ptrace_machdep.c (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/include/ptrace.h head/sys/powerpc/include/reg.h Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Wed Jan 14 06:46:25 2015 (r277165) +++ head/sys/conf/files.powerpc Wed Jan 14 07:01:21 2015 (r277166) @@ -202,6 +202,7 @@ powerpc/powerpc/pic_if.m standard powerpc/powerpc/pmap_dispatch.c standard powerpc/powerpc/platform.c standard powerpc/powerpc/platform_if.m standard +powerpc/powerpc/ptrace_machdep.c standard powerpc/powerpc/sc_machdep.c optional sc powerpc/powerpc/setjmp.S standard powerpc/powerpc/sigcode32.S optional powerpc | compat_freebsd32 Modified: head/sys/powerpc/include/ptrace.h ============================================================================== --- head/sys/powerpc/include/ptrace.h Wed Jan 14 06:46:25 2015 (r277165) +++ head/sys/powerpc/include/ptrace.h Wed Jan 14 07:01:21 2015 (r277166) @@ -1,6 +1,6 @@ /*- - * Copyright (c) 1992, 1993 - * The Regents of the University of California. All rights reserved. + * Copyright (c) 2014 Justin Hibbits + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,4 +33,9 @@ #ifndef _MACHINE_PTRACE_H_ #define _MACHINE_PTRACE_H_ +#define __HAVE_PTRACE_MACHDEP + +#define PT_GETVRREGS (PT_FIRSTMACH + 0) +#define PT_SETVRREGS (PT_FIRSTMACH + 1) + #endif Modified: head/sys/powerpc/include/reg.h ============================================================================== --- head/sys/powerpc/include/reg.h Wed Jan 14 06:46:25 2015 (r277165) +++ head/sys/powerpc/include/reg.h Wed Jan 14 07:01:21 2015 (r277166) @@ -24,6 +24,14 @@ struct fpreg { double fpscr; }; +/* Must match pcb.pcb_vec */ +struct vmxreg { + uint32_t vr[32][4]; + uint32_t pad[2]; + uint32_t vrsave; + uint32_t vscr; +}; + struct dbreg { unsigned int junk; }; @@ -43,6 +51,10 @@ struct fpreg32 { struct fpreg data; }; +struct vmxreg32 { + struct vmxreg data; +}; + struct dbreg32 { struct dbreg data; }; Added: head/sys/powerpc/powerpc/ptrace_machdep.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/powerpc/powerpc/ptrace_machdep.c Wed Jan 14 07:01:21 2015 (r277166) @@ -0,0 +1,82 @@ +/*- + * Copyright (c) 2014 Justin Hibbits + * 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 "opt_compat.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int +cpu_ptrace(struct thread *td, int req, void *addr, int data) +{ + int error; + struct pcb *pcb; + struct vec vec; + + pcb = td->td_pcb; + + bzero(&vec, sizeof(vec)); + + error = EINVAL; + switch (req) { + case PT_GETVRREGS: + if (!(cpu_features & PPC_FEATURE_HAS_ALTIVEC)) + break; + + if (pcb->pcb_flags & PCB_VEC) { + save_vec_nodrop(td); + memcpy(&vec, &pcb->pcb_vec, sizeof(vec)); + } + error = copyout(&vec, addr, sizeof(vec)); + break; + case PT_SETVRREGS: + if (!(cpu_features & PPC_FEATURE_HAS_ALTIVEC)) + break; + error = copyin(addr, &vec, sizeof(vec)); + if (error == 0) { + pcb->pcb_flags |= PCB_VEC; + memcpy(&pcb->pcb_vec, &vec, sizeof(vec)); + } + break; + + default: + break; + } + + return (error); +} From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 07:02:23 2015 Return-Path: Delivered-To: svn-src-head@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 0BC71997; Wed, 14 Jan 2015 07:02: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 D395F101; Wed, 14 Jan 2015 07:02: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 t0E72M27009460; Wed, 14 Jan 2015 07:02:22 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E72M72009459; Wed, 14 Jan 2015 07:02:22 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501140702.t0E72M72009459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Wed, 14 Jan 2015 07:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277167 - head/usr.bin/gcore X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 07:02:23 -0000 Author: jhibbits Date: Wed Jan 14 07:02:21 2015 New Revision: 277167 URL: https://svnweb.freebsd.org/changeset/base/277167 Log: Make use of the new Altivec ptrace support, to save the Altivec registers in gcore. MFC after: 2 weeks Relnotes: yes Modified: head/usr.bin/gcore/elfcore.c Modified: head/usr.bin/gcore/elfcore.c ============================================================================== --- head/usr.bin/gcore/elfcore.c Wed Jan 14 07:01:21 2015 (r277166) +++ head/usr.bin/gcore/elfcore.c Wed Jan 14 07:02:21 2015 (r277167) @@ -105,6 +105,9 @@ static void *elf_note_thrmisc(void *, si #if defined(__i386__) || defined(__amd64__) static void *elf_note_x86_xstate(void *, size_t *); #endif +#if defined(__powerpc__) +static void *elf_note_powerpc_vmx(void *, size_t *); +#endif static void *elf_note_procstat_auxv(void *, size_t *); static void *elf_note_procstat_files(void *, size_t *); static void *elf_note_procstat_groups(void *, size_t *); @@ -348,6 +351,9 @@ elf_putnotes(pid_t pid, struct sbuf *sb, #if defined(__i386__) || defined(__amd64__) elf_putnote(NT_X86_XSTATE, elf_note_x86_xstate, tids + i, sb); #endif +#if defined(__powerpc__) + elf_putnote(NT_PPC_VMX, elf_note_powerpc_vmx, tids + i, sb); +#endif } #ifndef ELFCORE_COMPAT_32 @@ -650,6 +656,32 @@ elf_note_x86_xstate(void *arg, size_t *s } #endif +#if defined(__powerpc__) +static void * +elf_note_powerpc_vmx(void *arg, size_t *sizep) +{ + lwpid_t tid; + struct vmxreg *vmx; + static bool has_vmx = true; + struct vmxreg info; + + tid = *(lwpid_t *)arg; + if (has_vmx) { + if (ptrace(PT_GETVRREGS, tid, (void *)&info, + sizeof(info)) != 0) + has_vmx = false; + } + if (!has_vmx) { + *sizep = 0; + return (NULL); + } + vmx = calloc(1, sizeof(*vmx)); + memcpy(vmx, &info, sizeof(*vmx)); + *sizep = sizeof(*vmx); + return (vmx); +} +#endif + static void * procstat_sysctl(void *arg, int what, size_t structsz, size_t *sizep) { From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 07:18:52 2015 Return-Path: Delivered-To: svn-src-head@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 4A1E0C65; Wed, 14 Jan 2015 07:18: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 3807E212; Wed, 14 Jan 2015 07:18: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 t0E7IqVI014953; Wed, 14 Jan 2015 07:18:52 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E7IqCo014952; Wed, 14 Jan 2015 07:18:52 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501140718.t0E7IqCo014952@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Wed, 14 Jan 2015 07:18:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277168 - head/sys/amd64/vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 07:18:52 -0000 Author: neel Date: Wed Jan 14 07:18:51 2015 New Revision: 277168 URL: https://svnweb.freebsd.org/changeset/base/277168 Log: Fix typo (missing comma). MFC after: 3 days Modified: head/sys/amd64/vmm/vmm_ioport.c Modified: head/sys/amd64/vmm/vmm_ioport.c ============================================================================== --- head/sys/amd64/vmm/vmm_ioport.c Wed Jan 14 07:02:21 2015 (r277167) +++ head/sys/amd64/vmm/vmm_ioport.c Wed Jan 14 07:18:51 2015 (r277168) @@ -74,7 +74,7 @@ inout_instruction(struct vm_exit *vmexit static const char *iodesc[] = { "outb", "outw", "outl", "inb", "inw", "inl", - "outsb", "outsw", "outsd" + "outsb", "outsw", "outsd", "insb", "insw", "insd", }; From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 09:39:58 2015 Return-Path: Delivered-To: svn-src-head@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 D46A8CFD; Wed, 14 Jan 2015 09:39: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 BF2AC3A6; Wed, 14 Jan 2015 09:39: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 t0E9dwE3081464; Wed, 14 Jan 2015 09:39:58 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0E9dw1h081463; Wed, 14 Jan 2015 09:39:58 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501140939.t0E9dw1h081463@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Jan 2015 09:39:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277169 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 09:39:59 -0000 Author: mav Date: Wed Jan 14 09:39:57 2015 New Revision: 277169 URL: https://svnweb.freebsd.org/changeset/base/277169 Log: Reimplement TRIM throttling added in r248577. Previous throttling implementation approached problem from the wrong side. It significantly limited useful delaying of TRIM requests and aggregation potential, while not so much controlled TRIM burstiness under heavy load. With this change random 4K write benchmarks (probably the worst case for TRIM) show me IOPS increase by 20%, average latency reduction by 30%, peak TRIM bursts reduction by 3 times and same peak TRIM map size (memory usage). Also the new logic does not force map size down so heavily, really allowing to keep deleted data for 32 TXG or 30 seconds under moderate load. It was practically impossible with old throttling logic, which pushed map down to only 64 segments. Reviewed by: smh MFC after: 2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 07:18:51 2015 (r277168) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 09:39:57 2015 (r277169) @@ -40,17 +40,20 @@ #define TRIM_ZIO_END(vd, offset, size) (offset + \ P2ROUNDUP(size, 1ULL << vd->vdev_top->vdev_ashift)) -#define TRIM_MAP_SINC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, (size)) +/* Maximal segment size for ATA TRIM. */ +#define TRIM_MAP_SIZE_FACTOR (512 << 16) -#define TRIM_MAP_SDEC(tm, size) \ - atomic_add_64(&(tm)->tm_bytes, -(size)) +#define TRIM_MAP_SEGS(size) (1 + (size) / TRIM_MAP_SIZE_FACTOR) -#define TRIM_MAP_QINC(tm) \ - atomic_inc_64(&(tm)->tm_pending); \ - -#define TRIM_MAP_QDEC(tm) \ - atomic_dec_64(&(tm)->tm_pending); +#define TRIM_MAP_ADD(tm, ts) do { \ + list_insert_tail(&(tm)->tm_head, (ts)); \ + (tm)->tm_pending += TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \ +} while (0) + +#define TRIM_MAP_REM(tm, ts) do { \ + list_remove(&(tm)->tm_head, (ts)); \ + (tm)->tm_pending -= TRIM_MAP_SEGS((ts)->ts_end - (ts)->ts_start); \ +} while (0) typedef struct trim_map { list_t tm_head; /* List of segments sorted by txg. */ @@ -60,7 +63,6 @@ typedef struct trim_map { list_t tm_pending_writes; /* Writes blocked on in-flight frees. */ kmutex_t tm_lock; uint64_t tm_pending; /* Count of pending TRIMs. */ - uint64_t tm_bytes; /* Total size in bytes of queued TRIMs. */ } trim_map_t; typedef struct trim_seg { @@ -74,13 +76,10 @@ typedef struct trim_seg { extern boolean_t zfs_trim_enabled; -static u_int trim_txg_delay = 32; -static u_int trim_timeout = 30; -static u_int trim_max_interval = 1; -/* Limit outstanding TRIMs to 2G (max size for a single TRIM request) */ -static uint64_t trim_vdev_max_bytes = 2147483648; -/* Limit outstanding TRIMs to 64 (max ranges for a single TRIM request) */ -static u_int trim_vdev_max_pending = 64; +static u_int trim_txg_delay = 32; /* Keep deleted data up to 32 TXG */ +static u_int trim_timeout = 30; /* Keep deleted data up to 30s */ +static u_int trim_max_interval = 1; /* 1s delays between TRIMs */ +static u_int trim_vdev_max_pending = 10000; /* Keep up to 10K segments */ SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, trim, CTLFLAG_RD, 0, "ZFS TRIM"); @@ -94,9 +93,6 @@ SYSCTL_UINT(_vfs_zfs_trim, OID_AUTO, max "Maximum interval between TRIM queue processing (seconds)"); SYSCTL_DECL(_vfs_zfs_vdev); -SYSCTL_QUAD(_vfs_zfs_vdev, OID_AUTO, trim_max_bytes, CTLFLAG_RWTUN, - &trim_vdev_max_bytes, 0, - "Maximum pending TRIM bytes for a vdev"); SYSCTL_UINT(_vfs_zfs_vdev, OID_AUTO, trim_max_pending, CTLFLAG_RWTUN, &trim_vdev_max_pending, 0, "Maximum pending TRIM segments for a vdev"); @@ -189,10 +185,8 @@ trim_map_destroy(vdev_t *vd) mutex_enter(&tm->tm_lock); while ((ts = list_head(&tm->tm_head)) != NULL) { avl_remove(&tm->tm_queued_frees, ts); - list_remove(&tm->tm_head, ts); + TRIM_MAP_REM(tm, ts); kmem_free(ts, sizeof (*ts)); - TRIM_MAP_SDEC(tm, ts->ts_end - ts->ts_start); - TRIM_MAP_QDEC(tm); } mutex_exit(&tm->tm_lock); @@ -237,40 +231,34 @@ trim_map_segment_add(trim_map_t *tm, uin merge_after = (ts_after != NULL && ts_after->ts_start == end); if (merge_before && merge_after) { - TRIM_MAP_SINC(tm, ts_after->ts_start - ts_before->ts_end); - TRIM_MAP_QDEC(tm); avl_remove(&tm->tm_queued_frees, ts_before); - list_remove(&tm->tm_head, ts_before); + TRIM_MAP_REM(tm, ts_before); + TRIM_MAP_REM(tm, ts_after); ts_after->ts_start = ts_before->ts_start; ts_after->ts_txg = txg; ts_after->ts_time = time; - list_remove(&tm->tm_head, ts_after); - list_insert_tail(&tm->tm_head, ts_after); + TRIM_MAP_ADD(tm, ts_after); kmem_free(ts_before, sizeof (*ts_before)); } else if (merge_before) { - TRIM_MAP_SINC(tm, end - ts_before->ts_end); + TRIM_MAP_REM(tm, ts_before); ts_before->ts_end = end; ts_before->ts_txg = txg; ts_before->ts_time = time; - list_remove(&tm->tm_head, ts_before); - list_insert_tail(&tm->tm_head, ts_before); + TRIM_MAP_ADD(tm, ts_before); } else if (merge_after) { - TRIM_MAP_SINC(tm, ts_after->ts_start - start); + TRIM_MAP_REM(tm, ts_after); ts_after->ts_start = start; ts_after->ts_txg = txg; ts_after->ts_time = time; - list_remove(&tm->tm_head, ts_after); - list_insert_tail(&tm->tm_head, ts_after); + TRIM_MAP_ADD(tm, ts_after); } else { - TRIM_MAP_SINC(tm, end - start); - TRIM_MAP_QINC(tm); ts = kmem_alloc(sizeof (*ts), KM_SLEEP); ts->ts_start = start; ts->ts_end = end; ts->ts_txg = txg; ts->ts_time = time; avl_insert(&tm->tm_queued_frees, ts, where); - list_insert_tail(&tm->tm_head, ts); + TRIM_MAP_ADD(tm, ts); } } @@ -286,7 +274,7 @@ trim_map_segment_remove(trim_map_t *tm, left_over = (ts->ts_start < start); right_over = (ts->ts_end > end); - TRIM_MAP_SDEC(tm, end - start); + TRIM_MAP_REM(tm, ts); if (left_over && right_over) { nts = kmem_alloc(sizeof (*nts), KM_SLEEP); nts->ts_start = end; @@ -295,16 +283,16 @@ trim_map_segment_remove(trim_map_t *tm, nts->ts_time = ts->ts_time; ts->ts_end = start; avl_insert_here(&tm->tm_queued_frees, nts, ts, AVL_AFTER); - list_insert_after(&tm->tm_head, ts, nts); - TRIM_MAP_QINC(tm); + TRIM_MAP_ADD(tm, ts); + TRIM_MAP_ADD(tm, nts); } else if (left_over) { ts->ts_end = start; + TRIM_MAP_ADD(tm, ts); } else if (right_over) { ts->ts_start = end; + TRIM_MAP_ADD(tm, ts); } else { avl_remove(&tm->tm_queued_frees, ts); - list_remove(&tm->tm_head, ts); - TRIM_MAP_QDEC(tm); kmem_free(ts, sizeof (*ts)); } } @@ -423,7 +411,8 @@ trim_map_write_done(zio_t *zio) * the first element's time is not greater than time argument */ static trim_seg_t * -trim_map_first(trim_map_t *tm, uint64_t txg, uint64_t txgsafe, hrtime_t time) +trim_map_first(trim_map_t *tm, uint64_t txg, uint64_t txgsafe, hrtime_t time, + boolean_t force) { trim_seg_t *ts; @@ -432,9 +421,7 @@ trim_map_first(trim_map_t *tm, uint64_t ts = list_head(&tm->tm_head); if (ts != NULL && ts->ts_txg <= txgsafe && - (ts->ts_txg <= txg || ts->ts_time <= time || - tm->tm_bytes > trim_vdev_max_bytes || - tm->tm_pending > trim_vdev_max_pending)) + (ts->ts_txg <= txg || ts->ts_time <= time || force)) return (ts); return (NULL); } @@ -445,6 +432,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * trim_map_t *tm = vd->vdev_trimmap; trim_seg_t *ts; uint64_t size, offset, txgtarget, txgsafe; + int64_t hard, soft; hrtime_t timelimit; ASSERT(vd->vdev_ops->vdev_op_leaf); @@ -465,16 +453,19 @@ trim_map_vdev_commit(spa_t *spa, zio_t * } mutex_enter(&tm->tm_lock); + hard = 0; + if (tm->tm_pending > trim_vdev_max_pending) + hard = (tm->tm_pending - trim_vdev_max_pending) / 4; + soft = P2ROUNDUP(hard + tm->tm_pending / trim_timeout + 1, 64); /* Loop until we have sent all outstanding free's */ - while ((ts = trim_map_first(tm, txgtarget, txgsafe, timelimit)) + while (soft > 0 && + (ts = trim_map_first(tm, txgtarget, txgsafe, timelimit, hard > 0)) != NULL) { - list_remove(&tm->tm_head, ts); + TRIM_MAP_REM(tm, ts); avl_remove(&tm->tm_queued_frees, ts); avl_add(&tm->tm_inflight_frees, ts); size = ts->ts_end - ts->ts_start; offset = ts->ts_start; - TRIM_MAP_SDEC(tm, size); - TRIM_MAP_QDEC(tm); /* * We drop the lock while we call zio_nowait as the IO * scheduler can result in a different IO being run e.g. @@ -484,6 +475,8 @@ trim_map_vdev_commit(spa_t *spa, zio_t * zio_nowait(zio_trim(zio, spa, vd, offset, size)); + soft -= TRIM_MAP_SEGS(size); + hard -= TRIM_MAP_SEGS(size); mutex_enter(&tm->tm_lock); } mutex_exit(&tm->tm_lock); From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 11:15:58 2015 Return-Path: Delivered-To: svn-src-head@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 71B634C8; Wed, 14 Jan 2015 11:15: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 5319E135; Wed, 14 Jan 2015 11:15: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 t0EBFw5D028363; Wed, 14 Jan 2015 11:15:58 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBFvPP028361; Wed, 14 Jan 2015 11:15:57 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141115.t0EBFvPP028361@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:15:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277170 - in head: sbin/devd 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:15:58 -0000 Author: trasz Date: Wed Jan 14 11:15:57 2015 New Revision: 277170 URL: https://svnweb.freebsd.org/changeset/base/277170 Log: Add devd(8) notifications for creation and destruction of GEOM devices. Differential Revision: https://reviews.freebsd.org/D1211 MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/sbin/devd/devd.conf.5 head/sys/geom/geom_dev.c Modified: head/sbin/devd/devd.conf.5 ============================================================================== --- head/sbin/devd/devd.conf.5 Wed Jan 14 09:39:57 2015 (r277169) +++ head/sbin/devd/devd.conf.5 Wed Jan 14 11:15:57 2015 (r277170) @@ -41,7 +41,7 @@ .\" ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS .\" SOFTWARE. .\" -.Dd February 22, 2013 +.Dd January 14, 2015 .Dt DEVD.CONF 5 .Os .Sh NAME @@ -370,6 +370,33 @@ node is destroyed. .El .El .Pp +.It Li GEOM +Events related to the +.Xr geom 4 +framework. +The difference compared to +.Li DEVFS +is that +.Li GEOM +only includes disk-like devices. +.Bl -tag -width ".Sy Subsystem" -compact +.It Sy Subsystem +.It Li DEV +.Bl -tag -width ".Li MEDIACHANGE" -compact +.It Sy Type +.It Li CREATE +A +.Xr geom 4 +device node is created. +.It Li DESTROY +A +.Xr geom 4 +device node is destroyed. +.It Li MEDIACHANGE +Physical media has changed. +.El +.El +.Pp .It Li USB Events related to the USB subsystem. .Bl -tag -width ".Sy Subsystem" -compact Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Wed Jan 14 09:39:57 2015 (r277169) +++ head/sys/geom/geom_dev.c Wed Jan 14 11:15:57 2015 (r277170) @@ -169,12 +169,15 @@ g_dev_destroy(void *arg, int flags __unu struct g_consumer *cp; struct g_geom *gp; struct g_dev_softc *sc; + char buf[SPECNAMELEN + 6]; g_topology_assert(); cp = arg; gp = cp->geom; sc = cp->private; g_trace(G_T_TOPOLOGY, "g_dev_destroy(%p(%s))", cp, gp->name); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "DESTROY", buf, M_WAITOK); if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) g_access(cp, -cp->acr, -cp->acw, -cp->ace); g_detach(cp); @@ -209,11 +212,14 @@ g_dev_attrchanged(struct g_consumer *cp, dev = sc->sc_dev; snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, M_WAITOK); dev = sc->sc_alias; if (dev != NULL) { snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + devctl_notify_f("GEOM", "DEV", "MEDIACHANGE", buf, + M_WAITOK); } return; } @@ -269,7 +275,7 @@ g_dev_taste(struct g_class *mp, struct g struct g_dev_softc *sc; int error, len; struct cdev *dev, *adev; - char buf[64], *val; + char buf[SPECNAMELEN + 6], *val; g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); @@ -326,6 +332,8 @@ g_dev_taste(struct g_class *mp, struct g } g_dev_attrchanged(cp, "GEOM::physpath"); + snprintf(buf, sizeof(buf), "cdev=%s", gp->name); + devctl_notify_f("GEOM", "DEV", "CREATE", buf, M_WAITOK); return (gp); } From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 11:18:46 2015 Return-Path: Delivered-To: svn-src-head@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 B1D8A646; Wed, 14 Jan 2015 11:18: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 9E1D3155; Wed, 14 Jan 2015 11:18: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 t0EBIkvU028731; Wed, 14 Jan 2015 11:18:46 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBIk0B028730; Wed, 14 Jan 2015 11:18:46 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141118.t0EBIk0B028730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:18:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277171 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:18:46 -0000 Author: trasz Date: Wed Jan 14 11:18:45 2015 New Revision: 277171 URL: https://svnweb.freebsd.org/changeset/base/277171 Log: Use newly added GEOM notifications to discard autofs caches. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Wed Jan 14 11:15:57 2015 (r277170) +++ head/etc/devd.conf Wed Jan 14 11:18:45 2015 (r277171) @@ -318,16 +318,11 @@ notify 0 { action "/usr/local/etc/rc.d/postgresql restart"; }; -# Discard autofs caches, useful for the -media special map. The one -# second delay is for GEOM to finish tasting. -# -# XXX: We should probably have a devctl(4) event that fires after GEOM -# tasting. -# +# Discard autofs caches, useful for the -media special map. notify 100 { - match "system" "DEVFS"; - match "cdev" "(da|mmcsd)[0-9]+"; - action "sleep 1 && /usr/sbin/automount -c"; + match "system" "GEOM"; + match "subsystem" "DEV"; + action "/usr/sbin/automount -c"; }; */ From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 11:26:04 2015 Return-Path: Delivered-To: svn-src-head@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 5D1E68EE; Wed, 14 Jan 2015 11:26: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 4825523E; Wed, 14 Jan 2015 11:26: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 t0EBQ4Oc033074; Wed, 14 Jan 2015 11:26:04 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBQ4LL033073; Wed, 14 Jan 2015 11:26:04 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141126.t0EBQ4LL033073@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:26:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277172 - head/usr.sbin/fstyp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:26:04 -0000 Author: trasz Date: Wed Jan 14 11:26:03 2015 New Revision: 277172 URL: https://svnweb.freebsd.org/changeset/base/277172 Log: Improve wording. MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/fstyp/fstyp.8 Modified: head/usr.sbin/fstyp/fstyp.8 ============================================================================== --- head/usr.sbin/fstyp/fstyp.8 Wed Jan 14 11:18:45 2015 (r277171) +++ head/usr.sbin/fstyp/fstyp.8 Wed Jan 14 11:26:03 2015 (r277172) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 6, 2014 +.Dd January 14, 2015 .Dt FSTYP 8 .Os .Sh NAME @@ -58,9 +58,9 @@ is built specifically to detect filesyst .Xr file 1 in several ways. The output is machine-parsable, filesystem labels are supported, -and only filesystems are identified. -Security is improved with -.Xr capsicum 4 . +the utility runs sandboxed using +.Xr capsicum 4 , +and does not try to recognize any file format other than filesystems. .Pp These options are available: .Bl -tag -width ".Fl l" From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 11:53:42 2015 Return-Path: Delivered-To: svn-src-head@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 52E079F; Wed, 14 Jan 2015 11:53: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 3E8A3794; Wed, 14 Jan 2015 11:53: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 t0EBrg2F046891; Wed, 14 Jan 2015 11:53:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EBrg0k046890; Wed, 14 Jan 2015 11:53:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501141153.t0EBrg0k046890@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Wed, 14 Jan 2015 11:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277175 - head/share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 11:53:42 -0000 Author: trasz Date: Wed Jan 14 11:53:41 2015 New Revision: 277175 URL: https://svnweb.freebsd.org/changeset/base/277175 Log: Mention /net in hier(7). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/share/man/man7/hier.7 Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Wed Jan 14 11:31:31 2015 (r277174) +++ head/share/man/man7/hier.7 Wed Jan 14 11:53:41 2015 (r277175) @@ -28,7 +28,7 @@ .\" @(#)hier.7 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd November 10, 2014 +.Dd January 14, 2015 .Dt HIER 7 .Os .Sh NAME @@ -159,6 +159,10 @@ floppy disks .It Pa /mnt/ empty directory commonly used by system administrators as a temporary mount point +.It Pa /net/ +automounted NFS shares; +see +.Xr auto_master 5 .It Pa /proc/ process file system; see From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 12:46:39 2015 Return-Path: Delivered-To: svn-src-head@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 B8FF1B08; Wed, 14 Jan 2015 12:46: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 8ABDFC69; Wed, 14 Jan 2015 12:46: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 t0ECkdwW070380; Wed, 14 Jan 2015 12:46:39 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ECkcrY070372; Wed, 14 Jan 2015 12:46:38 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501141246.t0ECkcrY070372@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 14 Jan 2015 12:46:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277176 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 12:46:39 -0000 Author: glebius Date: Wed Jan 14 12:46:38 2015 New Revision: 277176 URL: https://svnweb.freebsd.org/changeset/base/277176 Log: Clean some dead code. Modified: head/sys/dev/mii/mii.c head/sys/dev/mii/mii_physubr.c head/sys/dev/mii/miivar.h Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Wed Jan 14 11:53:41 2015 (r277175) +++ head/sys/dev/mii/mii.c Wed Jan 14 12:46:38 2015 (r277176) @@ -612,18 +612,6 @@ mii_pollstat(struct mii_data *mii) } } -/* - * Inform the PHYs that the interface is down. - */ -void -mii_down(struct mii_data *mii) -{ - struct mii_softc *child; - - LIST_FOREACH(child, &mii->mii_phys, mii_list) - mii_phy_down(child); -} - static unsigned char mii_bitreverse(unsigned char x) { Modified: head/sys/dev/mii/mii_physubr.c ============================================================================== --- head/sys/dev/mii/mii_physubr.c Wed Jan 14 11:53:41 2015 (r277175) +++ head/sys/dev/mii/mii_physubr.c Wed Jan 14 12:46:38 2015 (r277176) @@ -279,12 +279,6 @@ mii_phy_reset(struct mii_softc *sc) } void -mii_phy_down(struct mii_softc *sc) -{ - -} - -void mii_phy_update(struct mii_softc *sc, int cmd) { struct mii_data *mii = sc->mii_pdata; @@ -479,7 +473,6 @@ mii_phy_detach(device_t dev) struct mii_softc *sc; sc = device_get_softc(dev); - mii_phy_down(sc); sc->mii_dev = NULL; LIST_REMOVE(sc, mii_list); return (0); Modified: head/sys/dev/mii/miivar.h ============================================================================== --- head/sys/dev/mii/miivar.h Wed Jan 14 11:53:41 2015 (r277175) +++ head/sys/dev/mii/miivar.h Wed Jan 14 12:46:38 2015 (r277176) @@ -235,7 +235,6 @@ extern driver_t miibus_driver; int mii_attach(device_t, device_t *, if_t, ifm_change_cb_t, ifm_stat_cb_t, int, int, int, int); -void mii_down(struct mii_data *); int mii_mediachg(struct mii_data *); void mii_tick(struct mii_data *); void mii_pollstat(struct mii_data *); @@ -243,7 +242,6 @@ void mii_phy_add_media(struct mii_softc int mii_phy_auto(struct mii_softc *); int mii_phy_detach(device_t dev); -void mii_phy_down(struct mii_softc *); u_int mii_phy_flowstatus(struct mii_softc *); void mii_phy_reset(struct mii_softc *); void mii_phy_setmedia(struct mii_softc *sc); From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 12:46:59 2015 Return-Path: Delivered-To: svn-src-head@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 A61D0C45; Wed, 14 Jan 2015 12:46: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 8FA35C6F; Wed, 14 Jan 2015 12:46: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 t0ECkxki070458; Wed, 14 Jan 2015 12:46:59 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ECkxsZ070455; Wed, 14 Jan 2015 12:46:59 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201501141246.t0ECkxsZ070455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 14 Jan 2015 12:46:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277177 - in head: lib/libpmc sys/dev/hwpmc sys/sys usr.sbin 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 12:46:59 -0000 Author: rrs Date: Wed Jan 14 12:46:58 2015 New Revision: 277177 URL: https://svnweb.freebsd.org/changeset/base/277177 Log: Update the hwpmc driver to have the new type HASWELL_XEON. Also go back through HASWELL, IVY_BRIDGE, IVY_BRIDGE_XEON and SANDY_BRIDGE to straighten out all the missing PMCs. We also add a new pmc tool pmcstudy, this allows one to run the various formulas from the documents "Using Intel Vtune Amplifier XE on XXX Generation platforms" for IB/SB and Haswell. The tool also allows one to postulate your own formulas with any of the various PMC's. At some point I will enahance this to work with Brendan Gregg's flame-graphs so we can flamegraph various PMC interactions. Note the manual page also needs some work (lots of work) but gnn has committed to help me with that ;-) Reviewed by: gnn MFC after:1 month Sponsored by: Netflix Inc. Added: head/usr.sbin/pmcstudy/ head/usr.sbin/pmcstudy/Makefile (contents, props changed) head/usr.sbin/pmcstudy/eval_expr.c (contents, props changed) head/usr.sbin/pmcstudy/eval_expr.h (contents, props changed) head/usr.sbin/pmcstudy/pmcstudy.1 (contents, props changed) head/usr.sbin/pmcstudy/pmcstudy.c (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/hwpmc/hwpmc_mod.c head/sys/dev/hwpmc/hwpmc_piv.c head/sys/dev/hwpmc/hwpmc_uncore.c head/sys/dev/hwpmc/hwpmc_x86.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h head/usr.sbin/Makefile Modified: head/lib/libpmc/libpmc.c ============================================================================== --- head/lib/libpmc/libpmc.c Wed Jan 14 12:46:38 2015 (r277176) +++ head/lib/libpmc/libpmc.c Wed Jan 14 12:46:58 2015 (r277177) @@ -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: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Wed Jan 14 12:46:38 2015 (r277176) +++ head/sys/dev/hwpmc/hwpmc_core.c Wed Jan 14 12:46:58 2015 (r277177) @@ -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 | IAP_F_I7 | IAP_F_WM), @@ -1668,7 +1697,8 @@ static struct iap_event_descr iap_events IAPDESCR(E6H_02H, 0xE6, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(E6H_08H, 0xE6, 0x08, IAP_F_CAS), IAPDESCR(E6H_10H, 0xE6, 0x10, IAP_F_CAS), - IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IBX | IAP_F_HW), + IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | + IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 13:03:04 2015 Return-Path: Delivered-To: svn-src-head@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 DA3A6E56; Wed, 14 Jan 2015 13:03: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 C699DE05; Wed, 14 Jan 2015 13:03: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 t0ED349I079407; Wed, 14 Jan 2015 13:03:04 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ED34QI079406; Wed, 14 Jan 2015 13:03:04 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201501141303.t0ED34QI079406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 14 Jan 2015 13:03:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277178 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 13:03:05 -0000 Author: ed Date: Wed Jan 14 13:03:03 2015 New Revision: 277178 URL: https://svnweb.freebsd.org/changeset/base/277178 Log: Make sure CAP_BINDAT and CAP_CONNECTAT are part of CAP_ALL0. This makes sure that file descriptors of opened directories will actually get these capabilities. Without this change, bindat() and connectat() don't seem to work for me. MFC after: 2 weeks Reviewed by: rwatson, pjd Modified: head/sys/sys/capsicum.h Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Wed Jan 14 12:46:58 2015 (r277177) +++ head/sys/sys/capsicum.h Wed Jan 14 13:03:03 2015 (r277178) @@ -206,10 +206,10 @@ CAP_SETSOCKOPT | CAP_SHUTDOWN) /* All used bits for index 0. */ -#define CAP_ALL0 CAPRIGHT(0, 0x0000007FFFFFFFFFULL) +#define CAP_ALL0 CAPRIGHT(0, 0x000001FFFFFFFFFFULL) /* Available bits for index 0. */ -#define CAP_UNUSED0_40 CAPRIGHT(0, 0x0000008000000000ULL) +#define CAP_UNUSED0_42 CAPRIGHT(0, 0x0000020000000000ULL) /* ... */ #define CAP_UNUSED0_57 CAPRIGHT(0, 0x0100000000000000ULL) From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 14:04:31 2015 Return-Path: Delivered-To: svn-src-head@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 9B0D0D4A; Wed, 14 Jan 2015 14:04: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 6C8CE679; Wed, 14 Jan 2015 14:04: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 t0EE4Va5008404; Wed, 14 Jan 2015 14:04:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EE4UR7008401; Wed, 14 Jan 2015 14:04:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501141404.t0EE4UR7008401@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 14:04:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277179 - in head/sys: dev/usb kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 14:04:31 -0000 Author: hselasky Date: Wed Jan 14 14:04:29 2015 New Revision: 277179 URL: https://svnweb.freebsd.org/changeset/base/277179 Log: Add a kernel function to delist our kernel character devices, so that the device name can be re-used right away in case we are destroying the character devices in the background. MFC after: 4 days Reported by: dchagin@ Modified: head/sys/dev/usb/usb_device.c head/sys/kern/kern_conf.c head/sys/sys/conf.h Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Wed Jan 14 13:03:03 2015 (r277178) +++ head/sys/dev/usb/usb_device.c Wed Jan 14 14:04:29 2015 (r277179) @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata * usb_destroy_dev_sync(pd); return; } - + + /* make sure we can re-use the device name */ + delist_dev(pd->cdev); + USB_BUS_LOCK(bus); LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); /* get cleanup going */ Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Wed Jan 14 13:03:03 2015 (r277178) +++ head/sys/kern/kern_conf.c Wed Jan 14 14:04:29 2015 (r277179) @@ -1114,6 +1114,23 @@ destroy_devl(struct cdev *dev) } } +static void +delist_dev_locked(struct cdev *dev) +{ + struct cdev *child; + devfs_destroy(dev); + LIST_FOREACH(child, &dev->si_children, si_siblings) + delist_dev_locked(child); +} + +void +delist_dev(struct cdev *dev) +{ + dev_lock(); + delist_dev_locked(dev); + dev_unlock(); +} + void destroy_dev(struct cdev *dev) { Modified: head/sys/sys/conf.h ============================================================================== --- head/sys/sys/conf.h Wed Jan 14 13:03:03 2015 (r277178) +++ head/sys/sys/conf.h Wed Jan 14 14:04:29 2015 (r277179) @@ -245,6 +245,7 @@ void clone_cleanup(struct clonedevs **); int clone_create(struct clonedevs **, struct cdevsw *, int *unit, struct cdev **dev, int extra); int count_dev(struct cdev *_dev); +void delist_dev(struct cdev *_dev); void destroy_dev(struct cdev *_dev); int destroy_dev_sched(struct cdev *dev); int destroy_dev_sched_cb(struct cdev *dev, void (*cb)(void *), void *arg); From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 14:23:07 2015 Return-Path: Delivered-To: svn-src-head@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 6A36B421; Wed, 14 Jan 2015 14:23:07 +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 42BE48D9; Wed, 14 Jan 2015 14:23:07 +0000 (UTC) Received: from new-host.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 27534B91E; Wed, 14 Jan 2015 09:23:06 -0500 (EST) Message-ID: <54B67BC9.70904@FreeBSD.org> Date: Wed, 14 Jan 2015 09:23:05 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> In-Reply-To: <201501140541.t0E5fV00070032@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); Wed, 14 Jan 2015 09:23:06 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 14:23:07 -0000 On 1/14/15 12:41 AM, Warner Losh wrote: > Author: imp > Date: Wed Jan 14 05:41:31 2015 > New Revision: 277163 > URL: https://svnweb.freebsd.org/changeset/base/277163 > > Log: > Add a rather obnoxious warning if you don't have NEW_PCIB defined > since it's a total crap shoot if things will work. Should we just make it a #error instead? (Some day I hope to have NEW_PCIB enabled by default and remove the old code. Will take a while to get there for the generic PCI code, but cardbus is probably only used on x86 so that would be fine.) -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 14:49:59 2015 Return-Path: Delivered-To: svn-src-head@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 4C39CF4; Wed, 14 Jan 2015 14:49: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 384DCB9A; Wed, 14 Jan 2015 14:49: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 t0EEnxhG028155; Wed, 14 Jan 2015 14:49:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EEnxsW028154; Wed, 14 Jan 2015 14:49:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501141449.t0EEnxsW028154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 14 Jan 2015 14:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277181 - head/contrib/elftoolchain/elfcopy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 14:49:59 -0000 Author: emaste Date: Wed Jan 14 14:49:58 2015 New Revision: 277181 URL: https://svnweb.freebsd.org/changeset/base/277181 Log: elfcopy: Avoid divide-by-0 on section alignment 0 According to ELF ABI, alignment 0 and 1 has the same meaning: the section has no alignment constraints. PR: 196715 Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/elfcopy/sections.c Modified: head/contrib/elftoolchain/elfcopy/sections.c ============================================================================== --- head/contrib/elftoolchain/elfcopy/sections.c Wed Jan 14 14:49:05 2015 (r277180) +++ head/contrib/elftoolchain/elfcopy/sections.c Wed Jan 14 14:49:58 2015 (r277181) @@ -777,6 +777,8 @@ resync_sections(struct elfcopy *ecp) continue; /* Align section offset. */ + if (s->align == 0) + s->align = 1; if (off <= s->off) { if (!s->loadable) s->off = roundup(off, s->align); From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 15:32:53 2015 Return-Path: Delivered-To: svn-src-head@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 17A58A3E; Wed, 14 Jan 2015 15:32:53 +0000 (UTC) Received: from mail-oi0-x22f.google.com (mail-oi0-x22f.google.com [IPv6:2607:f8b0:4003:c06::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CA4129D; Wed, 14 Jan 2015 15:32:52 +0000 (UTC) Received: by mail-oi0-f47.google.com with SMTP id z81so7815450oif.6; Wed, 14 Jan 2015 07:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=OZNVzr8Tn4QbXKNMyBa6ej29DpBnFem/3Un73VGZ27Y=; b=npNqqvdBUfGZqeQsos5sRTssouWnCbFRlWmyBeuWSXSlXw5PM5UfEID6dGSWU8f62f zDWji5QJ/PoGgk4YEciUzq3yDW/UcdCCMLj2BCARaDRG/Y4aG+Q9WUuNOJzDZHBpK9KV j1MP79PeHbvRFdUOfZKinW4pwJ0lnD4k7Y8Rn4MIbq9uxcEci0v1IiKnMc3LL49nWmpq Ap0Sj65ablJyKY/vWbnbHbgnNlMPJqytnU72299eonmZoDzUUe2FD+L5PHuUU82mtK7l m1Yc9+NPlLKh40NVNKREcKXRjN5JF65dvD9L3zkOlYdRKCi3OXYThJUdNq6rq2d6m4jD CJBQ== X-Received: by 10.182.153.133 with SMTP id vg5mr2882221obb.20.1421249572080; Wed, 14 Jan 2015 07:32:52 -0800 (PST) Received: from zhabar.attlocal.net (107-222-186-3.lightspeed.sntcca.sbcglobal.net. [107.222.186.3]) by mx.google.com with ESMTPSA id ve6sm12199646obb.2.2015.01.14.07.32.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jan 2015 07:32:51 -0800 (PST) Date: Wed, 14 Jan 2015 07:32:46 -0800 From: Justin Hibbits To: John Baldwin Subject: Re: svn commit: r277163 - head/sys/dev/cardbus Message-ID: <20150114073246.74c159df@zhabar.attlocal.net> In-Reply-To: <54B67BC9.70904@FreeBSD.org> References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; powerpc64-portbld-freebsd11.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, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 15:32:53 -0000 On Wed, 14 Jan 2015 09:23:05 -0500 John Baldwin wrote: > On 1/14/15 12:41 AM, Warner Losh wrote: > > Author: imp > > Date: Wed Jan 14 05:41:31 2015 > > New Revision: 277163 > > URL: https://svnweb.freebsd.org/changeset/base/277163 > > > > Log: > > Add a rather obnoxious warning if you don't have NEW_PCIB defined > > since it's a total crap shoot if things will work. > > Should we just make it a #error instead? (Some day I hope to have > NEW_PCIB enabled by default and remove the old code. Will take a > while to get there for the generic PCI code, but cardbus is probably > only used on x86 so that would be fine.) > Also powerpc, but NEW_PCIB is default there as well. - Justin From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 16:22:01 2015 Return-Path: Delivered-To: svn-src-head@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 87EEB8A4; Wed, 14 Jan 2015 16:22: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 738AC864; Wed, 14 Jan 2015 16:22: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 t0EGM1g2075105; Wed, 14 Jan 2015 16:22:01 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EGM1FL075104; Wed, 14 Jan 2015 16:22:01 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501141622.t0EGM1FL075104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Wed, 14 Jan 2015 16:22:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277185 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 16:22:01 -0000 Author: mav Date: Wed Jan 14 16:22:00 2015 New Revision: 277185 URL: https://svnweb.freebsd.org/changeset/base/277185 Log: Fix overflow bug from r248577, turning 30s TRIM timeout into ~4s. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 15:45:18 2015 (r277184) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/trim_map.c Wed Jan 14 16:22:00 2015 (r277185) @@ -440,7 +440,7 @@ trim_map_vdev_commit(spa_t *spa, zio_t * if (tm == NULL) return; - timelimit = gethrtime() - trim_timeout * NANOSEC; + timelimit = gethrtime() - (hrtime_t)trim_timeout * NANOSEC; if (vd->vdev_isl2cache) { txgsafe = UINT64_MAX; txgtarget = UINT64_MAX; From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 17:58:38 2015 Return-Path: Delivered-To: svn-src-head@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 10C62325; Wed, 14 Jan 2015 17:58:38 +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 D0F5C2D53; Wed, 14 Jan 2015 17:58:36 +0000 (UTC) Message-ID: <54B6AE1C.5010405@FreeBSD.org> Date: Wed, 14 Jan 2015 20:57:48 +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: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277179 - in head/sys: dev/usb kern sys References: <201501141404.t0EE4UR7008401@svn.freebsd.org> In-Reply-To: <201501141404.t0EE4UR7008401@svn.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 17:58:38 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 14.01.2015 17:04, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jan 14 14:04:29 2015 > New Revision: 277179 > URL: https://svnweb.freebsd.org/changeset/base/277179 >=20 > Log: > Add a kernel function to delist our kernel character devices, so that= > the device name can be re-used right away in case we are destroying > the character devices in the background. > =20 > MFC after: 4 days > Reported by: dchagin@ >=20 > Modified: > head/sys/dev/usb/usb_device.c > head/sys/kern/kern_conf.c > head/sys/sys/conf.h >=20 > Modified: head/sys/dev/usb/usb_device.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/dev/usb/usb_device.c Wed Jan 14 13:03:03 2015 (r277178) > +++ head/sys/dev/usb/usb_device.c Wed Jan 14 14:04:29 2015 (r277179) > @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata * > usb_destroy_dev_sync(pd); > return; > } > -=09 > + > + /* make sure we can re-use the device name */ > + delist_dev(pd->cdev); > + > USB_BUS_LOCK(bus); > LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); > /* get cleanup going */ >=20 > Modified: head/sys/kern/kern_conf.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_conf.c Wed Jan 14 13:03:03 2015 (r277178) > +++ head/sys/kern/kern_conf.c Wed Jan 14 14:04:29 2015 (r277179) > @@ -1114,6 +1114,23 @@ destroy_devl(struct cdev *dev) > } > } > =20 > +static void > +delist_dev_locked(struct cdev *dev) > +{ > + struct cdev *child; > + devfs_destroy(dev); > + LIST_FOREACH(child, &dev->si_children, si_siblings) > + delist_dev_locked(child); > +} It looks a bit strange. First you call destroy(dev), then you are trying enumerate its children. It is ok? --=20 WBR, Andrey V. Elsukov --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv 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/ iQEcBAEBCAAGBQJUtq4dAAoJEAHF6gQQyKF6Dq0H/3C/56a4gNkHOzh+VJlDXHlT hdllrSTg6Os4I+elYlviyOBKthU7hFOlx0NKwt+J5VL7UVAgLiUcHM9jrpFka+9a 2trKZxKUUbvYqRuL5iaPFH2m4RxfuldgFD6GlkallOO1J4tBVZaPIW/g85M+PK1i u92k+tVjLaK3iepf1L/OeYXdSjIAM8TapsE8S5KmtB7yr7t1ExrxlxRDGc+eq1m7 hFXxo4KSYcyvBv3ltybBU7fIf0F81ngQdyuHVBx6sVG78NCeB6X+XkdOc8a/WZ6P xzNtMcuCnwEUAWWoQcEWnAHAKS+DV78g1eG4nOB5MPAO1rlslyHlshlbca9fzrQ= =JQPf -----END PGP SIGNATURE----- --qh5AbhjpGMqeS3mGVfthslMgimUVLwfwv-- From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 19:54:59 2015 Return-Path: Delivered-To: svn-src-head@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 2D762E39; Wed, 14 Jan 2015 19:54:59 +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 E263A1A4; Wed, 14 Jan 2015 19:54:58 +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 590761FE022; Wed, 14 Jan 2015 20:54:56 +0100 (CET) Message-ID: <54B6C9BF.6010408@selasky.org> Date: Wed, 14 Jan 2015 20:55:43 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Andrey V. Elsukov" , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277179 - in head/sys: dev/usb kern sys References: <201501141404.t0EE4UR7008401@svn.freebsd.org> <54B6AE1C.5010405@FreeBSD.org> In-Reply-To: <54B6AE1C.5010405@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 19:54:59 -0000 On 01/14/15 18:57, Andrey V. Elsukov wrote: > On 14.01.2015 17:04, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Jan 14 14:04:29 2015 >> New Revision: 277179 >> URL: https://svnweb.freebsd.org/changeset/base/277179 >> >> Log: >> Add a kernel function to delist our kernel character devices, so that >> the device name can be re-used right away in case we are destroying >> the character devices in the background. >> >> MFC after: 4 days >> Reported by: dchagin@ >> >> Modified: >> head/sys/dev/usb/usb_device.c >> head/sys/kern/kern_conf.c >> head/sys/sys/conf.h >> >> Modified: head/sys/dev/usb/usb_device.c >> ============================================================================== >> --- head/sys/dev/usb/usb_device.c Wed Jan 14 13:03:03 2015 (r277178) >> +++ head/sys/dev/usb/usb_device.c Wed Jan 14 14:04:29 2015 (r277179) >> @@ -2019,7 +2019,10 @@ usb_destroy_dev(struct usb_fs_privdata * >> usb_destroy_dev_sync(pd); >> return; >> } >> - >> + >> + /* make sure we can re-use the device name */ >> + delist_dev(pd->cdev); >> + >> USB_BUS_LOCK(bus); >> LIST_INSERT_HEAD(&bus->pd_cleanup_list, pd, pd_next); >> /* get cleanup going */ >> >> Modified: head/sys/kern/kern_conf.c >> ============================================================================== >> --- head/sys/kern/kern_conf.c Wed Jan 14 13:03:03 2015 (r277178) >> +++ head/sys/kern/kern_conf.c Wed Jan 14 14:04:29 2015 (r277179) >> @@ -1114,6 +1114,23 @@ destroy_devl(struct cdev *dev) >> } >> } >> >> +static void >> +delist_dev_locked(struct cdev *dev) >> +{ >> + struct cdev *child; >> + devfs_destroy(dev); >> + LIST_FOREACH(child, &dev->si_children, si_siblings) >> + delist_dev_locked(child); >> +} > > It looks a bit strange. First you call destroy(dev), then you are trying > enumerate its children. It is ok? > Hi, Maybe you misread dev_destroy() with devfs_destroy(). devfs_destroy() only clears a flag bit, so that the devfs system does no longer show the device and the duplicate device check done when you create a new character device is not seeing the yet-to-be destroyed device. It should be OK from what I can see and have tested. --HPS From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 22:07:14 2015 Return-Path: Delivered-To: svn-src-head@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 6D02DF22; Wed, 14 Jan 2015 22:07: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 5812B5FD; Wed, 14 Jan 2015 22:07: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 t0EM7EEG041545; Wed, 14 Jan 2015 22:07:14 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EM7Dfn041543; Wed, 14 Jan 2015 22:07:13 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501142207.t0EM7Dfn041543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 14 Jan 2015 22:07:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277199 - in head/sys: fs/devfs kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 22:07:14 -0000 Author: hselasky Date: Wed Jan 14 22:07:13 2015 New Revision: 277199 URL: https://svnweb.freebsd.org/changeset/base/277199 Log: Avoid race with "dev_rel()" when using the recently added "delist_dev()" function. Make sure the character device structure doesn't go away until the end of the "destroy_dev()" function due to concurrently running cleanup code inside "devfs_populate()". MFC after: 1 week Reported by: dchagin@ Modified: head/sys/fs/devfs/devfs_devs.c head/sys/kern/kern_conf.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) @@ -137,6 +137,12 @@ devfs_alloc(int flags) vfs_timestamp(&ts); cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; cdev->si_cred = NULL; + /* + * Avoid race with dev_rel() by setting the initial + * reference count to 1. This last reference is taken + * by the destroy_dev() function. + */ + cdev->si_refcount = 1; return (cdev); } Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Wed Jan 14 22:05:57 2015 (r277198) +++ head/sys/kern/kern_conf.c Wed Jan 14 22:07:13 2015 (r277199) @@ -1048,8 +1048,6 @@ destroy_devl(struct cdev *dev) /* Remove name marking */ dev->si_flags &= ~SI_NAMED; - dev->si_refcount++; /* Avoid race with dev_rel() */ - /* If we are a child, remove us from the parents list */ if (dev->si_flags & SI_CHILD) { LIST_REMOVE(dev, si_siblings); From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 22:37:12 2015 Return-Path: Delivered-To: svn-src-head@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 6FE2079E; Wed, 14 Jan 2015 22:37: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 5AEFD9BD; Wed, 14 Jan 2015 22:37: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 t0EMbCkd056184; Wed, 14 Jan 2015 22:37:12 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0EMbCuX056183; Wed, 14 Jan 2015 22:37:12 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501142237.t0EMbCuX056183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Wed, 14 Jan 2015 22:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277201 - head/contrib/compiler-rt/lib/sanitizer_common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 22:37:12 -0000 Author: dim Date: Wed Jan 14 22:37:11 2015 New Revision: 277201 URL: https://svnweb.freebsd.org/changeset/base/277201 Log: Remove the include from one of the newly added sanitizer sources. It is apparently unnecessary, and causes trouble for people using WITHOUT_IPFILTER. Reported by: Pawel Biernacki , Kurt Lidl Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Modified: head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ============================================================================== --- head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Jan 14 22:16:07 2015 (r277200) +++ head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc Wed Jan 14 22:37:11 2015 (r277201) @@ -97,7 +97,6 @@ # include # include # include -# include # include # include # include From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 23:34:01 2015 Return-Path: Delivered-To: svn-src-head@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 2C3985A1; Wed, 14 Jan 2015 23:34: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 F1D27109; Wed, 14 Jan 2015 23:34: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 t0ENY0GU084055; Wed, 14 Jan 2015 23:34:00 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ENY0mQ084054; Wed, 14 Jan 2015 23:34:00 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201501142334.t0ENY0mQ084054@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Wed, 14 Jan 2015 23:34:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277202 - head/contrib/ntp/ntpd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 23:34:01 -0000 Author: hiren Date: Wed Jan 14 23:34:00 2015 New Revision: 277202 URL: https://svnweb.freebsd.org/changeset/base/277202 Log: ntpd tries to bind to IPv6 interfaces in 'tentative' state and fails as IPv6 is actually disabled. Fix it by making ntpd ignore such interfaces. Submitted by: ume Reviewed by: bz, gnn MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D1527 Modified: head/contrib/ntp/ntpd/ntp_io.c Modified: head/contrib/ntp/ntpd/ntp_io.c ============================================================================== --- head/contrib/ntp/ntpd/ntp_io.c Wed Jan 14 22:37:11 2015 (r277201) +++ head/contrib/ntp/ntpd/ntp_io.c Wed Jan 14 23:34:00 2015 (r277202) @@ -1176,12 +1176,13 @@ set_wildcard_reuse(int family, int on) #ifdef INCLUDE_IPV6_SUPPORT static isc_boolean_t -is_anycast(struct sockaddr *sa, char *name) +is_not_bindable(struct sockaddr *sa, char *name) { -#if defined(SIOCGIFAFLAG_IN6) && defined(IN6_IFF_ANYCAST) +#if defined(SIOCGIFAFLAG_IN6) && \ + (defined(IN6_IFF_ANYCAST) || defined(IN6_IFF_NOTREADY)) struct in6_ifreq ifr6; int fd; - u_int32_t flags6; + u_int32_t flags6, exclude = 0; if (sa->sa_family != AF_INET6) return ISC_FALSE; @@ -1197,9 +1198,15 @@ is_anycast(struct sockaddr *sa, char *na } close(fd); flags6 = ifr6.ifr_ifru.ifru_flags6; - if ((flags6 & IN6_IFF_ANYCAST) != 0) +#if defined(IN6_IFF_ANYCAST) + exclude |= IN6_IFF_ANYCAST; +#endif /* !IN6_IFF_ANYCAST */ +#if defined(IN6_IFF_NOTREADY) + exclude |= IN6_IFF_NOTREADY; +#endif /* !IN6_IFF_NOTREADY */ + if ((flags6 & exclude) != 0) return ISC_TRUE; -#endif /* !SIOCGIFAFLAG_IN6 || !IN6_IFF_ANYCAST */ +#endif /* !SIOCGIFAFLAG_IN6 || !(IN6_IFF_ANYCAST && IN6_IFF_NOTREADY) */ return ISC_FALSE; } #endif /* !INCLUDE_IPV6_SUPPORT */ @@ -1344,7 +1351,7 @@ update_interfaces( continue; #ifdef INCLUDE_IPV6_SUPPORT - if (is_anycast((struct sockaddr *)&interface.sin, isc_if.name)) + if (is_not_bindable((struct sockaddr *)&interface.sin, isc_if.name)) continue; #endif /* !INCLUDE_IPV6_SUPPORT */ From owner-svn-src-head@FreeBSD.ORG Wed Jan 14 23:44:01 2015 Return-Path: Delivered-To: svn-src-head@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 57A3E90C; Wed, 14 Jan 2015 23: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 3787027C; Wed, 14 Jan 2015 23: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 t0ENi1iu088753; Wed, 14 Jan 2015 23:44:01 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ENi0tI088747; Wed, 14 Jan 2015 23:44:00 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201501142344.t0ENi0tI088747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Wed, 14 Jan 2015 23:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277203 - in head/sys: kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2015 23:44:01 -0000 Author: rwatson Date: Wed Jan 14 23:44:00 2015 New Revision: 277203 URL: https://svnweb.freebsd.org/changeset/base/277203 Log: In order to support ongoing work to implement variable-size mbufs, and more generally make it easier to extend 'struct mbuf in the future', make a number of changes to the data structure: - As we anticipate embedding mbufs headers within variable-size regions of memory in the future, change the definitions of byte arrays embedded in mbufs to be of size [0] rather than [MLEN] and [MHLEN]. In fact, the cxgbe driver already uses 'struct mbuf' on the front of other storage sizes, but we would like the global mbuf allocator do be able to do this as well. - Fold 'struct m_hdr' into 'struct mbuf' itself, eliminating a set of macros that aliased 'mh_foo' field names to 'm_foo' names such as 'm_next'. These present a particular problem as we would like to add new mbuf-header fields -- e.g., 'm_size' -- that, if similarly named via macros, would introduce collisions with many other variable names in the kernel. - Rename 'struct m_ext' to 'struct struct_m_ext' so that we can add compile-time assertions without bumping into the still-extant 'm_ext' macro. - Remove the MSIZE compile-time assertion for 'struct mbuf', but add new assertions for alignment of embedded data arrays (64-bit alignment even on 32-bit platforms), and for the sizes the mbuf header, packet header, and m_ext structure. - Document that these assertions exist in comments in mbuf.h. This change is not intended to cause (non-trivial) behavioural differences, but is a precursor to further mbuf-allocator work. Differential Revision: https://reviews.freebsd.org/D1483 Reviewed by: bz, gnn, np, glebius ("go ahead, I trust you") Sponsored by: EMC / Isilon Storage Division Modified: head/sys/kern/uipc_mbuf.c head/sys/sys/mbuf.h Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Wed Jan 14 23:34:00 2015 (r277202) +++ head/sys/kern/uipc_mbuf.c Wed Jan 14 23:44:00 2015 (r277203) @@ -88,11 +88,38 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, m_defrag * Ensure the correct size of various mbuf parameters. It could be off due * to compiler-induced padding and alignment artifacts. */ -CTASSERT(sizeof(struct mbuf) == MSIZE); CTASSERT(MSIZE - offsetof(struct mbuf, m_dat) == MLEN); CTASSERT(MSIZE - offsetof(struct mbuf, m_pktdat) == MHLEN); /* + * mbuf data storage should be 64-bit aligned regardless of architectural + * pointer size; check this is the case with and without a packet header. + */ +CTASSERT(offsetof(struct mbuf, m_dat) % 8 == 0); +CTASSERT(offsetof(struct mbuf, m_pktdat) % 8 == 0); + +/* + * While the specific values here don't matter too much (i.e., +/- a few + * words), we do want to ensure that changes to these values are carefully + * reasoned about and properly documented. This is especially the case as + * network-protocol and device-driver modules encode these layouts, and must + * be recompiled if the structures change. Check these values at compile time + * against the ones documented in comments in mbuf.h. + * + * NB: Possibly they should be documented there via #define's and not just + * comments. + */ +#if defined(__LP64__) +CTASSERT(offsetof(struct mbuf, m_dat) == 32); +CTASSERT(sizeof(struct pkthdr) == 56); +CTASSERT(sizeof(struct struct_m_ext) == 48); +#else +CTASSERT(offsetof(struct mbuf, m_dat) == 24); +CTASSERT(sizeof(struct pkthdr) == 48); +CTASSERT(sizeof(struct struct_m_ext) == 28); +#endif + +/* * m_get2() allocates minimum mbuf that would fit "size" argument. */ struct mbuf * Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Wed Jan 14 23:34:00 2015 (r277202) +++ head/sys/sys/mbuf.h Wed Jan 14 23:44:00 2015 (r277203) @@ -60,9 +60,15 @@ * MLEN is data length in a normal mbuf. * MHLEN is data length in an mbuf with pktheader. * MINCLSIZE is a smallest amount of data that should be put into cluster. + * + * Compile-time assertions in uipc_mbuf.c test these values to ensure that + * they are sensible. */ -#define MLEN ((int)(MSIZE - sizeof(struct m_hdr))) -#define MHLEN ((int)(MLEN - sizeof(struct pkthdr))) +struct mbuf; +#define MHSIZE offsetof(struct mbuf, M_dat.M_databuf) +#define MPKTHSIZE offsetof(struct mbuf, M_dat.MH.MH_dat.MH_databuf) +#define MLEN ((int)(MSIZE - MHSIZE)) +#define MHLEN ((int)(MSIZE - MPKTHSIZE)) #define MINCLSIZE (MHLEN + 1) #ifdef _KERNEL @@ -87,23 +93,6 @@ struct mb_args { #endif /* _KERNEL */ /* - * Header present at the beginning of every mbuf. - * Size ILP32: 24 - * LP64: 32 - */ -struct m_hdr { - struct mbuf *mh_next; /* next buffer in chain */ - struct mbuf *mh_nextpkt; /* next chain in queue/record */ - caddr_t mh_data; /* location of data */ - int32_t mh_len; /* amount of data in this mbuf */ - uint32_t mh_type:8, /* type of data in this mbuf */ - mh_flags:24; /* flags; see below */ -#if !defined(__LP64__) - uint32_t mh_pad; /* pad for 64bit alignment */ -#endif -}; - -/* * Packet tag structure (see below for details). */ struct m_tag { @@ -118,6 +107,8 @@ struct m_tag { * Record/packet header in first mbuf of chain; valid only if M_PKTHDR is set. * Size ILP32: 48 * LP64: 56 + * Compile-time assertions in uipc_mbuf.c test these values to ensure that + * they are correct. */ struct pkthdr { struct ifnet *rcvif; /* rcv interface */ @@ -166,8 +157,10 @@ struct pkthdr { * set. * Size ILP32: 28 * LP64: 48 + * Compile-time assertions in uipc_mbuf.c test these values to ensure that + * they are correct. */ -struct m_ext { +struct struct_m_ext { volatile u_int *ext_cnt; /* pointer to ref count info */ caddr_t ext_buf; /* start of buffer */ uint32_t ext_size; /* size of buffer, for ext_free */ @@ -184,24 +177,41 @@ struct m_ext { * purposes. */ struct mbuf { - struct m_hdr m_hdr; + /* + * Header present at the beginning of every mbuf. + * Size ILP32: 24 + * LP64: 32 + * Compile-time assertions in uipc_mbuf.c test these values to ensure + * that they are correct. + */ + struct mbuf *m_next; /* next buffer in chain */ + struct mbuf *m_nextpkt; /* next chain in queue/record */ + caddr_t m_data; /* location of data */ + int32_t m_len; /* amount of data in this mbuf */ + uint32_t m_type:8, /* type of data in this mbuf */ + m_flags:24; /* flags; see below */ +#if !defined(__LP64__) + uint32_t m_pad; /* pad for 64bit alignment */ +#endif + + /* + * A set of optional headers (packet header, external storage header) + * and internal data storage. Historically, these arrays were sized + * to MHLEN (space left after a packet header) and MLEN (space left + * after only a regular mbuf header); they are now variable size in + * order to support future work on variable-size mbufs. + */ union { struct { struct pkthdr MH_pkthdr; /* M_PKTHDR set */ union { - struct m_ext MH_ext; /* M_EXT set */ - char MH_databuf[MHLEN]; + struct struct_m_ext MH_ext; /* M_EXT set */ + char MH_databuf[0]; } MH_dat; } MH; - char M_databuf[MLEN]; /* !M_PKTHDR, !M_EXT */ + char M_databuf[0]; /* !M_PKTHDR, !M_EXT */ } M_dat; }; -#define m_next m_hdr.mh_next -#define m_len m_hdr.mh_len -#define m_data m_hdr.mh_data -#define m_type m_hdr.mh_type -#define m_flags m_hdr.mh_flags -#define m_nextpkt m_hdr.mh_nextpkt #define m_pkthdr M_dat.MH.MH_pkthdr #define m_ext M_dat.MH.MH_dat.MH_ext #define m_pktdat M_dat.MH.MH_dat.MH_databuf From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 00:08:03 2015 Return-Path: Delivered-To: svn-src-head@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 BECFE19F for ; Thu, 15 Jan 2015 00:08:03 +0000 (UTC) Received: from mail-pa0-f44.google.com (mail-pa0-f44.google.com [209.85.220.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C4E56DA for ; Thu, 15 Jan 2015 00:08:03 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id et14so13730807pad.3 for ; Wed, 14 Jan 2015 16:07:57 -0800 (PST) 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=Cyjwjdw3e0HXxw+NdRPxCfbzU27ZP32uKxXLkUfM0XM=; b=BMYp8qqPoivrVeEAhPNolfvW8VoRYZZoI/endh8eg55nihG70nTou/DT0BN9lJylVo irqxhYGGh3eINsana/3j3mi/s9oOu6sMu/iUAIZzwgMM9J3TOQmUSrKr1E3nfZq9LGH8 EhFgpo/qiwBOn8dpM3/eZ8qv36VCl0oaghJzIOP4DUVB1GXW2RwDL8quZLK8dpi7PgD3 ow/YO3F07S1tey538SM4PT5EFjNumOpLosw2Mm/bQDcGe/MbX8OI3zo75TaW9zON0Aqg bZ0ZwINRw613135MCfMFUMAclKVUMSP48EFv0CQjBiZ8FNHdmVzeWrOR/WpBzaP1s67i yuiQ== X-Gm-Message-State: ALoCoQnPdxGHReB7fADKKSiXfPJ08EBIvqZxL2I0OmS9y59Sogg58Z39m48HCVnX2tFNWq75Vkfc X-Received: by 10.68.131.3 with SMTP id oi3mr9628665pbb.27.1421280477685; Wed, 14 Jan 2015 16:07:57 -0800 (PST) Received: from [10.64.25.14] ([69.53.236.236]) by mx.google.com with ESMTPSA id 9sm20780453pdg.38.2015.01.14.16.07.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Jan 2015 16:07:57 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277163 - head/sys/dev/cardbus Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <54B67BC9.70904@FreeBSD.org> Date: Wed, 14 Jan 2015 17:07:55 -0700 Message-Id: References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> To: John Baldwin X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:08:03 -0000 --Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jan 14, 2015, at 7:23 AM, John Baldwin wrote: > > On 1/14/15 12:41 AM, Warner Losh wrote: >> Author: imp >> Date: Wed Jan 14 05:41:31 2015 >> New Revision: 277163 >> URL: https://svnweb.freebsd.org/changeset/base/277163 >> >> Log: >> Add a rather obnoxious warning if you don't have NEW_PCIB defined >> since it's a total crap shoot if things will work. > > Should we just make it a #error instead? (Some day I hope to have > NEW_PCIB enabled by default and remove the old code. Will take a while > to get there for the generic PCI code, but cardbus is probably only used > on x86 so that would be fine.) CardBus is also used on PowerPC macs.. Warner --Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567 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 iQIcBAEBCgAGBQJUtwTcAAoJEGwc0Sh9sBEAUIMQAJUe+ZMuHBKdJKYUwQcwlnxx b9cTrLwsF7UsTd+CZ6nmRI0+IXeLJUPAmURqz/qrYBkLAUzQZ+xyOdhGFDBDfokq zx9+in87b/a3REKZ69Sv3VE73KCY2dnwzbXUy2eL2hfdUNrRZ5Q690eSmKZpLgqS vIEcLTcEn9UItDP6fbYbwsGUOA/q1YA/WoLNFzoIKn8wTCX6DijutmPJvcVq94FO 0CSQIJSranOBLp0minROqX+SGJJX20GqP+MRRQ1BhBdpQaghXwKV35iXuwHvOKoa sNWqnlBxr4u6BMH1mNsndxbDp+/+Dd13dHhLNeeguEVmg2owRHeUJEnkfowJNMux nuMiTXI0uZHjENCFAO/WNK70aPSX8YRvT0m7uLazWAvr30urIg7XDw7frPKqnAQx V31fLfuVfE6s/daUjPLYDKzCqJ3/ddG3Zhe0rcty3sH2D2z8nyJUHgIVjs0NB0oC cYqg1/cUATtGsw09OJlwgMC10k562H8Vfge4I5U/QHu5dxzz5JYqdLLxt89p40ec OGVdz6IcZspJj5wEbCRLMSLmNlo4Fw0p3NWGnq55U27Q0AHcnJ2eos7KnB7/x8Mg FUaQHrNxXKptsoYEGnz4oLDbyorhKc0uorCyPHI2P+/cGPhOI3Vh9POEN7hmHHIJ 6+i5sdMs2Ch6gVw+ydv8 =Fb/p -----END PGP SIGNATURE----- --Apple-Mail=_45E14271-A42D-4B8E-BAC3-9CF3C6151567-- From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 00:42:07 2015 Return-Path: Delivered-To: svn-src-head@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 7BD1F7A8; Thu, 15 Jan 2015 00:42: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 674CCAC3; Thu, 15 Jan 2015 00:42: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 t0F0g7Gi018060; Thu, 15 Jan 2015 00:42:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F0g7Um018059; Thu, 15 Jan 2015 00:42:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501150042.t0F0g7Um018059@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 15 Jan 2015 00:42:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277204 - head/sys/amd64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:42:07 -0000 Author: imp Date: Thu Jan 15 00:42:06 2015 New Revision: 277204 URL: https://svnweb.freebsd.org/changeset/base/277204 Log: New MINIMAL kernel config. The goal with this configuration is to only compile in those options in GENERIC that cannot be loaded as modules. ufs is still included because many of its options aren't present in the kernel module. There's some other exceptions documented in the file. This is part of some work to get more things automatically loading in the hopes of obsoleting GENERIC one day. Added: head/sys/amd64/conf/MINIMAL (contents, props changed) Added: head/sys/amd64/conf/MINIMAL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/conf/MINIMAL Thu Jan 15 00:42:06 2015 (r277204) @@ -0,0 +1,145 @@ +# +# MINIMAL -- Mostly Minimal kernel configuration file for FreeBSD/amd64 +# +# Many definitions of minimal are possible. The one this file follows is +# GENERIC, minus all functionality that can be replaced by loading kernel +# modules. +# +# Exceptions: +# o While UFS is buildable as a module, the current module lacks +# some features (ACL, GJOURNAL) that GENERIC includes. +# o acpi as a module has been reported flakey and not well tested, so +# is included in the kernel. +# o random is included due to uncertaty... +# o Many networking things are included +# +# For now, please run changes to these list past imp@freebsd.org +# +# For more information on this file, please read the config(5) manual page, +# and/or the handbook section on Kernel Configuration Files: +# +# http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html +# +# The handbook is also available locally in /usr/share/doc/handbook +# if you've installed the doc distribution, otherwise always see the +# FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the +# latest information. +# +# An exhaustive list of options and more detailed explanations of the +# device lines is also present in the ../../conf/NOTES and NOTES files. +# If you are in doubt as to the purpose or necessity of a line, check first +# in NOTES. +# +# $FreeBSD$ + +cpu HAMMER +ident MINIMAL + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +makeoptions WITH_CTF=1 # Run ctfconvert(1) for DTrace support + +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +options TCP_OFFLOAD # TCP offload +options SCTP # Stream Control Transmission Protocol +options FFS # Berkeley Fast Filesystem +options SOFTUPDATES # Enable FFS soft updates support +options UFS_ACL # Support for access control lists +options UFS_DIRHASH # Improve performance on big directories +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options MD_ROOT # MD is a potential root device +options COMPAT_FREEBSD32 # Compatible with i386 binaries +options COMPAT_FREEBSD4 # Compatible with FreeBSD4 +options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options COMPAT_FREEBSD9 # Compatible with FreeBSD9 +options COMPAT_FREEBSD10 # Compatible with FreeBSD10 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) support +options STACK # stack(9) support +options SYSVSHM # SYSV-style shared memory +options SYSVMSG # SYSV-style message queues +options SYSVSEM # SYSV-style semaphores +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) +options AUDIT # Security event auditing +options CAPABILITY_MODE # Capsicum capability mode +options CAPABILITIES # Capsicum capabilities +options MAC # TrustedBSD MAC Framework +options KDTRACE_FRAME # Ensure frames are compiled in +options KDTRACE_HOOKS # Kernel DTrace hooks +options DDB_CTF # Kernel ELF linker loads CTF data +options INCLUDE_CONFIG_FILE # Include this file in kernel + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use (turn off in stable branch): +options DDB # Support DDB. +options GDB # Support remote GDB. +options DEADLKRES # Enable the deadlock resolver +options INVARIANTS # Enable calls of extra sanity checking +options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS +options WITNESS # Enable checks to detect deadlocks and cycles +options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones + +# Make an SMP-capable kernel by default +options SMP # Symmetric MultiProcessor Kernel + +# CPU frequency control +device cpufreq + +# Bus support. +device acpi +options ACPI_DMAR +device pci + +# atkbdc0 controls both the keyboard and the PS/2 mouse +device atkbdc # AT keyboard controller +device atkbd # AT keyboard +device psm # PS/2 mouse + +device kbdmux # keyboard multiplexer + +device vga # VGA video card driver +options VESA # Add support for VESA BIOS Extensions (VBE) + +device splash # Splash screen and screen saver support + +# syscons is the default console driver, resembling an SCO console +device sc +options SC_PIXEL_MODE # add support for the raster text mode + +# vt is the new video console driver +device vt +device vt_vga +device vt_efifb + +device agp # support several AGP chipsets + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device padlock_rng # VIA Padlock RNG +device rdrand_rng # Intel Bull Mountain RNG +device ether # Ethernet support +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device gif # IPv6 and IPv4 tunneling + +# The `bpf' device enables the Berkeley Packet Filter. +# Be aware of the administrative consequences of enabling this! +# Note that 'bpf' is required for DHCP. +device bpf # Berkeley packet filter + +# Xen HVM Guest Optimizations +# NOTE: XENHVM depends on xenpci. They must be added or removed together. +options XENHVM # Xen HVM kernel infrastructure +device xenpci # Xen HVM Hypervisor services driver From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 00:46:32 2015 Return-Path: Delivered-To: svn-src-head@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 46203928; Thu, 15 Jan 2015 00:46: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 170C4ADD; Thu, 15 Jan 2015 00:46: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 t0F0kVQE018670; Thu, 15 Jan 2015 00:46:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F0kVIl018666; Thu, 15 Jan 2015 00:46:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501150046.t0F0kVIl018666@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 15 Jan 2015 00:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277205 - in head: sys/boot/common sys/sys usr.sbin/kldxref X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:46:32 -0000 Author: imp Date: Thu Jan 15 00:46:30 2015 New Revision: 277205 URL: https://svnweb.freebsd.org/changeset/base/277205 Log: Reserve and ignore the a new module metadata type MDT_PNP_INFO for associating an optional PNP hint table with this module. In the future, when these are added, these changes will silently ignore the new type they would otherwise warn about. It will always be safe to ignore this data. Get this into the builds today for some future proofing. MFC After: 3 days Modified: head/sys/boot/common/load_elf_obj.c head/sys/sys/module.h head/usr.sbin/kldxref/kldxref.c Modified: head/sys/boot/common/load_elf_obj.c ============================================================================== --- head/sys/boot/common/load_elf_obj.c Thu Jan 15 00:42:06 2015 (r277204) +++ head/sys/boot/common/load_elf_obj.c Thu Jan 15 00:46:30 2015 (r277205) @@ -416,6 +416,7 @@ __elfN(obj_parse_modmetadata)(struct pre modcnt++; break; case MDT_MODULE: + case MDT_PNP_INFO: break; default: printf("unknown type %d\n", md.md_type); Modified: head/sys/sys/module.h ============================================================================== --- head/sys/sys/module.h Thu Jan 15 00:42:06 2015 (r277204) +++ head/sys/sys/module.h Thu Jan 15 00:46:30 2015 (r277205) @@ -35,6 +35,7 @@ #define MDT_DEPEND 1 /* argument is a module name */ #define MDT_MODULE 2 /* module declaration */ #define MDT_VERSION 3 /* module version(s) */ +#define MDT_PNP_INFO 4 /* Plug and play hints record */ #define MDT_STRUCT_VERSION 1 /* version of metadata structure */ #define MDT_SETNAME "modmetadata_set" Modified: head/usr.sbin/kldxref/kldxref.c ============================================================================== --- head/usr.sbin/kldxref/kldxref.c Thu Jan 15 00:42:06 2015 (r277204) +++ head/usr.sbin/kldxref/kldxref.c Thu Jan 15 00:46:30 2015 (r277205) @@ -172,6 +172,10 @@ parse_entry(struct mod_metadata *md, con record_string(kldname); } break; + case MDT_PNP_INFO: + if (dflag) { + printf(" pnp info for bus %s\n", cval); + } default: warnx("unknown metadata record %d in file %s", md->md_type, kldname); } From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 00:48:55 2015 Return-Path: Delivered-To: svn-src-head@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 06CCBA8B; Thu, 15 Jan 2015 00: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 CC29CAF4; Thu, 15 Jan 2015 00:48: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 t0F0msW6019073; Thu, 15 Jan 2015 00:48:54 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F0msTD019069; Thu, 15 Jan 2015 00:48:54 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501150048.t0F0msTD019069@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 15 Jan 2015 00:48:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277206 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 00:48:55 -0000 Author: loos Date: Thu Jan 15 00:48:53 2015 New Revision: 277206 URL: https://svnweb.freebsd.org/changeset/base/277206 Log: Catch a few cases where we need to release memory resources on errors. Place parentheses around variables in macros. MFC after: 3 days Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Thu Jan 15 00:46:30 2015 (r277205) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bsc.c Thu Jan 15 00:48:53 2015 (r277206) @@ -252,6 +252,7 @@ bcm_bsc_attach(device_t dev) } if (i == nitems(bcm_bsc_pins)) { device_printf(dev, "only bsc0 and bsc1 are supported\n"); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); return (ENXIO); } @@ -262,6 +263,7 @@ bcm_bsc_attach(device_t dev) gpio = devclass_get_device(devclass_find("gpio"), 0); if (!gpio) { device_printf(dev, "cannot find gpio0\n"); + bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); return (ENXIO); } bcm_gpio_set_alternate(gpio, bcm_bsc_pins[i].sda, BCM_GPIO_ALT0); Modified: head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Thu Jan 15 00:46:30 2015 (r277205) +++ head/sys/arm/broadcom/bcm2835/bcm2835_bscvar.h Thu Jan 15 00:48:53 2015 (r277206) @@ -58,9 +58,9 @@ struct bcm_bsc_softc { #define BCM_I2C_ERROR 0x04 #define BCM_BSC_WRITE(_sc, _off, _val) \ - bus_space_write_4(_sc->sc_bst, _sc->sc_bsh, _off, _val) + bus_space_write_4((_sc)->sc_bst, (_sc)->sc_bsh, _off, _val) #define BCM_BSC_READ(_sc, _off) \ - bus_space_read_4(_sc->sc_bst, _sc->sc_bsh, _off) + bus_space_read_4((_sc)->sc_bst, (_sc)->sc_bsh, _off) #define BCM_BSC_LOCK(_sc) \ mtx_lock(&(_sc)->sc_mtx) From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 01:05:06 2015 Return-Path: Delivered-To: svn-src-head@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 A47F1E54; Thu, 15 Jan 2015 01:05: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 90039CAA; Thu, 15 Jan 2015 01:05: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 t0F156xT028050; Thu, 15 Jan 2015 01:05:06 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F156Bb028049; Thu, 15 Jan 2015 01:05:06 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501150105.t0F156Bb028049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 15 Jan 2015 01:05:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277207 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 01:05:06 -0000 Author: loos Date: Thu Jan 15 01:05:05 2015 New Revision: 277207 URL: https://svnweb.freebsd.org/changeset/base/277207 Log: Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl. Previous code was discarding the last digit. Remove the unused temperature conversion macros. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Thu Jan 15 00:48:53 2015 (r277206) +++ head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Thu Jan 15 01:05:05 2015 (r277207) @@ -64,8 +64,6 @@ __FBSDID("$FreeBSD$"); #define MHZ2HZ(freq) ((freq) * (1000 * 1000)) #define OFFSET2MVOLT(val) (1200 + ((val) * 25)) #define MVOLT2OFFSET(val) (((val) - 1200) / 25) -#define RAW2K(temp) (((temp) + 273150) / 1000) -#define K2RAW(temp) (((temp) * 1000) - 273150) #define DEFAULT_ARM_FREQUENCY 700 #define DEFAULT_CORE_FREQUENCY 250 @@ -77,6 +75,7 @@ __FBSDID("$FreeBSD$"); #define MSG_ERROR -999999999 #define MHZSTEP 100 #define HZSTEP (MHZ2HZ(MHZSTEP)) +#define TZ_ZEROC 2732 #define VC_LOCK(sc) do { \ sema_wait(&vc_sema); \ @@ -1215,7 +1214,7 @@ sysctl_bcm2835_devcpu_temperature(SYSCTL return (EIO); /* 1/1000 celsius (raw) to 1/10 kelvin */ - val = RAW2K(val) * 10; + val = val / 100 + TZ_ZEROC; err = sysctl_handle_int(oidp, &val, 0, req); if (err || !req->newptr) /* error || read request */ From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 01:09:57 2015 Return-Path: Delivered-To: svn-src-head@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 52DF9A2 for ; Thu, 15 Jan 2015 01:09:57 +0000 (UTC) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1F787CF4 for ; Thu, 15 Jan 2015 01:09:56 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id eu11so13994708pac.8 for ; Wed, 14 Jan 2015 17:09:50 -0800 (PST) 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=HxkmVOpJD1mYEqGBr5EqK0kYxbHJLbV0UzN464+xalg=; b=KCqIfTb4FFVLd1w7/fwXA8Ma/rgyob+OnkOtHo9NGdB/fXKoahrXA14gcPOykquYE9 MRRPhHBFbtGEU9y47uwjzvjLJJlZ3Xw507IkCnNykypXz4LhAV4Kas5WOPJKnRjmcceu Ku/qRJMh72/onBBAf7tNkgdcItn4+nDQtP4fMiWLk9QYIapHa6XlIHzPuqlU8ShiusKj TX3BzzxZ/oxffNarRzuXL8SqshUiP57MCLkrcQnniSKBWaxSrMKb6bvo+CLgoqTZzTqD vnNptQkFb1KPnAwxSCJ4tsKnT3sONlpMlLq7fLlOhTbzePIBq+tgHIT7l6dOHSoA9v+j pRUA== X-Gm-Message-State: ALoCoQklh1GQFKtcE/eWraa3O83lp/goH8Z6KjAvemQzmhB75YoFaW0Xvm5YxWD1bWODcUFzHGqu X-Received: by 10.68.69.48 with SMTP id b16mr1753938pbu.59.1421280442118; Wed, 14 Jan 2015 16:07:22 -0800 (PST) Received: from [10.64.25.14] ([69.53.236.236]) by mx.google.com with ESMTPSA id 9sm20780453pdg.38.2015.01.14.16.07.20 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Jan 2015 16:07:21 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277163 - head/sys/dev/cardbus Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150114073246.74c159df@zhabar.attlocal.net> Date: Wed, 14 Jan 2015 17:07:18 -0700 Message-Id: <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> To: Justin Hibbits X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 01:09:57 -0000 --Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 14, 2015, at 8:32 AM, Justin Hibbits = wrote: >=20 > On Wed, 14 Jan 2015 09:23:05 -0500 > John Baldwin wrote: >=20 >> On 1/14/15 12:41 AM, Warner Losh wrote: >>> Author: imp >>> Date: Wed Jan 14 05:41:31 2015 >>> New Revision: 277163 >>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>=20 >>> Log: >>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>> since it's a total crap shoot if things will work. >>=20 >> Should we just make it a #error instead? (Some day I hope to have >> NEW_PCIB enabled by default and remove the old code. Will take a >> while to get there for the generic PCI code, but cardbus is probably >> only used on x86 so that would be fine.) >>=20 >=20 > Also powerpc, but NEW_PCIB is default there as well. PowerPC doesn=E2=80=99t seem to defined the bus number resources. Warner --Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE 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 iQIcBAEBCgAGBQJUtwS2AAoJEGwc0Sh9sBEAL3QP/1dUTHaQ5riPwDZyjiUQe8UX sG7T/Qm/2Snm1pTKCerBR8FGcwB6Rwu9bMTJiKTw4pqUMRwoa0jqkvk8Mfy1h2cS CydVOgtEldkr4adcL4Lo5ZJjtdVh2B6lGSaRN0AJlP5h5vzThkLfbWTD3XLAA57C br0OL3H36dVRAMkak7hjOgzI3bk5Ym9U1z7807eCw+Nd4a3uUznABQ9eDeZdlYEa EqERmB9sEOAu2u1O65lqJn53c5N9qciZRhKQwTVKS5Q9LRxc2b7HdEd8YfIT4LoP WJ/5JRy5y3MsuV28KyK0i8/2a9o6a9NNSmeAgtMWO0Z2TeEe6dI4QYNZ00AuUYHa uyg/0xcHqybQF3GN992qoA2pH0B7J+b4aSyu3h/PPIikfNKzQYFWF9LE7nqHcQPF hi+9hvZtSTUPXoEStRK6HI+5Es0WupKI5LH4VnNfB1SRmg021N75P1F0pIbxXEzi /7RXkQGoo1pPJyGyi8h8zUB9l6vPA675+jl+Y6iORbEk1M/6MGqbzv6BxLnltJPK i8hAvHsMvIDePb1ILxx7POnjhh0K3lGb0pwinhXKzjSTnAXIy+Id2ox43r18tgV/ 5TqbA0nwsexe9TM//NzefrEO5ld8VWvzJbSmDgTHGSl9ECdaPMrG/8om0RPo/eId MbDsS5VkJBdnhPvM1RYn =wku1 -----END PGP SIGNATURE----- --Apple-Mail=_5030ED8D-7AA1-49F7-B5BC-7E2429AB61EE-- From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 01:20:57 2015 Return-Path: Delivered-To: svn-src-head@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 865D5344; Thu, 15 Jan 2015 01:20: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 72214DE6; Thu, 15 Jan 2015 01:20: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 t0F1KvNJ036550; Thu, 15 Jan 2015 01:20:57 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F1KvRI036549; Thu, 15 Jan 2015 01:20:57 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201501150120.t0F1KvRI036549@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 15 Jan 2015 01:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277208 - head/sys/boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 01:20:57 -0000 Author: loos Date: Thu Jan 15 01:20:56 2015 New Revision: 277208 URL: https://svnweb.freebsd.org/changeset/base/277208 Log: Fix the PMIC node name to match the PMIC i2c address. Remove an extra blank line. No functional changes. MFC after: 3 days Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts Modified: head/sys/boot/fdt/dts/arm/beaglebone-black.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/beaglebone-black.dts Thu Jan 15 01:05:05 2015 (r277207) +++ head/sys/boot/fdt/dts/arm/beaglebone-black.dts Thu Jan 15 01:20:56 2015 (r277208) @@ -144,10 +144,9 @@ status = "okay"; non-removable; }; - i2c@44e0b000 { - pmic@24 { + pmic@48 { compatible = "ti,am335x-pmic"; reg = <0x48>; }; From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 02:22:54 2015 Return-Path: Delivered-To: svn-src-head@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 23FF08E7; Thu, 15 Jan 2015 02:22: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 E6111651; Thu, 15 Jan 2015 02:22: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 t0F2Mr77064690; Thu, 15 Jan 2015 02:22:53 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0F2MrPQ064689; Thu, 15 Jan 2015 02:22:53 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501150222.t0F2MrPQ064689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Thu, 15 Jan 2015 02:22:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277209 - head/sys/arm/ti/cpsw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 02:22:54 -0000 Author: bz Date: Thu Jan 15 02:22:52 2015 New Revision: 277209 URL: https://svnweb.freebsd.org/changeset/base/277209 Log: Fix cpsw(4) after r277203 which folded 'struct m_hdr' into 'struct mbuf'. While in theory this should have been a transparent change (and was for all other drivers), cpsw(4) never used the proper accessor macros in a few places but spelt the indirect m_hdr.mh_* out itself. Convert those to use m_len and m_data and unbreak the driver build. Modified: head/sys/arm/ti/cpsw/if_cpsw.c Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 15 01:20:56 2015 (r277208) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Jan 15 02:22:52 2015 (r277209) @@ -396,9 +396,9 @@ cpsw_dump_slot(struct cpsw_softc *sc, st printf("\n"); if (slot->mbuf) { printf(" Ether: %14D\n", - (char *)(slot->mbuf->m_hdr.mh_data), " "); + (char *)(slot->mbuf->m_data), " "); printf(" Packet: %16D\n", - (char *)(slot->mbuf->m_hdr.mh_data) + 14, " "); + (char *)(slot->mbuf->m_data) + 14, " "); } } @@ -611,7 +611,7 @@ cpsw_attach(device_t dev) /* Allocate the null mbuf and pre-sync it. */ sc->null_mbuf = m_getcl(M_NOWAIT, MT_DATA, M_PKTHDR); - memset(sc->null_mbuf->m_hdr.mh_data, 0, sc->null_mbuf->m_ext.ext_size); + memset(sc->null_mbuf->m_data, 0, sc->null_mbuf->m_ext.ext_size); bus_dmamap_create(sc->mbuf_dtag, 0, &sc->null_mbuf_dmamap); bus_dmamap_load_mbuf_sg(sc->mbuf_dtag, sc->null_mbuf_dmamap, sc->null_mbuf, segs, &nsegs, BUS_DMA_NOWAIT); @@ -1292,8 +1292,8 @@ cpsw_rx_dequeue(struct cpsw_softc *sc) /* Set up mbuf */ /* TODO: track SOP/EOP bits to assemble a full mbuf out of received fragments. */ - slot->mbuf->m_hdr.mh_data += bd.bufoff; - slot->mbuf->m_hdr.mh_len = bd.pktlen - 4; + slot->mbuf->m_data += bd.bufoff; + slot->mbuf->m_len = bd.pktlen - 4; slot->mbuf->m_pkthdr.len = bd.pktlen - 4; slot->mbuf->m_flags |= M_PKTHDR; slot->mbuf->m_pkthdr.rcvif = ifp; @@ -1461,7 +1461,7 @@ cpsw_tx_enqueue(struct cpsw_softc *sc) bus_dmamap_unload(sc->mbuf_dtag, slot->dmamap); if (padlen > 0) /* May as well add padding. */ m_append(slot->mbuf, padlen, - sc->null_mbuf->m_hdr.mh_data); + sc->null_mbuf->m_data); m0 = m_defrag(slot->mbuf, M_NOWAIT); if (m0 == NULL) { if_printf(sc->ifp, From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 03:31:16 2015 Return-Path: Delivered-To: svn-src-head@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 08E13B8; Thu, 15 Jan 2015 03:31:16 +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 8AB55D15; Thu, 15 Jan 2015 03:31:15 +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 t0F3V99s023713 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jan 2015 05:31:09 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0F3V99s023713 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0F3V9Zt023711; Thu, 15 Jan 2015 05:31:09 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jan 2015 05:31:09 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150115033109.GM42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501142207.t0EM7Dfn041543@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 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 03:31:16 -0000 On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: > Author: hselasky > Date: Wed Jan 14 22:07:13 2015 > New Revision: 277199 > URL: https://svnweb.freebsd.org/changeset/base/277199 > > Log: > Avoid race with "dev_rel()" when using the recently added > "delist_dev()" function. Make sure the character device structure > doesn't go away until the end of the "destroy_dev()" function due to > concurrently running cleanup code inside "devfs_populate()". > > MFC after: 1 week > Reported by: dchagin@ > > Modified: > head/sys/fs/devfs/devfs_devs.c > head/sys/kern/kern_conf.c > > Modified: head/sys/fs/devfs/devfs_devs.c > ============================================================================== > --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) > +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) > @@ -137,6 +137,12 @@ devfs_alloc(int flags) > vfs_timestamp(&ts); > cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; > cdev->si_cred = NULL; > + /* > + * Avoid race with dev_rel() by setting the initial > + * reference count to 1. This last reference is taken > + * by the destroy_dev() function. > + */ > + cdev->si_refcount = 1; This is wrong. Not all devices are destroyed with destroy_dev(). dev_rel() must be allowed to clean up allocated device. That said, I do not understand what race you are trying to solve. Freeing of the accessible cdev memory cannot happen in parallel while dev_mtx is owned. Please do not commit (to devfs) without seeking for the review first. > > return (cdev); > } > > Modified: head/sys/kern/kern_conf.c > ============================================================================== > --- head/sys/kern/kern_conf.c Wed Jan 14 22:05:57 2015 (r277198) > +++ head/sys/kern/kern_conf.c Wed Jan 14 22:07:13 2015 (r277199) > @@ -1048,8 +1048,6 @@ destroy_devl(struct cdev *dev) > /* Remove name marking */ > dev->si_flags &= ~SI_NAMED; > > - dev->si_refcount++; /* Avoid race with dev_rel() */ > - > /* If we are a child, remove us from the parents list */ > if (dev->si_flags & SI_CHILD) { > LIST_REMOVE(dev, si_siblings); From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 07:40:46 2015 Return-Path: Delivered-To: svn-src-head@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 2CBBAC3A; Thu, 15 Jan 2015 07:40:46 +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 E1D997BE; Thu, 15 Jan 2015 07:40:45 +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 3ECCE1FE022; Thu, 15 Jan 2015 08:40:43 +0100 (CET) Message-ID: <54B76F2B.8040106@selasky.org> Date: Thu, 15 Jan 2015 08:41:31 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> In-Reply-To: <20150115033109.GM42409@kib.kiev.ua> 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 07:40:46 -0000 On 01/15/15 04:31, Konstantin Belousov wrote: > On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Wed Jan 14 22:07:13 2015 >> New Revision: 277199 >> URL: https://svnweb.freebsd.org/changeset/base/277199 >> >> Log: >> Avoid race with "dev_rel()" when using the recently added >> "delist_dev()" function. Make sure the character device structure >> doesn't go away until the end of the "destroy_dev()" function due to >> concurrently running cleanup code inside "devfs_populate()". >> >> MFC after: 1 week >> Reported by: dchagin@ >> >> Modified: >> head/sys/fs/devfs/devfs_devs.c >> head/sys/kern/kern_conf.c >> >> Modified: head/sys/fs/devfs/devfs_devs.c >> ============================================================================== >> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) >> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) >> @@ -137,6 +137,12 @@ devfs_alloc(int flags) >> vfs_timestamp(&ts); >> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; >> cdev->si_cred = NULL; >> + /* >> + * Avoid race with dev_rel() by setting the initial >> + * reference count to 1. This last reference is taken >> + * by the destroy_dev() function. >> + */ >> + cdev->si_refcount = 1; > This is wrong. Not all devices are destroyed with destroy_dev(). > dev_rel() must be allowed to clean up allocated device. > > That said, I do not understand what race you are trying to solve. > Freeing of the accessible cdev memory cannot happen in parallel while > dev_mtx is owned. > > Please do not commit (to devfs) without seeking for the review first. Hi Konstantin, From my analysis there are basically three ways for a cdev to die: 1) Through dev_free_devlocked() 2) Through destroy_devl() which then later calls dev_free_devlocked() 3) Through destroy_dev_sched() which really is a wrapper around destroy_devl(). In the case of direct free through #1, the reference count is ignored and it doesn't matter if it is one or zero. Only in the case of destruction through destroy_dev() it matters. Like the comment says in destroy_devl(): /* Avoid race with dev_rel() */ The problem is that the "cdev->si_refcount" is zero when the initial devfs_create() is called. Then one ref is made. When we clear the CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running process to destroy all the FS related structures and the reference count goes back to zero when the "cdp" is removed from the "cdevp_list". Then the cdev is freed too early. This happens because destroy_devl() is dropping the dev_lock() to sleep waiting for pending references. Do you see something else? --HPS From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 08:01:08 2015 Return-Path: Delivered-To: svn-src-head@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 971C27C; Thu, 15 Jan 2015 08:01:08 +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 51A8A981; Thu, 15 Jan 2015 08:01:07 +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 6C26C1FE022; Thu, 15 Jan 2015 09:01:04 +0100 (CET) Message-ID: <54B773F0.6050807@selasky.org> Date: Thu, 15 Jan 2015 09:01:52 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> In-Reply-To: <20150115033109.GM42409@kib.kiev.ua> 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 08:01:08 -0000 Hi, On 01/15/15 04:31, Konstantin Belousov wrote: > Please do not commit (to devfs) without seeking for the review first. I was a bit stuck this time either having the choice to back out a USB patch fixing no problems or to fix the kernel devfs to support what I needed. Actually "devfs" is not listed in src/MAINTAINERS. I understand a review can be good in such critical areas in advance as a general practice and I'm currently doing that for another kern/ patch which is much bigger than this one. --HPS From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 09:38:48 2015 Return-Path: Delivered-To: svn-src-head@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 5CC338F8; Thu, 15 Jan 2015 09:38:48 +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 D9A9361D; Thu, 15 Jan 2015 09:38:47 +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 t0F9cfLx003329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jan 2015 11:38:41 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0F9cfLx003329 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0F9cfug003328; Thu, 15 Jan 2015 11:38:41 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jan 2015 11:38:41 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150115093841.GX42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B76F2B.8040106@selasky.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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 09:38:48 -0000 On Thu, Jan 15, 2015 at 08:41:31AM +0100, Hans Petter Selasky wrote: > On 01/15/15 04:31, Konstantin Belousov wrote: > > On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: > >> Author: hselasky > >> Date: Wed Jan 14 22:07:13 2015 > >> New Revision: 277199 > >> URL: https://svnweb.freebsd.org/changeset/base/277199 > >> > >> Log: > >> Avoid race with "dev_rel()" when using the recently added > >> "delist_dev()" function. Make sure the character device structure > >> doesn't go away until the end of the "destroy_dev()" function due to > >> concurrently running cleanup code inside "devfs_populate()". > >> > >> MFC after: 1 week > >> Reported by: dchagin@ > >> > >> Modified: > >> head/sys/fs/devfs/devfs_devs.c > >> head/sys/kern/kern_conf.c > >> > >> Modified: head/sys/fs/devfs/devfs_devs.c > >> ============================================================================== > >> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) > >> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) > >> @@ -137,6 +137,12 @@ devfs_alloc(int flags) > >> vfs_timestamp(&ts); > >> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; > >> cdev->si_cred = NULL; > >> + /* > >> + * Avoid race with dev_rel() by setting the initial > >> + * reference count to 1. This last reference is taken > >> + * by the destroy_dev() function. > >> + */ > >> + cdev->si_refcount = 1; > > This is wrong. Not all devices are destroyed with destroy_dev(). > > dev_rel() must be allowed to clean up allocated device. > > > > That said, I do not understand what race you are trying to solve. > > Freeing of the accessible cdev memory cannot happen in parallel while > > dev_mtx is owned. > > > > Please do not commit (to devfs) without seeking for the review first. > > Hi Konstantin, > > From my analysis there are basically three ways for a cdev to die: > > 1) Through dev_free_devlocked() > 2) Through destroy_devl() which then later calls dev_free_devlocked() > 3) Through destroy_dev_sched() which really is a wrapper around > destroy_devl(). You only look from the consumers PoV. Devfs cdev can be dereferenced because e.g. clone handler decides that cdev is not valid/needed, and now the memory is never freed due to extra reference. Do not assume that all cdevs go through destroy_dev(). > > In the case of direct free through #1, the reference count is ignored > and it doesn't matter if it is one or zero. Only in the case of > destruction through destroy_dev() it matters. > > Like the comment says in destroy_devl(): > > /* Avoid race with dev_rel() */ > > The problem is that the "cdev->si_refcount" is zero when the initial > devfs_create() is called. Then one ref is made. When we clear the > CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running > process to destroy all the FS related structures and the reference count > goes back to zero when the "cdp" is removed from the "cdevp_list". Then > the cdev is freed too early. This happens because destroy_devl() is > dropping the dev_lock() to sleep waiting for pending references. Basically, this is very good explanation why your delist hack is wrong, for one of the reason. Another reason is explained below. You are trying to cover it with additional reference, but this is wrong as well. > > Do you see something else? I think that what you are trying to do with the CDP_ACTIVE hack is doomed anyway, because you are allowing for devfs directory to have two entries with the same name, until the populate loop cleans up the inactive one. In the meantime, any access to the directory operates on random entry. The checks for existent names in make_dev() are performed for the reason, and you makes the rounds to effectively ignore it. From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 10:43:59 2015 Return-Path: Delivered-To: svn-src-head@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 6DBA8DE5; Thu, 15 Jan 2015 10:43: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 5A400D3E; Thu, 15 Jan 2015 10:43: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 t0FAhxAC099115; Thu, 15 Jan 2015 10:43:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FAhxrh099114; Thu, 15 Jan 2015 10:43:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501151043.t0FAhxrh099114@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 15 Jan 2015 10:43:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277211 - head/sys/compat/freebsd32 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 10:43:59 -0000 Author: kib Date: Thu Jan 15 10:43:58 2015 New Revision: 277211 URL: https://svnweb.freebsd.org/changeset/base/277211 Log: fcntl F_O{GET,SET}LK take pointer as the arg, handle them properly for compat32. Reported and tested by: Alex Tutubalin Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_misc.c Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 15 06:14:42 2015 (r277210) +++ head/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 15 10:43:58 2015 (r277211) @@ -3032,6 +3032,9 @@ freebsd32_fcntl(struct thread *td, struc case F_GETLK: case F_SETFD: case F_SETFL: + case F_OGETLK: + case F_OSETLK: + case F_OSETLKW: tmp = (unsigned int)(uap->arg); break; default: From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 10:48:25 2015 Return-Path: Delivered-To: svn-src-head@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 DEDFBF5B; Thu, 15 Jan 2015 10:48:25 +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 7F864D65; Thu, 15 Jan 2015 10:48:24 +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 F140C1FE022; Thu, 15 Jan 2015 11:48:21 +0100 (CET) Message-ID: <54B79B25.3070707@selasky.org> Date: Thu, 15 Jan 2015 11:49:09 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> In-Reply-To: <20150115093841.GX42409@kib.kiev.ua> 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 10:48:26 -0000 On 01/15/15 10:38, Konstantin Belousov wrote: > On Thu, Jan 15, 2015 at 08:41:31AM +0100, Hans Petter Selasky wrote: >> On 01/15/15 04:31, Konstantin Belousov wrote: >>> On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: >>>> Author: hselasky >>>> Date: Wed Jan 14 22:07:13 2015 >>>> New Revision: 277199 >>>> URL: https://svnweb.freebsd.org/changeset/base/277199 >>>> >>>> Log: >>>> Avoid race with "dev_rel()" when using the recently added >>>> "delist_dev()" function. Make sure the character device structure >>>> doesn't go away until the end of the "destroy_dev()" function due to >>>> concurrently running cleanup code inside "devfs_populate()". >>>> >>>> MFC after: 1 week >>>> Reported by: dchagin@ >>>> >>>> Modified: >>>> head/sys/fs/devfs/devfs_devs.c >>>> head/sys/kern/kern_conf.c >>>> >>>> Modified: head/sys/fs/devfs/devfs_devs.c >>>> ============================================================================== >>>> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) >>>> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) >>>> @@ -137,6 +137,12 @@ devfs_alloc(int flags) >>>> vfs_timestamp(&ts); >>>> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; >>>> cdev->si_cred = NULL; >>>> + /* >>>> + * Avoid race with dev_rel() by setting the initial >>>> + * reference count to 1. This last reference is taken >>>> + * by the destroy_dev() function. >>>> + */ >>>> + cdev->si_refcount = 1; >>> This is wrong. Not all devices are destroyed with destroy_dev(). >>> dev_rel() must be allowed to clean up allocated device. >>> >>> That said, I do not understand what race you are trying to solve. >>> Freeing of the accessible cdev memory cannot happen in parallel while >>> dev_mtx is owned. >>> >>> Please do not commit (to devfs) without seeking for the review first. >> >> Hi Konstantin, >> >> From my analysis there are basically three ways for a cdev to die: >> >> 1) Through dev_free_devlocked() >> 2) Through destroy_devl() which then later calls dev_free_devlocked() >> 3) Through destroy_dev_sched() which really is a wrapper around >> destroy_devl(). > You only look from the consumers PoV. Devfs cdev can be dereferenced > because e.g. clone handler decides that cdev is not valid/needed, > and now the memory is never freed due to extra reference. > > Do not assume that all cdevs go through destroy_dev(). Hi, All cdevs go through either case #2 or case #1 eventually from what I can see, including clone devices, which call destroy_devl() in the end aswell. See the "clone_destroy()" function! I did a simple test with /dev/dspX.Y which use clone devices. I did: vmstat -m | grep -i devfs1 1) Before plugging USB audio device: DEVFS1 157 79K - 189 512 2) Plug USB audio device: DEVFS1 164 82K - 196 512 3) Play something (env AUDIODEV=/dev/dsp2.4 play track01.wav) DEVFS1 165 83K - 197 512 4) Stop playing (clone device still exits): DEVFS1 165 83K - 197 512 5) Detach USB audio device: DEVFS1 157 79K - 197 512 I see no leakage in that case! Other case: 1) After "kldload if_tap" DEVFS1 158 79K - 201 512 2) After creating TAP device (cat /dev/tap99) DEVFS1 159 80K - 204 512 3) After creating TAP device (cat /dev/tap101) DEVFS1 160 80K - 207 512 5) After "kldunload if_tap": DEVFS1 158 79K - 207 512 6) After "kldload if_tap" again: DEVFS1 158 79K - 207 512 I see no leakage in that case either! Are there more cases which I don't see? > >> >> In the case of direct free through #1, the reference count is ignored >> and it doesn't matter if it is one or zero. Only in the case of >> destruction through destroy_dev() it matters. >> >> Like the comment says in destroy_devl(): >> >> /* Avoid race with dev_rel() */ >> >> The problem is that the "cdev->si_refcount" is zero when the initial >> devfs_create() is called. Then one ref is made. When we clear the >> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running >> process to destroy all the FS related structures and the reference count >> goes back to zero when the "cdp" is removed from the "cdevp_list". Then >> the cdev is freed too early. This happens because destroy_devl() is >> dropping the dev_lock() to sleep waiting for pending references. > Basically, this is very good explanation why your delist hack is wrong, > for one of the reason. Another reason is explained below. > You are trying to cover it with additional reference, but this is wrong > as well. > >> >> Do you see something else? > > I think that what you are trying to do with the CDP_ACTIVE hack is doomed > anyway, because you are allowing for devfs directory to have two entries > with the same name, until the populate loop cleans up the inactive one. > In the meantime, any access to the directory operates on random entry. The entry will not be random, because upon an open() call to a character device, I believe the devfs_lookup() function will be called, which always populate the devfs tree at first by calls to devfs_populate_xxx(). Any delisted devices which don't have the "CDP_ACTIVE" bit set, will never be seen by any open. Regarding leftover filedescriptors which still access the old "cdev" this is not a problem, and these will be closed when the si_refcount goes to zero after the destroy_devl() call. > > The checks for existent names in make_dev() are performed for the reason, > and you makes the rounds to effectively ignore it. > These checks are still correct and don't conflict with my patch from what I can see. Else the existing destroy_devl() would also be broken even before my patch with regard to the "random" selection of character devices at open() from userspace. --HPS From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 11:51:32 2015 Return-Path: Delivered-To: svn-src-head@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 4340A44E; Thu, 15 Jan 2015 11:51:32 +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 BD0A867A; Thu, 15 Jan 2015 11:51:31 +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 t0FBpOlA033658 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 15 Jan 2015 13:51:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0FBpOlA033658 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0FBpNYr033657; Thu, 15 Jan 2015 13:51:23 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 15 Jan 2015 13:51:23 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150115115123.GA42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B79B25.3070707@selasky.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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 11:51:32 -0000 On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: > On 01/15/15 10:38, Konstantin Belousov wrote: > > On Thu, Jan 15, 2015 at 08:41:31AM +0100, Hans Petter Selasky wrote: > >> On 01/15/15 04:31, Konstantin Belousov wrote: > >>> On Wed, Jan 14, 2015 at 10:07:13PM +0000, Hans Petter Selasky wrote: > >>>> Author: hselasky > >>>> Date: Wed Jan 14 22:07:13 2015 > >>>> New Revision: 277199 > >>>> URL: https://svnweb.freebsd.org/changeset/base/277199 > >>>> > >>>> Log: > >>>> Avoid race with "dev_rel()" when using the recently added > >>>> "delist_dev()" function. Make sure the character device structure > >>>> doesn't go away until the end of the "destroy_dev()" function due to > >>>> concurrently running cleanup code inside "devfs_populate()". > >>>> > >>>> MFC after: 1 week > >>>> Reported by: dchagin@ > >>>> > >>>> Modified: > >>>> head/sys/fs/devfs/devfs_devs.c > >>>> head/sys/kern/kern_conf.c > >>>> > >>>> Modified: head/sys/fs/devfs/devfs_devs.c > >>>> ============================================================================== > >>>> --- head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:05:57 2015 (r277198) > >>>> +++ head/sys/fs/devfs/devfs_devs.c Wed Jan 14 22:07:13 2015 (r277199) > >>>> @@ -137,6 +137,12 @@ devfs_alloc(int flags) > >>>> vfs_timestamp(&ts); > >>>> cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; > >>>> cdev->si_cred = NULL; > >>>> + /* > >>>> + * Avoid race with dev_rel() by setting the initial > >>>> + * reference count to 1. This last reference is taken > >>>> + * by the destroy_dev() function. > >>>> + */ > >>>> + cdev->si_refcount = 1; > >>> This is wrong. Not all devices are destroyed with destroy_dev(). > >>> dev_rel() must be allowed to clean up allocated device. > >>> > >>> That said, I do not understand what race you are trying to solve. > >>> Freeing of the accessible cdev memory cannot happen in parallel while > >>> dev_mtx is owned. > >>> > >>> Please do not commit (to devfs) without seeking for the review first. > >> > >> Hi Konstantin, > >> > >> From my analysis there are basically three ways for a cdev to die: > >> > >> 1) Through dev_free_devlocked() > >> 2) Through destroy_devl() which then later calls dev_free_devlocked() > >> 3) Through destroy_dev_sched() which really is a wrapper around > >> destroy_devl(). > > You only look from the consumers PoV. Devfs cdev can be dereferenced > > because e.g. clone handler decides that cdev is not valid/needed, > > and now the memory is never freed due to extra reference. > > > > Do not assume that all cdevs go through destroy_dev(). > > Hi, > > All cdevs go through either case #2 or case #1 eventually from what I > can see, including clone devices, which call destroy_devl() in the end > aswell. See the "clone_destroy()" function! > > I did a simple test with /dev/dspX.Y which use clone devices. I did: > > vmstat -m | grep -i devfs1 > > 1) Before plugging USB audio device: > > DEVFS1 157 79K - 189 512 > > 2) Plug USB audio device: > > DEVFS1 164 82K - 196 512 > > 3) Play something (env AUDIODEV=/dev/dsp2.4 play track01.wav) > > DEVFS1 165 83K - 197 512 > > 4) Stop playing (clone device still exits): > > DEVFS1 165 83K - 197 512 > > 5) Detach USB audio device: > > DEVFS1 157 79K - 197 512 > > I see no leakage in that case! > > Other case: > > 1) After "kldload if_tap" > > DEVFS1 158 79K - 201 512 > > 2) After creating TAP device (cat /dev/tap99) > > DEVFS1 159 80K - 204 512 > > 3) After creating TAP device (cat /dev/tap101) > > DEVFS1 160 80K - 207 512 > > 5) After "kldunload if_tap": > > DEVFS1 158 79K - 207 512 > > 6) After "kldload if_tap" again: > > DEVFS1 158 79K - 207 512 > > I see no leakage in that case either! Because these cases come through destroy_dev(). > > Are there more cases which I don't see? You are breaking existig devfs KPI by your hack. You introduce yet another reference on the device, which is not supposed to be there. If some code calls delist_dev(), it could be said that it is a contract of the new function that destroy_dev() must be called eventually on the cdev. Then, the reference could be said to be shared-owned by delist_dev() and destroy_dev(). But, for arbitrary devfs user this new reference is unacceptable and breaks interface. > > > > >> > >> In the case of direct free through #1, the reference count is ignored > >> and it doesn't matter if it is one or zero. Only in the case of > >> destruction through destroy_dev() it matters. > >> > >> Like the comment says in destroy_devl(): > >> > >> /* Avoid race with dev_rel() */ > >> > >> The problem is that the "cdev->si_refcount" is zero when the initial > >> devfs_create() is called. Then one ref is made. When we clear the > >> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running > >> process to destroy all the FS related structures and the reference count > >> goes back to zero when the "cdp" is removed from the "cdevp_list". Then > >> the cdev is freed too early. This happens because destroy_devl() is > >> dropping the dev_lock() to sleep waiting for pending references. > > Basically, this is very good explanation why your delist hack is wrong, > > for one of the reason. Another reason is explained below. > > You are trying to cover it with additional reference, but this is wrong > > as well. > > > >> > >> Do you see something else? > > > > I think that what you are trying to do with the CDP_ACTIVE hack is doomed > > anyway, because you are allowing for devfs directory to have two entries > > with the same name, until the populate loop cleans up the inactive one. > > In the meantime, any access to the directory operates on random entry. > > The entry will not be random, because upon an open() call to a character > device, I believe the devfs_lookup() function will be called, which > always populate the devfs tree at first by calls to > devfs_populate_xxx(). Any delisted devices which don't have the > "CDP_ACTIVE" bit set, will never be seen by any open. Entry can be random, since after the populate loop is ran, your code in other thread could start and create duplicate entry. There is a window in the lookup where both directory vnode lock and mount point sx locks are dropped. So running the populate does not guarantee anything. > > Regarding leftover filedescriptors which still access the old "cdev" > this is not a problem, and these will be closed when the si_refcount > goes to zero after the destroy_devl() call. > > > > > The checks for existent names in make_dev() are performed for the reason, > > and you makes the rounds to effectively ignore it. > > > > These checks are still correct and don't conflict with my patch from > what I can see. Else the existing destroy_devl() would also be broken > even before my patch with regard to the "random" selection of character > devices at open() from userspace. The checks are done to avoid duplicate names. Your patch makes these checks ineffective (i.e. broken). Let me summarize: - the extra reference on arbitrary cdev should be eliminated. The delist_dev_locked() may add the ref and set some CDP_ flag to indicate to destroy_dev() that it should do dev_rel(). - the existence of the duplicated entries should be either eliminated (I am not sure it is possible with your code), or we must ensure that only one name with CDP_ACTIVE flag set and given name exists. Then, all lookup code must be audited to take CDP_ACTIVE into account when accessing names. I see at least devfs_find() and devfs_mknod() which must be changed. I did not performed full audit. From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 12:13:54 2015 Return-Path: Delivered-To: svn-src-head@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 DC207AF2; Thu, 15 Jan 2015 12:13:53 +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 87071987; Thu, 15 Jan 2015 12:13:53 +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 617331FE022; Thu, 15 Jan 2015 13:13:51 +0100 (CET) Message-ID: <54B7AF2F.3080802@selasky.org> Date: Thu, 15 Jan 2015 13:14:39 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> In-Reply-To: <20150115115123.GA42409@kib.kiev.ua> 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 12:13:54 -0000 On 01/15/15 12:51, Konstantin Belousov wrote: > On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: >> >> I see no leakage in that case either! > Because these cases come through destroy_dev(). > >> >> Are there more cases which I don't see? > You are breaking existig devfs KPI by your hack. You introduce yet another > reference on the device, which is not supposed to be there. Hi Konstantin, I need a non-sleeping way to say a character device is no longer supposed to be used and be able to re-use the device name right away creating a new device. I guess you got that. > > If some code calls delist_dev(), it could be said that it is a contract > of the new function that destroy_dev() must be called eventually on > the cdev. Then, the reference could be said to be shared-owned by > delist_dev() and destroy_dev(). But, for arbitrary devfs user this new > reference is unacceptable and breaks interface. delist_dev() changes no references. It can be called multiple times even, also inside destroy_devl(). Also I think that the "destroy_dev_sched_cbl()" function should call delist_dev() first so that we don't have a time from when the "destroy_dev_sched_cbl()" function is called where the device entry still exists in devfs mounts until the final destroy_devl() is done by a taskqueue. >>>> In the case of direct free through #1, the reference count is ignored >>>> and it doesn't matter if it is one or zero. Only in the case of >>>> destruction through destroy_dev() it matters. >>>> >>>> Like the comment says in destroy_devl(): >>>> >>>> /* Avoid race with dev_rel() */ >>>> >>>> The problem is that the "cdev->si_refcount" is zero when the initial >>>> devfs_create() is called. Then one ref is made. When we clear the >>>> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running >>>> process to destroy all the FS related structures and the reference count >>>> goes back to zero when the "cdp" is removed from the "cdevp_list". Then >>>> the cdev is freed too early. This happens because destroy_devl() is >>>> dropping the dev_lock() to sleep waiting for pending references. >>> Basically, this is very good explanation why your delist hack is wrong, >>> for one of the reason. Another reason is explained below. >>> You are trying to cover it with additional reference, but this is wrong >>> as well. >>> >>>> >>>> Do you see something else? >>> >>> I think that what you are trying to do with the CDP_ACTIVE hack is doomed >>> anyway, because you are allowing for devfs directory to have two entries >>> with the same name, until the populate loop cleans up the inactive one. >>> In the meantime, any access to the directory operates on random entry. >> >> The entry will not be random, because upon an open() call to a character >> device, I believe the devfs_lookup() function will be called, which >> always populate the devfs tree at first by calls to >> devfs_populate_xxx(). Any delisted devices which don't have the >> "CDP_ACTIVE" bit set, will never be seen by any open. > Entry can be random, since after the populate loop is ran, your code in > other thread could start and create duplicate entry. There is a window > in the lookup where both directory vnode lock and mount point sx locks > are dropped. So running the populate does not guarantee anything. If there is such a race, it is already there! My patch changes nothing in that area: Thread1: Calls destroy_dev() and clears CDP_ACTIVE, after dev_unlock() it goes waiting for some refs for xxx milliseconds. Thread2: Tries to create create a new character device having the same name like the one in thread1. Device name duplication check is missed because CDP_ACTIVE is cleared. Still thread1 is waiting. Thread3: Tries to open character device created by thread2 while thread1 is still waiting for some ref held by a userspace app to go away. This can happen already before my patches! What do you think? > >> >> Regarding leftover filedescriptors which still access the old "cdev" >> this is not a problem, and these will be closed when the si_refcount >> goes to zero after the destroy_devl() call. >> >>> >>> The checks for existent names in make_dev() are performed for the reason, >>> and you makes the rounds to effectively ignore it. >>> >> >> These checks are still correct and don't conflict with my patch from >> what I can see. Else the existing destroy_devl() would also be broken >> even before my patch with regard to the "random" selection of character >> devices at open() from userspace. > > The checks are done to avoid duplicate names. Your patch makes these > checks ineffective (i.e. broken). At what level do you mean duplicate names, I don't get this fully? At the directory level (DE nodes)? Or inside the list of character devices (LIST_XXX)? > Let me summarize: > - the extra reference on arbitrary cdev should be eliminated. The > delist_dev_locked() may add the ref and set some CDP_ flag to > indicate to destroy_dev() that it should do dev_rel(). It is possible to do this. I thought about this before doing my patch, but decided to try to avoid adding yet another cdev flag. > - the existence of the duplicated entries should be either eliminated > (I am not sure it is possible with your code), or we must ensure > that only one name with CDP_ACTIVE flag set and given name exists. > Then, all lookup code must be audited to take CDP_ACTIVE into account > when accessing names. I see at least devfs_find() and devfs_mknod() > which must be changed. I did not performed full audit. I will check this path out aswell. --HPS From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 13:23:13 2015 Return-Path: Delivered-To: svn-src-head@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 E2F2798A; Thu, 15 Jan 2015 13:23:13 +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 9B92C132; Thu, 15 Jan 2015 13:23:13 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YBkO7-0000PK-PD; Thu, 15 Jan 2015 16:23:03 +0300 Date: Thu, 15 Jan 2015 16:23:03 +0300 From: Slawa Olhovchenkov To: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115132303.GA245@zxy.spb.ru> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501150042.t0F0g7Um018059@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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 13:23:14 -0000 On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > Author: imp > Date: Thu Jan 15 00:42:06 2015 > New Revision: 277204 > URL: https://svnweb.freebsd.org/changeset/base/277204 > > Log: > New MINIMAL kernel config. The goal with this configuration is to > only compile in those options in GENERIC that cannot be loaded as > modules. ufs is still included because many of its options aren't > present in the kernel module. There's some other exceptions documented Are you sure? I think defining UFS options in kernel connfig affect to module too. When I define this options in kernel config (w/o options FFS) I got ufs.ko with this SU, quota, acl etc. > +options SOFTUPDATES # Enable FFS soft updates support > +options UFS_ACL # Support for access control lists > +options UFS_DIRHASH # Improve performance on big directories > +options UFS_GJOURNAL # Enable gjournal-based UFS journaling > +options QUOTA # Enable disk quotas for UFS > +options SYSVSHM # SYSV-style shared memory > +options SYSVMSG # SYSV-style message queues > +options SYSVSEM # SYSV-style semaphores > +device agp # support several AGP chipsets > +device random # Entropy device > +device padlock_rng # VIA Padlock RNG > +device rdrand_rng # Intel Bull Mountain RNG > +device vlan # 802.1Q VLAN support > +device tun # Packet tunnel. > +device gif # IPv6 and IPv4 tunneling This is loadable too. And please include: NETMAP NFS_ROOT IEEE80211_DEBUG IEEE80211_AMPDU_AGE IEEE80211_SUPPORT_MESH AH_SUPPORT_AR5416 AH_AR5416_INTERRUPT_MITIGATION ATH_ENABLE_11N From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 13:44:46 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 234DAFEC; Thu, 15 Jan 2015 13:44:46 +0000 (UTC) Date: Thu, 15 Jan 2015 13:44:46 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115134446.GA92636@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115132303.GA245@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 13:44:46 -0000 On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > > New Revision: 277204 > > URL: https://svnweb.freebsd.org/changeset/base/277204 > > > > Log: > > New MINIMAL kernel config. The goal with this configuration is to > > only compile in those options in GENERIC that cannot be loaded as > > modules. ufs is still included because many of its options aren't > > present in the kernel module. There's some other exceptions documented > > Are you sure? > I think defining UFS options in kernel connfig affect to module too. > When I define this options in kernel config (w/o options FFS) I got > ufs.ko with this SU, quota, acl etc. > > [...] > This is loadable too. Right, it does not look like minimal to me either. But I welcome the intention. AFAIR last time we had a discussion about why our default kernel is not MINIMAL, it boiled down to two main problems: 1) loader's caching of disk reads (which makes loading *.ko's from /boot/loader.conf a PITA, esp. on ZFS), and 2) robust way to figure out which modules to load on an arbitrary user's system (so they won't have to write their /boot/loader.conf from scratch themselves). Speaking of (1), I recall there was one or two attempts to address it (keyword: fast-loader-3.diff). Can someone with more details on their hands comment a bit what had happened to that work and are there any ETA for it to get committed? That would be a big leap forward towards minimal kernel which can be feasible enough to replace (or be a real alternative to) GENERIC in the future. ./danfe From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 13:53:45 2015 Return-Path: Delivered-To: svn-src-head@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 16DB63F7; Thu, 15 Jan 2015 13:53:45 +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 C22F565C; Thu, 15 Jan 2015 13:53:44 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YBkrm-0000zV-Vd; Thu, 15 Jan 2015 16:53:42 +0300 Date: Thu, 15 Jan 2015 16:53:42 +0300 From: Slawa Olhovchenkov To: Alexey Dokuchaev Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115135342.GD3698@zxy.spb.ru> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115134446.GA92636@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, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 13:53:45 -0000 On Thu, Jan 15, 2015 at 01:44:46PM +0000, Alexey Dokuchaev wrote: > On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: > > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > > > New Revision: 277204 > > > URL: https://svnweb.freebsd.org/changeset/base/277204 > > > > > > Log: > > > New MINIMAL kernel config. The goal with this configuration is to > > > only compile in those options in GENERIC that cannot be loaded as > > > modules. ufs is still included because many of its options aren't > > > present in the kernel module. There's some other exceptions documented > > > > Are you sure? > > I think defining UFS options in kernel connfig affect to module too. > > When I define this options in kernel config (w/o options FFS) I got > > ufs.ko with this SU, quota, acl etc. > > > > [...] > > This is loadable too. > > Right, it does not look like minimal to me either. But I welcome the > intention. AFAIR last time we had a discussion about why our default > kernel is not MINIMAL, it boiled down to two main problems: 1) loader's > caching of disk reads (which makes loading *.ko's from /boot/loader.conf reading large monolitic kernel is slow too. > a PITA, esp. on ZFS), and 2) robust way to figure out which modules to > load on an arbitrary user's system (so they won't have to write their > /boot/loader.conf from scratch themselves). /boot/loader.conf (with all modules currently present in GENERIC) may be instaled by bsdinstall (and may be part of base.txz). > Speaking of (1), I recall there was one or two attempts to address it > (keyword: fast-loader-3.diff). Can someone with more details on their > hands comment a bit what had happened to that work and are there any > ETA for it to get committed? That would be a big leap forward towards > minimal kernel which can be feasible enough to replace (or be a real > alternative to) GENERIC in the future. This is not only space saving. This is allow to kenv hw.cxgbe.nrxq10g=8 ; kldunload if_cxgbe ; kldload if_cxgbe ; /etc/netstart only a few seconds downtime. From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 14:08:42 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 9835C891; Thu, 15 Jan 2015 14:08:42 +0000 (UTC) Date: Thu, 15 Jan 2015 14:08:42 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115140842.GA10593@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> <20150115135342.GD3698@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115135342.GD3698@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:08:42 -0000 On Thu, Jan 15, 2015 at 04:53:42PM +0300, Slawa Olhovchenkov wrote: > On Thu, Jan 15, 2015 at 01:44:46PM +0000, Alexey Dokuchaev wrote: > > intention. AFAIR last time we had a discussion about why our default > > kernel is not MINIMAL, it boiled down to two main problems: 1) loader's > > caching of disk reads (which makes loading *.ko's from /boot/loader.conf > > reading large monolitic kernel is slow too. But not nearly as slow as loading 50-60 modules at boot time (on my stable/8 I have 59 right now). When you read one big file *once* you don't have to worry about caching reads. With everything moved to modules, loader does a lot of superfluous disk access, and to remedy this we need smart(er) caching implementation. > /boot/loader.conf (with all modules currently present in GENERIC) may > be instaled by bsdinstall (and may be part of base.txz). That could be done, but not before we solve (1), and from this POV it deems more important than (2). > This is not only space saving. > This is allow to [unload and load modules, change configuration in runtime > with minimal downtime and without reboot]. I think we all know what are the benefits of modularized kernels. But before we solve aforementioned problems, it will remain a custom option for advanced users. ./danfe From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 14:27:25 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id B235B21B; Thu, 15 Jan 2015 14:27:25 +0000 (UTC) Date: Thu, 15 Jan 2015 14:27:25 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20150115142725.GA20964@FreeBSD.org> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130907210244.GE3796@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:27:25 -0000 On Sun, Sep 08, 2013 at 01:02:44AM +0400, Slawa Olhovchenkov wrote: > On Sat, Sep 07, 2013 at 10:48:48PM +0200, Edward Tomasz Napiera?a wrote: > > > I'll be happy if someone does this right now, by populating a > > > /boot/loader.modules or something, and then force the "fixing" of > > > loader to cache metadata to make the reads faster. > > > > I have no idea on what's the loader(8) state right now, but long time > > ago I've made a patch that made it significantly faster by making > > caching actually work. No idea if anyone picked up the patch > > (http://people.freebsd.org/~trasz/fast-loader-3.diff), though. > > Some time ago Andrey V. Elsukov do improvement in loader for more > efficient caching and partition handling. Now loader load a lot of > modules faster. I am insert hist in CC: list. It's kind of funny we seem to have similar discussion happening right now again -- sixteen months later. Edward, Andrey, since you two seem to have some working code already, maybe you can work together to push out something that can be committed? :) ./danfe From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 14:36:30 2015 Return-Path: Delivered-To: svn-src-head@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 6870144A; Thu, 15 Jan 2015 14:36:30 +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 CA1731417; Thu, 15 Jan 2015 14:36:28 +0000 (UTC) Message-ID: <54B7D03D.7040004@FreeBSD.org> Date: Thu, 15 Jan 2015 17:35:41 +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: Alexey Dokuchaev , Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> <20150115135342.GD3698@zxy.spb.ru> <20150115140842.GA10593@FreeBSD.org> In-Reply-To: <20150115140842.GA10593@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:36:30 -0000 On 15.01.2015 17:08, Alexey Dokuchaev wrote: >> reading large monolitic kernel is slow too. > > But not nearly as slow as loading 50-60 modules at boot time (on my stable/8 > I have 59 right now). When you read one big file *once* you don't have to > worry about caching reads. With everything moved to modules, loader does a > lot of superfluous disk access, and to remedy this we need smart(er) caching > implementation. Did you try on recent FreeBSD versions? E.g. stable/9 after r243243, or just /boot/loader from head/ ? -- WBR, Andrey V. Elsukov From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 14:45:30 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 4458C7B2; Thu, 15 Jan 2015 14:45:30 +0000 (UTC) Date: Thu, 15 Jan 2015 14:45:30 +0000 From: Alexey Dokuchaev To: "Andrey V. Elsukov" Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115144530.GA25191@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> <20150115135342.GD3698@zxy.spb.ru> <20150115140842.GA10593@FreeBSD.org> <54B7D03D.7040004@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7D03D.7040004@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, Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:45:30 -0000 On Thu, Jan 15, 2015 at 05:35:41PM +0300, Andrey V. Elsukov wrote: > On 15.01.2015 17:08, Alexey Dokuchaev wrote: > > When you read one big file *once* you don't have to worry about caching > > reads. With everything moved to modules, loader does a lot of > > superfluous disk access, and to remedy this we need smart(er) caching > > implementation. > > Did you try on recent FreeBSD versions? E.g. stable/9 after r243243, or > just /boot/loader from head/ ? Admittedly, I didn't. My stable/8 laptop and year-or-two -CURRENT on ZFS both do show slowless with populated loader.conf. I will study r243243 and whether it changes anything for me, thanks! ./danfe From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 14:47:48 2015 Return-Path: Delivered-To: svn-src-head@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 E412F9DC; Thu, 15 Jan 2015 14:47:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CECF1BB1; Thu, 15 Jan 2015 14:47: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 t0FElmfc013604; Thu, 15 Jan 2015 14:47:48 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FElmxU013603; Thu, 15 Jan 2015 14:47:48 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501151447.t0FElmxU013603@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 15 Jan 2015 14:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277212 - head/contrib/ofed/management/opensm/osmtest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 14:47:49 -0000 Author: hselasky Date: Thu Jan 15 14:47:48 2015 New Revision: 277212 URL: https://svnweb.freebsd.org/changeset/base/277212 Log: Fix compilation for 32-bit architectures. PR: 196580 Sponsored by: Mellanox Technologies MFC after: 3 days Modified: head/contrib/ofed/management/opensm/osmtest/osmtest.c Modified: head/contrib/ofed/management/opensm/osmtest/osmtest.c ============================================================================== --- head/contrib/ofed/management/opensm/osmtest/osmtest.c Thu Jan 15 10:43:58 2015 (r277211) +++ head/contrib/ofed/management/opensm/osmtest/osmtest.c Thu Jan 15 14:47:48 2015 (r277212) @@ -2655,7 +2655,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_PR_RMPP_THR) { @@ -2683,7 +2683,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " Path Record queries CA to CA (rmpp)\n\ttook %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2701,7 +2701,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2733,7 +2733,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_RMPP_THR) { @@ -2772,7 +2772,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " large mixed queries (rmpp) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2785,7 +2785,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2819,7 +2819,7 @@ static ib_api_status_t osmtest_stress_sm OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", - start_tv.tv_sec, (long)start_tv.tv_usec); + (long)start_tv.tv_sec, (long)start_tv.tv_usec); while ((num_queries < STRESS_SMALL_RMPP_THR) && (num_timeouts < 100)) { delta_recs = 0; @@ -2848,7 +2848,7 @@ static ib_api_status_t osmtest_stress_sm end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " port_info queries (single mad) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2859,7 +2859,7 @@ static ib_api_status_t osmtest_stress_sm Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 15:25:59 2015 Return-Path: Delivered-To: svn-src-head@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 421D472A; Thu, 15 Jan 2015 15:25:59 +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 196BBFDB; Thu, 15 Jan 2015 15:25:59 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 6C3CBB94B; Thu, 15 Jan 2015 10:25:57 -0500 (EST) Message-ID: <54B7DC05.6080801@FreeBSD.org> Date: Thu, 15 Jan 2015 10:25:57 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Warner Losh Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 10:25:57 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:25:59 -0000 On 1/14/15 7:07 PM, Warner Losh wrote: > >> On Jan 14, 2015, at 7:23 AM, John Baldwin wrote: >> >> On 1/14/15 12:41 AM, Warner Losh wrote: >>> Author: imp >>> Date: Wed Jan 14 05:41:31 2015 >>> New Revision: 277163 >>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>> >>> Log: >>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>> since it's a total crap shoot if things will work. >> >> Should we just make it a #error instead? (Some day I hope to have >> NEW_PCIB enabled by default and remove the old code. Will take a while >> to get there for the generic PCI code, but cardbus is probably only used >> on x86 so that would be fine.) > > CardBus is also used on PowerPC macs.. Ok. It shouldn't be hard to add the PCI_RES_BUS stuff to PowerPC. I believe I put the details of that in the NEW_PCIB page on the wiki. You just need to have the equivalent of the x86 nexus call some MI routines to allocate bus numbers for a given domain when bus_alloc_resource() requests bubble up from below. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 15:32:32 2015 Return-Path: Delivered-To: svn-src-head@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 2F19CAD8; Thu, 15 Jan 2015 15:32: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 18130151; Thu, 15 Jan 2015 15:32: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 t0FFWW2o037458; Thu, 15 Jan 2015 15:32:32 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FFWV2Y037455; Thu, 15 Jan 2015 15:32:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501151532.t0FFWV2Y037455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 15 Jan 2015 15:32:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:32:32 -0000 Author: hselasky Date: Thu Jan 15 15:32:30 2015 New Revision: 277213 URL: https://svnweb.freebsd.org/changeset/base/277213 Log: Major callout subsystem cleanup and rewrite: - Close a migration race where callout_reset() failed to set the CALLOUT_ACTIVE flag. - Callout callback functions are now allowed to be protected by spinlocks. - Switching the callout CPU number cannot always be done on a per-callout basis. See the updated timeout(9) manual page for more information. - The timeout(9) manual page has been updated to reflect how all the functions inside the callout API are working. The manual page has been made function oriented to make it easier to deduce how each of the functions making up the callout API are working without having to first read the whole manual page. Group all functions into a handful of sections which should give a quick top-level overview when the different functions should be used. - The CALLOUT_SHAREDLOCK flag and its functionality has been removed to reduce the complexity in the callout code and to avoid problems about atomically stopping callouts via callout_stop(). If someone needs it, it can be re-added. From my quick grep there are no CALLOUT_SHAREDLOCK clients in the kernel. - A new callout API function named "callout_drain_async()" has been added. See the updated timeout(9) manual page for a complete description. - Update the callout clients in the "kern/" folder to use the callout API properly, like cv_timedwait(). Previously there was some custom sleepqueue code in the callout subsystem, which has been removed, because we now allow callouts to be protected by spinlocks. This allows us to tear down the callout like done with regular mutexes, and a "td_slpmutex" has been added to "struct thread" to atomically teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and "SWT_SLEEPQTIMO" states can now be completely removed. Currently they are marked as available and will be cleaned up in a follow up commit. - Bump the __FreeBSD_version to indicate kernel modules need recompilation. - There has been several reports that this patch "seems to squash a serious bug leading to a callout timeout and panic". Kernel build testing: all architectures were built MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D1438 Sponsored by: Mellanox Technologies Reviewed by: jhb, adrian, sbruno and emaste Modified: head/share/man/man9/Makefile head/share/man/man9/timeout.9 head/sys/kern/init_main.c head/sys/kern/kern_condvar.c head/sys/kern/kern_lock.c head/sys/kern/kern_switch.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/kern_timeout.c head/sys/kern/subr_sleepqueue.c head/sys/ofed/include/linux/completion.h head/sys/sys/_callout.h head/sys/sys/callout.h head/sys/sys/param.h head/sys/sys/proc.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Jan 15 14:47:48 2015 (r277212) +++ head/share/man/man9/Makefile Thu Jan 15 15:32:30 2015 (r277213) @@ -1570,6 +1570,7 @@ MLINKS+=timeout.9 callout.9 \ timeout.9 callout_active.9 \ timeout.9 callout_deactivate.9 \ timeout.9 callout_drain.9 \ + timeout.9 callout_drain_async.9 \ timeout.9 callout_handle_init.9 \ timeout.9 callout_init.9 \ timeout.9 callout_init_mtx.9 \ Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Thu Jan 15 14:47:48 2015 (r277212) +++ head/share/man/man9/timeout.9 Thu Jan 15 15:32:30 2015 (r277213) @@ -29,13 +29,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 8, 2014 +.Dd January 14, 2015 .Dt TIMEOUT 9 .Os .Sh NAME .Nm callout_active , .Nm callout_deactivate , .Nm callout_drain , +.Nm callout_drain_async , .Nm callout_handle_init , .Nm callout_init , .Nm callout_init_mtx , @@ -63,279 +64,232 @@ .In sys/systm.h .Bd -literal typedef void timeout_t (void *); +typedef void callout_func_t (void *); .Ed -.Ft int -.Fn callout_active "struct callout *c" -.Ft void -.Fn callout_deactivate "struct callout *c" -.Ft int -.Fn callout_drain "struct callout *c" -.Ft void -.Fn callout_handle_init "struct callout_handle *handle" -.Bd -literal -struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle); -.Ed -.Ft void -.Fn callout_init "struct callout *c" "int mpsafe" -.Ft void -.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" -.Ft void -.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" -.Ft void -.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" -.Ft int -.Fn callout_pending "struct callout *c" -.Ft int -.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" -.Ft int -.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ -"void *arg" -.Ft int -.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \ -"void *arg" "int cpu" -.Ft int -.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" -.Ft int -.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" -.Ft int -.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags" -.Ft int -.Fn callout_schedule "struct callout *c" "int ticks" -.Ft int -.Fn callout_schedule_curcpu "struct callout *c" "int ticks" -.Ft int -.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" -.Ft int -.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -.Ft int -.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -.Ft int -.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int cpu" "int flags" -.Ft int -.Fn callout_stop "struct callout *c" -.Ft struct callout_handle -.Fn timeout "timeout_t *func" "void *arg" "int ticks" -.Ft void -.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" .Sh DESCRIPTION The .Nm callout API is used to schedule a call to an arbitrary function at a specific -time in the future. -Consumers of this API are required to allocate a callout structure +time in the future in a single-shot fashion. +Consumers of this API are required to allocate a .Pq struct callout -for each pending function invocation. -This structure stores state about the pending function invocation including -the function to be called and the time at which the function should be invoked. -Pending function calls can be cancelled or rescheduled to a different time. -In addition, -a callout structure may be reused to schedule a new function call after a -scheduled call is completed. -.Pp -Callouts only provide a single-shot mode. -If a consumer requires a periodic timer, -it must explicitly reschedule each function call. -This is normally done by rescheduling the subsequent call within the called -function. +structure for each pending function invocation. +The +.Pq struct callout +structure stores the full state about any pending function call and +should be drained by a call to +.Fn callout_drain +or +.Fn callout_drain_async +before freeing. +.Sh INITIALISATION +.Ft void +.Fn callout_handle_init "struct callout_handle *handle" +This function is deprecated and is used to prepare a +.Pq struct callout_handle +structure before it can be used the first time. +If this function is called on a pending timeout, the pending timeout +cannot be cancelled and the +.Fn untimeout +function will return as if there was no timeout pending. .Pp -Callout functions must not sleep. -They may not acquire sleepable locks, -wait on condition variables, -perform blocking allocation requests, -or invoke any other action that might sleep. +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" +This macro is deprecated and can be used instead of +.Fn callout_handle_init +to assign the default state to the +.Pq struct callout_handle +structure when declaring static timeouts. .Pp -Each callout structure must be initialized by -.Fn callout_init , -.Fn callout_init_mtx , -.Fn callout_init_rm , -or -.Fn callout_init_rw -before it is passed to any of the other callout functions. -The -.Fn callout_init -function initializes a callout structure in -.Fa c -that is not associated with a specific lock. +.Ft void +.Fn callout_init "struct callout *c" "int mpsafe" +This function prepares a +.Pq struct callout +structure before it can be used. +This function should not be used when the callout is pending a timeout. If the .Fa mpsafe -argument is zero, -the callout structure is not considered to be -.Dq multi-processor safe ; -and the Giant lock will be acquired before calling the callout function -and released when the callout function returns. +argument is non-zero, the callback function will be running unlocked. +Else the Giant mutex will be locked before calling the callback function. .Pp +.Ft void +.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" +This function prepares a +.Pq struct callout +structure before it can be used. +This function should not be used when the callout is pending a timeout. The -.Fn callout_init_mtx , -.Fn callout_init_rm , -and -.Fn callout_init_rw -functions initialize a callout structure in -.Fa c -that is associated with a specific lock. -The lock is specified by the -.Fa mtx , -.Fa rm , -or -.Fa rw -parameter. -The associated lock must be held while stopping or rescheduling the -callout. -The callout subsystem acquires the associated lock before calling the -callout function and releases it after the function returns. -If the callout was cancelled while the callout subsystem waited for the -associated lock, -the callout function is not called, -and the associated lock is released. -This ensures that stopping or rescheduling the callout will abort any -previously scheduled invocation. -.Pp -Only regular mutexes may be used with -.Fn callout_init_mtx ; -spin mutexes are not supported. -A sleepable read-mostly lock -.Po -one initialized with the -.Dv RM_SLEEPABLE -flag -.Pc -may not be used with -.Fn callout_init_rm . -Similarly, other sleepable lock types such as -.Xr sx 9 -and -.Xr lockmgr 9 -cannot be used with callouts because sleeping is not permitted in -the callout subsystem. -.Pp -These +.Fa mtx +argument should be non-zero and should specify a pointer to a valid +spinlock type of mutex or a valid regular non-sleepable mutex which +the callback subsystem should lock before calling the callback +function. +Valid .Fa flags -may be specified for -.Fn callout_init_mtx , -.Fn callout_init_rm , -or -.Fn callout_init_rw : +are: .Bl -tag -width ".Dv CALLOUT_RETURNUNLOCKED" .It Dv CALLOUT_RETURNUNLOCKED -The callout function will release the associated lock itself, -so the callout subsystem should not attempt to unlock it -after the callout function returns. -.It Dv CALLOUT_SHAREDLOCK -The lock is only acquired in read mode when running the callout handler. -This flag is ignored by -.Fn callout_init_mtx . +It is assumed that the callout function has released the specified +mutex before returning. +Else the callout subsystem will release the specified mutex after the +callout function has returned. .El .Pp -The function -.Fn callout_stop -cancels a callout -.Fa c -if it is currently pending. -If the callout is pending, then -.Fn callout_stop -returns a non-zero value. -If the callout is not set, -has already been serviced, -or is currently being serviced, -then zero will be returned. -If the callout has an associated lock, -then that lock must be held when this function is called. -.Pp -The function -.Fn callout_drain -is identical to -.Fn callout_stop -except that it will wait for the callout -.Fa c -to complete if it is already in progress. -This function MUST NOT be called while holding any -locks on which the callout might block, or deadlock will result. -Note that if the callout subsystem has already begun processing this -callout, then the callout function may be invoked before -.Fn callout_drain -returns. -However, the callout subsystem does guarantee that the callout will be -fully stopped before -.Fn callout_drain -returns. -.Pp -The -.Fn callout_reset -and -.Fn callout_schedule -function families schedule a future function invocation for callout -.Fa c . -If -.Fa c -already has a pending callout, -it is cancelled before the new invocation is scheduled. -These functions return a non-zero value if a pending callout was cancelled -and zero if there was no pending callout. -If the callout has an associated lock, -then that lock must be held when any of these functions are called. +.Ft void +.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" +This function is the same like the +.Fn callout_init_mtx +function except it accepts a read-mostly type of lock. +The read-mostly lock must not be initialised with the +.Dv RM_SLEEPABLE +flag. .Pp -The time at which the callout function will be invoked is determined by -either the -.Fa ticks -argument or the -.Fa sbt , -.Fa pr , -and -.Fa flags -arguments. -When -.Fa ticks -is used, -the callout is scheduled to execute after +.Ft void +.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" +This function is the same like the +.Fn callout_init_mtx +function except it accepts a reader-writer type of lock. +.Sh SCHEDULING CALLOUTS +.Ft struct callout_handle +.Fn timeout "timeout_t *func" "void *arg" "int ticks" +This function is deprecated and schedules a call to the function given by the argument +.Fa func +to take place after .Fa ticks Ns No /hz seconds. Non-positive values of .Fa ticks are silently converted to the value .Sq 1 . -.Pp The -.Fa sbt , -.Fa pr , -and -.Fa flags -arguments provide more control over the scheduled time including -support for higher resolution times, -specifying the precision of the scheduled time, -and setting an absolute deadline instead of a relative timeout. -The callout is scheduled to execute in a time window which begins at -the time specified in +.Fa func +argument should be a valid pointer to a function that takes a single +.Fa void * +argument. +Upon invocation, the +.Fa func +function will receive +.Fa arg +as its only argument. +The Giant lock is locked when the +.Fa arg +function is invoked and should not be unlocked by this function. +The returned value from +.Fn timeout +is a +.Ft struct callout_handle +structure which can be used in conjunction with the +.Fn untimeout +function to request that a scheduled timeout be cancelled. +As handles are recycled by the system, it is possible, although unlikely, +that a handle from one invocation of +.Fn timeout +may match the handle of another invocation of +.Fn timeout +if both calls used the same function pointer and argument, and the first +timeout is expired or canceled before the second call. +Please ensure that the function and argument pointers are unique when using this function. +.Pp +.Ft int +.Fn callout_reset "struct callout *c" "int ticks" "callout_func_t *func" "void *arg" +This function is used to schedule or re-schedule a callout. +This function at first stops the callout given by the +.Fa c +argument, if any. +Then it will start the callout given by the +.Fa c +argument. +The relative time until the timeout callback happens is given by the +.Fa ticks +argument. +The number of ticks in a second is defined by +.Dv hz +and can vary from system to system. +This function returns a non-zero value if the given callout was pending and +the callback function was prevented from being called. +Else a value of zero is returned. +If a lock is associated with the callout given by the +.Fa c +argument and it is exclusivly locked when this function is called this +function will always ensure that previous callback function, if any, +is never reached. +In other words the callout will be atomically restarted. +Else there is no such guarantee. +The callback function is given by the +.Fa func +argument and its function argument is given by the +.Fa arg +argument. +.Pp +.Ft int +.Fn callout_reset_curcpu "struct callout *c" "int ticks" "callout_func_t *func" \ +"void *arg" +This function works the same like the +.Fn callout_reset +function except the callback function given by the +.Fa func +argument will be executed on the same CPU which called this function. +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the +.Fa func +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_reset_on "struct callout *c" "int ticks" "callout_func_t *func" \ +"void *arg" "int cpu" +This function works the same like the +.Fn callout_reset +function except the callback function given by the +.Fa func +argument will be executed on the CPU given by the +.Fa cpu +argument. +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the +.Fa func +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" +This function works the same like the +.Fn callout_reset +function except the relative or absolute time after which the timeout +callback should happen is given by the .Fa sbt -and extends for the amount of time specified in -.Fa pr . -If +argument and extends for the amount of time specified in the +.Fa pr +argument. +This function is used when you need high precision timeouts. +If the .Fa sbt -specifies a time in the past, +argument specifies a time in the past, the window is adjusted to start at the current time. A non-zero value for .Fa pr allows the callout subsystem to coalesce callouts scheduled close to each other into fewer timer interrupts, reducing processing overhead and power consumption. -These +The .Fa flags -may be specified to adjust the interpretation of +argument may be non-zero to adjust the interpretation of the .Fa sbt -and -.Fa pr : +and the +.Fa pr +arguments: .Bl -tag -width ".Dv C_DIRECT_EXEC" .It Dv C_ABSOLUTE Handle the .Fa sbt argument as an absolute time since boot. -By default, +By default, the .Fa sbt -is treated as a relative amount of time, +argument is treated like a relative amount of time, similar to .Fa ticks . .It Dv C_DIRECT_EXEC @@ -347,7 +301,7 @@ Callout functions run in this context ma and should be as small as possible because they run with absolute priority. .It Fn C_PREL Specifies relative event time precision as binary logarithm of time interval -divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4, etc. +divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4 and so on. Note that the larger of .Fa pr or this value is used as the length of the time window. @@ -360,65 +314,215 @@ Align the timeouts to calls if possible. .El .Pp -The -.Fn callout_reset -functions accept a +.Ft int +.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" +This function works the same like the +.Fn callout_reset_sbt +function except the callback function given by the .Fa func -argument which identifies the function to be called when the time expires. -It must be a pointer to a function that takes a single -.Fa void * +argument will be executed on the same CPU which called this function. +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the +.Fa func +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "callout_func_t *func" "void *arg" "int cpu" "int flags" +This function works the same like the +.Fn callout_reset_sbt +function except the callback function given by the +.Fa func +argument will be executed on the CPU given by the +.Fa cpu argument. -Upon invocation, +A change in the CPU selection can happen if the callout has a lock +associated with it and is locked when this function is called. +A change in the CPU selection cannot happen if this function is +re-scheduled inside a callout function. +Else the callback function given by the .Fa func -will receive -.Fa arg -as its only argument. -The -.Fn callout_schedule -functions reuse the +argument will be executed on the same CPU like previously done. +.Pp +.Ft int +.Fn callout_schedule "struct callout *c" "int ticks" +This function works the same like the +.Fn callout_reset +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_curcpu "struct callout *c" "int ticks" +This function works the same like the +.Fn callout_reset_curcpu +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" +This function works the same like the +.Fn callout_reset_on +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +This function works the same like the +.Fn callout_reset_sbt +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +This function works the same like the +.Fn callout_reset_sbt_curcpu +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Pp +.Ft int +.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int cpu" "int flags" +This function works the same like the +.Fn callout_reset_sbt_on +function except it re-uses the callback function and the callback argument +already stored in the +.Pq struct callout +structure. +.Sh CHECKING THE STATE OF CALLOUTS +.Ft int +.Fn callout_pending "struct callout *c" +This function returns non-zero if the callout pointed to by the +.Fa c +argument is pending for callback. +Else this function returns zero. +This function returns zero when inside the callout function if the +callout is not re-scheduled. +.Pp +.Ft int +.Fn callout_active "struct callout *c" +This function is deprecated and returns non-zero if the callout +pointed to by the +.Fa c +argument was scheduled in the past. +Else this function returns zero. +This function also returns zero after the +.Fn callout_deactivate +or the +.Fn callout_stop +or the +.Fn callout_drain +or the +.Fn callout_drain_async +function is called on the same callout as given by the +.Fa c +argument. +.Pp +.Ft void +.Fn callout_deactivate "struct callout *c" +This function is deprecated and ensures that subsequent calls to the +.Fn callout_activate +function returns zero until the callout is scheduled again. +.Sh STOPPING CALLOUTS +.Ft void +.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" +This function is deprecated and cancels the timeout associated with the +.Fa handle +argument using the function pointed to by the .Fa func -and +argument and having the .Fa arg -arguments from the previous callout. -Note that one of the -.Fn callout_reset -functions must always be called to initialize +arguments to validate the handle. +If the handle does not correspond to a timeout with +the function .Fa func -and +taking the argument .Fa arg -before one of the -.Fn callout_schedule -functions can be used. +no action is taken. The +.Fa handle +must be initialised by a previous call to +.Fn timeout , +.Fn callout_handle_init +or assigned the value of +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" +before being passed to +.Fn untimeout . +The behavior of calling +.Fn untimeout +with an uninitialised handle +is undefined. .Pp -The callout subsystem provides a softclock thread for each CPU in the system. -Callouts are assigned to a single CPU and are executed by the softclock thread -for that CPU. -Initially, -callouts are assigned to CPU 0. -The -.Fn callout_reset_on , -.Fn callout_reset_sbt_on , -.Fn callout_schedule_on -and -.Fn callout_schedule_sbt_on -functions assign the callout to CPU -.Fa cpu . -The -.Fn callout_reset_curcpu , -.Fn callout_reset_sbt_curpu , -.Fn callout_schedule_curcpu -and -.Fn callout_schedule_sbt_curcpu -functions assign the callout to the current CPU. -The -.Fn callout_reset , -.Fn callout_reset_sbt , -.Fn callout_schedule -and -.Fn callout_schedule_sbt -functions schedule the callout to execute in the softclock thread of the CPU -to which it is currently assigned. +.Ft int +.Fn callout_stop "struct callout *c" +This function is used to stop a timeout function invocation associated with the callout pointed to by the +.Fa c +argument, in a non-blocking fashion. +This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialised. +This function returns a non-zero value if the given callout was pending and +the callback function was prevented from being called. +Else a value of zero is returned. +If a lock is associated with the callout given by the +.Fa c +argument and it is exclusivly locked when this function is called, the +.Fn callout_stop +function will always ensure that the callback function is never reached. +In other words the callout will be atomically stopped. +Else there is no such guarantee. +.Sh DRAINING CALLOUTS +.Ft int +.Fn callout_drain "struct callout *c" +This function works the same like the +.Fn callout_stop +function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the +.Fa c +argument inside the callout subsystem before it returns. +Also this function ensures that the lock, if any, associated with the +callout is no longer being used. +When this function returns, it is safe to free the callout structure pointed to by the +.Fa c +argument. .Pp +.Ft int +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" +This function is non-blocking and works the same like the +.Fn callout_stop +function except if it returns non-zero it means the callback function pointed to by the +.Fa fn +argument will be called back with the +.Fa arg +argument when all references to the callout pointed to by the +.Fa c +argument are gone. +If this function returns zero, it is safe to free the callout structure pointed to by the +.Fa c +argument right away. +.Sh CALLOUT FUNCTION RESTRICTIONS +Callout functions must not sleep. +They may not acquire sleepable locks, wait on condition variables, +perform blocking allocation requests, or invoke any other action that +might sleep. +.Sh CALLOUT SUBSYSTEM INTERNALS +The callout subsystem has its own set of spinlocks to protect its internal state. +The callout subsystem provides a softclock thread for each CPU in the +system. +Callouts are assigned to a single CPU and are executed by the +softclock thread for that CPU. +Initially, callouts are assigned to CPU 0. Softclock threads are not pinned to their respective CPUs by default. The softclock thread for CPU 0 can be pinned to CPU 0 by setting the .Va kern.pin_default_swi @@ -427,50 +531,7 @@ Softclock threads for CPUs other than ze respective CPUs by setting the .Va kern.pin_pcpu_swi loader tunable to a non-zero value. -.Pp -The macros -.Fn callout_pending , -.Fn callout_active -and -.Fn callout_deactivate -provide access to the current state of the callout. -The -.Fn callout_pending -macro checks whether a callout is -.Em pending ; -a callout is considered -.Em pending -when a timeout has been set but the time has not yet arrived. -Note that once the timeout time arrives and the callout subsystem -starts to process this callout, -.Fn callout_pending -will return -.Dv FALSE -even though the callout function may not have finished -.Pq or even begun -executing. -The -.Fn callout_active -macro checks whether a callout is marked as -.Em active , -and the -.Fn callout_deactivate -macro clears the callout's -.Em active -flag. -The callout subsystem marks a callout as -.Em active -when a timeout is set and it clears the -.Em active -flag in -.Fn callout_stop -and -.Fn callout_drain , -but it -.Em does not -clear it when a callout expires normally via the execution of the -callout function. -.Ss "Avoiding Race Conditions" +.Sh "AVOIDING RACE CONDITIONS" The callout subsystem invokes callout functions from its own thread context. Without some kind of synchronization, @@ -487,7 +548,7 @@ synchronization concerns. The first approach is preferred as it is the simplest: .Bl -enum -offset indent .It -Callouts can be associated with a specific lock when they are initialized +Callouts can be associated with a specific lock when they are initialised by .Fn callout_init_mtx , .Fn callout_init_rm , @@ -508,7 +569,7 @@ or .Fn callout_schedule functions to provide this safety. .Pp -A callout initialized via +A callout initialised via .Fn callout_init with .Fa mpsafe @@ -531,9 +592,8 @@ function families .Pc indicates whether or not the callout was removed. If it is known that the callout was set and the callout function has -not yet executed, then a return value of -.Dv FALSE -indicates that the callout function is about to be called. +not yet executed, then a return value of zero indicates that the +callout function is about to be called. For example: .Bd -literal -offset indent if (sc->sc_flags & SCFLG_CALLOUT_RUNNING) { @@ -589,16 +649,14 @@ The callout function should first check .Em pending flag and return without action if .Fn callout_pending -returns -.Dv TRUE . +returns non-zero. This indicates that the callout was rescheduled using .Fn callout_reset just before the callout function was invoked. If .Fn callout_active -returns -.Dv FALSE -then the callout function should also return without action. +returns zero then the callout function should also return without +action. This indicates that the callout has been stopped. Finally, the callout function should call .Fn callout_deactivate @@ -668,129 +726,13 @@ a callout should always be drained prior or releasing the storage for the callout structure. .Sh LEGACY API .Bf Sy -The functions below are a legacy API that will be removed in a future release. -New code should not use these routines. -.Ef -.Pp -The function -.Fn timeout -schedules a call to the function given by the argument -.Fa func -to take place after -.Fa ticks Ns No /hz -seconds. -Non-positive values of -.Fa ticks -are silently converted to the value -.Sq 1 . -.Fa func -should be a pointer to a function that takes a -.Fa void * -argument. -Upon invocation, -.Fa func -will receive -.Fa arg -as its only argument. -The return value from +The .Fn timeout -is a -.Ft struct callout_handle -which can be used in conjunction with the -.Fn untimeout -function to request that a scheduled timeout be canceled. -.Pp -The function -.Fn callout_handle_init -can be used to initialize a handle to a state which will cause -any calls to -.Fn untimeout -with that handle to return with no side -effects. -.Pp -Assigning a callout handle the value of -.Fn CALLOUT_HANDLE_INITIALIZER -performs the same function as -.Fn callout_handle_init -and is provided for use on statically declared or global callout handles. -.Pp -The function -.Fn untimeout -cancels the timeout associated with -.Fa handle -using the -.Fa func and -.Fa arg -arguments to validate the handle. -If the handle does not correspond to a timeout with -the function -.Fa func -taking the argument -.Fa arg -no action is taken. -.Fa handle -must be initialized by a previous call to -.Fn timeout , -.Fn callout_handle_init , -or assigned the value of -.Fn CALLOUT_HANDLE_INITIALIZER "&handle" -before being passed to -.Fn untimeout . -The behavior of calling .Fn untimeout -with an uninitialized handle -is undefined. -.Pp -As handles are recycled by the system, it is possible (although unlikely) -that a handle from one invocation of -.Fn timeout -may match the handle of another invocation of -.Fn timeout -if both calls used the same function pointer and argument, and the first -timeout is expired or canceled before the second call. -The timeout facility offers O(1) running time for -.Fn timeout -and -.Fn untimeout . -Timeouts are executed from -.Fn softclock -with the -.Va Giant -lock held. -Thus they are protected from re-entrancy. -.Sh RETURN VALUES -The -.Fn callout_active -macro returns the state of a callout's -.Em active -flag. -.Pp -The -.Fn callout_pending -macro returns the state of a callout's -.Em pending -flag. -.Pp -The -.Fn callout_reset -and -.Fn callout_schedule -function families return non-zero if the callout was pending before the new -function invocation was scheduled. -.Pp -The -.Fn callout_stop -and -.Fn callout_drain -functions return non-zero if the callout was still pending when it was -called or zero otherwise. -The -.Fn timeout -function returns a -.Ft struct callout_handle -that can be passed to -.Fn untimeout . +functions are a legacy API that will be removed in a future release. +New code should not use these routines. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 15:51:57 2015 Return-Path: Delivered-To: svn-src-head@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 26E8C77D; Thu, 15 Jan 2015 15:51:57 +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 F423C607; Thu, 15 Jan 2015 15:51:56 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E9DACB913; Thu, 15 Jan 2015 10:51:55 -0500 (EST) Message-ID: <54B7E21B.5080008@FreeBSD.org> Date: Thu, 15 Jan 2015 10:51:55 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277204 - head/sys/amd64/conf References: <201501150042.t0F0g7Um018059@svn.freebsd.org> In-Reply-To: <201501150042.t0F0g7Um018059@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, 15 Jan 2015 10:51:56 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:51:57 -0000 On 1/14/15 7:42 PM, Warner Losh wrote: > Author: imp > Date: Thu Jan 15 00:42:06 2015 > New Revision: 277204 > URL: https://svnweb.freebsd.org/changeset/base/277204 > > Log: > New MINIMAL kernel config. The goal with this configuration is to > only compile in those options in GENERIC that cannot be loaded as > modules. ufs is still included because many of its options aren't > present in the kernel module. There's some other exceptions documented > in the file. This is part of some work to get more things > automatically loading in the hopes of obsoleting GENERIC one day. > > Added: > head/sys/amd64/conf/MINIMAL (contents, props changed) > > Added: head/sys/amd64/conf/MINIMAL > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/sys/amd64/conf/MINIMAL Thu Jan 15 00:42:06 2015 (r277204) > @@ -0,0 +1,145 @@ > +# o acpi as a module has been reported flakey and not well tested, so > +# is included in the kernel. ACPI doesn't build as a module on amd64 and can't. It has to hook into kernel startup before modules can run to do things like enumerate CPUs and NUMA domains. i386 uses a hack to allow acpi.ko to load whereby it blows out all the CPU-sized tables to the static MAXCPU value instead of doing any runtime tuning. I'd probably prefer to drop acpi.ko from i386 and make it more like amd64. > +# o random is included due to uncertaty... s/uncertaty/uncertainty/, though I think you exhausted your irony quotient for the day with that one. :) > + > +device agp # support several AGP chipsets This works as a kld now IIRC? I think you can even load it at runtime? > + > +# Pseudo devices. > +device loop # Network loopback > +device random # Entropy device > +device padlock_rng # VIA Padlock RNG > +device rdrand_rng # Intel Bull Mountain RNG > +device ether # Ethernet support > +device vlan # 802.1Q VLAN support > +device tun # Packet tunnel. > +device gif # IPv6 and IPv4 tunneling These last three definitely work as modules. (vlan(4) was only recently added to GENERIC). -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 15:53:45 2015 Return-Path: Delivered-To: svn-src-head@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 17B04987; Thu, 15 Jan 2015 15:53:45 +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 E1ED3628; Thu, 15 Jan 2015 15:53:44 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E5859B923; Thu, 15 Jan 2015 10:53:43 -0500 (EST) Message-ID: <54B7E287.80406@FreeBSD.org> Date: Thu, 15 Jan 2015 10:53:43 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Hans Petter Selasky , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> In-Reply-To: <201501151532.t0FFWV2Y037455@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, 15 Jan 2015 10:53:44 -0500 (EST) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 15:53:45 -0000 On 1/15/15 10:32 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 > > Log: > Major callout subsystem cleanup and rewrite: > - Close a migration race where callout_reset() failed to set the > CALLOUT_ACTIVE flag. > - Callout callback functions are now allowed to be protected by > spinlocks. > - Switching the callout CPU number cannot always be done on a > per-callout basis. See the updated timeout(9) manual page for more > information. > - The timeout(9) manual page has been updated to reflect how all the > functions inside the callout API are working. The manual page has > been made function oriented to make it easier to deduce how each of > the functions making up the callout API are working without having > to first read the whole manual page. Group all functions into a > handful of sections which should give a quick top-level overview > when the different functions should be used. > - The CALLOUT_SHAREDLOCK flag and its functionality has been removed > to reduce the complexity in the callout code and to avoid problems > about atomically stopping callouts via callout_stop(). If someone > needs it, it can be re-added. From my quick grep there are no > CALLOUT_SHAREDLOCK clients in the kernel. > - A new callout API function named "callout_drain_async()" has been > added. See the updated timeout(9) manual page for a complete > description. > - Update the callout clients in the "kern/" folder to use the callout > API properly, like cv_timedwait(). Previously there was some custom > sleepqueue code in the callout subsystem, which has been removed, > because we now allow callouts to be protected by spinlocks. This > allows us to tear down the callout like done with regular mutexes, > and a "td_slpmutex" has been added to "struct thread" to atomically > teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and > "SWT_SLEEPQTIMO" states can now be completely removed. Currently > they are marked as available and will be cleaned up in a follow up > commit. > - Bump the __FreeBSD_version to indicate kernel modules need > recompilation. > - There has been several reports that this patch "seems to squash a > serious bug leading to a callout timeout and panic". > > Kernel build testing: all architectures were built > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D1438 > Sponsored by: Mellanox Technologies > Reviewed by: jhb, adrian, sbruno and emaste Eh, I have not reviewed this at all. (I still plan to though.) -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 16:00:28 2015 Return-Path: Delivered-To: svn-src-head@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 0A781D7C; Thu, 15 Jan 2015 16:00:28 +0000 (UTC) Received: from mail-ie0-x235.google.com (mail-ie0-x235.google.com [IPv6:2607:f8b0:4001:c03::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C18956C1; Thu, 15 Jan 2015 16:00:27 +0000 (UTC) Received: by mail-ie0-f181.google.com with SMTP id rl12so15571598iec.12; Thu, 15 Jan 2015 08:00:27 -0800 (PST) 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=a5T25GZ9zPO3PXNPks3peNUWSeJmX1Bz8mUWIL9JMeY=; b=RcDyNNEBPs3WIlyiDgOx+JxKlZQDRNdl+RtOpeXMCj1pfdmN8pznio0UNNmyoft5na o8kinM1tnlmdx3v1vaOnR5AO5iFkRx9AqpfoHFTUM5WSME1uZUdpI/53C8ElK5Rj8Mjg aIeuKDB5L1bQoNc+9qmG16dpvswLMM2yo4n0JYkq4vBFW3LHrG9PMuVW/js5XsYCFh5z ruxAeLyryHsbp4UiZvb7tywyI7oOmedb6f7kYF0NpQIs1Yrn+wctLLCWSDIT+7FJ4uv5 WpzGjie4QMXn0BYqm/w9iKdrt7HpkQa6LhX87TlJpea+zWZjwrmhQRPSkYikcGDb22q5 wDgQ== X-Received: by 10.107.25.74 with SMTP id 71mr11195085ioz.70.1421337627005; Thu, 15 Jan 2015 08:00:27 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.0.85 with HTTP; Thu, 15 Jan 2015 08:00:06 -0800 (PST) In-Reply-To: <54B7E287.80406@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> From: Ed Maste Date: Thu, 15 Jan 2015 11:00:06 -0500 X-Google-Sender-Auth: C7N1nU6H6rWE1fye8YQ0BG2AQQw Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Hans Petter Selasky X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:00:28 -0000 On 15 January 2015 at 10:53, John Baldwin wrote: > On 1/15/15 10:32 AM, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Jan 15 15:32:30 2015 >> New Revision: 277213 >> URL: https://svnweb.freebsd.org/changeset/base/277213 >> > Eh, I have not reviewed this at all. (I still plan to though.) Yes, the list is "people listed as reviewers or subscribers on the Phabricator review." I don't believe anyone in the list has examined it closely enough to count as "Reviewed-by." I certainly haven't. From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 16:05:13 2015 Return-Path: Delivered-To: svn-src-head@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 810A01DF; Thu, 15 Jan 2015 16:05:13 +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 40CD9801; Thu, 15 Jan 2015 16:05:13 +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 77C8D1FE022; Thu, 15 Jan 2015 17:05:10 +0100 (CET) Message-ID: <54B7E566.8050601@selasky.org> Date: Thu, 15 Jan 2015 17:05:58 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Baldwin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, sbruno@freebsd.org Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> In-Reply-To: <54B7E287.80406@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:05:13 -0000 On 01/15/15 16:53, John Baldwin wrote: > On 1/15/15 10:32 AM, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Jan 15 15:32:30 2015 >> New Revision: 277213 >> URL: https://svnweb.freebsd.org/changeset/base/277213 >> Hi, > > Eh, I have not reviewed this at all. (I still plan to though.) > The "Reviewed by" was simply a C&P of the review list in from the Differential Revision. When you mention it should probably simply have said: Reviewed by: sbruno @ Due to the meaning of "Reviewed by" in commit messages. Sorry. BTW: Nice if people respond quickly or remove themselves from the differential reviews if they don't plan to do any reviews. --HPS From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 16:09:37 2015 Return-Path: Delivered-To: svn-src-head@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 A1A263C9; Thu, 15 Jan 2015 16:09: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 741C084E; Thu, 15 Jan 2015 16:09: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 t0FG9b7i053023; Thu, 15 Jan 2015 16:09:37 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FG9aom053019; Thu, 15 Jan 2015 16:09:36 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501151609.t0FG9aom053019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Thu, 15 Jan 2015 16:09:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277214 - in head/sys/dev/sound: pci pcm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:09:37 -0000 Author: bapt Date: Thu Jan 15 16:09:35 2015 New Revision: 277214 URL: https://svnweb.freebsd.org/changeset/base/277214 Log: Sound: fix typos in user visible messages etc. Submitted by: Sascha Wildner Obtained from: DragonFly MFC after: 3 days Modified: head/sys/dev/sound/pci/emu10kx.c head/sys/dev/sound/pci/envy24.c head/sys/dev/sound/pci/envy24ht.c head/sys/dev/sound/pcm/channel.c Modified: head/sys/dev/sound/pci/emu10kx.c ============================================================================== --- head/sys/dev/sound/pci/emu10kx.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pci/emu10kx.c Thu Jan 15 16:09:35 2015 (r277214) @@ -2316,7 +2316,7 @@ emu10kx_prepare(struct emu_sc_info *sc, } if (sc->midi[0] != NULL) if (device_is_attached(sc->midi[0])) { - sbuf_printf(s, "\tIR reciever MIDI events %s\n", sc->enable_ir ? "enabled" : "disabled"); + sbuf_printf(s, "\tIR receiver MIDI events %s\n", sc->enable_ir ? "enabled" : "disabled"); } sbuf_printf(s, "Card is in %s mode\n", (sc->mode == MODE_ANALOG) ? "analog" : "digital"); Modified: head/sys/dev/sound/pci/envy24.c ============================================================================== --- head/sys/dev/sound/pci/envy24.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pci/envy24.c Thu Jan 15 16:09:35 2015 (r277214) @@ -2312,7 +2312,7 @@ envy24_putcfg(struct sc_info *sc) printf("from external clock synthesizer chip\n"); break; default: - printf("illeagal system setting\n"); + printf("illegal system setting\n"); } printf(" MPU-401 UART(s) #: "); if (sc->cfg->scfg & PCIM_SCFG_MPU) Modified: head/sys/dev/sound/pci/envy24ht.c ============================================================================== --- head/sys/dev/sound/pci/envy24ht.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pci/envy24ht.c Thu Jan 15 16:09:35 2015 (r277214) @@ -2212,7 +2212,7 @@ envy24ht_putcfg(struct sc_info *sc) printf("reserved\n"); break; default: - printf("illeagal system setting\n"); + printf("illegal system setting\n"); } printf(" MPU-401 UART(s) #: "); if (sc->cfg->scfg & ENVY24HT_CCSM_SCFG_MPU) Modified: head/sys/dev/sound/pcm/channel.c ============================================================================== --- head/sys/dev/sound/pcm/channel.c Thu Jan 15 15:32:30 2015 (r277213) +++ head/sys/dev/sound/pcm/channel.c Thu Jan 15 16:09:35 2015 (r277214) @@ -92,7 +92,7 @@ sysctl_hw_snd_latency_profile(SYSCTL_HAN } SYSCTL_PROC(_hw_snd, OID_AUTO, latency_profile, CTLTYPE_INT | CTLFLAG_RW, 0, sizeof(int), sysctl_hw_snd_latency_profile, "I", - "buffering latency profile (0=aggresive 1=safe)"); + "buffering latency profile (0=aggressive 1=safe)"); static int chn_timeout = CHN_TIMEOUT; TUNABLE_INT("hw.snd.timeout", &chn_timeout); From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 16:20:50 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 3813C782; Thu, 15 Jan 2015 16:20:50 +0000 (UTC) Date: Thu, 15 Jan 2015 16:20:50 +0000 From: Alexey Dokuchaev To: John Baldwin Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150115162050.GA60729@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <54B7E21B.5080008@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7E21B.5080008@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, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:20:50 -0000 On Thu, Jan 15, 2015 at 10:51:55AM -0500, John Baldwin wrote: > > [...] > > +# Pseudo devices. > > +device loop # Network loopback > > +device random # Entropy device > > +device padlock_rng # VIA Padlock RNG > > +device rdrand_rng # Intel Bull Mountain RNG > > +device ether # Ethernet support > > +device vlan # 802.1Q VLAN support > > +device tun # Packet tunnel. > > +device gif # IPv6 and IPv4 tunneling > > These last three definitely work as modules. (vlan(4) was only recently > added to GENERIC). And many other things as well (like SYSV* for example). I usually go as far as nodevice'ing io and mem, FWIW. That said, if we supply reference MINIMAL, it should *really* be minimal. And it should not be limited to amd64; lest we forget, our primary target should still be i386. ./danfe From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 16:21:07 2015 Return-Path: Delivered-To: svn-src-head@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 8EB8B9B3; Thu, 15 Jan 2015 16:21:07 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70C7EA17; Thu, 15 Jan 2015 16:21:07 +0000 (UTC) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0FGKwO0024380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Jan 2015 08:20:59 -0800 Message-ID: <54B7E8EA.1090509@freebsd.org> Date: Thu, 15 Jan 2015 08:20:58 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Warner Losh , Justin Hibbits Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> In-Reply-To: <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Sonic-CAuth: UmFuZG9tSVaUfNc+hTFWMHsdz3byJ7Z1gOFRNkFpEIF/SzlseXvpWYXEp9XP2inW8Gq/2wvtnad6unUFbMGMS6B0rVQscu1lXxwuCtsvyfA= X-Sonic-ID: C;OMVSfdKc5BGnKtmh1eMT4g== M;vBWwfdKc5BGnKtmh1eMT4g== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:21:07 -0000 On 01/14/15 16:07, Warner Losh wrote: >> On Jan 14, 2015, at 8:32 AM, Justin Hibbits wrote: >> >> On Wed, 14 Jan 2015 09:23:05 -0500 >> John Baldwin wrote: >> >>> On 1/14/15 12:41 AM, Warner Losh wrote: >>>> Author: imp >>>> Date: Wed Jan 14 05:41:31 2015 >>>> New Revision: 277163 >>>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>> >>>> Log: >>>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>>> since it's a total crap shoot if things will work. >>> Should we just make it a #error instead? (Some day I hope to have >>> NEW_PCIB enabled by default and remove the old code. Will take a >>> while to get there for the generic PCI code, but cardbus is probably >>> only used on x86 so that would be fine.) >>> >> Also powerpc, but NEW_PCIB is default there as well. > PowerPC doesn’t seem to defined the bus number resources. > > Warner > Which ones? -Nathan From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 16:27:25 2015 Return-Path: Delivered-To: svn-src-head@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 F1879B65; Thu, 15 Jan 2015 16:27: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 DA395A63; Thu, 15 Jan 2015 16:27: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 t0FGROE0062460; Thu, 15 Jan 2015 16:27:24 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FGRLY2062439; Thu, 15 Jan 2015 16:27:21 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201501151627.t0FGRLY2062439@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Thu, 15 Jan 2015 16:27:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277215 - in head/sys: amd64/include boot/common boot/fdt boot/forth boot/i386/libi386 boot/i386/loader i386/include x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 16:27:25 -0000 Author: royger Date: Thu Jan 15 16:27:20 2015 New Revision: 277215 URL: https://svnweb.freebsd.org/changeset/base/277215 Log: loader: implement multiboot support for Xen Dom0 Implement a subset of the multiboot specification in order to boot Xen and a FreeBSD Dom0 from the FreeBSD bootloader. This multiboot implementation is tailored to boot Xen and FreeBSD Dom0, and it will most surely fail to boot any other multiboot compilant kernel. In order to detect and boot the Xen microkernel, two new file formats are added to the bootloader, multiboot and multiboot_obj. Multiboot support must be tested before regular ELF support, since Xen is a multiboot kernel that also uses ELF. After a multiboot kernel is detected, all the other loaded kernels/modules are parsed by the multiboot_obj format. The layout of the loaded objects in memory is the following; first the Xen kernel is loaded as a 32bit ELF into memory (Xen will switch to long mode by itself), after that the FreeBSD kernel is loaded as a RAW file (Xen will parse and load it using it's internal ELF loader), and finally the metadata and the modules are loaded using the native FreeBSD way. After everything is loaded we jump into Xen's entry point using a small trampoline. The order of the multiboot modules passed to Xen is the following, the first module is the RAW FreeBSD kernel, and the second module is the metadata and the FreeBSD modules. Since Xen will relocate the memory position of the second multiboot module (the one that contains the metadata and native FreeBSD modules), we need to stash the original modulep address inside of the metadata itself in order to recalculate its position once booted. This also means the metadata must come before the loaded modules, so after loading the FreeBSD kernel a portion of memory is reserved in order to place the metadata before booting. In order to tell the loader to boot Xen and then the FreeBSD kernel the following has to be added to the /boot/loader.conf file: xen_cmdline="dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga" xen_kernel="/boot/xen" The first argument contains the command line that will be passed to the Xen kernel, while the second argument is the path to the Xen kernel itself. This can also be done manually from the loader command line, by for example typing the following set of commands: OK unload OK load /boot/xen dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga OK load kernel OK load zfs OK load if_tap OK load ... OK boot Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D517 For the Forth bits: Submitted by: Julien Grall Added: head/sys/boot/i386/libi386/multiboot.c (contents, props changed) head/sys/boot/i386/libi386/multiboot.h (contents, props changed) head/sys/boot/i386/libi386/multiboot_tramp.S (contents, props changed) Modified: head/sys/amd64/include/metadata.h head/sys/boot/common/bootstrap.h head/sys/boot/common/load_elf.c head/sys/boot/common/load_elf_obj.c head/sys/boot/common/module.c head/sys/boot/fdt/fdt_loader_cmd.c head/sys/boot/forth/beastie.4th head/sys/boot/forth/loader.4th head/sys/boot/forth/support.4th head/sys/boot/i386/libi386/Makefile head/sys/boot/i386/libi386/bootinfo64.c head/sys/boot/i386/libi386/elf64_freebsd.c head/sys/boot/i386/libi386/libi386.h head/sys/boot/i386/loader/conf.c head/sys/i386/include/metadata.h head/sys/x86/xen/pv.c Modified: head/sys/amd64/include/metadata.h ============================================================================== --- head/sys/amd64/include/metadata.h Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/amd64/include/metadata.h Thu Jan 15 16:27:20 2015 (r277215) @@ -34,6 +34,7 @@ #define MODINFOMD_DTBP 0x1003 #define MODINFOMD_EFI_MAP 0x1004 #define MODINFOMD_EFI_FB 0x1005 +#define MODINFOMD_MODULEP 0x1006 struct efi_map_header { size_t memory_size; Modified: head/sys/boot/common/bootstrap.h ============================================================================== --- head/sys/boot/common/bootstrap.h Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/bootstrap.h Thu Jan 15 16:27:20 2015 (r277215) @@ -232,9 +232,9 @@ int mod_loadkld(const char *name, int void unload(void); struct preloaded_file *file_alloc(void); -struct preloaded_file *file_findfile(char *name, char *type); +struct preloaded_file *file_findfile(const char *name, const char *type); struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type); -struct preloaded_file *file_loadraw(char *name, char *type); +struct preloaded_file *file_loadraw(char *name, char *type, int insert); void file_discard(struct preloaded_file *fp); void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p); int file_addmodule(struct preloaded_file *fp, char *modname, int version, @@ -258,6 +258,9 @@ int __elfN(obj_loadfile)(char *filename, int __elfN(reloc)(struct elf_file *ef, symaddr_fn *symaddr, const void *reldata, int reltype, Elf_Addr relbase, Elf_Addr dataaddr, void *data, size_t len); +int __elfN(loadfile_raw)(char *filename, u_int64_t dest, + struct preloaded_file **result, int multiboot); +int __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest); #endif /* Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/load_elf.c Thu Jan 15 16:27:20 2015 (r277215) @@ -76,7 +76,8 @@ static int __elfN(loadimage)(struct prel static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const char* name, Elf_Sym* sym); static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); -static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef); +static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, + u_int64_t p_start, u_int64_t p_end); static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); @@ -85,6 +86,61 @@ const char *__elfN(moduletype) = "elf mo u_int64_t __elfN(relocation_offset) = 0; +static int +__elfN(load_elf_header)(char *filename, elf_file_t ef) +{ + ssize_t bytes_read; + Elf_Ehdr *ehdr; + int err; + + /* + * Open the image, read and validate the ELF header + */ + if (filename == NULL) /* can't handle nameless */ + return (EFTYPE); + if ((ef->fd = open(filename, O_RDONLY)) == -1) + return (errno); + ef->firstpage = malloc(PAGE_SIZE); + if (ef->firstpage == NULL) { + close(ef->fd); + return (ENOMEM); + } + bytes_read = read(ef->fd, ef->firstpage, PAGE_SIZE); + ef->firstlen = (size_t)bytes_read; + if (bytes_read < 0 || ef->firstlen <= sizeof(Elf_Ehdr)) { + err = EFTYPE; /* could be EIO, but may be small file */ + goto error; + } + ehdr = ef->ehdr = (Elf_Ehdr *)ef->firstpage; + + /* Is it ELF? */ + if (!IS_ELF(*ehdr)) { + err = EFTYPE; + goto error; + } + if (ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || /* Layout ? */ + ehdr->e_ident[EI_DATA] != ELF_TARG_DATA || + ehdr->e_ident[EI_VERSION] != EV_CURRENT || /* Version ? */ + ehdr->e_version != EV_CURRENT || + ehdr->e_machine != ELF_TARG_MACH) { /* Machine ? */ + err = EFTYPE; + goto error; + } + + return (0); + +error: + if (ef->firstpage != NULL) { + free(ef->firstpage); + ef->firstpage = NULL; + } + if (ef->fd != -1) { + close(ef->fd); + ef->fd = -1; + } + return (err); +} + /* * Attempt to load the file (file) as an ELF module. It will be stored at * (dest), and a pointer to a module structure describing the loaded object @@ -93,56 +149,39 @@ u_int64_t __elfN(relocation_offset) = 0; int __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result) { + return (__elfN(loadfile_raw)(filename, dest, result, 0)); +} + +int +__elfN(loadfile_raw)(char *filename, u_int64_t dest, + struct preloaded_file **result, int multiboot) +{ struct preloaded_file *fp, *kfp; struct elf_file ef; Elf_Ehdr *ehdr; int err; - ssize_t bytes_read; fp = NULL; bzero(&ef, sizeof(struct elf_file)); + ef.fd = -1; - /* - * Open the image, read and validate the ELF header - */ - if (filename == NULL) /* can't handle nameless */ - return(EFTYPE); - if ((ef.fd = open(filename, O_RDONLY)) == -1) - return(errno); - ef.firstpage = malloc(PAGE_SIZE); - if (ef.firstpage == NULL) { - close(ef.fd); - return(ENOMEM); - } - bytes_read = read(ef.fd, ef.firstpage, PAGE_SIZE); - ef.firstlen = (size_t)bytes_read; - if (bytes_read < 0 || ef.firstlen <= sizeof(Elf_Ehdr)) { - err = EFTYPE; /* could be EIO, but may be small file */ - goto oerr; - } - ehdr = ef.ehdr = (Elf_Ehdr *)ef.firstpage; - - /* Is it ELF? */ - if (!IS_ELF(*ehdr)) { - err = EFTYPE; - goto oerr; - } - if (ehdr->e_ident[EI_CLASS] != ELF_TARG_CLASS || /* Layout ? */ - ehdr->e_ident[EI_DATA] != ELF_TARG_DATA || - ehdr->e_ident[EI_VERSION] != EV_CURRENT || /* Version ? */ - ehdr->e_version != EV_CURRENT || - ehdr->e_machine != ELF_TARG_MACH) { /* Machine ? */ - err = EFTYPE; - goto oerr; - } + err = __elfN(load_elf_header)(filename, &ef); + if (err != 0) + return (err); + ehdr = ef.ehdr; /* * Check to see what sort of module we are. */ - kfp = file_findfile(NULL, NULL); + kfp = file_findfile(NULL, __elfN(kerneltype)); if (ehdr->e_type == ET_DYN) { /* Looks like a kld module */ + if (multiboot != 0) { + printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: can't load module as multiboot\n"); + err = EPERM; + goto oerr; + } if (kfp == NULL) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_loadfile: can't load module before kernel\n"); err = EPERM; @@ -193,10 +232,14 @@ __elfN(loadfile)(char *filename, u_int64 err = EPERM; goto out; } - if (ef.kernel) + if (ef.kernel == 1 && multiboot == 0) setenv("kernelname", filename, 1); fp->f_name = strdup(filename); - fp->f_type = strdup(ef.kernel ? __elfN(kerneltype) : __elfN(moduletype)); + if (multiboot == 0) + fp->f_type = strdup(ef.kernel ? + __elfN(kerneltype) : __elfN(moduletype)); + else + fp->f_type = strdup("elf multiboot kernel"); #ifdef ELF_VERBOSE if (ef.kernel) @@ -224,7 +267,8 @@ __elfN(loadfile)(char *filename, u_int64 out: if (ef.firstpage) free(ef.firstpage); - close(ef.fd); + if (ef.fd != -1) + close(ef.fd); return(err); } @@ -255,6 +299,8 @@ __elfN(loadimage)(struct preloaded_file int symtabindex; Elf_Size size; u_int fpcopy; + Elf_Sym sym; + u_int64_t p_start, p_end; dp = NULL; shdr = NULL; @@ -587,7 +633,15 @@ nosyms: COPYOUT(ef->hashtab + 1, &ef->nchains, sizeof(ef->nchains)); ef->buckets = ef->hashtab + 2; ef->chains = ef->buckets + ef->nbuckets; - if (__elfN(parse_modmetadata)(fp, ef) == 0) + + if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0) + return 0; + p_start = sym.st_value + ef->off; + if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0) + return ENOENT; + p_end = sym.st_value + ef->off; + + if (__elfN(parse_modmetadata)(fp, ef, p_start, p_end) == 0) goto out; if (ef->kernel) /* kernel must not depend on anything */ @@ -650,7 +704,123 @@ struct mod_metadata32 { #endif int -__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef) +__elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest) +{ + struct elf_file ef; + int err, i, j; + Elf_Shdr *sh_meta, *shdr = NULL; + Elf_Shdr *sh_data[2]; + char *shstrtab = NULL; + size_t size; + u_int64_t p_start, p_end; + + bzero(&ef, sizeof(struct elf_file)); + ef.fd = -1; + + err = __elfN(load_elf_header)(fp->f_name, &ef); + if (err != 0) + goto out; + + if (ef.ehdr->e_type == ET_EXEC) { + ef.kernel = 1; + } else if (ef.ehdr->e_type != ET_DYN) { + err = EFTYPE; + goto out; + } + + size = ef.ehdr->e_shnum * ef.ehdr->e_shentsize; + shdr = alloc_pread(ef.fd, ef.ehdr->e_shoff, size); + if (shdr == NULL) { + err = ENOMEM; + goto out; + } + + /* Load shstrtab. */ + shstrtab = alloc_pread(ef.fd, shdr[ef.ehdr->e_shstrndx].sh_offset, + shdr[ef.ehdr->e_shstrndx].sh_size); + if (shstrtab == NULL) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load shstrtab\n"); + err = EFTYPE; + goto out; + } + + /* Find set_modmetadata_set and data sections. */ + sh_data[0] = sh_data[1] = sh_meta = NULL; + for (i = 0, j = 0; i < ef.ehdr->e_shnum; i++) { + if (strcmp(&shstrtab[shdr[i].sh_name], + "set_modmetadata_set") == 0) { + sh_meta = &shdr[i]; + } + if ((strcmp(&shstrtab[shdr[i].sh_name], ".data") == 0) || + (strcmp(&shstrtab[shdr[i].sh_name], ".rodata") == 0)) { + sh_data[j++] = &shdr[i]; + } + } + if (sh_meta == NULL || sh_data[0] == NULL || sh_data[1] == NULL) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to find set_modmetadata_set or data sections\n"); + err = EFTYPE; + goto out; + } + + /* Load set_modmetadata_set into memory */ + err = kern_pread(ef.fd, dest, sh_meta->sh_size, sh_meta->sh_offset); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load set_modmetadata_set: %d\n", err); + goto out; + } + p_start = dest; + p_end = dest + sh_meta->sh_size; + dest += sh_meta->sh_size; + + /* Load data sections into memory. */ + err = kern_pread(ef.fd, dest, sh_data[0]->sh_size, + sh_data[0]->sh_offset); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load data: %d\n", err); + goto out; + } + + /* + * We have to increment the dest, so that the offset is the same into + * both the .rodata and .data sections. + */ + ef.off = -(sh_data[0]->sh_addr - dest); + dest += (sh_data[1]->sh_addr - sh_data[0]->sh_addr); + + err = kern_pread(ef.fd, dest, sh_data[1]->sh_size, + sh_data[1]->sh_offset); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to load data: %d\n", err); + goto out; + } + + err = __elfN(parse_modmetadata)(fp, &ef, p_start, p_end); + if (err != 0) { + printf("\nelf" __XSTRING(__ELF_WORD_SIZE) + "load_modmetadata: unable to parse metadata: %d\n", err); + goto out; + } + +out: + if (shstrtab != NULL) + free(shstrtab); + if (shdr != NULL) + free(shdr); + if (ef.firstpage != NULL) + free(ef.firstpage); + if (ef.fd != -1) + close(ef.fd); + return (err); +} + +int +__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, + u_int64_t p_start, u_int64_t p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 @@ -660,20 +830,13 @@ __elfN(parse_modmetadata)(struct preload #endif struct mod_depend *mdepend; struct mod_version mver; - Elf_Sym sym; char *s; int error, modcnt, minfolen; - Elf_Addr v, p, p_stop; - - if (__elfN(lookup_symbol)(fp, ef, "__start_set_modmetadata_set", &sym) != 0) - return 0; - p = sym.st_value + ef->off; - if (__elfN(lookup_symbol)(fp, ef, "__stop_set_modmetadata_set", &sym) != 0) - return ENOENT; - p_stop = sym.st_value + ef->off; + Elf_Addr v, p; modcnt = 0; - while (p < p_stop) { + p = p_start; + while (p < p_end) { COPYOUT(p, &v, sizeof(v)); error = __elfN(reloc_ptr)(fp, ef, p, &v, sizeof(v)); if (error == EOPNOTSUPP) Modified: head/sys/boot/common/load_elf_obj.c ============================================================================== --- head/sys/boot/common/load_elf_obj.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/load_elf_obj.c Thu Jan 15 16:27:20 2015 (r277215) @@ -129,20 +129,13 @@ __elfN(obj_loadfile)(char *filename, u_i goto oerr; } - kfp = file_findfile(NULL, NULL); + kfp = file_findfile(NULL, __elfN(obj_kerneltype)); if (kfp == NULL) { printf("elf" __XSTRING(__ELF_WORD_SIZE) "_obj_loadfile: can't load module before kernel\n"); err = EPERM; goto oerr; } - if (strcmp(__elfN(obj_kerneltype), kfp->f_type)) { - printf("elf" __XSTRING(__ELF_WORD_SIZE) - "_obj_loadfile: can't load module with kernel type '%s'\n", - kfp->f_type); - err = EPERM; - goto oerr; - } if (archsw.arch_loadaddr != NULL) dest = archsw.arch_loadaddr(LOAD_ELF, hdr, dest); Modified: head/sys/boot/common/module.c ============================================================================== --- head/sys/boot/common/module.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/common/module.c Thu Jan 15 16:27:20 2015 (r277215) @@ -139,7 +139,7 @@ command_load(int argc, char *argv[]) command_errmsg = "invalid load type"; return(CMD_ERROR); } - return(file_loadraw(argv[1], typestr) ? CMD_OK : CMD_ERROR); + return (file_loadraw(argv[1], typestr, 1) ? CMD_OK : CMD_ERROR); } /* * Do we have explicit KLD load ? @@ -194,7 +194,7 @@ command_load_geli(int argc, char *argv[] argv += (optind - 1); argc -= (optind - 1); sprintf(typestr, "%s:geli_keyfile%d", argv[1], num); - return(file_loadraw(argv[2], typestr) ? CMD_OK : CMD_ERROR); + return (file_loadraw(argv[2], typestr, 1) ? CMD_OK : CMD_ERROR); } void @@ -371,7 +371,7 @@ file_load_dependencies(struct preloaded_ * no arguments or anything. */ struct preloaded_file * -file_loadraw(char *name, char *type) +file_loadraw(char *name, char *type, int insert) { struct preloaded_file *fp; char *cp; @@ -434,7 +434,8 @@ file_loadraw(char *name, char *type) loadaddr = laddr; /* Add to the list of loaded files */ - file_insert_tail(fp); + if (insert != 0) + file_insert_tail(fp); close(fd); return(fp); } @@ -537,7 +538,7 @@ mod_loadkld(const char *kldname, int arg * NULL may be passed as a wildcard to either. */ struct preloaded_file * -file_findfile(char *name, char *type) +file_findfile(const char *name, const char *type) { struct preloaded_file *fp; Modified: head/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- head/sys/boot/fdt/fdt_loader_cmd.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/fdt/fdt_loader_cmd.c Thu Jan 15 16:27:20 2015 (r277215) @@ -261,7 +261,7 @@ fdt_load_dtb_file(const char * filename) oldbfp = file_findfile(NULL, "dtb"); /* Attempt to load and validate a new dtb from a file. */ - if ((bfp = file_loadraw(filename, "dtb")) == NULL) { + if ((bfp = file_loadraw(filename, "dtb", 1)) == NULL) { sprintf(command_errbuf, "failed to load file '%s'", filename); return (1); } Modified: head/sys/boot/forth/beastie.4th ============================================================================== --- head/sys/boot/forth/beastie.4th Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/forth/beastie.4th Thu Jan 15 16:27:20 2015 (r277215) @@ -251,6 +251,7 @@ variable logoY dup -1 <> if s" YES" compare-insensitive 0= if any_conf_read? if + load_xen_throw load_kernel load_modules then Modified: head/sys/boot/forth/loader.4th ============================================================================== --- head/sys/boot/forth/loader.4th Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/forth/loader.4th Thu Jan 15 16:27:20 2015 (r277215) @@ -143,13 +143,14 @@ include /boot/check-password.4th \ was succesfully loaded! any_conf_read? if s" loader_delay" getenv -1 = if + load_xen_throw load_kernel load_modules else drop ." Loading Kernel and Modules (Ctrl-C to Abort)" cr s" also support-functions" evaluate - s" set delay_command='load_kernel load_modules'" evaluate + s" set delay_command='load_xen_throw load_kernel load_modules'" evaluate s" set delay_showdots" evaluate delay_execute then Modified: head/sys/boot/forth/support.4th ============================================================================== --- head/sys/boot/forth/support.4th Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/forth/support.4th Thu Jan 15 16:27:20 2015 (r277215) @@ -1437,6 +1437,20 @@ also builtins abort" Unable to load a kernel!" ; +: load_xen ( -- ) + s" xen_kernel" getenv dup -1 <> if + 1 1 load + else + drop + 0 + then +; + +: load_xen_throw ( -- ) ( throws: abort ) + load_xen + abort" Unable to load Xen!" +; + : set_defaultoptions ( -- ) s" kernel_options" getenv dup -1 = if drop @@ -1555,12 +1569,15 @@ also builtins else drop then - r> if ( a path was passed ) - load_directory_or_file - else - standard_kernel_search + load_xen + ?dup 0= if ( success ) + r> if ( a path was passed ) + load_directory_or_file + else + standard_kernel_search + then + ?dup 0= if ['] load_modules catch then then - ?dup 0= if ['] load_modules catch then ; \ Go back to straight forth vocabulary Modified: head/sys/boot/i386/libi386/Makefile ============================================================================== --- head/sys/boot/i386/libi386/Makefile Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/Makefile Thu Jan 15 16:27:20 2015 (r277215) @@ -6,7 +6,7 @@ INTERNALLIB= SRCS= biosacpi.c bioscd.c biosdisk.c biosmem.c biospnp.c \ biospci.c biossmap.c bootinfo.c bootinfo32.c bootinfo64.c \ comconsole.c devicename.c elf32_freebsd.c \ - elf64_freebsd.c \ + elf64_freebsd.c multiboot.c multiboot_tramp.S \ i386_copy.c i386_module.c nullconsole.c pxe.c pxetramp.s \ smbios.c time.c vidconsole.c amd64_tramp.S spinconsole.c .PATH: ${.CURDIR}/../../zfs @@ -68,6 +68,7 @@ machine: # XXX: clang integrated-as doesn't grok .codeNN directives yet CFLAGS.amd64_tramp.S= ${CLANG_NO_IAS} +CFLAGS.multiboot_tramp.S= ${CLANG_NO_IAS} CFLAGS+= ${CFLAGS.${.IMPSRC:T}} .if ${MACHINE_CPUARCH} == "amd64" Modified: head/sys/boot/i386/libi386/bootinfo64.c ============================================================================== --- head/sys/boot/i386/libi386/bootinfo64.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/bootinfo64.c Thu Jan 15 16:27:20 2015 (r277215) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include "bootstrap.h" @@ -176,12 +177,12 @@ bi_checkcpu(void) * - Module metadata are formatted and placed in kernel space. */ int -bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernendp) +bi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep, + vm_offset_t *kernendp, int add_smap) { struct preloaded_file *xp, *kfp; struct i386_devdesc *rootdev; struct file_metadata *md; - vm_offset_t addr; u_int64_t kernend; u_int64_t envp; vm_offset_t size; @@ -210,21 +211,18 @@ bi_load64(char *args, vm_offset_t *modul /* Try reading the /etc/fstab file to select the root device */ getrootmount(i386_fmtdev((void *)rootdev)); - /* find the last module in the chain */ - addr = 0; - for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { - if (addr < (xp->f_addr + xp->f_size)) - addr = xp->f_addr + xp->f_size; + if (addr == 0) { + /* find the last module in the chain */ + for (xp = file_findfile(NULL, NULL); xp != NULL; xp = xp->f_next) { + if (addr < (xp->f_addr + xp->f_size)) + addr = xp->f_addr + xp->f_size; + } } /* pad to a page boundary */ addr = roundup(addr, PAGE_SIZE); - /* copy our environment */ - envp = addr; - addr = bi_copyenv(addr); - - /* pad to a page boundary */ - addr = roundup(addr, PAGE_SIZE); + /* place the metadata before anything */ + *modulep = addr; kfp = file_findfile(NULL, "elf kernel"); if (kfp == NULL) @@ -235,20 +233,30 @@ bi_load64(char *args, vm_offset_t *modul file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); - bios_addsmapdata(kfp); + file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof modulep, modulep); + if (add_smap != 0) + bios_addsmapdata(kfp); - /* Figure out the size and location of the metadata */ - *modulep = addr; size = bi_copymodules64(0); - kernend = roundup(addr + size, PAGE_SIZE); + + /* copy our environment */ + envp = roundup(addr + size, PAGE_SIZE); + addr = bi_copyenv(envp); + + /* set kernend */ + kernend = roundup(addr, PAGE_SIZE); *kernendp = kernend; /* patch MODINFOMD_KERNEND */ md = file_findmetadata(kfp, MODINFOMD_KERNEND); bcopy(&kernend, md->md_data, sizeof kernend); + /* patch MODINFOMD_ENVP */ + md = file_findmetadata(kfp, MODINFOMD_ENVP); + bcopy(&envp, md->md_data, sizeof envp); + /* copy module list and metadata */ - (void)bi_copymodules64(addr); + (void)bi_copymodules64(*modulep); return(0); } Modified: head/sys/boot/i386/libi386/elf64_freebsd.c ============================================================================== --- head/sys/boot/i386/libi386/elf64_freebsd.c Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/elf64_freebsd.c Thu Jan 15 16:27:20 2015 (r277215) @@ -81,7 +81,7 @@ elf64_exec(struct preloaded_file *fp) return(EFTYPE); ehdr = (Elf_Ehdr *)&(md->md_data); - err = bi_load64(fp->f_args, &modulep, &kernend); + err = bi_load64(fp->f_args, 0, &modulep, &kernend, 1); if (err != 0) return(err); Modified: head/sys/boot/i386/libi386/libi386.h ============================================================================== --- head/sys/boot/i386/libi386/libi386.h Thu Jan 15 16:09:35 2015 (r277214) +++ head/sys/boot/i386/libi386/libi386.h Thu Jan 15 16:27:20 2015 (r277215) @@ -122,7 +122,8 @@ void bi_setboothowto(int howto); vm_offset_t bi_copyenv(vm_offset_t addr); int bi_load32(char *args, int *howtop, int *bootdevp, vm_offset_t *bip, vm_offset_t *modulep, vm_offset_t *kernend); -int bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernend); +int bi_load64(char *args, vm_offset_t addr, vm_offset_t *modulep, + vm_offset_t *kernend, int add_smap); char *pxe_default_rc(void); void pxe_enable(void *pxeinfo); Added: head/sys/boot/i386/libi386/multiboot.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/i386/libi386/multiboot.c Thu Jan 15 16:27:20 2015 (r277215) @@ -0,0 +1,418 @@ +/*- + * Copyright (c) 2014 Roger Pau Monné + * 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. + */ + +/* + * This multiboot implementation only implements a subset of the full + * multiboot specification in order to be able to boot Xen and a + * FreeBSD Dom0. Trying to use it to boot other multiboot compliant + * kernels will most surely fail. + * + * The full multiboot specification can be found here: + * http://www.gnu.org/software/grub/manual/multiboot/multiboot.html + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#define _MACHINE_ELF_WANT_32BIT +#include +#include +#include + +#include "bootstrap.h" +#include "multiboot.h" +#include "../i386/libi386/libi386.h" +#include "../i386/btx/lib/btxv86.h" + +#define MULTIBOOT_SUPPORTED_FLAGS \ + (MULTIBOOT_PAGE_ALIGN|MULTIBOOT_MEMORY_INFO) +#define NUM_MODULES 2 +#define METADATA_FIXED_SIZE (PAGE_SIZE*4) +#define METADATA_MODULE_SIZE PAGE_SIZE + +#define METADATA_RESV_SIZE(mod_num) \ + roundup(METADATA_FIXED_SIZE + METADATA_MODULE_SIZE * mod_num, PAGE_SIZE) + +extern int elf32_loadfile_raw(char *filename, u_int64_t dest, + struct preloaded_file **result, int multiboot); +extern int elf64_load_modmetadata(struct preloaded_file *fp, u_int64_t dest); +extern int elf64_obj_loadfile(char *filename, u_int64_t dest, + struct preloaded_file **result); + +static int multiboot_loadfile(char *, u_int64_t, struct preloaded_file **); +static int multiboot_exec(struct preloaded_file *); + +static int multiboot_obj_loadfile(char *, u_int64_t, struct preloaded_file **); +static int multiboot_obj_exec(struct preloaded_file *fp); + +struct file_format multiboot = { multiboot_loadfile, multiboot_exec }; +struct file_format multiboot_obj = + { multiboot_obj_loadfile, multiboot_obj_exec }; + +extern void multiboot_tramp(); + +static const char mbl_name[] = "FreeBSD Loader"; + +static int +num_modules(struct preloaded_file *kfp) +{ + struct kernel_module *kmp; + int mod_num = 0; + + for (kmp = kfp->f_modules; kmp != NULL; kmp = kmp->m_next) + mod_num++; + + return (mod_num); +} + +static vm_offset_t +max_addr(void) +{ + struct preloaded_file *fp; + vm_offset_t addr = 0; + + for (fp = file_findfile(NULL, NULL); fp != NULL; fp = fp->f_next) { + if (addr < (fp->f_addr + fp->f_size)) + addr = fp->f_addr + fp->f_size; + } + + return (addr); +} + +static int +multiboot_loadfile(char *filename, u_int64_t dest, + struct preloaded_file **result) +{ + uint32_t *magic; + int i, error; + caddr_t header_search; + ssize_t search_size; + int fd; + struct multiboot_header *header; + char *cmdline; + + /* + * Read MULTIBOOT_SEARCH size in order to search for the + * multiboot magic header. + */ + if (filename == NULL) + return (EFTYPE); + if ((fd = open(filename, O_RDONLY)) == -1) + return (errno); + header_search = malloc(MULTIBOOT_SEARCH); + if (header_search == NULL) { + close(fd); + return (ENOMEM); + } + search_size = read(fd, header_search, MULTIBOOT_SEARCH); + magic = (uint32_t *)header_search; + + header = NULL; + for (i = 0; i < (search_size / sizeof(uint32_t)); i++) { + if (magic[i] == MULTIBOOT_HEADER_MAGIC) { + header = (struct multiboot_header *)&magic[i]; + break; + } + } + + if (header == NULL) { + error = EFTYPE; + goto out; + } + + /* Valid multiboot header has been found, validate checksum */ + if (header->magic + header->flags + header->checksum != 0) { + printf( + "Multiboot checksum failed, magic: 0x%x flags: 0x%x checksum: 0x%x\n", + header->magic, header->flags, header->checksum); + error = EFTYPE; + goto out; + } + + if ((header->flags & ~MULTIBOOT_SUPPORTED_FLAGS) != 0) { + printf("Unsupported multiboot flags found: 0x%x\n", + header->flags); + error = EFTYPE; + goto out; + } + + error = elf32_loadfile_raw(filename, dest, result, 1); + if (error != 0) { + printf( + "elf32_loadfile_raw failed: %d unable to load multiboot kernel\n", + error); + goto out; + } + + /* + * f_addr is already aligned to PAGE_SIZE, make sure + * f_size it's also aligned so when the modules are loaded + * they are aligned to PAGE_SIZE. + */ + (*result)->f_size = roundup((*result)->f_size, PAGE_SIZE); + +out: + free(header_search); + close(fd); + return (error); +} + +static int +multiboot_exec(struct preloaded_file *fp) +{ + vm_offset_t module_start, last_addr, metadata_size; + vm_offset_t modulep, kernend, entry; + struct file_metadata *md; + Elf_Ehdr *ehdr; + struct multiboot_info *mb_info = NULL; + struct multiboot_mod_list *mb_mod = NULL; + char *cmdline = NULL; + size_t len; + int error, mod_num; + + /* + * Don't pass the memory size found by the bootloader, the memory + * available to Dom0 will be lower than that. + */ + unsetenv("smbios.memory.enabled"); + + /* Allocate the multiboot struct and fill the basic details. */ + mb_info = malloc(sizeof(struct multiboot_info)); + if (mb_info == NULL) { + error = ENOMEM; + goto error; + } + bzero(mb_info, sizeof(struct multiboot_info)); + mb_info->flags = MULTIBOOT_INFO_MEMORY|MULTIBOOT_INFO_BOOT_LOADER_NAME; + mb_info->mem_lower = bios_basemem / 1024; + mb_info->mem_upper = bios_extmem / 1024; + mb_info->boot_loader_name = VTOP(mbl_name); + + /* Set the Xen command line. */ + if (fp->f_args == NULL) { + /* Add the Xen command line if it is set. */ + cmdline = getenv("xen_cmdline"); + if (cmdline != NULL) { + fp->f_args = strdup(cmdline); + if (fp->f_args == NULL) { + error = ENOMEM; + goto error; + } + } + } + if (fp->f_args != NULL) { + len = strlen(fp->f_name) + 1 + strlen(fp->f_args) + 1; + cmdline = malloc(len); + if (cmdline == NULL) { + error = ENOMEM; + goto error; + } + snprintf(cmdline, len, "%s %s", fp->f_name, fp->f_args); + mb_info->cmdline = VTOP(cmdline); + mb_info->flags |= MULTIBOOT_INFO_CMDLINE; + } + + /* Find the entry point of the Xen kernel and save it for later */ + if ((md = file_findmetadata(fp, MODINFOMD_ELFHDR)) == NULL) { + printf("Unable to find %s entry point\n", fp->f_name); + error = EFTYPE; + goto error; + } + ehdr = (Elf_Ehdr *)&(md->md_data); + entry = ehdr->e_entry & 0xffffff; + + /* + * Prepare the multiboot module list, Xen assumes the first + * module is the Dom0 kernel, and the second one is the initramfs. + * This is not optimal for FreeBSD, that doesn't have a initramfs + * but instead loads modules dynamically and creates the metadata + * info on-the-fly. + * + * As expected, the first multiboot module is going to be the + * FreeBSD kernel loaded as a raw file. The second module is going + * to contain the metadata info and the loaded modules. + * + * On native FreeBSD loads all the modules and then places the + * metadata info at the end, but this is painful when running on Xen, + * because it relocates the second multiboot module wherever it + * likes. In order to workaround this limitation the metadata + * information is placed at the start of the second module and + * the original modulep value is saved together with the other + * metadata, so we can relocate everything. + */ + fp = file_findfile(NULL, "elf kernel"); + if (fp == NULL) { + printf("No FreeBSD kernel provided, aborting\n"); + error = EFTYPE; + goto error; + } + mb_mod = malloc(sizeof(struct multiboot_mod_list) * NUM_MODULES); + + /* + * Calculate how much memory is needed for the metatdata. We did + * an approximation of the maximum size when loading the kernel, + * but now we know the exact size, so we can release some of this + * preallocated memory if not needed. + */ + last_addr = roundup(max_addr(), PAGE_SIZE); + mod_num = num_modules(fp); + + /* + * Place the metadata after the last used address in order to + * calculate it's size, this will not be used. + */ + error = bi_load64(fp->f_args, last_addr, &modulep, &kernend, 0); + if (error != 0) { + printf("bi_load64 failed: %d\n", error); + goto error; + } + metadata_size = roundup(kernend - last_addr, PAGE_SIZE); + + /* Check that the size is not greater than what we have reserved */ + if (metadata_size > METADATA_RESV_SIZE(mod_num)) { + printf("Required memory for metadata is greater than reserved " + "space, please increase METADATA_FIXED_SIZE and " + "METADATA_MODULE_SIZE and rebuild the loader\n"); + error = ENOMEM; + goto error; + } + + /* + * This is the position where the second multiboot module + * will be placed. + */ + module_start = fp->f_addr + fp->f_size - metadata_size; + + error = bi_load64(fp->f_args, module_start, &modulep, &kernend, 0); + if (error != 0) { + printf("bi_load64 failed: %d\n", error); + goto error; + } + + mb_mod[0].mod_start = fp->f_addr; + mb_mod[0].mod_end = fp->f_addr + fp->f_size; + mb_mod[0].mod_end -= METADATA_RESV_SIZE(mod_num); + + mb_mod[1].mod_start = module_start; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 17:14:34 2015 Return-Path: Delivered-To: svn-src-head@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 657C3A5F; Thu, 15 Jan 2015 17:14:34 +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 DD3A311C; Thu, 15 Jan 2015 17:14:32 +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 t0FHEUsH044332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 Jan 2015 20:14:30 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0FHEUtH044331; Thu, 15 Jan 2015 20:14:30 +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, 15 Jan 2015 20:14:30 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150115171430.GO15484@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7E566.8050601@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, sbruno@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 17:14:34 -0000 Hans, On Thu, Jan 15, 2015 at 05:05:58PM +0100, Hans Petter Selasky wrote: H> > Eh, I have not reviewed this at all. (I still plan to though.) H> H> The "Reviewed by" was simply a C&P of the review list in from the H> Differential Revision. When you mention it should probably simply have said: H> H> Reviewed by: sbruno @ H> H> Due to the meaning of "Reviewed by" in commit messages. Sorry. H> H> BTW: Nice if people respond quickly or remove themselves from the H> differential reviews if they don't plan to do any reviews. I'd dare to say that such important change simply cannot be committed with a thorough review from at least two people very confident in this area. Look at r247777. This is the way it should be done. -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 17:15:42 2015 Return-Path: Delivered-To: svn-src-head@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 344DCBCF; Thu, 15 Jan 2015 17:15:42 +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 A915E130; Thu, 15 Jan 2015 17:15:41 +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 t0FHFdnP044348 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 15 Jan 2015 20:15:39 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0FHFd5P044347; Thu, 15 Jan 2015 20:15:39 +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, 15 Jan 2015 20:15:39 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150115171539.GP15484@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> <20150115171430.GO15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115171430.GO15484@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, sbruno@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 17:15:42 -0000 On Thu, Jan 15, 2015 at 08:14:30PM +0300, Gleb Smirnoff wrote: T> I'd dare to say that such important change simply cannot be committed T> with a thorough review from at least two people very confident in this T> area. Of course, I typoed. I meant "cannot be committed withOUT a thorough review". -- Totus tuus, Glebius. From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 17:23:18 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 3CE22C4; Thu, 15 Jan 2015 17:23:18 +0000 (UTC) Date: Thu, 15 Jan 2015 17:23:18 +0000 From: Alexey Dokuchaev To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150115172318.GA86401@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7E566.8050601@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, sbruno@freebsd.org, John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 17:23:18 -0000 On Thu, Jan 15, 2015 at 05:05:58PM +0100, Hans Petter Selasky wrote: > The "Reviewed by" was simply a C&P of the review list in from the > Differential Revision. When you mention it should probably simply have said: > > Reviewed by: sbruno @ > > Due to the meaning of "Reviewed by" in commit messages. Sorry. > > BTW: Nice if people respond quickly or remove themselves from the > differential reviews if they don't plan to do any reviews. I think it's kind of wrong. Instead, lack of reviews should be treated as "lack of reviews" (and thus blocking commit), not that "people are not interested". ./danfe P.S. BTW, I still didn't receive your answer on an email I sent Jan 8th. From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 18:42:31 2015 Return-Path: Delivered-To: svn-src-head@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 C1030F25; Thu, 15 Jan 2015 18:42:31 +0000 (UTC) Received: from mail-lb0-x235.google.com (mail-lb0-x235.google.com [IPv6:2a00:1450:4010:c04::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 40971D98; Thu, 15 Jan 2015 18:42:31 +0000 (UTC) Received: by mail-lb0-f181.google.com with SMTP id u14so5309587lbd.12; Thu, 15 Jan 2015 10:42:29 -0800 (PST) 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=loCVVPThLlA4rOEcKOxqshktWqDQ3UyZYOhbHTZkQhI=; b=esbQJ7y4rn+/uo/9HIWb6VerHq7IR9adkSAKctD+x/JkAqB540tQb2WT++MUuTovjc 2pk+t6Eo14CzwwKke/8graHrCQZdG7Q+1QMkjsCEOBYJcJAFBRS3xmOoO+m28+a8ZiNT iyYxzANWnWUqMsnwwtHuTgevi83yE+VOlGY4Ns+waEOd4h8J1IjansiRCjxsAtd0GFC5 Bo3La2gd0hixyUZhZd5qpcAOW8A/aSGKBI+3YjFtoIxFx/AcP7tBdEJ86wzqIE0/SMmL 5OXK+9b3gwULOUxf0V3eBUwGx+2S3UmcSSW4/eSFftRkTzlLhKqxSs+GyHlNMHu+twHe UZ8g== MIME-Version: 1.0 X-Received: by 10.152.228.164 with SMTP id sj4mr11069065lac.98.1421347349276; Thu, 15 Jan 2015 10:42:29 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.155.4 with HTTP; Thu, 15 Jan 2015 10:42:29 -0800 (PST) In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Date: Thu, 15 Jan 2015 10:42:29 -0800 X-Google-Sender-Auth: j4JUDR-42puHouYHXdU5963KqqY Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Davide Italiano To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , pho@freebsd.org, "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:42:31 -0000 On Thu, Jan 15, 2015 at 7:32 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 > > Log: > Major callout subsystem cleanup and rewrite: I plan to review this as well -- although I didn't have time for it lately. Probably I'll be able to take a closer look during the weekend. I missed it because I'm terribly late with my backlog and I wasn't listed as reviewer so the mail didn't hit my mailbox. I think this is a huge improvement, for many reason I'll try to outline in my following review. OTOH, considering how complex is the subsystem, I would like you to take a look at Peter's (pho@) stress suite and run on that. He has an handful of scenarios that cause problems in migration an callout in general. Thanks for undertaking this, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 18:47:03 2015 Return-Path: Delivered-To: svn-src-head@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 8FEB92DC; Thu, 15 Jan 2015 18:47:03 +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 44D25DE3; Thu, 15 Jan 2015 18:47:03 +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 F25D925D3891; Thu, 15 Jan 2015 18:46:59 +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 A71EBC770B8; Thu, 15 Jan 2015 18:46:58 +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 9es7gyyaoQqV; Thu, 15 Jan 2015 18:46:57 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:643d:a68e:f059:c7ef] (unknown [IPv6:fde9:577b:c1a9:4410:643d:a68e:f059:c7ef]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 87A63C7706F; Thu, 15 Jan 2015 18:46:56 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "Bjoern A. Zeeb" In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Date: Thu, 15 Jan 2015 18:46:24 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:47:03 -0000 > On 15 Jan 2015, at 15:32 , Hans Petter Selasky = wrote: >=20 > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 >=20 > Log: > Major callout subsystem cleanup and rewrite: I see this for i386 and amd64 LINT* kernels. Is that a local problem or = did you miss something? linking kernel addr.o: In function `set_timeout': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/addr.c:(.text+0x= d37): undefined reference to `_callout_stop_safe' mad.o: In function `ib_unregister_mad_agent': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x1= ed4): undefined reference to `_callout_stop_safe' mad.o: In function `ib_mad_complete_send_wr': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x3= ea0): undefined reference to `_callout_stop_safe' cm.o: In function `ib_cm_cleanup': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/cm.c:(.text+0x40= cf): undefined reference to `_callout_stop_safe' mad_rmpp.o: In function `ib_cancel_rmpp_recvs': = /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_rmpp.c:(.tex= t+0xc2): undefined reference to `_callout_stop_safe' = mad_rmpp.o:/scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_r= mpp.c:(.text+0xe9): more undefined references to `_callout_stop_safe' = follow --- kernel --- *** [kernel] Error code 1 =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-head@FreeBSD.ORG Thu Jan 15 18:51:53 2015 Return-Path: Delivered-To: svn-src-head@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 534526DC; Thu, 15 Jan 2015 18:51:53 +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 282F3EDC; Thu, 15 Jan 2015 18:51:53 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2E09AB91F; Thu, 15 Jan 2015 13:51:51 -0500 (EST) Message-ID: <54B80C46.2010409@FreeBSD.org> Date: Thu, 15 Jan 2015 13:51:50 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Nathan Whitehorn , Warner Losh , Justin Hibbits Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> <54B7E8EA.1090509@freebsd.org> In-Reply-To: <54B7E8EA.1090509@freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 13:51:51 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:51:53 -0000 On 1/15/15 11:20 AM, Nathan Whitehorn wrote: > > On 01/14/15 16:07, Warner Losh wrote: >>> On Jan 14, 2015, at 8:32 AM, Justin Hibbits >>> wrote: >>> >>> On Wed, 14 Jan 2015 09:23:05 -0500 >>> John Baldwin wrote: >>> >>>> On 1/14/15 12:41 AM, Warner Losh wrote: >>>>> Author: imp >>>>> Date: Wed Jan 14 05:41:31 2015 >>>>> New Revision: 277163 >>>>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>>> >>>>> Log: >>>>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>>>> since it's a total crap shoot if things will work. >>>> Should we just make it a #error instead? (Some day I hope to have >>>> NEW_PCIB enabled by default and remove the old code. Will take a >>>> while to get there for the generic PCI code, but cardbus is probably >>>> only used on x86 so that would be fine.) >>>> >>> Also powerpc, but NEW_PCIB is default there as well. >> PowerPC doesn’t seem to defined the bus number resources. >> >> Warner >> > > Which ones? > -Nathan PCI_RES_BUS. https://svnweb.freebsd.org/base?view=revision&revision=261790 I misspoke about it being in the nexus. On x86 it is done in the ACPI Host-PCI bridge drivers (since those have a _SEG method to know which PCI domain/segment/hose the child bus belongs to). You could conceivably do it higher up at whatever level understands which PCI domain a given Host-PCI bridge lives in. If you only ever support a single PCI domain, you could just place it in the nexus with a hardcoded domain arg of 0 to the pci_domain_*() functions. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 18:53:44 2015 Return-Path: Delivered-To: svn-src-head@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 19CAD877; Thu, 15 Jan 2015 18:53:44 +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 E300BEF9; Thu, 15 Jan 2015 18:53:43 +0000 (UTC) Received: from new-host-2.home (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E1F41B91F; Thu, 15 Jan 2015 13:53:42 -0500 (EST) Message-ID: <54B80CB6.5030102@FreeBSD.org> Date: Thu, 15 Jan 2015 13:53:42 -0500 From: John Baldwin User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gleb Smirnoff , Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> <20150115171430.GO15484@FreeBSD.org> <20150115171539.GP15484@FreeBSD.org> In-Reply-To: <20150115171539.GP15484@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 15 Jan 2015 13:53:43 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, sbruno@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:53:44 -0000 On 1/15/15 12:15 PM, Gleb Smirnoff wrote: > On Thu, Jan 15, 2015 at 08:14:30PM +0300, Gleb Smirnoff wrote: > T> I'd dare to say that such important change simply cannot be committed > T> with a thorough review from at least two people very confident in this > T> area. > > Of course, I typoed. I meant "cannot be committed withOUT a thorough review". There is something to be said for people taking time to review things and not wanting to be held up forever. However, I think it's been a clear practice with all other changes reviewed in phabric to date that the committer only lists people in 'Reviewed by' who actually signed off on the patch, not just the list of people asked to review it. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 19:52:21 2015 Return-Path: Delivered-To: svn-src-head@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 9926A7EB; Thu, 15 Jan 2015 19:52: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 816B8804; Thu, 15 Jan 2015 19:52: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 t0FJqLFX065766; Thu, 15 Jan 2015 19:52:21 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FJqKYp065759; Thu, 15 Jan 2015 19:52:20 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501151952.t0FJqKYp065759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 15 Jan 2015 19:52:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277216 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 19:52:21 -0000 Author: gjb Date: Thu Jan 15 19:52:19 2015 New Revision: 277216 URL: https://svnweb.freebsd.org/changeset/base/277216 Log: Evaluate running userland/kernel version in daily periodic(8) run, taken from uname(1) '-U' and '-K' flags. Reviewed by: allanjude, dvl Differential Revision: https://reviews.freebsd.org/D1541 MFC after: 1 week Sponsored by: The FreeBSD Foundation Added: head/etc/periodic/daily/510.status-world-kernel (contents, props changed) Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/Makefile head/share/man/man5/periodic.conf.5 Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Thu Jan 15 16:27:20 2015 (r277215) +++ head/etc/defaults/periodic.conf Thu Jan 15 19:52:19 2015 (r277216) @@ -140,6 +140,10 @@ daily_status_ntpd_enable="NO" # Check daily_queuerun_enable="YES" # Run mail queue daily_submit_queuerun="YES" # Also submit queue +# 510.status-world-kernel +daily_status_world_kernel="YES" # Check the running + # userland/kernel version + # 800.scrub-zfs daily_scrub_zfs_enable="NO" daily_scrub_zfs_pools="" # empty string selects all pools Added: head/etc/periodic/daily/510.status-world-kernel ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/daily/510.status-world-kernel Thu Jan 15 19:52:19 2015 (r277216) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Check that the running userland and kernel versions are in sync. + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_world_kernel" in + [Yy][Ee][Ss]) + rc=0 + _U=$(/usr/bin/uname -U 2>/dev/null) + _K=$(/usr/bin/uname -K 2>/dev/null) + [ -z "${_U}" -o -z "${_K}" ] && exit 0 + echo "" + echo "Checking userland and kernel versions:" + if [ "${_U}" != "${_K}" ]; then + echo "Userland and kernel are not in sync" + echo "Userland version: ${_U}" + echo "Kernel version: ${_K}" + rc=1 + else + echo "Userland and kernel are in sync." + fi + ;; + + *) rc=0;; +esac + +exit $rc Modified: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Thu Jan 15 16:27:20 2015 (r277215) +++ head/etc/periodic/daily/Makefile Thu Jan 15 19:52:19 2015 (r277216) @@ -16,6 +16,7 @@ FILES= 100.clean-disks \ 409.status-gconcat \ 420.status-network \ 450.status-security \ + 510.status-world-kernel \ 999.local # NB: keep these sorted by MK_* knobs Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Thu Jan 15 16:27:20 2015 (r277215) +++ head/share/man/man5/periodic.conf.5 Thu Jan 15 19:52:19 2015 (r277216) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd January 15, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -498,6 +498,11 @@ for yesterday's mail rejects. Set to .Dq Li YES if you want to enable NTP status check. +.It Va daily_status_world_kernel +.Pq Vt bool +Set to +.Dq Li YES +to check the running userland and kernel are in sync. .It Va daily_queuerun_enable .Pq Vt bool Set to From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 20:05:21 2015 Return-Path: Delivered-To: svn-src-head@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 9BFB8CA6; Thu, 15 Jan 2015 20:05:21 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E45C907; Thu, 15 Jan 2015 20:05:21 +0000 (UTC) Received: from aurora.physics.berkeley.edu (aurora.Physics.Berkeley.EDU [128.32.117.67]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0FK5E2d017789 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Jan 2015 12:05:14 -0800 Message-ID: <54B81D7A.6080502@freebsd.org> Date: Thu, 15 Jan 2015 12:05:14 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Baldwin , Warner Losh , Justin Hibbits Subject: Re: svn commit: r277163 - head/sys/dev/cardbus References: <201501140541.t0E5fV00070032@svn.freebsd.org> <54B67BC9.70904@FreeBSD.org> <20150114073246.74c159df@zhabar.attlocal.net> <8CB7CB29-FBFF-4850-A226-4FA5B6BF6A87@bsdimp.com> <54B7E8EA.1090509@freebsd.org> <54B80C46.2010409@FreeBSD.org> In-Reply-To: <54B80C46.2010409@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Sonic-CAuth: UmFuZG9tSVbFCVIlO5tU16luEPxvTpCUMK7Y9y8Lhe7GjHSgKfRjQby/OfAAdup1oKCU5LiY6IQMlb2SopopVMvsWZ+6d2sigeyXgJVEWTk= X-Sonic-ID: C;mEmW0fGc5BGum9mh1eMT4g== M;1iXR0fGc5BGum9mh1eMT4g== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 20:05:21 -0000 On 01/15/15 10:51, John Baldwin wrote: > On 1/15/15 11:20 AM, Nathan Whitehorn wrote: >> On 01/14/15 16:07, Warner Losh wrote: >>>> On Jan 14, 2015, at 8:32 AM, Justin Hibbits >>>> wrote: >>>> >>>> On Wed, 14 Jan 2015 09:23:05 -0500 >>>> John Baldwin wrote: >>>> >>>>> On 1/14/15 12:41 AM, Warner Losh wrote: >>>>>> Author: imp >>>>>> Date: Wed Jan 14 05:41:31 2015 >>>>>> New Revision: 277163 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/277163 >>>>>> >>>>>> Log: >>>>>> Add a rather obnoxious warning if you don't have NEW_PCIB defined >>>>>> since it's a total crap shoot if things will work. >>>>> Should we just make it a #error instead? (Some day I hope to have >>>>> NEW_PCIB enabled by default and remove the old code. Will take a >>>>> while to get there for the generic PCI code, but cardbus is probably >>>>> only used on x86 so that would be fine.) >>>>> >>>> Also powerpc, but NEW_PCIB is default there as well. >>> PowerPC doesn’t seem to defined the bus number resources. >>> >>> Warner >>> >> Which ones? >> -Nathan > PCI_RES_BUS. > > https://svnweb.freebsd.org/base?view=revision&revision=261790 > > I misspoke about it being in the nexus. On x86 it is done in the ACPI > Host-PCI bridge drivers (since those have a _SEG method to know which > PCI domain/segment/hose the child bus belongs to). You could > conceivably do it higher up at whatever level understands which PCI > domain a given Host-PCI bridge lives in. > > If you only ever support a single PCI domain, you could just place it in > the nexus with a hardcoded domain arg of 0 to the pci_domain_*() functions. > Most PPC systems have at least two and usually more PCI domains. I'll take a look at adding this. -Nathan From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 21:13:13 2015 Return-Path: Delivered-To: svn-src-head@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 44D1DBB4; Thu, 15 Jan 2015 21:13:13 +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 010D3FA3; Thu, 15 Jan 2015 21:13:12 +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 48AA81FE023; Thu, 15 Jan 2015 22:13:09 +0100 (CET) Message-ID: <54B82D94.5090904@selasky.org> Date: Thu, 15 Jan 2015 22:13:56 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:13:13 -0000 On 01/15/15 19:46, Bjoern A. Zeeb wrote: > >> On 15 Jan 2015, at 15:32 , Hans Petter Selasky wrote: >> >> Author: hselasky >> Date: Thu Jan 15 15:32:30 2015 >> New Revision: 277213 >> URL: https://svnweb.freebsd.org/changeset/base/277213 >> >> Log: >> Major callout subsystem cleanup and rewrite: > > > I see this for i386 and amd64 LINT* kernels. Is that a local problem or did you miss something? > > linking kernel > addr.o: In function `set_timeout': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/addr.c:(.text+0xd37): undefined reference to `_callout_stop_safe' > mad.o: In function `ib_unregister_mad_agent': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x1ed4): undefined reference to `_callout_stop_safe' > mad.o: In function `ib_mad_complete_send_wr': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad.c:(.text+0x3ea0): undefined reference to `_callout_stop_safe' > cm.o: In function `ib_cm_cleanup': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/cm.c:(.text+0x40cf): undefined reference to `_callout_stop_safe' > mad_rmpp.o: In function `ib_cancel_rmpp_recvs': > /scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_rmpp.c:(.text+0xc2): undefined reference to `_callout_stop_safe' > mad_rmpp.o:/scratch/tmp/bz/head.svn/sys/ofed/drivers/infiniband/core/mad_rmpp.c:(.text+0xe9): more undefined references to `_callout_stop_safe' follow > --- kernel --- > *** [kernel] Error code 1 > Hi, I think this is a local problem at your side. I get at r277215: > --- kernel --- > linking kernel > objcopy --strip-debug kernel > text data bss dec hex filename > 28873399 10373165 1857376 41103940 0x2733244 kernel > -------------------------------------------------------------- >>>> Kernel build for LINT completed on Thu Jan 15 23:07:58 IST 2015 > -------------------------------------------------------------- When running: > make -m $PWD/share/mk buildkernel WITH_OFED=YES TARGET_ARCH=i386 KERNCONF=LINT --HPS From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 21:17:41 2015 Return-Path: Delivered-To: svn-src-head@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 9268BD7A; Thu, 15 Jan 2015 21:17: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 7BCACFDB; Thu, 15 Jan 2015 21:17: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 t0FLHfqK004415; Thu, 15 Jan 2015 21:17:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FLHb8l004391; Thu, 15 Jan 2015 21:17:37 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501152117.t0FLHb8l004391@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 15 Jan 2015 21:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277217 - in head: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src lib/libc++ X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:17:41 -0000 Author: dim Date: Thu Jan 15 21:17:36 2015 New Revision: 277217 URL: https://svnweb.freebsd.org/changeset/base/277217 Log: Import libc++ trunk r224926. This fixes a number of bugs, completes C++14 support[1], adds more C++1z features[2], and fixes the following LWG issues[3]: 1450: Contradiction in regex_constants 2003: String exception inconsistency in erase. 2075: Progress guarantees, lock-free property, and scheduling assumptions 2104: unique_lock move-assignment should not be noexcept 2112: User-defined classes that cannot be derived from 2132: std::function ambiguity 2135: Unclear requirement for exceptions thrown in condition_variable::wait() 2142: packaged_task::operator() synchronization too broad? 2182: Container::[const_]reference types are misleadingly specified 2186: Incomplete action on async/launch::deferred 2188: Reverse iterator does not fully support targets that overload operator& 2193: Default constructors for standard library containers are explicit 2205: Problematic postconditions of regex_match and regex_search 2213: Return value of std::regex_replace 2240: Probable misuse of term "function scope" in [thread.condition] 2252: Strong guarantee on vector::push_back() still broken with C++11? 2257: Simplify container requirements with the new algorithms 2258: a.erase(q1, q2) unable to directly return q2 2263: Comparing iterators and allocator pointers with different const-character 2268: Setting a default argument in the declaration of a member function assign of std::basic_string 2271: regex_traits::lookup_classname specification unclear 2272: quoted should use char_traits::eq for character comparison 2278: User-defined literals for Standard Library types 2280: begin / end for arrays should be constexpr and noexcept 2285: make_reverse_iterator 2288: Inconsistent requirements for shared mutexes 2291: std::hash is vulnerable to collision DoS attack 2293: Wrong facet used by num_put::do_put 2299: Effects of inaccessible key_compare::is_transparent type are not clear 2301: Why is std::tie not constexpr? 2304: Complexity of count in unordered associative containers 2306: match_results::reference should be value_type&, not const value_type& 2308: Clarify container destructor requirements w.r.t. std::array 2313: tuple_size should always derive from integral_constant 2314: apply() should return decltype(auto) and use decay_t before tuple_size 2315: weak_ptr should be movable 2316: weak_ptr::lock() should be atomic 2317: The type property queries should be UnaryTypeTraits returning size_t 2320: select_on_container_copy_construction() takes allocators, not containers 2322: Associative(initializer_list, stuff) constructors are underspecified 2323: vector::resize(n, t)'s specification should be simplified 2324: Insert iterator constructors should use addressof() 2329: regex_match()/regex_search() with match_results should forbid temporary strings 2330: regex("meow", regex::icase) is technically forbidden but should be permitted 2332: regex_iterator/regex_token_iterator should forbid temporary regexes 2339: Wording issue in nth_element 2341: Inconsistency between basic_ostream::seekp(pos) and basic_ostream::seekp(off, dir) 2344: quoted()'s interaction with padding is unclear 2346: integral_constant's member functions should be marked noexcept 2350: min, max, and minmax should be constexpr 2356: Stability of erasure in unordered associative containers 2357: Remaining "Assignable" requirement 2359: How does regex_constants::nosubs affect basic_regex::mark_count()? 2360: reverse_iterator::operator*() is unimplementable [1] http://libcxx.llvm.org/cxx1y_status.html [2] http://libcxx.llvm.org/cxx1z_status.html [3] http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html Exp-run: antoine MFC after: 1 month Added: head/contrib/libc++/include/__refstring - copied unchanged from r276792, vendor/libc++/dist/include/__refstring head/contrib/libc++/include/experimental/__config - copied unchanged from r276792, vendor/libc++/dist/include/experimental/__config head/contrib/libc++/include/experimental/string_view - copied unchanged from r276792, vendor/libc++/dist/include/experimental/string_view head/contrib/libc++/include/experimental/type_traits - copied unchanged from r276792, vendor/libc++/dist/include/experimental/type_traits head/contrib/libc++/include/experimental/utility - copied unchanged from r276792, vendor/libc++/dist/include/experimental/utility head/contrib/libc++/include/module.modulemap - copied unchanged from r276792, vendor/libc++/dist/include/module.modulemap Modified: head/contrib/libc++/CREDITS.TXT head/contrib/libc++/LICENSE.TXT head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/__config head/contrib/libc++/include/__debug head/contrib/libc++/include/__functional_03 head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__functional_base_03 head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__locale head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/__sso_allocator head/contrib/libc++/include/__tree head/contrib/libc++/include/__tuple head/contrib/libc++/include/algorithm head/contrib/libc++/include/atomic head/contrib/libc++/include/bitset head/contrib/libc++/include/chrono head/contrib/libc++/include/cmath head/contrib/libc++/include/condition_variable head/contrib/libc++/include/cstddef head/contrib/libc++/include/deque head/contrib/libc++/include/experimental/dynarray head/contrib/libc++/include/experimental/optional head/contrib/libc++/include/ext/__hash head/contrib/libc++/include/ext/hash_map head/contrib/libc++/include/forward_list head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/iomanip head/contrib/libc++/include/ios head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/limits head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/memory head/contrib/libc++/include/mutex head/contrib/libc++/include/new head/contrib/libc++/include/numeric head/contrib/libc++/include/ostream head/contrib/libc++/include/random head/contrib/libc++/include/regex head/contrib/libc++/include/set head/contrib/libc++/include/shared_mutex head/contrib/libc++/include/sstream head/contrib/libc++/include/stdexcept head/contrib/libc++/include/string head/contrib/libc++/include/thread head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/typeinfo head/contrib/libc++/include/unordered_map head/contrib/libc++/include/unordered_set head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/vector head/contrib/libc++/src/algorithm.cpp head/contrib/libc++/src/chrono.cpp head/contrib/libc++/src/condition_variable.cpp head/contrib/libc++/src/debug.cpp head/contrib/libc++/src/exception.cpp head/contrib/libc++/src/future.cpp head/contrib/libc++/src/hash.cpp head/contrib/libc++/src/ios.cpp head/contrib/libc++/src/locale.cpp head/contrib/libc++/src/memory.cpp head/contrib/libc++/src/mutex.cpp head/contrib/libc++/src/new.cpp head/contrib/libc++/src/optional.cpp head/contrib/libc++/src/random.cpp head/contrib/libc++/src/regex.cpp head/contrib/libc++/src/shared_mutex.cpp head/contrib/libc++/src/stdexcept.cpp head/contrib/libc++/src/string.cpp head/contrib/libc++/src/strstream.cpp head/contrib/libc++/src/system_error.cpp head/contrib/libc++/src/thread.cpp head/contrib/libc++/src/valarray.cpp head/lib/libc++/Makefile Directory Properties: head/contrib/libc++/ (props changed) Modified: head/contrib/libc++/CREDITS.TXT ============================================================================== --- head/contrib/libc++/CREDITS.TXT Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/CREDITS.TXT Thu Jan 15 21:17:36 2015 (r277217) @@ -33,6 +33,10 @@ E: mclow.lists@gmail.com E: marshall@idio.com D: C++14 support, patches and bug fixes. +N: Eric Fiselier +E: eric@efcs.ca +D: LFTS support, patches and bug fixes. + N: Bill Fisher E: william.w.fisher@gmail.com D: Regex bug fixes. Modified: head/contrib/libc++/LICENSE.TXT ============================================================================== --- head/contrib/libc++/LICENSE.TXT Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/LICENSE.TXT Thu Jan 15 21:17:36 2015 (r277217) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT All rights reserved. @@ -55,7 +55,7 @@ SOFTWARE. ============================================================================== -Copyright (c) 2009-2013 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2014 by the contributors listed in CREDITS.TXT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal Modified: head/contrib/libc++/include/__bit_reference ============================================================================== --- head/contrib/libc++/include/__bit_reference Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__bit_reference Thu Jan 15 21:17:36 2015 (r277217) @@ -174,7 +174,7 @@ __find_bool_true(__bit_iterator<_Cp, _Is if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -210,7 +210,7 @@ __find_bool_false(__bit_iterator<_Cp, _I if (__b) return _It(__first.__seg_, static_cast(_VSTD::__ctz(__b))); if (__n == __dn) - return _It(__first.__seg_, __first.__ctz_ + __n); + return __first + __n; __n -= __dn; ++__first.__seg_; } @@ -705,7 +705,7 @@ inline _LIBCPP_INLINE_VISIBILITY __bit_iterator<_Cp, false> move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result) { - return _VSTD::copy(__first, __last, __result); + return _VSTD::copy_backward(__first, __last, __result); } // swap_ranges Modified: head/contrib/libc++/include/__config ============================================================================== --- head/contrib/libc++/include/__config Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__config Thu Jan 15 21:17:36 2015 (r277217) @@ -19,6 +19,11 @@ #define _GNUC_VER (__GNUC__ * 100 + __GNUC_MINOR__) #endif +#if !_WIN32 +#include +#include // for ELAST on FreeBSD +#endif + #define _LIBCPP_VERSION 1101 #define _LIBCPP_ABI_VERSION 1 @@ -106,6 +111,13 @@ # endif #endif // __sun__ +#if defined(__native_client__) + // NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access, + // including accesses to the special files under /dev. C++11's + // std::random_device is instead exposed through a NaCl syscall. +# define _LIBCPP_USING_NACL_RANDOM +#endif // defined(__native_client__) + #if !defined(_LIBCPP_LITTLE_ENDIAN) || !defined(_LIBCPP_BIG_ENDIAN) # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -194,7 +206,7 @@ #endif #ifndef _LIBCPP_EXCEPTION_ABI -#define _LIBCPP_EXCEPTION_ABI _LIBCPP_TYPE_VIS +#define _LIBCPP_EXCEPTION_ABI __attribute__ ((__visibility__("default"))) #endif #ifndef _LIBCPP_ALWAYS_INLINE @@ -203,6 +215,11 @@ #if defined(__clang__) +#if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && \ + !defined(__arm__) +#define _LIBCPP_ALTERNATE_STRING_LAYOUT +#endif + #if __has_feature(cxx_alignas) # define _ALIGNAS_TYPE(x) alignas(x) # define _ALIGNAS(x) alignas(x) @@ -215,14 +232,10 @@ #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #endif -#ifndef __GXX_EXPERIMENTAL_CXX0X__ -#ifdef __linux__ -#define _LIBCPP_HAS_NO_UNICODE_CHARS -#else +#if __cplusplus < 201103L typedef __char16_t char16_t; typedef __char32_t char32_t; #endif -#endif #if !(__has_feature(cxx_exceptions)) #define _LIBCPP_NO_EXCEPTIONS @@ -246,6 +259,8 @@ typedef __char32_t char32_t; # define _LIBCPP_NORETURN __attribute__ ((noreturn)) #endif +#define _LIBCPP_UNUSED __attribute__((__unused__)) + #if !(__has_feature(cxx_defaulted_functions)) #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #endif // !(__has_feature(cxx_defaulted_functions)) @@ -308,10 +323,16 @@ typedef __char32_t char32_t; #define _LIBCPP_HAS_NO_CONSTEXPR #endif +#if !(__has_feature(cxx_relaxed_constexpr)) +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR +#endif + #if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L #if defined(__FreeBSD__) #define _LIBCPP_HAS_QUICK_EXIT #define _LIBCPP_HAS_C11_FEATURES +#elif defined(__ANDROID__) +#define _LIBCPP_HAS_QUICK_EXIT #elif defined(__linux__) #include #if __GLIBC_PREREQ(2, 15) @@ -326,13 +347,19 @@ typedef __char32_t char32_t; #if (__has_feature(cxx_noexcept)) # define _NOEXCEPT noexcept # define _NOEXCEPT_(x) noexcept(x) +# define _NOEXCEPT_OR_FALSE(x) noexcept(x) #else # define _NOEXCEPT throw() # define _NOEXCEPT_(x) +# define _NOEXCEPT_OR_FALSE(x) false #endif #if __has_feature(underlying_type) -# define _LIBCXX_UNDERLYING_TYPE(T) __underlying_type(T) +# define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#endif + +#if __has_feature(is_literal) +# define _LIBCPP_IS_LITERAL(T) __is_literal(T) #endif // Inline namespaces are available in Clang regardless of C++ dialect. @@ -345,6 +372,10 @@ namespace std { } } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !__has_feature(address_sanitizer) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(__GNUC__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) @@ -352,15 +383,33 @@ namespace std { #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED __attribute__((__unused__)) + +#if _GNUC_VER >= 407 +#define _LIBCPP_UNDERLYING_TYPE(T) __underlying_type(T) +#define _LIBCPP_IS_LITERAL(T) __is_literal_type(T) +#endif + #if !__EXCEPTIONS #define _LIBCPP_NO_EXCEPTIONS #endif #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES + +// constexpr was added to GCC in 4.6. +#if _GNUC_VER < 406 +#define _LIBCPP_HAS_NO_CONSTEXPR +// Can only use constexpr in c++11 mode. +#elif !defined(__GXX_EXPERIMENTAL_CXX0X__) && __cplusplus < 201103L #define _LIBCPP_HAS_NO_CONSTEXPR +#endif + +// No version of GCC supports relaxed constexpr rules +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #ifndef __GXX_EXPERIMENTAL_CXX0X__ @@ -390,9 +439,7 @@ namespace std { #endif #if _GNUC_VER < 404 -#define _LIBCPP_HAS_NO_ADVANCED_SFINAE #define _LIBCPP_HAS_NO_DECLTYPE -#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_VARIADICS @@ -403,6 +450,11 @@ namespace std { #define _LIBCPP_HAS_NO_NULLPTR #endif +#if _GNUC_VER < 407 +#define _LIBCPP_HAS_NO_ADVANCED_SFINAE +#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS +#endif + #endif // __GXX_EXPERIMENTAL_CXX0X__ #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { namespace _LIBCPP_NAMESPACE { @@ -415,21 +467,28 @@ namespace _LIBCPP_NAMESPACE { using namespace _LIBCPP_NAMESPACE __attribute__((__strong__)); } +#if !defined(_LIBCPP_HAS_NO_ASAN) && !defined(__SANITIZE_ADDRESS__) +#define _LIBCPP_HAS_NO_ASAN +#endif + #elif defined(_LIBCPP_MSVC) #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER #define _LIBCPP_HAS_NO_CONSTEXPR +#define _LIBCPP_HAS_NO_CXX14_CONSTEXPR #define _LIBCPP_HAS_NO_UNICODE_CHARS #define _LIBCPP_HAS_NO_DELETED_FUNCTIONS #define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS #define __alignof__ __alignof #define _LIBCPP_NORETURN __declspec(noreturn) +#define _LIBCPP_UNUSED #define _ALIGNAS(x) __declspec(align(x)) #define _LIBCPP_HAS_NO_VARIADICS -#define _NOEXCEPT throw() +#define _NOEXCEPT throw () #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { #define _LIBCPP_END_NAMESPACE_STD } @@ -439,15 +498,19 @@ using namespace _LIBCPP_NAMESPACE __attr namespace std { } +#define _LIBCPP_HAS_NO_ASAN + #elif defined(__IBMCPP__) #define _ALIGNAS(x) __attribute__((__aligned__(x))) #define _ALIGNAS_TYPE(x) __attribute__((__aligned__(__alignof(x)))) #define _ATTRIBUTE(x) __attribute__((x)) #define _LIBCPP_NORETURN __attribute__((noreturn)) +#define _LIBCPP_UNUSED #define _NOEXCEPT throw() #define _NOEXCEPT_(x) +#define _NOEXCEPT_OR_FALSE(x) false #define _LIBCPP_HAS_NO_TEMPLATE_ALIASES #define _LIBCPP_HAS_NO_ADVANCED_SFINAE @@ -455,7 +518,6 @@ namespace std { #define _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS #define _LIBCPP_HAS_NO_NULLPTR #define _LIBCPP_HAS_NO_UNICODE_CHARS -#define _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_HAS_IS_BASE_OF #if defined(_AIX) @@ -471,13 +533,19 @@ namespace std { } } -#endif // __clang__ || __GNUC___ || _MSC_VER || __IBMCPP__ +#define _LIBCPP_HAS_NO_ASAN + +#endif // __clang__ || __GNUC__ || _MSC_VER || __IBMCPP__ #ifdef _LIBCPP_HAS_NO_UNICODE_CHARS typedef unsigned short char16_t; typedef unsigned int char32_t; #endif // _LIBCPP_HAS_NO_UNICODE_CHARS +#ifndef __SIZEOF_INT128__ +#define _LIBCPP_HAS_NO_INT128 +#endif + #ifdef _LIBCPP_HAS_NO_STATIC_ASSERT template struct __static_assert_test; @@ -515,12 +583,20 @@ template struct __static_asse #define __has_feature(__x) 0 #endif -#if __has_feature(cxx_explicit_conversions) +#ifndef __has_builtin +#define __has_builtin(__x) 0 +#endif + +#if __has_feature(cxx_explicit_conversions) || defined(__IBMCPP__) # define _LIBCPP_EXPLICIT explicit #else # define _LIBCPP_EXPLICIT #endif +#if !__has_builtin(__builtin_operator_new) || !__has_builtin(__builtin_operator_delete) +# define _LIBCPP_HAS_NO_BUILTIN_OPERATOR_NEW_DELETE +#endif + #ifdef _LIBCPP_HAS_NO_STRONG_ENUMS #define _LIBCPP_DECLARE_STRONG_ENUM(x) struct _LIBCPP_TYPE_VIS x { enum __lx #define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x) \ @@ -546,16 +622,21 @@ template struct __static_asse #endif #ifndef _LIBCPP_EXTERN_TEMPLATE -#define _LIBCPP_EXTERN_TEMPLATE(...) +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; #endif #ifndef _LIBCPP_EXTERN_TEMPLATE2 #define _LIBCPP_EXTERN_TEMPLATE2(...) extern template __VA_ARGS__; #endif +#if defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__) +#define _LIBCPP_NONUNIQUE_RTTI_BIT (1ULL << 63) +#endif + #if defined(__APPLE__) || defined(__FreeBSD__) || defined(_WIN32) || defined(__sun__) || defined(__NetBSD__) #define _LIBCPP_LOCALE__L_EXTENSIONS 1 #endif + #ifdef __FreeBSD__ #define _DECLARE_C99_LDBL_MATH 1 #endif @@ -568,21 +649,39 @@ template struct __static_asse #define _LIBCPP_WCTYPE_IS_MASK #endif -#if defined(__APPLE__) || defined(__FreeBSD__) -#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 -#endif +#if defined(ELAST) +#define _LIBCPP_ELAST ELAST +#elif defined(__linux__) +#define _LIBCPP_ELAST 4095 +#elif defined(_NEWLIB_VERSION) +#define _LIBCPP_ELAST __ELASTERROR +#elif defined(__APPLE__) +// Not _LIBCPP_ELAST needed on Apple +#elif defined(__sun__) +#define _LIBCPP_ELAST ESTALE +#else +// Warn here so that the person doing the libcxx port has an easier time: +#warning This platform's ELAST hasn't been ported yet #endif #ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR -# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# if defined(__FreeBSD__) +// Making the std::pair copy constructor trivial breaks ABI compatibility with +// earlier versions of libc++ shipped by FreeBSD, so turn it off by default. +// See also http://svnweb.freebsd.org/changeset/base/261801 +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0 +# else +# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 1 +# endif #endif #ifndef _LIBCPP_STD_VER # if __cplusplus <= 201103L # define _LIBCPP_STD_VER 11 +# elif __cplusplus <= 201402L +# define _LIBCPP_STD_VER 14 # else -# define _LIBCPP_STD_VER 13 // current year, or date of c++14 ratification +# define _LIBCPP_STD_VER 15 // current year, or date of c++17 ratification # endif #endif // _LIBCPP_STD_VER @@ -593,21 +692,30 @@ template struct __static_asse #endif #if _LIBCPP_STD_VER <= 11 -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 #define _LIBCPP_EXPLICIT_AFTER_CXX11 #define _LIBCPP_DEPRECATED_AFTER_CXX11 #else -#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr #define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit #define _LIBCPP_DEPRECATED_AFTER_CXX11 [[deprecated]] #endif +#if _LIBCPP_STD_VER > 11 && !defined(_LIBCPP_HAS_NO_CXX14_CONSTEXPR) +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr +#else +#define _LIBCPP_CONSTEXPR_AFTER_CXX11 +#endif + +#ifndef _LIBCPP_HAS_NO_ASAN +extern "C" void __sanitizer_annotate_contiguous_container( + const void *, const void *, const void *, const void *); +#endif + // Try to find out if RTTI is disabled. // g++ and cl.exe have RTTI on by default and define a macro when it is. // g++ only defines the macro in 4.3.2 and onwards. #if !defined(_LIBCPP_NO_RTTI) -# if defined(__GNUG__) && (__GNUC__ >= 4 && \ - (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2)) && !defined(__GXX_RTTI) +# if defined(__GNUG__) && ((__GNUC__ >= 5) || (__GNUC__ == 4 && \ + (__GNUC_MINOR__ >= 3 || __GNUC_PATCHLEVEL__ >= 2))) && !defined(__GXX_RTTI) # define _LIBCPP_NO_RTTI # elif (defined(_MSC_VER) && !defined(__clang__)) && !defined(_CPPRTTI) # define _LIBCPP_NO_RTTI @@ -618,4 +726,9 @@ template struct __static_asse # define _LIBCPP_WEAK __attribute__((__weak__)) #endif +#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS) +# error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \ + _LIBCPP_HAS_NO_THREADS is defined. +#endif + #endif // _LIBCPP_CONFIG Modified: head/contrib/libc++/include/__debug ============================================================================== --- head/contrib/libc++/include/__debug Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__debug Thu Jan 15 21:17:36 2015 (r277217) @@ -11,19 +11,23 @@ #ifndef _LIBCPP_DEBUG_H #define _LIBCPP_DEBUG_H +#include <__config> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif #if _LIBCPP_DEBUG_LEVEL >= 1 - # include # include # include # ifndef _LIBCPP_ASSERT # define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : (_VSTD::printf("%s\n", m), _VSTD::abort())) # endif +#endif +#ifndef _LIBCPP_ASSERT +# define _LIBCPP_ASSERT(x, m) ((void)0) #endif #if _LIBCPP_DEBUG_LEVEL >= 2 Modified: head/contrib/libc++/include/__functional_03 ============================================================================== --- head/contrib/libc++/include/__functional_03 Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__functional_03 Thu Jan 15 21:17:36 2015 (r277217) @@ -651,9 +651,14 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp __base* __f_; template + _LIBCPP_INLINE_VISIBILITY static bool __not_null(const _Fp&) {return true;} template - static bool __not_null(const function<_Rp()>& __p) {return __p;} + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(_R2 (*__p)()) {return __p;} + template + _LIBCPP_INLINE_VISIBILITY + static bool __not_null(const function<_R2()>& __p) {return __p;} public: typedef _Rp result_type; @@ -955,7 +960,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)() const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1257,7 +1262,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1558,7 +1563,7 @@ class _LIBCPP_TYPE_VIS_ONLY function<_Rp static bool __not_null(_R2 (_Cp::*__p)(_B1, _B2) const volatile) {return __p;} template _LIBCPP_INLINE_VISIBILITY - static bool __not_null(const function<_Rp(_B0, _B1, _B2)>& __p) {return __p;} + static bool __not_null(const function<_R2(_B0, _B1, _B2)>& __p) {return __p;} public: typedef _Rp result_type; @@ -1911,7 +1916,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename __mu_return1::type __mu_expand(_Ti& __ti, tuple<_Uj...>&& __uj, __tuple_indices<_Indx...>) { - __ti(_VSTD::forward::type>(get<_Indx>(__uj))...); + __ti(_VSTD::forward::type>(_VSTD::get<_Indx>(__uj))...); } template @@ -1947,9 +1952,9 @@ __mu(_Ti&, _Uj& __uj) { const size_t _Indx = is_placeholder<_Ti>::value - 1; // compiler bug workaround - typename tuple_element<_Indx, _Uj>::type __t = get<_Indx>(__uj); + typename tuple_element<_Indx, _Uj>::type __t = _VSTD::get<_Indx>(__uj); return __t; -// return _VSTD::forward::type>(get<_Indx>(__uj)); +// return _VSTD::forward::type>(_VSTD::get<_Indx>(__uj)); } template @@ -2040,7 +2045,7 @@ typename __bind_return<_Fp, _BoundArgs, __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>, _Args&& __args) { - return __invoke(__f, __mu(get<_Indx>(__bound_args), __args)...); + return __invoke(__f, __mu(_VSTD::get<_Indx>(__bound_args), __args)...); } template Modified: head/contrib/libc++/include/__functional_base ============================================================================== --- head/contrib/libc++/include/__functional_base Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__functional_base Thu Jan 15 21:17:36 2015 (r277217) @@ -451,10 +451,10 @@ public: } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: head/contrib/libc++/include/__functional_base_03 ============================================================================== --- head/contrib/libc++/include/__functional_base_03 Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__functional_base_03 Thu Jan 15 21:17:36 2015 (r277217) @@ -1027,7 +1027,7 @@ public: typename __invoke_return0::type operator() (_A0& __a0) const { - return __invoke(get(), __a0); + return __invoke(get(), __a0); } template @@ -1035,7 +1035,7 @@ public: typename __invoke_return1::type operator() (_A0& __a0, _A1& __a1) const { - return __invoke(get(), __a0, __a1); + return __invoke(get(), __a0, __a1); } template @@ -1043,14 +1043,14 @@ public: typename __invoke_return2::type operator() (_A0& __a0, _A1& __a1, _A2& __a2) const { - return __invoke(get(), __a0, __a1, __a2); + return __invoke(get(), __a0, __a1, __a2); } }; -template struct ____is_reference_wrapper : public false_type {}; -template struct ____is_reference_wrapper > : public true_type {}; +template struct __is_reference_wrapper_impl : public false_type {}; +template struct __is_reference_wrapper_impl > : public true_type {}; template struct __is_reference_wrapper - : public ____is_reference_wrapper::type> {}; + : public __is_reference_wrapper_impl::type> {}; template inline _LIBCPP_INLINE_VISIBILITY Modified: head/contrib/libc++/include/__hash_table ============================================================================== --- head/contrib/libc++/include/__hash_table Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__hash_table Thu Jan 15 21:17:36 2015 (r277217) @@ -20,11 +20,7 @@ #include <__undef_min_max> -#ifdef _LIBCPP_DEBUG -# include <__debug> -#else -# define _LIBCPP_ASSERT(x, m) ((void)0) -#endif +#include <__debug> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header Modified: head/contrib/libc++/include/__locale ============================================================================== --- head/contrib/libc++/include/__locale Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__locale Thu Jan 15 21:17:36 2015 (r277217) @@ -21,11 +21,22 @@ #include #if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__) # include -#elif _AIX +#elif defined(_AIX) # include -#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)) || defined(__EMSCRIPTEN__) || defined(__IBMCPP__) +#elif defined(__ANDROID__) +// Android gained the locale aware functions in L (API level 21) +# include +# if __ANDROID_API__ <= 20 +# include +# endif +#elif defined(__sun__) +# include +#elif defined(_NEWLIB_VERSION) +# include +#elif (defined(__GLIBC__) || defined(__APPLE__) || defined(__FreeBSD__) \ + || defined(__EMSCRIPTEN__) || defined(__IBMCPP__)) # include -#endif // _WIN32 || __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ +#endif // __GLIBC__ || __APPLE__ || __FreeBSD__ || __sun__ || __EMSCRIPTEN__ || __IBMCPP__ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -341,13 +352,15 @@ public: static const mask punct = _PUNCT; static const mask xdigit = _HEX; static const mask blank = _BLANK; -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__) || defined(__ANDROID__) #ifdef __APPLE__ typedef __uint32_t mask; #elif defined(__FreeBSD__) typedef unsigned long mask; #elif defined(__EMSCRIPTEN__) || defined(__NetBSD__) typedef unsigned short mask; +#elif defined(__ANDROID__) + typedef unsigned char mask; #endif static const mask space = _CTYPE_S; static const mask print = _CTYPE_R; @@ -357,7 +370,12 @@ public: static const mask alpha = _CTYPE_A; static const mask digit = _CTYPE_D; static const mask punct = _CTYPE_P; +# if defined(__ANDROID__) + static const mask xdigit = _CTYPE_X | _CTYPE_D; +# else static const mask xdigit = _CTYPE_X; +# endif + # if defined(__NetBSD__) static const mask blank = _CTYPE_BL; # else Modified: head/contrib/libc++/include/__mutex_base ============================================================================== --- head/contrib/libc++/include/__mutex_base Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__mutex_base Thu Jan 15 21:17:36 2015 (r277217) @@ -22,6 +22,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#ifndef _LIBCPP_HAS_NO_THREADS + class _LIBCPP_TYPE_VIS mutex { pthread_mutex_t __m_; @@ -254,19 +256,13 @@ void swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT {__x.swap(__y);} -struct _LIBCPP_TYPE_VIS cv_status +//enum class cv_status +_LIBCPP_DECLARE_STRONG_ENUM(cv_status) { - enum __lx { - no_timeout, - timeout - }; - - __lx __v_; - - _LIBCPP_INLINE_VISIBILITY cv_status(__lx __v) : __v_(__v) {} - _LIBCPP_INLINE_VISIBILITY operator int() const {return __v_;} - + no_timeout, + timeout }; +_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status) class _LIBCPP_TYPE_VIS condition_variable { @@ -288,7 +284,7 @@ public: void notify_one() _NOEXCEPT; void notify_all() _NOEXCEPT; - void wait(unique_lock& __lk); + void wait(unique_lock& __lk) _NOEXCEPT; template void wait(unique_lock& __lk, _Predicate __pred); @@ -319,8 +315,9 @@ public: private: void __do_timed_wait(unique_lock& __lk, - chrono::time_point); + chrono::time_point) _NOEXCEPT; }; +#endif // !_LIBCPP_HAS_NO_THREADS template inline _LIBCPP_INLINE_VISIBILITY @@ -338,6 +335,7 @@ __ceil(chrono::duration<_Rep, _Period> _ return __r; } +#ifndef _LIBCPP_HAS_NO_THREADS template void condition_variable::wait(unique_lock& __lk, _Predicate __pred) @@ -402,6 +400,8 @@ condition_variable::wait_for(unique_lock _VSTD::move(__pred)); } +#endif // !_LIBCPP_HAS_NO_THREADS + _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___MUTEX_BASE Copied: head/contrib/libc++/include/__refstring (from r276792, vendor/libc++/dist/include/__refstring) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/libc++/include/__refstring Thu Jan 15 21:17:36 2015 (r277217, copy of r276792, vendor/libc++/dist/include/__refstring) @@ -0,0 +1,139 @@ +//===------------------------ __refstring ---------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP___REFSTRING +#define _LIBCPP___REFSTRING + +#include <__config> +#include +#include +#if __APPLE__ +#include +#include +#endif + +_LIBCPP_BEGIN_NAMESPACE_STD + +class _LIBCPP_HIDDEN __libcpp_refstring +{ +private: + const char* str_; + + typedef int count_t; + + struct _Rep_base + { + std::size_t len; + std::size_t cap; + count_t count; + }; + + static + _Rep_base* + rep_from_data(const char *data_) _NOEXCEPT + { + char *data = const_cast(data_); + return reinterpret_cast<_Rep_base *>(data - sizeof(_Rep_base)); + } + static + char * + data_from_rep(_Rep_base *rep) _NOEXCEPT + { + char *data = reinterpret_cast(rep); + return data + sizeof(*rep); + } + +#if __APPLE__ + static + const char* + compute_gcc_empty_string_storage() _NOEXCEPT + { + void* handle = dlopen("/usr/lib/libstdc++.6.dylib", RTLD_NOLOAD); + if (handle == nullptr) + return nullptr; + void* sym = dlsym(handle, "_ZNSs4_Rep20_S_empty_rep_storageE"); + if (sym == nullptr) + return nullptr; + return data_from_rep(reinterpret_cast<_Rep_base *>(sym)); + } + + static + const char* + get_gcc_empty_string_storage() _NOEXCEPT + { + static const char* p = compute_gcc_empty_string_storage(); + return p; + } + + bool + uses_refcount() const + { + return str_ != get_gcc_empty_string_storage(); + } +#else + bool + uses_refcount() const + { + return true; + } +#endif + +public: + explicit __libcpp_refstring(const char* msg) { + std::size_t len = strlen(msg); + _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1)); + rep->len = len; + rep->cap = len; + rep->count = 0; + char *data = data_from_rep(rep); + std::memcpy(data, msg, len + 1); + str_ = data; + } + + __libcpp_refstring(const __libcpp_refstring& s) _NOEXCEPT : str_(s.str_) + { + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + } + + __libcpp_refstring& operator=(const __libcpp_refstring& s) _NOEXCEPT + { + bool adjust_old_count = uses_refcount(); + struct _Rep_base *old_rep = rep_from_data(str_); + str_ = s.str_; + if (uses_refcount()) + __sync_add_and_fetch(&rep_from_data(str_)->count, 1); + if (adjust_old_count) + { + if (__sync_add_and_fetch(&old_rep->count, count_t(-1)) < 0) + { + ::operator delete(old_rep); + } + } + return *this; + } + + ~__libcpp_refstring() + { + if (uses_refcount()) + { + _Rep_base* rep = rep_from_data(str_); + if (__sync_add_and_fetch(&rep->count, count_t(-1)) < 0) + { + ::operator delete(rep); + } + } + } + + const char* c_str() const _NOEXCEPT {return str_;} +}; + +_LIBCPP_END_NAMESPACE_STD + +#endif //_LIBCPP___REFSTRING Modified: head/contrib/libc++/include/__sso_allocator ============================================================================== --- head/contrib/libc++/include/__sso_allocator Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__sso_allocator Thu Jan 15 21:17:36 2015 (r277217) @@ -55,14 +55,14 @@ public: __allocated_ = true; return (pointer)&buf_; } - return static_cast(::operator new(__n * sizeof(_Tp))); + return static_cast(_VSTD::__allocate(__n * sizeof(_Tp))); } _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type) { if (__p == (pointer)&buf_) __allocated_ = false; else - ::operator delete(__p); + _VSTD::__deallocate(__p); } _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);} Modified: head/contrib/libc++/include/__tree ============================================================================== --- head/contrib/libc++/include/__tree Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__tree Thu Jan 15 21:17:36 2015 (r277217) @@ -1980,9 +1980,9 @@ __tree<_Tp, _Compare, _Allocator>::erase __begin_node() = __r.__ptr_; --size(); __node_allocator& __na = __node_alloc(); - __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __tree_remove(__end_node()->__left_, static_cast<__node_base_pointer>(__np)); + __node_traits::destroy(__na, const_cast(_VSTD::addressof(*__p))); __node_traits::deallocate(__na, __np, 1); return __r; } Modified: head/contrib/libc++/include/__tuple ============================================================================== --- head/contrib/libc++/include/__tuple Thu Jan 15 19:52:19 2015 (r277216) +++ head/contrib/libc++/include/__tuple Thu Jan 15 21:17:36 2015 (r277217) @@ -27,6 +27,32 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// __lazy_and + +template +struct __lazy_and_impl; + +template +struct __lazy_and_impl : false_type {}; + +template <> +struct __lazy_and_impl : true_type {}; + +template +struct __lazy_and_impl : integral_constant {}; + +template +struct __lazy_and_impl : __lazy_and_impl<_Hp::type::value, _Tp...> {}; + +template +struct __lazy_and : __lazy_and_impl<_P1::type::value, _Pr...> {}; + +// __lazy_not + +template +struct __lazy_not : integral_constant {}; + + template class _LIBCPP_TYPE_VIS_ONLY tuple_size; template @@ -219,19 +245,30 @@ struct __make_tuple_types // __tuple_convertible -template +template struct __tuple_convertible_imp : public false_type {}; template -struct __tuple_convertible_imp, __tuple_types<_Up0, _Up...> > +struct __tuple_convertible_imp<__tuple_types<_Tp0, _Tp...>, __tuple_types<_Up0, _Up...> > : public integral_constant::value && - __tuple_convertible_imp, __tuple_types<_Up...> >::value> {}; + __tuple_convertible_imp<__tuple_types<_Tp...>, __tuple_types<_Up...> >::value> {}; template <> -struct __tuple_convertible_imp, __tuple_types<> > +struct __tuple_convertible_imp<__tuple_types<>, __tuple_types<> > : public true_type {}; +template +struct __tuple_convertible_apply : public false_type {}; + +template +struct __tuple_convertible_apply + : public __tuple_convertible_imp< + typename __make_tuple_types<_Tp>::type + , typename __make_tuple_types<_Up>::type + > +{}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 21:47:04 2015 Return-Path: Delivered-To: svn-src-head@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 26AA640B; Thu, 15 Jan 2015 21:47: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 10C3838E; Thu, 15 Jan 2015 21:47: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 t0FLl33l018750; Thu, 15 Jan 2015 21:47:03 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FLl3K8018748; Thu, 15 Jan 2015 21:47:03 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501152147.t0FLl3K8018748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Thu, 15 Jan 2015 21:47:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277218 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:47:04 -0000 Author: jfv Date: Thu Jan 15 21:47:02 2015 New Revision: 277218 URL: https://svnweb.freebsd.org/changeset/base/277218 Log: First draft man pages for ixl and ixlv drivers. MFC after: 1 week Added: head/share/man/man4/ixl.4 (contents, props changed) head/share/man/man4/ixlv.4 (contents, props changed) Added: head/share/man/man4/ixl.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ixl.4 Thu Jan 15 21:47:02 2015 (r277218) @@ -0,0 +1,188 @@ +.\" Copyright (c) 2013-2015, Intel Corporation +.\" 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 Intel Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2015 +.Dt IXL 4 +.Os +.Sh NAME +.Nm ixl +.Nd "Intel XL710 Ethernet 40Gb Base driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ixl" +.Ed +.Pp +To load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ixl_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for PCI Express adapters or LOMs +in the XL710 Family of ethernet devices. +The driver supports Jumbo Frames, TX/RX checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS), all for both IPv4 and IPv6. +For further hardware information and questions related to hardware +requirements, see +.Pa http://support.intel.com/ . +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +.Pp +Offloads are also controlled via the interface, for instance, +checksumming for both IPv4 and IPv6 can be set and unset, TSO4 +and/or TSO6, and finally LRO can be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Sh HARDWARE +The +.Nm +driver supports these SFP+ Pluggable Optics: +.Pp +.Bl -bullet -compact +.It +Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPSR +.It +Intel TRIPLE RATE 1G/10G/40G QSFP+ SR (bailed) E40GQSFPLR +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with SR Modules: +.Pp +.Bl -bullet -compact +.It +Intel DUAL RATE 1G/10G SFP+ SR (bailed) FTLX8571D3BCV-IT +.It +Intel DUAL RATE 1G/10G SFP+ SR (bailed) AFBR-703SDZ-IN2 +.El +.Pp +The +.Nm +driver supports 10Gb and 1Gb Ethernet adapters with LR Modules: +.Pp +.Bl -bullet -compact +.It +Intel DUAL RATE 1G/10G SFP+ LR (bailed) FTLX1471D3BCV-IT +.It +Intel DUAL RATE 1G/10G SFP+ LR (bailed) AFCT-701SDZ-IN2 +.El +.Pp +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 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.Bl -tag -width indent +.It Va hw.ixl.enable_msix +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. +.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. +.It Va hw.ixl.dynamic_rx_itr +The dynamic RX interrupt control, set to 1 to enable. +.It Va hw.ixl.dynamic_tx_itr +The dynamic TX interrupt control, set to 1 to enable. +.It Va hw.ixl.rx_itr +The RX interrupt rate value, set to 8K by default. +.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 +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. +.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. +.Sh Interrupt Storms +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 +be resolved by setting: +.Bl -tag -width indent +.It Va hw.intr_storm_threshold: 0 +.Sh SUPPORT +For general information and support, +go to the Intel support website at: +.Pa http://support.intel.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq freebsd@intel.com . +.Sh SEE ALSO +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.1 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Jack Vogel Aq jfv@FreeBSD.org +and +.An Eric Joyner Aq ricera10@gmail.com . Added: head/share/man/man4/ixlv.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ixlv.4 Thu Jan 15 21:47:02 2015 (r277218) @@ -0,0 +1,140 @@ +.\" Copyright (c) 2013-2015, Intel Corporation +.\" 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 Intel Corporation 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 COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. +.\" +.\" * Other names and brands may be claimed as the property of others. +.\" +.\" $FreeBSD$ +.\" +.Dd January 14, 2015 +.Dt IXLV 4 +.Os +.Sh NAME +.Nm ixlv +.Nd "Intel XL710 Ethernet 40Gb VF driver" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ixlv" +.Ed +.Pp +To load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_ixlv_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides virtualization support for PCI Express adapters +or LOMs in the XL710 Family of ethernet devices. +The driver supports Jumbo Frames, TX/RX checksum offload, +TCP segmentation offload (TSO), Large Receive Offload (LRO), VLAN +tag insertion/extraction, VLAN checksum offload, VLAN TSO, and +Receive Side Steering (RSS), all for both IPv4 and IPv6. +For further hardware information and questions related to hardware +requirements, see +.Pa http://support.intel.com/ . +.Pp +Support for Jumbo Frames is provided via the interface MTU setting. +Selecting an MTU larger than 1500 bytes with the +.Xr ifconfig 8 +utility configures the adapter to receive and transmit Jumbo Frames. +The maximum MTU size for Jumbo Frames is 9706. +.Pp +Offloads are also controlled via the interface, for instance, +checksumming for both IPv4 and IPv6 can be set and unset, TSO4 +and/or TSO6, and finally LRO can be set and unset. +.Pp +For more information on configuring this device, see +.Xr ifconfig 8 . +.Pp +NOTE that 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 +prompt before booting the kernel or stored in +.Xr loader.conf 5 . +.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. +.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. +.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 +in order to get UDP to perform well. +.It Va hw.ixlv.dynamic_rx_itr +The dynamic RX interrupt control, set to 1 to enable, off by default. +.It Va hw.ixlv.dynamic_tx_itr +The dynamic TX interrupt control, set to 1 to enable, off by default. +.It Va hw.ixlv.rx_itr +The RX interrupt rate value, set to 8K by default. +.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: +.Pa http://support.intel.com/ . +.Pp +If an issue is identified with this driver with a supported adapter, +email all the specific information related to the issue to +.Aq freebsd@intel.com . +.Sh SEE ALSO +.Xr ixl 4 , +.Xr arp 4 , +.Xr netintro 4 , +.Xr ng_ether 4 , +.Xr vlan 4 , +.Xr ifconfig 8 +.Sh HISTORY +The +.Nm +device driver first appeared in +.Fx 10.1 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Jack Vogel Aq jfv@FreeBSD.org +and +.An Eric Joyner Aq ricera10@gmail.com . From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 21:55:19 2015 Return-Path: Delivered-To: svn-src-head@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 D3CDE5D2; Thu, 15 Jan 2015 21:55:19 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC71663; Thu, 15 Jan 2015 21:55:19 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id l15so288764wiw.4; Thu, 15 Jan 2015 13:55:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=bmmlKGLbP+ohrw0HVfC0B9wvkrKrX0Brh0FJiosLTKg=; b=GlyPUHDWyyxwndn6Qd/Pj6GPk7hN1hem6UCg0EibWtrBPiLd3aL2nBRPykdLymzbxD YS5P7mjLVyAD6kKZihdPqoOJHMNaMJGSA2F3JTJPyJaQq4KWNlFOkPuYKRjL0baCypWt 93ISaX1oEdmWt3itCPIPJrRkgD6m/2NW9lJ8WetSIhIjUU2/SQIHVHb058bxpb0L/niB dwmv+IBA5/P3rlA/HNA9KCbR+h5Ta0kZPO7t1EvIy0Har/m37k7GMm92q60+Dx3CVXun x/vqEaWpFUz6fPKRBHgRTeXv9wwlBaMkplFCxm/gSHwY+1BkzFDGy7EmRmIJUMalVdWf AT/A== X-Received: by 10.180.207.66 with SMTP id lu2mr51252wic.13.1421358917463; Thu, 15 Jan 2015 13:55:17 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id cm7sm599744wib.6.2015.01.15.13.55.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 13:55:16 -0800 (PST) Sender: Baptiste Daroussin Date: Thu, 15 Jan 2015 22:55:14 +0100 From: Baptiste Daroussin To: Jack F Vogel Subject: Re: svn commit: r277218 - head/share/man/man4 Message-ID: <20150115215514.GG98528@ivaldir.etoilebsd.net> References: <201501152147.t0FLl3K8018748@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EDJsL2R9iCFAt7IV" Content-Disposition: inline In-Reply-To: <201501152147.t0FLl3K8018748@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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 21:55:19 -0000 --EDJsL2R9iCFAt7IV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 15, 2015 at 09:47:03PM +0000, Jack F Vogel wrote: > Author: jfv > Date: Thu Jan 15 21:47:02 2015 > New Revision: 277218 > URL: https://svnweb.freebsd.org/changeset/base/277218 >=20 > Log: > First draft man pages for ixl and ixlv drivers. > =20 > MFC after: 1 week >=20 [...] > +.Nm > +driver was written by > +.An Jack Vogel Aq jfv@FreeBSD.org ^ Missing Mt here (Mt =3D=3D mailto) > +and > +.An Eric Joyner Aq ricera10@gmail.com . ^ Missing Mt here (Mt =3D=3D mailto) >=20 Same on the other manpage regards, Bapt --EDJsL2R9iCFAt7IV Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlS4N0AACgkQ8kTtMUmk6EwERACfblA5XASPuvLIt8PtmqRTJwNn ZDwAoIVI2P2os4ZjN0vZZLI/kP5Mdsl9 =/Wig -----END PGP SIGNATURE----- --EDJsL2R9iCFAt7IV-- From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 22:17:12 2015 Return-Path: Delivered-To: svn-src-head@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 DFCA0BB6; Thu, 15 Jan 2015 22:17: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 B1A9E8F1; Thu, 15 Jan 2015 22:17: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 t0FMHCpc033104; Thu, 15 Jan 2015 22:17:12 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0FMHCxU033097; Thu, 15 Jan 2015 22:17:12 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501152217.t0FMHCxU033097@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Thu, 15 Jan 2015 22:17:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277219 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 22:17:13 -0000 Author: jfv Date: Thu Jan 15 22:17:11 2015 New Revision: 277219 URL: https://svnweb.freebsd.org/changeset/base/277219 Log: Add needed bits to the Makefile, and the Mt to the emails. Thanks to Nathan and Baptiste for the corrections :) MFC after: 1 week Modified: head/share/man/man4/Makefile head/share/man/man4/ixl.4 head/share/man/man4/ixlv.4 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Jan 15 21:47:02 2015 (r277218) +++ head/share/man/man4/Makefile Thu Jan 15 22:17:11 2015 (r277219) @@ -217,6 +217,8 @@ MAN= aac.4 \ iwnfw.4 \ ixgb.4 \ ixgbe.4 \ + ixl.4 \ + ixlv.4 \ jme.4 \ joy.4 \ kbdmux.4 \ @@ -667,6 +669,8 @@ MLINKS+=ixgb.4 if_ixgb.4 MLINKS+=ixgbe.4 ix.4 MLINKS+=ixgbe.4 if_ix.4 MLINKS+=ixgbe.4 if_ixgbe.4 +MLINKS+=ixl.4 if_ixl.4 +MLINKS+=ixlv.4 if_ixlv.4 MLINKS+=jme.4 if_jme.4 MLINKS+=kue.4 if_kue.4 MLINKS+=lagg.4 trunk.4 Modified: head/share/man/man4/ixl.4 ============================================================================== --- head/share/man/man4/ixl.4 Thu Jan 15 21:47:02 2015 (r277218) +++ head/share/man/man4/ixl.4 Thu Jan 15 22:17:11 2015 (r277219) @@ -183,6 +183,6 @@ device driver first appeared in The .Nm driver was written by -.An Jack Vogel Aq jfv@FreeBSD.org +.An Jack Vogel Aq Mt jfv@FreeBSD.org and -.An Eric Joyner Aq ricera10@gmail.com . +.An Eric Joyner Aq Mt ricera10@gmail.com . Modified: head/share/man/man4/ixlv.4 ============================================================================== --- head/share/man/man4/ixlv.4 Thu Jan 15 21:47:02 2015 (r277218) +++ head/share/man/man4/ixlv.4 Thu Jan 15 22:17:11 2015 (r277219) @@ -135,6 +135,6 @@ device driver first appeared in The .Nm driver was written by -.An Jack Vogel Aq jfv@FreeBSD.org +.An Jack Vogel Aq Mt jfv@FreeBSD.org and -.An Eric Joyner Aq ricera10@gmail.com . +.An Eric Joyner Aq Mt ricera10@gmail.com . From owner-svn-src-head@FreeBSD.ORG Thu Jan 15 23:03:10 2015 Return-Path: Delivered-To: svn-src-head@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 4BF8986A; Thu, 15 Jan 2015 23:03:10 +0000 (UTC) Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72]) (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 1D51EDEB; Thu, 15 Jan 2015 23:03:09 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1YBtRP-000For-HI; Thu, 15 Jan 2015 23:03:03 +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 t0FN325Y092103; Thu, 15 Jan 2015 16:03:02 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+WArjyaAPB3QfmLEOhHS0U Message-ID: <1421362982.14601.280.camel@freebsd.org> Subject: Re: svn commit: r277215 - in head/sys: amd64/include boot/common boot/fdt boot/forth boot/i386/libi386 boot/i386/loader i386/include x86/xen From: Ian Lepore To: Roger Pau =?ISO-8859-1?Q?Monn=E9?= Date: Thu, 15 Jan 2015 16:03:02 -0700 In-Reply-To: <201501151627.t0FGRLY2062439@svn.freebsd.org> References: <201501151627.t0FGRLY2062439@svn.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by ilsoft.org id t0FN325Y092103 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 23:03:10 -0000 On Thu, 2015-01-15 at 16:27 +0000, Roger Pau Monn=E9 wrote: > Author: royger > Date: Thu Jan 15 16:27:20 2015 > New Revision: 277215 > URL: https://svnweb.freebsd.org/changeset/base/277215 >=20 > Log: > loader: implement multiboot support for Xen Dom0 > [...] >=20 > Added: > head/sys/boot/i386/libi386/multiboot.c (contents, props changed) > head/sys/boot/i386/libi386/multiboot.h (contents, props changed) > head/sys/boot/i386/libi386/multiboot_tramp.S (contents, props chang= ed) > Modified: > head/sys/amd64/include/metadata.h > head/sys/boot/common/bootstrap.h > head/sys/boot/common/load_elf.c > head/sys/boot/common/load_elf_obj.c > head/sys/boot/common/module.c > head/sys/boot/fdt/fdt_loader_cmd.c > head/sys/boot/forth/beastie.4th > head/sys/boot/forth/loader.4th > head/sys/boot/forth/support.4th > head/sys/boot/i386/libi386/Makefile > head/sys/boot/i386/libi386/bootinfo64.c > head/sys/boot/i386/libi386/elf64_freebsd.c > head/sys/boot/i386/libi386/libi386.h > head/sys/boot/i386/loader/conf.c > head/sys/i386/include/metadata.h > head/sys/x86/xen/pv.c Something about this change breaks ubldr on arm (it works @ r277214). Now on an RPi I get this: /boot/kernel/kernel data=3D0x4cf8a4+0x3475c syms=3D[0x4+0x91650+0x4+0x533= 54] panic: Address offset 0x40000000 bigger than size 0x1E000000 There is a single physical extent of ram from 0-0x1e000000. -- Ian From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 01:28:29 2015 Return-Path: Delivered-To: svn-src-head@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 74BBF2F9; Fri, 16 Jan 2015 01:28: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 6077BDFC; Fri, 16 Jan 2015 01:28: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 t0G1STaA024073; Fri, 16 Jan 2015 01:28:29 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1SSfi024070; Fri, 16 Jan 2015 01:28:28 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160128.t0G1SSfi024070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 01:28:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277225 - in head/sys: conf modules/cxgbe/if_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:28:29 -0000 Author: np Date: Fri Jan 16 01:28:28 2015 New Revision: 277225 URL: https://svnweb.freebsd.org/changeset/base/277225 Log: Make cxgbe(4) buildable with the gcc in base. Modified: head/sys/conf/files head/sys/modules/cxgbe/if_cxgbe/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Jan 15 23:03:24 2015 (r277224) +++ head/sys/conf/files Fri Jan 16 01:28:28 2015 (r277225) @@ -1141,7 +1141,7 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ - compile-with "${NORMAL_C} -I$S/dev/cxgbe" + compile-with "${NORMAL_C} -I$S/dev/cxgbe -fms-extensions" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ Modified: head/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- head/sys/modules/cxgbe/if_cxgbe/Makefile Thu Jan 15 23:03:24 2015 (r277224) +++ head/sys/modules/cxgbe/if_cxgbe/Makefile Fri Jan 16 01:28:28 2015 (r277225) @@ -23,6 +23,6 @@ SRCS+= t4_tracer.c # Provide the timestamp of a packet in its header mbuf. #CFLAGS+= -DT4_PKT_TIMESTAMP -CFLAGS+= -I${CXGBE} +CFLAGS+= -I${CXGBE} -fms-extensions .include From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 01:32:41 2015 Return-Path: Delivered-To: svn-src-head@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 4D2A7492; Fri, 16 Jan 2015 01:32: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 38FE0EA9; Fri, 16 Jan 2015 01:32: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 t0G1WfeM028139; Fri, 16 Jan 2015 01:32:41 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1WeUV028137; Fri, 16 Jan 2015 01:32:40 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160132.t0G1WeUV028137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 01:32:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277226 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:32:41 -0000 Author: np Date: Fri Jan 16 01:32:40 2015 New Revision: 277226 URL: https://svnweb.freebsd.org/changeset/base/277226 Log: Allow cxgbe(4) to be built on i386. Driver attach will succeed only on a subset of i386 systems. Modified: head/sys/dev/cxgbe/t4_main.c head/sys/dev/cxgbe/t4_mp_ring.c Modified: head/sys/dev/cxgbe/t4_main.c ============================================================================== --- head/sys/dev/cxgbe/t4_main.c Fri Jan 16 01:28:28 2015 (r277225) +++ head/sys/dev/cxgbe/t4_main.c Fri Jan 16 01:32:40 2015 (r277226) @@ -668,6 +668,14 @@ t4_attach(device_t dev) goto done; } +#if defined(__i386__) + if ((cpu_feature & CPUID_CX8) == 0) { + device_printf(dev, "64 bit atomics not available.\n"); + rc = ENOTSUP; + goto done; + } +#endif + /* Prepare the firmware for operation */ rc = prep_firmware(sc); if (rc != 0) Modified: head/sys/dev/cxgbe/t4_mp_ring.c ============================================================================== --- head/sys/dev/cxgbe/t4_mp_ring.c Fri Jan 16 01:28:28 2015 (r277225) +++ head/sys/dev/cxgbe/t4_mp_ring.c Fri Jan 16 01:32:40 2015 (r277226) @@ -38,6 +38,11 @@ __FBSDID("$FreeBSD$"); #include "t4_mp_ring.h" +#if defined(__i386__) +#define atomic_cmpset_acq_64 atomic_cmpset_64 +#define atomic_cmpset_rel_64 atomic_cmpset_64 +#endif + union ring_state { struct { uint16_t pidx_head; From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 01:39:27 2015 Return-Path: Delivered-To: svn-src-head@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 01E35684; Fri, 16 Jan 2015 01:39: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 E138EEDE; Fri, 16 Jan 2015 01:39: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 t0G1dQqd029078; Fri, 16 Jan 2015 01:39:26 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1dPu5029070; Fri, 16 Jan 2015 01:39:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160139.t0G1dPu5029070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 01:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277227 - in head/sys: amd64/conf arm/conf conf modules powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:39:27 -0000 Author: np Date: Fri Jan 16 01:39:24 2015 New Revision: 277227 URL: https://svnweb.freebsd.org/changeset/base/277227 Log: Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it on amd64 only. Modified: head/sys/amd64/conf/NOTES head/sys/arm/conf/NOTES head/sys/conf/NOTES head/sys/modules/Makefile head/sys/powerpc/conf/NOTES Modified: head/sys/amd64/conf/NOTES ============================================================================== --- head/sys/amd64/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/amd64/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -300,7 +300,6 @@ options DRM_DEBUG # Include debug print # bxe: Broadcom NetXtreme II (BCM5771X/BCM578XX) PCIe 10Gb Ethernet # adapters. -# cxgbe: Chelsio T4/T5 1GbE/10GbE/40GbE PCIe Ethernet adapters # ed: Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503 # HP PC Lan+, various PC Card devices # (requires miibus) @@ -323,7 +322,6 @@ options DRM_DEBUG # Include debug print # Requires the wpi firmware module device bxe # Broadcom NetXtreme II BCM5771X/BCM578XX 10GbE -device cxgbe # Chelsio T4/T5 1GbE/10GbE/40GbE device ed # NE[12]000, SMC Ultra, 3c503, DS8390 cards options ED_3C503 options ED_HPP Modified: head/sys/arm/conf/NOTES ============================================================================== --- head/sys/arm/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/arm/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -82,6 +82,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice cxgbe nodevice pcii nodevice snd_cmi nodevice tnt4882 Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -1917,6 +1917,8 @@ device xmphy # XaQti XMAC II # cas: Sun Cassini/Cassini+ and National Semiconductor DP83065 Saturn # cm: Arcnet SMC COM90c26 / SMC COM90c56 # (and SMC COM90c66 in '56 compatibility mode) adapters. +# cxgb: Chelsio T3 based 1GbE/10GbE PCIe Ethernet adapters. +# cxgbe:Chelsio T4 and T5 based 1GbE/10GbE/40GbE PCIe Ethernet adapters. # dc: Support for PCI fast ethernet adapters based on the DEC/Intel 21143 # and various workalikes including: # the ADMtek AL981 Comet and AN985 Centaur, the ASIX Electronics @@ -2065,6 +2067,7 @@ device bge # Broadcom BCM570xx Gigabit device cas # Sun Cassini/Cassini+ and NS DP83065 Saturn device cxgb # Chelsio T3 10 Gigabit Ethernet device cxgb_t3fw # Chelsio T3 10 Gigabit Ethernet firmware +device cxgbe # Chelsio T4 and T5 1GbE/10GbE/40GbE device dc # DEC/Intel 21143 and various workalikes device et # Agere ET1310 10/100/Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/modules/Makefile Fri Jan 16 01:39:24 2015 (r277227) @@ -443,7 +443,8 @@ _ti= ti _txp= txp .endif -.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} == "amd64" +.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ + ${MACHINE_CPUARCH} != "powerpc" _cxgbe= cxgbe .endif Modified: head/sys/powerpc/conf/NOTES ============================================================================== --- head/sys/powerpc/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) +++ head/sys/powerpc/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) @@ -57,6 +57,7 @@ device adm1030 # Apple G4 MDD fan cont # Devices we don't want to deal with nodevice bktr +nodevice cxgbe # XXX: builds on powerpc64 only. nodevice fdc nodevice ppc nodevice splash From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 01:52:27 2015 Return-Path: Delivered-To: svn-src-head@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 C2550A5A; Fri, 16 Jan 2015 01:52: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 ADD97FD; Fri, 16 Jan 2015 01:52: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 t0G1qR5b037618; Fri, 16 Jan 2015 01:52:27 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G1qRZd037617; Fri, 16 Jan 2015 01:52:27 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501160152.t0G1qRZd037617@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 16 Jan 2015 01:52:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277228 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 01:52:27 -0000 Author: adrian Date: Fri Jan 16 01:52:26 2015 New Revision: 277228 URL: https://svnweb.freebsd.org/changeset/base/277228 Log: Check the right value correctly. Thanks to clang for pointing out this silliness. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Jan 16 01:39:24 2015 (r277227) +++ head/sys/dev/ath/if_ath.c Fri Jan 16 01:52:26 2015 (r277228) @@ -7024,7 +7024,7 @@ ath_tx_update_tim(struct ath_softc *sc, /* * Don't bother grabbing the lock unless the queue is empty. */ - if (&an->an_swq_depth != 0) + if (an->an_swq_depth != 0) return; if (an->an_is_powersave && From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 02:20:25 2015 Return-Path: Delivered-To: svn-src-head@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 7C72DE58; Fri, 16 Jan 2015 02:20: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 6864B328; Fri, 16 Jan 2015 02:20: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 t0G2KPqH048768; Fri, 16 Jan 2015 02:20:25 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G2KPmm048767; Fri, 16 Jan 2015 02:20:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160220.t0G2KPmm048767@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 02:20:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277229 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 02:20:25 -0000 Author: np Date: Fri Jan 16 02:20:24 2015 New Revision: 277229 URL: https://svnweb.freebsd.org/changeset/base/277229 Log: Use parentheses instead of close proximity to ensure layer + 1 is evaluated before the rest of the expression. Modified: head/sys/ofed/include/linux/linux_idr.c Modified: head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- head/sys/ofed/include/linux/linux_idr.c Fri Jan 16 01:52:26 2015 (r277228) +++ head/sys/ofed/include/linux/linux_idr.c Fri Jan 16 02:20:24 2015 (r277229) @@ -408,7 +408,7 @@ restart: * to be rare. */ if (idx == IDR_SIZE) { - starting_id = id + (1 << (layer+1 * IDR_BITS)); + starting_id = id + (1 << ((layer + 1) * IDR_BITS)); goto restart; } if (idx > sidx) From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 02:34:34 2015 Return-Path: Delivered-To: svn-src-head@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 749D3C9; Fri, 16 Jan 2015 02:34:34 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58DCF69A; Fri, 16 Jan 2015 02:34:34 +0000 (UTC) Received: from aurora.physics.berkeley.edu (aurora.Physics.Berkeley.EDU [128.32.117.67]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0G2YVXY003248 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 15 Jan 2015 18:34:31 -0800 Message-ID: <54B878B7.7050206@freebsd.org> Date: Thu, 15 Jan 2015 18:34:31 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Navdeep Parhar , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277227 - in head/sys: amd64/conf arm/conf conf modules powerpc/conf References: <201501160139.t0G1dPu5029070@svn.freebsd.org> In-Reply-To: <201501160139.t0G1dPu5029070@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVb4LW+amc3woOTEX1tdwvOMlK9saSF+7h6eDZWT+AlQuQE1eyzu4KNmPs0Jq0aKPBYeqjQm+ToY4ZjaXNBNp/JkuKc0OO9Fkw0= X-Sonic-ID: C;FKtmMyid5BGx4dmh1eMT4g== M;dKuXMyid5BGx4dmh1eMT4g== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 02:34:34 -0000 On 01/15/15 17:39, Navdeep Parhar wrote: > Author: np > Date: Fri Jan 16 01:39:24 2015 > New Revision: 277227 > URL: https://svnweb.freebsd.org/changeset/base/277227 > > Log: > Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it > on amd64 only. > > Modified: > head/sys/amd64/conf/NOTES > head/sys/arm/conf/NOTES > head/sys/conf/NOTES > head/sys/modules/Makefile > head/sys/powerpc/conf/NOTES > > > > Modified: head/sys/modules/Makefile > ============================================================================== > --- head/sys/modules/Makefile Fri Jan 16 01:32:40 2015 (r277226) > +++ head/sys/modules/Makefile Fri Jan 16 01:39:24 2015 (r277227) > @@ -443,7 +443,8 @@ _ti= ti > _txp= txp > .endif > > -.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} == "amd64" > +.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ > + ${MACHINE_CPUARCH} != "powerpc" > _cxgbe= cxgbe > .endif Don't you want MACHINE_ARCH != powerpc here rather than MACHINE_CPUARCH if it builds on powerpc64? -Nathan > > Modified: head/sys/powerpc/conf/NOTES > ============================================================================== > --- head/sys/powerpc/conf/NOTES Fri Jan 16 01:32:40 2015 (r277226) > +++ head/sys/powerpc/conf/NOTES Fri Jan 16 01:39:24 2015 (r277227) > @@ -57,6 +57,7 @@ device adm1030 # Apple G4 MDD fan cont > # Devices we don't want to deal with > > nodevice bktr > +nodevice cxgbe # XXX: builds on powerpc64 only. > nodevice fdc > nodevice ppc > nodevice splash > From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 02:43:50 2015 Return-Path: Delivered-To: svn-src-head@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 8D39B27D; Fri, 16 Jan 2015 02:43:50 +0000 (UTC) Received: from mail-pd0-x22c.google.com (mail-pd0-x22c.google.com [IPv6:2607:f8b0:400e:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5724D7B5; Fri, 16 Jan 2015 02:43:50 +0000 (UTC) Received: by mail-pd0-f172.google.com with SMTP id y13so19915468pdi.3; Thu, 15 Jan 2015 18:43:50 -0800 (PST) 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 :in-reply-to:user-agent; bh=7J26gIiiMQhhphjWPYZRGCWXS6CIUQqTgAOcBN7mYvo=; b=XPKkee8jecE/aNpz04iQllQsnm/MAvs8N6/scTr/KjtvKHmAph8RmNFbU5O7uq1GiW EF+SwGDuUSgYI9b5pPrtzFHi/NY/YNLWqC6U+eeLi3LD0+dh3/hhjJKlVEueoUIKSvNx s/AYCt7SvaNTIpYRYdUV2/ZMNuDiCDn+3evXVlHUZRa2vEQHC8CGy+BkT7Sxfsh0swDA BgRP5mOK0tP/DwjhmHOmq0dSwpuWgtxDwUI2M1g5/s17sP0ficB8B2OrEeOfwZGaRJA2 o5Q3hutgQ1H5jxRwpEk3z4kYuexhZu8xn/SjpZXY+Afzu5VA59hMvBv7d8+HZz6ns3nU LbuQ== X-Received: by 10.70.135.165 with SMTP id pt5mr18606249pdb.37.1421376229923; Thu, 15 Jan 2015 18:43:49 -0800 (PST) Received: from ox ([24.6.44.228]) by mx.google.com with ESMTPSA id qv9sm2618006pab.27.2015.01.15.18.43.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 15 Jan 2015 18:43:48 -0800 (PST) Sender: Navdeep Parhar Date: Thu, 15 Jan 2015 18:43:40 -0800 From: Navdeep Parhar To: Nathan Whitehorn Subject: Re: svn commit: r277227 - in head/sys: amd64/conf arm/conf conf modules powerpc/conf Message-ID: <20150116024340.GA4923@ox> Mail-Followup-To: Nathan Whitehorn , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201501160139.t0G1dPu5029070@svn.freebsd.org> <54B878B7.7050206@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B878B7.7050206@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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 02:43:50 -0000 On Thu, Jan 15, 2015 at 06:34:31PM -0800, Nathan Whitehorn wrote: > > On 01/15/15 17:39, Navdeep Parhar wrote: > >Author: np > >Date: Fri Jan 16 01:39:24 2015 > >New Revision: 277227 > >URL: https://svnweb.freebsd.org/changeset/base/277227 > > > >Log: > > Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it > > on amd64 only. > > > >Modified: > > head/sys/amd64/conf/NOTES > > head/sys/arm/conf/NOTES > > head/sys/conf/NOTES > > head/sys/modules/Makefile > > head/sys/powerpc/conf/NOTES > > > > > > > >Modified: head/sys/modules/Makefile > >============================================================================== > >--- head/sys/modules/Makefile Fri Jan 16 01:32:40 2015 (r277226) > >+++ head/sys/modules/Makefile Fri Jan 16 01:39:24 2015 (r277227) > >@@ -443,7 +443,8 @@ _ti= ti > > _txp= txp > > .endif > >-.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} == "amd64" > >+.if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ > >+ ${MACHINE_CPUARCH} != "powerpc" > > _cxgbe= cxgbe > > .endif > > Don't you want MACHINE_ARCH != powerpc here rather than > MACHINE_CPUARCH if it builds on powerpc64? > -Nathan Hmm, I think you're right. I'll try building with MACHINE_ARCH and commit if it succeeds. Regards, Navdeep From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 03:39:39 2015 Return-Path: Delivered-To: svn-src-head@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 4048EA9C; Fri, 16 Jan 2015 03:39: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 2CD5ECED; Fri, 16 Jan 2015 03:39: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 t0G3ddDQ085734; Fri, 16 Jan 2015 03:39:39 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G3ddGG085733; Fri, 16 Jan 2015 03:39:39 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501160339.t0G3ddGG085733@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 16 Jan 2015 03:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277230 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 03:39:39 -0000 Author: np Date: Fri Jan 16 03:39:38 2015 New Revision: 277230 URL: https://svnweb.freebsd.org/changeset/base/277230 Log: Build cxgbe(4) on powerpc64 too. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Jan 16 02:20:24 2015 (r277229) +++ head/sys/modules/Makefile Fri Jan 16 03:39:38 2015 (r277230) @@ -444,7 +444,7 @@ _txp= txp .endif .if ${MK_SOURCELESS_UCODE} != "no" && ${MACHINE_CPUARCH} != "arm" && \ - ${MACHINE_CPUARCH} != "powerpc" + ${MACHINE_ARCH} != "powerpc" _cxgbe= cxgbe .endif From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 06:19:06 2015 Return-Path: Delivered-To: svn-src-head@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 D6EB1F26; Fri, 16 Jan 2015 06:19: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 C3B21D88; Fri, 16 Jan 2015 06:19: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 t0G6J665060302; Fri, 16 Jan 2015 06:19:06 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6J6Cg060301; Fri, 16 Jan 2015 06:19:06 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6J6Cg060301@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277231 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:07 -0000 Author: imp Date: Fri Jan 16 06:19:05 2015 New Revision: 277231 URL: https://svnweb.freebsd.org/changeset/base/277231 Log: Add back a couple PC Card devices to amd64. There's only a couple of them that were popular enough, so this doesn't adversly affect build times. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Fri Jan 16 03:39:38 2015 (r277230) +++ head/sys/modules/Makefile Fri Jan 16 06:19:05 2015 (r277231) @@ -474,6 +474,7 @@ _cardbus= cardbus _cbb= cbb _cpuctl= cpuctl _cpufreq= cpufreq +_cs= cs _dpms= dpms _drm= drm _drm2= drm2 @@ -482,9 +483,11 @@ _dtrace= dtrace .endif _ed= ed _em= em +_ep= ep _et= et _exca= exca _ext2fs= ext2fs +_fe= fe _filemon= filemon _i2c= i2c .if ${MK_OFED} != "no" || defined(ALL_MODULES) @@ -519,6 +522,7 @@ _vmware= vmware _vxge= vxge _wbwd= wbwd _wi= wi +_xe= xe .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs .endif @@ -625,10 +629,7 @@ _coff= coff .if ${MK_SOURCELESS_UCODE} != "no" _cp= cp .endif -_cs= cs _elink= elink -_ep= ep -_fe= fe _glxiic= glxiic _glxsb= glxsb _ibcs2= ibcs2 @@ -644,7 +645,6 @@ _streams= streams _stg= stg _svr4= svr4 _wds= wds -_xe= xe .if ${MACHINE} == "i386" .if ${MK_EISA} != "no" _ahb= ahb From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 06:19:10 2015 Return-Path: Delivered-To: svn-src-head@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 1FEE8A0; Fri, 16 Jan 2015 06:19: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 0B0EFD89; Fri, 16 Jan 2015 06:19: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 t0G6J9sC060361; Fri, 16 Jan 2015 06:19:09 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6J9mC060351; Fri, 16 Jan 2015 06:19:09 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6J9mC060351@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277232 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:10 -0000 Author: imp Date: Fri Jan 16 06:19:08 2015 New Revision: 277232 URL: https://svnweb.freebsd.org/changeset/base/277232 Log: Back out the refactor. It turns out to cause interrupt storms on resume sometimes (but not others). On powerup, other wierd issues show up (sometimes the card comes up, but with really bogus pci config space stuff. There may be more, but given my experience of historical fussiness, stick to what works and make more minimal changes to that. Modified: head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:08 2015 (r277232) @@ -477,7 +477,7 @@ cbb_event_thread(void *arg) */ mtx_lock(&Giant); status = cbb_get(sc, CBB_SOCKET_STATE); - DEVPRINTF((sc->dev, "Status is %#x\n", status)); + DPRINTF(("Status is 0x%x\n", status)); if (!CBB_CARD_PRESENT(status)) { not_a_card = 0; /* We know card type */ cbb_removal(sc); @@ -800,14 +800,13 @@ cbb_power(device_t brdev, int volts) if (on) { mtx_lock(&sc->mtx); cnt = sc->powerintr; - /* * We have a shortish timeout of 500ms here. Some bridges do - * not generate a POWER_CYCLE event for 16-bit cards. In those - * cases, we have to cope the best we can, and having only a - * short delay is better than the alternatives. Others raise - * the power cycle a smidge before it is really ready. We deal - * with those below. + * not generate a POWER_CYCLE event for 16-bit cards. In + * those cases, we have to cope the best we can, and having + * only a short delay is better than the alternatives. Others + * raise the power cycle a smidge before it is really ready. + * We deal with those below. */ sane = 10; while (!(cbb_get(sc, CBB_SOCKET_STATE) & CBB_STATE_POWER_CYCLE) && @@ -817,18 +816,19 @@ cbb_power(device_t brdev, int volts) /* * Relax for 100ms. Some bridges appear to assert this signal - * right away, but before the card has stabilized. Other cards - * need need more time to cope up reliabily. Experiments with - * troublesome setups show this to be a "cheap" way to enhance - * reliabilty. + * right away, but before the card has stabilized. Other + * cards need need more time to cope up reliabily. + * Experiments with troublesome setups show this to be a + * "cheap" way to enhance reliabilty. We need not do this for + * "off" since we don't touch the card after we turn it off. */ pause("cbbPwr", min(hz / 10, 1)); /* - * The TOPIC95B requires a little bit extra time to get its act - * together, so delay for an additional 100ms. Also as - * documented below, it doesn't seem to set the POWER_CYCLE bit, - * so don't whine if it never came on. + * The TOPIC95B requires a little bit extra time to get its + * act together, so delay for an additional 100ms. Also as + * documented below, it doesn't seem to set the POWER_CYCLE + * bit, so don't whine if it never came on. */ if (sc->chipset == CB_TOPIC95) pause("cbb95B", hz / 10); @@ -838,27 +838,26 @@ cbb_power(device_t brdev, int volts) /* * After the power is good, we can turn off the power interrupt. - * However, the PC Card standard says that we must delay turning the CD - * bit back on for a bit to allow for bouncyness on power down. We just - * pause a little below to cover that. Most bridges don't seem to need - * this delay. + * However, the PC Card standard says that we must delay turning the + * CD bit back on for a bit to allow for bouncyness on power down + * (recall that we don't wait above for a power down, since we don't + * get an interrupt for that). We're called either from the suspend + * code in which case we don't want to turn card change on again, or + * we're called from the card insertion code, in which case the cbb + * thread will turn it on for us before it waits to be woken by a + * change event. * - * NB: Topic95B doesn't set the power cycle bit. We assume that - * both it and the TOPIC95 behave the same, though despite efforts - * to find one, the author never could locate a laptop with a TOPIC95 - * in it. + * NB: Topic95B doesn't set the power cycle bit. we assume that + * both it and the TOPIC95 behave the same. */ cbb_clrb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_POWER); status = cbb_get(sc, CBB_SOCKET_STATE); if (on && sc->chipset != CB_TOPIC95) { if ((status & CBB_STATE_POWER_CYCLE) == 0) device_printf(sc->dev, "Power not on?\n"); - } else { - pause("cbbDwn", hz / 10); } if (status & CBB_STATE_BAD_VCC_REQ) { - device_printf(sc->dev, "Bad Vcc requested status %#x %dV\n", - status, volts); + device_printf(sc->dev, "Bad Vcc requested\n"); /* * Turn off the power, and try again. Retrigger other * active interrupts via force register. From NetBSD @@ -1564,6 +1563,61 @@ cbb_write_ivar(device_t brdev, device_t } int +cbb_suspend(device_t self) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(self); + + error = bus_generic_suspend(self); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +int +cbb_resume(device_t self) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); + uint32_t tmp; + + /* + * In the APM and early ACPI era, BIOSes saved the PCI config + * registers. As chips became more complicated, that functionality moved + * into the ACPI code / tables. We must therefore, restore the settings + * we made here to make sure the device come back. Transitions to Dx + * from D0 and back to D0 cause the bridge to lose its config space, so + * all the bus mappings and such are preserved. + * + * For most drivers, the PCI layer handles this saving. However, since + * there's much black magic and arcane art hidden in these few lines of + * code that would be difficult to transition into the PCI + * layer. chipinit was several years of trial and error to write. + */ + pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); + DEVPRINTF((self, "PCI Memory allocated: %08lx\n", + rman_get_start(sc->base_res))); + + sc->chipinit(sc); + + /* reset interrupt -- Do we really need to do this? */ + tmp = cbb_get(sc, CBB_SOCKET_EVENT); + cbb_set(sc, CBB_SOCKET_EVENT, tmp); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* Signal the thread to wakeup. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(self); + + return (error); +} + +int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: head/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:08 2015 (r277232) @@ -203,27 +203,13 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } -static int -cbb_isa_suspend(device_t dev) -{ - - return 0; -} - -static int -cbb_isa_resume(device_t dev) -{ - - return 0; -} - static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_isa_suspend), - DEVMETHOD(device_resume, cbb_isa_resume), + DEVMETHOD(device_suspend, cbb_suspend), + DEVMETHOD(device_resume, cbb_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:08 2015 (r277232) @@ -301,41 +301,6 @@ cbb_print_config(device_t dev) printf("\n"); } -static void -cbb_pci_bridge_init(device_t brdev) -{ - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); - u_int32_t membase, irq; - - if (pci_get_powerstate(brdev) != PCI_POWERSTATE_D0) { - /* Reset the power state. */ - device_printf(brdev, "chip is in D%d power mode " - "-- setting to D0\n", pci_get_powerstate(brdev)); - pci_set_powerstate(brdev, PCI_POWERSTATE_D0); - } - membase = rman_get_start(sc->base_res); - irq = rman_get_start(sc->irq_res); - - pci_write_config(brdev, CBBR_SOCKBASE, membase, 4); - pci_write_config(brdev, PCIR_INTLINE, irq, 4); - PCI_ENABLE_IO(device_get_parent(brdev), brdev, SYS_RES_MEMORY); - - exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); - sc->chipinit(sc); - - /* reset 16-bit pcmcia bus */ - exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); - - /* turn off power */ - cbb_power(brdev, CARD_OFF); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* reset interrupt */ - cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); -} - static int cbb_pci_attach(device_t brdev) { @@ -380,9 +345,11 @@ cbb_pci_attach(device_t brdev) sc->bst = rman_get_bustag(sc->base_res); sc->bsh = rman_get_bushandle(sc->base_res); + exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); sc->exca[0].flags |= EXCA_HAS_MEMREG_WIN; sc->exca[0].chipset = EXCA_CARDBUS; sc->chipinit = cbb_chipinit; + sc->chipinit(sc); /*Sysctls*/ sctx = device_get_sysctl_ctx(brdev); @@ -460,7 +427,17 @@ cbb_pci_attach(device_t brdev) goto err; } - cbb_pci_bridge_init(brdev); + /* reset 16-bit pcmcia bus */ + exca_clrb(&sc->exca[0], EXCA_INTR, EXCA_INTR_RESET); + + /* turn off power */ + cbb_power(brdev, CARD_OFF); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* reset interrupt */ + cbb_set(sc, CBB_SOCKET_EVENT, cbb_get(sc, CBB_SOCKET_EVENT)); if (bootverbose) cbb_print_config(brdev); @@ -900,45 +877,14 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } -static int -cbb_pci_suspend(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(brdev); - - error = bus_generic_suspend(brdev); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -static int -cbb_pci_resume(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); - - /* Reinitialize the hardware, ala attach */ - cbb_pci_bridge_init(brdev); - - /* Signal the thread to wakeup to see if we have any cards to work with. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(brdev); - - return (error); -} - static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_pci_suspend), - DEVMETHOD(device_resume, cbb_pci_resume), + DEVMETHOD(device_suspend, cbb_suspend), + DEVMETHOD(device_resume, cbb_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbbvar.h ============================================================================== --- head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:05 2015 (r277231) +++ head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:08 2015 (r277232) @@ -134,9 +134,11 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); +int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); +int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 06:19:25 2015 Return-Path: Delivered-To: svn-src-head@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 172C7205; Fri, 16 Jan 2015 06: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 DE658D91; Fri, 16 Jan 2015 06:19: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 t0G6JOCZ060438; Fri, 16 Jan 2015 06:19:24 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6JOZl060437; Fri, 16 Jan 2015 06:19:24 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6JOZl060437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277233 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:25 -0000 Author: imp Date: Fri Jan 16 06:19:24 2015 New Revision: 277233 URL: https://svnweb.freebsd.org/changeset/base/277233 Log: Suspend and resume were the only two functions not to follow the brdev convention here, so fix that. Modified: head/sys/dev/pccbb/pccbb.c Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:08 2015 (r277232) +++ head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:24 2015 (r277233) @@ -1563,12 +1563,12 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t self) +cbb_suspend(device_t brdev) { int error = 0; - struct cbb_softc *sc = device_get_softc(self); + struct cbb_softc *sc = device_get_softc(brdev); - error = bus_generic_suspend(self); + error = bus_generic_suspend(brdev); if (error != 0) return (error); cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ @@ -1577,10 +1577,10 @@ cbb_suspend(device_t self) } int -cbb_resume(device_t self) +cbb_resume(device_t brdev) { int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(self); + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); uint32_t tmp; /* @@ -1596,8 +1596,8 @@ cbb_resume(device_t self) * code that would be difficult to transition into the PCI * layer. chipinit was several years of trial and error to write. */ - pci_write_config(self, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((self, "PCI Memory allocated: %08lx\n", + pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); + DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", rman_get_start(sc->base_res))); sc->chipinit(sc); @@ -1612,7 +1612,7 @@ cbb_resume(device_t self) /* Signal the thread to wakeup. */ wakeup(&sc->intrhand); - error = bus_generic_resume(self); + error = bus_generic_resume(brdev); return (error); } From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 06:19:41 2015 Return-Path: Delivered-To: svn-src-head@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 25219343; Fri, 16 Jan 2015 06:19: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 11722D9B; Fri, 16 Jan 2015 06:19: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 t0G6JeA2060516; Fri, 16 Jan 2015 06:19:40 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6JeqK060512; Fri, 16 Jan 2015 06:19:40 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6JeqK060512@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277234 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:41 -0000 Author: imp Date: Fri Jan 16 06:19:39 2015 New Revision: 277234 URL: https://svnweb.freebsd.org/changeset/base/277234 Log: Move the suspsned and resume functions to the bus attachment. They were accessing PCI config registers, which won't work for the ISA version. Modified: head/sys/dev/pccbb/pccbb.c head/sys/dev/pccbb/pccbb_isa.c head/sys/dev/pccbb/pccbb_pci.c head/sys/dev/pccbb/pccbbvar.h Modified: head/sys/dev/pccbb/pccbb.c ============================================================================== --- head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbb.c Fri Jan 16 06:19:39 2015 (r277234) @@ -1563,61 +1563,6 @@ cbb_write_ivar(device_t brdev, device_t } int -cbb_suspend(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = device_get_softc(brdev); - - error = bus_generic_suspend(brdev); - if (error != 0) - return (error); - cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ - sc->cardok = 0; /* Card is bogus now */ - return (0); -} - -int -cbb_resume(device_t brdev) -{ - int error = 0; - struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); - uint32_t tmp; - - /* - * In the APM and early ACPI era, BIOSes saved the PCI config - * registers. As chips became more complicated, that functionality moved - * into the ACPI code / tables. We must therefore, restore the settings - * we made here to make sure the device come back. Transitions to Dx - * from D0 and back to D0 cause the bridge to lose its config space, so - * all the bus mappings and such are preserved. - * - * For most drivers, the PCI layer handles this saving. However, since - * there's much black magic and arcane art hidden in these few lines of - * code that would be difficult to transition into the PCI - * layer. chipinit was several years of trial and error to write. - */ - pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); - DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", - rman_get_start(sc->base_res))); - - sc->chipinit(sc); - - /* reset interrupt -- Do we really need to do this? */ - tmp = cbb_get(sc, CBB_SOCKET_EVENT); - cbb_set(sc, CBB_SOCKET_EVENT, tmp); - - /* CSC Interrupt: Card detect interrupt on */ - cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); - - /* Signal the thread to wakeup. */ - wakeup(&sc->intrhand); - - error = bus_generic_resume(brdev); - - return (error); -} - -int cbb_child_present(device_t parent, device_t child) { struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(parent); Modified: head/sys/dev/pccbb/pccbb_isa.c ============================================================================== --- head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbb_isa.c Fri Jan 16 06:19:39 2015 (r277234) @@ -203,13 +203,25 @@ cbb_isa_attach(device_t dev) return (ENOMEM); } +static int +cbb_isa_suspend(device_t dev) +{ + return (0); +} + +static int +cbb_isa_resume(device_t dev) +{ + return (0); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_isa_probe), DEVMETHOD(device_attach, cbb_isa_attach), DEVMETHOD(device_detach, cbb_detach), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_isa_suspend), + DEVMETHOD(device_resume, cbb_isa_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:39 2015 (r277234) @@ -877,14 +877,69 @@ cbb_write_config(device_t brdev, u_int b b, s, f, reg, val, width); } +static int +cbb_pci_suspend(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = device_get_softc(brdev); + + error = bus_generic_suspend(brdev); + if (error != 0) + return (error); + cbb_set(sc, CBB_SOCKET_MASK, 0); /* Quiet hardware */ + sc->cardok = 0; /* Card is bogus now */ + return (0); +} + +static int +cbb_pci_resume(device_t brdev) +{ + int error = 0; + struct cbb_softc *sc = (struct cbb_softc *)device_get_softc(brdev); + uint32_t tmp; + + /* + * In the APM and early ACPI era, BIOSes saved the PCI config + * registers. As chips became more complicated, that functionality moved + * into the ACPI code / tables. We must therefore, restore the settings + * we made here to make sure the device come back. Transitions to Dx + * from D0 and back to D0 cause the bridge to lose its config space, so + * all the bus mappings and such are preserved. + * + * For most drivers, the PCI layer handles this saving. However, since + * there's much black magic and arcane art hidden in these few lines of + * code that would be difficult to transition into the PCI + * layer. chipinit was several years of trial and error to write. + */ + pci_write_config(brdev, CBBR_SOCKBASE, rman_get_start(sc->base_res), 4); + DEVPRINTF((brdev, "PCI Memory allocated: %08lx\n", + rman_get_start(sc->base_res))); + + sc->chipinit(sc); + + /* reset interrupt -- Do we really need to do this? */ + tmp = cbb_get(sc, CBB_SOCKET_EVENT); + cbb_set(sc, CBB_SOCKET_EVENT, tmp); + + /* CSC Interrupt: Card detect interrupt on */ + cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); + + /* Signal the thread to wakeup. */ + wakeup(&sc->intrhand); + + error = bus_generic_resume(brdev); + + return (error); +} + static device_method_t cbb_methods[] = { /* Device interface */ DEVMETHOD(device_probe, cbb_pci_probe), DEVMETHOD(device_attach, cbb_pci_attach), DEVMETHOD(device_detach, cbb_detach), DEVMETHOD(device_shutdown, cbb_pci_shutdown), - DEVMETHOD(device_suspend, cbb_suspend), - DEVMETHOD(device_resume, cbb_resume), + DEVMETHOD(device_suspend, cbb_pci_suspend), + DEVMETHOD(device_resume, cbb_pci_resume), /* bus methods */ DEVMETHOD(bus_read_ivar, cbb_read_ivar), Modified: head/sys/dev/pccbb/pccbbvar.h ============================================================================== --- head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:24 2015 (r277233) +++ head/sys/dev/pccbb/pccbbvar.h Fri Jan 16 06:19:39 2015 (r277234) @@ -134,11 +134,9 @@ int cbb_read_ivar(device_t brdev, device uintptr_t *result); int cbb_release_resource(device_t brdev, device_t child, int type, int rid, struct resource *r); -int cbb_resume(device_t self); int cbb_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filt, driver_intr_t *intr, void *arg, void **cookiep); -int cbb_suspend(device_t self); int cbb_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); int cbb_write_ivar(device_t brdev, device_t child, int which, From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 06:19:53 2015 Return-Path: Delivered-To: svn-src-head@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 BBB8D481; Fri, 16 Jan 2015 06:19: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 A84A8D9F; Fri, 16 Jan 2015 06:19: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 t0G6Jrjp060582; Fri, 16 Jan 2015 06:19:53 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G6JrlC060581; Fri, 16 Jan 2015 06:19:53 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501160619.t0G6JrlC060581@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 16 Jan 2015 06:19:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277235 - head/sys/dev/pccbb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 06:19:53 -0000 Author: imp Date: Fri Jan 16 06:19:52 2015 New Revision: 277235 URL: https://svnweb.freebsd.org/changeset/base/277235 Log: Always enable I/O, memory and dma cycles. Some BIOSes don't enable them, sometimes they are reset for power state transitions or during whatever happens while suspended. Also, it is good practice to always do this. Modified: head/sys/dev/pccbb/pccbb_pci.c Modified: head/sys/dev/pccbb/pccbb_pci.c ============================================================================== --- head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:39 2015 (r277234) +++ head/sys/dev/pccbb/pccbb_pci.c Fri Jan 16 06:19:52 2015 (r277235) @@ -479,10 +479,10 @@ cbb_chipinit(struct cbb_softc *sc) pci_write_config(sc->dev, PCIR_SECBUS_2, sc->bus.sec, 1); pci_write_config(sc->dev, PCIR_SUBBUS_2, sc->bus.sub, 1); - /* Enable memory access */ + /* Enable DMA, memory access for this card and I/O acces for children */ pci_enable_busmaster(sc->dev); - /* XXX: This should not be necessary, but some chipsets require it */ - PCI_MASK_CONFIG(sc->dev, PCIR_COMMAND, | PCIM_CMD_PORTEN, 2); + pci_enable_io(sc->dev, SYS_RES_IOPORT); + pci_enable_io(sc->dev, SYS_RES_MEMORY); /* disable Legacy IO */ switch (sc->chipset) { From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 07:06:59 2015 Return-Path: Delivered-To: svn-src-head@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 8E10896B; Fri, 16 Jan 2015 07:06: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 7A9C725B; Fri, 16 Jan 2015 07:06: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 t0G76xsY083478; Fri, 16 Jan 2015 07:06:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G76xmr083477; Fri, 16 Jan 2015 07:06:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501160706.t0G76xmr083477@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 16 Jan 2015 07:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277236 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 07:06:59 -0000 Author: kib Date: Fri Jan 16 07:06:58 2015 New Revision: 277236 URL: https://svnweb.freebsd.org/changeset/base/277236 Log: For sigaction(2), ignore possible garbage in sa_flags for sa_handler == SIG_DFL or SIG_IGN. Sloppy code does not fully initialize struct sigaction for such cases, and being too demanding in the case of default handler does not catch anything. Reported and tested by: Alex Tutubalin Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Jan 16 06:19:52 2015 (r277235) +++ head/sys/kern/kern_sig.c Fri Jan 16 07:06:58 2015 (r277236) @@ -653,9 +653,10 @@ kern_sigaction(td, sig, act, oact, flags if (!_SIG_VALID(sig)) return (EINVAL); - if (act != NULL && (act->sa_flags & ~(SA_ONSTACK | SA_RESTART | - SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | - SA_SIGINFO)) != 0) + if (act != NULL && act->sa_handler != SIG_DFL && + act->sa_handler != SIG_IGN && (act->sa_flags & ~(SA_ONSTACK | + SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | + SA_NOCLDWAIT | SA_SIGINFO)) != 0) return (EINVAL); PROC_LOCK(p); From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 08:03:40 2015 Return-Path: Delivered-To: svn-src-head@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 7381DB5; Fri, 16 Jan 2015 08:03:40 +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 C4890A39; Fri, 16 Jan 2015 08:03:39 +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 t0G83XxQ004003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Jan 2015 10:03:33 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0G83XxQ004003 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0G83WPm004002; Fri, 16 Jan 2015 10:03:32 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Jan 2015 10:03:32 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150116080332.GE42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B7AF2F.3080802@selasky.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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 08:03:40 -0000 On Thu, Jan 15, 2015 at 01:14:39PM +0100, Hans Petter Selasky wrote: > On 01/15/15 12:51, Konstantin Belousov wrote: > > On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: > >> > >> I see no leakage in that case either! > > Because these cases come through destroy_dev(). > > > >> > >> Are there more cases which I don't see? > > You are breaking existig devfs KPI by your hack. You introduce yet another > > reference on the device, which is not supposed to be there. > > Hi Konstantin, > > I need a non-sleeping way to say a character device is no longer > supposed to be used and be able to re-use the device name right away > creating a new device. I guess you got that. Yes, I got it. The devfs design is not suitable for this, and your hack is the good witness of the fact. My opinion is that you should have tried to handle the issue at the driver level, instead of making this devfs issue. I.e., if you already have cdev node with the correct name, driver should have replaced the private data to point to new device. This would also close a window where /dev node is non-existent or operate erronously. > > > > > If some code calls delist_dev(), it could be said that it is a contract > > of the new function that destroy_dev() must be called eventually on > > the cdev. Then, the reference could be said to be shared-owned by > > delist_dev() and destroy_dev(). But, for arbitrary devfs user this new > > reference is unacceptable and breaks interface. > > delist_dev() changes no references. It can be called multiple times > even, also inside destroy_devl(). Also I think that the > "destroy_dev_sched_cbl()" function should call delist_dev() first so > that we don't have a time from when the "destroy_dev_sched_cbl()" > function is called where the device entry still exists in devfs mounts > until the final destroy_devl() is done by a taskqueue. You do not understand my point. I object against imposing one additional global reference on all cdevs just to cope with the delist hack. See the patch at the end of the message. WRT destroy_dev_sched_cb() calling delist_dev(), even after calling delist_dev(), the node still exists in the /dev. It is only removed after populate loop is run sometime later. dev_sched() KPI is inheritly racy, drivers must handle the races for other reasons. > > >>>> In the case of direct free through #1, the reference count is ignored > >>>> and it doesn't matter if it is one or zero. Only in the case of > >>>> destruction through destroy_dev() it matters. > >>>> > >>>> Like the comment says in destroy_devl(): > >>>> > >>>> /* Avoid race with dev_rel() */ > >>>> > >>>> The problem is that the "cdev->si_refcount" is zero when the initial > >>>> devfs_create() is called. Then one ref is made. When we clear the > >>>> CDP_ACTIVE flag in devfs_destroy() it instructs a !parallel! running > >>>> process to destroy all the FS related structures and the reference count > >>>> goes back to zero when the "cdp" is removed from the "cdevp_list". Then > >>>> the cdev is freed too early. This happens because destroy_devl() is > >>>> dropping the dev_lock() to sleep waiting for pending references. > >>> Basically, this is very good explanation why your delist hack is wrong, > >>> for one of the reason. Another reason is explained below. > >>> You are trying to cover it with additional reference, but this is wrong > >>> as well. > >>> > >>>> > >>>> Do you see something else? > >>> > >>> I think that what you are trying to do with the CDP_ACTIVE hack is doomed > >>> anyway, because you are allowing for devfs directory to have two entries > >>> with the same name, until the populate loop cleans up the inactive one. > >>> In the meantime, any access to the directory operates on random entry. > >> > >> The entry will not be random, because upon an open() call to a character > >> device, I believe the devfs_lookup() function will be called, which > >> always populate the devfs tree at first by calls to > >> devfs_populate_xxx(). Any delisted devices which don't have the > >> "CDP_ACTIVE" bit set, will never be seen by any open. > > Entry can be random, since after the populate loop is ran, your code in > > other thread could start and create duplicate entry. There is a window > > in the lookup where both directory vnode lock and mount point sx locks > > are dropped. So running the populate does not guarantee anything. > > If there is such a race, it is already there! My patch changes nothing > in that area: > > Thread1: > Calls destroy_dev() and clears CDP_ACTIVE, after dev_unlock() it goes > waiting for some refs for xxx milliseconds. > Thread2: > Tries to create create a new character device having the same name like > the one in thread1. Device name duplication check is missed because > CDP_ACTIVE is cleared. Still thread1 is waiting. > Thread3: > Tries to open character device created by thread2 while thread1 is still > waiting for some ref held by a userspace app to go away. > > This can happen already before my patches! What do you think? Possibly. > > > > >> > >> Regarding leftover filedescriptors which still access the old "cdev" > >> this is not a problem, and these will be closed when the si_refcount > >> goes to zero after the destroy_devl() call. > >> > >>> > >>> The checks for existent names in make_dev() are performed for the reason, > >>> and you makes the rounds to effectively ignore it. > >>> > >> > >> These checks are still correct and don't conflict with my patch from > >> what I can see. Else the existing destroy_devl() would also be broken > >> even before my patch with regard to the "random" selection of character > >> devices at open() from userspace. > > > > The checks are done to avoid duplicate names. Your patch makes these > > checks ineffective (i.e. broken). > > At what level do you mean duplicate names, I don't get this fully? At > the directory level (DE nodes)? Or inside the list of character devices > (LIST_XXX)? It does not matter, dup at either one directory level, or dup of full names in the global list are equivalent (bad) things. > > > Let me summarize: > > - the extra reference on arbitrary cdev should be eliminated. The > > delist_dev_locked() may add the ref and set some CDP_ flag to > > indicate to destroy_dev() that it should do dev_rel(). > > It is possible to do this. I thought about this before doing my patch, > but decided to try to avoid adding yet another cdev flag. > > > - the existence of the duplicated entries should be either eliminated > > (I am not sure it is possible with your code), or we must ensure > > that only one name with CDP_ACTIVE flag set and given name exists. > > Then, all lookup code must be audited to take CDP_ACTIVE into account > > when accessing names. I see at least devfs_find() and devfs_mknod() > > which must be changed. I did not performed full audit. > > I will check this path out aswell. > It seems it is simpler for me to try to clean up after the commit. The patch was only lightly tested. I post the patch for discussion, not for you to committing it. I will expedite the change into HEAD after the consensus on it is made and adequate testing is performed. diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c index 294bd62..6620aef 100644 --- a/sys/fs/devfs/devfs_devs.c +++ b/sys/fs/devfs/devfs_devs.c @@ -137,12 +137,6 @@ devfs_alloc(int flags) vfs_timestamp(&ts); cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; cdev->si_cred = NULL; - /* - * Avoid race with dev_rel() by setting the initial - * reference count to 1. This last reference is taken - * by the destroy_dev() function. - */ - cdev->si_refcount = 1; return (cdev); } @@ -192,6 +186,16 @@ devfs_find(struct devfs_dirent *dd, const char *name, int namelen, int type) continue; if (type != 0 && type != de->de_dirent->d_type) continue; + + /* + * The race with finding non-active name is not + * completely closed by the check, but it is similar + * to the devfs_allocv() in making it unlikely enough. + */ + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; + if (bcmp(name, de->de_dirent->d_name, namelen) != 0) continue; break; diff --git a/sys/fs/devfs/devfs_int.h b/sys/fs/devfs/devfs_int.h index ce55416..6c57109 100644 --- a/sys/fs/devfs/devfs_int.h +++ b/sys/fs/devfs/devfs_int.h @@ -56,6 +56,7 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) +#define CDP_UNREF_DTR (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index 9153588..570f710 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1045,6 +1045,9 @@ devfs_mknod(struct vop_mknod_args *ap) TAILQ_FOREACH(de, &dd->de_dlist, de_list) { if (cnp->cn_namelen != de->de_dirent->d_namlen) continue; + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; if (bcmp(cnp->cn_nameptr, de->de_dirent->d_name, de->de_dirent->d_namlen) != 0) continue; diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index bcd6fb9..79c8fea 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -116,6 +116,8 @@ dev_free_devlocked(struct cdev *cdev) mtx_assert(&devmtx, MA_OWNED); cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, + ("destroy_dev() was not called after delist_dev(%p)", cdev)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } @@ -1035,6 +1037,7 @@ destroy_devl(struct cdev *dev) { struct cdevsw *csw; struct cdev_privdata *p; + struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -1043,7 +1046,18 @@ destroy_devl(struct cdev *dev) ("WARNING: Driver mistake: destroy_dev on eternal %d\n", dev2unit(dev))); - devfs_destroy(dev); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* + * Avoid race with dev_rel(), e.g. from the populate + * loop. If CDP_UNREF_DTR flag is set, the reference + * to be dropped at the end of destroy_devl() was + * already taken by delist_dev_locked(). + */ + dev_refl(dev); + + devfs_destroy(dev); + } /* Remove name marking */ dev->si_flags &= ~SI_NAMED; @@ -1103,19 +1117,27 @@ destroy_devl(struct cdev *dev) } } dev->si_flags &= ~SI_ALIAS; - dev->si_refcount--; /* Avoid race with dev_rel() */ + cdp->cdp_flags &= ~CDP_UNREF_DTR; + dev->si_refcount--; - if (dev->si_refcount > 0) { + if (dev->si_refcount > 0) LIST_INSERT_HEAD(&dead_cdevsw.d_devs, dev, si_list); - } else { + else dev_free_devlocked(dev); - } } static void delist_dev_locked(struct cdev *dev) { + struct cdev_priv *cdp; struct cdev *child; + + mtx_assert(&devmtx, MA_OWNED); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) != 0) + return; + cdp->cdp_flags |= CDP_UNREF_DTR; + dev_refl(dev); devfs_destroy(dev); LIST_FOREACH(child, &dev->si_children, si_siblings) delist_dev_locked(child); @@ -1124,6 +1146,7 @@ delist_dev_locked(struct cdev *dev) void delist_dev(struct cdev *dev) { + dev_lock(); delist_dev_locked(dev); dev_unlock(); From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 08:59:27 2015 Return-Path: Delivered-To: svn-src-head@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 C0BA8DB0; Fri, 16 Jan 2015 08:59:27 +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 6172EF70; Fri, 16 Jan 2015 08:59:27 +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 60BD51FE023; Fri, 16 Jan 2015 09:59:23 +0100 (CET) Message-ID: <54B8D31B.9030805@selasky.org> Date: Fri, 16 Jan 2015 10:00:11 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> <20150116080332.GE42409@kib.kiev.ua> In-Reply-To: <20150116080332.GE42409@kib.kiev.ua> 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 08:59:28 -0000 Hi Konstantin, On 01/16/15 09:03, Konstantin Belousov wrote: > On Thu, Jan 15, 2015 at 01:14:39PM +0100, Hans Petter Selasky wrote: >> On 01/15/15 12:51, Konstantin Belousov wrote: >>> On Thu, Jan 15, 2015 at 11:49:09AM +0100, Hans Petter Selasky wrote: >>>> >>>> I see no leakage in that case either! >>> Because these cases come through destroy_dev(). >>> >>>> >>>> Are there more cases which I don't see? >>> You are breaking existig devfs KPI by your hack. You introduce yet another >>> reference on the device, which is not supposed to be there. >> >> Hi Konstantin, >> >> I need a non-sleeping way to say a character device is no longer >> supposed to be used and be able to re-use the device name right away >> creating a new device. I guess you got that. > Yes, I got it. The devfs design is not suitable for this, and your > hack is the good witness of the fact. > > My opinion is that you should have tried to handle the issue at the driver > level, instead of making this devfs issue. I.e., if you already have > cdev node with the correct name, driver should have replaced the private > data to point to new device. I think this way cannot be implemented in a clean way, because of locking order reversal. And if you try to avoid the LOR you end up with the race. Chess mate sort of ;-) Let me explain: Thread 1: usb_sx_lock(); cdev = Look in freelist for existing device(); else cdev = make_dev(); usb_sx_unlock(); Thread 2: usb_sx_lock(); put cdev on freelist usb_sx_unlock(); Thread 3: usb_sx_lock(); cdev = remove first entry in freelist usb_sx_unlock(); /* * XXX because USB needs to call destroy_dev() unlocked we * are racing with Thread 1 again */ destroy_dev(cdev); > > This would also close a window where /dev node is non-existent or operate > erronously. I'm not saying I plan so, but I think "cdevs" at some point need to understand mutexes and locks. That means like with other API's in the kernel we can associate a lock with the "cdev", and this lock is then used to ensure an atomic shutdown of the system in a non-blocking fashion. In my past experience multithreaded APIs should be high level implemented like this: NON-BLOCKING methods: lock(); ** xxx_start(); xxx_stop(); unlock(); BLOCKING methods: setup(); // init unsetup(); // drain Any callbacks should always be called locked ** In devfs there was no non-blocking stop before I added the delist_dev() function. > > You do not understand my point. > > I object against imposing one additional global reference on all cdevs > just to cope with the delist hack. See the patch at the end of the message. It's fine by me. > > WRT destroy_dev_sched_cb() calling delist_dev(), even after calling > delist_dev(), the node still exists in the /dev. It is only removed > after populate loop is run sometime later. dev_sched() KPI is inheritly > racy, drivers must handle the races for other reasons. The populate loop is all running under the dev_lock() from what I can see and make_dev() is also keeping the same lock when inserting and removing new cdevs. The populate loop should always give a consistent view of the character devices available, and I don't see how "cdev" structures without the CDP_ACTIVE flag can appear with recently created ones, even if the name is the same. > >> >>> Entry can be random, since after the populate loop is ran, your code in >>> other thread could start and create duplicate entry. There is a window >>> in the lookup where both directory vnode lock and mount point sx locks >>> are dropped. So running the populate does not guarantee anything. >> >> If there is such a race, it is already there! My patch changes nothing >> in that area: >> >> Thread1: >> Calls destroy_dev() and clears CDP_ACTIVE, after dev_unlock() it goes >> waiting for some refs for xxx milliseconds. >> Thread2: >> Tries to create create a new character device having the same name like >> the one in thread1. Device name duplication check is missed because >> CDP_ACTIVE is cleared. Still thread1 is waiting. >> Thread3: >> Tries to open character device created by thread2 while thread1 is still >> waiting for some ref held by a userspace app to go away. >> >> This can happen already before my patches! What do you think? > Possibly. > >> At what level do you mean duplicate names, I don't get this fully? At >> the directory level (DE nodes)? Or inside the list of character devices >> (LIST_XXX)? > It does not matter, dup at either one directory level, or dup of full > names in the global list are equivalent (bad) things. Like I write above I don't see where the problem is. At the cdev level, we are protecting the cdev's LIST with dev_lock() and only one entry will exist having CDP_ACTIVE bit set per unique cdev name and path. Else we will hit a panic in make_dev() and friends. In the directory entry level the populate loop will also ensure a consistent view, and hence the cdev's LIST is consistent, the view presented to userspace will also be consistent. That system functions can still call into the dangling read/write/ioctl functions is another story, and that is why I tell, that in order to simplify this teardown, we possibly should associate a client selectable lock with each CDEV, for teardown purposes. Like done for several years in the callout and USB APIs and possibly many other places. > >> >>> Let me summarize: >>> - the extra reference on arbitrary cdev should be eliminated. The >>> delist_dev_locked() may add the ref and set some CDP_ flag to >>> indicate to destroy_dev() that it should do dev_rel(). >> >> It is possible to do this. I thought about this before doing my patch, >> but decided to try to avoid adding yet another cdev flag. >> >>> - the existence of the duplicated entries should be either eliminated >>> (I am not sure it is possible with your code), or we must ensure >>> that only one name with CDP_ACTIVE flag set and given name exists. >>> Then, all lookup code must be audited to take CDP_ACTIVE into account >>> when accessing names. I see at least devfs_find() and devfs_mknod() >>> which must be changed. I did not performed full audit. >> >> I will check this path out aswell. >> > > It seems it is simpler for me to try to clean up after the commit. > The patch was only lightly tested. I post the patch for discussion, > not for you to committing it. I will expedite the change into HEAD > after the consensus on it is made and adequate testing is performed. I don't see any problems about your patch, except it adds a bit more code to the kernel. --HPS From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 09:07:32 2015 Return-Path: Delivered-To: svn-src-head@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 047BF1A7; Fri, 16 Jan 2015 09:07: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 E4805DE; Fri, 16 Jan 2015 09:07: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 t0G97Vvt039561; Fri, 16 Jan 2015 09:07:31 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0G97Vo8039560; Fri, 16 Jan 2015 09:07:31 GMT (envelope-from des@FreeBSD.org) Message-Id: <201501160907.t0G97Vo8039560@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Fri, 16 Jan 2015 09:07:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277237 - head/lib/libpam/modules/pam_radius X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 09:07:32 -0000 Author: des Date: Fri Jan 16 09:07:31 2015 New Revision: 277237 URL: https://svnweb.freebsd.org/changeset/base/277237 Log: If PAM_RHOST is non-NULL, pass it in the Calling-Station-ID attribute of the RADIUS access request. MFC after: 1 week Modified: head/lib/libpam/modules/pam_radius/pam_radius.c Modified: head/lib/libpam/modules/pam_radius/pam_radius.c ============================================================================== --- head/lib/libpam/modules/pam_radius/pam_radius.c Fri Jan 16 07:06:58 2015 (r277236) +++ head/lib/libpam/modules/pam_radius/pam_radius.c Fri Jan 16 09:07:31 2015 (r277237) @@ -62,11 +62,11 @@ __FBSDID("$FreeBSD$"); #define PASSWORD_PROMPT "RADIUS Password:" static int build_access_request(struct rad_handle *, const char *, - const char *, const char *, const char *, const void *, - size_t); + const char *, const char *, const char *, const char *, + const void *, size_t); static int do_accept(pam_handle_t *, struct rad_handle *); static int do_challenge(pam_handle_t *, struct rad_handle *, - const char *, const char *, const char *); + const char *, const char *, const char *, const char *); /* * Construct an access request, but don't send it. Returns 0 on success, @@ -75,7 +75,7 @@ static int do_challenge(pam_handle_t *, static int build_access_request(struct rad_handle *radh, const char *user, const char *pass, const char *nas_id, const char *nas_ipaddr, - const void *state, size_t state_len) + const char *rhost, const void *state, size_t state_len) { int error; char host[MAXHOSTNAMELEN]; @@ -121,8 +121,13 @@ build_access_request(struct rad_handle * } } } - if (state != NULL && rad_put_attr(radh, RAD_STATE, state, - state_len) == -1) { + if (rhost != NULL && + rad_put_string(radh, RAD_CALLING_STATION_ID, rhost) == -1) { + syslog(LOG_CRIT, "rad_put_string: %s", rad_strerror(radh)); + return (-1); + } + if (state != NULL && + rad_put_attr(radh, RAD_STATE, state, state_len) == -1) { syslog(LOG_CRIT, "rad_put_attr: %s", rad_strerror(radh)); return (-1); } @@ -162,7 +167,7 @@ do_accept(pam_handle_t *pamh, struct rad static int do_challenge(pam_handle_t *pamh, struct rad_handle *radh, const char *user, - const char *nas_id, const char *nas_ipaddr) + const char *nas_id, const char *nas_ipaddr, const char *rhost) { int retval; int attrtype; @@ -230,7 +235,7 @@ do_challenge(pam_handle_t *pamh, struct conv->appdata_ptr)) != PAM_SUCCESS) return (retval); if (build_access_request(radh, user, resp[num_msgs-1].resp, nas_id, - nas_ipaddr, state, statelen) == -1) + nas_ipaddr, rhost, state, statelen) == -1) return (PAM_SERVICE_ERR); memset(resp[num_msgs-1].resp, 0, strlen(resp[num_msgs-1].resp)); free(resp[num_msgs-1].resp); @@ -246,7 +251,7 @@ pam_sm_authenticate(pam_handle_t *pamh, { struct rad_handle *radh; const char *user, *pass; - const void *tmpuser; + const void *rhost, *tmpuser; const char *conf_file, *template_user, *nas_id, *nas_ipaddr; int retval; int e; @@ -255,6 +260,7 @@ pam_sm_authenticate(pam_handle_t *pamh, template_user = openpam_get_option(pamh, PAM_OPT_TEMPLATE_USER); nas_id = openpam_get_option(pamh, PAM_OPT_NAS_ID); nas_ipaddr = openpam_get_option(pamh, PAM_OPT_NAS_IPADDR); + pam_get_item(pamh, PAM_RHOST, &rhost); retval = pam_get_user(pamh, &user, NULL); if (retval != PAM_SUCCESS) @@ -284,8 +290,8 @@ pam_sm_authenticate(pam_handle_t *pamh, PAM_LOG("Radius config file read"); - if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, NULL, - 0) == -1) { + if (build_access_request(radh, user, pass, nas_id, nas_ipaddr, rhost, + NULL, 0) == -1) { rad_close(radh); return (PAM_SERVICE_ERR); } @@ -330,7 +336,7 @@ pam_sm_authenticate(pam_handle_t *pamh, case RAD_ACCESS_CHALLENGE: retval = do_challenge(pamh, radh, user, nas_id, - nas_ipaddr); + nas_ipaddr, rhost); if (retval != PAM_SUCCESS) { rad_close(radh); return (retval); From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 10:09:29 2015 Return-Path: Delivered-To: svn-src-head@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 62B432E8; Fri, 16 Jan 2015 10:09: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 34D9A99E; Fri, 16 Jan 2015 10:09: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 t0GA9TmD068081; Fri, 16 Jan 2015 10:09:29 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GA9SDp068079; Fri, 16 Jan 2015 10:09:28 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501161009.t0GA9SDp068079@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 16 Jan 2015 10:09:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277238 - in head: share/man/man4 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:09:29 -0000 Author: melifaro Date: Fri Jan 16 10:09:28 2015 New Revision: 277238 URL: https://svnweb.freebsd.org/changeset/base/277238 Log: Eliminate SIOCGIFADDR handling in bpf. Quoting 19 years bpf.4 manual from bpf-1.2a1: " (SIOCGIFADDR is obsolete under BSD systems. SIOCGIFCONF should be used to query link-level addresses.) " * SIOCGIFADDR was not imported in NetBSD (bpf.c 1.36) and OpenBSD. * Last bits (e.g. manpage claiming SIOCGIFADDR exists) was cleaned from NetBSD via kern/21513 5 years ago, from OpenBSD via documentation/6352 5 years ago. Modified: head/share/man/man4/bpf.4 head/sys/net/bpf.c Modified: head/share/man/man4/bpf.4 ============================================================================== --- head/share/man/man4/bpf.4 Fri Jan 16 09:07:31 2015 (r277237) +++ head/share/man/man4/bpf.4 Fri Jan 16 10:09:28 2015 (r277238) @@ -290,8 +290,6 @@ and .Pp In addition to .Dv FIONREAD -and -.Dv SIOCGIFADDR , the following commands may be applied to any open .Nm file. Modified: head/sys/net/bpf.c ============================================================================== --- head/sys/net/bpf.c Fri Jan 16 09:07:31 2015 (r277237) +++ head/sys/net/bpf.c Fri Jan 16 10:09:28 2015 (r277238) @@ -1192,7 +1192,6 @@ reset_d(struct bpf_d *d) /* * FIONREAD Check for read packet available. - * SIOCGIFADDR Get interface address - convenient hook to driver. * BIOCGBLEN Get buffer len [for read()]. * BIOCSETF Set read filter. * BIOCSETFNR Set read filter without resetting descriptor. @@ -1322,19 +1321,6 @@ bpfioctl(struct cdev *dev, u_long cmd, c break; } - case SIOCGIFADDR: - { - struct ifnet *ifp; - - if (d->bd_bif == NULL) - error = EINVAL; - else { - ifp = d->bd_bif->bif_ifp; - error = (*ifp->if_ioctl)(ifp, cmd, addr); - } - break; - } - /* * Get buffer len [for read()]. */ From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 10:11:22 2015 Return-Path: Delivered-To: svn-src-head@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 7A0A2458; Fri, 16 Jan 2015 10:11:22 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3200CA4B; Fri, 16 Jan 2015 10:11:21 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id 2E2D05A15; Fri, 16 Jan 2015 10:11:10 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id EDF78E15C; Fri, 16 Jan 2015 11:11:14 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexey Dokuchaev Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org> Date: Fri, 16 Jan 2015 11:11:14 +0100 In-Reply-To: <20150115142725.GA20964@FreeBSD.org> (Alexey Dokuchaev's message of "Thu, 15 Jan 2015 14:27:25 +0000") Message-ID: <86vbk7dohp.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:11:22 -0000 Alexey Dokuchaev writes: > Edward, Andrey, since you two seem to have some working code already, > maybe you can work together to push out something that can be > committed? :) ------------------------------------------------------------------------ r241053 | ae | 2012-09-29 18:47:56 +0200 (Sat, 29 Sep 2012) | 17 lines Almost each time when loader opens a file, this leads to calling disk_open(). Very often this is called several times for one file. This leads to reading partition table metadata for each call. To reduce the number of disk I/O we have a simple block cache, but it is very dumb and more than half of I/O operations related to reading metadata, misses this cache. Introduce new cache layer to resolve this problem. It is independent and doesn't need initialization like bcache, and will work by default for all loaders which use the new DISK API. A successful disk_open() call to each new disk or partition produces new entry in the cache. Even more, when disk was already open, now opening of any nested partitions does not require reading top level partition table. So, if without this cache, partition table metadata was read around 20-50 times during boot, now it reads only once. This affects the booting from GPT and MBR from the UFS. ------------------------------------------------------------------------ DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 10:44:40 2015 Return-Path: Delivered-To: svn-src-head@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 38ECEAE3; Fri, 16 Jan 2015 10:44: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 252C2D49; Fri, 16 Jan 2015 10:44: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 t0GAie2q086236; Fri, 16 Jan 2015 10:44:40 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GAieGv086235; Fri, 16 Jan 2015 10:44:40 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501161044.t0GAieGv086235@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Fri, 16 Jan 2015 10:44:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277239 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:44:40 -0000 Author: smh Date: Fri Jan 16 10:44:39 2015 New Revision: 277239 URL: https://svnweb.freebsd.org/changeset/base/277239 Log: Eliminate illumos whole disk special case when searching for a ZFS vdev This special case prevented locating vdevs which start with c[0-9] e.g. gptid/c6cde092-504b-11e4-ba52-c45444453598 hence it was impossible to online a vdev via its path. Submitted by: Peter Xu MFC after: 2 weeks Sponsored by: Multiplay Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 16 10:09:28 2015 (r277238) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Fri Jan 16 10:44:39 2015 (r277239) @@ -1916,6 +1916,7 @@ zpool_scan(zpool_handle_t *zhp, pool_sca } } +#ifdef illumos /* * This provides a very minimal check whether a given string is likely a * c#t#d# style string. Users of this are expected to do their own @@ -1947,6 +1948,7 @@ ctd_check_path(char *str) { } return (CTD_CHECK(str)); } +#endif /* * Find a vdev that matches the search criteria specified. We use the @@ -2002,6 +2004,7 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist * * Otherwise, all other searches are simple string compares. */ +#ifdef illumos if (strcmp(srchkey, ZPOOL_CONFIG_PATH) == 0 && ctd_check_path(val)) { uint64_t wholedisk = 0; @@ -2041,6 +2044,9 @@ vdev_to_nvlist_iter(nvlist_t *nv, nvlist break; } } else if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) { +#else + if (strcmp(srchkey, ZPOOL_CONFIG_TYPE) == 0 && val) { +#endif char *type, *idx, *end, *p; uint64_t id, vdev_id; From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 10:49:28 2015 Return-Path: Delivered-To: svn-src-head@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 45A8EC7E; Fri, 16 Jan 2015 10:49: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 32467D7E; Fri, 16 Jan 2015 10:49: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 t0GAnSAF086866; Fri, 16 Jan 2015 10:49:28 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GAnSfB086865; Fri, 16 Jan 2015 10:49:28 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501161049.t0GAnSfB086865@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 16 Jan 2015 10:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277240 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 10:49:28 -0000 Author: melifaro Date: Fri Jan 16 10:49:27 2015 New Revision: 277240 URL: https://svnweb.freebsd.org/changeset/base/277240 Log: Use ipfw runtime lock only when real modification is required. Modified: head/sys/netpfil/ipfw/ip_fw_nat.c Modified: head/sys/netpfil/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_nat.c Fri Jan 16 10:44:39 2015 (r277239) +++ head/sys/netpfil/ipfw/ip_fw_nat.c Fri Jan 16 10:49:27 2015 (r277240) @@ -105,7 +105,7 @@ ifaddr_change(void *arg __unused, struct KASSERT(curvnet == ifp->if_vnet, ("curvnet(%p) differs from iface vnet(%p)", curvnet, ifp->if_vnet)); chain = &V_layer3_chain; - IPFW_WLOCK(chain); + IPFW_UH_WLOCK(chain); /* Check every nat entry... */ LIST_FOREACH(ptr, &chain->nat, _next) { /* ...using nic 'ifp->if_xname' as dynamic alias address. */ @@ -117,13 +117,15 @@ ifaddr_change(void *arg __unused, struct continue; if (ifa->ifa_addr->sa_family != AF_INET) continue; + IPFW_WLOCK(chain); ptr->ip = ((struct sockaddr_in *) (ifa->ifa_addr))->sin_addr; LibAliasSetAddress(ptr->lib, ptr->ip); + IPFW_WUNLOCK(chain); } if_addr_runlock(ifp); } - IPFW_WUNLOCK(chain); + IPFW_UH_WUNLOCK(chain); } /* From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 11:17:31 2015 Return-Path: Delivered-To: svn-src-head@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 3E6C873B; Fri, 16 Jan 2015 11:17: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 2B00B11C; Fri, 16 Jan 2015 11:17: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 t0GBHVUj001498; Fri, 16 Jan 2015 11:17:31 GMT (envelope-from melifaro@FreeBSD.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GBHVf6001497; Fri, 16 Jan 2015 11:17:31 GMT (envelope-from melifaro@FreeBSD.org) Message-Id: <201501161117.t0GBHVf6001497@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: melifaro set sender to melifaro@FreeBSD.org using -f From: "Alexander V. Chernikov" Date: Fri, 16 Jan 2015 11:17:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277241 - head/sbin/route X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 11:17:31 -0000 Author: melifaro Date: Fri Jan 16 11:17:30 2015 New Revision: 277241 URL: https://svnweb.freebsd.org/changeset/base/277241 Log: Eliminate incorrect IPv6 mask guessing: RFC 2374 concept of 'IPv6 Aggregatable Global Unicast Address Format' was deprecated by RFC 3587 12 years ago. Before: 15:06 [1] edge# netstat -rn6 | grep 2a02:6b8:: 2a02:6b8::/32 2a02:978:2::1 UGS em0 15:06 [1] edge# route -6n get 2a02:6b8:: route: writing to routing socket: No such process After: 15:07 [1] edge# /usr/obj/usr/src/sbin/route/route -n6 get 2a02:6b8:: route to: 2a02:6b8:: destination: 2a02:6b8:: mask: ffff:ffff:: gateway: 2a02:978:2::1 fib: 0 interface: em0 flags: recvpipe sendpipe ssthresh rtt,msec mtu weight expire 0 0 0 0 1500 1 0 MFC after: 2 weeks Modified: head/sbin/route/route.c Modified: head/sbin/route/route.c ============================================================================== --- head/sbin/route/route.c Fri Jan 16 10:49:27 2015 (r277240) +++ head/sbin/route/route.c Fri Jan 16 11:17:30 2015 (r277241) @@ -1137,19 +1137,11 @@ inet_makenetandmask(u_long net, struct s static int inet6_makenetandmask(struct sockaddr_in6 *sin6, const char *plen) { - struct in6_addr in6; if (plen == NULL) { if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) && - sin6->sin6_scope_id == 0) { + sin6->sin6_scope_id == 0) plen = "0"; - } else if ((sin6->sin6_addr.s6_addr[0] & 0xe0) == 0x20) { - /* aggregatable global unicast - RFC2374 */ - memset(&in6, 0, sizeof(in6)); - if (!memcmp(&sin6->sin6_addr.s6_addr[8], - &in6.s6_addr[8], 8)) - plen = "64"; - } } if (plen == NULL || strcmp(plen, "128") == 0) From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 12:11:03 2015 Return-Path: Delivered-To: svn-src-head@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 33B0067F; Fri, 16 Jan 2015 12:11: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 20B378B4; Fri, 16 Jan 2015 12:11: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 t0GCB2H8027358; Fri, 16 Jan 2015 12:11:02 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GCB2dW027356; Fri, 16 Jan 2015 12:11:02 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501161211.t0GCB2dW027356@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 16 Jan 2015 12:11:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277245 - head/lib/libusb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:11:03 -0000 Author: hselasky Date: Fri Jan 16 12:11:01 2015 New Revision: 277245 URL: https://svnweb.freebsd.org/changeset/base/277245 Log: Add more USB request definitions. The values are described in section 9.4.11 and 9.4.12 of the "Universal Serial Bus 3.0 Specification" Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/lib/libusb/libusb.h head/lib/libusb/libusb20_desc.h Modified: head/lib/libusb/libusb.h ============================================================================== --- head/lib/libusb/libusb.h Fri Jan 16 11:51:47 2015 (r277244) +++ head/lib/libusb/libusb.h Fri Jan 16 12:11:01 2015 (r277245) @@ -128,6 +128,8 @@ enum libusb_standard_request { LIBUSB_REQUEST_GET_INTERFACE = 0x0A, LIBUSB_REQUEST_SET_INTERFACE = 0x0B, LIBUSB_REQUEST_SYNCH_FRAME = 0x0C, + LIBUSB_REQUEST_SET_SEL = 0x30, + LIBUSB_REQUEST_SET_ISOCH_DELAY = 0x31, }; enum libusb_request_type { Modified: head/lib/libusb/libusb20_desc.h ============================================================================== --- head/lib/libusb/libusb20_desc.h Fri Jan 16 11:51:47 2015 (r277244) +++ head/lib/libusb/libusb20_desc.h Fri Jan 16 12:11:01 2015 (r277245) @@ -481,6 +481,12 @@ enum libusb20_standard_request { /** Set then report an endpoint's synchronization frame */ LIBUSB20_REQUEST_SYNCH_FRAME = 0x0C, + + /** Set U1 and U2 system exit latency */ + LIBUSB20_REQUEST_SET_SEL = 0x30, + + /** Set isochronous delay */ + LIBUSB20_REQUEST_SET_ISOCH_DELAY = 0x31, }; /** \ingroup misc From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 12:16:22 2015 Return-Path: Delivered-To: svn-src-head@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 A5A37840; Fri, 16 Jan 2015 12:16: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 92207987; Fri, 16 Jan 2015 12:16: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 t0GCGM4Z029931; Fri, 16 Jan 2015 12:16:22 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GCGMsE029929; Fri, 16 Jan 2015 12:16:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501161216.t0GCGMsE029929@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 16 Jan 2015 12:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277246 - in head/sys/dev/usb: . serial X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:16:22 -0000 Author: hselasky Date: Fri Jan 16 12:16:21 2015 New Revision: 277246 URL: https://svnweb.freebsd.org/changeset/base/277246 Log: Add more USB device IDs. Submitted by: max.n.boyarov@gmail.com PR: 196362 MFC after: 1 week Modified: head/sys/dev/usb/serial/u3g.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/u3g.c ============================================================================== --- head/sys/dev/usb/serial/u3g.c Fri Jan 16 12:11:01 2015 (r277245) +++ head/sys/dev/usb/serial/u3g.c Fri Jan 16 12:16:21 2015 (r277246) @@ -239,6 +239,8 @@ static const STRUCT_USB_HOST_ID u3g_devs U3G_DEV(DELL, U740, 0), U3G_DEV(DLINK, DWR510_CD, U3GINIT_SCSIEJECT), U3G_DEV(DLINK, DWR510, 0), + U3G_DEV(DLINK, DWM157_CD, U3GINIT_SCSIEJECT), + U3G_DEV(DLINK, DWM157, 0), U3G_DEV(DLINK3, DWM652, 0), U3G_DEV(HP, EV2200, 0), U3G_DEV(HP, HS2300, 0), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Fri Jan 16 12:11:01 2015 (r277245) +++ head/sys/dev/usb/usbdevs Fri Jan 16 12:16:21 2015 (r277246) @@ -1627,6 +1627,8 @@ product DLINK DSB650 0xabc1 10/100 Ethe product DLINK DUBH7 0xf103 DUB-H7 USB 2.0 7-Port Hub product DLINK DWR510_CD 0xa805 DWR-510 CD-ROM Mode product DLINK DWR510 0x7e12 DWR-510 +product DLINK DWM157 0x7d02 DWM-157 +product DLINK DWM157_CD 0xa707 DWM-157 CD-ROM Mode product DLINK RTL8188CU 0x3308 RTL8188CU product DLINK RTL8192CU_1 0x3307 RTL8192CU product DLINK RTL8192CU_2 0x3309 RTL8192CU From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 12:31:29 2015 Return-Path: Delivered-To: svn-src-head@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 2DD45B19; Fri, 16 Jan 2015 12:31:29 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9490B2E; Fri, 16 Jan 2015 12:31:28 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id hn15so2996610igb.3; Fri, 16 Jan 2015 04:31:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=AxOSwj8+hL9Nt6rwqzZ2l41po5RxliH2045l5NpcUZE=; b=ADf/DV7xqPYfydtVM8a2KHisenHBQySM4O9FtYrpNnwgsgcabABT6U95zUcOiUjT/F sQD7uqEUl5wFL8To8n064YAHUWHg/s+WbPau97Zp9TNAvbf1c1gJzSkaqOGet5nZgkwG 3POVuyJW9zylUW9+9uDY4i5T/0mj+XddWPK6XpY2Ow8IEmQmRqtrfkKmgGn87sU6QcWk IgLEQZBMrYACa+KWyiSr5RF5p7zrxuGCSjAhRulA58aksUWhWNoehn6qjpP+5LsoWnIE +GaaRv41wL4WfLUGDLlAbChEU9nV0N2k12DYKM60aMU9Hh3EljPl/5Aoc2fp0VZFJ0z3 z3Lg== X-Received: by 10.42.251.68 with SMTP id mr4mr7659496icb.94.1421411488277; Fri, 16 Jan 2015 04:31:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.175.4 with HTTP; Fri, 16 Jan 2015 04:30:58 -0800 (PST) In-Reply-To: <201412021955.sB2JtiXL009756@svn.freebsd.org> References: <201412021955.sB2JtiXL009756@svn.freebsd.org> From: Jia-Shiun Li Date: Fri, 16 Jan 2015 20:30:58 +0800 Message-ID: Subject: Re: svn commit: r275422 - in head/sys: amd64/conf i386/conf pc98/conf powerpc/conf sparc64/conf To: "George V. Neville-Neil" 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:31:29 -0000 On Wed, Dec 3, 2014 at 3:55 AM, George V. Neville-Neil wrote: > Author: gnn > Date: Tue Dec 2 19:55:43 2014 > New Revision: 275422 > URL: https://svnweb.freebsd.org/changeset/base/275422 > > Log: > This configuration file removes several debugging options, including > WITNESS and INVARIANTS checking, which are known to have significant > performance impact on running systems. When benchmarking new features > this kernel should be used instead of the standard GENERIC. > This kernel configuration should never appear outside of the HEAD > of the FreeBSD tree. > Just noticed the newly added config file. Shall we mention it in foreword of /usr/src/UPDATING to tell people interested in benchmarking -current to use it instead? -Jia-Shiun From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 12:35:56 2015 Return-Path: Delivered-To: svn-src-head@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 7E103D3C; Fri, 16 Jan 2015 12:35: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 6AD65B78; Fri, 16 Jan 2015 12:35: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 t0GCZuqP039459; Fri, 16 Jan 2015 12:35:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GCZuXs039458; Fri, 16 Jan 2015 12:35:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501161235.t0GCZuXs039458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Fri, 16 Jan 2015 12:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277247 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 12:35:56 -0000 Author: mav Date: Fri Jan 16 12:35:55 2015 New Revision: 277247 URL: https://svnweb.freebsd.org/changeset/base/277247 Log: Don't count status as sent until CTIO completes successfully. If we aggregated status sending with data move and got error, allow status to be updated and resent again separately. Without this command may stuck without status sent at all. MFC after: 2 weeks Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Fri Jan 16 12:16:21 2015 (r277246) +++ head/sys/cam/ctl/scsi_ctl.c Fri Jan 16 12:35:55 2015 (r277247) @@ -891,7 +891,6 @@ ctlfestart(struct cam_periph *periph, un (cmd_info->flags & CTLFE_CMD_PIECEWISE) == 0 && ((io->io_hdr.flags & CTL_FLAG_DMA_QUEUED) == 0 || io->io_hdr.status == CTL_SUCCESS)) { - io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; flags |= CAM_SEND_STATUS; scsi_status = io->scsiio.scsi_status; csio->sense_len = io->scsiio.sense_len; @@ -1265,6 +1264,10 @@ ctlfedone(struct cam_periph *periph, uni break; } + if ((done_ccb->ccb_h.flags & CAM_SEND_STATUS) && + (done_ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_CMP) + io->io_hdr.flags |= CTL_FLAG_STATUS_SENT; + /* * If we were sending status back to the initiator, free up * resources. If we were doing a datamove, call the From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 15:15:31 2015 Return-Path: Delivered-To: svn-src-head@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 6CD4FEAC; Fri, 16 Jan 2015 15:15:31 +0000 (UTC) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0BBA1E51; Fri, 16 Jan 2015 15:15:31 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id hi2so4503051wib.2; Fri, 16 Jan 2015 07:15:29 -0800 (PST) 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=uR/IE2/WUSG0vgXh6UQJJfpgQYkL9JjSsfvdlH8eRe4=; b=PWcs9/CJy9HiwRM+n01wI+O7C3TOhnswz12ZreSsVkImOdPj74Lon8Pix4P/gPj/6j EcWPJt292szzzMj91ERU7JQIHaVJi9bIzvv2eJYBu3t7blQGeUB+8b9zDr7X/bYb8pn/ Z8vXh7jE/Gn+4Z/XVlsWVeipo3YZgLUmeLa4UcPNbZ12/kfs9slXc/+9yGUVi74nfYkj SeW+gNi/W0xSqLy4hTO5FTk7PUGf86LSYGRq9HZwv7I08lvF/GXFH1rD992CnPJPcNYU m/L4N8jIi3BoSdJknAqRMRHm8XA9CP0mGSgeI8a1/Drvm1YHj6ahZ/UoNZSIFY1GFdHb XPkw== X-Received: by 10.180.104.9 with SMTP id ga9mr7332034wib.9.1421421329196; Fri, 16 Jan 2015 07:15:29 -0800 (PST) Received: from [172.16.1.30] (243.Red-2-137-76.dynamicIP.rima-tde.net. [2.137.76.243]) by mx.google.com with ESMTPSA id l6sm6432104wjx.33.2015.01.16.07.15.27 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jan 2015 07:15:28 -0800 (PST) Sender: =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= Message-ID: <54B92B0A.1020108@FreeBSD.org> Date: Fri, 16 Jan 2015 16:15:22 +0100 From: =?windows-1252?Q?Roger_Pau_Monn=E9?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r277215 - in head/sys: amd64/include boot/common boot/fdt boot/forth boot/i386/libi386 boot/i386/loader i386/include x86/xen References: <201501151627.t0FGRLY2062439@svn.freebsd.org> <1421362982.14601.280.camel@freebsd.org> In-Reply-To: <1421362982.14601.280.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 15:15:31 -0000 El 16/01/15 a les 0.03, Ian Lepore ha escrit: > On Thu, 2015-01-15 at 16:27 +0000, Roger Pau Monné wrote: >> Author: royger >> Date: Thu Jan 15 16:27:20 2015 >> New Revision: 277215 >> URL: https://svnweb.freebsd.org/changeset/base/277215 >> >> Log: >> loader: implement multiboot support for Xen Dom0 >> [...] >> >> Added: >> head/sys/boot/i386/libi386/multiboot.c (contents, props changed) >> head/sys/boot/i386/libi386/multiboot.h (contents, props changed) >> head/sys/boot/i386/libi386/multiboot_tramp.S (contents, props changed) >> Modified: >> head/sys/amd64/include/metadata.h >> head/sys/boot/common/bootstrap.h >> head/sys/boot/common/load_elf.c >> head/sys/boot/common/load_elf_obj.c >> head/sys/boot/common/module.c >> head/sys/boot/fdt/fdt_loader_cmd.c >> head/sys/boot/forth/beastie.4th >> head/sys/boot/forth/loader.4th >> head/sys/boot/forth/support.4th >> head/sys/boot/i386/libi386/Makefile >> head/sys/boot/i386/libi386/bootinfo64.c >> head/sys/boot/i386/libi386/elf64_freebsd.c >> head/sys/boot/i386/libi386/libi386.h >> head/sys/boot/i386/loader/conf.c >> head/sys/i386/include/metadata.h >> head/sys/x86/xen/pv.c > > Something about this change breaks ubldr on arm (it works @ r277214). > Now on an RPi I get this: > > /boot/kernel/kernel data=0x4cf8a4+0x3475c syms=[0x4+0x91650+0x4+0x53354] > panic: Address offset 0x40000000 bigger than size 0x1E000000 > > There is a single physical extent of ram from 0-0x1e000000. Sorry for this, the above patch solved the problem for me. I'm currently running a tinderbox with it to make sure nothing else breaks, but the fix is quite straightforward. --- diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c index 6860815..4c801e9 100644 --- a/sys/boot/common/load_elf.c +++ b/sys/boot/common/load_elf.c @@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end); + Elf_Addr p_start, Elf_Addr p_end); static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); @@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off) Elf_Size size; u_int fpcopy; Elf_Sym sym; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; dp = NULL; shdr = NULL; @@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest) Elf_Shdr *sh_data[2]; char *shstrtab = NULL; size_t size; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; bzero(&ef, sizeof(struct elf_file)); ef.fd = -1; @@ -820,7 +820,7 @@ out: int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end) + Elf_Addr p_start, Elf_Addr p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 15:16:20 2015 Return-Path: Delivered-To: svn-src-head@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 53AD5FF6; Fri, 16 Jan 2015 15:16: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 3F65BE65; Fri, 16 Jan 2015 15:16: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 t0GFGKOC015286; Fri, 16 Jan 2015 15:16:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GFGKhu015285; Fri, 16 Jan 2015 15:16:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501161516.t0GFGKhu015285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Jan 2015 15:16:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277249 - head/contrib/elftoolchain/libelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 15:16:20 -0000 Author: emaste Date: Fri Jan 16 15:16:19 2015 New Revision: 277249 URL: https://svnweb.freebsd.org/changeset/base/277249 Log: Verify that section header offset is not past EOF MFC After: 1 week Sponsored by: The FreeBSD Foundation Modified: head/contrib/elftoolchain/libelf/elf_scn.c Modified: head/contrib/elftoolchain/libelf/elf_scn.c ============================================================================== --- head/contrib/elftoolchain/libelf/elf_scn.c Fri Jan 16 15:10:55 2015 (r277248) +++ head/contrib/elftoolchain/libelf/elf_scn.c Fri Jan 16 15:16:19 2015 (r277249) @@ -60,7 +60,8 @@ _libelf_load_section_headers(Elf *e, voi assert((e->e_flags & LIBELF_F_SHDRS_LOADED) == 0); #define CHECK_EHDR(E,EH) do { \ - if (fsz != (EH)->e_shentsize || \ + if (shoff > e->e_rawsize || \ + fsz != (EH)->e_shentsize || \ shnum > SIZE_MAX / fsz || \ fsz * shnum > e->e_rawsize - shoff) { \ LIBELF_SET_ERROR(HEADER, 0); \ From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 15:17:11 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id EAF011A4; Fri, 16 Jan 2015 15:17:11 +0000 (UTC) Date: Fri, 16 Jan 2015 15:17:11 +0000 From: Alexey Dokuchaev To: Dag-Erling Smorgrav Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Message-ID: <20150116151711.GA39938@FreeBSD.org> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org> <86vbk7dohp.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86vbk7dohp.fsf@nine.des.no> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 15:17:12 -0000 On Fri, Jan 16, 2015 at 11:11:14AM +0100, Dag-Erling Smorgrav wrote: > Alexey Dokuchaev writes: > > Edward, Andrey, since you two seem to have some working code already, > > maybe you can work together to push out something that can be > > committed? :) > > ------------------------------------------------------------------------ > r241053 | ae | 2012-09-29 18:47:56 +0200 (Sat, 29 Sep 2012) | 17 lines Thanks; I wonder why this commit was not mentioned 16 months ago, esp. with ae@ CCed. ./danfe From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 17:41:22 2015 Return-Path: Delivered-To: svn-src-head@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 70E7952F; Fri, 16 Jan 2015 17:41: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 5C5BA28B; Fri, 16 Jan 2015 17:41: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 t0GHfMKv088829; Fri, 16 Jan 2015 17:41:22 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GHfMH2088828; Fri, 16 Jan 2015 17:41:22 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501161741.t0GHfMH2088828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 16 Jan 2015 17:41:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277254 - head/sys/powerpc/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 17:41:22 -0000 Author: nwhitehorn Date: Fri Jan 16 17:41:21 2015 New Revision: 277254 URL: https://svnweb.freebsd.org/changeset/base/277254 Log: Make netbooting work again by disabling BOOTP_NFSV3. Investigate why this causes bad RPC errors later. Modified: head/sys/powerpc/conf/MPC85XX Modified: head/sys/powerpc/conf/MPC85XX ============================================================================== --- head/sys/powerpc/conf/MPC85XX Fri Jan 16 17:40:30 2015 (r277253) +++ head/sys/powerpc/conf/MPC85XX Fri Jan 16 17:41:21 2015 (r277254) @@ -20,7 +20,7 @@ options ALT_BREAK_TO_DEBUGGER options BREAK_TO_DEBUGGER options BOOTP options BOOTP_NFSROOT -options BOOTP_NFSV3 +#options BOOTP_NFSV3 options BOOTP_WIRED_TO=tsec0 options CD9660 options COMPAT_43 From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 17:58:04 2015 Return-Path: Delivered-To: svn-src-head@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 774E8C1F for ; Fri, 16 Jan 2015 17:58:04 +0000 (UTC) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4196D6A8 for ; Fri, 16 Jan 2015 17:58:03 +0000 (UTC) Received: by mail-pa0-f51.google.com with SMTP id ey11so25620614pad.10 for ; Fri, 16 Jan 2015 09:57:57 -0800 (PST) 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=gwqw5nfuYO2InERsxl4uHFftYpMO1+GubbeY5v/ISgo=; b=cx5194vU//xGVHPxDi4maHCpebk6n/a47fd194pcN+TBcHq+j7tX+uxpIOU+Z0ghvg CtMvzfSPujW/AjVrCqtOUft/vPsONu7hW+0MQsM1MG4y9R+mF4lK6IG3Kdr3rr9oXgTi mnjjWY7joVSOxalSFyKeH9mTcHg0dBTCJBHT/1mHSLMgQJOKqzmdTc25xeaeTB/nYE3f BVrILNG8N320EUFxJC7+TciRHNmlDAp9XZkmE+22LFZnJMJxPPWdKCKVwLXE3txv19Ul a0Ar3ok80rGpEEreCmeTMRtIzCjMI3+BAGZiJm6Vy/pljUJTK5o2wjVhq0yHsrIbiwit liPQ== X-Gm-Message-State: ALoCoQndP1EiJLeF/aciKbtbPqfAxWKDpD9B/Ks3Z4VBprwgtvYdxrMwMK8EkawyY8PiFjipHTds X-Received: by 10.68.211.104 with SMTP id nb8mr15623182pbc.29.1421431077406; Fri, 16 Jan 2015 09:57:57 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id z2sm4625942pdc.95.2015.01.16.09.57.55 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 09:57:56 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115132303.GA245@zxy.spb.ru> Date: Fri, 16 Jan 2015 10:57:54 -0700 Message-Id: <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 17:58:04 -0000 --Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov = wrote: >=20 > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >=20 >> Author: imp >> Date: Thu Jan 15 00:42:06 2015 >> New Revision: 277204 >> URL: https://svnweb.freebsd.org/changeset/base/277204 >>=20 >> Log: >> New MINIMAL kernel config. The goal with this configuration is to >> only compile in those options in GENERIC that cannot be loaded as >> modules. ufs is still included because many of its options aren't >> present in the kernel module. There's some other exceptions = documented >=20 > Are you sure? > I think defining UFS options in kernel connfig affect to module too. > When I define this options in kernel config (w/o options FFS) I got > ufs.ko with this SU, quota, acl etc. While one could set options in the kernel to affect the ufs.ko build, there=E2=80=99s not a universal ufs.ko that can be loaded easily that = switches between the different types of options. You can create modules that do this, but that=E2=80=99s a very very different problem than the = one I want to solve, namely you get the same[*] functionality having device fred in the kernel config as kldloading fred.ko. So rather than bite off that problem also, I=E2=80=99m opting for simplicity. >> +options SOFTUPDATES # Enable FFS soft updates = support >> +options UFS_ACL # Support for access control = lists >> +options UFS_DIRHASH # Improve performance on big = directories >> +options UFS_GJOURNAL # Enable gjournal-based UFS = journaling >> +options QUOTA # Enable disk quotas for UFS >=20 >> +options SYSVSHM # SYSV-style shared memory >> +options SYSVMSG # SYSV-style message queues >> +options SYSVSEM # SYSV-style semaphores >> +device agp # support several AGP = chipsets >> +device random # Entropy device >> +device padlock_rng # VIA Padlock RNG >> +device rdrand_rng # Intel Bull Mountain = RNG >> +device vlan # 802.1Q VLAN support >> +device tun # Packet tunnel. >> +device gif # IPv6 and IPv4 = tunneling >=20 > This is loadable too. True > And please include: >=20 > NETMAP > NFS_ROOT OK. > IEEE80211_DEBUG > IEEE80211_AMPDU_AGE > IEEE80211_SUPPORT_MESH > AH_SUPPORT_AR5416 > AH_AR5416_INTERRUPT_MITIGATION > ATH_ENABLE_11N These are already the default for the ath or wlan modules, if I=E2=80=99m = reading things correctly. Warner --Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492 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 iQIcBAEBCgAGBQJUuVEiAAoJEGwc0Sh9sBEA7w4QALcHU+Ii+UEQHX5D/fHUzlF5 o+gxUJqgQaylDai0ly+vnh1qRj3PkFA8O/crkzNWBZCHcL4Uf7Sd0/ArySd1O9nK S77HBYzizTybaDekB795a9H2IINu+N/cazOMdjbhIa3tO1031adq7KMKT2LYKiO1 mrarlEaxAInetFDOAOxXHwWrCHZIUmeljHGtPZJJOP+RVb30uknGLrCbTyHAOBSJ tJwh3mPmpWmDoyyzXdJb/EQUYNw46n6EQyrlBTqB1HXMaPVwm3/HiXbUDXuajv6l Y9P9i1cUcQ89UTzfHPJYXgN6OI1Hn+TX+hZpqKYG9nCtWlrfyPQTfTHTDzHmXmVM CWyiTteC3QPcILPhZnNbiwKdusjLMMvJNmW1WeMqkBiOpM1C+HtijjVeOlmMRay8 nTj0pRgTTDYAkC37i4nNaUmruY/J3U6lDCOKptcQMvXMhiSYBd/6Xuhynen3o5Ol vfJchQm5PkCBd65RHbep1Dsy26ycJlKS7F7TDmxsbzvGTBihGFkGtx1tw6o4F6K+ tRAlHjSFlaGIVBoRE+cA5MK8GjFsL/wZFe5c2jptyGtMM2wX0Fk83s5DUhhjzSo8 Oe+7Oceygz3JnQ1RVJGPfaPkOZWCOWZ1DdTrS1EYMsg/EcB6gmwVcfISgOEroQ1l ry+5AeEdFUDVqqeTCSlM =qSFR -----END PGP SIGNATURE----- --Apple-Mail=_65FB83AD-70C3-461A-919C-123C2F9D7492-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:01:51 2015 Return-Path: Delivered-To: svn-src-head@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 5C34BDCC for ; Fri, 16 Jan 2015 18:01:51 +0000 (UTC) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 291397BB for ; Fri, 16 Jan 2015 18:01:50 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id bj1so25618517pad.9 for ; Fri, 16 Jan 2015 10:01:50 -0800 (PST) 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=LeKfyQA3c09yg31kwiKhDkWfbPL7cjLGxE1IFnNqon4=; b=cxRmLcIye0adF6v5rmxPZDgGBok5UbH+p/ENiLyFp+7nzkPVMeCGIwbiaApfVFcTtM m7iheEaeICO7H+W4N8I6NS8/KmLgPi4zkDl896AIpFbV82khfAatX8x6PY+gau84pqNU l5JRTS3Y5IS4wPOkkE9ypV5EwGfVQhGqsFd0aKdJ77k+CafWER9X0WtO1Aj+c2066u+U pBpVY4OZehlv0kj5JF+6Sad8lBgKSonjRiDtJgEjAqkDifhSJrkjPynTeffPfKLEll+S C2Npdg/F3EzjzQqeXRj1nhxmESYXni6iG3kDHCJ1aJYt7XbDOX3RV17FWVdvotxBajTM CzFw== X-Gm-Message-State: ALoCoQlwREPNA4Niu4CE0QdTDZokGctpTRTx+Hqo1/fEVNjpYiIsZtJgFds0fFyGVXscLM1S0xly X-Received: by 10.68.211.104 with SMTP id nb8mr15650395pbc.29.1421431310415; Fri, 16 Jan 2015 10:01:50 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id y2sm4671653pdm.31.2015.01.16.10.01.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:01:49 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115134446.GA92636@FreeBSD.org> Date: Fri, 16 Jan 2015 11:01:46 -0700 Message-Id: <8CA7406B-9962-4DED-A509-14851128F43B@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <20150115134446.GA92636@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:01:51 -0000 --Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 6:44 AM, Alexey Dokuchaev = wrote: >=20 > On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: >> On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >>> New Revision: 277204 >>> URL: https://svnweb.freebsd.org/changeset/base/277204 >>>=20 >>> Log: >>> New MINIMAL kernel config. The goal with this configuration is to >>> only compile in those options in GENERIC that cannot be loaded as >>> modules. ufs is still included because many of its options aren't >>> present in the kernel module. There's some other exceptions = documented >>=20 >> Are you sure? >> I think defining UFS options in kernel connfig affect to module too. >> When I define this options in kernel config (w/o options FFS) I got >> ufs.ko with this SU, quota, acl etc. >>=20 >> [...] >> This is loadable too. >=20 > Right, it does not look like minimal to me either. Too many things, sadly, are kernel options and the functionality is = absent when or reduced when loading from a module. > But I welcome the > intention. AFAIR last time we had a discussion about why our default > kernel is not MINIMAL, it boiled down to two main problems: 1) = loader's > caching of disk reads (which makes loading *.ko's from = /boot/loader.conf > a PITA, esp. on ZFS), and 2) robust way to figure out which modules to > load on an arbitrary user's system (so they won't have to write their > /boot/loader.conf from scratch themselves). (2) is the exact problem I=E2=80=99m working on. Since the design of = that will allow us to read from the kernel these modules, (1) becomes largely irrelevant because the only /boot/loader incursion would be to load drivers for any storage devices that are on the PCIe bus. > Speaking of (1), I recall there was one or two attempts to address it > (keyword: fast-loader-3.diff). Can someone with more details on their > hands comment a bit what had happened to that work and are there any > ETA for it to get committed? That would be a big leap forward towards > minimal kernel which can be feasible enough to replace (or be a real > alternative to) GENERIC in the future. Perhaps. Let=E2=80=99s see how my stuff plays out, since it generally = would mean we could use a more minimal kernel and let the system figure out what = other things should be loaded. Warner --Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2 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 iQIcBAEBCgAGBQJUuVIKAAoJEGwc0Sh9sBEAPqAP/1ksobiazMXPCCCff1kwqEdp EPBJh94ERMu+hJD+3zBE+2Zlc02KGlto5zt6d5fTvzWTx4w+DOzbIPjMznOQhrZ/ xx2CK3wabE+dH+wy0+wiszDh9rjQNgPAct9Yw65zAHLEWt5Z2TTGoevSxJVrMDiQ LQoVElZeuhnxLp/RBlI8292c6KLat73RgJqrqaQ+ZqpZiJjzbvlwUjqa51wu7t4w oOo2M+/cGqYdcx+16CF0GNMNasHRFJpk4un1gCiZVafRz3YuVSlcciBkMbJJnvJC G6imEmte3X+b5eR6VmcCLJSGVKxQQeDeP+6yk6W6cvpN5c+e2IVnoYl7Dq5rlQCW NPLRpGaxeu6sIdyPcwIXkFIrn0vUYof04FA/JC3kypcBLvWNuezzywqGewhOhaUs PFbh3P+TpwEWCnm2ulhmZhxTa7z3JP2QZnwGA5wvIGUxOPbb0mfC5QZ+kwFBnYUT BsvMdk/jKTFPAOEs/eu6IGJ2xlvWB07Kk/2in/nNm/f3b3rsLYHN7ei8/apfVZl4 f2eI18yHep1mqWjFB3mHZ0xLuf15S6RPh2n04aZtdnb5Eu/gC0pLSljXsE37/ytM ie82jpGfST5c3MdV1ycHakqNf5skvOmMwC+ND1uMSOs4Lolo0madt1tOT+cTs53b 1x+ZurfCYefJWFrP53WW =aYih -----END PGP SIGNATURE----- --Apple-Mail=_EDEB8FFA-6736-41A5-8F1D-9DE58B1363E2-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:07:17 2015 Return-Path: Delivered-To: svn-src-head@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 16A40F9 for ; Fri, 16 Jan 2015 18:07:17 +0000 (UTC) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D837A82A for ; Fri, 16 Jan 2015 18:07:16 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id eu11so25600409pac.11 for ; Fri, 16 Jan 2015 10:07:10 -0800 (PST) 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=tF0DpkGke4/x51Es5Xw9NffghquLVxyO72EjNMraF6c=; b=eqsyTn3KjKG1J2snxjLcyBMFihncPOCpLdg6rs+KGtdO6sNJJF8jt9TYAeqVBywizE XEXDCTcq3ifT32bVEXrWb6ttg5/P8L6zarErYMPKVNnkVKXWfV8DAJYdvCAsBnGdv7Sm ZZrEsEp1ouJAHzoj3HNUxu6c16Tdl55GBVnHdc2JXroiIu0GF2BP1EVJM+8dz0of5OAN r9zs34rXQlkvtT4b+VsnmATsgvoRC1Z7xlthjqrOPaVsxxkX1sPx721lfHqtOG/eky8X 6ADSeoa2K4LXhVhtTXBRoW62nUCkLyjY4LQtBX++oYMIrzhCNoReKpKUg93lT8HSiF1W greA== X-Gm-Message-State: ALoCoQmEsImvOY9IjTuC9u3AiXPFjelh7gsWjxHAj1SzN5e/Mms95Pg2N0H5h6t24dOuHNQWkYIj X-Received: by 10.66.65.234 with SMTP id a10mr25066775pat.120.1421431630342; Fri, 16 Jan 2015 10:07:10 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id pw9sm4686182pbb.12.2015.01.16.10.07.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:07:09 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115162050.GA60729@FreeBSD.org> Date: Fri, 16 Jan 2015 11:07:07 -0700 Message-Id: <5645C90D-2CC7-4517-8AD4-B238AF42AD51@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <54B7E21B.5080008@FreeBSD.org> <20150115162050.GA60729@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:07:17 -0000 --Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 9:20 AM, Alexey Dokuchaev = wrote: >=20 > On Thu, Jan 15, 2015 at 10:51:55AM -0500, John Baldwin wrote: >>> [...] >>> +# Pseudo devices. >>> +device loop # Network loopback >>> +device random # Entropy device >>> +device padlock_rng # VIA Padlock RNG >>> +device rdrand_rng # Intel Bull Mountain = RNG >>> +device ether # Ethernet support >>> +device vlan # 802.1Q VLAN support >>> +device tun # Packet tunnel. >>> +device gif # IPv6 and IPv4 = tunneling >>=20 >> These last three definitely work as modules. (vlan(4) was only = recently >> added to GENERIC). >=20 > And many other things as well (like SYSV* for example). I usually go = as > far as nodevice'ing io and mem, FWIW. >=20 > That said, if we supply reference MINIMAL, it should *really* be = minimal. > And it should not be limited to amd64; lest we forget, our primary = target > should still be i386. Noted. However, the driver here is an automated loading system. This = isn=E2=80=99t a theoretical =E2=80=98least you can have in the kernel=E2=80=99 thing = but rather GENERIC with all the stuff you can practically kldload taken out. But you bring up a good point. i386 is easy, once the basics are done. = PowerPC is only slightly harder, since it has good /boot/loader support as well as = a GENERIC kernel or two. Ditto sparc64. But stepping into arm and mips then all = hell breaks loose. It=E2=80=99s also desirable to refactor GENERIC, for the transition = period, to be include MINIMAL + more stuff. I=E2=80=99ll do that as time permits. Warner --Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016 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 iQIcBAEBCgAGBQJUuVNLAAoJEGwc0Sh9sBEAeSAQAJa+YJX8Rn9RYqPZjLT/oW3t AIJzZnfIRIVVlnlxu6XK5cC/PNUwEPRZfu08mmcHyIx51OTORUe8iWoahG6nxpEH VKIpYRI0Tf57omtB9pTdSOAH6zjOBf/ULbC12Rc1CEV/5WsqnPkbpaLYscVqIEkr Gn05eNJmvEhr4ft5gUPEQEVd3XEPbj7NqPV9Gdm3Gh/K/NYndo9qR5AYlQ+/QstU NTxGt4wTx62ct6L9lCw8JMGULtHX4AkLnfEt9jJJimxKMn3C99XuIATvjgPApWwC BHXAQ7vCWsXCEMx3TmPSviHWnJr4CUL/MANWw3OeISIo73Gu/sbsFcqWicx+JzMD ZmDth+yhsL79xxb5JWh1qBh+c8TML3nsDVNA5KO5EugiNsOaCUaPhyKq889r2geP C7AsLwQDEHM7IEFCAHGtoDQXH5aSHcka4eWqrnI45Z+2UR3j2dH3Ng6art6Um/aN RPKgidfEVZVZ5ObSeEuvtz3fpcWDieP/3BwOMbQv7pNvP+HmdFsBGF2R/6NfTAMD P22QYLOHszzkyEeSQfUP7b8jxmrnKuVDA2Bo8/Av10QVujiuXQSFlUdGdfcozuxl Ywrkbv2AqiFuFp6VmpwTSodzRe6wjx1S9+6we1rAsiJNMj9feA9t+9bjE1HoN6eQ qSyTciiR3CwhY3lsGU/Y =mB/J -----END PGP SIGNATURE----- --Apple-Mail=_1B3CBA10-E7E9-46D3-96AA-80E026A67016-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:17:10 2015 Return-Path: Delivered-To: svn-src-head@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 6ACFE56A; Fri, 16 Jan 2015 18:17: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 564B1974; Fri, 16 Jan 2015 18:17: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 t0GIHAjo005784; Fri, 16 Jan 2015 18:17:10 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIHA9U005783; Fri, 16 Jan 2015 18:17:10 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201501161817.t0GIHA9U005783@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Fri, 16 Jan 2015 18:17:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277255 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:17:10 -0000 Author: alc Date: Fri Jan 16 18:17:09 2015 New Revision: 277255 URL: https://svnweb.freebsd.org/changeset/base/277255 Log: Revamp the default page clustering strategy that is used by the page fault handler. For roughly twenty years, the page fault handler has used the same basic strategy: Fetch a fixed number of non-resident pages both ahead and behind the virtual page that was faulted on. Over the years, alternative strategies have been implemented for optimizing the handling of random and sequential access patterns, but the only change to the default strategy has been to increase the number of pages read ahead to 7 and behind to 8. The problem with the default page clustering strategy becomes apparent when you look at how it behaves on the code section of an executable or shared library. (To simplify the following explanation, I'm going to ignore the read that is performed to obtain the header and assume that no pages are resident at the start of execution.) Suppose that we have a code section consisting of 32 pages. Further, suppose that we access pages 4, 28, and 16 in that order. Under the default page clustering strategy, we page fault three times and perform three I/O operations, because the first and second page faults only read a truncated cluster of 12 pages. In contrast, if we access pages 8, 24, and 16 in that order, we only fault twice and perform two I/O operations, because the first and second page faults read a full cluster of 16 pages. In general, truncated clusters are more common than full clusters. To address this problem, this revision changes the default page clustering strategy to align the start of the cluster to a page offset within the vm object that is a multiple of the cluster size. This results in many fewer truncated clusters. Returning to our example, if we now access pages 4, 28, and 16 in that order, the cluster that is read to satisfy the page fault on page 28 will now include page 16. So, the access to page 16 will no longer page fault and perform an I/O operation. Since the revised default page clustering strategy is typically reading more pages at a time, we are likely to read a few more pages that are never accessed. However, for the various programs that we looked at, including clang, emacs, firefox, and openjdk, the reduction in the number of page faults and I/O operations far outweighed the increase in the number of pages that are never accessed. Moreover, the extra resident pages allowed for many more superpage mappings. For example, if we look at the execution of clang during a buildworld, the number of (hard) page faults on the code section drops by 26%, the number of superpage mappings increases by about 29,000, but the number of never accessed pages only increases from 30.38% to 33.66%. Finally, this leads to a small but measureable reduction in execution time. In collaboration with: Emily Pettigrew Differential Revision: https://reviews.freebsd.org/D1500 Reviewed by: jhb, kib MFC after: 6 weeks Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c ============================================================================== --- head/sys/vm/vm_fault.c Fri Jan 16 17:41:21 2015 (r277254) +++ head/sys/vm/vm_fault.c Fri Jan 16 18:17:09 2015 (r277255) @@ -108,6 +108,7 @@ __FBSDID("$FreeBSD$"); static int vm_fault_additional_pages(vm_page_t, int, int, vm_page_t *, int *); #define VM_FAULT_READ_BEHIND 8 +#define VM_FAULT_READ_DEFAULT (1 + VM_FAULT_READ_AHEAD_INIT) #define VM_FAULT_READ_MAX (1 + VM_FAULT_READ_AHEAD_MAX) #define VM_FAULT_NINCR (VM_FAULT_READ_MAX / VM_FAULT_READ_BEHIND) #define VM_FAULT_SUM (VM_FAULT_NINCR * (VM_FAULT_NINCR + 1) / 2) @@ -292,7 +293,6 @@ vm_fault_hold(vm_map_t map, vm_offset_t int fault_flags, vm_page_t *m_hold) { vm_prot_t prot; - long ahead, behind; int alloc_req, era, faultcount, nera, reqpage, result; boolean_t growstack, is_first_object_locked, wired; int map_generation; @@ -302,7 +302,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t struct faultstate fs; struct vnode *vp; vm_page_t m; - int locked, error; + int ahead, behind, cluster_offset, error, locked; hardfault = 0; growstack = TRUE; @@ -555,45 +555,59 @@ readrest: int rv; u_char behavior = vm_map_entry_behavior(fs.entry); + era = fs.entry->read_ahead; if (behavior == MAP_ENTRY_BEHAV_RANDOM || P_KILLED(curproc)) { behind = 0; + nera = 0; ahead = 0; } else if (behavior == MAP_ENTRY_BEHAV_SEQUENTIAL) { behind = 0; - ahead = atop(fs.entry->end - vaddr) - 1; - if (ahead > VM_FAULT_READ_AHEAD_MAX) - ahead = VM_FAULT_READ_AHEAD_MAX; + nera = VM_FAULT_READ_AHEAD_MAX; + ahead = nera; if (fs.pindex == fs.entry->next_read) vm_fault_cache_behind(&fs, VM_FAULT_READ_MAX); - } else { + } else if (fs.pindex == fs.entry->next_read) { /* - * If this is a sequential page fault, then - * arithmetically increase the number of pages - * in the read-ahead window. Otherwise, reset - * the read-ahead window to its smallest size. + * This is a sequential fault. Arithmetically + * increase the requested number of pages in + * the read-ahead window. The requested + * number of pages is "# of sequential faults + * x (read ahead min + 1) + read ahead min" */ - behind = atop(vaddr - fs.entry->start); - if (behind > VM_FAULT_READ_BEHIND) - behind = VM_FAULT_READ_BEHIND; - ahead = atop(fs.entry->end - vaddr) - 1; - era = fs.entry->read_ahead; - if (fs.pindex == fs.entry->next_read) { - nera = era + behind; + behind = 0; + nera = VM_FAULT_READ_AHEAD_MIN; + if (era > 0) { + nera += era + 1; if (nera > VM_FAULT_READ_AHEAD_MAX) nera = VM_FAULT_READ_AHEAD_MAX; - behind = 0; - if (ahead > nera) - ahead = nera; - if (era == VM_FAULT_READ_AHEAD_MAX) - vm_fault_cache_behind(&fs, - VM_FAULT_CACHE_BEHIND); - } else if (ahead > VM_FAULT_READ_AHEAD_MIN) - ahead = VM_FAULT_READ_AHEAD_MIN; - if (era != ahead) - fs.entry->read_ahead = ahead; + } + ahead = nera; + if (era == VM_FAULT_READ_AHEAD_MAX) + vm_fault_cache_behind(&fs, + VM_FAULT_CACHE_BEHIND); + } else { + /* + * This is a non-sequential fault. Request a + * cluster of pages that is aligned to a + * VM_FAULT_READ_DEFAULT page offset boundary + * within the object. Alignment to a page + * offset boundary is more likely to coincide + * with the underlying file system block than + * alignment to a virtual address boundary. + */ + cluster_offset = fs.pindex % + VM_FAULT_READ_DEFAULT; + behind = ulmin(cluster_offset, + atop(vaddr - fs.entry->start)); + nera = 0; + ahead = VM_FAULT_READ_DEFAULT - 1 - + cluster_offset; } + ahead = ulmin(ahead, atop(fs.entry->end - vaddr) - 1); + if (era != nera) + fs.entry->read_ahead = nera; /* * Call the pager to retrieve the data, if any, after From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:42:50 2015 Return-Path: Delivered-To: svn-src-head@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 72958F0A; Fri, 16 Jan 2015 18:42: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 5346ED08; Fri, 16 Jan 2015 18:42: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 t0GIgosj020087; Fri, 16 Jan 2015 18:42:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIgoMh020086; Fri, 16 Jan 2015 18:42:50 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501161842.t0GIgoMh020086@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 16 Jan 2015 18:42:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277256 - head/usr.sbin/ofwdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:42:50 -0000 Author: nwhitehorn Date: Fri Jan 16 18:42:49 2015 New Revision: 277256 URL: https://svnweb.freebsd.org/changeset/base/277256 Log: Instead of iterating through all properties looking for a match, if asked for a specific property, look it up directly. MFC after: 1 week Modified: head/usr.sbin/ofwdump/ofwdump.c Modified: head/usr.sbin/ofwdump/ofwdump.c ============================================================================== --- head/usr.sbin/ofwdump/ofwdump.c Fri Jan 16 18:17:09 2015 (r277255) +++ head/usr.sbin/ofwdump/ofwdump.c Fri Jan 16 18:42:49 2015 (r277256) @@ -49,8 +49,9 @@ __FBSDID("$FreeBSD$"); static void usage(void); static void ofw_indent(int); -static void ofw_dump_properties(int, phandle_t, int, const char *, int, - int); +static void ofw_dump_properties(int, phandle_t, int, int, int); +static void ofw_dump_property(int fd, phandle_t n, int level, + const char *prop, int raw, int str); static void ofw_dump(int, const char *, int, int, const char *, int, int); static void @@ -140,62 +141,67 @@ ofw_indent(int level) } static void -ofw_dump_properties(int fd, phandle_t n, int level, const char *pmatch, int raw, +ofw_dump_properties(int fd, phandle_t n, int level, int raw, int str) +{ + int nlen; + char prop[32]; + + for (nlen = ofw_firstprop(fd, n, prop, sizeof(prop)); nlen != 0; + nlen = ofw_nextprop(fd, n, prop, prop, sizeof(prop))) + ofw_dump_property(fd, n, level, prop, raw, str); +} + +static void +ofw_dump_property(int fd, phandle_t n, int level, const char *prop, int raw, int str) { static void *pbuf = NULL; static char *visbuf = NULL; static char printbuf[CHARSPERLINE + 1]; static int pblen = 0, vblen = 0; - char prop[32]; - int nlen, len, i, j, max, vlen; + int len, i, j, max, vlen; - for (nlen = ofw_firstprop(fd, n, prop, sizeof(prop)); nlen != 0; - nlen = ofw_nextprop(fd, n, prop, prop, sizeof(prop))) { - if (pmatch != NULL && strcmp(pmatch, prop) != 0) - continue; - len = ofw_getprop_alloc(fd, n, prop, &pbuf, &pblen, 1); - if (len < 0) - continue; - if (raw) - write(STDOUT_FILENO, pbuf, len); - else if (str) - printf("%.*s\n", len, (char *)pbuf); - else { - ofw_indent(level * LVLINDENT + NAMEINDENT); - printf("%s:\n", prop); - /* Print in hex. */ - for (i = 0; i < len; i += BYTESPERLINE) { - max = len - i; - max = max > BYTESPERLINE ? BYTESPERLINE : max; - ofw_indent(level * LVLINDENT + DUMPINDENT); - for (j = 0; j < max; j++) - printf("%02x ", - ((unsigned char *)pbuf)[i + j]); - printf("\n"); - } - /* - * strvis() and print if it looks like it is - * zero-terminated. - */ - if (((char *)pbuf)[len - 1] == '\0' && - strlen(pbuf) == (unsigned)len - 1) { - if (vblen < (len - 1) * 4 + 1) { - if (visbuf != NULL) - free(visbuf); - vblen = (OFIOCMAXVALUE + len) * 4 + 1; + len = ofw_getprop_alloc(fd, n, prop, &pbuf, &pblen, 1); + if (len < 0) + return; + if (raw) + write(STDOUT_FILENO, pbuf, len); + else if (str) + printf("%.*s\n", len, (char *)pbuf); + else { + ofw_indent(level * LVLINDENT + NAMEINDENT); + printf("%s:\n", prop); + /* Print in hex. */ + for (i = 0; i < len; i += BYTESPERLINE) { + max = len - i; + max = max > BYTESPERLINE ? BYTESPERLINE : max; + ofw_indent(level * LVLINDENT + DUMPINDENT); + for (j = 0; j < max; j++) + printf("%02x ", + ((unsigned char *)pbuf)[i + j]); + printf("\n"); + } + /* + * strvis() and print if it looks like it is + * zero-terminated. + */ + if (((char *)pbuf)[len - 1] == '\0' && + strlen(pbuf) == (unsigned)len - 1) { + if (vblen < (len - 1) * 4 + 1) { + if (visbuf != NULL) + free(visbuf); + vblen = (OFIOCMAXVALUE + len) * 4 + 1; if ((visbuf = malloc(vblen)) == NULL) err(EX_OSERR, "malloc() failed"); - } - vlen = strvis(visbuf, pbuf, VIS_TAB | VIS_NL); - for (i = 0; i < vlen; i += CHARSPERLINE) { - ofw_indent(level * LVLINDENT + - DUMPINDENT); - strlcpy(printbuf, &visbuf[i], - sizeof(printbuf)); - printf("'%s'\n", printbuf); - } + } + vlen = strvis(visbuf, pbuf, VIS_TAB | VIS_NL); + for (i = 0; i < vlen; i += CHARSPERLINE) { + ofw_indent(level * LVLINDENT + + DUMPINDENT); + strlcpy(printbuf, &visbuf[i], + sizeof(printbuf)); + printf("'%s'\n", printbuf); } } } @@ -219,8 +225,12 @@ ofw_dump_node(int fd, phandle_t n, int l else putchar('\n'); } - if (prop) - ofw_dump_properties(fd, n, level, pmatch, raw, str); + if (prop) { + if (pmatch) + ofw_dump_property(fd, n, level, pmatch, raw, str); + else + ofw_dump_properties(fd, n, level, raw, str); + } if (rec) { for (c = ofw_child(fd, n); c != 0; c = ofw_peer(fd, c)) { ofw_dump_node(fd, c, level + 1, rec, prop, pmatch, From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:43:27 2015 Return-Path: Delivered-To: svn-src-head@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 ECD10CB; Fri, 16 Jan 2015 18:43:27 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (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 7D7A1D17; Fri, 16 Jan 2015 18:43:27 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id l15so6144241wiw.2; Fri, 16 Jan 2015 10:43:26 -0800 (PST) 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=hFs9uqKPFCMIEVjTFnxEAfSVhk4EWpUYbFmbooEVYZA=; b=gpICCnFDsQrnmFCg7ac0bknifL1gxdLu9U6eObEXzpvSEWDDaECVlNFHhAU7EOo4vf NKe6FSnTNQ2wg6jonVuzIOA0770eFMPCvAFoJd2D5HwodvIwBOiPrrLtWjn39qKmDAZv QIenOguEbejJXjF7J4ugFuAt63gSbVvRNsKJ0tnCD8dr1jIyssHNuGhUpstOIpVSular ic60SurtorM0Dch9aHa7ZfGj2O8JpsAkHD5yi31UaEh9jdaQMo1f451/wcF0NyUQkZkR V6K06N5yjG7cUmoghcGDUCk3SPeF7F5prqqPFkK231VjGiki5J1h304Q04VcMdMzeyg5 Ukwg== MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr5278129wjf.15.1421433805929; Fri, 16 Jan 2015 10:43:25 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Fri, 16 Jan 2015 10:43:25 -0800 (PST) In-Reply-To: <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> Date: Fri, 16 Jan 2015 10:43:25 -0800 X-Google-Sender-Auth: rgrOQLRdKF2PGcjJtEj5es-DF-8 Message-ID: Subject: Re: svn commit: r277204 - head/sys/amd64/conf From: Adrian Chadd To: Warner Losh 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 , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:43:28 -0000 On 16 January 2015 at 09:57, Warner Losh wrote: > >> On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov wrote: >> >> On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >> >>> Author: imp >>> Date: Thu Jan 15 00:42:06 2015 >>> New Revision: 277204 >>> URL: https://svnweb.freebsd.org/changeset/base/277204 >>> >>> Log: >>> New MINIMAL kernel config. The goal with this configuration is to >>> only compile in those options in GENERIC that cannot be loaded as >>> modules. ufs is still included because many of its options aren't >>> present in the kernel module. There's some other exceptions documented >> >> Are you sure? >> I think defining UFS options in kernel connfig affect to module too. >> When I define this options in kernel config (w/o options FFS) I got >> ufs.ko with this SU, quota, acl etc. > > While one could set options in the kernel to affect the ufs.ko build, > there=E2=80=99s not a universal ufs.ko that can be loaded easily that swi= tches > between the different types of options. You can create modules > that do this, but that=E2=80=99s a very very different problem than the o= ne I > want to solve, namely you get the same[*] functionality having > device fred in the kernel config as kldloading fred.ko. So rather than > bite off that problem also, I=E2=80=99m opting for simplicity. > >>> +options SOFTUPDATES # Enable FFS soft updates support >>> +options UFS_ACL # Support for access control lists >>> +options UFS_DIRHASH # Improve performance on big direc= tories >>> +options UFS_GJOURNAL # Enable gjournal-based UFS journa= ling >>> +options QUOTA # Enable disk quotas for UFS >> >>> +options SYSVSHM # SYSV-style shared memory >>> +options SYSVMSG # SYSV-style message queues >>> +options SYSVSEM # SYSV-style semaphores >>> +device agp # support several AGP chip= sets >>> +device random # Entropy device >>> +device padlock_rng # VIA Padlock RNG >>> +device rdrand_rng # Intel Bull Mountain RNG >>> +device vlan # 802.1Q VLAN support >>> +device tun # Packet tunnel. >>> +device gif # IPv6 and IPv4 tunneling >> >> This is loadable too. > > True > >> And please include: >> >> NETMAP >> NFS_ROOT > > OK. > >> IEEE80211_DEBUG >> IEEE80211_AMPDU_AGE >> IEEE80211_SUPPORT_MESH >> AH_SUPPORT_AR5416 >> AH_AR5416_INTERRUPT_MITIGATION >> ATH_ENABLE_11N > > These are already the default for the ath or wlan modules, if I=E2=80=99m= reading things correctly. Nope. The other half of this problem is where some modules (did? do?) populate an opt_wlan.h with their own options. Some modules did this with the inet option. When I've done what you're doing, I end up having these options in my minimal config file so opt_xxx.h is correctly populated. That way when I point SYSDIR (or whichever variable it is) at the configured kernel directory with the opt_xxx.h files, it all works out correctly. (I still think we shouldn't be relying on "defaults", but should ship the opt_xxx.h files or something to derive the opt_xxx.h and makefile config bits so things like external module building is possible against a kernel. Or, we just kill all module options that change behaviour/ABI of things in an incompatible way.) -adrian From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:47:21 2015 Return-Path: Delivered-To: svn-src-head@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 B34143FA; Fri, 16 Jan 2015 18:47: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 9EBD1D60; Fri, 16 Jan 2015 18:47: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 t0GIlLA3021056; Fri, 16 Jan 2015 18:47:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIlLrw021055; Fri, 16 Jan 2015 18:47:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501161847.t0GIlLrw021055@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 16 Jan 2015 18:47:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277257 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:47:21 -0000 Author: nwhitehorn Date: Fri Jan 16 18:47:20 2015 New Revision: 277257 URL: https://svnweb.freebsd.org/changeset/base/277257 Log: Add two fake properties ("fdtbootcpu" and "fdtmemreserv") to the device tree's /chosen node to provide out-of-band header fields of the FDT. This emulation is not perfect without corresponding changes to ofw_fdt_nextprop(), but is enough to enable lookup by memory-map-parsing code. MFC after: 1 week Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Fri Jan 16 18:42:49 2015 (r277256) +++ head/sys/dev/ofw/ofw_fdt.c Fri Jan 16 18:47:20 2015 (r277257) @@ -231,6 +231,13 @@ ofw_fdt_getproplen(ofw_t ofw, phandle_t return (len + 1); } + if (prop == NULL && offset == fdt_path_offset(fdtp, "/chosen")) { + if (strcmp(propname, "fdtbootcpu") == 0) + return (sizeof(cell_t)); + if (strcmp(propname, "fdtmemreserv") == 0) + return (sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp)); + } + return (len); } @@ -242,6 +249,7 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac const void *prop; const char *name; int len, offset; + uint32_t cpuid; offset = fdt_phandle_offset(package); if (offset < 0) @@ -258,6 +266,18 @@ ofw_fdt_getprop(ofw_t ofw, phandle_t pac return (len + 1); } + if (prop == NULL && offset == fdt_path_offset(fdtp, "/chosen")) { + if (strcmp(propname, "fdtbootcpu") == 0) { + cpuid = cpu_to_fdt32(fdt_boot_cpuid_phys(fdtp)); + len = sizeof(cpuid); + prop = &cpuid; + } + if (strcmp(propname, "fdtmemreserv") == 0) { + prop = (char *)fdtp + fdt_off_mem_rsvmap(fdtp); + len = sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp); + } + } + if (prop == NULL) return (-1); From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:48:30 2015 Return-Path: Delivered-To: svn-src-head@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 32105560 for ; Fri, 16 Jan 2015 18:48:30 +0000 (UTC) Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA6E1D77 for ; Fri, 16 Jan 2015 18:48:29 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id bj1so25836695pad.9 for ; Fri, 16 Jan 2015 10:48:29 -0800 (PST) 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=zHFAqh3TGfaaJUSRWH0pyljjbsISzUfjS6ySK+egkrU=; b=CiCyM0QauIWlVcfAGslacG+XDNlQBLgihemHQ5rQqZTtziEIYagDbIMaLJ5at6dGky NPQj708gqi46KY+Jeavp1RrGK13jEsm4whrnR4uJwlNE4jEasQgt8XZRNDuz7ksQWvjv LKxLWsE7B/bWf1ktnYKNzZXvBDmPCHdz3gchgGnTExYFTiIlSWD8wIW9JvmpbvDbE4Wa ji26iZpDEv415pjYhPrTUVnGguNNd4w4Mgu1eFSzqYarJuc0+SV3ZqnFawzWTutM9l1U iIoS0VzLx6z74i7JFPoh/wCW9fRTnLrFGtwADtMXbXznZJzPbMz7y9kynZmCaPl5QKpi gOhQ== X-Gm-Message-State: ALoCoQk5yUkAK7rXEopVCdO9aNnYxSn84SOxigcc0veLg/YNj2R8k0zGQOSkRNe1sM0qFEG/o0Gz X-Received: by 10.66.146.167 with SMTP id td7mr24657965pab.101.1421434109559; Fri, 16 Jan 2015 10:48:29 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id w3sm4750243pdw.14.2015.01.16.10.48.27 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:48:28 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: Date: Fri, 16 Jan 2015 11:48:25 -0700 Message-Id: References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:48:30 -0000 --Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 16, 2015, at 11:43 AM, Adrian Chadd wrote: >=20 > On 16 January 2015 at 09:57, Warner Losh wrote: >>=20 >>> On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov = wrote: >>>=20 >>> On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: >>>=20 >>>> Author: imp >>>> Date: Thu Jan 15 00:42:06 2015 >>>> New Revision: 277204 >>>> URL: https://svnweb.freebsd.org/changeset/base/277204 >>>>=20 >>>> Log: >>>> New MINIMAL kernel config. The goal with this configuration is to >>>> only compile in those options in GENERIC that cannot be loaded as >>>> modules. ufs is still included because many of its options aren't >>>> present in the kernel module. There's some other exceptions = documented >>>=20 >>> Are you sure? >>> I think defining UFS options in kernel connfig affect to module too. >>> When I define this options in kernel config (w/o options FFS) I got >>> ufs.ko with this SU, quota, acl etc. >>=20 >> While one could set options in the kernel to affect the ufs.ko build, >> there=E2=80=99s not a universal ufs.ko that can be loaded easily that = switches >> between the different types of options. You can create modules >> that do this, but that=E2=80=99s a very very different problem than = the one I >> want to solve, namely you get the same[*] functionality having >> device fred in the kernel config as kldloading fred.ko. So rather = than >> bite off that problem also, I=E2=80=99m opting for simplicity. >>=20 >>>> +options SOFTUPDATES # Enable FFS soft updates = support >>>> +options UFS_ACL # Support for access control = lists >>>> +options UFS_DIRHASH # Improve performance on big = directories >>>> +options UFS_GJOURNAL # Enable gjournal-based UFS = journaling >>>> +options QUOTA # Enable disk quotas for UFS >>>=20 >>>> +options SYSVSHM # SYSV-style shared memory >>>> +options SYSVMSG # SYSV-style message queues >>>> +options SYSVSEM # SYSV-style semaphores >>>> +device agp # support several AGP = chipsets >>>> +device random # Entropy device >>>> +device padlock_rng # VIA Padlock RNG >>>> +device rdrand_rng # Intel Bull Mountain = RNG >>>> +device vlan # 802.1Q VLAN support >>>> +device tun # Packet tunnel. >>>> +device gif # IPv6 and IPv4 = tunneling >>>=20 >>> This is loadable too. >>=20 >> True >>=20 >>> And please include: >>>=20 >>> NETMAP >>> NFS_ROOT >>=20 >> OK. >>=20 >>> IEEE80211_DEBUG >>> IEEE80211_AMPDU_AGE >>> IEEE80211_SUPPORT_MESH >>> AH_SUPPORT_AR5416 >>> AH_AR5416_INTERRUPT_MITIGATION >>> ATH_ENABLE_11N >>=20 >> These are already the default for the ath or wlan modules, if I=E2=80=99= m reading things correctly. >=20 > Nope. It=E2=80=99s simple to add any of the last 3 to modules/ath, but I see = your point. > The other half of this problem is where some modules (did? do?) > populate an opt_wlan.h with their own options. Some modules did this > with the inet option. You might thing that, but you=E2=80=99d be behind the times. The IEEE = options are centralized, as are the INET options. > When I've done what you're doing, I end up having these options in my > minimal config file so opt_xxx.h is correctly populated. That way when > I point SYSDIR (or whichever variable it is) at the configured kernel > directory with the opt_xxx.h files, it all works out correctly. Yea, that=E2=80=99s a different issue. > (I still think we shouldn't be relying on "defaults", but should ship > the opt_xxx.h files or something to derive the opt_xxx.h and makefile > config bits so things like external module building is possible > against a kernel. Or, we just kill all module options that change > behaviour/ABI of things in an incompatible way.) Options aren=E2=80=99t supposed to change KBI. Some do, and that=E2=80=99s= unfortunate. But don=E2=80=99t turn this into a rant on how sub-optimal the = opt_XXXX.h intersect with modules. That=E2=80=99s another set of problems to solve. Warner --Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5 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 iQIcBAEBCgAGBQJUuVz6AAoJEGwc0Sh9sBEAD1AQAM5AEyXxnOdjdQYyZgszjUQ7 +ElALFd8JAeALikfFBMSOBRU4bjA7btAEUfHpE3Lr1loJXHhxv0C4DWoVGfl0yQH HQr+Z6bFP9skPFwmwlGDggLwKrbZ0s38aDfHWe4hfcC4NwwHZKkzAz2DH54kn2al Q6ItPbu+rc3pZEYmmiiEu1zJxCDvSGtHzHuLHBsJZYNNm2W7pP8KvoFBf+qXxtNE s3LtSlx/waoZOcpRwOD3zmkb0yEU5h9M6LCo1Jdw9XyTBGMn0VlTWIMIjYOFJGcl mcR+mSyIW6FvgiHO9XuRyDiyRT/KeIxcLGjNKwiEoAuQGtyfVnnwQRHz1Jlm8MRe /gXTaY0dGx4/bgsR2CP+TfW8a6AsY8oPzLMP6FktSk5M+sdgH9QfITJMtY2yjaPP +2YG1Yh1GlbAUrW6ApGxRL9rg2dD5fPhVfmJHaDShQGp4p8L6O7fV5AIW26fqQFw o6gg57XPXct6CVpPmGudbPGfQQF4+lpaCoQjRmrLpOTkh/hZXUEvfMZH9eyQd8SE 3bjYWoD+RFLuwMy1EgGHYD6Pj8evq60Dxp+1Ihm5ZukvKfR0r9e9AnP6aIogFp7z ZPSemgSckunu3glcL18Bb6CzRZn6lpHeZ/vL1PHXDqAFCsnrVVPhcKYNiEOf3T3w HcOSjOTYDivsiOHPGIcz =SI4C -----END PGP SIGNATURE----- --Apple-Mail=_FE247EDB-1A38-477A-880E-BF8FC43131B5-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:51:27 2015 Return-Path: Delivered-To: svn-src-head@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 0D950786; Fri, 16 Jan 2015 18:51: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 EDE8ADBB; Fri, 16 Jan 2015 18: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 t0GIpQqv022861; Fri, 16 Jan 2015 18:51:26 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIpQ0X022860; Fri, 16 Jan 2015 18:51:26 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501161851.t0GIpQ0X022860@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 16 Jan 2015 18:51:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277258 - head/usr.sbin/ngctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:51:27 -0000 Author: glebius Date: Fri Jan 16 18:51:26 2015 New Revision: 277258 URL: https://svnweb.freebsd.org/changeset/base/277258 Log: Plug mutex leak. MFC after: 1 week Sponsored by: Nginx, Inc. Modified: head/usr.sbin/ngctl/main.c Modified: head/usr.sbin/ngctl/main.c ============================================================================== --- head/usr.sbin/ngctl/main.c Fri Jan 16 18:47:20 2015 (r277257) +++ head/usr.sbin/ngctl/main.c Fri Jan 16 18:51:26 2015 (r277258) @@ -324,8 +324,10 @@ DoInteractive(void) history(hist, &hev, H_ENTER, buf); pthread_kill(monitor, SIGUSR1); pthread_mutex_lock(&mutex); - if (DoParseCommand(buf) == CMDRTN_QUIT) + if (DoParseCommand(buf) == CMDRTN_QUIT) { + pthread_mutex_unlock(&mutex); break; + } pthread_cond_signal(&cond); pthread_mutex_unlock(&mutex); } From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:52:25 2015 Return-Path: Delivered-To: svn-src-head@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 39FD68F9; Fri, 16 Jan 2015 18:52:25 +0000 (UTC) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [IPv6:2a00:1450:400c:c03::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE4F6E5C; Fri, 16 Jan 2015 18:52:24 +0000 (UTC) Received: by mail-we0-f179.google.com with SMTP id m14so71725wev.10; Fri, 16 Jan 2015 10:52:23 -0800 (PST) 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=eVWkRq0BCZ9L/qnnQeWxLXDhXMCPKLPiJqeK3grXeoY=; b=eo9DG9tGw8N3xYoWkV33RFNAkb5nSrFMZfSEseCN19aPhHnI7jTT4aeC58r+UXjrZH uMVMn3Q5LJBXzUa0qkBh17PjzItdwXgbwz4jdlX5bMw+mTj+QGBvj8GeNNifnD+3OLIQ nKYPZ79WdM4N4jdTdgbToFsB4tl7QDonpORB0obfLeFb1/3c8uFFJObmPn2Wk2lY+XCd /li1vGPdVzsscYiEH1syE3wY/8TOEyiJUwmlw+QqZa8jCKGFxSdnak8rE+YlD3KzU/Cu zF/XsYS5uiwCmLGY8UTIzor20PiHCVfrzlcRXDnyU/asWYpJ6skuoLVFSjy//HRrZAsj 1z5g== MIME-Version: 1.0 X-Received: by 10.180.14.136 with SMTP id p8mr9036879wic.20.1421434343249; Fri, 16 Jan 2015 10:52:23 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Fri, 16 Jan 2015 10:52:23 -0800 (PST) In-Reply-To: References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> Date: Fri, 16 Jan 2015 10:52:23 -0800 X-Google-Sender-Auth: FKUvIePYS_oiMEpYf6oy0bhQA2M Message-ID: Subject: Re: svn commit: r277204 - head/sys/amd64/conf From: Adrian Chadd To: Warner Losh 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 , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:52:25 -0000 On 16 January 2015 at 10:48, Warner Losh wrote: > Options aren=E2=80=99t supposed to change KBI. Some do, and that=E2=80=99= s unfortunate. Yup, and at least for net80211 I'm going to try really hard to fix that. > But don=E2=80=99t turn this into a rant on how sub-optimal the opt_XXXX.h > intersect with modules. That=E2=80=99s another set of problems to solve. Yeah. Please don't take this as a derail attempt; I am not expecting to address/solve that at the moment. -adrian From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:53:42 2015 Return-Path: Delivered-To: svn-src-head@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 CBDD0A5A for ; Fri, 16 Jan 2015 18:53:42 +0000 (UTC) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 94A4BE72 for ; Fri, 16 Jan 2015 18:53:42 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id ft15so24204680pdb.8 for ; Fri, 16 Jan 2015 10:53:36 -0800 (PST) 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=gTK8RAPS8HBRJOKjywpiTE1lUubr/msc1wypsdhpb44=; b=ODEN22t7mQHQ90CTZRMdW1iV568Zk/1FcWFznLvOo+/iRBt800RDn5OKJddrjSu8w9 1eSY3mTD7caFb58dHT5ECztzLiUzQ5cXCU3vPQiazcf84JDlMG+4u3EqQRaBTu7ZalAq KqLnIW6GUEPLq21zy3v6woOAl4r63MdFZZX29bh5Q5JEzshQEhSkKhN2nzRknOIuxslr YHS14JtA+YrYwhBVpxAy4kA6EqTiA36fDFQ6YM04s0L+bf4PMQ/8gKVgpr0ljScK/KHR iZTUsEIEty0VXz53dfkgPJTnJ7pF/jUqtrIwZONufCj51AknDAe01pzX4atoefSE6u6j 377Q== X-Gm-Message-State: ALoCoQmFl5wSXzBMHibP5V1PwbZR3VkeSKy5JNezqRy7ekw9vPIJy37R5AAEWYuTOqEv3UosfLR8 X-Received: by 10.66.117.199 with SMTP id kg7mr24804159pab.92.1421434416676; Fri, 16 Jan 2015 10:53:36 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id c9sm1944454pdm.51.2015.01.16.10.53.34 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 10:53:35 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: Date: Fri, 16 Jan 2015 11:53:33 -0700 Message-Id: <98247DF8-EFAF-462A-AD28-924B81DA55A9@bsdimp.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , src-committers , Warner Losh , Slawa Olhovchenkov X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:53:43 -0000 --Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 16, 2015, at 11:52 AM, Adrian Chadd wrote: >=20 > On 16 January 2015 at 10:48, Warner Losh wrote: >=20 >=20 >> Options aren=E2=80=99t supposed to change KBI. Some do, and that=E2=80=99= s unfortunate. >=20 > Yup, and at least for net80211 I'm going to try really hard to fix = that. >=20 >> But don=E2=80=99t turn this into a rant on how sub-optimal the = opt_XXXX.h >> intersect with modules. That=E2=80=99s another set of problems to = solve. >=20 > Yeah. Please don't take this as a derail attempt; I am not expecting > to address/solve that at the moment. At least we=E2=80=99ve fixed the identical copies problem=E2=80=A6 Warner --Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551 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 iQIcBAEBCgAGBQJUuV4tAAoJEGwc0Sh9sBEAGgoP/iE5MgWdLPg2f9w6a3m0VUjm FszyHxYf3t8oDQ+hgG+yWDGQw4x8gcoMOF36BU0Ty3MrcQxNSa6XKSDF5u8hyrH+ 8E0h6+qv4XsapGqD9EnI6Y/7O0Za3EDud0E31kjiL46yN42yCIvlBWd4qfjK7Y6l Wt+4Q8gLcKi69B6w3SJoOcfiWNrolHUS9ARl54XsLCo6uzwzRx4rzuwYZc8bg8BZ TOKs3Uz1yGeMzNmj7nVQE/2mhsgPOQBoeu+3p8IOGCViziQUhfL9vNxFfG+ldqdN lCOZO/QVxSUh8YJf/epdEgb87wmUx8eQtVBMU873/1wuhaQJXUmOryNSFBz20vwh TK+i+TczJU56XVaw6G40NpoG4EOqeNc05LcPt8JMIWfBFsVlR5CPMCdF3nKJa4PV hXUb6q+TC1BT+NLK2agcfP5VjVzQO18+qrq8h9FFBE+oxhVVzlWNjep5OOAdQJcr EhHQfkzTHEJ/5I75cvU+KkOJgjaI9/ar0/gXlTL7qRzucnMCfz2sREWDOMS2mDau PHf2hkP2g/E1iSK1MR4nROYJckhczuCZjZSiBZAT0/gtjhDZPbbJ1zDcZ6qrvUU0 J+i7Zt2FG0hxgaWV/Y1mgCkDd1NxnHy+fId95doEtgMtfc7aVFTnM18QmwG2WT8n 9ahAOjZmmvaoM26IaB5e =oveu -----END PGP SIGNATURE----- --Apple-Mail=_6548D19C-0AFA-493B-A6D0-9FF008A11551-- From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 18:59:16 2015 Return-Path: Delivered-To: svn-src-head@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 9AACEC66; Fri, 16 Jan 2015 18:59: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 86697EE7; Fri, 16 Jan 2015 18:59: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 t0GIxGUE026452; Fri, 16 Jan 2015 18:59:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GIxGjh026451; Fri, 16 Jan 2015 18:59:16 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501161859.t0GIxGjh026451@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 16 Jan 2015 18:59:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277259 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 18:59:16 -0000 Author: emaste Date: Fri Jan 16 18:59:15 2015 New Revision: 277259 URL: https://svnweb.freebsd.org/changeset/base/277259 Log: crunchide: Correct 64-bit section header offset For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44. Instead of using an incorrect hardcoded offset, let the compiler figure it out for us with offsetof(). Differential Revision: https://reviews.freebsd.org/D1543 MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c Modified: head/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- head/usr.sbin/crunch/crunchide/exec_elf32.c Fri Jan 16 18:51:26 2015 (r277258) +++ head/usr.sbin/crunch/crunchide/exec_elf32.c Fri Jan 16 18:59:15 2015 (r277259) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -464,7 +465,7 @@ ELFNAMEEND(hide)(int fd, const char *fn) if (layoutp[i].shdr == &shdrshdr && ehdr.e_shoff != shdrshdr.sh_offset) { ehdr.e_shoff = shdrshdr.sh_offset; - off = (ELFSIZE == 32) ? 32 : 44; + off = offsetof(Elf_Ehdr, e_shoff); size = sizeof(Elf_Off); if ((size_t)xwriteatoff(fd, &ehdr.e_shoff, off, size, fn) != size) From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 19:12:00 2015 Return-Path: Delivered-To: svn-src-head@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 2AA3A349; Fri, 16 Jan 2015 19:12: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 1688219C; Fri, 16 Jan 2015 19:12: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 t0GJBxB7035578; Fri, 16 Jan 2015 19:11:59 GMT (envelope-from jfv@FreeBSD.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJBxbb035575; Fri, 16 Jan 2015 19:11:59 GMT (envelope-from jfv@FreeBSD.org) Message-Id: <201501161911.t0GJBxbb035575@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jfv set sender to jfv@FreeBSD.org using -f From: Jack F Vogel Date: Fri, 16 Jan 2015 19:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277262 - head/sys/dev/ixl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:12:00 -0000 Author: jfv Date: Fri Jan 16 19:11:58 2015 New Revision: 277262 URL: https://svnweb.freebsd.org/changeset/base/277262 Log: Some RSS issues discovered by Adrian, missing header, variable names fat fingered, incorrect hash config setup. Thanks :) MFC after: 1 week Modified: head/sys/dev/ixl/if_ixl.c head/sys/dev/ixl/if_ixlv.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/if_ixl.c ============================================================================== --- head/sys/dev/ixl/if_ixl.c Fri Jan 16 19:07:13 2015 (r277261) +++ head/sys/dev/ixl/if_ixl.c Fri Jan 16 19:11:58 2015 (r277262) @@ -38,6 +38,10 @@ #include "ixl.h" #include "ixl_pf.h" +#ifdef RSS +#include +#endif + /********************************************************************* * Driver version *********************************************************************/ @@ -3249,7 +3253,7 @@ static void ixl_config_rss(struct ixl_vs * num_queues.) */ que_id = rss_get_indirection_to_bucket(i); - que_id = que_id % adapter->num_queues; + que_id = que_id % vsi->num_queues; #else que_id = j; #endif Modified: head/sys/dev/ixl/if_ixlv.c ============================================================================== --- head/sys/dev/ixl/if_ixlv.c Fri Jan 16 19:07:13 2015 (r277261) +++ head/sys/dev/ixl/if_ixlv.c Fri Jan 16 19:11:58 2015 (r277262) @@ -38,10 +38,14 @@ #include "ixl.h" #include "ixlv.h" +#ifdef RSS +#include +#endif + /********************************************************************* * Driver version *********************************************************************/ -char ixlv_driver_version[] = "1.2.0"; +char ixlv_driver_version[] = "1.2.1"; /********************************************************************* * PCI Device ID Table @@ -2596,12 +2600,12 @@ ixlv_config_rss(struct ixlv_sc *sc) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP); if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER); + if (rss_hash_config & RSS_HASHTYPE_RSS_IPV6_EX) + set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV6); if (rss_hash_config & RSS_HASHTYPE_RSS_TCP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP); if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6) set_hena |= ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP); - if (rss_hash_config & RSS_HASHTYPE_RSS_UDP_IPV6_EX) - set_hena |= IXGBE_MRQC_RSS_FIELD_IPV6_EX_UDP; #else set_hena = ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_UDP) | @@ -2633,7 +2637,7 @@ ixlv_config_rss(struct ixlv_sc *sc) * num_queues.) */ que_id = rss_get_indirection_to_bucket(i); - que_id = que_id % adapter->num_queues; + que_id = que_id % vsi->num_queues; #else que_id = j; #endif Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Fri Jan 16 19:07:13 2015 (r277261) +++ head/sys/dev/ixl/ixl_txrx.c Fri Jan 16 19:11:58 2015 (r277262) @@ -43,6 +43,10 @@ #include "opt_rss.h" #include "ixl.h" +#ifdef RSS +#include +#endif + /* Local Prototypes */ static void ixl_rx_checksum(struct mbuf *, u32, u32, u8); static void ixl_refresh_mbufs(struct ixl_queue *, int); @@ -1367,7 +1371,7 @@ ixl_rx_discard(struct rx_ring *rxr, int #ifdef RSS /* -** i40e_ptype_to_hash: parse the packet type +** ixl_ptype_to_hash: parse the packet type ** to determine the appropriate hash. */ static inline int @@ -1376,7 +1380,7 @@ ixl_ptype_to_hash(u8 ptype) struct i40e_rx_ptype_decoded decoded; u8 ex = 0 - decode = decode_rx_desc_ptype(ptype); + decoded = decode_rx_desc_ptype(ptype); ex = decoded.outer_frag; if (!decoded.known) From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 19:49:11 2015 Return-Path: Delivered-To: svn-src-head@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 39481D5B; Fri, 16 Jan 2015 19:49: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 0C40C79D; Fri, 16 Jan 2015 19:49: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 t0GJnAnM051846; Fri, 16 Jan 2015 19:49:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GJnAOB051844; Fri, 16 Jan 2015 19:49:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501161949.t0GJnAOB051844@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 16 Jan 2015 19:49:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277265 - head/sys/arm/xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 19:49:11 -0000 Author: ian Date: Fri Jan 16 19:49:10 2015 New Revision: 277265 URL: https://svnweb.freebsd.org/changeset/base/277265 Log: Enable the snoop control unit during MP startup, rather than relying on the bootloader to have done so. Submitted by: Thomas Skibo Modified: head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/xilinx/zy7_mp.c ============================================================================== --- head/sys/arm/xilinx/zy7_mp.c Fri Jan 16 19:38:24 2015 (r277264) +++ head/sys/arm/xilinx/zy7_mp.c Fri Jan 16 19:49:10 2015 (r277265) @@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$"); #define ZYNQ7_CPU1_ENTRY 0xfffffff0 +#define SCU_CONTROL_REG 0xf8f00000 +#define SCU_CONTROL_ENABLE (1 << 0) + void platform_mp_init_secondary(void) { @@ -64,7 +67,21 @@ platform_mp_probe(void) void platform_mp_start_ap(void) { + bus_space_handle_t scu_handle; bus_space_handle_t ocm_handle; + uint32_t scu_ctrl; + + /* Map in SCU control register. */ + if (bus_space_map(fdtbus_bs_tag, SCU_CONTROL_REG, 4, + 0, &scu_handle) != 0) + panic("platform_mp_start_ap: Couldn't map SCU config reg\n"); + + /* Set SCU enable bit. */ + scu_ctrl = bus_space_read_4(fdtbus_bs_tag, scu_handle, 0); + scu_ctrl |= SCU_CONTROL_ENABLE; + bus_space_write_4(fdtbus_bs_tag, scu_handle, 0, scu_ctrl); + + bus_space_unmap(fdtbus_bs_tag, scu_handle, 4); /* Map in magic location to give entry address to CPU1. */ if (bus_space_map(fdtbus_bs_tag, ZYNQ7_CPU1_ENTRY, 4, @@ -75,8 +92,10 @@ platform_mp_start_ap(void) bus_space_write_4(fdtbus_bs_tag, ocm_handle, 0, pmap_kextract((vm_offset_t)mpentry)); + bus_space_unmap(fdtbus_bs_tag, ocm_handle, 4); + /* - * The SCU is enabled by the BOOTROM but I think the second CPU doesn't + * The SCU is enabled above but I think the second CPU doesn't * turn on filtering until after the wake-up below. I think that's why * things don't work if I don't put these cache ops here. Also, the * magic location, 0xfffffff0, isn't in the SCU's filtering range so it @@ -87,8 +106,6 @@ platform_mp_start_ap(void) /* Wake up CPU1. */ armv7_sev(); - - bus_space_unmap(fdtbus_bs_tag, ocm_handle, 4); } void From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 20:19:42 2015 Return-Path: Delivered-To: svn-src-head@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 2CFDC855; Fri, 16 Jan 2015 20:19:42 +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 09933A8A; Fri, 16 Jan 2015 20:19:41 +0000 (UTC) Received: from slw by zxy.spb.ru with local (Exim 4.84 (FreeBSD)) (envelope-from ) id 1YCDMh-0008g2-Gg; Fri, 16 Jan 2015 23:19:31 +0300 Date: Fri, 16 Jan 2015 23:19:31 +0300 From: Slawa Olhovchenkov To: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150116201931.GG3698@zxy.spb.ru> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.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 , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 20:19:42 -0000 On Fri, Jan 16, 2015 at 10:57:54AM -0700, Warner Losh wrote: > > > On Jan 15, 2015, at 6:23 AM, Slawa Olhovchenkov wrote: > > > > On Thu, Jan 15, 2015 at 12:42:07AM +0000, Warner Losh wrote: > > > >> Author: imp > >> Date: Thu Jan 15 00:42:06 2015 > >> New Revision: 277204 > >> URL: https://svnweb.freebsd.org/changeset/base/277204 > >> > >> Log: > >> New MINIMAL kernel config. The goal with this configuration is to > >> only compile in those options in GENERIC that cannot be loaded as > >> modules. ufs is still included because many of its options aren't > >> present in the kernel module. There's some other exceptions documented > > > > Are you sure? > > I think defining UFS options in kernel connfig affect to module too. > > When I define this options in kernel config (w/o options FFS) I got > > ufs.ko with this SU, quota, acl etc. > > While one could set options in the kernel to affect the ufs.ko build, > there's not a universal ufs.ko that can be loaded easily that switches > between the different types of options. You can create modules But this is equal to current condition. > > IEEE80211_DEBUG > > IEEE80211_AMPDU_AGE > > IEEE80211_SUPPORT_MESH > > AH_SUPPORT_AR5416 > > AH_AR5416_INTERRUPT_MITIGATION > > ATH_ENABLE_11N > > These are already the default for the ath or wlan modules, if I'm reading things correctly. This is new for me. From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 21:03:49 2015 Return-Path: Delivered-To: svn-src-head@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 27E05D82; Fri, 16 Jan 2015 21:03: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 0E867EBD; Fri, 16 Jan 2015 21:03: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 t0GL3njN091372; Fri, 16 Jan 2015 21:03:49 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GL3Nq8091232; Fri, 16 Jan 2015 21:03:23 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501162103.t0GL3Nq8091232@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 21:03:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277270 - in head: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/ecdsa crypto/openssl/crypto/x509v3 crypto/openssl/util secure/lib/libcrypto secure/lib/libcrypto/man secure... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:03:49 -0000 Author: jkim Date: Fri Jan 16 21:03:23 2015 New Revision: 277270 URL: https://svnweb.freebsd.org/changeset/base/277270 Log: Merge OpenSSL 1.0.1l. MFC after: 1 week Relnotes: yes Modified: head/crypto/openssl/CHANGES head/crypto/openssl/Makefile head/crypto/openssl/NEWS head/crypto/openssl/README head/crypto/openssl/crypto/Makefile head/crypto/openssl/crypto/ecdsa/Makefile head/crypto/openssl/crypto/ecdsa/ecs_vrf.c head/crypto/openssl/crypto/opensslv.h head/crypto/openssl/crypto/x509v3/v3_ncons.c head/crypto/openssl/e_os.h head/crypto/openssl/util/mk1mf.pl head/secure/lib/libcrypto/Makefile.inc head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_length.3 head/secure/lib/libcrypto/man/ASN1_STRING_new.3 head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 head/secure/lib/libcrypto/man/BIO_ctrl.3 head/secure/lib/libcrypto/man/BIO_f_base64.3 head/secure/lib/libcrypto/man/BIO_f_buffer.3 head/secure/lib/libcrypto/man/BIO_f_cipher.3 head/secure/lib/libcrypto/man/BIO_f_md.3 head/secure/lib/libcrypto/man/BIO_f_null.3 head/secure/lib/libcrypto/man/BIO_f_ssl.3 head/secure/lib/libcrypto/man/BIO_find_type.3 head/secure/lib/libcrypto/man/BIO_new.3 head/secure/lib/libcrypto/man/BIO_new_CMS.3 head/secure/lib/libcrypto/man/BIO_push.3 head/secure/lib/libcrypto/man/BIO_read.3 head/secure/lib/libcrypto/man/BIO_s_accept.3 head/secure/lib/libcrypto/man/BIO_s_bio.3 head/secure/lib/libcrypto/man/BIO_s_connect.3 head/secure/lib/libcrypto/man/BIO_s_fd.3 head/secure/lib/libcrypto/man/BIO_s_file.3 head/secure/lib/libcrypto/man/BIO_s_mem.3 head/secure/lib/libcrypto/man/BIO_s_null.3 head/secure/lib/libcrypto/man/BIO_s_socket.3 head/secure/lib/libcrypto/man/BIO_set_callback.3 head/secure/lib/libcrypto/man/BIO_should_retry.3 head/secure/lib/libcrypto/man/BN_BLINDING_new.3 head/secure/lib/libcrypto/man/BN_CTX_new.3 head/secure/lib/libcrypto/man/BN_CTX_start.3 head/secure/lib/libcrypto/man/BN_add.3 head/secure/lib/libcrypto/man/BN_add_word.3 head/secure/lib/libcrypto/man/BN_bn2bin.3 head/secure/lib/libcrypto/man/BN_cmp.3 head/secure/lib/libcrypto/man/BN_copy.3 head/secure/lib/libcrypto/man/BN_generate_prime.3 head/secure/lib/libcrypto/man/BN_mod_inverse.3 head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 head/secure/lib/libcrypto/man/BN_new.3 head/secure/lib/libcrypto/man/BN_num_bytes.3 head/secure/lib/libcrypto/man/BN_rand.3 head/secure/lib/libcrypto/man/BN_set_bit.3 head/secure/lib/libcrypto/man/BN_swap.3 head/secure/lib/libcrypto/man/BN_zero.3 head/secure/lib/libcrypto/man/CMS_add0_cert.3 head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 head/secure/lib/libcrypto/man/CMS_add1_signer.3 head/secure/lib/libcrypto/man/CMS_compress.3 head/secure/lib/libcrypto/man/CMS_decrypt.3 head/secure/lib/libcrypto/man/CMS_encrypt.3 head/secure/lib/libcrypto/man/CMS_final.3 head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 head/secure/lib/libcrypto/man/CMS_get0_type.3 head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 head/secure/lib/libcrypto/man/CMS_sign.3 head/secure/lib/libcrypto/man/CMS_sign_receipt.3 head/secure/lib/libcrypto/man/CMS_uncompress.3 head/secure/lib/libcrypto/man/CMS_verify.3 head/secure/lib/libcrypto/man/CMS_verify_receipt.3 head/secure/lib/libcrypto/man/CONF_modules_free.3 head/secure/lib/libcrypto/man/CONF_modules_load_file.3 head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 head/secure/lib/libcrypto/man/DH_generate_key.3 head/secure/lib/libcrypto/man/DH_generate_parameters.3 head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 head/secure/lib/libcrypto/man/DH_new.3 head/secure/lib/libcrypto/man/DH_set_method.3 head/secure/lib/libcrypto/man/DH_size.3 head/secure/lib/libcrypto/man/DSA_SIG_new.3 head/secure/lib/libcrypto/man/DSA_do_sign.3 head/secure/lib/libcrypto/man/DSA_dup_DH.3 head/secure/lib/libcrypto/man/DSA_generate_key.3 head/secure/lib/libcrypto/man/DSA_generate_parameters.3 head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/DSA_new.3 head/secure/lib/libcrypto/man/DSA_set_method.3 head/secure/lib/libcrypto/man/DSA_sign.3 head/secure/lib/libcrypto/man/DSA_size.3 head/secure/lib/libcrypto/man/ERR_GET_LIB.3 head/secure/lib/libcrypto/man/ERR_clear_error.3 head/secure/lib/libcrypto/man/ERR_error_string.3 head/secure/lib/libcrypto/man/ERR_get_error.3 head/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 head/secure/lib/libcrypto/man/ERR_load_strings.3 head/secure/lib/libcrypto/man/ERR_print_errors.3 head/secure/lib/libcrypto/man/ERR_put_error.3 head/secure/lib/libcrypto/man/ERR_remove_state.3 head/secure/lib/libcrypto/man/ERR_set_mark.3 head/secure/lib/libcrypto/man/EVP_BytesToKey.3 head/secure/lib/libcrypto/man/EVP_DigestInit.3 head/secure/lib/libcrypto/man/EVP_DigestSignInit.3 head/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 head/secure/lib/libcrypto/man/EVP_EncryptInit.3 head/secure/lib/libcrypto/man/EVP_OpenInit.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 head/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 head/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_derive.3 head/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 head/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 head/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 head/secure/lib/libcrypto/man/EVP_PKEY_new.3 head/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 head/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 head/secure/lib/libcrypto/man/EVP_PKEY_sign.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify.3 head/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 head/secure/lib/libcrypto/man/EVP_SealInit.3 head/secure/lib/libcrypto/man/EVP_SignInit.3 head/secure/lib/libcrypto/man/EVP_VerifyInit.3 head/secure/lib/libcrypto/man/OBJ_nid2obj.3 head/secure/lib/libcrypto/man/OPENSSL_Applink.3 head/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 head/secure/lib/libcrypto/man/OPENSSL_config.3 head/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 head/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 head/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 head/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 head/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 head/secure/lib/libcrypto/man/PKCS12_create.3 head/secure/lib/libcrypto/man/PKCS12_parse.3 head/secure/lib/libcrypto/man/PKCS7_decrypt.3 head/secure/lib/libcrypto/man/PKCS7_encrypt.3 head/secure/lib/libcrypto/man/PKCS7_sign.3 head/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 head/secure/lib/libcrypto/man/PKCS7_verify.3 head/secure/lib/libcrypto/man/RAND_add.3 head/secure/lib/libcrypto/man/RAND_bytes.3 head/secure/lib/libcrypto/man/RAND_cleanup.3 head/secure/lib/libcrypto/man/RAND_egd.3 head/secure/lib/libcrypto/man/RAND_load_file.3 head/secure/lib/libcrypto/man/RAND_set_rand_method.3 head/secure/lib/libcrypto/man/RSA_blinding_on.3 head/secure/lib/libcrypto/man/RSA_check_key.3 head/secure/lib/libcrypto/man/RSA_generate_key.3 head/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 head/secure/lib/libcrypto/man/RSA_new.3 head/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 head/secure/lib/libcrypto/man/RSA_print.3 head/secure/lib/libcrypto/man/RSA_private_encrypt.3 head/secure/lib/libcrypto/man/RSA_public_encrypt.3 head/secure/lib/libcrypto/man/RSA_set_method.3 head/secure/lib/libcrypto/man/RSA_sign.3 head/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 head/secure/lib/libcrypto/man/RSA_size.3 head/secure/lib/libcrypto/man/SMIME_read_CMS.3 head/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 head/secure/lib/libcrypto/man/SMIME_write_CMS.3 head/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 head/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 head/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 head/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 head/secure/lib/libcrypto/man/X509_NAME_print_ex.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 head/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 head/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 head/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 head/secure/lib/libcrypto/man/X509_new.3 head/secure/lib/libcrypto/man/X509_verify_cert.3 head/secure/lib/libcrypto/man/bio.3 head/secure/lib/libcrypto/man/blowfish.3 head/secure/lib/libcrypto/man/bn.3 head/secure/lib/libcrypto/man/bn_internal.3 head/secure/lib/libcrypto/man/buffer.3 head/secure/lib/libcrypto/man/crypto.3 head/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 head/secure/lib/libcrypto/man/d2i_DHparams.3 head/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 head/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 head/secure/lib/libcrypto/man/d2i_X509.3 head/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 head/secure/lib/libcrypto/man/d2i_X509_CRL.3 head/secure/lib/libcrypto/man/d2i_X509_NAME.3 head/secure/lib/libcrypto/man/d2i_X509_REQ.3 head/secure/lib/libcrypto/man/d2i_X509_SIG.3 head/secure/lib/libcrypto/man/des.3 head/secure/lib/libcrypto/man/dh.3 head/secure/lib/libcrypto/man/dsa.3 head/secure/lib/libcrypto/man/ecdsa.3 head/secure/lib/libcrypto/man/engine.3 head/secure/lib/libcrypto/man/err.3 head/secure/lib/libcrypto/man/evp.3 head/secure/lib/libcrypto/man/hmac.3 head/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 head/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 head/secure/lib/libcrypto/man/lh_stats.3 head/secure/lib/libcrypto/man/lhash.3 head/secure/lib/libcrypto/man/md5.3 head/secure/lib/libcrypto/man/mdc2.3 head/secure/lib/libcrypto/man/pem.3 head/secure/lib/libcrypto/man/rand.3 head/secure/lib/libcrypto/man/rc4.3 head/secure/lib/libcrypto/man/ripemd.3 head/secure/lib/libcrypto/man/rsa.3 head/secure/lib/libcrypto/man/sha.3 head/secure/lib/libcrypto/man/threads.3 head/secure/lib/libcrypto/man/ui.3 head/secure/lib/libcrypto/man/ui_compat.3 head/secure/lib/libcrypto/man/x509.3 head/secure/lib/libssl/man/SSL_CIPHER_get_name.3 head/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 head/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 head/secure/lib/libssl/man/SSL_CTX_add_session.3 head/secure/lib/libssl/man/SSL_CTX_ctrl.3 head/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 head/secure/lib/libssl/man/SSL_CTX_free.3 head/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 head/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 head/secure/lib/libssl/man/SSL_CTX_new.3 head/secure/lib/libssl/man/SSL_CTX_sess_number.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 head/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 head/secure/lib/libssl/man/SSL_CTX_sessions.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 head/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 head/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 head/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 head/secure/lib/libssl/man/SSL_CTX_set_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_options.3 head/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 head/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 head/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 head/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 head/secure/lib/libssl/man/SSL_CTX_set_timeout.3 head/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 head/secure/lib/libssl/man/SSL_CTX_set_verify.3 head/secure/lib/libssl/man/SSL_CTX_use_certificate.3 head/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 head/secure/lib/libssl/man/SSL_SESSION_free.3 head/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_SESSION_get_time.3 head/secure/lib/libssl/man/SSL_accept.3 head/secure/lib/libssl/man/SSL_alert_type_string.3 head/secure/lib/libssl/man/SSL_clear.3 head/secure/lib/libssl/man/SSL_connect.3 head/secure/lib/libssl/man/SSL_do_handshake.3 head/secure/lib/libssl/man/SSL_free.3 head/secure/lib/libssl/man/SSL_get_SSL_CTX.3 head/secure/lib/libssl/man/SSL_get_ciphers.3 head/secure/lib/libssl/man/SSL_get_client_CA_list.3 head/secure/lib/libssl/man/SSL_get_current_cipher.3 head/secure/lib/libssl/man/SSL_get_default_timeout.3 head/secure/lib/libssl/man/SSL_get_error.3 head/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 head/secure/lib/libssl/man/SSL_get_ex_new_index.3 head/secure/lib/libssl/man/SSL_get_fd.3 head/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 head/secure/lib/libssl/man/SSL_get_peer_certificate.3 head/secure/lib/libssl/man/SSL_get_psk_identity.3 head/secure/lib/libssl/man/SSL_get_rbio.3 head/secure/lib/libssl/man/SSL_get_session.3 head/secure/lib/libssl/man/SSL_get_verify_result.3 head/secure/lib/libssl/man/SSL_get_version.3 head/secure/lib/libssl/man/SSL_library_init.3 head/secure/lib/libssl/man/SSL_load_client_CA_file.3 head/secure/lib/libssl/man/SSL_new.3 head/secure/lib/libssl/man/SSL_pending.3 head/secure/lib/libssl/man/SSL_read.3 head/secure/lib/libssl/man/SSL_rstate_string.3 head/secure/lib/libssl/man/SSL_session_reused.3 head/secure/lib/libssl/man/SSL_set_bio.3 head/secure/lib/libssl/man/SSL_set_connect_state.3 head/secure/lib/libssl/man/SSL_set_fd.3 head/secure/lib/libssl/man/SSL_set_session.3 head/secure/lib/libssl/man/SSL_set_shutdown.3 head/secure/lib/libssl/man/SSL_set_verify_result.3 head/secure/lib/libssl/man/SSL_shutdown.3 head/secure/lib/libssl/man/SSL_state_string.3 head/secure/lib/libssl/man/SSL_want.3 head/secure/lib/libssl/man/SSL_write.3 head/secure/lib/libssl/man/d2i_SSL_SESSION.3 head/secure/lib/libssl/man/ssl.3 head/secure/usr.bin/openssl/man/CA.pl.1 head/secure/usr.bin/openssl/man/asn1parse.1 head/secure/usr.bin/openssl/man/c_rehash.1 head/secure/usr.bin/openssl/man/ca.1 head/secure/usr.bin/openssl/man/ciphers.1 head/secure/usr.bin/openssl/man/cms.1 head/secure/usr.bin/openssl/man/crl.1 head/secure/usr.bin/openssl/man/crl2pkcs7.1 head/secure/usr.bin/openssl/man/dgst.1 head/secure/usr.bin/openssl/man/dhparam.1 head/secure/usr.bin/openssl/man/dsa.1 head/secure/usr.bin/openssl/man/dsaparam.1 head/secure/usr.bin/openssl/man/ec.1 head/secure/usr.bin/openssl/man/ecparam.1 head/secure/usr.bin/openssl/man/enc.1 head/secure/usr.bin/openssl/man/errstr.1 head/secure/usr.bin/openssl/man/gendsa.1 head/secure/usr.bin/openssl/man/genpkey.1 head/secure/usr.bin/openssl/man/genrsa.1 head/secure/usr.bin/openssl/man/nseq.1 head/secure/usr.bin/openssl/man/ocsp.1 head/secure/usr.bin/openssl/man/openssl.1 head/secure/usr.bin/openssl/man/passwd.1 head/secure/usr.bin/openssl/man/pkcs12.1 head/secure/usr.bin/openssl/man/pkcs7.1 head/secure/usr.bin/openssl/man/pkcs8.1 head/secure/usr.bin/openssl/man/pkey.1 head/secure/usr.bin/openssl/man/pkeyparam.1 head/secure/usr.bin/openssl/man/pkeyutl.1 head/secure/usr.bin/openssl/man/rand.1 head/secure/usr.bin/openssl/man/req.1 head/secure/usr.bin/openssl/man/rsa.1 head/secure/usr.bin/openssl/man/rsautl.1 head/secure/usr.bin/openssl/man/s_client.1 head/secure/usr.bin/openssl/man/s_server.1 head/secure/usr.bin/openssl/man/s_time.1 head/secure/usr.bin/openssl/man/sess_id.1 head/secure/usr.bin/openssl/man/smime.1 head/secure/usr.bin/openssl/man/speed.1 head/secure/usr.bin/openssl/man/spkac.1 head/secure/usr.bin/openssl/man/ts.1 head/secure/usr.bin/openssl/man/tsget.1 head/secure/usr.bin/openssl/man/verify.1 head/secure/usr.bin/openssl/man/version.1 head/secure/usr.bin/openssl/man/x509.1 head/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: head/crypto/openssl/ (props changed) Modified: head/crypto/openssl/CHANGES ============================================================================== --- head/crypto/openssl/CHANGES Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/CHANGES Fri Jan 16 21:03:23 2015 (r277270) @@ -2,6 +2,11 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1k and 1.0.1l [15 Jan 2015] + + *) Build fixes for the Windows and OpenVMS platforms + [Matt Caswell and Richard Levitte] + Changes between 1.0.1j and 1.0.1k [8 Jan 2015] *) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS Modified: head/crypto/openssl/Makefile ============================================================================== --- head/crypto/openssl/Makefile Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/Makefile Fri Jan 16 21:03:23 2015 (r277270) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1k +VERSION=1.0.1l MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: head/crypto/openssl/NEWS ============================================================================== --- head/crypto/openssl/NEWS Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/NEWS Fri Jan 16 21:03:23 2015 (r277270) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015] + + o Build fixes for the Windows and OpenVMS platforms + Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [8 Jan 2015] o Fix for CVE-2014-3571 Modified: head/crypto/openssl/README ============================================================================== --- head/crypto/openssl/README Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/README Fri Jan 16 21:03:23 2015 (r277270) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1k 8 Jan 2015 + OpenSSL 1.0.1l 15 Jan 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: head/crypto/openssl/crypto/Makefile ============================================================================== --- head/crypto/openssl/crypto/Makefile Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/Makefile Fri Jan 16 21:03:23 2015 (r277270) @@ -56,7 +56,7 @@ top: all: shared buildinf.h: ../Makefile - $(PERL) $(TOP)/util/mkbuildinf.pl "$(CFLAGS)" "$(PLATFORM)" >buildinf.h + $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ Modified: head/crypto/openssl/crypto/ecdsa/Makefile ============================================================================== --- head/crypto/openssl/crypto/ecdsa/Makefile Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/ecdsa/Makefile Fri Jan 16 21:03:23 2015 (r277270) @@ -126,16 +126,15 @@ ecs_sign.o: ../../include/openssl/safest ecs_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ecs_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ecs_sign.o: ecs_locl.h ecs_sign.c -ecs_vrf.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_vrf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h -ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h -ecs_vrf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h -ecs_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h ecs_vrf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_vrf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h -ecs_vrf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h ecs_locl.h ecs_vrf.c +ecs_vrf.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_vrf.c Modified: head/crypto/openssl/crypto/ecdsa/ecs_vrf.c ============================================================================== --- head/crypto/openssl/crypto/ecdsa/ecs_vrf.c Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/ecdsa/ecs_vrf.c Fri Jan 16 21:03:23 2015 (r277270) @@ -57,7 +57,7 @@ */ #include "ecs_locl.h" -#include "cryptlib.h" +#include #ifndef OPENSSL_NO_ENGINE #include #endif Modified: head/crypto/openssl/crypto/opensslv.h ============================================================================== --- head/crypto/openssl/crypto/opensslv.h Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/opensslv.h Fri Jan 16 21:03:23 2015 (r277270) @@ -29,11 +29,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x100010bfL +#define OPENSSL_VERSION_NUMBER 0x100010cfL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k-fips 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l-fips 15 Jan 2015" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k-freebsd 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l-freebsd 15 Jan 2015" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: head/crypto/openssl/crypto/x509v3/v3_ncons.c ============================================================================== --- head/crypto/openssl/crypto/x509v3/v3_ncons.c Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/crypto/x509v3/v3_ncons.c Fri Jan 16 21:03:23 2015 (r277270) @@ -401,7 +401,7 @@ static int nc_dns(ASN1_IA5STRING *dns, A if (dns->length > base->length) { dnsptr += dns->length - base->length; - if (dnsptr[-1] != '.') + if (*baseptr != '.' && dnsptr[-1] != '.') return X509_V_ERR_PERMITTED_VIOLATION; } Modified: head/crypto/openssl/e_os.h ============================================================================== --- head/crypto/openssl/e_os.h Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/e_os.h Fri Jan 16 21:03:23 2015 (r277270) @@ -368,11 +368,13 @@ static __inline unsigned int _strlen31(c # define DEFAULT_HOME "C:" # endif -/* Avoid Windows 8 SDK GetVersion deprecated problems */ +/* Avoid Visual Studio 13 GetVersion deprecated problems */ #if defined(_MSC_VER) && _MSC_VER>=1800 # define check_winnt() (1) +# define check_win_minplat(x) (1) #else # define check_winnt() (GetVersion() < 0x80000000) +# define check_win_minplat(x) (LOBYTE(LOWORD(GetVersion())) >= (x)) #endif #else /* The non-microsoft world */ Modified: head/crypto/openssl/util/mk1mf.pl ============================================================================== --- head/crypto/openssl/util/mk1mf.pl Fri Jan 16 19:57:01 2015 (r277269) +++ head/crypto/openssl/util/mk1mf.pl Fri Jan 16 21:03:23 2015 (r277270) @@ -625,7 +625,7 @@ open (OUT,">>crypto/buildinf.h") || die printf OUT < # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.1k -OPENSSL_DATE= 2015-01-08 +OPENSSL_VER= 1.0.1l +OPENSSL_DATE= 2015-01-15 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc Modified: head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_length 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_generate_nconf 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_ctrl 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_base64 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_buffer 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_cipher 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_md 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_null 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_ssl 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_find_type 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_new_CMS 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_push.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_push.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_push 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_read.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_read.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_read 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_accept 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_bio 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_connect 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_fd 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_file 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_mem 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_null 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_socket 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_set_callback 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- head/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_should_retry 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_BLINDING_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_CTX_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_CTX_start 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_add.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_add 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_add_word.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_add_word.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_add_word 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_bn2bin 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_cmp.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_cmp.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_cmp 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_copy.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_copy.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_copy 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_generate_prime 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_inverse 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_num_bytes 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_rand.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_rand.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_rand 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_set_bit 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_swap.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_swap.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_swap 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- head/secure/lib/libcrypto/man/BN_zero.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/BN_zero.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_zero 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add0_cert 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add1_signer 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_compress.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_compress.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_compress 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_decrypt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_encrypt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_final.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_final.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_final 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_type 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_sign.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_sign 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_sign_receipt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_uncompress 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_verify.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_verify 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_verify_receipt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CONF_modules_free 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CONF_modules_load_file 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_generate_key 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_generate_parameters 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_get_ex_new_index 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_set_method.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_set_method.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_set_method 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- head/secure/lib/libcrypto/man/DH_size.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DH_size.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_size 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_SIG_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_do_sign 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_dup_DH 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_generate_key 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_generate_parameters.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_generate_parameters 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Fri Jan 16 19:57:01 2015 (r277269) +++ head/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Fri Jan 16 21:03:23 2015 (r277270) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: head/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- head/secure/lib/libcrypto/man/DSA_new.3 Fri Jan 16 19:57:01 2015 (r277269) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 21:08:04 2015 Return-Path: Delivered-To: svn-src-head@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 D9E16F1A; Fri, 16 Jan 2015 21: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 C5558EE8; Fri, 16 Jan 2015 21: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 t0GL84Lv091954; Fri, 16 Jan 2015 21:08:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GL842A091953; Fri, 16 Jan 2015 21:08:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501162108.t0GL842A091953@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 16 Jan 2015 21:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277271 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:08:05 -0000 Author: gjb Date: Fri Jan 16 21:08:04 2015 New Revision: 277271 URL: https://svnweb.freebsd.org/changeset/base/277271 Log: Document r277270, OpenSSL update to 1.0.1l. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 16 21:03:23 2015 (r277270) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 16 21:08:04 2015 (r277271) @@ -763,15 +763,9 @@ role="merged">Sendmail has been updated from 8.14.7 to 8.14.9. - OpenSSL has - been updated to version 1.0.1h. - file has been updated to version 5.22. - OpenSSL has - been updated to version 1.0.1j. - The binutils suite of utilities has been updated to include upstream patches that add new relocations for &arch.powerpc; @@ -797,6 +791,8 @@ strings were switched to the versions from the ELF Tool Chain project. + OpenSSL has + been updated to version 1.0.1l. From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 21:12:37 2015 Return-Path: Delivered-To: svn-src-head@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 8A0E2159; Fri, 16 Jan 2015 21:12: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 755D2F92; Fri, 16 Jan 2015 21:12: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 t0GLCb36095996; Fri, 16 Jan 2015 21:12:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GLCblS095995; Fri, 16 Jan 2015 21:12:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501162112.t0GLCblS095995@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 16 Jan 2015 21:12:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277272 - head/contrib/ofed/management/opensm/osmtest X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:12:37 -0000 Author: ngie Date: Fri Jan 16 21:12:36 2015 New Revision: 277272 URL: https://svnweb.freebsd.org/changeset/base/277272 Log: Don't call abort on usage errors; print out the usage message instead PR: 196793 MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/ofed/management/opensm/osmtest/main.c Modified: head/contrib/ofed/management/opensm/osmtest/main.c ============================================================================== --- head/contrib/ofed/management/opensm/osmtest/main.c Fri Jan 16 21:08:04 2015 (r277271) +++ head/contrib/ofed/management/opensm/osmtest/main.c Fri Jan 16 21:12:36 2015 (r277272) @@ -565,8 +565,9 @@ int main(int argc, char *argv[]) printf("Done with args\n"); break; - default: /* something wrong */ - abort(); + default: + show_usage(); + return 1; } } From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 21:39:14 2015 Return-Path: Delivered-To: svn-src-head@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 9628D78B; Fri, 16 Jan 2015 21:39: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 760F0227; Fri, 16 Jan 2015 21:39: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 t0GLdEJQ006609; Fri, 16 Jan 2015 21:39:14 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GLd9od006562; Fri, 16 Jan 2015 21:39:09 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501162139.t0GLd9od006562@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 16 Jan 2015 21:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277273 - in head: bin/csh etc/mail gnu/usr.bin/grep kerberos5/lib/libasn1 kerberos5/lib/libgssapi_spnego kerberos5/lib/libhdb kerberos5/lib/libhx509 lib/libc lib/libexpat lib/libunboun... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 21:39:14 -0000 Author: will Date: Fri Jan 16 21:39:08 2015 New Revision: 277273 URL: https://svnweb.freebsd.org/changeset/base/277273 Log: Add a ${CP} alias for copying files in the build. Some users build FreeBSD as non-root in Perforce workspaces. By default, Perforce sets files read-only unless they're explicitly being edited. As a result, the -f argument must be used to cp in order to override the read-only flag when copying source files to object directories. Bare use of 'cp' should be avoided in the future. Update all current users of 'cp' in the src tree. Reviewed by: emaste MFC after: 1 week Sponsored by: Spectra Logic Modified: head/bin/csh/Makefile head/etc/mail/Makefile head/gnu/usr.bin/grep/Makefile head/kerberos5/lib/libasn1/Makefile head/kerberos5/lib/libgssapi_spnego/Makefile head/kerberos5/lib/libhdb/Makefile head/kerberos5/lib/libhx509/Makefile head/lib/libc/Makefile head/lib/libexpat/Makefile head/lib/libunbound/Makefile head/secure/lib/libcrypto/Makefile head/share/mk/sys.mk head/tools/regression/execve/Makefile head/tools/test/dtrace/Makefile head/usr.bin/grep/Makefile head/usr.bin/lex/Makefile head/usr.bin/make/Makefile head/usr.sbin/mtree/Makefile Modified: head/bin/csh/Makefile ============================================================================== --- head/bin/csh/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/bin/csh/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -93,7 +93,7 @@ GENHDRS+= iconv.h SRCS+= iconv_stub.c iconv.h: ${.CURDIR}/iconv_stub.h - cp -f ${.CURDIR}/iconv_stub.h ${.TARGET} + ${CP} ${.CURDIR}/iconv_stub.h ${.TARGET} .endif .endif Modified: head/etc/mail/Makefile ============================================================================== --- head/etc/mail/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/etc/mail/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -69,7 +69,7 @@ SENDMAIL_MC!= hostname SENDMAIL_MC:= ${SENDMAIL_MC}.mc ${SENDMAIL_MC}: - cp -f freebsd.mc ${SENDMAIL_MC} + ${CP} freebsd.mc ${SENDMAIL_MC} .endif .ifndef SENDMAIL_SUBMIT_MC @@ -77,7 +77,7 @@ SENDMAIL_SUBMIT_MC!= hostname SENDMAIL_SUBMIT_MC:= ${SENDMAIL_SUBMIT_MC}.submit.mc ${SENDMAIL_SUBMIT_MC}: - cp -f freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} + ${CP} freebsd.submit.mc ${SENDMAIL_SUBMIT_MC} .endif INSTALL_CF= ${SENDMAIL_MC:R}.cf Modified: head/gnu/usr.bin/grep/Makefile ============================================================================== --- head/gnu/usr.bin/grep/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/gnu/usr.bin/grep/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -43,7 +43,7 @@ MLINKS+=grep.1 zgrep.1 grep.1 zegrep.1 g .endif gnugrep.1: grep.1 - cp ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} check: all @failed=0; total=0; \ Modified: head/kerberos5/lib/libasn1/Makefile ============================================================================== --- head/kerberos5/lib/libasn1/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libasn1/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -111,10 +111,10 @@ ${GEN_KX509}: kx509.asn1 .SUFFIXES: .h .c .x .hx .x.c: - cp -f ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp -f ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/kerberos5/lib/libgssapi_spnego/Makefile ============================================================================== --- head/kerberos5/lib/libgssapi_spnego/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libgssapi_spnego/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -45,10 +45,10 @@ ${GEN}: spnego.asn1 spnego.opt .SUFFIXES: .h .c .x .hx .x.c: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/kerberos5/lib/libhdb/Makefile ============================================================================== --- head/kerberos5/lib/libhdb/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libhdb/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -91,10 +91,10 @@ ${GEN}: hdb.asn1 .SUFFIXES: .h .c .x .hx .x.c: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/kerberos5/lib/libhx509/Makefile ============================================================================== --- head/kerberos5/lib/libhx509/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/kerberos5/lib/libhx509/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -285,10 +285,10 @@ ${GEN_CRMF}: crmf.asn1 .SUFFIXES: .h .c .x .hx .x.c: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .hx.h: - cp ${.IMPSRC} ${.TARGET} + ${CP} ${.IMPSRC} ${.TARGET} .include Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/lib/libc/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -149,11 +149,11 @@ KSRCS= bcmp.c ffs.c ffsl.c fls.c flsl.c libkern: libkern.gen libkern.${LIBC_ARCH} libkern.gen: ${KQSRCS} ${KSRCS} - cp -fp ${LIBC_SRCTOP}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern + ${CP} ${LIBC_SRCTOP}/quad/quad.h ${.ALLSRC} ${DESTDIR}/sys/libkern libkern.${LIBC_ARCH}:: ${KMSRCS} .if defined(KMSRCS) && !empty(KMSRCS) - cp -fp ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} + ${CP} ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif .if ${MK_SYSCALL_COMPAT} != "no" Modified: head/lib/libexpat/Makefile ============================================================================== --- head/lib/libexpat/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/lib/libexpat/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -28,6 +28,6 @@ bsdxml.h: expat.h > ${.TARGET} bsdxml_external.h: expat_external.h - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .include Modified: head/lib/libunbound/Makefile ============================================================================== --- head/lib/libunbound/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/lib/libunbound/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -32,7 +32,7 @@ LIBADD= ssl crypto pthread # Misnamed file in upstream source configlexer.l: configlexer.lex - cp -fp ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} CLEANFILES+= configlexer.l # Symbol prefix for lex and yacc Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/secure/lib/libcrypto/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -400,7 +400,7 @@ opensslconf.h: opensslconf-x86.h .else opensslconf.h: opensslconf-${MACHINE_CPUARCH}.h .endif - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} OLDSYMLINKS+= libdes.a libdes.so libdes.so.3 libdes_p.a afterinstall: Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Fri Jan 16 21:12:36 2015 (r277272) +++ head/share/mk/sys.mk Fri Jan 16 21:39:08 2015 (r277273) @@ -67,6 +67,11 @@ CTFFLAGS ?= -L VERSION CTFCONVERT ?= ctfconvert CTFMERGE ?= ctfmerge + +# cp(1) is used to copy source files to ${.OBJDIR}, make sure it can handle +# read-only files as non-root by passing -f. +CP ?= cp -f + DTRACE ?= dtrace .if defined(CFLAGS) && (${CFLAGS:M-g} != "") CTFFLAGS += -g Modified: head/tools/regression/execve/Makefile ============================================================================== --- head/tools/regression/execve/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/tools/regression/execve/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -14,7 +14,7 @@ all: ${PROG} goodaout ${TESTSCRIPTS} .for x in ${TESTSCRIPTS} ${x}: ${TD}/${x} - cp ${TD}/${x} . + ${CP} ${TD}/${x} . chmod +x ${x} .endfor Modified: head/tools/test/dtrace/Makefile ============================================================================== --- head/tools/test/dtrace/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/tools/test/dtrace/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -343,7 +343,7 @@ ${_f:T:S/c$/exe/} : ${_f} .for _f in ${ALL_TESTEXEFILES} ${_f:T} : ${_f} - cp -f ${_f} ${.TARGET} + ${CP} ${_f} ${.TARGET} chmod a+x ${.TARGET} .endfor Modified: head/usr.bin/grep/Makefile ============================================================================== --- head/usr.bin/grep/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.bin/grep/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -11,7 +11,7 @@ PROG= bsdgrep CLEANFILES+= bsdgrep.1 bsdgrep.1: grep.1 - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .endif SRCS= file.c grep.c queue.c util.c Modified: head/usr.bin/lex/Makefile ============================================================================== --- head/usr.bin/lex/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.bin/lex/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -51,7 +51,7 @@ bootstrap: ${GENFILES:S/^/init/g} @diff -I '^#line ' -I '\$$FreeBS[D]: .*\$$' -q \ ${.CURDIR}/init${_f} ${_f} 2> /dev/null || { \ echo "Bootstrapping ${_f}" ; \ - cp -f ${.CURDIR}/init${_f} ${_f} ; \ + ${CP} ${.CURDIR}/init${_f} ${_f} ; \ } .endfor Modified: head/usr.bin/make/Makefile ============================================================================== --- head/usr.bin/make/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.bin/make/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -115,6 +115,6 @@ CFLAGS+= -DDEFSHELLNAME=\"${MAKE_SHELL}\ PROG= fmake CLEANFILES+= fmake.1 fmake.1: make.1 - cp ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .include Modified: head/usr.sbin/mtree/Makefile ============================================================================== --- head/usr.sbin/mtree/Makefile Fri Jan 16 21:12:36 2015 (r277272) +++ head/usr.sbin/mtree/Makefile Fri Jan 16 21:39:08 2015 (r277273) @@ -16,6 +16,6 @@ LIBADD= md CLEANFILES+= fmtree.8 fmtree.8: mtree.8 - cp -f ${.ALLSRC} ${.TARGET} + ${CP} ${.ALLSRC} ${.TARGET} .include From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 22:11:03 2015 Return-Path: Delivered-To: svn-src-head@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 BBF37D8B; Fri, 16 Jan 2015 22:11: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 A79B2755; Fri, 16 Jan 2015 22:11: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 t0GMB3DK022716; Fri, 16 Jan 2015 22:11:03 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GMB34o022715; Fri, 16 Jan 2015 22:11:03 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501162211.t0GMB34o022715@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 16 Jan 2015 22:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277274 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 22:11:03 -0000 Author: jkim Date: Fri Jan 16 22:11:02 2015 New Revision: 277274 URL: https://svnweb.freebsd.org/changeset/base/277274 Log: Update buildinf.h to make SSLeay_version(3) little bit more useful. MFC after: 1 week Modified: head/secure/lib/libcrypto/Makefile Modified: head/secure/lib/libcrypto/Makefile ============================================================================== --- head/secure/lib/libcrypto/Makefile Fri Jan 16 21:39:08 2015 (r277273) +++ head/secure/lib/libcrypto/Makefile Fri Jan 16 22:11:02 2015 (r277274) @@ -390,9 +390,9 @@ CLEANFILES= buildinf.h opensslconf.h buildinf.h: ${.CURDIR}/Makefile ( echo "#ifndef MK1MF_BUILD"; \ - echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ - echo " #define CFLAGS \"$(CC)\""; \ - echo " #define PLATFORM \"FreeBSD-${MACHINE_ARCH}\""; \ + echo " /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */"; \ + echo " #define CFLAGS \"compiler: ${COMPILER_TYPE}\""; \ + echo " #define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ echo "#endif" ) > ${.TARGET} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 23:47:43 2015 Return-Path: Delivered-To: svn-src-head@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 5371837F; Fri, 16 Jan 2015 23:47: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 3F1C3123; Fri, 16 Jan 2015 23:47: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 t0GNlhMd067199; Fri, 16 Jan 2015 23:47:43 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GNlhDK067198; Fri, 16 Jan 2015 23:47:43 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501162347.t0GNlhDK067198@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 16 Jan 2015 23:47:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277275 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 23:47:43 -0000 Author: adrian Date: Fri Jan 16 23:47:42 2015 New Revision: 277275 URL: https://svnweb.freebsd.org/changeset/base/277275 Log: Add bluetooth MCI coexistence HAL methods - used for AR9462 and AR9565 NICs. It's found, amongst other things, in the Acer Chromebook (Intel) devices. Tested: * AR9462 (WB222) Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri Jan 16 22:11:02 2015 (r277274) +++ head/sys/dev/ath/ath_hal/ah.h Fri Jan 16 23:47:42 2015 (r277275) @@ -1589,6 +1589,18 @@ struct ath_hal { void __ahdecl(*ah_btCoexDisable)(struct ath_hal *); int __ahdecl(*ah_btCoexEnable)(struct ath_hal *); + /* Bluetooth MCI methods */ + void __ahdecl(*ah_btMciSetup)(struct ath_hal *, + uint32_t, void *, uint16_t, uint32_t); + HAL_BOOL __ahdecl(*ah_btMciSendMessage)(struct ath_hal *, + uint8_t, uint32_t, uint32_t *, uint8_t, + HAL_BOOL, HAL_BOOL); + uint32_t __ahdecl(*ah_btMciGetInterrupt)(struct ath_hal *, + uint32_t *, uint32_t *); + uint32_t __ahdecl(*ah_btMciGetState)(struct ath_hal *, + uint32_t, uint32_t *); + void __ahdecl(*ah_btMciDetach)(struct ath_hal *); + /* LNA diversity configuration */ void __ahdecl(*ah_divLnaConfGet)(struct ath_hal *, HAL_ANT_COMB_CONFIG *); From owner-svn-src-head@FreeBSD.ORG Fri Jan 16 23:48:29 2015 Return-Path: Delivered-To: svn-src-head@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 2ECBF4B8; Fri, 16 Jan 2015 23:48: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 1A438128; Fri, 16 Jan 2015 23: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 t0GNmSqf067349; Fri, 16 Jan 2015 23:48:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0GNmSqM067348; Fri, 16 Jan 2015 23:48:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501162348.t0GNmSqM067348@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 16 Jan 2015 23:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277276 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Jan 2015 23:48:29 -0000 Author: adrian Date: Fri Jan 16 23:48:28 2015 New Revision: 277276 URL: https://svnweb.freebsd.org/changeset/base/277276 Log: Tie in the MCI bluetooth coexistence functions into the HAL. Tested: * AR9462 (WB222) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Jan 16 23:47:42 2015 (r277275) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Jan 16 23:48:28 2015 (r277276) @@ -249,6 +249,13 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_btCoexDisable = ar9300_bt_coex_disable; ah->ah_btCoexEnable = ar9300_bt_coex_enable; + /* MCI bluetooth functions */ + ah->ah_btMciSetup = ar9300_mci_setup; + ah->ah_btMciSendMessage = ar9300_mci_send_message; + ah->ah_btMciGetInterrupt = ar9300_mci_get_interrupt; + ah->ah_btMciGetState = ar9300_mci_state; + ah->ah_btMciDetach = ar9300_mci_detach; + /* LNA diversity functions */ ah->ah_divLnaConfGet = ar9300_ant_div_comb_get_config; ah->ah_divLnaConfSet = ar9300_ant_div_comb_set_config; From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 00:02:19 2015 Return-Path: Delivered-To: svn-src-head@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 2CB4971E; Sat, 17 Jan 2015 00:02: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 18641312; Sat, 17 Jan 2015 00:02: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 t0H02In2076401; Sat, 17 Jan 2015 00:02:18 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H02IWf076399; Sat, 17 Jan 2015 00:02:18 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501170002.t0H02IWf076399@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 00:02:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277277 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 00:02:19 -0000 Author: adrian Date: Sat Jan 17 00:02:18 2015 New Revision: 277277 URL: https://svnweb.freebsd.org/changeset/base/277277 Log: Until there's a full MCI implementation - just implement a placeholder MCI bluetooth coexistence method for WB222. The rest of MCI requires a bunch more work, including adding a DMA buffer for the MCI hardware to bounce messages in/out of and handling MCI interrupts. But the more important part here is telling the HAL the btcoex is enabled and MCI is in use so it configures the correct initial bluetooth parameters in the wireless NIC and configures things like bluetooth traffic weights and such. So, this at least gets the HAL to do some of the right things in configuring the inital bluetooth coexistence stuff, but doesn't actually do full btcoex. That'll take.. some effort. Tested: * AR9462 (WB222), STA mode Modified: head/sys/dev/ath/if_ath_btcoex.c Modified: head/sys/dev/ath/if_ath_btcoex.c ============================================================================== --- head/sys/dev/ath/if_ath_btcoex.c Fri Jan 16 23:48:28 2015 (r277276) +++ head/sys/dev/ath/if_ath_btcoex.c Sat Jan 17 00:02:18 2015 (r277277) @@ -188,6 +188,72 @@ ath_btcoex_cfg_wb225(struct ath_softc *s return (0); } +/* + * Initial AR9462 / (WB222) bluetooth coexistence settings, + * just for experimentation. + * + * Return 0 for OK; errno for error. + */ +static int +ath_btcoex_cfg_wb222(struct ath_softc *sc) +{ + HAL_BT_COEX_INFO btinfo; + HAL_BT_COEX_CONFIG btconfig; + struct ath_hal *ah = sc->sc_ah; + + if (! ath_hal_btcoex_supported(ah)) + return (EINVAL); + + bzero(&btinfo, sizeof(btinfo)); + bzero(&btconfig, sizeof(btconfig)); + + device_printf(sc->sc_dev, "Enabling WB222 BTCOEX\n"); + + btinfo.bt_module = HAL_BT_MODULE_JANUS; /* XXX not used? */ + btinfo.bt_coex_config = HAL_BT_COEX_CFG_MCI; + + /* + * MCI uses a completely different interface to speak + * to the bluetooth module - it's a command based + * thing over a serial line, rather than + * state pins to/from the bluetooth module. + * + * So, the GPIO configuration, polarity, etc + * doesn't matter on MCI devices; it's just + * completely ignored by the HAL. + */ + btinfo.bt_gpio_bt_active = 4; + btinfo.bt_gpio_bt_priority = 8; + btinfo.bt_gpio_wlan_active = 5; + + btinfo.bt_active_polarity = 1; /* XXX not used */ + btinfo.bt_single_ant = 0; /* 2 antenna on WB222 */ + btinfo.bt_isolation = 0; /* in dB, not used */ + + ath_hal_btcoex_set_info(ah, &btinfo); + + btconfig.bt_time_extend = 0; + btconfig.bt_txstate_extend = 1; /* true */ + btconfig.bt_txframe_extend = 1; /* true */ + btconfig.bt_mode = HAL_BT_COEX_MODE_SLOTTED; + btconfig.bt_quiet_collision = 1; /* true */ + btconfig.bt_rxclear_polarity = 1; /* true */ + btconfig.bt_priority_time = 2; + btconfig.bt_first_slot_time = 5; + btconfig.bt_hold_rxclear = 1; /* true */ + + ath_hal_btcoex_set_config(ah, &btconfig); + + /* + * Enable antenna diversity. + */ + ath_hal_btcoex_set_parameter(ah, HAL_BT_COEX_ANTENNA_DIVERSITY, 1); + + return (0); +} + + + #if 0 /* @@ -243,6 +309,8 @@ ath_btcoex_attach(struct ath_softc *sc) if (strncmp(profname, "wb195", 5) == 0) { ret = ath_btcoex_cfg_wb195(sc); + } else if (strncmp(profname, "wb222", 5) == 0) { + ret = ath_btcoex_cfg_wb222(sc); } else if (strncmp(profname, "wb225", 5) == 0) { ret = ath_btcoex_cfg_wb225(sc); } else { From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 00:10:22 2015 Return-Path: Delivered-To: svn-src-head@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 A9F7DACD for ; Sat, 17 Jan 2015 00:10:22 +0000 (UTC) Received: from mail-pa0-f42.google.com (mail-pa0-f42.google.com [209.85.220.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6DD2238C for ; Sat, 17 Jan 2015 00:10:22 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id et14so27261388pad.1 for ; Fri, 16 Jan 2015 16:10:16 -0800 (PST) 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=F6v26aOduvnHygKHj1bSRgoPPYq/jQ3d2nX5PpUVdgY=; b=C3XSUGpjbR15bWTr+NrESQhwUxNM2P8uYwyczpJcxxqwG6QiNM0wQGabEIywpPhNZm PYZNu2QQYrqhxkMezPafa/dlIp3O03qa+HtQfbObUcO1fpZzCpJjiMm2ZxXvRG3TtWkk ti6ID+ckyUVx1iiRcq2LfQ1U7WwsqXsmIsdyMPupwiYXYyn8u2374ldQJu81L22IqQXu Slk2t36zSdd+shgdZkStT4bWmCOwiGUjjgfQf00IVDOMhT8UNNnl5qyW9ZNK6NuT4/Dc iasjAhHfbdV1La+LM5Cfv5kVdJHG+9PwmO6GccSmy4g/lyN/UiOZi3lK5RkWHI81VS01 qX7Q== X-Gm-Message-State: ALoCoQmdPWqqhjv4KrBPdgLI+OOkfC7w4qm4WXppe0UgrLQY1RdRJ4MQJJfPvEe55nPJ9s3Vuloh X-Received: by 10.66.170.208 with SMTP id ao16mr26716991pac.1.1421453416756; Fri, 16 Jan 2015 16:10:16 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id wm1sm5130877pac.11.2015.01.16.16.10.14 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 16 Jan 2015 16:10:16 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r255323 - in head/sys: amd64/conf i386/conf Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <20150115142725.GA20964@FreeBSD.org> Date: Fri, 16 Jan 2015 17:10:13 -0700 Message-Id: <0BB1A79B-F679-4D9B-9547-5B53926294E9@bsdimp.com> References: <201309062024.r86KOMqm059838@svn.freebsd.org> <20130907081743.GB95723@zxy.spb.ru> <20130907170700.GB3796@zxy.spb.ru> <20130907210244.GE3796@zxy.spb.ru> <20150115142725.GA20964@FreeBSD.org> To: Alexey Dokuchaev X-Mailer: Apple Mail (2.1993) Cc: Adrian Chadd , "src-committers@freebsd.org" , Bryan Venteicher , "svn-src-all@freebsd.org" , ae@FreeBSD.org, Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Edward Tomasz Napiera?a X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 00:10:22 -0000 --Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 15, 2015, at 7:27 AM, Alexey Dokuchaev = wrote: >=20 > On Sun, Sep 08, 2013 at 01:02:44AM +0400, Slawa Olhovchenkov wrote: >> On Sat, Sep 07, 2013 at 10:48:48PM +0200, Edward Tomasz Napiera?a = wrote: >>>> I'll be happy if someone does this right now, by populating a >>>> /boot/loader.modules or something, and then force the "fixing" of >>>> loader to cache metadata to make the reads faster. >>>=20 >>> I have no idea on what's the loader(8) state right now, but long = time >>> ago I've made a patch that made it significantly faster by making >>> caching actually work. No idea if anyone picked up the patch >>> (http://people.freebsd.org/~trasz/fast-loader-3.diff), though. >>=20 >> Some time ago Andrey V. Elsukov do improvement in loader for more >> efficient caching and partition handling. Now loader load a lot of >> modules faster. I am insert hist in CC: list. >=20 > It's kind of funny we seem to have similar discussion happening right = now > again -- sixteen months later. >=20 > Edward, Andrey, since you two seem to have some working code already, = maybe > you can work together to push out something that can be committed? :) Orthogonal to these issues, I=E2=80=99m improving the loader to = (optionally) load any drivers for storage-class devices it finds on the PCI / PCIe bus. I=E2=80=99m = augmenting /boot/$KERNEL/linker.hints with some additional data so /boot/loader = knows what to load. Warner --Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2 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 iQIcBAEBCgAGBQJUuahlAAoJEGwc0Sh9sBEAhZwP/0SaPG3YETs9pRme6RHa6Iy/ PMi1FT5M/BoZlIHJCHh9nMAvm226OhCzt7Qh6h74noy0mZVCMarWXZ6fw9PywrYR zUZoMRF00qpmHLp4/1UyuP9IP0iLnAdUJ8QHgtA6bTZvLd53BrltikAPHHInjNEH N6UHLxCsyM3rgffeykh3iT+mKOlvNqs8+IN80DLRAGX/HiLkblS1qsTsLNRJSDmH GoyX9MPfxkFcLAleDYeUVURxLXZurj+j61emlN4CG9nMh9QGh+Y6zpKaS+7rUCf4 Yif/sqXDWxLtH+xaBeHY8sctrJBekHYMfsiXJqldtqFd2oKn2FxWbLKT/VQWo1xd YAVD5rjNTkgCNgJsNzHRyrJWWsv8lUAzmnPQ1q/EN7qQPtAymPhXG5Kh4l2bZEpu QMXrQs0zEmabTSkZjZtEGXQOnP6i1e6eg6GDYR8YG7AtSCNMCo3SM/OHFncNq6XM cRdUCMUIPA/WLET2gOXMLMf5ikZaEA1EO2W5lDhVTOYeiNWWQuVMuVewrDLCpUG6 T1EzP5LDetIBwmQVcTs/JpUD52HLHFo3AgfWhLPX3RpCiA4cqjFP7WvRPMdQM8Iz adxP+xNFN0S4uw2WbDuTV8UIPTUcC30f2hcklBhFWOXiPs6crOSbhJzs6qxsT1cJ gOZZJZHyR2ZcIcMoJiDk =VVMf -----END PGP SIGNATURE----- --Apple-Mail=_1512E83F-E07C-409F-9D7E-346BDC138BE2-- From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 00:58:25 2015 Return-Path: Delivered-To: svn-src-head@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 B9E301F6; Sat, 17 Jan 2015 00:58: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 A5A9DA39; Sat, 17 Jan 2015 00:58: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 t0H0wPIU001024; Sat, 17 Jan 2015 00:58:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H0wPHF001023; Sat, 17 Jan 2015 00:58:25 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501170058.t0H0wPHF001023@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 17 Jan 2015 00:58:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277278 - head/contrib/netbsd-tests/lib/libpthread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 00:58:25 -0000 Author: ngie Date: Sat Jan 17 00:58:24 2015 New Revision: 277278 URL: https://svnweb.freebsd.org/changeset/base/277278 Log: Fix lib/libthr/tests/detach_test - Eliminate race with liberal use of sleep(3) [1] - Fix NetBSD-specific implementation way of testing result from pthread_cancel by testing with `td` instead of `NULL` [2] PR: 196738 [1] PR: 191906 [2] MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_detach.c ============================================================================== --- head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sat Jan 17 00:02:18 2015 (r277277) +++ head/contrib/netbsd-tests/lib/libpthread/t_detach.c Sat Jan 17 00:58:24 2015 (r277278) @@ -38,11 +38,18 @@ __RCSID("$NetBSD: t_detach.c,v 1.1 2011/ #include "h_common.h" +#ifdef __FreeBSD__ +#include +#endif + static void *func(void *); static void * func(void *arg) { +#ifdef __FreeBSD__ + sleep(2); +#endif return NULL; } @@ -72,18 +79,25 @@ ATF_TC_BODY(pthread_detach, tc) */ PTHREAD_REQUIRE(pthread_detach(t)); +#ifdef __FreeBSD__ + sleep(1); +#endif rv = pthread_join(t, NULL); ATF_REQUIRE(rv == EINVAL); #ifdef __FreeBSD__ - atf_tc_expect_fail("PR # 191906: fails with EINVAL, not ESRCH"); + sleep(3); #endif /* * As usual, ESRCH should follow if * we try to detach an invalid thread. */ +#ifdef __NetBSD__ rv = pthread_cancel(NULL); +#else + rv = pthread_cancel(t); +#endif ATF_REQUIRE(rv == ESRCH); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 02:17:58 2015 Return-Path: Delivered-To: svn-src-head@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 D30D4978; Sat, 17 Jan 2015 02:17: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 BFD27212; Sat, 17 Jan 2015 02:17: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 t0H2Hw3L038806; Sat, 17 Jan 2015 02:17:58 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H2Hw0d038805; Sat, 17 Jan 2015 02:17:58 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501170217.t0H2Hw0d038805@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Jan 2015 02:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277284 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 02:17:58 -0000 Author: imp Date: Sat Jan 17 02:17:57 2015 New Revision: 277284 URL: https://svnweb.freebsd.org/changeset/base/277284 Log: Move DEV_ entries scattered to their common section. Add DEV_PCI. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Jan 17 02:17:55 2015 (r277283) +++ head/sys/conf/options Sat Jan 17 02:17:57 2015 (r277284) @@ -396,11 +396,6 @@ BOOTP_NFSROOT opt_bootp.h BOOTP_NFSV3 opt_bootp.h BOOTP_WIRED_TO opt_bootp.h DEVICE_POLLING -DEV_ENC opt_enc.h -DEV_PF opt_pf.h -DEV_PFLOG opt_pf.h -DEV_PFSYNC opt_pf.h -DEV_VLAN opt_vlan.h DUMMYNET opt_ipdn.h INET opt_inet.h INET6 opt_inet6.h @@ -698,10 +693,16 @@ ISAPNP opt_isa.h # various 'device presence' options. DEV_BPF opt_bpf.h -DEV_NETMAP opt_global.h -DEV_MCA opt_mca.h DEV_CARP opt_carp.h +DEV_ENC opt_enc.h +DEV_MCA opt_mca.h +DEV_NETMAP opt_global.h +DEV_PCI opt_pci.h +DEV_PF opt_pf.h +DEV_PFLOG opt_pf.h +DEV_PFSYNC opt_pf.h DEV_SPLASH opt_splash.h +DEV_VLAN opt_vlan.h # EISA support DEV_EISA opt_eisa.h From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 02:17:56 2015 Return-Path: Delivered-To: svn-src-head@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 BBFC188F; Sat, 17 Jan 2015 02: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 A8879211; Sat, 17 Jan 2015 02: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 t0H2Hu2x038756; Sat, 17 Jan 2015 02:17:56 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H2HufT038755; Sat, 17 Jan 2015 02:17:56 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501170217.t0H2HufT038755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Jan 2015 02:17:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277283 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 02:17:56 -0000 Author: imp Date: Sat Jan 17 02:17:55 2015 New Revision: 277283 URL: https://svnweb.freebsd.org/changeset/base/277283 Log: The sn driver isn't UCODE sourceless. While it is true there's an binary FPGA image that's in an include file in this directory, that include file isn't actually used. It is only for certain Trump Cards that we don't yet support. When support was anticipated for them, we got permission to include the required FPGA image in our sources under the BSDL, but didn't start actually including the file. This was done to provide a public paper trail for this file. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jan 17 01:21:30 2015 (r277282) +++ head/sys/modules/Makefile Sat Jan 17 02:17:55 2015 (r277283) @@ -317,7 +317,7 @@ SUBDIR= \ sis \ sk \ ${_smbfs} \ - ${_sn} \ + sn \ ${_snc} \ snp \ ${_sound} \ @@ -438,7 +438,6 @@ _ispfw= ispfw _mwlfw= mwlfw _ralfw= ralfw _sf= sf -_sn= sn _ti= ti _txp= txp .endif From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 02:18:00 2015 Return-Path: Delivered-To: svn-src-head@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 DAE6EAC5; Sat, 17 Jan 2015 02:18: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 C81BF214; Sat, 17 Jan 2015 02:18: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 t0H2I0Tl038858; Sat, 17 Jan 2015 02:18:00 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H2I0AW038857; Sat, 17 Jan 2015 02:18:00 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501170218.t0H2I0AW038857@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sat, 17 Jan 2015 02:18:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277285 - head/sys/x86/isa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 02:18:01 -0000 Author: imp Date: Sat Jan 17 02:17:59 2015 New Revision: 277285 URL: https://svnweb.freebsd.org/changeset/base/277285 Log: Need to include opt_mca.h to test for DEV_MCA. Modified: head/sys/x86/isa/atpic.c Modified: head/sys/x86/isa/atpic.c ============================================================================== --- head/sys/x86/isa/atpic.c Sat Jan 17 02:17:57 2015 (r277284) +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015 (r277285) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include "opt_auto_eoi.h" #include "opt_isa.h" +#include "opt_mca.h" #include #include From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 06:43:31 2015 Return-Path: Delivered-To: svn-src-head@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 D32474A2; Sat, 17 Jan 2015 06:43: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 BEAFFEAF; Sat, 17 Jan 2015 06:43: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 t0H6hV52062863; Sat, 17 Jan 2015 06:43:31 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H6hVLm062862; Sat, 17 Jan 2015 06:43:31 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501170643.t0H6hVLm062862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 06:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277288 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 06:43:31 -0000 Author: adrian Date: Sat Jan 17 06:43:30 2015 New Revision: 277288 URL: https://svnweb.freebsd.org/changeset/base/277288 Log: Override the bt enable/disable methods for AR9462 (jupiter) and AR9565 (Aphrodite.) These need to use the MCI routines, not the legacy 2-wire / 3-wire bluetooth coexistence methods. Tested: * AR9462 (WB222); STA mode Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Jan 17 06:18:45 2015 (r277287) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sat Jan 17 06:43:30 2015 (r277288) @@ -250,6 +250,11 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_btCoexEnable = ar9300_bt_coex_enable; /* MCI bluetooth functions */ + if (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) { + ah->ah_btCoexSetWeights = ar9300_mci_bt_coex_set_weights; + ah->ah_btCoexDisable = ar9300_mci_bt_coex_disable; + ah->ah_btCoexEnable = ar9300_mci_bt_coex_enable; + } ah->ah_btMciSetup = ar9300_mci_setup; ah->ah_btMciSendMessage = ar9300_mci_send_message; ah->ah_btMciGetInterrupt = ar9300_mci_get_interrupt; From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 07:01:52 2015 Return-Path: Delivered-To: svn-src-head@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 B319B673; Sat, 17 Jan 2015 07: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 9EA79AD; Sat, 17 Jan 2015 07: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 t0H71qEV071881; Sat, 17 Jan 2015 07:01:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H71qAB071880; Sat, 17 Jan 2015 07:01:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501170701.t0H71qAB071880@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 17 Jan 2015 07:01:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277289 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 07:01:52 -0000 Author: nwhitehorn Date: Sat Jan 17 07:01:51 2015 New Revision: 277289 URL: https://svnweb.freebsd.org/changeset/base/277289 Log: Return an appropriate error code in the case of a missing property rather than random numbers. MFC after: 1 week Modified: head/sys/dev/ofw/ofw_fdt.c Modified: head/sys/dev/ofw/ofw_fdt.c ============================================================================== --- head/sys/dev/ofw/ofw_fdt.c Sat Jan 17 06:43:30 2015 (r277288) +++ head/sys/dev/ofw/ofw_fdt.c Sat Jan 17 07:01:51 2015 (r277289) @@ -238,6 +238,9 @@ ofw_fdt_getproplen(ofw_t ofw, phandle_t return (sizeof(uint64_t)*2*fdt_num_mem_rsv(fdtp)); } + if (prop == NULL) + return (-1); + return (len); } From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 07:33:03 2015 Return-Path: Delivered-To: svn-src-head@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 3B4FB92F; Sat, 17 Jan 2015 07:33: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 27A16325; Sat, 17 Jan 2015 07:33: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 t0H7X3Ar085647; Sat, 17 Jan 2015 07:33:03 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H7X3XI085646; Sat, 17 Jan 2015 07:33:03 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501170733.t0H7X3XI085646@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 07:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277290 - head/sys/dev/ath/ath_hal/ar5416 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 07:33:03 -0000 Author: adrian Date: Sat Jan 17 07:33:02 2015 New Revision: 277290 URL: https://svnweb.freebsd.org/changeset/base/277290 Log: Oops; correctly reload the CCA registers with the uncapped value in prep for the next NF calibration pass. Totally missing braces. Damn you C. Submitted by: Sascha Wildner MFC after: 1 week Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sat Jan 17 07:01:51 2015 (r277289) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Sat Jan 17 07:33:02 2015 (r277290) @@ -663,7 +663,7 @@ ar5416LoadNF(struct ath_hal *ah, const s * by the median we just loaded. This will be initial (and max) value * of next noise floor calibration the baseband does. */ - for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) + for (i = 0; i < AR5416_NUM_NF_READINGS; i ++) { /* Don't write to EXT radio CCA registers unless in HT/40 mode */ /* XXX this check should really be cleaner! */ @@ -676,6 +676,7 @@ ar5416LoadNF(struct ath_hal *ah, const s val |= (((uint32_t)(-50) << 1) & 0x1ff); OS_REG_WRITE(ah, ar5416_cca_regs[i], val); } + } } /* From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 08:09:08 2015 Return-Path: Delivered-To: svn-src-head@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 AD3DBF15; Sat, 17 Jan 2015 08: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 992A0813; Sat, 17 Jan 2015 08:09: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 t0H898ad099959; Sat, 17 Jan 2015 08:09:08 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0H8980q099958; Sat, 17 Jan 2015 08:09:08 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201501170809.t0H8980q099958@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Sat, 17 Jan 2015 08:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277291 - head/sys/boot/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 08:09:08 -0000 Author: royger Date: Sat Jan 17 08:09:07 2015 New Revision: 277291 URL: https://svnweb.freebsd.org/changeset/base/277291 Log: loader: use correct types for parse_modmetadata Use the proper types in parse_modmetadata for the p_start and p_end parameters. This was causing problems in the ARM 32bit loader. Sponsored by: Citrix Systems R&D Reported and Tested by: ian Modified: head/sys/boot/common/load_elf.c Modified: head/sys/boot/common/load_elf.c ============================================================================== --- head/sys/boot/common/load_elf.c Sat Jan 17 07:33:02 2015 (r277290) +++ head/sys/boot/common/load_elf.c Sat Jan 17 08:09:07 2015 (r277291) @@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef, Elf_Addr p, void *val, size_t len); static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end); + Elf_Addr p_start, Elf_Addr p_end); static symaddr_fn __elfN(symaddr); static char *fake_modname(const char *name); @@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file Elf_Size size; u_int fpcopy; Elf_Sym sym; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; dp = NULL; shdr = NULL; @@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloade Elf_Shdr *sh_data[2]; char *shstrtab = NULL; size_t size; - u_int64_t p_start, p_end; + Elf_Addr p_start, p_end; bzero(&ef, sizeof(struct elf_file)); ef.fd = -1; @@ -820,7 +820,7 @@ out: int __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef, - u_int64_t p_start, u_int64_t p_end) + Elf_Addr p_start, Elf_Addr p_end) { struct mod_metadata md; #if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64 From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 08:19:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 964FD22F; Sat, 17 Jan 2015 08:19:13 +0000 (UTC) Date: Sat, 17 Jan 2015 08:19:13 +0000 From: Alexey Dokuchaev To: Warner Losh Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150117081913.GA2064@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <54B7E21B.5080008@FreeBSD.org> <20150115162050.GA60729@FreeBSD.org> <5645C90D-2CC7-4517-8AD4-B238AF42AD51@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5645C90D-2CC7-4517-8AD4-B238AF42AD51@bsdimp.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, Warner Losh , John Baldwin X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 08:19:13 -0000 Among emails in this thread, Warner Losh wrote: [ so to avoid replying on per-email bases ] > (2) is the exact problem I'm working on. Since the design of that will > allow us to read from the kernel these modules, (1) becomes largely > irrelevant because the only /boot/loader incursion would be to load > drivers for any storage devices that are on the PCIe bus. ... > But you bring up a good point. i386 is easy, once the basics are done. > PowerPC is only slightly harder, since it has good /boot/loader support > as well as a GENERIC kernel or two. Ditto sparc64. But stepping into arm > and mips then all hell breaks loose. > > It's also desirable to refactor GENERIC, for the transition period, to be > include MINIMAL + more stuff. I'll do that as time permits. Thanks for these follow-ups, it certainly brings more clarity to what you are up to, and overall it all sounds pretty awesome. Keep it up! :) ./danfe From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 08:30:05 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 6031753A; Sat, 17 Jan 2015 08:30:05 +0000 (UTC) Date: Sat, 17 Jan 2015 08:30:05 +0000 From: Alexey Dokuchaev To: Slawa Olhovchenkov Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150117083005.GA9496@FreeBSD.org> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150115132303.GA245@zxy.spb.ru> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 08:30:05 -0000 On Thu, Jan 15, 2015 at 04:23:03PM +0300, Slawa Olhovchenkov wrote: > I think defining UFS options in kernel connfig affect to module too. > When I define this options in kernel config (w/o options FFS) I got > ufs.ko with this SU, quota, acl etc. Nice point I missed in earlier replies. In my stable/8 kernel config, now I have: options FFS options SOFTUPDATES options UFS_ACL options UFS_DIRHASH If I read stable/8/sys/modules/ufs/Makefile correctly, I can safely remove all four lines and still get ufs.ko with all these features (+ some more I don't really need, like QUOTA, but don't mind), right? ./danfe From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 11:32:10 2015 Return-Path: Delivered-To: svn-src-head@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 F2068BC8; Sat, 17 Jan 2015 11:32: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 DE59FC15; Sat, 17 Jan 2015 11:32: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 t0HBW9f4096681; Sat, 17 Jan 2015 11:32:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HBW9Lq096680; Sat, 17 Jan 2015 11:32:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501171132.t0HBW9Lq096680@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 17 Jan 2015 11:32:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277295 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 11:32:10 -0000 Author: ae Date: Sat Jan 17 11:32:09 2015 New Revision: 277295 URL: https://svnweb.freebsd.org/changeset/base/277295 Log: Fix condition and really sort ports. Also add comment describing the intent of this code. Reported by: sbruno MFC after: 1 week Sponsored by: Yandex LLC Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Sat Jan 17 08:35:31 2015 (r277294) +++ head/sys/net/if_lagg.c Sat Jan 17 11:32:09 2015 (r277295) @@ -799,11 +799,16 @@ lagg_port_create(struct lagg_softc *sc, lagg_port_lladdr(lp, IF_LLADDR(sc->sc_ifp)); } - /* Insert into the list of ports. Keep ports sorted by if_index. */ + /* + * Insert into the list of ports. + * Keep ports sorted by if_index. It is handy, when configuration + * is predictable and `ifconfig laggN create ...` command + * will lead to the same result each time. + */ SLIST_FOREACH(tlp, &sc->sc_ports, lp_entries) { if (tlp->lp_ifp->if_index < ifp->if_index && ( SLIST_NEXT(tlp, lp_entries) == NULL || - SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index < + SLIST_NEXT(tlp, lp_entries)->lp_ifp->if_index > ifp->if_index)) break; } From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 12:31:28 2015 Return-Path: Delivered-To: svn-src-head@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 151F1B4F; Sat, 17 Jan 2015 12: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 0167C20B; Sat, 17 Jan 2015 12: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 t0HCVRim024762; Sat, 17 Jan 2015 12:31:27 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HCVR2p024759; Sat, 17 Jan 2015 12:31:27 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501171231.t0HCVR2p024759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 17 Jan 2015 12:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277298 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 12:31:28 -0000 Author: br Date: Sat Jan 17 12:31:26 2015 New Revision: 277298 URL: https://svnweb.freebsd.org/changeset/base/277298 Log: o Notify USB host about connection when operating in device mode. Required when communicating to Mac OS X USB host stack. o Also don't set stall bit to TX pipe in device mode as seems Mac OS X don't clears it as it should. Discussed with: hselasky@ Modified: head/sys/dev/usb/net/if_cdce.c head/sys/dev/usb/net/if_cdcereg.h Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Sat Jan 17 11:43:13 2015 (r277297) +++ head/sys/dev/usb/net/if_cdce.c Sat Jan 17 12:31:26 2015 (r277298) @@ -898,8 +898,14 @@ cdce_init(struct usb_ether *ue) usbd_transfer_start(sc->sc_xfer[CDCE_INTR_RX]); usbd_transfer_start(sc->sc_xfer[CDCE_INTR_TX]); - /* stall data write direction, which depends on USB mode */ - usbd_xfer_set_stall(sc->sc_xfer[CDCE_BULK_TX]); + /* + * Stall data write direction, which depends on USB mode. + * + * Some USB host stacks (e.g. Mac OS X) don't clears stall + * bit as it should, so set it in our host mode only. + */ + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) + usbd_xfer_set_stall(sc->sc_xfer[CDCE_BULK_TX]); /* start data transfers */ cdce_start(ue); @@ -1065,6 +1071,10 @@ tr_setup: static void cdce_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) { + struct cdce_softc *sc = usbd_xfer_softc(xfer); + struct usb_cdc_notification req; + struct usb_page_cache *pc; + uint32_t speed; int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); @@ -1077,10 +1087,50 @@ cdce_intr_write_callback(struct usb_xfer /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: -#if 0 - usbd_xfer_set_frame_len(xfer, 0, XXX); - usbd_transfer_submit(xfer); -#endif + /* + * Inform host about connection. Required according to USB CDC + * specification and communicating to Mac OS X USB host stack. + * Some of the values seems ignored by Mac OS X though. + */ + if (sc->sc_notify_state == CDCE_NOTIFY_NETWORK_CONNECTION) { + req.bmRequestType = UCDC_NOTIFICATION; + req.bNotification = UCDC_N_NETWORK_CONNECTION; + req.wIndex[0] = sc->sc_ifaces_index[1]; + req.wIndex[1] = 0; + USETW(req.wValue, 1); /* Connected */ + USETW(req.wLength, 0); + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frames(xfer, 1); + usbd_transfer_submit(xfer); + sc->sc_notify_state = CDCE_NOTIFY_SPEED_CHANGE; + + } else if (sc->sc_notify_state == CDCE_NOTIFY_SPEED_CHANGE) { + req.bmRequestType = UCDC_NOTIFICATION; + req.bNotification = UCDC_N_CONNECTION_SPEED_CHANGE; + req.wIndex[0] = sc->sc_ifaces_index[1]; + req.wIndex[1] = 0; + USETW(req.wValue, 0); + USETW(req.wLength, 8); + + /* Peak theoretical bulk trasfer rate in bits/s */ + if (usbd_get_speed(sc->sc_ue.ue_udev) == USB_SPEED_HIGH) + speed = (13 * 512 * 8 * 1000 * 8); + else + speed = (19 * 64 * 1 * 1000 * 8); + + USETDW(req.data + 0, speed); /* Upstream bit rate */ + USETDW(req.data + 4, speed); /* Downstream bit rate */ + + pc = usbd_xfer_get_frame(xfer, 0); + usbd_copy_in(pc, 0, &req, sizeof(req)); + usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); + usbd_xfer_set_frames(xfer, 1); + usbd_transfer_submit(xfer); + sc->sc_notify_state = CDCE_NOTIFY_DONE; + } break; default: /* Error */ Modified: head/sys/dev/usb/net/if_cdcereg.h ============================================================================== --- head/sys/dev/usb/net/if_cdcereg.h Sat Jan 17 11:43:13 2015 (r277297) +++ head/sys/dev/usb/net/if_cdcereg.h Sat Jan 17 12:31:26 2015 (r277298) @@ -93,6 +93,10 @@ struct cdce_softc { uint8_t sc_eaddr_str_index; uint8_t sc_ifaces_index[2]; + uint8_t sc_notify_state; +#define CDCE_NOTIFY_NETWORK_CONNECTION 0 +#define CDCE_NOTIFY_SPEED_CHANGE 1 +#define CDCE_NOTIFY_DONE 2 }; #define CDCE_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 13:31:47 2015 Return-Path: Delivered-To: svn-src-head@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 B1ED1809; Sat, 17 Jan 2015 13:31:47 +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 682FC919; Sat, 17 Jan 2015 13:31: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 D928A25D37D1; Sat, 17 Jan 2015 13:31:43 +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 50D22C770F1; Sat, 17 Jan 2015 13:31:42 +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 Rkvxlvc_bzp2; Sat, 17 Jan 2015 13:31:40 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a] (unknown [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C4A45C77042; Sat, 17 Jan 2015 13:31:39 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277285 - head/sys/x86/isa From: "Bjoern A. Zeeb" In-Reply-To: <201501170218.t0H2I0AW038857@svn.freebsd.org> Date: Sat, 17 Jan 2015 13:31:05 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <9BA78F3A-C96C-4B51-A6CA-67B15665F511@FreeBSD.org> References: <201501170218.t0H2I0AW038857@svn.freebsd.org> To: Warner Losh X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 13:31:47 -0000 > On 17 Jan 2015, at 02:18 , Warner Losh wrote: >=20 > Author: imp > Date: Sat Jan 17 02:17:59 2015 > New Revision: 277285 > URL: https://svnweb.freebsd.org/changeset/base/277285 >=20 > Log: > Need to include opt_mca.h to test for DEV_MCA. >=20 > Modified: > head/sys/x86/isa/atpic.c i386 LINT kernels: /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of = undeclared identifier 'MCA_system' /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of = undeclared identifier 'MCA_system' >=20 > Modified: head/sys/x86/isa/atpic.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/x86/isa/atpic.c Sat Jan 17 02:17:57 2015 = (r277284) > +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015 = (r277285) > @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); >=20 > #include "opt_auto_eoi.h" > #include "opt_isa.h" > +#include "opt_mca.h" >=20 > #include > #include >=20 =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-head@FreeBSD.ORG Sat Jan 17 14:45:06 2015 Return-Path: Delivered-To: svn-src-head@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 781FCFC9; Sat, 17 Jan 2015 14:45: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 60E0AF51; Sat, 17 Jan 2015 14:45: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 t0HEj6EZ086739; Sat, 17 Jan 2015 14:45:06 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HEj00e086683; Sat, 17 Jan 2015 14:45:00 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501171445.t0HEj00e086683@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sat, 17 Jan 2015 14:45:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277300 - in head: cddl/contrib/opensolaris/cmd/dtrace cddl/contrib/opensolaris/cmd/lockstat cddl/contrib/opensolaris/cmd/mdb/tools/common cddl/contrib/opensolaris/cmd/plockstat cddl/co... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 14:45:06 -0000 Author: smh Date: Sat Jan 17 14:44:59 2015 New Revision: 277300 URL: https://svnweb.freebsd.org/changeset/base/277300 Log: Mechanically convert cddl sun #ifdef's to illumos Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c head/cddl/contrib/opensolaris/cmd/lockstat/sym.c head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c head/cddl/contrib/opensolaris/common/util/strtolctype.h head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_link.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_options.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_printf.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_proc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_provider.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_subr.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_work.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h head/cddl/contrib/opensolaris/lib/libdtrace/i386/dt_isadep.c head/cddl/contrib/opensolaris/lib/libgen/common/gmatch.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_mount.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c head/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.c head/cddl/contrib/opensolaris/tools/ctf/cvt/barrier.h head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfconvert.c head/cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c head/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c head/cddl/contrib/opensolaris/tools/ctf/cvt/tdata.c head/cddl/contrib/opensolaris/tools/ctf/cvt/util.c head/sys/cddl/contrib/opensolaris/common/util/strtolctype.h head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_fuid.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/os/callb.c head/sys/cddl/contrib/opensolaris/uts/common/os/fm.c head/sys/cddl/contrib/opensolaris/uts/common/sys/ctf.h head/sys/cddl/contrib/opensolaris/uts/common/sys/ctf_api.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap.h head/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h head/sys/cddl/contrib/opensolaris/uts/common/sys/isa_defs.h head/sys/cddl/contrib/opensolaris/uts/common/sys/procset.h head/sys/cddl/contrib/opensolaris/uts/common/sys/sysevent.h head/sys/cddl/contrib/opensolaris/uts/common/sys/sysmacros.h head/sys/cddl/contrib/opensolaris/uts/common/sys/u8_textprep.h head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c head/sys/cddl/dev/dtrace/amd64/instr_size.c head/sys/cddl/dev/dtrace/dtrace_ioctl.c head/sys/cddl/dev/dtrace/i386/instr_size.c head/sys/cddl/dev/dtrace/x86/regset.h Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c Sat Jan 17 14:44:59 2015 (r277300) @@ -43,11 +43,11 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif #include -#if defined(sun) +#ifdef illumos #include #endif @@ -101,7 +101,7 @@ static int g_grabanon = 0; static const char *g_ofile = NULL; static FILE *g_ofp; static dtrace_hdl_t *g_dtp; -#if defined(sun) +#ifdef illumos static char *g_etcfile = "/etc/system"; static const char *g_etcbegin = "* vvvv Added by DTrace"; static const char *g_etcend = "* ^^^^ Added by DTrace"; @@ -211,7 +211,7 @@ fatal(const char *fmt, ...) static void dfatal(const char *fmt, ...) { -#if !defined(sun) && defined(NEED_ERRLOC) +#if !defined(illumos) && defined(NEED_ERRLOC) char *p_errfile = NULL; int errline = 0; #endif @@ -232,7 +232,7 @@ dfatal(const char *fmt, ...) (void) fprintf(stderr, "%s\n", dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); } -#if !defined(sun) && defined(NEED_ERRLOC) +#if !defined(illumos) && defined(NEED_ERRLOC) dt_get_errloc(g_dtp, &p_errfile, &errline); if (p_errfile != NULL) printf("File '%s', line %d\n", p_errfile, errline); @@ -397,7 +397,7 @@ dof_prune(const char *fname) free(buf); } -#if defined(sun) +#ifdef illumos static void etcsystem_prune(void) { @@ -508,7 +508,7 @@ etcsystem_add(void) error("added forceload directives to %s\n", g_ofile); } -#endif +#endif /* illumos */ static void print_probe_info(const dtrace_probeinfo_t *p) @@ -643,7 +643,7 @@ anon_prog(const dtrace_cmd_t *dcp, dof_h p = (uchar_t *)dof; q = p + dof->dofh_loadsz; -#if defined(sun) +#ifdef illumos oprintf("dof-data-%d=0x%x", n, *p++); while (p < q) @@ -793,7 +793,7 @@ compile_str(dtrace_cmd_t *dcp) static void prochandler(struct ps_prochandle *P, const char *msg, void *arg) { -#if defined(sun) +#ifdef illumos const psinfo_t *prp = Ppsinfo(P); int pid = Pstatus(P)->pr_pid; char name[SIG2STR_MAX]; @@ -807,13 +807,13 @@ prochandler(struct ps_prochandle *P, con return; } -#if defined(sun) +#ifdef illumos switch (Pstate(P)) { #else switch (proc_state(P)) { #endif case PS_UNDEAD: -#if defined(sun) +#ifdef illumos /* * Ideally we would like to always report pr_wstat here, but it * isn't possible given current /proc semantics. If we grabbed @@ -831,7 +831,7 @@ prochandler(struct ps_prochandle *P, con notice("pid %d terminated by %d\n", pid, WTERMSIG(wstatus)); #endif -#if defined(sun) +#ifdef illumos } else if (prp != NULL && WEXITSTATUS(prp->pr_wstat) != 0) { notice("pid %d exited with status %d\n", pid, WEXITSTATUS(prp->pr_wstat)); @@ -1238,7 +1238,7 @@ installsighands(void) if (sigaction(SIGTERM, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) (void) sigaction(SIGTERM, &act, NULL); -#if !defined(sun) +#ifndef illumos if (sigaction(SIGPIPE, NULL, &oact) == 0 && oact.sa_handler != SIG_IGN) (void) sigaction(SIGPIPE, &act, NULL); @@ -1720,7 +1720,7 @@ main(int argc, char *argv[]) case DMODE_ANON: if (g_ofile == NULL) -#if defined(sun) +#ifdef illumos g_ofile = "/kernel/drv/dtrace.conf"; #else /* @@ -1732,7 +1732,7 @@ main(int argc, char *argv[]) #endif dof_prune(g_ofile); /* strip out any old DOF directives */ -#if defined(sun) +#ifdef illumos etcsystem_prune(); /* string out any forceload directives */ #endif @@ -1765,7 +1765,7 @@ main(int argc, char *argv[]) * that itself contains a #pragma D option quiet. */ error("saved anonymous enabling in %s\n", g_ofile); -#if defined(sun) +#ifdef illumos etcsystem_add(); error("run update_drv(1M) or reboot to enable changes\n"); #endif Modified: head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/lockstat/lockstat.c Sat Jan 17 14:44:59 2015 (r277300) @@ -46,10 +46,9 @@ #include #include -#if defined(sun) +#ifdef illumos #define GETOPT_EOF EOF #else -/* FreeBSD */ #include #include @@ -57,7 +56,7 @@ #define GETOPT_EOF (-1) typedef uintptr_t pc_t; -#endif /* defined(sun) */ +#endif #define LOCKSTAT_OPTSTR "x:bths:n:d:i:l:f:e:ckwWgCHEATID:RpPo:V" @@ -214,10 +213,9 @@ static ls_event_info_t g_event_info[LS_M { 'H', "Lock", "Unknown event (type 53)", "units" }, { 'H', "Lock", "Unknown event (type 54)", "units" }, { 'H', "Lock", "Unknown event (type 55)", "units" }, -#if defined(sun) +#ifdef illumos { 'I', "CPU+PIL", "Profiling interrupt", "nsec", #else - /* FreeBSD */ { 'I', "CPU+Pri_Class", "Profiling interrupt", "nsec", #endif "profile:::profile-97", NULL }, @@ -231,7 +229,7 @@ static ls_event_info_t g_event_info[LS_M { 'E', "Lock", "Lockstat record failure", "(N/A)" }, }; -#if !defined(sun) +#ifndef illumos static char *g_pri_class[] = { "", "Intr", @@ -598,7 +596,7 @@ filter_add(char **filt, char *what, uint *filt[0] = '\0'; } -#if defined(sun) +#ifdef illumos (void) sprintf(c, "%s(%s >= 0x%p && %s < 0x%p)", *filt[0] != '\0' ? " || " : "", what, (void *)base, what, (void *)(base + size)); #else @@ -676,7 +674,7 @@ dprog_addevent(int event) * the number of nanoseconds) is the number of nanoseconds * late -- and it's stored in arg2. */ -#if defined(sun) +#ifdef illumos arg0 = "(uintptr_t)curthread->t_cpu + \n" "\t curthread->t_cpu->cpu_profile_pil"; #else @@ -824,7 +822,7 @@ dprog_compile() } static void -#if defined(sun) +#ifdef illumos status_fire(void) #else status_fire(int i) @@ -1423,7 +1421,7 @@ main(int argc, char **argv) exit(127); } -#if defined(sun) +#ifdef illumos while (waitpid(child, &status, WEXITED) != child) #else while (waitpid(child, &status, 0) != child) @@ -1468,7 +1466,7 @@ main(int argc, char **argv) dfail("failed to walk aggregate"); } -#if defined(sun) +#ifdef illumos if ((data_buf = memalign(sizeof (uint64_t), (g_nrecs + 1) * g_recsize)) == NULL) #else @@ -1500,7 +1498,7 @@ main(int argc, char **argv) if (g_gflag) { lsrec_t *newlsp, *oldlsp; -#if defined(sun) +#ifdef illumos newlsp = memalign(sizeof (uint64_t), g_nrecs_used * LS_TIME * (g_stkdepth + 1)); #else @@ -1664,7 +1662,7 @@ format_symbol(char *buf, uintptr_t addr, else if (symoff == 0) (void) sprintf(buf, "%s", symname); else if (symoff < 16 && bcmp(symname, "cpu[", 4) == 0) /* CPU+PIL */ -#if defined(sun) +#ifdef illumos (void) sprintf(buf, "%s+%ld", symname, (long)symoff); #else (void) sprintf(buf, "%s+%s", symname, g_pri_class[(int)symoff]); Modified: head/cddl/contrib/opensolaris/cmd/lockstat/sym.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/lockstat/sym.c Sat Jan 17 14:44:59 2015 (r277300) @@ -42,12 +42,11 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #include #else -/* FreeBSD */ #include #include #include @@ -66,7 +65,7 @@ static syment_t *symbol_table; static int nsyms, maxsyms; static char maxsymname[64]; -#if defined(sun) +#ifdef illumos #ifdef _ELF64 #define elf_getshdr elf64_getshdr #else @@ -105,7 +104,7 @@ remove_symbol(uintptr_t addr) sep->addr = 0; } -#if defined(sun) +#ifdef illumos static void fake_up_certain_popular_kernel_symbols(void) { @@ -133,8 +132,7 @@ fake_up_certain_popular_kernel_symbols(v } (void) kstat_close(kc); } -#else -/* FreeBSD */ +#else /* !illumos */ static void fake_up_certain_popular_kernel_symbols(void) { @@ -151,7 +149,7 @@ fake_up_certain_popular_kernel_symbols(v add_symbol(name, addr, sizeof (uintptr_t)); } } -#endif /* !defined(sun) */ +#endif /* illumos */ static int symcmp(const void *p1, const void *p2) @@ -177,12 +175,12 @@ symtab_init(void) int fd; int i; int strindex = -1; -#if !defined(sun) +#ifndef illumos void *ksyms; size_t sz; #endif -#if defined(__FreeBSD__) +#ifndef illumos if ((fd = open("/dev/ksyms", O_RDONLY)) == -1) { if (errno == ENOENT && modfind("ksyms") == -1) { kldload("ksyms"); @@ -196,12 +194,11 @@ symtab_init(void) return (-1); #endif -#if defined(sun) +#ifdef illumos (void) elf_version(EV_CURRENT); elf = elf_begin(fd, ELF_C_READ, NULL); #else - /* FreeBSD */ /* * XXX - libelf needs to be fixed so it will work with * non 'ordinary' files like /dev/ksyms. The following Modified: head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/mdb/tools/common/die.c Sat Jan 17 14:44:59 2015 (r277300) @@ -40,7 +40,7 @@ die(char *format, ...) { va_list ap; int err = errno; -#if !defined(sun) +#ifndef illumos const char *progname = getprogname(); #endif @@ -54,7 +54,7 @@ die(char *format, ...) if (format[strlen(format) - 1] != '\n') (void) fprintf(stderr, ": %s\n", strerror(err)); -#if defined(__FreeBSD__) +#ifndef illumos exit(0); #else exit(1); @@ -65,7 +65,7 @@ void elfdie(char *format, ...) { va_list ap; -#if !defined(sun) +#ifndef illumos const char *progname = getprogname(); #endif @@ -79,7 +79,7 @@ elfdie(char *format, ...) if (format[strlen(format) - 1] != '\n') (void) fprintf(stderr, ": %s\n", elf_errmsg(elf_errno())); -#if defined(__FreeBSD__) +#ifndef illumos exit(0); #else exit(1); Modified: head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/mdb/tools/common/util.h Sat Jan 17 14:44:59 2015 (r277300) @@ -40,7 +40,7 @@ extern int findelfsecidx(Elf *, char *); extern void die(char *, ...); extern void elfdie(char *, ...); -#if defined(sun) +#ifdef illumos extern const char *progname; #endif Modified: head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c Sat Jan 17 14:44:59 2015 (r277300) @@ -24,7 +24,7 @@ * Use is subject to license terms. */ -#if defined(sun) +#ifdef illumos #pragma ident "%Z%%M% %I% %E% SMI" #endif @@ -505,7 +505,7 @@ getsym(struct ps_prochandle *P, uintptr_ { char name[256]; GElf_Sym sym; -#if defined(sun) +#ifdef illumos prsyminfo_t info; #else prmap_t *map; @@ -518,7 +518,7 @@ getsym(struct ps_prochandle *P, uintptr_ (void) snprintf(buf, size, "%#lx", addr); return (0); } -#if defined(sun) +#ifdef illumos if (info.prs_object == NULL) info.prs_object = ""; @@ -668,7 +668,7 @@ process_aggregate(const dtrace_aggdata_t static void prochandler(struct ps_prochandle *P, const char *msg, void *arg) { -#if defined(sun) +#ifdef illumos const psinfo_t *prp = Ppsinfo(P); int pid = Pstatus(P)->pr_pid; #else @@ -773,7 +773,7 @@ intr(int signo) int main(int argc, char **argv) { -#if defined(sun) +#ifdef illumos ucred_t *ucp; #endif int err; @@ -785,7 +785,7 @@ main(int argc, char **argv) g_pname = basename(argv[0]); argv[0] = g_pname; /* rewrite argv[0] for getopt errors */ -#if defined(sun) +#ifdef illumos /* * Make sure we have the required dtrace_proc privilege. */ @@ -988,7 +988,7 @@ main(int argc, char **argv) if (opt_v) (void) printf("%s: tracing enabled for pid %d\n", g_pname, -#if defined(sun) +#ifdef illumos (int)Pstatus(g_pr)->pr_pid); #else (int)proc_getpid(g_pr)); Modified: head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/sgs/include/alist.h Sat Jan 17 14:44:59 2015 (r277300) @@ -39,7 +39,7 @@ extern "C" { #endif #include -#if defined(sun) +#ifdef illumos #include #else #include Modified: head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h ============================================================================== --- head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/sgs/include/sgs.h Sat Jan 17 14:44:59 2015 (r277300) @@ -48,7 +48,7 @@ extern "C" { #ifndef _ASM #include -#if defined(sun) +#ifdef illumos #include #else #include Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Sat Jan 17 14:44:59 2015 (r277300) @@ -65,7 +65,7 @@ #include #include #include -#ifdef sun +#ifdef illumos #include #include #include @@ -2391,7 +2391,7 @@ userspace_cb(void *arg, const char *doma /* SMB */ char sid[ZFS_MAXNAMELEN + 32]; uid_t id; -#ifdef sun +#ifdef illumos int err; int flag = IDMAP_REQ_FLG_USE_CACHE; #endif @@ -2402,17 +2402,17 @@ userspace_cb(void *arg, const char *doma if (prop == ZFS_PROP_GROUPUSED || prop == ZFS_PROP_GROUPQUOTA) { type = USTYPE_SMB_GRP; -#ifdef sun +#ifdef illumos err = sid_to_id(sid, B_FALSE, &id); #endif } else { type = USTYPE_SMB_USR; -#ifdef sun +#ifdef illumos err = sid_to_id(sid, B_TRUE, &id); #endif } -#ifdef sun +#ifdef illumos if (err == 0) { rid = id; if (!cb->cb_sid2posix) { @@ -6110,7 +6110,7 @@ unshare_unmount_path(int op, char *path, /* * Search for the given (major,minor) pair in the mount table. */ -#ifdef sun +#ifdef illumos rewind(mnttab_file); while ((ret = getextmntent(mnttab_file, &entry, 0)) == 0) { if (entry.mnt_major == major(statbuf.st_dev) && Modified: head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c Sat Jan 17 14:44:59 2015 (r277300) @@ -112,7 +112,7 @@ vdev_error(const char *fmt, ...) va_end(ap); } -#ifdef sun +#ifdef illumos static void libdiskmgt_error(int error) { @@ -274,7 +274,7 @@ check_device(const char *path, boolean_t return (check_slice(path, force, B_FALSE, isspare)); } -#endif /* sun */ +#endif /* illumos */ /* * Check that a file is valid. All we can do in this case is check that it's @@ -290,7 +290,7 @@ check_file(const char *file, boolean_t f pool_state_t state; boolean_t inuse; -#ifdef sun +#ifdef illumos if (dm_inuse_swap(file, &err)) { if (err) libdiskmgt_error(err); @@ -377,7 +377,7 @@ check_device(const char *name, boolean_t static boolean_t is_whole_disk(const char *arg) { -#ifdef sun +#ifdef illumos struct dk_gpt *label; int fd; char path[MAXPATHLEN]; @@ -915,7 +915,7 @@ check_replication(nvlist_t *config, nvli return (ret); } -#ifdef sun +#ifdef illumos /* * Go through and find any whole disks in the vdev specification, labelling them * as appropriate. When constructing the vdev spec, we were unable to open this @@ -1019,7 +1019,7 @@ make_disks(zpool_handle_t *zhp, nvlist_t return (0); } -#endif /* sun */ +#endif /* illumos */ /* * Determine if the given path is a hot spare within the given configuration. @@ -1098,7 +1098,7 @@ is_device_in_use(nvlist_t *config, nvlis * regardless of what libdiskmgt or zpool_in_use() says. */ if (replacing) { -#ifdef sun +#ifdef illumos if (nvlist_lookup_uint64(nv, ZPOOL_CONFIG_WHOLE_DISK, &wholedisk) == 0 && wholedisk) (void) snprintf(buf, sizeof (buf), "%ss0", @@ -1422,7 +1422,7 @@ split_mirror_vdev(zpool_handle_t *zhp, c return (NULL); } -#ifdef sun +#ifdef illumos if (!flags.dryrun && make_disks(zhp, newroot) != 0) { nvlist_free(newroot); return (NULL); @@ -1507,7 +1507,7 @@ make_root_vdev(zpool_handle_t *zhp, int return (NULL); } -#ifdef sun +#ifdef illumos /* * Run through the vdev specification and label any whole disks found. */ Modified: head/cddl/contrib/opensolaris/common/util/strtolctype.h ============================================================================== --- head/cddl/contrib/opensolaris/common/util/strtolctype.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/common/util/strtolctype.h Sat Jan 17 14:44:59 2015 (r277300) @@ -44,7 +44,7 @@ extern "C" { * safe in probe context. */ -#if defined(sun) && (defined(_KERNEL) || defined(_BOOT)) +#if defined(illumos) && (defined(_KERNEL) || defined(_BOOT)) #define isalnum(ch) (isalpha(ch) || isdigit(ch)) #define isalpha(ch) (isupper(ch) || islower(ch)) Modified: head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libctf/common/ctf_lib.c Sat Jan 17 14:44:59 2015 (r277300) @@ -34,14 +34,14 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #else #include #endif #include -#if defined(sun) +#ifdef illumos #ifdef _LP64 static const char *_libctf_zlib = "/usr/lib/64/libz.so"; #else @@ -58,7 +58,7 @@ static struct { static size_t _PAGESIZE; static size_t _PAGEMASK; -#if defined(sun) +#ifdef illumos #pragma init(_libctf_init) #else void _libctf_init(void) __attribute__ ((constructor)); @@ -66,7 +66,7 @@ void _libctf_init(void) __attribute__ void _libctf_init(void) { -#if defined(sun) +#ifdef illumos const char *p = getenv("LIBCTF_DECOMPRESSOR"); if (p != NULL) @@ -87,7 +87,7 @@ _libctf_init(void) void * ctf_zopen(int *errp) { -#if defined(sun) +#ifdef illumos ctf_dprintf("decompressing CTF data using %s\n", _libctf_zlib); if (zlib.z_dlp != NULL) Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c Sat Jan 17 14:44:59 2015 (r277300) @@ -56,13 +56,13 @@ */ static const char *devnamep = "/dev/dtrace/helper"; -#if defined(sun) +#ifdef illumos static const char *olddevname = "/devices/pseudo/dtrace@0:helper"; #endif static const char *modname; /* Name of this load object */ static int gen; /* DOF helper generation */ -#if defined(sun) +#ifdef illumos extern dof_hdr_t __SUNW_dof; /* DOF defined in the .SUNW_dof section */ #endif static boolean_t dof_init_debug = B_FALSE; /* From DTRACE_DOF_INIT_DEBUG */ @@ -90,7 +90,7 @@ dprintf(int debug, const char *fmt, ...) va_end(ap); } -#if defined(sun) +#ifdef illumos #pragma init(dtrace_dof_init) #else static void dtrace_dof_init(void) __attribute__ ((constructor)); @@ -99,7 +99,7 @@ static void dtrace_dof_init(void) __attr static void dtrace_dof_init(void) { -#if defined(sun) +#ifdef illumos dof_hdr_t *dof = &__SUNW_dof; #else dof_hdr_t *dof = NULL; @@ -111,14 +111,14 @@ dtrace_dof_init(void) #endif dof_helper_t dh; Link_map *lmp = NULL; -#if defined(sun) +#ifdef illumos Lmid_t lmid; #else u_long lmid = 0; #endif int fd; const char *p; -#if !defined(sun) +#ifndef illumos Elf *e; Elf_Scn *scn = NULL; Elf_Data *dofdata = NULL; @@ -141,7 +141,7 @@ dtrace_dof_init(void) return; } -#if defined(sun) +#ifdef illumos if (dlinfo(RTLD_SELF, RTLD_DI_LMID, &lmid) == -1) { dprintf(1, "couldn't discover link map ID\n"); return; @@ -152,7 +152,7 @@ dtrace_dof_init(void) modname = lmp->l_name; else modname++; -#if !defined(sun) +#ifndef illumos elf_version(EV_CURRENT); if ((efd = open(lmp->l_name, O_RDONLY, 0)) < 0) { dprintf(1, "couldn't open file for reading\n"); @@ -215,7 +215,7 @@ dtrace_dof_init(void) if ((fd = open64(devnamep, O_RDWR)) < 0) { dprintf(1, "failed to open helper device %s", devnamep); -#if defined(sun) +#ifdef illumos /* * If the device path wasn't explicitly set, try again with * the old device path. @@ -237,14 +237,14 @@ dtrace_dof_init(void) dprintf(1, "DTrace ioctl failed for DOF at %p", dof); else { dprintf(1, "DTrace ioctl succeeded for DOF at %p\n", dof); -#if !defined(sun) +#ifndef illumos gen = dh.gen; #endif } (void) close(fd); -#if !defined(sun) +#ifndef illumos /* End of while loop */ dof = dof_next; } @@ -254,7 +254,7 @@ dtrace_dof_init(void) #endif } -#if defined(sun) +#ifdef illumos #pragma fini(dtrace_dof_fini) #else static void dtrace_dof_fini(void) __attribute__ ((destructor)); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c Sat Jan 17 14:44:59 2015 (r277300) @@ -35,7 +35,7 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #else #include @@ -453,7 +453,7 @@ dt_aggregate_snap_cpu(dtrace_hdl_t *dtp, buf->dtbd_cpu = cpu; -#if defined(sun) +#ifdef illumos if (dt_ioctl(dtp, DTRACEIOC_AGGSNAP, buf) == -1) { #else if (dt_ioctl(dtp, DTRACEIOC_AGGSNAP, &buf) == -1) { Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Sat Jan 17 14:44:59 2015 (r277300) @@ -1888,7 +1888,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) char **argv = malloc(sizeof (char *) * (argc + 5)); FILE *ofp = tmpfile(); -#if defined(sun) +#ifdef illumos char ipath[20], opath[20]; /* big enough for /dev/fd/ + INT_MAX + \0 */ #endif char verdef[32]; /* big enough for -D__SUNW_D_VERSION=0x%08x + \0 */ @@ -1898,7 +1898,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) int wstat, estat; pid_t pid; -#if defined(sun) +#ifdef illumos off64_t off; #else off_t off = 0; @@ -1929,7 +1929,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) (void) fseeko64(ifp, off, SEEK_SET); } -#if defined(sun) +#ifdef illumos (void) snprintf(ipath, sizeof (ipath), "/dev/fd/%d", fileno(ifp)); (void) snprintf(opath, sizeof (opath), "/dev/fd/%d", fileno(ofp)); #endif @@ -1940,7 +1940,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) "-D__SUNW_D_VERSION=0x%08x", dtp->dt_vmax); argv[argc++] = verdef; -#if defined(sun) +#ifdef illumos switch (dtp->dt_stdcmode) { case DT_STDC_XA: case DT_STDC_XT: @@ -1982,7 +1982,7 @@ dt_preproc(dtrace_hdl_t *dtp, FILE *ifp) } if (pid == 0) { -#if !defined(sun) +#ifndef illumos if (isatty(fileno(ifp)) == 0) lseek(fileno(ifp), off, SEEK_SET); dup2(fileno(ifp), 0); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c Sat Jan 17 14:44:59 2015 (r277300) @@ -35,12 +35,12 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif #include #include -#if !defined(sun) +#ifndef illumos #include #endif @@ -2958,7 +2958,7 @@ dt_get_buf(dtrace_hdl_t *dtp, int cpu, d buf->dtbd_size = size; buf->dtbd_cpu = cpu; -#if defined(sun) +#ifdef illumos if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, buf) == -1) { #else if (dt_ioctl(dtp, DTRACEIOC_BUFSNAP, &buf) == -1) { Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c Sat Jan 17 14:44:59 2015 (r277300) @@ -26,12 +26,12 @@ */ #include -#if defined(sun) +#ifdef illumos #include #endif #include -#if defined(sun) +#ifdef illumos #include #endif #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_error.c Sat Jan 17 14:44:59 2015 (r277300) @@ -145,7 +145,7 @@ dtrace_errno(dtrace_hdl_t *dtp) return (dtp->dt_errno); } -#if defined(sun) +#ifdef illumos int dt_set_errno(dtrace_hdl_t *dtp, int err) { Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c Sat Jan 17 14:44:59 2015 (r277300) @@ -31,7 +31,7 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c Sat Jan 17 14:44:59 2015 (r277300) @@ -28,18 +28,18 @@ #pragma ident "%Z%%M% %I% %E% SMI" -#if defined(sun) +#ifdef illumos #include #endif #include #include -#if defined(sun) +#ifdef illumos #include #endif #include #include #include -#if defined(sun) +#ifdef illumos #include #endif #include Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h Sat Jan 17 14:44:59 2015 (r277300) @@ -34,7 +34,7 @@ #include #include -#if !defined(sun) +#ifndef illumos #include #include #include @@ -45,7 +45,7 @@ #include #include #include -#if defined(sun) +#ifdef illumos #include #endif @@ -142,7 +142,7 @@ typedef struct dt_module { GElf_Addr dm_bss_va; /* virtual address of BSS */ GElf_Xword dm_bss_size; /* size in bytes of BSS */ dt_idhash_t *dm_extern; /* external symbol definitions */ -#if !defined(sun) +#ifndef illumos caddr_t dm_reloc_offset; /* Symbol relocation offset. */ uintptr_t *dm_sec_offsets; #endif @@ -296,7 +296,7 @@ struct dtrace_hdl { int dt_version; /* library version requested by client */ int dt_ctferr; /* error resulting from last CTF failure */ int dt_errno; /* error resulting from last failed operation */ -#if !defined(sun) +#ifndef illumos const char *dt_errfile; int dt_errline; #endif @@ -305,7 +305,7 @@ struct dtrace_hdl { int dt_fterr; /* saved errno from failed open of dt_ftfd */ int dt_cdefs_fd; /* file descriptor for C CTF debugging cache */ int dt_ddefs_fd; /* file descriptor for D CTF debugging cache */ -#if defined(sun) +#ifdef illumos int dt_stdout_fd; /* file descriptor for saved stdout */ #else FILE *dt_freopen_fp; /* file pointer for freopened stdout */ @@ -596,7 +596,7 @@ extern int dt_version_defined(dt_version extern char *dt_cpp_add_arg(dtrace_hdl_t *, const char *); extern char *dt_cpp_pop_arg(dtrace_hdl_t *); -#if defined(sun) +#ifdef illumos extern int dt_set_errno(dtrace_hdl_t *, int); #else int _dt_set_errno(dtrace_hdl_t *, int, const char *, int); @@ -606,7 +606,7 @@ void dt_get_errloc(dtrace_hdl_t *, const extern void dt_set_errmsg(dtrace_hdl_t *, const char *, const char *, const char *, int, const char *, va_list); -#if defined(sun) +#ifdef illumos extern int dt_ioctl(dtrace_hdl_t *, int, void *); #else extern int dt_ioctl(dtrace_hdl_t *, u_long, void *); Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l ============================================================================== --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sat Jan 17 12:54:02 2015 (r277299) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_lex.l Sat Jan 17 14:44:59 2015 (r277300) @@ -44,7 +44,7 @@ * We need to undefine lex's input and unput macros so that references to these * call the functions provided at the end of this source file. */ -#if defined(sun) +#ifdef illumos #undef input #undef unput #else @@ -79,7 +79,7 @@ #endif static int id_or_type(const char *); -#if defined(sun) +#ifdef illumos static int input(void); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 15:19:19 2015 Return-Path: Delivered-To: svn-src-head@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 6FD08A1A; Sat, 17 Jan 2015 15:19: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 5C87B2F5; Sat, 17 Jan 2015 15:19: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 t0HFJJT6001603; Sat, 17 Jan 2015 15:19:19 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HFJJIx001602; Sat, 17 Jan 2015 15:19:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501171519.t0HFJJIx001602@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 17 Jan 2015 15:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277301 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 15:19:19 -0000 Author: pfg Date: Sat Jan 17 15:19:18 2015 New Revision: 277301 URL: https://svnweb.freebsd.org/changeset/base/277301 Log: ext2: cosmetical issues Minor sorting and note when the cases are expected to fall through. MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_hash.c Modified: head/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- head/sys/fs/ext2fs/ext2_hash.c Sat Jan 17 14:44:59 2015 (r277300) +++ head/sys/fs/ext2fs/ext2_hash.c Sat Jan 17 15:19:18 2015 (r277301) @@ -196,10 +196,10 @@ ext2_prep_hashbuf(const char *src, int s { uint32_t padding = slen | (slen << 8) | (slen << 16) | (slen << 24); uint32_t buf_val; - int len, i; - int buf_byte; const unsigned char *ubuf = (const unsigned char *)src; const signed char *sbuf = (const signed char *)src; + int len, i; + int buf_byte; if (slen > dlen) len = dlen; @@ -265,6 +265,7 @@ ext2_htree_hash(const char *name, int le switch (hash_version) { case EXT2_HTREE_TEA_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_TEA: while (len > 0) { ext2_prep_hashbuf(name, len, data, 16, unsigned_char); @@ -277,11 +278,13 @@ ext2_htree_hash(const char *name, int le break; case EXT2_HTREE_LEGACY_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_LEGACY: major = ext2_legacy_hash(name, len, unsigned_char); break; case EXT2_HTREE_HALF_MD4_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_HALF_MD4: while (len > 0) { ext2_prep_hashbuf(name, len, data, 32, unsigned_char); From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 16:36:44 2015 Return-Path: Delivered-To: svn-src-head@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 963254C1; Sat, 17 Jan 2015 16:36: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 7E52AC69; Sat, 17 Jan 2015 16:36: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 t0HGai8c039614; Sat, 17 Jan 2015 16:36:44 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HGadsf039591; Sat, 17 Jan 2015 16:36:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501171636.t0HGadsf039591@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sat, 17 Jan 2015 16:36:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 16:36:44 -0000 Author: hselasky Date: Sat Jan 17 16:36:39 2015 New Revision: 277302 URL: https://svnweb.freebsd.org/changeset/base/277302 Log: Start importing the basic OFED linux compatibility layer changes made by dumbbell@ to be able to compile this layer as a dependency module. Clean up some Makefiles and remove the no longer used OFED define. Currently only i386 and amd64 targets are supported. MFC after: 1 month Sponsored by: Mellanox Technologies Added: head/sys/modules/linuxapi/ head/sys/modules/linuxapi/Makefile (contents, props changed) head/sys/ofed/include/linux/linux_kmod.c (contents, props changed) head/sys/ofed/include/linux/linux_pci.c (contents, props changed) Modified: head/sys/conf/files head/sys/conf/options head/sys/modules/Makefile head/sys/modules/ibcore/Makefile head/sys/modules/ipoib/Makefile head/sys/modules/mlx4/Makefile head/sys/modules/mlx4ib/Makefile head/sys/ofed/drivers/infiniband/core/device.c head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/include/linux/linux_compat.c head/sys/ofed/include/linux/pci.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/conf/files Sat Jan 17 16:36:39 2015 (r277302) @@ -3571,13 +3571,13 @@ nlm/nlm_prot_svc.c optional nfslockd | nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd +# Linux Kernel Compatibility API +ofed/include/linux/linux_kmod.c optional ofed | compat_linuxapi +ofed/include/linux/linux_compat.c optional ofed | compat_linuxapi +ofed/include/linux/linux_pci.c optional ofed | compat_linuxapi +ofed/include/linux/linux_idr.c optional ofed | compat_linuxapi +ofed/include/linux/linux_radix.c optional ofed | compat_linuxapi # OpenFabrics Enterprise Distribution (Infiniband) -ofed/include/linux/linux_compat.c optional ofed \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_idr.c optional ofed \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_radix.c optional ofed \ - no-depend compile-with "${OFED_C}" ofed/drivers/infiniband/core/addr.c optional ofed \ no-depend \ compile-with "${OFED_C} -I$S/ofed/drivers/infiniband/core/" Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/conf/options Sat Jan 17 16:36:39 2015 (r277302) @@ -85,6 +85,7 @@ COMPAT_FREEBSD6 opt_compat.h COMPAT_FREEBSD7 opt_compat.h COMPAT_FREEBSD9 opt_compat.h COMPAT_FREEBSD10 opt_compat.h +COMPAT_LINUXAPI opt_compat.h COMPILING_LINT opt_global.h COMPRESS_USER_CORES opt_core.h CY_PCI_FASTINTR @@ -907,7 +908,6 @@ FDT opt_platform.h FDT_DTB_STATIC opt_platform.h # OFED Infiniband stack -OFED opt_ofed.h OFED_DEBUG_INIT opt_ofed.h SDP opt_ofed.h SDP_DEBUG opt_ofed.h Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -198,6 +198,7 @@ SUBDIR= \ ${_linprocfs} \ ${_linsysfs} \ ${_linux} \ + ${_linuxapi} \ lmc \ lpt \ mac_biba \ @@ -501,6 +502,7 @@ _ipoib= ipoib _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux +_linuxapi= linuxapi _ndis= ndis .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris Modified: head/sys/modules/ibcore/Makefile ============================================================================== --- head/sys/modules/ibcore/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/ibcore/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -2,19 +2,19 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/core .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = ibcore -SRCS = addr.c cm_msgs.h iwcm.c mad_rmpp.h sa_query.c ucma.c uverbs_cmd.c -SRCS+= agent.c local_sa.c iwcm.h multicast.c smi.c ud_header.c uverbs_main.c -SRCS+= agent.h core_priv.h mad.c notice.c smi.h umem.c uverbs_marshall.c -SRCS+= cache.c device.c mad_priv.h packer.c sysfs.c user_mad.c verbs.c -SRCS+= cm.c fmr_pool.c mad_rmpp.c sa.h ucm.c uverbs.h cma.c -SRCS+= linux_compat.c linux_radix.c linux_idr.c -SRCS+= vnode_if.h device_if.h bus_if.h pci_if.h opt_inet.h opt_inet6.h +KMOD= ibcore +SRCS= addr.c iwcm.c sa_query.c ucma.c uverbs_cmd.c \ + agent.c local_sa.c multicast.c smi.c ud_header.c uverbs_main.c \ + mad.c notice.c umem.c uverbs_marshall.c \ + cache.c device.c packer.c sysfs.c user_mad.c verbs.c \ + cm.c fmr_pool.c mad_rmpp.c ucm.c cma.c \ + vnode_if.h device_if.h bus_if.h pci_if.h \ + opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/core CFLAGS+= -I${.CURDIR}/../mlx4ib CFLAGS+= -I${.CURDIR}/../../ofed/include/ -CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -DINET6 -DINET .include Modified: head/sys/modules/ipoib/Makefile ============================================================================== --- head/sys/modules/ipoib/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/ipoib/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -2,15 +2,16 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = ipoib -SRCS = device_if.h bus_if.h opt_ofed.h vnode_if.h opt_inet.h opt_inet6.h -SRCS += ipoib_cm.c ipoib_ib.c ipoib_main.c ipoib_multicast.c ipoib_verbs.c ipoib.h -SRCS+= linux_compat.c linux_radix.c linux_idr.c +KMOD= ipoib +SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ + opt_inet.h opt_inet6.h opt_ofed.h \ + ipoib_cm.c ipoib_ib.c ipoib_main.c \ + ipoib_multicast.c ipoib_verbs.c CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib CFLAGS+= -I${.CURDIR}/../ibcore CFLAGS+= -I${.CURDIR}/../../ofed/include/ -CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -DINET6 -DINET .include Added: head/sys/modules/linuxapi/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/linuxapi/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -0,0 +1,18 @@ +# $FreeBSD$ +.PATH: ${.CURDIR}/../../ofed/include/linux + +KMOD= linuxapi +SRCS= linux_kmod.c \ + linux_compat.c \ + linux_pci.c \ + linux_radix.c \ + linux_idr.c + +SRCS+= bus_if.h \ + device_if.h \ + pci_if.h \ + vnode_if.h + +CFLAGS+= -I${.CURDIR}/../../ofed/include/ + +.include Modified: head/sys/modules/mlx4/Makefile ============================================================================== --- head/sys/modules/mlx4/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/mlx4/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -1,10 +1,14 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4 .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = mlx4 -SRCS = device_if.h bus_if.h pci_if.h vnode_if.h opt_inet.h opt_inet6.h -SRCS+= alloc.c catas.c cmd.c cq.c eq.c fw.c icm.c intf.c main.c mcg.c mr.c linux_compat.c linux_radix.c linux_idr.c -SRCS+= pd.c port.c profile.c qp.c reset.c sense.c srq.c resource_tracker.c sys_tune.c + +KMOD= mlx4 +SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ + opt_inet.h opt_inet6.h \ + alloc.c catas.c cmd.c cq.c eq.c \ + fw.c icm.c intf.c main.c mcg.c mr.c \ + pd.c port.c profile.c qp.c reset.c sense.c \ + srq.c resource_tracker.c sys_tune.c CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ Modified: head/sys/modules/mlx4ib/Makefile ============================================================================== --- head/sys/modules/mlx4ib/Makefile Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/modules/mlx4ib/Makefile Sat Jan 17 16:36:39 2015 (r277302) @@ -2,18 +2,16 @@ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 .PATH: ${.CURDIR}/../../ofed/include/linux -KMOD = mlx4ib -SRCS = device_if.h bus_if.h pci_if.h vnode_if.h -SRCS+= linux_compat.c linux_radix.c linux_idr.c -SRCS+= alias_GUID.c mcg.c sysfs.c ah.c cq.c doorbell.c mad.c main.c mr.c qp.c srq.c wc.c cm.c -SRCS+= opt_inet.h opt_inet6.h +KMOD= mlx4ib +SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ + opt_inet.h opt_inet6.h \ + alias_GUID.c mcg.c sysfs.c ah.c cq.c \ + doorbell.c mad.c main.c mr.c qp.c srq.c wc.c cm.c -#CFLAGS+= -I${.CURDIR}/../../ofed/include/ -#CFLAGS+= -I${.CURDIR}/../../../../include CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 CFLAGS+= -I${.CURDIR}/../../ofed/include/ CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM -CFLAGS+= -DINET6 -DINET -DOFED +CFLAGS+= -DINET6 -DINET CFLAGS+= -fms-extensions .include Modified: head/sys/ofed/drivers/infiniband/core/device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/device.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/infiniband/core/device.c Sat Jan 17 16:36:39 2015 (r277302) @@ -768,4 +768,5 @@ static moduledata_t ibcore_mod = { }; MODULE_VERSION(ibcore, 1); +MODULE_DEPEND(ibcore, linuxapi, 1, 1, 1); DECLARE_MODULE(ibcore, ibcore_mod, SI_SUB_SMP, SI_ORDER_ANY); Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -2420,3 +2420,4 @@ static moduledata_t mlx4ib_mod = { DECLARE_MODULE(mlx4ib, mlx4ib_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlx4ib, mlx4, 1, 1, 1); MODULE_DEPEND(mlx4ib, ibcore, 1, 1, 1); +MODULE_DEPEND(mlx4ib, linuxapi, 1, 1, 1); Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -1542,4 +1542,4 @@ static moduledata_t ipoib_mod = { DECLARE_MODULE(ipoib, ipoib_mod, SI_SUB_SMP, SI_ORDER_ANY); MODULE_DEPEND(ipoib, ibcore, 1, 1, 1); - +MODULE_DEPEND(ipoib, linuxapi, 1, 1, 1); Modified: head/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/net/mlx4/en_main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -349,3 +349,4 @@ static moduledata_t mlxen_mod = { }; DECLARE_MODULE(mlxen, mlxen_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); MODULE_DEPEND(mlxen, mlx4, 1, 1, 1); +MODULE_DEPEND(mlxen, linuxapi, 1, 1, 1); Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/drivers/net/mlx4/main.c Sat Jan 17 16:36:39 2015 (r277302) @@ -3796,3 +3796,5 @@ static moduledata_t mlx4_mod = { }; MODULE_VERSION(mlx4, 1); DECLARE_MODULE(mlx4, mlx4_mod, SI_SUB_OFED_PREINIT, SI_ORDER_ANY); +MODULE_DEPEND(mlx4, linuxapi, 1, 1, 1); + Modified: head/sys/ofed/include/linux/linux_compat.c ============================================================================== --- head/sys/ofed/include/linux/linux_compat.c Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/include/linux/linux_compat.c Sat Jan 17 16:36:39 2015 (r277302) @@ -343,7 +343,8 @@ linux_dev_read(struct cdev *dev, struct bytes = filp->f_op->read(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); if (bytes >= 0) { - uio->uio_iov->iov_base += bytes; + uio->uio_iov->iov_base = + ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; } else @@ -377,7 +378,8 @@ linux_dev_write(struct cdev *dev, struct bytes = filp->f_op->write(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); if (bytes >= 0) { - uio->uio_iov->iov_base += bytes; + uio->uio_iov->iov_base = + ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; } else @@ -498,7 +500,8 @@ linux_file_read(struct file *file, struc bytes = filp->f_op->read(filp, uio->uio_iov->iov_base, uio->uio_iov->iov_len, &uio->uio_offset); if (bytes >= 0) { - uio->uio_iov->iov_base += bytes; + uio->uio_iov->iov_base = + ((uint8_t *)uio->uio_iov->iov_base) + bytes; uio->uio_iov->iov_len -= bytes; uio->uio_resid -= bytes; } else @@ -736,7 +739,6 @@ linux_compat_init(void) for (i = 0; i < VMMAP_HASH_SIZE; i++) LIST_INIT(&vmmaphead[i]); } - SYSINIT(linux_compat, SI_SUB_DRIVERS, SI_ORDER_SECOND, linux_compat_init, NULL); static void Added: head/sys/ofed/include/linux/linux_kmod.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ofed/include/linux/linux_kmod.c Sat Jan 17 16:36:39 2015 (r277302) @@ -0,0 +1,33 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2015 Mellanox Technologies, Ltd. + * 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 unmodified, 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 ``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 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 +#include + +MODULE_VERSION(linuxapi, 1); +MODULE_DEPEND(linuxapi, pci, 1, 1, 1); + Added: head/sys/ofed/include/linux/linux_pci.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/ofed/include/linux/linux_pci.c Sat Jan 17 16:36:39 2015 (r277302) @@ -0,0 +1,206 @@ +/* $FreeBSD$ */ +/*- + * Copyright (c) 2015 Mellanox Technologies, Ltd. + * 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 unmodified, 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 ``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 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static device_probe_t linux_pci_probe; +static device_attach_t linux_pci_attach; +static device_detach_t linux_pci_detach; + +static device_method_t pci_methods[] = { + DEVMETHOD(device_probe, linux_pci_probe), + DEVMETHOD(device_attach, linux_pci_attach), + DEVMETHOD(device_detach, linux_pci_detach), + DEVMETHOD_END +}; + +static struct pci_driver * +linux_pci_find(device_t dev, const struct pci_device_id **idp) +{ + const struct pci_device_id *id; + struct pci_driver *pdrv; + uint16_t vendor; + uint16_t device; + + vendor = pci_get_vendor(dev); + device = pci_get_device(dev); + + spin_lock(&pci_lock); + list_for_each_entry(pdrv, &pci_drivers, links) { + for (id = pdrv->id_table; id->vendor != 0; id++) { + if (vendor == id->vendor && device == id->device) { + *idp = id; + spin_unlock(&pci_lock); + return (pdrv); + } + } + } + spin_unlock(&pci_lock); + return (NULL); +} + +static int +linux_pci_probe(device_t dev) +{ + const struct pci_device_id *id; + struct pci_driver *pdrv; + + if ((pdrv = linux_pci_find(dev, &id)) == NULL) + return (ENXIO); + if (device_get_driver(dev) != &pdrv->driver) + return (ENXIO); + device_set_desc(dev, pdrv->name); + return (0); +} + +static int +linux_pci_attach(device_t dev) +{ + struct resource_list_entry *rle; + struct pci_dev *pdev; + struct pci_driver *pdrv; + const struct pci_device_id *id; + int error; + + pdrv = linux_pci_find(dev, &id); + pdev = device_get_softc(dev); + pdev->dev.parent = &linux_rootdev; + pdev->dev.bsddev = dev; + INIT_LIST_HEAD(&pdev->dev.irqents); + pdev->device = id->device; + pdev->vendor = id->vendor; + pdev->dev.dma_mask = &pdev->dma_mask; + pdev->pdrv = pdrv; + kobject_init(&pdev->dev.kobj, &dev_ktype); + kobject_set_name(&pdev->dev.kobj, device_get_nameunit(dev)); + kobject_add(&pdev->dev.kobj, &linux_rootdev.kobj, + kobject_name(&pdev->dev.kobj)); + rle = _pci_get_rle(pdev, SYS_RES_IRQ, 0); + if (rle) + pdev->dev.irq = rle->start; + else + pdev->dev.irq = 0; + pdev->irq = pdev->dev.irq; + mtx_unlock(&Giant); + spin_lock(&pci_lock); + list_add(&pdev->links, &pci_devices); + spin_unlock(&pci_lock); + error = pdrv->probe(pdev, id); + mtx_lock(&Giant); + if (error) { + spin_lock(&pci_lock); + list_del(&pdev->links); + spin_unlock(&pci_lock); + put_device(&pdev->dev); + return (-error); + } + return (0); +} + +static int +linux_pci_detach(device_t dev) +{ + struct pci_dev *pdev; + + pdev = device_get_softc(dev); + mtx_unlock(&Giant); + pdev->pdrv->remove(pdev); + mtx_lock(&Giant); + spin_lock(&pci_lock); + list_del(&pdev->links); + spin_unlock(&pci_lock); + put_device(&pdev->dev); + + return (0); +} + +int +pci_register_driver(struct pci_driver *pdrv) +{ + devclass_t bus; + int error = 0; + + bus = devclass_find("pci"); + + spin_lock(&pci_lock); + list_add(&pdrv->links, &pci_drivers); + spin_unlock(&pci_lock); + pdrv->driver.name = pdrv->name; + pdrv->driver.methods = pci_methods; + pdrv->driver.size = sizeof(struct pci_dev); + mtx_lock(&Giant); + if (bus != NULL) { + error = devclass_add_driver(bus, &pdrv->driver, BUS_PASS_DEFAULT, + &pdrv->bsdclass); + } + mtx_unlock(&Giant); + return (-error); +} + +void +pci_unregister_driver(struct pci_driver *pdrv) +{ + devclass_t bus; + + bus = devclass_find("pci"); + + list_del(&pdrv->links); + mtx_lock(&Giant); + if (bus != NULL) + devclass_delete_driver(bus, &pdrv->driver); + mtx_unlock(&Giant); +} + Modified: head/sys/ofed/include/linux/pci.h ============================================================================== --- head/sys/ofed/include/linux/pci.h Sat Jan 17 15:19:18 2015 (r277301) +++ head/sys/ofed/include/linux/pci.h Sat Jan 17 16:36:39 2015 (r277302) @@ -409,146 +409,8 @@ pci_write_config_dword(struct pci_dev *p return (0); } -static struct pci_driver * -linux_pci_find(device_t dev, const struct pci_device_id **idp) -{ - const struct pci_device_id *id; - struct pci_driver *pdrv; - uint16_t vendor; - uint16_t device; - - vendor = pci_get_vendor(dev); - device = pci_get_device(dev); - - spin_lock(&pci_lock); - list_for_each_entry(pdrv, &pci_drivers, links) { - for (id = pdrv->id_table; id->vendor != 0; id++) { - if (vendor == id->vendor && device == id->device) { - *idp = id; - spin_unlock(&pci_lock); - return (pdrv); - } - } - } - spin_unlock(&pci_lock); - return (NULL); -} - -static inline int -linux_pci_probe(device_t dev) -{ - const struct pci_device_id *id; - struct pci_driver *pdrv; - - if ((pdrv = linux_pci_find(dev, &id)) == NULL) - return (ENXIO); - if (device_get_driver(dev) != &pdrv->driver) - return (ENXIO); - device_set_desc(dev, pdrv->name); - return (0); -} - -static inline int -linux_pci_attach(device_t dev) -{ - struct resource_list_entry *rle; - struct pci_dev *pdev; - struct pci_driver *pdrv; - const struct pci_device_id *id; - int error; - - pdrv = linux_pci_find(dev, &id); - pdev = device_get_softc(dev); - pdev->dev.parent = &linux_rootdev; - pdev->dev.bsddev = dev; - INIT_LIST_HEAD(&pdev->dev.irqents); - pdev->device = id->device; - pdev->vendor = id->vendor; - pdev->dev.dma_mask = &pdev->dma_mask; - pdev->pdrv = pdrv; - kobject_init(&pdev->dev.kobj, &dev_ktype); - kobject_set_name(&pdev->dev.kobj, device_get_nameunit(dev)); - kobject_add(&pdev->dev.kobj, &linux_rootdev.kobj, - kobject_name(&pdev->dev.kobj)); - rle = _pci_get_rle(pdev, SYS_RES_IRQ, 0); - if (rle) - pdev->dev.irq = rle->start; - else - pdev->dev.irq = 0; - pdev->irq = pdev->dev.irq; - mtx_unlock(&Giant); - spin_lock(&pci_lock); - list_add(&pdev->links, &pci_devices); - spin_unlock(&pci_lock); - error = pdrv->probe(pdev, id); - mtx_lock(&Giant); - if (error) { - spin_lock(&pci_lock); - list_del(&pdev->links); - spin_unlock(&pci_lock); - put_device(&pdev->dev); - return (-error); - } - return (0); -} - -static inline int -linux_pci_detach(device_t dev) -{ - struct pci_dev *pdev; - - pdev = device_get_softc(dev); - mtx_unlock(&Giant); - pdev->pdrv->remove(pdev); - mtx_lock(&Giant); - spin_lock(&pci_lock); - list_del(&pdev->links); - spin_unlock(&pci_lock); - put_device(&pdev->dev); - - return (0); -} - -static device_method_t pci_methods[] = { - DEVMETHOD(device_probe, linux_pci_probe), - DEVMETHOD(device_attach, linux_pci_attach), - DEVMETHOD(device_detach, linux_pci_detach), - {0, 0} -}; - -static inline int -pci_register_driver(struct pci_driver *pdrv) -{ - devclass_t bus; - int error; - - spin_lock(&pci_lock); - list_add(&pdrv->links, &pci_drivers); - spin_unlock(&pci_lock); - bus = devclass_find("pci"); - pdrv->driver.name = pdrv->name; - pdrv->driver.methods = pci_methods; - pdrv->driver.size = sizeof(struct pci_dev); - mtx_lock(&Giant); - error = devclass_add_driver(bus, &pdrv->driver, BUS_PASS_DEFAULT, - &pdrv->bsdclass); - mtx_unlock(&Giant); - if (error) - return (-error); - return (0); -} - -static inline void -pci_unregister_driver(struct pci_driver *pdrv) -{ - devclass_t bus; - - list_del(&pdrv->links); - bus = devclass_find("pci"); - mtx_lock(&Giant); - devclass_delete_driver(bus, &pdrv->driver); - mtx_unlock(&Giant); -} +extern int pci_register_driver(struct pci_driver *pdrv); +extern void pci_unregister_driver(struct pci_driver *pdrv); struct msix_entry { int entry; @@ -837,5 +699,4 @@ static inline int pcie_capability_write_ return pci_write_config_word(dev, pci_pcie_cap(dev) + pos, val); } - #endif /* _LINUX_PCI_H_ */ From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 17:31:48 2015 Return-Path: Delivered-To: svn-src-head@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 C9080223; Sat, 17 Jan 2015 17:31: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 B56A0219; Sat, 17 Jan 2015 17:31: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 t0HHVmUo066478; Sat, 17 Jan 2015 17:31:48 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HHVmW8066460; Sat, 17 Jan 2015 17:31:48 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501171731.t0HHVmW8066460@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 17:31:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277303 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 17:31:48 -0000 Author: adrian Date: Sat Jan 17 17:31:47 2015 New Revision: 277303 URL: https://svnweb.freebsd.org/changeset/base/277303 Log: Skip the OFDM weak signal threshold detection programming for AR9462/AR9565. This and some upcoming changes to the HAL for these chips should address some of the signal sensitivity reported by users. Tested: * AR9462 (WB222), STA mode Obtained from: Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Sat Jan 17 16:36:39 2015 (r277302) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_ani.c Sat Jan 17 17:31:47 2015 (r277303) @@ -484,6 +484,9 @@ ar9300_ani_control(struct ath_hal *ah, H */ is_on = param ? 1 : 0; + if (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) + goto skip_ws_det; + /* * make register setting for default (weak sig detect ON) * come from INI file @@ -528,6 +531,7 @@ ar9300_ani_control(struct ath_hal *ah, H m1_thresh_ext); OS_REG_RMW_FIELD(ah, AR_PHY_SFCORR_EXT, AR_PHY_SFCORR_EXT_M2_THRESH, m2_thresh_ext); +skip_ws_det: if (is_on) { OS_REG_SET_BIT(ah, AR_PHY_SFCORR_LOW, AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW); From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 17:37:10 2015 Return-Path: Delivered-To: svn-src-head@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 03E1D573; Sat, 17 Jan 2015 17:37: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 C9F69279; Sat, 17 Jan 2015 17:37: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 t0HHb9XK067725; Sat, 17 Jan 2015 17:37:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HHb9cD067723; Sat, 17 Jan 2015 17:37:09 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501171737.t0HHb9cD067723@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 17 Jan 2015 17:37:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277304 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 17:37:10 -0000 Author: adrian Date: Sat Jan 17 17:37:08 2015 New Revision: 277304 URL: https://svnweb.freebsd.org/changeset/base/277304 Log: Correct the descriptor length for AR9462/AR9565 and set the final field to zero - TX drops are otherwise reported. Tested: * AR9462 (WB222), STA mode Obtained from: Linux ath9k Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Sat Jan 17 17:31:47 2015 (r277303) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Sat Jan 17 17:37:08 2015 (r277304) @@ -68,9 +68,11 @@ ar9300_fill_tx_desc( const void *ds0) { struct ar9300_txc *ads = AR9300TXC(ds); + short desclen; /* Fill TXC info field */ - ads->ds_info = TXC_INFO(qcu); + desclen = (AR_SREV_JUPITER(ah) || AR_SREV_APHRODITE(ah)) ? 0x18 : 0x17; + ads->ds_info = TXC_INFO(qcu, desclen); /* Set the buffer addresses */ ads->ds_data0 = buf_addr[0]; @@ -124,6 +126,9 @@ ar9300_fill_tx_desc( ads->ds_ctl17 = SM(key_type, AR_encr_type); } + /* Only relevant for Jupiter/Aphrodite */ + ads->ds_ctl23 = 0; + return AH_TRUE; } Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Sat Jan 17 17:31:47 2015 (r277303) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300desc.h Sat Jan 17 17:37:08 2015 (r277304) @@ -78,7 +78,8 @@ struct ar9300_txc { u_int32_t ds_ctl20; /* DMA control 20 */ u_int32_t ds_ctl21; /* DMA control 21 */ u_int32_t ds_ctl22; /* DMA control 22 */ - u_int32_t ds_pad[9]; /* pad to cache line (128 bytes/32 dwords) */ + u_int32_t ds_ctl23; /* DMA control 23 */ + u_int32_t ds_pad[8]; /* pad to cache line (128 bytes/32 dwords) */ }; @@ -429,11 +430,11 @@ struct ar9300_txc { #define RXSTATUS_NUMWORDS(ah) 11 -#define TXC_INFO(_qcu) (ATHEROS_VENDOR_ID << AR_desc_id_S) \ +#define TXC_INFO(_qcu, _desclen) (ATHEROS_VENDOR_ID << AR_desc_id_S) \ | (1 << AR_tx_rx_desc_S) \ | (1 << AR_ctrl_stat_S) \ | (_qcu << AR_tx_qcu_num_S) \ - | (0x17) + | (_desclen) #define VALID_KEY_TYPES \ ((1 << HAL_KEY_TYPE_CLEAR) | (1 << HAL_KEY_TYPE_WEP)|\ From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 18:40:47 2015 Return-Path: Delivered-To: svn-src-head@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 43BBD5E8; Sat, 17 Jan 2015 18:40: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 2FFE8B02; Sat, 17 Jan 2015 18:40: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 t0HIelxw097599; Sat, 17 Jan 2015 18:40:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HIel6R097598; Sat, 17 Jan 2015 18:40:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501171840.t0HIel6R097598@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 17 Jan 2015 18:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277305 - 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-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 18:40:47 -0000 Author: ian Date: Sat Jan 17 18:40:46 2015 New Revision: 277305 URL: https://svnweb.freebsd.org/changeset/base/277305 Log: Minor cleanups, comment changes. No need to load 3 values when setting up the stack for secondary cores, the other two values are only used for zeroing bss on the primary core. No need to store the size of the stack at the top of the stack (seems to be a leftover instruction from some cut-n-paste). Modified: head/sys/arm/arm/locore-v6.S Modified: head/sys/arm/arm/locore-v6.S ============================================================================== --- head/sys/arm/arm/locore-v6.S Sat Jan 17 17:37:08 2015 (r277304) +++ head/sys/arm/arm/locore-v6.S Sat Jan 17 18:40:46 2015 (r277305) @@ -367,9 +367,9 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .Lstart: - .word _edata - .word _ebss - .word svcstk + .word _edata /* Note that these three items are */ + .word _ebss /* loaded with a single ldmia and */ + .word svcstk /* must remain in order together. */ .Lmainreturned: .asciz "main() returned" @@ -425,20 +425,19 @@ ASENTRY_NP(mpentry) bl init_mmu - adr r1, .Lstart - ldmia r1, {r1, r2, sp} /* Set initial stack and */ - mrc p15, 0, r0, c0, c0, 5 - and r0, r0, #15 + adr r1, .Lstart+8 /* Get initstack pointer from */ + ldr sp, [r1] /* startup data. */ + mrc CP15_MPIDR(r0) /* Get processor id number. */ + and r0, r0, #0x0f mov r1, #INIT_ARM_STACK_SIZE - mul r2, r1, r0 - add sp, sp, r2 - str r1, [sp] + mul r2, r1, r0 /* Point sp to initstack */ + add sp, sp, r2 /* area for this processor. */ /* Switch to virtual addresses. */ ldr pc, =1f 1: mov fp, #0 /* trace back starts here */ - bl _C_LABEL(init_secondary) /* Off we go */ + bl _C_LABEL(init_secondary)/* Off we go, cpu id in r0. */ adr r0, .Lmpreturned b _C_LABEL(panic) From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 18:56:24 2015 Return-Path: Delivered-To: svn-src-head@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 F37607F0; Sat, 17 Jan 2015 18:56: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 C5DE8BEC; Sat, 17 Jan 2015 18:56: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 t0HIuNEA005382; Sat, 17 Jan 2015 18:56:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HIuN1a005381; Sat, 17 Jan 2015 18:56:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501171856.t0HIuN1a005381@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 17 Jan 2015 18:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277306 - head/sys/dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 18:56:24 -0000 Author: ian Date: Sat Jan 17 18:56:22 2015 New Revision: 277306 URL: https://svnweb.freebsd.org/changeset/base/277306 Log: Add defines for SDHCI 3.0 controllers. Submitted by: Michal Meloun Modified: head/sys/dev/sdhci/sdhci.h Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:40:46 2015 (r277305) +++ head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:56:22 2015 (r277306) @@ -169,6 +169,10 @@ #define SDHCI_INT_CARD_INSERT 0x00000040 #define SDHCI_INT_CARD_REMOVE 0x00000080 #define SDHCI_INT_CARD_INT 0x00000100 +#define SDHCI_INT_INT_A 0x00000200 +#define SDHCI_INT_INT_B 0x00000400 +#define SDHCI_INT_INT_C 0x00000800 +#define SDHCI_INT_RETUNE 0x00001000 #define SDHCI_INT_ERROR 0x00008000 #define SDHCI_INT_TIMEOUT 0x00010000 #define SDHCI_INT_CRC 0x00020000 @@ -180,6 +184,7 @@ #define SDHCI_INT_BUS_POWER 0x00800000 #define SDHCI_INT_ACMD12ERR 0x01000000 #define SDHCI_INT_ADMAERR 0x02000000 +#define SDHCI_INT_TUNEERR 0x04000000 #define SDHCI_INT_NORMAL_MASK 0x00007FFF #define SDHCI_INT_ERROR_MASK 0xFFFF8000 @@ -195,6 +200,7 @@ SDHCI_INT_DATA_END_BIT) #define SDHCI_ACMD12_ERR 0x3C +#define SDHCI_HOST_CONTROL2 0x3E #define SDHCI_CAPABILITIES 0x40 #define SDHCI_TIMEOUT_CLK_MASK 0x0000003F @@ -214,8 +220,31 @@ #define SDHCI_CAN_VDD_300 0x02000000 #define SDHCI_CAN_VDD_180 0x04000000 #define SDHCI_CAN_DO_64BIT 0x10000000 +#define SDHCI_CAN_ASYNC_INTR 0x20000000 + +#define SDHCI_CAPABILITIES2 0x44 +#define SDHCI_CAN_SDR50 0x00000001 +#define SDHCI_CAN_SDR104 0x00000002 +#define SDHCI_CAN_DDR50 0x00000004 +#define SDHCI_CAN_DRIVE_TYPE_A 0x00000010 +#define SDHCI_CAN_DRIVE_TYPE_B 0x00000020 +#define SDHCI_CAN_DRIVE_TYPE_C 0x00000040 +#define SDHCI_RETUNE_CNT_MASK 0x00000F00 +#define SDHCI_RETUNE_CNT_SHIFT 8 +#define SDHCI_TUNE_SDR50 0x00002000 +#define SDHCI_RETUNE_MODES_MASK 0x0000C000 +#define SDHCI_RETUNE_MODES_SHIFT 14 +#define SDHCI_CLOCK_MULT_MASK 0x00FF0000 +#define SDHCI_CLOCK_MULT_SHIFT 16 #define SDHCI_MAX_CURRENT 0x48 +#define SDHCI_FORCE_AUTO_EVENT 0x50 +#define SDHCI_FORCE_INTR_EVENT 0x52 +#define SDHCI_ADMA_ERR 0x54 +#define SDHCI_ADMA_ADDRESS_LOW 0x58 +#define SDHCI_ADMA_ADDRESS_HI 0x5C +#define SDHCI_PRESET_VALUE 0x60 +#define SDHCI_SHARED_BUS_CTRL 0xE0 #define SDHCI_SLOT_INT_STATUS 0xFC From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 19:57:05 2015 Return-Path: Delivered-To: svn-src-head@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 281A5483; Sat, 17 Jan 2015 19:57: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 092C0152; Sat, 17 Jan 2015 19:57: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 t0HJv4fv033597; Sat, 17 Jan 2015 19:57:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0HJv4NG033594; Sat, 17 Jan 2015 19:57:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501171957.t0HJv4NG033594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 17 Jan 2015 19:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277307 - in head/sys: arm/broadcom/bcm2835 dev/sdhci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 19:57:05 -0000 Author: ian Date: Sat Jan 17 19:57:03 2015 New Revision: 277307 URL: https://svnweb.freebsd.org/changeset/base/277307 Log: Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Apparently some sdhci controllers, such as the one on a Raspberry Pi, mishandle the signal timing in high speed signaling mode, but run just fine in standard mode with the bus running at frequencies between 25-50MHz (which shouldn't work). This is the solution adopted by U-Boot and other OSes (linux and *BSD) for the timeouts on Raspberry Pi boards with certain SD cards. Some research shows that this quirk is also used on a few other boards, so the fix is a generic quirk instead of being in the RPi-specific driver code. This change is based on information discovered by Michal Meloun. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c head/sys/dev/sdhci/sdhci.c head/sys/dev/sdhci/sdhci.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Jan 17 18:56:22 2015 (r277306) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Jan 17 19:57:03 2015 (r277307) @@ -91,7 +91,7 @@ __FBSDID("$FreeBSD$"); * HS mode still can be enabled with the tunable. */ static int bcm2835_sdhci_min_freq = 400000; -static int bcm2835_sdhci_hs = 0; +static int bcm2835_sdhci_hs = 1; static int bcm2835_sdhci_pio_mode = 0; TUNABLE_INT("hw.bcm2835.sdhci.min_freq", &bcm2835_sdhci_min_freq); @@ -235,6 +235,7 @@ bcm_sdhci_attach(device_t dev) sc->sc_slot.caps |= (default_freq << SDHCI_CLOCK_BASE_SHIFT); sc->sc_slot.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL + | SDHCI_QUIRK_DONT_SET_HISPD_BIT | SDHCI_QUIRK_MISSING_CAPS; sdhci_init_slot(dev, &sc->sc_slot, 0); Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Sat Jan 17 18:56:22 2015 (r277306) +++ head/sys/dev/sdhci/sdhci.c Sat Jan 17 19:57:03 2015 (r277307) @@ -696,7 +696,8 @@ sdhci_generic_update_ios(device_t brdev, slot->hostctrl |= SDHCI_CTRL_4BITBUS; else slot->hostctrl &= ~SDHCI_CTRL_4BITBUS; - if (ios->timing == bus_timing_hs) + if (ios->timing == bus_timing_hs && + !(slot->quirks & SDHCI_QUIRK_DONT_SET_HISPD_BIT)) slot->hostctrl |= SDHCI_CTRL_HISPD; else slot->hostctrl &= ~SDHCI_CTRL_HISPD; Modified: head/sys/dev/sdhci/sdhci.h ============================================================================== --- head/sys/dev/sdhci/sdhci.h Sat Jan 17 18:56:22 2015 (r277306) +++ head/sys/dev/sdhci/sdhci.h Sat Jan 17 19:57:03 2015 (r277307) @@ -61,6 +61,8 @@ #define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13) /* Wait to see reset bit asserted before waiting for de-asserted */ #define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14) +/* Leave controller in standard mode when putting card in HS mode. */ +#define SDHCI_QUIRK_DONT_SET_HISPD_BIT (1<<15) /* * Controller registers From owner-svn-src-head@FreeBSD.ORG Sat Jan 17 23:19:09 2015 Return-Path: Delivered-To: svn-src-head@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 72E46BC5 for ; Sat, 17 Jan 2015 23:19:09 +0000 (UTC) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C7EC7DC for ; Sat, 17 Jan 2015 23:19:09 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id kx10so567729pab.11 for ; Sat, 17 Jan 2015 15:19:08 -0800 (PST) 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=ZFEJrFd+nBHj1+JVmLxobnwPnOvuAZG7zw5gcB5J5H4=; b=ZPuWcq6P94+ma2vsf/8aPP5sn7vRZSlWVL/GCbvIMb3RgmOyREQmtmbS2b09NurXhW 4drbhf8jDy8fkoZac2wTd0XgO+S22EJWlQ/fUSzLtg1RNZ1cfVGFEgnzXKmv5BraPH9I AG2x98qpEy07AHirXBBgEDZdNEb0333VWtblb9Tv2nTE4mBSoZF1dhBEG26DIiItLqTS RkIirAW8INx2tYkmshEC1PsFQlXGixDRCn+Nz2LZTHa26dAhKTDA1mNIp+OvFnPzahel X621FPKidxPjh0/piKsPd5Hrqz0h26QP9mdSxd434VSFKhYGgRyTHSbyXDjP9B6mpF0m kyZQ== X-Gm-Message-State: ALoCoQnqiCt2HIFAG9RnQqGBrH3FLJnaJuZH01LUzSDYiRcXap8a8B/Ri/0o3xb4dLybSLipDXmh X-Received: by 10.70.40.139 with SMTP id x11mr33629844pdk.124.1421536748673; Sat, 17 Jan 2015 15:19:08 -0800 (PST) Received: from lglt-rottaway.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id t4sm7625946pdh.9.2015.01.17.15.19.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 17 Jan 2015 15:19:08 -0800 (PST) Sender: Warner Losh Subject: Re: svn commit: r277285 - head/sys/x86/isa Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b3 From: Warner Losh In-Reply-To: <9BA78F3A-C96C-4B51-A6CA-67B15665F511@FreeBSD.org> Date: Sat, 17 Jan 2015 16:19:05 -0700 Message-Id: <717DFAD4-3B25-4ED8-A154-E7F91B61C959@bsdimp.com> References: <201501170218.t0H2I0AW038857@svn.freebsd.org> <9BA78F3A-C96C-4B51-A6CA-67B15665F511@FreeBSD.org> To: "Bjoern A. Zeeb" X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2015 23:19:09 -0000 --Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jan 17, 2015, at 6:31 AM, Bjoern A. Zeeb wrote: >=20 >=20 >> On 17 Jan 2015, at 02:18 , Warner Losh wrote: >>=20 >> Author: imp >> Date: Sat Jan 17 02:17:59 2015 >> New Revision: 277285 >> URL: https://svnweb.freebsd.org/changeset/base/277285 >>=20 >> Log: >> Need to include opt_mca.h to test for DEV_MCA. >>=20 >> Modified: >> head/sys/x86/isa/atpic.c >=20 >=20 > i386 LINT kernels: >=20 > /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of = undeclared identifier 'MCA_system' > /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of = undeclared identifier =E2=80=98MCA_system' I don=E2=80=99t get that far. After =E2=80=98make LINT=E2=80=99 in i386, = I get OFED unknown option=E2=80=A6 Warner >>=20 >> Modified: head/sys/x86/isa/atpic.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/x86/isa/atpic.c Sat Jan 17 02:17:57 2015 = (r277284) >> +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015 = (r277285) >> @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); >>=20 >> #include "opt_auto_eoi.h" >> #include "opt_isa.h" >> +#include "opt_mca.h" >>=20 >> #include >> #include >>=20 >=20 > =E2=80=94 > 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." >=20 --Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC 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 iQIcBAEBCgAGBQJUuu3pAAoJEGwc0Sh9sBEA0g4QAMQLhdXaHBcWpQSoCnNejRKM XVgIxL1ljO9Jq/LOMgMMwAovcNl+dTRy2fIZijJB6Z2Bwy0wGK7KbpYYQpVGysRD U8tXepPO1oGzp6JsAcwrl+z4KEw3IMBR+g48pf1RZUKZIKMjWkl+H6fb01LcviOU kOERM27JDDOAftRC21YSLj3U84AcfMpEE9XDTWvoz1HUK0SeNJTX7Hf/2jAOkeUH sFWFejCNxs7S8hJM1KT3Lpwj/wfTYBMysW+wGvPUBbB3jPoSwTO9COlODcDsCLlf DF0FEXjfYmbHcM+KUVmpVp/MLztC31hXf/vSnxOq0d5nnL6uw1glPHVqbgx2Kk9s RTrukTJGZ/F/8GWr/PGe1AxXHNLf2S4VLL8JwR11U5gTbvZmeVo2/O1noXlB5M5/ Iopjje4hhy+E10NYZARXxNkpxB21aadxNapH2YfoUnZywUSGFswZNUa0/wFJ/W/u vJr8EWvKjkZQJUjjjzDd6bLWophQXxrNm26xvttr5j4LF5Otnr56SqdWrDs/X6dj IGsphtlauu2/4UPQAaVJnkJthSYE/a3T9qDLbLbbwik/5AI14tzTYEfrtiW3PALf oa3ukbAeMg9GFeT42AFGSKX6z7+TEKaZppXxukUYQsJjFOx4BM4thxU08NcxhDGB qEQQ5nBuUO0Ey7qe+5+9 =zzwg -----END PGP SIGNATURE----- --Apple-Mail=_94445F0B-8A34-409C-BB21-F57F790919FC--