From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 20:44:46 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AC64EAF; Sun, 8 Feb 2015 20:44: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 0547E8C9; Sun, 8 Feb 2015 20:44: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 t18KijZQ092310; Sun, 8 Feb 2015 20:44:45 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18KijDo092308; Sun, 8 Feb 2015 20:44:45 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082044.t18KijDo092308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 20:44:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278399 - in stable/10/sys/dev: bge pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 20:44:46 -0000 Author: marius Date: Sun Feb 8 20:44:44 2015 New Revision: 278399 URL: https://svnweb.freebsd.org/changeset/base/278399 Log: MFC: r276299 - Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4). Modified: stable/10/sys/dev/bge/if_bge.c stable/10/sys/dev/pci/pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bge/if_bge.c ============================================================================== --- stable/10/sys/dev/bge/if_bge.c Sun Feb 8 19:18:23 2015 (r278398) +++ stable/10/sys/dev/bge/if_bge.c Sun Feb 8 20:44:44 2015 (r278399) @@ -1937,11 +1937,9 @@ bge_chipinit(struct bge_softc *sc) /* * Disable memory write invalidate. Apparently it is not supported - * properly by these devices. Also ensure that INTx isn't disabled, - * as these chips need it even when using MSI. + * properly by these devices. */ - PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, - PCIM_CMD_INTxDIS | PCIM_CMD_MWIEN, 4); + PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, PCIM_CMD_MWIEN, 4); /* Set the timer prescaler (always 66 MHz). */ CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); Modified: stable/10/sys/dev/pci/pci.c ============================================================================== --- stable/10/sys/dev/pci/pci.c Sun Feb 8 19:18:23 2015 (r278398) +++ stable/10/sys/dev/pci/pci.c Sun Feb 8 20:44:44 2015 (r278399) @@ -257,7 +257,7 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200 ethernet controller has a bug that + * Atheros AR8161/AR8162/E2200 Ethernet controllers have a bug that * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the * command register is set. */ @@ -265,6 +265,17 @@ static const struct pci_quirk pci_quirks { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + /* + * Broadcom BCM5714(S)/BCM5715(S)/BCM5780(S) Ethernet MACs don't + * issue MSI interrupts with PCIM_CMD_INTxDIS set either. + */ + { 0x166814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714 */ + { 0x166914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714S */ + { 0x166a14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780 */ + { 0x166b14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780S */ + { 0x167814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715 */ + { 0x167914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715S */ + { 0 } }; @@ -3634,14 +3645,16 @@ pci_setup_intr(device_t dev, device_t ch mte->mte_handlers++; } - if (!pci_has_quirk(pci_get_devid(dev), - PCI_QUIRK_MSI_INTX_BUG)) { - /* - * Make sure that INTx is disabled if we are - * using MSI/MSIX - */ + /* + * Make sure that INTx is disabled if we are using MSI/MSI-X, + * unless the device is affected by PCI_QUIRK_MSI_INTX_BUG, + * in which case we "enable" INTx so MSI/MSI-X actually works. + */ + if (!pci_has_quirk(pci_get_devid(child), + PCI_QUIRK_MSI_INTX_BUG)) pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); - } + else + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 20:44:52 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A8C8FD6; Sun, 8 Feb 2015 20:44: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 259278CC; Sun, 8 Feb 2015 20:44: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 t18Kiqpj092374; Sun, 8 Feb 2015 20:44:52 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18KipmR092371; Sun, 8 Feb 2015 20:44:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082044.t18KipmR092371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 20:44:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278400 - in stable/9/sys/dev: bge pci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 20:44:52 -0000 Author: marius Date: Sun Feb 8 20:44:50 2015 New Revision: 278400 URL: https://svnweb.freebsd.org/changeset/base/278400 Log: MFC: r276299 - Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device for the lookup. - For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS is cleared when using MSI/MSI-X. - Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4). Modified: stable/9/sys/dev/bge/if_bge.c stable/9/sys/dev/pci/pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bge/if_bge.c ============================================================================== --- stable/9/sys/dev/bge/if_bge.c Sun Feb 8 20:44:44 2015 (r278399) +++ stable/9/sys/dev/bge/if_bge.c Sun Feb 8 20:44:50 2015 (r278400) @@ -1937,11 +1937,9 @@ bge_chipinit(struct bge_softc *sc) /* * Disable memory write invalidate. Apparently it is not supported - * properly by these devices. Also ensure that INTx isn't disabled, - * as these chips need it even when using MSI. + * properly by these devices. */ - PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, - PCIM_CMD_INTxDIS | PCIM_CMD_MWIEN, 4); + PCI_CLRBIT(sc->bge_dev, BGE_PCI_CMD, PCIM_CMD_MWIEN, 4); /* Set the timer prescaler (always 66 MHz). */ CSR_WRITE_4(sc, BGE_MISC_CFG, BGE_32BITTIME_66MHZ); Modified: stable/9/sys/dev/pci/pci.c ============================================================================== --- stable/9/sys/dev/pci/pci.c Sun Feb 8 20:44:44 2015 (r278399) +++ stable/9/sys/dev/pci/pci.c Sun Feb 8 20:44:50 2015 (r278400) @@ -270,7 +270,7 @@ static const struct pci_quirk pci_quirks { 0x43851002, PCI_QUIRK_UNMAP_REG, 0x14, 0 }, /* - * Atheros AR8161/AR8162/E2200 ethernet controller has a bug that + * Atheros AR8161/AR8162/E2200 Ethernet controllers have a bug that * MSI interrupt does not assert if PCIM_CMD_INTxDIS bit of the * command register is set. */ @@ -278,6 +278,17 @@ static const struct pci_quirk pci_quirks { 0xE0911969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, { 0x10901969, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, + /* + * Broadcom BCM5714(S)/BCM5715(S)/BCM5780(S) Ethernet MACs don't + * issue MSI interrupts with PCIM_CMD_INTxDIS set either. + */ + { 0x166814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714 */ + { 0x166914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5714S */ + { 0x166a14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780 */ + { 0x166b14e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5780S */ + { 0x167814e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715 */ + { 0x167914e4, PCI_QUIRK_MSI_INTX_BUG, 0, 0 }, /* BCM5715S */ + { 0 } }; @@ -3567,14 +3578,16 @@ pci_setup_intr(device_t dev, device_t ch mte->mte_handlers++; } - if (!pci_has_quirk(pci_get_devid(dev), - PCI_QUIRK_MSI_INTX_BUG)) { - /* - * Make sure that INTx is disabled if we are - * using MSI/MSIX - */ + /* + * Make sure that INTx is disabled if we are using MSI/MSI-X, + * unless the device is affected by PCI_QUIRK_MSI_INTX_BUG, + * in which case we "enable" INTx so MSI/MSI-X actually works. + */ + if (!pci_has_quirk(pci_get_devid(child), + PCI_QUIRK_MSI_INTX_BUG)) pci_set_command_bit(dev, child, PCIM_CMD_INTxDIS); - } + else + pci_clear_command_bit(dev, child, PCIM_CMD_INTxDIS); bad: if (error) { (void)bus_generic_teardown_intr(dev, child, irq, From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:12:49 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E476198; Sun, 8 Feb 2015 21:12:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39498C5C; Sun, 8 Feb 2015 21:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LCnqc007531; Sun, 8 Feb 2015 21:12:49 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LCmlF007530; Sun, 8 Feb 2015 21:12:48 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082112.t18LCmlF007530@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278403 - stable/10/sys/dev/bce X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:12:49 -0000 Author: marius Date: Sun Feb 8 21:12:48 2015 New Revision: 278403 URL: https://svnweb.freebsd.org/changeset/base/278403 Log: MFC: r276313 Const'ify a firmware image missed in r251142. Modified: stable/10/sys/dev/bce/if_bcefw.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/10/sys/dev/bce/if_bcefw.h Sun Feb 8 21:00:51 2015 (r278402) +++ stable/10/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:48 2015 (r278403) @@ -7997,7 +7997,7 @@ const u32 bce_TPAT_b09FwBss[(0x12b4/4) + const u32 bce_TPAT_b09FwSbss[(0x3c/4) + 1] = { 0x0 }; const u32 bce_TPAT_b09FwSdata[(0x0/4) + 1] = { 0x0 }; - + int bce_COM_b09FwReleaseMajor = 0x6; int bce_COM_b09FwReleaseMinor = 0x0; int bce_COM_b09FwReleaseFix = 0x11; @@ -11727,8 +11727,8 @@ const u32 bce_RXP_b09FwText[(0x9090/4) + 0x90cf0009, 0x240d0004, 0x31ee00ff, 0x11cdfd85, 0x24020001, 0x3c010801, 0xa022950d, 0xa002154, 0x0, 0x0 }; -u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; -u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { +const u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; +const u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { 0x8003344, 0x8003344, 0x8003420, 0x80033f4, 0x80033d8, 0x8003328, 0x8003328, 0x8003328, 0x800334c, From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:12:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CCCC2C5; Sun, 8 Feb 2015 21:12: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 47E3DC5F; Sun, 8 Feb 2015 21:12: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 t18LCtxf007595; Sun, 8 Feb 2015 21:12:55 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LCtHw007594; Sun, 8 Feb 2015 21:12:55 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082112.t18LCtHw007594@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:12:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278404 - stable/9/sys/dev/bce X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:12:55 -0000 Author: marius Date: Sun Feb 8 21:12:54 2015 New Revision: 278404 URL: https://svnweb.freebsd.org/changeset/base/278404 Log: MFC: r276313 Const'ify a firmware image missed in r251142 (MFCed to stable/9 in r225736). Modified: stable/9/sys/dev/bce/if_bcefw.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/bce/if_bcefw.h ============================================================================== --- stable/9/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:48 2015 (r278403) +++ stable/9/sys/dev/bce/if_bcefw.h Sun Feb 8 21:12:54 2015 (r278404) @@ -7997,7 +7997,7 @@ const u32 bce_TPAT_b09FwBss[(0x12b4/4) + const u32 bce_TPAT_b09FwSbss[(0x3c/4) + 1] = { 0x0 }; const u32 bce_TPAT_b09FwSdata[(0x0/4) + 1] = { 0x0 }; - + int bce_COM_b09FwReleaseMajor = 0x6; int bce_COM_b09FwReleaseMinor = 0x0; int bce_COM_b09FwReleaseFix = 0x11; @@ -11727,8 +11727,8 @@ const u32 bce_RXP_b09FwText[(0x9090/4) + 0x90cf0009, 0x240d0004, 0x31ee00ff, 0x11cdfd85, 0x24020001, 0x3c010801, 0xa022950d, 0xa002154, 0x0, 0x0 }; -u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; -u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { +const u32 bce_RXP_b09FwData[(0x0/4) + 1] = { 0x0 }; +const u32 bce_RXP_b09FwRodata[(0x33c/4) + 1] = { 0x8003344, 0x8003344, 0x8003420, 0x80033f4, 0x80033d8, 0x8003328, 0x8003328, 0x8003328, 0x800334c, From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:31:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEA91944; Sun, 8 Feb 2015 21:31: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 D97C4E23; Sun, 8 Feb 2015 21:31: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 t18LVfZK016775; Sun, 8 Feb 2015 21:31:41 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LVf5l016772; Sun, 8 Feb 2015 21:31:41 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082131.t18LVf5l016772@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:31:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278405 - stable/10/sys/dev/ahci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:31:42 -0000 Author: marius Date: Sun Feb 8 21:31:40 2015 New Revision: 278405 URL: https://svnweb.freebsd.org/changeset/base/278405 Log: MFC: r276344 - Const'ify the ahci_ids table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/10/sys/dev/ahci/ahci.c stable/10/sys/dev/ahci/ahciem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ahci/ahci.c ============================================================================== --- stable/10/sys/dev/ahci/ahci.c Sun Feb 8 21:12:54 2015 (r278404) +++ stable/10/sys/dev/ahci/ahci.c Sun Feb 8 21:31:40 2015 (r278405) @@ -99,7 +99,7 @@ static void ahcipoll(struct cam_sim *sim static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { +static const struct { uint32_t id; uint8_t rev; const char *name; @@ -1024,14 +1024,14 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_attach), @@ -1044,14 +1044,14 @@ static device_method_t ahci_ata_methods[ DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -1317,14 +1317,14 @@ static device_method_t ahcich_methods[] DEVMETHOD(device_detach, ahci_ch_detach), DEVMETHOD(device_suspend, ahci_ch_suspend), DEVMETHOD(device_resume, ahci_ch_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahcich_driver = { "ahcich", ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, NULL, NULL); struct ahci_dc_cb_args { bus_addr_t maddr; Modified: stable/10/sys/dev/ahci/ahciem.c ============================================================================== --- stable/10/sys/dev/ahci/ahciem.c Sun Feb 8 21:12:54 2015 (r278404) +++ stable/10/sys/dev/ahci/ahciem.c Sun Feb 8 21:31:40 2015 (r278405) @@ -273,14 +273,14 @@ static device_method_t ahciem_methods[] DEVMETHOD(device_detach, ahci_em_detach), DEVMETHOD(device_suspend, ahci_em_suspend), DEVMETHOD(device_resume, ahci_em_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahciem_driver = { "ahciem", ahciem_methods, sizeof(struct ahci_enclosure) }; -DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, 0, 0); +DRIVER_MODULE(ahciem, ahci, ahciem_driver, ahciem_devclass, NULL, NULL); static void ahci_em_setleds(device_t dev, int c) From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:31:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE6A5A6B; Sun, 8 Feb 2015 21:31: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 AF644E26; Sun, 8 Feb 2015 21:31: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 t18LVoIL016842; Sun, 8 Feb 2015 21:31:50 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LVosT016841; Sun, 8 Feb 2015 21:31:50 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082131.t18LVosT016841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:31:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278406 - stable/9/sys/dev/ahci X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:31:51 -0000 Author: marius Date: Sun Feb 8 21:31:49 2015 New Revision: 278406 URL: https://svnweb.freebsd.org/changeset/base/278406 Log: MFC: r276344 - Const'ify the ahci_ids table. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: stable/9/sys/dev/ahci/ahci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Sun Feb 8 21:31:40 2015 (r278405) +++ stable/9/sys/dev/ahci/ahci.c Sun Feb 8 21:31:49 2015 (r278406) @@ -103,7 +103,7 @@ static void ahcipoll(struct cam_sim *sim static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); -static struct { +static const struct { uint32_t id; uint8_t rev; const char *name; @@ -977,14 +977,14 @@ static device_method_t ahci_methods[] = DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), DEVMETHOD(bus_get_dma_tag, ahci_get_dma_tag), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_driver = { "ahci", ahci_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, pci, ahci_driver, ahci_devclass, NULL, NULL); static device_method_t ahci_ata_methods[] = { DEVMETHOD(device_probe, ahci_ata_probe), DEVMETHOD(device_attach, ahci_attach), @@ -997,14 +997,14 @@ static device_method_t ahci_ata_methods[ DEVMETHOD(bus_setup_intr, ahci_setup_intr), DEVMETHOD(bus_teardown_intr,ahci_teardown_intr), DEVMETHOD(bus_child_location_str, ahci_child_location_str), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahci_ata_driver = { "ahci", ahci_ata_methods, sizeof(struct ahci_controller) }; -DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, 0, 0); +DRIVER_MODULE(ahci, atapci, ahci_ata_driver, ahci_devclass, NULL, NULL); MODULE_VERSION(ahci, 1); MODULE_DEPEND(ahci, cam, 1, 1, 1); @@ -1290,14 +1290,14 @@ static device_method_t ahcich_methods[] DEVMETHOD(device_detach, ahci_ch_detach), DEVMETHOD(device_suspend, ahci_ch_suspend), DEVMETHOD(device_resume, ahci_ch_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ahcich_driver = { "ahcich", ahcich_methods, sizeof(struct ahci_channel) }; -DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0); +DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, NULL, NULL); static void ahci_ch_setleds(device_t dev) From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:41:20 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 305A6D81; Sun, 8 Feb 2015 21:41: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 01DFAF04; Sun, 8 Feb 2015 21:41: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 t18LfJ6H021245; Sun, 8 Feb 2015 21:41:19 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LfJMA021244; Sun, 8 Feb 2015 21:41:19 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082141.t18LfJMA021244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:41:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278407 - stable/10/sys/dev/uart X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:41:20 -0000 Author: marius Date: Sun Feb 8 21:41:18 2015 New Revision: 278407 URL: https://svnweb.freebsd.org/changeset/base/278407 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/10/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/10/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:31:49 2015 (r278406) +++ stable/10/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:18 2015 (r278407) @@ -112,12 +112,15 @@ 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, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -136,6 +139,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:41:27 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B9998EB1; Sun, 8 Feb 2015 21:41: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 8AE50F09; Sun, 8 Feb 2015 21:41:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18LfRxo021969; Sun, 8 Feb 2015 21:41:27 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LfRu5021968; Sun, 8 Feb 2015 21:41:27 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082141.t18LfRu5021968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278408 - stable/9/sys/dev/uart X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:41:27 -0000 Author: marius Date: Sun Feb 8 21:41:26 2015 New Revision: 278408 URL: https://svnweb.freebsd.org/changeset/base/278408 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/9/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/9/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:18 2015 (r278407) +++ stable/9/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:26 2015 (r278408) @@ -112,12 +112,15 @@ 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, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -136,6 +139,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:49:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86584255; Sun, 8 Feb 2015 21:49: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 571B0F53; Sun, 8 Feb 2015 21:49: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 t18LnU4Y023369; Sun, 8 Feb 2015 21:49:30 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LnUqR023368; Sun, 8 Feb 2015 21:49:30 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082149.t18LnUqR023368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 21:49:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278409 - stable/8/sys/dev/uart X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:49:30 -0000 Author: marius Date: Sun Feb 8 21:49:29 2015 New Revision: 278409 URL: https://svnweb.freebsd.org/changeset/base/278409 Log: MFC: r266744, r267712, r276351, r277043 - Add PCI ID for AMT based serial interface found on the Lenovo T61. - add support for MosChip MCS9922... This is found on an ExpressCard.. [1] - Add PCI ID for the Oxford Semiconductor OXPCIe952 device. PR: 186891 [1] Modified: stable/8/sys/dev/uart/uart_bus_pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/uart/ (props changed) Modified: stable/8/sys/dev/uart/uart_bus_pci.c ============================================================================== --- stable/8/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:41:26 2015 (r278408) +++ stable/8/sys/dev/uart/uart_bus_pci.c Sun Feb 8 21:49:29 2015 (r278409) @@ -112,12 +112,15 @@ 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, 8 * DEFAULT_RCLK }, { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, +{ 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, { 0x8086, 0x3b67, 0xffff, 0, "5 Series/3400 Series Chipset KT Controller", 0x10 }, @@ -135,6 +138,8 @@ static const struct pci_id pci_ns8250_id "MosChip MCS9901 PCIe to Peripheral Controller", 0x10 }, { 0x9710, 0x9904, 0xa000, 0x1000, "MosChip MCS9904 PCIe to Peripheral Controller", 0x10 }, +{ 0x9710, 0x9922, 0xa000, 0x1000, + "MosChip MCS9922 PCIe to Peripheral Controller", 0x10 }, { 0xdeaf, 0x9051, 0xffff, 0, "Middle Digital PC Weasel Serial Port", 0x10 }, { 0xffff, 0, 0xffff, 0, NULL, 0, 0} }; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 21:58:27 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21427641; Sun, 8 Feb 2015 21:58: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 0C2DAD5; Sun, 8 Feb 2015 21:58: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 t18LwQfp028199; Sun, 8 Feb 2015 21:58:26 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18LwQb3028196; Sun, 8 Feb 2015 21:58:26 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082158.t18LwQb3028196@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 21:58:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278410 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 21:58:27 -0000 Author: jilles Date: Sun Feb 8 21:58:25 2015 New Revision: 278410 URL: https://svnweb.freebsd.org/changeset/base/278410 Log: MFC r277862: sem_post(): Fix and document semaphore value overflow error. The error code is per Austin Group issue #315. I provided different wording for the manual page change. Submitted by: pluknet Modified: stable/10/lib/libc/gen/sem_new.c stable/10/lib/libc/gen/sem_post.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/sem_new.c ============================================================================== --- stable/10/lib/libc/gen/sem_new.c Sun Feb 8 21:49:29 2015 (r278409) +++ stable/10/lib/libc/gen/sem_new.c Sun Feb 8 21:58:25 2015 (r278410) @@ -439,8 +439,10 @@ _sem_post(sem_t *sem) do { count = sem->_kern._count; - if (count + 1 > SEM_VALUE_MAX) - return (EOVERFLOW); + if (count + 1 > SEM_VALUE_MAX) { + errno = EOVERFLOW; + return (-1); + } } while(!atomic_cmpset_rel_int(&sem->_kern._count, count, count+1)); (void)usem_wake(&sem->_kern); return (0); Modified: stable/10/lib/libc/gen/sem_post.3 ============================================================================== --- stable/10/lib/libc/gen/sem_post.3 Sun Feb 8 21:49:29 2015 (r278409) +++ stable/10/lib/libc/gen/sem_post.3 Sun Feb 8 21:58:25 2015 (r278410) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 15, 2000 +.Dd January 28, 2015 .Dt SEM_POST 3 .Os .Sh NAME @@ -65,6 +65,9 @@ The .Fa sem argument points to an invalid semaphore. +.It Bq Er EOVERFLOW +The semaphore value would exceed +.Dv SEM_VALUE_MAX . .El .Sh SEE ALSO .Xr sem_getvalue 3 , From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:11:26 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81710944; Sun, 8 Feb 2015 22:11: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 6C812256; Sun, 8 Feb 2015 22:11: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 t18MBQlR036449; Sun, 8 Feb 2015 22:11:26 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MBPbC036444; Sun, 8 Feb 2015 22:11:25 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502082211.t18MBPbC036444@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sun, 8 Feb 2015 22:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278411 - stable/10/lib/libedit X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:11:26 -0000 Author: bapt Date: Sun Feb 8 22:11:24 2015 New Revision: 278411 URL: https://svnweb.freebsd.org/changeset/base/278411 Log: MFC: r265863 libedit: add H_SAVE_FP which saves history to a file pointer. H_SAVE_FP is similar to H_SAVE but operates on a FILE* instead of a filename. This is useful when operating in capability mode. Reviewed by: christos@NetBSD.org, pfg Modified: stable/10/lib/libedit/editline.3 stable/10/lib/libedit/hist.h stable/10/lib/libedit/histedit.h stable/10/lib/libedit/history.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libedit/editline.3 ============================================================================== --- stable/10/lib/libedit/editline.3 Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/editline.3 Sun Feb 8 22:11:24 2015 (r278411) @@ -682,6 +682,9 @@ Load the history list stored in .It Dv H_SAVE , Fa "const char *file" Save the history list to .Fa file . +.It Dv H_SAVE_FP , Fa "FILE*" +Save the history list to the opened +.Fa FILE* . .It Dv H_SETUNIQUE , Fa "int unique" Set flag that adjacent identical event strings should not be entered into the history. Modified: stable/10/lib/libedit/hist.h ============================================================================== --- stable/10/lib/libedit/hist.h Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/hist.h Sun Feb 8 22:11:24 2015 (r278411) @@ -65,6 +65,7 @@ typedef struct el_history_t { #define HIST_SET(el, num) HIST_FUN(el, H_SET, num) #define HIST_LOAD(el, fname) HIST_FUN(el, H_LOAD fname) #define HIST_SAVE(el, fname) HIST_FUN(el, H_SAVE fname) +#define HIST_SAVE_FP(el, fp) HIST_FUN(el, H_SAVE_FP fp) protected int hist_init(EditLine *); protected void hist_end(EditLine *); Modified: stable/10/lib/libedit/histedit.h ============================================================================== --- stable/10/lib/libedit/histedit.h Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/histedit.h Sun Feb 8 22:11:24 2015 (r278411) @@ -208,6 +208,7 @@ int history(History *, HistEvent *, int #define H_NEXT_EVDATA 23 /* , const int, histdata_t *); */ #define H_DELDATA 24 /* , int, histdata_t *);*/ #define H_REPLACE 25 /* , const char *, histdata_t); */ +#define H_SAVE_FP 26 /* , FILE*); */ /* Modified: stable/10/lib/libedit/history.c ============================================================================== --- stable/10/lib/libedit/history.c Sun Feb 8 21:58:25 2015 (r278410) +++ stable/10/lib/libedit/history.c Sun Feb 8 22:11:24 2015 (r278411) @@ -103,6 +103,7 @@ private int history_getunique(History *, private int history_set_fun(History *, History *); private int history_load(History *, const char *); private int history_save(History *, const char *); +private int history_save_fp(History *, FILE*); private int history_prev_event(History *, HistEvent *, int); private int history_next_event(History *, HistEvent *, int); private int history_next_string(History *, HistEvent *, const char *); @@ -773,22 +774,16 @@ done: return (i); } - -/* history_save(): - * History save function +/* history_save_fp(): + * History save with open FILE* */ -private int -history_save(History *h, const char *fname) +private int history_save_fp(History *h, FILE* fp) { - FILE *fp; HistEvent ev; int i = -1, retval; size_t len, max_size; char *ptr; - if ((fp = fopen(fname, "w")) == NULL) - return (-1); - if (fchmod(fileno(fp), S_IRUSR|S_IWUSR) == -1) goto done; if (fputs(hist_cookie, fp) == EOF) @@ -816,6 +811,26 @@ history_save(History *h, const char *fna oomem: h_free((ptr_t)ptr); done: + return (i); + +} + + +/* history_save(): + * History save function + */ +private int +history_save(History *h, const char *fname) +{ + FILE *fp; + int i; + + if ((fp = fopen(fname, "w")) == NULL) + return (-1); + + i = history_save_fp(h, fp); + +done: (void) fclose(fp); return (i); } @@ -1001,6 +1016,12 @@ history(History *h, HistEvent *ev, int f he_seterrev(ev, _HE_HIST_WRITE); break; + case H_SAVE_FP: + retval = history_save_fp(h, va_arg(va, FILE*)); + if (retval == -1) + he_seterrev(ev, _HE_HIST_WRITE); + break; + case H_PREV_EVENT: retval = history_prev_event(h, ev, va_arg(va, int)); break; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:17:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 683C9AD5; Sun, 8 Feb 2015 22:17:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53937287; Sun, 8 Feb 2015 22:17:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18MHLXa037704; Sun, 8 Feb 2015 22:17:21 GMT (envelope-from peter@FreeBSD.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MHLbh037703; Sun, 8 Feb 2015 22:17:21 GMT (envelope-from peter@FreeBSD.org) Message-Id: <201502082217.t18MHLbh037703@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: peter set sender to peter@FreeBSD.org using -f From: Peter Wemm Date: Sun, 8 Feb 2015 22:17:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278412 - stable/10/sys/ia64/ia64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:17:21 -0000 Author: peter Date: Sun Feb 8 22:17:20 2015 New Revision: 278412 URL: https://svnweb.freebsd.org/changeset/base/278412 Log: Repair ia64 build after r278347 - remove const from set_mcontext Modified: stable/10/sys/ia64/ia64/machdep.c Modified: stable/10/sys/ia64/ia64/machdep.c ============================================================================== --- stable/10/sys/ia64/ia64/machdep.c Sun Feb 8 22:11:24 2015 (r278411) +++ stable/10/sys/ia64/ia64/machdep.c Sun Feb 8 22:17:20 2015 (r278412) @@ -1262,7 +1262,7 @@ get_mcontext(struct thread *td, mcontext } int -set_mcontext(struct thread *td, const mcontext_t *mc) +set_mcontext(struct thread *td, mcontext_t *mc) { struct _special s; struct trapframe *tf; From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:24:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E8AADF1; Sun, 8 Feb 2015 22:24: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 6941436C; Sun, 8 Feb 2015 22:24: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 t18MO4VH042151; Sun, 8 Feb 2015 22:24:04 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MO4lF042148; Sun, 8 Feb 2015 22:24:04 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082224.t18MO4lF042148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:24:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278413 - in stable/10: contrib/netbsd-tests/lib/libc/gen lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:24:04 -0000 Author: jilles Date: Sun Feb 8 22:24:03 2015 New Revision: 278413 URL: https://svnweb.freebsd.org/changeset/base/278413 Log: MFC r278038: ttyname_r(): Return actual error, not always [ENOTTY]. Adjust the test that used to fail because of this bug. PR: 191936 Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c stable/10/lib/libc/gen/ttyname.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sun Feb 8 22:17:20 2015 (r278412) +++ stable/10/contrib/netbsd-tests/lib/libc/gen/t_ttyname.c Sun Feb 8 22:24:03 2015 (r278413) @@ -107,9 +107,6 @@ ATF_TC_BODY(ttyname_r_err, tc) ATF_REQUIRE(rv == ERANGE); } -#ifdef __FreeBSD__ - atf_tc_expect_fail("FreeBSD returns ENOTTY instead of EBADF; see bin/191936"); -#endif rv = ttyname_r(-1, buf, ttymax); ATF_REQUIRE(rv == EBADF); Modified: stable/10/lib/libc/gen/ttyname.c ============================================================================== --- stable/10/lib/libc/gen/ttyname.c Sun Feb 8 22:17:20 2015 (r278412) +++ stable/10/lib/libc/gen/ttyname.c Sun Feb 8 22:24:03 2015 (r278413) @@ -65,7 +65,7 @@ ttyname_r(int fd, char *buf, size_t len) /* Must be a terminal. */ if (!isatty(fd)) - return (ENOTTY); + return (errno); /* Must have enough room */ if (len <= sizeof(_PATH_DEV)) return (ERANGE); @@ -73,7 +73,7 @@ ttyname_r(int fd, char *buf, size_t len) strcpy(buf, _PATH_DEV); used = strlen(buf); if (fdevname_r(fd, buf + used, len - used) == NULL) - return (ENOTTY); + return (errno == EINVAL ? ERANGE : errno); return (0); } From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:27:18 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4981741F; Sun, 8 Feb 2015 22:27: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 348133D8; Sun, 8 Feb 2015 22:27: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 t18MRIXU042942; Sun, 8 Feb 2015 22:27:18 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MRItU042941; Sun, 8 Feb 2015 22:27:18 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082227.t18MRItU042941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:27:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278415 - stable/10/sys/dev/mwl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:27:18 -0000 Author: marius Date: Sun Feb 8 22:27:17 2015 New Revision: 278415 URL: https://svnweb.freebsd.org/changeset/base/278415 Log: MFC: r275870 Use the correct macro for listing the maximum bus space size. Modified: stable/10/sys/dev/mwl/if_mwl_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mwl/if_mwl_pci.c ============================================================================== --- stable/10/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:24:18 2015 (r278414) +++ stable/10/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:17 2015 (r278415) @@ -175,9 +175,9 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ MWL_TXDESC, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:27:25 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 519D0546; Sun, 8 Feb 2015 22:27: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 E29043DA; Sun, 8 Feb 2015 22: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 t18MROTE042998; Sun, 8 Feb 2015 22:27:24 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MROMP042997; Sun, 8 Feb 2015 22:27:24 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082227.t18MROMP042997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:27:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278416 - stable/9/sys/dev/mwl X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:27:25 -0000 Author: marius Date: Sun Feb 8 22:27:23 2015 New Revision: 278416 URL: https://svnweb.freebsd.org/changeset/base/278416 Log: MFC: r275870 Use the correct macro for listing the maximum bus space size. Modified: stable/9/sys/dev/mwl/if_mwl_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/mwl/if_mwl_pci.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:17 2015 (r278415) +++ stable/9/sys/dev/mwl/if_mwl_pci.c Sun Feb 8 22:27:23 2015 (r278416) @@ -175,9 +175,9 @@ mwl_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ MWL_TXDESC, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:29:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E1CF687; Sun, 8 Feb 2015 22:29: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 68FBE3E8; Sun, 8 Feb 2015 22:29: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 t18MT7GT043329; Sun, 8 Feb 2015 22:29:07 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MT7rm043328; Sun, 8 Feb 2015 22:29:07 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082229.t18MT7rm043328@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278417 - stable/10/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:29:07 -0000 Author: jilles Date: Sun Feb 8 22:29:06 2015 New Revision: 278417 URL: https://svnweb.freebsd.org/changeset/base/278417 Log: MFC r268857: ttyname(3): Fix EBADF/ENOTTY error descriptions. Also, make sure to document the return values and errors for all three functions in the man page. PR: 191931 Modified: stable/10/lib/libc/gen/ttyname.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/ttyname.3 ============================================================================== --- stable/10/lib/libc/gen/ttyname.3 Sun Feb 8 22:27:23 2015 (r278416) +++ stable/10/lib/libc/gen/ttyname.3 Sun Feb 8 22:29:06 2015 (r278417) @@ -28,7 +28,7 @@ .\" @(#)ttyname.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd May 14, 2005 +.Dd July 18, 2014 .Dt TTYNAME 3 .Os .Sh NAME @@ -76,6 +76,14 @@ function takes a buffer and length as arguments to avoid this problem. .Sh RETURN VALUES The +.Fn isatty +function returns 1 if +.Fa fd +refers to a terminal type device; +otherwise, it returns 0 and may set +.Va errno +to indicate the error. +The .Fn ttyname function returns the null terminated name if the device is found and @@ -89,15 +97,23 @@ The function returns 0 if successful. Otherwise an error number is returned. .Sh ERRORS -The -.Fn ttyname_r -may fail and return the following error codes: +These functions may fail if: .Bl -tag -width Er -.It Bq Er ENOTTY +.It Bq Er EBADF The .Fa fd argument is not a valid file descriptor. +.It Bq Er ENOTTY +The file associated with +.Fa fd +is not a terminal. +.El +.Pp +Additionally, +.Fn ttyname_r +may fail if: +.Bl -tag -width Er .It Bq Er ERANGE The .Fa bufsize From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:29:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E58A87C8; Sun, 8 Feb 2015 22:29: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 D0DB13F3; Sun, 8 Feb 2015 22:29: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 t18MTvSt043495; Sun, 8 Feb 2015 22:29:57 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MTvKZ043494; Sun, 8 Feb 2015 22:29:57 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082229.t18MTvKZ043494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278418 - stable/10/sys/dev/malo X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:29:58 -0000 Author: marius Date: Sun Feb 8 22:29:57 2015 New Revision: 278418 URL: https://svnweb.freebsd.org/changeset/base/278418 Log: MFC: r275871 Update the use of bus space macros to be more correct. Modified: stable/10/sys/dev/malo/if_malo_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/malo/if_malo_pci.c ============================================================================== --- stable/10/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:29:06 2015 (r278417) +++ stable/10/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:29:57 2015 (r278418) @@ -223,9 +223,9 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ 0, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:30:13 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13D9990E; Sun, 8 Feb 2015 22:30: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 F31EA3FD; Sun, 8 Feb 2015 22:30: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 t18MUCqc044309; Sun, 8 Feb 2015 22:30:12 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MUClF044308; Sun, 8 Feb 2015 22:30:12 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082230.t18MUClF044308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 22:30:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278419 - stable/9/sys/dev/malo X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:30:13 -0000 Author: marius Date: Sun Feb 8 22:30:12 2015 New Revision: 278419 URL: https://svnweb.freebsd.org/changeset/base/278419 Log: MFC: r275871 Update the use of bus space macros to be more correct. Modified: stable/9/sys/dev/malo/if_malo_pci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/malo/if_malo_pci.c ============================================================================== --- stable/9/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:29:57 2015 (r278418) +++ stable/9/sys/dev/malo/if_malo_pci.c Sun Feb 8 22:30:12 2015 (r278419) @@ -223,9 +223,9 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - BUS_SPACE_MAXADDR, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ 0, /* nsegments */ - BUS_SPACE_MAXADDR, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:46:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C1285E0A; Sun, 8 Feb 2015 22:46: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 AC5DF7D5; Sun, 8 Feb 2015 22:46: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 t18MkU13052961; Sun, 8 Feb 2015 22:46:30 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MkUss052960; Sun, 8 Feb 2015 22:46:30 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082246.t18MkUss052960@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:46:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278420 - stable/10/bin/ln X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:46:30 -0000 Author: jilles Date: Sun Feb 8 22:46:29 2015 New Revision: 278420 URL: https://svnweb.freebsd.org/changeset/base/278420 Log: MFC r276359: symlink(7): Note that stat(1) does not follow symlinks by default. Modified: stable/10/bin/ln/symlink.7 Directory Properties: stable/10/ (props changed) Modified: stable/10/bin/ln/symlink.7 ============================================================================== --- stable/10/bin/ln/symlink.7 Sun Feb 8 22:30:12 2015 (r278419) +++ stable/10/bin/ln/symlink.7 Sun Feb 8 22:46:29 2015 (r278420) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd December 29, 2014 .Dt SYMLINK 7 .Os .Sh NAME @@ -219,7 +219,7 @@ would change the ownership of .Dq Li slink itself. .Pp -There are four exceptions to this rule. +There are five exceptions to this rule. The .Xr mv 1 and @@ -262,13 +262,12 @@ a file tree.) .Pp The .Xr file 1 -command is also an exception to this rule. -The -.Xr file 1 -command does not follow symbolic links named as argument by default. -The -.Xr file 1 -command does follow symbolic links named as argument if +and +.Xr stat 1 +commands are also exceptions to this rule. +These +commands do not follow symbolic links named as argument by default, +but do follow symbolic links named as argument if the .Fl L option is specified. .Pp From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 22:47:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BBEEF44; Sun, 8 Feb 2015 22:47: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 56D0F7DE; Sun, 8 Feb 2015 22:47: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 t18MlZRT053148; Sun, 8 Feb 2015 22:47:35 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18MlZrV053147; Sun, 8 Feb 2015 22:47:35 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201502082247.t18MlZrV053147@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 8 Feb 2015 22:47:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278421 - stable/9/bin/ln X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 22:47:35 -0000 Author: jilles Date: Sun Feb 8 22:47:34 2015 New Revision: 278421 URL: https://svnweb.freebsd.org/changeset/base/278421 Log: MFC r276359: symlink(7): Note that stat(1) does not follow symlinks by default. Modified: stable/9/bin/ln/symlink.7 Directory Properties: stable/9/bin/ln/ (props changed) Modified: stable/9/bin/ln/symlink.7 ============================================================================== --- stable/9/bin/ln/symlink.7 Sun Feb 8 22:46:29 2015 (r278420) +++ stable/9/bin/ln/symlink.7 Sun Feb 8 22:47:34 2015 (r278421) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd April 25, 2010 +.Dd December 29, 2014 .Dt SYMLINK 7 .Os .Sh NAME @@ -219,7 +219,7 @@ would change the ownership of .Dq Li slink itself. .Pp -There are four exceptions to this rule. +There are five exceptions to this rule. The .Xr mv 1 and @@ -262,13 +262,12 @@ a file tree.) .Pp The .Xr file 1 -command is also an exception to this rule. -The -.Xr file 1 -command does not follow symbolic links named as argument by default. -The -.Xr file 1 -command does follow symbolic links named as argument if +and +.Xr stat 1 +commands are also exceptions to this rule. +These +commands do not follow symbolic links named as argument by default, +but do follow symbolic links named as argument if the .Fl L option is specified. .Pp From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 23:04:33 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 365037B1; Sun, 8 Feb 2015 23:04:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 21A629B6; Sun, 8 Feb 2015 23:04:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t18N4XQL062504; Sun, 8 Feb 2015 23:04:33 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18N4W9P062503; Sun, 8 Feb 2015 23:04:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082304.t18N4W9P062503@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 23:04:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278423 - stable/10/sys/i386/xen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 23:04:33 -0000 Author: marius Date: Sun Feb 8 23:04:32 2015 New Revision: 278423 URL: https://svnweb.freebsd.org/changeset/base/278423 Log: MFC: r274054 (missed in r276076) Fix XEN kernel build. Modified: stable/10/sys/i386/xen/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/10/sys/i386/xen/mp_machdep.c Sun Feb 8 23:03:41 2015 (r278422) +++ stable/10/sys/i386/xen/mp_machdep.c Sun Feb 8 23:04:32 2015 (r278423) @@ -604,7 +604,7 @@ init_secondary(void) #endif /* set up FPU state on the AP */ - npxinit(); + npxinit(false); #if 0 /* A quick check from sanity claus */ if (PCPU_GET(apic_id) != lapic_id()) { From owner-svn-src-stable@FreeBSD.ORG Sun Feb 8 23:09:02 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23990B65; Sun, 8 Feb 2015 23:09: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 0EE869FC; Sun, 8 Feb 2015 23:09: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 t18N91Oo063218; Sun, 8 Feb 2015 23:09:01 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t18N91ZN063215; Sun, 8 Feb 2015 23:09:01 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502082309.t18N91ZN063215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 8 Feb 2015 23:09:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278424 - stable/10/sys/i386/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Feb 2015 23:09:02 -0000 Author: marius Date: Sun Feb 8 23:09:01 2015 New Revision: 278424 URL: https://svnweb.freebsd.org/changeset/base/278424 Log: MFC: r276377, r276714 - No longer exclude malo(4) and mwl(4), they have been fixed in r275870 (MFCed to stable/10 in r278415) and r275871 (MFCed to stable/10 in r278416) respectively to build with PAE enabled. - For the PAE kernel configuration file, no longer exclude devices that are known to be 64-bit DMA clean from amd64. Modified: stable/10/sys/i386/conf/PAE stable/10/sys/i386/conf/XEN Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/i386/conf/PAE ============================================================================== --- stable/10/sys/i386/conf/PAE Sun Feb 8 23:04:32 2015 (r278423) +++ stable/10/sys/i386/conf/PAE Sun Feb 8 23:09:01 2015 (r278424) @@ -10,77 +10,14 @@ ident PAE-GENERIC # To make a PAE kernel, the next option is needed options PAE # Physical Address Extensions Kernel -# The following modules don't build with PAE enabled. -makeoptions WITHOUT_MODULES="ctl dpt hptmv ida malo mwl" - -# force isp firmware to fully loaded -device ispfw - -# What follows is a list of drivers that are normally in GENERIC, but either -# don't work or are untested with PAE. Be very careful before enabling any -# of these drivers. Drivers which use DMA and don't handle 64 bit physical -# address properly may cause data corruption when used in a machine with more -# than 4 gigabytes of memory. - -nodevice ahb -nodevice sym -nodevice trm - -nodevice adv -nodevice adw -nodevice aha -nodevice aic -nodevice bt - -nodevice ncv -nodevice nsp -nodevice stg - -nodevice asr +# The following drivers don't build with PAE enabled. +makeoptions WITHOUT_MODULES="ctl dpt hptmv ida" nodevice dpt -nodevice mly nodevice hptmv -nodevice hptnr -nodevice hptrr - nodevice ida -nodevice mlx -nodevice pst - -nodevice agp - -nodevice txp -nodevice vx - -nodevice nve -nodevice pcn -nodevice sf -nodevice sis -nodevice ste -nodevice tl -nodevice tx -nodevice vr -nodevice wb -nodevice cs -nodevice ed -nodevice ex -nodevice ep -nodevice fe -nodevice ie -nodevice sn -nodevice xe - -nodevice an -nodevice ath # Atheros pci/cardbus NICs -nodevice ath_pci -nodevice ath_hal -nodevice ath_rate_sample # SampleRate tx rate control for ath -nodevice ipw -nodevice iwi -nodevice iwn -nodevice malo -nodevice mwl -nodevice ral -nodevice wi -nodevice wpi +# The following drivers don't work with PAE enabled. +makeoptions WITHOUT_MODULES+="asr ncr pst" +nodevice asr +nodevice ncr +nodevice pst Modified: stable/10/sys/i386/conf/XEN ============================================================================== --- stable/10/sys/i386/conf/XEN Sun Feb 8 23:04:32 2015 (r278423) +++ stable/10/sys/i386/conf/XEN Sun Feb 8 23:09:01 2015 (r278424) @@ -8,8 +8,11 @@ ident XEN makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -# The following modules don't build with PAE and XEN enabled. -makeoptions WITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida malo mwl rdma" +# The following drivers don't build with PAE or XEN enabled. +makeoptions WITHOUT_MODULES="ctl cxgb dpt drm drm2 hptmv ida rdma" + +# The following drivers don't work with PAE enabled. +makeoptions WITHOUT_MODULES+="asr ncr pst" options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 02:49:12 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02842A7E; Mon, 9 Feb 2015 02:49:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4FA33CC; Mon, 9 Feb 2015 02: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 t192nBJZ066693; Mon, 9 Feb 2015 02:49:11 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t192nBIa066691; Mon, 9 Feb 2015 02:49:11 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502090249.t192nBIa066691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Mon, 9 Feb 2015 02:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278432 - in stable/10/sys/arm/ti: . am335x X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 02:49:12 -0000 Author: rpaulo Date: Mon Feb 9 02:49:10 2015 New Revision: 278432 URL: https://svnweb.freebsd.org/changeset/base/278432 Log: MFC r277958, r278061: ti_pruss: make sure the mmap'ed memory region is uncacheable. am335x_clk_pruss_activate(): use the L3F clock. Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c stable/10/sys/arm/ti/ti_pruss.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/ti/am335x/am335x_prcm.c ============================================================================== --- stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 9 02:31:27 2015 (r278431) +++ stable/10/sys/arm/ti/am335x/am335x_prcm.c Mon Feb 9 02:49:10 2015 (r278432) @@ -502,7 +502,7 @@ am335x_clk_gpio_activate(struct ti_clock /* set *_CLKCTRL register MODULEMODE[1:0] to enable(2) */ /* set *_CLKCTRL register OPTFCLKEN_GPIO_1_G DBCLK[18] to FCLK_EN(1) */ prcm_write_4(clk_details->clkctrl_reg, 2 | (1 << 18)); - while ((prcm_read_4(clk_details->clkctrl_reg) & + while ((prcm_read_4(clk_details->clkctrl_reg) & (3 | (1 << 18) )) != (2 | (1 << 18))) DELAY(10); @@ -724,11 +724,11 @@ am335x_clk_lcdc_activate(struct ti_clock prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x4); /* Make sure it's in bypass mode */ - while (!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) + while (!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) & (1 << 8))) DELAY(10); - /* + /* * For now set frequency to 5xSYSFREQ * More flexible control might be required */ @@ -738,7 +738,7 @@ am335x_clk_lcdc_activate(struct ti_clock prcm_write_4(CM_WKUP_CM_CLKMODE_DPLL_DISP, 0x7); int timeout = 10000; - while ((!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) + while ((!(prcm_read_4(CM_WKUP_CM_IDLEST_DPLL_DISP) & (1 << 0))) && timeout--) DELAY(10); @@ -786,9 +786,9 @@ am335x_clk_pruss_activate(struct ti_cloc while ((prcm_read_4(CM_PER_PRUSS_CLKSTCTRL) & (1<<6)) == 0) DELAY(10); - /* Select DISP DPLL as OCP clock */ - prcm_write_4(CLKSEL_PRUSS_OCP_CLK, 1); - while ((prcm_read_4(CLKSEL_PRUSS_OCP_CLK) & 0x3) != 1) + /* Select L3F as OCP clock */ + prcm_write_4(CLKSEL_PRUSS_OCP_CLK, 0); + while ((prcm_read_4(CLKSEL_PRUSS_OCP_CLK) & 0x3) != 0) DELAY(10); /* Clear the RESET bit */ Modified: stable/10/sys/arm/ti/ti_pruss.c ============================================================================== --- stable/10/sys/arm/ti/ti_pruss.c Mon Feb 9 02:31:27 2015 (r278431) +++ stable/10/sys/arm/ti/ti_pruss.c Mon Feb 9 02:49:10 2015 (r278432) @@ -259,6 +259,7 @@ ti_pruss_mmap(struct cdev *cdev, vm_ooff if (offset > rman_get_size(sc->sc_mem_res)) return (-1); *paddr = rman_get_start(sc->sc_mem_res) + offset; + *memattr = VM_MEMATTR_UNCACHEABLE; return (0); } From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 07:45:48 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D113782; Mon, 9 Feb 2015 07:45: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 ECE1C796; Mon, 9 Feb 2015 07:45: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 t197jlp5081219; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197jleb081218; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090745.t197jleb081218@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278435 - in stable: 10/sys/fs/smbfs 9/sys/fs/smbfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:45:48 -0000 Author: dim Date: Mon Feb 9 07:45:46 2015 New Revision: 278435 URL: https://svnweb.freebsd.org/changeset/base/278435 Log: MFC r277953: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. Modified: stable/10/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/fs/smbfs/smbfs_subr.c ============================================================================== --- stable/10/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:08:54 2015 (r278434) +++ stable/10/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:45:46 2015 (r278435) @@ -170,8 +170,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp->vc_tolocal, (const char **)&ibuf, &ilen, &obuf, &olen, copt); + error = iconv_conv_case(vcp->vc_tolocal, + __DECONST(const char **, &ibuf), &ilen, &obuf, &olen, copt); if (error && SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 07:45:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68934781; Mon, 9 Feb 2015 07:45: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 54200795; Mon, 9 Feb 2015 07:45: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 t197jlSh081213; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197jlLL081212; Mon, 9 Feb 2015 07:45:47 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090745.t197jlLL081212@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278435 - in stable: 10/sys/fs/smbfs 9/sys/fs/smbfs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:45:47 -0000 Author: dim Date: Mon Feb 9 07:45:46 2015 New Revision: 278435 URL: https://svnweb.freebsd.org/changeset/base/278435 Log: MFC r277953: Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No functional change. Modified: stable/9/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/fs/smbfs/smbfs_subr.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/fs/smbfs/smbfs_subr.c ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:08:54 2015 (r278434) +++ stable/9/sys/fs/smbfs/smbfs_subr.c Mon Feb 9 07:45:46 2015 (r278435) @@ -202,8 +202,8 @@ smbfs_fname_tolocal(struct smb_vc *vcp, if (error) return error; */ - error = iconv_conv_case - (vcp->vc_tolocal, (const char **)&ibuf, &ilen, &obuf, &olen, copt); + error = iconv_conv_case(vcp->vc_tolocal, + __DECONST(const char **, &ibuf), &ilen, &obuf, &olen, copt); if (error && SMB_UNICODE_STRINGS(vcp)) { /* * If using unicode, leaving a file name as it was when From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 07:49:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 885DDAB2; Mon, 9 Feb 2015 07:49: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 7423A7D2; Mon, 9 Feb 2015 07:49: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 t197ng1r081756; Mon, 9 Feb 2015 07:49:42 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197ngK7081755; Mon, 9 Feb 2015 07:49:42 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090749.t197ngK7081755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:49:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278436 - in stable: 10/sys/sys 9/sys/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:49:42 -0000 Author: dim Date: Mon Feb 9 07:49:41 2015 New Revision: 278436 URL: https://svnweb.freebsd.org/changeset/base/278436 Log: MFC r278222: Mark typedefs for manually implementing _Static_assert() as unused, so they won't show up unecessarily for -Wunused-local-typedefs. Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/sys/cdefs.h ============================================================================== --- stable/10/sys/sys/cdefs.h Mon Feb 9 07:45:46 2015 (r278435) +++ stable/10/sys/sys/cdefs.h Mon Feb 9 07:49:41 2015 (r278436) @@ -289,7 +289,8 @@ #elif defined(__COUNTER__) #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define _Static_assert(x, y) struct __hack #endif From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 07:49:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 14F6AAB1; Mon, 9 Feb 2015 07:49: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 008F17D1; Mon, 9 Feb 2015 07:49: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 t197nfvD081749; Mon, 9 Feb 2015 07:49:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197nfvI081748; Mon, 9 Feb 2015 07:49:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090749.t197nfvI081748@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278436 - in stable: 10/sys/sys 9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:49:42 -0000 Author: dim Date: Mon Feb 9 07:49:41 2015 New Revision: 278436 URL: https://svnweb.freebsd.org/changeset/base/278436 Log: MFC r278222: Mark typedefs for manually implementing _Static_assert() as unused, so they won't show up unecessarily for -Wunused-local-typedefs. Modified: stable/9/sys/sys/cdefs.h Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/sys/cdefs.h Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/sys/cdefs.h ============================================================================== --- stable/9/sys/sys/cdefs.h Mon Feb 9 07:45:46 2015 (r278435) +++ stable/9/sys/sys/cdefs.h Mon Feb 9 07:49:41 2015 (r278436) @@ -250,7 +250,8 @@ #ifdef __COUNTER__ #define _Static_assert(x, y) __Static_assert(x, __COUNTER__) #define __Static_assert(x, y) ___Static_assert(x, y) -#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] +#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \ + __unused #else #define _Static_assert(x, y) struct __hack #endif From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 07:52:46 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F1C3FD31; Mon, 9 Feb 2015 07:52: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 C3625882; Mon, 9 Feb 2015 07:52: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 t197qjRH085594; Mon, 9 Feb 2015 07:52:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197qjxK085593; Mon, 9 Feb 2015 07:52:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090752.t197qjxK085593@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:52:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278437 - in stable: 10/usr.sbin/syslogd 9/usr.sbin/syslogd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:52:46 -0000 Author: dim Date: Mon Feb 9 07:52:45 2015 New Revision: 278437 URL: https://svnweb.freebsd.org/changeset/base/278437 Log: MFC r278297: Fix two clang 3.6.0 warnings in usr.sbin/syslogd: usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f->f_prevline && !strcmp(msg, f->f_prevline) && ~~~^~~~~~~~~~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f->f_prevline) { ~~ ~~~^~~~~~~~~~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D1716 Modified: stable/9/usr.sbin/syslogd/syslogd.c Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Changes in other areas also in this revision: Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Modified: stable/9/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/9/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:49:41 2015 (r278436) +++ stable/9/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:52:45 2015 (r278437) @@ -1019,7 +1019,7 @@ logmsg(int pri, const char *msg, const c */ if (no_compress - (f->f_type != F_PIPE) < 1 && (flags & MARK) == 0 && msglen == f->f_prevlen && - f->f_prevline && !strcmp(msg, f->f_prevline) && + !strcmp(msg, f->f_prevline) && !strcasecmp(from, f->f_prevhost)) { (void)strlcpy(f->f_lasttime, timestamp, sizeof(f->f_lasttime)); @@ -1174,11 +1174,9 @@ fprintlog(struct filed *f, int flags, co v->iov_base = repbuf; v->iov_len = snprintf(repbuf, sizeof repbuf, "last message repeated %d times", f->f_prevcount); - } else if (f->f_prevline) { + } else { v->iov_base = f->f_prevline; v->iov_len = f->f_prevlen; - } else { - return; } v++; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 07:52:46 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7B39CD32; Mon, 9 Feb 2015 07:52: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 4D05D883; Mon, 9 Feb 2015 07:52: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 t197qkNO085600; Mon, 9 Feb 2015 07:52:46 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t197qkJv085599; Mon, 9 Feb 2015 07:52:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502090752.t197qkJv085599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Mon, 9 Feb 2015 07:52:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278437 - in stable: 10/usr.sbin/syslogd 9/usr.sbin/syslogd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 07:52:46 -0000 Author: dim Date: Mon Feb 9 07:52:45 2015 New Revision: 278437 URL: https://svnweb.freebsd.org/changeset/base/278437 Log: MFC r278297: Fix two clang 3.6.0 warnings in usr.sbin/syslogd: usr.sbin/syslogd/syslogd.c:1023:10: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] f->f_prevline && !strcmp(msg, f->f_prevline) && ~~~^~~~~~~~~~ usr.sbin/syslogd/syslogd.c:1178:16: error: address of array 'f->f_prevline' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion] } else if (f->f_prevline) { ~~ ~~~^~~~~~~~~~ In both cases, the f_prevline field of struct filed is a char array, so it can never be null. Remove the checks. Reviewed by: jilles Differential Revision: https://reviews.freebsd.org/D1716 Modified: stable/10/usr.sbin/syslogd/syslogd.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/usr.sbin/syslogd/syslogd.c Directory Properties: stable/9/usr.sbin/syslogd/ (props changed) Modified: stable/10/usr.sbin/syslogd/syslogd.c ============================================================================== --- stable/10/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:49:41 2015 (r278436) +++ stable/10/usr.sbin/syslogd/syslogd.c Mon Feb 9 07:52:45 2015 (r278437) @@ -1020,7 +1020,7 @@ logmsg(int pri, const char *msg, const c */ if (no_compress - (f->f_type != F_PIPE) < 1 && (flags & MARK) == 0 && msglen == f->f_prevlen && - f->f_prevline && !strcmp(msg, f->f_prevline) && + !strcmp(msg, f->f_prevline) && !strcasecmp(from, f->f_prevhost)) { (void)strlcpy(f->f_lasttime, timestamp, sizeof(f->f_lasttime)); @@ -1175,11 +1175,9 @@ fprintlog(struct filed *f, int flags, co v->iov_base = repbuf; v->iov_len = snprintf(repbuf, sizeof repbuf, "last message repeated %d times", f->f_prevcount); - } else if (f->f_prevline) { + } else { v->iov_base = f->f_prevline; v->iov_len = f->f_prevlen; - } else { - return; } v++; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 09:08:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA79226D; Mon, 9 Feb 2015 09:08: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 BCB1ADE; Mon, 9 Feb 2015 09:08: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 t1998u7Z019393; Mon, 9 Feb 2015 09:08:56 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1998ujP019392; Mon, 9 Feb 2015 09:08:56 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502090908.t1998ujP019392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Feb 2015 09:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278439 - stable/10/sys/dev/iscsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:08:57 -0000 Author: mav Date: Mon Feb 9 09:08:55 2015 New Revision: 278439 URL: https://svnweb.freebsd.org/changeset/base/278439 Log: MFC r278098, r278099: Add some fields and constants from RFC7144. Modified: stable/10/sys/dev/iscsi/iscsi_proto.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/iscsi/iscsi_proto.h ============================================================================== --- stable/10/sys/dev/iscsi/iscsi_proto.h Mon Feb 9 07:56:50 2015 (r278438) +++ stable/10/sys/dev/iscsi/iscsi_proto.h Mon Feb 9 09:08:55 2015 (r278439) @@ -115,7 +115,9 @@ struct iscsi_bhs_scsi_response { uint8_t bhssr_status; uint8_t bhssr_total_ahs_len; uint8_t bhssr_data_segment_len[3]; - uint64_t bhssr_reserved; + uint16_t bhssr_status_qualifier; + uint16_t bhssr_reserved; + uint32_t bhssr_reserved2; uint32_t bhssr_initiator_task_tag; uint32_t bhssr_snack_tag; uint32_t bhssr_statsn; @@ -135,6 +137,10 @@ CTASSERT(sizeof(struct iscsi_bhs_scsi_re #define BHSTMR_FUNCTION_TARGET_WARM_RESET 6 #define BHSTMR_FUNCTION_TARGET_COLD_RESET 7 #define BHSTMR_FUNCTION_TASK_REASSIGN 8 +#define BHSTMR_FUNCTION_QUERY_TASK 9 +#define BHSTMR_FUNCTION_QUERY_TASK_SET 10 +#define BHSTMR_FUNCTION_I_T_NEXUS_RESET 11 +#define BHSTMR_FUNCTION_QUERY_ASYNC_EVENT 12 struct iscsi_bhs_task_management_request { uint8_t bhstmr_opcode; @@ -154,7 +160,14 @@ struct iscsi_bhs_task_management_request CTASSERT(sizeof(struct iscsi_bhs_task_management_request) == ISCSI_BHS_SIZE); #define BHSTMR_RESPONSE_FUNCTION_COMPLETE 0 +#define BHSTMR_RESPONSE_TASK_DOES_NOT_EXIST 1 +#define BHSTMR_RESPONSE_LUN_DOES_NOT_EXIST 2 +#define BHSTMR_RESPONSE_TASK_STILL_ALLEGIANT 3 +#define BHSTMR_RESPONSE_TASK_ALL_REASS_NOT_SUPP 4 #define BHSTMR_RESPONSE_FUNCTION_NOT_SUPPORTED 5 +#define BHSTMR_RESPONSE_FUNCTION_AUTH_FAIL 6 +#define BHSTMR_RESPONSE_FUNCTION_SUCCEEDED 7 +#define BHSTMR_RESPONSE_FUNCTION_REJECTED 255 struct iscsi_bhs_task_management_response { uint8_t bhstmr_opcode; @@ -163,7 +176,8 @@ struct iscsi_bhs_task_management_respons uint8_t bhstmr_reserved; uint8_t bhstmr_total_ahs_len; uint8_t bhstmr_data_segment_len[3]; - uint64_t bhstmr_reserved2; + uint8_t bhstmr_additional_reponse_information[3]; + uint8_t bhstmr_reserved2[5]; uint32_t bhstmr_initiator_task_tag; uint32_t bhstmr_reserved3; uint32_t bhstmr_statsn; From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 09:10:48 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 28C313D9; Mon, 9 Feb 2015 09:10: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 0A213194; Mon, 9 Feb 2015 09:10: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 t199All5020202; Mon, 9 Feb 2015 09:10:47 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199Al6I020193; Mon, 9 Feb 2015 09:10:47 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502090910.t199Al6I020193@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Feb 2015 09:10:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278440 - in stable/10/sys/cam: . scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:10:48 -0000 Author: mav Date: Mon Feb 9 09:10:46 2015 New Revision: 278440 URL: https://svnweb.freebsd.org/changeset/base/278440 Log: MFC r278111: Retry indefinitely on SCSI BUSY status from VMware disks and CDs. VMware returns BUSY status when storage has transient connectivity issues. It is often better to wait and let VM admin fix the problem then crash. Modified: stable/10/sys/cam/cam.h stable/10/sys/cam/cam_periph.c stable/10/sys/cam/scsi/scsi_cd.c stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/cam.h ============================================================================== --- stable/10/sys/cam/cam.h Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/cam.h Mon Feb 9 09:10:46 2015 (r278440) @@ -125,7 +125,8 @@ enum { SF_QUIET_IR = 0x04, /* Be quiet about Illegal Request reponses */ SF_PRINT_ALWAYS = 0x08, /* Always print error status. */ SF_NO_RECOVERY = 0x10, /* Don't do active error recovery. */ - SF_NO_RETRY = 0x20 /* Don't do any retries. */ + SF_NO_RETRY = 0x20, /* Don't do any retries. */ + SF_RETRY_BUSY = 0x40 /* Retry BUSY status. */ }; /* CAM Status field values */ Modified: stable/10/sys/cam/cam_periph.c ============================================================================== --- stable/10/sys/cam/cam_periph.c Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/cam_periph.c Mon Feb 9 09:10:46 2015 (r278440) @@ -1359,8 +1359,8 @@ camperiphscsistatuserror(union ccb *ccb, * Restart the queue after either another * command completes or a 1 second timeout. */ - if (ccb->ccb_h.retry_count > 0) { - ccb->ccb_h.retry_count--; + if ((sense_flags & SF_RETRY_BUSY) != 0 || + (ccb->ccb_h.retry_count--) > 0) { error = ERESTART; *relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT | RELSIM_RELEASE_AFTER_CMDCMPLT; Modified: stable/10/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:10:46 2015 (r278440) @@ -87,14 +87,16 @@ typedef enum { CD_Q_NONE = 0x00, CD_Q_NO_TOUCH = 0x01, CD_Q_BCD_TRACKS = 0x02, - CD_Q_10_BYTE_ONLY = 0x10 + CD_Q_10_BYTE_ONLY = 0x10, + CD_Q_RETRY_BUSY = 0x40 } cd_quirks; #define CD_Q_BIT_STRING \ "\020" \ "\001NO_TOUCH" \ "\002BCD_TRACKS" \ - "\00510_BYTE_ONLY" + "\00510_BYTE_ONLY" \ + "\007RETRY_BUSY" typedef enum { CD_FLAG_INVALID = 0x0001, @@ -189,6 +191,14 @@ static struct cd_quirk_entry cd_quirk_ta { { T_CDROM, SIP_MEDIA_REMOVABLE, "CHINON", "CD-ROM CDS-535","*"}, /* quirks */ CD_Q_BCD_TRACKS + }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_CDROM, SIP_MEDIA_REMOVABLE, "NECVMWar", "VMware IDE CDR10", "*"}, + /*quirks*/ CD_Q_RETRY_BUSY } }; @@ -2584,6 +2594,9 @@ cderror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & CD_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return (cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Mon Feb 9 09:08:55 2015 (r278439) +++ stable/10/sys/cam/scsi/scsi_da.c Mon Feb 9 09:10:46 2015 (r278440) @@ -101,7 +101,8 @@ typedef enum { DA_Q_NO_PREVENT = 0x04, DA_Q_4K = 0x08, DA_Q_NO_RC16 = 0x10, - DA_Q_NO_UNMAP = 0x20 + DA_Q_NO_UNMAP = 0x20, + DA_Q_RETRY_BUSY = 0x40 } da_quirks; #define DA_Q_BIT_STRING \ @@ -110,7 +111,9 @@ typedef enum { "\002NO_6_BYTE" \ "\003NO_PREVENT" \ "\0044K" \ - "\005NO_RC16" + "\005NO_RC16" \ + "\006NO_UNMAP" \ + "\007RETRY_BUSY" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -359,6 +362,14 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, + /*quirks*/ DA_Q_RETRY_BUSY + }, /* USB mass storage devices supported by umass(4) */ { /* @@ -3627,6 +3638,9 @@ daerror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & DA_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return(cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 09:14:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2444565; Mon, 9 Feb 2015 09:14: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 B316D1C5; Mon, 9 Feb 2015 09:14: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 t199EODi023648; Mon, 9 Feb 2015 09:14:24 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199ENJV023644; Mon, 9 Feb 2015 09:14:23 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502090914.t199ENJV023644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 9 Feb 2015 09:14:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278441 - in stable/9/sys/cam: . scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:14:24 -0000 Author: mav Date: Mon Feb 9 09:14:22 2015 New Revision: 278441 URL: https://svnweb.freebsd.org/changeset/base/278441 Log: MFC r278111: Retry indefinitely on SCSI BUSY status from VMware disks and CDs. VMware returns BUSY status when storage has transient connectivity issues. It is often better to wait and let VM admin fix the problem then crash. Modified: stable/9/sys/cam/cam.h stable/9/sys/cam/cam_periph.c stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam.h ============================================================================== --- stable/9/sys/cam/cam.h Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/cam.h Mon Feb 9 09:14:22 2015 (r278441) @@ -115,7 +115,8 @@ enum { SF_QUIET_IR = 0x04, /* Be quiet about Illegal Request reponses */ SF_PRINT_ALWAYS = 0x08, /* Always print error status. */ SF_NO_RECOVERY = 0x10, /* Don't do active error recovery. */ - SF_NO_RETRY = 0x20 /* Don't do any retries. */ + SF_NO_RETRY = 0x20, /* Don't do any retries. */ + SF_RETRY_BUSY = 0x40 /* Retry BUSY status. */ }; /* CAM Status field values */ Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/cam_periph.c Mon Feb 9 09:14:22 2015 (r278441) @@ -1366,8 +1366,8 @@ camperiphscsistatuserror(union ccb *ccb, * Restart the queue after either another * command completes or a 1 second timeout. */ - if (ccb->ccb_h.retry_count > 0) { - ccb->ccb_h.retry_count--; + if ((sense_flags & SF_RETRY_BUSY) != 0 || + (ccb->ccb_h.retry_count--) > 0) { error = ERESTART; *relsim_flags = RELSIM_RELEASE_AFTER_TIMEOUT | RELSIM_RELEASE_AFTER_CMDCMPLT; Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/scsi/scsi_cd.c Mon Feb 9 09:14:22 2015 (r278441) @@ -89,7 +89,8 @@ typedef enum { CD_Q_BCD_TRACKS = 0x02, CD_Q_NO_CHANGER = 0x04, CD_Q_CHANGER = 0x08, - CD_Q_10_BYTE_ONLY = 0x10 + CD_Q_10_BYTE_ONLY = 0x10, + CD_Q_RETRY_BUSY = 0x40 } cd_quirks; #define CD_Q_BIT_STRING \ @@ -98,7 +99,8 @@ typedef enum { "\002BCD_TRACKS" \ "\003NO_CHANGER" \ "\004CHANGER" \ - "\00510_BYTE_ONLY" + "\00510_BYTE_ONLY" \ + "\007RETRY_BUSY" typedef enum { CD_FLAG_INVALID = 0x0001, @@ -224,6 +226,14 @@ static struct cd_quirk_entry cd_quirk_ta { { T_CDROM, SIP_MEDIA_REMOVABLE, "CHINON", "CD-ROM CDS-535","*"}, /* quirks */ CD_Q_BCD_TRACKS + }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_CDROM, SIP_MEDIA_REMOVABLE, "NECVMWar", "VMware IDE CDR10", "*"}, + /*quirks*/ CD_Q_RETRY_BUSY } }; @@ -3275,6 +3285,9 @@ cderror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & CD_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return (cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Mon Feb 9 09:10:46 2015 (r278440) +++ stable/9/sys/cam/scsi/scsi_da.c Mon Feb 9 09:14:22 2015 (r278441) @@ -101,7 +101,8 @@ typedef enum { DA_Q_NO_PREVENT = 0x04, DA_Q_4K = 0x08, DA_Q_NO_RC16 = 0x10, - DA_Q_NO_UNMAP = 0x20 + DA_Q_NO_UNMAP = 0x20, + DA_Q_RETRY_BUSY = 0x40 } da_quirks; #define DA_Q_BIT_STRING \ @@ -110,7 +111,9 @@ typedef enum { "\002NO_6_BYTE" \ "\003NO_PREVENT" \ "\0044K" \ - "\005NO_RC16" + "\005NO_RC16" \ + "\006NO_UNMAP" \ + "\007RETRY_BUSY" typedef enum { DA_CCB_PROBE_RC = 0x01, @@ -360,6 +363,14 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_FIXED, "STEC", "*", "*"}, /*quirks*/ DA_Q_NO_UNMAP }, + { + /* + * VMware returns BUSY status when storage has transient + * connectivity problems, so better wait. + */ + {T_DIRECT, SIP_MEDIA_FIXED, "VMware", "Virtual disk", "*"}, + /*quirks*/ DA_Q_RETRY_BUSY + }, /* USB mass storage devices supported by umass(4) */ { /* @@ -3603,6 +3614,9 @@ daerror(union ccb *ccb, u_int32_t cam_fl * don't treat UAs as errors. */ sense_flags |= SF_RETRY_UA; + + if (softc->quirks & DA_Q_RETRY_BUSY) + sense_flags |= SF_RETRY_BUSY; return(cam_periph_error(ccb, cam_flags, sense_flags, &softc->saved_ccb)); } From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 09:22:48 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27C02915; Mon, 9 Feb 2015 09:22: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 ED3702F3; Mon, 9 Feb 2015 09:22: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 t199MlQb028243; Mon, 9 Feb 2015 09:22:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199Mlc4028242; Mon, 9 Feb 2015 09:22:47 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201502090922.t199Mlc4028242@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 9 Feb 2015 09:22:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278443 - stable/10/usr.sbin/freebsd-update X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:22:48 -0000 Author: brooks Date: Mon Feb 9 09:22:47 2015 New Revision: 278443 URL: https://svnweb.freebsd.org/changeset/base/278443 Log: When upgrading, install the ELF runtime linkers before libraries. This is required to prevent problems with nss modules that use libthr when upgrading from releases prior to 10.1. PR: 197366 Differential Revision: D1790 Reviewed by: cperciva Sponsored by: DARPA, AFRL Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:17:00 2015 (r278442) +++ stable/10/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:22:47 2015 (r278443) @@ -2820,18 +2820,27 @@ Kernel updates have been installed. Ple grep -E '^[^|]+\|d\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 + # Install new runtime linker + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 # Deal with everything else grep -vE '^/boot/' $1/INDEX-OLD | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 09:45:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08399A7; Mon, 9 Feb 2015 09:45: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 CDCDD784; Mon, 9 Feb 2015 09:45: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 t199jw5R038327; Mon, 9 Feb 2015 09:45:58 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t199jw1f038326; Mon, 9 Feb 2015 09:45:58 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201502090945.t199jw1f038326@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 9 Feb 2015 09:45:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278444 - stable/9/usr.sbin/freebsd-update X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 09:45:59 -0000 Author: brooks Date: Mon Feb 9 09:45:58 2015 New Revision: 278444 URL: https://svnweb.freebsd.org/changeset/base/278444 Log: MFC r278337: When upgrading, install the ELF runtime linkers before libraries. This is required to prevent problems with nss modules that use libthr when upgrading from releases prior to 10.1. PR: 197366 Differential Revision: D1790 Reviewed by: cperciva Sponsored by: DARPA, AFRL Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/9/usr.sbin/freebsd-update/ (props changed) Modified: stable/9/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:22:47 2015 (r278443) +++ stable/9/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:45:58 2015 (r278444) @@ -2820,18 +2820,27 @@ Kernel updates have been installed. Ple grep -E '^[^|]+\|d\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 + # Install new runtime linker + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 # Deal with everything else grep -vE '^/boot/' $1/INDEX-OLD | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-stable@FreeBSD.ORG Mon Feb 9 10:09:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 943147C8; Mon, 9 Feb 2015 10:09:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DA69B7; Mon, 9 Feb 2015 10:09:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t19A9lGk048567; Mon, 9 Feb 2015 10:09:47 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t19A9lqR048566; Mon, 9 Feb 2015 10:09:47 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201502091009.t19A9lqR048566@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Mon, 9 Feb 2015 10:09:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278446 - stable/8/usr.sbin/freebsd-update X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 10:09:47 -0000 Author: brooks Date: Mon Feb 9 10:09:46 2015 New Revision: 278446 URL: https://svnweb.freebsd.org/changeset/base/278446 Log: MFC r278337: When upgrading, install the ELF runtime linkers before libraries. This is required to prevent problems with nss modules that use libthr when upgrading from releases prior to 10.1. PR: 197366 Differential Revision: D1790 Reviewed by: cperciva Sponsored by: DARPA, AFRL Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh Directory Properties: stable/8/usr.sbin/freebsd-update/ (props changed) Modified: stable/8/usr.sbin/freebsd-update/freebsd-update.sh ============================================================================== --- stable/8/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 09:56:21 2015 (r278445) +++ stable/8/usr.sbin/freebsd-update/freebsd-update.sh Mon Feb 9 10:09:46 2015 (r278446) @@ -2771,18 +2771,27 @@ Kernel updates have been installed. Ple grep -E '^[^|]+\|d\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 + # Install new runtime linker + grep -vE '^/boot/' $1/INDEX-NEW | + grep -vE '^[^|]+\|d\|' | + grep -E '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' > INDEX-NEW + install_from_index INDEX-NEW || return 1 + # Install new shared libraries next grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -E '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 # Deal with everything else grep -vE '^/boot/' $1/INDEX-OLD | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-OLD grep -vE '^/boot/' $1/INDEX-NEW | grep -vE '^[^|]+\|d\|' | + grep -vE '^/libexec/ld-elf[^|]*\.so\.[0-9]+\|' | grep -vE '^[^|]*/lib/[^|]*\.so\.[0-9]+\|' > INDEX-NEW install_from_index INDEX-NEW || return 1 install_delete INDEX-OLD INDEX-NEW || return 1 From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 01:05:54 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B815986; Tue, 10 Feb 2015 01:05: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 4B946695; Tue, 10 Feb 2015 01:05: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 t1A15shK053264; Tue, 10 Feb 2015 01:05:54 GMT (envelope-from jamie@FreeBSD.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A15qiq053255; Tue, 10 Feb 2015 01:05:52 GMT (envelope-from jamie@FreeBSD.org) Message-Id: <201502100105.t1A15qiq053255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jamie set sender to jamie@FreeBSD.org using -f From: Jamie Gritton Date: Tue, 10 Feb 2015 01:05:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278484 - in stable/10: etc/rc.d usr.sbin/jail X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 01:05:54 -0000 Author: jamie Date: Tue Feb 10 01:05:51 2015 New Revision: 278484 URL: https://svnweb.freebsd.org/changeset/base/278484 Log: MFC r278323: Add mount.procfs jail parameter, so procfs can be mounted when a prison's root is in its fstab. Also fix a typo while I'm at it. PR: 197237 197066 Modified: stable/10/etc/rc.d/jail stable/10/usr.sbin/jail/command.c stable/10/usr.sbin/jail/config.c stable/10/usr.sbin/jail/jail.8 stable/10/usr.sbin/jail/jail.c stable/10/usr.sbin/jail/jailp.h Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/jail ============================================================================== --- stable/10/etc/rc.d/jail Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/etc/rc.d/jail Tue Feb 10 01:05:51 2015 (r278484) @@ -28,7 +28,7 @@ extra_commands="config console status" need_dad_wait= -# extact_var jail name param num defval +# extract_var jail name param num defval # Extract value from ${jail_$jail_$name} or ${jail_$name} and # set it to $param. If not defined, $defval is used. # When $num is [0-9]*, ${jail_$jail_$name$num} are looked up and @@ -233,8 +233,7 @@ parse_options() fi eval : \${jail_${_j}_procfs_enable:=${jail_procfs_enable:-NO}} if checkyesno jail_${_j}_procfs_enable; then - echo " mount += " \ - "\"procfs ${_rootdir%/}/proc procfs rw 0 0\";" + echo " mount.procfs;" fi eval : \${jail_${_j}_mount_enable:=${jail_mount_enable:-NO}} Modified: stable/10/usr.sbin/jail/command.c ============================================================================== --- stable/10/usr.sbin/jail/command.c Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/command.c Tue Feb 10 01:05:51 2015 (r278484) @@ -112,6 +112,12 @@ next_command(struct cfjail *j) if (!bool_param(j->intparams[IP_MOUNT_FDESCFS])) continue; j->comstring = &dummystring; + break; + case IP_MOUNT_PROCFS: + if (!bool_param(j->intparams[IP_MOUNT_PROCFS])) + continue; + j->comstring = &dummystring; + break; case IP__OP: case IP_STOP_TIMEOUT: j->comstring = &dummystring; @@ -529,6 +535,32 @@ run_command(struct cfjail *j) } break; + case IP_MOUNT_PROCFS: + argv = alloca(7 * sizeof(char *)); + path = string_param(j->intparams[KP_PATH]); + if (path == NULL) { + jail_warnx(j, "mount.procfs: no path"); + return -1; + } + devpath = alloca(strlen(path) + 6); + sprintf(devpath, "%s/proc", path); + if (check_path(j, "mount.procfs", devpath, 0, + down ? "procfs" : NULL) < 0) + return -1; + if (down) { + *(const char **)&argv[0] = "/sbin/umount"; + argv[1] = devpath; + argv[2] = NULL; + } else { + *(const char **)&argv[0] = _PATH_MOUNT; + *(const char **)&argv[1] = "-t"; + *(const char **)&argv[2] = "procfs"; + *(const char **)&argv[3] = "."; + argv[4] = devpath; + argv[5] = NULL; + } + break; + case IP_COMMAND: if (j->name != NULL) goto default_command; Modified: stable/10/usr.sbin/jail/config.c ============================================================================== --- stable/10/usr.sbin/jail/config.c Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/config.c Tue Feb 10 01:05:51 2015 (r278484) @@ -84,6 +84,7 @@ static const struct ipspec intparams[] = [IP_MOUNT] = {"mount", PF_INTERNAL | PF_REV}, [IP_MOUNT_DEVFS] = {"mount.devfs", PF_INTERNAL | PF_BOOL}, [IP_MOUNT_FDESCFS] = {"mount.fdescfs", PF_INTERNAL | PF_BOOL}, + [IP_MOUNT_PROCFS] = {"mount.procfs", PF_INTERNAL | PF_BOOL}, [IP_MOUNT_FSTAB] = {"mount.fstab", PF_INTERNAL}, [IP_STOP_TIMEOUT] = {"stop.timeout", PF_INTERNAL | PF_INT}, [IP_VNET_INTERFACE] = {"vnet.interface", PF_INTERNAL}, Modified: stable/10/usr.sbin/jail/jail.8 ============================================================================== --- stable/10/usr.sbin/jail/jail.8 Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/jail.8 Tue Feb 10 01:05:51 2015 (r278484) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 28, 2015 +.Dd February 6, 2015 .Dt JAIL 8 .Os .Sh NAME @@ -753,6 +753,12 @@ Mount a filesystem on the chrooted .Pa /dev/fd directory. +.It Va mount.procfs +Mount a +.Xr procfs 5 +filesystem on the chrooted +.Pa /proc +directory. .It Va allow.dying Allow making changes to a .Va dying @@ -1206,6 +1212,7 @@ environment of the first jail. .Xr jls 8 , .Xr mount 8 , .Xr named 8 , +.Xr procfs 5 , .Xr reboot 8 , .Xr rpcbind 8 , .Xr sendmail 8 , Modified: stable/10/usr.sbin/jail/jail.c ============================================================================== --- stable/10/usr.sbin/jail/jail.c Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/jail.c Tue Feb 10 01:05:51 2015 (r278484) @@ -93,6 +93,7 @@ static const enum intparam startcommands IP__MOUNT_FROM_FSTAB, IP_MOUNT_DEVFS, IP_MOUNT_FDESCFS, + IP_MOUNT_PROCFS, IP_EXEC_PRESTART, IP__OP, IP_VNET_INTERFACE, @@ -109,6 +110,7 @@ static const enum intparam stopcommands[ IP_STOP_TIMEOUT, IP__OP, IP_EXEC_POSTSTOP, + IP_MOUNT_PROCFS, IP_MOUNT_FDESCFS, IP_MOUNT_DEVFS, IP__MOUNT_FROM_FSTAB, Modified: stable/10/usr.sbin/jail/jailp.h ============================================================================== --- stable/10/usr.sbin/jail/jailp.h Tue Feb 10 01:02:02 2015 (r278483) +++ stable/10/usr.sbin/jail/jailp.h Tue Feb 10 01:05:51 2015 (r278484) @@ -96,6 +96,7 @@ enum intparam { IP_MOUNT, /* Mount points in fstab(5) form */ IP_MOUNT_DEVFS, /* Mount /dev under prison root */ IP_MOUNT_FDESCFS, /* Mount /dev/fd under prison root */ + IP_MOUNT_PROCFS, /* Mount /proc under prison root */ IP_MOUNT_FSTAB, /* A standard fstab(5) file */ IP_STOP_TIMEOUT, /* Time to wait after sending SIGTERM */ IP_VNET_INTERFACE, /* Assign interface(s) to vnet jail */ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 07:35:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3CF0B187; Tue, 10 Feb 2015 07:35: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 26F4CFE7; Tue, 10 Feb 2015 07:35: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 t1A7ZH7Y035105; Tue, 10 Feb 2015 07:35:17 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1A7ZHhj035104; Tue, 10 Feb 2015 07:35:17 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502100735.t1A7ZHhj035104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 10 Feb 2015 07:35:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278496 - stable/10/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 07:35:17 -0000 Author: dim Date: Tue Feb 10 07:35:16 2015 New Revision: 278496 URL: https://svnweb.freebsd.org/changeset/base/278496 Log: MFC r278348: Fix a number of -Wcast-qual warnings in ath's ar9300_attach.c, by making the ia_array field of struct ar9300_ini_array const, and removing the const-dropping casts. No functional change. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D1725 Modified: stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h ============================================================================== --- stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Tue Feb 10 06:35:16 2015 (r278495) +++ stable/10/sys/contrib/dev/ath/ath_hal/ar9300/ar9300.h Tue Feb 10 07:35:16 2015 (r278496) @@ -317,12 +317,12 @@ typedef struct { /* Support for multiple INIs */ struct ar9300_ini_array { - u_int32_t *ia_array; + const u_int32_t *ia_array; u_int32_t ia_rows; u_int32_t ia_columns; }; #define INIT_INI_ARRAY(iniarray, array, rows, columns) do { \ - (iniarray)->ia_array = (u_int32_t *)(array); \ + (iniarray)->ia_array = (const u_int32_t *)(array); \ (iniarray)->ia_rows = (rows); \ (iniarray)->ia_columns = (columns); \ } while (0) From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:16:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFF354CA; Tue, 10 Feb 2015 13:16: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 D9BF1C22; Tue, 10 Feb 2015 13:16: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 t1ADGsRa095293; Tue, 10 Feb 2015 13:16:54 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADGsGH095290; Tue, 10 Feb 2015 13:16:54 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101316.t1ADGsGH095290@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278507 - in stable/10/sys/dev/usb: . controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:16:55 -0000 Author: hselasky Date: Tue Feb 10 13:16:53 2015 New Revision: 278507 URL: https://svnweb.freebsd.org/changeset/base/278507 Log: MFC r278071: Section 3.2.9 in the XHCI specification about control transfers says that we should use a normal-TRB if there are more TRBs extending the data-stage TRB. Add a dedicated state bit to the internal USB transfer flags to handle this case. Modified: stable/10/sys/dev/usb/controller/xhci.c stable/10/sys/dev/usb/usb_core.h stable/10/sys/dev/usb/usb_transfer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Tue Feb 10 13:07:08 2015 (r278506) +++ stable/10/sys/dev/usb/controller/xhci.c Tue Feb 10 13:16:53 2015 (r278507) @@ -1870,6 +1870,15 @@ restart: XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + /* + * Section 3.2.9 in the XHCI + * specification about control + * transfers says that we should use a + * normal-TRB if there are more TRBs + * extending the data-stage + * TRB. Update the "trb_type". + */ + temp->trb_type = XHCI_TRB_TYPE_NORMAL; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | @@ -2110,7 +2119,8 @@ xhci_setup_generic_chain(struct usb_xfer mult = 1; temp.isoc_delta = 0; temp.isoc_frame = 0; - temp.trb_type = XHCI_TRB_TYPE_DATA_STAGE; + temp.trb_type = xfer->flags_int.control_did_data ? + XHCI_TRB_TYPE_NORMAL : XHCI_TRB_TYPE_DATA_STAGE; } else { x = 0; mult = 1; Modified: stable/10/sys/dev/usb/usb_core.h ============================================================================== --- stable/10/sys/dev/usb/usb_core.h Tue Feb 10 13:07:08 2015 (r278506) +++ stable/10/sys/dev/usb/usb_core.h Tue Feb 10 13:16:53 2015 (r278507) @@ -101,6 +101,7 @@ struct usb_xfer_flags_int { * sent */ uint8_t control_act:1; /* set if control transfer is active */ uint8_t control_stall:1; /* set if control transfer should be stalled */ + uint8_t control_did_data:1; /* set if control DATA has been transferred */ uint8_t short_frames_ok:1; /* filtered version */ uint8_t short_xfer_ok:1; /* filtered version */ Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:07:08 2015 (r278506) +++ stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:16:53 2015 (r278507) @@ -1409,6 +1409,29 @@ usbd_control_transfer_init(struct usb_xf } /*------------------------------------------------------------------------* + * usbd_control_transfer_did_data + * + * This function returns non-zero if a control endpoint has + * transferred the first DATA packet after the SETUP packet. + * Else it returns zero. + *------------------------------------------------------------------------*/ +static uint8_t +usbd_control_transfer_did_data(struct usb_xfer *xfer) +{ + struct usb_device_request req; + + /* SETUP packet is not yet sent */ + if (xfer->flags_int.control_hdr != 0) + return (0); + + /* copy out the USB request header */ + usbd_copy_out(xfer->frbuffers, 0, &req, sizeof(req)); + + /* compare remainder to the initial value */ + return (xfer->flags_int.control_rem != UGETW(req.wLength)); +} + +/*------------------------------------------------------------------------* * usbd_setup_ctrl_transfer * * This function handles initialisation of control transfers. Control @@ -1513,6 +1536,11 @@ usbd_setup_ctrl_transfer(struct usb_xfer len = (xfer->sumlen - sizeof(struct usb_device_request)); } + /* update did data flag */ + + xfer->flags_int.control_did_data = + usbd_control_transfer_did_data(xfer); + /* check if there is a length mismatch */ if (len > xfer->flags_int.control_rem) { From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:18:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71F38611; Tue, 10 Feb 2015 13:18: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 5C3A8C37; Tue, 10 Feb 2015 13:18: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 t1ADIoO4095600; Tue, 10 Feb 2015 13:18:50 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADIneB095597; Tue, 10 Feb 2015 13:18:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101318.t1ADIneB095597@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:18:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278508 - in stable/9/sys/dev/usb: . controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:18:50 -0000 Author: hselasky Date: Tue Feb 10 13:18:48 2015 New Revision: 278508 URL: https://svnweb.freebsd.org/changeset/base/278508 Log: MFC r278071: Section 3.2.9 in the XHCI specification about control transfers says that we should use a normal-TRB if there are more TRBs extending the data-stage TRB. Add a dedicated state bit to the internal USB transfer flags to handle this case. Modified: stable/9/sys/dev/usb/controller/xhci.c stable/9/sys/dev/usb/usb_core.h stable/9/sys/dev/usb/usb_transfer.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Tue Feb 10 13:16:53 2015 (r278507) +++ stable/9/sys/dev/usb/controller/xhci.c Tue Feb 10 13:18:48 2015 (r278508) @@ -1850,6 +1850,15 @@ restart: XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + /* + * Section 3.2.9 in the XHCI + * specification about control + * transfers says that we should use a + * normal-TRB if there are more TRBs + * extending the data-stage + * TRB. Update the "trb_type". + */ + temp->trb_type = XHCI_TRB_TYPE_NORMAL; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | @@ -2089,7 +2098,8 @@ xhci_setup_generic_chain(struct usb_xfer mult = 1; temp.isoc_delta = 0; temp.isoc_frame = 0; - temp.trb_type = XHCI_TRB_TYPE_DATA_STAGE; + temp.trb_type = xfer->flags_int.control_did_data ? + XHCI_TRB_TYPE_NORMAL : XHCI_TRB_TYPE_DATA_STAGE; } else { x = 0; mult = 1; Modified: stable/9/sys/dev/usb/usb_core.h ============================================================================== --- stable/9/sys/dev/usb/usb_core.h Tue Feb 10 13:16:53 2015 (r278507) +++ stable/9/sys/dev/usb/usb_core.h Tue Feb 10 13:18:48 2015 (r278508) @@ -97,6 +97,7 @@ struct usb_xfer_flags_int { * sent */ uint8_t control_act:1; /* set if control transfer is active */ uint8_t control_stall:1; /* set if control transfer should be stalled */ + uint8_t control_did_data:1; /* set if control DATA has been transferred */ uint8_t short_frames_ok:1; /* filtered version */ uint8_t short_xfer_ok:1; /* filtered version */ Modified: stable/9/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/9/sys/dev/usb/usb_transfer.c Tue Feb 10 13:16:53 2015 (r278507) +++ stable/9/sys/dev/usb/usb_transfer.c Tue Feb 10 13:18:48 2015 (r278508) @@ -1345,6 +1345,29 @@ usbd_control_transfer_init(struct usb_xf } /*------------------------------------------------------------------------* + * usbd_control_transfer_did_data + * + * This function returns non-zero if a control endpoint has + * transferred the first DATA packet after the SETUP packet. + * Else it returns zero. + *------------------------------------------------------------------------*/ +static uint8_t +usbd_control_transfer_did_data(struct usb_xfer *xfer) +{ + struct usb_device_request req; + + /* SETUP packet is not yet sent */ + if (xfer->flags_int.control_hdr != 0) + return (0); + + /* copy out the USB request header */ + usbd_copy_out(xfer->frbuffers, 0, &req, sizeof(req)); + + /* compare remainder to the initial value */ + return (xfer->flags_int.control_rem != UGETW(req.wLength)); +} + +/*------------------------------------------------------------------------* * usbd_setup_ctrl_transfer * * This function handles initialisation of control transfers. Control @@ -1449,6 +1472,11 @@ usbd_setup_ctrl_transfer(struct usb_xfer len = (xfer->sumlen - sizeof(struct usb_device_request)); } + /* update did data flag */ + + xfer->flags_int.control_did_data = + usbd_control_transfer_did_data(xfer); + /* check if there is a length mismatch */ if (len > xfer->flags_int.control_rem) { From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:20:35 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDA3A837; Tue, 10 Feb 2015 13:20: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 A78B0C4E; Tue, 10 Feb 2015 13:20: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 t1ADKZXf098061; Tue, 10 Feb 2015 13:20:35 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADKYef098058; Tue, 10 Feb 2015 13:20:34 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101320.t1ADKYef098058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:20:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278509 - in stable/8/sys/dev/usb: . controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:20:36 -0000 Author: hselasky Date: Tue Feb 10 13:20:34 2015 New Revision: 278509 URL: https://svnweb.freebsd.org/changeset/base/278509 Log: MFC r278071: Section 3.2.9 in the XHCI specification about control transfers says that we should use a normal-TRB if there are more TRBs extending the data-stage TRB. Add a dedicated state bit to the internal USB transfer flags to handle this case. Modified: stable/8/sys/dev/usb/controller/xhci.c stable/8/sys/dev/usb/usb_core.h stable/8/sys/dev/usb/usb_transfer.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Tue Feb 10 13:18:48 2015 (r278508) +++ stable/8/sys/dev/usb/controller/xhci.c Tue Feb 10 13:20:34 2015 (r278509) @@ -1840,6 +1840,15 @@ restart: XHCI_TRB_3_TYPE_SET(XHCI_TRB_TYPE_DATA_STAGE); if (temp->direction == UE_DIR_IN) dword |= XHCI_TRB_3_DIR_IN | XHCI_TRB_3_ISP_BIT; + /* + * Section 3.2.9 in the XHCI + * specification about control + * transfers says that we should use a + * normal-TRB if there are more TRBs + * extending the data-stage + * TRB. Update the "trb_type". + */ + temp->trb_type = XHCI_TRB_TYPE_NORMAL; break; case XHCI_TRB_TYPE_STATUS_STAGE: dword = XHCI_TRB_3_CHAIN_BIT | XHCI_TRB_3_CYCLE_BIT | @@ -2079,7 +2088,8 @@ xhci_setup_generic_chain(struct usb_xfer mult = 1; temp.isoc_delta = 0; temp.isoc_frame = 0; - temp.trb_type = XHCI_TRB_TYPE_DATA_STAGE; + temp.trb_type = xfer->flags_int.control_did_data ? + XHCI_TRB_TYPE_NORMAL : XHCI_TRB_TYPE_DATA_STAGE; } else { x = 0; mult = 1; Modified: stable/8/sys/dev/usb/usb_core.h ============================================================================== --- stable/8/sys/dev/usb/usb_core.h Tue Feb 10 13:18:48 2015 (r278508) +++ stable/8/sys/dev/usb/usb_core.h Tue Feb 10 13:20:34 2015 (r278509) @@ -97,6 +97,7 @@ struct usb_xfer_flags_int { * sent */ uint8_t control_act:1; /* set if control transfer is active */ uint8_t control_stall:1; /* set if control transfer should be stalled */ + uint8_t control_did_data:1; /* set if control DATA has been transferred */ uint8_t short_frames_ok:1; /* filtered version */ uint8_t short_xfer_ok:1; /* filtered version */ Modified: stable/8/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/8/sys/dev/usb/usb_transfer.c Tue Feb 10 13:18:48 2015 (r278508) +++ stable/8/sys/dev/usb/usb_transfer.c Tue Feb 10 13:20:34 2015 (r278509) @@ -1344,6 +1344,29 @@ usbd_control_transfer_init(struct usb_xf } /*------------------------------------------------------------------------* + * usbd_control_transfer_did_data + * + * This function returns non-zero if a control endpoint has + * transferred the first DATA packet after the SETUP packet. + * Else it returns zero. + *------------------------------------------------------------------------*/ +static uint8_t +usbd_control_transfer_did_data(struct usb_xfer *xfer) +{ + struct usb_device_request req; + + /* SETUP packet is not yet sent */ + if (xfer->flags_int.control_hdr != 0) + return (0); + + /* copy out the USB request header */ + usbd_copy_out(xfer->frbuffers, 0, &req, sizeof(req)); + + /* compare remainder to the initial value */ + return (xfer->flags_int.control_rem != UGETW(req.wLength)); +} + +/*------------------------------------------------------------------------* * usbd_setup_ctrl_transfer * * This function handles initialisation of control transfers. Control @@ -1448,6 +1471,11 @@ usbd_setup_ctrl_transfer(struct usb_xfer len = (xfer->sumlen - sizeof(struct usb_device_request)); } + /* update did data flag */ + + xfer->flags_int.control_did_data = + usbd_control_transfer_did_data(xfer); + /* check if there is a length mismatch */ if (len > xfer->flags_int.control_rem) { From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:25:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 512F8C52; Tue, 10 Feb 2015 13:25: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 32444D17; Tue, 10 Feb 2015 13:25: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 t1ADPUVc000359; Tue, 10 Feb 2015 13:25:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADPT3t000357; Tue, 10 Feb 2015 13:25:29 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101325.t1ADPT3t000357@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:25:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278510 - in stable/10/sys: conf dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:25:30 -0000 Author: hselasky Date: Tue Feb 10 13:25:29 2015 New Revision: 278510 URL: https://svnweb.freebsd.org/changeset/base/278510 Log: MFC r278074: Optimise allocation of USB DMA structures. By default don't double map allocations if only one element should be allocated per page cache. Make one allocation per element compile time configurable. Fix a comment while at it. Modified: stable/10/sys/conf/options stable/10/sys/dev/usb/usb_transfer.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/options ============================================================================== --- stable/10/sys/conf/options Tue Feb 10 13:20:34 2015 (r278509) +++ stable/10/sys/conf/options Tue Feb 10 13:25:29 2015 (r278510) @@ -663,6 +663,7 @@ USB_HOST_ALIGN opt_usb.h USB_REQ_DEBUG opt_usb.h USB_TEMPLATE opt_usb.h USB_VERBOSE opt_usb.h +USB_DMA_SINGLE_ALLOC opt_usb.h USB_EHCI_BIG_ENDIAN_DESC opt_usb.h U3G_DEBUG opt_u3g.h UKBD_DFLT_KEYMAP opt_ukbd.h Modified: stable/10/sys/dev/usb/usb_transfer.c ============================================================================== --- stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:20:34 2015 (r278509) +++ stable/10/sys/dev/usb/usb_transfer.c Tue Feb 10 13:25:29 2015 (r278510) @@ -237,7 +237,11 @@ usbd_transfer_setup_sub_malloc(struct us n_obj = 1; } else { /* compute number of objects per page */ +#ifdef USB_DMA_SINGLE_ALLOC + n_obj = 1; +#else n_obj = (USB_PAGE_SIZE / size); +#endif /* * Compute number of DMA chunks, rounded up * to nearest one: @@ -273,15 +277,33 @@ usbd_transfer_setup_sub_malloc(struct us &parm->curr_xfer->xroot->dma_parent_tag; } - if (ppc) { - *ppc = parm->xfer_page_cache_ptr; + if (ppc != NULL) { + if (n_obj != 1) + *ppc = parm->xfer_page_cache_ptr; + else + *ppc = parm->dma_page_cache_ptr; } r = count; /* set remainder count */ z = n_obj * size; /* set allocation size */ pc = parm->xfer_page_cache_ptr; pg = parm->dma_page_ptr; - for (x = 0; x != n_dma_pc; x++) { + if (n_obj == 1) { + /* + * Avoid mapping memory twice if only a single object + * should be allocated per page cache: + */ + for (x = 0; x != n_dma_pc; x++) { + if (usb_pc_alloc_mem(parm->dma_page_cache_ptr, + pg, z, align)) { + return (1); /* failure */ + } + /* Make room for one DMA page cache and "n_dma_pg" pages */ + parm->dma_page_cache_ptr++; + pg += n_dma_pg; + } + } else { + for (x = 0; x != n_dma_pc; x++) { if (r < n_obj) { /* compute last remainder */ @@ -294,7 +316,7 @@ usbd_transfer_setup_sub_malloc(struct us } /* Set beginning of current buffer */ buf = parm->dma_page_cache_ptr->buffer; - /* Make room for one DMA page cache and one page */ + /* Make room for one DMA page cache and "n_dma_pg" pages */ parm->dma_page_cache_ptr++; pg += n_dma_pg; @@ -314,6 +336,7 @@ usbd_transfer_setup_sub_malloc(struct us } mtx_unlock(pc->tag_parent->mtx); } + } } parm->xfer_page_cache_ptr = pc; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:29:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99B22FB0; Tue, 10 Feb 2015 13:29: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 84036D58; Tue, 10 Feb 2015 13:29: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 t1ADTjqj000898; Tue, 10 Feb 2015 13:29:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADTjXf000897; Tue, 10 Feb 2015 13:29:45 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101329.t1ADTjXf000897@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:29:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278511 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:29:45 -0000 Author: hselasky Date: Tue Feb 10 13:29:44 2015 New Revision: 278511 URL: https://svnweb.freebsd.org/changeset/base/278511 Log: MFC r278103: The flowid and hashtype should be copied from the originating packet when fragmenting IP packets to preserve the order of the packets in a stream. Else the resulting fragments can be sent out of order when the hardware supports multiple transmit rings. Sponsored by: Mellanox Technologies Modified: stable/10/sys/netinet/ip_output.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Tue Feb 10 13:25:29 2015 (r278510) +++ stable/10/sys/netinet/ip_output.c Tue Feb 10 13:29:44 2015 (r278511) @@ -798,6 +798,10 @@ smart_frag_failure: IPSTAT_INC(ips_odropped); goto done; } + /* make sure the flowid is the same for the fragmented mbufs */ + M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); + m->m_pkthdr.flowid = m0->m_pkthdr.flowid; + /* copy multicast flag, if any */ m->m_flags |= (m0->m_flags & M_MCAST); /* * In the first mbuf, leave room for the link header, then From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:36:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5F5984C0; Tue, 10 Feb 2015 13:36:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49BE0E2C; Tue, 10 Feb 2015 13:36:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ADacFs005378; Tue, 10 Feb 2015 13:36:38 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADacrn005377; Tue, 10 Feb 2015 13:36:38 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101336.t1ADacrn005377@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:36:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278513 - stable/9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:36:38 -0000 Author: hselasky Date: Tue Feb 10 13:36:37 2015 New Revision: 278513 URL: https://svnweb.freebsd.org/changeset/base/278513 Log: MFC r278103: The flowid and hashtype should be copied from the originating packet when fragmenting IP packets to preserve the order of the packets in a stream. Else the resulting fragments can be sent out of order when the hardware supports multiple transmit rings. Sponsored by: Mellanox Technologies Modified: stable/9/sys/netinet/ip_output.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet/ip_output.c ============================================================================== --- stable/9/sys/netinet/ip_output.c Tue Feb 10 13:34:45 2015 (r278512) +++ stable/9/sys/netinet/ip_output.c Tue Feb 10 13:36:37 2015 (r278513) @@ -787,7 +787,11 @@ smart_frag_failure: IPSTAT_INC(ips_odropped); goto done; } - m->m_flags |= (m0->m_flags & M_MCAST) | M_FRAG; + /* copy multicast and flowid flag, if any */ + m->m_flags |= (m0->m_flags & (M_FLOWID | M_MCAST)) | M_FRAG; + /* make sure the flowid is the same for the fragmented mbufs */ + M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); + m->m_pkthdr.flowid = m0->m_pkthdr.flowid; /* * In the first mbuf, leave room for the link header, then * copy the original IP header including options. The payload From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:43:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407B07C6; Tue, 10 Feb 2015 13:43: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 2B106F1B; Tue, 10 Feb 2015 13:43: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 t1ADhOua009761; Tue, 10 Feb 2015 13:43:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADhOkI009760; Tue, 10 Feb 2015 13:43:24 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101343.t1ADhOkI009760@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:43:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278514 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:43:24 -0000 Author: hselasky Date: Tue Feb 10 13:43:23 2015 New Revision: 278514 URL: https://svnweb.freebsd.org/changeset/base/278514 Log: Append to the MFC of r278103 that we also pass along the M_FLOWID flag. Sponsored by: Mellanox Technologies Modified: stable/10/sys/netinet/ip_output.c Modified: stable/10/sys/netinet/ip_output.c ============================================================================== --- stable/10/sys/netinet/ip_output.c Tue Feb 10 13:36:37 2015 (r278513) +++ stable/10/sys/netinet/ip_output.c Tue Feb 10 13:43:23 2015 (r278514) @@ -801,8 +801,8 @@ smart_frag_failure: /* make sure the flowid is the same for the fragmented mbufs */ M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); m->m_pkthdr.flowid = m0->m_pkthdr.flowid; - /* copy multicast flag, if any */ - m->m_flags |= (m0->m_flags & M_MCAST); + /* copy multicast and flowid flags, if any */ + m->m_flags |= (m0->m_flags & (M_MCAST | M_FLOWID)); /* * In the first mbuf, leave room for the link header, then * copy the original IP header including options. The payload From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:45:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE3E7BC0; Tue, 10 Feb 2015 13:45: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 803F3F4E; Tue, 10 Feb 2015 13:45: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 t1ADjuai010294; Tue, 10 Feb 2015 13:45:56 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADjuIT010293; Tue, 10 Feb 2015 13:45:56 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101345.t1ADjuIT010293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:45:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278515 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:45:56 -0000 Author: hselasky Date: Tue Feb 10 13:45:55 2015 New Revision: 278515 URL: https://svnweb.freebsd.org/changeset/base/278515 Log: MFC r278105: Separate out detection of prevent and allow medium removal quirk. PR: 185747 Modified: stable/10/sys/dev/usb/usb_msctest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/10/sys/dev/usb/usb_msctest.c Tue Feb 10 13:43:23 2015 (r278514) +++ stable/10/sys/dev/usb/usb_msctest.c Tue Feb 10 13:45:55 2015 (r278515) @@ -112,6 +112,8 @@ static uint8_t scsi_request_sense[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_read_capacity[] = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_prevent_removal[] = { 0x1e, 0, 0, 0, 1, 0 }; +static uint8_t scsi_allow_removal[] = { 0x1e, 0, 0, 0, 0, 0 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -695,10 +697,28 @@ usb_msc_auto_quirk(struct usb_device *ud USB_MS_HZ); if (err != 0) { + if (err != ERR_CSW_FAILED) + goto error; + DPRINTF("Test unit ready failed\n"); + } + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_prevent_removal, sizeof(scsi_prevent_removal), + USB_MS_HZ); + + if (err == 0) { + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_allow_removal, sizeof(scsi_allow_removal), + USB_MS_HZ); + } + + if (err != 0) { if (err != ERR_CSW_FAILED) goto error; + DPRINTF("Device doesn't handle prevent and allow removal\n"); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } + timeout = 1; retry_sync_cache: @@ -711,11 +731,9 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache " - "and prevent allow medium removal\n"); + DPRINTF("Device doesn't handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -742,13 +760,10 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache nor" - "prevent allow medium removal\n"); + "handle synchronize cache\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; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:47:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 89282DFC; Tue, 10 Feb 2015 13:47: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 59350F62; Tue, 10 Feb 2015 13:47: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 t1ADlUXt010572; Tue, 10 Feb 2015 13:47:30 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADlUYP010571; Tue, 10 Feb 2015 13:47:30 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101347.t1ADlUYP010571@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:47:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278516 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:47:30 -0000 Author: hselasky Date: Tue Feb 10 13:47:29 2015 New Revision: 278516 URL: https://svnweb.freebsd.org/changeset/base/278516 Log: MFC r278105: Separate out detection of prevent and allow medium removal quirk. PR: 185747 Modified: stable/9/sys/dev/usb/usb_msctest.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Tue Feb 10 13:45:55 2015 (r278515) +++ stable/9/sys/dev/usb/usb_msctest.c Tue Feb 10 13:47:29 2015 (r278516) @@ -108,6 +108,8 @@ static uint8_t scsi_request_sense[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_read_capacity[] = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_prevent_removal[] = { 0x1e, 0, 0, 0, 1, 0 }; +static uint8_t scsi_allow_removal[] = { 0x1e, 0, 0, 0, 0, 0 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -691,10 +693,28 @@ usb_msc_auto_quirk(struct usb_device *ud USB_MS_HZ); if (err != 0) { + if (err != ERR_CSW_FAILED) + goto error; + DPRINTF("Test unit ready failed\n"); + } + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_prevent_removal, sizeof(scsi_prevent_removal), + USB_MS_HZ); + + if (err == 0) { + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_allow_removal, sizeof(scsi_allow_removal), + USB_MS_HZ); + } + + if (err != 0) { if (err != ERR_CSW_FAILED) goto error; + DPRINTF("Device doesn't handle prevent and allow removal\n"); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } + timeout = 1; retry_sync_cache: @@ -707,11 +727,9 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache " - "and prevent allow medium removal\n"); + DPRINTF("Device doesn't handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -738,13 +756,10 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache nor" - "prevent allow medium removal\n"); + "handle synchronize cache\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; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 13:48:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 027B9FF2; Tue, 10 Feb 2015 13:48: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 C7EF4F7A; Tue, 10 Feb 2015 13:48: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 t1ADmnnH010807; Tue, 10 Feb 2015 13:48:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ADmnCg010806; Tue, 10 Feb 2015 13:48:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502101348.t1ADmnCg010806@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 10 Feb 2015 13:48:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278517 - stable/8/sys/dev/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 13:48:50 -0000 Author: hselasky Date: Tue Feb 10 13:48:49 2015 New Revision: 278517 URL: https://svnweb.freebsd.org/changeset/base/278517 Log: MFC r278105: Separate out detection of prevent and allow medium removal quirk. PR: 185747 Modified: stable/8/sys/dev/usb/usb_msctest.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Tue Feb 10 13:47:29 2015 (r278516) +++ stable/8/sys/dev/usb/usb_msctest.c Tue Feb 10 13:48:49 2015 (r278517) @@ -106,6 +106,8 @@ static uint8_t scsi_request_sense[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_read_capacity[] = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_prevent_removal[] = { 0x1e, 0, 0, 0, 1, 0 }; +static uint8_t scsi_allow_removal[] = { 0x1e, 0, 0, 0, 0, 0 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -675,10 +677,28 @@ usb_msc_auto_quirk(struct usb_device *ud USB_MS_HZ); if (err != 0) { + if (err != ERR_CSW_FAILED) + goto error; + DPRINTF("Test unit ready failed\n"); + } + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_prevent_removal, sizeof(scsi_prevent_removal), + USB_MS_HZ); + + if (err == 0) { + err = bbb_command_start(sc, DIR_OUT, 0, NULL, 0, + &scsi_allow_removal, sizeof(scsi_allow_removal), + USB_MS_HZ); + } + + if (err != 0) { if (err != ERR_CSW_FAILED) goto error; + DPRINTF("Device doesn't handle prevent and allow removal\n"); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } + timeout = 1; retry_sync_cache: @@ -691,11 +711,9 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache " - "and prevent allow medium removal\n"); + DPRINTF("Device doesn't handle synchronize cache\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -722,13 +740,10 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache nor" - "prevent allow medium removal\n"); + "handle synchronize cache\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; From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 16:34:44 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91065674; Tue, 10 Feb 2015 16:34: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 7A4CF38B; Tue, 10 Feb 2015 16:34: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 t1AGYi6a090552; Tue, 10 Feb 2015 16:34:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1AGYgVl090543; Tue, 10 Feb 2015 16:34:42 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502101634.t1AGYgVl090543@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 10 Feb 2015 16:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278522 - in stable/10/sys: amd64/include i386/include kern sys x86/include x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 16:34:44 -0000 Author: jhb Date: Tue Feb 10 16:34:42 2015 New Revision: 278522 URL: https://svnweb.freebsd.org/changeset/base/278522 Log: MFC 273800: Rework virtual machine hypervisor detection. - Move the existing code to x86/x86/identcpu.c since it is x86-specific. - If the CPUID2_HV flag is set, assume a hypervisor is present and query the 0x40000000 leaf to determine the hypervisor vendor ID. Export the vendor ID and the highest supported hypervisor CPUID leaf via hv_vendor[] and hv_high variables, respectively. The hv_vendor[] array is also exported via the hw.hv_vendor sysctl. - Merge the VMWare detection code from tsc.c into the new probe in identcpu.c. Add a VM_GUEST_VMWARE to identify vmware and use that in the TSC code to identify VMWare. Added: stable/10/sys/x86/include/vmware.h - copied unchanged from r273800, head/sys/x86/include/vmware.h Modified: stable/10/sys/amd64/include/md_var.h stable/10/sys/i386/include/md_var.h stable/10/sys/kern/subr_param.c stable/10/sys/sys/systm.h stable/10/sys/x86/x86/identcpu.c stable/10/sys/x86/x86/tsc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/include/md_var.h ============================================================================== --- stable/10/sys/amd64/include/md_var.h Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/amd64/include/md_var.h Tue Feb 10 16:34:42 2015 (r278522) @@ -63,6 +63,8 @@ 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[]; extern char kstack[]; extern char sigcode[]; extern int szsigcode; Modified: stable/10/sys/i386/include/md_var.h ============================================================================== --- stable/10/sys/i386/include/md_var.h Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/i386/include/md_var.h Tue Feb 10 16:34:42 2015 (r278522) @@ -66,6 +66,8 @@ extern u_int cyrix_did; #if defined(I586_CPU) && !defined(NO_F00F_HACK) extern int has_f00f_bug; #endif +extern u_int hv_high; +extern char hv_vendor[]; extern char kstack[]; extern char sigcode[]; extern int szsigcode; Modified: stable/10/sys/kern/subr_param.c ============================================================================== --- stable/10/sys/kern/subr_param.c Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/kern/subr_param.c Tue Feb 10 16:34:42 2015 (r278522) @@ -99,7 +99,11 @@ pid_t pid_max = PID_MAX; long maxswzone; /* max swmeta KVA storage */ long maxbcache; /* max buffer cache KVA storage */ long maxpipekva; /* Limit on pipe KVA */ -int vm_guest; /* Running as virtual machine guest? */ +#ifdef XEN +int vm_guest = VM_GUEST_XEN; +#else +int vm_guest = VM_GUEST_NO; /* Running as virtual machine guest? */ +#endif u_long maxtsiz; /* max text size */ u_long dfldsiz; /* initial data size limit */ u_long maxdsiz; /* max data size */ @@ -136,7 +140,7 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, "Amount to grow stack on a stack fault"); SYSCTL_PROC(_kern, OID_AUTO, vm_guest, CTLFLAG_RD | CTLTYPE_STRING, NULL, 0, sysctl_kern_vm_guest, "A", - "Virtual machine guest detected? (none|generic|xen)"); + "Virtual machine guest detected?"); /* * These have to be allocated somewhere; allocating @@ -154,73 +158,18 @@ static const char *const vm_guest_sysctl "generic", "xen", "hv", + "vmware", NULL }; CTASSERT(nitems(vm_guest_sysctl_names) - 1 == VM_LAST); -#ifndef XEN -static const char *const vm_bnames[] = { - "QEMU", /* QEMU */ - "Plex86", /* Plex86 */ - "Bochs", /* Bochs */ - "Xen", /* Xen */ - "BHYVE", /* bhyve */ - "Seabios", /* KVM */ - NULL -}; - -static const char *const vm_pnames[] = { - "VMware Virtual Platform", /* VMWare VM */ - "Virtual Machine", /* Microsoft VirtualPC */ - "VirtualBox", /* Sun xVM VirtualBox */ - "Parallels Virtual Platform", /* Parallels VM */ - "KVM", /* KVM */ - NULL -}; - - -/* - * Detect known Virtual Machine hosts by inspecting the emulated BIOS. - */ -static enum VM_GUEST -detect_virtual(void) -{ - char *sysenv; - int i; - - sysenv = getenv("smbios.bios.vendor"); - if (sysenv != NULL) { - for (i = 0; vm_bnames[i] != NULL; i++) - if (strcmp(sysenv, vm_bnames[i]) == 0) { - freeenv(sysenv); - return (VM_GUEST_VM); - } - freeenv(sysenv); - } - sysenv = getenv("smbios.system.product"); - if (sysenv != NULL) { - for (i = 0; vm_pnames[i] != NULL; i++) - if (strcmp(sysenv, vm_pnames[i]) == 0) { - freeenv(sysenv); - return (VM_GUEST_VM); - } - freeenv(sysenv); - } - return (VM_GUEST_NO); -} -#endif - /* * Boot time overrides that are not scaled against main memory */ void init_param1(void) { -#ifndef XEN - vm_guest = detect_virtual(); -#else - vm_guest = VM_GUEST_XEN; -#endif + hz = -1; TUNABLE_INT_FETCH("kern.hz", &hz); if (hz == -1) Modified: stable/10/sys/sys/systm.h ============================================================================== --- stable/10/sys/sys/systm.h Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/sys/systm.h Tue Feb 10 16:34:42 2015 (r278522) @@ -73,7 +73,7 @@ extern int vm_guest; /* Running as virt * Keep in sync with vm_guest_sysctl_names[]. */ enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN, VM_GUEST_HV, - VM_LAST }; + VM_GUEST_VMWARE, VM_LAST }; #if defined(WITNESS) || defined(INVARIANTS) void kassert_panic(const char *fmt, ...) __printflike(1, 2); Copied: stable/10/sys/x86/include/vmware.h (from r273800, head/sys/x86/include/vmware.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/x86/include/vmware.h Tue Feb 10 16:34:42 2015 (r278522, copy of r273800, head/sys/x86/include/vmware.h) @@ -0,0 +1,47 @@ +/*- + * Copyright (c) 2011-2014 Jung-uk Kim + * 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 _X86_VMWARE_H_ +#define _X86_VMWARE_H_ + +#define VMW_HVMAGIC 0x564d5868 +#define VMW_HVPORT 0x5658 +#define VMW_HVCMD_GETVERSION 10 +#define VMW_HVCMD_GETHZ 45 + +static __inline void +vmware_hvcall(u_int cmd, u_int *p) +{ + + __asm __volatile("inl %w3, %0" + : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) + : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) + : "memory"); +} + +#endif /* !_X86_VMWARE_H_ */ Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/x86/x86/identcpu.c Tue Feb 10 16:34:42 2015 (r278522) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -63,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef __i386__ #define IDENTBLUE_CYRIX486 0 @@ -76,6 +78,7 @@ static u_int find_cpu_vendor_id(void); static void print_AMD_info(void); static void print_INTEL_info(void); static void print_INTEL_TLB(u_int data); +static void print_hypervisor_info(void); static void print_svm_info(void); static void print_via_padlock_info(void); static void print_vmx_info(void); @@ -120,6 +123,11 @@ static int hw_clockrate; SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, &hw_clockrate, 0, "CPU instruction clock rate"); +u_int hv_high; +char hv_vendor[16]; +SYSCTL_STRING(_hw, OID_AUTO, hv_vendor, CTLFLAG_RD, hv_vendor, 0, + "Hypervisor vendor"); + static eventhandler_tag tsc_post_tag; static char cpu_brand[48]; @@ -949,7 +957,6 @@ printcpuinfo(void) if (tsc_perf_stat) printf(", performance statistics"); } - } #ifdef __i386__ } else if (cpu_vendor_id == CPU_VENDOR_CYRIX) { @@ -967,17 +974,18 @@ printcpuinfo(void) if (*cpu_vendor || cpu_id) printf("\n"); - if (!bootverbose) - return; - - if (cpu_vendor_id == CPU_VENDOR_AMD) - print_AMD_info(); - else if (cpu_vendor_id == CPU_VENDOR_INTEL) - print_INTEL_info(); + if (bootverbose) { + if (cpu_vendor_id == CPU_VENDOR_AMD) + print_AMD_info(); + else if (cpu_vendor_id == CPU_VENDOR_INTEL) + print_INTEL_info(); #ifdef __i386__ - else if (cpu_vendor_id == CPU_VENDOR_TRANSMETA) - print_transmeta_info(); + else if (cpu_vendor_id == CPU_VENDOR_TRANSMETA) + print_transmeta_info(); #endif + } + + print_hypervisor_info(); } void @@ -1182,6 +1190,99 @@ hook_tsc_freq(void *arg __unused) SYSINIT(hook_tsc_freq, SI_SUB_CONFIGURE, SI_ORDER_ANY, hook_tsc_freq, NULL); +#ifndef XEN +static const char *const vm_bnames[] = { + "QEMU", /* QEMU */ + "Plex86", /* Plex86 */ + "Bochs", /* Bochs */ + "Xen", /* Xen */ + "BHYVE", /* bhyve */ + "Seabios", /* KVM */ + NULL +}; + +static const char *const vm_pnames[] = { + "VMware Virtual Platform", /* VMWare VM */ + "Virtual Machine", /* Microsoft VirtualPC */ + "VirtualBox", /* Sun xVM VirtualBox */ + "Parallels Virtual Platform", /* Parallels VM */ + "KVM", /* KVM */ + NULL +}; + +static void +identify_hypervisor(void) +{ + u_int regs[4]; + char *p; + int i; + + /* + * [RFC] CPUID usage for interaction between Hypervisors and Linux. + * http://lkml.org/lkml/2008/10/1/246 + * + * KB1009458: Mechanisms to determine if software is running in + * a VMware virtual machine + * http://kb.vmware.com/kb/1009458 + */ + if (cpu_feature2 & CPUID2_HV) { + vm_guest = VM_GUEST_VM; + do_cpuid(0x40000000, regs); + if (regs[0] >= 0x40000000) { + hv_high = regs[0]; + ((u_int *)&hv_vendor)[0] = regs[1]; + ((u_int *)&hv_vendor)[1] = regs[2]; + ((u_int *)&hv_vendor)[2] = regs[3]; + hv_vendor[12] = '\0'; + if (strcmp(hv_vendor, "VMwareVMware") == 0) + vm_guest = VM_GUEST_VMWARE; + } + return; + } + + /* + * Examine SMBIOS strings for older hypervisors. + */ + p = getenv("smbios.system.serial"); + if (p != NULL) { + if (strncmp(p, "VMware-", 7) == 0 || strncmp(p, "VMW", 3) == 0) { + vmware_hvcall(VMW_HVCMD_GETVERSION, regs); + if (regs[1] == VMW_HVMAGIC) { + vm_guest = VM_GUEST_VMWARE; + freeenv(p); + return; + } + } + freeenv(p); + } + + /* + * XXX: Some of these entries may not be needed since they were + * added to FreeBSD before the checks above. + */ + p = getenv("smbios.bios.vendor"); + if (p != NULL) { + for (i = 0; vm_bnames[i] != NULL; i++) + if (strcmp(p, vm_bnames[i]) == 0) { + vm_guest = VM_GUEST_VM; + freeenv(p); + return; + } + freeenv(p); + } + p = getenv("smbios.system.product"); + if (p != NULL) { + for (i = 0; vm_pnames[i] != NULL; i++) + if (strcmp(p, vm_pnames[i]) == 0) { + vm_guest = VM_GUEST_VM; + freeenv(p); + return; + } + freeenv(p); + } +} +#endif + /* * Final stage of CPU identification. */ @@ -1213,6 +1314,9 @@ identify_cpu(void) cpu_feature2 = regs[2]; #endif +#ifndef XEN + identify_hypervisor(); +#endif cpu_vendor_id = find_cpu_vendor_id(); /* @@ -2049,3 +2153,11 @@ print_vmx_info(void) ); } } + +static void +print_hypervisor_info(void) +{ + + if (*hv_vendor) + printf("Hypervisor: Origin = \"%s\"\n", hv_vendor); +} Modified: stable/10/sys/x86/x86/tsc.c ============================================================================== --- stable/10/sys/x86/x86/tsc.c Tue Feb 10 16:17:16 2015 (r278521) +++ stable/10/sys/x86/x86/tsc.c Tue Feb 10 16:34:42 2015 (r278522) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "cpufreq_if.h" @@ -108,72 +109,11 @@ static struct timecounter tsc_timecounte 800, /* quality (adjusted in code) */ }; -#define VMW_HVMAGIC 0x564d5868 -#define VMW_HVPORT 0x5658 -#define VMW_HVCMD_GETVERSION 10 -#define VMW_HVCMD_GETHZ 45 - -static __inline void -vmware_hvcall(u_int cmd, u_int *p) -{ - - __asm __volatile("inl %w3, %0" - : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) - : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) - : "memory"); -} - -static int +static void tsc_freq_vmware(void) { - char hv_sig[13]; u_int regs[4]; - char *p; - u_int hv_high; - int i; - /* - * [RFC] CPUID usage for interaction between Hypervisors and Linux. - * http://lkml.org/lkml/2008/10/1/246 - * - * KB1009458: Mechanisms to determine if software is running in - * a VMware virtual machine - * http://kb.vmware.com/kb/1009458 - */ - hv_high = 0; - if ((cpu_feature2 & CPUID2_HV) != 0) { - do_cpuid(0x40000000, regs); - hv_high = regs[0]; - for (i = 1, p = hv_sig; i < 4; i++, p += sizeof(regs) / 4) - memcpy(p, ®s[i], sizeof(regs[i])); - *p = '\0'; - if (bootverbose) { - /* - * HV vendor ID string - * ------------+-------------- - * KVM "KVMKVMKVM" - * Microsoft "Microsoft Hv" - * VMware "VMwareVMware" - * Xen "XenVMMXenVMM" - */ - printf("Hypervisor: Origin = \"%s\"\n", hv_sig); - } - if (strncmp(hv_sig, "VMwareVMware", 12) != 0) - return (0); - } else { - p = getenv("smbios.system.serial"); - if (p == NULL) - return (0); - if (strncmp(p, "VMware-", 7) != 0 && - strncmp(p, "VMW", 3) != 0) { - freeenv(p); - return (0); - } - freeenv(p); - vmware_hvcall(VMW_HVCMD_GETVERSION, regs); - if (regs[1] != VMW_HVMAGIC) - return (0); - } if (hv_high >= 0x40000010) { do_cpuid(0x40000010, regs); tsc_freq = regs[0] * 1000; @@ -183,7 +123,6 @@ tsc_freq_vmware(void) tsc_freq = regs[0] | ((uint64_t)regs[1] << 32); } tsc_is_invariant = 1; - return (1); } static void @@ -267,8 +206,10 @@ probe_tsc_freq(void) } } - if (tsc_freq_vmware()) + if (vm_guest == VM_GUEST_VMWARE) { + tsc_freq_vmware(); return; + } switch (cpu_vendor_id) { case CPU_VENDOR_AMD: From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 21:30:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED2D9B1E; Tue, 10 Feb 2015 21:30: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 D77EDAAB; Tue, 10 Feb 2015 21:30: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 t1ALULWW034216; Tue, 10 Feb 2015 21:30:21 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALULrg034215; Tue, 10 Feb 2015 21:30:21 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502102130.t1ALULrg034215@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 10 Feb 2015 21:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278531 - stable/9/sys/x86/x86 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:30:22 -0000 Author: marius Date: Tue Feb 10 21:30:20 2015 New Revision: 278531 URL: https://svnweb.freebsd.org/changeset/base/278531 Log: Fix PAE build, bus_size_t still is 32 bit in that case. Modified: stable/9/sys/x86/x86/busdma_machdep.c Modified: stable/9/sys/x86/x86/busdma_machdep.c ============================================================================== --- stable/9/sys/x86/x86/busdma_machdep.c Tue Feb 10 20:45:40 2015 (r278530) +++ stable/9/sys/x86/x86/busdma_machdep.c Tue Feb 10 21:30:20 2015 (r278531) @@ -964,7 +964,7 @@ busdma_sysctl_tree_top(struct bounce_zon return (bz->sysctl_tree_top); } -#if defined(__amd64__) || defined(PAE) +#if defined(__amd64__) #define SYSCTL_ADD_BUS_SIZE_T SYSCTL_ADD_UQUAD #else #define SYSCTL_ADD_BUS_SIZE_T(ctx, parent, nbr, name, flag, ptr, desc) \ From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 21:40:32 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F76C2DB; Tue, 10 Feb 2015 21:40:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2971DC52; Tue, 10 Feb 2015 21:40:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1ALeWfU036731; Tue, 10 Feb 2015 21:40:32 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALeWgo036730; Tue, 10 Feb 2015 21:40:32 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502102140.t1ALeWgo036730@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 10 Feb 2015 21:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278533 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:40:32 -0000 Author: marius Date: Tue Feb 10 21:40:31 2015 New Revision: 278533 URL: https://svnweb.freebsd.org/changeset/base/278533 Log: MFC: r273050 class, subclass and progif were never used, so don't bother setting them. Modified: stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:33:32 2015 (r278532) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:40:31 2015 (r278533) @@ -261,16 +261,12 @@ sdhci_pci_attach(device_t dev) struct sdhci_pci_softc *sc = device_get_softc(dev); uint32_t model; uint16_t subvendor; - uint8_t class, subclass, progif; int bar, err, rid, slots, i; sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); - class = pci_get_class(dev); - subclass = pci_get_subclass(dev); - progif = pci_get_progif(dev); /* Apply chip specific quirks. */ for (i = 0; sdhci_devices[i].model != 0; i++) { if (sdhci_devices[i].model == model && From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 21:41:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E416502; Tue, 10 Feb 2015 21:41: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 0F143CFA; Tue, 10 Feb 2015 21:41: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 t1ALfuRD038626; Tue, 10 Feb 2015 21:41:56 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALfuK3038625; Tue, 10 Feb 2015 21:41:56 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502102141.t1ALfuK3038625@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 10 Feb 2015 21:41:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278534 - in stable: 10/sys/netinet 9/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:41:57 -0000 Author: jhb Date: Tue Feb 10 21:41:56 2015 New Revision: 278534 URL: https://svnweb.freebsd.org/changeset/base/278534 Log: MFC 277709: Use an sbuf to generate the output of the net.inet.tcp.hostcache.list sysctl to avoid a possible buffer overflow if the cache grows while the text is being generated. PR: 172675 Modified: stable/10/sys/netinet/tcp_hostcache.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/netinet/tcp_hostcache.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/10/sys/netinet/tcp_hostcache.c Tue Feb 10 21:40:31 2015 (r278533) +++ stable/10/sys/netinet/tcp_hostcache.c Tue Feb 10 21:41:56 2015 (r278534) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -592,30 +593,27 @@ tcp_hc_update(struct in_conninfo *inc, s static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { - int bufsize; int linesize = 128; - char *p, *buf; - int len, i, error; + struct sbuf sb; + int i, error; struct hc_metrics *hc_entry; #ifdef INET6 char ip6buf[INET6_ADDRSTRLEN]; #endif - bufsize = linesize * (V_tcp_hostcache.cache_count + 1); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), + SBUF_FIXEDLEN); - p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); - - len = snprintf(p, linesize, - "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " + sbuf_printf(&sb, + "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); - p += len; #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { - len = snprintf(p, linesize, + sbuf_printf(&sb, "%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu " "%4lu %4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : @@ -637,13 +635,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - p += len; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); } #undef msec - error = SYSCTL_OUT(req, buf, p - buf); - free(buf, M_TEMP); + sbuf_finish(&sb); + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); + sbuf_delete(&sb); return(error); } From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 21:41:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D966C503; Tue, 10 Feb 2015 21:41: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 A9803CFB; Tue, 10 Feb 2015 21:41: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 t1ALfv9Z038632; Tue, 10 Feb 2015 21:41:57 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALfv7C038631; Tue, 10 Feb 2015 21:41:57 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502102141.t1ALfv7C038631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 10 Feb 2015 21:41:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278534 - in stable: 10/sys/netinet 9/sys/netinet X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:41:58 -0000 Author: jhb Date: Tue Feb 10 21:41:56 2015 New Revision: 278534 URL: https://svnweb.freebsd.org/changeset/base/278534 Log: MFC 277709: Use an sbuf to generate the output of the net.inet.tcp.hostcache.list sysctl to avoid a possible buffer overflow if the cache grows while the text is being generated. PR: 172675 Modified: stable/9/sys/netinet/tcp_hostcache.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/netinet/tcp_hostcache.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/netinet/tcp_hostcache.c ============================================================================== --- stable/9/sys/netinet/tcp_hostcache.c Tue Feb 10 21:40:31 2015 (r278533) +++ stable/9/sys/netinet/tcp_hostcache.c Tue Feb 10 21:41:56 2015 (r278534) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -592,30 +593,27 @@ tcp_hc_update(struct in_conninfo *inc, s static int sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) { - int bufsize; int linesize = 128; - char *p, *buf; - int len, i, error; + struct sbuf sb; + int i, error; struct hc_metrics *hc_entry; #ifdef INET6 char ip6buf[INET6_ADDRSTRLEN]; #endif - bufsize = linesize * (V_tcp_hostcache.cache_count + 1); + sbuf_new(&sb, NULL, linesize * (V_tcp_hostcache.cache_count + 1), + SBUF_FIXEDLEN); - p = buf = (char *)malloc(bufsize, M_TEMP, M_WAITOK|M_ZERO); - - len = snprintf(p, linesize, - "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " + sbuf_printf(&sb, + "\nIP address MTU SSTRESH RTT RTTVAR BANDWIDTH " " CWND SENDPIPE RECVPIPE HITS UPD EXP\n"); - p += len; #define msec(u) (((u) + 500) / 1000) for (i = 0; i < V_tcp_hostcache.hashsize; i++) { THC_LOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); TAILQ_FOREACH(hc_entry, &V_tcp_hostcache.hashbase[i].hch_bucket, rmx_q) { - len = snprintf(p, linesize, + sbuf_printf(&sb, "%-15s %5lu %8lu %6lums %6lums %9lu %8lu %8lu %8lu " "%4lu %4lu %4i\n", hc_entry->ip4.s_addr ? inet_ntoa(hc_entry->ip4) : @@ -637,13 +635,13 @@ sysctl_tcp_hc_list(SYSCTL_HANDLER_ARGS) hc_entry->rmx_hits, hc_entry->rmx_updates, hc_entry->rmx_expire); - p += len; } THC_UNLOCK(&V_tcp_hostcache.hashbase[i].hch_mtx); } #undef msec - error = SYSCTL_OUT(req, buf, p - buf); - free(buf, M_TEMP); + sbuf_finish(&sb); + error = SYSCTL_OUT(req, sbuf_data(&sb), sbuf_len(&sb)); + sbuf_delete(&sb); return(error); } From owner-svn-src-stable@FreeBSD.ORG Tue Feb 10 21:44:29 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3FF4820; Tue, 10 Feb 2015 21:44: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 93E7FD24; Tue, 10 Feb 2015 21:44: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 t1ALiTIM040906; Tue, 10 Feb 2015 21:44:29 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ALiTjB040905; Tue, 10 Feb 2015 21:44:29 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201502102144.t1ALiTjB040905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Tue, 10 Feb 2015 21:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278535 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2015 21:44:29 -0000 Author: marius Date: Tue Feb 10 21:44:28 2015 New Revision: 278535 URL: https://svnweb.freebsd.org/changeset/base/278535 Log: MFC: r276469 - Switching the mode of Ricoh R5CE823 to SD2.0 causes their PCI device ID to change to 0xe822, which may be persistent across reboots and, thus, confuse other OSes. Therefore, restore the original mode and frequency setting on detach and shutdown. - Report Ricoh R5CE822 as such. - According to Linux, Ricoh R5CE822 also need SDHCI_QUIRK_LOWER_FREQUENCY. - Nuke an unused softc member. Modified: stable/10/sys/dev/sdhci/sdhci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci_pci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:41:56 2015 (r278534) +++ stable/10/sys/dev/sdhci/sdhci_pci.c Tue Feb 10 21:44:28 2015 (r278535) @@ -71,7 +71,7 @@ __FBSDID("$FreeBSD$"); */ #define SDHC_PCI_MODE_KEY 0xf9 #define SDHC_PCI_MODE 0x150 -#define SDHC_PCI_MODE_SD20 0x10 +#define SDHC_PCI_MODE_SD20 0x10 #define SDHC_PCI_BASE_FREQ_KEY 0xfc #define SDHC_PCI_BASE_FREQ 0xe1 @@ -83,8 +83,9 @@ static const struct sdhci_device { } sdhci_devices[] = { { 0x08221180, 0xffff, "RICOH R5C822 SD", SDHCI_QUIRK_FORCE_DMA }, - { 0xe8221180, 0xffff, "RICOH SD", - SDHCI_QUIRK_FORCE_DMA }, + { 0xe8221180, 0xffff, "RICOH R5CE822 SD", + SDHCI_QUIRK_FORCE_DMA | + SDHCI_QUIRK_LOWER_FREQUENCY }, { 0xe8231180, 0xffff, "RICOH R5CE823 SD", SDHCI_QUIRK_LOWER_FREQUENCY }, { 0x8034104c, 0xffff, "TI XX21/XX11 SD", @@ -109,7 +110,6 @@ static const struct sdhci_device { }; struct sdhci_pci_softc { - device_t dev; /* Controller device */ u_int quirks; /* Chip specific quirks */ struct resource *irq_res; /* IRQ resource */ void *intrhand; /* Interrupt handle */ @@ -117,6 +117,8 @@ struct sdhci_pci_softc { int num_slots; /* Number of slots on this controller */ struct sdhci_slot slots[6]; struct resource *mem_res[6]; /* Memory resource */ + uint8_t cfg_freq; /* Saved mode */ + uint8_t cfg_mode; /* Saved frequency */ }; static int sdhci_enable_msi = 1; @@ -207,21 +209,43 @@ static void sdhci_pci_intr(void *arg); static void sdhci_lower_frequency(device_t dev) { + struct sdhci_pci_softc *sc = device_get_softc(dev); - /* Enable SD2.0 mode. */ + /* + * Enable SD2.0 mode. + * NB: for RICOH R5CE823, this changes the PCI device ID to 0xe822. + */ pci_write_config(dev, SDHC_PCI_MODE_KEY, 0xfc, 1); + sc->cfg_mode = pci_read_config(dev, SDHC_PCI_MODE, 1); pci_write_config(dev, SDHC_PCI_MODE, SDHC_PCI_MODE_SD20, 1); pci_write_config(dev, SDHC_PCI_MODE_KEY, 0x00, 1); /* * Some SD/MMC cards don't work with the default base - * clock frequency of 200MHz. Lower it to 50Hz. + * clock frequency of 200 MHz. Lower it to 50 MHz. */ pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x01, 1); + sc->cfg_freq = pci_read_config(dev, SDHC_PCI_BASE_FREQ, 1); pci_write_config(dev, SDHC_PCI_BASE_FREQ, 50, 1); pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x00, 1); } +static void +sdhci_restore_frequency(device_t dev) +{ + struct sdhci_pci_softc *sc = device_get_softc(dev); + + /* Restore mode. */ + pci_write_config(dev, SDHC_PCI_MODE_KEY, 0xfc, 1); + pci_write_config(dev, SDHC_PCI_MODE, sc->cfg_mode, 1); + pci_write_config(dev, SDHC_PCI_MODE_KEY, 0x00, 1); + + /* Restore frequency. */ + pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x01, 1); + pci_write_config(dev, SDHC_PCI_BASE_FREQ, sc->cfg_freq, 1); + pci_write_config(dev, SDHC_PCI_BASE_FREQ_KEY, 0x00, 1); +} + static int sdhci_pci_probe(device_t dev) { @@ -263,7 +287,6 @@ sdhci_pci_attach(device_t dev) uint16_t subvendor; int bar, err, rid, slots, i; - sc->dev = dev; model = (uint32_t)pci_get_device(dev) << 16; model |= (uint32_t)pci_get_vendor(dev) & 0x0000ffff; subvendor = pci_get_subvendor(dev); @@ -353,6 +376,18 @@ sdhci_pci_detach(device_t dev) bus_release_resource(dev, SYS_RES_MEMORY, rman_get_rid(sc->mem_res[i]), sc->mem_res[i]); } + if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) + sdhci_restore_frequency(dev); + return (0); +} + +static int +sdhci_pci_shutdown(device_t dev) +{ + struct sdhci_pci_softc *sc = device_get_softc(dev); + + if (sc->quirks & SDHCI_QUIRK_LOWER_FREQUENCY) + sdhci_restore_frequency(dev); return (0); } @@ -398,6 +433,7 @@ static device_method_t sdhci_methods[] = DEVMETHOD(device_probe, sdhci_pci_probe), DEVMETHOD(device_attach, sdhci_pci_attach), DEVMETHOD(device_detach, sdhci_pci_detach), + DEVMETHOD(device_shutdown, sdhci_pci_shutdown), DEVMETHOD(device_suspend, sdhci_pci_suspend), DEVMETHOD(device_resume, sdhci_pci_resume), From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 02:43:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38E2E6B9; Wed, 11 Feb 2015 02: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 241CD8; Wed, 11 Feb 2015 02: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 t1B2hx3Z082990; Wed, 11 Feb 2015 02:43:59 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B2hwMY082989; Wed, 11 Feb 2015 02:43:58 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201502110243.t1B2hwMY082989@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Wed, 11 Feb 2015 02:43:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278550 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 02:43:59 -0000 Author: cy Date: Wed Feb 11 02:43:58 2015 New Revision: 278550 URL: https://svnweb.freebsd.org/changeset/base/278550 Log: MFC r277854: ipfilter 5.1.2 (vs 4.1.28 in previous releases of FreeBSD) stores IPv4 and IPv6 rules in a single table. ipf -6 -Fa will flush the whole table, including IPv4 rules. This patch removes the redundant ipf -I -6 -Fa statement. PR: 188318 Modified: stable/10/etc/rc.d/ipfilter Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/ipfilter ============================================================================== --- stable/10/etc/rc.d/ipfilter Wed Feb 11 02:02:56 2015 (r278549) +++ stable/10/etc/rc.d/ipfilter Wed Feb 11 02:43:58 2015 (r278550) @@ -65,7 +65,6 @@ ipfilter_reload() err 1 'Load of rules into alternate set failed; aborting reload' fi fi - ${ipfilter_program:-/sbin/ipf} -I -6 -Fa if [ -r "${ipv6_ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -I -6 \ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 06:57:22 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5A83A625; Wed, 11 Feb 2015 06:57: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 3BA4AAD; Wed, 11 Feb 2015 06:57: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 t1B6vM0u002300; Wed, 11 Feb 2015 06:57:22 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B6vL2P002293; Wed, 11 Feb 2015 06:57:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110657.t1B6vL2P002293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 06:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278554 - in stable/10: share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 06:57:22 -0000 Author: ngie Date: Wed Feb 11 06:57:20 2015 New Revision: 278554 URL: https://svnweb.freebsd.org/changeset/base/278554 Log: MFC r277663: r277663: Add MK_EE knob to control installing edit, ee, etc Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_EE - copied unchanged from r277663, head/tools/build/options/WITHOUT_EE Modified: stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 06:52:00 2015 (r278553) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 06:57:20 2015 (r278554) @@ -272,6 +272,7 @@ __DEFAULT_YES_OPTIONS = \ DICT \ DYNAMICROOT \ ED_CRYPTO \ + EE \ EXAMPLES \ FLOPPY \ FMTREE \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 06:52:00 2015 (r278553) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 06:57:20 2015 (r278554) @@ -1252,6 +1252,23 @@ OLD_FILES+=usr/share/dict/web2a OLD_FILES+=usr/share/dict/words .endif +.if ${MK_EE} == no +OLD_FILES+=usr/bin/edit +OLD_FILES+=usr/bin/ee +OLD_FILES+=usr/bin/ree +OLD_FILES+=usr/share/man/man1/edit.1.gz +OLD_FILES+=usr/share/man/man1/ee.1.gz +OLD_FILES+=usr/share/man/man1/ree.1.gz +OLD_FILES+=usr/share/nls/C/ee.cat +OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat +OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat +.endif + #.if ${MK_EXAMPLES} == no # to be filled in #.endif Copied: stable/10/tools/build/options/WITHOUT_EE (from r277663, head/tools/build/options/WITHOUT_EE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_EE Wed Feb 11 06:57:20 2015 (r278554, copy of r277663, head/tools/build/options/WITHOUT_EE) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Wed Feb 11 06:52:00 2015 (r278553) +++ stable/10/usr.bin/Makefile Wed Feb 11 06:57:20 2015 (r278554) @@ -38,7 +38,6 @@ SUBDIR= alias \ dirname \ dpv \ du \ - ee \ elf2aout \ elfdump \ enigma \ @@ -232,6 +231,10 @@ SUBDIR+= calendar _clang= clang .endif +.if ${MK_EE} != "no" +SUBDIR+= ee +.endif + .if ${MK_GPL_DTC} != "yes" SUBDIR+= dtc .endif From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 07:08:36 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0375180E; Wed, 11 Feb 2015 07:08:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E093D19D; Wed, 11 Feb 2015 07:08: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 t1B78Z6m007325; Wed, 11 Feb 2015 07:08:35 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B78X35007316; Wed, 11 Feb 2015 07:08:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110708.t1B78X35007316@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:08:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278555 - in stable/10: etc/rc.d sbin share/man/man4 share/mk sys/modules tools/build/mk tools/build/options usr.bin usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:08:36 -0000 Author: ngie Date: Wed Feb 11 07:08:32 2015 New Revision: 278555 URL: https://svnweb.freebsd.org/changeset/base/278555 Log: MFC r277675,r277726,r278070: r277675: Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel modules, etc Sponsored by: EMC / Isilon Storage Division r277726: Build sbin/iscontrol again if MK_ISCSI != no Pointyhat to: me r278070: Remove duplicate MK_ISCSI block and sort the conditional blocks so this error won't crop up again in the future Reported by: gjb Added: stable/10/tools/build/options/WITHOUT_ISCSI - copied unchanged from r277675, head/tools/build/options/WITHOUT_ISCSI Modified: stable/10/etc/rc.d/Makefile stable/10/sbin/Makefile stable/10/share/man/man4/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -63,8 +63,6 @@ FILES= DAEMON \ ipropd_slave \ ipsec \ ${_ipxrouted} \ - iscsictl \ - iscsid \ ${_kadmind} \ ${_kdc} \ keyserv \ @@ -188,6 +186,11 @@ FILES+= bsnmpd _ipxrouted= ipxrouted .endif +.if ${MK_ISCSI} != "no" +FILES+= iscsictl +FILES+= iscsid +.endif + .if ${MK_JAIL} != "no" FILES+= jail .endif Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/sbin/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -35,7 +35,6 @@ SUBDIR=adjkerntz \ hastd \ ifconfig \ init \ - iscontrol \ kldconfig \ kldload \ kldstat \ @@ -82,6 +81,11 @@ SUBDIR+= atm SUBDIR+= devd .endif +.if ${MK_INET6} != "no" +SUBDIR+= ping6 +SUBDIR+= rtsol +.endif + .if ${MK_IPFILTER} != "no" SUBDIR+= ipf .endif @@ -91,6 +95,10 @@ SUBDIR+= ipfw SUBDIR+= natd .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscontrol +.endif + .if ${MK_NAND} != "no" SUBDIR+= nandfs SUBDIR+= newfs_nandfs @@ -101,11 +109,6 @@ SUBDIR+= pfctl SUBDIR+= pflogd .endif -.if ${MK_INET6} != "no" -SUBDIR+= ping6 -SUBDIR+= rtsol -.endif - .if ${MK_QUOTAS} != "no" SUBDIR+= quotacheck .endif Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/share/man/man4/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -208,8 +208,6 @@ MAN= aac.4 \ ipw.4 \ ipwfw.4 \ isci.4 \ - iscsi.4 \ - iscsi_initiator.4 \ isp.4 \ ispfw.4 \ iwi.4 \ @@ -861,6 +859,12 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_ISCSI} != "no" +MAN+= iscsi.4 +MAN+= iscsi_initiator.4 + +.endif + .if ${MK_TESTS} != "no" ATF= ${.CURDIR}/../../../contrib/atf .PATH: ${ATF}/doc Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:08:32 2015 (r278555) @@ -297,6 +297,7 @@ __DEFAULT_YES_OPTIONS = \ IPFILTER \ IPFW \ IPX \ + ISCSI \ JAIL \ KDUMP \ KERBEROS \ Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/sys/modules/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -166,8 +166,6 @@ SUBDIR= \ ${_ipw} \ ${_ipwfw} \ ${_isci} \ - iscsi \ - iscsi_initiator \ isp \ ${_ispfw} \ ${_iwi} \ @@ -435,6 +433,11 @@ _ipdivert= ipdivert _ipfw= ipfw .endif +.if ${MK_ISCSI} != "no" || defined(ALL_MODULES) +SUBDIR+= iscsi +SUBDIR+= iscsi_initiator +.endif + .if ${MK_NAND} != "no" || defined(ALL_MODULES) _nandfs= nandfs _nandsim= nandsim Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:08:32 2015 (r278555) @@ -2167,6 +2167,20 @@ OLD_FILES+=usr/share/man/man3/ipx_ntoa.3 OLD_FILES+=usr/share/man/man8/IPXrouted.8.gz .endif +.if ${MK_ISCSI} == no +OLD_FILES+=etc/rc.d/iscsictl +OLD_FILES+=etc/rc.d/iscsid +OLD_FILES+=sbin/iscontrol +OLD_FILES+=usr/bin/iscsictl +OLD_FILES+=usr/sbin/iscsid +OLD_FILES+=usr/share/man/man4/iscsi.4.gz +OLD_FILES+=usr/share/man/man4/iscsi_initiator.4.gz +OLD_FILES+=usr/share/man/man5/iscsi.conf.5.gz +OLD_FILES+=usr/share/man/man8/iscontrol.8.gz +OLD_FILES+=usr/share/man/man8/iscsictl.8.gz +OLD_FILES+=usr/share/man/man8/iscsid.8.gz +.endif + .if ${MK_JAIL} == no OLD_FILES+=etc/rc.d/jail OLD_FILES+=usr/sbin/jail Copied: stable/10/tools/build/options/WITHOUT_ISCSI (from r277675, head/tools/build/options/WITHOUT_ISCSI) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_ISCSI Wed Feb 11 07:08:32 2015 (r278555, copy of r277675, head/tools/build/options/WITHOUT_ISCSI) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr iscid 8 +and related utilities. Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/usr.bin/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -66,7 +66,6 @@ SUBDIR= alias \ id \ ipcrm \ ipcs \ - iscsictl \ join \ jot \ ${_kdump} \ @@ -253,6 +252,10 @@ _mkcsmapper= mkcsmapper _mkesdb= mkesdb .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscsictl +.endif + .if ${MK_KDUMP} != "no" SUBDIR+= kdump SUBDIR+= truss Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Wed Feb 11 06:57:20 2015 (r278554) +++ stable/10/usr.sbin/Makefile Wed Feb 11 07:08:32 2015 (r278555) @@ -39,7 +39,6 @@ SUBDIR= adduser \ ifmcstat \ inetd \ iostat \ - iscsid \ kldxref \ mailwrapper \ makefs \ @@ -183,6 +182,10 @@ SUBDIR+= ipfwpcap SUBDIR+= IPXrouted .endif +.if ${MK_ISCSI} != "no" +SUBDIR+= iscsid +.endif + .if ${MK_JAIL} != "no" SUBDIR+= jail SUBDIR+= jexec From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 07:12:02 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 98BA1958; Wed, 11 Feb 2015 07:12:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A9F8243; Wed, 11 Feb 2015 07:12:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7C2XV011304; Wed, 11 Feb 2015 07:12:02 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7C0ao011285; Wed, 11 Feb 2015 07:12:00 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110712.t1B7C0ao011285@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:12:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278556 - in stable/10: etc/rc.d sbin share/examples share/mk tools/build/mk tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:12:02 -0000 Author: ngie Date: Wed Feb 11 07:12:00 2015 New Revision: 278556 URL: https://svnweb.freebsd.org/changeset/base/278556 Log: MFC r277725: r277725: Add MK_HAST knob for building and installing hastd(8), et al Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_HAST - copied unchanged from r277725, head/tools/build/options/WITHOUT_HAST Modified: stable/10/etc/rc.d/Makefile stable/10/sbin/Makefile stable/10/share/examples/Makefile stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 07:12:00 2015 (r278556) @@ -46,7 +46,6 @@ FILES= DAEMON \ geli2 \ gptboot \ gssd \ - hastd \ ${_hcsecd} \ hostid \ hostid_save \ @@ -186,6 +185,10 @@ FILES+= bsnmpd _ipxrouted= ipxrouted .endif +.if ${MK_HAST} != "no" +FILES+= hastd +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/sbin/Makefile Wed Feb 11 07:12:00 2015 (r278556) @@ -31,8 +31,6 @@ SUBDIR=adjkerntz \ ggate \ growfs \ gvinum \ - hastctl \ - hastd \ ifconfig \ init \ kldconfig \ @@ -81,6 +79,11 @@ SUBDIR+= atm SUBDIR+= devd .endif +.if ${MK_HAST} != "no" +SUBDIR+= hastctl +SUBDIR+= hastd +.endif + .if ${MK_INET6} != "no" SUBDIR+= ping6 SUBDIR+= rtsol Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/share/examples/Makefile Wed Feb 11 07:12:00 2015 (r278556) @@ -14,7 +14,6 @@ LDIRS= BSD_daemon \ drivers \ etc \ find_interface \ - hast \ ibcs2 \ indent \ ipfw \ @@ -64,11 +63,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ - hast/ucarp.sh \ - hast/ucarp_down.sh \ - hast/ucarp_up.sh \ - hast/vip-down.sh \ - hast/vip-up.sh \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ @@ -202,6 +196,15 @@ BINDIR= ${SHAREDIR}/examples NO_OBJ= +.if ${MK_HAST} != "no" +LDIRS+= hast +XFILES+= hast/ucarp.sh \ + hast/ucarp_down.sh \ + hast/ucarp_up.sh \ + hast/vip-down.sh \ + hast/vip-up.sh +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:12:00 2015 (r278556) @@ -288,6 +288,7 @@ __DEFAULT_YES_OPTIONS = \ GPIO \ GPL_DTC \ GROFF \ + HAST \ HTML \ ICONV \ INET \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:08:32 2015 (r278555) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:12:00 2015 (r278556) @@ -1987,6 +1987,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz OLD_FILES+=usr/share/man/man8/gssd.8.gz .endif +.if ${MK_HAST} == no +OLD_FILES+=sbin/hastctl +OLD_FILES+=sbin/hastd +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/man/man5/hast.conf.5.gz +OLD_FILES+=usr/share/man/man8/hastctl.8.gz +OLD_FILES+=usr/share/man/man8/hastd.8.gz +OLD_DIRS+=usr/share/examples/hast +.endif + .if ${MK_HESIOD} == no OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/hesiod.h Copied: stable/10/tools/build/options/WITHOUT_HAST (from r277725, head/tools/build/options/WITHOUT_HAST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_HAST Wed Feb 11 07:12:00 2015 (r278556, copy of r277725, head/tools/build/options/WITHOUT_HAST) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr hastd 8 +and related utilities. From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 07:21:19 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B011AAE0; Wed, 11 Feb 2015 07:21: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 90CB6335; Wed, 11 Feb 2015 07:21: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 t1B7LJNI014082; Wed, 11 Feb 2015 07:21:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7LHQj014072; Wed, 11 Feb 2015 07:21:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110721.t1B7LHQj014072@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278557 - in stable/10: lib share/examples share/man/man4 share/mk sys/modules tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:21:19 -0000 Author: ngie Date: Wed Feb 11 07:21:16 2015 New Revision: 278557 URL: https://svnweb.freebsd.org/changeset/base/278557 Log: MFC r277727: r277727: Add MK_BHYVE knob for building and installing bhyve(4), et al Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_BHYVE - copied unchanged from r277727, head/tools/build/options/WITHOUT_BHYVE Modified: stable/10/lib/Makefile stable/10/share/examples/Makefile stable/10/share/man/man4/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile.amd64 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/lib/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -225,8 +225,10 @@ _librtld_db= librtld_db .endif .if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" _libvmmapi= libvmmapi .endif +.endif .if ${MACHINE_CPUARCH} == "ia64" _libefi= libefi Modified: stable/10/share/examples/Makefile ============================================================================== --- stable/10/share/examples/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/share/examples/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -7,7 +7,6 @@ LDIRS= BSD_daemon \ FreeBSD_version \ IPv6 \ - bhyve \ bootforth \ csh \ diskless \ @@ -41,7 +40,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ FreeBSD_version/Makefile \ FreeBSD_version/README \ IPv6/USAGE \ - bhyve/vmrun.sh \ bootforth/README \ bootforth/boot.4th \ bootforth/frames.4th \ @@ -205,6 +203,13 @@ XFILES+= hast/ucarp.sh \ hast/vip-up.sh .endif +.if ${MACHINE_CPUARCH} == "amd64" +.if ${MK_BHYVE} != "no" +LDIRS+= bhyve +XFILES+= bhyve/vmrun.sh +.endif +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/share/man/man4/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -836,7 +836,6 @@ MLINKS+=lindev.4 full.4 .endif .if ${MACHINE_CPUARCH} == "amd64" -_bhyve.4= bhyve.4 _if_ntb.4= if_ntb.4 _ntb.4= ntb.4 _ntb_hw.4= ntb_hw.4 @@ -849,6 +848,10 @@ MLINKS+=qlxge.4 if_qlxge.4 MLINKS+=qlxgb.4 if_qlxgb.4 MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 + +.if ${MK_BHYVE} != "no" +_bhyve.4= bhyve.4 +.endif .endif .if ${MACHINE_CPUARCH} == "mips" Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:21:16 2015 (r278557) @@ -254,6 +254,7 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ + BHYVE \ BINUTILS \ BLUETOOTH \ BMAKE \ Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/sys/modules/Makefile Wed Feb 11 07:21:16 2015 (r278557) @@ -774,7 +774,9 @@ _twa= twa _vesa= vesa _viawd= viawd _virtio= virtio +.if ${MK_BHYVE} != "no" || defined(ALL_MODULES) _vmm= vmm +.endif _vxge= vxge _x86bios= x86bios _wbwd= wbwd Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:21:16 2015 (r278557) @@ -144,6 +144,16 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz .endif +.if ${MK_BHYVE} == no +OLD_FILES+=usr/sbin/bhyve +OLD_FILES+=usr/sbin/bhyvectl +OLD_FILES+=usr/sbin/bhyveload +OLD_FILES+=usr/share/examples/bhyve/vmrun.sh +OLD_FILES+=usr/share/man/man8/bhyve.8.gz +OLD_FILES+=usr/share/man/man8/bhyveload.8.gz +OLD_DIRS+=usr/share/examples/bhyve +.endif + .if ${MK_BLUETOOTH} == no OLD_FILES+=etc/bluetooth/hcsecd.conf OLD_FILES+=etc/bluetooth/hosts Copied: stable/10/tools/build/options/WITHOUT_BHYVE (from r277727, head/tools/build/options/WITHOUT_BHYVE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_BHYVE Wed Feb 11 07:21:16 2015 (r278557, copy of r277727, head/tools/build/options/WITHOUT_BHYVE) @@ -0,0 +1,6 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr bhyve 8 , +associated utilities, and examples. +.Pp +This option only affects amd64/amd64. Modified: stable/10/usr.sbin/Makefile.amd64 ============================================================================== --- stable/10/usr.sbin/Makefile.amd64 Wed Feb 11 07:12:00 2015 (r278556) +++ stable/10/usr.sbin/Makefile.amd64 Wed Feb 11 07:21:16 2015 (r278557) @@ -10,9 +10,11 @@ SUBDIR+= acpi SUBDIR+= apm .endif SUBDIR+= asf +.if ${MK_BHYVE} != "no" SUBDIR+= bhyve SUBDIR+= bhyvectl SUBDIR+= bhyveload +.endif SUBDIR+= boot0cfg .if ${MK_TOOLCHAIN} != "no" SUBDIR+= btxld From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 07:30:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 004D2D94; Wed, 11 Feb 2015 07:30: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 DDC33379; Wed, 11 Feb 2015 07:30: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 t1B7UNJO019641; Wed, 11 Feb 2015 07:30:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7ULvQ019447; Wed, 11 Feb 2015 07:30:21 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110730.t1B7ULvQ019447@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:30:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278558 - in stable/10: etc etc/rc.d share/man/man5 share/mk sys/modules tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:30:24 -0000 Author: ngie Date: Wed Feb 11 07:30:20 2015 New Revision: 278558 URL: https://svnweb.freebsd.org/changeset/base/278558 Log: MFC r277728: r277728: Add MK_AUTOFS knob for building and installing autofs(4), et al Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_AUTOFS - copied unchanged from r277728, head/tools/build/options/WITHOUT_AUTOFS Modified: stable/10/etc/Makefile stable/10/etc/rc.d/Makefile stable/10/share/man/man5/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/etc/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -14,8 +14,7 @@ SUBDIR+=sendmail SUBDIR+=tests .endif -BIN1= auto_master \ - crontab \ +BIN1= crontab \ devd.conf \ devfs.conf \ ddb.conf \ @@ -90,6 +89,10 @@ BIN1+= amd.map BIN1+= apmd.conf .endif +.if ${MK_AUTOFS} != "no" +BIN1+= auto_master +.endif + .if ${MK_BSNMP} != "no" BIN1+= snmpd.config .endif @@ -229,7 +232,9 @@ distribution: echo "./etc/spwd.db type=file mode=0600 uname=root gname=wheel"; \ ) | ${METALOG.add} .endif +.if ${MK_AUTOFS} != "no" ${_+_}cd ${.CURDIR}/autofs; ${MAKE} install +.endif .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -17,9 +17,6 @@ FILES= DAEMON \ atm3 \ auditd \ auditdistd \ - automount \ - automountd \ - autounmountd \ bgfsck \ ${_bluetooth} \ bootparams \ @@ -170,6 +167,12 @@ FILES+= apm FILES+= apmd .endif +.if ${MK_AUTOFS} != "no" +FILES+= automount +FILES+= automountd +FILES+= autounmountd +.endif + .if ${MK_BLUETOOTH} != "no" _bluetooth= bluetooth _bthidd= bthidd Modified: stable/10/share/man/man5/Makefile ============================================================================== --- stable/10/share/man/man5/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/share/man/man5/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -7,7 +7,6 @@ MAN= acct.5 \ ar.5 \ a.out.5 \ - autofs.5 \ bluetooth.device.conf.5 \ bluetooth.hosts.5 \ bluetooth.protocols.5 \ @@ -80,6 +79,10 @@ MLINKS+=quota.user.5 quota.group.5 MLINKS+=rc.conf.5 rc.conf.local.5 MLINKS+=resolver.5 resolv.conf.5 +.if ${MK_AUTOFS} != "no" +MAN+= autofs.5 +.endif + .if ${MK_FREEBSD_UPDATE} != "no" MAN+= freebsd-update.conf.5 .endif Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 07:30:20 2015 (r278558) @@ -254,6 +254,7 @@ __DEFAULT_YES_OPTIONS = \ ATM \ AUDIT \ AUTHPF \ + AUTOFS \ BHYVE \ BINUTILS \ BLUETOOTH \ Modified: stable/10/sys/modules/Makefile ============================================================================== --- stable/10/sys/modules/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/sys/modules/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -44,7 +44,7 @@ SUBDIR= \ ata \ ath \ ath_pci \ - autofs \ + ${_autofs} \ ${_auxio} \ ${_bce} \ bfe \ @@ -404,6 +404,10 @@ _cxgb= cxgb _cxgbe= cxgbe .endif +.if ${MK_AUTOFS} != "no" || defined(ALL_MODULES) +_autofs= autofs +.endif + .if ${MK_CRYPT} != "no" || defined(ALL_MODULES) .if exists(${.CURDIR}/../opencrypto) _crypto= crypto Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 07:30:20 2015 (r278558) @@ -144,6 +144,26 @@ OLD_FILES+=usr/share/man/man8/authpf.8.g OLD_FILES+=usr/share/man/man8/authpf-noip.8.gz .endif +.if ${MK_AUTOFS} == no +OLD_FILES+=etc/autofs/include_ldap +OLD_FILES+=etc/autofs/special_hosts +OLD_FILES+=etc/autofs/special_media +OLD_FILES+=etc/autofs/special_null +OLD_FILES+=etc/auto_master +OLD_FILES+=etc/rc.d/automount +OLD_FILES+=etc/rc.d/automountd +OLD_FILES+=etc/rc.d/autounmountd +OLD_FILES+=usr/sbin/automount +OLD_FILES+=usr/sbin/automountd +OLD_FILES+=usr/sbin/autounmountd +OLD_FILES+=usr/share/man/man5/autofs.5.gz +OLD_FILES+=usr/share/man/man5/auto_master.5.gz +OLD_FILES+=usr/share/man/man8/automount.8.gz +OLD_FILES+=usr/share/man/man8/automountd.8.gz +OLD_FILES+=usr/share/man/man8/autounmountd.8.gz +OLD_DIRS+=etc/autofs +.endif + .if ${MK_BHYVE} == no OLD_FILES+=usr/sbin/bhyve OLD_FILES+=usr/sbin/bhyvectl Copied: stable/10/tools/build/options/WITHOUT_AUTOFS (from r277728, head/tools/build/options/WITHOUT_AUTOFS) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_AUTOFS Wed Feb 11 07:30:20 2015 (r278558, copy of r277728, head/tools/build/options/WITHOUT_AUTOFS) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr autofs 4 +related programs, libraries, and kernel modules. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Wed Feb 11 07:21:16 2015 (r278557) +++ stable/10/usr.sbin/Makefile Wed Feb 11 07:30:20 2015 (r278558) @@ -5,7 +5,6 @@ SUBDIR= adduser \ arp \ - autofs \ binmiscctl \ bootparamd \ bsdconfig \ @@ -125,6 +124,10 @@ SUBDIR+= praudit SUBDIR+= authpf .endif +.if ${MK_AUTOFS} != "no" +SUBDIR+= autofs +.endif + .if ${MK_BLUETOOTH} != "no" SUBDIR+= bluetooth .endif From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 07:38:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AFA7BC9; Wed, 11 Feb 2015 07:38:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A8CD644; Wed, 11 Feb 2015 07:38:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B7c8Ab021591; Wed, 11 Feb 2015 07:38:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7c8OL021590; Wed, 11 Feb 2015 07:38:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110738.t1B7c8OL021590@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:38:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278559 - stable/10/tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:38:08 -0000 Author: ngie Date: Wed Feb 11 07:38:07 2015 New Revision: 278559 URL: https://svnweb.freebsd.org/changeset/base/278559 Log: MFC r264515: r264515 (by imp): Document WITHOUT_GPL_DTC too. Added: stable/10/tools/build/options/WITHOUT_GPL_DTC - copied unchanged from r264515, head/tools/build/options/WITHOUT_GPL_DTC Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/tools/build/options/WITHOUT_GPL_DTC (from r264515, head/tools/build/options/WITHOUT_GPL_DTC) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_GPL_DTC Wed Feb 11 07:38:07 2015 (r278559, copy of r264515, head/tools/build/options/WITHOUT_GPL_DTC) @@ -0,0 +1,3 @@ +.\" $FreeBSD$ +Set to build the BSD licensed version of the device tree compiler, instead of the +GPL'd one from elinux.org. From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 07:53:03 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8213B628; Wed, 11 Feb 2015 07:53: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 62ABB83C; Wed, 11 Feb 2015 07:53: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 t1B7r3w7030574; Wed, 11 Feb 2015 07:53:03 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B7r3t5030573; Wed, 11 Feb 2015 07:53:03 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110753.t1B7r3t5030573@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 07:53:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278562 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 07:53:03 -0000 Author: ngie Date: Wed Feb 11 07:53:02 2015 New Revision: 278562 URL: https://svnweb.freebsd.org/changeset/base/278562 Log: Regen src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Wed Feb 11 07:49:00 2015 (r278561) +++ stable/10/share/man/man5/src.conf.5 Wed Feb 11 07:53:02 2015 (r278562) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd September 25, 2014 +.Dd February 10, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -124,6 +124,18 @@ Set to not build audit support into syst .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTHPF 156932 2006-03-21 07:50:50Z ru Set to not build .Xr authpf 8 . +.It Va WITHOUT_AUTOFS +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_AUTOFS 278558 2015-02-11 07:30:20Z ngie +Set to not build +.Xr autofs 4 +related programs, libraries, and kernel modules. +.It Va WITHOUT_BHYVE +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BHYVE 278557 2015-02-11 07:21:16Z ngie +Set to not build or install +.Xr bhyve 8 , +associated utilities, and examples. +.Pp +This option only affects amd64/amd64. .It Va WITHOUT_BINUTILS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BINUTILS 255974 2013-10-01 17:40:56Z emaste Set to not install binutils (as, c++-filt, gconv, @@ -341,6 +353,12 @@ dynamically. Set to build .Xr ed 1 without support for encryption/decryption. +.It Va WITHOUT_EE +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_EE 278554 2015-02-11 06:57:20Z ngie +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. .It Va WITHOUT_EXAMPLES .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to @@ -448,10 +466,10 @@ Set to not build GPIB bus support. Set to not build .Xr gpioctl 8 as part of the base system. -.It Va WITH_GPL_DTC -.\" from FreeBSD: stable/10/tools/build/options/WITH_GPL_DTC 246262 2013-02-02 22:42:46Z dim -Set to build the GPL'd version of the device tree compiler from elinux.org, -instead of the BSD licensed one. +.It Va WITHOUT_GPL_DTC +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GPL_DTC 278559 2015-02-11 07:38:07Z ngie +Set to build the BSD licensed version of the device tree compiler, instead of the +GPL'd one from elinux.org. .It Va WITHOUT_GROFF .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GROFF 218941 2011-02-22 08:13:49Z uqs Set to not build @@ -463,6 +481,11 @@ You should consider installing the textp .It Va WITHOUT_GSSAPI .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. +.It Va WITHOUT_HAST +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HAST 278556 2015-02-11 07:12:00Z ngie +Set to not build +.Xr hastd 8 +and related utilities. .It Va WITH_HESIOD .\" from FreeBSD: stable/10/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. @@ -470,13 +493,13 @@ Set to build Hesiod support. .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HTML 156932 2006-03-21 07:50:50Z ru Set to not build HTML docs. .It Va WITHOUT_HYPERV -.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HYPERV 272128 2014-09-25 20:34:13Z delphij +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_HYPERV 272322 2014-09-30 17:54:57Z delphij Set to not build or install HyperV utilities. .Pp It is a default setting on arm/arm, arm/armeb, arm/armv6, ia64/ia64, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITH_HYPERV -.\" from FreeBSD: stable/10/tools/build/options/WITH_HYPERV 272128 2014-09-25 20:34:13Z delphij +.\" from FreeBSD: stable/10/tools/build/options/WITH_HYPERV 272322 2014-09-30 17:54:57Z delphij Set to build and install HyperV utilities. .Pp It is a default setting on @@ -548,6 +571,11 @@ When set, it also enforces the following .It Va WITHOUT_IPX_SUPPORT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_IPX_SUPPORT 156932 2006-03-21 07:50:50Z ru Set to build some programs without IPX support. +.It Va WITHOUT_ISCSI +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_ISCSI 278555 2015-02-11 07:08:32Z ngie +Set to not build +.Xr iscid 8 +and related utilities. .It Va WITHOUT_JAIL .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_JAIL 249966 2013-04-27 04:09:09Z eadler Set to not build tools for the support of jails; e.g., From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 08:07:33 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63BD9A3A; Wed, 11 Feb 2015 08:07:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ECA797F; Wed, 11 Feb 2015 08:07:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B87XH6035870; Wed, 11 Feb 2015 08:07:33 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B87XIH035869; Wed, 11 Feb 2015 08:07:33 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502110807.t1B87XIH035869@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 Feb 2015 08:07:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278563 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:07:33 -0000 Author: bapt Date: Wed Feb 11 08:07:32 2015 New Revision: 278563 URL: https://svnweb.freebsd.org/changeset/base/278563 Log: MFC: r278172 Plug resources leak CID: 1125813 CID: 1125807 CID: 1125808 Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 07:53:02 2015 (r278562) +++ stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 08:07:32 2015 (r278563) @@ -375,8 +375,11 @@ load_fingerprints(const char *path, int return (NULL); STAILQ_INIT(fingerprints); - if ((d = opendir(path)) == NULL) + if ((d = opendir(path)) == NULL) { + free(fingerprints); + return (NULL); + } while ((ent = readdir(d))) { if (strcmp(ent->d_name, ".") == 0 || @@ -806,8 +809,11 @@ cleanup: close(fd_sig); unlink(tmpsig); } - close(fd_pkg); - unlink(tmppkg); + + if (fd_pkg != -1) { + close(fd_pkg); + unlink(tmppkg); + } return (ret); } @@ -851,7 +857,7 @@ bootstrap_pkg_local(const char *pkgpath, if (config_string(SIGNATURE_TYPE, &signature_type) != 0) { warnx("Error looking up SIGNATURE_TYPE"); - return (-1); + goto cleanup; } if (signature_type != NULL && strcasecmp(signature_type, "FINGERPRINTS") == 0) { From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 08:20:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7FE9CBE; Wed, 11 Feb 2015 08:20: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 C34F4A7F; Wed, 11 Feb 2015 08:20: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 t1B8K8Zm040981; Wed, 11 Feb 2015 08:20:08 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B8K8iU040980; Wed, 11 Feb 2015 08:20:08 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201502110820.t1B8K8iU040980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Wed, 11 Feb 2015 08:20:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278564 - stable/10/usr.sbin/pkg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:20:09 -0000 Author: bapt Date: Wed Feb 11 08:20:07 2015 New Revision: 278564 URL: https://svnweb.freebsd.org/changeset/base/278564 Log: MFC: r278173 Test the return of fetchParseURL(3) CID: 1125811 Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 08:07:32 2015 (r278563) +++ stable/10/usr.sbin/pkg/pkg.c Wed Feb 11 08:20:07 2015 (r278564) @@ -202,7 +202,11 @@ fetch_to_fd(const char *url, char *path) retry = max_retry; - u = fetchParseURL(url); + if ((u = fetchParseURL(url)) == NULL) { + warn("fetchParseURL('%s')", url); + return (-1); + } + while (remote == NULL) { if (retry == max_retry) { if (strcmp(u->scheme, "file") != 0 && From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 08:33:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 735B05EB; Wed, 11 Feb 2015 08:33: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 5CF39C79; Wed, 11 Feb 2015 08:33: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 t1B8XOur050136; Wed, 11 Feb 2015 08:33:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B8XNpZ050127; Wed, 11 Feb 2015 08:33:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110833.t1B8XNpZ050127@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 08:33:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278568 - in stable/9: share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:33:24 -0000 Author: ngie Date: Wed Feb 11 08:33:22 2015 New Revision: 278568 URL: https://svnweb.freebsd.org/changeset/base/278568 Log: MFstable/10 r278554: r278554: MFC r277663: r277663: Add MK_EE knob to control installing edit, ee, etc Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_EE - copied unchanged from r278554, stable/10/tools/build/options/WITHOUT_EE Modified: stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.bin/Makefile Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Wed Feb 11 08:28:57 2015 (r278567) +++ stable/9/share/mk/bsd.own.mk Wed Feb 11 08:33:22 2015 (r278568) @@ -358,6 +358,7 @@ __DEFAULT_YES_OPTIONS = \ CXX \ DICT \ DYNAMICROOT \ + EE \ EXAMPLES \ FLOPPY \ FORTH \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 08:28:57 2015 (r278567) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 08:33:22 2015 (r278568) @@ -1458,6 +1458,23 @@ OLD_FILES+=usr/share/dict/web2a OLD_FILES+=usr/share/dict/words .endif +.if ${MK_EE} == no +OLD_FILES+=usr/bin/edit +OLD_FILES+=usr/bin/ee +OLD_FILES+=usr/bin/ree +OLD_FILES+=usr/share/man/man1/edit.1.gz +OLD_FILES+=usr/share/man/man1/ee.1.gz +OLD_FILES+=usr/share/man/man1/ree.1.gz +OLD_FILES+=usr/share/nls/C/ee.cat +OLD_FILES+=usr/share/nls/de_DE.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/fr_FR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/hu_HU.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pl_PL.ISO8859-2/ee.cat +OLD_FILES+=usr/share/nls/pt_BR.ISO8859-1/ee.cat +OLD_FILES+=usr/share/nls/ru_RU.KOI8-R/ee.cat +OLD_FILES+=usr/share/nls/uk_UA.KOI8-U/ee.cat +.endif + #.if ${MK_EXAMPLES} == no # to be filled in #.endif Copied: stable/9/tools/build/options/WITHOUT_EE (from r278554, stable/10/tools/build/options/WITHOUT_EE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_EE Wed Feb 11 08:33:22 2015 (r278568, copy of r278554, stable/10/tools/build/options/WITHOUT_EE) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Wed Feb 11 08:28:57 2015 (r278567) +++ stable/9/usr.bin/Makefile Wed Feb 11 08:33:22 2015 (r278568) @@ -37,7 +37,6 @@ SUBDIR= alias \ cut \ dirname \ du \ - ee \ elf2aout \ elfdump \ enigma \ @@ -236,6 +235,10 @@ SUBDIR+= calendar _clang= clang .endif +.if ${MK_EE} != "no" +SUBDIR+= ee +.endif + .if ${MK_HESIOD} != "no" SUBDIR+= hesinfo .endif From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 08:52:32 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39CAEA78; Wed, 11 Feb 2015 08:52:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23380E65; Wed, 11 Feb 2015 08:52:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B8qWiD059469; Wed, 11 Feb 2015 08:52:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B8qUfk059454; Wed, 11 Feb 2015 08:52:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110852.t1B8qUfk059454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 08:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278569 - in stable/10: . lib lib/libpam/modules share/mk tools/build/options usr.sbin/ppp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 08:52:32 -0000 Author: ngie Date: Wed Feb 11 08:52:29 2015 New Revision: 278569 URL: https://svnweb.freebsd.org/changeset/base/278569 Log: MFC r278182: r278182: Conditionalize building radius support into libpam, ppp, etc via MK_RADIUS_SUPPORT Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT - copied unchanged from r278182, head/tools/build/options/WITHOUT_RADIUS_SUPPORT Modified: stable/10/Makefile.inc1 stable/10/lib/Makefile stable/10/lib/libpam/modules/modules.inc stable/10/share/mk/bsd.own.mk stable/10/usr.sbin/ppp/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/Makefile.inc1 Wed Feb 11 08:52:29 2015 (r278569) @@ -1537,7 +1537,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ lib/libopie lib/libpam ${_lib_libthr} \ - lib/libradius lib/libsbuf lib/libtacplus \ + ${_lib_libradius} lib/libsbuf lib/libtacplus \ lib/libgeom \ ${_cddl_lib_libumem} ${_cddl_lib_libnvpair} \ ${_cddl_lib_libuutil} \ @@ -1567,6 +1567,10 @@ _lib_atf= lib/atf _lib_libthr= lib/libthr .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_lib_libradius= lib/libradius +.endif + .if ${MK_OFED} != "no" _ofed_lib= contrib/ofed/usr.lib/ .endif Modified: stable/10/lib/Makefile ============================================================================== --- stable/10/lib/Makefile Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/lib/Makefile Wed Feb 11 08:52:29 2015 (r278569) @@ -75,7 +75,7 @@ SUBDIR= ${SUBDIR_ORDERED} \ ${_libpmc} \ ${_libproc} \ libprocstat \ - libradius \ + ${_libradius} \ librpcsvc \ librt \ ${_librtld_db} \ @@ -131,7 +131,7 @@ SUBDIR_DEPEND_liblibrpcsec_gss= libgssap SUBDIR_DEPEND_libmagic= libz SUBDIR_DEPEND_libmemstat= libkvm SUBDIR_DEPEND_libopie= libmd -SUBDIR_DEPEND_libpam= libcrypt libopie libradius librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} +SUBDIR_DEPEND_libpam= libcrypt libopie ${_libradius} librpcsvc libtacplus libutil ${_libypclnt} ${_libcom_err} SUBDIR_DEPEND_libpjdlog= libutil SUBDIR_DEPEND_libprocstat= libkvm libutil SUBDIR_DEPEND_libradius= libmd @@ -258,6 +258,10 @@ _libmp= libmp _libpmc= libpmc .endif +.if ${MK_RADIUS_SUPPORT} != "no" +_libradius= libradius +.endif + .if ${MK_SENDMAIL} != "no" _libmilter= libmilter _libsm= libsm Modified: stable/10/lib/libpam/modules/modules.inc ============================================================================== --- stable/10/lib/libpam/modules/modules.inc Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/lib/libpam/modules/modules.inc Wed Feb 11 08:52:29 2015 (r278569) @@ -21,7 +21,9 @@ MODULES += pam_opie MODULES += pam_opieaccess MODULES += pam_passwdqc MODULES += pam_permit +.if ${MK_RADIUS_SUPPORT} != "no" MODULES += pam_radius +.endif MODULES += pam_rhosts MODULES += pam_rootok MODULES += pam_securetty Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/share/mk/bsd.own.mk Wed Feb 11 08:52:29 2015 (r278569) @@ -341,6 +341,7 @@ __DEFAULT_YES_OPTIONS = \ PPP \ PROFILE \ QUOTAS \ + RADIUS_SUPPORT \ RCMDS \ RCS \ RESCUE \ Copied: stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT (from r278182, head/tools/build/options/WITHOUT_RADIUS_SUPPORT) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT Wed Feb 11 08:52:29 2015 (r278569, copy of r278182, head/tools/build/options/WITHOUT_RADIUS_SUPPORT) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . Modified: stable/10/usr.sbin/ppp/Makefile ============================================================================== --- stable/10/usr.sbin/ppp/Makefile Wed Feb 11 08:33:22 2015 (r278568) +++ stable/10/usr.sbin/ppp/Makefile Wed Feb 11 08:52:29 2015 (r278569) @@ -31,6 +31,9 @@ PPP_NO_NETGRAPH= .if ${MK_PAM_SUPPORT} == "no" PPP_NO_PAM= .endif +.if ${MK_RADIUS_SUPPORT} == "no" +PPP_NO_RADIUS= +.endif .if defined(PPP_NO_SUID) BINMODE=554 From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 09:00:23 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB66BECB; Wed, 11 Feb 2015 09:00: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 C5B6EEDD; Wed, 11 Feb 2015 09:00: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 t1B90Nak061182; Wed, 11 Feb 2015 09:00:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B90N0Y061180; Wed, 11 Feb 2015 09:00:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110900.t1B90N0Y061180@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:00:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278570 - in stable/10: etc/rc.d tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:00:24 -0000 Author: ngie Date: Wed Feb 11 09:00:22 2015 New Revision: 278570 URL: https://svnweb.freebsd.org/changeset/base/278570 Log: MFC r277741: r277741: Respect MK_KERBEROS with etc/rc.d/ipropd_master and etc/rc.d/ipropd_slave Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 08:52:29 2015 (r278569) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 09:00:22 2015 (r278570) @@ -55,8 +55,6 @@ FILES= DAEMON \ ipfw \ ipmon \ ipnat \ - ipropd_master \ - ipropd_slave \ ipsec \ ${_ipxrouted} \ ${_kadmind} \ @@ -202,6 +200,8 @@ FILES+= jail .endif .if ${MK_KERBEROS} != "no" +FILES+= ipropd_master +FILES+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 08:52:29 2015 (r278569) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:00:22 2015 (r278570) @@ -2236,6 +2236,8 @@ OLD_FILES+=usr/share/man/man8/jls.8.gz .endif .if ${MK_KERBEROS} == no +OLD_FILES+=etc/rc.d/ipropd_master +OLD_FILES+=etc/rc.d/ipropd_slave OLD_FILES+=usr/bin/compile_et OLD_FILES+=usr/bin/hxtool OLD_FILES+=usr/bin/kadmin From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 09:02:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5293EA5; Wed, 11 Feb 2015 09:02: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 332DBF7C; Wed, 11 Feb 2015 09:02: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 t1B92ONc064461; Wed, 11 Feb 2015 09:02:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B92MKa064448; Wed, 11 Feb 2015 09:02:22 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502110902.t1B92MKa064448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 11 Feb 2015 09:02:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278571 - in stable/10/sys: fs/tmpfs vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:02:24 -0000 Author: kib Date: Wed Feb 11 09:02:21 2015 New Revision: 278571 URL: https://svnweb.freebsd.org/changeset/base/278571 Log: MFC r277828: Update mtime for tmpfs files modified through memory mapping. MFC r277969: Update both ctime and mtime for writes to tmpfs files. MFC r277972: Remove single-use boolean. MFC r278151: Remove duplicated assignment. Modified: stable/10/sys/fs/tmpfs/tmpfs.h stable/10/sys/fs/tmpfs/tmpfs_subr.c stable/10/sys/fs/tmpfs/tmpfs_vfsops.c stable/10/sys/fs/tmpfs/tmpfs_vnops.c stable/10/sys/vm/vm_fault.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vm_object.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/tmpfs/tmpfs.h ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs.h Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs.h Wed Feb 11 09:02:21 2015 (r278571) @@ -398,6 +398,7 @@ int tmpfs_alloc_vp(struct mount *, struc void tmpfs_free_vp(struct vnode *); int tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *, struct componentname *, char *); +void tmpfs_check_mtime(struct vnode *); void tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *); void tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *); void tmpfs_dir_destroy(struct tmpfs_mount *, struct tmpfs_node *); Modified: stable/10/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_subr.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs_subr.c Wed Feb 11 09:02:21 2015 (r278571) @@ -1417,6 +1417,31 @@ retry: return (0); } +void +tmpfs_check_mtime(struct vnode *vp) +{ + struct tmpfs_node *node; + struct vm_object *obj; + + ASSERT_VOP_ELOCKED(vp, "check_mtime"); + if (vp->v_type != VREG) + return; + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + /* unlocked read */ + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { + VM_OBJECT_WLOCK(obj); + if ((obj->flags & OBJ_TMPFS_DIRTY) != 0) { + obj->flags &= ~OBJ_TMPFS_DIRTY; + node = VP_TO_TMPFS_NODE(vp); + node->tn_status |= TMPFS_NODE_MODIFIED | + TMPFS_NODE_CHANGED; + } + VM_OBJECT_WUNLOCK(obj); + } +} + /* * Change flags of the given vnode. * Caller should execute tmpfs_update on vp after a successful execution. Modified: stable/10/sys/fs/tmpfs/tmpfs_vfsops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs_vfsops.c Wed Feb 11 09:02:21 2015 (r278571) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -417,11 +418,45 @@ tmpfs_statfs(struct mount *mp, struct st static int tmpfs_sync(struct mount *mp, int waitfor) { + struct vnode *vp, *mvp; + struct vm_object *obj; if (waitfor == MNT_SUSPEND) { MNT_ILOCK(mp); mp->mnt_kern_flag |= MNTK_SUSPEND2 | MNTK_SUSPENDED; MNT_IUNLOCK(mp); + } else if (waitfor == MNT_LAZY) { + /* + * Handle lazy updates of mtime from writes to mmaped + * regions. Use MNT_VNODE_FOREACH_ALL instead of + * MNT_VNODE_FOREACH_ACTIVE, since unmap of the + * tmpfs-backed vnode does not call vinactive(), due + * to vm object type is OBJT_SWAP. + */ + MNT_VNODE_FOREACH_ALL(vp, mp, mvp) { + if (vp->v_type != VREG) { + VI_UNLOCK(vp); + continue; + } + obj = vp->v_object; + KASSERT((obj->flags & (OBJ_TMPFS_NODE | OBJ_TMPFS)) == + (OBJ_TMPFS_NODE | OBJ_TMPFS), ("non-tmpfs obj")); + + /* + * Unlocked read, avoid taking vnode lock if + * not needed. Lost update will be handled on + * the next call. + */ + if ((obj->flags & OBJ_TMPFS_DIRTY) == 0) { + VI_UNLOCK(vp); + continue; + } + if (vget(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, + curthread) != 0) + continue; + tmpfs_check_mtime(vp); + vput(vp); + } } return (0); } Modified: stable/10/sys/fs/tmpfs/tmpfs_vnops.c ============================================================================== --- stable/10/sys/fs/tmpfs/tmpfs_vnops.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/fs/tmpfs/tmpfs_vnops.c Wed Feb 11 09:02:21 2015 (r278571) @@ -453,7 +453,6 @@ tmpfs_write(struct vop_write_args *v) struct tmpfs_node *node; off_t oldsize; int error, ioflag; - boolean_t extended; vp = v->a_vp; uio = v->a_uio; @@ -473,8 +472,7 @@ tmpfs_write(struct vop_write_args *v) return (EFBIG); if (vn_rlimit_fsize(vp, uio, uio->uio_td)) return (EFBIG); - extended = uio->uio_offset + uio->uio_resid > node->tn_size; - if (extended) { + if (uio->uio_offset + uio->uio_resid > node->tn_size) { error = tmpfs_reg_resize(vp, uio->uio_offset + uio->uio_resid, FALSE); if (error != 0) @@ -483,7 +481,7 @@ tmpfs_write(struct vop_write_args *v) error = uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio); node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED | - (extended ? TMPFS_NODE_CHANGED : 0); + TMPFS_NODE_CHANGED; if (node->tn_mode & (S_ISUID | S_ISGID)) { if (priv_check_cred(v->a_cred, PRIV_VFS_RETAINSUGID, 0)) node->tn_mode &= ~(S_ISUID | S_ISGID); @@ -505,6 +503,7 @@ tmpfs_fsync(struct vop_fsync_args *v) MPASS(VOP_ISLOCKED(vp)); + tmpfs_check_mtime(vp); tmpfs_update(vp); return 0; @@ -1222,16 +1221,16 @@ tmpfs_readlink(struct vop_readlink_args static int tmpfs_inactive(struct vop_inactive_args *v) { - struct vnode *vp = v->a_vp; - + struct vnode *vp; struct tmpfs_node *node; + vp = v->a_vp; node = VP_TO_TMPFS_NODE(vp); - if (node->tn_links == 0) vrecycle(vp); - - return 0; + else + tmpfs_check_mtime(vp); + return (0); } int Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/vm/vm_fault.c Wed Feb 11 09:02:21 2015 (r278571) @@ -358,11 +358,13 @@ RetryFault:; (fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 && /* avoid calling vm_object_set_writeable_dirty() */ ((prot & VM_PROT_WRITE) == 0 || - fs.first_object->type != OBJT_VNODE || + (fs.first_object->type != OBJT_VNODE && + (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) || (fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) { VM_OBJECT_RLOCK(fs.first_object); if ((prot & VM_PROT_WRITE) != 0 && - fs.first_object->type == OBJT_VNODE && + (fs.first_object->type == OBJT_VNODE || + (fs.first_object->flags & OBJ_TMPFS_NODE) != 0) && (fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0) goto fast_failed; m = vm_page_lookup(fs.first_object, fs.first_pindex); Modified: stable/10/sys/vm/vm_object.c ============================================================================== --- stable/10/sys/vm/vm_object.c Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/vm/vm_object.c Wed Feb 11 09:02:21 2015 (r278571) @@ -2200,8 +2200,13 @@ vm_object_set_writeable_dirty(vm_object_ { VM_OBJECT_ASSERT_WLOCKED(object); - if (object->type != OBJT_VNODE) + if (object->type != OBJT_VNODE) { + if ((object->flags & OBJ_TMPFS_NODE) != 0) { + KASSERT(object->type == OBJT_SWAP, ("non-swap tmpfs")); + vm_object_set_flag(object, OBJ_TMPFS_DIRTY); + } return; + } object->generation++; if ((object->flags & OBJ_MIGHTBEDIRTY) != 0) return; Modified: stable/10/sys/vm/vm_object.h ============================================================================== --- stable/10/sys/vm/vm_object.h Wed Feb 11 09:00:22 2015 (r278570) +++ stable/10/sys/vm/vm_object.h Wed Feb 11 09:02:21 2015 (r278571) @@ -187,6 +187,7 @@ struct vm_object { #define OBJ_PIPWNT 0x0040 /* paging in progress wanted */ #define OBJ_MIGHTBEDIRTY 0x0100 /* object might be dirty, only for vnode */ #define OBJ_TMPFS_NODE 0x0200 /* object belongs to tmpfs VREG node */ +#define OBJ_TMPFS_DIRTY 0x0400 /* dirty tmpfs obj */ #define OBJ_COLORED 0x1000 /* pg_color is defined */ #define OBJ_ONEMAPPING 0x2000 /* One USE (a single, non-forked) mapping flag */ #define OBJ_DISCONNECTWNT 0x4000 /* disconnect from vnode wanted */ From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 09:10:33 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B651E3DB; Wed, 11 Feb 2015 09:10:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F251FD5; Wed, 11 Feb 2015 09:10:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B9AX2d065764; Wed, 11 Feb 2015 09:10:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9AXKA065763; Wed, 11 Feb 2015 09:10:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110910.t1B9AXKA065763@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278572 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:10:33 -0000 Author: ngie Date: Wed Feb 11 09:10:32 2015 New Revision: 278572 URL: https://svnweb.freebsd.org/changeset/base/278572 Log: Regen src.conf(5) Modified: stable/9/share/man/man5/src.conf.5 Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Wed Feb 11 09:02:21 2015 (r278571) +++ stable/9/share/man/man5/src.conf.5 Wed Feb 11 09:10:32 2015 (r278572) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/9/tools/build/options/makeman 263058 2014-03-11 23:04:32Z gjb .\" $FreeBSD$ -.Dd March 11, 2014 +.Dd February 11, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -390,6 +390,12 @@ Set this if you do not want to link and .Pa /sbin dynamically. +.It Va WITHOUT_EE +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_EE 278568 2015-02-11 08:33:22Z ngie +Set to not build and install +.Xr edit 1 , +.Xr ee 1 , +and related programs. .It Va WITHOUT_EXAMPLES .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_EXAMPLES 156938 2006-03-21 09:06:24Z ru Set to avoid installing examples to From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 09:12:11 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E7925BF; Wed, 11 Feb 2015 09:12: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 1F5A5D8; Wed, 11 Feb 2015 09:12: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 t1B9CAHL069479; Wed, 11 Feb 2015 09:12:10 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9CAi4069478; Wed, 11 Feb 2015 09:12:10 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502110912.t1B9CAi4069478@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 11 Feb 2015 09:12:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278573 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:12:11 -0000 Author: kib Date: Wed Feb 11 09:12:10 2015 New Revision: 278573 URL: https://svnweb.freebsd.org/changeset/base/278573 Log: MFC r278209: Add ddb command 'show clocksource'. Modified: stable/10/sys/kern/kern_clocksource.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_clocksource.c ============================================================================== --- stable/10/sys/kern/kern_clocksource.c Wed Feb 11 09:10:32 2015 (r278572) +++ stable/10/sys/kern/kern_clocksource.c Wed Feb 11 09:12:10 2015 (r278573) @@ -967,3 +967,42 @@ sysctl_kern_eventtimer_periodic(SYSCTL_H SYSCTL_PROC(_kern_eventtimer, OID_AUTO, periodic, CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, sysctl_kern_eventtimer_periodic, "I", "Enable event timer periodic mode"); + +#include "opt_ddb.h" + +#ifdef DDB +#include + +DB_SHOW_COMMAND(clocksource, db_show_clocksource) +{ + struct pcpu_state *st; + int c; + + CPU_FOREACH(c) { + st = DPCPU_ID_PTR(c, timerstate); + db_printf( + "CPU %2d: action %d handle %d ipi %d idle %d\n" + " now %#jx nevent %#jx (%jd)\n" + " ntick %#jx (%jd) nhard %#jx (%jd)\n" + " nstat %#jx (%jd) nprof %#jx (%jd)\n" + " ncall %#jx (%jd) ncallopt %#jx (%jd)\n", + c, st->action, st->handle, st->ipi, st->idle, + (uintmax_t)st->now, + (uintmax_t)st->nextevent, + (uintmax_t)(st->nextevent - st->now) / tick_sbt, + (uintmax_t)st->nexttick, + (uintmax_t)(st->nexttick - st->now) / tick_sbt, + (uintmax_t)st->nexthard, + (uintmax_t)(st->nexthard - st->now) / tick_sbt, + (uintmax_t)st->nextstat, + (uintmax_t)(st->nextstat - st->now) / tick_sbt, + (uintmax_t)st->nextprof, + (uintmax_t)(st->nextprof - st->now) / tick_sbt, + (uintmax_t)st->nextcall, + (uintmax_t)(st->nextcall - st->now) / tick_sbt, + (uintmax_t)st->nextcallopt, + (uintmax_t)(st->nextcallopt - st->now) / tick_sbt); + } +} + +#endif From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 09:16:18 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BF92794; Wed, 11 Feb 2015 09:16: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 85DE611A; Wed, 11 Feb 2015 09:16: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 t1B9GIum070150; Wed, 11 Feb 2015 09:16:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9GIvk070148; Wed, 11 Feb 2015 09:16:18 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110916.t1B9GIvk070148@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278574 - in stable/10: etc/rc.d tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:16:18 -0000 Author: ngie Date: Wed Feb 11 09:16:17 2015 New Revision: 278574 URL: https://svnweb.freebsd.org/changeset/base/278574 Log: MFC r277736: r277736: Honor MK_ACCT with etc/rc.d/accounting Sponsored by: EMC / Isilon Storage Division Modified: stable/10/etc/rc.d/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 09:12:10 2015 (r278573) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 09:16:17 2015 (r278574) @@ -152,6 +152,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACCT} != "no" +FILES+= accounting +.endif + .if ${MK_ACPI} != "no" FILES+= power_profile .endif Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:12:10 2015 (r278573) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:16:17 2015 (r278574) @@ -6,6 +6,7 @@ # .if ${MK_ACCT} == no +OLD_FILES+=etc/rc.d/accounting OLD_FILES+=etc/periodic/daily/310.accounting OLD_FILES+=usr/sbin/accton OLD_FILES+=usr/sbin/sa From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 09:16:52 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 096E58C7; Wed, 11 Feb 2015 09:16: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 E89C7122; Wed, 11 Feb 2015 09:16: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 t1B9GpsA070265; Wed, 11 Feb 2015 09:16:51 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9GpYd070264; Wed, 11 Feb 2015 09:16:51 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110916.t1B9GpYd070264@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:16:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278575 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:16:52 -0000 Author: ngie Date: Wed Feb 11 09:16:51 2015 New Revision: 278575 URL: https://svnweb.freebsd.org/changeset/base/278575 Log: Remove etc/rc.d/accounting from FILES Modified: stable/10/etc/rc.d/Makefile Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Wed Feb 11 09:16:17 2015 (r278574) +++ stable/10/etc/rc.d/Makefile Wed Feb 11 09:16:51 2015 (r278575) @@ -8,7 +8,6 @@ FILES= DAEMON \ NETWORKING \ SERVERS \ abi \ - accounting \ addswap \ adjkerntz \ archdep \ From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 09:21:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7742DBE7; Wed, 11 Feb 2015 09:21:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 47C9E1E0; Wed, 11 Feb 2015 09:21:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1B9LcqZ074602; Wed, 11 Feb 2015 09:21:38 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1B9LbmZ074599; Wed, 11 Feb 2015 09:21:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502110921.t1B9LbmZ074599@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 11 Feb 2015 09:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278576 - in stable/9: etc/pam.d etc/rc.d tools/build/mk X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 09:21:38 -0000 Author: ngie Date: Wed Feb 11 09:21:36 2015 New Revision: 278576 URL: https://svnweb.freebsd.org/changeset/base/278576 Log: MFC r275098,r277736,r277737: r277736: Honor MK_ACCT with etc/rc.d/accounting Sponsored by: EMC / Isilon Storage Division r277737: Honor MK_ACCT with etc/pam.d/atrun Sponsored by: EMC / Isilon Storage Division Modified: stable/9/etc/pam.d/Makefile stable/9/etc/rc.d/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/pam.d/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) Modified: stable/9/etc/pam.d/Makefile ============================================================================== --- stable/9/etc/pam.d/Makefile Wed Feb 11 09:16:51 2015 (r278575) +++ stable/9/etc/pam.d/Makefile Wed Feb 11 09:21:36 2015 (r278576) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include + NO_OBJ= FILES= README \ - atrun \ cron \ ftpd \ imap \ @@ -16,6 +17,10 @@ FILES= README \ telnetd \ xdm +.if ${MK_AT} != "no" +FILES+= atrun +.endif + FILESDIR= /etc/pam.d FILESMODE= 644 FILESMODE_README= 444 Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Wed Feb 11 09:16:51 2015 (r278575) +++ stable/9/etc/rc.d/Makefile Wed Feb 11 09:21:36 2015 (r278576) @@ -8,7 +8,6 @@ FILES= DAEMON \ NETWORKING \ SERVERS \ abi \ - accounting \ addswap \ adjkerntz \ archdep \ @@ -149,6 +148,10 @@ FILES= DAEMON \ zfs \ zvol +.if ${MK_ACCT} != "no" +FILES+= accounting +.endif + .if ${MK_AMD} != "no" FILES+= amd .endif Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:16:51 2015 (r278575) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Wed Feb 11 09:21:36 2015 (r278576) @@ -6,6 +6,7 @@ # .if ${MK_ACCT} == no +OLD_FILES+=etc/rc.d/accounting OLD_FILES+=etc/periodic/daily/310.accounting OLD_FILES+=usr/sbin/accton OLD_FILES+=usr/sbin/sa @@ -61,6 +62,7 @@ OLD_FILES+=usr/share/man/man8/amd64/apmc .endif .if ${MK_AT} == no +OLD_FILES+=etc/pam.d/atrun OLD_FILES+=usr/bin/at OLD_FILES+=usr/bin/atq OLD_FILES+=usr/bin/atrm From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 22:35:36 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78EE3318; Wed, 11 Feb 2015 22:35: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 616C38C6; Wed, 11 Feb 2015 22:35: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 t1BMZabR063032; Wed, 11 Feb 2015 22:35:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMZWhh063017; Wed, 11 Feb 2015 22:35:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112235.t1BMZWhh063017@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 22:35:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278599 - in stable/10/sys: arm/conf arm/samsung/exynos boot/fdt/dts/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:35:36 -0000 Author: ian Date: Wed Feb 11 22:35:32 2015 New Revision: 278599 URL: https://svnweb.freebsd.org/changeset/base/278599 Log: MFC r266943, r266950, r267390: Add support for Exynos 5420 Octa - 8-core (big.LITTLE) ARM machine Enable SMP for both Exynos5 models we support. Added: stable/10/sys/arm/conf/ARNDALE-OCTA - copied unchanged from r266943, head/sys/arm/conf/ARNDALE-OCTA stable/10/sys/arm/conf/EXYNOS5.common - copied, changed from r266943, head/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/EXYNOS5250 - copied, changed from r266943, head/sys/arm/conf/EXYNOS5250 stable/10/sys/arm/conf/EXYNOS5420 - copied, changed from r266943, head/sys/arm/conf/EXYNOS5420 stable/10/sys/arm/samsung/exynos/std.exynos5250 - copied unchanged from r266943, head/sys/arm/samsung/exynos/std.exynos5250 stable/10/sys/arm/samsung/exynos/std.exynos5420 - copied unchanged from r266943, head/sys/arm/samsung/exynos/std.exynos5420 stable/10/sys/boot/fdt/dts/arm/exynos5.dtsi - copied unchanged from r266943, head/sys/boot/fdt/dts/arm/exynos5.dtsi stable/10/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts - copied unchanged from r266943, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts stable/10/sys/boot/fdt/dts/arm/exynos5420.dtsi - copied unchanged from r266943, head/sys/boot/fdt/dts/arm/exynos5420.dtsi Deleted: stable/10/sys/arm/samsung/exynos/std.exynos5 Modified: stable/10/sys/arm/conf/ARNDALE stable/10/sys/arm/conf/CHROMEBOOK stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/ARNDALE ============================================================================== --- stable/10/sys/arm/conf/ARNDALE Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/arm/conf/ARNDALE Wed Feb 11 22:35:32 2015 (r278599) @@ -19,7 +19,7 @@ #NO_UNIVERSE -include "EXYNOS5250.common" +include "EXYNOS5250" ident ARNDALE #FDT Copied: stable/10/sys/arm/conf/ARNDALE-OCTA (from r266943, head/sys/arm/conf/ARNDALE-OCTA) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/ARNDALE-OCTA Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/arm/conf/ARNDALE-OCTA) @@ -0,0 +1,28 @@ +# Kernel configuration for Arndale Octa Board (Exynos 5420) +# +# 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$ + +#NO_UNIVERSE + +include "EXYNOS5420" +ident ARNDALE-OCTA + +#FDT +options FDT +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=exynos5420-arndale-octa.dts Modified: stable/10/sys/arm/conf/CHROMEBOOK ============================================================================== --- stable/10/sys/arm/conf/CHROMEBOOK Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/arm/conf/CHROMEBOOK Wed Feb 11 22:35:32 2015 (r278599) @@ -17,7 +17,7 @@ # # $FreeBSD$ -include "EXYNOS5250.common" +include "EXYNOS5250" ident CHROMEBOOK hints "CHROMEBOOK.hints" Copied and modified: stable/10/sys/arm/conf/EXYNOS5.common (from r266943, head/sys/arm/conf/EXYNOS5.common) ============================================================================== --- head/sys/arm/conf/EXYNOS5.common Sun Jun 1 08:15:34 2014 (r266943, copy source) +++ stable/10/sys/arm/conf/EXYNOS5.common Wed Feb 11 22:35:32 2015 (r278599) @@ -51,6 +51,8 @@ options PREEMPTION options FREEBSD_BOOT_LOADER options VFP # vfp/neon +options SMP + # Debugging makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER Copied and modified: stable/10/sys/arm/conf/EXYNOS5250 (from r266943, head/sys/arm/conf/EXYNOS5250) ============================================================================== --- head/sys/arm/conf/EXYNOS5250 Sun Jun 1 08:15:34 2014 (r266943, copy source) +++ stable/10/sys/arm/conf/EXYNOS5250 Wed Feb 11 22:35:32 2015 (r278599) @@ -17,10 +17,9 @@ # # $FreeBSD$ +ident EXYNOS5250 include "EXYNOS5.common" include "../samsung/exynos/std.exynos5250" -options SMP - #FDT options FDT Copied and modified: stable/10/sys/arm/conf/EXYNOS5420 (from r266943, head/sys/arm/conf/EXYNOS5420) ============================================================================== --- head/sys/arm/conf/EXYNOS5420 Sun Jun 1 08:15:34 2014 (r266943, copy source) +++ stable/10/sys/arm/conf/EXYNOS5420 Wed Feb 11 22:35:32 2015 (r278599) @@ -17,6 +17,7 @@ # # $FreeBSD$ +ident EXYNOS5420 include "EXYNOS5.common" include "../samsung/exynos/std.exynos5420" Copied: stable/10/sys/arm/samsung/exynos/std.exynos5250 (from r266943, head/sys/arm/samsung/exynos/std.exynos5250) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/std.exynos5250 Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/arm/samsung/exynos/std.exynos5250) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +makeoption ARM_LITTLE_ENDIAN + +cpu CPU_CORTEXA +machine arm armv6 + +options PHYSADDR=0x40000000 + +makeoptions KERNPHYSADDR=0x40f00000 +options KERNPHYSADDR=0x40f00000 + +makeoptions KERNVIRTADDR=0xc0f00000 +options KERNVIRTADDR=0xc0f00000 + +options ARM_L2_PIPT + +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + +files "../samsung/exynos/files.exynos5" Copied: stable/10/sys/arm/samsung/exynos/std.exynos5420 (from r266943, head/sys/arm/samsung/exynos/std.exynos5420) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/samsung/exynos/std.exynos5420 Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/arm/samsung/exynos/std.exynos5420) @@ -0,0 +1,21 @@ +# $FreeBSD$ + +makeoption ARM_LITTLE_ENDIAN + +cpu CPU_CORTEXA +machine arm armv6 + +options PHYSADDR=0x20000000 + +makeoptions KERNPHYSADDR=0x20f00000 +options KERNPHYSADDR=0x20f00000 + +makeoptions KERNVIRTADDR=0xc0f00000 +options KERNVIRTADDR=0xc0f00000 + +options ARM_L2_PIPT + +options IPI_IRQ_START=0 +options IPI_IRQ_END=15 + +files "../samsung/exynos/files.exynos5" Copied: stable/10/sys/boot/fdt/dts/arm/exynos5.dtsi (from r266943, head/sys/boot/fdt/dts/arm/exynos5.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/exynos5.dtsi Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/boot/fdt/dts/arm/exynos5.dtsi) @@ -0,0 +1,284 @@ +/*- + * Copyright (c) 2013-2014 Ruslan Bukin + * 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$ + */ + +/ { + compatible = "samsung,exynos5"; + #address-cells = <1>; + #size-cells = <1>; + interrupt-parent = <&GIC>; + + aliases { + soc = &SOC; + serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; + serial3 = &serial3; + clk0 = &clk0; + dp0 = &dp0; + fimd0 = &fimd0; + }; + + SOC: Exynos5@0 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + bus-frequency = <0>; + + GIC: interrupt-controller@10481000 { + compatible = "arm,gic"; + reg = < 0x10481000 0x1000 >, /* Distributor Registers */ + < 0x10482000 0x2000 >; /* CPU Interface Registers */ + interrupt-controller; + #address-cells = <0>; + #interrupt-cells = <1>; + }; + + combiner: interrupt-controller@10440000 { + compatible = "exynos,combiner"; + reg = <0x10440000 0x1000>; + interrupts = < 32 33 34 35 36 37 38 39 + 40 41 42 43 44 45 46 47 + 48 49 50 51 52 53 54 55 + 56 57 58 59 60 61 62 63 >; + interrupt-parent = <&GIC>; + }; + + clk0: clk@10010000 { + compatible = "exynos,clk"; + reg = < 0x10020000 0x20000 >; + }; + + mct { + compatible = "exynos,mct"; + reg = < 0x101C0000 0x1000 >; + clock-frequency = <24000000>; + }; + + generic_timer { + compatible = "arm,armv7-timer"; + clock-frequency = <24000000>; + interrupts = < 29 30 27 26 >; + interrupt-parent = <&GIC>; + }; + + pwm { + compatible = "samsung,s3c24x0-timer"; + reg = <0x12DD0000 0x1000>; + interrupts = < 71 >; + interrupt-parent = <&GIC>; + clock-frequency = <24000000>; + }; + + pad0: pad@11400000 { + compatible = "exynos,pad"; + status = "disabled"; + reg = <0x11400000 0x1000>, /* gpio left */ + <0x13400000 0x1000>, /* gpio right */ + <0x10D10000 0x1000>, /* gpio c2c */ + <0x03860000 0x1000>; + interrupts = < 78 77 82 79 >; + interrupt-parent = <&GIC>; + }; + + usb@12110000 { + compatible = "exynos,usb-ehci", "usb-ehci"; + reg = <0x12110000 0x1000>, /* EHCI */ + <0x12130000 0x1000>, /* EHCI host ctrl */ + <0x10040000 0x1000>, /* Power */ + <0x10050230 0x10>; /* Sysreg */ + interrupts = < 103 >; + interrupt-parent = <&GIC>; + }; + + usb@12120000 { + compatible = "exynos,usb-ohci", "usb-ohci"; + status = "disabled"; + reg = <0x12120000 0x10000>; + interrupts = < 103 >; + interrupt-parent = <&GIC>; + }; + + sdhci@12200000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12200000 0x1000>; + interrupts = <107>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; /* TODO: verify freq */ + }; + + sdhci@12210000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12210000 0x1000>; + interrupts = <108>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; + }; + + sdhci@12220000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12220000 0x1000>; + interrupts = <109>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; + }; + + sdhci@12230000 { + compatible = "sdhci_generic"; + status = "disabled"; + reg = <0x12230000 0x1000>; + interrupts = <110>; + interrupt-parent = <&GIC>; + max-frequency = <24000000>; + }; + + serial0: serial@12C00000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C00000 0x100>; + interrupts = < 83 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + serial1: serial@12C10000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C10000 0x100>; + interrupts = < 84 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + serial2: serial@12C20000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C20000 0x100>; + interrupts = < 85 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + serial3: serial@12C30000 { + compatible = "exynos"; + status = "disabled"; + reg = <0x12C30000 0x100>; + interrupts = < 86 >; + interrupt-parent = <&GIC>; + clock-frequency = < 100000000 >; + current-speed = <115200>; + }; + + i2c0: i2c@12C60000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C60000 0x10000>; + interrupts = < 88 >; + interrupt-parent = <&GIC>; + }; + + i2c1: i2c@12C70000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C70000 0x10000>; + interrupts = < 89 >; + interrupt-parent = <&GIC>; + }; + + i2c2: i2c@12C80000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C80000 0x10000>; + interrupts = < 90 >; + interrupt-parent = <&GIC>; + }; + + i2c3: i2c@12C90000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12C90000 0x10000>; + interrupts = < 91 >; + interrupt-parent = <&GIC>; + }; + + i2c4: i2c@12CA0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CA0000 0x10000>; + interrupts = < 92 >; + interrupt-parent = <&GIC>; + }; + + i2c5: i2c@12CB0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CB0000 0x10000>; + interrupts = < 93 >; + interrupt-parent = <&GIC>; + }; + + i2c6: i2c@12CC0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CC0000 0x10000>; + interrupts = < 94 >; + interrupt-parent = <&GIC>; + }; + + i2c7: i2c@12CD0000 { + compatible = "exynos,i2c"; + status = "disabled"; + reg = <0x12CD0000 0x10000>; + interrupts = < 95 >; + interrupt-parent = <&GIC>; + }; + + fimd0: fimd@14400000 { + compatible = "exynos,fimd"; + status = "disabled"; + reg = < 0x14400000 0x10000 >, /* fimd */ + < 0x14420000 0x10000 >, /* disp */ + < 0x10050000 0x220 >; /* sysreg */ + interrupt-parent = <&GIC>; + }; + + dp0: dp@145B0000 { + compatible = "exynos,dp"; + status = "disabled"; + reg = < 0x145B0000 0x10000 >, + < 0x10040720 0x10 >; /* PHY */ + interrupt-parent = <&GIC>; + }; + }; +}; Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250-arndale.dts Wed Feb 11 22:35:32 2015 (r278599) @@ -44,6 +44,10 @@ status = "okay"; }; + serial2: serial@12C20000 { + status = "okay"; + }; + }; chosen { Modified: stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi ============================================================================== --- stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Wed Feb 11 22:03:23 2015 (r278598) +++ stable/10/sys/boot/fdt/dts/arm/exynos5250.dtsi Wed Feb 11 22:35:32 2015 (r278599) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2013 Ruslan Bukin + * Copyright (c) 2013-2014 Ruslan Bukin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -26,248 +26,27 @@ * $FreeBSD$ */ -/ { - compatible = "samsung,exynos5250"; - #address-cells = <1>; - #size-cells = <1>; - interrupt-parent = <&GIC>; +/include/ "exynos5.dtsi" - aliases { - soc = &SOC; - serial0 = &serial0; - serial1 = &serial1; - clk0 = &clk0; - dp0 = &dp0; - fimd0 = &fimd0; - }; +/ { + compatible = "samsung,exynos5250", "samsung,exynos5"; SOC: Exynos5@0 { - #address-cells = <1>; - #size-cells = <1>; - compatible = "simple-bus"; - ranges; - bus-frequency = <0>; - - GIC: interrupt-controller@10481000 { - compatible = "arm,gic"; - reg = < 0x10481000 0x1000 >, /* Distributor Registers */ - < 0x10482000 0x2000 >; /* CPU Interface Registers */ - interrupt-controller; - #address-cells = <0>; - #interrupt-cells = <1>; - }; - - combiner: interrupt-controller@10440000 { - compatible = "exynos,combiner"; - reg = <0x10440000 0x1000>; - interrupts = < 32 33 34 35 36 37 38 39 - 40 41 42 43 44 45 46 47 - 48 49 50 51 52 53 54 55 - 56 57 58 59 60 61 62 63 >; - interrupt-parent = <&GIC>; - }; - - clk0: clk@10010000 { - compatible = "exynos,clk"; - reg = < 0x10020000 0x20000 >; - }; - - mct { - compatible = "exynos,mct"; - reg = < 0x101C0000 0x1000 >; - clock-frequency = <24000000>; - }; - - generic_timer { - compatible = "arm,armv7-timer"; - clock-frequency = <24000000>; - interrupts = < 29 30 27 26 >; - interrupt-parent = <&GIC>; - }; - - pwm { - compatible = "samsung,s3c24x0-timer"; - reg = <0x12DD0000 0x1000>; - interrupts = < 71 >; - interrupt-parent = <&GIC>; - clock-frequency = <24000000>; - }; - - pad0: pad@11400000 { - compatible = "exynos,pad"; - status = "disabled"; - reg = <0x11400000 0x1000>, /* gpio left */ - <0x13400000 0x1000>, /* gpio right */ - <0x10D10000 0x1000>, /* gpio c2c */ - <0x03860000 0x1000>; - interrupts = < 78 77 82 79 >; - interrupt-parent = <&GIC>; - }; - - usb@12110000 { - compatible = "exynos,usb-ehci", "usb-ehci"; - reg = <0x12110000 0x1000>, /* EHCI */ - <0x12130000 0x1000>, /* EHCI host ctrl */ - <0x10040000 0x1000>, /* Power */ - <0x10050230 0x10>; /* Sysreg */ - interrupts = < 103 >; - interrupt-parent = <&GIC>; - }; - - usb@12120000 { - compatible = "exynos,usb-ohci", "usb-ohci"; - reg = <0x12120000 0x10000>; - interrupts = < 103 >; - interrupt-parent = <&GIC>; - }; - - sdhci@12200000 { - compatible = "sdhci_generic"; - reg = <0x12200000 0x1000>; - interrupts = <107>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; /* TODO: verify freq */ - }; - - sdhci@12210000 { - compatible = "sdhci_generic"; - reg = <0x12210000 0x1000>; - interrupts = <108>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; - }; - - sdhci@12220000 { - compatible = "sdhci_generic"; - reg = <0x12220000 0x1000>; - interrupts = <109>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; - }; - - sdhci@12230000 { - compatible = "sdhci_generic"; - reg = <0x12230000 0x1000>; - interrupts = <110>; - interrupt-parent = <&GIC>; - max-frequency = <24000000>; - }; serial0: serial@12C00000 { - compatible = "exynos"; - reg = <0x12C00000 0x100>; - interrupts = < 83 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; }; serial1: serial@12C10000 { - compatible = "exynos"; - reg = <0x12C10000 0x100>; - interrupts = < 84 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; }; serial2: serial@12C20000 { - compatible = "exynos"; - reg = <0x12C20000 0x100>; - interrupts = < 85 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; }; serial3: serial@12C30000 { - compatible = "exynos"; - reg = <0x12C30000 0x100>; - interrupts = < 86 >; - interrupt-parent = <&GIC>; clock-frequency = < 100000000 >; - current-speed = <115200>; - }; - - i2c0: i2c@12C60000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C60000 0x10000>; - interrupts = < 88 >; - interrupt-parent = <&GIC>; - }; - - i2c1: i2c@12C70000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C70000 0x10000>; - interrupts = < 89 >; - interrupt-parent = <&GIC>; - }; - - i2c2: i2c@12C80000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C80000 0x10000>; - interrupts = < 90 >; - interrupt-parent = <&GIC>; - }; - - i2c3: i2c@12C90000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12C90000 0x10000>; - interrupts = < 91 >; - interrupt-parent = <&GIC>; - }; - - i2c4: i2c@12CA0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CA0000 0x10000>; - interrupts = < 92 >; - interrupt-parent = <&GIC>; - }; - - i2c5: i2c@12CB0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CB0000 0x10000>; - interrupts = < 93 >; - interrupt-parent = <&GIC>; - }; - - i2c6: i2c@12CC0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CC0000 0x10000>; - interrupts = < 94 >; - interrupt-parent = <&GIC>; - }; - - i2c7: i2c@12CD0000 { - compatible = "exynos,i2c"; - status = "disabled"; - reg = <0x12CD0000 0x10000>; - interrupts = < 95 >; - interrupt-parent = <&GIC>; - }; - - fimd0: fimd@14400000 { - compatible = "exynos,fimd"; - status = "disabled"; - reg = < 0x14400000 0x10000 >, /* fimd */ - < 0x14420000 0x10000 >, /* disp */ - < 0x10050000 0x220 >; /* sysreg */ - interrupt-parent = <&GIC>; - }; - - dp0: dp@145B0000 { - compatible = "exynos,dp"; - status = "disabled"; - reg = < 0x145B0000 0x10000 >, - < 0x10040720 0x10 >; /* PHY */ - interrupt-parent = <&GIC>; }; }; }; Copied: stable/10/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts (from r266943, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/boot/fdt/dts/arm/exynos5420-arndale-octa.dts) @@ -0,0 +1,51 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * 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$ + */ + +/dts-v1/; + +/include/ "exynos5420.dtsi" + +/ { + model = "Arndale Octa Board"; + + memory { + device_type = "memory"; + reg = < 0x20000000 0x40000000 >; /* 1G */ + }; + + SOC: Exynos5@0 { + serial3: serial@12C30000 { + status = "okay"; + }; + }; + + chosen { + stdin = &serial3; + stdout = &serial3; + }; +}; Copied: stable/10/sys/boot/fdt/dts/arm/exynos5420.dtsi (from r266943, head/sys/boot/fdt/dts/arm/exynos5420.dtsi) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/fdt/dts/arm/exynos5420.dtsi Wed Feb 11 22:35:32 2015 (r278599, copy of r266943, head/sys/boot/fdt/dts/arm/exynos5420.dtsi) @@ -0,0 +1,52 @@ +/*- + * Copyright (c) 2014 Ruslan Bukin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/include/ "exynos5.dtsi" + +/ { + compatible = "samsung,exynos5420", "samsung,exynos5"; + + SOC: Exynos5@0 { + + serial0: serial@12C00000 { + clock-frequency = < 50000000 >; + }; + + serial1: serial@12C10000 { + clock-frequency = < 50000000 >; + }; + + serial2: serial@12C20000 { + clock-frequency = < 50000000 >; + }; + + serial3: serial@12C30000 { + clock-frequency = < 50000000 >; + }; + }; +}; From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 22:47:53 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE5756F6; Wed, 11 Feb 2015 22:47: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 D64CD9AB; Wed, 11 Feb 2015 22:47: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 t1BMlq2Y068244; Wed, 11 Feb 2015 22:47:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMlni0068226; Wed, 11 Feb 2015 22:47:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112247.t1BMlni0068226@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 22:47:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278601 - in stable/10/sys/arm: allwinner allwinner/a20 broadcom/bcm2835 freescale/imx freescale/vybrid mv rockchip samsung/exynos ti xilinx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:47:53 -0000 Author: ian Date: Wed Feb 11 22:47:48 2015 New Revision: 278601 URL: https://svnweb.freebsd.org/changeset/base/278601 Log: MFC r276047: Add -march=armv7a to the kernel compile for all v7a ARM systems. Modified: stable/10/sys/arm/allwinner/a20/std.a20 stable/10/sys/arm/allwinner/std.a10 stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 stable/10/sys/arm/freescale/imx/std.imx51 stable/10/sys/arm/freescale/imx/std.imx53 stable/10/sys/arm/freescale/imx/std.imx6 stable/10/sys/arm/freescale/vybrid/std.vybrid stable/10/sys/arm/mv/std-pj4b.mv stable/10/sys/arm/rockchip/std.rk30xx stable/10/sys/arm/samsung/exynos/std.exynos5250 stable/10/sys/arm/samsung/exynos/std.exynos5420 stable/10/sys/arm/ti/std.ti stable/10/sys/arm/xilinx/std.zynq7 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/std.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/std.a20 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/allwinner/a20/std.a20 Wed Feb 11 22:47:48 2015 (r278601) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x40200000. We assume images are loaded at Modified: stable/10/sys/arm/allwinner/std.a10 ============================================================================== --- stable/10/sys/arm/allwinner/std.a10 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/allwinner/std.a10 Wed Feb 11 22:47:48 2015 (r278601) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x40200000. We assume images are loaded at Modified: stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/broadcom/bcm2835/std.bcm2835 Wed Feb 11 22:47:48 2015 (r278601) @@ -2,6 +2,7 @@ machine arm armv6 cpu CPU_ARM1176 +makeoptions CONF_CFLAGS="-mcpu=arm1176jzf-s -Wa,-mcpu=arm1176jzf-s" files "../broadcom/bcm2835/files.bcm2835" Modified: stable/10/sys/arm/freescale/imx/std.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx51 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/imx/std.imx51 Wed Feb 11 22:47:48 2015 (r278601) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: stable/10/sys/arm/freescale/imx/std.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx53 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/imx/std.imx53 Wed Feb 11 22:47:48 2015 (r278601) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: stable/10/sys/arm/freescale/imx/std.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx6 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/imx/std.imx6 Wed Feb 11 22:47:48 2015 (r278601) @@ -1,6 +1,7 @@ # $FreeBSD$ machine arm armv6 cpu CPU_CORTEXA +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoptions ARM_LITTLE_ENDIAN options ARM_L2_PIPT Modified: stable/10/sys/arm/freescale/vybrid/std.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/std.vybrid Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/freescale/vybrid/std.vybrid Wed Feb 11 22:47:48 2015 (r278601) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x80000000 Modified: stable/10/sys/arm/mv/std-pj4b.mv ============================================================================== --- stable/10/sys/arm/mv/std-pj4b.mv Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/mv/std-pj4b.mv Wed Feb 11 22:47:48 2015 (r278601) @@ -3,5 +3,6 @@ files "../mv/files.mv" cpu CPU_MV_PJ4B machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options VM_MAXUSER_ADDRESS="(KERNBASE-(1024*1024*1024))" Modified: stable/10/sys/arm/rockchip/std.rk30xx ============================================================================== --- stable/10/sys/arm/rockchip/std.rk30xx Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/rockchip/std.rk30xx Wed Feb 11 22:47:48 2015 (r278601) @@ -3,6 +3,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" makeoption ARM_LITTLE_ENDIAN # Physical memory starts at 0x60400000. We assume images are loaded at Modified: stable/10/sys/arm/samsung/exynos/std.exynos5250 ============================================================================== --- stable/10/sys/arm/samsung/exynos/std.exynos5250 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/samsung/exynos/std.exynos5250 Wed Feb 11 22:47:48 2015 (r278601) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x40000000 Modified: stable/10/sys/arm/samsung/exynos/std.exynos5420 ============================================================================== --- stable/10/sys/arm/samsung/exynos/std.exynos5420 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/samsung/exynos/std.exynos5420 Wed Feb 11 22:47:48 2015 (r278601) @@ -4,6 +4,7 @@ makeoption ARM_LITTLE_ENDIAN cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" options PHYSADDR=0x20000000 Modified: stable/10/sys/arm/ti/std.ti ============================================================================== --- stable/10/sys/arm/ti/std.ti Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/ti/std.ti Wed Feb 11 22:47:48 2015 (r278601) @@ -2,5 +2,6 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" files "../ti/files.ti" Modified: stable/10/sys/arm/xilinx/std.zynq7 ============================================================================== --- stable/10/sys/arm/xilinx/std.zynq7 Wed Feb 11 22:39:13 2015 (r278600) +++ stable/10/sys/arm/xilinx/std.zynq7 Wed Feb 11 22:47:48 2015 (r278601) @@ -5,6 +5,7 @@ cpu CPU_CORTEXA machine arm armv6 +makeoptions CONF_CFLAGS="-march=armv7a -Wa,-march=armv7a" files "../xilinx/files.zynq7" From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 22:55:29 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 086DAA0E; Wed, 11 Feb 2015 22:55: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 E5050A9E; Wed, 11 Feb 2015 22:55: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 t1BMtSsh072706; Wed, 11 Feb 2015 22:55:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BMtP7H072686; Wed, 11 Feb 2015 22:55:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112255.t1BMtP7H072686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 22:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278602 - in stable/10: lib/libstand sys/boot/common sys/boot/forth X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 22:55:29 -0000 Author: ian Date: Wed Feb 11 22:55:24 2015 New Revision: 278602 URL: https://svnweb.freebsd.org/changeset/base/278602 Log: MFC r276079, r276087: Add a divisor parameter to twiddle() so that callers can request that output only happen on every Nth call. Add a new loader(8) variable, twiddle_divisor, allowing control over the output frequency of the "twiddle" IO progress indicator. Modified: stable/10/lib/libstand/cd9660.c stable/10/lib/libstand/ext2fs.c stable/10/lib/libstand/nandfs.c stable/10/lib/libstand/nfs.c stable/10/lib/libstand/read.c stable/10/lib/libstand/stand.h stable/10/lib/libstand/tftp.c stable/10/lib/libstand/twiddle.c stable/10/lib/libstand/ufs.c stable/10/lib/libstand/write.c stable/10/sys/boot/common/console.c stable/10/sys/boot/common/loader.8 stable/10/sys/boot/forth/loader.conf Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libstand/cd9660.c ============================================================================== --- stable/10/lib/libstand/cd9660.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/cd9660.c Wed Feb 11 22:55:24 2015 (r278602) @@ -286,7 +286,7 @@ cd9660_open(const char *path, struct ope buf = malloc(buf_size = ISO_DEFAULT_BLOCK_SIZE); vd = buf; for (bno = 16;; bno++) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -319,7 +319,7 @@ cd9660_open(const char *path, struct ope while (off < dsize) { if ((off % ISO_DEFAULT_BLOCK_SIZE) == 0) { - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy (f->f_devdata, F_READ, cdb2devb(bno + boff), @@ -379,7 +379,7 @@ cd9660_open(const char *path, struct ope /* Check for Rock Ridge since we didn't in the loop above. */ bno = isonum_733(rec.extent) + isonum_711(rec.ext_attr_length); - twiddle(); + twiddle(1); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(bno), ISO_DEFAULT_BLOCK_SIZE, buf, &read); if (rc) @@ -436,7 +436,7 @@ buf_read_file(struct open_file *f, char if (fp->f_buf == (char *)0) fp->f_buf = malloc(ISO_DEFAULT_BLOCK_SIZE); - twiddle(); + twiddle(16); rc = f->f_dev->dv_strategy(f->f_devdata, F_READ, cdb2devb(blkno), ISO_DEFAULT_BLOCK_SIZE, fp->f_buf, &read); if (rc) Modified: stable/10/lib/libstand/ext2fs.c ============================================================================== --- stable/10/lib/libstand/ext2fs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/ext2fs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -353,7 +353,7 @@ ext2fs_open(const char *upath, struct op /* allocate space and read super block */ fs = (struct ext2fs *)malloc(sizeof(*fs)); fp->f_fs = fs; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK, EXT2_SBSIZE, (char *)fs, &buf_size); if (error) @@ -395,7 +395,7 @@ ext2fs_open(const char *upath, struct op len = blkgrps * fs->fs_bsize; fp->f_bg = malloc(len); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, EXT2_SBLOCK + EXT2_SBSIZE / DEV_BSIZE, len, (char *)fp->f_bg, &buf_size); @@ -507,7 +507,7 @@ ext2fs_open(const char *upath, struct op if (error) goto out; - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fs, disk_block), fs->fs_bsize, buf, &buf_size); @@ -568,7 +568,7 @@ read_inode(ino_t inumber, struct open_fi * Read inode and save it. */ buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, ino_to_db(fs, fp->f_bg, inumber), fs->fs_bsize, buf, &rsize); if (error) @@ -665,7 +665,7 @@ block_map(struct open_file *f, daddr_t f if (fp->f_blk[level] == (char *)0) fp->f_blk[level] = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fp->f_fs, ind_block_num), fs->fs_bsize, fp->f_blk[level], &fp->f_blksize[level]); @@ -723,7 +723,7 @@ buf_read_file(struct open_file *f, char bzero(fp->f_buf, block_size); fp->f_buf_size = block_size; } else { - twiddle(); + twiddle(4); error = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsb_to_db(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); Modified: stable/10/lib/libstand/nandfs.c ============================================================================== --- stable/10/lib/libstand/nandfs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/nandfs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -921,7 +921,7 @@ nandfs_bmap_lookup(struct nandfs *fs, st return (0); } - twiddle(); + twiddle(1); NANDFS_DEBUG("calling get_map with %jx\n", ind_block_num); map = nandfs_get_map(fs, node, ind_block_num, phys); if (map == NULL) Modified: stable/10/lib/libstand/nfs.c ============================================================================== --- stable/10/lib/libstand/nfs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/nfs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -662,7 +662,7 @@ nfs_read(struct open_file *f, void *buf, (int)fp->off); #endif while ((int)size > 0) { - twiddle(); + twiddle(16); cc = nfs_readdata(fp, fp->off, (void *)addr, size); /* XXX maybe should retry on certain errors */ if (cc == -1) { @@ -1311,7 +1311,7 @@ nfs_read(struct open_file *f, void *buf, (int)fp->off); #endif while ((int)size > 0) { - twiddle(); + twiddle(16); cc = nfs_readdata(fp, fp->off, (void *)addr, size); /* XXX maybe should retry on certain errors */ if (cc == -1) { Modified: stable/10/lib/libstand/read.c ============================================================================== --- stable/10/lib/libstand/read.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/read.c Wed Feb 11 22:55:24 2015 (r278602) @@ -77,7 +77,7 @@ read(int fd, void *dest, size_t bcount) return (-1); } if (f->f_flags & F_RAW) { - twiddle(); + twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, btodb(f->f_offset), bcount, dest, &resid); if (errno) Modified: stable/10/lib/libstand/stand.h ============================================================================== --- stable/10/lib/libstand/stand.h Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/stand.h Wed Feb 11 22:55:24 2015 (r278602) @@ -241,7 +241,8 @@ extern int sprintf(char *buf, const char extern int snprintf(char *buf, size_t size, const char *cfmt, ...) __printflike(3, 4); extern void vsprintf(char *buf, const char *cfmt, __va_list); -extern void twiddle(void); +extern void twiddle(u_int callerdiv); +extern void twiddle_divisor(u_int globaldiv); extern void ngets(char *, int); #define gets(x) ngets((x), 0) Modified: stable/10/lib/libstand/tftp.c ============================================================================== --- stable/10/lib/libstand/tftp.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/tftp.c Wed Feb 11 22:55:24 2015 (r278602) @@ -447,14 +447,12 @@ tftp_read(struct open_file *f, void *add size_t *resid /* out */) { struct tftp_handle *tftpfile; - static int tc = 0; tftpfile = (struct tftp_handle *) f->f_fsdata; while (size > 0) { int needblock, count; - if (!(tc++ % 16)) - twiddle(); + twiddle(32); needblock = tftpfile->off / tftpfile->tftp_blksize + 1; Modified: stable/10/lib/libstand/twiddle.c ============================================================================== --- stable/10/lib/libstand/twiddle.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/twiddle.c Wed Feb 11 22:55:24 2015 (r278602) @@ -42,11 +42,28 @@ __FBSDID("$FreeBSD$"); /* Extra functions from NetBSD standalone printf.c */ +static u_int globaldiv; + void -twiddle() +twiddle(u_int callerdiv) { - static int pos; + static u_int callercnt, globalcnt, pos; + + callercnt++; + if (callerdiv > 1 && (callercnt % callerdiv) != 0) + return; + + globalcnt++; + if (globaldiv > 1 && (globalcnt % globaldiv) != 0) + return; putchar("|/-\\"[pos++ & 3]); putchar('\b'); } + +void +twiddle_divisor(u_int gdiv) +{ + + globaldiv = gdiv; +} Modified: stable/10/lib/libstand/ufs.c ============================================================================== --- stable/10/lib/libstand/ufs.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/ufs.c Wed Feb 11 22:55:24 2015 (r278602) @@ -155,7 +155,7 @@ read_inode(inumber, f) * Read inode and save it. */ buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, ino_to_fsba(fs, inumber)), fs->fs_bsize, buf, &rsize); @@ -265,7 +265,7 @@ block_map(f, file_block, disk_block_p) if (fp->f_blk[level] == (char *)0) fp->f_blk[level] = malloc(fs->fs_bsize); - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fp->f_fs, ind_block_num), fs->fs_bsize, @@ -346,7 +346,7 @@ buf_write_file(f, buf_p, size_p) if (fp->f_buf == (char *)0) fp->f_buf = malloc(fs->fs_bsize); - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -365,7 +365,7 @@ buf_write_file(f, buf_p, size_p) * Write the block out to storage. */ - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -406,7 +406,7 @@ buf_read_file(f, buf_p, size_p) bzero(fp->f_buf, block_size); fp->f_buf_size = block_size; } else { - twiddle(); + twiddle(4); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), block_size, fp->f_buf, &fp->f_buf_size); @@ -515,7 +515,7 @@ ufs_open(upath, f) /* allocate space and read super block */ fs = malloc(SBLOCKSIZE); fp->f_fs = fs; - twiddle(); + twiddle(1); /* * Try reading the superblock in each of its possible locations. */ @@ -649,7 +649,7 @@ ufs_open(upath, f) if (rc) goto out; - twiddle(); + twiddle(1); rc = (f->f_dev->dv_strategy)(f->f_devdata, F_READ, fsbtodb(fs, disk_block), fs->fs_bsize, buf, &buf_size); Modified: stable/10/lib/libstand/write.c ============================================================================== --- stable/10/lib/libstand/write.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/lib/libstand/write.c Wed Feb 11 22:55:24 2015 (r278602) @@ -80,7 +80,7 @@ write(fd, dest, bcount) return (-1); } if (f->f_flags & F_RAW) { - twiddle(); + twiddle(4); errno = (f->f_dev->dv_strategy)(f->f_devdata, F_WRITE, btodb(f->f_offset), bcount, dest, &resid); if (errno) Modified: stable/10/sys/boot/common/console.c ============================================================================== --- stable/10/sys/boot/common/console.c Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/sys/boot/common/console.c Wed Feb 11 22:55:24 2015 (r278602) @@ -39,6 +39,7 @@ static int cons_set(struct env_var *ev, static int cons_find(const char *name); static int cons_check(const char *string); static void cons_change(const char *string); +static int twiddle_set(struct env_var *ev, int flags, const void *value); /* * Detect possible console(s) to use. If preferred console(s) have been @@ -52,6 +53,9 @@ cons_probe(void) int active; char *prefconsole; + /* We want a callback to install the new value when this var changes. */ + env_setenv("twiddle_divisor", EV_VOLATILE, "1", twiddle_set, env_nounset); + /* Do all console probes */ for (cons = 0; consoles[cons] != NULL; cons++) { consoles[cons]->c_flags = 0; @@ -232,3 +236,28 @@ cons_change(const char *string) free(dup); } + +/* + * Change the twiddle divisor. + * + * The user can set the twiddle_divisor variable to directly control how fast + * the progress twiddle spins, useful for folks with slow serial consoles. The + * code to monitor changes to the variable and propagate them to the twiddle + * routines has to live somewhere. Twiddling is console-related so it's here. + */ +static int +twiddle_set(struct env_var *ev, int flags, const void *value) +{ + u_long tdiv; + char * eptr; + + tdiv = strtoul(value, &eptr, 0); + if (*(const char *)value == 0 || *eptr != 0) { + printf("invalid twiddle_divisor '%s'\n", (const char *)value); + return (CMD_ERROR); + } + twiddle_divisor((u_int)tdiv); + env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL); + + return(CMD_OK); +} Modified: stable/10/sys/boot/common/loader.8 ============================================================================== --- stable/10/sys/boot/common/loader.8 Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/sys/boot/common/loader.8 Wed Feb 11 22:55:24 2015 (r278602) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 1, 2013 +.Dd December 22, 2014 .Dt LOADER 8 .Os .Sh NAME @@ -670,6 +670,12 @@ Overrides the compile-time set value of .Dv TCBHASHSIZE or the preset default of 512. Must be a power of 2. +.It Va twiddle_divisor +Throttles the output of the `twiddle' I/O progress indicator displayed +while loading the kernel and modules. +This is useful on slow serial consoles where the time spent waiting for +these characters to be written can add up to many seconds. +The default is 1 (full speed); a value of 2 spins half as fast, and so on. .It Va vm.kmem_size Sets the size of kernel memory (bytes). This overrides the value determined when the kernel was compiled. Modified: stable/10/sys/boot/forth/loader.conf ============================================================================== --- stable/10/sys/boot/forth/loader.conf Wed Feb 11 22:47:48 2015 (r278601) +++ stable/10/sys/boot/forth/loader.conf Wed Feb 11 22:55:24 2015 (r278602) @@ -75,6 +75,7 @@ module_path="/boot/modules" # Set the mo # the block size is set to 512. If the value # is out of range ( < 8 || > 9008 ) an error is # returned. +#twiddle_divisor="1" # >1 means slow down the progress indicator. ############################################################## From owner-svn-src-stable@FreeBSD.ORG Wed Feb 11 23:05:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55ED4F61; Wed, 11 Feb 2015 23:05: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 3FD59C12; Wed, 11 Feb 2015 23:05: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 t1BN5xES077748; Wed, 11 Feb 2015 23:05:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1BN5wwn077746; Wed, 11 Feb 2015 23:05:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502112305.t1BN5wwn077746@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 11 Feb 2015 23:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278604 - in stable/10/sys/boot: arm/uboot powerpc/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 23:05:59 -0000 Author: ian Date: Wed Feb 11 23:05:58 2015 New Revision: 278604 URL: https://svnweb.freebsd.org/changeset/base/278604 Log: MFC r276145: Convert lingering NO_FORTH conditionals to test MK_FORTH. Modified: stable/10/sys/boot/arm/uboot/Makefile stable/10/sys/boot/powerpc/uboot/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/arm/uboot/Makefile ============================================================================== --- stable/10/sys/boot/arm/uboot/Makefile Wed Feb 11 22:59:24 2015 (r278603) +++ stable/10/sys/boot/arm/uboot/Makefile Wed Feb 11 23:05:58 2015 (r278604) @@ -76,7 +76,7 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -.if !defined(NO_FORTH) +.if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/arm Modified: stable/10/sys/boot/powerpc/uboot/Makefile ============================================================================== --- stable/10/sys/boot/powerpc/uboot/Makefile Wed Feb 11 22:59:24 2015 (r278603) +++ stable/10/sys/boot/powerpc/uboot/Makefile Wed Feb 11 23:05:58 2015 (r278604) @@ -66,7 +66,7 @@ LIBUBOOT_FDT= ${.OBJDIR}/../../uboot/fdt LIBFDT= ${.OBJDIR}/../../fdt/libfdt.a .endif -.if !defined(NO_FORTH) +.if ${MK_FORTH} != "no" # Enable BootForth BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/powerpc From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 00:25:34 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 297991A1; Thu, 12 Feb 2015 00:25: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 116743D5; Thu, 12 Feb 2015 00:25: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 t1C0PX1F016467; Thu, 12 Feb 2015 00:25:33 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C0PXBt016465; Thu, 12 Feb 2015 00:25:33 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120025.t1C0PXBt016465@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 00:25:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278608 - in stable/10/sys: arm/broadcom/bcm2835 boot/fdt/dts/arm conf dev/ofw powerpc/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 00:25:34 -0000 Author: ian Date: Thu Feb 12 00:25:33 2015 New Revision: 278608 URL: https://svnweb.freebsd.org/changeset/base/278608 Log: MFC r275779, r275963, r276101, r276161, r276297: Move ofw_cpu.c to sys/dev/ofw so that it can be used by other architectures. Add driver for CPU frequency/voltage control on the Raspberry Pi. On initialization, do not use bcm_mbox_intr() to read the pending messages. This fixes the hang that happens on boot while initializing the cpufreq on Raspberry Pi. Added: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c - copied unchanged from r275963, head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h - copied unchanged from r275963, head/sys/arm/broadcom/bcm2835/bcm2835_mbox_prop.h stable/10/sys/dev/ofw/ofw_cpu.c - copied unchanged from r275779, head/sys/dev/ofw/ofw_cpu.c Deleted: stable/10/sys/powerpc/ofw/ofw_cpu.c Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.h stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/boot/fdt/dts/arm/rpi.dts stable/10/sys/conf/files.powerpc Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c (from r275963, head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Thu Feb 12 00:25:33 2015 (r278608, copy of r275963, head/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c) @@ -0,0 +1,1818 @@ +/*- + * Copyright (C) 2013-2014 Daisuke Aoyama + * 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 + +#include +#include +#include + +#include "cpufreq_if.h" +#include "mbox_if.h" + +#ifdef DEBUG +#define DPRINTF(fmt, ...) do { \ + printf("%s:%u: ", __func__, __LINE__); \ + printf(fmt, ##__VA_ARGS__); \ +} while (0) +#else +#define DPRINTF(fmt, ...) +#endif + +#define HZ2MHZ(freq) ((freq) / (1000 * 1000)) +#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 +#define DEFAULT_SDRAM_FREQUENCY 400 +#define DEFAULT_LOWEST_FREQ 300 +#define TRANSITION_LATENCY 1000 +#define MIN_OVER_VOLTAGE -16 +#define MAX_OVER_VOLTAGE 6 +#define MSG_ERROR -999999999 +#define MHZSTEP 100 +#define HZSTEP (MHZ2HZ(MHZSTEP)) + +#define VC_LOCK(sc) do { \ + sema_wait(&vc_sema); \ + } while (0) +#define VC_UNLOCK(sc) do { \ + sema_post(&vc_sema); \ + } while (0) + +/* ARM->VC mailbox property semaphore */ +static struct sema vc_sema; + +static struct sysctl_ctx_list bcm2835_sysctl_ctx; + +struct bcm2835_cpufreq_softc { + device_t dev; + int arm_max_freq; + int arm_min_freq; + int core_max_freq; + int core_min_freq; + int sdram_max_freq; + int sdram_min_freq; + int max_voltage_core; + int min_voltage_core; + + /* the values written in mbox */ + int voltage_core; + int voltage_sdram; + int voltage_sdram_c; + int voltage_sdram_i; + int voltage_sdram_p; + int turbo_mode; + + /* mbox buffer (physical address) */ + bus_dma_tag_t dma_tag; + bus_dmamap_t dma_map; + bus_size_t dma_size; + void *dma_buf; + bus_addr_t dma_phys; + + /* initial hook for waiting mbox intr */ + struct intr_config_hook init_hook; +}; + +static int cpufreq_verbose = 0; +TUNABLE_INT("hw.bcm2835.cpufreq.verbose", &cpufreq_verbose); +static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ; +TUNABLE_INT("hw.bcm2835.cpufreq.lowest_freq", &cpufreq_lowest_freq); + +#ifdef DEBUG +static void +bcm2835_dump(const void *data, int len) +{ + const uint8_t *p = (const uint8_t*)data; + int i; + + printf("dump @ %p:\n", data); + for (i = 0; i < len; i++) { + printf("%2.2x ", p[i]); + if ((i % 4) == 3) + printf(" "); + if ((i % 16) == 15) + printf("\n"); + } + printf("\n"); +} +#endif + +static int +bcm2835_mbox_call_prop(struct bcm2835_cpufreq_softc *sc) +{ + struct bcm2835_mbox_hdr *msg = (struct bcm2835_mbox_hdr *)sc->dma_buf; + struct bcm2835_mbox_tag_hdr *tag, *last; + uint8_t *up; + device_t mbox; + size_t hdr_size; + int idx; + int err; + + /* + * For multiple calls, locking is not here. The caller must have + * VC semaphore. + */ + + /* get mbox device */ + mbox = devclass_get_device(devclass_find("mbox"), 0); + if (mbox == NULL) { + device_printf(sc->dev, "can't find mbox\n"); + return (-1); + } + + /* go mailbox property */ +#ifdef PROP_DEBUG + bcm2835_dump(msg, 64); +#endif + bus_dmamap_sync(sc->dma_tag, sc->dma_map, + BUS_DMASYNC_PREWRITE | BUS_DMASYNC_PREREAD); + MBOX_WRITE(mbox, BCM2835_MBOX_CHAN_PROP, (uint32_t)sc->dma_phys); + MBOX_READ(mbox, BCM2835_MBOX_CHAN_PROP, &err); + bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_POSTREAD); +#ifdef PROP_DEBUG + bcm2835_dump(msg, 64); +#endif + + /* check response code */ + if (msg->code != BCM2835_MBOX_CODE_RESP_SUCCESS) { + device_printf(sc->dev, "mbox response error\n"); + return (-1); + } + + /* tag = first tag */ + up = (uint8_t *)msg; + hdr_size = sizeof(struct bcm2835_mbox_hdr); + tag = (struct bcm2835_mbox_tag_hdr *)(up + hdr_size); + /* last = end of buffer specified by header */ + last = (struct bcm2835_mbox_tag_hdr *)(up + msg->buf_size); + + /* loop unitl end tag (=0x0) */ + hdr_size = sizeof(struct bcm2835_mbox_tag_hdr); + for (idx = 0; tag->tag != 0; idx++) { + if ((tag->val_len & BCM2835_MBOX_TAG_VAL_LEN_RESPONSE) == 0) { + device_printf(sc->dev, "tag%d response error\n", idx); + return (-1); + } + /* clear response bit */ + tag->val_len &= ~BCM2835_MBOX_TAG_VAL_LEN_RESPONSE; + + /* get next tag */ + up = (uint8_t *)tag; + tag = (struct bcm2835_mbox_tag_hdr *)(up + hdr_size + + tag->val_buf_size); + + /* check buffer size of header */ + if (tag > last) { + device_printf(sc->dev, "mbox buffer size error\n"); + return (-1); + } + } + + return (0); +} + +static int +bcm2835_cpufreq_get_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id) +{ + struct msg_get_clock_rate *msg; + int rate; + int err; + + /* + * Get clock rate + * Tag: 0x00030002 + * Request: + * Length: 4 + * Value: + * u32: clock id + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_get_max_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id) +{ + struct msg_get_max_clock_rate *msg; + int rate; + int err; + + /* + * Get max clock rate + * Tag: 0x00030004 + * Request: + * Length: 4 + * Value: + * u32: clock id + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_max_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MAX_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get max clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_get_min_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id) +{ + struct msg_get_min_clock_rate *msg; + int rate; + int err; + + /* + * Get min clock rate + * Tag: 0x00030007 + * Request: + * Length: 4 + * Value: + * u32: clock id + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_min_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MIN_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get min clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_set_clock_rate(struct bcm2835_cpufreq_softc *sc, + uint32_t clock_id, uint32_t rate_hz) +{ + struct msg_set_clock_rate *msg; + int rate; + int err; + + /* + * Set clock rate + * Tag: 0x00038002 + * Request: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + * Response: + * Length: 8 + * Value: + * u32: clock id + * u32: rate (in Hz) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_set_clock_rate *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->body.req.rate_hz = rate_hz; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't set clock rate (id=%u)\n", + clock_id); + return (MSG_ERROR); + } + + /* workaround for core clock */ + if (clock_id == BCM2835_MBOX_CLOCK_ID_CORE) { + /* for safety (may change voltage without changing clock) */ + DELAY(TRANSITION_LATENCY); + + /* + * XXX: the core clock is unable to change at once, + * to change certainly, write it twice now. + */ + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_CLOCK_RATE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.clock_id = clock_id; + msg->body.req.rate_hz = rate_hz; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, + "can't set clock rate (id=%u)\n", clock_id); + return (MSG_ERROR); + } + } + + /* result (Hz) */ + rate = (int)msg->body.resp.rate_hz; + DPRINTF("clock = %d(Hz)\n", rate); + return (rate); +} + +static int +bcm2835_cpufreq_get_turbo(struct bcm2835_cpufreq_softc *sc) +{ + struct msg_get_turbo *msg; + int level; + int err; + + /* + * Get turbo + * Tag: 0x00030009 + * Request: + * Length: 4 + * Value: + * u32: id + * Response: + * Length: 8 + * Value: + * u32: id + * u32: level + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_turbo *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_TURBO; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.id = 0; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get turbo\n"); + return (MSG_ERROR); + } + + /* result 0=non-turbo, 1=turbo */ + level = (int)msg->body.resp.level; + DPRINTF("level = %d\n", level); + return (level); +} + +static int +bcm2835_cpufreq_set_turbo(struct bcm2835_cpufreq_softc *sc, uint32_t level) +{ + struct msg_set_turbo *msg; + int value; + int err; + + /* + * Set turbo + * Tag: 0x00038009 + * Request: + * Length: 8 + * Value: + * u32: id + * u32: level + * Response: + * Length: 8 + * Value: + * u32: id + * u32: level + */ + + /* using DMA buffer for VC */ + msg = (struct msg_set_turbo *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* replace unknown value to OFF */ + if (level != BCM2835_MBOX_TURBO_ON && level != BCM2835_MBOX_TURBO_OFF) + level = BCM2835_MBOX_TURBO_OFF; + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_TURBO; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.id = 0; + msg->body.req.level = level; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't set turbo\n"); + return (MSG_ERROR); + } + + /* result 0=non-turbo, 1=turbo */ + value = (int)msg->body.resp.level; + DPRINTF("level = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_get_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id) +{ + struct msg_get_voltage *msg; + int value; + int err; + + /* + * Get voltage + * Tag: 0x00030003 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_get_max_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id) +{ + struct msg_get_max_voltage *msg; + int value; + int err; + + /* + * Get voltage + * Tag: 0x00030005 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_max_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MAX_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get max voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} +static int +bcm2835_cpufreq_get_min_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id) +{ + struct msg_get_min_voltage *msg; + int value; + int err; + + /* + * Get voltage + * Tag: 0x00030008 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_min_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_MIN_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get min voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_set_voltage(struct bcm2835_cpufreq_softc *sc, + uint32_t voltage_id, int32_t value) +{ + struct msg_set_voltage *msg; + int err; + + /* + * Set voltage + * Tag: 0x00038003 + * Request: + * Length: 4 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + * Response: + * Length: 8 + * Value: + * u32: voltage id + * u32: value (offset from 1.2V in units of 0.025V) + */ + + /* + * over_voltage: + * 0 (1.2 V). Values above 6 are only allowed when force_turbo or + * current_limit_override are specified (which set the warranty bit). + */ + if (value > MAX_OVER_VOLTAGE || value < MIN_OVER_VOLTAGE) { + /* currently not supported */ + device_printf(sc->dev, "not supported voltage: %d\n", value); + return (MSG_ERROR); + } + + /* using DMA buffer for VC */ + msg = (struct msg_set_voltage *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_SET_VOLTAGE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.voltage_id = voltage_id; + msg->body.req.value = (uint32_t)value; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't set voltage\n"); + return (MSG_ERROR); + } + + /* result (offset from 1.2V) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + +static int +bcm2835_cpufreq_get_temperature(struct bcm2835_cpufreq_softc *sc) +{ + struct msg_get_temperature *msg; + int value; + int err; + + /* + * Get temperature + * Tag: 0x00030006 + * Request: + * Length: 4 + * Value: + * u32: temperature id + * Response: + * Length: 8 + * Value: + * u32: temperature id + * u32: value + */ + + /* using DMA buffer for VC */ + msg = (struct msg_get_temperature *)sc->dma_buf; + if (sizeof(*msg) > sc->dma_size) { + device_printf(sc->dev, "DMA size overflow (%zu>%lu)\n", + sizeof(*msg), sc->dma_size); + return (MSG_ERROR); + } + + /* setup single tag buffer */ + memset(msg, 0, sizeof(*msg)); + msg->hdr.buf_size = sizeof(*msg); + msg->hdr.code = BCM2835_MBOX_CODE_REQ; + msg->tag_hdr.tag = BCM2835_MBOX_TAG_GET_TEMPERATURE; + msg->tag_hdr.val_buf_size = sizeof(msg->body); + msg->tag_hdr.val_len = sizeof(msg->body.req); + msg->body.req.temperature_id = 0; + msg->end_tag = 0; + + /* call mailbox property */ + err = bcm2835_mbox_call_prop(sc); + if (err) { + device_printf(sc->dev, "can't get temperature\n"); + return (MSG_ERROR); + } + + /* result (temperature of degree C) */ + value = (int)msg->body.resp.value; + DPRINTF("value = %d\n", value); + return (value); +} + + + +static int +sysctl_bcm2835_cpufreq_arm_freq(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_ARM); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + VC_LOCK(sc); + err = bcm2835_cpufreq_set_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_ARM, + val); + VC_UNLOCK(sc); + if (err == MSG_ERROR) { + device_printf(sc->dev, "set clock arm_freq error\n"); + return (EIO); + } + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_core_freq(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_CORE); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + VC_LOCK(sc); + err = bcm2835_cpufreq_set_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_CORE, + val); + if (err == MSG_ERROR) { + VC_UNLOCK(sc); + device_printf(sc->dev, "set clock core_freq error\n"); + return (EIO); + } + VC_UNLOCK(sc); + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_sdram_freq(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_SDRAM); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + VC_LOCK(sc); + err = bcm2835_cpufreq_set_clock_rate(sc, BCM2835_MBOX_CLOCK_ID_SDRAM, + val); + VC_UNLOCK(sc); + if (err == MSG_ERROR) { + device_printf(sc->dev, "set clock sdram_freq error\n"); + return (EIO); + } + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_turbo(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); + val = bcm2835_cpufreq_get_turbo(sc); + VC_UNLOCK(sc); + if (val == MSG_ERROR) + return (EIO); + + err = sysctl_handle_int(oidp, &val, 0, req); + if (err || !req->newptr) /* error || read request */ + return (err); + + /* write request */ + if (val > 0) + sc->turbo_mode = BCM2835_MBOX_TURBO_ON; + else + sc->turbo_mode = BCM2835_MBOX_TURBO_OFF; + + VC_LOCK(sc); + err = bcm2835_cpufreq_set_turbo(sc, sc->turbo_mode); + VC_UNLOCK(sc); + if (err == MSG_ERROR) { + device_printf(sc->dev, "set turbo error\n"); + return (EIO); + } + DELAY(TRANSITION_LATENCY); + + return (0); +} + +static int +sysctl_bcm2835_cpufreq_voltage_core(SYSCTL_HANDLER_ARGS) +{ + struct bcm2835_cpufreq_softc *sc = arg1; + int val; + int err; + + /* get realtime value */ + VC_LOCK(sc); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 00:35:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55C8A425; Thu, 12 Feb 2015 00:35: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 402AB68F; Thu, 12 Feb 2015 00:35: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 t1C0ZxqL021262; Thu, 12 Feb 2015 00:35:59 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C0ZxKn021260; Thu, 12 Feb 2015 00:35:59 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120035.t1C0ZxKn021260@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 00:35:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278609 - stable/10/sys/dev/ofw X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 00:35:59 -0000 Author: ian Date: Thu Feb 12 00:35:58 2015 New Revision: 278609 URL: https://svnweb.freebsd.org/changeset/base/278609 Log: MFC r276162: Don't assume required FDT properties are present. Modified: stable/10/sys/dev/ofw/ofw_cpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/ofw/ofw_cpu.c ============================================================================== --- stable/10/sys/dev/ofw/ofw_cpu.c Thu Feb 12 00:25:33 2015 (r278608) +++ stable/10/sys/dev/ofw/ofw_cpu.c Thu Feb 12 00:35:58 2015 (r278609) @@ -170,7 +170,7 @@ ofw_cpu_probe(device_t dev) { const char *type = ofw_bus_get_type(dev); - if (strcmp(type, "cpu") != 0) + if (type == NULL || strcmp(type, "cpu") != 0) return (ENXIO); device_set_desc(dev, "Open Firmware CPU"); @@ -181,12 +181,20 @@ static int ofw_cpu_attach(device_t dev) { struct ofw_cpu_softc *sc; + phandle_t node; uint32_t cell; sc = device_get_softc(dev); - OF_getprop(ofw_bus_get_node(dev), "reg", &cell, sizeof(cell)); + node = ofw_bus_get_node(dev); + if (OF_getencprop(node, "reg", &cell, sizeof(cell)) < 0) { + cell = device_get_unit(dev); + device_printf(dev, "missing 'reg' property, using %u\n", cell); + } sc->sc_cpu_pcpu = pcpu_find(cell); - OF_getprop(ofw_bus_get_node(dev), "clock-frequency", &cell, sizeof(cell)); + if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) { + device_printf(dev, "missing 'clock-frequency' property\n"); + return (ENXIO); + } sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */ bus_generic_probe(dev); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 03:16:58 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB74D51E; Thu, 12 Feb 2015 03:16: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 95F079F6; Thu, 12 Feb 2015 03:16: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 t1C3Gwvd096890; Thu, 12 Feb 2015 03:16:58 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C3GwAK096889; Thu, 12 Feb 2015 03:16:58 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120316.t1C3GwAK096889@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 03:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278612 - stable/10/contrib/binutils/gas/config X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 03:16:58 -0000 Author: ian Date: Thu Feb 12 03:16:57 2015 New Revision: 278612 URL: https://svnweb.freebsd.org/changeset/base/278612 Log: MFC r272519: Add movw and movt relocations to the list of relocations against function names that must not be adjusted. Modified: stable/10/contrib/binutils/gas/config/tc-arm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/binutils/gas/config/tc-arm.c ============================================================================== --- stable/10/contrib/binutils/gas/config/tc-arm.c Thu Feb 12 02:08:44 2015 (r278611) +++ stable/10/contrib/binutils/gas/config/tc-arm.c Thu Feb 12 03:16:57 2015 (r278612) @@ -19373,6 +19373,12 @@ arm_fix_adjustable (fixS * fixP) || fixP->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0) return 0; + if (fixP->fx_r_type == BFD_RELOC_ARM_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_MOVT + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVW + || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT) + return 0; + return 1; } #endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */ From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 03:50:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1410BCF7; Thu, 12 Feb 2015 03:50: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 EF16CDE1; Thu, 12 Feb 2015 03:50:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1C3ofEj011980; Thu, 12 Feb 2015 03:50:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C3oYhs011479; Thu, 12 Feb 2015 03:50:34 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120350.t1C3oYhs011479@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 03:50:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278613 - in stable/10: sys/arm/arm sys/arm/at91 sys/arm/cavium/cns11xx sys/arm/include sys/arm/s3c2xx0 sys/arm/xscale/i80321 sys/arm/xscale/i8134x sys/arm/xscale/ixp425 sys/arm/xscale/... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 03:50:42 -0000 Author: ian Date: Thu Feb 12 03:50:33 2015 New Revision: 278613 URL: https://svnweb.freebsd.org/changeset/base/278613 Log: MFC r271394, r271398: Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE from asm.h as they were already defined in armreg.h. Unify interrupts bit definition and usage. While here remove PSR_C_bit. Modified: stable/10/sys/arm/arm/cpufunc_asm_sheeva.S stable/10/sys/arm/arm/cpufunc_asm_xscale.S stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/fiq.c stable/10/sys/arm/arm/locore.S stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/mp_machdep.c stable/10/sys/arm/arm/trap.c stable/10/sys/arm/arm/undefined.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/at91/at91.c stable/10/sys/arm/at91/at91_aic.c stable/10/sys/arm/cavium/cns11xx/econa.c stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/atomic.h stable/10/sys/arm/s3c2xx0/s3c24x0.c stable/10/sys/arm/xscale/i80321/i80321_intr.h stable/10/sys/arm/xscale/i80321/i80321_timer.c stable/10/sys/arm/xscale/i80321/iq80321.c stable/10/sys/arm/xscale/i8134x/i81342.c stable/10/sys/arm/xscale/ixp425/ixp425.c stable/10/sys/arm/xscale/ixp425/ixp425_pci.c stable/10/sys/arm/xscale/ixp425/ixp425_timer.c stable/10/sys/arm/xscale/pxa/pxa_icu.c stable/10/sys/arm/xscale/pxa/pxa_timer.c stable/10/usr.bin/truss/arm-fbsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_sheeva.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_sheeva.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/cpufunc_asm_sheeva.S Thu Feb 12 03:50:33 2015 (r278613) @@ -29,6 +29,7 @@ * SUCH DAMAGE. */ +#include #include __FBSDID("$FreeBSD$"); @@ -42,7 +43,7 @@ __FBSDID("$FreeBSD$"); ENTRY(sheeva_setttb) /* Disable irqs */ mrs r2, cpsr - orr r3, r2, #I32_bit | F32_bit + orr r3, r2, #PSR_I | PSR_F msr cpsr_c, r3 mov r1, #0 @@ -87,7 +88,7 @@ ENTRY(sheeva_dcache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ @@ -130,7 +131,7 @@ ENTRY(sheeva_idcache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c15, 0 /* Clean and inv zone start address */ mcr p15, 5, r2, c15, c15, 1 /* Clean and inv zone end address */ @@ -182,7 +183,7 @@ ENTRY(sheeva_dcache_inv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c14, 0 /* Inv zone start address */ mcr p15, 5, r2, c15, c14, 1 /* Inv zone end address */ @@ -225,7 +226,7 @@ ENTRY(sheeva_dcache_wb_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 5, r0, c15, c13, 0 /* Clean zone start address */ mcr p15, 5, r2, c15, c13, 1 /* Clean zone end address */ @@ -268,7 +269,7 @@ ENTRY(sheeva_l2cache_wbinv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ @@ -313,7 +314,7 @@ ENTRY(sheeva_l2cache_inv_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c11, 4 /* Inv L2 zone start address */ mcr p15, 1, r2, c15, c11, 5 /* Inv L2 zone end address */ @@ -356,7 +357,7 @@ ENTRY(sheeva_l2cache_wb_range) add r3, r0, ip sub r2, r3, #1 /* Disable irqs */ - orr r3, lr, #I32_bit | F32_bit + orr r3, lr, #PSR_I | PSR_F msr cpsr_c, r3 mcr p15, 1, r0, c15, c9, 4 /* Clean L2 zone start address */ mcr p15, 1, r2, c15, c9, 5 /* Clean L2 zone end address */ @@ -379,7 +380,7 @@ END(sheeva_l2cache_wb_range) ENTRY(sheeva_l2cache_wbinv_all) /* Disable irqs */ mrs r1, cpsr - orr r2, r1, #I32_bit | F32_bit + orr r2, r1, #PSR_I | PSR_F msr cpsr_c, r2 mov r0, #0 Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale.S Thu Feb 12 03:50:33 2015 (r278613) @@ -71,7 +71,7 @@ * * XScale assembly functions for CPU / MMU / TLB specific operations */ - +#include #include __FBSDID("$FreeBSD$"); @@ -135,7 +135,7 @@ END(xscale_control) ENTRY(xscale_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR mrs r3, cpsr - orr r1, r3, #(I32_bit | F32_bit) + orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access @@ -267,7 +267,7 @@ _C_LABEL(xscale_minidata_clean_size): #ifdef CACHE_CLEAN_BLOCK_INTR #define XSCALE_CACHE_CLEAN_BLOCK \ mrs r3, cpsr ; \ - orr r0, r3, #(I32_bit | F32_bit) ; \ + orr r0, r3, #(PSR_I | PSR_F) ; \ msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ Modified: stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/cpufunc_asm_xscale_c3.S Thu Feb 12 03:50:33 2015 (r278613) @@ -73,6 +73,7 @@ * XScale core 3 assembly functions for CPU / MMU / TLB specific operations */ +#include #include __FBSDID("$FreeBSD$"); @@ -122,7 +123,7 @@ __FBSDID("$FreeBSD$"); #define XSCALE_CACHE_CLEAN_BLOCK \ stmfd sp!, {r4} ; \ mrs r4, cpsr ; \ - orr r0, r4, #(I32_bit | F32_bit) ; \ + orr r0, r4, #(PSR_I | PSR_F) ; \ msr cpsr_fsxc, r0 #define XSCALE_CACHE_CLEAN_UNBLOCK \ @@ -349,7 +350,7 @@ END(xscalec3_l2cache_flush_rng) ENTRY(xscalec3_setttb) #ifdef CACHE_CLEAN_BLOCK_INTR mrs r3, cpsr - orr r1, r3, #(I32_bit | F32_bit) + orr r1, r3, #(PSR_I | PSR_F) msr cpsr_fsxc, r1 #else ldr r3, .Lblock_userspace_access Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/exception.S Thu Feb 12 03:50:33 2015 (r278613) @@ -244,12 +244,12 @@ __FBSDID("$FreeBSD$"); #define DO_AST \ ldr r0, [sp] /* Get the SPSR from stack */ ;\ mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(I32_bit|F32_bit) ;\ + orr r1, r4, #(PSR_I|PSR_F) ;\ msr cpsr_c, r1 /* Disable interrupts */ ;\ and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ teq r0, #(PSR_USR32_MODE) ;\ bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(I32_bit|F32_bit) ;\ + bic r4, r4, #(PSR_I|PSR_F) ;\ 1: GET_CURTHREAD_PTR(r5) ;\ ldr r1, [r5, #(TD_FLAGS)] ;\ and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED) ;\ @@ -258,7 +258,7 @@ __FBSDID("$FreeBSD$"); msr cpsr_c, r4 /* Restore interrupts */ ;\ mov r0, sp ;\ bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(I32_bit|F32_bit) ;\ + orr r0, r4, #(PSR_I|PSR_F) ;\ msr cpsr_c, r0 ;\ b 1b ;\ 2: @@ -382,7 +382,7 @@ END(irq_entry) */ ASENTRY_NP(fiq_entry) mrs r8, cpsr /* FIQ handling isn't supported, */ - bic r8, #(F32_bit) /* just disable FIQ and return. */ + bic r8, #(PSR_F) /* just disable FIQ and return. */ msr cpsr_c, r8 /* The r8 we trash here is the */ subs pc, lr, #4 /* banked FIQ-mode r8. */ END(fiq_entry) Modified: stable/10/sys/arm/arm/fiq.c ============================================================================== --- stable/10/sys/arm/arm/fiq.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/fiq.c Thu Feb 12 03:50:33 2015 (r278613) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -54,9 +55,6 @@ TAILQ_HEAD(, fiqhandler) fiqhandler_stac extern char *fiq_nullhandler_code; extern uint32_t fiq_nullhandler_size; -#define IRQ_BIT I32_bit -#define FIQ_BIT F32_bit - /* * fiq_installhandler: * @@ -102,7 +100,7 @@ fiq_claim(struct fiqhandler *fh) if (fh->fh_size > 0x100) return (EFBIG); - oldirqstate = disable_interrupts(FIQ_BIT); + oldirqstate = disable_interrupts(PSR_F); if ((ofh = TAILQ_FIRST(&fiqhandler_stack)) != NULL) { if ((ofh->fh_flags & FH_CANPUSH) == 0) { @@ -125,7 +123,7 @@ fiq_claim(struct fiqhandler *fh) fiq_installhandler(fh->fh_func, fh->fh_size); /* Make sure FIQs are enabled when we return. */ - oldirqstate &= ~FIQ_BIT; + oldirqstate &= ~PSR_F; out: restore_interrupts(oldirqstate); @@ -143,7 +141,7 @@ fiq_release(struct fiqhandler *fh) u_int oldirqstate; struct fiqhandler *ofh; - oldirqstate = disable_interrupts(FIQ_BIT); + oldirqstate = disable_interrupts(PSR_F); /* * If we are the currently active FIQ handler, then we @@ -167,7 +165,7 @@ fiq_release(struct fiqhandler *fh) fiq_installhandler(fiq_nullhandler_code, fiq_nullhandler_size); /* Make sure FIQs are disabled when we return. */ - oldirqstate |= FIQ_BIT; + oldirqstate |= PSR_F; } restore_interrupts(oldirqstate); Modified: stable/10/sys/arm/arm/locore.S ============================================================================== --- stable/10/sys/arm/arm/locore.S Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/locore.S Thu Feb 12 03:50:33 2015 (r278613) @@ -106,7 +106,7 @@ ASENTRY_NP(_start) /* Make sure interrupts are disabled. */ mrs r7, cpsr - orr r7, r7, #(I32_bit|F32_bit) + orr r7, r7, #(PSR_I | PSR_F) msr cpsr_c, r7 #if defined (FLASHADDR) && defined(LOADERRAMADDR) @@ -369,7 +369,7 @@ ASENTRY_NP(mpentry) /* Make sure interrupts are disabled. */ mrs r7, cpsr - orr r7, r7, #(I32_bit|F32_bit) + orr r7, r7, #(PSR_I | PSR_F) msr cpsr_c, r7 /* Disable MMU. It should be disabled already, but make sure. */ @@ -447,7 +447,7 @@ ENTRY_NP(cpu_halt) mrs r2, cpsr bic r2, r2, #(PSR_MODE) orr r2, r2, #(PSR_SVC32_MODE) - orr r2, r2, #(I32_bit | F32_bit) + orr r2, r2, #(PSR_I | PSR_F) msr cpsr_fsxc, r2 ldr r4, .Lcpu_reset_address Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/machdep.c Thu Feb 12 03:50:33 2015 (r278613) @@ -619,7 +619,7 @@ spinlock_enter(void) td = curthread; if (td->td_md.md_spinlock_count == 0) { - cspr = disable_interrupts(I32_bit | F32_bit); + cspr = disable_interrupts(PSR_I | PSR_F); td->td_md.md_spinlock_count = 1; td->td_md.md_saved_cspr = cspr; } else @@ -746,7 +746,7 @@ sys_sigreturn(td, uap) */ spsr = uc.uc_mcontext.__gregs[_REG_CPSR]; if ((spsr & PSR_MODE) != PSR_USR32_MODE || - (spsr & (I32_bit | F32_bit)) != 0) + (spsr & (PSR_I | PSR_F)) != 0) return (EINVAL); /* Restore register context. */ set_mcontext(td, &uc.uc_mcontext); Modified: stable/10/sys/arm/arm/mp_machdep.c ============================================================================== --- stable/10/sys/arm/arm/mp_machdep.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/mp_machdep.c Thu Feb 12 03:50:33 2015 (r278613) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -236,7 +237,7 @@ init_secondary(int cpu) for (int i = start; i <= end; i++) arm_unmask_irq(i); - enable_interrupts(I32_bit); + enable_interrupts(PSR_I); loop_counter = 0; while (smp_started == 0) { Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/trap.c Thu Feb 12 03:50:33 2015 (r278613) @@ -241,10 +241,10 @@ data_abort_handler(struct trapframe *tf) pcb = td->td_pcb; /* Re-enable interrupts if they were enabled previously */ if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(tf->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } @@ -446,7 +446,7 @@ dab_fatal(struct trapframe *tf, u_int fs mode = TRAP_USERMODE(tf) ? "user" : "kernel"; - disable_interrupts(I32_bit|F32_bit); + disable_interrupts(PSR_I|PSR_F); if (td != NULL) { printf("Fatal %s mode data abort: '%s'\n", mode, data_aborts[fsr & FAULT_TYPE_MASK].desc); @@ -656,10 +656,10 @@ prefetch_abort_handler(struct trapframe } fault_pc = tf->tf_pc; if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(tf->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(tf->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } /* Prefetch aborts cannot happen in kernel mode */ @@ -864,10 +864,10 @@ swi_handler(struct trapframe *frame) * be safe to enable them, but check anyway. */ if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(frame->tf_spsr & I32_bit) == 0) - enable_interrupts(I32_bit); - if (__predict_true(frame->tf_spsr & F32_bit) == 0) - enable_interrupts(F32_bit); + if (__predict_true(frame->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(frame->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); } syscall(td, frame); Modified: stable/10/sys/arm/arm/undefined.c ============================================================================== --- stable/10/sys/arm/arm/undefined.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/undefined.c Thu Feb 12 03:50:33 2015 (r278613) @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -180,8 +181,10 @@ undefinedinstruction(struct trapframe *f ksiginfo_t ksi; /* Enable interrupts if they were enabled before the exception. */ - if (!(frame->tf_spsr & I32_bit)) - enable_interrupts(I32_bit|F32_bit); + if (__predict_true(frame->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(frame->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); PCPU_INC(cnt.v_trap); Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 03:50:33 2015 (r278613) @@ -157,7 +157,7 @@ cpu_fork(register struct thread *td1, re sf->sf_r4 = (u_int)fork_return; sf->sf_r5 = (u_int)td2; sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C_bit; + tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; tf->tf_r1 = 0; pcb2->un_32.pcb32_sp = (u_int)sf; @@ -327,7 +327,7 @@ cpu_set_syscall_retval(struct thread *td frame->tf_r0 = td->td_retval[0]; frame->tf_r1 = td->td_retval[1]; } - frame->tf_spsr &= ~PSR_C_bit; /* carry bit */ + frame->tf_spsr &= ~PSR_C; /* carry bit */ break; case ERESTART: /* @@ -340,7 +340,7 @@ cpu_set_syscall_retval(struct thread *td break; default: frame->tf_r0 = error; - frame->tf_spsr |= PSR_C_bit; /* carry bit */ + frame->tf_spsr |= PSR_C; /* carry bit */ break; } } @@ -365,7 +365,7 @@ cpu_set_upcall(struct thread *td, struct sf->sf_r4 = (u_int)fork_return; sf->sf_r5 = (u_int)td; sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C_bit; + tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; td->td_pcb->un_32.pcb32_sp = (u_int)sf; KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/at91/at91.c Thu Feb 12 03:50:33 2015 (r278613) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #define _ARM32_BUS_DMA_PRIVATE #include #include @@ -303,7 +304,7 @@ at91_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (0); } Modified: stable/10/sys/arm/at91/at91_aic.c ============================================================================== --- stable/10/sys/arm/at91/at91_aic.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/at91/at91_aic.c Thu Feb 12 03:50:33 2015 (r278613) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -149,7 +150,7 @@ at91_aic_attach(device_t dev) /* Disable and clear all interrupts. */ WR4(sc, IC_IDCR, 0xffffffff); WR4(sc, IC_ICCR, 0xffffffff); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (err); } Modified: stable/10/sys/arm/cavium/cns11xx/econa.c ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/econa.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/cavium/cns11xx/econa.c Thu Feb 12 03:50:33 2015 (r278613) @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #define _ARM32_BUS_DMA_PRIVATE +#include #include #include #include @@ -508,7 +509,7 @@ econa_attach(device_t dev) bus_generic_probe(dev); bus_generic_attach(dev); - enable_interrupts(I32_bit | F32_bit); + enable_interrupts(PSR_I | PSR_F); return (0); } Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/include/armreg.h Thu Feb 12 03:50:33 2015 (r278613) @@ -44,21 +44,29 @@ #define INSN_SIZE 4 #define INSN_COND_MASK 0xf0000000 /* Condition mask */ #define PSR_MODE 0x0000001f /* mode mask */ -#define PSR_USR26_MODE 0x00000000 -#define PSR_FIQ26_MODE 0x00000001 -#define PSR_IRQ26_MODE 0x00000002 -#define PSR_SVC26_MODE 0x00000003 #define PSR_USR32_MODE 0x00000010 #define PSR_FIQ32_MODE 0x00000011 #define PSR_IRQ32_MODE 0x00000012 #define PSR_SVC32_MODE 0x00000013 +#define PSR_MON32_MODE 0x00000016 #define PSR_ABT32_MODE 0x00000017 +#define PSR_HYP32_MODE 0x0000001a #define PSR_UND32_MODE 0x0000001b #define PSR_SYS32_MODE 0x0000001f #define PSR_32_MODE 0x00000010 -#define PSR_FLAGS 0xf0000000 /* flags */ - -#define PSR_C_bit (1 << 29) /* carry */ +#define PSR_T 0x00000020 /* Instruction set bit */ +#define PSR_F 0x00000040 /* FIQ disable bit */ +#define PSR_I 0x00000080 /* IRQ disable bit */ +#define PSR_A 0x00000100 /* Imprecise abort bit */ +#define PSR_E 0x00000200 /* Data endianess bit */ +#define PSR_GE 0x000f0000 /* Greater than or equal to bits */ +#define PSR_J 0x01000000 /* Java bit */ +#define PSR_Q 0x08000000 /* Sticky overflow bit */ +#define PSR_V 0x10000000 /* Overflow bit */ +#define PSR_C 0x20000000 /* Carry bit */ +#define PSR_Z 0x40000000 /* Zero bit */ +#define PSR_N 0x80000000 /* Negative bit */ +#define PSR_FLAGS 0xf0000000 /* Flags mask. */ /* The high-order byte is always the implementor */ #define CPU_ID_IMPLEMENTOR_MASK 0xff000000 @@ -235,16 +243,23 @@ #define CPU_CONTROL_SYST_ENABLE 0x00000100 /* S: System protection bit */ #define CPU_CONTROL_ROM_ENABLE 0x00000200 /* R: ROM protection bit */ #define CPU_CONTROL_CPCLK 0x00000400 /* F: Implementation defined */ +#define CPU_CONTROL_SW_ENABLE 0x00000400 /* SW: SWP instruction enable */ #define CPU_CONTROL_BPRD_ENABLE 0x00000800 /* Z: Branch prediction enable */ #define CPU_CONTROL_IC_ENABLE 0x00001000 /* I: IC enable */ #define CPU_CONTROL_VECRELOC 0x00002000 /* V: Vector relocation */ #define CPU_CONTROL_ROUNDROBIN 0x00004000 /* RR: Predictable replacement */ #define CPU_CONTROL_V4COMPAT 0x00008000 /* L4: ARMv4 compat LDR R15 etc */ +#define CPU_CONTROL_HAF_ENABLE 0x00020000 /* HA: Hardware Access Flag Enable */ #define CPU_CONTROL_FI_ENABLE 0x00200000 /* FI: Low interrupt latency */ #define CPU_CONTROL_UNAL_ENABLE 0x00400000 /* U: unaligned data access */ #define CPU_CONTROL_V6_EXTPAGE 0x00800000 /* XP: ARMv6 extended page tables */ +#define CPU_CONTROL_V_ENABLE 0x01000000 /* VE: Interrupt vectors enable */ +#define CPU_CONTROL_EX_BEND 0x02000000 /* EE: exception endianness */ #define CPU_CONTROL_L2_ENABLE 0x04000000 /* L2 Cache enabled */ -#define CPU_CONTROL_AF_ENABLE 0x20000000 /* Access Flag enable */ +#define CPU_CONTROL_NMFI 0x08000000 /* NMFI: Non maskable FIQ */ +#define CPU_CONTROL_TR_ENABLE 0x10000000 /* TRE: TEX Remap*/ +#define CPU_CONTROL_AF_ENABLE 0x20000000 /* AFE: Access Flag enable */ +#define CPU_CONTROL_TE_ENABLE 0x40000000 /* TE: Thumb Exception enable */ #define CPU_CONTROL_IDC_ENABLE CPU_CONTROL_DC_ENABLE @@ -361,6 +376,15 @@ #define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */ #define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */ +/* Fault status register definitions - v6+ */ +#define FSR_STATUS_TO_IDX(fsr) (((fsr) & 0xF) | \ + (((fsr) & (1 << 10)>> (10 - 4)))) +#define FSR_LPAE (1 << 9) /* LPAE indicator */ +#define FSR_WNR (1 << 11) /* Write-not-Read access */ +#define FSR_EXT (1 << 12) /* DECERR/SLVERR for external*/ +#define FSR_CM (1 << 13) /* Cache maintenance fault */ + + /* * Address of the vector page, low and high versions. */ Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 03:50:33 2015 (r278613) @@ -43,12 +43,6 @@ #define _C_LABEL(x) x #define _ASM_LABEL(x) x -#define I32_bit (1 << 7) /* IRQ disable */ -#define F32_bit (1 << 6) /* FIQ disable */ - -#define CPU_CONTROL_32BP_ENABLE 0x00000010 /* P: 32-bit exception handlers */ -#define CPU_CONTROL_32BD_ENABLE 0x00000020 /* D: 32-bit addressing */ - #ifndef _ALIGN_TEXT # define _ALIGN_TEXT .align 0 #endif Modified: stable/10/sys/arm/include/atomic.h ============================================================================== --- stable/10/sys/arm/include/atomic.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/include/atomic.h Thu Feb 12 03:50:33 2015 (r278613) @@ -40,6 +40,7 @@ #define _MACHINE_ATOMIC_H_ #include +#include #ifndef _KERNEL #include @@ -67,12 +68,7 @@ #define wmb() dmb() #define rmb() dmb() -#ifndef I32_bit -#define I32_bit (1 << 7) /* IRQ disable */ -#endif -#ifndef F32_bit -#define F32_bit (1 << 6) /* FIQ disable */ -#endif + /* * It would be nice to use _HAVE_ARMv6_INSTRUCTIONS from machine/asm.h @@ -702,7 +698,7 @@ atomic_store_rel_long(volatile u_long *p "orr %1, %0, %2;" \ "msr cpsr_fsxc, %1;" \ : "=r" (cpsr_save), "=r" (tmp) \ - : "I" (I32_bit | F32_bit) \ + : "I" (PSR_I | PSR_F) \ : "cc" ); \ (expr); \ __asm __volatile( \ Modified: stable/10/sys/arm/s3c2xx0/s3c24x0.c ============================================================================== --- stable/10/sys/arm/s3c2xx0/s3c24x0.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/s3c2xx0/s3c24x0.c Thu Feb 12 03:50:33 2015 (r278613) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -638,7 +639,7 @@ s3c24x0_clock_freq(struct s3c2xx0_softc void cpu_reset(void) { - (void) disable_interrupts(I32_bit|F32_bit); + (void) disable_interrupts(PSR_I|PSR_F); bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_wdt_ioh, WDT_WTCON, WTCON_ENABLE | WTCON_CLKSEL_16 | WTCON_ENRST); Modified: stable/10/sys/arm/xscale/i80321/i80321_intr.h ============================================================================== --- stable/10/sys/arm/xscale/i80321/i80321_intr.h Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i80321/i80321_intr.h Thu Feb 12 03:50:33 2015 (r278613) @@ -106,7 +106,7 @@ i80321_splx(int new) hwpend = (i80321_ipending & ICU_INT_HWMASK) & ~new; if (hwpend != 0) { - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); intr_enabled |= hwpend; i80321_set_intrmask(); restore_interrupts(oldirqstate); Modified: stable/10/sys/arm/xscale/i80321/i80321_timer.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/i80321_timer.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i80321/i80321_timer.c Thu Feb 12 03:50:33 2015 (r278613) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -381,7 +382,7 @@ cpu_initclocks(void) /* Report the clock frequency. */ - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, #ifdef CPU_XSCALE_81342 Modified: stable/10/sys/arm/xscale/i80321/iq80321.c ============================================================================== --- stable/10/sys/arm/xscale/i80321/iq80321.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i80321/iq80321.c Thu Feb 12 03:50:33 2015 (r278613) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -325,7 +326,7 @@ arm_unmask_irq(uintptr_t nb) void cpu_reset() { - (void) disable_interrupts(I32_bit|F32_bit); + (void) disable_interrupts(PSR_I|PSR_F); *(__volatile uint32_t *)(IQ80321_80321_VBASE + VERDE_ATU_BASE + ATU_PCSR) = PCSR_RIB | PCSR_RPB; printf("Reset failed!\n"); Modified: stable/10/sys/arm/xscale/i8134x/i81342.c ============================================================================== --- stable/10/sys/arm/xscale/i8134x/i81342.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/i8134x/i81342.c Thu Feb 12 03:50:33 2015 (r278613) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #define _ARM32_BUS_DMA_PRIVATE +#include #include #include @@ -248,7 +249,7 @@ void cpu_reset(void) { - disable_interrupts(I32_bit); + disable_interrupts(PSR_I); /* XXX: Use the watchdog to reset for now */ __asm __volatile("mcr p6, 0, %0, c8, c9, 0\n" "mcr p6, 0, %1, c7, c9, 0\n" Modified: stable/10/sys/arm/xscale/ixp425/ixp425.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/ixp425/ixp425.c Thu Feb 12 03:50:33 2015 (r278613) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -202,7 +203,7 @@ arm_mask_irq(uintptr_t nb) { int i; - i = disable_interrupts(I32_bit); + i = disable_interrupts(PSR_I); if (nb < 32) { intr_enabled &= ~(1 << nb); ixp425_set_intrmask(); @@ -220,7 +221,7 @@ arm_unmask_irq(uintptr_t nb) { int i; - i = disable_interrupts(I32_bit); + i = disable_interrupts(PSR_I); if (nb < 32) { intr_enabled |= (1 << nb); ixp425_set_intrmask(); Modified: stable/10/sys/arm/xscale/ixp425/ixp425_pci.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425_pci.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/ixp425/ixp425_pci.c Thu Feb 12 03:50:33 2015 (r278613) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -70,7 +71,7 @@ extern struct ixp425_softc *ixp425_softc #define PCI_CSR_READ_4(sc, reg) \ bus_read_4(sc->sc_csr, reg) -#define PCI_CONF_LOCK(s) (s) = disable_interrupts(I32_bit) +#define PCI_CONF_LOCK(s) (s) = disable_interrupts(PSR_I) #define PCI_CONF_UNLOCK(s) restore_interrupts((s)) static device_probe_t ixppcib_probe; Modified: stable/10/sys/arm/xscale/ixp425/ixp425_timer.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/ixp425_timer.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/ixp425/ixp425_timer.c Thu Feb 12 03:50:33 2015 (r278613) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -175,7 +176,7 @@ cpu_initclocks(void) /* Report the clock frequency. */ - oldirqstate = disable_interrupts(I32_bit); + oldirqstate = disable_interrupts(PSR_I); irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, IXP425_INT_TMR0, IXP425_INT_TMR0, 1, RF_ACTIVE); Modified: stable/10/sys/arm/xscale/pxa/pxa_icu.c ============================================================================== --- stable/10/sys/arm/xscale/pxa/pxa_icu.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/pxa/pxa_icu.c Thu Feb 12 03:50:33 2015 (r278613) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -105,7 +106,7 @@ pxa_icu_attach(device_t dev) pxa_icu_set_iclr(0); /* XXX: This should move to configure_final or something. */ - enable_interrupts(I32_bit|F32_bit); + enable_interrupts(PSR_I|PSR_F); return (0); } Modified: stable/10/sys/arm/xscale/pxa/pxa_timer.c ============================================================================== --- stable/10/sys/arm/xscale/pxa/pxa_timer.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/sys/arm/xscale/pxa/pxa_timer.c Thu Feb 12 03:50:33 2015 (r278613) @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -190,7 +191,7 @@ cpu_reset(void) { uint32_t val; - (void)disable_interrupts(I32_bit|F32_bit); + (void)disable_interrupts(PSR_I|PSR_F); val = pxa_timer_get_oscr(); val += PXA_TIMER_FREQUENCY; Modified: stable/10/usr.bin/truss/arm-fbsd.c ============================================================================== --- stable/10/usr.bin/truss/arm-fbsd.c Thu Feb 12 03:16:57 2015 (r278612) +++ stable/10/usr.bin/truss/arm-fbsd.c Thu Feb 12 03:50:33 2015 (r278613) @@ -316,7 +316,7 @@ arm_syscall_exit(struct trussinfo *truss } retval = regs.r[0]; - errorp = !!(regs.r_cpsr & PSR_C_bit); + errorp = !!(regs.r_cpsr & PSR_C); /* * This code, while simpler than the initial versions I used, could From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 04:16:01 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 17E2C399; Thu, 12 Feb 2015 04:16: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 003DFFC3; Thu, 12 Feb 2015 04:16: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 t1C4G0Qf025024; Thu, 12 Feb 2015 04:16:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C4FuXM024991; Thu, 12 Feb 2015 04:15:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502120415.t1C4FuXM024991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 04:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278614 - in stable/10: gnu/usr.bin/gdb/kgdb sys/arm/arm sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 04:16:01 -0000 Author: ian Date: Thu Feb 12 04:15:55 2015 New Revision: 278614 URL: https://svnweb.freebsd.org/changeset/base/278614 Log: MFC r276187, r276190, r271422: Rename pmap_kenter_temp to pmap_kenter_temporary to be consistent with the other architectures with this function. Eliminate unnecessary references to pte.h internals by using the standard pmap_kenter_temporary() to map pages while dumping. Cleanup up ARM *frame structures. Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c stable/10/sys/arm/arm/db_trace.c stable/10/sys/arm/arm/dump_machdep.c stable/10/sys/arm/arm/gdb_machdep.c stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/arm/minidump_machdep.c stable/10/sys/arm/arm/pmap-v6.c stable/10/sys/arm/arm/pmap.c stable/10/sys/arm/arm/stack_machdep.c stable/10/sys/arm/arm/swtch.S stable/10/sys/arm/arm/trap.c stable/10/sys/arm/arm/vm_machdep.c stable/10/sys/arm/include/db_machdep.h stable/10/sys/arm/include/frame.h stable/10/sys/arm/include/pcb.h stable/10/sys/arm/include/pmap.h Directory Properties: stable/10/ (props changed) Modified: stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c ============================================================================== --- stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/gnu/usr.bin/gdb/kgdb/trgt_arm.c Thu Feb 12 04:15:55 2015 (r278614) @@ -68,20 +68,12 @@ kgdb_trgt_fetch_registers(int regno __un warnx("kvm_read: %s", kvm_geterr(kvm)); memset(&pcb, 0, sizeof(pcb)); } - for (i = ARM_A1_REGNUM + 8; i <= ARM_SP_REGNUM; i++) { - supply_register(i, (char *)&pcb.un_32.pcb32_r8 + - (i - (ARM_A1_REGNUM + 8 )) * 4); - } - if (pcb.un_32.pcb32_sp != 0) { - for (i = 0; i < 4; i++) { - if (kvm_read(kvm, pcb.un_32.pcb32_sp + (i) * 4, - ®, 4) != 4) { - warnx("kvm_read: %s", kvm_geterr(kvm)); - break; - } - supply_register(ARM_A1_REGNUM + 4 + i, (char *)®); - } - if (kvm_read(kvm, pcb.un_32.pcb32_sp + 4 * 4, ®, 4) != 4) + for (i = ARM_A1_REGNUM + 4; i <= ARM_SP_REGNUM; i++) { + supply_register(i, (char *)&pcb.pcb_regs.sf_r4 + + (i - (ARM_A1_REGNUM + 4 )) * 4); + } + if (pcb.pcb_regs.sf_sp != 0) { + if (kvm_read(kvm, pcb.pcb_regs.sf_sp + 4 * 4, ®, 4) != 4) warnx("kvm_read :%s", kvm_geterr(kvm)); else supply_register(ARM_PC_REGNUM, (char *)®); Modified: stable/10/sys/arm/arm/db_trace.c ============================================================================== --- stable/10/sys/arm/arm/db_trace.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/db_trace.c Thu Feb 12 04:15:55 2015 (r278614) @@ -603,14 +603,14 @@ db_trace_thread(struct thread *thr, int ctx = kdb_thr_ctx(thr); #ifdef __ARM_EABI__ - state.registers[FP] = ctx->un_32.pcb32_r11; - state.registers[SP] = ctx->un_32.pcb32_sp; - state.registers[LR] = ctx->un_32.pcb32_lr; - state.registers[PC] = ctx->un_32.pcb32_pc; + state.registers[FP] = ctx->pcb_regs.sf_r11; + state.registers[SP] = ctx->pcb_regs.sf_sp; + state.registers[LR] = ctx->pcb_regs.sf_lr; + state.registers[PC] = ctx->pcb_regs.sf_pc; db_stack_trace_cmd(&state); #else - db_stack_trace_cmd(ctx->un_32.pcb32_r11, -1, TRUE); + db_stack_trace_cmd(ctx->pcb_regs.sf_r11, -1, TRUE); #endif } else db_trace_self(); Modified: stable/10/sys/arm/arm/dump_machdep.c ============================================================================== --- stable/10/sys/arm/arm/dump_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/dump_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -161,11 +161,13 @@ static int cb_dumpdata(struct md_pa *mdp, int seqnr, void *arg) { struct dumperinfo *di = (struct dumperinfo*)arg; - vm_paddr_t pa; + vm_paddr_t a, pa; + void *va; uint32_t pgs; size_t counter, sz, chunk; - int c, error; + int i, c, error; + va = 0; error = 0; /* catch case in which chunk size is 0 */ counter = 0; pgs = mdp->md_size / PAGE_SIZE; @@ -195,16 +197,14 @@ cb_dumpdata(struct md_pa *mdp, int seqnr printf(" %d", pgs * PAGE_SIZE); counter &= (1<<24) - 1; } - if (pa == (pa & L1_ADDR_BITS)) { - pmap_kenter_section(0, pa & L1_ADDR_BITS, 0); - cpu_tlb_flushID_SE(0); - cpu_cpwait(); + for (i = 0; i < chunk; i++) { + a = pa + i * PAGE_SIZE; + va = pmap_kenter_temporary(trunc_page(a), i); } #ifdef SW_WATCHDOG wdog_kern_pat(WD_LASTVAL); #endif - error = dump_write(di, - (void *)(pa - (pa & L1_ADDR_BITS)),0, dumplo, sz); + error = dump_write(di, va, 0, dumplo, sz); if (error) break; dumplo += sz; Modified: stable/10/sys/arm/arm/gdb_machdep.c ============================================================================== --- stable/10/sys/arm/arm/gdb_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/gdb_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -67,22 +67,26 @@ gdb_cpu_getreg(int regnum, size_t *regsz } switch (regnum) { - case 8: return (&kdb_thrctx->un_32.pcb32_r8); - case 9: return (&kdb_thrctx->un_32.pcb32_r9); - case 10: return (&kdb_thrctx->un_32.pcb32_r10); - case 11: return (&kdb_thrctx->un_32.pcb32_r11); - case 12: return (&kdb_thrctx->un_32.pcb32_r12); - case 13: stacktest = kdb_thrctx->un_32.pcb32_sp + 5 * 4; + case 4: return (&kdb_thrctx->pcb_regs.sf_r4); + case 5: return (&kdb_thrctx->pcb_regs.sf_r5); + case 6: return (&kdb_thrctx->pcb_regs.sf_r6); + case 7: return (&kdb_thrctx->pcb_regs.sf_r7); + case 8: return (&kdb_thrctx->pcb_regs.sf_r8); + case 9: return (&kdb_thrctx->pcb_regs.sf_r9); + case 10: return (&kdb_thrctx->pcb_regs.sf_r10); + case 11: return (&kdb_thrctx->pcb_regs.sf_r11); + case 12: return (&kdb_thrctx->pcb_regs.sf_r12); + case 13: stacktest = kdb_thrctx->pcb_regs.sf_sp + 5 * 4; return (&stacktest); case 15: /* * On context switch, the PC is not put in the PCB, but * we can retrieve it from the stack. */ - if (kdb_thrctx->un_32.pcb32_sp > KERNBASE) { - kdb_thrctx->un_32.pcb32_pc = *(register_t *) - (kdb_thrctx->un_32.pcb32_sp + 4 * 4); - return (&kdb_thrctx->un_32.pcb32_pc); + if (kdb_thrctx->pcb_regs.sf_sp > KERNBASE) { + kdb_thrctx->pcb_regs.sf_pc = *(register_t *) + (kdb_thrctx->pcb_regs.sf_sp + 4 * 4); + return (&kdb_thrctx->pcb_regs.sf_pc); } } Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/genassym.c Thu Feb 12 04:15:55 2015 (r278614) @@ -63,13 +63,18 @@ ASSYM(PCB_FLAGS, offsetof(struct pcb, pc ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec)); -ASSYM(PCB_R8, offsetof(struct pcb, un_32.pcb32_r8)); -ASSYM(PCB_R9, offsetof(struct pcb, un_32.pcb32_r9)); -ASSYM(PCB_R10, offsetof(struct pcb, un_32.pcb32_r10)); -ASSYM(PCB_R11, offsetof(struct pcb, un_32.pcb32_r11)); -ASSYM(PCB_R12, offsetof(struct pcb, un_32.pcb32_r12)); -ASSYM(PCB_PC, offsetof(struct pcb, un_32.pcb32_pc)); -ASSYM(PCB_SP, offsetof(struct pcb, un_32.pcb32_sp)); +ASSYM(PCB_R4, offsetof(struct pcb, pcb_regs.sf_r4)); +ASSYM(PCB_R5, offsetof(struct pcb, pcb_regs.sf_r5)); +ASSYM(PCB_R6, offsetof(struct pcb, pcb_regs.sf_r6)); +ASSYM(PCB_R7, offsetof(struct pcb, pcb_regs.sf_r7)); +ASSYM(PCB_R8, offsetof(struct pcb, pcb_regs.sf_r8)); +ASSYM(PCB_R9, offsetof(struct pcb, pcb_regs.sf_r9)); +ASSYM(PCB_R10, offsetof(struct pcb, pcb_regs.sf_r10)); +ASSYM(PCB_R11, offsetof(struct pcb, pcb_regs.sf_r11)); +ASSYM(PCB_R12, offsetof(struct pcb, pcb_regs.sf_r12)); +ASSYM(PCB_SP, offsetof(struct pcb, pcb_regs.sf_sp)); +ASSYM(PCB_LR, offsetof(struct pcb, pcb_regs.sf_lr)); +ASSYM(PCB_PC, offsetof(struct pcb, pcb_regs.sf_pc)); ASSYM(PC_CURPCB, offsetof(struct pcpu, pc_curpcb)); ASSYM(PC_CURTHREAD, offsetof(struct pcpu, pc_curthread)); Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -376,7 +376,7 @@ cpu_startup(void *dummy) bufinit(); vm_pager_bufferinit(); - pcb->un_32.pcb32_sp = (u_int)thread0.td_kstack + + pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack + USPACE_SVC_STACK_TOP; vector_page_setprot(VM_PROT_READ); pmap_set_pcb_pagedir(pmap_kernel(), pcb); @@ -768,14 +768,18 @@ sys_sigreturn(td, uap) void makectx(struct trapframe *tf, struct pcb *pcb) { - pcb->un_32.pcb32_r8 = tf->tf_r8; - pcb->un_32.pcb32_r9 = tf->tf_r9; - pcb->un_32.pcb32_r10 = tf->tf_r10; - pcb->un_32.pcb32_r11 = tf->tf_r11; - pcb->un_32.pcb32_r12 = tf->tf_r12; - pcb->un_32.pcb32_pc = tf->tf_pc; - pcb->un_32.pcb32_lr = tf->tf_usr_lr; - pcb->un_32.pcb32_sp = tf->tf_usr_sp; + pcb->pcb_regs.sf_r4 = tf->tf_r4; + pcb->pcb_regs.sf_r5 = tf->tf_r5; + pcb->pcb_regs.sf_r6 = tf->tf_r6; + pcb->pcb_regs.sf_r7 = tf->tf_r7; + pcb->pcb_regs.sf_r8 = tf->tf_r8; + pcb->pcb_regs.sf_r9 = tf->tf_r9; + pcb->pcb_regs.sf_r10 = tf->tf_r10; + pcb->pcb_regs.sf_r11 = tf->tf_r11; + pcb->pcb_regs.sf_r12 = tf->tf_r12; + pcb->pcb_regs.sf_pc = tf->tf_pc; + pcb->pcb_regs.sf_lr = tf->tf_usr_lr; + pcb->pcb_regs.sf_sp = tf->tf_usr_sp; } /* Modified: stable/10/sys/arm/arm/minidump_machdep.c ============================================================================== --- stable/10/sys/arm/arm/minidump_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/minidump_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -154,7 +154,7 @@ blk_write(struct dumperinfo *di, char *p sz -= len; } else { for (i = 0; i < len; i += PAGE_SIZE) - dump_va = pmap_kenter_temp(pa + i, + dump_va = pmap_kenter_temporary(pa + i, (i + fragsz) >> PAGE_SHIFT); fragsz += len; pa += len; @@ -244,7 +244,7 @@ minidumpsys(struct dumperinfo *di) } if (pmap_pde_v(pdp) && pmap_pde_page(pdp)) { /* Set bit for each valid page in this 1MB block */ - addr = pmap_kenter_temp(*pdp & L1_C_ADDR_MASK, 0); + addr = pmap_kenter_temporary(*pdp & L1_C_ADDR_MASK, 0); pt = (pt_entry_t*)(addr + (((uint32_t)*pdp & L1_C_ADDR_MASK) & PAGE_MASK)); for (k = 0; k < 256; k++) { Modified: stable/10/sys/arm/arm/pmap-v6.c ============================================================================== --- stable/10/sys/arm/arm/pmap-v6.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/pmap-v6.c Thu Feb 12 04:15:55 2015 (r278614) @@ -2371,7 +2371,7 @@ pmap_kenter_section(vm_offset_t va, vm_o * to be used for panic dumps. */ void * -pmap_kenter_temp(vm_paddr_t pa, int i) +pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; Modified: stable/10/sys/arm/arm/pmap.c ============================================================================== --- stable/10/sys/arm/arm/pmap.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/pmap.c Thu Feb 12 04:15:55 2015 (r278614) @@ -2666,7 +2666,7 @@ pmap_kenter_section(vm_offset_t va, vm_o * to be used for panic dumps. */ void * -pmap_kenter_temp(vm_paddr_t pa, int i) +pmap_kenter_temporary(vm_paddr_t pa, int i) { vm_offset_t va; Modified: stable/10/sys/arm/arm/stack_machdep.c ============================================================================== --- stable/10/sys/arm/arm/stack_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/stack_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -76,7 +76,7 @@ stack_save_td(struct stack *st, struct t * as it doesn't have a frame pointer, however it's value is not used * when building for EABI. */ - frame = (u_int32_t *)td->td_pcb->un_32.pcb32_r11; + frame = (u_int32_t *)td->td_pcb->pcb_regs.sf_r11; stack_zero(st); stack_capture(st, frame); } Modified: stable/10/sys/arm/arm/swtch.S ============================================================================== --- stable/10/sys/arm/arm/swtch.S Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/swtch.S Thu Feb 12 04:15:55 2015 (r278614) @@ -116,6 +116,14 @@ __FBSDID("$FreeBSD$"); .Lblocked_lock: .word _C_LABEL(blocked_lock) +/* + * cpu_throw(oldtd, newtd) + * + * Remove current thread state, then select the next thread to run + * and load its state. + * r0 = oldtd + * r1 = newtd + */ ENTRY(cpu_throw) mov r5, r1 @@ -144,7 +152,6 @@ ENTRY(cpu_throw) * r0 = Pointer to L1 slot for vector_page (or NULL) * r1 = lwp0's DACR * r5 = lwp0 - * r6 = exit func * r7 = lwp0's PCB * r9 = cpufuncs */ @@ -181,25 +188,11 @@ ENTRY(cpu_throw) mov lr, pc ldr pc, [r9, #CF_CONTEXT_SWITCH] - /* Restore all the save registers */ -#ifndef _ARM_ARCH_5E - add r1, r7, #PCB_R8 - ldmia r1, {r8-r13} -#else - ldr r8, [r7, #(PCB_R8)] - ldr r9, [r7, #(PCB_R9)] - ldr r10, [r7, #(PCB_R10)] - ldr r11, [r7, #(PCB_R11)] - ldr r12, [r7, #(PCB_R12)] - ldr r13, [r7, #(PCB_SP)] -#endif - GET_PCPU(r6, r4) /* Hook in a new pcb */ str r7, [r6, #PC_CURPCB] /* We have a new curthread now so make a note it */ - add r6, r6, #PC_CURTHREAD - str r5, [r6] + str r5, [r6, #PC_CURTHREAD] #ifndef ARM_TP_ADDRESS mcr p15, 0, r5, c13, c0, 4 #endif @@ -215,22 +208,31 @@ ENTRY(cpu_throw) #else mcr p15, 0, r6, c13, c0, 3 #endif - - add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} + /* Restore all the saved registers and exit */ + add r3, r7, #PCB_R4 + ldmia r3, {r4-r12, sp, pc} END(cpu_throw) +/* + * cpu_switch(oldtd, newtd, lock) + * + * Save the current thread state, then select the next thread to run + * and load its state. + * r0 = oldtd + * r1 = newtd + * r2 = lock (new lock for old thread) + */ ENTRY(cpu_switch) - stmfd sp!, {r4-r7, lr} - sub sp, sp, #4; -#ifdef __ARM_EABI__ - .save {r4-r7, lr} - .pad #4 -#endif + /* Interrupts are disabled. */ + /* Save all the registers in the old thread's pcb. */ + ldr r3, [r0, #(TD_PCB)] + + /* Restore all the saved registers and exit */ + add r3, #(PCB_R4) + stmia r3, {r4-r12, sp, lr, pc} mov r6, r2 /* Save the mutex */ -.Lswitch_resume: /* rem: r0 = old lwp */ /* rem: interrupts are disabled */ @@ -246,30 +248,12 @@ ENTRY(cpu_switch) ldr r2, [r1, #TD_PCB] str r2, [r7, #PC_CURPCB] - /* rem: r1 = new process */ - /* rem: interrupts are enabled */ - /* Stage two : Save old context */ /* Get the user structure for the old thread. */ ldr r2, [r0, #(TD_PCB)] mov r4, r0 /* Save the old thread. */ - /* Save all the registers in the old thread's pcb */ -#ifndef _ARM_ARCH_5E - add r7, r2, #(PCB_R8) - stmia r7, {r8-r13} -#else - strd r8, [r2, #(PCB_R8)] - strd r10, [r2, #(PCB_R10)] - strd r12, [r2, #(PCB_R12)] -#endif - str pc, [r2, #(PCB_PC)] - - /* - * NOTE: We can now use r8-r13 until it is time to restore - * them for the new process. - */ #ifdef ARM_TP_ADDRESS /* Store the old tp */ ldr r3, =ARM_TP_ADDRESS @@ -318,7 +302,6 @@ ENTRY(cpu_switch) /* rem: r2 = old PCB */ /* rem: r9 = new PCB */ - /* rem: interrupts are enabled */ ldr r5, [r9, #(PCB_DACR)] /* r5 = new DACR */ mov r2, #DOMAIN_CLIENT @@ -336,7 +319,6 @@ ENTRY(cpu_switch) mrc p15, 0, r10, c2, c0, 0 /* r10 = old L1 */ ldr r11, [r9, #(PCB_PAGEDIR)] /* r11 = new L1 */ - teq r10, r11 /* Same L1? */ cmpeq r0, r5 /* Same DACR? */ beq .Lcs_context_switched /* yes! */ @@ -426,54 +408,18 @@ ENTRY(cpu_switch) /* rem: r9 = new PCB */ - /* Restore all the save registers */ -#ifndef _ARM_ARCH_5E - add r7, r9, #PCB_R8 - ldmia r7, {r8-r13} - sub r7, r7, #PCB_R8 /* restore PCB pointer */ -#else - mov r7, r9 - ldr r8, [r7, #(PCB_R8)] - ldr r9, [r7, #(PCB_R9)] - ldr r10, [r7, #(PCB_R10)] - ldr r11, [r7, #(PCB_R11)] - ldr r12, [r7, #(PCB_R12)] - ldr r13, [r7, #(PCB_SP)] -#endif - - /* rem: r5 = new lwp's proc */ - /* rem: r6 = lock */ - /* rem: r7 = new PCB */ - -.Lswitch_return: - - /* - * Pull the registers that got pushed when either savectx() or - * cpu_switch() was called and return. - */ - add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} -#ifdef DIAGNOSTIC -.Lswitch_bogons: - adr r0, .Lswitch_panic_str - bl _C_LABEL(panic) -1: nop - b 1b - -.Lswitch_panic_str: - .asciz "cpu_switch: sched_qs empty with non-zero sched_whichqs!\n" -#endif + /* Restore all the saved registers and exit */ + add r3, r9, #PCB_R4 + ldmia r3, {r4-r12, sp, pc} END(cpu_switch) ENTRY(savectx) - stmfd sp!, {r4-r7, lr} + stmfd sp!, {lr} sub sp, sp, #4 - /* - * r0 = pcb - */ - /* Store all the registers in the process's pcb */ - add r2, r0, #(PCB_R8) - stmia r2, {r8-r13} + + /* Store all the registers in the thread's pcb */ + add r3, r0, #(PCB_R4) + stmia r3, {r4-r12, sp, lr, pc} #ifdef VFP fmrx r2, fpexc /* If the VFP is enabled */ tst r2, #(VFPEXC_EN) /* the current thread has */ @@ -482,7 +428,7 @@ ENTRY(savectx) blne _C_LABEL(vfp_store) /* and disable the VFP. */ #endif add sp, sp, #4; - ldmfd sp!, {r4-r7, pc} + ldmfd sp!, {pc} END(savectx) ENTRY(fork_trampoline) Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/trap.c Thu Feb 12 04:15:55 2015 (r278614) @@ -565,7 +565,7 @@ dab_buserr(struct trapframe *tf, u_int f * If the current trapframe is at the top of the kernel stack, * the fault _must_ have come from user mode. */ - if (tf != ((struct trapframe *)pcb->un_32.pcb32_sp) - 1) { + if (tf != ((struct trapframe *)pcb->pcb_regs.sf_sp) - 1) { /* * Kernel mode. We're either about to die a * spectacular death, or pcb_onfault will come Modified: stable/10/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/arm/vm_machdep.c Thu Feb 12 04:15:55 2015 (r278614) @@ -80,7 +80,7 @@ __FBSDID("$FreeBSD$"); * struct switchframe and trapframe must both be a multiple of 8 * for correct stack alignment. */ -CTASSERT(sizeof(struct switchframe) == 24); +CTASSERT(sizeof(struct switchframe) == 48); CTASSERT(sizeof(struct trapframe) == 80); #ifndef NSFBUFS @@ -130,43 +130,55 @@ cpu_fork(register struct thread *td1, re { struct pcb *pcb2; struct trapframe *tf; - struct switchframe *sf; struct mdproc *mdp2; if ((flags & RFPROC) == 0) return; - pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; + + /* Point the pcb to the top of the stack */ + pcb2 = (struct pcb *) + (td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td2->td_kstack, td2->td_kstack_pages * PAGE_SIZE); #endif #endif td2->td_pcb = pcb2; + + /* Clone td1's pcb */ bcopy(td1->td_pcb, pcb2, sizeof(*pcb2)); + + /* Point to mdproc and then copy over td1's contents */ mdp2 = &p2->p_md; bcopy(&td1->td_proc->p_md, mdp2, sizeof(*mdp2)); - pcb2->un_32.pcb32_sp = td2->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(*pcb2); + + /* Point the frame to the stack in front of pcb and copy td1's frame */ + td2->td_frame = (struct trapframe *)pcb2 - 1; + *td2->td_frame = *td1->td_frame; + + /* + * Create a new fresh stack for the new process. + * Copy the trap frame for the return to user mode as if from a + * syscall. This copies most of the user mode register values. + */ + pmap_set_pcb_pagedir(vmspace_pmap(p2->p_vmspace), pcb2); + pcb2->pcb_regs.sf_r4 = (register_t)fork_return; + pcb2->pcb_regs.sf_r5 = (register_t)td2; + pcb2->pcb_regs.sf_lr = (register_t)fork_trampoline; + pcb2->pcb_regs.sf_sp = STACKALIGN(td2->td_frame); + pcb2->pcb_vfpcpu = -1; pcb2->pcb_vfpstate.fpscr = VFPSCR_DN | VFPSCR_FZ; - pmap_activate(td2); - td2->td_frame = tf = (struct trapframe *)STACKALIGN( - pcb2->un_32.pcb32_sp - sizeof(struct trapframe)); - *tf = *td1->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)fork_return; - sf->sf_r5 = (u_int)td2; - sf->sf_pc = (u_int)fork_trampoline; + + tf = td2->td_frame; tf->tf_spsr &= ~PSR_C; tf->tf_r0 = 0; tf->tf_r1 = 0; - pcb2->un_32.pcb32_sp = (u_int)sf; - KASSERT((pcb2->un_32.pcb32_sp & 7) == 0, - ("cpu_fork: Incorrect stack alignment")); + /* Setup to release spin count in fork_exit(). */ td2->td_md.md_spinlock_count = 1; - td2->td_md.md_saved_cspr = 0; + td2->td_md.md_saved_cspr = PSR_SVC32_MODE;; #ifdef ARM_TP_ADDRESS td2->td_md.md_tp = *(register_t *)ARM_TP_ADDRESS; #else @@ -355,25 +367,21 @@ cpu_set_syscall_retval(struct thread *td void cpu_set_upcall(struct thread *td, struct thread *td0) { - struct trapframe *tf; - struct switchframe *sf; bcopy(td0->td_frame, td->td_frame, sizeof(struct trapframe)); bcopy(td0->td_pcb, td->td_pcb, sizeof(struct pcb)); - tf = td->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)fork_return; - sf->sf_r5 = (u_int)td; - sf->sf_pc = (u_int)fork_trampoline; - tf->tf_spsr &= ~PSR_C; - tf->tf_r0 = 0; - td->td_pcb->un_32.pcb32_sp = (u_int)sf; - KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, - ("cpu_set_upcall: Incorrect stack alignment")); + + td->td_pcb->pcb_regs.sf_r4 = (register_t)fork_return; + td->td_pcb->pcb_regs.sf_r5 = (register_t)td; + td->td_pcb->pcb_regs.sf_lr = (register_t)fork_trampoline; + td->td_pcb->pcb_regs.sf_sp = STACKALIGN(td->td_frame); + + td->td_frame->tf_spsr &= ~PSR_C; + td->td_frame->tf_r0 = 0; /* Setup to release spin count in fork_exit(). */ td->td_md.md_spinlock_count = 1; - td->td_md.md_saved_cspr = 0; + td->td_md.md_saved_cspr = PSR_SVC32_MODE; } /* @@ -387,8 +395,7 @@ cpu_set_upcall_kse(struct thread *td, vo { struct trapframe *tf = td->td_frame; - tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size - - sizeof(struct trapframe)); + tf->tf_usr_sp = STACKALIGN((int)stack->ss_sp + stack->ss_size); tf->tf_pc = (int)entry; tf->tf_r0 = (int)arg; tf->tf_spsr = PSR_USR32_MODE; @@ -426,9 +433,8 @@ cpu_thread_alloc(struct thread *td) * placed into the stack pointer which must be 8 byte aligned in * the ARM EABI. */ - td->td_frame = (struct trapframe *)STACKALIGN((u_int)td->td_kstack + - USPACE_SVC_STACK_TOP - sizeof(struct pcb) - - sizeof(struct trapframe)); + td->td_frame = (struct trapframe *)((caddr_t)td->td_pcb) - 1; + #ifdef __XSCALE__ #ifndef CPU_XSCALE_CORE3 pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE); @@ -455,16 +461,8 @@ cpu_thread_clean(struct thread *td) void cpu_set_fork_handler(struct thread *td, void (*func)(void *), void *arg) { - struct switchframe *sf; - struct trapframe *tf; - - tf = td->td_frame; - sf = (struct switchframe *)tf - 1; - sf->sf_r4 = (u_int)func; - sf->sf_r5 = (u_int)arg; - td->td_pcb->un_32.pcb32_sp = (u_int)sf; - KASSERT((td->td_pcb->un_32.pcb32_sp & 7) == 0, - ("cpu_set_fork_handler: Incorrect stack alignment")); + td->td_pcb->pcb_regs.sf_r4 = (register_t)func; /* function */ + td->td_pcb->pcb_regs.sf_r5 = (register_t)arg; /* first arg */ } /* Modified: stable/10/sys/arm/include/db_machdep.h ============================================================================== --- stable/10/sys/arm/include/db_machdep.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/db_machdep.h Thu Feb 12 04:15:55 2015 (r278614) @@ -38,7 +38,7 @@ typedef vm_offset_t db_addr_t; typedef int db_expr_t; -#define PC_REGS() ((db_addr_t)kdb_thrctx->un_32.pcb32_pc) +#define PC_REGS() ((db_addr_t)kdb_thrctx->pcb_regs.sf_pc) #define BKPT_INST (KERNEL_BREAKPOINT) #define BKPT_SIZE (INSN_SIZE) Modified: stable/10/sys/arm/include/frame.h ============================================================================== --- stable/10/sys/arm/include/frame.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/frame.h Thu Feb 12 04:15:55 2015 (r278614) @@ -86,57 +86,16 @@ struct trapframe { #define tf_r13 tf_usr_sp #define tf_r14 tf_usr_lr #define tf_r15 tf_pc -/* - * * Scheduler activations upcall frame. Pushed onto user stack before - * * calling an SA upcall. - * */ - -struct saframe { -#if 0 /* in registers on entry to upcall */ - int sa_type; - struct sa_t ** sa_sas; - int sa_events; - int sa_interrupted; -#endif - void * sa_arg; -}; /* - * * Signal frame. Pushed onto user stack before calling sigcode. - * */ - -/* the pointers are use in the trampoline code to locate the ucontext */ + * Signal frame. Pushed onto user stack before calling sigcode. + * The pointers are used in the trampoline code to locate the ucontext. + */ struct sigframe { - siginfo_t sf_si; /* actual saved siginfo */ + siginfo_t sf_si; /* actual saved siginfo */ ucontext_t sf_uc; /* actual saved ucontext */ }; -/* - * System stack frames. - */ - - -typedef struct irqframe { - unsigned int if_spsr; - unsigned int if_r0; - unsigned int if_r1; - unsigned int if_r2; - unsigned int if_r3; - unsigned int if_r4; - unsigned int if_r5; - unsigned int if_r6; - unsigned int if_r7; - unsigned int if_r8; - unsigned int if_r9; - unsigned int if_r10; - unsigned int if_r11; - unsigned int if_r12; - unsigned int if_usr_sp; - unsigned int if_usr_lr; - unsigned int if_svc_sp; - unsigned int if_svc_lr; - unsigned int if_pc; -} irqframe_t; /* * Switch frame. @@ -144,16 +103,23 @@ typedef struct irqframe { * It is important this is a multiple of 8 bytes so the stack is correctly * aligned when we create new threads. */ - -struct switchframe { - u_int pad; /* Used to pad the struct to a multiple of 8-bytes */ - u_int sf_r4; - u_int sf_r5; - u_int sf_r6; - u_int sf_r7; - u_int sf_pc; +struct switchframe +{ + register_t sf_r4; + register_t sf_r5; + register_t sf_r6; + register_t sf_r7; + register_t sf_r8; + register_t sf_r9; + register_t sf_r10; + register_t sf_r11; + register_t sf_r12; + register_t sf_sp; + register_t sf_lr; + register_t sf_pc; }; + /* * Stack frame. Used during stack traces (db_trace.c) */ Modified: stable/10/sys/arm/include/pcb.h ============================================================================== --- stable/10/sys/arm/include/pcb.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/pcb.h Thu Feb 12 04:15:55 2015 (r278614) @@ -39,50 +39,29 @@ #define _MACHINE_PCB_H_ #include +#include -struct trapframe; - -struct pcb_arm32 { - vm_offset_t pcb32_pagedir; /* PT hooks */ - uint32_t *pcb32_pl1vec; /* PTR to vector_base L1 entry*/ - uint32_t pcb32_l1vec; /* Value to stuff on ctx sw */ - u_int pcb32_dacr; /* Domain Access Control Reg */ - /* - * WARNING! - * cpuswitch.S relies on pcb32_r8 being quad-aligned in struct pcb - * (due to the use of "strd" when compiled for XSCALE) - */ - u_int pcb32_r8; /* used */ - u_int pcb32_r9; /* used */ - u_int pcb32_r10; /* used */ - u_int pcb32_r11; /* used */ - u_int pcb32_r12; /* used */ - u_int pcb32_sp; /* used */ - u_int pcb32_lr; - u_int pcb32_pc; -}; -#define pcb_pagedir un_32.pcb32_pagedir -#define pcb_pl1vec un_32.pcb32_pl1vec -#define pcb_l1vec un_32.pcb32_l1vec -#define pcb_dacr un_32.pcb32_dacr -#define pcb_cstate un_32.pcb32_cstate - /* * WARNING! - * See warning for struct pcb_arm32, above, before changing struct pcb! + * Keep pcb_regs first for faster access in switch.S */ struct pcb { + struct switchframe pcb_regs; /* CPU state */ u_int pcb_flags; #define PCB_OWNFPU 0x00000001 #define PCB_NOALIGNFLT 0x00000002 caddr_t pcb_onfault; /* On fault handler */ - struct pcb_arm32 un_32; + vm_offset_t pcb_pagedir; /* PT hooks */ + uint32_t *pcb_pl1vec; /* PTR to vector_base L1 entry*/ + uint32_t pcb_l1vec; /* Value to stuff on ctx sw */ + u_int pcb_dacr; /* Domain Access Control Reg */ + struct vfp_state pcb_vfpstate; /* VP/NEON state */ u_int pcb_vfpcpu; /* VP/NEON last cpu */ } __aligned(8); /* * We need the PCB to be aligned on 8 bytes, as we may - * access it using ldrd/strd, and some CPUs require it + * access it using ldrd/strd, and ARM ABI require it * to by aligned on 8 bytes. */ Modified: stable/10/sys/arm/include/pmap.h ============================================================================== --- stable/10/sys/arm/include/pmap.h Thu Feb 12 03:50:33 2015 (r278613) +++ stable/10/sys/arm/include/pmap.h Thu Feb 12 04:15:55 2015 (r278614) @@ -256,7 +256,7 @@ int pmap_change_attr(vm_offset_t, vm_siz void pmap_kenter(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_nocache(vm_offset_t va, vm_paddr_t pa); void pmap_kenter_device(vm_offset_t va, vm_paddr_t pa); -void *pmap_kenter_temp(vm_paddr_t pa, int i); +void *pmap_kenter_temporary(vm_paddr_t pa, int i); void pmap_kenter_user(vm_offset_t va, vm_paddr_t pa); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kremove(vm_offset_t); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 07:21:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 821734A3; Thu, 12 Feb 2015 07:21: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 6C66D604; Thu, 12 Feb 2015 07:21: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 t1C7LOYH012897; Thu, 12 Feb 2015 07:21:24 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C7LOqu012895; Thu, 12 Feb 2015 07:21:24 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502120721.t1C7LOqu012895@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 12 Feb 2015 07:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278617 - in stable: 10/sys/dev/drm2/radeon 9/sys/dev/drm2/radeon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 07:21:24 -0000 Author: dim Date: Thu Feb 12 07:21:22 2015 New Revision: 278617 URL: https://svnweb.freebsd.org/changeset/base/278617 Log: MFC r278004: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1727 MFC r278438: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1748 Modified: stable/10/sys/dev/drm2/radeon/ni.c stable/10/sys/dev/drm2/radeon/si.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/dev/drm2/radeon/ni.c stable/9/sys/dev/drm2/radeon/si.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/dev/drm2/radeon/ni.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/ni.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/10/sys/dev/drm2/radeon/ni.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ int ni_mc_load_microcode(struct radeon_d { const __be32 *fw_data; u32 mem_type, running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (u32 *)&barts_io_mc_regs; + io_mc_regs = &barts_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (u32 *)&turks_io_mc_regs; + io_mc_regs = &turks_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (u32 *)&caicos_io_mc_regs; + io_mc_regs = &caicos_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (u32 *)&cayman_io_mc_regs; + io_mc_regs = &cayman_io_mc_regs[0][0]; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: stable/10/sys/dev/drm2/radeon/si.c ============================================================================== --- stable/10/sys/dev/drm2/radeon/si.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/10/sys/dev/drm2/radeon/si.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ static int si_mc_load_microcode(struct r { const __be32 *fw_data; u32 running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (u32 *)&tahiti_io_mc_regs; + io_mc_regs = &tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (u32 *)&pitcairn_io_mc_regs; + io_mc_regs = &pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (u32 *)&verde_io_mc_regs; + io_mc_regs = &verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 07:21:23 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9917F4A2; Thu, 12 Feb 2015 07:21: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 8383E601; Thu, 12 Feb 2015 07:21: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 t1C7LNhV012890; Thu, 12 Feb 2015 07:21:23 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1C7LNsp012888; Thu, 12 Feb 2015 07:21:23 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502120721.t1C7LNsp012888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 12 Feb 2015 07:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278617 - in stable: 10/sys/dev/drm2/radeon 9/sys/dev/drm2/radeon X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 07:21:23 -0000 Author: dim Date: Thu Feb 12 07:21:22 2015 New Revision: 278617 URL: https://svnweb.freebsd.org/changeset/base/278617 Log: MFC r278004: Constify a number of accesses in drm2's radeon drivers to avoid -Wcast-qual warnings. No functional change. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1727 MFC r278438: After r278004 was committed, Bruce Evans noted that the casts were actually completely unnecessary, here: https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly. Reviewed by: dumbbell Differential Revision: https://reviews.freebsd.org/D1748 Modified: stable/9/sys/dev/drm2/radeon/ni.c stable/9/sys/dev/drm2/radeon/si.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/drm2/radeon/ni.c stable/10/sys/dev/drm2/radeon/si.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/drm2/radeon/ni.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/ni.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/9/sys/dev/drm2/radeon/ni.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ int ni_mc_load_microcode(struct radeon_d { const __be32 *fw_data; u32 mem_type, running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,23 +190,23 @@ int ni_mc_load_microcode(struct radeon_d switch (rdev->family) { case CHIP_BARTS: - io_mc_regs = (u32 *)&barts_io_mc_regs; + io_mc_regs = &barts_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_TURKS: - io_mc_regs = (u32 *)&turks_io_mc_regs; + io_mc_regs = &turks_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAICOS: default: - io_mc_regs = (u32 *)&caicos_io_mc_regs; + io_mc_regs = &caicos_io_mc_regs[0][0]; ucode_size = BTC_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; case CHIP_CAYMAN: - io_mc_regs = (u32 *)&cayman_io_mc_regs; + io_mc_regs = &cayman_io_mc_regs[0][0]; ucode_size = CAYMAN_MC_UCODE_SIZE; regs_size = BTC_IO_MC_REGS_SIZE; break; Modified: stable/9/sys/dev/drm2/radeon/si.c ============================================================================== --- stable/9/sys/dev/drm2/radeon/si.c Thu Feb 12 05:35:00 2015 (r278616) +++ stable/9/sys/dev/drm2/radeon/si.c Thu Feb 12 07:21:22 2015 (r278617) @@ -182,7 +182,7 @@ static int si_mc_load_microcode(struct r { const __be32 *fw_data; u32 running, blackout = 0; - u32 *io_mc_regs; + const u32 *io_mc_regs; int i, ucode_size, regs_size; if (!rdev->mc_fw) @@ -190,18 +190,18 @@ static int si_mc_load_microcode(struct r switch (rdev->family) { case CHIP_TAHITI: - io_mc_regs = (u32 *)&tahiti_io_mc_regs; + io_mc_regs = &tahiti_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_PITCAIRN: - io_mc_regs = (u32 *)&pitcairn_io_mc_regs; + io_mc_regs = &pitcairn_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; case CHIP_VERDE: default: - io_mc_regs = (u32 *)&verde_io_mc_regs; + io_mc_regs = &verde_io_mc_regs[0][0]; ucode_size = SI_MC_UCODE_SIZE; regs_size = TAHITI_IO_MC_REGS_SIZE; break; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 11:10:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF9737C7; Thu, 12 Feb 2015 11:10: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 DA467FB4; Thu, 12 Feb 2015 11:10: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 t1CBA7pp017688; Thu, 12 Feb 2015 11:10:07 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CBA7Z3017686; Thu, 12 Feb 2015 11:10:07 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201502121110.t1CBA7Z3017686@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Thu, 12 Feb 2015 11:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278620 - stable/10/sys/netinet6 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 11:10:08 -0000 Author: ae Date: Thu Feb 12 11:10:07 2015 New Revision: 278620 URL: https://svnweb.freebsd.org/changeset/base/278620 Log: MFC r278268: Print IPv6 address in log message instead of address of pointer. Modified: stable/10/sys/netinet6/in6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet6/in6.c ============================================================================== --- stable/10/sys/netinet6/in6.c Thu Feb 12 10:28:45 2015 (r278619) +++ stable/10/sys/netinet6/in6.c Thu Feb 12 11:10:07 2015 (r278620) @@ -1543,6 +1543,7 @@ in6_purgeaddr(struct ifaddr *ifa) static void in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp) { + char ip6buf[INET6_ADDRSTRLEN]; IF_ADDR_WLOCK(ifp); TAILQ_REMOVE(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); @@ -1566,7 +1567,7 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st if (ia->ia6_ndpr == NULL) { nd6log((LOG_NOTICE, "in6_unlink_ifa: autoconf'ed address " - "%p has no prefix\n", ia)); + "%s has no prefix\n", ip6_sprintf(ip6buf, IA6_IN6(ia)))); } else { ia->ia6_ndpr->ndpr_refcnt--; ia->ia6_ndpr = NULL; From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 17:01:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9ED3D5B; Thu, 12 Feb 2015 17:01: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 B5352D73; Thu, 12 Feb 2015 17:01: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 t1CH1tkH087155; Thu, 12 Feb 2015 17:01:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CH1tvW087154; Thu, 12 Feb 2015 17:01:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121701.t1CH1tvW087154@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 17:01:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278626 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 17:01:55 -0000 Author: ian Date: Thu Feb 12 17:01:54 2015 New Revision: 278626 URL: https://svnweb.freebsd.org/changeset/base/278626 Log: MFC r276191: Display correct value for cache level-of-coherency (needs +1). Modified: stable/10/sys/arm/arm/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/identcpu.c ============================================================================== --- stable/10/sys/arm/arm/identcpu.c Thu Feb 12 15:46:44 2015 (r278625) +++ stable/10/sys/arm/arm/identcpu.c Thu Feb 12 17:01:54 2015 (r278626) @@ -455,7 +455,7 @@ identify_arm_cpu(void) if (arm_cache_level) { printf("LoUU:%d LoC:%d LoUIS:%d \n", CPU_CLIDR_LOUU(arm_cache_level) + 1, - arm_cache_loc, CPU_CLIDR_LOUIS(arm_cache_level) + 1); + arm_cache_loc + 1, CPU_CLIDR_LOUIS(arm_cache_level) + 1); i = 0; while (((type = CPU_CLIDR_CTYPE(arm_cache_level, i)) != 0) && i < 7) { printf("Cache level %d: \n", i + 1); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 17:58:03 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7188B24F; Thu, 12 Feb 2015 17:58:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5CD553E1; Thu, 12 Feb 2015 17:58:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1CHw3l0011654; Thu, 12 Feb 2015 17:58:03 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CHw3mP011653; Thu, 12 Feb 2015 17:58:03 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201502121758.t1CHw3mP011653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 12 Feb 2015 17:58:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278628 - stable/10/sys/dev/pci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 17:58:03 -0000 Author: jhb Date: Thu Feb 12 17:58:02 2015 New Revision: 278628 URL: https://svnweb.freebsd.org/changeset/base/278628 Log: MFC 277710: Pass a valid Dx state variable to PCIB_POWER_FOR_SLEEP() in pcib_resume() instead of NULL. Modified: stable/10/sys/dev/pci/pci_pci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/pci/pci_pci.c ============================================================================== --- stable/10/sys/dev/pci/pci_pci.c Thu Feb 12 17:16:54 2015 (r278627) +++ stable/10/sys/dev/pci/pci_pci.c Thu Feb 12 17:58:02 2015 (r278628) @@ -933,11 +933,13 @@ int pcib_resume(device_t dev) { device_t pcib; + int dstate; if (pci_do_power_resume) { pcib = device_get_parent(device_get_parent(dev)); - if (PCIB_POWER_FOR_SLEEP(pcib, dev, NULL) == 0) - pci_set_powerstate(dev, PCI_POWERSTATE_D0); + dstate = PCI_POWERSTATE_D0; + if (PCIB_POWER_FOR_SLEEP(pcib, dev, &dstate) == 0) + pci_set_powerstate(dev, dstate); } pcib_cfg_restore(device_get_softc(dev)); return (bus_generic_resume(dev)); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 19:32:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97B1490D; Thu, 12 Feb 2015 19:32: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 781B9FB0; Thu, 12 Feb 2015 19:32: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 t1CJW8s7058868; Thu, 12 Feb 2015 19:32:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CJW8Yf058866; Thu, 12 Feb 2015 19:32:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121932.t1CJW8Yf058866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 19:32:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278629 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 19:32:08 -0000 Author: ian Date: Thu Feb 12 19:32:07 2015 New Revision: 278629 URL: https://svnweb.freebsd.org/changeset/base/278629 Log: MFC r276196, r276197, r276198, r276202, r276203, r276204: Change the style of the DO_AST macro to match the others Remove _PROF_PROLOGUE from the EENTRY() macros. Stylish changes... put tabs where they need to be in macros, move lines around so that related things are more grouped together, rewrite comments. Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY. Create 'L' variants of all the ENTRY macros for file-static/local symbols. Modified: stable/10/sys/arm/arm/exception.S stable/10/sys/arm/include/asm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Thu Feb 12 17:58:02 2015 (r278628) +++ stable/10/sys/arm/arm/exception.S Thu Feb 12 19:32:07 2015 (r278629) @@ -241,26 +241,26 @@ __FBSDID("$FreeBSD$"); #define UNWINDSVCFRAME #endif -#define DO_AST \ - ldr r0, [sp] /* Get the SPSR from stack */ ;\ - mrs r4, cpsr /* save CPSR */ ;\ - orr r1, r4, #(PSR_I|PSR_F) ;\ - msr cpsr_c, r1 /* Disable interrupts */ ;\ - and r0, r0, #(PSR_MODE) /* Returning to USR mode? */ ;\ - teq r0, #(PSR_USR32_MODE) ;\ - bne 2f /* Nope, get out now */ ;\ - bic r4, r4, #(PSR_I|PSR_F) ;\ -1: GET_CURTHREAD_PTR(r5) ;\ - ldr r1, [r5, #(TD_FLAGS)] ;\ - and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED) ;\ - teq r1, #0x00000000 ;\ - beq 2f /* Nope. Just bail */ ;\ - msr cpsr_c, r4 /* Restore interrupts */ ;\ - mov r0, sp ;\ - bl _C_LABEL(ast) /* ast(frame) */ ;\ - orr r0, r4, #(PSR_I|PSR_F) ;\ - msr cpsr_c, r0 ;\ - b 1b ;\ +#define DO_AST \ + ldr r0, [sp]; /* Get the SPSR from stack */ \ + mrs r4, cpsr; /* save CPSR */ \ + orr r1, r4, #(PSR_I|PSR_F); \ + msr cpsr_c, r1; /* Disable interrupts */ \ + and r0, r0, #(PSR_MODE); /* Returning to USR mode? */ \ + teq r0, #(PSR_USR32_MODE); \ + bne 2f; /* Nope, get out now */ \ + bic r4, r4, #(PSR_I|PSR_F); \ +1: GET_CURTHREAD_PTR(r5); \ + ldr r1, [r5, #(TD_FLAGS)]; \ + and r1, r1, #(TDF_ASTPENDING|TDF_NEEDRESCHED); \ + teq r1, #0; \ + beq 2f; /* Nope. Just bail */ \ + msr cpsr_c, r4; /* Restore interrupts */ \ + mov r0, sp; \ + bl _C_LABEL(ast); /* ast(frame) */ \ + orr r0, r4, #(PSR_I|PSR_F); \ + msr cpsr_c, r0; \ + b 1b; \ 2: Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 17:58:02 2015 (r278628) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 19:32:07 2015 (r278629) @@ -58,7 +58,24 @@ #endif /* + * gas/arm uses @ as a single comment character and thus cannot be used here. + * It recognises the # instead of an @ symbol in .type directives. + */ +#define _ASM_TYPE_FUNCTION #function +#define _ASM_TYPE_OBJECT #object + +/* XXX Is this still the right prologue for profiling? */ +#ifdef GPROF +#define _PROF_PROLOGUE \ + mov ip, lr; \ + bl __mcount +#else +#define _PROF_PROLOGUE +#endif + +/* * EENTRY()/EEND() mark "extra" entry/exit points from a function. + * LEENTRY()/LEEND() are the the same for local symbols. * The unwind info cannot handle the concept of a nested function, or a function * with multiple .fnstart directives, but some of our assembler code is written * with multiple labels to allow entry at several points. The EENTRY() macro @@ -66,41 +83,36 @@ * basically just a label that you can jump to. The EEND() macro does nothing * at all, except document the exit point associated with the same-named entry. */ -#define _EENTRY(x) .globl x; .type x,_ASM_TYPE_FUNCTION; x: -#define _EEND(x) /* nothing */ +#define GLOBAL(x) .global x -/* - * gas/arm uses @ as a single comment character and thus cannot be used here - * Instead it recognised the # instead of an @ symbols in .type directives - * We define a couple of macros so that assembly code will not be dependent - * on one or the other. - */ -#define _ASM_TYPE_FUNCTION #function -#define _ASM_TYPE_OBJECT #object -#define GLOBAL(X) .globl x -#define _ENTRY(x) \ - .text; _ALIGN_TEXT; _EENTRY(x) _FNSTART -#define _END(x) .size x, . - x; _FNEND - -#ifdef GPROF -# define _PROF_PROLOGUE \ - mov ip, lr; bl __mcount -#else -# define _PROF_PROLOGUE -#endif +#define _LEENTRY(x) .type x,_ASM_TYPE_FUNCTION; x: +#define _LEEND(x) /* nothing */ +#define _EENTRY(x) GLOBAL(x); _LEENTRY(x) +#define _EEND(x) _LEEND(x) + +#define _LENTRY(x) .text; _ALIGN_TEXT; _LEENTRY(x); _FNSTART +#define _LEND(x) .size x, . - x; _FNEND +#define _ENTRY(x) .text; _ALIGN_TEXT; _EENTRY(x); _FNSTART +#define _END(x) _LEND(x) #define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE -#define EENTRY(y) _EENTRY(_C_LABEL(y)); _PROF_PROLOGUE +#define EENTRY(y) _EENTRY(_C_LABEL(y)); #define ENTRY_NP(y) _ENTRY(_C_LABEL(y)) #define EENTRY_NP(y) _EENTRY(_C_LABEL(y)) #define END(y) _END(_C_LABEL(y)) -#define EEND(y) +#define EEND(y) _EEND(_C_LABEL(y)) #define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE -#define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE +#define ASLENTRY(y) _LENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE +#define ASEENTRY(y) _EENTRY(_ASM_LABEL(y)); +#define ASLEENTRY(y) _LEENTRY(_ASM_LABEL(y)); #define ASENTRY_NP(y) _ENTRY(_ASM_LABEL(y)) +#define ASLENTRY_NP(y) _LENTRY(_ASM_LABEL(y)) #define ASEENTRY_NP(y) _EENTRY(_ASM_LABEL(y)) +#define ASLEENTRY_NP(y) _LEENTRY(_ASM_LABEL(y)) #define ASEND(y) _END(_ASM_LABEL(y)) -#define ASEEND(y) +#define ASLEND(y) _LEND(_ASM_LABEL(y)) +#define ASEEND(y) _EEND(_ASM_LABEL(y)) +#define ASLEEND(y) _LEEND(_ASM_LABEL(y)) #define ASMSTR .asciz From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 19:35:48 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFF83A80; Thu, 12 Feb 2015 19:35: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 DA481FD5; Thu, 12 Feb 2015 19:35: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 t1CJZlGZ059420; Thu, 12 Feb 2015 19:35:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CJZl3q059417; Thu, 12 Feb 2015 19:35:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121935.t1CJZl3q059417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 19:35:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278630 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 19:35:48 -0000 Author: ian Date: Thu Feb 12 19:35:46 2015 New Revision: 278630 URL: https://svnweb.freebsd.org/changeset/base/278630 Log: MFC r276206: For data and instruction prefetch aborts, call the same handler in the C code, passing a 0/1 flag that indicates which type of abort it was. This sets the stage for unifying the handling of page faults in a single routine. Modified: stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/trap.c stable/10/sys/arm/include/machdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Thu Feb 12 19:32:07 2015 (r278629) +++ stable/10/sys/arm/arm/exception.S Thu Feb 12 19:35:46 2015 (r278630) @@ -320,7 +320,8 @@ ASENTRY_NP(prefetch_abort_entry) PUSHFRAMEINSVC /* mode stack, build trapframe there. */ adr lr, exception_exit /* Return from handler via standard */ mov r0, sp /* exception exit routine. Pass the */ - b prefetch_abort_handler /* trapframe to the handler. */ + mov r1, #1 /* Type flag */ + b _C_LABEL(abort_handler) END(prefetch_abort_entry) /* @@ -337,9 +338,10 @@ ASENTRY_NP(data_abort_entry) #endif sub lr, lr, #8 /* Adjust the lr. Transition to scv32 */ PUSHFRAMEINSVC /* mode stack, build trapframe there. */ - adr lr, exception_exit /* Return from handler via standard */ - mov r0, sp /* exception exit routine. Pass the */ - b data_abort_handler /* trapframe to the handler. */ + adr lr, exception_exit /* Exception exit routine */ + mov r0, sp /* Trapframe to the handler */ + mov r1, #0 /* Type flag */ + b _C_LABEL(abort_handler) END(data_abort_entry) /* Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Thu Feb 12 19:32:07 2015 (r278629) +++ stable/10/sys/arm/arm/trap.c Thu Feb 12 19:35:46 2015 (r278630) @@ -152,6 +152,7 @@ static int dab_align(struct trapframe *, struct ksig *); static int dab_buserr(struct trapframe *, u_int, u_int, struct thread *, struct ksig *); +static void prefetch_abort_handler(struct trapframe *); static const struct data_abort data_aborts[] = { {dab_fatal, "Vector Exception"}, @@ -196,7 +197,7 @@ call_trapsignal(struct thread *td, int s } void -data_abort_handler(struct trapframe *tf) +abort_handler(struct trapframe *tf, int type) { struct vm_map *map; struct pcb *pcb; @@ -209,6 +210,8 @@ data_abort_handler(struct trapframe *tf) struct ksig ksig; struct proc *p; + if (type == 1) + return (prefetch_abort_handler(tf)); /* Grab FAR/FSR before enabling interrupts */ far = cpu_faultaddress(); @@ -625,7 +628,7 @@ dab_buserr(struct trapframe *tf, u_int f * does no have read permission so send it a signal. * Otherwise fault the page in and try again. */ -void +static void prefetch_abort_handler(struct trapframe *tf) { struct thread *td; Modified: stable/10/sys/arm/include/machdep.h ============================================================================== --- stable/10/sys/arm/include/machdep.h Thu Feb 12 19:32:07 2015 (r278629) +++ stable/10/sys/arm/include/machdep.h Thu Feb 12 19:35:46 2015 (r278630) @@ -20,8 +20,7 @@ struct trapframe; void arm_lock_cache_line(vm_offset_t); void init_proc0(vm_offset_t kstack); void halt(void); -void data_abort_handler(struct trapframe *); -void prefetch_abort_handler(struct trapframe *); +void abort_handler(struct trapframe *, int ); void set_stackptrs(int cpu); void undefinedinstruction_bounce(struct trapframe *); From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 19:45:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75662C60; Thu, 12 Feb 2015 19:45: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 5E40A121; Thu, 12 Feb 2015 19:45: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 t1CJj8V3064152; Thu, 12 Feb 2015 19:45:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CJj78t064149; Thu, 12 Feb 2015 19:45:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502121945.t1CJj78t064149@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 19:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278631 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 19:45:08 -0000 Author: ian Date: Thu Feb 12 19:45:07 2015 New Revision: 278631 URL: https://svnweb.freebsd.org/changeset/base/278631 Log: MFC r272209, r272300, r276212, r276213: Add machine/sysreg.h to simplify accessing the system control coprocessor registers and use it in the ARMv7 CPU functions. Add macros for asm barrier instructions with arch-specific implementations. Define only the CP15 register operations that are valid for the architecture. Added: stable/10/sys/arm/include/sysreg.h - copied, changed from r272209, head/sys/arm/include/sysreg.h Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S stable/10/sys/arm/include/asm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv7.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv7.S Thu Feb 12 19:35:46 2015 (r278630) +++ stable/10/sys/arm/arm/cpufunc_asm_armv7.S Thu Feb 12 19:45:07 2015 (r278631) @@ -33,6 +33,8 @@ #include __FBSDID("$FreeBSD$"); +#include + .cpu cortex-a8 .Lcoherency_level: @@ -70,12 +72,12 @@ ENTRY(armv7_setttb) dsb orr r0, r0, #PT_ATTR - mcr p15, 0, r0, c2, c0, 0 /* Translation Table Base Register 0 (TTBR0) */ + mcr CP15_TTBR0(r0) isb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 /* invalidate I+D TLBs Inner Shareable*/ + mcr CP15_TLBIALLIS #else - mcr p15, 0, r0, c8, c7, 0 /* invalidate I+D TLBs */ + mcr CP15_TLBIALL #endif dsb isb @@ -85,11 +87,11 @@ END(armv7_setttb) ENTRY(armv7_tlb_flushID) dsb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 /* flush Unified TLB all entries Inner Shareable */ - mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ + mcr CP15_TLBIALLIS + mcr CP15_BPIALLIS #else - mcr p15, 0, r0, c8, c7, 0 /* flush Unified TLB all entries */ - mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ + mcr CP15_TLBIALL + mcr CP15_BPIALL #endif dsb isb @@ -100,11 +102,11 @@ ENTRY(armv7_tlb_flushID_SE) ldr r1, .Lpage_mask bic r0, r0, r1 #ifdef SMP - mcr p15, 0, r0, c8, c3, 3 /* flush Unified TLB single entry Inner Shareable */ - mcr p15, 0, r0, c7, c1, 6 /* flush BTB Inner Shareable */ + mcr CP15_TLBIMVAAIS(r0) + mcr CP15_BPIALLIS #else - mcr p15, 0, r0, c8, c7, 1 /* flush Unified TLB single entry */ - mcr p15, 0, r0, c7, c5, 6 /* flush BTB */ + mcr CP15_TLBIMVA(r0) + mcr CP15_BPIALL #endif dsb isb @@ -149,7 +151,7 @@ Loop3: orr r6, r6, r7, lsl r2 /* Clean and invalidate data cache by way/index */ - mcr p15, 0, r6, c7, c14, 2 + mcr CP15_DCCISW(r6) subs r9, r9, #1 bge Loop3 subs r7, r7, #1 @@ -168,9 +170,9 @@ ENTRY(armv7_idcache_wbinv_all) stmdb sp!, {lr} bl armv7_dcache_wbinv_all #ifdef SMP - mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I caches to PoU (ICIALLUIS) */ + mcr CP15_ICIALLUIS #else - mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I caches to PoU (ICIALLU) */ + mcr CP15_ICIALLU #endif dsb isb @@ -191,7 +193,7 @@ ENTRY(armv7_dcache_wb_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_wb_next: - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ + mcr CP15_DCCMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_wb_next @@ -206,7 +208,7 @@ ENTRY(armv7_dcache_wbinv_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_wbinv_next: - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ + mcr CP15_DCCIMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_wbinv_next @@ -225,7 +227,7 @@ ENTRY(armv7_dcache_inv_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_inv_next: - mcr p15, 0, r0, c7, c6, 1 /* Invalidate D cache SE with VA */ + mcr CP15_DCIMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_inv_next @@ -240,8 +242,8 @@ ENTRY(armv7_idcache_wbinv_range) add r1, r1, r2 bic r0, r0, r3 .Larmv7_id_wbinv_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c14, 1 /* Purge D cache SE with VA */ + mcr CP15_ICIMVAU(r0) + mcr CP15_DCCIMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_id_wbinv_next @@ -252,9 +254,9 @@ END(armv7_idcache_wbinv_range) ENTRY_NP(armv7_icache_sync_all) #ifdef SMP - mcr p15, 0, r0, c7, c1, 0 /* Invalidate all I cache to PoU Inner Shareable */ + mcr CP15_ICIALLUIS #else - mcr p15, 0, r0, c7, c5, 0 /* Invalidate all I cache to PoU (ICIALLU) */ + mcr CP15_ICIALLU #endif isb /* instruction synchronization barrier */ dsb /* data synchronization barrier */ @@ -264,8 +266,8 @@ END(armv7_icache_sync_all) ENTRY_NP(armv7_icache_sync_range) ldr ip, .Larmv7_line_size .Larmv7_sync_next: - mcr p15, 0, r0, c7, c5, 1 /* Invalidate I cache SE with VA */ - mcr p15, 0, r0, c7, c10, 1 /* Clean D cache SE with VA */ + mcr CP15_ICIMVAU(r0) + mcr CP15_DCCMVAC(r0) add r0, r0, ip subs r1, r1, ip bhi .Larmv7_sync_next @@ -283,13 +285,13 @@ END(armv7_cpu_sleep) ENTRY(armv7_context_switch) dsb orr r0, r0, #PT_ATTR - - mcr p15, 0, r0, c2, c0, 0 /* set the new TTB */ + + mcr CP15_TTBR0(r0) isb #ifdef SMP - mcr p15, 0, r0, c8, c3, 0 /* and flush the I+D tlbs Inner Sharable */ + mcr CP15_TLBIALLIS #else - mcr p15, 0, r0, c8, c7, 0 /* and flush the I+D tlbs */ + mcr CP15_TLBIALL #endif dsb isb @@ -309,12 +311,12 @@ ENTRY(armv7_sev) END(armv7_sev) ENTRY(armv7_auxctrl) - mrc p15, 0, r2, c1, c0, 1 + mrc CP15_ACTLR(r2) bic r3, r2, r0 /* Clear bits */ eor r3, r3, r1 /* XOR bits */ teq r2, r3 - mcrne p15, 0, r3, c1, c0, 1 + mcrne CP15_ACTLR(r3) mov r0, r2 RET END(armv7_auxctrl) @@ -325,8 +327,8 @@ END(armv7_auxctrl) */ ENTRY(armv7_idcache_inv_all) mov r0, #0 - mcr p15, 2, r0, c0, c0, 0 @ set cache level to L1 - mrc p15, 1, r0, c0, c0, 0 @ read CCSIDR + mcr CP15_CSSELR(r0) @ set cache level to L1 + mrc CP15_CCSIDR(r0) ubfx r2, r0, #13, #15 @ get num sets - 1 from CCSIDR ubfx r3, r0, #3, #10 @ get numways - 1 from CCSIDR @@ -345,7 +347,7 @@ ENTRY(armv7_idcache_inv_all) mov r2, ip @ r2 now contains set way decr /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ -1: mcr p15, 0, r3, c7, c6, 2 @ invalidate line +1: mcr CP15_DCISW(r3) @ invalidate line movs r0, r3 @ get current way/set beq 2f @ at 0 means we are done. movs r0, r0, lsl #10 @ clear way bits leaving only set bits @@ -355,7 +357,7 @@ ENTRY(armv7_idcache_inv_all) 2: dsb @ wait for stores to finish mov r0, #0 @ and ... - mcr p15, 0, r0, c7, c5, 0 @ invalidate instruction+branch cache + mcr CP15_ICIALLU @ invalidate instruction+branch cache isb @ instruction sync barrier bx lr @ return END(armv7_idcache_inv_all) Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 19:35:46 2015 (r278630) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 19:45:07 2015 (r278631) @@ -39,6 +39,7 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include +#include #define _C_LABEL(x) x #define _ASM_LABEL(x) x @@ -221,4 +222,18 @@ # define RETc(c) mov##c pc, lr #endif +#if __ARM_ARCH >= 7 +#define ISB isb +#define DSB dsb +#define DMB dmb +#elif __ARM_ARCH == 6 +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB +#define DMB mcr CP15_CP15DMB +#else +#define ISB mcr CP15_CP15ISB +#define DSB mcr CP15_CP15DSB /* DSB and DMB are the */ +#define DMB mcr CP15_CP15DSB /* same prior to v6.*/ +#endif + #endif /* !_MACHINE_ASM_H_ */ Copied and modified: stable/10/sys/arm/include/sysreg.h (from r272209, head/sys/arm/include/sysreg.h) ============================================================================== --- head/sys/arm/include/sysreg.h Sat Sep 27 09:57:34 2014 (r272209, copy source) +++ stable/10/sys/arm/include/sysreg.h Thu Feb 12 19:45:07 2015 (r278631) @@ -34,6 +34,8 @@ #ifndef MACHINE_SYSREG_H #define MACHINE_SYSREG_H +#include + /* * CP15 C0 registers */ @@ -97,12 +99,13 @@ #if __ARM_ARCH >= 6 /* From ARMv6: */ #define CP15_IFSR(rr) p15, 0, rr, c5, c0, 1 /* Instruction Fault Status Register */ +#endif +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_ADFSR(rr) p15, 0, rr, c5, c1, 0 /* Auxiliary Data Fault Status Register */ #define CP15_AIFSR(rr) p15, 0, rr, c5, c1, 1 /* Auxiliary Instruction Fault Status Register */ #endif - /* * CP15 C6 registers */ @@ -116,7 +119,7 @@ /* * CP15 C7 registers */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_ICIALLUIS p15, 0, r0, c7, c1, 0 /* Instruction cache invalidate all PoU, IS */ #define CP15_BPIALLIS p15, 0, r0, c7, c1, 6 /* Branch predictor invalidate all IS */ @@ -126,14 +129,14 @@ #define CP15_ICIALLU p15, 0, r0, c7, c5, 0 /* Instruction cache invalidate all PoU */ #define CP15_ICIMVAU(rr) p15, 0, rr, c7, c5, 1 /* Instruction cache invalidate */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Deprecated in ARMv7 */ #define CP15_CP15ISB p15, 0, r0, c7, c5, 4 /* ISB */ #endif #define CP15_BPIALL p15, 0, r0, c7, c5, 6 /* Branch predictor invalidate all */ #define CP15_BPIMVA p15, 0, rr, c7, c5, 7 /* Branch predictor invalidate by MVA */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCIALL p15, 0, r0, c7, c6, 0 /* Data cache invalidate all */ #endif @@ -145,7 +148,7 @@ #define CP15_ATS1CUR(rr) p15, 0, rr, c7, c8, 2 /* Stage 1 Current state unprivileged read */ #define CP15_ATS1CUW(rr) p15, 0, rr, c7, c8, 3 /* Stage 1 Current state unprivileged write */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_ATS12NSOPR(rr) p15, 0, rr, c7, c8, 4 /* Stages 1 and 2 Non-secure only PL1 read */ #define CP15_ATS12NSOPW(rr) p15, 0, rr, c7, c8, 5 /* Stages 1 and 2 Non-secure only PL1 write */ @@ -153,24 +156,24 @@ #define CP15_ATS12NSOUW(rr) p15, 0, rr, c7, c8, 7 /* Stages 1 and 2 Non-secure only unprivileged write */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCCALL p15, 0, r0, c7, c10, 0 /* Data cache clean all */ #endif #define CP15_DCCMVAC(rr) p15, 0, rr, c7, c10, 1 /* Data cache clean by MVA PoC */ #define CP15_DCCSW(rr) p15, 0, rr, c7, c10, 2 /* Data cache clean by set/way */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_CP15DSB p15, 0, r0, c7, c10, 4 /* DSB */ #define CP15_CP15DMB p15, 0, r0, c7, c10, 5 /* DMB */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 /* From ARMv7: */ #define CP15_DCCMVAU(rr) p15, 0, rr, c7, c11, 1 /* Data cache clean by MVA PoU */ #endif -#if __ARM_ARCH >= 6 +#if __ARM_ARCH == 6 /* Only ARMv6: */ #define CP15_DCCIALL p15, 0, r0, c7, c14, 0 /* Data cache clean and invalidate all */ #endif @@ -180,7 +183,7 @@ /* * CP15 C8 registers */ -#if __ARM_ARCH >= 6 +#if __ARM_ARCH >= 7 && defined(SMP) /* From ARMv7: */ #define CP15_TLBIALLIS p15, 0, r0, c8, c3, 0 /* Invalidate entire unified TLB IS */ #define CP15_TLBIMVAIS(rr) p15, 0, rr, c8, c3, 1 /* Invalidate unified TLB by MVA IS */ @@ -227,4 +230,9 @@ #define CP15_TPIDRURO(rr) p15, 0, rr, c13, c0, 3 /* User Read-Only Thread ID Register */ #define CP15_TPIDRPRW(rr) p15, 0, rr, c13, c0, 4 /* PL1 only Thread ID Register */ +/* + * CP15 C15 registers + */ +#define CP15_CBAR(rr) p15, 4, rr, c15, c0, 0 /* Configuration Base Address Register */ + #endif /* !MACHINE_SYSREG_H */ From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 21:10:27 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64814B8; Thu, 12 Feb 2015 21:10: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 4D707D05; Thu, 12 Feb 2015 21:10: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 t1CLARZX004492; Thu, 12 Feb 2015 21:10:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CLAPuk004481; Thu, 12 Feb 2015 21:10:25 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502122110.t1CLAPuk004481@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 21:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278635 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:10:27 -0000 Author: ian Date: Thu Feb 12 21:10:24 2015 New Revision: 278635 URL: https://svnweb.freebsd.org/changeset/base/278635 Log: MFC r276247, r276333, r276334, r276335, r276336, r276340, r276350: Include acle-compat.h directly rather than getting it via sysreg.h. Add new code to read and parse cpu identification data using the new CPUID mechanism defined for armv7. Add new TLB and cache maintainence functions for armv6 and armv7. Eliminate an unused macro whose name clashes now with a function in the new cpu-v6.h Add cache maintenance functions which will be used by startup code to initially set up the MMU. Fix a "decl is not a prototype" error noticed by gcc (but not clang). Update comments (r4 is not used anywhere), use non-profiling entry macros. Add arm option ARM_NEW_PMAP, to allow us to begin adding the new pmap code alongside the existing implementation Add armv6 implementations of cache operations to avoid duplication Added: stable/10/sys/arm/arm/cpu_asm-v6.S - copied, changed from r276336, head/sys/arm/arm/cpu_asm-v6.S stable/10/sys/arm/arm/cpuinfo.c - copied unchanged from r276333, head/sys/arm/arm/cpuinfo.c stable/10/sys/arm/include/cpu-v6.h - copied, changed from r276333, head/sys/arm/include/cpu-v6.h stable/10/sys/arm/include/cpuinfo.h - copied unchanged from r276333, head/sys/arm/include/cpuinfo.h Modified: stable/10/sys/arm/arm/machdep.c stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/cpufunc.h stable/10/sys/conf/files.arm Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/arm/cpu_asm-v6.S (from r276336, head/sys/arm/arm/cpu_asm-v6.S) ============================================================================== --- head/sys/arm/arm/cpu_asm-v6.S Sun Dec 28 18:38:25 2014 (r276336, copy source) +++ stable/10/sys/arm/arm/cpu_asm-v6.S Thu Feb 12 21:10:24 2015 (r278635) @@ -37,14 +37,16 @@ /* * Define cache functions used by startup code, which counts on the fact that - * only r0-r4,r12 (ip) are modified and no stack space is used. This set - * of function must be called with interrupts disabled and don't follow - * ARM ABI (cannot be called form C code. - * Moreover, it works only with caches integrated to CPU (accessible via CP15). + * only r0-r3,r12 (ip) are modified and no stack space is used. These functions + * must be called with interrupts disabled. Moreover, these work only with + * caches integrated to CPU (accessible via CP15); systems with an external L2 + * cache controller such as a PL310 need separate calls to that device driver + * to affect L2 caches. This is not a factor during early kernel startup, as + * any external L2 cache controller has not been enabled yet. */ /* Invalidate D cache to PoC. (aka all cache levels)*/ -ASENTRY(dcache_inv_poc_all) +ASENTRY_NP(dcache_inv_poc_all) mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ @@ -96,7 +98,7 @@ ASENTRY(dcache_inv_poc_all) END(dcache_inv_poc_all) /* Invalidate D cache to PoU. (aka L1 cache only)*/ -ASENTRY(dcache_inv_pou_all) +ASENTRY_NP(dcache_inv_pou_all) mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #26 /* Get LoUU (naturally aligned) */ @@ -147,7 +149,7 @@ ASENTRY(dcache_inv_pou_all) END(dcache_inv_pou_all) /* Write back and Invalidate D cache to PoC. */ -ASENTRY(dcache_wbinv_poc_all) +ASENTRY_NP(dcache_wbinv_poc_all) mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ Copied: stable/10/sys/arm/arm/cpuinfo.c (from r276333, head/sys/arm/arm/cpuinfo.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/cpuinfo.c Thu Feb 12 21:10:24 2015 (r278635, copy of r276333, head/sys/arm/arm/cpuinfo.c) @@ -0,0 +1,121 @@ +/*- + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * 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 + +struct cpuinfo cpuinfo; + +/* Read and parse CPU id scheme */ +void +cpuinfo_init(void) +{ + + cpuinfo.midr = cp15_midr_get(); + /* Test old version id schemes first */ + if ((cpuinfo.midr & CPU_ID_IMPLEMENTOR_MASK) == CPU_ID_ARM_LTD) { + if (CPU_ID_ISOLD(cpuinfo.midr)) { + /* obsolete ARMv2 or ARMv3 CPU */ + cpuinfo.midr = 0; + return; + } + if (CPU_ID_IS7(cpuinfo.midr)) { + if ((cpuinfo.midr & (1 << 23)) == 0) { + /* obsolete ARMv3 CPU */ + cpuinfo.midr = 0; + return; + } + /* ARMv4T CPU */ + cpuinfo.architecture = 1; + cpuinfo.revision = (cpuinfo.midr >> 16) & 0x7F; + } + } else { + /* must be new id scheme */ + cpuinfo.architecture = (cpuinfo.midr >> 16) & 0x0F; + cpuinfo.revision = (cpuinfo.midr >> 20) & 0x0F; + } + /* Parse rest of MIDR */ + cpuinfo.implementer = (cpuinfo.midr >> 24) & 0xFF; + cpuinfo.part_number = (cpuinfo.midr >> 4) & 0xFFF; + cpuinfo.patch = cpuinfo.midr & 0x0F; + + /* CP15 c0,c0 regs 0-7 exist on all CPUs (although aliased with MIDR) */ + cpuinfo.ctr = cp15_ctr_get(); + cpuinfo.tcmtr = cp15_tcmtr_get(); + cpuinfo.tlbtr = cp15_tlbtr_get(); + cpuinfo.mpidr = cp15_mpidr_get(); + cpuinfo.revidr = cp15_revidr_get(); + + /* if CPU is not v7 cpu id scheme */ + if (cpuinfo.architecture != 0xF) + return; + + cpuinfo.id_pfr0 = cp15_id_pfr0_get(); + cpuinfo.id_pfr1 = cp15_id_pfr1_get(); + cpuinfo.id_dfr0 = cp15_id_dfr0_get(); + cpuinfo.id_afr0 = cp15_id_afr0_get(); + cpuinfo.id_mmfr0 = cp15_id_mmfr0_get(); + cpuinfo.id_mmfr1 = cp15_id_mmfr1_get(); + cpuinfo.id_mmfr2 = cp15_id_mmfr2_get(); + cpuinfo.id_mmfr3 = cp15_id_mmfr3_get(); + cpuinfo.id_isar0 = cp15_id_isar0_get(); + cpuinfo.id_isar1 = cp15_id_isar1_get(); + cpuinfo.id_isar2 = cp15_id_isar2_get(); + cpuinfo.id_isar3 = cp15_id_isar3_get(); + cpuinfo.id_isar4 = cp15_id_isar4_get(); + cpuinfo.id_isar5 = cp15_id_isar5_get(); + +/* Not yet - CBAR only exist on ARM SMP Cortex A CPUs + cpuinfo.cbar = cp15_cbar_get(); +*/ + + /* Test if revidr is implemented */ + if (cpuinfo.revidr == cpuinfo.midr) + cpuinfo.revidr = 0; + + /* parsed bits of above registers */ + /* id_mmfr0 */ + cpuinfo.outermost_shareability = (cpuinfo.id_mmfr0 >> 8) & 0xF; + cpuinfo.shareability_levels = (cpuinfo.id_mmfr0 >> 12) & 0xF; + cpuinfo.auxiliary_registers = (cpuinfo.id_mmfr0 >> 20) & 0xF; + cpuinfo.innermost_shareability = (cpuinfo.id_mmfr0 >> 28) & 0xF; + /* id_mmfr2 */ + cpuinfo.mem_barrier = (cpuinfo.id_mmfr2 >> 20) & 0xF; + /* id_mmfr3 */ + cpuinfo.coherent_walk = (cpuinfo.id_mmfr3 >> 20) & 0xF; + cpuinfo.maintenance_broadcast =(cpuinfo.id_mmfr3 >> 12) & 0xF; + /* id_pfr1 */ + cpuinfo.generic_timer_ext = (cpuinfo.id_pfr1 >> 16) & 0xF; + cpuinfo.virtualization_ext = (cpuinfo.id_pfr1 >> 12) & 0xF; + cpuinfo.security_ext = (cpuinfo.id_pfr1 >> 4) & 0xF; +} Modified: stable/10/sys/arm/arm/machdep.c ============================================================================== --- stable/10/sys/arm/arm/machdep.c Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/arm/arm/machdep.c Thu Feb 12 21:10:24 2015 (r278635) @@ -90,6 +90,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -1058,6 +1059,8 @@ initarm(struct arm_boot_params *abp) arm_physmem_kernaddr = abp->abp_physaddr; memsize = 0; + + cpuinfo_init(); set_cpufuncs(); /* Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/arm/include/asm.h Thu Feb 12 21:10:24 2015 (r278635) @@ -39,6 +39,7 @@ #ifndef _MACHINE_ASM_H_ #define _MACHINE_ASM_H_ #include +#include #include #define _C_LABEL(x) x Copied and modified: stable/10/sys/arm/include/cpu-v6.h (from r276333, head/sys/arm/include/cpu-v6.h) ============================================================================== --- head/sys/arm/include/cpu-v6.h Sun Dec 28 18:12:56 2014 (r276333, copy source) +++ stable/10/sys/arm/include/cpu-v6.h Thu Feb 12 21:10:24 2015 (r278635) @@ -155,4 +155,242 @@ _RF0(cp15_cbar_get, CP15_CBAR(%0)) #undef _WF0 #undef _WF1 +/* + * TLB maintenance operations. + */ + +/* Local (i.e. not broadcasting ) operations. */ + +/* Flush all TLB entries (even global). */ +static __inline void +tlb_flush_all_local(void) +{ + + dsb(); + _CP15_TLBIALL(); + dsb(); +} + +/* Flush all not global TLB entries. */ +static __inline void +tlb_flush_all_ng_local(void) +{ + + dsb(); + _CP15_TLBIASID(CPU_ASID_KERNEL); + dsb(); +} + +/* Flush single TLB entry (even global). */ +static __inline void +tlb_flush_local(vm_offset_t sva) +{ + + dsb(); + _CP15_TLBIMVA((sva & ~PAGE_MASK ) | CPU_ASID_KERNEL); + dsb(); +} + +/* Flush range of TLB entries (even global). */ +static __inline void +tlb_flush_range_local(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVA((va & ~PAGE_MASK ) | CPU_ASID_KERNEL); + dsb(); +} + +/* Broadcasting operations. */ +#ifndef SMP + +#define tlb_flush_all() tlb_flush_all_local() +#define tlb_flush_all_ng() tlb_flush_all_ng_local() +#define tlb_flush(sva) tlb_flush_local(sva) +#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) + +#else /* SMP */ + +static __inline void +tlb_flush_all(void) +{ + + dsb(); + _CP15_TLBIALLIS(); + dsb(); +} + +static __inline void +tlb_flush_all_ng(void) +{ + + dsb(); + _CP15_TLBIASIDIS(CPU_ASID_KERNEL); + dsb(); +} + +static __inline void +tlb_flush(vm_offset_t sva) +{ + + dsb(); + _CP15_TLBIMVAAIS(sva); + dsb(); +} + +static __inline void +tlb_flush_range(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += PAGE_SIZE) + _CP15_TLBIMVAAIS(va); + dsb(); +} +#endif /* SMP */ + +/* + * Cache maintenance operations. + */ + +/* Sync I and D caches to PoU */ +static __inline void +icache_sync(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += arm_dcache_align) { +#ifdef SMP + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); +#endif + } + dsb(); +#ifdef SMP + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); +#endif + dsb(); + isb(); +} + +/* Invalidate I cache */ +static __inline void +icache_inv_all(void) +{ +#ifdef SMP + _CP15_ICIALLUIS(); +#else + _CP15_ICIALLU(); +#endif + dsb(); + isb(); +} + +/* Write back D-cache to PoU */ +static __inline void +dcache_wb_pou(vm_offset_t sva, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + for (va = sva; va < eva; va += arm_dcache_align) { +#ifdef SMP + _CP15_DCCMVAU(va); +#else + _CP15_DCCMVAC(va); +#endif + } + dsb(); +} + +/* Invalidate D-cache to PoC */ +static __inline void +dcache_inv_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + /* invalidate L1 first */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCIMVAC(va); + } + dsb(); + + /* then L2 */ + cpu_l2cache_inv_range(pa, size); + dsb(); + + /* then L1 again */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCIMVAC(va); + } + dsb(); +} + +/* Write back D-cache to PoC */ +static __inline void +dcache_wb_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCCMVAC(va); + } + dsb(); + + cpu_l2cache_wb_range(pa, size); +} + +/* Write back and invalidate D-cache to PoC */ +static __inline void +dcache_wbinv_poc(vm_offset_t sva, vm_paddr_t pa, vm_size_t size) +{ + vm_offset_t va; + vm_offset_t eva = sva + size; + + dsb(); + + /* write back L1 first */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCCMVAC(va); + } + dsb(); + + /* then write back and invalidate L2 */ + cpu_l2cache_wbinv_range(pa, size); + + /* then invalidate L1 */ + for (va = sva; va < eva; va += arm_dcache_align) { + _CP15_DCIMVAC(va); + } + dsb(); +} + +/* Set TTB0 register */ +static __inline void +cp15_ttbr_set(uint32_t reg) +{ + dsb(); + _CP15_TTB_SET(reg); + dsb(); + _CP15_BPIALL(); + dsb(); + isb(); + tlb_flush_all_ng_local(); +} + #endif /* !MACHINE_CPU_V6_H */ Modified: stable/10/sys/arm/include/cpufunc.h ============================================================================== --- stable/10/sys/arm/include/cpufunc.h Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/arm/include/cpufunc.h Thu Feb 12 21:10:24 2015 (r278635) @@ -572,7 +572,6 @@ void xscalec3_context_switch (void); #endif /* CPU_XSCALE_81342 */ -#define tlb_flush cpu_tlb_flushID #define setttb cpu_setttb #define drain_writebuf cpu_drain_writebuf Copied: stable/10/sys/arm/include/cpuinfo.h (from r276333, head/sys/arm/include/cpuinfo.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/include/cpuinfo.h Thu Feb 12 21:10:24 2015 (r278635, copy of r276333, head/sys/arm/include/cpuinfo.h) @@ -0,0 +1,91 @@ +/*- + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_CPUINFO_H_ +#define _MACHINE_CPUINFO_H_ + +#include + +struct cpuinfo { + /* raw id registers */ + uint32_t midr; + uint32_t ctr; + uint32_t tcmtr; + uint32_t tlbtr; + uint32_t mpidr; + uint32_t revidr; + uint32_t id_pfr0; + uint32_t id_pfr1; + uint32_t id_dfr0; + uint32_t id_afr0; + uint32_t id_mmfr0; + uint32_t id_mmfr1; + uint32_t id_mmfr2; + uint32_t id_mmfr3; + uint32_t id_isar0; + uint32_t id_isar1; + uint32_t id_isar2; + uint32_t id_isar3; + uint32_t id_isar4; + uint32_t id_isar5; + uint32_t cbar; + + /* Parsed bits of above registers... */ + + /* midr */ + int implementer; + int revision; + int architecture; + int part_number; + int patch; + + /* id_mmfr0 */ + int outermost_shareability; + int shareability_levels; + int auxiliary_registers; + int innermost_shareability; + + /* id_mmfr1 */ + int mem_barrier; + + /* id_mmfr3 */ + int coherent_walk; + int maintenance_broadcast; + + /* id_pfr1 */ + int generic_timer_ext; + int virtualization_ext; + int security_ext; +}; + +extern struct cpuinfo cpuinfo; + +void cpuinfo_init(void); + +#endif /* _MACHINE_CPUINFO_H_ */ Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Thu Feb 12 21:07:42 2015 (r278634) +++ stable/10/sys/conf/files.arm Thu Feb 12 21:10:24 2015 (r278635) @@ -11,6 +11,8 @@ arm/arm/copystr.S standard arm/arm/cpufunc.c standard arm/arm/cpufunc_asm.S standard arm/arm/cpufunc_asm_armv4.S standard +arm/arm/cpuinfo.c standard +arm/arm/cpu_asm-v6.S optional armv6 arm/arm/db_disasm.c optional ddb arm/arm/db_interface.c optional ddb arm/arm/db_trace.c optional ddb From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 21:15:29 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A38C5B4; Thu, 12 Feb 2015 21:15: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 14D84D51; Thu, 12 Feb 2015 21:15: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 t1CLFSC1008869; Thu, 12 Feb 2015 21:15:28 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CLFSTJ008868; Thu, 12 Feb 2015 21:15:28 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502122115.t1CLFSTJ008868@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 21:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278637 - stable/10/sys/boot/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:15:29 -0000 Author: ian Date: Thu Feb 12 21:15:28 2015 New Revision: 278637 URL: https://svnweb.freebsd.org/changeset/base/278637 Log: MFC r276306: Use proper markup for quotes. Modified: stable/10/sys/boot/common/loader.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/common/loader.8 ============================================================================== --- stable/10/sys/boot/common/loader.8 Thu Feb 12 21:10:32 2015 (r278636) +++ stable/10/sys/boot/common/loader.8 Thu Feb 12 21:15:28 2015 (r278637) @@ -671,8 +671,9 @@ Overrides the compile-time set value of or the preset default of 512. Must be a power of 2. .It Va twiddle_divisor -Throttles the output of the `twiddle' I/O progress indicator displayed -while loading the kernel and modules. +Throttles the output of the +.Sq twiddle +I/O progress indicator displayed while loading the kernel and modules. This is useful on slow serial consoles where the time spent waiting for these characters to be written can add up to many seconds. The default is 1 (full speed); a value of 2 spins half as fast, and so on. From owner-svn-src-stable@FreeBSD.ORG Thu Feb 12 21:20:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 652F9867; Thu, 12 Feb 2015 21:20: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 4E92FE14; Thu, 12 Feb 2015 21:20: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 t1CLKU1D009775; Thu, 12 Feb 2015 21:20:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1CLKTU0009765; Thu, 12 Feb 2015 21:20:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502122120.t1CLKTU0009765@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 12 Feb 2015 21:20:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278639 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Feb 2015 21:20:30 -0000 Author: ian Date: Thu Feb 12 21:20:28 2015 New Revision: 278639 URL: https://svnweb.freebsd.org/changeset/base/278639 Log: MFC r276395, r276396: Rename locore.S to locore-v4.S and add a new locore-v6.S. Added: stable/10/sys/arm/arm/locore-v4.S - copied unchanged from r276396, head/sys/arm/arm/locore-v4.S stable/10/sys/arm/arm/locore-v6.S - copied unchanged from r276396, head/sys/arm/arm/locore-v6.S Modified: stable/10/sys/arm/arm/genassym.c stable/10/sys/arm/arm/mp_machdep.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/genassym.c ============================================================================== --- stable/10/sys/arm/arm/genassym.c Thu Feb 12 21:17:50 2015 (r278638) +++ stable/10/sys/arm/arm/genassym.c Thu Feb 12 21:20:28 2015 (r278639) @@ -143,5 +143,6 @@ ASSYM(P_PROFIL, P_PROFIL); ASSYM(TRAPFRAMESIZE, sizeof(struct trapframe)); ASSYM(MAXCOMLEN, MAXCOMLEN); +ASSYM(MAXCPU, MAXCPU); ASSYM(NIRQ, NIRQ); ASSYM(PCPU_SIZE, sizeof(struct pcpu)); Copied: stable/10/sys/arm/arm/locore-v4.S (from r276396, head/sys/arm/arm/locore-v4.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/locore-v4.S Thu Feb 12 21:20:28 2015 (r278639, copy of r276396, head/sys/arm/arm/locore-v4.S) @@ -0,0 +1,596 @@ +/* $NetBSD: locore.S,v 1.14 2003/04/20 16:21:40 thorpej Exp $ */ + +/*- + * Copyright 2011 Semihalf + * Copyright (C) 1994-1997 Mark Brinicombe + * Copyright (C) 1994 Brini + * 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. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Brini. + * 4. The name of Brini may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY BRINI ``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 BRINI 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 "assym.s" +#include +#include +#include +#include +#include + +__FBSDID("$FreeBSD$"); + +/* + * Sanity check the configuration. + * FLASHADDR and LOADERRAMADDR depend on PHYSADDR in some cases. + * ARMv4 and ARMv5 make assumptions on where they are loaded. + * + * TODO: Fix the ARMv4/v5 case. + */ +#if (defined(FLASHADDR) || defined(LOADERRAMADDR) || !defined(_ARM_ARCH_6)) && \ + !defined(PHYSADDR) +#error PHYSADDR must be defined for this configuration +#endif + +/* What size should this really be ? It is only used by initarm() */ +#define INIT_ARM_STACK_SIZE (2048 * 4) + +#define CPWAIT_BRANCH \ + sub pc, pc, #4 + +#define CPWAIT(tmp) \ + mrc p15, 0, tmp, c2, c0, 0 /* arbitrary read of CP15 */ ;\ + mov tmp, tmp /* wait for it to complete */ ;\ + CPWAIT_BRANCH /* branch to next insn */ + +/* + * This is for libkvm, and should be the address of the beginning + * of the kernel text segment (not necessarily the same as kernbase). + * + * These are being phased out. Newer copies of libkvm don't need these + * values as the information is added to the core file by inspecting + * the running kernel. + */ + .text + .align 0 +#ifdef PHYSADDR +.globl kernbase +.set kernbase,KERNBASE +.globl physaddr +.set physaddr,PHYSADDR +#endif + +/* + * On entry for FreeBSD boot ABI: + * r0 - metadata pointer or 0 (boothowto on AT91's boot2) + * r1 - if (r0 == 0) then metadata pointer + * On entry for Linux boot ABI: + * r0 - 0 + * r1 - machine type (passed as arg2 to initarm) + * r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm) + * + * For both types of boot we gather up the args, put them in a struct arm_boot_params + * structure and pass that to initarm. + */ + .globl btext +btext: +ASENTRY_NP(_start) + STOP_UNWINDING /* Can't unwind into the bootloader! */ + + mov r9, r0 /* 0 or boot mode from boot2 */ + mov r8, r1 /* Save Machine type */ + mov ip, r2 /* Save meta data */ + mov fp, r3 /* Future expansion */ + + /* Make sure interrupts are disabled. */ + mrs r7, cpsr + orr r7, r7, #(PSR_I | PSR_F) + msr cpsr_c, r7 + +#if defined (FLASHADDR) && defined(LOADERRAMADDR) + /* Check if we're running from flash. */ + ldr r7, =FLASHADDR + /* + * If we're running with MMU disabled, test against the + * physical address instead. + */ + mrc p15, 0, r2, c1, c0, 0 + ands r2, r2, #CPU_CONTROL_MMU_ENABLE + ldreq r6, =PHYSADDR + ldrne r6, =LOADERRAMADDR + cmp r7, r6 + bls flash_lower + cmp r7, pc + bhi from_ram + b do_copy + +flash_lower: + cmp r6, pc + bls from_ram +do_copy: + ldr r7, =KERNBASE + adr r1, _start + ldr r0, Lreal_start + ldr r2, Lend + sub r2, r2, r0 + sub r0, r0, r7 + add r0, r0, r6 + mov r4, r0 + bl memcpy + ldr r0, Lram_offset + add pc, r4, r0 +Lram_offset: .word from_ram-_C_LABEL(_start) +from_ram: + nop +#endif + +disable_mmu: + /* Disable MMU for a while */ + mrc p15, 0, r2, c1, c0, 0 + bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ + CPU_CONTROL_WBUF_ENABLE) + bic r2, r2, #(CPU_CONTROL_IC_ENABLE) + bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) + mcr p15, 0, r2, c1, c0, 0 + + nop + nop + nop + CPWAIT(r0) + +Lunmapped: + /* + * Build page table from scratch. + */ + + /* Find the delta between VA and PA */ + adr r0, Lpagetable + bl translate_va_to_pa + +#ifndef _ARM_ARCH_6 + /* + * Some of the older ports (the various XScale, mostly) assume + * that the memory before the kernel is mapped, and use it for + * the various stacks, page tables, etc. For those CPUs, map the + * 64 first MB of RAM, as it used to be. + */ + /* + * Map PA == VA + */ + ldr r5, =PHYSADDR + mov r1, r5 + mov r2, r5 + /* Map 64MiB, preserved over calls to build_pagetables */ + mov r3, #64 + bl build_pagetables + + /* Create the kernel map to jump to */ + mov r1, r5 + ldr r2, =(KERNBASE) + bl build_pagetables + ldr r5, =(KERNPHYSADDR) +#else + /* + * Map PA == VA + */ + /* Find the start kernels load address */ + adr r5, _start + ldr r2, =(L1_S_OFFSET) + bic r5, r2 + mov r1, r5 + mov r2, r5 + /* Map 64MiB, preserved over calls to build_pagetables */ + mov r3, #64 + bl build_pagetables + + /* Create the kernel map to jump to */ + mov r1, r5 + ldr r2, =(KERNVIRTADDR) + bl build_pagetables +#endif + +#if defined(SOCDEV_PA) && defined(SOCDEV_VA) + /* Create the custom map */ + ldr r1, =SOCDEV_PA + ldr r2, =SOCDEV_VA + bl build_pagetables +#endif + +#if defined(SMP) + orr r0, r0, #2 /* Set TTB shared memory flag */ +#endif + mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ + mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ + +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) || defined(CPU_KRAIT) + mov r0, #0 + mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ +#endif + + /* Set the Domain Access register. Very important! */ + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mcr p15, 0, r0, c3, c0, 0 + /* + * Enable MMU. + * On armv6 enable extended page tables, and set alignment checking + * to modulo-4 (CPU_CONTROL_UNAL_ENABLE) for the ldrd/strd + * instructions emitted by clang. + */ + mrc p15, 0, r0, c1, c0, 0 +#ifdef _ARM_ARCH_6 + orr r0, r0, #(CPU_CONTROL_V6_EXTPAGE | CPU_CONTROL_UNAL_ENABLE) + orr r0, r0, #(CPU_CONTROL_AFLT_ENABLE) + orr r0, r0, #(CPU_CONTROL_AF_ENABLE) +#endif + orr r0, r0, #(CPU_CONTROL_MMU_ENABLE) + mcr p15, 0, r0, c1, c0, 0 + nop + nop + nop + CPWAIT(r0) + +mmu_done: + nop + adr r1, .Lstart + ldmia r1, {r1, r2, sp} /* Set initial stack and */ + sub r2, r2, r1 /* get zero init data */ + mov r3, #0 +.L1: + str r3, [r1], #0x0004 /* get zero init data */ + subs r2, r2, #4 + bgt .L1 + ldr pc, .Lvirt_done + +virt_done: + mov r1, #28 /* loader info size is 28 bytes also second arg */ + subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ + mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ + str r1, [r0] /* Store length of loader info */ + str r9, [r0, #4] /* Store r0 from boot loader */ + str r8, [r0, #8] /* Store r1 from boot loader */ + str ip, [r0, #12] /* store r2 from boot loader */ + str fp, [r0, #16] /* store r3 from boot loader */ + str r5, [r0, #20] /* store the physical address */ + adr r4, Lpagetable /* load the pagetable address */ + ldr r5, [r4, #4] + str r5, [r0, #24] /* store the pagetable address */ + mov fp, #0 /* trace back starts here */ + bl _C_LABEL(initarm) /* Off we go */ + + /* init arm will return the new stack pointer. */ + mov sp, r0 + + bl _C_LABEL(mi_startup) /* call mi_startup()! */ + + adr r0, .Lmainreturned + b _C_LABEL(panic) + /* NOTREACHED */ +END(_start) + +#define VA_TO_PA_POINTER(name, table) \ +name: ;\ + .word . ;\ + .word table + +/* + * Returns the physical address of a magic va to pa pointer. + * r0 - The pagetable data pointer. This must be built using the + * VA_TO_PA_POINTER macro. + * e.g. + * VA_TO_PA_POINTER(Lpagetable, pagetable) + * ... + * adr r0, Lpagetable + * bl translate_va_to_pa + * r0 will now contain the physical address of pagetable + * r1, r2 - Trashed + */ +translate_va_to_pa: + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* + * Find the physical address of the table. After these two + * instructions: + * r1 = va(pagetable) + * + * r0 = va(pagetable) - (VA - PA) + * = va(pagetable) - VA + PA + * = pa(pagetable) + */ + ldr r1, [r0, #4] + sub r0, r1, r2 + RET + +/* + * Builds the page table + * r0 - The table base address + * r1 - The physical address (trashed) + * r2 - The virtual address (trashed) + * r3 - The number of 1MiB sections + * r4 - Trashed + * + * Addresses must be 1MiB aligned + */ +build_pagetables: + /* Set the required page attributed */ + ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#if defined(SMP) + orr r4, #(L1_SHARED) +#endif + orr r1, r4 + + /* Move the virtual address to the correct bit location */ + lsr r2, #(L1_S_SHIFT - 2) + + mov r4, r3 +1: + str r1, [r0, r2] + add r2, r2, #4 + add r1, r1, #(L1_S_SIZE) + adds r4, r4, #-1 + bhi 1b + + RET + +VA_TO_PA_POINTER(Lpagetable, pagetable) + +Lreal_start: + .word _start +Lend: + .word _edata + +.Lstart: + .word _edata + .word _ebss + .word svcstk + INIT_ARM_STACK_SIZE + +.Lvirt_done: + .word virt_done + +.Lmainreturned: + .asciz "main() returned" + .align 0 + + .bss +svcstk: + .space INIT_ARM_STACK_SIZE + +/* + * Memory for the initial pagetable. We are unable to place this in + * the bss as this will be cleared after the table is loaded. + */ + .section ".init_pagetable" + .align 14 /* 16KiB aligned */ +pagetable: + .space L1_TABLE_SIZE + + .text + .align 0 + +.Lcpufuncs: + .word _C_LABEL(cpufuncs) + +#if defined(SMP) + +.Lmpvirt_done: + .word mpvirt_done +VA_TO_PA_POINTER(Lstartup_pagetable_secondary, temp_pagetable) + +ASENTRY_NP(mpentry) + + /* Make sure interrupts are disabled. */ + mrs r7, cpsr + orr r7, r7, #(PSR_I | PSR_F) + msr cpsr_c, r7 + + /* Disable MMU. It should be disabled already, but make sure. */ + mrc p15, 0, r2, c1, c0, 0 + bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ + CPU_CONTROL_WBUF_ENABLE) + bic r2, r2, #(CPU_CONTROL_IC_ENABLE) + bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) + mcr p15, 0, r2, c1, c0, 0 + nop + nop + nop + CPWAIT(r0) + +#if ARM_MMU_V6 + bl armv6_idcache_inv_all /* Modifies r0 only */ +#elif ARM_MMU_V7 + bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ +#endif + + /* Load the page table physical address */ + adr r0, Lstartup_pagetable_secondary + bl translate_va_to_pa + /* Load the address the secondary page table */ + ldr r0, [r0] + + orr r0, r0, #2 /* Set TTB shared memory flag */ + mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ + mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ + + mov r0, #0 + mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ + + /* Set the Domain Access register. Very important! */ + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mcr p15, 0, r0, c3, c0, 0 + /* Enable MMU */ + mrc p15, 0, r0, c1, c0, 0 + orr r0, r0, #CPU_CONTROL_V6_EXTPAGE + orr r0, r0, #CPU_CONTROL_AF_ENABLE + orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ + CPU_CONTROL_WBUF_ENABLE) + orr r0, r0, #(CPU_CONTROL_IC_ENABLE) + orr r0, r0, #(CPU_CONTROL_BPRD_ENABLE) + mcr p15, 0, r0, c1, c0, 0 + nop + nop + nop + CPWAIT(r0) + + adr r1, .Lstart + ldmia r1, {r1, r2, sp} /* Set initial stack and */ + mrc p15, 0, r0, c0, c0, 5 + and r0, r0, #15 + mov r1, #2048 + mul r2, r1, r0 + sub sp, sp, r2 + str r1, [sp] + ldr pc, .Lmpvirt_done + +mpvirt_done: + + mov fp, #0 /* trace back starts here */ + bl _C_LABEL(init_secondary) /* Off we go */ + + adr r0, .Lmpreturned + b _C_LABEL(panic) + /* NOTREACHED */ + +.Lmpreturned: + .asciz "init_secondary() returned" + .align 0 +END(mpentry) +#endif + +ENTRY_NP(cpu_halt) + mrs r2, cpsr + bic r2, r2, #(PSR_MODE) + orr r2, r2, #(PSR_SVC32_MODE) + orr r2, r2, #(PSR_I | PSR_F) + msr cpsr_fsxc, r2 + + ldr r4, .Lcpu_reset_address + ldr r4, [r4] + + ldr r0, .Lcpufuncs + mov lr, pc + ldr pc, [r0, #CF_IDCACHE_WBINV_ALL] + mov lr, pc + ldr pc, [r0, #CF_L2CACHE_WBINV_ALL] + + /* + * Load the cpu_reset_needs_v4_MMU_disable flag to determine if it's + * necessary. + */ + + ldr r1, .Lcpu_reset_needs_v4_MMU_disable + ldr r1, [r1] + cmp r1, #0 + mov r2, #0 + + /* + * MMU & IDC off, 32 bit program & data space + * Hurl ourselves into the ROM + */ + mov r0, #(CPU_CONTROL_32BP_ENABLE | CPU_CONTROL_32BD_ENABLE) + mcr p15, 0, r0, c1, c0, 0 + mcrne p15, 0, r2, c8, c7, 0 /* nail I+D TLB on ARMv4 and greater */ + mov pc, r4 + + /* + * _cpu_reset_address contains the address to branch to, to complete + * the cpu reset after turning the MMU off + * This variable is provided by the hardware specific code + */ +.Lcpu_reset_address: + .word _C_LABEL(cpu_reset_address) + + /* + * cpu_reset_needs_v4_MMU_disable contains a flag that signals if the + * v4 MMU disable instruction needs executing... it is an illegal instruction + * on f.e. ARM6/7 that locks up the computer in an endless illegal + * instruction / data-abort / reset loop. + */ +.Lcpu_reset_needs_v4_MMU_disable: + .word _C_LABEL(cpu_reset_needs_v4_MMU_disable) +END(cpu_halt) + + +/* + * setjump + longjmp + */ +ENTRY(setjmp) + stmia r0, {r4-r14} + mov r0, #0x00000000 + RET +END(setjmp) + +ENTRY(longjmp) + ldmia r0, {r4-r14} + mov r0, #0x00000001 + RET +END(longjmp) + + .data + .global _C_LABEL(esym) +_C_LABEL(esym): .word _C_LABEL(end) + +ENTRY_NP(abort) + b _C_LABEL(abort) +END(abort) + +ENTRY_NP(sigcode) + mov r0, sp + add r0, r0, #SIGF_UC + + /* + * Call the sigreturn system call. + * + * We have to load r7 manually rather than using + * "ldr r7, =SYS_sigreturn" to ensure the value of szsigcode is + * correct. Using the alternative places esigcode at the address + * of the data rather than the address one past the data. + */ + + ldr r7, [pc, #12] /* Load SYS_sigreturn */ + swi SYS_sigreturn + + /* Well if that failed we better exit quick ! */ + + ldr r7, [pc, #8] /* Load SYS_exit */ + swi SYS_exit + + /* Branch back to retry SYS_sigreturn */ + b . - 16 +END(sigcode) + .word SYS_sigreturn + .word SYS_exit + + .align 0 + .global _C_LABEL(esigcode) + _C_LABEL(esigcode): + + .data + .global szsigcode +szsigcode: + .long esigcode-sigcode + +/* End of locore.S */ Copied: stable/10/sys/arm/arm/locore-v6.S (from r276396, head/sys/arm/arm/locore-v6.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/locore-v6.S Thu Feb 12 21:20:28 2015 (r278639, copy of r276396, head/sys/arm/arm/locore-v6.S) @@ -0,0 +1,537 @@ +/*- + * Copyright 2004-2014 Olivier Houchard + * Copyright 2012-2014 Ian Lepore + * Copyright 2013-2014 Andrew Turner + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * 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 "assym.s" +#include +#include +#include +#include +#include +#include +#include + +__FBSDID("$FreeBSD$"); + +#ifndef ARM_NEW_PMAP +#define PTE1_OFFSET L1_S_OFFSET +#define PTE1_SHIFT L1_S_SHIFT +#define PTE1_SIZE L1_S_SIZE +#endif + +/* A small statically-allocated stack used only during initarm() and AP startup. */ +#define INIT_ARM_STACK_SIZE 2048 + + .text + .align 0 + +/* + * On entry for FreeBSD boot ABI: + * r0 - metadata pointer or 0 (boothowto on AT91's boot2) + * r1 - if (r0 == 0) then metadata pointer + * On entry for Linux boot ABI: + * r0 - 0 + * r1 - machine type (passed as arg2 to initarm) + * r2 - Pointer to a tagged list or dtb image (phys addr) (passed as arg1 initarm) + * + * For both types of boot we gather up the args, put them in a struct arm_boot_params + * structure and pass that to initarm. + */ + .globl btext +btext: +ASENTRY_NP(_start) + STOP_UNWINDING /* Can't unwind into the bootloader! */ + + /* Make sure interrupts are disabled. */ + cpsid ifa + + mov r8, r0 /* 0 or boot mode from boot2 */ + mov r9, r1 /* Save Machine type */ + mov r10, r2 /* Save meta data */ + mov r11, r3 /* Future expansion */ + + /* + * Check whether data cache is enabled. If it is, then we know + * current tags are valid (not power-on garbage values) and there + * might be dirty lines that need cleaning. Disable cache to prevent + * new lines being allocated, then call wbinv_poc_all to clean it. + */ + mrc CP15_SCTLR(r7) + tst r7, #CPU_CONTROL_DC_ENABLE + beq 1f + bic r7, #CPU_CONTROL_DC_ENABLE + mcr CP15_SCTLR(r7) + ISB + bl dcache_wbinv_poc_all + + /* + * Now there are no dirty lines, but there may still be lines marked + * valid. Disable all caches and the MMU, and invalidate everything + * before setting up new page tables and re-enabling the mmu. + */ +1: + bic r7, #CPU_CONTROL_MMU_ENABLE + bic r7, #CPU_CONTROL_IC_ENABLE + bic r7, #CPU_CONTROL_UNAL_ENABLE + bic r7, #CPU_CONTROL_BPRD_ENABLE + bic r7, #CPU_CONTROL_SW_ENABLE + orr r7, #CPU_CONTROL_AFLT_ENABLE + orr r7, #CPU_CONTROL_VECRELOC + mcr CP15_SCTLR(r7) + ISB + bl dcache_inv_poc_all + mcr CP15_ICIALLU + ISB + + /* + * Build page table from scratch. + */ + + /* Calculate the physical address of the startup pagetable. */ + adr r0, Lpagetable + bl translate_va_to_pa + + /* + * Map PA == VA + */ + /* Find the start kernels load address */ + adr r5, _start + ldr r2, =(PTE1_OFFSET) + bic r5, r2 + mov r1, r5 + mov r2, r5 + /* Map 64MiB, preserved over calls to build_pagetables */ + mov r3, #64 + bl build_pagetables + + /* Create the kernel map to jump to */ + mov r1, r5 + ldr r2, =(KERNVIRTADDR) + bl build_pagetables + +#if defined(SOCDEV_PA) && defined(SOCDEV_VA) + /* Create the custom map used for early_printf(). */ + ldr r1, =SOCDEV_PA + ldr r2, =SOCDEV_VA + bl build_pagetables +#endif + bl init_mmu + + /* Switch to virtual addresses. */ + ldr pc, =1f +1: + + /* Setup stack, clear BSS */ + ldr r1, =.Lstart + ldmia r1, {r1, r2, sp} /* Set initial stack and */ + add sp, sp, #INIT_ARM_STACK_SIZE + sub r2, r2, r1 /* get zero init data */ + mov r3, #0 +2: + str r3, [r1], #0x0004 /* get zero init data */ + subs r2, r2, #4 + bgt 2b + + mov r1, #28 /* loader info size is 28 bytes also second arg */ + subs sp, sp, r1 /* allocate arm_boot_params struct on stack */ + mov r0, sp /* loader info pointer is first arg */ + bic sp, sp, #7 /* align stack to 8 bytes */ + str r1, [r0] /* Store length of loader info */ + str r8, [r0, #4] /* Store r0 from boot loader */ + str r9, [r0, #8] /* Store r1 from boot loader */ + str r10, [r0, #12] /* store r2 from boot loader */ + str r11, [r0, #16] /* store r3 from boot loader */ + str r5, [r0, #20] /* store the physical address */ + adr r4, Lpagetable /* load the pagetable address */ + ldr r5, [r4, #4] + str r5, [r0, #24] /* store the pagetable address */ + mov fp, #0 /* trace back starts here */ + bl _C_LABEL(initarm) /* Off we go */ + + /* init arm will return the new stack pointer. */ + mov sp, r0 + + bl _C_LABEL(mi_startup) /* call mi_startup()! */ + + ldr r0, =.Lmainreturned + b _C_LABEL(panic) + /* NOTREACHED */ +END(_start) + +#define VA_TO_PA_POINTER(name, table) \ +name: ;\ + .word . ;\ + .word table + +/* + * Returns the physical address of a magic va to pa pointer. + * r0 - The pagetable data pointer. This must be built using the + * VA_TO_PA_POINTER macro. + * e.g. + * VA_TO_PA_POINTER(Lpagetable, pagetable) + * ... + * adr r0, Lpagetable + * bl translate_va_to_pa + * r0 will now contain the physical address of pagetable + * r1, r2 - Trashed + */ +translate_va_to_pa: + ldr r1, [r0] + sub r2, r1, r0 + /* At this point: r2 = VA - PA */ + + /* + * Find the physical address of the table. After these two + * instructions: + * r1 = va(pagetable) + * + * r0 = va(pagetable) - (VA - PA) + * = va(pagetable) - VA + PA + * = pa(pagetable) + */ + ldr r1, [r0, #4] + sub r0, r1, r2 + mov pc, lr + +/* + * Init MMU + * r0 - The table base address + */ + +ASENTRY_NP(init_mmu) + + /* Setup TLB and MMU registers */ + mcr CP15_TTBR0(r0) /* Set TTB */ + mov r0, #0 + mcr CP15_CONTEXTIDR(r0) /* Set ASID to 0 */ + + /* Set the Domain Access register */ + mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) + mcr CP15_DACR(r0) + +#ifdef ARM_NEW_PMAP + /* + * Set TEX remap registers + * - All is set to uncacheable memory + */ + ldr r0, =0xAAAAA + mrc CP15_PRRR(r0) + mov r0, #0 + mcr CP15_NMRR(r0) +#endif + mcr CP15_TLBIALL /* Flush TLB */ + DSB + ISB + + /* Enable MMU */ + mrc CP15_SCTLR(r0) + orr r0, r0, #CPU_CONTROL_MMU_ENABLE + orr r0, r0, #CPU_CONTROL_V6_EXTPAGE +#ifdef ARM_NEW_PMAP + orr r0, r0, #CPU_CONTROL_TR_ENABLE +#endif + orr r0, r0, #CPU_CONTROL_AF_ENABLE + mcr CP15_SCTLR(r0) + DSB + ISB + mcr CP15_TLBIALL /* Flush TLB */ + mcr CP15_BPIALL /* Flush Branch predictor */ + ISB + mov pc, lr +END(init_mmu) + + +/* + * Init SMP coherent mode, enable caching and switch to final MMU table. + * Called with disabled caches + * r0 - The table base address + * r1 - clear bits for aux register + * r2 - set bits for aux register + */ +ASENTRY_NP(reinit_mmu) + push {r4-r11, lr} + mov r4, r0 + mov r5, r1 + mov r6, r2 + + /* !! Be very paranoid here !! */ + /* !! We cannot write single bit here !! */ + +#if 0 /* XXX writeback shouldn't be necessary */ + /* Write back and invalidate all integrated caches */ + bl dcache_wbinv_poc_all +#else + bl dcache_inv_pou_all +#endif + mcr CP15_ICIALLU + ISB + + /* Set auxiliary register */ + mrc CP15_ACTLR(r7) + bic r8, r7, r5 /* Mask bits */ + eor r8, r8, r6 /* Set bits */ + teq r7, r8 + mcrne CP15_ACTLR(r8) + ISB + + /* Enable caches. */ + mrc CP15_SCTLR(r7) + orr r7, #CPU_CONTROL_DC_ENABLE + orr r7, #CPU_CONTROL_IC_ENABLE + orr r7, #CPU_CONTROL_BPRD_ENABLE + mcr CP15_SCTLR(r7) + DSB + + mcr CP15_TTBR0(r4) /* Set new TTB */ + DSB + ISB + + /* Flush all TLBs */ + mcr CP15_TLBIALL + DSB + ISB + +#if 0 /* XXX writeback shouldn't be necessary */ + /* Write back and invalidate all integrated caches */ + bl dcache_wbinv_poc_all +#else + bl dcache_inv_pou_all +#endif + mcr CP15_ICIALLU + ISB + + pop {r4-r11, pc} +END(reinit_mmu) + + +/* + * Builds the page table + * r0 - The table base address + * r1 - The physical address (trashed) + * r2 - The virtual address (trashed) + * r3 - The number of 1MiB sections + * r4 - Trashed + * + * Addresses must be 1MiB aligned + */ +ASENTRY_NP(build_pagetables) + /* Set the required page attributed */ +#if defined(ARM_NEW_PMAP) + ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0 +#elif defined(SMP) + ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)|L1_SHARED) +#else + ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) +#endif + orr r1, r4 + + /* Move the virtual address to the correct bit location */ + lsr r2, #(PTE1_SHIFT - 2) + + mov r4, r3 +1: + str r1, [r0, r2] + add r2, r2, #4 + add r1, r1, #(PTE1_SIZE) + adds r4, r4, #-1 + bhi 1b + + mov pc, lr + +VA_TO_PA_POINTER(Lpagetable, boot_pt1) + + +.Lstart: + .word _edata + .word _ebss + .word svcstk + +.Lmainreturned: + .asciz "main() returned" + .align 0 + + .bss +svcstk: + .space INIT_ARM_STACK_SIZE * MAXCPU + +/* + * Memory for the initial pagetable. We are unable to place this in + * the bss as this will be cleared after the table is loaded. + */ + .section ".init_pagetable" + .align 14 /* 16KiB aligned */ + .globl boot_pt1 *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:06:09 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B3963FD; Fri, 13 Feb 2015 00:06: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 2519511C; Fri, 13 Feb 2015 00:06: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 t1D069de091656; Fri, 13 Feb 2015 00:06:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D068sZ091654; Fri, 13 Feb 2015 00:06:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130006.t1D068sZ091654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278643 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:06:09 -0000 Author: ian Date: Fri Feb 13 00:06:07 2015 New Revision: 278643 URL: https://svnweb.freebsd.org/changeset/base/278643 Log: MFC r276394, r276397: Add armv6 implementations of the startup-time cache maintenence functions. Create a new locore.S that includes locore-v4 or locore-v6 as needed. Replaced: stable/10/sys/arm/arm/locore.S - copied unchanged from r276397, head/sys/arm/arm/locore.S Modified: stable/10/sys/arm/arm/cpu_asm-v6.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpu_asm-v6.S ============================================================================== --- stable/10/sys/arm/arm/cpu_asm-v6.S Thu Feb 12 23:08:27 2015 (r278642) +++ stable/10/sys/arm/arm/cpu_asm-v6.S Fri Feb 13 00:06:07 2015 (r278643) @@ -33,8 +33,6 @@ #include #include -#if __ARM_ARCH >= 7 - /* * Define cache functions used by startup code, which counts on the fact that * only r0-r3,r12 (ip) are modified and no stack space is used. These functions @@ -47,12 +45,18 @@ /* Invalidate D cache to PoC. (aka all cache levels)*/ ASENTRY_NP(dcache_inv_poc_all) +#if __ARM_ARCH == 6 + mcr CP15_DCIALL + DSB + bx lr +#else mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 - mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ - beq 4f + mov r0, r0, lsr #23 /* Get LoC 'naturally' aligned for */ + beq 4f /* use in the CSSELR register below */ -1: mcr CP15_CSSELR(r0) /* set cache level */ +1: sub r0, #2 + mcr CP15_CSSELR(r0) /* set cache level */ isb mrc CP15_CCSIDR(r0) /* read CCSIDR */ @@ -83,28 +87,31 @@ ASENTRY_NP(dcache_inv_poc_all) 3: mrc CP15_CSSELR(r0) /* get cache level */ - add r0, r0, #2 /* next level */ - mrc CP15_CLIDR(r1) - ands r1, r1, #0x07000000 - mov r1, r1, lsr #23 /* Get LoC (naturally aligned) */ - cmp r1, r0 - bgt 1b + teq r0, #0 + bne 1b 4: dsb /* wait for stores to finish */ mov r0, #0 mcr CP15_CSSELR(r0) isb bx lr +#endif /* __ARM_ARCH == 6 */ END(dcache_inv_poc_all) /* Invalidate D cache to PoU. (aka L1 cache only)*/ ASENTRY_NP(dcache_inv_pou_all) +#if __ARM_ARCH == 6 + mcr CP15_DCIALL + DSB + bx lr +#else mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 mov r0, r0, lsr #26 /* Get LoUU (naturally aligned) */ beq 4f -1: mcr CP15_CSSELR(r0) /* set cache level */ +1: sub r0, #2 + mcr CP15_CSSELR(r0) /* set cache level */ isb mrc CP15_CCSIDR(r0) /* read CCSIDR */ @@ -125,7 +132,7 @@ ASENTRY_NP(dcache_inv_pou_all) mov r2, ip /* r2 now contains set way decr */ /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ -2: mcr CP15_DCISW(r3) /* clean & invalidate line */ +2: mcr CP15_DCISW(r3) /* invalidate line */ movs r0, r3 /* get current way/set */ beq 3f /* at 0 means we are done */ movs r0, r0, lsl #10 /* clear way bits leaving only set bits*/ @@ -135,25 +142,27 @@ ASENTRY_NP(dcache_inv_pou_all) 3: mrc CP15_CSSELR(r0) /* get cache level */ - add r0, r0, #2 /* next level */ - mrc CP15_CLIDR(r1) - ands r1, r1, #0x07000000 - mov r1, r1, lsr #26 /* Get LoUU (naturally aligned) */ - cmp r1, r0 - bgt 1b + teq r0, #0 + bne 1b 4: dsb /* wait for stores to finish */ mov r0, #0 mcr CP15_CSSELR(r0) bx lr +#endif END(dcache_inv_pou_all) /* Write back and Invalidate D cache to PoC. */ ASENTRY_NP(dcache_wbinv_poc_all) +#if __ARM_ARCH == 6 + mcr CP15_DCCIALL + DSB + bx lr +#else mrc CP15_CLIDR(r0) ands r0, r0, #0x07000000 - mov r0, r0, lsr #23 /* Get LoC (naturally aligned) */ beq 4f + mov r0, #0 /* Clean from inner to outer levels */ 1: mcr CP15_CSSELR(r0) /* set cache level */ isb @@ -176,7 +185,7 @@ ASENTRY_NP(dcache_wbinv_poc_all) mov r2, ip /* r2 now contains set way decr */ /* r3 = ways/sets, r2 = way decr, r1 = set decr, r0 and ip are free */ -2: mcr CP15_DCCISW(r3) /* clean & invalidate line */ +2: mcr CP15_DCCISW(r3) /* clean and invalidate line */ movs r0, r3 /* get current way/set */ beq 3f /* at 0 means we are done */ movs r0, r0, lsl #10 /* clear way bits leaving only set bits*/ @@ -191,12 +200,11 @@ ASENTRY_NP(dcache_wbinv_poc_all) ands r1, r1, #0x07000000 mov r1, r1, lsr #23 /* Get LoC (naturally aligned) */ cmp r1, r0 - bgt 1b + bne 1b 4: dsb /* wait for stores to finish */ mov r0, #0 mcr CP15_CSSELR(r0) bx lr +#endif /* __ARM_ARCH == 6 */ END(dcache_wbinv_poc_all) - -#endif /* __ARM_ARCH >= 7 */ Copied: stable/10/sys/arm/arm/locore.S (from r276397, head/sys/arm/arm/locore.S) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/locore.S Fri Feb 13 00:06:07 2015 (r278643, copy of r276397, head/sys/arm/arm/locore.S) @@ -0,0 +1,41 @@ +/*- + * Copyright (c) 2014 Ian Lepore + * All rights excluded. + * + * 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$ + */ + +/* + * The kernel build machinery wants the file containing the entry point to be + * named locore.S, but we want separate files for v4 and v6 builds, so just + * include the arch-appropriate file from this properly-named file. + */ + +#include + +#if __ARM_ARCH >= 6 +#include "locore-v6.S" +#else +#include "locore-v4.S" +#endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:12:22 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE0A07E7; Fri, 13 Feb 2015 00:12: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 8F9AD234; Fri, 13 Feb 2015 00:12: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 t1D0CMcx096077; Fri, 13 Feb 2015 00:12:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0CMlA096066; Fri, 13 Feb 2015 00:12:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130012.t1D0CMlA096066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278645 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:12:22 -0000 Author: ian Date: Fri Feb 13 00:12:21 2015 New Revision: 278645 URL: https://svnweb.freebsd.org/changeset/base/278645 Log: MFC r276444, r276445, r276470: Fix a paste-o in dcache_inv_pou_all(). Change the order of operations for the initial cache setup. A couple small fixes to make clang 3.5 happy... Move END(sigcode) and other misplace ENTRY/END macros. Modified: stable/10/sys/arm/arm/cpu_asm-v6.S stable/10/sys/arm/arm/locore-v6.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpu_asm-v6.S ============================================================================== --- stable/10/sys/arm/arm/cpu_asm-v6.S Fri Feb 13 00:08:32 2015 (r278644) +++ stable/10/sys/arm/arm/cpu_asm-v6.S Fri Feb 13 00:12:21 2015 (r278645) @@ -106,7 +106,7 @@ ASENTRY_NP(dcache_inv_pou_all) bx lr #else mrc CP15_CLIDR(r0) - ands r0, r0, #0x07000000 + ands r0, r0, #0x38000000 mov r0, r0, lsr #26 /* Get LoUU (naturally aligned) */ beq 4f Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:08:32 2015 (r278644) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:12:21 2015 (r278645) @@ -84,11 +84,9 @@ ASENTRY_NP(_start) */ mrc CP15_SCTLR(r7) tst r7, #CPU_CONTROL_DC_ENABLE - beq 1f - bic r7, #CPU_CONTROL_DC_ENABLE - mcr CP15_SCTLR(r7) - ISB - bl dcache_wbinv_poc_all + blne dcache_wbinv_poc_all + + /* ! Do not write to memory between wbinv and disabling cache ! */ /* * Now there are no dirty lines, but there may still be lines marked @@ -96,6 +94,7 @@ ASENTRY_NP(_start) * before setting up new page tables and re-enabling the mmu. */ 1: + bic r7, #CPU_CONTROL_DC_ENABLE bic r7, #CPU_CONTROL_MMU_ENABLE bic r7, #CPU_CONTROL_IC_ENABLE bic r7, #CPU_CONTROL_UNAL_ENABLE @@ -340,7 +339,7 @@ END(reinit_mmu) * * Addresses must be 1MiB aligned */ -ASENTRY_NP(build_pagetables) +build_pagetables: /* Set the required page attributed */ #if defined(ARM_NEW_PMAP) ldr r4, =PTE1_V|PTE1_A|PTE1_AP_KRW|TEX1_CLASS_0 @@ -521,6 +520,7 @@ ENTRY_NP(sigcode) /* Branch back to retry SYS_sigreturn */ b . - 16 +END(sigcode) .word SYS_sigreturn .word SYS_exit @@ -533,5 +533,5 @@ ENTRY_NP(sigcode) .global szsigcode szsigcode: .long esigcode-sigcode -END(sigcode) + /* End of locore.S */ From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:15:14 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40CAD97E; Fri, 13 Feb 2015 00:15: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 2B4B724D; Fri, 13 Feb 2015 00:15: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 t1D0FEJ7096545; Fri, 13 Feb 2015 00:15:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0FEu7096544; Fri, 13 Feb 2015 00:15:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130015.t1D0FEu7096544@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:15:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278646 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:15:14 -0000 Author: ian Date: Fri Feb 13 00:15:13 2015 New Revision: 278646 URL: https://svnweb.freebsd.org/changeset/base/278646 Log: MFC r276518: Rework vfp code so it will compile on clang 3.4 and 3.5. Modified: stable/10/sys/arm/arm/vfp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/vfp.c ============================================================================== --- stable/10/sys/arm/arm/vfp.c Fri Feb 13 00:12:21 2015 (r278645) +++ stable/10/sys/arm/arm/vfp.c Fri Feb 13 00:15:13 2015 (r278646) @@ -51,30 +51,35 @@ static struct undefined_handler vfp10_uh /* If true the VFP unit has 32 double registers, otherwise it has 16 */ static int is_d32; -/* The VFMXR command using coprocessor commands */ +/* + * About .fpu directives in this file... + * + * We should need simply .fpu vfpv3, but clang 3.5 has a quirk where setting + * vfpv3 doesn't imply that vfp2 features are also available -- both have to be + * explicitly set to get all the features of both. This is probably a bug in + * clang, so it may get fixed and require changes here some day. Other changes + * are probably coming in clang too, because there is email and open PRs + * indicating they want to completely disable the ability to use .fpu and + * similar directives in inline asm. That would be catastrophic for us, + * hopefully they come to their senses. There was also some discusion of a new + * syntax such as .push fpu=vfpv3; ...; .pop fpu; and that would be ideal for + * us, better than what we have now really. + * + * For gcc, each .fpu directive completely overrides the prior directive, unlike + * with clang, but luckily on gcc saying v3 implies all the v2 features as well. + */ + #define fmxr(reg, val) \ - __asm __volatile("mcr p10, 7, %0, " __STRING(reg) " , c0, 0" :: "r"(val)); + __asm __volatile(" .fpu vfpv2\n .fpu vfpv3\n" \ + " vmsr " __STRING(reg) ", %0" :: "r"(val)); -/* The VFMRX command using coprocessor commands */ #define fmrx(reg) \ ({ u_int val = 0;\ - __asm __volatile("mrc p10, 7, %0, " __STRING(reg) " , c0, 0" : "=r"(val));\ + __asm __volatile(" .fpu vfpv2\n .fpu vfpv3\n" \ + " vmrs %0, " __STRING(reg) : "=r"(val)); \ val; \ }) -/* - * Work around an issue with GCC where the asm it generates is not unified - * syntax and fails to assemble because it expects the ldcleq instruction in the - * form ldcl, not in the UAL form ldcl, and similar for stcleq. - */ -#ifdef __clang__ -#define LDCLNE "ldclne " -#define STCLNE "stclne " -#else -#define LDCLNE "ldcnel " -#define STCLNE "stcnel " -#endif - static u_int get_coprocessorACR(void) { @@ -103,25 +108,25 @@ vfp_init(void) coproc |= COPROC10 | COPROC11; set_coprocessorACR(coproc); - fpsid = fmrx(VFPSID); /* read the vfp system id */ - fpexc = fmrx(VFPEXC); /* read the vfp exception reg */ + fpsid = fmrx(fpsid); /* read the vfp system id */ + fpexc = fmrx(fpexc); /* read the vfp exception reg */ if (!(fpsid & VFPSID_HARDSOFT_IMP)) { vfp_exists = 1; is_d32 = 0; - PCPU_SET(vfpsid, fpsid); /* save the VFPSID */ + PCPU_SET(vfpsid, fpsid); /* save the fpsid */ vfp_arch = (fpsid & VFPSID_SUBVERSION2_MASK) >> VFPSID_SUBVERSION_OFF; if (vfp_arch >= VFP_ARCH3) { - tmp = fmrx(VMVFR0); + tmp = fmrx(mvfr0); PCPU_SET(vfpmvfr0, tmp); if ((tmp & VMVFR0_RB_MASK) == 2) is_d32 = 1; - tmp = fmrx(VMVFR1); + tmp = fmrx(mvfr1); PCPU_SET(vfpmvfr1, tmp); } @@ -161,10 +166,10 @@ vfp_bounce(u_int addr, u_int insn, struc * something tried to executate a truly invalid instruction that maps to * the VFP. */ - fpexc = fmrx(VFPEXC); + fpexc = fmrx(fpexc); if (fpexc & VFPEXC_EN) { /* Clear any exceptions */ - fmxr(VFPEXC, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); + fmxr(fpexc, fpexc & ~(VFPEXC_EX | VFPEXC_FP2V)); /* kill the process - we do not handle emulation */ critical_exit(); @@ -192,7 +197,7 @@ vfp_bounce(u_int addr, u_int insn, struc * the last thread to use the VFP on this core was this thread, then the * VFP state is valid, otherwise restore this thread's state to the VFP. */ - fmxr(VFPEXC, fpexc | VFPEXC_EN); + fmxr(fpexc, fpexc | VFPEXC_EN); curpcb = curthread->td_pcb; cpu = PCPU_GET(cpu); if (curpcb->pcb_vfpcpu != cpu || curthread != PCPU_GET(fpcurthread)) { @@ -213,22 +218,26 @@ vfp_restore(struct vfp_state *vfpsave) { uint32_t fpexc; - /* On VFPv2 we may need to restore FPINST and FPINST2 */ + /* On vfpv3 we may need to restore FPINST and FPINST2 */ fpexc = vfpsave->fpexec; if (fpexc & VFPEXC_EX) { - fmxr(VFPINST, vfpsave->fpinst); + fmxr(fpinst, vfpsave->fpinst); if (fpexc & VFPEXC_FP2V) - fmxr(VFPINST2, vfpsave->fpinst2); + fmxr(fpinst2, vfpsave->fpinst2); } - fmxr(VFPSCR, vfpsave->fpscr); + fmxr(fpscr, vfpsave->fpscr); - __asm __volatile("ldc p10, c0, [%0], #128\n" /* d0-d15 */ - "cmp %1, #0\n" /* -D16 or -D32? */ - LDCLNE "p11, c0, [%0], #128\n" /* d16-d31 */ - "addeq %0, %0, #128\n" /* skip missing regs */ - : : "r" (vfpsave), "r" (is_d32) : "cc"); + __asm __volatile( + " .fpu vfpv2\n" + " .fpu vfpv3\n" + " vldmia %0!, {d0-d15}\n" /* d0-d15 */ + " cmp %1, #0\n" /* -D16 or -D32? */ + " vldmiane %0!, {d16-d31}\n" /* d16-d31 */ + " addeq %0, %0, #128\n" /* skip missing regs */ + : "+&r" (vfpsave) : "r" (is_d32) : "cc" + ); - fmxr(VFPEXC, fpexc); + fmxr(fpexc, fpexc); } /* @@ -241,28 +250,31 @@ vfp_store(struct vfp_state *vfpsave, boo { uint32_t fpexc; - fpexc = fmrx(VFPEXC); /* Is the vfp enabled? */ + fpexc = fmrx(fpexc); /* Is the vfp enabled? */ if (fpexc & VFPEXC_EN) { vfpsave->fpexec = fpexc; - vfpsave->fpscr = fmrx(VFPSCR); + vfpsave->fpscr = fmrx(fpscr); - /* On VFPv2 we may need to save FPINST and FPINST2 */ + /* On vfpv3 we may need to save FPINST and FPINST2 */ if (fpexc & VFPEXC_EX) { - vfpsave->fpinst = fmrx(VFPINST); + vfpsave->fpinst = fmrx(fpinst); if (fpexc & VFPEXC_FP2V) - vfpsave->fpinst2 = fmrx(VFPINST2); + vfpsave->fpinst2 = fmrx(fpinst2); fpexc &= ~VFPEXC_EX; } __asm __volatile( - "stc p11, c0, [%0], #128\n" /* d0-d15 */ - "cmp %1, #0\n" /* -D16 or -D32? */ - STCLNE "p11, c0, [%0], #128\n" /* d16-d31 */ - "addeq %0, %0, #128\n" /* skip missing regs */ - : : "r" (vfpsave), "r" (is_d32) : "cc"); + " .fpu vfpv2\n" + " .fpu vfpv3\n" + " vstmia %0!, {d0-d15}\n" /* d0-d15 */ + " cmp %1, #0\n" /* -D16 or -D32? */ + " vstmiane r0!, {d16-d31}\n" /* d16-d31 */ + " addeq %0, %0, #128\n" /* skip missing regs */ + : "+&r" (vfpsave) : "r" (is_d32) : "cc" + ); if (disable_vfp) - fmxr(VFPEXC , fpexc & ~VFPEXC_EN); + fmxr(fpexc , fpexc & ~VFPEXC_EN); } } @@ -281,9 +293,9 @@ vfp_discard(struct thread *td) if (PCPU_GET(fpcurthread) == td) PCPU_SET(fpcurthread, NULL); - tmp = fmrx(VFPEXC); + tmp = fmrx(fpexc); if (tmp & VFPEXC_EN) - fmxr(VFPEXC, tmp & ~VFPEXC_EN); + fmxr(fpexc, tmp & ~VFPEXC_EN); } #endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:17:23 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C589DBB2; Fri, 13 Feb 2015 00:17: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 966D5266; Fri, 13 Feb 2015 00:17: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 t1D0HN3J096936; Fri, 13 Feb 2015 00:17:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0HMDl096930; Fri, 13 Feb 2015 00:17:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130017.t1D0HMDl096930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:17:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278648 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:17:23 -0000 Author: ian Date: Fri Feb 13 00:17:22 2015 New Revision: 278648 URL: https://svnweb.freebsd.org/changeset/base/278648 Log: MFC r276519: Define a WFI macro that expands to the right form of wait-for-interrupt depending on the architecture. Modified: stable/10/sys/arm/arm/locore-v6.S stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/sysreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:17:22 2015 (r278648) @@ -461,7 +461,7 @@ ENTRY_NP(cpu_halt) teq r4, #0 movne pc, r4 1: - wfi + WFI b 1b /* Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/include/asm.h Fri Feb 13 00:17:22 2015 (r278648) @@ -227,14 +227,17 @@ #define ISB isb #define DSB dsb #define DMB dmb +#define WFI wfi #elif __ARM_ARCH == 6 #define ISB mcr CP15_CP15ISB #define DSB mcr CP15_CP15DSB #define DMB mcr CP15_CP15DMB +#define WFI mcr CP15_CP15WFI #else #define ISB mcr CP15_CP15ISB #define DSB mcr CP15_CP15DSB /* DSB and DMB are the */ #define DMB mcr CP15_CP15DSB /* same prior to v6.*/ +/* No form of WFI available on v4, define nothing to get an error on use. */ #endif #endif /* !_MACHINE_ASM_H_ */ Modified: stable/10/sys/arm/include/sysreg.h ============================================================================== --- stable/10/sys/arm/include/sysreg.h Fri Feb 13 00:16:05 2015 (r278647) +++ stable/10/sys/arm/include/sysreg.h Fri Feb 13 00:17:22 2015 (r278648) @@ -166,6 +166,7 @@ /* Only ARMv6: */ #define CP15_CP15DSB p15, 0, r0, c7, c10, 4 /* DSB */ #define CP15_CP15DMB p15, 0, r0, c7, c10, 5 /* DMB */ +#define CP15_CP15WFI p15, 0, r0, c7, c0, 4 /* WFI */ #endif #if __ARM_ARCH >= 7 From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:30:00 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957E345F; Fri, 13 Feb 2015 00:30: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 7EA883BB; Fri, 13 Feb 2015 00:30: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 t1D0U0Cq002333; Fri, 13 Feb 2015 00:30:00 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0TwbR002255; Fri, 13 Feb 2015 00:29:58 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201502130029.t1D0TwbR002255@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 13 Feb 2015 00:29:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278650 - in stable/10: sys/kern tools/sched usr.bin/man X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:30:00 -0000 Author: sbruno Date: Fri Feb 13 00:29:57 2015 New Revision: 278650 URL: https://svnweb.freebsd.org/changeset/base/278650 Log: MFC 272315 272757 274091 274902 r272315 Explicitly return None for negative event indices. Prior to this, eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start. r272757 Add schedgraph traces for callout handlers. Specifically, a callwheel logs a running event each time it executes a callout function. The event includes the function pointer, argument, and whether or not it was run from hardware interrupt context. The callwheel is marked idle when each handler completes. This effectively logs the duration of each callout routine in the graph. r274091 Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close dialogs. r274902 Add a new thread state "spinning" to schedgraph and add tracepoints at the start and stop of spinning waits in lock primitives. Reviewed by: jhb Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/kern/kern_mutex.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/kern_sx.c stable/10/sys/kern/kern_timeout.c stable/10/tools/sched/schedgraph.py stable/10/usr.bin/man/man.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_lock.c Fri Feb 13 00:29:57 2015 (r278650) @@ -583,6 +583,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -598,11 +601,16 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && spintries < alk_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -620,6 +628,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; @@ -815,6 +825,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -830,6 +843,8 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && @@ -839,6 +854,9 @@ __lockmgr_args(struct lock *lk, u_int fl !atomic_cmpset_ptr(&lk->lk_lock, x, x | LK_EXCLUSIVE_SPINNERS)) continue; + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -855,6 +873,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_mutex.c Fri Feb 13 00:29:57 2015 (r278650) @@ -436,6 +436,10 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, m, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", + m->lock_object.lo_name); while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -443,6 +447,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "running"); continue; } } @@ -579,6 +586,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", m->lock_object.lo_name); #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); @@ -604,6 +613,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); + KTR_STATE0(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "running"); LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); Modified: stable/10/sys/kern/kern_rwlock.c ============================================================================== --- stable/10/sys/kern/kern_rwlock.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_rwlock.c Fri Feb 13 00:29:57 2015 (r278650) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -423,6 +424,9 @@ __rw_rlock(volatile uintptr_t *c, const CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -430,16 +434,23 @@ __rw_rlock(volatile uintptr_t *c, const spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (spintries < rowner_retries) { spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = rw->rw_lock; if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); if (i != rowner_loops) continue; } @@ -759,6 +770,9 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -766,6 +780,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); continue; } if ((v & RW_LOCK_READ) && RW_READERS(v) && @@ -777,11 +793,16 @@ __rw_wlock_hard(volatile uintptr_t *c, u } } spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); #ifdef KDTRACE_HOOKS spin_cnt += rowner_loops - i; #endif Modified: stable/10/sys/kern/kern_sx.c ============================================================================== --- stable/10/sys/kern/kern_sx.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_sx.c Fri Feb 13 00:29:57 2015 (r278650) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -560,6 +561,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", + sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -568,9 +573,14 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (SX_SHARERS(x) && spintries < asx_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); spintries++; for (i = 0; i < asx_loops; i++) { @@ -587,6 +597,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); if (i != asx_loops) continue; } @@ -849,6 +861,9 @@ _sx_slock_hard(struct sx *sx, int opts, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -857,6 +872,8 @@ _sx_slock_hard(struct sx *sx, int opts, #endif cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/sys/kern/kern_timeout.c Fri Feb 13 00:29:57 2015 (r278650) @@ -150,6 +150,7 @@ struct callout_cpu { sbintime_t cc_lastscan; void *cc_cookie; u_int cc_bucket; + char cc_ktr_event_name[20]; }; #define cc_exec_curr cc_exec_entity[0].cc_curr @@ -188,7 +189,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; -static void callout_cpu_init(struct callout_cpu *cc); +static void callout_cpu_init(struct callout_cpu *cc, int cpu); static void softclock_call_cc(struct callout *c, struct callout_cpu *cc, #ifdef CALLOUT_PROFILING int *mpcalls, int *lockcalls, int *gcalls, @@ -283,7 +284,7 @@ callout_callwheel_init(void *dummy) cc = CC_CPU(timeout_cpu); cc->cc_callout = malloc(ncallout * sizeof(struct callout), M_CALLOUT, M_WAITOK); - callout_cpu_init(cc); + callout_cpu_init(cc, timeout_cpu); } SYSINIT(callwheel_init, SI_SUB_CPU, SI_ORDER_ANY, callout_callwheel_init, NULL); @@ -291,7 +292,7 @@ SYSINIT(callwheel_init, SI_SUB_CPU, SI_O * Initialize the per-cpu callout structures. */ static void -callout_cpu_init(struct callout_cpu *cc) +callout_cpu_init(struct callout_cpu *cc, int cpu) { struct callout *c; int i; @@ -306,6 +307,8 @@ callout_cpu_init(struct callout_cpu *cc) cc->cc_firstevent = INT64_MAX; for (i = 0; i < 2; i++) cc_cce_cleanup(cc, i); + snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), + "callwheel cpu %d", cpu); if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { @@ -367,7 +370,7 @@ start_softclock(void *dummy) continue; cc = CC_CPU(cpu); cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ - callout_cpu_init(cc); + callout_cpu_init(cc, cpu); if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); @@ -674,6 +677,8 @@ softclock_call_cc(struct callout *c, str CTR3(KTR_CALLOUT, "callout %p func %p arg %p", c, c_func, c_arg); } + KTR_STATE3(KTR_SCHED, "callout", cc->cc_ktr_event_name, "running", + "func:%p", c_func, "arg:%p", c_arg, "direct:%d", direct); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt1 = sbinuptime(); #endif @@ -696,6 +701,7 @@ softclock_call_cc(struct callout *c, str lastfunc = c_func; } #endif + KTR_STATE0(KTR_SCHED, "callout", cc->cc_ktr_event_name, "idle"); CTR1(KTR_CALLOUT, "callout %p finished", c); if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) class->lc_unlock(c_lock); Modified: stable/10/tools/sched/schedgraph.py ============================================================================== --- stable/10/tools/sched/schedgraph.py Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/tools/sched/schedgraph.py Fri Feb 13 00:29:57 2015 (r278650) @@ -70,6 +70,7 @@ eventcolors = [ ("count", "red"), ("running", "green"), ("idle", "grey"), + ("spinning", "red"), ("yielding", "yellow"), ("swapped", "violet"), ("suspended", "purple"), @@ -80,8 +81,6 @@ eventcolors = [ ("runq rem", "yellow"), ("thread exit", "grey"), ("proc exit", "grey"), - ("callwheel idle", "grey"), - ("callout running", "green"), ("lock acquire", "blue"), ("lock contest", "purple"), ("failed lock try", "red"), @@ -856,7 +855,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events)): + if (i >= len(self.events) or i < 0): return (None) event = self.events[i] return (event) @@ -903,7 +902,6 @@ class KTRFile: self.timestamp_f = None self.timestamp_l = None self.locks = {} - self.callwheels = {} self.ticks = {} self.load = {} self.crit = {} Modified: stable/10/usr.bin/man/man.sh ============================================================================== --- stable/10/usr.bin/man/man.sh Fri Feb 13 00:21:54 2015 (r278649) +++ stable/10/usr.bin/man/man.sh Fri Feb 13 00:29:57 2015 (r278650) @@ -276,11 +276,8 @@ man_check_for_so() { return 0 } -# Usage: man_display_page -# Display either the manpage or catpage depending on the use_cat variable man_display_page() { - local EQN NROFF PIC TBL TROFF REFER VGRIND - local IFS l nroff_dev pipeline preproc_arg tool + local IFS pipeline preconv_enc testline # We are called with IFS set to colon. This causes really weird # things to happen for the variables that have spaces in them. @@ -312,6 +309,49 @@ man_display_page() { return fi + case "${manpage}" in + *.${man_charset}/*) + case "$man_charset" in + ISO8859-1) preconv_enc="latin-1" ;; + ISO8859-15) preconv_enc="latin-1" ;; + UTF-8) preconv_enc="utf-8" ;; + esac + ;; + esac + + if [ -n "$preconv_enc" ]; then + pipeline="preconv -e $preconv_enc |" + fi + testline="$pipeline mandoc -Tlint -Werror 2>/dev/null" + pipeline="$pipeline mandoc -Tlocale | $MANPAGER" + + if ! eval "$cattool $manpage | $testline" ;then + if which -s groff2; then + man_display_page_groff + else + echo "This manpage needs groff(1) to be rendered" >&2 + echo "First install groff(1): " >&2 + echo "pkg install groff " >&2 + ret=1 + fi + return + fi + + if [ $debug -gt 0 ]; then + decho "Command: $cattool $manpage | $pipeline" + ret=0 + else + eval "$cattool $manpage | $pipeline" + ret=$? + fi +} + +# Usage: man_display_page +# Display either the manpage or catpage depending on the use_cat variable +man_display_page_groff() { + local EQN NROFF PIC TBL TROFF REFER VGRIND + local IFS l nroff_dev pipeline preproc_arg tool + # So, we really do need to parse the manpage. First, figure out the # device flag (-T) we have to pass to eqn(1) and groff(1). Then, # setup the pipeline of commands based on the user's request. From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:41:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A2B7895; Fri, 13 Feb 2015 00:41: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 74DCF77C; Fri, 13 Feb 2015 00:41: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 t1D0f4VR008625; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0f4N6008624; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502130041.t1D0f4N6008624@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 13 Feb 2015 00:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278651 - in stable: 10/share/man/man5 9/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:41:04 -0000 Author: gjb Date: Fri Feb 13 00:41:03 2015 New Revision: 278651 URL: https://svnweb.freebsd.org/changeset/base/278651 Log: MFC r278526: Fix a rendering issue in the nullfs(5) manual page. Sponsored by: The FreeBSD Foundation Modified: stable/10/share/man/man5/nullfs.5 Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/share/man/man5/nullfs.5 Directory Properties: stable/9/share/man/man5/ (props changed) Modified: stable/10/share/man/man5/nullfs.5 ============================================================================== --- stable/10/share/man/man5/nullfs.5 Fri Feb 13 00:29:57 2015 (r278650) +++ stable/10/share/man/man5/nullfs.5 Fri Feb 13 00:41:03 2015 (r278651) @@ -24,15 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2008 +.Dd February 10, 2015 .Dt NULLFS 5 .Os .Sh NAME .Nm nullfs .Nd "null file system" .Sh SYNOPSIS -To enable support for -.Nm , +To enable support for this driver, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "options NULLFS" From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:41:05 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F029896; Fri, 13 Feb 2015 00:41: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 19A1277D; Fri, 13 Feb 2015 00:41: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 t1D0f4Vd008634; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0f4mR008633; Fri, 13 Feb 2015 00:41:04 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502130041.t1D0f4mR008633@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 13 Feb 2015 00:41:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278651 - in stable: 10/share/man/man5 9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:41:05 -0000 Author: gjb Date: Fri Feb 13 00:41:03 2015 New Revision: 278651 URL: https://svnweb.freebsd.org/changeset/base/278651 Log: MFC r278526: Fix a rendering issue in the nullfs(5) manual page. Sponsored by: The FreeBSD Foundation Modified: stable/9/share/man/man5/nullfs.5 Directory Properties: stable/9/share/man/man5/ (props changed) Changes in other areas also in this revision: Modified: stable/10/share/man/man5/nullfs.5 Directory Properties: stable/10/ (props changed) Modified: stable/9/share/man/man5/nullfs.5 ============================================================================== --- stable/9/share/man/man5/nullfs.5 Fri Feb 13 00:29:57 2015 (r278650) +++ stable/9/share/man/man5/nullfs.5 Fri Feb 13 00:41:03 2015 (r278651) @@ -24,15 +24,14 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2008 +.Dd February 10, 2015 .Dt NULLFS 5 .Os .Sh NAME .Nm nullfs .Nd "null file system" .Sh SYNOPSIS -To enable support for -.Nm , +To enable support for this driver, place the following line in the kernel configuration file: .Bd -ragged -offset indent .Cd "options NULLFS" From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 00:49:52 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E1BCCED; Fri, 13 Feb 2015 00:49: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 774D77CD; Fri, 13 Feb 2015 00:49: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 t1D0nq1v012190; Fri, 13 Feb 2015 00:49:52 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D0nmk5012173; Fri, 13 Feb 2015 00:49:48 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130049.t1D0nmk5012173@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 00:49:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278652 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 00:49:52 -0000 Author: ian Date: Fri Feb 13 00:49:47 2015 New Revision: 278652 URL: https://svnweb.freebsd.org/changeset/base/278652 Log: MFC r276525, r276596: Put in a workaround for bug 196407 (arm modules cause crashes & panics). (Don't allow movw/movt insn in modules.) Fix alignment directives in arm asm code after clang 3.5 import. Modified: stable/10/sys/arm/arm/bcopyinout.S stable/10/sys/arm/arm/bcopyinout_xscale.S stable/10/sys/arm/arm/copystr.S stable/10/sys/arm/arm/cpufunc_asm.S stable/10/sys/arm/arm/cpufunc_asm_arm10.S stable/10/sys/arm/arm/cpufunc_asm_arm9.S stable/10/sys/arm/arm/cpufunc_asm_armv5.S stable/10/sys/arm/arm/exception.S stable/10/sys/arm/arm/fusu.S stable/10/sys/arm/arm/locore-v4.S stable/10/sys/arm/arm/locore-v6.S stable/10/sys/arm/include/asm.h stable/10/sys/arm/include/profile.h stable/10/sys/conf/kmod.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/bcopyinout.S ============================================================================== --- stable/10/sys/arm/arm/bcopyinout.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/bcopyinout.S Fri Feb 13 00:49:47 2015 (r278652) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #else .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ Modified: stable/10/sys/arm/arm/bcopyinout_xscale.S ============================================================================== --- stable/10/sys/arm/arm/bcopyinout_xscale.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/bcopyinout_xscale.S Fri Feb 13 00:49:47 2015 (r278652) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); .syntax unified .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ Modified: stable/10/sys/arm/arm/copystr.S ============================================================================== --- stable/10/sys/arm/arm/copystr.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/copystr.S Fri Feb 13 00:49:47 2015 (r278652) @@ -47,7 +47,7 @@ __FBSDID("$FreeBSD$"); #include .text - .align 0 + .align 2 #ifdef _ARM_ARCH_6 #define GET_PCB(tmp) \ @@ -210,5 +210,5 @@ END(copyoutstr) Lcopystrpcbfaulttext: .asciz "No valid PCB during copyinoutstr() addr1=%08x addr2=%08x\n" - .align 0 + .align 2 #endif Modified: stable/10/sys/arm/arm/cpufunc_asm.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm.S Fri Feb 13 00:49:47 2015 (r278652) @@ -46,7 +46,7 @@ __FBSDID("$FreeBSD$"); .text - .align 0 + .align 2 ENTRY(cpufunc_nullop) RET @@ -138,7 +138,7 @@ ENTRY(cpufunc_control) RET .Lglou: .asciz "plop %p\n" - .align 0 + .align 2 END(cpufunc_control) /* Modified: stable/10/sys/arm/arm/cpufunc_asm_arm10.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm10.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm_arm10.S Fri Feb 13 00:49:47 2015 (r278652) @@ -265,7 +265,7 @@ END(arm10_context_switch) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(arm10_dcache_sets_max) .space 4 C_OBJECT(arm10_dcache_index_max) Modified: stable/10/sys/arm/arm/cpufunc_asm_arm9.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_arm9.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm_arm9.S Fri Feb 13 00:49:47 2015 (r278652) @@ -252,7 +252,7 @@ END(arm9_context_switch) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(arm9_dcache_sets_max) .space 4 C_OBJECT(arm9_dcache_index_max) Modified: stable/10/sys/arm/arm/cpufunc_asm_armv5.S ============================================================================== --- stable/10/sys/arm/arm/cpufunc_asm_armv5.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/cpufunc_asm_armv5.S Fri Feb 13 00:49:47 2015 (r278652) @@ -236,7 +236,7 @@ END(armv5_idcache_wbinv_all) * four variables is assumed in the code above. Hence the reason for * declaring them in the assembler file. */ - .align 0 + .align 2 C_OBJECT(armv5_dcache_sets_max) .space 4 C_OBJECT(armv5_dcache_index_max) Modified: stable/10/sys/arm/arm/exception.S ============================================================================== --- stable/10/sys/arm/arm/exception.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/exception.S Fri Feb 13 00:49:47 2015 (r278652) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); .text - .align 0 + .align 2 /* * ASM macros for pushing and pulling trapframes from the stack Modified: stable/10/sys/arm/arm/fusu.S ============================================================================== --- stable/10/sys/arm/arm/fusu.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/fusu.S Fri Feb 13 00:49:47 2015 (r278652) @@ -204,7 +204,7 @@ Lblock_userspace_access: .word _C_LABEL(block_userspace_access) .data - .align 0 + .align 2 .global _C_LABEL(block_userspace_access) _C_LABEL(block_userspace_access): .word 0 Modified: stable/10/sys/arm/arm/locore-v4.S ============================================================================== --- stable/10/sys/arm/arm/locore-v4.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/locore-v4.S Fri Feb 13 00:49:47 2015 (r278652) @@ -74,7 +74,7 @@ __FBSDID("$FreeBSD$"); * the running kernel. */ .text - .align 0 + .align 2 #ifdef PHYSADDR .globl kernbase .set kernbase,KERNBASE @@ -373,7 +373,7 @@ Lend: .Lmainreturned: .asciz "main() returned" - .align 0 + .align 2 .bss svcstk: @@ -389,7 +389,7 @@ pagetable: .space L1_TABLE_SIZE .text - .align 0 + .align 2 .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -476,7 +476,7 @@ mpvirt_done: .Lmpreturned: .asciz "init_secondary() returned" - .align 0 + .align 2 END(mpentry) #endif @@ -584,7 +584,7 @@ END(sigcode) .word SYS_sigreturn .word SYS_exit - .align 0 + .align 2 .global _C_LABEL(esigcode) _C_LABEL(esigcode): Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 00:49:47 2015 (r278652) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #define INIT_ARM_STACK_SIZE 2048 .text - .align 0 + .align 2 /* * On entry for FreeBSD boot ABI: @@ -373,7 +373,7 @@ VA_TO_PA_POINTER(Lpagetable, boot_pt1) .Lmainreturned: .asciz "main() returned" - .align 0 + .align 2 .bss svcstk: @@ -390,7 +390,7 @@ boot_pt1: .space L1_TABLE_SIZE .text - .align 0 + .align 2 .Lcpufuncs: .word _C_LABEL(cpufuncs) @@ -443,11 +443,11 @@ ASENTRY_NP(mpentry) adr r0, .Lmpreturned b _C_LABEL(panic) /* NOTREACHED */ +END(mpentry) .Lmpreturned: .asciz "init_secondary() returned" - .align 0 -END(mpentry) + .align 2 #endif ENTRY_NP(cpu_halt) @@ -525,7 +525,7 @@ END(sigcode) .word SYS_sigreturn .word SYS_exit - .align 0 + .align 2 .global _C_LABEL(esigcode) _C_LABEL(esigcode): Modified: stable/10/sys/arm/include/asm.h ============================================================================== --- stable/10/sys/arm/include/asm.h Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/include/asm.h Fri Feb 13 00:49:47 2015 (r278652) @@ -46,7 +46,7 @@ #define _ASM_LABEL(x) x #ifndef _ALIGN_TEXT -# define _ALIGN_TEXT .align 0 +# define _ALIGN_TEXT .align 2 #endif #if defined(__ARM_EABI__) && !defined(_STANDALONE) @@ -129,11 +129,11 @@ pclabel: add got, got, pc #ifdef __thumb__ #define GOT_INITSYM(gotsym,pclabel) \ - .align 0; \ + .align 2; \ gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+4) #else #define GOT_INITSYM(gotsym,pclabel) \ - .align 0; \ + .align 2; \ gotsym: .word _C_LABEL(_GLOBAL_OFFSET_TABLE_) - (pclabel+8) #endif Modified: stable/10/sys/arm/include/profile.h ============================================================================== --- stable/10/sys/arm/include/profile.h Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/arm/include/profile.h Fri Feb 13 00:49:47 2015 (r278652) @@ -60,7 +60,7 @@ typedef u_long fptrdiff_t; #define MCOUNT \ __asm__(".text"); \ - __asm__(".align 0"); \ + __asm__(".align 2"); \ __asm__(".type __mcount ,%function"); \ __asm__(".global __mcount"); \ __asm__("__mcount:"); \ Modified: stable/10/sys/conf/kmod.mk ============================================================================== --- stable/10/sys/conf/kmod.mk Fri Feb 13 00:41:03 2015 (r278651) +++ stable/10/sys/conf/kmod.mk Fri Feb 13 00:49:47 2015 (r278652) @@ -125,6 +125,11 @@ CFLAGS+= ${DEBUG_FLAGS} CFLAGS+= -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer .endif +# Temporary workaround for PR 196407, which contains the fascinating details. +.if ${MACHINE_CPUARCH} == arm +CFLAGS.clang+= -mllvm -arm-use-movt=0 +.endif + .if ${MACHINE_CPUARCH} == powerpc CFLAGS+= -mlongcall -fno-omit-frame-pointer .endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 02:02:15 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 396E8DDF; Fri, 13 Feb 2015 02:02: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 228A4F25; Fri, 13 Feb 2015 02:02:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D22Fdi049827; Fri, 13 Feb 2015 02:02:15 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D22DhW049813; Fri, 13 Feb 2015 02:02:13 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502130202.t1D22DhW049813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 02:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278656 - in stable/10/sys: arm/arm arm/include conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 02:02:15 -0000 Author: ian Date: Fri Feb 13 02:02:12 2015 New Revision: 278656 URL: https://svnweb.freebsd.org/changeset/base/278656 Log: MFC r272356, r275639, r276638: Split syscall handling out to a separate file. Include sys/kernel.h to pick up the definition of hz in syscall.c Add a new trap-v6.c which has support for all armv7 exceptions. Added: stable/10/sys/arm/arm/syscall.c - copied, changed from r272356, head/sys/arm/arm/syscall.c stable/10/sys/arm/arm/trap-v6.c - copied unchanged from r276638, head/sys/arm/arm/trap-v6.c Modified: stable/10/sys/arm/arm/trap.c stable/10/sys/arm/include/armreg.h stable/10/sys/arm/include/proc.h stable/10/sys/conf/files.arm Directory Properties: stable/10/ (props changed) Copied and modified: stable/10/sys/arm/arm/syscall.c (from r272356, head/sys/arm/arm/syscall.c) ============================================================================== --- head/sys/arm/arm/syscall.c Wed Oct 1 12:44:16 2014 (r272356, copy source) +++ stable/10/sys/arm/arm/syscall.c Fri Feb 13 02:02:12 2015 (r278656) @@ -84,6 +84,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include Copied: stable/10/sys/arm/arm/trap-v6.c (from r276638, head/sys/arm/arm/trap-v6.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/arm/trap-v6.c Fri Feb 13 02:02:12 2015 (r278656, copy of r276638, head/sys/arm/arm/trap-v6.c) @@ -0,0 +1,655 @@ +/*- + * Copyright 2014 Olivier Houchard + * Copyright 2014 Svatopluk Kraus + * Copyright 2014 Michal Meloun + * Copyright 2014 Andrew Turner + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include "opt_ktrace.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef KTRACE +#include +#include +#endif + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#ifdef KDB +#include +#include +#endif + +extern char fusubailout[]; + +struct ksig { + int sig; + u_long code; + vm_offset_t addr; +}; + +typedef int abort_func_t(struct trapframe *, u_int, u_int, u_int, u_int, + struct thread *, struct ksig *); + +static abort_func_t abort_fatal; +static abort_func_t abort_align; +static abort_func_t abort_icache; + +struct abort { + abort_func_t *func; + const char *desc; +}; + +/* + * How are the aborts handled? + * + * Undefined Code: + * - Always fatal as we do not know what does it mean. + * Imprecise External Abort: + * - Always fatal, but can be handled somehow in the future. + * Now, due to PCIe buggy harware, ignored. + * Precise External Abort: + * - Always fatal, but who knows in the future??? + * Debug Event: + * - Special handling. + * External Translation Abort (L1 & L2) + * - Always fatal as something is screwed up in page tables or harware. + * Domain Fault (L1 & L2): + * - Always fatal as we do not play game with domains. + * Alignment Fault: + * - Everything should be aligned in kernel including user to kernel and + * vice versa data copying, so we ignore pcb_onfault, and it's always fatal. + * We generate signal in case of abort from user mode. + * Instruction cache maintenance: + * - According to manual, this is translation fault during cache maintenance + * operation. So, it could be really complex in SMP case and fuzzy too + * for cache operations working on virtual addresses. For now, we will + * consider this abort as fatal. In fact, no cache maintenance on + * not mapped virtual addresses should be called. As cache maintenance + * operation (except DMB, DSB, and Flush Prefetch Buffer) are priviledged, + * the abort is fatal for user mode as well for now. (This is good place to + * note that cache maintenance on virtual address fill TLB.) + * Acces Bit (L1 & L2): + * - Fast hardware emulation for kernel and user mode. + * Translation Fault (L1 & L2): + * - Standard fault mechanism is held including vm_fault(). + * Permission Fault (L1 & L2): + * - Fast harware emulation of modify bits and in other cases, standard + * fault mechanism is held including vm_fault(). + */ + +static const struct abort aborts[] = { + {abort_fatal, "Undefined Code (0x000)"}, + {abort_align, "Alignment Fault"}, + {abort_fatal, "Debug Event"}, + {NULL, "Access Bit (L1)"}, + {abort_icache, "Instruction cache maintenance"}, + {NULL, "Translation Fault (L1)"}, + {NULL, "Access Bit (L2)"}, + {NULL, "Translation Fault (L2)"}, + + {abort_fatal, "External Abort"}, + {abort_fatal, "Domain Fault (L1)"}, + {abort_fatal, "Undefined Code (0x00A)"}, + {abort_fatal, "Domain Fault (L2)"}, + {abort_fatal, "External Translation Abort (L1)"}, + {NULL, "Permission Fault (L1)"}, + {abort_fatal, "External Translation Abort (L2)"}, + {NULL, "Permission Fault (L2)"}, + + {abort_fatal, "TLB Conflict Abort"}, + {abort_fatal, "Undefined Code (0x401)"}, + {abort_fatal, "Undefined Code (0x402)"}, + {abort_fatal, "Undefined Code (0x403)"}, + {abort_fatal, "Undefined Code (0x404)"}, + {abort_fatal, "Undefined Code (0x405)"}, + {abort_fatal, "Asynchronous External Abort"}, + {abort_fatal, "Undefined Code (0x407)"}, + + {abort_fatal, "Asynchronous Parity Error on Memory Access"}, + {abort_fatal, "Parity Error on Memory Access"}, + {abort_fatal, "Undefined Code (0x40A)"}, + {abort_fatal, "Undefined Code (0x40B)"}, + {abort_fatal, "Parity Error on Translation (L1)"}, + {abort_fatal, "Undefined Code (0x40D)"}, + {abort_fatal, "Parity Error on Translation (L2)"}, + {abort_fatal, "Undefined Code (0x40F)"} +}; + + +static __inline void +call_trapsignal(struct thread *td, int sig, int code, vm_offset_t addr) +{ + ksiginfo_t ksi; + + CTR4(KTR_TRAP, "%s: addr: %#x, sig: %d, code: %d", + __func__, addr, sig, code); + + /* + * TODO: some info would be nice to know + * if we are serving data or prefetch abort. + */ + + ksiginfo_init_trap(&ksi); + ksi.ksi_signo = sig; + ksi.ksi_code = code; + ksi.ksi_addr = (void *)addr; + trapsignal(td, &ksi); +} + +/* + * abort_imprecise() handles the following abort: + * + * FAULT_EA_IMPREC - Imprecise External Abort + * + * The imprecise means that we don't know where the abort happened, + * thus FAR is undefined. The abort should not never fire, but hot + * plugging or accidental harware failure can be the cause of it. + * If the abort happens, it can even be on different (thread) context. + * Without any additional support, the abort is fatal, as we do not + * know what really happened. + * + * QQQ: Some additional functionality, like pcb_onfault but global, + * can be implemented. Imprecise handlers could be registered + * which tell us if the abort is caused by something they know + * about. They should return one of three codes like: + * FAULT_IS_MINE, + * FAULT_CAN_BE_MINE, + * FAULT_IS_NOT_MINE. + * The handlers should be called until some of them returns + * FAULT_IS_MINE value or all was called. If all handlers return + * FAULT_IS_NOT_MINE value, then the abort is fatal. + */ +static __inline void +abort_imprecise(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode) +{ + /* XXXX We can got imprecise abort as result of access + * to not-present PCI/PCIe configuration space. + */ +#if 0 + goto out; +#endif + abort_fatal(tf, FAULT_EA_IMPREC, fsr, 0, prefetch, curthread, NULL); + + /* + * Returning from this function means that we ignore + * the abort for good reason. Note that imprecise abort + * could fire any time even in user mode. + */ + +#if 0 +out: + if (usermode) + userret(curthread, tf); +#endif +} + +/* + * abort_debug() handles the following abort: + * + * FAULT_DEBUG - Debug Event + * + */ +static __inline void +abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, u_int usermode, + u_int far) +{ + if (usermode) { + struct thread *td; + + td = curthread; + call_trapsignal(td, SIGTRAP, TRAP_BRKPT, far); + userret(td, tf); + } else { +#ifdef KDB + kdb_trap(T_BREAKPOINT, 0, tf); +#else + printf("No debugger in kernel.\n"); +#endif + } +} + +/* + * Abort handler. + * + * FAR, FSR, and everything what can be lost after enabling + * interrupts must be grabbed before the interrupts will be + * enabled. Note that when interrupts will be enabled, we + * could even migrate to another CPU ... + * + * TODO: move quick cases to ASM + */ +void +abort_handler(struct trapframe *tf, int prefetch) +{ + struct thread *td; + vm_offset_t far, va; + int idx, usermode; + uint32_t fsr; + struct ksig ksig; + struct proc *p; + struct pcb *pcb; + struct vm_map *map; + struct vmspace *vm; + vm_prot_t ftype; + int rv; +#ifdef INVARIANTS + void *onfault; +#endif + td = curthread; + fsr = (prefetch) ? cp15_ifsr_get(): cp15_dfsr_get(); + far = (prefetch) ? TRAPF_PC(tf) : cp15_dfar_get(); + + idx = FSR_TO_FAULT(fsr); + usermode = TRAPF_USERMODE(tf); /* Abort came from user mode? */ + if (usermode) + td->td_frame = tf; + + CTR4(KTR_TRAP, "abort_handler: fsr %#x (idx %u) far %#x prefetch %u", + fsr, idx, far, prefetch); + + /* + * Firstly, handle aborts that are not directly related to mapping. + */ + if (__predict_false(idx == FAULT_EA_IMPREC)) { + abort_imprecise(tf, fsr, prefetch, usermode); + return; + } + + if (__predict_false(idx == FAULT_DEBUG)) { + abort_debug(tf, fsr, prefetch, usermode, far); + return; + } + +#ifdef ARM_NEW_PMAP + rv = pmap_fault(PCPU_GET(curpmap), far, fsr, idx, usermode); + if (rv == 0) { + return; + } else if (rv == EFAULT) { + + call_trapsignal(td, SIGSEGV, SEGV_MAPERR, far); + userret(td, tf); + return; + } +#endif + /* + * Now, when we handled imprecise and debug aborts, the rest of + * aborts should be really related to mapping. + * + */ + + PCPU_INC(cnt.v_trap); + +#ifdef KDB + if (kdb_active) { + kdb_reenter(); + goto out; + } +#endif + if (__predict_false((td->td_pflags & TDP_NOFAULTING) != 0)) { + /* + * Due to both processor errata and lazy TLB invalidation when + * access restrictions are removed from virtual pages, memory + * accesses that are allowed by the physical mapping layer may + * nonetheless cause one spurious page fault per virtual page. + * When the thread is executing a "no faulting" section that + * is bracketed by vm_fault_{disable,enable}_pagefaults(), + * every page fault is treated as a spurious page fault, + * unless it accesses the same virtual address as the most + * recent page fault within the same "no faulting" section. + */ + if (td->td_md.md_spurflt_addr != far || + (td->td_pflags & TDP_RESETSPUR) != 0) { + td->td_md.md_spurflt_addr = far; + td->td_pflags &= ~TDP_RESETSPUR; + + tlb_flush_local(far & ~PAGE_MASK); + return; + } + } else { + /* + * If we get a page fault while in a critical section, then + * it is most likely a fatal kernel page fault. The kernel + * is already going to panic trying to get a sleep lock to + * do the VM lookup, so just consider it a fatal trap so the + * kernel can print out a useful trap message and even get + * to the debugger. + * + * If we get a page fault while holding a non-sleepable + * lock, then it is most likely a fatal kernel page fault. + * If WITNESS is enabled, then it's going to whine about + * bogus LORs with various VM locks, so just skip to the + * fatal trap handling directly. + */ + if (td->td_critnest != 0 || + WITNESS_CHECK(WARN_SLEEPOK | WARN_GIANTOK, NULL, + "Kernel page fault") != 0) { + abort_fatal(tf, idx, fsr, far, prefetch, td, &ksig); + return; + } + } + + /* Re-enable interrupts if they were enabled previously. */ + if (td->td_md.md_spinlock_count == 0) { + if (__predict_true(tf->tf_spsr & PSR_I) == 0) + enable_interrupts(PSR_I); + if (__predict_true(tf->tf_spsr & PSR_F) == 0) + enable_interrupts(PSR_F); + } + + p = td->td_proc; + if (usermode) { + td->td_pticks = 0; + if (td->td_ucred != p->p_ucred) + cred_update_thread(td); + } + + /* Invoke the appropriate handler, if necessary. */ + if (__predict_false(aborts[idx].func != NULL)) { + if ((aborts[idx].func)(tf, idx, fsr, far, prefetch, td, &ksig)) + goto do_trapsignal; + goto out; + } + + /* + * At this point, we're dealing with one of the following aborts: + * + * FAULT_TRAN_xx - Translation + * FAULT_PERM_xx - Permission + * + * These are the main virtual memory-related faults signalled by + * the MMU. + */ + + /* fusubailout is used by [fs]uswintr to avoid page faulting */ + pcb = td->td_pcb; + if (__predict_false(pcb->pcb_onfault == fusubailout)) { + tf->tf_r0 = EFAULT; + tf->tf_pc = (register_t)pcb->pcb_onfault; + return; + } + + /* + * QQQ: ARM has a set of unprivileged load and store instructions + * (LDRT/LDRBT/STRT/STRBT ...) which are supposed to be used + * in other than user mode and OS should recognize their + * aborts and behaved appropriately. However, there is no way + * how to do that reasonably in general unless we restrict + * the handling somehow. One way is to limit the handling for + * aborts which come from undefined mode only. + * + * Anyhow, we do not use these instructions and do not implement + * any special handling for them. + */ + + va = trunc_page(far); + if (va >= KERNBASE) { + /* + * Don't allow user-mode faults in kernel address space. + */ + if (usermode) + goto nogo; + + map = kernel_map; + } else { + /* + * This is a fault on non-kernel virtual memory. If curproc + * is NULL or curproc->p_vmspace is NULL the fault is fatal. + */ + vm = (p != NULL) ? p->p_vmspace : NULL; + if (vm == NULL) + goto nogo; + + map = &vm->vm_map; + if (!usermode && (td->td_intr_nesting_level != 0 || + pcb->pcb_onfault == NULL)) { + abort_fatal(tf, idx, fsr, far, prefetch, td, &ksig); + return; + } + } + + ftype = (fsr & FSR_WNR) ? VM_PROT_WRITE : VM_PROT_READ; + if (prefetch) + ftype |= VM_PROT_EXECUTE; + +#ifndef ARM_NEW_PMAP + if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype, + usermode)) { + goto out; + } +#endif + +#ifdef INVARIANTS + onfault = pcb->pcb_onfault; + pcb->pcb_onfault = NULL; +#endif + if (map != kernel_map) { + /* + * Keep swapout from messing with us during this + * critical time. + */ + PROC_LOCK(p); + ++p->p_lock; + PROC_UNLOCK(p); + + /* Fault in the user page: */ + rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL); + + PROC_LOCK(p); + --p->p_lock; + PROC_UNLOCK(p); + } else { + /* + * Don't have to worry about process locking or stacks in the + * kernel. + */ + rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL); + } + +#ifdef INVARIANTS + pcb->pcb_onfault = onfault; +#endif + + if (__predict_true(rv == KERN_SUCCESS)) + goto out; +nogo: + if (!usermode) { + if (td->td_intr_nesting_level == 0 && + pcb->pcb_onfault != NULL) { + tf->tf_r0 = rv; + tf->tf_pc = (int)pcb->pcb_onfault; + return; + } + CTR2(KTR_TRAP, "%s: vm_fault() failed with %d", __func__, rv); + abort_fatal(tf, idx, fsr, far, prefetch, td, &ksig); + return; + } + + ksig.sig = (rv == KERN_PROTECTION_FAILURE) ? SIGBUS : SIGSEGV; + ksig.code = 0; + ksig.addr = far; + +do_trapsignal: + call_trapsignal(td, ksig.sig, ksig.code, ksig.addr); +out: + if (usermode) + userret(td, tf); +} + +/* + * abort_fatal() handles the following data aborts: + + * FAULT_DEBUG - Debug Event + * FAULT_ACCESS_xx - Acces Bit + * FAULT_EA_PREC - Precise External Abort + * FAULT_DOMAIN_xx - Domain Fault + * FAULT_EA_TRAN_xx - External Translation Abort + * FAULT_EA_IMPREC - Imprecise External Abort + * + all undefined codes for ABORT + * + * We should never see these on a properly functioning system. + * + * This function is also called by the other handlers if they + * detect a fatal problem. + * + * Note: If 'l' is NULL, we assume we're dealing with a prefetch abort. + */ +static int +abort_fatal(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, + struct thread *td, struct ksig *ksig) +{ + u_int usermode; + const char *mode; + const char *rw_mode; + + usermode = TRAPF_USERMODE(tf); + mode = usermode ? "user" : "kernel"; + rw_mode = fsr & FSR_WNR ? "write" : "read"; + disable_interrupts(PSR_I|PSR_F); + + if (td != NULL) { + printf("Fatal %s mode data abort: '%s' on %s\n", mode, + aborts[idx].desc, rw_mode); + printf("trapframe: %p\nFSR=%08x, FAR=", tf, fsr); + if (idx != FAULT_EA_IMPREC) + printf("%08x, ", far); + else + printf("Invalid, "); + printf("spsr=%08x\n", tf->tf_spsr); + } else { + printf("Fatal %s mode prefetch abort at 0x%08x\n", + mode, tf->tf_pc); + printf("trapframe: %p, spsr=%08x\n", tf, tf->tf_spsr); + } + + printf("r0 =%08x, r1 =%08x, r2 =%08x, r3 =%08x\n", + tf->tf_r0, tf->tf_r1, tf->tf_r2, tf->tf_r3); + printf("r4 =%08x, r5 =%08x, r6 =%08x, r7 =%08x\n", + tf->tf_r4, tf->tf_r5, tf->tf_r6, tf->tf_r7); + printf("r8 =%08x, r9 =%08x, r10=%08x, r11=%08x\n", + tf->tf_r8, tf->tf_r9, tf->tf_r10, tf->tf_r11); + printf("r12=%08x, ", tf->tf_r12); + + if (usermode) + printf("usp=%08x, ulr=%08x", + tf->tf_usr_sp, tf->tf_usr_lr); + else + printf("ssp=%08x, slr=%08x", + tf->tf_svc_sp, tf->tf_svc_lr); + printf(", pc =%08x\n\n", tf->tf_pc); + +#ifdef KDB + if (debugger_on_panic || kdb_active) + kdb_trap(fsr, 0, tf); +#endif + panic("Fatal abort"); + /*NOTREACHED*/ +} + +/* + * abort_align() handles the following data abort: + * + * FAULT_ALIGN - Alignment fault + * + * Every memory access should be correctly aligned in kernel including + * user to kernel and vice versa data copying, so we ignore pcb_onfault, + * and it's always fatal. We generate a signal in case of abort from user mode. + */ +static int +abort_align(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, + struct thread *td, struct ksig *ksig) +{ + u_int usermode; + + usermode = TRAPF_USERMODE(tf); + + /* + * Alignment faults are always fatal if they occur in any but user mode. + * + * XXX The old trap code handles pcb fault even for alignment traps. + * Unfortunately, we don't known why and if is this need. + */ + if (!usermode) { + if (td->td_intr_nesting_level == 0 && td != NULL && + td->td_pcb->pcb_onfault != NULL) { + printf("%s: Got alignment fault with pcb_onfault set" + ", please report this issue\n", __func__); + tf->tf_r0 = EFAULT;; + tf->tf_pc = (int)td->td_pcb->pcb_onfault; + return (0); + } + abort_fatal(tf, idx, fsr, far, prefetch, td, ksig); + } + /* Deliver a bus error signal to the process */ + ksig->code = 0; + ksig->sig = SIGBUS; + ksig->addr = far; + return (1); +} + +/* + * abort_icache() handles the following data abort: + * + * FAULT_ICACHE - Instruction cache maintenance + * + * According to manual, FAULT_ICACHE is translation fault during cache + * maintenance operation. In fact, no cache maintenance operation on + * not mapped virtual addresses should be called. As cache maintenance + * operation (except DMB, DSB, and Flush Prefetch Buffer) are priviledged, + * the abort is concider as fatal for now. However, all the matter with + * cache maintenance operation on virtual addresses could be really complex + * and fuzzy in SMP case, so maybe in future standard fault mechanism + * should be held here including vm_fault() calling. + */ +static int +abort_icache(struct trapframe *tf, u_int idx, u_int fsr, u_int far, u_int prefetch, + struct thread *td, struct ksig *ksig) +{ + abort_fatal(tf, idx, fsr, far, prefetch, td, ksig); + return(0); +} Modified: stable/10/sys/arm/arm/trap.c ============================================================================== --- stable/10/sys/arm/arm/trap.c Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/arm/arm/trap.c Fri Feb 13 02:02:12 2015 (r278656) @@ -79,28 +79,15 @@ */ -#include "opt_ktrace.h" - #include __FBSDID("$FreeBSD$"); #include -#include #include #include -#include #include #include -#include -#include #include -#include -#ifdef KTRACE -#include -#include -#endif -#include -#include #include #include @@ -108,28 +95,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include -#include #include -#include +#include +#include #include -#include -#include - -#include +#include #ifdef KDB #include #endif - -void swi_handler(struct trapframe *); - -#include -#include - extern char fusubailout[]; #ifdef DEBUG @@ -773,106 +748,4 @@ badaddr_read(void *addr, size_t size, vo /* Return EFAULT if the address was invalid, else zero */ return (rv); -} - -int -cpu_fetch_syscall_args(struct thread *td, struct syscall_args *sa) -{ - struct proc *p; - register_t *ap; - int error; - -#ifdef __ARM_EABI__ - sa->code = td->td_frame->tf_r7; -#else - sa->code = sa->insn & 0x000fffff; -#endif - ap = &td->td_frame->tf_r0; - if (sa->code == SYS_syscall) { - sa->code = *ap++; - sa->nap--; - } else if (sa->code == SYS___syscall) { - sa->code = ap[_QUAD_LOWWORD]; - sa->nap -= 2; - ap += 2; - } - p = td->td_proc; - if (p->p_sysent->sv_mask) - sa->code &= p->p_sysent->sv_mask; - if (sa->code >= p->p_sysent->sv_size) - sa->callp = &p->p_sysent->sv_table[0]; - else - sa->callp = &p->p_sysent->sv_table[sa->code]; - sa->narg = sa->callp->sy_narg; - error = 0; - memcpy(sa->args, ap, sa->nap * sizeof(register_t)); - if (sa->narg > sa->nap) { - error = copyin((void *)td->td_frame->tf_usr_sp, sa->args + - sa->nap, (sa->narg - sa->nap) * sizeof(register_t)); - } - if (error == 0) { - td->td_retval[0] = 0; - td->td_retval[1] = 0; - } - return (error); -} - -#include "../../kern/subr_syscall.c" - -static void -syscall(struct thread *td, struct trapframe *frame) -{ - struct syscall_args sa; - int error; - -#ifndef __ARM_EABI__ - sa.insn = *(uint32_t *)(frame->tf_pc - INSN_SIZE); - switch (sa.insn & SWI_OS_MASK) { - case 0: /* XXX: we need our own one. */ - break; - default: - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } -#endif - sa.nap = 4; - - error = syscallenter(td, &sa); - KASSERT(error != 0 || td->td_ar == NULL, - ("returning from syscall with td_ar set!")); - syscallret(td, error, &sa); -} - -void -swi_handler(struct trapframe *frame) -{ - struct thread *td = curthread; - - td->td_frame = frame; - - td->td_pticks = 0; - /* - * Make sure the program counter is correctly aligned so we - * don't take an alignment fault trying to read the opcode. - */ - if (__predict_false(((frame->tf_pc - INSN_SIZE) & 3) != 0)) { - call_trapsignal(td, SIGILL, 0); - userret(td, frame); - return; - } - /* - * Enable interrupts if they were enabled before the exception. - * Since all syscalls *should* come from user mode it will always - * be safe to enable them, but check anyway. - */ - if (td->td_md.md_spinlock_count == 0) { - if (__predict_true(frame->tf_spsr & PSR_I) == 0) - enable_interrupts(PSR_I); - if (__predict_true(frame->tf_spsr & PSR_F) == 0) - enable_interrupts(PSR_F); - } - - syscall(td, frame); -} - +} \ No newline at end of file Modified: stable/10/sys/arm/include/armreg.h ============================================================================== --- stable/10/sys/arm/include/armreg.h Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/arm/include/armreg.h Fri Feb 13 02:02:12 2015 (r278656) @@ -41,6 +41,8 @@ #ifndef MACHINE_ARMREG_H #define MACHINE_ARMREG_H +#include + #define INSN_SIZE 4 #define INSN_COND_MASK 0xf0000000 /* Condition mask */ #define PSR_MODE 0x0000001f /* mode mask */ @@ -350,10 +352,10 @@ #define CACHE_UNI_CACHE 4 /* Fault status register definitions */ - -#define FAULT_TYPE_MASK 0x0f #define FAULT_USER 0x10 +#if __ARM_ARCH < 6 +#define FAULT_TYPE_MASK 0x0f #define FAULT_WRTBUF_0 0x00 /* Vector Exception */ #define FAULT_WRTBUF_1 0x02 /* Terminal Exception */ #define FAULT_BUSERR_0 0x04 /* External Abort on Linefetch -- Section */ @@ -376,14 +378,36 @@ #define FAULT_EXTERNAL 0x400 /* External abort (armv6+) */ #define FAULT_WNR 0x800 /* Write-not-Read access (armv6+) */ -/* Fault status register definitions - v6+ */ -#define FSR_STATUS_TO_IDX(fsr) (((fsr) & 0xF) | \ - (((fsr) & (1 << 10)>> (10 - 4)))) -#define FSR_LPAE (1 << 9) /* LPAE indicator */ -#define FSR_WNR (1 << 11) /* Write-not-Read access */ -#define FSR_EXT (1 << 12) /* DECERR/SLVERR for external*/ -#define FSR_CM (1 << 13) /* Cache maintenance fault */ +#else /* __ARM_ARCH < 6 */ +#define FAULT_ALIGN 0x001 /* Alignment Fault */ +#define FAULT_DEBUG 0x002 /* Debug Event */ +#define FAULT_ACCESS_L1 0x003 /* Access Bit (L1) */ +#define FAULT_ICACHE 0x004 /* Instruction cache maintenance */ +#define FAULT_TRAN_L1 0x005 /* Translation Fault (L1) */ +#define FAULT_ACCESS_L2 0x006 /* Access Bit (L2) */ +#define FAULT_TRAN_L2 0x007 /* Translation Fault (L2) */ +#define FAULT_EA_PREC 0x008 /* External Abort */ +#define FAULT_DOMAIN_L1 0x009 /* Domain Fault (L1) */ +#define FAULT_DOMAIN_L2 0x00B /* Domain Fault (L2) */ +#define FAULT_EA_TRAN_L1 0x00C /* External Translation Abort (L1) */ +#define FAULT_PERM_L1 0x00D /* Permission Fault (L1) */ +#define FAULT_EA_TRAN_L2 0x00E /* External Translation Abort (L2) */ +#define FAULT_PERM_L2 0x00F /* Permission Fault (L2) */ +#define FAULT_TLB_CONFLICT 0x010 /* Permission Fault (L2) */ +#define FAULT_EA_IMPREC 0x016 /* Asynchronous External Abort */ +#define FAULT_PE_IMPREC 0x018 /* Asynchronous Parity Error */ +#define FAULT_PARITY 0x019 /* Parity Error */ +#define FAULT_PE_TRAN_L1 0x01C /* Parity Error on Translation (L1) */ +#define FAULT_PE_TRAN_L2 0x01E /* Parity Error on Translation (L2) */ + +#define FSR_TO_FAULT(fsr) (((fsr) & 0xF) | \ + ((((fsr) & (1 << 10)) >> (10 - 4)))) +#define FSR_LPAE (1 << 9) /* LPAE indicator */ +#define FSR_WNR (1 << 11) /* Write-not-Read access */ +#define FSR_EXT (1 << 12) /* DECERR/SLVERR for external*/ +#define FSR_CM (1 << 13) /* Cache maintenance fault */ +#endif /* !__ARM_ARCH < 6 */ /* * Address of the vector page, low and high versions. Modified: stable/10/sys/arm/include/proc.h ============================================================================== --- stable/10/sys/arm/include/proc.h Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/arm/include/proc.h Fri Feb 13 02:02:12 2015 (r278656) @@ -48,6 +48,7 @@ struct md_utrap { struct mdthread { int md_spinlock_count; /* (k) */ register_t md_saved_cspr; /* (k) */ + register_t md_spurflt_addr; /* (k) Spurious page fault address. */ int md_ptrace_instr; int md_ptrace_addr; register_t md_tp; Modified: stable/10/sys/conf/files.arm ============================================================================== --- stable/10/sys/conf/files.arm Fri Feb 13 01:35:53 2015 (r278655) +++ stable/10/sys/conf/files.arm Fri Feb 13 02:02:12 2015 (r278656) @@ -49,7 +49,9 @@ arm/arm/stdatomic.c standard \ arm/arm/support.S standard arm/arm/swtch.S standard arm/arm/sys_machdep.c standard -arm/arm/trap.c standard +arm/arm/syscall.c standard +arm/arm/trap.c optional !armv6 +arm/arm/trap-v6.c optional armv6 arm/arm/uio_machdep.c standard arm/arm/undefined.c standard arm/arm/vm_machdep.c standard From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 04:50:40 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5E10F17C; Fri, 13 Feb 2015 04:50:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49B791C3; Fri, 13 Feb 2015 04:50:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D4oebB027442; Fri, 13 Feb 2015 04:50:40 GMT (envelope-from rpaulo@FreeBSD.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D4oel8027441; Fri, 13 Feb 2015 04:50:40 GMT (envelope-from rpaulo@FreeBSD.org) Message-Id: <201502130450.t1D4oel8027441@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rpaulo set sender to rpaulo@FreeBSD.org using -f From: Rui Paulo Date: Fri, 13 Feb 2015 04:50:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278659 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 04:50:40 -0000 Author: rpaulo Date: Fri Feb 13 04:50:39 2015 New Revision: 278659 URL: https://svnweb.freebsd.org/changeset/base/278659 Log: MFC r278302: Don't add static IPv6 routes when to all FIBs when net.add_addr_allfibs is 0. Modified: stable/10/etc/rc.d/routing Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/routing ============================================================================== --- stable/10/etc/rc.d/routing Fri Feb 13 03:18:29 2015 (r278658) +++ stable/10/etc/rc.d/routing Fri Feb 13 04:50:39 2015 (r278659) @@ -170,13 +170,14 @@ static_inet() static_inet6() { - local _action _if _skip fibmod fibs + local _action _if _skip fibmod fibs allfibs _action=$1 _if=$2 # get the number of FIBs supported. fibs=$((`${SYSCTL_N} net.fibs` - 1)) - if [ "$fibs" -gt 0 ]; then + allfibs=`${SYSCTL_N} net.add_addr_allfibs` + if [ "$fibs" -gt 0 ] && [ "$allfibs" -ne 0 ]; then fibmod="-fib 0-$fibs" else fibmod= From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 07:46:03 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6D38579; Fri, 13 Feb 2015 07:46: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 9133F814; Fri, 13 Feb 2015 07:46: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 t1D7k3ub008759; Fri, 13 Feb 2015 07:46:03 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7k3X0008758; Fri, 13 Feb 2015 07:46:03 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130746.t1D7k3X0008758@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:46:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278660 - stable/8/sys/dev/usb/controller X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:46:03 -0000 Author: hselasky Date: Fri Feb 13 07:46:02 2015 New Revision: 278660 URL: https://svnweb.freebsd.org/changeset/base/278660 Log: MFC r278477: Fix DMA address casts. Modified: stable/8/sys/dev/usb/controller/xhci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/8/sys/dev/usb/controller/xhci.c Fri Feb 13 04:50:39 2015 (r278659) +++ stable/8/sys/dev/usb/controller/xhci.c Fri Feb 13 07:46:02 2015 (r278660) @@ -508,7 +508,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); - addr = (uint64_t)buf_res.physaddr; + addr = buf_res.physaddr; DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); @@ -1088,7 +1088,7 @@ xhci_interrupt_poll(struct xhci_softc *s * register. */ - addr = (uint32_t)buf_res.physaddr; + addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_events[i]; /* try to clear busy bit */ From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 07:47:18 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8A38F82B; Fri, 13 Feb 2015 07:47:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74B6E835; Fri, 13 Feb 2015 07:47: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 t1D7lIBa009107; Fri, 13 Feb 2015 07:47:18 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7lI0r009106; Fri, 13 Feb 2015 07:47:18 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130747.t1D7lI0r009106@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:47:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278661 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:47:18 -0000 Author: hselasky Date: Fri Feb 13 07:47:17 2015 New Revision: 278661 URL: https://svnweb.freebsd.org/changeset/base/278661 Log: MFC r278477: Fix DMA address casts. Modified: stable/9/sys/dev/usb/controller/xhci.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/9/sys/dev/usb/controller/xhci.c Fri Feb 13 07:46:02 2015 (r278660) +++ stable/9/sys/dev/usb/controller/xhci.c Fri Feb 13 07:47:17 2015 (r278661) @@ -485,7 +485,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); - addr = (uint64_t)buf_res.physaddr; + addr = buf_res.physaddr; DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); @@ -1098,7 +1098,7 @@ xhci_interrupt_poll(struct xhci_softc *s * register. */ - addr = (uint32_t)buf_res.physaddr; + addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_events[i]; /* try to clear busy bit */ From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 07:48:55 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48D6F97A; Fri, 13 Feb 2015 07: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 3340C84A; Fri, 13 Feb 2015 07:48:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1D7mtK4009377; Fri, 13 Feb 2015 07:48:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7mtDN009376; Fri, 13 Feb 2015 07:48:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130748.t1D7mtDN009376@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278662 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:48:55 -0000 Author: hselasky Date: Fri Feb 13 07:48:54 2015 New Revision: 278662 URL: https://svnweb.freebsd.org/changeset/base/278662 Log: MFC r278477: Fix DMA address casts. Modified: stable/10/sys/dev/usb/controller/xhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/xhci.c ============================================================================== --- stable/10/sys/dev/usb/controller/xhci.c Fri Feb 13 07:47:17 2015 (r278661) +++ stable/10/sys/dev/usb/controller/xhci.c Fri Feb 13 07:48:54 2015 (r278662) @@ -496,7 +496,7 @@ xhci_start_controller(struct xhci_softc XWRITE4(sc, runt, XHCI_ERDP_LO(0), (uint32_t)addr); XWRITE4(sc, runt, XHCI_ERDP_HI(0), (uint32_t)(addr >> 32)); - addr = (uint64_t)buf_res.physaddr; + addr = buf_res.physaddr; DPRINTF("ERSTBA(0)=0x%016llx\n", (unsigned long long)addr); @@ -1118,7 +1118,7 @@ xhci_interrupt_poll(struct xhci_softc *s * register. */ - addr = (uint32_t)buf_res.physaddr; + addr = buf_res.physaddr; addr += (uintptr_t)&((struct xhci_hw_root *)0)->hwr_events[i]; /* try to clear busy bit */ From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 07:51:16 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C627B79; Fri, 13 Feb 2015 07:51: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 2D51286D; Fri, 13 Feb 2015 07:51: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 t1D7pGfe012738; Fri, 13 Feb 2015 07:51:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7pG0i012737; Fri, 13 Feb 2015 07:51:16 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130751.t1D7pG0i012737@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278663 - stable/10/sys/dev/sound/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:51:16 -0000 Author: hselasky Date: Fri Feb 13 07:51:15 2015 New Revision: 278663 URL: https://svnweb.freebsd.org/changeset/base/278663 Log: MFC r278503: Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. Modified: stable/10/sys/dev/sound/usb/uaudio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/10/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:48:54 2015 (r278662) +++ stable/10/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:51:15 2015 (r278663) @@ -117,6 +117,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def &uaudio_default_channels, 0, "uaudio default sample channels"); #endif +#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */ #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ @@ -195,7 +196,6 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; - uint8_t enable_sync; }; struct uaudio_chan { @@ -232,11 +232,12 @@ struct uaudio_chan { #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - uint8_t last_sync_time; - uint8_t last_sync_state; -#define UAUDIO_SYNC_NONE 0 -#define UAUDIO_SYNC_MORE 1 -#define UAUDIO_SYNC_LESS 2 + /* USB audio feedback endpoint state */ + struct { + uint16_t time; /* I/O interrupt count */ + int16_t constant; /* sample rate adjustment in Hz */ + int16_t remainder; /* current remainder */ + } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1805,14 +1806,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { - DPRINTF("Sync endpoint will be used, if present\n"); - chan_alt->enable_sync = 1; - } else { - DPRINTF("Sync endpoint will not be used\n"); - chan_alt->enable_sync = 0; - } - usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2022,29 +2015,44 @@ uaudio_chan_play_sync_callback(struct us if (temp == 0) break; - /* correctly scale value */ - - temp = (temp * 125ULL) - 64; + temp *= 125ULL; /* auto adjust */ - while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; - + while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* compare */ + /* + * Some USB audio devices only report a sample rate + * different from the nominal one when they want one + * more or less sample. Make sure we catch this case + * by pulling the sample rate offset slowly towards + * zero if the reported value is equal to the sample + * rate. + */ + if (temp > sample_rate) + ch->feedback.constant += 1; + else if (temp < sample_rate) + ch->feedback.constant -= 1; + else if (ch->feedback.constant > 0) + ch->feedback.constant--; + else if (ch->feedback.constant < 0) + ch->feedback.constant++; - DPRINTF("Comparing %d < %d\n", - (int)temp, (int)sample_rate); + DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", + (int)temp, (int)sample_rate, (int)ch->feedback.constant); - if (temp == sample_rate) - ch->last_sync_state = UAUDIO_SYNC_NONE; - else if (temp > sample_rate) - ch->last_sync_state = UAUDIO_SYNC_MORE; - else - ch->last_sync_state = UAUDIO_SYNC_LESS; + /* + * Range check sync constant. We cannot change the + * number of samples per second by more than the value + * defined by "UAUDIO_IRQS": + */ + if (ch->feedback.constant > UAUDIO_IRQS) + ch->feedback.constant = UAUDIO_IRQS; + else if (ch->feedback.constant < -UAUDIO_IRQS) + ch->feedback.constant = -UAUDIO_IRQS; break; case USB_ST_SETUP: @@ -2088,10 +2096,10 @@ tr_transferred: } chn_intr(ch->pcm_ch); - /* start SYNC transfer, if any */ - if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + /* start the SYNC transfer one time per second, if any */ + if (++(ch->feedback.time) >= UAUDIO_IRQS) { + ch->feedback.time = 0; + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } case USB_ST_SETUP: @@ -2126,21 +2134,22 @@ tr_transferred: } if (n == (blockcount - 1)) { - switch (ch->last_sync_state) { - case UAUDIO_SYNC_MORE: + /* + * Update sync remainder and check if + * we should transmit more or less + * data: + */ + ch->feedback.remainder += ch->feedback.constant; + if (ch->feedback.remainder >= UAUDIO_IRQS) { + ch->feedback.remainder -= UAUDIO_IRQS; DPRINTFN(6, "sending one sample more\n"); if ((frame_len + sample_size) <= mfl) frame_len += sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - case UAUDIO_SYNC_LESS: + } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { + ch->feedback.remainder += UAUDIO_IRQS; DPRINTFN(6, "sending one sample less\n"); if (frame_len >= sample_size) frame_len -= sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - default: - break; } } @@ -2458,6 +2467,9 @@ uaudio_chan_start(struct uaudio_chan *ch } usb_proc_explore_unlock(sc->sc_udev); + /* reset feedback endpoint state */ + memset(&ch->feedback, 0, sizeof(ch->feedback)); + if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 07:52:13 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1707EDF0; Fri, 13 Feb 2015 07:52: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 EC2FE913; Fri, 13 Feb 2015 07:52: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 t1D7qC0a013429; Fri, 13 Feb 2015 07:52:12 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7qCfm013428; Fri, 13 Feb 2015 07:52:12 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130752.t1D7qCfm013428@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:52:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278665 - stable/9/sys/dev/sound/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:52:13 -0000 Author: hselasky Date: Fri Feb 13 07:52:12 2015 New Revision: 278665 URL: https://svnweb.freebsd.org/changeset/base/278665 Log: MFC r278503: Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. Modified: stable/9/sys/dev/sound/usb/uaudio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/9/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:51:26 2015 (r278664) +++ stable/9/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:52:12 2015 (r278665) @@ -117,6 +117,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def &uaudio_default_channels, 0, "uaudio default sample channels"); #endif +#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */ #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ @@ -195,7 +196,6 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; - uint8_t enable_sync; }; struct uaudio_chan { @@ -232,11 +232,12 @@ struct uaudio_chan { #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - uint8_t last_sync_time; - uint8_t last_sync_state; -#define UAUDIO_SYNC_NONE 0 -#define UAUDIO_SYNC_MORE 1 -#define UAUDIO_SYNC_LESS 2 + /* USB audio feedback endpoint state */ + struct { + uint16_t time; /* I/O interrupt count */ + int16_t constant; /* sample rate adjustment in Hz */ + int16_t remainder; /* current remainder */ + } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1805,14 +1806,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { - DPRINTF("Sync endpoint will be used, if present\n"); - chan_alt->enable_sync = 1; - } else { - DPRINTF("Sync endpoint will not be used\n"); - chan_alt->enable_sync = 0; - } - usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2022,29 +2015,44 @@ uaudio_chan_play_sync_callback(struct us if (temp == 0) break; - /* correctly scale value */ - - temp = (temp * 125ULL) - 64; + temp *= 125ULL; /* auto adjust */ - while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; - + while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* compare */ + /* + * Some USB audio devices only report a sample rate + * different from the nominal one when they want one + * more or less sample. Make sure we catch this case + * by pulling the sample rate offset slowly towards + * zero if the reported value is equal to the sample + * rate. + */ + if (temp > sample_rate) + ch->feedback.constant += 1; + else if (temp < sample_rate) + ch->feedback.constant -= 1; + else if (ch->feedback.constant > 0) + ch->feedback.constant--; + else if (ch->feedback.constant < 0) + ch->feedback.constant++; - DPRINTF("Comparing %d < %d\n", - (int)temp, (int)sample_rate); + DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", + (int)temp, (int)sample_rate, (int)ch->feedback.constant); - if (temp == sample_rate) - ch->last_sync_state = UAUDIO_SYNC_NONE; - else if (temp > sample_rate) - ch->last_sync_state = UAUDIO_SYNC_MORE; - else - ch->last_sync_state = UAUDIO_SYNC_LESS; + /* + * Range check sync constant. We cannot change the + * number of samples per second by more than the value + * defined by "UAUDIO_IRQS": + */ + if (ch->feedback.constant > UAUDIO_IRQS) + ch->feedback.constant = UAUDIO_IRQS; + else if (ch->feedback.constant < -UAUDIO_IRQS) + ch->feedback.constant = -UAUDIO_IRQS; break; case USB_ST_SETUP: @@ -2088,10 +2096,10 @@ tr_transferred: } chn_intr(ch->pcm_ch); - /* start SYNC transfer, if any */ - if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + /* start the SYNC transfer one time per second, if any */ + if (++(ch->feedback.time) >= UAUDIO_IRQS) { + ch->feedback.time = 0; + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } case USB_ST_SETUP: @@ -2126,21 +2134,22 @@ tr_transferred: } if (n == (blockcount - 1)) { - switch (ch->last_sync_state) { - case UAUDIO_SYNC_MORE: + /* + * Update sync remainder and check if + * we should transmit more or less + * data: + */ + ch->feedback.remainder += ch->feedback.constant; + if (ch->feedback.remainder >= UAUDIO_IRQS) { + ch->feedback.remainder -= UAUDIO_IRQS; DPRINTFN(6, "sending one sample more\n"); if ((frame_len + sample_size) <= mfl) frame_len += sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - case UAUDIO_SYNC_LESS: + } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { + ch->feedback.remainder += UAUDIO_IRQS; DPRINTFN(6, "sending one sample less\n"); if (frame_len >= sample_size) frame_len -= sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - default: - break; } } @@ -2458,6 +2467,9 @@ uaudio_chan_start(struct uaudio_chan *ch } usb_proc_explore_unlock(sc->sc_udev); + /* reset feedback endpoint state */ + memset(&ch->feedback, 0, sizeof(ch->feedback)); + if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 07:53:19 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EAB03F31; Fri, 13 Feb 2015 07:53: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 CB48691E; Fri, 13 Feb 2015 07:53: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 t1D7rJD8013631; Fri, 13 Feb 2015 07:53:19 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D7rJQ2013630; Fri, 13 Feb 2015 07:53:19 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201502130753.t1D7rJQ2013630@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Fri, 13 Feb 2015 07:53:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r278666 - stable/8/sys/dev/sound/usb X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 07:53:20 -0000 Author: hselasky Date: Fri Feb 13 07:53:18 2015 New Revision: 278666 URL: https://svnweb.freebsd.org/changeset/base/278666 Log: MFC r278503: Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik. Modified: stable/8/sys/dev/sound/usb/uaudio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/sound/ (props changed) stable/8/sys/dev/sound/usb/ (props changed) Modified: stable/8/sys/dev/sound/usb/uaudio.c ============================================================================== --- stable/8/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:52:12 2015 (r278665) +++ stable/8/sys/dev/sound/usb/uaudio.c Fri Feb 13 07:53:18 2015 (r278666) @@ -117,6 +117,7 @@ SYSCTL_INT(_hw_usb_uaudio, OID_AUTO, def &uaudio_default_channels, 0, "uaudio default sample channels"); #endif +#define UAUDIO_IRQS (8000 / UAUDIO_NFRAMES) /* interrupts per second */ #define UAUDIO_NFRAMES 64 /* must be factor of 8 due HS-USB */ #define UAUDIO_NCHANBUFS 2 /* number of outstanding request */ #define UAUDIO_RECURSE_LIMIT 255 /* rounds */ @@ -195,7 +196,6 @@ struct uaudio_chan_alt { uint8_t iface_index; uint8_t iface_alt_index; uint8_t channels; - uint8_t enable_sync; }; struct uaudio_chan { @@ -232,11 +232,12 @@ struct uaudio_chan { #define CHAN_OP_STOP 2 #define CHAN_OP_DRAIN 3 - uint8_t last_sync_time; - uint8_t last_sync_state; -#define UAUDIO_SYNC_NONE 0 -#define UAUDIO_SYNC_MORE 1 -#define UAUDIO_SYNC_LESS 2 + /* USB audio feedback endpoint state */ + struct { + uint16_t time; /* I/O interrupt count */ + int16_t constant; /* sample rate adjustment in Hz */ + int16_t remainder; /* current remainder */ + } feedback; }; #define UMIDI_EMB_JACK_MAX 16 /* units */ @@ -1805,14 +1806,6 @@ uaudio_chan_fill_info_sub(struct uaudio_ chan_alt->iface_index = curidx; chan_alt->iface_alt_index = alt_index; - if (UEP_HAS_SYNCADDR(ed1) && ed1->bSynchAddress != 0) { - DPRINTF("Sync endpoint will be used, if present\n"); - chan_alt->enable_sync = 1; - } else { - DPRINTF("Sync endpoint will not be used\n"); - chan_alt->enable_sync = 0; - } - usbd_set_parent_iface(sc->sc_udev, curidx, sc->sc_mixer_iface_index); @@ -2022,29 +2015,44 @@ uaudio_chan_play_sync_callback(struct us if (temp == 0) break; - /* correctly scale value */ - - temp = (temp * 125ULL) - 64; + temp *= 125ULL; /* auto adjust */ - while (temp < (sample_rate - (sample_rate / 4))) temp *= 2; - + while (temp > (sample_rate + (sample_rate / 2))) temp /= 2; - /* compare */ + /* + * Some USB audio devices only report a sample rate + * different from the nominal one when they want one + * more or less sample. Make sure we catch this case + * by pulling the sample rate offset slowly towards + * zero if the reported value is equal to the sample + * rate. + */ + if (temp > sample_rate) + ch->feedback.constant += 1; + else if (temp < sample_rate) + ch->feedback.constant -= 1; + else if (ch->feedback.constant > 0) + ch->feedback.constant--; + else if (ch->feedback.constant < 0) + ch->feedback.constant++; - DPRINTF("Comparing %d < %d\n", - (int)temp, (int)sample_rate); + DPRINTF("Comparing %d Hz :: %d Hz :: %d samples drift\n", + (int)temp, (int)sample_rate, (int)ch->feedback.constant); - if (temp == sample_rate) - ch->last_sync_state = UAUDIO_SYNC_NONE; - else if (temp > sample_rate) - ch->last_sync_state = UAUDIO_SYNC_MORE; - else - ch->last_sync_state = UAUDIO_SYNC_LESS; + /* + * Range check sync constant. We cannot change the + * number of samples per second by more than the value + * defined by "UAUDIO_IRQS": + */ + if (ch->feedback.constant > UAUDIO_IRQS) + ch->feedback.constant = UAUDIO_IRQS; + else if (ch->feedback.constant < -UAUDIO_IRQS) + ch->feedback.constant = -UAUDIO_IRQS; break; case USB_ST_SETUP: @@ -2088,10 +2096,10 @@ tr_transferred: } chn_intr(ch->pcm_ch); - /* start SYNC transfer, if any */ - if (ch->usb_alt[ch->cur_alt].enable_sync != 0) { - if ((ch->last_sync_time++ & 7) == 0) - usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); + /* start the SYNC transfer one time per second, if any */ + if (++(ch->feedback.time) >= UAUDIO_IRQS) { + ch->feedback.time = 0; + usbd_transfer_start(ch->xfer[UAUDIO_NCHANBUFS]); } case USB_ST_SETUP: @@ -2126,21 +2134,22 @@ tr_transferred: } if (n == (blockcount - 1)) { - switch (ch->last_sync_state) { - case UAUDIO_SYNC_MORE: + /* + * Update sync remainder and check if + * we should transmit more or less + * data: + */ + ch->feedback.remainder += ch->feedback.constant; + if (ch->feedback.remainder >= UAUDIO_IRQS) { + ch->feedback.remainder -= UAUDIO_IRQS; DPRINTFN(6, "sending one sample more\n"); if ((frame_len + sample_size) <= mfl) frame_len += sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - case UAUDIO_SYNC_LESS: + } else if (ch->feedback.remainder <= -UAUDIO_IRQS) { + ch->feedback.remainder += UAUDIO_IRQS; DPRINTFN(6, "sending one sample less\n"); if (frame_len >= sample_size) frame_len -= sample_size; - ch->last_sync_state = UAUDIO_SYNC_NONE; - break; - default: - break; } } @@ -2458,6 +2467,9 @@ uaudio_chan_start(struct uaudio_chan *ch } usb_proc_explore_unlock(sc->sc_udev); + /* reset feedback endpoint state */ + memset(&ch->feedback, 0, sizeof(ch->feedback)); + if (do_start) { usbd_transfer_start(ch->xfer[0]); usbd_transfer_start(ch->xfer[1]); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 08:40:11 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F1E3921; Fri, 13 Feb 2015 08:40: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 89D4EDCA; Fri, 13 Feb 2015 08:40: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 t1D8eBfx033312; Fri, 13 Feb 2015 08:40:11 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D8eBuk033308; Fri, 13 Feb 2015 08:40:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502130840.t1D8eBuk033308@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 13 Feb 2015 08:40:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278667 - stable/10/sys/ufs/ffs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 08:40:11 -0000 Author: kib Date: Fri Feb 13 08:40:10 2015 New Revision: 278667 URL: https://svnweb.freebsd.org/changeset/base/278667 Log: MFC r277922: When mounting SU-enabled mount point, wait until the softdep_flush() thread started and incremented the stat_flush_threads. MFC r278257: Partially revert r277922. Modified: stable/10/sys/ufs/ffs/ffs_softdep.c stable/10/sys/ufs/ffs/softdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/10/sys/ufs/ffs/ffs_softdep.c Fri Feb 13 07:53:18 2015 (r278666) +++ stable/10/sys/ufs/ffs/ffs_softdep.c Fri Feb 13 08:40:10 2015 (r278667) @@ -1377,6 +1377,10 @@ softdep_flush(addr) mp = (struct mount *)addr; ump = VFSTOUFS(mp); atomic_add_int(&stat_flush_threads, 1); + ACQUIRE_LOCK(ump); + ump->softdep_flags &= ~FLUSH_STARTING; + wakeup(&ump->softdep_flushtd); + FREE_LOCK(ump); if (print_threads) { if (stat_flush_threads == 1) printf("Running %s at pid %d\n", bufdaemonproc->p_comm, @@ -1389,7 +1393,7 @@ softdep_flush(addr) VFSTOUFS(mp)->softdep_jblocks->jb_suspended)) kthread_suspend_check(); ACQUIRE_LOCK(ump); - if ((ump->softdep_flags & FLUSH_CLEANUP) == 0) + if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdflush", hz / 2); ump->softdep_flags &= ~FLUSH_CLEANUP; @@ -1419,11 +1423,9 @@ worklist_speedup(mp) ump = VFSTOUFS(mp); LOCK_OWNED(ump); - if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + if ((ump->softdep_flags & (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) ump->softdep_flags |= FLUSH_CLEANUP; - if (ump->softdep_flushtd->td_wchan == &ump->softdep_flushtd) - wakeup(&ump->softdep_flushtd); - } + wakeup(&ump->softdep_flushtd); } static int @@ -1468,14 +1470,10 @@ softdep_speedup(ump) TAILQ_INSERT_TAIL(&softdepmounts, sdp, sd_next); FREE_GBLLOCK(&lk); if ((altump->softdep_flags & - (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) { + (FLUSH_CLEANUP | FLUSH_EXIT)) == 0) altump->softdep_flags |= FLUSH_CLEANUP; - altump->um_softdep->sd_cleanups++; - if (altump->softdep_flushtd->td_wchan == - &altump->softdep_flushtd) { - wakeup(&altump->softdep_flushtd); - } - } + altump->um_softdep->sd_cleanups++; + wakeup(&altump->softdep_flushtd); FREE_LOCK(altump); } } @@ -2491,9 +2489,18 @@ softdep_mount(devvp, mp, fs, cred) /* * Start our flushing thread in the bufdaemon process. */ + ACQUIRE_LOCK(ump); + ump->softdep_flags |= FLUSH_STARTING; + FREE_LOCK(ump); kproc_kthread_add(&softdep_flush, mp, &bufdaemonproc, &ump->softdep_flushtd, 0, 0, "softdepflush", "%s worker", mp->mnt_stat.f_mntonname); + ACQUIRE_LOCK(ump); + while ((ump->softdep_flags & FLUSH_STARTING) != 0) { + msleep(&ump->softdep_flushtd, LOCK_PTR(ump), PVM, "sdstart", + hz / 2); + } + FREE_LOCK(ump); /* * When doing soft updates, the counters in the * superblock may have gotten out of sync. Recomputation Modified: stable/10/sys/ufs/ffs/softdep.h ============================================================================== --- stable/10/sys/ufs/ffs/softdep.h Fri Feb 13 07:53:18 2015 (r278666) +++ stable/10/sys/ufs/ffs/softdep.h Fri Feb 13 08:40:10 2015 (r278667) @@ -1063,6 +1063,8 @@ struct mount_softdeps { */ #define FLUSH_EXIT 0x0001 /* time to exit */ #define FLUSH_CLEANUP 0x0002 /* need to clear out softdep structures */ +#define FLUSH_STARTING 0x0004 /* flush thread not yet started */ + /* * Keep the old names from when these were in the ufsmount structure. */ From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 08:42:02 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5438A88; Fri, 13 Feb 2015 08:42: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 C000CDEE; Fri, 13 Feb 2015 08:42: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 t1D8g22X036992; Fri, 13 Feb 2015 08:42:02 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1D8g2ph036991; Fri, 13 Feb 2015 08:42:02 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502130842.t1D8g2ph036991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Fri, 13 Feb 2015 08:42:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278668 - stable/10/lib/libthr/thread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 08:42:03 -0000 Author: kib Date: Fri Feb 13 08:42:01 2015 New Revision: 278668 URL: https://svnweb.freebsd.org/changeset/base/278668 Log: MFC r278313: Fully initialize allocated memory for the new barrier. Modified: stable/10/lib/libthr/thread/thr_barrier.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_barrier.c ============================================================================== --- stable/10/lib/libthr/thread/thr_barrier.c Fri Feb 13 08:40:10 2015 (r278667) +++ stable/10/lib/libthr/thread/thr_barrier.c Fri Feb 13 08:42:01 2015 (r278668) @@ -86,16 +86,13 @@ _pthread_barrier_init(pthread_barrier_t if (barrier == NULL || count <= 0) return (EINVAL); - bar = malloc(sizeof(struct pthread_barrier)); + bar = calloc(1, sizeof(struct pthread_barrier)); if (bar == NULL) return (ENOMEM); _thr_umutex_init(&bar->b_lock); _thr_ucond_init(&bar->b_cv); - bar->b_cycle = 0; - bar->b_waiters = 0; bar->b_count = count; - bar->b_refcount = 0; *barrier = bar; return (0); From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 09:17:52 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EF89829D; Fri, 13 Feb 2015 09:17:51 +0000 (UTC) Received: from mail.sysgo.com (mail.sysgo.com [176.9.53.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B15D7107; Fri, 13 Feb 2015 09:17:51 +0000 (UTC) Date: Fri, 13 Feb 2015 10:11:45 +0100 From: Thomas Mueller To: Sean Bruno Subject: Re: svn commit: r278650 - in stable/10: sys/kern tools/sched usr.bin/man Message-ID: <20150213101145.0f26b06f@tmu.ulm.sysgo.com> In-Reply-To: <201502130029.t1D0TwbR002255@svn.freebsd.org> References: <201502130029.t1D0TwbR002255@svn.freebsd.org> Organization: SYSGO AG X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd10.1) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-10@freebsd.org X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 09:17:52 -0000 On Fri, 13 Feb 2015 00:29:58 +0000 (UTC), Sean Bruno wrote: > Author: sbruno > Date: Fri Feb 13 00:29:57 2015 > New Revision: 278650 > URL: https://svnweb.freebsd.org/changeset/base/278650 > > Log: > MFC 272315 272757 274091 274902 > > r272315 > Explicitly return None for negative event indices. Prior to this, > eventat(-1) would return the next-to-last event causing the back button > to cycle back to the end of an event source instead of stopping at the > start. > > r272757 > Add schedgraph traces for callout handlers. Specifically, a callwheel logs > a running event each time it executes a callout function. The event > includes the function pointer, argument, and whether or not it was run from > hardware interrupt context. The callwheel is marked idle when each handler > completes. This effectively logs the duration of each callout routine in > the graph. > > r274091 > Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close > dialogs. > > r274902 > Add a new thread state "spinning" to schedgraph and add tracepoints at the > start and stop of spinning waits in lock primitives. > > Reviewed by: jhb > > Modified: > stable/10/sys/kern/kern_lock.c > stable/10/sys/kern/kern_mutex.c > stable/10/sys/kern/kern_rwlock.c > stable/10/sys/kern/kern_sx.c > stable/10/sys/kern/kern_timeout.c > stable/10/tools/sched/schedgraph.py > stable/10/usr.bin/man/man.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~ > [...] That change to man.sh does not seem to be related to any of the mentioned MFCs. tmu:~$ man ls eval: preconv: not found This manpage needs groff(1) to be rendered First install groff(1): pkg install groff tmu:~$ echo $LANG en_US.ISO8859-1 tmu:~$ LANG= man ls *** works as expected -- Thomas Mueller From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 15:16:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 200D1814; Fri, 13 Feb 2015 15:16: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 0AD9DD15; Fri, 13 Feb 2015 15:16: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 t1DFGuUo024555; Fri, 13 Feb 2015 15:16:56 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFGubn024554; Fri, 13 Feb 2015 15:16:56 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131516.t1DFGubn024554@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:16:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278675 - stable/10/sys/boot/arm/uboot X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:16:57 -0000 Author: ian Date: Fri Feb 13 15:16:55 2015 New Revision: 278675 URL: https://svnweb.freebsd.org/changeset/base/278675 Log: MFC r276632: Create a custom /boot/defaults/loader.conf for ARM. Added: stable/10/sys/boot/arm/uboot/loader.conf - copied unchanged from r276632, head/sys/boot/arm/uboot/loader.conf Modified: Directory Properties: stable/10/ (props changed) Copied: stable/10/sys/boot/arm/uboot/loader.conf (from r276632, head/sys/boot/arm/uboot/loader.conf) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/boot/arm/uboot/loader.conf Fri Feb 13 15:16:55 2015 (r278675, copy of r276632, head/sys/boot/arm/uboot/loader.conf) @@ -0,0 +1,13 @@ +# This is defaults/loader.conf for ARM, containing defaults for loader(8). +# Do not modify the contents of this file, instead put your customizations +# into /boot/loader.conf or /boot/loader.conf.local +# $FreeBSD$ + +autoboot_delay=10 +bootfile="kernel" # Kernel name (possibly absolute path) +kernel="kernel" # /boot sub-directory containing kernel and modules +loader_conf_files="/boot/loader.conf /boot/loader.conf.local" +module_path="/boot/kernel;/boot/modules;/boot/dtb" +nextboot_conf="/boot/nextboot.conf" +nextboot_enable="NO" +verbose_loading="NO" From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 15:27:53 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B74CBDE; Fri, 13 Feb 2015 15:27: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 16AEBE01; Fri, 13 Feb 2015 15:27: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 t1DFRrqS029672; Fri, 13 Feb 2015 15:27:53 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFRlVs029644; Fri, 13 Feb 2015 15:27:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131527.t1DFRlVs029644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:27:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278676 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:27:53 -0000 Author: ian Date: Fri Feb 13 15:27:46 2015 New Revision: 278676 URL: https://svnweb.freebsd.org/changeset/base/278676 Log: MFC r266647, r270912, r273089: Reduce the diff between the PandaBoard and BeableBone kernel configs Resync comments about scbus and pass for life after AHCI joined CAM. Uncomment general options from the Pandaboard config. These are in other configs and there is no reason for them not to be here. Modified: stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/CNS11XXNAS stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/EB9200 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/HL200 stable/10/sys/arm/conf/HL201 stable/10/sys/arm/conf/IMX53-QSB stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/KB920X stable/10/sys/arm/conf/NSLU stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/QILA9G20 stable/10/sys/arm/conf/SAM9G20EK stable/10/sys/arm/conf/SAM9X25EK stable/10/sys/arm/conf/SN9G45 stable/10/sys/arm/conf/VYBRID stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 15:27:46 2015 (r278676) @@ -53,7 +53,7 @@ options PREEMPTION options FREEBSD_BOOT_LOADER options VFP # vfp/neon -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages @@ -78,12 +78,17 @@ options NFSLOCKD #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 - -# MMC/SD/SDIO card slot support +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device sdhci # mmc/sd host controller +# I2C support +device iicbus +device iic +device ti_i2c +device am335x_pmic # AM335x Power Management IC (TPC65217) + # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:mmcsd0s2\" @@ -97,12 +102,6 @@ device snp device md device random # Entropy device -# I2C support -device iicbus -device iic -device ti_i2c -device am335x_pmic # AM335x Power Management IC (TPC65217) - # GPIO device gpio device gpioled @@ -124,13 +123,13 @@ device ti_mbox # USB support device usb -options USB_HOST_ALIGN=64 # Cacheline size is 64 on AM335x. +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE device musb device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) # Ethernet @@ -141,7 +140,7 @@ device smscphy device cpsw device bpf -# USB ethernet support, requires miibus +# USB Ethernet support, requires miibus device miibus device axe # ASIX Electronics USB Ethernet Modified: stable/10/sys/arm/conf/CNS11XXNAS ============================================================================== --- stable/10/sys/arm/conf/CNS11XXNAS Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/CNS11XXNAS Fri Feb 13 15:27:46 2015 (r278676) @@ -111,7 +111,7 @@ device usb device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass device cfi Modified: stable/10/sys/arm/conf/CUBIEBOARD ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 15:27:46 2015 (r278676) @@ -104,7 +104,7 @@ device random # Entropy device # GPIO device gpio -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:27:46 2015 (r278676) @@ -104,7 +104,7 @@ device random # Entropy device # GPIO device gpio -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 15:27:46 2015 (r278676) @@ -128,10 +128,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: stable/10/sys/arm/conf/EB9200 ============================================================================== --- stable/10/sys/arm/conf/EB9200 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/EB9200 Fri Feb 13 15:27:46 2015 (r278676) @@ -102,10 +102,10 @@ device ohci # OHCI localbus->USB inte device usb # USB Bus (required) device umass # Disks/Mass storage - Requires scbus and da # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB device (gadget) support #device at91_dci # Atmel's usb device Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 15:27:46 2015 (r278676) @@ -124,10 +124,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: stable/10/sys/arm/conf/EXYNOS5.common ============================================================================== --- stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:27:46 2015 (r278676) @@ -103,7 +103,7 @@ device ehci #device ohci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/HL200 ============================================================================== --- stable/10/sys/arm/conf/HL200 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/HL200 Fri Feb 13 15:27:46 2015 (r278676) @@ -132,10 +132,10 @@ device uath # Atheros AR5523 wireless device ural # Ralink Technology RT2500USB wireless NICs device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards device wlan # 802.11 support device wlan_wep # 802.11 WEP support Modified: stable/10/sys/arm/conf/HL201 ============================================================================== --- stable/10/sys/arm/conf/HL201 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/HL201 Fri Feb 13 15:27:46 2015 (r278676) @@ -112,10 +112,10 @@ device udav # Davicom DM9601E USB #device ural # Ralink Technology RT2500USB wireless NICs #device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards #device wlan # 802.11 support #device wlan_wep # 802.11 WEP support Modified: stable/10/sys/arm/conf/IMX53-QSB ============================================================================== --- stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 15:27:46 2015 (r278676) @@ -127,10 +127,10 @@ device iic device iicbus # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/IMX6 Fri Feb 13 15:27:46 2015 (r278676) @@ -93,10 +93,10 @@ device mmc # SD/MMC protocol device mmcsd # SDCard disk device # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support #options USB_DEBUG # enable debug msgs Modified: stable/10/sys/arm/conf/KB920X ============================================================================== --- stable/10/sys/arm/conf/KB920X Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/KB920X Fri Feb 13 15:27:46 2015 (r278676) @@ -132,10 +132,10 @@ device uath # Atheros AR5523 wireless device ural # Ralink Technology RT2500USB wireless NICs device zyd # ZyDAS zd1211/zd1211b wireless NICs # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # Wireless NIC cards device wlan # 802.11 support device wlan_wep # 802.11 WEP support Modified: stable/10/sys/arm/conf/NSLU ============================================================================== --- stable/10/sys/arm/conf/NSLU Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/NSLU Fri Feb 13 15:27:46 2015 (r278676) @@ -115,5 +115,5 @@ options USB_DEBUG device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:27:46 2015 (r278676) @@ -12,54 +12,40 @@ # 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 +# 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$ ident PANDABOARD - - # This probably wants to move somewhere else. Maybe we can create a basic # OMAP4340 config, then make a PANDABOARD config that includes the basic one, # adds the start addresses and custom devices plus pulls in this hints file. -hints "PANDABOARD.hints" +hints "PANDABOARD.hints" -include "../ti/omap4/pandaboard/std.pandaboard" +include "../ti/omap4/pandaboard/std.pandaboard" #To statically compile in device wiring instead of /boot/device.hints makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options HZ=100 - options SCHED_4BSD # 4BSD scheduler options INET # InterNETworking -#options INET6 # IPv6 communications protocols +options INET6 # IPv6 communications protocols 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 -device snp -options BREAK_TO_DEBUGGER - -options NFSCL -options NFS_ROOT # NFS usable as /, requires NFSCLIENT -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem -#options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI @@ -69,9 +55,33 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options PREEMPTION options FREEBSD_BOOT_LOADER +options VFP # vfp/neon +options SMP # Enable multiple cores -options PREEMPTION +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB +options DDB # Enable the kernel debugger +#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 DIAGNOSTIC + +# NFS support +options NFSCL + +# NFS root +options NFS_ROOT # NFS usable as /, requires NFSCLIENT +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus @@ -83,56 +93,50 @@ device iicbus device iic device ti_i2c -device loop -device ether -device mii -device smc -device smcphy +# Console and misc device uart device uart_ns8250 - -device gpio - device pty - +device snp +device md +device random # Entropy device device pl310 # PL310 L2 cache controller -# Debugging for use in -current -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB -options DDB # Enable the kernel debugger -#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 DIAGNOSTIC -device md +# GPIO +device gpio # The following enables MFS as root, this seems similar to an initramfs or initrd # as used in Linux. #options MD_ROOT #options MD_ROOT_SIZE=7560 -device random # Entropy device + # USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. device usb +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE device ohci device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) +# Ethernet +device loop +device ether +device mii +device smc +device smcphy +device bpf # USB Ethernet support, requires miibus device miibus #device axe # ASIX Electronics USB Ethernet device smsc # SMSC LAN95xx USB Ethernet -device bpf + # OMAP-specific devices device ti_sdma @@ -144,6 +148,3 @@ device twl_clks options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=pandaboard.dts - -options VFP # vfp/neon -options SMP # Enable multiple cores Modified: stable/10/sys/arm/conf/QILA9G20 ============================================================================== --- stable/10/sys/arm/conf/QILA9G20 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/QILA9G20 Fri Feb 13 15:27:46 2015 (r278676) @@ -117,10 +117,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/SAM9G20EK ============================================================================== --- stable/10/sys/arm/conf/SAM9G20EK Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/SAM9G20EK Fri Feb 13 15:27:46 2015 (r278676) @@ -119,10 +119,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/SAM9X25EK ============================================================================== --- stable/10/sys/arm/conf/SAM9X25EK Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/SAM9X25EK Fri Feb 13 15:27:46 2015 (r278676) @@ -118,10 +118,10 @@ device iicbus device icee # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support #device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/SN9G45 ============================================================================== --- stable/10/sys/arm/conf/SN9G45 Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/SN9G45 Fri Feb 13 15:27:46 2015 (r278676) @@ -95,10 +95,10 @@ option AT91_ATE_USE_RMII device at91_wdt # WDT: Watchdog timer # SCSI peripherals -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device cd # CD -device pass # Passthrough device (direct SCSI access) +device pass # Passthrough device (direct ATA/SCSI access) # USB support device ohci # OHCI localbus->USB interface Modified: stable/10/sys/arm/conf/VYBRID ============================================================================== --- stable/10/sys/arm/conf/VYBRID Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/VYBRID Fri Feb 13 15:27:46 2015 (r278676) @@ -112,7 +112,7 @@ device ehci #device ohci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device pass Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:16:55 2015 (r278675) +++ stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:27:46 2015 (r278676) @@ -92,7 +92,7 @@ options USB_DEBUG #options USB_VERBOSE device ehci device umass -device scbus # SCSI bus (required for SCSI) +device scbus # SCSI bus (required for ATA/SCSI) device da # Direct Access (disks) device axe # USB-Ethernet From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 15:32:34 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A74AD52; Fri, 13 Feb 2015 15:32: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 7B81FEB8; Fri, 13 Feb 2015 15:32: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 t1DFWYmd033823; Fri, 13 Feb 2015 15:32:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFWWp4033815; Fri, 13 Feb 2015 15:32:32 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131532.t1DFWWp4033815@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278677 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:32:34 -0000 Author: ian Date: Fri Feb 13 15:32:31 2015 New Revision: 278677 URL: https://svnweb.freebsd.org/changeset/base/278677 Log: MFC r276642, r276644: Remove commented-out options SMP and APIC_IO from old arm boards that will never be able to support smp. Switch all arm kernels with option SMP to use SCHED_ULE instead of 4BSD. Modified: stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/CRB stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/EP80219 stable/10/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/IQ31244 stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 15:32:31 2015 (r278677) @@ -14,7 +14,7 @@ makeoptions DEBUG=-g # Build kernel wit makeoptions WERROR="-Werror" #options SCHED_ULE # ULE scheduler -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem Modified: stable/10/sys/arm/conf/CRB ============================================================================== --- stable/10/sys/arm/conf/CRB Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/CRB Fri Feb 13 15:32:31 2015 (r278677) @@ -101,9 +101,6 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# To make an SMP kernel, the next two are needed -#options SMP # Symmetric MultiProcessor Kernel -#options APIC_IO # Symmetric (APIC) I/O options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 15:32:31 2015 (r278677) @@ -26,7 +26,7 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" options HZ=100 -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme Modified: stable/10/sys/arm/conf/EP80219 ============================================================================== --- stable/10/sys/arm/conf/EP80219 Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/EP80219 Fri Feb 13 15:32:31 2015 (r278677) @@ -97,9 +97,6 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# To make an SMP kernel, the next two are needed -#options SMP # Symmetric MultiProcessor Kernel -#options APIC_IO # Symmetric (APIC) I/O options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: stable/10/sys/arm/conf/EXYNOS5.common ============================================================================== --- stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 15:32:31 2015 (r278677) @@ -24,7 +24,7 @@ makeoptions DEBUG=-g # Build kernel wit makeoptions WERROR="-Werror" options HZ=100 -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options GEOM_PART_BSD # BSD partition scheme Modified: stable/10/sys/arm/conf/IQ31244 ============================================================================== --- stable/10/sys/arm/conf/IQ31244 Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/IQ31244 Fri Feb 13 15:32:31 2015 (r278677) @@ -102,9 +102,6 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# To make an SMP kernel, the next two are needed -#options SMP # Symmetric MultiProcessor Kernel -#options APIC_IO # Symmetric (APIC) I/O options XSCALE_CACHE_READ_WRITE_ALLOCATE device md device random # Entropy device Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 15:32:31 2015 (r278677) @@ -33,7 +33,7 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" options HZ=100 -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem Modified: stable/10/sys/arm/conf/ZEDBOARD ============================================================================== --- stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:27:46 2015 (r278676) +++ stable/10/sys/arm/conf/ZEDBOARD Fri Feb 13 15:32:31 2015 (r278677) @@ -25,7 +25,7 @@ include "../xilinx/zedboard/std.zedboard makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -options SCHED_4BSD # 4BSD scheduler +options SCHED_ULE # ULE scheduler options INET # InterNETworking options INET6 # IPv6 communications protocols options FFS # Berkeley Fast Filesystem From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 15:41:29 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65EDD2DF; Fri, 13 Feb 2015 15: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 51571F9F; Fri, 13 Feb 2015 15: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 t1DFfTdt038530; Fri, 13 Feb 2015 15:41:29 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DFfTZ3038529; Fri, 13 Feb 2015 15:41:29 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131541.t1DFfTZ3038529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 15:41:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278678 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 15:41:29 -0000 Author: ian Date: Fri Feb 13 15:41:28 2015 New Revision: 278678 URL: https://svnweb.freebsd.org/changeset/base/278678 Log: MFC r276645: Don't allow clang to use fpu instructions or registers in kernel modules. Modified: stable/10/sys/conf/kmod.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kmod.mk ============================================================================== --- stable/10/sys/conf/kmod.mk Fri Feb 13 15:32:31 2015 (r278677) +++ stable/10/sys/conf/kmod.mk Fri Feb 13 15:41:28 2015 (r278678) @@ -126,8 +126,10 @@ CFLAGS+= -fno-omit-frame-pointer -mno-om .endif # Temporary workaround for PR 196407, which contains the fascinating details. +# Don't allow clang to use fpu instructions or registers in kernel modules. .if ${MACHINE_CPUARCH} == arm CFLAGS.clang+= -mllvm -arm-use-movt=0 +CFLAGS.clang+= -mfpu=none .endif .if ${MACHINE_CPUARCH} == powerpc From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 16:08:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 05414BD8; Fri, 13 Feb 2015 16:08: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 E4BAB287; Fri, 13 Feb 2015 16:08: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 t1DG8k0L049212; Fri, 13 Feb 2015 16:08:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DG8kDU049210; Fri, 13 Feb 2015 16:08:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131608.t1DG8kDU049210@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 16:08:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278679 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 16:08:47 -0000 Author: ian Date: Fri Feb 13 16:08:45 2015 New Revision: 278679 URL: https://svnweb.freebsd.org/changeset/base/278679 Log: MFC r276666: Eliminate uninitialized variable warnings in kernel and module builds when building with gcc 4.2 Modified: stable/10/sys/conf/kern.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kern.mk ============================================================================== --- stable/10/sys/conf/kern.mk Fri Feb 13 15:41:28 2015 (r278678) +++ stable/10/sys/conf/kern.mk Fri Feb 13 16:08:45 2015 (r278679) @@ -33,6 +33,11 @@ CWARNEXTRA?= -Wno-error-tautological-com ${NO_WFORMAT} .endif +.if ${COMPILER_TYPE} == "gcc" +# For gcc 4.2, eliminate the too-often-wrong warnings about uninitialized vars. +CWARNEXTRA?= -Wno-uninitialized +.endif + # External compilers may not support our format extensions. Allow them # to be disabled. WARNING: format checking is disabled in this case. .if ${MK_FORMAT_EXTENSIONS} == "no" From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 16:21:37 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74E63324; Fri, 13 Feb 2015 16:21:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FB4B65B; Fri, 13 Feb 2015 16:21:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DGLbPR055552; Fri, 13 Feb 2015 16:21:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DGLavv055550; Fri, 13 Feb 2015 16:21:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131621.t1DGLavv055550@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 16:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278680 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 16:21:37 -0000 Author: ian Date: Fri Feb 13 16:21:36 2015 New Revision: 278680 URL: https://svnweb.freebsd.org/changeset/base/278680 Log: MFC r266083, r267597: Give suitably-endowed ARMs a register similar to the x86 TSC register. Modified: stable/10/sys/arm/arm/cpufunc.c stable/10/sys/arm/include/cpu.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/cpufunc.c ============================================================================== --- stable/10/sys/arm/arm/cpufunc.c Fri Feb 13 16:08:45 2015 (r278679) +++ stable/10/sys/arm/arm/cpufunc.c Fri Feb 13 16:21:36 2015 (r278680) @@ -1397,6 +1397,53 @@ arm10_setup(args) } #endif /* CPU_ARM9E || CPU_ARM10 */ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ + || defined(CPU_MV_PJ4B) \ + || defined(CPU_CORTEXA) || defined(CPU_KRAIT) +static __inline void +cpu_scc_setup_ccnt(void) +{ +/* This is how you give userland access to the CCNT and PMCn + * registers. + * BEWARE! This gives write access also, which may not be what + * you want! + */ +#ifdef _PMC_USER_READ_WRITE_ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) + /* Use the Secure User and Non-secure Access Validation Control Register + * to allow userland access + */ + __asm volatile ("mcr p15, 0, %0, c15, c9, 0\n\t" + : + : "r"(0x00000001)); +#else + /* Set PMUSERENR[0] to allow userland access */ + __asm volatile ("mcr p15, 0, %0, c9, c14, 0\n\t" + : + : "r"(0x00000001)); +#endif +#endif +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) + /* Set PMCR[2,0] to enable counters and reset CCNT */ + __asm volatile ("mcr p15, 0, %0, c15, c12, 0\n\t" + : + : "r"(0x00000005)); +#else + /* Set up the PMCCNTR register as a cyclecounter: + * Set PMINTENCLR to 0xFFFFFFFF to block interrupts + * Set PMCR[2,0] to enable counters and reset CCNT + * Set PMCNTENSET to 0x80000000 to enable CCNT */ + __asm volatile ("mcr p15, 0, %0, c9, c14, 2\n\t" + "mcr p15, 0, %1, c9, c12, 0\n\t" + "mcr p15, 0, %2, c9, c12, 1\n\t" + : + : "r"(0xFFFFFFFF), + "r"(0x00000005), + "r"(0x80000000)); +#endif +} +#endif + #if defined(CPU_ARM1136) || defined(CPU_ARM1176) struct cpu_option arm11_options[] = { { "cpu.cache", BIC, OR, (CPU_CONTROL_IC_ENABLE | CPU_CONTROL_DC_ENABLE) }, @@ -1500,6 +1547,8 @@ arm11x6_setup(char *args) /* And again. */ cpu_idcache_wbinv_all(); + + cpu_scc_setup_ccnt(); } #endif /* CPU_ARM1136 || CPU_ARM1176 */ @@ -1534,6 +1583,8 @@ pj4bv7_setup(args) /* And again. */ cpu_idcache_wbinv_all(); + + cpu_scc_setup_ccnt(); } #endif /* CPU_MV_PJ4B */ @@ -1581,6 +1632,8 @@ cortexa_setup(char *args) #ifdef SMP armv7_auxctrl((1 << 6) | (1 << 0), (1 << 6) | (1 << 0)); /* Enable SMP + TLB broadcasting */ #endif + + cpu_scc_setup_ccnt(); } #endif /* CPU_CORTEXA */ Modified: stable/10/sys/arm/include/cpu.h ============================================================================== --- stable/10/sys/arm/include/cpu.h Fri Feb 13 16:08:45 2015 (r278679) +++ stable/10/sys/arm/include/cpu.h Fri Feb 13 16:21:36 2015 (r278680) @@ -14,11 +14,35 @@ void swi_vm(void *); static __inline uint64_t get_cyclecount(void) { +/* This '#if' asks the question 'Does CP15/SCC include performance counters?' */ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ + || defined(CPU_MV_PJ4B) \ + || defined(CPU_CORTEXA) || defined(CPU_KRAIT) + uint32_t ccnt; + uint64_t ccnt64; + + /* + * Read PMCCNTR. Curses! Its only 32 bits. + * TODO: Fix this by catching overflow with interrupt? + */ +/* The ARMv6 vs ARMv7 divide is going to need a better way of + * distinguishing between them. + */ +#if defined(CPU_ARM1136) || defined(CPU_ARM1176) + /* ARMv6 - Earlier model SCCs */ + __asm __volatile("mrc p15, 0, %0, c15, c12, 1": "=r" (ccnt)); +#else + /* ARMv7 - Later model SCCs */ + __asm __volatile("mrc p15, 0, %0, c9, c13, 0": "=r" (ccnt)); +#endif + ccnt64 = (uint64_t)ccnt; + return (ccnt64); +#else /* No performance counters, so use binuptime(9). This is slooooow */ struct bintime bt; binuptime(&bt); return ((uint64_t)bt.sec << 56 | bt.frac >> 8); - +#endif } #endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 17:36:42 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24A9B434; Fri, 13 Feb 2015 17:36: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 0FDB0FAF; Fri, 13 Feb 2015 17:36: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 t1DHafIT091848; Fri, 13 Feb 2015 17:36:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DHafvh091847; Fri, 13 Feb 2015 17:36:41 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131736.t1DHafvh091847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 17:36:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278683 - in stable/10/sys/arm: conf tegra X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 17:36:42 -0000 Author: ian Date: Fri Feb 13 17:36:41 2015 New Revision: 278683 URL: https://svnweb.freebsd.org/changeset/base/278683 Log: MFC r267719: Remove the incomplete Tegra 2 code, nobody was maintaining it. The AC100 never booted to single user mode. (And now it is blocking the ability to MFC other changes since it is gone from -current and hasn't kept up with the other changes). Deleted: stable/10/sys/arm/conf/AC100 stable/10/sys/arm/tegra/ Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 17:53:13 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 144AA9C5; Fri, 13 Feb 2015 17:53: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 F2F86241; Fri, 13 Feb 2015 17:53: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 t1DHrC3x000817; Fri, 13 Feb 2015 17:53:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DHrCRf000814; Fri, 13 Feb 2015 17:53:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131753.t1DHrCRf000814@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 17:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278684 - stable/10/sys/arm/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 17:53:13 -0000 Author: ian Date: Fri Feb 13 17:53:11 2015 New Revision: 278684 URL: https://svnweb.freebsd.org/changeset/base/278684 Log: MFC r276803, r276808: Add accessors for the ARM CP15 performance monitor registers. Move the inclusion of cpu-v6.h inside the #ifdef _KERNEL block. Modified: stable/10/sys/arm/include/cpu-v6.h stable/10/sys/arm/include/cpu.h stable/10/sys/arm/include/sysreg.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/include/cpu-v6.h ============================================================================== --- stable/10/sys/arm/include/cpu-v6.h Fri Feb 13 17:36:41 2015 (r278683) +++ stable/10/sys/arm/include/cpu-v6.h Fri Feb 13 17:53:11 2015 (r278684) @@ -150,6 +150,35 @@ _RF0(cp15_id_isar4_get, CP15_ID_ISAR4(%0 _RF0(cp15_id_isar5_get, CP15_ID_ISAR5(%0)) _RF0(cp15_cbar_get, CP15_CBAR(%0)) +/* Performance Monitor registers */ + +#if __ARM_ARCH == 6 && defined(CPU_ARM1176) +_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) +_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) +#elif __ARM_ARCH > 6 +_RF0(cp15_pmcr_get, CP15_PMCR(%0)) +_WF1(cp15_pmcr_set, CP15_PMCR(%0)) +_RF0(cp15_pmcnten_get, CP15_PMCNTENSET(%0)) +_WF1(cp15_pmcnten_set, CP15_PMCNTENSET(%0)) +_WF1(cp15_pmcnten_clr, CP15_PMCNTENCLR(%0)) +_RF0(cp15_pmovsr_get, CP15_PMOVSR(%0)) +_WF1(cp15_pmovsr_set, CP15_PMOVSR(%0)) +_WF1(cp15_pmswinc_set, CP15_PMSWINC(%0)) +_RF0(cp15_pmselr_get, CP15_PMSELR(%0)) +_WF1(cp15_pmselr_set, CP15_PMSELR(%0)) +_RF0(cp15_pmccntr_get, CP15_PMCCNTR(%0)) +_WF1(cp15_pmccntr_set, CP15_PMCCNTR(%0)) +_RF0(cp15_pmxevtyper_get, CP15_PMXEVTYPER(%0)) +_WF1(cp15_pmxevtyper_set, CP15_PMXEVTYPER(%0)) +_RF0(cp15_pmxevcntr_get, CP15_PMXEVCNTRR(%0)) +_WF1(cp15_pmxevcntr_set, CP15_PMXEVCNTRR(%0)) +_RF0(cp15_pmuserenr_get, CP15_PMUSERENR(%0)) +_WF1(cp15_pmuserenr_set, CP15_PMUSERENR(%0)) +_RF0(cp15_pminten_get, CP15_PMINTENSET(%0)) +_WF1(cp15_pminten_set, CP15_PMINTENSET(%0)) +_WF1(cp15_pminten_clr, CP15_PMINTENCLR(%0)) +#endif + #undef _FX #undef _RF0 #undef _WF0 @@ -205,14 +234,7 @@ tlb_flush_range_local(vm_offset_t sva, v } /* Broadcasting operations. */ -#ifndef SMP - -#define tlb_flush_all() tlb_flush_all_local() -#define tlb_flush_all_ng() tlb_flush_all_ng_local() -#define tlb_flush(sva) tlb_flush_local(sva) -#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) - -#else /* SMP */ +#if __ARM_ARCH >= 7 && defined SMP static __inline void tlb_flush_all(void) @@ -252,6 +274,13 @@ tlb_flush_range(vm_offset_t sva, vm_siz _CP15_TLBIMVAAIS(va); dsb(); } +#else /* SMP */ + +#define tlb_flush_all() tlb_flush_all_local() +#define tlb_flush_all_ng() tlb_flush_all_ng_local() +#define tlb_flush(sva) tlb_flush_local(sva) +#define tlb_flush_range(sva, size) tlb_flush_range_local(sva, size) + #endif /* SMP */ /* @@ -267,14 +296,14 @@ icache_sync(vm_offset_t sva, vm_size_t s dsb(); for (va = sva; va < eva; va += arm_dcache_align) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else _CP15_DCCMVAC(va); #endif } dsb(); -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_ICIALLUIS(); #else _CP15_ICIALLU(); @@ -287,7 +316,7 @@ icache_sync(vm_offset_t sva, vm_size_t s static __inline void icache_inv_all(void) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_ICIALLUIS(); #else _CP15_ICIALLU(); @@ -305,7 +334,7 @@ dcache_wb_pou(vm_offset_t sva, vm_size_t dsb(); for (va = sva; va < eva; va += arm_dcache_align) { -#ifdef SMP +#if __ARM_ARCH >= 7 && defined SMP _CP15_DCCMVAU(va); #else _CP15_DCCMVAC(va); Modified: stable/10/sys/arm/include/cpu.h ============================================================================== --- stable/10/sys/arm/include/cpu.h Fri Feb 13 17:36:41 2015 (r278683) +++ stable/10/sys/arm/include/cpu.h Fri Feb 13 17:53:11 2015 (r278684) @@ -4,6 +4,7 @@ #ifndef MACHINE_CPU_H #define MACHINE_CPU_H +#include #include #include @@ -11,32 +12,14 @@ void cpu_halt(void); void swi_vm(void *); #ifdef _KERNEL +#if __ARM_ARCH >= 6 +#include +#endif static __inline uint64_t get_cyclecount(void) { -/* This '#if' asks the question 'Does CP15/SCC include performance counters?' */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) \ - || defined(CPU_MV_PJ4B) \ - || defined(CPU_CORTEXA) || defined(CPU_KRAIT) - uint32_t ccnt; - uint64_t ccnt64; - - /* - * Read PMCCNTR. Curses! Its only 32 bits. - * TODO: Fix this by catching overflow with interrupt? - */ -/* The ARMv6 vs ARMv7 divide is going to need a better way of - * distinguishing between them. - */ -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) - /* ARMv6 - Earlier model SCCs */ - __asm __volatile("mrc p15, 0, %0, c15, c12, 1": "=r" (ccnt)); -#else - /* ARMv7 - Later model SCCs */ - __asm __volatile("mrc p15, 0, %0, c9, c13, 0": "=r" (ccnt)); -#endif - ccnt64 = (uint64_t)ccnt; - return (ccnt64); +#if __ARM_ARCH >= 6 + return cp15_pmccntr_get(); #else /* No performance counters, so use binuptime(9). This is slooooow */ struct bintime bt; Modified: stable/10/sys/arm/include/sysreg.h ============================================================================== --- stable/10/sys/arm/include/sysreg.h Fri Feb 13 17:36:41 2015 (r278683) +++ stable/10/sys/arm/include/sysreg.h Fri Feb 13 17:53:11 2015 (r278684) @@ -29,6 +29,11 @@ /* * Macros to make working with the System Control Registers simpler. + * + * Note that when register r0 is hard-coded in these definitions it means the + * cp15 operation neither reads nor writes the register, and r0 is used only + * because some syntatically-valid register name has to appear at that point to + * keep the asm parser happy. */ #ifndef MACHINE_SYSREG_H @@ -202,6 +207,26 @@ #endif /* + * CP15 C9 registers + */ +#if __ARM_ARCH == 6 && defined(CPU_ARM1176) +#define CP15_PMCCNTR(rr) p15, 0, rr, c15, c12, 1 /* PM Cycle Count Register */ +#elif __ARM_ARCH > 6 +#define CP15_PMCR(rr) p15, 0, rr, c9, c12, 0 /* Performance Monitor Control Register */ +#define CP15_PMCNTENSET(rr) p15, 0, rr, c9, c12, 1 /* PM Count Enable Set Register */ +#define CP15_PMCNTENCLR(rr) p15, 0, rr, c9, c12, 2 /* PM Count Enable Clear Register */ +#define CP15_PMOVSR(rr) p15, 0, rr, c9, c12, 3 /* PM Overflow Flag Status Register */ +#define CP15_PMSWINC(rr) p15, 0, rr, c9, c12, 4 /* PM Software Increment Register */ +#define CP15_PMSELR(rr) p15, 0, rr, c9, c12, 5 /* PM Event Counter Selection Register */ +#define CP15_PMCCNTR(rr) p15, 0, rr, c9, c13, 0 /* PM Cycle Count Register */ +#define CP15_PMXEVTYPER(rr) p15, 0, rr, c9, c13, 1 /* PM Event Type Select Register */ +#define CP15_PMXEVCNTRR(rr) p15, 0, rr, c9, c13, 2 /* PM Event Count Register */ +#define CP15_PMUSERENR(rr) p15, 0, rr, c9, c14, 0 /* PM User Enable Register */ +#define CP15_PMINTENSET(rr) p15, 0, rr, c9, c14, 1 /* PM Interrupt Enable Set Register */ +#define CP15_PMINTENCLR(rr) p15, 0, rr, c9, c14, 2 /* PM Interrupt Enable Clear Register */ +#endif + +/* * CP15 C10 registers */ /* Without LPAE this is PRRR, with LPAE it's MAIR0 */ From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 18:03:51 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60C63DB2; Fri, 13 Feb 2015 18:03: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 4BEF537F; Fri, 13 Feb 2015 18:03: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 t1DI3p8B005838; Fri, 13 Feb 2015 18:03:51 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DI3pAA005837; Fri, 13 Feb 2015 18:03:51 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131803.t1DI3pAA005837@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278685 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:03:51 -0000 Author: ian Date: Fri Feb 13 18:03:50 2015 New Revision: 278685 URL: https://svnweb.freebsd.org/changeset/base/278685 Log: MFC r276985: Store the shadow command/mode register in the softc, not a local static var. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 17:53:11 2015 (r278684) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 18:03:50 2015 (r278685) @@ -121,6 +121,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); @@ -344,6 +345,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); } @@ -378,16 +387,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-stable@FreeBSD.ORG Fri Feb 13 18:10:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF6C1F3C; Fri, 13 Feb 2015 18:10: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 9B02F3C8; Fri, 13 Feb 2015 18:10: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 t1DIA7si006733; Fri, 13 Feb 2015 18:10:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIA7BP006732; Fri, 13 Feb 2015 18:10:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131810.t1DIA7BP006732@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:10:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278686 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:10:07 -0000 Author: ian Date: Fri Feb 13 18:10:06 2015 New Revision: 278686 URL: https://svnweb.freebsd.org/changeset/base/278686 Log: MFC r277025: Fix an off-by-one in ppsratecheck(). Modified: stable/10/sys/kern/kern_time.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_time.c ============================================================================== --- stable/10/sys/kern/kern_time.c Fri Feb 13 18:03:50 2015 (r278685) +++ stable/10/sys/kern/kern_time.c Fri Feb 13 18:10:06 2015 (r278686) @@ -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-stable@FreeBSD.ORG Fri Feb 13 18:12:31 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A01915C; Fri, 13 Feb 2015 18:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55277661; Fri, 13 Feb 2015 18:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DICVt0010495; Fri, 13 Feb 2015 18:12:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DICVjX010494; Fri, 13 Feb 2015 18:12:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131812.t1DICVjX010494@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278687 - stable/10/sys/dev/mmc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:12:31 -0000 Author: ian Date: Fri Feb 13 18:12:30 2015 New Revision: 278687 URL: https://svnweb.freebsd.org/changeset/base/278687 Log: MFC r277026: Rate-limit error logging to 5 lines per second. Modified: stable/10/sys/dev/mmc/mmcsd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mmc/mmcsd.c ============================================================================== --- stable/10/sys/dev/mmc/mmcsd.c Fri Feb 13 18:10:06 2015 (r278686) +++ stable/10/sys/dev/mmc/mmcsd.c Fri Feb 13 18:12:30 2015 (r278687) @@ -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); @@ -367,8 +372,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-stable@FreeBSD.ORG Fri Feb 13 18:13:43 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C9827290; Fri, 13 Feb 2015 18:13: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 9A9E766C; Fri, 13 Feb 2015 18:13: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 t1DIDhCC010690; Fri, 13 Feb 2015 18:13:43 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIDhcL010689; Fri, 13 Feb 2015 18:13:43 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131813.t1DIDhcL010689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:13:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278688 - stable/10/sys/dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:13:43 -0000 Author: ian Date: Fri Feb 13 18:13:42 2015 New Revision: 278688 URL: https://svnweb.freebsd.org/changeset/base/278688 Log: MFC r277027: Handle the possibility that SDHCI_PLATFORM_START_TRANSFER() can fail. Modified: stable/10/sys/dev/sdhci/sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 18:12:30 2015 (r278687) +++ stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 18:13:42 2015 (r278688) @@ -985,7 +985,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. */ @@ -994,7 +993,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, @@ -1005,6 +1004,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); @@ -1172,12 +1172,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. */ @@ -1234,6 +1229,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-stable@FreeBSD.ORG Fri Feb 13 18:16:09 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4F923D9; Fri, 13 Feb 2015 18:16: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 96739683; Fri, 13 Feb 2015 18:16: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 t1DIG93E011094; Fri, 13 Feb 2015 18:16:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIG9s0011093; Fri, 13 Feb 2015 18:16:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131816.t1DIG9s0011093@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278689 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:16:09 -0000 Author: ian Date: Fri Feb 13 18:16:08 2015 New Revision: 278689 URL: https://svnweb.freebsd.org/changeset/base/278689 Log: MFC r277028, r277038: Check for and handle failures of bus_dmamap_load(). Handle dma mappings with more than one segment for rpi sdhci. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 18:13:42 2015 (r278688) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 18:16:08 2015 (r278689) @@ -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__); \ @@ -94,10 +95,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; @@ -122,6 +119,11 @@ 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[NUM_DMA_SEGS]; + bus_size_t dmamap_seg_sizes[NUM_DMA_SEGS]; + int dmamap_seg_count; + int dmamap_seg_index; + int dmamap_status; }; static int bcm_sdhci_probe(device_t); @@ -138,16 +140,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 @@ -245,7 +250,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); @@ -424,19 +429,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; - bus_addr_t pmem; - 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; @@ -447,8 +512,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); @@ -472,29 +537,20 @@ 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, 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"); + bcm_sdhci_start_dma_seg(sc); } } else { /* wait for next data by INT */ @@ -511,81 +567,61 @@ 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) { + if (sc->dmamap_seg_count != 0) { 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)); - 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, + 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); - - bus_dmamap_sync(sc->sc_dma_tag, sc->sc_dma_map, - BUS_DMASYNC_PREREAD); + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, sc->sc_sdhci_buffer_phys, - paddr, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } 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) { + if (sc->dmamap_seg_count != 0) { 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_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); + bcm_sdhci_dmacb, sc, BUS_DMA_NOWAIT) != 0 || + sc->dmamap_status != 0) { + slot->curcmd->error = MMC_ERR_NO_MEMORY; + return; + } /* DMA start */ - if (bcm_dma_start(sc->sc_dma_ch, paddr, - sc->sc_sdhci_buffer_phys, left) != 0) - device_printf(sc->sc_dev, "failed DMA start\n"); + bcm_sdhci_start_dma_seg(sc); } static int @@ -612,15 +648,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-stable@FreeBSD.ORG Fri Feb 13 18:37:23 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0E31D6E; Fri, 13 Feb 2015 18:37: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 A37E592C; Fri, 13 Feb 2015 18:37: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 t1DIbN7v020916; Fri, 13 Feb 2015 18:37:23 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIbNmn020915; Fri, 13 Feb 2015 18:37:23 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131837.t1DIbNmn020915@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 18:37:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278692 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:37:24 -0000 Author: ian Date: Fri Feb 13 18:37:22 2015 New Revision: 278692 URL: https://svnweb.freebsd.org/changeset/base/278692 Log: MFC r275962: Clean up style of CUBIEBOARD2 config. Modified: stable/10/sys/arm/conf/CUBIEBOARD2 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 18:34:04 2015 (r278691) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 18:37:22 2015 (r278692) @@ -20,7 +20,7 @@ ident CUBIEBOARD2 -include "../allwinner/a20/std.a20" +include "../allwinner/a20/std.a20" makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" @@ -34,18 +34,18 @@ options GEOM_PART_MBR # MBR partition options TMPFS # Efficient memory filesystem options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support -options UFS_ACL # Support for access control lists +options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories -options MSDOSFS # MSDOS Filesystem +options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support -options SYSVSHM # SYSV-style shared memory -options SYSVMSG # SYSV-style message queues -options SYSVSEM # SYSV-style semaphores +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 KBD_INSTALL_CDEV # install a CDEV entry in /dev options PREEMPTION @@ -78,15 +78,15 @@ options DDB # Enable the kernel debug #options BOOTP_WIRED_TO=cpsw0 # MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" # ATA controllers -#device ahci # AHCI-compatible SATA controllers -#device ata # Legacy ATA/SATA controllers +#device ahci # AHCI-compatible SATA controllers +#device ata # Legacy ATA/SATA controllers #options ATA_STATIC_ID # Static device numbering # Console and misc @@ -98,8 +98,8 @@ device md device random # Entropy device # I2C support -#device iicbus -#device iic +#device iicbus +#device iic # GPIO device gpio @@ -114,8 +114,8 @@ device usb options USB_DEBUG #options USB_REQ_DEBUG #options USB_VERBOSE -#device uhci -#device ohci +#device uhci +#device ohci device ehci device umass @@ -125,7 +125,7 @@ device loop device ether device mii device smscphy -#device cpsw +#device cpsw device bpf device emac From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 18:45:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62FF1FE7; Fri, 13 Feb 2015 18:45: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 4BF50A03; Fri, 13 Feb 2015 18:45: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 t1DIjlT0025517; Fri, 13 Feb 2015 18:45:47 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DIjjHv025508; Fri, 13 Feb 2015 18:45:45 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201502131845.t1DIjjHv025508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 13 Feb 2015 18:45:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278693 - in stable/10: sys/kern tools/sched usr.bin/man X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 18:45:47 -0000 Author: sbruno Date: Fri Feb 13 18:45:44 2015 New Revision: 278693 URL: https://svnweb.freebsd.org/changeset/base/278693 Log: Revert r278650. Definite layer 8 bug. Submitted by: dhw and Thomas Mueller Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/kern/kern_mutex.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/kern_sx.c stable/10/sys/kern/kern_timeout.c stable/10/tools/sched/schedgraph.py stable/10/usr.bin/man/man.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_lock.c Fri Feb 13 18:45:44 2015 (r278693) @@ -583,9 +583,6 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -601,16 +598,11 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && spintries < alk_retries) { - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -628,8 +620,6 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; @@ -825,9 +815,6 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -843,8 +830,6 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && @@ -854,9 +839,6 @@ __lockmgr_args(struct lock *lk, u_int fl !atomic_cmpset_ptr(&lk->lk_lock, x, x | LK_EXCLUSIVE_SPINNERS)) continue; - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(td), "spinning", - "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -873,8 +855,6 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_mutex.c Fri Feb 13 18:45:44 2015 (r278693) @@ -436,10 +436,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, m, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname((struct thread *)tid), - "spinning", "lockname:\"%s\"", - m->lock_object.lo_name); while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -447,9 +443,6 @@ __mtx_lock_sleep(volatile uintptr_t *c, spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname((struct thread *)tid), - "running"); continue; } } @@ -586,8 +579,6 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); - KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), - "spinning", "lockname:\"%s\"", m->lock_object.lo_name); #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); @@ -613,8 +604,6 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); - KTR_STATE0(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), - "running"); LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); Modified: stable/10/sys/kern/kern_rwlock.c ============================================================================== --- stable/10/sys/kern/kern_rwlock.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_rwlock.c Fri Feb 13 18:45:44 2015 (r278693) @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -424,9 +423,6 @@ __rw_rlock(volatile uintptr_t *c, const CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -434,23 +430,16 @@ __rw_rlock(volatile uintptr_t *c, const spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); continue; } } else if (spintries < rowner_retries) { spintries++; - KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), - "spinning", "lockname:\"%s\"", - rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = rw->rw_lock; if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); if (i != rowner_loops) continue; } @@ -770,9 +759,6 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); - KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), - "spinning", "lockname:\"%s\"", - rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -780,8 +766,6 @@ __rw_wlock_hard(volatile uintptr_t *c, u spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); continue; } if ((v & RW_LOCK_READ) && RW_READERS(v) && @@ -793,16 +777,11 @@ __rw_wlock_hard(volatile uintptr_t *c, u } } spintries++; - KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), - "spinning", "lockname:\"%s\"", - rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) break; cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), - "running"); #ifdef KDTRACE_HOOKS spin_cnt += rowner_loops - i; #endif Modified: stable/10/sys/kern/kern_sx.c ============================================================================== --- stable/10/sys/kern/kern_sx.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_sx.c Fri Feb 13 18:45:44 2015 (r278693) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -561,10 +560,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", - sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -573,14 +568,9 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); continue; } } else if (SX_SHARERS(x) && spintries < asx_retries) { - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); spintries++; for (i = 0; i < asx_loops; i++) { @@ -597,8 +587,6 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); if (i != asx_loops) continue; } @@ -861,9 +849,6 @@ _sx_slock_hard(struct sx *sx, int opts, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); - KTR_STATE1(KTR_SCHED, "thread", - sched_tdname(curthread), "spinning", - "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -872,8 +857,6 @@ _sx_slock_hard(struct sx *sx, int opts, #endif cpu_spinwait(); } - KTR_STATE0(KTR_SCHED, "thread", - sched_tdname(curthread), "running"); continue; } } Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/sys/kern/kern_timeout.c Fri Feb 13 18:45:44 2015 (r278693) @@ -150,7 +150,6 @@ struct callout_cpu { sbintime_t cc_lastscan; void *cc_cookie; u_int cc_bucket; - char cc_ktr_event_name[20]; }; #define cc_exec_curr cc_exec_entity[0].cc_curr @@ -189,7 +188,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; -static void callout_cpu_init(struct callout_cpu *cc, int cpu); +static void callout_cpu_init(struct callout_cpu *cc); static void softclock_call_cc(struct callout *c, struct callout_cpu *cc, #ifdef CALLOUT_PROFILING int *mpcalls, int *lockcalls, int *gcalls, @@ -284,7 +283,7 @@ callout_callwheel_init(void *dummy) cc = CC_CPU(timeout_cpu); cc->cc_callout = malloc(ncallout * sizeof(struct callout), M_CALLOUT, M_WAITOK); - callout_cpu_init(cc, timeout_cpu); + callout_cpu_init(cc); } SYSINIT(callwheel_init, SI_SUB_CPU, SI_ORDER_ANY, callout_callwheel_init, NULL); @@ -292,7 +291,7 @@ SYSINIT(callwheel_init, SI_SUB_CPU, SI_O * Initialize the per-cpu callout structures. */ static void -callout_cpu_init(struct callout_cpu *cc, int cpu) +callout_cpu_init(struct callout_cpu *cc) { struct callout *c; int i; @@ -307,8 +306,6 @@ callout_cpu_init(struct callout_cpu *cc, cc->cc_firstevent = INT64_MAX; for (i = 0; i < 2; i++) cc_cce_cleanup(cc, i); - snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), - "callwheel cpu %d", cpu); if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { @@ -370,7 +367,7 @@ start_softclock(void *dummy) continue; cc = CC_CPU(cpu); cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ - callout_cpu_init(cc, cpu); + callout_cpu_init(cc); if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); @@ -677,8 +674,6 @@ softclock_call_cc(struct callout *c, str CTR3(KTR_CALLOUT, "callout %p func %p arg %p", c, c_func, c_arg); } - KTR_STATE3(KTR_SCHED, "callout", cc->cc_ktr_event_name, "running", - "func:%p", c_func, "arg:%p", c_arg, "direct:%d", direct); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt1 = sbinuptime(); #endif @@ -701,7 +696,6 @@ softclock_call_cc(struct callout *c, str lastfunc = c_func; } #endif - KTR_STATE0(KTR_SCHED, "callout", cc->cc_ktr_event_name, "idle"); CTR1(KTR_CALLOUT, "callout %p finished", c); if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) class->lc_unlock(c_lock); Modified: stable/10/tools/sched/schedgraph.py ============================================================================== --- stable/10/tools/sched/schedgraph.py Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/tools/sched/schedgraph.py Fri Feb 13 18:45:44 2015 (r278693) @@ -70,7 +70,6 @@ eventcolors = [ ("count", "red"), ("running", "green"), ("idle", "grey"), - ("spinning", "red"), ("yielding", "yellow"), ("swapped", "violet"), ("suspended", "purple"), @@ -81,6 +80,8 @@ eventcolors = [ ("runq rem", "yellow"), ("thread exit", "grey"), ("proc exit", "grey"), + ("callwheel idle", "grey"), + ("callout running", "green"), ("lock acquire", "blue"), ("lock contest", "purple"), ("failed lock try", "red"), @@ -855,7 +856,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events) or i < 0): + if (i >= len(self.events)): return (None) event = self.events[i] return (event) @@ -902,6 +903,7 @@ class KTRFile: self.timestamp_f = None self.timestamp_l = None self.locks = {} + self.callwheels = {} self.ticks = {} self.load = {} self.crit = {} Modified: stable/10/usr.bin/man/man.sh ============================================================================== --- stable/10/usr.bin/man/man.sh Fri Feb 13 18:37:22 2015 (r278692) +++ stable/10/usr.bin/man/man.sh Fri Feb 13 18:45:44 2015 (r278693) @@ -276,8 +276,11 @@ man_check_for_so() { return 0 } +# Usage: man_display_page +# Display either the manpage or catpage depending on the use_cat variable man_display_page() { - local IFS pipeline preconv_enc testline + local EQN NROFF PIC TBL TROFF REFER VGRIND + local IFS l nroff_dev pipeline preproc_arg tool # We are called with IFS set to colon. This causes really weird # things to happen for the variables that have spaces in them. @@ -309,49 +312,6 @@ man_display_page() { return fi - case "${manpage}" in - *.${man_charset}/*) - case "$man_charset" in - ISO8859-1) preconv_enc="latin-1" ;; - ISO8859-15) preconv_enc="latin-1" ;; - UTF-8) preconv_enc="utf-8" ;; - esac - ;; - esac - - if [ -n "$preconv_enc" ]; then - pipeline="preconv -e $preconv_enc |" - fi - testline="$pipeline mandoc -Tlint -Werror 2>/dev/null" - pipeline="$pipeline mandoc -Tlocale | $MANPAGER" - - if ! eval "$cattool $manpage | $testline" ;then - if which -s groff2; then - man_display_page_groff - else - echo "This manpage needs groff(1) to be rendered" >&2 - echo "First install groff(1): " >&2 - echo "pkg install groff " >&2 - ret=1 - fi - return - fi - - if [ $debug -gt 0 ]; then - decho "Command: $cattool $manpage | $pipeline" - ret=0 - else - eval "$cattool $manpage | $pipeline" - ret=$? - fi -} - -# Usage: man_display_page -# Display either the manpage or catpage depending on the use_cat variable -man_display_page_groff() { - local EQN NROFF PIC TBL TROFF REFER VGRIND - local IFS l nroff_dev pipeline preproc_arg tool - # So, we really do need to parse the manpage. First, figure out the # device flag (-T) we have to pass to eqn(1) and groff(1). Then, # setup the pipeline of commands based on the user's request. From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 19:06:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 818E5685; Fri, 13 Feb 2015 19:06: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 6AAA8C6F; Fri, 13 Feb 2015 19:06: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 t1DJ6O1p035386; Fri, 13 Feb 2015 19:06:24 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DJ6MLN035380; Fri, 13 Feb 2015 19:06:22 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201502131906.t1DJ6MLN035380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Fri, 13 Feb 2015 19:06:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278694 - in stable/10: sys/kern tools/sched X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 19:06:24 -0000 Author: sbruno Date: Fri Feb 13 19:06:22 2015 New Revision: 278694 URL: https://svnweb.freebsd.org/changeset/base/278694 Log: MFC 272315 272757 274091 274902 for real this time r272315 Explicitly return None for negative event indices. Prior to this, eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start. r272757 Add schedgraph traces for callout handlers. Specifically, a callwheel logs a running event each time it executes a callout function. The event includes the function pointer, argument, and whether or not it was run from hardware interrupt context. The callwheel is marked idle when each handler completes. This effectively logs the duration of each callout routine in the graph. r274091 Bind Ctrl-Q as a global hotkey to exit. Bind Ctrl-W as a hotkey to close dialogs. r274902 Add a new thread state "spinning" to schedgraph and add tracepoints at the start and stop of spinning waits in lock primitives. Reviewed by: jhb Modified: stable/10/sys/kern/kern_lock.c stable/10/sys/kern/kern_mutex.c stable/10/sys/kern/kern_rwlock.c stable/10/sys/kern/kern_sx.c stable/10/sys/kern/kern_timeout.c stable/10/tools/sched/schedgraph.py Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lock.c ============================================================================== --- stable/10/sys/kern/kern_lock.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_lock.c Fri Feb 13 19:06:22 2015 (r278694) @@ -583,6 +583,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -598,11 +601,16 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && (x & LK_SHARE) != 0 && LK_SHARERS(x) && spintries < alk_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -620,6 +628,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; @@ -815,6 +825,9 @@ __lockmgr_args(struct lock *lk, u_int fl CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, lk, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); /* * If we are holding also an interlock drop it @@ -830,6 +843,8 @@ __lockmgr_args(struct lock *lk, u_int fl while (LK_HOLDER(lk->lk_lock) == (uintptr_t)owner && TD_IS_RUNNING(owner)) cpu_spinwait(); + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); continue; } else if (LK_CAN_ADAPT(lk, flags) && @@ -839,6 +854,9 @@ __lockmgr_args(struct lock *lk, u_int fl !atomic_cmpset_ptr(&lk->lk_lock, x, x | LK_EXCLUSIVE_SPINNERS)) continue; + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(td), "spinning", + "lockname:\"%s\"", lk->lock_object.lo_name); if (flags & LK_INTERLOCK) { class->lc_unlock(ilk); flags &= ~LK_INTERLOCK; @@ -855,6 +873,8 @@ __lockmgr_args(struct lock *lk, u_int fl break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(td), "running"); GIANT_RESTORE(); if (i != alk_loops) continue; Modified: stable/10/sys/kern/kern_mutex.c ============================================================================== --- stable/10/sys/kern/kern_mutex.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_mutex.c Fri Feb 13 19:06:22 2015 (r278694) @@ -436,6 +436,10 @@ __mtx_lock_sleep(volatile uintptr_t *c, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, m, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", + m->lock_object.lo_name); while (mtx_owner(m) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -443,6 +447,9 @@ __mtx_lock_sleep(volatile uintptr_t *c, spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname((struct thread *)tid), + "running"); continue; } } @@ -579,6 +586,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "spinning", "lockname:\"%s\"", m->lock_object.lo_name); #ifdef HWPMC_HOOKS PMC_SOFT_CALL( , , lock, failed); @@ -604,6 +613,8 @@ _mtx_lock_spin_cookie(volatile uintptr_t if (LOCK_LOG_TEST(&m->lock_object, opts)) CTR1(KTR_LOCK, "_mtx_lock_spin: %p spin done", m); + KTR_STATE0(KTR_SCHED, "thread", sched_tdname((struct thread *)tid), + "running"); LOCKSTAT_PROFILE_OBTAIN_LOCK_SUCCESS(LS_MTX_SPIN_LOCK_ACQUIRE, m, contested, waittime, (file), (line)); Modified: stable/10/sys/kern/kern_rwlock.c ============================================================================== --- stable/10/sys/kern/kern_rwlock.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_rwlock.c Fri Feb 13 19:06:22 2015 (r278694) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -423,6 +424,9 @@ __rw_rlock(volatile uintptr_t *c, const CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -430,16 +434,23 @@ __rw_rlock(volatile uintptr_t *c, const spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (spintries < rowner_retries) { spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { v = rw->rw_lock; if ((v & RW_LOCK_READ) == 0 || RW_CAN_READ(v)) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); if (i != rowner_loops) continue; } @@ -759,6 +770,9 @@ __rw_wlock_hard(volatile uintptr_t *c, u if (LOCK_LOG_TEST(&rw->lock_object, 0)) CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, rw, owner); + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); while ((struct thread*)RW_OWNER(rw->rw_lock) == owner && TD_IS_RUNNING(owner)) { cpu_spinwait(); @@ -766,6 +780,8 @@ __rw_wlock_hard(volatile uintptr_t *c, u spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); continue; } if ((v & RW_LOCK_READ) && RW_READERS(v) && @@ -777,11 +793,16 @@ __rw_wlock_hard(volatile uintptr_t *c, u } } spintries++; + KTR_STATE1(KTR_SCHED, "thread", sched_tdname(curthread), + "spinning", "lockname:\"%s\"", + rw->lock_object.lo_name); for (i = 0; i < rowner_loops; i++) { if ((rw->rw_lock & RW_LOCK_WRITE_SPINNER) == 0) break; cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", sched_tdname(curthread), + "running"); #ifdef KDTRACE_HOOKS spin_cnt += rowner_loops - i; #endif Modified: stable/10/sys/kern/kern_sx.c ============================================================================== --- stable/10/sys/kern/kern_sx.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_sx.c Fri Feb 13 19:06:22 2015 (r278694) @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -560,6 +561,10 @@ _sx_xlock_hard(struct sx *sx, uintptr_t CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", + sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -568,9 +573,14 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } else if (SX_SHARERS(x) && spintries < asx_retries) { + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); spintries++; for (i = 0; i < asx_loops; i++) { @@ -587,6 +597,8 @@ _sx_xlock_hard(struct sx *sx, uintptr_t spin_cnt++; #endif } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); if (i != asx_loops) continue; } @@ -849,6 +861,9 @@ _sx_slock_hard(struct sx *sx, int opts, CTR3(KTR_LOCK, "%s: spinning on %p held by %p", __func__, sx, owner); + KTR_STATE1(KTR_SCHED, "thread", + sched_tdname(curthread), "spinning", + "lockname:\"%s\"", sx->lock_object.lo_name); GIANT_SAVE(); while (SX_OWNER(sx->sx_lock) == x && TD_IS_RUNNING(owner)) { @@ -857,6 +872,8 @@ _sx_slock_hard(struct sx *sx, int opts, #endif cpu_spinwait(); } + KTR_STATE0(KTR_SCHED, "thread", + sched_tdname(curthread), "running"); continue; } } Modified: stable/10/sys/kern/kern_timeout.c ============================================================================== --- stable/10/sys/kern/kern_timeout.c Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/sys/kern/kern_timeout.c Fri Feb 13 19:06:22 2015 (r278694) @@ -150,6 +150,7 @@ struct callout_cpu { sbintime_t cc_lastscan; void *cc_cookie; u_int cc_bucket; + char cc_ktr_event_name[20]; }; #define cc_exec_curr cc_exec_entity[0].cc_curr @@ -188,7 +189,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; -static void callout_cpu_init(struct callout_cpu *cc); +static void callout_cpu_init(struct callout_cpu *cc, int cpu); static void softclock_call_cc(struct callout *c, struct callout_cpu *cc, #ifdef CALLOUT_PROFILING int *mpcalls, int *lockcalls, int *gcalls, @@ -283,7 +284,7 @@ callout_callwheel_init(void *dummy) cc = CC_CPU(timeout_cpu); cc->cc_callout = malloc(ncallout * sizeof(struct callout), M_CALLOUT, M_WAITOK); - callout_cpu_init(cc); + callout_cpu_init(cc, timeout_cpu); } SYSINIT(callwheel_init, SI_SUB_CPU, SI_ORDER_ANY, callout_callwheel_init, NULL); @@ -291,7 +292,7 @@ SYSINIT(callwheel_init, SI_SUB_CPU, SI_O * Initialize the per-cpu callout structures. */ static void -callout_cpu_init(struct callout_cpu *cc) +callout_cpu_init(struct callout_cpu *cc, int cpu) { struct callout *c; int i; @@ -306,6 +307,8 @@ callout_cpu_init(struct callout_cpu *cc) cc->cc_firstevent = INT64_MAX; for (i = 0; i < 2; i++) cc_cce_cleanup(cc, i); + snprintf(cc->cc_ktr_event_name, sizeof(cc->cc_ktr_event_name), + "callwheel cpu %d", cpu); if (cc->cc_callout == NULL) /* Only cpu0 handles timeout(9) */ return; for (i = 0; i < ncallout; i++) { @@ -367,7 +370,7 @@ start_softclock(void *dummy) continue; cc = CC_CPU(cpu); cc->cc_callout = NULL; /* Only cpu0 handles timeout(9). */ - callout_cpu_init(cc); + callout_cpu_init(cc, cpu); if (swi_add(NULL, "clock", softclock, cc, SWI_CLOCK, INTR_MPSAFE, &cc->cc_cookie)) panic("died while creating standard software ithreads"); @@ -674,6 +677,8 @@ softclock_call_cc(struct callout *c, str CTR3(KTR_CALLOUT, "callout %p func %p arg %p", c, c_func, c_arg); } + KTR_STATE3(KTR_SCHED, "callout", cc->cc_ktr_event_name, "running", + "func:%p", c_func, "arg:%p", c_arg, "direct:%d", direct); #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbt1 = sbinuptime(); #endif @@ -696,6 +701,7 @@ softclock_call_cc(struct callout *c, str lastfunc = c_func; } #endif + KTR_STATE0(KTR_SCHED, "callout", cc->cc_ktr_event_name, "idle"); CTR1(KTR_CALLOUT, "callout %p finished", c); if ((c_flags & CALLOUT_RETURNUNLOCKED) == 0) class->lc_unlock(c_lock); Modified: stable/10/tools/sched/schedgraph.py ============================================================================== --- stable/10/tools/sched/schedgraph.py Fri Feb 13 18:45:44 2015 (r278693) +++ stable/10/tools/sched/schedgraph.py Fri Feb 13 19:06:22 2015 (r278694) @@ -70,6 +70,7 @@ eventcolors = [ ("count", "red"), ("running", "green"), ("idle", "grey"), + ("spinning", "red"), ("yielding", "yellow"), ("swapped", "violet"), ("suspended", "purple"), @@ -80,8 +81,6 @@ eventcolors = [ ("runq rem", "yellow"), ("thread exit", "grey"), ("proc exit", "grey"), - ("callwheel idle", "grey"), - ("callout running", "green"), ("lock acquire", "blue"), ("lock contest", "purple"), ("failed lock try", "red"), @@ -288,6 +287,10 @@ class ColorConfigure(Toplevel): color = graph.getcolor(type[0]) if (color != ""): self.additem(type[0], color) + self.bind("", self.destroycb) + + def destroycb(self, event): + self.destroy() def additem(self, name, color): item = ColorConf(self.items, name, color) @@ -373,6 +376,10 @@ class SourceConfigure(Toplevel): self.addsource(source) self.drawbuttons() self.buttons.grid(row=1, column=0, sticky=W) + self.bind("", self.destroycb) + + def destroycb(self, event): + self.destroy() def addsource(self, source): if (self.irow > 30): @@ -487,6 +494,10 @@ class SourceStats(Toplevel): bd=1, relief=SUNKEN, width=10).grid( row=ypos, column=3, sticky=W+E) ypos += 1 + self.bind("", self.destroycb) + + def destroycb(self, event): + self.destroy() class SourceContext(Menu): @@ -529,6 +540,7 @@ class EventView(Toplevel): self.drawbuttons() event.displayref(canvas) self.bind("", self.destroycb) + self.bind("", self.destroycb) def destroycb(self, event): self.unbind("") @@ -856,7 +868,7 @@ class EventSource: return (Y_EVENTSOURCE) def eventat(self, i): - if (i >= len(self.events)): + if (i >= len(self.events) or i < 0): return (None) event = self.events[i] return (event) @@ -903,7 +915,6 @@ class KTRFile: self.timestamp_f = None self.timestamp_l = None self.locks = {} - self.callwheels = {} self.ticks = {} self.load = {} self.crit = {} @@ -1310,6 +1321,10 @@ class SchedGraph(Frame): self.pack(expand=1, fill="both") self.buildwidgets() self.layout() + self.bind_all("", self.quitcb) + + def quitcb(self, event): + self.quit() def buildwidgets(self): global status From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 19:52:17 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A89911E4; Fri, 13 Feb 2015 19:52: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 92200127; Fri, 13 Feb 2015 19:52: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 t1DJqHNb058568; Fri, 13 Feb 2015 19:52:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DJqGU0058563; Fri, 13 Feb 2015 19:52:16 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502131952.t1DJqGU0058563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 19:52:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278696 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 19:52:17 -0000 Author: ian Date: Fri Feb 13 19:52:16 2015 New Revision: 278696 URL: https://svnweb.freebsd.org/changeset/base/278696 Log: MFC r271220: Create a common i.MX53 config and use it with the two existing i.MX53 boards. Added: stable/10/sys/arm/conf/IMX53 - copied unchanged from r271220, head/sys/arm/conf/IMX53 Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 stable/10/sys/arm/conf/IMX53-QSB Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/DIGI-CCWMX53 ============================================================================== --- stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 19:44:04 2015 (r278695) +++ stable/10/sys/arm/conf/DIGI-CCWMX53 Fri Feb 13 19:52:16 2015 (r278696) @@ -17,51 +17,13 @@ # # $FreeBSD$ -ident DIGI-CCWMX53 +#NO_UNIVERSE -include "../freescale/imx/std.imx53" +include "IMX53" +ident DIGI-CCWMX53 makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - -options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -#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 MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) 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 INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon - # required for netbooting #options BOOTP #options BOOTP_COMPAT @@ -71,117 +33,6 @@ options VFP # vfp/neon #options ROOTDEVNAME=\"ufs:ada0s2a\" - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE - -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -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 - -# 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 - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -#device vlan # 802.1Q VLAN support -#device tun # Packet tunnel. -#device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling -#device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module - -# Ethernet -device ffec # Freescale Fast Ethernet Controller -device miibus # Standard mii bus - -# Serial (COM) ports -device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER - -device ata -device atapci # Only for helper functions -device imxata -options ATA_STATIC_ID # Static device numbering - -device gpio -device gpioled - -device fsliic -device iic -device iicbus - -# SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -device uhid # "Human Interface Devices" -#device ukbd # Allow keyboard like HIDs to control console -device ums - -# USB Ethernet, requires miibus -#device miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB - -# USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs - -# Watchdog timer. -# WARNING: can't be disabled!!! -device imxwdt # Watchdog - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm - -# MMC -#device sdhci # SD controller -#device mmc # SD/MMC protocol -#device mmcsd # SDCard disk device - - # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=digi-ccwmx53.dts - -# NOTE: serial console will be disabled if syscons enabled -# Uncomment following lines for framebuffer/syscons support -#device sc -#device vt -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 Copied: stable/10/sys/arm/conf/IMX53 (from r271220, head/sys/arm/conf/IMX53) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/sys/arm/conf/IMX53 Fri Feb 13 19:52:16 2015 (r278696, copy of r271220, head/sys/arm/conf/IMX53) @@ -0,0 +1,173 @@ +# Kernel configuration for i.MX53 boards +# +# 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$ + +ident IMX53 + +include "../freescale/imx/std.imx53" + +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#options DEBUG + +options SCHED_4BSD # 4BSD scheduler +#options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +#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 MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL +options TMPFS # Efficient memory filesystem +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 +#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 +#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 +options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI +options KTRACE # ktrace(1) 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 INCLUDE_CONFIG_FILE # Include this file in kernel +options VFP # vfp/neon + +# kernel/memory size reduction +#options MUTEX_NOINLINE +#options NO_FFS_SNAPSHOT +#options NO_SWAPPING +#options NO_SYSCTL_DESCR +#options RWLOCK_NOINLINE + +# Debugging support. Always need this: +options KDB # Enable kernel debugger support. +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic. +# For full debugger support use this instead: +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 + +# 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 + +# Pseudo devices. +device loop # Network loopback +device random # Entropy device +device ether # Ethernet support +#device vlan # 802.1Q VLAN support +#device tun # Packet tunnel. +device md # Memory "disks" +#device gif # IPv6 and IPv4 tunneling +#device faith # IPv6-to-IPv4 relaying (translation) +#device firmware # firmware assist module + +# Ethernet +device ffec # Freescale Fast Ethernet Controller +device miibus # Standard mii bus + +# Serial (COM) ports +device uart # Multi-uart driver +options ALT_BREAK_TO_DEBUGGER + +device ata +device atapci # Only for helper functions +device imxata +options ATA_STATIC_ID # Static device numbering + +device gpio +device gpioled + +device fsliic +device iic +device iicbus + +# SCSI peripherals +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) + +# USB support +options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. +options USB_DEBUG # enable debug msgs +device ehci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +#device ukbd # Allow keyboard like HIDs to control console +device ums + +# USB Ethernet, requires miibus +#device miibus +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB + +# USB Wireless +#device rum # Ralink Technology RT2501USB wireless NICs + +# Watchdog timer. +# WARNING: can't be disabled!!! +device imxwdt # Watchdog + +# Wireless NIC cards +device wlan # 802.11 support +device wlan_wep # 802.11 WEP support +device wlan_ccmp # 802.11 CCMP support +device wlan_tkip # 802.11 TKIP support +device wlan_amrr # AMRR transmit rate control algorithm + +# MMC +#device sdhci # SD controller +#device mmc # SD/MMC protocol +#device mmcsd # SDCard disk device + + +# Flattened Device Tree +options FDT + +# NOTE: serial console will be disabled if syscons enabled +# Uncomment following lines for framebuffer/syscons support +#device sc +#device vt +#device kbdmux +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 Modified: stable/10/sys/arm/conf/IMX53-QSB ============================================================================== --- stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 19:44:04 2015 (r278695) +++ stable/10/sys/arm/conf/IMX53-QSB Fri Feb 13 19:52:16 2015 (r278696) @@ -17,49 +17,12 @@ # # $FreeBSD$ -ident IMX53-QSB - -include "../freescale/imx/std.imx53" +#NO_UNIVERSE -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG +include "IMX53" +ident IMX53-QSB options HZ=250 # 4ms scheduling quantum -options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -#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 MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -#options COMPAT_FREEBSD5 # Compatible with FreeBSD5 -#options COMPAT_FREEBSD6 # Compatible with FreeBSD6 -#options COMPAT_FREEBSD7 # Compatible with FreeBSD7 -options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE # ktrace(1) 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 INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon # required for netbooting #options BOOTP @@ -70,111 +33,6 @@ options VFP # vfp/neon #options ROOTDEVNAME=\"ufs:ada0s2a\" - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE - -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. -# For full debugger support use this instead: -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 - -# 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 - -# Pseudo devices. -device loop # Network loopback -device random # Entropy device -device ether # Ethernet support -#device vlan # 802.1Q VLAN support -#device tun # Packet tunnel. -device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling -#device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module - -# Ethernet -device ffec # Freescale Fast Ethernet Controller -device miibus # Standard mii bus - -# Serial (COM) ports -device uart # Multi-uart driver -options ALT_BREAK_TO_DEBUGGER - -#device ata -#device atapci # Only for helper functions -#device imxata -#options ATA_STATIC_ID # Static device numbering - -device gpio -device gpioled - -device fsliic -device iic -device iicbus - -# SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) - -# USB support -options USB_HOST_ALIGN=64 # Align usb buffers to cache line size. -#options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -#device uhid # "Human Interface Devices" -#device ukbd # Allow keyboard like HIDs to control console -#device ums - -# USB Ethernet, requires miibus -#device miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB - -# USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs - -# Watchdog timer. -# WARNING: can't be disabled!!! -device imxwdt # Watchdog - -# Wireless NIC cards -device wlan # 802.11 support -device wlan_wep # 802.11 WEP support -device wlan_ccmp # 802.11 CCMP support -device wlan_tkip # 802.11 TKIP support -device wlan_amrr # AMRR transmit rate control algorithm - # Flattened Device Tree -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=imx53-qsb.dts - -# NOTE: serial console will be disabled if syscons enabled -# Uncomment following lines for framebuffer/syscons support -#device sc -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 - From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 20:05:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65ABA616; Fri, 13 Feb 2015 20:05:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4700123F; Fri, 13 Feb 2015 20:05:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DK5cex064091; Fri, 13 Feb 2015 20:05:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DK5bGf064089; Fri, 13 Feb 2015 20:05:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132005.t1DK5bGf064089@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278698 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:05:38 -0000 Author: ian Date: Fri Feb 13 20:05:37 2015 New Revision: 278698 URL: https://svnweb.freebsd.org/changeset/base/278698 Log: MFC r263245, r269233, r267101, r275961: Config style cleanups. Some of these are effectively record-only merges, because the actual merge happened during conflict resolution of some prior merge. Modified: stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/RPI-B Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Fri Feb 13 19:58:53 2015 (r278697) +++ stable/10/sys/arm/conf/IMX6 Fri Feb 13 20:05:37 2015 (r278698) @@ -21,140 +21,140 @@ ident IMX6 include "../freescale/imx/std.imx6" options HZ=500 # Scheduling quantum is 2 milliseconds. -options SCHED_ULE # ULE scheduler -options PREEMPTION # Enable kernel thread preemption -options INET # InterNETworking -options INET6 # IPv6 communications protocols -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 MD_ROOT # MD is a potential root device -options NFSCL # New Network Filesystem Client -#options NFSD # New Network Filesystem Server -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCL +options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption +options INET # InterNETworking +options INET6 # IPv6 communications protocols +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 MD_ROOT # MD is a potential root device +options NFSCL # New Network Filesystem Client +#options NFSD # New Network Filesystem Server +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options TMPFS # Efficient memory filesystem -options MSDOSFS # MSDOS Filesystem -options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) -options PSEUDOFS # Pseudo-filesystem framework +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +#options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. -options GEOM_LABEL # Provides labelization -options KTRACE # ktrace(1) 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 INCLUDE_CONFIG_FILE # Include this file in kernel +options GEOM_PART_GPT # GUID Partition Tables. +options GEOM_LABEL # Provides labelization +options KTRACE # ktrace(1) 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 INCLUDE_CONFIG_FILE # Include this file in kernel # Debugging support. Always need this: -options KDB # Enable kernel debugger support. +options KDB # Enable kernel debugger support. # For minimum debugger support use KDB_TRACE, for interactive use DDB. -#options KDB_TRACE # Print a stack trace for a panic. -options DDB # Support DDB. +#options KDB_TRACE # Print a stack trace for a panic. +options DDB # Support DDB. # For full debugger support use this instead: -#options GDB # Support remote GDB. +#options GDB # Support remote GDB. # Other debugging options... makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. -#options DEBUG -#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 ALT_BREAK_TO_DEBUGGER # Use to enter debugger. +#options DEBUG +#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 # Pseudo devices. -device loop # Network loopback -device random # Entropy device -device vlan # 802.1Q VLAN support -device tun # Packet tunnel. -device md # Memory "disks" -#device gif # IPv6 and IPv4 tunneling +device loop # Network loopback +device random # Entropy device +device vlan # 802.1Q VLAN support +device tun # Packet tunnel. +device md # Memory "disks" #device faith # IPv6-to-IPv4 relaying (translation) -#device firmware # firmware assist module -device ether # Ethernet support -device miibus # Required for ethernet -device bpf # Berkeley packet filter (required for DHCP) +#device gif # IPv6 and IPv4 tunneling +#device firmware # firmware assist module +device ether # Ethernet support +device miibus # Required for ethernet +device bpf # Berkeley packet filter (required for DHCP) # General-purpose input/output device gpio # Serial (COM) ports -device uart # Multi-uart driver +device uart # Multi-uart driver # SDCard -device sdhci # SD controller -device mmc # SD/MMC protocol -device mmcsd # SDCard disk device +device sdhci # SD controller +device mmc # SD/MMC protocol +device mmcsd # SDCard disk device # SCSI peripherals -device scbus # SCSI bus (required for ATA/SCSI) -device da # Direct Access (disks) -device cd # CD -device pass # Passthrough device (direct ATA/SCSI access) +device scbus # SCSI bus (required for ATA/SCSI) +device da # Direct Access (disks) +device cd # CD +device pass # Passthrough device (direct ATA/SCSI access) # USB support -#options USB_DEBUG # enable debug msgs -device ehci # OHCI USB interface -device usb # USB Bus (required) -device umass # Disks/Mass storage - Requires scbus and da -device uhid # "Human Interface Devices" -device u3g # USB modems -#device ukbd # Allow keyboard like HIDs to control console -#device ums # USB mouse +#options USB_DEBUG # enable debug msgs +device ehci # OHCI USB interface +device usb # USB Bus (required) +device umass # Disks/Mass storage - Requires scbus and da +device uhid # "Human Interface Devices" +device u3g # USB modems +#device ukbd # Allow keyboard like HIDs to control console +#device ums # USB mouse # USB Ethernet, requires miibus -#device aue # ADMtek USB Ethernet -#device axe # ASIX Electronics USB Ethernet -#device cdce # Generic USB over Ethernet -#device cue # CATC USB Ethernet -#device kue # Kawasaki LSI USB Ethernet -#device rue # RealTek RTL8150 USB Ethernet -#device udav # Davicom DM9601E USB +#device aue # ADMtek USB Ethernet +#device axe # ASIX Electronics USB Ethernet +#device cdce # Generic USB over Ethernet +#device cue # CATC USB Ethernet +#device kue # Kawasaki LSI USB Ethernet +#device rue # RealTek RTL8150 USB Ethernet +#device udav # Davicom DM9601E USB # USB Wireless -#device rum # Ralink Technology RT2501USB wireless NICs +#device rum # Ralink Technology RT2501USB wireless NICs # Wireless NIC cards -#device wlan # 802.11 support -#device wlan_wep # 802.11 WEP support -#device wlan_ccmp # 802.11 CCMP support -#device wlan_tkip # 802.11 TKIP support -#device wlan_amrr # AMRR transmit rate control algorithm +#device wlan # 802.11 support +#device wlan_wep # 802.11 WEP support +#device wlan_ccmp # 802.11 CCMP support +#device wlan_tkip # 802.11 TKIP support +#device wlan_amrr # AMRR transmit rate control algorithm # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support # Wandboard has no video console support yet. -#device sc -#device kbdmux -#options SC_DFLT_FONT # compile font in -#makeoptions SC_DFLT_FONT=cp437 +#device sc +#device kbdmux +#options SC_DFLT_FONT # compile font in +#makeoptions SC_DFLT_FONT=cp437 # required for netbooting -#options BOOTP -#options BOOTP_COMPAT -#options BOOTP_NFSROOT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ffec0 +#options BOOTP +#options BOOTP_COMPAT +#options BOOTP_NFSROOT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 # U-Boot stuff lives on slice 1, FreeBSD on slice 2. -options ROOTDEVNAME=\"ufs:mmcsd0s2a\" +options ROOTDEVNAME=\"ufs:mmcsd0s2a\" # ARM and SoC-specific options -options FDT # Configure using FDT/DTB data. -options SMP # Enable multiple cores -options VFP # Enable floating point hardware support -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options FDT # Configure using FDT/DTB data. +options SMP # Enable multiple cores +options VFP # Enable floating point hardware support +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) # SoC-specific devices -device ffec # Freescale Fast Ethernet Controller -device fsliic # Freescale i2c/iic -device iic # iic protocol -device iicbus # iic bus -#device imxwdt # Watchdog. WARNING: can't be disabled!!! +device ffec # Freescale Fast Ethernet Controller +device fsliic # Freescale i2c/iic +device iic # iic protocol +device iicbus # iic bus +#device imxwdt # Watchdog. WARNING: can't be disabled!!! Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Fri Feb 13 19:58:53 2015 (r278697) +++ stable/10/sys/arm/conf/RPI-B Fri Feb 13 20:05:37 2015 (r278698) @@ -71,8 +71,6 @@ device pty # Comment following lines for boot console on serial port device vt device kbdmux -options SC_DFLT_FONT # compile font in -makeoptions SC_DFLT_FONT=cp437 device ukbd device sdhci From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 20:15:13 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48C8C92A; Fri, 13 Feb 2015 20:15: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 3276D369; Fri, 13 Feb 2015 20:15: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 t1DKFDvm068843; Fri, 13 Feb 2015 20:15:13 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKFAEO068828; Fri, 13 Feb 2015 20:15:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132015.t1DKFAEO068828@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278699 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:15:13 -0000 Author: ian Date: Fri Feb 13 20:15:10 2015 New Revision: 278699 URL: https://svnweb.freebsd.org/changeset/base/278699 Log: MFC r276003: Start to clean up the armv6 kernel configs by reducing the diff between them in the first sections and the later FDT support. Modified: stable/10/sys/arm/conf/ARMADAXP stable/10/sys/arm/conf/BEAGLEBONE stable/10/sys/arm/conf/CUBIEBOARD stable/10/sys/arm/conf/CUBIEBOARD2 stable/10/sys/arm/conf/EFIKA_MX stable/10/sys/arm/conf/EXYNOS5.common stable/10/sys/arm/conf/IMX53 stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/PANDABOARD stable/10/sys/arm/conf/RPI-B stable/10/sys/arm/conf/VERSATILEPB stable/10/sys/arm/conf/VYBRID stable/10/sys/arm/conf/ZEDBOARD Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/ARMADAXP ============================================================================== --- stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/ARMADAXP Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,22 @@ # # Custom kernel for Marvell Armada XP # -# $FreeBSD$ +# 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$ ident MV-88F78XX0 include "../mv/armadaxp/std.mv78x60" @@ -10,58 +24,75 @@ include "../mv/armadaxp/std.mv78x60" options SOC_MV_ARMADAXP makeoptions MODULES_OVERRIDE="" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" +options HZ=1000 #options SCHED_ULE # ULE scheduler options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem -options NFSCL # Network Filesystem Client +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 NFSCL # New Network Filesystem Client options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT -options BOOTP -options BOOTP_NFSROOT -options BOOTP_NFSV3 -options BOOTP_WIRED_TO=mge0 - +options NFS_ROOT # NFS usable as /, requires NFSCL +options MSDOSFS # MSDOS Filesystem +options CD9660 # ISO 9660 Filesystem +options PROCFS # Process filesystem (requires PSEUDOFS) +options PSEUDOFS # Pseudo-filesystem framework options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT -options ROOTDEVNAME=\"ufs:/dev/da0p1\" - +options KTRACE # ktrace(1) 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 MUTEX_NOINLINE -options RWLOCK_NOINLINE -options NO_FFS_SNAPSHOT -options NO_SWAPPING -options VFP - -options SMP +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging -#options VERBOSE_SYSINIT +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +#options VERBOSE_SYSINIT # Enable verbose sysinit messages options ALT_BREAK_TO_DEBUGGER -options DDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger options GDB -#options DIAGNOSTIC #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS -options KDB -options KDB_TRACE +#options WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed +#options WITNESS_KDB +#options DIAGNOSTIC #options KTR #options KTR_VERBOSE=0 #options KTR_ENTRIES=16384 #options KTR_MASK=(KTR_SPARE2) #options KTR_COMPILE=KTR_ALL -#options WITNESS # Enable checks to detect deadlocks and cycles -#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed -#options WITNESS_KDB + +# NFS root from boopt/dhcp +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=mge0 + +options ROOTDEVNAME=\"ufs:/dev/da0p1\" + +options MUTEX_NOINLINE +options RWLOCK_NOINLINE +options NO_FFS_SNAPSHOT +options NO_SWAPPING # Pseudo devices device random @@ -94,14 +125,13 @@ device mge # Marvell Gigabit Ethernet device mii device e1000phy device bpf -options HZ=1000 options DEVICE_POLLING device vlan #PCI/PCIE device pci -#FDT -options FDT +# Flattened Device Tree +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=db78460.dts Modified: stable/10/sys/arm/conf/BEAGLEBONE ============================================================================== --- stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/BEAGLEBONE Fri Feb 13 20:15:10 2015 (r278699) @@ -1,10 +1,11 @@ +# # BEAGLEBONE -- Custom configuration for the BeagleBone ARM development # platforms, check out http://www.beagleboard.org/bone and # http://www.beagleboard.org/black. This kernel config file is used for the # original BeagleBone and the BeagleBone Black. # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# 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 # @@ -28,36 +29,46 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +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 GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) 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 _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -65,19 +76,19 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL +# NFS server support #options NFSD -options NFSLOCKD -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 +# Boot device is 2nd slice on MMC/SD card +options ROOTDEVNAME=\"ufs:mmcsd0s2\" + # MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards @@ -89,9 +100,6 @@ device iic device ti_i2c device am335x_pmic # AM335x Power Management IC (TPC65217) -# Boot device is 2nd slice on MMC/SD card -options ROOTDEVNAME=\"ufs:mmcsd0s2\" - device am335x_rtc # RTC support (power management only) # Console and misc @@ -149,6 +157,6 @@ device usb_template # Control of th device usfs # Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=beaglebone.dts +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=beaglebone.dts Modified: stable/10/sys/arm/conf/CUBIEBOARD ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/CUBIEBOARD Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,9 @@ +# # CUBIEBOARD -- Custom configuration for the CUBIEBOARD ARM development # platform, check out http://www.cubieboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# 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 # @@ -27,36 +28,46 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_4BSD # 4BSD scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +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 NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) 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 _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -64,26 +75,20 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL -#options NFSSERVER # Network Filesystem Server -#options NFSCLIENT # Network Filesystem Client - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 -# MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards - # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# MMC/SD/SDIO Card slot support +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards + # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers @@ -134,7 +139,7 @@ device emac device miibus # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard.dts Modified: stable/10/sys/arm/conf/CUBIEBOARD2 ============================================================================== --- stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/CUBIEBOARD2 Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,9 @@ +# # CUBIEBOARD2 -- Custom configuration for the CUBIEBOARD2 ARM development # platform, check out http://www.cubieboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# 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 # @@ -27,36 +28,47 @@ makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +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 NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) 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 _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -64,26 +76,20 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -#options NFSCL -#options NFSSERVER # Network Filesystem Server -#options NFSCLIENT # Network Filesystem Client - -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=cpsw0 -# MMC/SD/SDIO card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards - # Boot device is 2nd slice on MMC/SD card options ROOTDEVNAME=\"ufs:/dev/da0s2\" +# MMC/SD/SDIO Card slot support +#device mmc # mmc/sd bus +#device mmcsd # mmc/sd flash cards + # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers @@ -134,8 +140,7 @@ device emac device miibus # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=cubieboard2.dts -options SMP # Enable multiple cores Modified: stable/10/sys/arm/conf/EFIKA_MX ============================================================================== --- stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/EFIKA_MX Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for Efika MX Smarttop/Smartbook boards # # For more information on this file, please read the config(5) manual page, @@ -23,32 +24,30 @@ include "../freescale/imx/std.imx51" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking -#options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +options INET6 # IPv6 communications protocols +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 NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization #options COMPAT_FREEBSD5 # Compatible with FreeBSD5 #options COMPAT_FREEBSD6 # Compatible with FreeBSD6 @@ -59,16 +58,33 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon +options VFP # Enable floating point hardware support -# required for netbooting +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options BREAK_TO_DEBUGGER +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: +options DDB # Enable the kernel debugger +#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 + +# NFS root from boopt/dhcp #options BOOTP -#options BOOTP_COMPAT #options BOOTP_NFSROOT +#options BOOTP_COMPAT #options BOOTP_NFSV3 #options BOOTP_WIRED_TO=ue0 -# + options ROOTDEVNAME=\"ufs:ada0s2a\" @@ -163,9 +179,9 @@ device wlan_tkip # 802.11 TKIP support device wlan_amrr # AMRR transmit rate control algorithm # Flattened Device Tree -options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=efikamx.dts +options FDT # Configure using FDT/DTB data +options FDT_DTB_STATIC +makeoptions FDT_DTS_FILE=efikamx.dts # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support Modified: stable/10/sys/arm/conf/EXYNOS5.common ============================================================================== --- stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/EXYNOS5.common Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for Samsung Exynos 5 SoC. # # For more information on this file, please read the config(5) manual page, @@ -20,70 +21,72 @@ makeoptions MODULES_OVERRIDE="" makeoptions WITHOUT_MODULES="ahc" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" options HZ=100 options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -options GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID partition tables -options TMPFS # Efficient memory filesystem +options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem -options SOFTUPDATES +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 NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI -options KTRACE +options KTRACE # ktrace(1) 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 KBD_INSTALL_CDEV -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon +options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -options SMP - -# Debugging +# Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER -#options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +#options VERBOSE_SYSINIT # Enable verbose sysinit messages +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #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 WITNESS # Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL # Network Filesystem Client -options NFSLOCKD # Network Lock Manager -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ue0 -# Uncomment this for NFS root -#options NFS_ROOT # NFS usable as /, requires NFSCL -#options BOOTP_NFSROOT -#options BOOTP_COMPAT -#options BOOTP -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ue0 +options ROOTDEVNAME=\"ufs:/dev/da0\" +# MMC/SD/SDIO Card slot support device mmc # mmc/sd bus device mmcsd # mmc/sd flash cards device sdhci # generic sdhci -options ROOTDEVNAME=\"ufs:/dev/da0\" - # Pseudo devices device loop Modified: stable/10/sys/arm/conf/IMX53 ============================================================================== --- stable/10/sys/arm/conf/IMX53 Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/IMX53 Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for i.MX53 boards # # For more information on this file, please read the config(5) manual page, @@ -21,32 +22,29 @@ ident IMX53 include "../freescale/imx/std.imx53" -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols -#options DEBUG - options SCHED_4BSD # 4BSD scheduler -#options PREEMPTION # Enable kernel thread preemption +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols -#options SCTP # Stream Control Transmission Protocol +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 MD_ROOT # MD is a potential root device +options QUOTA # Enable disk quotas for UFS options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization #options COMPAT_FREEBSD5 # Compatible with FreeBSD5 #options COMPAT_FREEBSD6 # Compatible with FreeBSD6 @@ -57,27 +55,30 @@ options SYSVSHM # SYSV-style shared m options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions +options KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel -options VFP # vfp/neon - -# kernel/memory size reduction -#options MUTEX_NOINLINE -#options NO_FFS_SNAPSHOT -#options NO_SWAPPING -#options NO_SYSCTL_DESCR -#options RWLOCK_NOINLINE +options VFP # Enable floating point hardware support -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: -#options KDB_TRACE # Print a stack trace for a panic. +#options KDB_TRACE # Print a stack trace for a panic # For full debugger support use this instead: -options DDB # Support DDB. -#options GDB # Support remote GDB. +options DDB # Enable the kernel debugger +#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 + +# kernel/memory size reduction +#options MUTEX_NOINLINE +#options NO_FFS_SNAPSHOT +#options NO_SWAPPING +#options NO_SYSCTL_DESCR +#options RWLOCK_NOINLINE # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! @@ -162,7 +163,7 @@ device wlan_amrr # AMRR transmit rate # Flattened Device Tree -options FDT +options FDT # Configure using FDT/DTB data # NOTE: serial console will be disabled if syscons enabled # Uncomment following lines for framebuffer/syscons support Modified: stable/10/sys/arm/conf/IMX6 ============================================================================== --- stable/10/sys/arm/conf/IMX6 Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/IMX6 Fri Feb 13 20:15:10 2015 (r278699) @@ -1,3 +1,4 @@ +# # Kernel configuration for Freescale i.MX6 systems. # # For more information on this file, please read the config(5) manual page, @@ -20,7 +21,7 @@ ident IMX6 include "../freescale/imx/std.imx6" -options HZ=500 # Scheduling quantum is 2 milliseconds. +options HZ=500 # Scheduling quantum is 2 milliseconds. options SCHED_ULE # ULE scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking @@ -31,42 +32,57 @@ options SOFTUPDATES # Enable FFS soft 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 MD_ROOT # MD is a potential root device +options QUOTA # Enable disk quotas for UFS options NFSCL # New Network Filesystem Client #options NFSD # New Network Filesystem Server options NFSLOCKD # Network Lock Manager options NFS_ROOT # NFS usable as /, requires NFSCL -options TMPFS # Efficient memory filesystem options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem -#options PROCFS # Process filesystem (requires PSEUDOFS) +options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables options GEOM_PART_BSD # BSD partition scheme options GEOM_PART_MBR # MBR partition scheme -options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options KTRACE # ktrace(1) 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 KBD_INSTALL_CDEV # install a CDEV entry in /dev options INCLUDE_CONFIG_FILE # Include this file in kernel +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores -# Debugging support. Always need this: -options KDB # Enable kernel debugger support. -# For minimum debugger support use KDB_TRACE, for interactive use DDB. -#options KDB_TRACE # Print a stack trace for a panic. -options DDB # Support DDB. +# Debugging for use in -current +makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic # For full debugger support use this instead: +options DDB # Enable the kernel debugger #options GDB # Support remote GDB. # Other debugging options... -makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options ALT_BREAK_TO_DEBUGGER # Use to enter debugger. -#options DEBUG #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 DIAGNOSTIC + +# NFS root from boopt/dhcp +#options BOOTP +#options BOOTP_NFSROOT +#options BOOTP_COMPAT +#options BOOTP_NFSV3 +#options BOOTP_WIRED_TO=ffec0 + +# U-Boot stuff lives on slice 1, FreeBSD on slice 2. +options ROOTDEVNAME=\"ufs:mmcsd0s2a\" # Pseudo devices. device loop # Network loopback @@ -135,21 +151,8 @@ device u3g # USB modems #options SC_DFLT_FONT # compile font in #makeoptions SC_DFLT_FONT=cp437 -# required for netbooting -#options BOOTP -#options BOOTP_COMPAT -#options BOOTP_NFSROOT -#options BOOTP_NFSV3 -#options BOOTP_WIRED_TO=ffec0 - -# U-Boot stuff lives on slice 1, FreeBSD on slice 2. -options ROOTDEVNAME=\"ufs:mmcsd0s2a\" - -# ARM and SoC-specific options -options FDT # Configure using FDT/DTB data. -options SMP # Enable multiple cores -options VFP # Enable floating point hardware support -options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +# Flattened Device Tree +options FDT # Configure using FDT/DTB data # SoC-specific devices device ffec # Freescale Fast Ethernet Controller Modified: stable/10/sys/arm/conf/PANDABOARD ============================================================================== --- stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 20:05:37 2015 (r278698) +++ stable/10/sys/arm/conf/PANDABOARD Fri Feb 13 20:15:10 2015 (r278699) @@ -1,8 +1,9 @@ +# # PANDABOARD -- Custom configuration for the PandaBoard ARM development # platform, check out www.pandaboard.org # -# For more information on this file, please read the handbook section on -# Kernel Configuration Files: +# 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 # @@ -28,43 +29,52 @@ hints "PANDABOARD.hints" include "../ti/omap4/pandaboard/std.pandaboard" -#To statically compile in device wiring instead of /boot/device.hints makeoptions MODULES_OVERRIDE="" -makeoptions WITHOUT_MODULES="ahc" +makeoptions WITHOUT_MODULES="ahc" options HZ=100 options SCHED_ULE # ULE scheduler +options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols +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 GEOM_PART_BSD # BSD partition scheme -options GEOM_PART_MBR # MBR partition scheme -options TMPFS # Efficient memory filesystem +options UFS_GJOURNAL # Enable gjournal-based UFS journaling +options QUOTA # Enable disk quotas for UFS +options NFSCL # New Network Filesystem Client +options NFSLOCKD # Network Lock Manager +options NFS_ROOT # NFS usable as /, requires NFSCL options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework +options TMPFS # Efficient memory filesystem +options GEOM_PART_GPT # GUID Partition Tables +options GEOM_PART_BSD # BSD partition scheme +options GEOM_PART_MBR # MBR partition scheme options COMPAT_43 # Compatible with BSD 4.3 [KEEP THIS!] options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) 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 _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options PREEMPTION -options FREEBSD_BOOT_LOADER -options VFP # vfp/neon -options SMP # Enable multiple cores +options FREEBSD_BOOT_LOADER # Process metadata passed from loader(8) +options VFP # Enable floating point hardware support +options SMP # Enable multiple cores # Debugging for use in -current makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options BREAK_TO_DEBUGGER #options VERBOSE_SYSINIT # Enable verbose sysinit messages -options KDB +options KDB # Enable kernel debugger support +# For minimum debugger support (stable branch) use: +#options KDB_TRACE # Print a stack trace for a panic +# For full debugger support use this instead: options DDB # Enable the kernel debugger #options INVARIANTS # Enable calls of extra sanity checking #options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS @@ -72,14 +82,10 @@ options DDB # Enable the kernel debug #options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed #options DIAGNOSTIC -# NFS support -options NFSCL - -# NFS root -options NFS_ROOT # NFS usable as /, requires NFSCLIENT +# NFS root from boopt/dhcp +#options BOOTP #options BOOTP_NFSROOT #options BOOTP_COMPAT -#options BOOTP *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 20:18:30 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4075CAE6; Fri, 13 Feb 2015 20: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 2B4DC398; Fri, 13 Feb 2015 20: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 t1DKIUGv069281; Fri, 13 Feb 2015 20:18:30 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKIUpG069280; Fri, 13 Feb 2015 20:18:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132018.t1DKIUpG069280@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:18:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278700 - stable/10/sys/arm/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:18:30 -0000 Author: ian Date: Fri Feb 13 20:18:29 2015 New Revision: 278700 URL: https://svnweb.freebsd.org/changeset/base/278700 Log: MFC r277037: Enable ALT_BREAK_TO_DEBUGGER for rpi. Modified: stable/10/sys/arm/conf/RPI-B Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/RPI-B ============================================================================== --- stable/10/sys/arm/conf/RPI-B Fri Feb 13 20:15:10 2015 (r278699) +++ stable/10/sys/arm/conf/RPI-B Fri Feb 13 20:18:29 2015 (r278700) @@ -59,6 +59,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-stable@FreeBSD.ORG Fri Feb 13 20:21:15 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06C5ECBD; Fri, 13 Feb 2015 20:21: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 CC368642; Fri, 13 Feb 2015 20:21: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 t1DKLE2e072690; Fri, 13 Feb 2015 20:21:14 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKLEot072689; Fri, 13 Feb 2015 20:21:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132021.t1DKLEot072689@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:21:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278701 - stable/10/sys/arm/xilinx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:21:15 -0000 Author: ian Date: Fri Feb 13 20:21:13 2015 New Revision: 278701 URL: https://svnweb.freebsd.org/changeset/base/278701 Log: MFC r277265: Enable the snoop control unit during MP startup Modified: stable/10/sys/arm/xilinx/zy7_mp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/xilinx/zy7_mp.c ============================================================================== --- stable/10/sys/arm/xilinx/zy7_mp.c Fri Feb 13 20:18:29 2015 (r278700) +++ stable/10/sys/arm/xilinx/zy7_mp.c Fri Feb 13 20:21:13 2015 (r278701) @@ -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-stable@FreeBSD.ORG Fri Feb 13 20:23:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0162BE04; Fri, 13 Feb 2015 20:23: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 E0181659; Fri, 13 Feb 2015 20:23: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 t1DKN6qN073459; Fri, 13 Feb 2015 20:23:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKN6v7073458; Fri, 13 Feb 2015 20:23:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132023.t1DKN6v7073458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278702 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:23:07 -0000 Author: ian Date: Fri Feb 13 20:23:06 2015 New Revision: 278702 URL: https://svnweb.freebsd.org/changeset/base/278702 Log: MFC r277305: Minor cleanups, comment changes. Modified: stable/10/sys/arm/arm/locore-v6.S Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/locore-v6.S ============================================================================== --- stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 20:21:13 2015 (r278701) +++ stable/10/sys/arm/arm/locore-v6.S Fri Feb 13 20:23:06 2015 (r278702) @@ -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-stable@FreeBSD.ORG Fri Feb 13 20:38:41 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0DDAE349; Fri, 13 Feb 2015 20:38: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 EC93C7F6; Fri, 13 Feb 2015 20:38: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 t1DKceuM079142; Fri, 13 Feb 2015 20:38:40 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKcefP079137; Fri, 13 Feb 2015 20:38:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132038.t1DKcefP079137@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:38:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278703 - in stable/10/sys: arm/broadcom/bcm2835 dev/sdhci X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:38:41 -0000 Author: ian Date: Fri Feb 13 20:38:39 2015 New Revision: 278703 URL: https://svnweb.freebsd.org/changeset/base/278703 Log: MFC r277306, r277307, r277346: Add defines for SDHCI 3.0 controllers. Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Save the command-and-flags value into shadow register when it is written. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c stable/10/sys/dev/sdhci/sdhci.c stable/10/sys/dev/sdhci/sdhci.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 20:23:06 2015 (r278702) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Fri Feb 13 20:38:39 2015 (r278703) @@ -232,6 +232,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); @@ -401,8 +402,11 @@ bcm_sdhci_write_2(device_t dev, struct s val32 |= (val << (off & 3)*8); if (off == SDHCI_TRANSFER_MODE) sc->cmd_and_mode = val32; - else + else { WR4(sc, off & ~3, val32); + if (off == SDHCI_COMMAND_FLAGS) + sc->cmd_and_mode = val32; + } } static void Modified: stable/10/sys/dev/sdhci/sdhci.c ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 20:23:06 2015 (r278702) +++ stable/10/sys/dev/sdhci/sdhci.c Fri Feb 13 20:38:39 2015 (r278703) @@ -697,7 +697,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: stable/10/sys/dev/sdhci/sdhci.h ============================================================================== --- stable/10/sys/dev/sdhci/sdhci.h Fri Feb 13 20:23:06 2015 (r278702) +++ stable/10/sys/dev/sdhci/sdhci.h Fri Feb 13 20:38:39 2015 (r278703) @@ -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 @@ -169,6 +171,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 +186,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 +202,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 +222,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-stable@FreeBSD.ORG Fri Feb 13 20:49:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 649CE742; Fri, 13 Feb 2015 20:49: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 4F8528E4; Fri, 13 Feb 2015 20:49: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 t1DKnogR084001; Fri, 13 Feb 2015 20:49:50 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DKnoqq084000; Fri, 13 Feb 2015 20:49:50 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132049.t1DKnoqq084000@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 20:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278705 - stable/10/share/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:49:50 -0000 Author: ian Date: Fri Feb 13 20:49:49 2015 New Revision: 278705 URL: https://svnweb.freebsd.org/changeset/base/278705 Log: MFC r277355: For armv6 builds, add -mfloat-abi=softfp. Modified: stable/10/share/mk/bsd.cpu.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.cpu.mk ============================================================================== --- stable/10/share/mk/bsd.cpu.mk Fri Feb 13 20:49:43 2015 (r278704) +++ stable/10/share/mk/bsd.cpu.mk Fri Feb 13 20:49:49 2015 (r278705) @@ -257,6 +257,10 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 CFLAGS += -G0 .endif +.if ${MACHINE_ARCH} == "armv6" +_CPUCFLAGS += -mfloat-abi=softfp +.endif + # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk .if !defined(NO_CPU_CFLAGS) From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:19:03 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B46C9F73; Fri, 13 Feb 2015 21:19: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 9CB2BC0C; Fri, 13 Feb 2015 21:19: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 t1DLJ32c098482; Fri, 13 Feb 2015 21:19:03 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLJ3Vq098480; Fri, 13 Feb 2015 21:19:03 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132119.t1DLJ3Vq098480@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:19:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278709 - in stable: 10/contrib/llvm/lib/Target/ARM 10/contrib/llvm/patches 9/contrib/llvm/lib/Target/ARM 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:19:03 -0000 Author: dim Date: Fri Feb 13 21:19:02 2015 New Revision: 278709 URL: https://svnweb.freebsd.org/changeset/base/278709 Log: MFC r271025, r271029, r271030 (by sbruno): MFV: Only emit movw on ARMv6T2 Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS in base doesn't understand this instruction for this target. One would need to use --integrated-as to get this to build if desired. http://llvm.org/viewvc/llvm-project?view=revision&revision=216989 Submitted by: ian Reviewed by: dim Obtained from: llvm.org Added: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td ============================================================================== --- stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 20:58:10 2015 (r278708) +++ stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 21:19:02 2015 (r278709) @@ -3248,7 +3248,8 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_655 def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, + Requires<[IsARM, HasV6T2]>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function Copied: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff (from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Fri Feb 13 21:19:02 2015 (r278709, copy of r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) @@ -0,0 +1,14 @@ +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td (revision 271024) ++++ lib/Target/ARM/ARMInstrInfo.td (revision 271026) +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:19:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9AD76F74; Fri, 13 Feb 2015 21:19: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 8399CC0D; Fri, 13 Feb 2015 21:19: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 t1DLJ4Dn098492; Fri, 13 Feb 2015 21:19:04 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLJ4Vg098490; Fri, 13 Feb 2015 21:19:04 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132119.t1DLJ4Vg098490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:19:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278709 - in stable: 10/contrib/llvm/lib/Target/ARM 10/contrib/llvm/patches 9/contrib/llvm/lib/Target/ARM 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:19:04 -0000 Author: dim Date: Fri Feb 13 21:19:02 2015 New Revision: 278709 URL: https://svnweb.freebsd.org/changeset/base/278709 Log: MFC r271025, r271029, r271030 (by sbruno): MFV: Only emit movw on ARMv6T2 Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS in base doesn't understand this instruction for this target. One would need to use --integrated-as to get this to build if desired. http://llvm.org/viewvc/llvm-project?view=revision&revision=216989 Submitted by: ian Reviewed by: dim Obtained from: llvm.org Added: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff - copied unchanged from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Directory Properties: stable/9/contrib/llvm/ (props changed) Modified: stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td ============================================================================== --- stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 20:58:10 2015 (r278708) +++ stable/10/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td Fri Feb 13 21:19:02 2015 (r278709) @@ -3248,7 +3248,8 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_655 def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, + Requires<[IsARM, HasV6T2]>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function Copied: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff (from r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Fri Feb 13 21:19:02 2015 (r278709, copy of r271029, head/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff) @@ -0,0 +1,14 @@ +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td (revision 271024) ++++ lib/Target/ARM/ARMInstrInfo.td (revision 271026) +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:19:56 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C94025E; Fri, 13 Feb 2015 21:19: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 2CDCBC1B; Fri, 13 Feb 2015 21:19: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 t1DLJuC6098653; Fri, 13 Feb 2015 21:19:56 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLJsDu098648; Fri, 13 Feb 2015 21:19:54 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132119.t1DLJsDu098648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278710 - in stable/10: libexec share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:19:56 -0000 Author: ngie Date: Fri Feb 13 21:19:54 2015 New Revision: 278710 URL: https://svnweb.freebsd.org/changeset/base/278710 Log: MFC r277676: r277676: Add MK_TALK knob for building the talk and talkd Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_TALK - copied unchanged from r277676, head/tools/build/options/WITHOUT_TALK Modified: stable/10/libexec/Makefile stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.bin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/libexec/Makefile ============================================================================== --- stable/10/libexec/Makefile Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/libexec/Makefile Fri Feb 13 21:19:54 2015 (r278710) @@ -26,7 +26,6 @@ SUBDIR= ${_atf} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - talkd \ tcpd \ ${_telnetd} \ ${_tests} \ @@ -74,6 +73,10 @@ _mail.local= mail.local _smrsh= smrsh .endif +.if ${MK_TALK} != "no" +SUBDIR+= talkd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/share/mk/bsd.own.mk Fri Feb 13 21:19:54 2015 (r278710) @@ -357,6 +357,7 @@ __DEFAULT_YES_OPTIONS = \ SYMVER \ SYSCONS \ SYSINSTALL \ + TALK \ TCSH \ TELNET \ TEXTPROC \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:19:54 2015 (r278710) @@ -4221,6 +4221,13 @@ OLD_DIRS+=usr/share/doc/pjdfstest # to be filled in #.endif +.if ${MK_TALK} == no +OLD_FILES+=usr/bin/talk +OLD_FILES+=usr/libexec/ntalkd +OLD_FILES+=usr/share/man/man1/talk.1.gz +OLD_FILES+=usr/share/man/man8/talkd.8.gz +.endif + .if ${MK_TCSH} == no OLD_FILES+=bin/csh OLD_FILES+=bin/tcsh Copied: stable/10/tools/build/options/WITHOUT_TALK (from r277676, head/tools/build/options/WITHOUT_TALK) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_TALK Fri Feb 13 21:19:54 2015 (r278710, copy of r277676, head/tools/build/options/WITHOUT_TALK) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . Modified: stable/10/usr.bin/Makefile ============================================================================== --- stable/10/usr.bin/Makefile Fri Feb 13 21:19:02 2015 (r278709) +++ stable/10/usr.bin/Makefile Fri Feb 13 21:19:54 2015 (r278710) @@ -155,7 +155,6 @@ SUBDIR= alias \ systat \ tabs \ tail \ - talk \ tar \ tcopy \ tee \ @@ -336,6 +335,10 @@ SUBDIR+= rwho SUBDIR+= vacation .endif +.if ${MK_TALK} != "no" +SUBDIR+= talk +.endif + .if ${MK_TELNET} != "no" SUBDIR+= telnet .endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:21:54 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9F7C5D3; Fri, 13 Feb 2015 21:21: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 C1A98CC9; Fri, 13 Feb 2015 21:21: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 t1DLLrLk002688; Fri, 13 Feb 2015 21:21:53 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLLqd9002682; Fri, 13 Feb 2015 21:21:52 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132121.t1DLLqd9002682@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:21:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278712 - in stable/9: libexec share/mk tools/build/mk tools/build/options usr.bin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:21:54 -0000 Author: ngie Date: Fri Feb 13 21:21:51 2015 New Revision: 278712 URL: https://svnweb.freebsd.org/changeset/base/278712 Log: MFstable/10 r278710: r278710: MFC r277676: r277676: Add MK_TALK knob for building the talk and talkd Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_TALK - copied unchanged from r278710, stable/10/tools/build/options/WITHOUT_TALK Modified: stable/9/libexec/Makefile stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.bin/Makefile Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.bin/ (props changed) Modified: stable/9/libexec/Makefile ============================================================================== --- stable/9/libexec/Makefile Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/libexec/Makefile Fri Feb 13 21:21:51 2015 (r278712) @@ -24,7 +24,6 @@ SUBDIR= ${_atrun} \ ${_rtld-elf} \ save-entropy \ ${_smrsh} \ - talkd \ tcpd \ ${_telnetd} \ tftpd \ @@ -67,6 +66,10 @@ _mail.local= mail.local _smrsh= smrsh .endif +.if ${MK_TALK} != "no" +SUBDIR+= talkd +.endif + .if ${MK_TELNET} != "no" _telnetd= telnetd .endif Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:21:51 2015 (r278712) @@ -427,6 +427,7 @@ __DEFAULT_YES_OPTIONS = \ SYSINSTALL \ SYMVER \ SYSCONS \ + TALK \ TCSH \ TELNET \ TEXTPROC \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:21:51 2015 (r278712) @@ -3827,6 +3827,13 @@ OLD_FILES+=usr/share/sendmail/cf/sitecon # to be filled in #.endif +.if ${MK_TALK} == no +OLD_FILES+=usr/bin/talk +OLD_FILES+=usr/libexec/ntalkd +OLD_FILES+=usr/share/man/man1/talk.1.gz +OLD_FILES+=usr/share/man/man8/talkd.8.gz +.endif + .if ${MK_TCSH} == no OLD_FILES+=bin/csh OLD_FILES+=bin/tcsh Copied: stable/9/tools/build/options/WITHOUT_TALK (from r278710, stable/10/tools/build/options/WITHOUT_TALK) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_TALK Fri Feb 13 21:21:51 2015 (r278712, copy of r278710, stable/10/tools/build/options/WITHOUT_TALK) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . Modified: stable/9/usr.bin/Makefile ============================================================================== --- stable/9/usr.bin/Makefile Fri Feb 13 21:21:38 2015 (r278711) +++ stable/9/usr.bin/Makefile Fri Feb 13 21:21:51 2015 (r278712) @@ -150,7 +150,6 @@ SUBDIR= alias \ systat \ tabs \ tail \ - talk \ tar \ tcopy \ tee \ @@ -311,6 +310,10 @@ SUBDIR+= rwho SUBDIR+= vacation .endif +.if ${MK_TALK} != "no" +SUBDIR+= talk +.endif + .if ${MK_TELNET} != "no" SUBDIR+= telnet .endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:24:34 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD249864; Fri, 13 Feb 2015 21:24: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 ADCEBCEA; Fri, 13 Feb 2015 21:24: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 t1DLOYQx003124; Fri, 13 Feb 2015 21:24:34 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLOX3l003120; Fri, 13 Feb 2015 21:24:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132124.t1DLOX3l003120@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:24:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278713 - in stable/10: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:24:35 -0000 Author: ngie Date: Fri Feb 13 21:24:32 2015 New Revision: 278713 URL: https://svnweb.freebsd.org/changeset/base/278713 Log: MFC r277677: r277677: Add MK_BSDINSTALL knob for building and installing bsdinstall Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_BSDINSTALL - copied unchanged from r277677, head/tools/build/options/WITHOUT_BSDINSTALL Modified: stable/10/share/mk/bsd.own.mk stable/10/tools/build/mk/OptionalObsoleteFiles.inc stable/10/usr.sbin/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri Feb 13 21:21:51 2015 (r278712) +++ stable/10/share/mk/bsd.own.mk Fri Feb 13 21:24:32 2015 (r278713) @@ -261,6 +261,7 @@ __DEFAULT_YES_OPTIONS = \ BMAKE \ BOOT \ BSD_CPIO \ + BSDINSTALL \ BSNMP \ BZIP2 \ CALENDAR \ Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:21:51 2015 (r278712) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:24:32 2015 (r278713) @@ -399,6 +399,39 @@ OLD_DIRS+=usr/share/snmp/defs OLD_DIRS+=usr/share/snmp/mibs .endif +.if ${MK_BSDINSTALL} == no +OLD_FILES+=usr/libexec/bsdinstall/adduser +OLD_FILES+=usr/libexec/bsdinstall/auto +OLD_FILES+=usr/libexec/bsdinstall/autopart +OLD_FILES+=usr/libexec/bsdinstall/checksum +OLD_FILES+=usr/libexec/bsdinstall/config +OLD_FILES+=usr/libexec/bsdinstall/distextract +OLD_FILES+=usr/libexec/bsdinstall/distfetch +OLD_FILES+=usr/libexec/bsdinstall/docsinstall +OLD_FILES+=usr/libexec/bsdinstall/entropy +OLD_FILES+=usr/libexec/bsdinstall/hostname +OLD_FILES+=usr/libexec/bsdinstall/jail +OLD_FILES+=usr/libexec/bsdinstall/keymap +OLD_FILES+=usr/libexec/bsdinstall/mirrorselect +OLD_FILES+=usr/libexec/bsdinstall/mount +OLD_FILES+=usr/libexec/bsdinstall/netconfig +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4 +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6 +OLD_FILES+=usr/libexec/bsdinstall/partedit +OLD_FILES+=usr/libexec/bsdinstall/rootpass +OLD_FILES+=usr/libexec/bsdinstall/script +OLD_FILES+=usr/libexec/bsdinstall/scriptedpart +OLD_FILES+=usr/libexec/bsdinstall/services +OLD_FILES+=usr/libexec/bsdinstall/time +OLD_FILES+=usr/libexec/bsdinstall/umount +OLD_FILES+=usr/libexec/bsdinstall/wlanconfig +OLD_FILES+=usr/libexec/bsdinstall/zfsboot +OLD_FILES+=usr/sbin/bsdinstall +OLD_FILES+=usr/share/man/man8/bsdinstall.8.gz +OLD_FILES+=usr/share/man/man8/sade.8.gz +OLD_DIRS+=usr/libexec/bsdinstall +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar Copied: stable/10/tools/build/options/WITHOUT_BSDINSTALL (from r277677, head/tools/build/options/WITHOUT_BSDINSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_BSDINSTALL Fri Feb 13 21:24:32 2015 (r278713, copy of r277677, head/tools/build/options/WITHOUT_BSDINSTALL) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Fri Feb 13 21:21:51 2015 (r278712) +++ stable/10/usr.sbin/Makefile Fri Feb 13 21:24:32 2015 (r278713) @@ -8,7 +8,6 @@ SUBDIR= adduser \ binmiscctl \ bootparamd \ bsdconfig \ - bsdinstall \ cdcontrol \ chkgrp \ chown \ @@ -132,6 +131,10 @@ SUBDIR+= autofs SUBDIR+= bluetooth .endif +.if ${MK_BSDINSTALL} != "no" +SUBDIR+= bsdinstall +.endif + .if ${MK_BSNMP} != "no" SUBDIR+= bsnmpd .endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:25:58 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A583799C; Fri, 13 Feb 2015 21:25: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 8F2B5CFC; Fri, 13 Feb 2015 21:25: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 t1DLPwvD003386; Fri, 13 Feb 2015 21:25:58 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLPvXZ003380; Fri, 13 Feb 2015 21:25:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132125.t1DLPvXZ003380@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:25:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278714 - in stable/9: share/mk tools/build/mk tools/build/options usr.sbin X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:25:58 -0000 Author: ngie Date: Fri Feb 13 21:25:56 2015 New Revision: 278714 URL: https://svnweb.freebsd.org/changeset/base/278714 Log: MFC r278713: r278713: MFC r277677: r277677: Add MK_BSDINSTALL knob for building and installing bsdinstall Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_BSDINSTALL - copied unchanged from r278713, stable/10/tools/build/options/WITHOUT_BSDINSTALL Modified: stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc stable/9/usr.sbin/Makefile (contents, props changed) Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) stable/9/usr.sbin/ (props changed) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:24:32 2015 (r278713) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:25:56 2015 (r278714) @@ -344,6 +344,7 @@ __DEFAULT_YES_OPTIONS = \ BLUETOOTH \ BOOT \ BSD_CPIO \ + BSDINSTALL \ BSNMP \ SOURCELESS \ SOURCELESS_HOST \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:24:32 2015 (r278713) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:25:56 2015 (r278714) @@ -568,6 +568,39 @@ OLD_DIRS+=usr/share/snmp/defs OLD_DIRS+=usr/share/snmp/mibs .endif +.if ${MK_BSDINSTALL} == no +OLD_FILES+=usr/libexec/bsdinstall/adduser +OLD_FILES+=usr/libexec/bsdinstall/auto +OLD_FILES+=usr/libexec/bsdinstall/autopart +OLD_FILES+=usr/libexec/bsdinstall/checksum +OLD_FILES+=usr/libexec/bsdinstall/config +OLD_FILES+=usr/libexec/bsdinstall/distextract +OLD_FILES+=usr/libexec/bsdinstall/distfetch +OLD_FILES+=usr/libexec/bsdinstall/docsinstall +OLD_FILES+=usr/libexec/bsdinstall/entropy +OLD_FILES+=usr/libexec/bsdinstall/hostname +OLD_FILES+=usr/libexec/bsdinstall/jail +OLD_FILES+=usr/libexec/bsdinstall/keymap +OLD_FILES+=usr/libexec/bsdinstall/mirrorselect +OLD_FILES+=usr/libexec/bsdinstall/mount +OLD_FILES+=usr/libexec/bsdinstall/netconfig +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv4 +OLD_FILES+=usr/libexec/bsdinstall/netconfig_ipv6 +OLD_FILES+=usr/libexec/bsdinstall/partedit +OLD_FILES+=usr/libexec/bsdinstall/rootpass +OLD_FILES+=usr/libexec/bsdinstall/script +OLD_FILES+=usr/libexec/bsdinstall/scriptedpart +OLD_FILES+=usr/libexec/bsdinstall/services +OLD_FILES+=usr/libexec/bsdinstall/time +OLD_FILES+=usr/libexec/bsdinstall/umount +OLD_FILES+=usr/libexec/bsdinstall/wlanconfig +OLD_FILES+=usr/libexec/bsdinstall/zfsboot +OLD_FILES+=usr/sbin/bsdinstall +OLD_FILES+=usr/share/man/man8/bsdinstall.8.gz +OLD_FILES+=usr/share/man/man8/sade.8.gz +OLD_DIRS+=usr/libexec/bsdinstall +.endif + .if ${MK_CALENDAR} == no OLD_FILES+=etc/periodic/daily/300.calendar OLD_FILES+=usr/bin/calendar Copied: stable/9/tools/build/options/WITHOUT_BSDINSTALL (from r278713, stable/10/tools/build/options/WITHOUT_BSDINSTALL) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_BSDINSTALL Fri Feb 13 21:25:56 2015 (r278714, copy of r278713, stable/10/tools/build/options/WITHOUT_BSDINSTALL) @@ -0,0 +1,5 @@ +.\" $FreeBSD$ +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. Modified: stable/9/usr.sbin/Makefile ============================================================================== --- stable/9/usr.sbin/Makefile Fri Feb 13 21:24:32 2015 (r278713) +++ stable/9/usr.sbin/Makefile Fri Feb 13 21:25:56 2015 (r278714) @@ -8,7 +8,6 @@ SUBDIR= adduser \ bootparamd \ burncd \ bsdconfig \ - bsdinstall \ cdcontrol \ chkgrp \ chown \ @@ -150,6 +149,10 @@ SUBDIR+= rndc-confgen SUBDIR+= bluetooth .endif +.if ${MK_BSDINSTALL} != "no" +SUBDIR+= bsdinstall +.endif + .if ${MK_BSNMP} != "no" SUBDIR+= bsnmpd .endif From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:26:46 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 248F8AD6; Fri, 13 Feb 2015 21:26:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F134D07; Fri, 13 Feb 2015 21:26:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLQjGP003568; Fri, 13 Feb 2015 21:26:45 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLQjYJ003567; Fri, 13 Feb 2015 21:26:45 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132126.t1DLQjYJ003567@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 21:26:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278715 - stable/10/sys/conf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:26:46 -0000 Author: ian Date: Fri Feb 13 21:26:45 2015 New Revision: 278715 URL: https://svnweb.freebsd.org/changeset/base/278715 Log: MFC r272605: Use -mfpu=none when building arm kernels. Modified: stable/10/sys/conf/Makefile.arm Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/Makefile.arm ============================================================================== --- stable/10/sys/conf/Makefile.arm Fri Feb 13 21:25:56 2015 (r278714) +++ stable/10/sys/conf/Makefile.arm Fri Feb 13 21:26:45 2015 (r278715) @@ -41,6 +41,9 @@ STRIP_FLAGS = -S .if ${COMPILER_TYPE} != "clang" CFLAGS += -mno-thumb-interwork +.else +# We generally don't want fpu instructions in the kernel. +CFLAGS += -mfpu=none .endif .if empty(DDB_ENABLED) From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:31:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C57F1CCF; Fri, 13 Feb 2015 21:31:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD9F7DC8; Fri, 13 Feb 2015 21:31:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DLVjAV007247; Fri, 13 Feb 2015 21:31:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLViKU007241; Fri, 13 Feb 2015 21:31:44 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132131.t1DLViKU007241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278716 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:31:46 -0000 Author: dim Date: Fri Feb 13 21:31:43 2015 New Revision: 278716 URL: https://svnweb.freebsd.org/changeset/base/278716 Log: MFC r271931: Add a few missing llvm/clang patches, update the other ones to be able to apply with the same patch options onto a fresh upstream llvm/clang 3.4.1 checkout, and use approximately the same header tempate for them. Added: stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/10/ (props changed) Copied: stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff (from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) @@ -0,0 +1,34 @@ +Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us +in line with gcc in base as this makes llvm generate code for the armv6k +variant of the instruction set. + +Introduced here: http://svnweb.freebsd.org/changeset/base/269387 + +Index: tools/clang/lib/Driver/ToolChain.cpp +=================================================================== +--- tools/clang/lib/Driver/ToolChain.cpp (revision 269386) ++++ tools/clang/lib/Driver/ToolChain.cpp (revision 269387) +@@ -183,7 +183,8 @@ static const char *getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp (revision 269386) ++++ tools/clang/lib/Driver/Tools.cpp (revision 269387) +@@ -499,7 +499,8 @@ static std::string getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } Copied: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff (from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) @@ -0,0 +1,78 @@ +Pull in r216989 from upstream llvm trunk (by Renato Golin): + + MFV: Only emit movw on ARMv6T2+ + +Pull in r216990 from upstream llvm trunk (by Renato Golin): + + Missing test from r216989 + +Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain +test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS +in base doesn't understand this instruction for this target. One would need +to use --integrated-as to get this to build if desired. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271025 + +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td ++++ lib/Target/ARM/ARMInstrInfo.td +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function +Index: test/CodeGen/ARM/carry.ll +=================================================================== +--- test/CodeGen/ARM/carry.ll ++++ test/CodeGen/ARM/carry.ll +@@ -1,4 +1,4 @@ +-; RUN: llc < %s -march=arm | FileCheck %s ++; RUN: llc < %s -mtriple=armv6t2-eabi | FileCheck %s + + define i64 @f1(i64 %a, i64 %b) { + ; CHECK-LABEL: f1: +Index: test/CodeGen/ARM/pr18364-movw.ll +=================================================================== +--- test/CodeGen/ARM/pr18364-movw.ll ++++ test/CodeGen/ARM/pr18364-movw.ll +@@ -0,0 +1,34 @@ ++; RUN: llc < %s -mtriple=armv5te | FileCheck %s --check-prefix=V5 ++; RUN: llc < %s -mtriple=armv6 | FileCheck %s --check-prefix=V6 ++; RUN: llc < %s -mtriple=armv6t2 | FileCheck %s --check-prefix=V6T2 ++; RUN: llc < %s -mtriple=armv7 | FileCheck %s --check-prefix=V7 ++; PR18364 ++ ++define i64 @f() #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %y = alloca i64, align 8 ++ %z = alloca i64, align 8 ++ store i64 1, i64* %y, align 8 ++ store i64 11579764786944, i64* %z, align 8 ++ %0 = load i64* %y, align 8 ++ %1 = load i64* %z, align 8 ++ %sub = sub i64 %0, %1 ++ ret i64 %sub ++} ++ ++define i64 @g(i64 %a, i32 %b) #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %0 = mul i64 %a, 86400000 ++ %mul = add i64 %0, -210866803200000 ++ %conv = sext i32 %b to i64 ++ %add = add nsw i64 %mul, %conv ++ ret i64 %add ++} Modified: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,8 +1,17 @@ -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 59ba47c..dddc7e7 100644 ---- a/lib/CodeGen/CGDebugInfo.cpp -+++ b/lib/CodeGen/CGDebugInfo.cpp -@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { +Pull in r200797 from upstream clang trunk (by Adrian Prantl): + + Debug info: fix a crasher when when emitting debug info for + not-yet-completed templated types. getTypeSize() needs a complete type. + + rdar://problem/15931354 + +Introduced here: http://svnweb.freebsd.org/changeset/base/271282 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedTy if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; @@ -16,36 +25,44 @@ index 59ba47c..dddc7e7 100644 return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); -diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp -new file mode 100644 -index 0000000..b2b7073 ---- /dev/null -+++ b/test/CodeGenCXX/debug-info-template-fwd.cpp -@@ -0,0 +1,27 @@ +Index: tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp ++++ tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,36 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s -+// This test is for a crash when emitting debug info for not-yet-completed -+// types. ++// This test is for a crash when emitting debug info for not-yet-completed types. +// Test that we don't actually emit a forward decl for the offending class: -+// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// CHECK: [ DW_TAG_class_type ] [Derived] {{.*}} [def] +// rdar://problem/15931354 -+template class Derived; ++typedef const struct __CFString * CFStringRef; ++template class Returner {}; ++typedef const __CFString String; + -+template class Base { -+ static Derived *create(); ++template class Derived; ++ ++template ++class Base ++{ ++ static Derived* create(); ++}; ++ ++template ++class Derived : public Base { ++public: ++ static void foo(); +}; + -+template struct Derived : Base { ++class Foo ++{ ++ Foo(); ++ static Returner > all(); +}; + -+Base *f; ++Foo::Foo(){} + -+// During the instantiation of Derived, Base becomes required to be -+// complete - since the declaration has already been emitted (due to 'f', -+// above), we immediately try to build debug info for Base which then -+// requires the (incomplete definition) of Derived which is problematic. -+// -+// (if 'f' is not present, the point at which Base becomes required to be -+// complete during the instantiation of Derived is a no-op because -+// Base was never emitted so we ignore it and carry on until we -+// wire up the base class of Derived in the debug info later on) -+Derived d; ++Returner > Foo::all() ++{ ++ Derived::foo(); ++ return Foo::all(); ++} Modified: stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff ============================================================================== --- stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,18 +1,16 @@ -commit 96365aef99ec463375dfdaf6eb260823e0477b6a -Author: Adrian Prantl -Date: Tue Apr 1 17:52:06 2014 +0000 +Pull in r205331 from upstream clang trunk (by Adrian Prantl): - Debug info: fix a crash when emitting IndirectFieldDecls, which were - previously not handled at all. - rdar://problem/16348575 - - git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205331 91177308-0d34-0410-b5e6-96231b3b80d8 + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 82db942..2556cf9 100644 ---- tools/clang/lib/CodeGen/CGDebugInfo.cpp -+++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp -@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, +Introduced here: http://svnweb.freebsd.org/changeset/base/271432 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205330) ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205331) +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. @@ -21,11 +19,10 @@ index 82db942..2556cf9 100644 // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant -diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp -new file mode 100644 -index 0000000..131ceba ---- /dev/null -+++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +Index: tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 0) ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 205331) @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s +// Copied: stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff (from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) @@ -0,0 +1,64 @@ +Pull in r217410 from upstream llvm trunk (by Bob Wilson): + + Set trunc store action to Expand for all X86 targets. + + When compiling without SSE2, isTruncStoreLegal(F64, F32) would return + Legal, whereas with SSE2 it would return Expand. And since the Target + doesn't seem to actually handle a truncstore for double -> float, it + would just output a store of a full double in the space for a float + hence overwriting other bits on the stack. + + Patch by Luqman Aden! + +This should fix clang -O0 on i386 assigning garbage to floats, in +certain scenarios. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271597 + +Index: lib/Target/X86/X86ISelLowering.cpp +=================================================================== +--- lib/Target/X86/X86ISelLowering.cpp (revision 208032) ++++ lib/Target/X86/X86ISelLowering.cpp (working copy) +@@ -300,6 +300,8 @@ void X86TargetLowering::resetOperationActions() { + setTruncStoreAction(MVT::i32, MVT::i8 , Expand); + setTruncStoreAction(MVT::i16, MVT::i8, Expand); + ++ setTruncStoreAction(MVT::f64, MVT::f32, Expand); ++ + // SETOEQ and SETUNE require checking two conditions. + setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand); + setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand); +@@ -1011,8 +1013,6 @@ void X86TargetLowering::resetOperationActions() { + AddPromotedToType (ISD::SELECT, VT, MVT::v2i64); + } + +- setTruncStoreAction(MVT::f64, MVT::f32, Expand); +- + // Custom lower v2i64 and v2f64 selects. + setOperationAction(ISD::LOAD, MVT::v2f64, Legal); + setOperationAction(ISD::LOAD, MVT::v2i64, Legal); +Index: test/CodeGen/X86/dont-trunc-store-double-to-float.ll +=================================================================== +--- test/CodeGen/X86/dont-trunc-store-double-to-float.ll (revision 0) ++++ test/CodeGen/X86/dont-trunc-store-double-to-float.ll (working copy) +@@ -0,0 +1,20 @@ ++; RUN: llc -march=x86 < %s | FileCheck %s ++ ++; CHECK-LABEL: @bar ++; CHECK: movl $1074339512, ++; CHECK: movl $1374389535, ++; CHECK: movl $1078523331, ++define void @bar() unnamed_addr { ++entry-block: ++ %a = alloca double ++ %b = alloca float ++ ++ store double 3.140000e+00, double* %a ++ %0 = load double* %a ++ ++ %1 = fptrunc double %0 to float ++ ++ store float %1, float* %b ++ ++ ret void ++} From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:31:47 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E1C2CD0; Fri, 13 Feb 2015 21:31: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 564A7DC9; Fri, 13 Feb 2015 21:31: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 t1DLVliu007262; Fri, 13 Feb 2015 21:31:47 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLVkP1007254; Fri, 13 Feb 2015 21:31:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132131.t1DLVkP1007254@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 21:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278716 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:31:47 -0000 Author: dim Date: Fri Feb 13 21:31:43 2015 New Revision: 278716 URL: https://svnweb.freebsd.org/changeset/base/278716 Log: MFC r271931: Add a few missing llvm/clang patches, update the other ones to be able to apply with the same patch options onto a fresh upstream llvm/clang 3.4.1 checkout, and use approximately the same header tempate for them. Added: stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff stable/9/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff - copied unchanged from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Deleted: stable/9/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff Modified: stable/9/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff stable/9/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Directory Properties: stable/9/contrib/llvm/ (props changed) Copied: stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff (from r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r269387-clang-arm-target-cpu.diff) @@ -0,0 +1,34 @@ +Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us +in line with gcc in base as this makes llvm generate code for the armv6k +variant of the instruction set. + +Introduced here: http://svnweb.freebsd.org/changeset/base/269387 + +Index: tools/clang/lib/Driver/ToolChain.cpp +=================================================================== +--- tools/clang/lib/Driver/ToolChain.cpp (revision 269386) ++++ tools/clang/lib/Driver/ToolChain.cpp (revision 269387) +@@ -183,7 +183,8 @@ static const char *getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } +Index: tools/clang/lib/Driver/Tools.cpp +=================================================================== +--- tools/clang/lib/Driver/Tools.cpp (revision 269386) ++++ tools/clang/lib/Driver/Tools.cpp (revision 269387) +@@ -499,7 +499,8 @@ static std::string getARMTargetCPU(const ArgList & + MArch = Triple.getArchName(); + } + +- if (Triple.getOS() == llvm::Triple::NetBSD) { ++ if (Triple.getOS() == llvm::Triple::NetBSD || ++ Triple.getOS() == llvm::Triple::FreeBSD) { + if (MArch == "armv6") + return "arm1176jzf-s"; + } Copied: stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff (from r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271024-llvm-r216989-r216990-fix-movw-armv6.diff) @@ -0,0 +1,78 @@ +Pull in r216989 from upstream llvm trunk (by Renato Golin): + + MFV: Only emit movw on ARMv6T2+ + +Pull in r216990 from upstream llvm trunk (by Renato Golin): + + Missing test from r216989 + +Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain +test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS +in base doesn't understand this instruction for this target. One would need +to use --integrated-as to get this to build if desired. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271025 + +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td ++++ lib/Target/ARM/ARMInstrInfo.td +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function +Index: test/CodeGen/ARM/carry.ll +=================================================================== +--- test/CodeGen/ARM/carry.ll ++++ test/CodeGen/ARM/carry.ll +@@ -1,4 +1,4 @@ +-; RUN: llc < %s -march=arm | FileCheck %s ++; RUN: llc < %s -mtriple=armv6t2-eabi | FileCheck %s + + define i64 @f1(i64 %a, i64 %b) { + ; CHECK-LABEL: f1: +Index: test/CodeGen/ARM/pr18364-movw.ll +=================================================================== +--- test/CodeGen/ARM/pr18364-movw.ll ++++ test/CodeGen/ARM/pr18364-movw.ll +@@ -0,0 +1,34 @@ ++; RUN: llc < %s -mtriple=armv5te | FileCheck %s --check-prefix=V5 ++; RUN: llc < %s -mtriple=armv6 | FileCheck %s --check-prefix=V6 ++; RUN: llc < %s -mtriple=armv6t2 | FileCheck %s --check-prefix=V6T2 ++; RUN: llc < %s -mtriple=armv7 | FileCheck %s --check-prefix=V7 ++; PR18364 ++ ++define i64 @f() #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %y = alloca i64, align 8 ++ %z = alloca i64, align 8 ++ store i64 1, i64* %y, align 8 ++ store i64 11579764786944, i64* %z, align 8 ++ %0 = load i64* %y, align 8 ++ %1 = load i64* %z, align 8 ++ %sub = sub i64 %0, %1 ++ ret i64 %sub ++} ++ ++define i64 @g(i64 %a, i32 %b) #0 { ++entry: ++; V5-NOT: movw ++; V6-NOT: movw ++; V6T2: movw ++; V7: movw ++ %0 = mul i64 %a, 86400000 ++ %mul = add i64 %0, -210866803200000 ++ %conv = sext i32 %b to i64 ++ %add = add nsw i64 %mul, %conv ++ ret i64 %add ++} Modified: stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff ============================================================================== --- stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/10/contrib/llvm/patches/patch-r271282-clang-r200797-r200798-r200805-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,8 +1,17 @@ -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 59ba47c..dddc7e7 100644 ---- a/lib/CodeGen/CGDebugInfo.cpp -+++ b/lib/CodeGen/CGDebugInfo.cpp -@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedType(const RecordType *Ty) { +Pull in r200797 from upstream clang trunk (by Adrian Prantl): + + Debug info: fix a crasher when when emitting debug info for + not-yet-completed templated types. getTypeSize() needs a complete type. + + rdar://problem/15931354 + +Introduced here: http://svnweb.freebsd.org/changeset/base/271282 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp +@@ -2251,9 +2251,10 @@ llvm::DICompositeType CGDebugInfo::CreateLimitedTy if (T && (!T.isForwardDecl() || !RD->getDefinition())) return T; @@ -16,36 +25,44 @@ index 59ba47c..dddc7e7 100644 return getOrCreateRecordFwdDecl(Ty, RDContext); uint64_t Size = CGM.getContext().getTypeSize(Ty); -diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp -new file mode 100644 -index 0000000..b2b7073 ---- /dev/null -+++ b/test/CodeGenCXX/debug-info-template-fwd.cpp -@@ -0,0 +1,27 @@ +Index: tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp ++++ tools/clang/test/CodeGenCXX/debug-info-template-fwd.cpp +@@ -0,0 +1,36 @@ +// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s -+// This test is for a crash when emitting debug info for not-yet-completed -+// types. ++// This test is for a crash when emitting debug info for not-yet-completed types. +// Test that we don't actually emit a forward decl for the offending class: -+// CHECK: [ DW_TAG_structure_type ] [Derived] {{.*}} [def] ++// CHECK: [ DW_TAG_class_type ] [Derived] {{.*}} [def] +// rdar://problem/15931354 -+template class Derived; ++typedef const struct __CFString * CFStringRef; ++template class Returner {}; ++typedef const __CFString String; + -+template class Base { -+ static Derived *create(); ++template class Derived; ++ ++template ++class Base ++{ ++ static Derived* create(); ++}; ++ ++template ++class Derived : public Base { ++public: ++ static void foo(); +}; + -+template struct Derived : Base { ++class Foo ++{ ++ Foo(); ++ static Returner > all(); +}; + -+Base *f; ++Foo::Foo(){} + -+// During the instantiation of Derived, Base becomes required to be -+// complete - since the declaration has already been emitted (due to 'f', -+// above), we immediately try to build debug info for Base which then -+// requires the (incomplete definition) of Derived which is problematic. -+// -+// (if 'f' is not present, the point at which Base becomes required to be -+// complete during the instantiation of Derived is a no-op because -+// Base was never emitted so we ignore it and carry on until we -+// wire up the base class of Derived in the debug info later on) -+Derived d; ++Returner > Foo::all() ++{ ++ Derived::foo(); ++ return Foo::all(); ++} Modified: stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff ============================================================================== --- stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:26:45 2015 (r278715) +++ stable/10/contrib/llvm/patches/patch-r271432-clang-r205331-debug-info-crash.diff Fri Feb 13 21:31:43 2015 (r278716) @@ -1,18 +1,16 @@ -commit 96365aef99ec463375dfdaf6eb260823e0477b6a -Author: Adrian Prantl -Date: Tue Apr 1 17:52:06 2014 +0000 +Pull in r205331 from upstream clang trunk (by Adrian Prantl): - Debug info: fix a crash when emitting IndirectFieldDecls, which were - previously not handled at all. - rdar://problem/16348575 - - git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205331 91177308-0d34-0410-b5e6-96231b3b80d8 + Debug info: fix a crash when emitting IndirectFieldDecls, which were + previously not handled at all. + rdar://problem/16348575 -diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp -index 82db942..2556cf9 100644 ---- tools/clang/lib/CodeGen/CGDebugInfo.cpp -+++ tools/clangb/lib/CodeGen/CGDebugInfo.cpp -@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList *TPList, +Introduced here: http://svnweb.freebsd.org/changeset/base/271432 + +Index: tools/clang/lib/CodeGen/CGDebugInfo.cpp +=================================================================== +--- tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205330) ++++ tools/clang/lib/CodeGen/CGDebugInfo.cpp (revision 205331) +@@ -1252,7 +1252,7 @@ CollectTemplateParams(const TemplateParameterList V = CGM.GetAddrOfFunction(FD); // Member data pointers have special handling too to compute the fixed // offset within the object. @@ -21,11 +19,10 @@ index 82db942..2556cf9 100644 // These five lines (& possibly the above member function pointer // handling) might be able to be refactored to use similar code in // CodeGenModule::getMemberPointerConstant -diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp -new file mode 100644 -index 0000000..131ceba ---- /dev/null -+++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +Index: tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp +=================================================================== +--- tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 0) ++++ tools/clang/test/CodeGenCXX/debug-info-indirect-field-decl.cpp (revision 205331) @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s +// Copied: stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff (from r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff Fri Feb 13 21:31:43 2015 (r278716, copy of r271931, head/contrib/llvm/patches/patch-r271597-clang-r217410-i386-garbage-float.diff) @@ -0,0 +1,64 @@ +Pull in r217410 from upstream llvm trunk (by Bob Wilson): + + Set trunc store action to Expand for all X86 targets. + + When compiling without SSE2, isTruncStoreLegal(F64, F32) would return + Legal, whereas with SSE2 it would return Expand. And since the Target + doesn't seem to actually handle a truncstore for double -> float, it + would just output a store of a full double in the space for a float + hence overwriting other bits on the stack. + + Patch by Luqman Aden! + +This should fix clang -O0 on i386 assigning garbage to floats, in +certain scenarios. + +Introduced here: http://svnweb.freebsd.org/changeset/base/271597 + +Index: lib/Target/X86/X86ISelLowering.cpp +=================================================================== +--- lib/Target/X86/X86ISelLowering.cpp (revision 208032) ++++ lib/Target/X86/X86ISelLowering.cpp (working copy) +@@ -300,6 +300,8 @@ void X86TargetLowering::resetOperationActions() { + setTruncStoreAction(MVT::i32, MVT::i8 , Expand); + setTruncStoreAction(MVT::i16, MVT::i8, Expand); + ++ setTruncStoreAction(MVT::f64, MVT::f32, Expand); ++ + // SETOEQ and SETUNE require checking two conditions. + setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand); + setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand); +@@ -1011,8 +1013,6 @@ void X86TargetLowering::resetOperationActions() { + AddPromotedToType (ISD::SELECT, VT, MVT::v2i64); + } + +- setTruncStoreAction(MVT::f64, MVT::f32, Expand); +- + // Custom lower v2i64 and v2f64 selects. + setOperationAction(ISD::LOAD, MVT::v2f64, Legal); + setOperationAction(ISD::LOAD, MVT::v2i64, Legal); +Index: test/CodeGen/X86/dont-trunc-store-double-to-float.ll +=================================================================== +--- test/CodeGen/X86/dont-trunc-store-double-to-float.ll (revision 0) ++++ test/CodeGen/X86/dont-trunc-store-double-to-float.ll (working copy) +@@ -0,0 +1,20 @@ ++; RUN: llc -march=x86 < %s | FileCheck %s ++ ++; CHECK-LABEL: @bar ++; CHECK: movl $1074339512, ++; CHECK: movl $1374389535, ++; CHECK: movl $1078523331, ++define void @bar() unnamed_addr { ++entry-block: ++ %a = alloca double ++ %b = alloca float ++ ++ store double 3.140000e+00, double* %a ++ %0 = load double* %a ++ ++ %1 = fptrunc double %0 to float ++ ++ store float %1, float* %b ++ ++ ret void ++} From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:32:08 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 967ACF25; Fri, 13 Feb 2015 21:32: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 77B0FDD2; Fri, 13 Feb 2015 21:32: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 t1DLW8k5007844; Fri, 13 Feb 2015 21:32:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLW6I8007834; Fri, 13 Feb 2015 21:32:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132132.t1DLW6I8007834@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:32:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278717 - in stable/10: etc/rc.d sbin share/man/man4 share/mk sys/modules/geom tools/build/mk tools/build/options X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:32:08 -0000 Author: ngie Date: Fri Feb 13 21:32:05 2015 New Revision: 278717 URL: https://svnweb.freebsd.org/changeset/base/278717 Log: MFC r277678: r277678: Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc Sponsored by: EMC / Isilon Storage Division Added: stable/10/tools/build/options/WITHOUT_CCD - copied unchanged from r277678, head/tools/build/options/WITHOUT_CCD Modified: stable/10/etc/rc.d/Makefile stable/10/sbin/Makefile stable/10/share/man/man4/Makefile stable/10/share/mk/bsd.own.mk stable/10/sys/modules/geom/Makefile stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/Makefile ============================================================================== --- stable/10/etc/rc.d/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/etc/rc.d/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -21,7 +21,6 @@ FILES= DAEMON \ bootparams \ bridge \ ${_bthidd} \ - ccd \ cleanvar \ cleartmp \ cron \ @@ -185,14 +184,18 @@ _ubthidhci= ubthidhci FILES+= bsnmpd .endif -.if ${MK_IPX} != "no" -_ipxrouted= ipxrouted +.if ${MK_CCD} != "no" +FILES+= ccd .endif .if ${MK_HAST} != "no" FILES+= hastd .endif +.if ${MK_IPX} != "no" +_ipxrouted= ipxrouted +.endif + .if ${MK_ISCSI} != "no" FILES+= iscsictl FILES+= iscsid Modified: stable/10/sbin/Makefile ============================================================================== --- stable/10/sbin/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/sbin/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -8,7 +8,6 @@ SUBDIR=adjkerntz \ badsect \ camcontrol \ - ccdconfig \ clri \ comcontrol \ conscontrol \ @@ -75,6 +74,10 @@ SUBDIR=adjkerntz \ SUBDIR+= atm .endif +.if ${MK_CCD} != "no" +SUBDIR+= ccdconfig +.endif + .if ${MK_CXX} != "no" SUBDIR+= devd .endif Modified: stable/10/share/man/man4/Makefile ============================================================================== --- stable/10/share/man/man4/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/share/man/man4/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -91,7 +91,7 @@ MAN= aac.4 \ cc_htcp.4 \ cc_newreno.4 \ cc_vegas.4 \ - ccd.4 \ + ${_ccd.4} \ cd.4 \ cdce.4 \ ch.4 \ @@ -862,6 +862,10 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_CCD} != "no" +_ccd.4= ccd.4 +.endif + .if ${MK_ISCSI} != "no" MAN+= iscsi.4 MAN+= iscsi_initiator.4 Modified: stable/10/share/mk/bsd.own.mk ============================================================================== --- stable/10/share/mk/bsd.own.mk Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/share/mk/bsd.own.mk Fri Feb 13 21:32:05 2015 (r278717) @@ -266,6 +266,7 @@ __DEFAULT_YES_OPTIONS = \ BZIP2 \ CALENDAR \ CAPSICUM \ + CCD \ CDDL \ CPP \ CROSS_COMPILER \ Modified: stable/10/sys/modules/geom/Makefile ============================================================================== --- stable/10/sys/modules/geom/Makefile Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/sys/modules/geom/Makefile Fri Feb 13 21:32:05 2015 (r278717) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include + SUBDIR= geom_bde \ geom_bsd \ geom_cache \ - geom_ccd \ geom_concat \ geom_eli \ geom_fox \ @@ -31,4 +32,8 @@ SUBDIR= geom_bde \ geom_vol_ffs \ geom_zero +.if ${MK_CCD} != "no" || defined(ALL_MODULES) +SUBDIR+= geom_ccd +.endif + .include Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:31:43 2015 (r278716) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:32:05 2015 (r278717) @@ -492,6 +492,13 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8 OLD_FILES+=usr/share/man/man1/calendar.1.gz .endif +.if ${MK_CCD} == no +OLD_FILES+=etc/rc.d/ccd +OLD_FILES+=sbin/ccdconfig +OLD_FILES+=usr/share/man/man4/ccd.4.gz +OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz +.endif + .if ${MK_CDDL} == no OLD_LIBS+=lib/libavl.so.2 OLD_LIBS+=lib/libctf.so.2 Copied: stable/10/tools/build/options/WITHOUT_CCD (from r277678, head/tools/build/options/WITHOUT_CCD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/tools/build/options/WITHOUT_CCD Fri Feb 13 21:32:05 2015 (r278717, copy of r277678, head/tools/build/options/WITHOUT_CCD) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr geom_ccd 4 +and related utilities. From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:36:19 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2DB0410A; Fri, 13 Feb 2015 21:36: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 0D8D9DF0; Fri, 13 Feb 2015 21:36: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 t1DLaIfe008485; Fri, 13 Feb 2015 21:36:18 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLaHLi008470; Fri, 13 Feb 2015 21:36:17 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132136.t1DLaHLi008470@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:36:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278718 - in stable/9: etc/rc.d sbin share/man/man4 share/mk sys/modules/geom tools/build/mk tools/build/options X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:36:19 -0000 Author: ngie Date: Fri Feb 13 21:36:16 2015 New Revision: 278718 URL: https://svnweb.freebsd.org/changeset/base/278718 Log: MFC r278717: r278717: MFC r277678: r277678: Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_CCD - copied unchanged from r278717, stable/10/tools/build/options/WITHOUT_CCD Modified: stable/9/etc/rc.d/Makefile stable/9/sbin/Makefile stable/9/share/man/man4/Makefile stable/9/share/mk/bsd.own.mk stable/9/sys/modules/geom/Makefile stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/sbin/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) stable/9/share/mk/ (props changed) stable/9/sys/ (props changed) stable/9/sys/modules/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/etc/rc.d/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -21,7 +21,6 @@ FILES= DAEMON \ bootparams \ bridge \ ${_bthidd} \ - ccd \ cleanvar \ cleartmp \ cron \ @@ -169,6 +168,10 @@ FILES+= apmd FILES+= bsnmpd .endif +.if ${MK_CCD} != "no" +FILES+= ccd +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif Modified: stable/9/sbin/Makefile ============================================================================== --- stable/9/sbin/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/sbin/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -9,7 +9,6 @@ SUBDIR=adjkerntz \ atacontrol \ badsect \ camcontrol \ - ccdconfig \ clri \ comcontrol \ conscontrol \ @@ -78,6 +77,10 @@ SUBDIR=adjkerntz \ SUBDIR+= atm .endif +.if ${MK_CCD} != "no" +SUBDIR+= ccdconfig +.endif + .if ${MK_CXX} != "no" SUBDIR+= devd .endif Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/share/man/man4/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -84,7 +84,7 @@ MAN= aac.4 \ cc_htcp.4 \ cc_newreno.4 \ cc_vegas.4 \ - ccd.4 \ + ${_ccd.4} \ cd.4 \ cdce.4 \ ch.4 \ @@ -800,4 +800,8 @@ _nvram2env.4= nvram2env.4 SUBDIR= man4.${MACHINE_CPUARCH} .endif +.if ${MK_CCD} != "no" +_ccd.4= ccd.4 +.endif + .include Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:36:16 2015 (r278718) @@ -351,6 +351,7 @@ __DEFAULT_YES_OPTIONS = \ SOURCELESS_UCODE \ BZIP2 \ CALENDAR \ + CCD \ CDDL \ CPP \ CRYPT \ Modified: stable/9/sys/modules/geom/Makefile ============================================================================== --- stable/9/sys/modules/geom/Makefile Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/sys/modules/geom/Makefile Fri Feb 13 21:36:16 2015 (r278718) @@ -1,9 +1,10 @@ # $FreeBSD$ +.include + SUBDIR= geom_bde \ geom_bsd \ geom_cache \ - geom_ccd \ geom_concat \ geom_eli \ geom_fox \ @@ -30,4 +31,8 @@ SUBDIR= geom_bde \ geom_vol_ffs \ geom_zero +.if ${MK_CCD} != "no" || defined(ALL_MODULES) +SUBDIR+= geom_ccd +.endif + .include Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:32:05 2015 (r278717) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:36:16 2015 (r278718) @@ -661,6 +661,13 @@ OLD_FILES+=usr/share/calendar/uk_UA.KOI8 OLD_FILES+=usr/share/man/man1/calendar.1.gz .endif +.if ${MK_CCD} == no +OLD_FILES+=etc/rc.d/ccd +OLD_FILES+=sbin/ccdconfig +OLD_FILES+=usr/share/man/man4/ccd.4.gz +OLD_FILES+=usr/share/man/man8/ccdconfig.8.gz +.endif + .if ${MK_CDDL} == no OLD_LIBS+=lib/libavl.so.2 OLD_LIBS+=lib/libctf.so.2 Copied: stable/9/tools/build/options/WITHOUT_CCD (from r278717, stable/10/tools/build/options/WITHOUT_CCD) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_CCD Fri Feb 13 21:36:16 2015 (r278718, copy of r278717, stable/10/tools/build/options/WITHOUT_CCD) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr geom_ccd 4 +and related utilities. From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:41:25 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B39EF3A1; Fri, 13 Feb 2015 21:41: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 9520FEA5; Fri, 13 Feb 2015 21:41: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 t1DLfP3b012243; Fri, 13 Feb 2015 21:41:25 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLfOSU011835; Fri, 13 Feb 2015 21:41:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132141.t1DLfOSU011835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:41:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278719 - in stable/9: etc/rc.d sbin share/examples share/mk tools/build/mk tools/build/options X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:41:25 -0000 Author: ngie Date: Fri Feb 13 21:41:23 2015 New Revision: 278719 URL: https://svnweb.freebsd.org/changeset/base/278719 Log: MFstable/10 r278556: r278556: MFC r277725: r277725: Add MK_HAST knob for building and installing hastd(8), et al Sponsored by: EMC / Isilon Storage Division Added: stable/9/tools/build/options/WITHOUT_HAST - copied unchanged from r278556, stable/10/tools/build/options/WITHOUT_HAST Modified: stable/9/etc/rc.d/Makefile stable/9/sbin/Makefile stable/9/share/examples/Makefile stable/9/share/mk/bsd.own.mk stable/9/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/9/ (props changed) stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) stable/9/sbin/ (props changed) stable/9/share/ (props changed) stable/9/share/examples/ (props changed) stable/9/share/mk/ (props changed) stable/9/tools/ (props changed) stable/9/tools/build/ (props changed) stable/9/tools/build/options/ (props changed) Modified: stable/9/etc/rc.d/Makefile ============================================================================== --- stable/9/etc/rc.d/Makefile Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/etc/rc.d/Makefile Fri Feb 13 21:41:23 2015 (r278719) @@ -41,7 +41,6 @@ FILES= DAEMON \ geli2 \ gptboot \ gssd \ - hastd \ ${_hcsecd} \ hostid \ hostid_save \ @@ -172,6 +171,10 @@ FILES+= bsnmpd FILES+= ccd .endif +.if ${MK_HAST} != "no" +FILES+= hastd +.endif + .if ${MK_IPX} != "no" _ipxrouted= ipxrouted .endif Modified: stable/9/sbin/Makefile ============================================================================== --- stable/9/sbin/Makefile Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/sbin/Makefile Fri Feb 13 21:41:23 2015 (r278719) @@ -30,8 +30,6 @@ SUBDIR=adjkerntz \ ggate \ growfs \ gvinum \ - hastctl \ - hastd \ ifconfig \ init \ iscontrol \ @@ -85,6 +83,11 @@ SUBDIR+= ccdconfig SUBDIR+= devd .endif +.if ${MK_HAST} != "no" +SUBDIR+= hastctl +SUBDIR+= hastd +.endif + .if ${MK_IPFILTER} != "no" SUBDIR+= ipf .endif Modified: stable/9/share/examples/Makefile ============================================================================== --- stable/9/share/examples/Makefile Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/share/examples/Makefile Fri Feb 13 21:41:23 2015 (r278719) @@ -14,7 +14,6 @@ LDIRS= BSD_daemon \ drivers \ etc \ find_interface \ - hast \ ibcs2 \ indent \ ipfw \ @@ -69,11 +68,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ find_interface/Makefile \ find_interface/README \ find_interface/find_interface.c \ - hast/ucarp.sh \ - hast/ucarp_down.sh \ - hast/ucarp_up.sh \ - hast/vip-down.sh \ - hast/vip-up.sh \ ibcs2/README \ ibcs2/hello.uu \ indent/indent.pro \ @@ -205,6 +199,15 @@ BINDIR= ${SHAREDIR}/examples NO_OBJ= +.if ${MK_HAST} != "no" +LDIRS+= hast +XFILES+= hast/ucarp.sh \ + hast/ucarp_down.sh \ + hast/ucarp_up.sh \ + hast/vip-down.sh \ + hast/vip-up.sh +.endif + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''); (latter useful # in environments where it's not possible to keep /sys publicly readable) Modified: stable/9/share/mk/bsd.own.mk ============================================================================== --- stable/9/share/mk/bsd.own.mk Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/share/mk/bsd.own.mk Fri Feb 13 21:41:23 2015 (r278719) @@ -374,6 +374,7 @@ __DEFAULT_YES_OPTIONS = \ GPIB \ GPIO \ GROFF \ + HAST \ HTML \ INET \ INET6 \ Modified: stable/9/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:36:16 2015 (r278718) +++ stable/9/tools/build/mk/OptionalObsoleteFiles.inc Fri Feb 13 21:41:23 2015 (r278719) @@ -2232,6 +2232,20 @@ OLD_FILES+=usr/share/man/man5/qop.5.gz OLD_FILES+=usr/share/man/man8/gssd.8.gz .endif +.if ${MK_HAST} == no +OLD_FILES+=sbin/hastctl +OLD_FILES+=sbin/hastd +OLD_FILES+=usr/share/examples/hast/ucarp.sh +OLD_FILES+=usr/share/examples/hast/ucarp_down.sh +OLD_FILES+=usr/share/examples/hast/ucarp_up.sh +OLD_FILES+=usr/share/examples/hast/vip-down.sh +OLD_FILES+=usr/share/examples/hast/vip-up.sh +OLD_FILES+=usr/share/man/man5/hast.conf.5.gz +OLD_FILES+=usr/share/man/man8/hastctl.8.gz +OLD_FILES+=usr/share/man/man8/hastd.8.gz +OLD_DIRS+=usr/share/examples/hast +.endif + .if ${MK_HESIOD} == no OLD_FILES+=usr/bin/hesinfo OLD_FILES+=usr/include/hesiod.h Copied: stable/9/tools/build/options/WITHOUT_HAST (from r278556, stable/10/tools/build/options/WITHOUT_HAST) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/tools/build/options/WITHOUT_HAST Fri Feb 13 21:41:23 2015 (r278719, copy of r278556, stable/10/tools/build/options/WITHOUT_HAST) @@ -0,0 +1,4 @@ +.\" $FreeBSD$ +Set to not build +.Xr hastd 8 +and related utilities. From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:44:44 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AF735578; Fri, 13 Feb 2015 21:44: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 7F911ED6; Fri, 13 Feb 2015 21:44: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 t1DLii5H013182; Fri, 13 Feb 2015 21:44:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLiisv013181; Fri, 13 Feb 2015 21:44:44 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132144.t1DLiisv013181@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:44:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278720 - stable/9/share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:44:44 -0000 Author: ngie Date: Fri Feb 13 21:44:43 2015 New Revision: 278720 URL: https://svnweb.freebsd.org/changeset/base/278720 Log: Regen src.conf(5) Modified: stable/9/share/man/man5/src.conf.5 Modified: stable/9/share/man/man5/src.conf.5 ============================================================================== --- stable/9/share/man/man5/src.conf.5 Fri Feb 13 21:41:23 2015 (r278719) +++ stable/9/share/man/man5/src.conf.5 Fri Feb 13 21:44:43 2015 (r278720) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/9/tools/build/options/makeman 263058 2014-03-11 23:04:32Z gjb .\" $FreeBSD$ -.Dd February 11, 2015 +.Dd February 13, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -220,6 +220,12 @@ Set to not build Bluetooth related kerne .It Va WITHOUT_BOOT .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BSDINSTALL +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BSDINSTALL 278714 2015-02-13 21:25:56Z ngie +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on @@ -251,6 +257,11 @@ Set to build some programs without optio .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CALENDAR 156932 2006-03-21 07:50:50Z ru Set to not build .Xr calendar 1 . +.It Va WITHOUT_CCD +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CCD 278718 2015-02-13 21:36:16Z ngie +Set to not build +.Xr geom_ccd 4 +and related utilities. .It Va WITHOUT_CDDL .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. @@ -485,6 +496,11 @@ You should consider installing the textp .It Va WITHOUT_GSSAPI .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_GSSAPI 174548 2007-12-12 16:39:32Z ru Set to not build libgssapi. +.It Va WITHOUT_HAST +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_HAST 278719 2015-02-13 21:41:23Z ngie +Set to not build +.Xr hastd 8 +and related utilities. .It Va WITH_HESIOD .\" from FreeBSD: stable/9/tools/build/options/WITH_HESIOD 156932 2006-03-21 07:50:50Z ru Set to build Hesiod support. @@ -990,6 +1006,12 @@ support files such as keyboard maps, fon Set to not build .Xr sysinstall 8 and related programs. +.It Va WITHOUT_TALK +.\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TALK 278712 2015-02-13 21:21:51Z ngie +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . .It Va WITHOUT_TCSH .\" from FreeBSD: stable/9/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 21:46:23 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DEA956C9; Fri, 13 Feb 2015 21:46: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 AF5FAEEB; Fri, 13 Feb 2015 21:46: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 t1DLkNAg013475; Fri, 13 Feb 2015 21:46:23 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DLkNke013474; Fri, 13 Feb 2015 21:46:23 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132146.t1DLkNke013474@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 21:46:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278721 - stable/10/share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 21:46:24 -0000 Author: ngie Date: Fri Feb 13 21:46:22 2015 New Revision: 278721 URL: https://svnweb.freebsd.org/changeset/base/278721 Log: Regen src.conf(5) Modified: stable/10/share/man/man5/src.conf.5 Modified: stable/10/share/man/man5/src.conf.5 ============================================================================== --- stable/10/share/man/man5/src.conf.5 Fri Feb 13 21:44:43 2015 (r278720) +++ stable/10/share/man/man5/src.conf.5 Fri Feb 13 21:46:22 2015 (r278721) @@ -1,7 +1,7 @@ .\" DO NOT EDIT-- this file is automatically generated. .\" from FreeBSD: stable/10/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\" $FreeBSD$ -.Dd February 10, 2015 +.Dd February 13, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -159,6 +159,12 @@ This option will be removed in due time. .It Va WITHOUT_BOOT .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BOOT 156932 2006-03-21 07:50:50Z ru Set to not build the boot blocks and loader. +.It Va WITHOUT_BSDINSTALL +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSDINSTALL 278713 2015-02-13 21:24:32Z ngie +Set to not build +.Xr bsdinstall 8 , +.Xr sade 8 , +and related programs. .It Va WITHOUT_BSD_CPIO .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_BSD_CPIO 179813 2008-06-16 05:48:15Z dougb Set to not build the BSD licensed version of cpio based on @@ -193,6 +199,11 @@ Set to not build .It Va WITHOUT_CAPSICUM .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CAPSICUM 229319 2012-01-02 21:57:58Z rwatson Set to not build Capsicum support into system programs. +.It Va WITHOUT_CCD +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CCD 278717 2015-02-13 21:32:05Z ngie +Set to not build +.Xr geom_ccd 4 +and related utilities. .It Va WITHOUT_CDDL .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_CDDL 163861 2006-11-01 09:02:11Z jb Set to not build code licensed under Sun's CDDL. @@ -929,6 +940,12 @@ Set to avoid compiling profiled librarie Set to not build .Xr quota 8 and related programs. +.It Va WITHOUT_RADIUS_SUPPORT +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RADIUS_SUPPORT 278569 2015-02-11 08:52:29Z ngie +Set to not build radius support into various applications, like +.Xr pam_radius 8 +and +.Xr ppp 8 . .It Va WITHOUT_RCMDS .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_RCMDS 156932 2006-03-21 07:50:50Z ru Disable building of the @@ -1018,6 +1035,12 @@ support files such as keyboard maps, fon Set to not build .Xr sysinstall 8 and related programs. +.It Va WITHOUT_TALK +.\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TALK 278710 2015-02-13 21:19:54Z ngie +Set to not build or install +.Xr talk 1 +and +.Xr talkd 8 . .It Va WITHOUT_TCSH .\" from FreeBSD: stable/10/tools/build/options/WITHOUT_TCSH 156932 2006-03-21 07:50:50Z ru Set to not build and install From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 22:01:16 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2DDE965; Fri, 13 Feb 2015 22:01: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 BBABAE3; Fri, 13 Feb 2015 22:01: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 t1DM1G14020150; Fri, 13 Feb 2015 22:01:16 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM1FPi020144; Fri, 13 Feb 2015 22:01:15 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132201.t1DM1FPi020144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 22:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278722 - in stable/10/sys/arm: allwinner allwinner/a20 freescale/imx rockchip X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:01:16 -0000 Author: ian Date: Fri Feb 13 22:01:14 2015 New Revision: 278722 URL: https://svnweb.freebsd.org/changeset/base/278722 Log: MFC r257740, r257739: Switch to using common armv6 bus_space tag. Deleted: stable/10/sys/arm/allwinner/bus_space.c stable/10/sys/arm/freescale/imx/bus_space.c stable/10/sys/arm/rockchip/bus_space.c Modified: stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/files.a10 stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/rockchip/files.rk30xx Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 22:01:14 2015 (r278722) @@ -17,7 +17,7 @@ arm/allwinner/a10_ehci.c optional ehci arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard -arm/allwinner/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard arm/allwinner/a20/a20_mp.c optional smp Modified: stable/10/sys/arm/allwinner/files.a10 ============================================================================== --- stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 22:01:14 2015 (r278722) @@ -19,5 +19,5 @@ arm/allwinner/a20/a20_cpu_cfg.c standar arm/allwinner/aintc.c standard arm/allwinner/if_emac.c optional emac arm/allwinner/timer.c standard -arm/allwinner/bus_space.c standard +arm/arm/bus_space-v6.c standard #arm/allwinner/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 22:01:14 2015 (r278722) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx51_machdep.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard # Dummy serial console #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 22:01:14 2015 (r278722) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx53_machdep.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard # Special serial console for debuging early boot code #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 22:01:14 2015 (r278722) @@ -15,7 +15,7 @@ kern/kern_clocksource.c standard # arm/arm/gic.c standard arm/arm/pl310.c standard -arm/freescale/imx/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard Modified: stable/10/sys/arm/rockchip/files.rk30xx ============================================================================== --- stable/10/sys/arm/rockchip/files.rk30xx Fri Feb 13 21:46:22 2015 (r278721) +++ stable/10/sys/arm/rockchip/files.rk30xx Fri Feb 13 22:01:14 2015 (r278722) @@ -11,7 +11,7 @@ arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard -arm/rockchip/bus_space.c standard +arm/arm/bus_space-v6.c standard arm/rockchip/rk30xx_common.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 22:05:37 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2469C2E; Fri, 13 Feb 2015 22:05:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCD4E124; Fri, 13 Feb 2015 22:05:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DM5bul023173; Fri, 13 Feb 2015 22:05:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM5bxc023172; Fri, 13 Feb 2015 22:05:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502132205.t1DM5bxc023172@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 13 Feb 2015 22:05:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278723 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:05:37 -0000 Author: ngie Date: Fri Feb 13 22:05:36 2015 New Revision: 278723 URL: https://svnweb.freebsd.org/changeset/base/278723 Log: Unbreak the build by .include'ing bsd.own.mk Pointyhat to: me Modified: stable/9/share/man/man4/Makefile Modified: stable/9/share/man/man4/Makefile ============================================================================== --- stable/9/share/man/man4/Makefile Fri Feb 13 22:01:14 2015 (r278722) +++ stable/9/share/man/man4/Makefile Fri Feb 13 22:05:36 2015 (r278723) @@ -1,6 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/18/93 # $FreeBSD$ +.include + MAN= aac.4 \ aacraid.4 \ acpi.4 \ From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 22:05:59 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3943D5D; Fri, 13 Feb 2015 22:05: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 9A92812C; Fri, 13 Feb 2015 22:05: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 t1DM5xpf023292; Fri, 13 Feb 2015 22:05:59 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM5tQV023263; Fri, 13 Feb 2015 22:05:55 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132205.t1DM5tQV023263@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 22:05:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278724 - in stable/10: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libcxxrt lib/libc++ lib/libcxxrt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:05:59 -0000 Author: dim Date: Fri Feb 13 22:05:54 2015 New Revision: 278724 URL: https://svnweb.freebsd.org/changeset/base/278724 Log: Synchronize the default C++ stack in stable/10 with head, by merging almost all recent changes to libc++ and libcxxrt. MFC r256642: Since C++ typeinfo objects are currently not guaranteed to be merged at runtime by the dynamic linker, check for their equality in libcxxrt by not only comparing the typeinfo's name pointers, but also comparing the full names, if necessary. (This is similar to what GNU libstdc++ does in its default configuration.) The 'deep' check can be turned off again by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt. Reviewed by: theraven MFC r270522 (by rdivacky): The standard we compile libc++ with is called c++11 not c++0x. MFC r273066 (by bapt): Import patch from libc++ r197313 which allows using libc++ headers with gcc Differential Revision: https://reviews.freebsd.org/D942 Reviewed by: imp MFC r273381 (by bapt): Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r273382 (by bapt): Fix build by marking the new functions as weak This is a temporary fix MFC r273407 (by bapt): When using an external gcc 4.8+ and not building libstdc++ then create in the objectdir a fake libstdc++.so and libstdc++.a which is a symlink on libc++ that allow g++ to satisfy its links dependencies in the least hackish way. Please note that this hacky libstds++ never get installed on the final system Reviewed by: imp MFC r273434 (by bapt): Do not define bad_array_new_length::bad_array_new_length in libc++ anymore when used in combinaison with libcxxrt since it is now defined there already. This fixes building world MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390 MFC r277217: 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 r277944: Partially revert r273382, to reduce diffs against upstream. This was a temporary fix to solve a conflict with an older version of libc++, and it is no longer relevant. MFC r278010: Revert r256642, not only to reduce diffs against upstream libcxxrt, but also because it is the wrong approach: comparing typeinfo names deeply causes trouble if two loaded DSOs use independent types of the same name. In addition, this particular change was never merged to FreeBSD 10.x and 9.x, so let's get rid of it before it ends up in an 11.x release. Discussed with: theraven, joerg@netbsd MFC r278016: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw() Added: stable/10/contrib/libc++/include/__refstring - copied unchanged from r277217, head/contrib/libc++/include/__refstring stable/10/contrib/libc++/include/experimental/__config - copied unchanged from r277217, head/contrib/libc++/include/experimental/__config stable/10/contrib/libc++/include/experimental/string_view - copied unchanged from r277217, head/contrib/libc++/include/experimental/string_view stable/10/contrib/libc++/include/experimental/type_traits - copied unchanged from r277217, head/contrib/libc++/include/experimental/type_traits stable/10/contrib/libc++/include/experimental/utility - copied unchanged from r277217, head/contrib/libc++/include/experimental/utility stable/10/contrib/libc++/include/module.modulemap - copied unchanged from r277217, head/contrib/libc++/include/module.modulemap Modified: stable/10/contrib/libc++/CREDITS.TXT stable/10/contrib/libc++/LICENSE.TXT stable/10/contrib/libc++/include/__bit_reference stable/10/contrib/libc++/include/__config stable/10/contrib/libc++/include/__debug stable/10/contrib/libc++/include/__functional_03 stable/10/contrib/libc++/include/__functional_base stable/10/contrib/libc++/include/__functional_base_03 stable/10/contrib/libc++/include/__hash_table stable/10/contrib/libc++/include/__locale stable/10/contrib/libc++/include/__mutex_base stable/10/contrib/libc++/include/__sso_allocator stable/10/contrib/libc++/include/__tree stable/10/contrib/libc++/include/__tuple stable/10/contrib/libc++/include/algorithm stable/10/contrib/libc++/include/atomic stable/10/contrib/libc++/include/bitset stable/10/contrib/libc++/include/chrono stable/10/contrib/libc++/include/cmath stable/10/contrib/libc++/include/condition_variable stable/10/contrib/libc++/include/cstddef stable/10/contrib/libc++/include/deque stable/10/contrib/libc++/include/experimental/dynarray stable/10/contrib/libc++/include/experimental/optional stable/10/contrib/libc++/include/ext/__hash stable/10/contrib/libc++/include/ext/hash_map stable/10/contrib/libc++/include/forward_list stable/10/contrib/libc++/include/functional stable/10/contrib/libc++/include/future stable/10/contrib/libc++/include/iomanip stable/10/contrib/libc++/include/ios stable/10/contrib/libc++/include/istream stable/10/contrib/libc++/include/iterator stable/10/contrib/libc++/include/limits stable/10/contrib/libc++/include/list stable/10/contrib/libc++/include/locale stable/10/contrib/libc++/include/map stable/10/contrib/libc++/include/memory stable/10/contrib/libc++/include/mutex stable/10/contrib/libc++/include/new stable/10/contrib/libc++/include/numeric stable/10/contrib/libc++/include/ostream stable/10/contrib/libc++/include/random stable/10/contrib/libc++/include/regex stable/10/contrib/libc++/include/set stable/10/contrib/libc++/include/shared_mutex stable/10/contrib/libc++/include/sstream stable/10/contrib/libc++/include/stdexcept stable/10/contrib/libc++/include/string stable/10/contrib/libc++/include/thread stable/10/contrib/libc++/include/tuple stable/10/contrib/libc++/include/type_traits stable/10/contrib/libc++/include/typeinfo stable/10/contrib/libc++/include/unordered_map stable/10/contrib/libc++/include/unordered_set stable/10/contrib/libc++/include/utility stable/10/contrib/libc++/include/valarray stable/10/contrib/libc++/include/vector stable/10/contrib/libc++/src/algorithm.cpp stable/10/contrib/libc++/src/chrono.cpp stable/10/contrib/libc++/src/condition_variable.cpp stable/10/contrib/libc++/src/debug.cpp stable/10/contrib/libc++/src/exception.cpp stable/10/contrib/libc++/src/future.cpp stable/10/contrib/libc++/src/hash.cpp stable/10/contrib/libc++/src/ios.cpp stable/10/contrib/libc++/src/locale.cpp stable/10/contrib/libc++/src/memory.cpp stable/10/contrib/libc++/src/mutex.cpp stable/10/contrib/libc++/src/new.cpp stable/10/contrib/libc++/src/optional.cpp stable/10/contrib/libc++/src/random.cpp stable/10/contrib/libc++/src/regex.cpp stable/10/contrib/libc++/src/shared_mutex.cpp stable/10/contrib/libc++/src/stdexcept.cpp stable/10/contrib/libc++/src/string.cpp stable/10/contrib/libc++/src/strstream.cpp stable/10/contrib/libc++/src/system_error.cpp stable/10/contrib/libc++/src/thread.cpp stable/10/contrib/libc++/src/valarray.cpp stable/10/contrib/libcxxrt/atomic.h stable/10/contrib/libcxxrt/auxhelper.cc stable/10/contrib/libcxxrt/cxxabi.h stable/10/contrib/libcxxrt/dwarf_eh.h stable/10/contrib/libcxxrt/dynamic_cast.cc stable/10/contrib/libcxxrt/exception.cc stable/10/contrib/libcxxrt/guard.cc stable/10/contrib/libcxxrt/stdexcept.cc stable/10/contrib/libcxxrt/stdexcept.h stable/10/contrib/libcxxrt/typeinfo.cc stable/10/contrib/libcxxrt/unwind-arm.h stable/10/contrib/libcxxrt/unwind.h stable/10/lib/libc++/Makefile stable/10/lib/libcxxrt/Version.map Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/libc++/CREDITS.TXT ============================================================================== --- stable/10/contrib/libc++/CREDITS.TXT Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/CREDITS.TXT Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/LICENSE.TXT ============================================================================== --- stable/10/contrib/libc++/LICENSE.TXT Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/LICENSE.TXT Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__bit_reference ============================================================================== --- stable/10/contrib/libc++/include/__bit_reference Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__bit_reference Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__config ============================================================================== --- stable/10/contrib/libc++/include/__config Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__config Fri Feb 13 22:05:54 2015 (r278724) @@ -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__ @@ -374,6 +423,7 @@ namespace std { #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS +#define _LIBCPP_HAS_NO_STRONG_ENUMS #else // __GXX_EXPERIMENTAL_CXX0X__ @@ -389,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 @@ -402,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 { @@ -414,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 } @@ -438,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 @@ -454,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) @@ -470,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; @@ -514,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) \ @@ -545,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 @@ -567,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 @@ -592,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 @@ -617,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: stable/10/contrib/libc++/include/__debug ============================================================================== --- stable/10/contrib/libc++/include/__debug Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__debug Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__functional_03 ============================================================================== --- stable/10/contrib/libc++/include/__functional_03 Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__functional_03 Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__functional_base ============================================================================== --- stable/10/contrib/libc++/include/__functional_base Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__functional_base Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__functional_base_03 ============================================================================== --- stable/10/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__hash_table ============================================================================== --- stable/10/contrib/libc++/include/__hash_table Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__hash_table Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__locale ============================================================================== --- stable/10/contrib/libc++/include/__locale Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__locale Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__mutex_base ============================================================================== --- stable/10/contrib/libc++/include/__mutex_base Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__mutex_base Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__refstring (from r277217, head/contrib/libc++/include/__refstring) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/libc++/include/__refstring Fri Feb 13 22:05:54 2015 (r278724, copy of r277217, head/contrib/libc++/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: stable/10/contrib/libc++/include/__sso_allocator ============================================================================== --- stable/10/contrib/libc++/include/__sso_allocator Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__sso_allocator Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__tree ============================================================================== --- stable/10/contrib/libc++/include/__tree Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__tree Fri Feb 13 22:05:54 2015 (r278724) @@ -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: stable/10/contrib/libc++/include/__tuple ============================================================================== --- stable/10/contrib/libc++/include/__tuple Fri Feb 13 22:05:36 2015 (r278723) +++ stable/10/contrib/libc++/include/__tuple Fri Feb 13 22:05:54 2015 (r278724) @@ -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 {}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 22:07:50 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6200EAE; Fri, 13 Feb 2015 22:07: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 8CDAB140; Fri, 13 Feb 2015 22:07: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 t1DM7owq023606; Fri, 13 Feb 2015 22:07:50 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM7kBH023579; Fri, 13 Feb 2015 22:07:46 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502132207.t1DM7kBH023579@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 13 Feb 2015 22:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278725 - in stable/9: contrib/libc++ contrib/libc++/include contrib/libc++/include/experimental contrib/libc++/include/ext contrib/libc++/src contrib/libcxxrt etc/mtree lib/libc++ lib/... X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:07:50 -0000 Author: dim Date: Fri Feb 13 22:07:45 2015 New Revision: 278725 URL: https://svnweb.freebsd.org/changeset/base/278725 Log: Synchronize the (non-default) libc++/libcxxrt C++ stack in stable/9 with head, by merging almost all recent changes to libc++ and libcxxrt. MFC r255206 (by theraven): Add a c++/v1/tr1 include directory containing symlinks to all of the standard headrs. Lots of third-party code expects to find C++03 headers under tr1 because that's where GNU decided to hide them. This should fix ports that expect them there. MFC r256642: Since C++ typeinfo objects are currently not guaranteed to be merged at runtime by the dynamic linker, check for their equality in libcxxrt by not only comparing the typeinfo's name pointers, but also comparing the full names, if necessary. (This is similar to what GNU libstdc++ does in its default configuration.) The 'deep' check can be turned off again by defining LIBCXXRT_MERGED_TYPEINFO, and recompiling libcxxrt. Reviewed by: theraven MFC r270522 (by rdivacky): The standard we compile libc++ with is called c++11 not c++0x. MFC r273066 (by bapt): Import patch from libc++ r197313 which allows using libc++ headers with gcc Differential Revision: https://reviews.freebsd.org/D942 Reviewed by: imp MFC r273381 (by bapt): Add support for __cxa_throw_bad_array_new_length in libcxxrt It is required for use with newer g++49 Differential Revision: https://reviews.freebsd.org/D982 Reviewed by: theraven Approved by: theraven MFC r273382 (by bapt): Fix build by marking the new functions as weak This is a temporary fix MFC r273434 (by bapt): Do not define bad_array_new_length::bad_array_new_length in libc++ anymore when used in combinaison with libcxxrt since it is now defined there already. This fixes building world MFC r276417: Import libcxxrt master 00bc29eb6513624824a6d7db2ebc768a4216a604. Interesting fixes: 76584a0 Reorganize code to use only 32bit atomic ops for 32bit platforms 30d2ae5 Implement __cxa_throw_bad_array_new_length Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D1390 MFC r277217: 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 r277944: Partially revert r273382, to reduce diffs against upstream. This was a temporary fix to solve a conflict with an older version of libc++, and it is no longer relevant. MFC r278010: Revert r256642, not only to reduce diffs against upstream libcxxrt, but also because it is the wrong approach: comparing typeinfo names deeply causes trouble if two loaded DSOs use independent types of the same name. In addition, this particular change was never merged to FreeBSD 10.x and 9.x, so let's get rid of it before it ends up in an 11.x release. Discussed with: theraven, joerg@netbsd MFC r278016: Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc. Interesting fixes: 1cb607e Correct gcc version check for __cxa_begin_catch() declaration with or without throw() Added: stable/9/contrib/libc++/include/__refstring - copied unchanged from r277217, head/contrib/libc++/include/__refstring stable/9/contrib/libc++/include/experimental/__config - copied unchanged from r277217, head/contrib/libc++/include/experimental/__config stable/9/contrib/libc++/include/experimental/string_view - copied unchanged from r277217, head/contrib/libc++/include/experimental/string_view stable/9/contrib/libc++/include/experimental/type_traits - copied unchanged from r277217, head/contrib/libc++/include/experimental/type_traits stable/9/contrib/libc++/include/experimental/utility - copied unchanged from r277217, head/contrib/libc++/include/experimental/utility stable/9/contrib/libc++/include/module.modulemap - copied unchanged from r277217, head/contrib/libc++/include/module.modulemap Modified: stable/9/contrib/libc++/CREDITS.TXT stable/9/contrib/libc++/LICENSE.TXT stable/9/contrib/libc++/include/__bit_reference stable/9/contrib/libc++/include/__config stable/9/contrib/libc++/include/__debug stable/9/contrib/libc++/include/__functional_03 stable/9/contrib/libc++/include/__functional_base stable/9/contrib/libc++/include/__functional_base_03 stable/9/contrib/libc++/include/__hash_table stable/9/contrib/libc++/include/__locale stable/9/contrib/libc++/include/__mutex_base stable/9/contrib/libc++/include/__sso_allocator stable/9/contrib/libc++/include/__tree stable/9/contrib/libc++/include/__tuple stable/9/contrib/libc++/include/algorithm stable/9/contrib/libc++/include/atomic stable/9/contrib/libc++/include/bitset stable/9/contrib/libc++/include/chrono stable/9/contrib/libc++/include/cmath stable/9/contrib/libc++/include/condition_variable stable/9/contrib/libc++/include/cstddef stable/9/contrib/libc++/include/deque stable/9/contrib/libc++/include/experimental/dynarray stable/9/contrib/libc++/include/experimental/optional stable/9/contrib/libc++/include/ext/__hash stable/9/contrib/libc++/include/ext/hash_map stable/9/contrib/libc++/include/forward_list stable/9/contrib/libc++/include/functional stable/9/contrib/libc++/include/future stable/9/contrib/libc++/include/iomanip stable/9/contrib/libc++/include/ios stable/9/contrib/libc++/include/istream stable/9/contrib/libc++/include/iterator stable/9/contrib/libc++/include/limits stable/9/contrib/libc++/include/list stable/9/contrib/libc++/include/locale stable/9/contrib/libc++/include/map stable/9/contrib/libc++/include/memory stable/9/contrib/libc++/include/mutex stable/9/contrib/libc++/include/new stable/9/contrib/libc++/include/numeric stable/9/contrib/libc++/include/ostream stable/9/contrib/libc++/include/random stable/9/contrib/libc++/include/regex stable/9/contrib/libc++/include/set stable/9/contrib/libc++/include/shared_mutex stable/9/contrib/libc++/include/sstream stable/9/contrib/libc++/include/stdexcept stable/9/contrib/libc++/include/string stable/9/contrib/libc++/include/thread stable/9/contrib/libc++/include/tuple stable/9/contrib/libc++/include/type_traits stable/9/contrib/libc++/include/typeinfo stable/9/contrib/libc++/include/unordered_map stable/9/contrib/libc++/include/unordered_set stable/9/contrib/libc++/include/utility stable/9/contrib/libc++/include/valarray stable/9/contrib/libc++/include/vector stable/9/contrib/libc++/src/algorithm.cpp stable/9/contrib/libc++/src/chrono.cpp stable/9/contrib/libc++/src/condition_variable.cpp stable/9/contrib/libc++/src/debug.cpp stable/9/contrib/libc++/src/exception.cpp stable/9/contrib/libc++/src/future.cpp stable/9/contrib/libc++/src/hash.cpp stable/9/contrib/libc++/src/ios.cpp stable/9/contrib/libc++/src/locale.cpp stable/9/contrib/libc++/src/memory.cpp stable/9/contrib/libc++/src/mutex.cpp stable/9/contrib/libc++/src/new.cpp stable/9/contrib/libc++/src/optional.cpp stable/9/contrib/libc++/src/random.cpp stable/9/contrib/libc++/src/regex.cpp stable/9/contrib/libc++/src/shared_mutex.cpp stable/9/contrib/libc++/src/stdexcept.cpp stable/9/contrib/libc++/src/string.cpp stable/9/contrib/libc++/src/strstream.cpp stable/9/contrib/libc++/src/system_error.cpp stable/9/contrib/libc++/src/thread.cpp stable/9/contrib/libc++/src/valarray.cpp stable/9/contrib/libcxxrt/atomic.h stable/9/contrib/libcxxrt/auxhelper.cc stable/9/contrib/libcxxrt/cxxabi.h stable/9/contrib/libcxxrt/dwarf_eh.h stable/9/contrib/libcxxrt/dynamic_cast.cc stable/9/contrib/libcxxrt/exception.cc stable/9/contrib/libcxxrt/guard.cc stable/9/contrib/libcxxrt/stdexcept.cc stable/9/contrib/libcxxrt/stdexcept.h stable/9/contrib/libcxxrt/typeinfo.cc stable/9/contrib/libcxxrt/unwind-arm.h stable/9/contrib/libcxxrt/unwind.h stable/9/etc/mtree/BSD.include.dist stable/9/lib/libc++/Makefile stable/9/lib/libcxxrt/Version.map Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) stable/9/contrib/libc++/ (props changed) stable/9/contrib/libcxxrt/ (props changed) stable/9/etc/ (props changed) stable/9/etc/mtree/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc++/ (props changed) stable/9/lib/libcxxrt/ (props changed) Modified: stable/9/contrib/libc++/CREDITS.TXT ============================================================================== --- stable/9/contrib/libc++/CREDITS.TXT Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/CREDITS.TXT Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/LICENSE.TXT ============================================================================== --- stable/9/contrib/libc++/LICENSE.TXT Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/LICENSE.TXT Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__bit_reference ============================================================================== --- stable/9/contrib/libc++/include/__bit_reference Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__bit_reference Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__config ============================================================================== --- stable/9/contrib/libc++/include/__config Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__config Fri Feb 13 22:07:45 2015 (r278725) @@ -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__ @@ -374,6 +423,7 @@ namespace std { #define _LIBCPP_HAS_NO_VARIADICS #define _LIBCPP_HAS_NO_RVALUE_REFERENCES #define _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS +#define _LIBCPP_HAS_NO_STRONG_ENUMS #else // __GXX_EXPERIMENTAL_CXX0X__ @@ -389,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 @@ -402,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 { @@ -414,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 } @@ -438,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 @@ -454,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) @@ -470,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; @@ -514,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) \ @@ -545,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 @@ -567,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 @@ -592,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 @@ -617,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: stable/9/contrib/libc++/include/__debug ============================================================================== --- stable/9/contrib/libc++/include/__debug Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__debug Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__functional_03 ============================================================================== --- stable/9/contrib/libc++/include/__functional_03 Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__functional_03 Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__functional_base ============================================================================== --- stable/9/contrib/libc++/include/__functional_base Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__functional_base Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__functional_base_03 ============================================================================== --- stable/9/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__functional_base_03 Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__hash_table ============================================================================== --- stable/9/contrib/libc++/include/__hash_table Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__hash_table Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__locale ============================================================================== --- stable/9/contrib/libc++/include/__locale Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__locale Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__mutex_base ============================================================================== --- stable/9/contrib/libc++/include/__mutex_base Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__mutex_base Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__refstring (from r277217, head/contrib/libc++/include/__refstring) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/libc++/include/__refstring Fri Feb 13 22:07:45 2015 (r278725, copy of r277217, head/contrib/libc++/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: stable/9/contrib/libc++/include/__sso_allocator ============================================================================== --- stable/9/contrib/libc++/include/__sso_allocator Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__sso_allocator Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__tree ============================================================================== --- stable/9/contrib/libc++/include/__tree Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__tree Fri Feb 13 22:07:45 2015 (r278725) @@ -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: stable/9/contrib/libc++/include/__tuple ============================================================================== --- stable/9/contrib/libc++/include/__tuple Fri Feb 13 22:05:54 2015 (r278724) +++ stable/9/contrib/libc++/include/__tuple Fri Feb 13 22:07:45 2015 (r278725) @@ -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 {}; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 22:08:21 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 495BEFE9; Fri, 13 Feb 2015 22:08: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 1937314F; Fri, 13 Feb 2015 22:08: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 t1DM8KDj023744; Fri, 13 Feb 2015 22:08:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DM8KHK023741; Fri, 13 Feb 2015 22:08:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132208.t1DM8KHK023741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 22:08:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278726 - in stable/10/sys: arm/conf arm/s3c2xx0 arm/samsung/s3c2xx0 dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:08:21 -0000 Author: ian Date: Fri Feb 13 22:08:19 2015 New Revision: 278726 URL: https://svnweb.freebsd.org/changeset/base/278726 Log: MFC r272103: Move s3c2xx0 into the samsung directory. Added: stable/10/sys/arm/samsung/s3c2xx0/ - copied from r272103, head/sys/arm/samsung/s3c2xx0/ Deleted: stable/10/sys/arm/s3c2xx0/ Modified: stable/10/sys/arm/conf/LN2410SBC stable/10/sys/arm/conf/NOTES stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/LN2410SBC ============================================================================== --- stable/10/sys/arm/conf/LN2410SBC Fri Feb 13 22:07:45 2015 (r278725) +++ stable/10/sys/arm/conf/LN2410SBC Fri Feb 13 22:08:19 2015 (r278726) @@ -19,7 +19,7 @@ ident LN2410SBC -include "../s3c2xx0/std.ln2410sbc" +include "../samsung/s3c2xx0/std.ln2410sbc" #To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. makeoptions MODULES_OVERRIDE="" Modified: stable/10/sys/arm/conf/NOTES ============================================================================== --- stable/10/sys/arm/conf/NOTES Fri Feb 13 22:07:45 2015 (r278725) +++ stable/10/sys/arm/conf/NOTES Fri Feb 13 22:08:19 2015 (r278726) @@ -19,7 +19,7 @@ files "../mv/discovery/files.db78xxx" files "../mv/kirkwood/files.kirkwood" files "../mv/orion/files.db88f5xxx" files "../mv/orion/files.ts7800" -files "../s3c2xx0/files.s3c2xx0" +files "../samsung/s3c2xx0/files.s3c2xx0" files "../xscale/i80321/files.ep80219" files "../xscale/i80321/files.i80219" files "../xscale/i80321/files.i80321" Modified: stable/10/sys/dev/usb/controller/ohci_s3c24x0.c ============================================================================== --- stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Fri Feb 13 22:07:45 2015 (r278725) +++ stable/10/sys/dev/usb/controller/ohci_s3c24x0.c Fri Feb 13 22:08:19 2015 (r278726) @@ -60,7 +60,7 @@ __FBSDID("$FreeBSD$"); #include -#include +#include static device_probe_t ohci_s3c24x0_probe; static device_attach_t ohci_s3c24x0_attach; From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 22:32:07 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E12980B; Fri, 13 Feb 2015 22:32: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 7429E637; Fri, 13 Feb 2015 22:32: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 t1DMW7sL037125; Fri, 13 Feb 2015 22:32:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DMW3qZ037103; Fri, 13 Feb 2015 22:32:03 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132232.t1DMW3qZ037103@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 22:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278727 - in stable/10/sys: arm/allwinner arm/allwinner/a20 arm/arm arm/at91 arm/broadcom/bcm2835 arm/cavium/cns11xx arm/freescale/imx arm/freescale/vybrid arm/include arm/lpc arm/mv ar... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 22:32:07 -0000 Author: ian Date: Fri Feb 13 22:32:02 2015 New Revision: 278727 URL: https://svnweb.freebsd.org/changeset/base/278727 Log: MFC r277454, r277460, r277465, r277466, r277467, r277469, r277470, r277471, r277472, r277473, r277474, r277475, r277476, r277477, r277478, r277479, r277480, r277512, r277516: Add inline implementations of arm bus_space_read/write_N(). Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses. Use the explicit member initializer style to init the bus_space struct. Use arm/bus_space-v6.c for all armv6 systems Consolidate many identical implementations of bus_space to a single common tag and implementation shared by armv4 and armv6. Micro-optimize the new arm inline bus_space implementation by grouping all the data the inline functions access together at the start of the bus_space struct so that they all fit in a single cache line. Added: stable/10/sys/arm/arm/bus_space_base.c - copied, changed from r277472, head/sys/arm/arm/bus_space_base.c Deleted: stable/10/sys/arm/arm/bus_space-v6.c stable/10/sys/arm/lpc/lpc_space.c stable/10/sys/arm/mv/bus_space.c stable/10/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c stable/10/sys/arm/versatile/bus_space.c stable/10/sys/arm/versatile/versatile_pci_bus_space.c stable/10/sys/arm/versatile/versatile_pci_bus_space.h stable/10/sys/arm/xilinx/zy7_bus_space.c stable/10/sys/arm/xscale/i80321/obio_space.c stable/10/sys/arm/xscale/i8134x/obio_space.c Modified: stable/10/sys/arm/allwinner/a20/files.a20 stable/10/sys/arm/allwinner/files.a10 stable/10/sys/arm/arm/bus_space_asm_generic.S stable/10/sys/arm/arm/bus_space_generic.c stable/10/sys/arm/at91/at91.c stable/10/sys/arm/at91/files.at91 stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 stable/10/sys/arm/cavium/cns11xx/econa.c stable/10/sys/arm/cavium/cns11xx/files.econa stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/freescale/vybrid/files.vybrid stable/10/sys/arm/include/bus.h stable/10/sys/arm/lpc/files.lpc stable/10/sys/arm/mv/files.mv stable/10/sys/arm/rockchip/files.rk30xx stable/10/sys/arm/samsung/exynos/files.exynos5 stable/10/sys/arm/samsung/s3c2xx0/files.s3c2xx0 stable/10/sys/arm/samsung/s3c2xx0/s3c24x0.c stable/10/sys/arm/samsung/s3c2xx0/s3c2xx0var.h stable/10/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c stable/10/sys/arm/ti/files.ti stable/10/sys/arm/versatile/files.versatile stable/10/sys/arm/versatile/versatile_pci.c stable/10/sys/arm/xilinx/files.zynq7 stable/10/sys/arm/xscale/i80321/ep80219_machdep.c stable/10/sys/arm/xscale/i80321/files.ep80219 stable/10/sys/arm/xscale/i80321/files.i80219 stable/10/sys/arm/xscale/i80321/files.i80321 stable/10/sys/arm/xscale/i80321/files.iq31244 stable/10/sys/arm/xscale/i80321/i80321_space.c stable/10/sys/arm/xscale/i80321/iq31244_machdep.c stable/10/sys/arm/xscale/i80321/obio.c stable/10/sys/arm/xscale/i80321/obiovar.h stable/10/sys/arm/xscale/i80321/uart_cpu_i80321.c stable/10/sys/arm/xscale/i8134x/crb_machdep.c stable/10/sys/arm/xscale/i8134x/files.i81342 stable/10/sys/arm/xscale/i8134x/i81342_space.c stable/10/sys/arm/xscale/i8134x/obio.c stable/10/sys/arm/xscale/i8134x/obiovar.h stable/10/sys/arm/xscale/i8134x/uart_cpu_i81342.c stable/10/sys/arm/xscale/ixp425/avila_ata.c stable/10/sys/arm/xscale/ixp425/cambria_exp_space.c stable/10/sys/arm/xscale/ixp425/ixp425_a4x_space.c stable/10/sys/arm/xscale/ixp425/ixp425_pci_space.c stable/10/sys/arm/xscale/ixp425/ixp425_space.c stable/10/sys/arm/xscale/pxa/pxa_space.c stable/10/sys/dev/usb/controller/ehci_ixp4xx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a20/files.a20 ============================================================================== --- stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/allwinner/a20/files.a20 Fri Feb 13 22:32:02 2015 (r278727) @@ -17,7 +17,7 @@ arm/allwinner/a10_ehci.c optional ehci arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard -arm/arm/bus_space-v6.c standard -arm/allwinner/a10_common.c standard +arm/arm/bus_space_base.c standard +arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard arm/allwinner/a20/a20_mp.c optional smp Modified: stable/10/sys/arm/allwinner/files.a10 ============================================================================== --- stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/allwinner/files.a10 Fri Feb 13 22:32:02 2015 (r278727) @@ -19,5 +19,5 @@ arm/allwinner/a20/a20_cpu_cfg.c standar arm/allwinner/aintc.c standard arm/allwinner/if_emac.c optional emac arm/allwinner/timer.c standard -arm/arm/bus_space-v6.c standard -#arm/allwinner/console.c standard +arm/arm/bus_space_base.c standard +#arm/allwinner/console.c standard Modified: stable/10/sys/arm/arm/bus_space_asm_generic.S ============================================================================== --- stable/10/sys/arm/arm/bus_space_asm_generic.S Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/arm/bus_space_asm_generic.S Fri Feb 13 22:32:02 2015 (r278727) @@ -52,10 +52,10 @@ ENTRY(generic_bs_r_1) RET END(generic_bs_r_1) -ENTRY(generic_armv4_bs_r_2) +ENTRY(generic_bs_r_2) ldrh r0, [r1, r2] RET -END(generic_armv4_bs_r_2) +END(generic_bs_r_2) ENTRY(generic_bs_r_4) ldr r0, [r1, r2] @@ -71,10 +71,10 @@ ENTRY(generic_bs_w_1) RET END(generic_bs_w_1) -ENTRY(generic_armv4_bs_w_2) +ENTRY(generic_bs_w_2) strh r3, [r1, r2] RET -END(generic_armv4_bs_w_2) +END(generic_bs_w_2) ENTRY(generic_bs_w_4) str r3, [r1, r2] @@ -100,7 +100,7 @@ ENTRY(generic_bs_rm_1) RET END(generic_bs_rm_1) -ENTRY(generic_armv4_bs_rm_2) +ENTRY(generic_bs_rm_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -113,7 +113,7 @@ ENTRY(generic_armv4_bs_rm_2) bne 1b RET -END(generic_armv4_bs_rm_2) +END(generic_bs_rm_2) ENTRY(generic_bs_rm_4) add r0, r1, r2 @@ -149,7 +149,7 @@ ENTRY(generic_bs_wm_1) RET END(generic_bs_wm_1) -ENTRY(generic_armv4_bs_wm_2) +ENTRY(generic_bs_wm_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -162,7 +162,7 @@ ENTRY(generic_armv4_bs_wm_2) bne 1b RET -END(generic_armv4_bs_wm_2) +END(generic_bs_wm_2) ENTRY(generic_bs_wm_4) add r0, r1, r2 @@ -198,7 +198,7 @@ ENTRY(generic_bs_rr_1) RET END(generic_bs_rr_1) -ENTRY(generic_armv4_bs_rr_2) +ENTRY(generic_bs_rr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -211,7 +211,7 @@ ENTRY(generic_armv4_bs_rr_2) bne 1b RET -END(generic_armv4_bs_rr_2) +END(generic_bs_rr_2) ENTRY(generic_bs_rr_4) add r0, r1, r2 @@ -247,7 +247,7 @@ ENTRY(generic_bs_wr_1) RET END(generic_bs_wr_1) -ENTRY(generic_armv4_bs_wr_2) +ENTRY(generic_bs_wr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -260,7 +260,7 @@ ENTRY(generic_armv4_bs_wr_2) bne 1b RET -END(generic_armv4_bs_wr_2) +END(generic_bs_wr_2) ENTRY(generic_bs_wr_4) add r0, r1, r2 @@ -295,7 +295,7 @@ ENTRY(generic_bs_sr_1) RET END(generic_bs_sr_1) -ENTRY(generic_armv4_bs_sr_2) +ENTRY(generic_bs_sr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -307,7 +307,7 @@ ENTRY(generic_armv4_bs_sr_2) bne 1b RET -END(generic_armv4_bs_sr_2) +END(generic_bs_sr_2) ENTRY(generic_bs_sr_4) add r0, r1, r2 @@ -327,7 +327,7 @@ END(generic_bs_sr_4) * copy region */ -ENTRY(generic_armv4_bs_c_2) +ENTRY(generic_bs_c_2) add r0, r1, r2 ldr r2, [sp, #0] add r1, r2, r3 @@ -356,5 +356,5 @@ ENTRY(generic_armv4_bs_c_2) bne 3b RET -END(generic_armv4_bs_c_2) +END(generic_bs_c_2) Copied and modified: stable/10/sys/arm/arm/bus_space_base.c (from r277472, head/sys/arm/arm/bus_space_base.c) ============================================================================== --- head/sys/arm/arm/bus_space_base.c Wed Jan 21 03:44:29 2015 (r277472, copy source) +++ stable/10/sys/arm/arm/bus_space_base.c Fri Feb 13 22:32:02 2015 (r278727) @@ -45,7 +45,7 @@ bs_protos(generic); * The bus space tag. This is constant for all instances, so * we never have to explicitly "create" it. */ -static struct bus_space arm_base_tag = { +static struct bus_space arm_base_bus_space __aligned(CACHE_LINE_SIZE) = { /* privdata is whatever the implementer wants; unused in base tag */ .bs_privdata = NULL, @@ -153,5 +153,7 @@ static struct bus_space arm_base_tag = { }; #ifdef FDT -bus_space_tag_t fdtbus_bs_tag = &arm_base_tag; +bus_space_tag_t fdtbus_bs_tag = &arm_base_bus_space; #endif + +bus_space_tag_t arm_base_bs_tag = &arm_base_bus_space; Modified: stable/10/sys/arm/arm/bus_space_generic.c ============================================================================== --- stable/10/sys/arm/arm/bus_space_generic.c Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/arm/bus_space_generic.c Fri Feb 13 22:32:02 2015 (r278727) @@ -53,11 +53,18 @@ __FBSDID("$FreeBSD$"); #include #include +void +generic_bs_unimplemented(void) +{ + + panic("unimplemented bus_space function called"); +} + /* Prototypes for all the bus_space structure functions */ bs_protos(generic); int -generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +generic_bs_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { void *va; @@ -74,7 +81,7 @@ generic_bs_map(void *t, bus_addr_t bpa, } int -generic_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, +generic_bs_alloc(bus_space_tag_t t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp) { @@ -84,21 +91,21 @@ generic_bs_alloc(void *t, bus_addr_t rst void -generic_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +generic_bs_unmap(bus_space_tag_t t, bus_space_handle_t h, bus_size_t size) { pmap_unmapdev((vm_offset_t)h, size); } void -generic_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) +generic_bs_free(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size) { panic("generic_bs_free(): not implemented"); } int -generic_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +generic_bs_subregion(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -107,7 +114,7 @@ generic_bs_subregion(void *t, bus_space_ } void -generic_bs_barrier(void *t, bus_space_handle_t bsh, bus_size_t offset, +generic_bs_barrier(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t len, int flags) { Modified: stable/10/sys/arm/at91/at91.c ============================================================================== --- stable/10/sys/arm/at91/at91.c Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/at91/at91.c Fri Feb 13 22:32:02 2015 (r278727) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); uint32_t at91_master_clock; static int -at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +at91_bs_map(bus_space_tag_t tag, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { vm_paddr_t pa, endpa; @@ -77,23 +77,18 @@ at91_bs_map(void *t, bus_addr_t bpa, bus } static void -at91_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +at91_bs_unmap(bus_space_tag_t tag, bus_space_handle_t h, bus_size_t size) { - vm_offset_t va, endva; + vm_offset_t va; - if (t == 0) - return; - va = trunc_page((vm_offset_t)t); + va = (vm_offset_t)h; if (va >= AT91_BASE && va <= AT91_BASE + 0xff00000) return; - endva = round_page((vm_offset_t)t + size); - - /* Free the kernel virtual mapping. */ - kva_free(va, endva - va); + pmap_unmapdev(va, size); } static int -at91_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +at91_bs_subregion(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -102,7 +97,7 @@ at91_bs_subregion(void *t, bus_space_han } static void -at91_barrier(void *t, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, +at91_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, int a) { } @@ -121,113 +116,112 @@ bus_dma_get_range_nb(void) } bs_protos(generic); -bs_protos(generic_armv4); struct bus_space at91_bs_tag = { - /* cookie */ - (void *) 0, + /* privdata is whatever the implementer wants; unused in base tag */ + .bs_privdata = NULL, /* mapping/unmapping */ - at91_bs_map, - at91_bs_unmap, - at91_bs_subregion, + .bs_map = at91_bs_map, + .bs_unmap = at91_bs_unmap, + .bs_subregion = at91_bs_subregion, /* allocation/deallocation */ - NULL, - NULL, + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, /* barrier */ - at91_barrier, + .bs_barrier = at91_barrier, /* read (single) */ - generic_bs_r_1, - generic_armv4_bs_r_2, - generic_bs_r_4, - NULL, + .bs_r_1 = NULL, /* Use inline code in bus.h */ + .bs_r_2 = NULL, /* Use inline code in bus.h */ + .bs_r_4 = NULL, /* Use inline code in bus.h */ + .bs_r_8 = NULL, /* Use inline code in bus.h */ /* read multiple */ - generic_bs_rm_1, - generic_armv4_bs_rm_2, - generic_bs_rm_4, - NULL, + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = generic_bs_rm_2, + .bs_rm_4 = generic_bs_rm_4, + .bs_rm_8 = BS_UNIMPLEMENTED, /* read region */ - generic_bs_rr_1, - generic_armv4_bs_rr_2, - generic_bs_rr_4, - NULL, + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = generic_bs_rr_2, + .bs_rr_4 = generic_bs_rr_4, + .bs_rr_8 = BS_UNIMPLEMENTED, /* write (single) */ - generic_bs_w_1, - generic_armv4_bs_w_2, - generic_bs_w_4, - NULL, + .bs_w_1 = NULL, /* Use inline code in bus.h */ + .bs_w_2 = NULL, /* Use inline code in bus.h */ + .bs_w_4 = NULL, /* Use inline code in bus.h */ + .bs_w_8 = NULL, /* Use inline code in bus.h */ /* write multiple */ - generic_bs_wm_1, - generic_armv4_bs_wm_2, - generic_bs_wm_4, - NULL, + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = generic_bs_wm_2, + .bs_wm_4 = generic_bs_wm_4, + .bs_wm_8 = BS_UNIMPLEMENTED, /* write region */ - NULL, - generic_armv4_bs_wr_2, - generic_bs_wr_4, - NULL, + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = generic_bs_wr_2, + .bs_wr_4 = generic_bs_wr_4, + .bs_wr_8 = BS_UNIMPLEMENTED, /* set multiple */ - NULL, - NULL, - NULL, - NULL, + .bs_sm_1 = BS_UNIMPLEMENTED, + .bs_sm_2 = BS_UNIMPLEMENTED, + .bs_sm_4 = BS_UNIMPLEMENTED, + .bs_sm_8 = BS_UNIMPLEMENTED, /* set region */ - NULL, - generic_armv4_bs_sr_2, - generic_bs_sr_4, - NULL, + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = generic_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = BS_UNIMPLEMENTED, /* copy */ - NULL, - generic_armv4_bs_c_2, - NULL, - NULL, - - /* read (single) stream */ - generic_bs_r_1, - generic_armv4_bs_r_2, - generic_bs_r_4, - NULL, + .bs_c_1 = BS_UNIMPLEMENTED, + .bs_c_2 = generic_bs_c_2, + .bs_c_4 = BS_UNIMPLEMENTED, + .bs_c_8 = BS_UNIMPLEMENTED, + + /* read stream (single) */ + .bs_r_1_s = NULL, /* Use inline code in bus.h */ + .bs_r_2_s = NULL, /* Use inline code in bus.h */ + .bs_r_4_s = NULL, /* Use inline code in bus.h */ + .bs_r_8_s = NULL, /* Use inline code in bus.h */ /* read multiple stream */ - generic_bs_rm_1, - generic_armv4_bs_rm_2, - generic_bs_rm_4, - NULL, + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = BS_UNIMPLEMENTED, /* read region stream */ - generic_bs_rr_1, - generic_armv4_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) stream */ - generic_bs_w_1, - generic_armv4_bs_w_2, - generic_bs_w_4, - NULL, + .bs_rr_1_s = generic_bs_rr_1, + .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_4_s = generic_bs_rr_4, + .bs_rr_8_s = BS_UNIMPLEMENTED, + + /* write stream (single) */ + .bs_w_1_s = NULL, /* Use inline code in bus.h */ + .bs_w_2_s = NULL, /* Use inline code in bus.h */ + .bs_w_4_s = NULL, /* Use inline code in bus.h */ + .bs_w_8_s = NULL, /* Use inline code in bus.h */ /* write multiple stream */ - generic_bs_wm_1, - generic_armv4_bs_wm_2, - generic_bs_wm_4, - NULL, + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = BS_UNIMPLEMENTED, /* write region stream */ - NULL, - generic_armv4_bs_wr_2, - generic_bs_wr_4, - NULL, + .bs_wr_1_s = generic_bs_wr_1, + .bs_wr_2_s = generic_bs_wr_2, + .bs_wr_4_s = generic_bs_wr_4, + .bs_wr_8_s = BS_UNIMPLEMENTED, }; #ifndef FDT Modified: stable/10/sys/arm/at91/files.at91 ============================================================================== --- stable/10/sys/arm/at91/files.at91 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/at91/files.at91 Fri Feb 13 22:32:02 2015 (r278727) @@ -1,4 +1,5 @@ # $FreeBSD$ +arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard arm/at91/at91_machdep.c standard arm/at91/at91_aic.c standard Modified: stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/broadcom/bcm2835/files.bcm2835 Fri Feb 13 22:32:02 2015 (r278727) @@ -16,7 +16,7 @@ arm/broadcom/bcm2835/bcm2835_systimer.c arm/broadcom/bcm2835/bcm2835_wdog.c standard dev/usb/controller/dwc_otg_fdt.c optional dwcotg -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_arm11.S standard Modified: stable/10/sys/arm/cavium/cns11xx/econa.c ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/econa.c Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/cavium/cns11xx/econa.c Fri Feb 13 22:32:02 2015 (r278727) @@ -56,117 +56,7 @@ unsigned int CPU_clock = 200000000; unsigned int AHB_clock; unsigned int APB_clock; -bs_protos(generic); -bs_protos(generic_armv4); - -struct bus_space econa_bs_tag = { - /* cookie */ - (void *) 0, - - /* mapping/unmapping */ - generic_bs_map, - generic_bs_unmap, - generic_bs_subregion, - - /* allocation/deallocation */ - generic_bs_alloc, - generic_bs_free, - - /* barrier */ - generic_bs_barrier, - - /* read (single) */ - generic_bs_r_1, - generic_armv4_bs_r_2, - generic_bs_r_4, - NULL, - - /* read multiple */ - generic_bs_rm_1, - generic_armv4_bs_rm_2, - generic_bs_rm_4, - NULL, - - /* read region */ - generic_bs_rr_1, - generic_armv4_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) */ - generic_bs_w_1, - generic_armv4_bs_w_2, - generic_bs_w_4, - NULL, - - /* write multiple */ - generic_bs_wm_1, - generic_armv4_bs_wm_2, - generic_bs_wm_4, - NULL, - - /* write region */ - NULL, - NULL, - NULL, - NULL, - - /* set multiple */ - NULL, - NULL, - NULL, - NULL, - - /* set region */ - NULL, - NULL, - NULL, - NULL, - - /* copy */ - NULL, - NULL, - NULL, - NULL, - - /* read (single) stream */ - NULL, - NULL, - NULL, - NULL, - - /* read multiple stream */ - NULL, - generic_armv4_bs_rm_2, - NULL, - NULL, - - /* read region stream */ - NULL, - NULL, - NULL, - NULL, - - /* write (single) stream */ - NULL, - NULL, - NULL, - NULL, - - /* write multiple stream */ - NULL, - generic_armv4_bs_wm_2, - NULL, - NULL, - - /* write region stream */ - NULL, - NULL, - NULL, - NULL -}; - -bus_space_tag_t obio_tag = &econa_bs_tag; +bus_space_tag_t obio_tag; static int econa_probe(device_t dev) @@ -465,8 +355,10 @@ econa_attach(device_t dev) struct econa_softc *sc = device_get_softc(dev); int i; + obio_tag = arm_base_bs_tag; + econa_softc = sc; - sc->ec_st = &econa_bs_tag; + sc->ec_st = arm_base_bs_tag; sc->ec_sh = ECONA_IO_BASE; sc->dev = dev; if (bus_space_subregion(sc->ec_st, sc->ec_sh, ECONA_PIC_BASE, @@ -548,7 +440,7 @@ econa_alloc_resource(device_t dev, devic rle->res = rman_reserve_resource(&sc->ec_mem_rman, start, end, count, flags, child); if (rle->res != NULL) { - rman_set_bustag(rle->res, &econa_bs_tag); + rman_set_bustag(rle->res, arm_base_bs_tag); rman_set_bushandle(rle->res, start); } break; Modified: stable/10/sys/arm/cavium/cns11xx/files.econa ============================================================================== --- stable/10/sys/arm/cavium/cns11xx/files.econa Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/cavium/cns11xx/files.econa Fri Feb 13 22:32:02 2015 (r278727) @@ -6,6 +6,7 @@ arm/cavium/cns11xx/timer.c standard arm/cavium/cns11xx/uart_bus_ec.c optional uart arm/cavium/cns11xx/uart_cpu_ec.c optional uart dev/uart/uart_dev_ns8250.c optional uart +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/cavium/cns11xx/ehci_ebus.c optional ehci arm/cavium/cns11xx/ohci_ec.c optional ohci Modified: stable/10/sys/arm/freescale/imx/files.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/imx/files.imx51 Fri Feb 13 22:32:02 2015 (r278727) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx51_machdep.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard # Dummy serial console #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/imx/files.imx53 Fri Feb 13 22:32:02 2015 (r278727) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx53_machdep.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard # Special serial console for debuging early boot code #arm/freescale/imx/console.c standard Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/imx/files.imx6 Fri Feb 13 22:32:02 2015 (r278727) @@ -15,7 +15,7 @@ kern/kern_clocksource.c standard # arm/arm/gic.c standard arm/arm/pl310.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard Modified: stable/10/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- stable/10/sys/arm/freescale/vybrid/files.vybrid Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/freescale/vybrid/files.vybrid Fri Feb 13 22:32:02 2015 (r278727) @@ -9,7 +9,7 @@ arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard Modified: stable/10/sys/arm/include/bus.h ============================================================================== --- stable/10/sys/arm/include/bus.h Fri Feb 13 22:08:19 2015 (r278726) +++ stable/10/sys/arm/include/bus.h Fri Feb 13 22:32:02 2015 (r278727) @@ -79,172 +79,180 @@ #define BUS_SPACE_MAP_LINEAR 0x02 #define BUS_SPACE_MAP_PREFETCHABLE 0x04 +/* + * Bus space for ARM. + * + * The functions used most often are grouped together at the beginning to ensure + * that all the data fits into a single cache line. The inline implementations + * of single read/write access these values a lot. + */ struct bus_space { - /* cookie */ - void *bs_cookie; + /* Read/write single and barrier: the most commonly used functions. */ + uint8_t (*bs_r_1)(bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint32_t (*bs_r_4)(bus_space_tag_t, bus_space_handle_t, bus_size_t); + void (*bs_w_1)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t); + void (*bs_w_4)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t); + void (*bs_barrier)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, bus_size_t, int); + + /* Backlink to parent (if copied), and implementation private data. */ + struct bus_space *bs_parent; + void *bs_privdata; /* mapping/unmapping */ - int (*bs_map) (void *, bus_addr_t, bus_size_t, + int (*bs_map) (bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); - void (*bs_unmap) (void *, bus_space_handle_t, bus_size_t); - int (*bs_subregion) (void *, bus_space_handle_t, + void (*bs_unmap) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + int (*bs_subregion) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *); /* allocation/deallocation */ - int (*bs_alloc) (void *, bus_addr_t, bus_addr_t, + int (*bs_alloc) (bus_space_tag_t, bus_addr_t, bus_addr_t, bus_size_t, bus_size_t, bus_size_t, int, bus_addr_t *, bus_space_handle_t *); - void (*bs_free) (void *, bus_space_handle_t, + void (*bs_free) (bus_space_tag_t, bus_space_handle_t, bus_size_t); - /* get kernel virtual address */ - /* barrier */ - void (*bs_barrier) (void *, bus_space_handle_t, - bus_size_t, bus_size_t, int); - - /* read (single) */ - u_int8_t (*bs_r_1) (void *, bus_space_handle_t, bus_size_t); - u_int16_t (*bs_r_2) (void *, bus_space_handle_t, bus_size_t); - u_int32_t (*bs_r_4) (void *, bus_space_handle_t, bus_size_t); - u_int64_t (*bs_r_8) (void *, bus_space_handle_t, bus_size_t); + /* Read single, the less commonly used functions. */ + uint16_t (*bs_r_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint64_t (*bs_r_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* read multiple */ - void (*bs_rm_1) (void *, bus_space_handle_t, bus_size_t, - u_int8_t *, bus_size_t); - void (*bs_rm_2) (void *, bus_space_handle_t, bus_size_t, - u_int16_t *, bus_size_t); - void (*bs_rm_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rm_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rm_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint8_t *, bus_size_t); + void (*bs_rm_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint16_t *, bus_size_t); + void (*bs_rm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* read region */ - void (*bs_rr_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t *, bus_size_t); - void (*bs_rr_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t *, bus_size_t); - void (*bs_rr_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rr_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t *, bus_size_t); + void (*bs_rr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t *, bus_size_t); + void (*bs_rr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); - /* write (single) */ - void (*bs_w_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t); - void (*bs_w_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t); - void (*bs_w_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t); - void (*bs_w_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t); + /* Write single, the less commonly used functions. */ + void (*bs_w_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t); + void (*bs_w_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t); /* write multiple */ - void (*bs_wm_1) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wm_2) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wm_4) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wm_8) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wm_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wm_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* write region */ - void (*bs_wr_1) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wr_2) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wr_4) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wr_8) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* set multiple */ - void (*bs_sm_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t, bus_size_t); - void (*bs_sm_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t, bus_size_t); - void (*bs_sm_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t, bus_size_t); - void (*bs_sm_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t, bus_size_t); + void (*bs_sm_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t, bus_size_t); + void (*bs_sm_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t, bus_size_t); + void (*bs_sm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t, bus_size_t); + void (*bs_sm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t, bus_size_t); /* set region */ - void (*bs_sr_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t, bus_size_t); - void (*bs_sr_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t, bus_size_t); - void (*bs_sr_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t, bus_size_t); - void (*bs_sr_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t, bus_size_t); + void (*bs_sr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t, bus_size_t); + void (*bs_sr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t, bus_size_t); + void (*bs_sr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t, bus_size_t); + void (*bs_sr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t, bus_size_t); /* copy */ - void (*bs_c_1) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_2) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_4) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_4) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_8) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); /* read stream (single) */ - u_int8_t (*bs_r_1_s) (void *, bus_space_handle_t, bus_size_t); - u_int16_t (*bs_r_2_s) (void *, bus_space_handle_t, bus_size_t); - u_int32_t (*bs_r_4_s) (void *, bus_space_handle_t, bus_size_t); - u_int64_t (*bs_r_8_s) (void *, bus_space_handle_t, bus_size_t); + uint8_t (*bs_r_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint16_t (*bs_r_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint32_t (*bs_r_4_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint64_t (*bs_r_8_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* read multiple stream */ - void (*bs_rm_1_s) (void *, bus_space_handle_t, bus_size_t, - u_int8_t *, bus_size_t); - void (*bs_rm_2_s) (void *, bus_space_handle_t, bus_size_t, - u_int16_t *, bus_size_t); - void (*bs_rm_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rm_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rm_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint8_t *, bus_size_t); + void (*bs_rm_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint16_t *, bus_size_t); + void (*bs_rm_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rm_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* read region stream */ - void (*bs_rr_1_s) (void *, bus_space_handle_t, - bus_size_t, u_int8_t *, bus_size_t); - void (*bs_rr_2_s) (void *, bus_space_handle_t, - bus_size_t, u_int16_t *, bus_size_t); - void (*bs_rr_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rr_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rr_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t *, bus_size_t); + void (*bs_rr_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t *, bus_size_t); + void (*bs_rr_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rr_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* write stream (single) */ - void (*bs_w_1_s) (void *, bus_space_handle_t, - bus_size_t, u_int8_t); - void (*bs_w_2_s) (void *, bus_space_handle_t, - bus_size_t, u_int16_t); - void (*bs_w_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t); - void (*bs_w_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t); + void (*bs_w_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t); + void (*bs_w_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t); + void (*bs_w_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t); + void (*bs_w_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t); /* write multiple stream */ - void (*bs_wm_1_s) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wm_2_s) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wm_4_s) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wm_8_s) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wm_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wm_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wm_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wm_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* write region stream */ - void (*bs_wr_1_s) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wr_2_s) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wr_4_s) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wr_8_s) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wr_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wr_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wr_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wr_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); }; +extern bus_space_tag_t arm_base_bs_tag; /* * Utility macros; INTERNAL USE ONLY. @@ -252,51 +260,69 @@ struct bus_space { #define __bs_c(a,b) __CONCAT(a,b) #define __bs_opname(op,size) __bs_c(__bs_c(__bs_c(bs_,op),_),size) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 23:30:49 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B54D4216; Fri, 13 Feb 2015 23:30:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9597ABEB; Fri, 13 Feb 2015 23:30:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNUnXU062417; Fri, 13 Feb 2015 23:30:49 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNUnR6062414; Fri, 13 Feb 2015 23:30:49 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132330.t1DNUnR6062414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278730 - in stable/10/sys/arm: arm include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:30:49 -0000 Author: ian Date: Fri Feb 13 23:30:48 2015 New Revision: 278730 URL: https://svnweb.freebsd.org/changeset/base/278730 Log: MFC r277532, r277533: Add Maxmem global for arm. Modified: stable/10/sys/arm/arm/physmem.c stable/10/sys/arm/include/md_var.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/physmem.c ============================================================================== --- stable/10/sys/arm/arm/physmem.c Fri Feb 13 23:19:35 2015 (r278729) +++ stable/10/sys/arm/arm/physmem.c Fri Feb 13 23:30:48 2015 (r278730) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* @@ -86,8 +87,12 @@ static size_t excnt; vm_paddr_t phys_avail[MAX_AVAIL_ENTRIES + 2]; /* +2 to allow for a pair */ vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES + 2]; /* of zeroes to terminate. */ -/* This is the total number of hardware pages, excluded or not. */ +/* + * realmem is the total number of hardware pages, excluded or not. + * Maxmem is one greater than the last physical page number. + */ long realmem; +long Maxmem; /* The address at which the kernel was loaded. Set early in initarm(). */ vm_paddr_t arm_physmem_kernaddr; @@ -152,8 +157,8 @@ arm_physmem_print_tables() * * Returns the number of pages of non-excluded memory added to the avail list. */ -static long -regions_to_avail(vm_paddr_t *avail, uint32_t exflags) +static size_t +regions_to_avail(vm_paddr_t *avail, uint32_t exflags, long *pavail) { size_t acnt, exi, hwi; vm_paddr_t end, start, xend, xstart; @@ -236,7 +241,9 @@ regions_to_avail(vm_paddr_t *avail, uint panic("Not enough space in the dump/phys_avail arrays"); } - return (availmem); + if (pavail) + *pavail = availmem; + return (acnt); } /* @@ -311,13 +318,23 @@ void arm_physmem_exclude_region(vm_paddr /* * Process all the regions added earlier into the global avail lists. + * + * Updates the kernel global 'physmem' with the number of physical pages + * available for use (all pages not in any exclusion region). + * + * Updates the kernel global 'Maxmem' with the page number one greater then the + * last page of physical memory in the system. */ void arm_physmem_init_kernel_globals(void) { + size_t nextidx; - regions_to_avail(dump_avail, EXFLAG_NODUMP); - physmem = regions_to_avail(phys_avail, EXFLAG_NOALLOC); + regions_to_avail(dump_avail, EXFLAG_NODUMP, NULL); + nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, &physmem); + if (nextidx == 0) + panic("No memory entries in phys_avail"); + Maxmem = atop(phys_avail[nextidx - 1]); } #ifdef DDB Modified: stable/10/sys/arm/include/md_var.h ============================================================================== --- stable/10/sys/arm/include/md_var.h Fri Feb 13 23:19:35 2015 (r278729) +++ stable/10/sys/arm/include/md_var.h Fri Feb 13 23:30:48 2015 (r278730) @@ -33,6 +33,7 @@ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ +extern long Maxmem; extern char sigcode[]; extern int szsigcode; extern uint32_t *vm_page_dump; From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 23:32:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8FBAB36F; Fri, 13 Feb 2015 23:32: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 79E82C05; Fri, 13 Feb 2015 23:32: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 t1DNW41g065558; Fri, 13 Feb 2015 23:32:04 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNW4YC065557; Fri, 13 Feb 2015 23:32:04 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132332.t1DNW4YC065557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278731 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:32:04 -0000 Author: ian Date: Fri Feb 13 23:32:03 2015 New Revision: 278731 URL: https://svnweb.freebsd.org/changeset/base/278731 Log: MFC r277523: Add last_fault_code when DEBUG is defined. Modified: stable/10/sys/arm/arm/trap-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/trap-v6.c ============================================================================== --- stable/10/sys/arm/arm/trap-v6.c Fri Feb 13 23:30:48 2015 (r278730) +++ stable/10/sys/arm/arm/trap-v6.c Fri Feb 13 23:32:03 2015 (r278731) @@ -67,6 +67,10 @@ __FBSDID("$FreeBSD$"); extern char fusubailout[]; +#ifdef DEBUG +int last_fault_code; /* For the benefit of pmap_fault_fixup() */ +#endif + struct ksig { int sig; u_long code; @@ -457,6 +461,10 @@ abort_handler(struct trapframe *tf, int if (prefetch) ftype |= VM_PROT_EXECUTE; +#ifdef DEBUG + last_fault_code = fsr; +#endif + #ifndef ARM_NEW_PMAP if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype, usermode)) { From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 23:34:41 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 554DB4C8; Fri, 13 Feb 2015 23:34: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 33423C1A; Fri, 13 Feb 2015 23:34: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 t1DNYfTg065921; Fri, 13 Feb 2015 23:34:41 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNYeE0065919; Fri, 13 Feb 2015 23:34:40 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132334.t1DNYeE0065919@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:34:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278732 - stable/10/sys/arm/freescale/imx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:34:41 -0000 Author: ian Date: Fri Feb 13 23:34:40 2015 New Revision: 278732 URL: https://svnweb.freebsd.org/changeset/base/278732 Log: MFC r277555, r277568: Enable all sd device clocks on imx6. Add imx5/6 pinmux driver support for encoded input register configs. Modified: stable/10/sys/arm/freescale/imx/imx6_ccm.c stable/10/sys/arm/freescale/imx/imx_iomux.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx6_ccm.c Fri Feb 13 23:32:03 2015 (r278731) +++ stable/10/sys/arm/freescale/imx/imx6_ccm.c Fri Feb 13 23:34:40 2015 (r278732) @@ -95,7 +95,7 @@ ccm_init_gates(struct ccm_softc *sc) WR4(sc, CCM_CCGR3, 0x3ff00000); /* DDR memory controller */ WR4(sc, CCM_CCGR4, 0x0000f300); /* pl301 bus crossbar */ WR4(sc, CCM_CCGR5, 0x0f000000); /* uarts */ - WR4(sc, CCM_CCGR6, 0x000000cc); /* usdhc 1 & 3 */ + WR4(sc, CCM_CCGR6, 0x000000ff); /* usdhc 1-4 */ } static int Modified: stable/10/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_iomux.c Fri Feb 13 23:32:03 2015 (r278731) +++ stable/10/sys/arm/freescale/imx/imx_iomux.c Fri Feb 13 23:34:40 2015 (r278732) @@ -117,10 +117,36 @@ WR4(struct iomux_softc *sc, bus_size_t o bus_write_4(sc->mem_res, off, val); } +static void +iomux_configure_input(struct iomux_softc *sc, uint32_t reg, uint32_t val) +{ + u_int select, mask, shift, width; + + /* If register and value are zero, there is nothing to configure. */ + if (reg == 0 && val == 0) + return; + + /* + * If the config value has 0xff in the high byte it is encoded: + * 31 23 15 7 0 + * | 0xff | shift | width | select | + * We need to mask out the old select value and OR in the new, using a + * mask of the given width and shifting the values up by shift. + */ + if ((val & 0xff000000) == 0xff000000) { + select = val & 0x000000ff; + width = (val & 0x0000ff00) >> 8; + shift = (val & 0x00ff0000) >> 16; + mask = ((1u << width) - 1) << shift; + val = (RD4(sc, reg) & ~mask) | (select << shift); + } + WR4(sc, reg, val); +} + static int iomux_configure_pins(device_t dev, phandle_t cfgxref) { - struct iomux_softc * sc; + struct iomux_softc *sc; struct pincfg *cfgtuples, *cfg; phandle_t cfgnode; int i, ntuples; @@ -137,8 +163,7 @@ iomux_configure_pins(device_t dev, phand for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) { sion = (cfg->padconf_val & PADCONF_SION) ? PADMUX_SION : 0; WR4(sc, cfg->mux_reg, cfg->mux_val | sion); - if (cfg->input_reg != 0) - WR4(sc, cfg->input_reg, cfg->input_val); + iomux_configure_input(sc, cfg->input_reg, cfg->input_val); if ((cfg->padconf_val & PADCONF_NONE) == 0) WR4(sc, cfg->padconf_reg, cfg->padconf_val); if (bootverbose) { From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 23:37:12 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF3E974A; Fri, 13 Feb 2015 23: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 C9175C37; Fri, 13 Feb 2015 23: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 t1DNbCQP066371; Fri, 13 Feb 2015 23:37:12 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNbCrV066370; Fri, 13 Feb 2015 23:37:12 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132337.t1DNbCrV066370@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:37:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278734 - stable/10/sys/dev/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:37:13 -0000 Author: ian Date: Fri Feb 13 23:37:11 2015 New Revision: 278734 URL: https://svnweb.freebsd.org/changeset/base/278734 Log: MFC r277655, r277989: Reimplement fdt_clock_register_provider() correctly. Modified: stable/10/sys/dev/fdt/fdt_clock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/fdt/fdt_clock.c ============================================================================== --- stable/10/sys/dev/fdt/fdt_clock.c Fri Feb 13 23:35:58 2015 (r278733) +++ stable/10/sys/dev/fdt/fdt_clock.c Fri Feb 13 23:37:11 2015 (r278734) @@ -149,7 +149,8 @@ void fdt_clock_register_provider(device_t provider) { - OF_device_register_xref(OF_xref_from_device(provider), provider); + OF_device_register_xref( + OF_xref_from_node(ofw_bus_get_node(provider)), provider); } void From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 23:37:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56F8D87B; Fri, 13 Feb 2015 23:37: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 4116EC3C; Fri, 13 Feb 2015 23:37: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 t1DNbvr2066491; Fri, 13 Feb 2015 23:37:57 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNbvSP066490; Fri, 13 Feb 2015 23:37:57 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132337.t1DNbvSP066490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278735 - stable/10/sys/arm/arm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:37:57 -0000 Author: ian Date: Fri Feb 13 23:37:56 2015 New Revision: 278735 URL: https://svnweb.freebsd.org/changeset/base/278735 Log: MFC r278031: Remove a stale comment. Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/busdma_machdep-v6.c ============================================================================== --- stable/10/sys/arm/arm/busdma_machdep-v6.c Fri Feb 13 23:37:11 2015 (r278734) +++ stable/10/sys/arm/arm/busdma_machdep-v6.c Fri Feb 13 23:37:56 2015 (r278735) @@ -835,8 +835,6 @@ bus_dmamem_free(bus_dma_tag_t dmat, void else ba = standard_allocator; - /* Be careful not to access map from here on. */ - bufzone = busdma_bufalloc_findzone(ba, dmat->maxsize); if (bufzone != NULL && dmat->alignment <= bufzone->size && From owner-svn-src-stable@FreeBSD.ORG Fri Feb 13 23:44:00 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66925B8F; Fri, 13 Feb 2015 23:44:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 513E9D05; Fri, 13 Feb 2015 23:44:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1DNi0QY070718; Fri, 13 Feb 2015 23:44:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1DNi0Ji070717; Fri, 13 Feb 2015 23:44:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201502132344.t1DNi0Ji070717@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 13 Feb 2015 23:44:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278736 - stable/10/sys/boot/fdt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 23:44:00 -0000 Author: ian Date: Fri Feb 13 23:43:59 2015 New Revision: 278736 URL: https://svnweb.freebsd.org/changeset/base/278736 Log: MFC r278032: Do not skip setting the memory 'reg' property if the fdt data already contains one. Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/boot/fdt/fdt_loader_cmd.c ============================================================================== --- stable/10/sys/boot/fdt/fdt_loader_cmd.c Fri Feb 13 23:37:56 2015 (r278735) +++ stable/10/sys/boot/fdt/fdt_loader_cmd.c Fri Feb 13 23:43:59 2015 (r278736) @@ -566,17 +566,6 @@ fdt_fixup_memory(struct fdt_mem_region * return; } - if ((reg = (uint32_t *)fdt_getprop(fdtp, memory, "reg", - &len)) != NULL) { - - if (fdt_reg_valid(reg, len, addr_cells, size_cells) == 0) - /* - * Do not apply fixup if existing 'reg' property - * seems to be valid. - */ - return; - } - len = (addr_cells + size_cells) * realmrno * sizeof(uint32_t); sb = buf = (uint8_t *)malloc(len); if (!buf) From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 01:33:12 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41DAE46B; Sat, 14 Feb 2015 01:33: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 2CAAE926; Sat, 14 Feb 2015 01:33: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 t1E1XCHx023369; Sat, 14 Feb 2015 01:33:12 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E1XCMf023368; Sat, 14 Feb 2015 01:33:12 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201502140133.t1E1XCMf023368@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Sat, 14 Feb 2015 01:33:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278740 - stable/10/usr.bin/svn/svn X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 01:33:12 -0000 Author: gjb Date: Sat Feb 14 01:33:11 2015 New Revision: 278740 URL: https://svnweb.freebsd.org/changeset/base/278740 Log: MFC r278603, r278607: r278603: Ensure ORGANIZATION_NAME is quoted when ORGANIZATION could contain strings of two or more words. r278607: Reduce number of lines to set ORGANIZATION_NAME in freebsd-organization.h. PR: 197540 Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.bin/svn/svn/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/svn/svn/Makefile ============================================================================== --- stable/10/usr.bin/svn/svn/Makefile Sat Feb 14 00:23:53 2015 (r278739) +++ stable/10/usr.bin/svn/svn/Makefile Sat Feb 14 01:33:11 2015 (r278740) @@ -59,7 +59,7 @@ DPSRCS+= freebsd-organization.h CLEANFILES+= freebsd-organization.h CFLAGS+= -I. -DHAS_ORGANIZATION_NAME freebsd-organization.h: - @echo '#define ORGANIZATION_NAME ${ORGANIZATION}' \ + @echo "#define ORGANIZATION_NAME \"$$(eval echo ${ORGANIZATION})\"" \ > freebsd-organization.h .endif From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 06:58:28 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED02675F; Sat, 14 Feb 2015 06:58: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 D7A339F0; Sat, 14 Feb 2015 06:58: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 t1E6wSCh072413; Sat, 14 Feb 2015 06:58:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E6wScp072412; Sat, 14 Feb 2015 06:58:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502140658.t1E6wScp072412@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 14 Feb 2015 06:58:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278743 - stable/9/sys/dev/cxgb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 06:58:29 -0000 Author: ngie Date: Sat Feb 14 06:58:27 2015 New Revision: 278743 URL: https://svnweb.freebsd.org/changeset/base/278743 Log: MFC r278364: r278364: Remove kdb_backtrace extern; get the definition for kdb_backtrace from instead Fix whitespace in WARN_ON macro definition Reviewed by: np Differential Revision: https://reviews.freebsd.org/D1799 Sponsored by: EMC / Isilon Storage Division Modified: stable/9/sys/dev/cxgb/cxgb_osdep.h Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:19:24 2015 (r278742) +++ stable/9/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:58:27 2015 (r278743) @@ -39,6 +39,8 @@ $FreeBSD$ #include #include +#include + #include #ifndef _CXGB_OSDEP_H_ @@ -128,10 +130,8 @@ void prefetch(void *x) #define smp_mb() mb() #define L1_CACHE_BYTES 128 -extern void kdb_backtrace(void); - #define WARN_ON(condition) do { \ - if (__predict_false((condition)!=0)) { \ + if (__predict_false((condition)!=0)) { \ log(LOG_WARNING, "BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \ kdb_backtrace(); \ } \ From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 06:58:33 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 64A6E88D; Sat, 14 Feb 2015 06:58:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F6209F1; Sat, 14 Feb 2015 06:58:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1E6wXdp072470; Sat, 14 Feb 2015 06:58:33 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E6wXeo072469; Sat, 14 Feb 2015 06:58:33 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201502140658.t1E6wXeo072469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 14 Feb 2015 06:58:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278744 - stable/10/sys/dev/cxgb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 06:58:33 -0000 Author: ngie Date: Sat Feb 14 06:58:32 2015 New Revision: 278744 URL: https://svnweb.freebsd.org/changeset/base/278744 Log: MFC r278364: r278364: Remove kdb_backtrace extern; get the definition for kdb_backtrace from instead Fix whitespace in WARN_ON macro definition Reviewed by: np Differential Revision: https://reviews.freebsd.org/D1799 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/sys/dev/cxgb/cxgb_osdep.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgb/cxgb_osdep.h ============================================================================== --- stable/10/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:58:27 2015 (r278743) +++ stable/10/sys/dev/cxgb/cxgb_osdep.h Sat Feb 14 06:58:32 2015 (r278744) @@ -39,6 +39,8 @@ $FreeBSD$ #include #include +#include + #include #ifndef _CXGB_OSDEP_H_ @@ -128,10 +130,8 @@ void prefetch(void *x) #define smp_mb() mb() #define L1_CACHE_BYTES 128 -extern void kdb_backtrace(void); - #define WARN_ON(condition) do { \ - if (__predict_false((condition)!=0)) { \ + if (__predict_false((condition)!=0)) { \ log(LOG_WARNING, "BUG: warning at %s:%d/%s()\n", __FILE__, __LINE__, __FUNCTION__); \ kdb_backtrace(); \ } \ From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 08:44:14 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BFDB531; Sat, 14 Feb 2015 08:44: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 75AB1341; Sat, 14 Feb 2015 08:44: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 t1E8iEPd023935; Sat, 14 Feb 2015 08:44:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E8iDSM023928; Sat, 14 Feb 2015 08:44:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502140844.t1E8iDSM023928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 14 Feb 2015 08:44:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278746 - in stable/10/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 08:44:14 -0000 Author: kib Date: Sat Feb 14 08:44:12 2015 New Revision: 278746 URL: https://svnweb.freebsd.org/changeset/base/278746 Log: MFC r277643: Remove Giant from /dev/mem and /dev/kmem. MFC r277743: Arm: ensure that _tmppt KVA is used exclusively. Modified: stable/10/sys/arm/arm/mem.c stable/10/sys/dev/mem/memdev.c stable/10/sys/i386/i386/mem.c stable/10/sys/mips/mips/mem.c stable/10/sys/sparc64/sparc64/mem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/arm/mem.c ============================================================================== --- stable/10/sys/arm/arm/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/arm/arm/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -72,6 +73,9 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "mem struct mem_range_softc mem_range_softc; +static struct sx tmppt_lock; +SX_SYSINIT(tmppt, &tmppt_lock, "mem4map"); + /* ARGSUSED */ int memrw(struct cdev *dev, struct uio *uio, int flags) @@ -82,8 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr, eaddr; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -109,6 +111,7 @@ memrw(struct cdev *dev, struct uio *uio, } if (!address_valid) return (EINVAL); + sx_xlock(&tmppt_lock); pmap_kenter((vm_offset_t)_tmppt, v); o = (int)uio->uio_offset & PAGE_MASK; c = (u_int)(PAGE_SIZE - ((int)iov->iov_base & PAGE_MASK)); @@ -116,6 +119,7 @@ memrw(struct cdev *dev, struct uio *uio, c = min(c, (u_int)iov->iov_len); error = uiomove((caddr_t)&_tmppt[o], (int)c, uio); pmap_qremove((vm_offset_t)_tmppt, 1); + sx_xunlock(&tmppt_lock); continue; } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { Modified: stable/10/sys/dev/mem/memdev.c ============================================================================== --- stable/10/sys/dev/mem/memdev.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/dev/mem/memdev.c Sat Feb 14 08:44:12 2015 (r278746) @@ -52,7 +52,7 @@ static struct cdev *memdev, *kmemdev; static struct cdevsw mem_cdevsw = { .d_version = D_VERSION, - .d_flags = D_MEM|D_NEEDGIANT, + .d_flags = D_MEM, .d_open = memopen, .d_read = memrw, .d_write = memrw, Modified: stable/10/sys/i386/i386/mem.c ============================================================================== --- stable/10/sys/i386/i386/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/i386/i386/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -86,10 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr; - /* XXX UPS Why ? */ - GIANT_REQUIRED; - - if (dev2unit(dev) != CDEV_MINOR_MEM && dev2unit(dev) != CDEV_MINOR_KMEM) return EIO; Modified: stable/10/sys/mips/mips/mem.c ============================================================================== --- stable/10/sys/mips/mips/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/mips/mips/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -85,8 +85,6 @@ memrw(struct cdev *dev, struct uio *uio, cnt = 0; error = 0; - GIANT_REQUIRED; - pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; Modified: stable/10/sys/sparc64/sparc64/mem.c ============================================================================== --- stable/10/sys/sparc64/sparc64/mem.c Sat Feb 14 08:20:31 2015 (r278745) +++ stable/10/sys/sparc64/sparc64/mem.c Sat Feb 14 08:44:12 2015 (r278746) @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, error = 0; ova = 0; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 08:52:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D7CF88F; Sat, 14 Feb 2015 08:52: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 084B2604; Sat, 14 Feb 2015 08:52: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 t1E8q9fC028579; Sat, 14 Feb 2015 08:52:09 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E8q9Ju028578; Sat, 14 Feb 2015 08:52:09 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502140852.t1E8q9Ju028578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 14 Feb 2015 08:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278747 - stable/10/usr.bin/ctlstat X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 08:52:10 -0000 Author: mav Date: Sat Feb 14 08:52:09 2015 New Revision: 278747 URL: https://svnweb.freebsd.org/changeset/base/278747 Log: MFC r278362: Fix couple issues in ctlstat header printing. Modified: stable/10/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/10/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:44:12 2015 (r278746) +++ stable/10/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:52:09 2015 (r278747) @@ -449,7 +449,7 @@ ctlstat_standard(struct ctlstat_context (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", - (F_CPU(ctx) == 0) ? " CPU" : ""); + (F_CPU(ctx)) ? " CPU" : ""); hdr_devs = 3; } else { if (F_CPU(ctx)) @@ -468,8 +468,9 @@ ctlstat_standard(struct ctlstat_context if (bit_test(ctx->lun_mask, lun) == 0) continue; - fprintf(stdout, "%15.6s%d ", - "lun", lun); + fprintf(stdout, "%15.6s%d %s", + "lun", lun, + (F_LUNVAL(ctx) != 0) ? " " : ""); hdr_devs++; } fprintf(stdout, "\n"); From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 08:52:53 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7DA99BB; Sat, 14 Feb 2015 08:52: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 B301A609; Sat, 14 Feb 2015 08:52: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 t1E8qrGs028719; Sat, 14 Feb 2015 08:52:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1E8qrtZ028718; Sat, 14 Feb 2015 08:52:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201502140852.t1E8qrtZ028718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 14 Feb 2015 08:52:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278748 - stable/9/usr.bin/ctlstat X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 08:52:53 -0000 Author: mav Date: Sat Feb 14 08:52:52 2015 New Revision: 278748 URL: https://svnweb.freebsd.org/changeset/base/278748 Log: MFC r278362: Fix couple issues in ctlstat header printing. Modified: stable/9/usr.bin/ctlstat/ctlstat.c Directory Properties: stable/9/ (props changed) stable/9/usr.bin/ (props changed) stable/9/usr.bin/ctlstat/ (props changed) Modified: stable/9/usr.bin/ctlstat/ctlstat.c ============================================================================== --- stable/9/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:52:09 2015 (r278747) +++ stable/9/usr.bin/ctlstat/ctlstat.c Sat Feb 14 08:52:52 2015 (r278748) @@ -449,7 +449,7 @@ ctlstat_standard(struct ctlstat_context (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", (F_LUNVAL(ctx) != 0) ? " " : "", - (F_CPU(ctx) == 0) ? " CPU" : ""); + (F_CPU(ctx)) ? " CPU" : ""); hdr_devs = 3; } else { if (F_CPU(ctx)) @@ -468,8 +468,9 @@ ctlstat_standard(struct ctlstat_context if (bit_test(ctx->lun_mask, lun) == 0) continue; - fprintf(stdout, "%15.6s%d ", - "lun", lun); + fprintf(stdout, "%15.6s%d %s", + "lun", lun, + (F_LUNVAL(ctx) != 0) ? " " : ""); hdr_devs++; } fprintf(stdout, "\n"); From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 18:37:37 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C4A4E24; Sat, 14 Feb 2015 18:37: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 E1019650; Sat, 14 Feb 2015 18:37: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 t1EIbaQw005158; Sat, 14 Feb 2015 18:37:36 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIbaQ0005157; Sat, 14 Feb 2015 18:37:36 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502141837.t1EIbaQ0005157@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 18:37:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278768 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:37:37 -0000 Author: loos Date: Sat Feb 14 18:37:36 2015 New Revision: 278768 URL: https://svnweb.freebsd.org/changeset/base/278768 Log: MFC r276296, r277207: Make consistent use of the correct debug macros across the file. Fix the C -> K temperature conversion for the dev.cpu.0.temperature sysctl. Remove the unused temperature conversion macros. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sat Feb 14 18:22:31 2015 (r278767) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_cpufreq.c Sat Feb 14 18:37:36 2015 (r278768) @@ -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); \ @@ -125,7 +124,7 @@ TUNABLE_INT("hw.bcm2835.cpufreq.verbose" static int cpufreq_lowest_freq = DEFAULT_LOWEST_FREQ; TUNABLE_INT("hw.bcm2835.cpufreq.lowest_freq", &cpufreq_lowest_freq); -#ifdef DEBUG +#ifdef PROP_DEBUG static void bcm2835_dump(const void *data, int len) { @@ -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-stable@FreeBSD.ORG Sat Feb 14 18:45:44 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55970FC4; Sat, 14 Feb 2015 18:45: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 27EBC762; Sat, 14 Feb 2015 18:45: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 t1EIjiBY009658; Sat, 14 Feb 2015 18:45:44 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIjiKP009657; Sat, 14 Feb 2015 18:45:44 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502141845.t1EIjiKP009657@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 18:45:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278769 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:45:44 -0000 Author: loos Date: Sat Feb 14 18:45:43 2015 New Revision: 278769 URL: https://svnweb.freebsd.org/changeset/base/278769 Log: MFC r276298, r276303: Remove the '#undef DEBUG' that should not be committed. Removes unused and duplicate headers. Bring the wait limit on mailbox write to a more sane value. Fix a off-by-one bug on wait time limit. Remove extra blank line. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Feb 14 18:37:36 2015 (r278768) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_mbox.c Sat Feb 14 18:45:43 2015 (r278769) @@ -31,25 +31,16 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include -#include +#include #include #include -#include -#include -#include #include -#include -#include -#include -#include #include #include -#include -#include - #include #include "mbox_if.h" @@ -76,7 +67,6 @@ __FBSDID("$FreeBSD$"); mtx_unlock(&(sc)->lock); \ } while(0) -#undef DEBUG #ifdef DEBUG #define dprintf(fmt, args...) printf(fmt, ##args) #else @@ -189,25 +179,21 @@ bcm_mbox_attach(device_t dev) static int bcm_mbox_write(device_t dev, int chan, uint32_t data) { - int limit = 20000; + int limit = 1000; struct bcm_mbox_softc *sc = device_get_softc(dev); dprintf("bcm_mbox_write: chan %d, data %08x\n", chan, data); MBOX_LOCK(sc); - - while ((mbox_read_4(sc, REG_STATUS) & STATUS_FULL) && limit--) { - DELAY(2); - } - + while ((mbox_read_4(sc, REG_STATUS) & STATUS_FULL) && --limit) + DELAY(5); if (limit == 0) { printf("bcm_mbox_write: STATUS_FULL stuck"); MBOX_UNLOCK(sc); return (EAGAIN); } - mbox_write_4(sc, REG_WRITE, MBOX_MSG(chan, data)); - MBOX_UNLOCK(sc); + return (0); } @@ -255,4 +241,3 @@ static driver_t bcm_mbox_driver = { static devclass_t bcm_mbox_devclass; DRIVER_MODULE(mbox, simplebus, bcm_mbox_driver, bcm_mbox_devclass, 0, 0); - From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 18:56:45 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12B553E7; Sat, 14 Feb 2015 18:56:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F1CD883B; Sat, 14 Feb 2015 18:56: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 t1EIui5L014783; Sat, 14 Feb 2015 18:56:44 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIuiH8014781; Sat, 14 Feb 2015 18:56:44 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201502141856.t1EIuiH8014781@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 14 Feb 2015 18:56:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278771 - stable/10/etc/rc.d X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:56:45 -0000 Author: hrs Date: Sat Feb 14 18:56:44 2015 New Revision: 278771 URL: https://svnweb.freebsd.org/changeset/base/278771 Log: MFC r273999: Do not try to create a /dev/log symlink in a jail. PR: 179828 Modified: stable/10/etc/rc.d/syslogd Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/rc.d/syslogd ============================================================================== --- stable/10/etc/rc.d/syslogd Sat Feb 14 18:54:52 2015 (r278770) +++ stable/10/etc/rc.d/syslogd Sat Feb 14 18:56:44 2015 (r278771) @@ -28,7 +28,7 @@ syslogd_precmd() # Transitional symlink for old binaries # - if [ ! -L /dev/log ]; then + if [ ! -L /dev/log ] && ! check_jail jailed; then ln -sf /var/run/log /dev/log fi rm -f /var/run/log From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 18:57:04 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B1E1512; Sat, 14 Feb 2015 18:57: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 15DB3845; Sat, 14 Feb 2015 18:57: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 t1EIv3LD014890; Sat, 14 Feb 2015 18:57:03 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EIv3de014888; Sat, 14 Feb 2015 18:57:03 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201502141857.t1EIv3de014888@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Sat, 14 Feb 2015 18:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278772 - in stable/9/etc: . rc.d X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 18:57:04 -0000 Author: hrs Date: Sat Feb 14 18:57:02 2015 New Revision: 278772 URL: https://svnweb.freebsd.org/changeset/base/278772 Log: MFC r273999 and r271545: Do not try to create a /dev/log symlink in a jail. PR: 179828 Modified: stable/9/etc/rc.d/syslogd stable/9/etc/rc.subr Directory Properties: stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/syslogd ============================================================================== --- stable/9/etc/rc.d/syslogd Sat Feb 14 18:56:44 2015 (r278771) +++ stable/9/etc/rc.d/syslogd Sat Feb 14 18:57:02 2015 (r278772) @@ -29,7 +29,7 @@ syslogd_precmd() # Transitional symlink for old binaries # - if [ ! -L /dev/log ]; then + if [ ! -L /dev/log ] && ! check_jail jailed; then ln -sf /var/run/log /dev/log fi rm -f /var/run/log Modified: stable/9/etc/rc.subr ============================================================================== --- stable/9/etc/rc.subr Sat Feb 14 18:56:44 2015 (r278771) +++ stable/9/etc/rc.subr Sat Feb 14 18:57:02 2015 (r278772) @@ -2011,6 +2011,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_ From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 19:18:57 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24F13F85; Sat, 14 Feb 2015 19:18: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 0F8A4A2A; Sat, 14 Feb 2015 19:18: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 t1EJIuaQ025394; Sat, 14 Feb 2015 19:18:56 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJIubG025393; Sat, 14 Feb 2015 19:18:56 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201502141918.t1EJIubG025393@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 14 Feb 2015 19:18:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278775 - stable/10/sys/net X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:18:57 -0000 Author: luigi Date: Sat Feb 14 19:18:56 2015 New Revision: 278775 URL: https://svnweb.freebsd.org/changeset/base/278775 Log: sync with the version in head (r274338): fix one comment, and return kernel-supplied error if available. no API changes. Modified: stable/10/sys/net/netmap_user.h Modified: stable/10/sys/net/netmap_user.h ============================================================================== --- stable/10/sys/net/netmap_user.h Sat Feb 14 19:03:11 2015 (r278774) +++ stable/10/sys/net/netmap_user.h Sat Feb 14 19:18:56 2015 (r278775) @@ -40,7 +40,7 @@ * From there: * struct netmap_ring *NETMAP_TXRING(nifp, index) * struct netmap_ring *NETMAP_RXRING(nifp, index) - * we can access ring->nr_cur, ring->nr_avail, ring->nr_flags + * we can access ring->cur, ring->head, ring->tail, etc. * * ring->slot[i] gives us the i-th slot (we can access * directly len, flags, buf_idx) @@ -543,7 +543,8 @@ fail: nm_close(d); if (errmsg) D("%s %s", errmsg, ifname); - errno = EINVAL; + if (errno == 0) + errno = EINVAL; return NULL; } From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 19:28:27 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3863189B; Sat, 14 Feb 2015 19:28: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 18D29B39; Sat, 14 Feb 2015 19:28: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 t1EJSQfr030633; Sat, 14 Feb 2015 19:28:26 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJSQS7030632; Sat, 14 Feb 2015 19:28:26 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502141928.t1EJSQS7030632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 19:28:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278778 - stable/10/sys/arm/broadcom/bcm2835 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:28:27 -0000 Author: loos Date: Sat Feb 14 19:28:26 2015 New Revision: 278778 URL: https://svnweb.freebsd.org/changeset/base/278778 Log: MFC: r273264, r274409, r278212, r278213: Add a workaround needed to fix a bug of Arasan Host Controller where it may lose the contents of consecutive writes (that happens within two SD card clock cycles). This fixes the causes of instability during the SD card detection and identification on Raspberry Pi (which happens at 400 kHz and so was much more vulnerable to this issue). Remove the previous workaround which clearly can't provide the same effect. Remove stale comments about the issues with HS mode. Remove a previous workaround to limit the minimum sdhci frequency that isn't needed anymore. Remove some duplicate calls to bus_release_resource() and destroy the mutex on error cases. While here remove unnecessary includes. Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Feb 14 19:24:38 2015 (r278777) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sat Feb 14 19:28:26 2015 (r278778) @@ -29,32 +29,17 @@ __FBSDID("$FreeBSD$"); #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 #include @@ -82,16 +67,9 @@ __FBSDID("$FreeBSD$"); #define dprintf(fmt, args...) #endif -/* - * Arasan HC seems to have problem with Data CRC on lower frequencies. - * Use this tunable to cap initialization sequence frequency at higher - * value. Default is standard 400kHz - */ -static int bcm2835_sdhci_min_freq = 400000; static int bcm2835_sdhci_hs = 1; static int bcm2835_sdhci_pio_mode = 0; -TUNABLE_INT("hw.bcm2835.sdhci.min_freq", &bcm2835_sdhci_min_freq); TUNABLE_INT("hw.bcm2835.sdhci.hs", &bcm2835_sdhci_hs); TUNABLE_INT("hw.bcm2835.sdhci.pio_mode", &bcm2835_sdhci_pio_mode); @@ -208,16 +186,12 @@ bcm_sdhci_attach(device_t dev) RF_ACTIVE); if (!sc->sc_irq_res) { device_printf(dev, "cannot allocate interrupt\n"); - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); err = ENXIO; goto fail; } if (bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - NULL, bcm_sdhci_intr, sc, &sc->sc_intrhand)) - { - bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); - bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); + NULL, bcm_sdhci_intr, sc, &sc->sc_intrhand)) { device_printf(dev, "cannot setup interrupt handler\n"); err = ENXIO; goto fail; @@ -283,6 +257,7 @@ fail: bus_release_resource(dev, SYS_RES_IRQ, 0, sc->sc_irq_res); if (sc->sc_mem_res) bus_release_resource(dev, SYS_RES_MEMORY, 0, sc->sc_mem_res); + mtx_destroy(&sc->sc_mtx); return (err); } @@ -319,21 +294,15 @@ RD4(struct bcm_sdhci_softc *sc, bus_size static inline void WR4(struct bcm_sdhci_softc *sc, bus_size_t off, uint32_t val) { - bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); - if ((off != SDHCI_BUFFER && off != SDHCI_INT_STATUS && off != SDHCI_CLOCK_CONTROL)) - { - int timeout = 100000; - while (val != bus_space_read_4(sc->sc_bst, sc->sc_bsh, off) - && --timeout > 0) - continue; - - if (timeout <= 0) - printf("sdhci_brcm: writing 0x%X to reg 0x%X " - "always gives 0x%X\n", - val, (uint32_t)off, - bus_space_read_4(sc->sc_bst, sc->sc_bsh, off)); - } + bus_space_write_4(sc->sc_bst, sc->sc_bsh, off, val); + /* + * The Arasan HC has a bug where it may lose the content of + * consecutive writes to registers that are within two SD-card + * clock cycles of each other (a clock domain crossing problem). + */ + if (sc->sc_slot.clock > 0) + DELAY(((2 * 1000000) / sc->sc_slot.clock) + 1); } static uint8_t @@ -425,13 +394,6 @@ bcm_sdhci_write_multi_4(device_t dev, st bus_space_write_multi_4(sc->sc_bst, sc->sc_bsh, off, data, count); } -static uint32_t -bcm_sdhci_min_freq(device_t dev, struct sdhci_slot *slot) -{ - - return bcm2835_sdhci_min_freq; -} - static void bcm_sdhci_start_dma_seg(struct bcm_sdhci_softc *sc) { @@ -684,7 +646,6 @@ static device_method_t bcm_sdhci_methods DEVMETHOD(mmcbr_acquire_host, sdhci_generic_acquire_host), DEVMETHOD(mmcbr_release_host, sdhci_generic_release_host), - DEVMETHOD(sdhci_min_freq, bcm_sdhci_min_freq), /* Platform transfer methods */ DEVMETHOD(sdhci_platform_will_handle, bcm_sdhci_will_handle_transfer), DEVMETHOD(sdhci_platform_start_transfer, bcm_sdhci_start_transfer), From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 19:41:29 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CBD9EC2F; Sat, 14 Feb 2015 19: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 B5459CFA; Sat, 14 Feb 2015 19: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 t1EJfT0K039416; Sat, 14 Feb 2015 19:41:29 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EJfR0H039408; Sat, 14 Feb 2015 19:41:27 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201502141941.t1EJfR0H039408@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 14 Feb 2015 19:41:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278779 - stable/10/sys/dev/netmap X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 19:41:30 -0000 Author: luigi Date: Sat Feb 14 19:41:26 2015 New Revision: 278779 URL: https://svnweb.freebsd.org/changeset/base/278779 Log: sync the code with the version in head. which the exception of svn 275358 (M_FLOWID deprecation, only a couple of lines) which cannot be merged. if_lem_netmap.h, if_re_netmap.h: - use the same (commented out) function to update the stat counters as in HEAD. This is a no-op here netmap.c - merge 274459 (support for private knote lock) and minor changes on nm_config and comments netmap_freebsd.c - merge 274459 (support for private knote lock) - merge 274354 (initialize color if passed as argument) netmap_generic.c - fix a comment netmap_kern.h - revise the lock macros, using sx locks; merge 274459 (private knote lock) netmap_monitor.c - use full memory barriers netmap_pipe.c - use full memory barriers, use length from the correct queue (mostly cosmetic, since the queues typically have the same size) Modified: stable/10/sys/dev/netmap/if_lem_netmap.h stable/10/sys/dev/netmap/if_re_netmap.h stable/10/sys/dev/netmap/netmap.c stable/10/sys/dev/netmap/netmap_freebsd.c stable/10/sys/dev/netmap/netmap_generic.c stable/10/sys/dev/netmap/netmap_kern.h stable/10/sys/dev/netmap/netmap_monitor.c stable/10/sys/dev/netmap/netmap_pipe.c Modified: stable/10/sys/dev/netmap/if_lem_netmap.h ============================================================================== --- stable/10/sys/dev/netmap/if_lem_netmap.h Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/if_lem_netmap.h Sat Feb 14 19:41:26 2015 (r278779) @@ -410,7 +410,7 @@ lem_netmap_rxsync(struct netmap_kring *k netmap_idx_n2k(kring, adapter->next_rx_desc_to_check), kring->nr_hwtail); adapter->next_rx_desc_to_check = nic_i; - // ifp->if_ipackets += n; + // if_inc_counter(ifp, IFCOUNTER_IPACKETS, n); kring->nr_hwtail = nm_i; } kring->nr_kflags &= ~NKR_PENDINTR; Modified: stable/10/sys/dev/netmap/if_re_netmap.h ============================================================================== --- stable/10/sys/dev/netmap/if_re_netmap.h Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/if_re_netmap.h Sat Feb 14 19:41:26 2015 (r278779) @@ -222,7 +222,7 @@ re_netmap_rxsync(struct netmap_kring *kr /* sync was in re_newbuf() */ bus_dmamap_sync(sc->rl_ldata.rl_rx_mtag, rxd[nic_i].rx_dmamap, BUS_DMASYNC_POSTREAD); - // sc->rl_ifp->if_ipackets++; + // if_inc_counter(sc->rl_ifp, IFCOUNTER_IPACKETS, 1); nm_i = nm_next(nm_i, lim); nic_i = nm_next(nic_i, lim); } Modified: stable/10/sys/dev/netmap/netmap.c ============================================================================== --- stable/10/sys/dev/netmap/netmap.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap.c Sat Feb 14 19:41:26 2015 (r278779) @@ -375,9 +375,14 @@ ports attached to the switch) /* reduce conditional code */ // linux API, use for the knlist in FreeBSD -#define init_waitqueue_head(x) knlist_init_mtx(&(x)->si_note, NULL) +/* use a private mutex for the knlist */ +#define init_waitqueue_head(x) do { \ + struct mtx *m = &(x)->m; \ + mtx_init(m, "nm_kn_lock", NULL, MTX_DEF); \ + knlist_init_mtx(&(x)->si.si_note, m); \ + } while (0) -void freebsd_selwakeup(struct selinfo *si, int pri); +#define OS_selrecord(a, b) selrecord(a, &((b)->si)) #define OS_selwakeup(a, b) freebsd_selwakeup(a, b) #elif defined(linux) @@ -651,9 +656,8 @@ netmap_update_config(struct netmap_adapt u_int txr, txd, rxr, rxd; txr = txd = rxr = rxd = 0; - if (na->nm_config) { - na->nm_config(na, &txr, &txd, &rxr, &rxd); - } else { + if (na->nm_config == NULL || + na->nm_config(na, &txr, &txd, &rxr, &rxd)) { /* take whatever we had at init time */ txr = na->num_tx_rings; txd = na->num_tx_desc; @@ -806,6 +810,19 @@ netmap_krings_create(struct netmap_adapt } +#ifdef __FreeBSD__ +static void +netmap_knlist_destroy(NM_SELINFO_T *si) +{ + /* XXX kqueue(9) needed; these will mirror knlist_init. */ + knlist_delete(&si->si.si_note, curthread, 0 /* not locked */ ); + knlist_destroy(&si->si.si_note); + /* now we don't need the mutex anymore */ + mtx_destroy(&si->m); +} +#endif /* __FreeBSD__ */ + + /* undo the actions performed by netmap_krings_create */ /* call with NMG_LOCK held */ void @@ -816,6 +833,7 @@ netmap_krings_delete(struct netmap_adapt /* we rely on the krings layout described above */ for ( ; kring != na->tailroom; kring++) { mtx_destroy(&kring->q_lock); + netmap_knlist_destroy(&kring->si); } free(na->tx_rings, M_DEVBUF); na->tx_rings = na->rx_rings = na->tailroom = NULL; @@ -996,9 +1014,8 @@ netmap_do_unregif(struct netmap_priv_d * * XXX The wake up now must happen during *_down(), when * we order all activities to stop. -gl */ - /* XXX kqueue(9) needed; these will mirror knlist_init. */ - /* knlist_destroy(&na->tx_si.si_note); */ - /* knlist_destroy(&na->rx_si.si_note); */ + netmap_knlist_destroy(&na->tx_si); + netmap_knlist_destroy(&na->rx_si); /* delete rings and buffers */ netmap_mem_rings_delete(na); @@ -1310,7 +1327,7 @@ netmap_rxsync_from_host(struct netmap_ad /* access copies of cur,tail in the kring */ if (kring->rcur == kring->rtail && td) /* no bufs available */ - selrecord(td, &kring->si); + OS_selrecord(td, &kring->si); mbq_unlock(q); return ret; @@ -2150,7 +2167,7 @@ netmap_ioctl(struct cdev *dev, u_long cm error = ENXIO; break; } - rmb(); /* make sure following reads are not from cache */ + mb(); /* make sure following reads are not from cache */ na = priv->np_na; /* we have a reference */ @@ -2410,7 +2427,7 @@ flush_tx: } } if (want_tx && retry_tx && !is_kevent) { - selrecord(td, check_all_tx ? + OS_selrecord(td, check_all_tx ? &na->tx_si : &na->tx_rings[priv->np_txqfirst].si); retry_tx = 0; goto flush_tx; @@ -2479,7 +2496,7 @@ do_retry_rx: } if (retry_rx && !is_kevent) - selrecord(td, check_all_rx ? + OS_selrecord(td, check_all_rx ? &na->rx_si : &na->rx_rings[priv->np_rxqfirst].si); if (send_down > 0 || retry_rx) { retry_rx = 0; @@ -3053,8 +3070,13 @@ netmap_init(void) error = netmap_mem_init(); if (error != 0) goto fail; - /* XXX could use make_dev_credv() to get error number */ - netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0660, + /* + * MAKEDEV_ETERNAL_KLD avoids an expensive check on syscalls + * when the module is compiled in. + * XXX could use make_dev_credv() to get error number + */ + netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, + &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600, "netmap"); if (!netmap_dev) goto fail; Modified: stable/10/sys/dev/netmap/netmap_freebsd.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_freebsd.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_freebsd.c Sat Feb 14 19:41:26 2015 (r278779) @@ -466,6 +466,8 @@ netmap_dev_pager_ctor(void *handle, vm_o if (netmap_verbose) D("handle %p size %jd prot %d foff %jd", handle, (intmax_t)size, prot, (intmax_t)foff); + if (color) + *color = 0; dev_ref(vmh->dev); return 0; } @@ -654,25 +656,24 @@ netmap_open(struct cdev *dev, int oflags * and do not need the selrecord(). */ -void freebsd_selwakeup(struct selinfo *si, int pri); void -freebsd_selwakeup(struct selinfo *si, int pri) +freebsd_selwakeup(struct nm_selinfo *si, int pri) { if (netmap_verbose) - D("on knote %p", &si->si_note); - selwakeuppri(si, pri); + D("on knote %p", &si->si.si_note); + selwakeuppri(&si->si, pri); /* use a non-zero hint to tell the notification from the * call done in kqueue_scan() which uses 0 */ - KNOTE_UNLOCKED(&si->si_note, 0x100 /* notification */); + KNOTE_UNLOCKED(&si->si.si_note, 0x100 /* notification */); } static void netmap_knrdetach(struct knote *kn) { struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; - struct selinfo *si = priv->np_rxsi; + struct selinfo *si = &priv->np_rxsi->si; D("remove selinfo %p", si); knlist_remove(&si->si_note, kn, 0); @@ -682,7 +683,7 @@ static void netmap_knwdetach(struct knote *kn) { struct netmap_priv_d *priv = (struct netmap_priv_d *)kn->kn_hook; - struct selinfo *si = priv->np_txsi; + struct selinfo *si = &priv->np_txsi->si; D("remove selinfo %p", si); knlist_remove(&si->si_note, kn, 0); @@ -754,7 +755,7 @@ netmap_kqfilter(struct cdev *dev, struct struct netmap_priv_d *priv; int error; struct netmap_adapter *na; - struct selinfo *si; + struct nm_selinfo *si; int ev = kn->kn_filter; if (ev != EVFILT_READ && ev != EVFILT_WRITE) { @@ -777,7 +778,7 @@ netmap_kqfilter(struct cdev *dev, struct kn->kn_fop = (ev == EVFILT_WRITE) ? &netmap_wfiltops : &netmap_rfiltops; kn->kn_hook = priv; - knlist_add(&si->si_note, kn, 1); + knlist_add(&si->si.si_note, kn, 1); // XXX unlock(priv) ND("register %p %s td %p priv %p kn %p np_nifp %p kn_fp/fpop %s", na, na->ifp->if_xname, curthread, priv, kn, Modified: stable/10/sys/dev/netmap/netmap_generic.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_generic.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_generic.c Sat Feb 14 19:41:26 2015 (r278779) @@ -821,7 +821,7 @@ generic_netmap_attach(struct ifnet *ifp) num_tx_desc = num_rx_desc = netmap_generic_ringsize; /* starting point */ - generic_find_num_desc(ifp, &num_tx_desc, &num_rx_desc); + generic_find_num_desc(ifp, &num_tx_desc, &num_rx_desc); /* ignore errors */ ND("Netmap ring size: TX = %d, RX = %d", num_tx_desc, num_rx_desc); if (num_tx_desc == 0 || num_rx_desc == 0) { D("Device has no hw slots (tx %u, rx %u)", num_tx_desc, num_rx_desc); Modified: stable/10/sys/dev/netmap/netmap_kern.h ============================================================================== --- stable/10/sys/dev/netmap/netmap_kern.h Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_kern.h Sat Feb 14 19:41:26 2015 (r278779) @@ -37,6 +37,7 @@ #define WITH_VALE // comment out to disable VALE support #define WITH_PIPES #define WITH_MONITOR +#define WITH_GENERIC #if defined(__FreeBSD__) @@ -44,6 +45,8 @@ #define unlikely(x) __builtin_expect((long)!!(x), 0L) #define NM_LOCK_T struct mtx + +/* netmap global lock */ #define NMG_LOCK_T struct sx #define NMG_LOCK_INIT() sx_init(&netmap_global_lock, \ "netmap global lock") @@ -52,7 +55,7 @@ #define NMG_UNLOCK() sx_xunlock(&netmap_global_lock) #define NMG_LOCK_ASSERT() sx_assert(&netmap_global_lock, SA_XLOCKED) -#define NM_SELINFO_T struct selinfo +#define NM_SELINFO_T struct nm_selinfo #define MBUF_LEN(m) ((m)->m_pkthdr.len) #define MBUF_IFP(m) ((m)->m_pkthdr.rcvif) #define NM_SEND_UP(ifp, m) ((NA(ifp))->if_input)(ifp, m) @@ -63,6 +66,12 @@ #define NM_ATOMIC_TEST_AND_SET(p) (!atomic_cmpset_acq_int((p), 0, 1)) #define NM_ATOMIC_CLEAR(p) atomic_store_rel_int((p), 0) +#if __FreeBSD_version >= 1100030 +#define WNA(_ifp) (_ifp)->if_netmap +#else /* older FreeBSD */ +#define WNA(_ifp) (_ifp)->if_pspare[0] +#endif /* older FreeBSD */ + #if __FreeBSD_version >= 1100005 struct netmap_adapter *netmap_getna(if_t ifp); #endif @@ -79,6 +88,13 @@ struct netmap_adapter *netmap_getna(if_t MALLOC_DECLARE(M_NETMAP); +struct nm_selinfo { + struct selinfo si; + struct mtx m; +}; + +void freebsd_selwakeup(struct nm_selinfo *si, int pri); + // XXX linux struct, not used in FreeBSD struct net_device_ops { }; @@ -101,13 +117,20 @@ struct hrtimer { #define NM_ATOMIC_T volatile long unsigned int -// XXX a mtx would suffice here too 20130404 gl -#define NMG_LOCK_T struct semaphore -#define NMG_LOCK_INIT() sema_init(&netmap_global_lock, 1) -#define NMG_LOCK_DESTROY() -#define NMG_LOCK() down(&netmap_global_lock) -#define NMG_UNLOCK() up(&netmap_global_lock) -#define NMG_LOCK_ASSERT() // XXX to be completed +#define NM_MTX_T struct mutex +#define NM_MTX_INIT(m, s) do { (void)s; mutex_init(&(m)); } while (0) +#define NM_MTX_DESTROY(m) do { (void)m; } while (0) +#define NM_MTX_LOCK(m) mutex_lock(&(m)) +#define NM_MTX_UNLOCK(m) mutex_unlock(&(m)) +#define NM_MTX_LOCK_ASSERT(m) mutex_is_locked(&(m)) + +#define NMG_LOCK_T NM_MTX_T +#define NMG_LOCK_INIT() NM_MTX_INIT(netmap_global_lock, \ + "netmap_global_lock") +#define NMG_LOCK_DESTROY() NM_MTX_DESTROY(netmap_global_lock) +#define NMG_LOCK() NM_MTX_LOCK(netmap_global_lock) +#define NMG_UNLOCK() NM_MTX_UNLOCK(netmap_global_lock) +#define NMG_LOCK_ASSERT() NM_MTX_LOCK_ASSERT(netmap_global_lock) #ifndef DEV_NETMAP #define DEV_NETMAP @@ -260,7 +283,7 @@ struct netmap_kring { struct netmap_adapter *na; - /* The folloiwing fields are for VALE switch support */ + /* The following fields are for VALE switch support */ struct nm_bdg_fwd *nkr_ft; uint32_t *nkr_leases; #define NR_NOSLOT ((uint32_t)~0) /* used in nkr_*lease* */ @@ -635,6 +658,7 @@ struct netmap_hw_adapter { /* physical d int (*nm_hw_register)(struct netmap_adapter *, int onoff); }; +#ifdef WITH_GENERIC /* Mitigation support. */ struct nm_generic_mit { struct hrtimer mit_timer; @@ -662,6 +686,7 @@ struct netmap_generic_adapter { /* emula netdev_tx_t (*save_start_xmit)(struct mbuf *, struct ifnet *); #endif }; +#endif /* WITH_GENERIC */ static __inline int netmap_real_tx_rings(struct netmap_adapter *na) @@ -1186,9 +1211,6 @@ extern int netmap_generic_rings; * NA returns a pointer to the struct netmap adapter from the ifp, * WNA is used to write it. */ -#ifndef WNA -#define WNA(_ifp) (_ifp)->if_pspare[0] -#endif #define NA(_ifp) ((struct netmap_adapter *)WNA(_ifp)) /* @@ -1478,6 +1500,7 @@ struct netmap_monitor_adapter { #endif /* WITH_MONITOR */ +#ifdef WITH_GENERIC /* * generic netmap emulation for devices that do not have * native netmap support. @@ -1509,6 +1532,7 @@ void netmap_mitigation_start(struct nm_g void netmap_mitigation_restart(struct nm_generic_mit *mit); int netmap_mitigation_active(struct nm_generic_mit *mit); void netmap_mitigation_cleanup(struct nm_generic_mit *mit); +#endif /* WITH_GENERIC */ Modified: stable/10/sys/dev/netmap/netmap_monitor.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_monitor.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_monitor.c Sat Feb 14 19:41:26 2015 (r278779) @@ -179,7 +179,7 @@ netmap_monitor_parent_sync(struct netmap i = nm_next(i, mlim); } - wmb(); + mb(); mkring->nr_hwtail = i; mtx_unlock(&mkring->q_lock); @@ -225,7 +225,7 @@ netmap_monitor_rxsync(struct netmap_krin { ND("%s %x", kring->name, flags); kring->nr_hwcur = kring->rcur; - rmb(); + mb(); nm_rxsync_finalize(kring); return 0; } Modified: stable/10/sys/dev/netmap/netmap_pipe.c ============================================================================== --- stable/10/sys/dev/netmap/netmap_pipe.c Sat Feb 14 19:28:26 2015 (r278778) +++ stable/10/sys/dev/netmap/netmap_pipe.c Sat Feb 14 19:41:26 2015 (r278779) @@ -197,10 +197,10 @@ netmap_pipe_txsync(struct netmap_kring * if (m < 0) m += txkring->nkr_num_slots; limit = m; - m = rxkring->nkr_num_slots - 1; /* max avail space on destination */ + m = lim_rx; /* max avail space on destination */ busy = j - rxkring->nr_hwcur; /* busy slots */ if (busy < 0) - busy += txkring->nkr_num_slots; + busy += rxkring->nkr_num_slots; m -= busy; /* subtract busy slots */ ND(2, "m %d limit %d", m, limit); if (m < limit) @@ -228,7 +228,7 @@ netmap_pipe_txsync(struct netmap_kring * k = nm_next(k, lim_tx); } - wmb(); /* make sure the slots are updated before publishing them */ + mb(); /* make sure the slots are updated before publishing them */ rxkring->nr_hwtail = j; txkring->nr_hwcur = k; txkring->nr_hwtail = nm_prev(k, lim_tx); @@ -237,7 +237,7 @@ netmap_pipe_txsync(struct netmap_kring * ND(2, "after: hwcur %d hwtail %d cur %d head %d tail %d j %d", txkring->nr_hwcur, txkring->nr_hwtail, txkring->rcur, txkring->rhead, txkring->rtail, j); - wmb(); /* make sure rxkring->nr_hwtail is updated before notifying */ + mb(); /* make sure rxkring->nr_hwtail is updated before notifying */ rxkring->na->nm_notify(rxkring->na, rxkring->ring_id, NR_RX, 0); return 0; @@ -253,12 +253,12 @@ netmap_pipe_rxsync(struct netmap_kring * rxkring->nr_hwcur = rxkring->rhead; /* recover user-relased slots */ ND(5, "hwcur %d hwtail %d cur %d head %d tail %d", rxkring->nr_hwcur, rxkring->nr_hwtail, rxkring->rcur, rxkring->rhead, rxkring->rtail); - rmb(); /* paired with the first wmb() in txsync */ + mb(); /* paired with the first mb() in txsync */ nm_rxsync_finalize(rxkring); if (oldhwcur != rxkring->nr_hwcur) { /* we have released some slots, notify the other end */ - wmb(); /* make sure nr_hwcur is updated before notifying */ + mb(); /* make sure nr_hwcur is updated before notifying */ txkring->na->nm_notify(txkring->na, txkring->ring_id, NR_TX, 0); } return 0; From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 20:32:25 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D514A91D; Sat, 14 Feb 2015 20:32: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 BF7FC238; Sat, 14 Feb 2015 20:32: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 t1EKWPcN064974; Sat, 14 Feb 2015 20:32:25 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKWPhJ064971; Sat, 14 Feb 2015 20:32:25 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142032.t1EKWPhJ064971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278781 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:32:26 -0000 Author: loos Date: Sat Feb 14 20:32:24 2015 New Revision: 278781 URL: https://svnweb.freebsd.org/changeset/base/278781 Log: MFC r273566, r273569: Provide a working GPIOBUS_IVAR() macro for FDT systems. Move the duplicated code to a single function. No functional changes. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/ofw_gpiobus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:00:57 2015 (r278780) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:32:24 2015 (r278781) @@ -99,6 +99,34 @@ gpiobus_print_pins(struct gpiobus_ivar * printf("%d", range_start); } +int +gpiobus_init_softc(device_t dev) +{ + struct gpiobus_softc *sc; + + sc = GPIOBUS_SOFTC(dev); + sc->sc_busdev = dev; + sc->sc_dev = device_get_parent(dev); + + if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) + return (ENXIO); + + KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); + + /* Pins = GPIO_PIN_MAX() + 1 */ + sc->sc_npins++; + + sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, + M_NOWAIT | M_ZERO); + if (sc->sc_pins_mapped == NULL) + return (ENOMEM); + + /* Initialize the bus lock. */ + GPIOBUS_LOCK_INIT(sc); + + return (0); +} + static int gpiobus_parse_pins(struct gpiobus_softc *sc, device_t child, int mask) { @@ -163,30 +191,11 @@ gpiobus_probe(device_t dev) static int gpiobus_attach(device_t dev) { - struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); - int res; - - sc->sc_busdev = dev; - sc->sc_dev = device_get_parent(dev); - res = GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins); - if (res) - return (ENXIO); - - KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); - - /* - * Increase to get number of pins - */ - sc->sc_npins++; - - sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, - M_NOWAIT | M_ZERO); - - if (!sc->sc_pins_mapped) - return (ENOMEM); + int err; - /* init bus lock */ - GPIOBUS_LOCK_INIT(sc); + err = gpiobus_init_softc(dev); + if (err != 0) + return (err); /* * Get parent's pins and mark them as unmapped Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:00:57 2015 (r278780) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:32:24 2015 (r278781) @@ -41,7 +41,12 @@ #include "gpio_if.h" +#ifdef FDT +#define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) \ + &((struct ofw_gpiobus_devinfo *)device_get_ivars(d))->opd_dinfo +#else #define GPIOBUS_IVAR(d) (struct gpiobus_ivar *) device_get_ivars(d) +#endif #define GPIOBUS_SOFTC(d) (struct gpiobus_softc *) device_get_softc(d) #define GPIOBUS_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define GPIOBUS_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) @@ -84,6 +89,7 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif void gpiobus_print_pins(struct gpiobus_ivar *); +int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: stable/10/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:00:57 2015 (r278780) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:32:24 2015 (r278781) @@ -264,33 +264,13 @@ ofw_gpiobus_probe(device_t dev) static int ofw_gpiobus_attach(device_t dev) { - struct gpiobus_softc *sc; + int err; phandle_t child; - sc = GPIOBUS_SOFTC(dev); - sc->sc_busdev = dev; - sc->sc_dev = device_get_parent(dev); - - /* Read the pin max. value */ - if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) - return (ENXIO); - - KASSERT(sc->sc_npins != 0, ("GPIO device with no pins")); - - /* - * Increase to get number of pins. - */ - sc->sc_npins++; - - sc->sc_pins_mapped = malloc(sizeof(int) * sc->sc_npins, M_DEVBUF, - M_NOWAIT | M_ZERO); - - if (!sc->sc_pins_mapped) - return (ENOMEM); - - /* Init the bus lock. */ - GPIOBUS_LOCK_INIT(sc); - + err = gpiobus_init_softc(dev); + if (err != 0) + return (err); + bus_generic_probe(dev); bus_enumerate_hinted_children(dev); From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 20:37:38 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 43E0DDCC; Sat, 14 Feb 2015 20:37:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 241C42A2; Sat, 14 Feb 2015 20:37:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EKbc29065700; Sat, 14 Feb 2015 20:37:38 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKbYuS065674; Sat, 14 Feb 2015 20:37:34 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142037.t1EKbYuS065674@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:37:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278782 - in stable/10/sys: arm/allwinner arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/lpc arm/rockchip arm/samsung/exynos arm/ti arm/xilinx arm/xscale/ixp425 mips/at... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:37:38 -0000 Author: loos Date: Sat Feb 14 20:37:33 2015 New Revision: 278782 URL: https://svnweb.freebsd.org/changeset/base/278782 Log: MFC r273799: Make the GPIO children attach to the first unit available and not only to unit 0. This fix a bug where a GPIO controller could fail to attach its children (gpioc and gpiobus) if another GPIO driver attach first. Modified: stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/freescale/imx/imx_gpio.c stable/10/sys/arm/freescale/vybrid/vf_gpio.c stable/10/sys/arm/lpc/lpc_gpio.c stable/10/sys/arm/rockchip/rk30xx_gpio.c stable/10/sys/arm/samsung/exynos/exynos5_pad.c stable/10/sys/arm/ti/ti_gpio.c stable/10/sys/arm/xilinx/zy7_gpio.c stable/10/sys/arm/xscale/ixp425/avila_gpio.c stable/10/sys/arm/xscale/ixp425/cambria_gpio.c stable/10/sys/mips/atheros/ar71xx_gpio.c stable/10/sys/mips/cavium/octeon_gpio.c stable/10/sys/mips/rt305x/rt305x_gpio.c stable/10/sys/powerpc/wii/wii_gpio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -474,8 +474,8 @@ a10_gpio_attach(device_t dev) } sc->sc_gpio_npins = i; - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); a10_gpio_sc = sc; Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -747,8 +747,9 @@ bcm_gpio_attach(device_t dev) bcm_gpio_sysctl_init(sc); - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); fail: Modified: stable/10/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -435,8 +435,8 @@ imx51_gpio_attach(device_t dev) "imx_gpio%d.%d", device_get_unit(dev), i); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -146,8 +146,8 @@ vf_gpio_attach(device_t dev) "vf_gpio%d.%d", device_get_unit(dev), i); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/lpc/lpc_gpio.c ============================================================================== --- stable/10/sys/arm/lpc/lpc_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/lpc/lpc_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -192,8 +192,8 @@ lpc_gpio_attach(device_t dev) lpc_gpio_sc = sc; - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -504,8 +504,8 @@ rk30_gpio_attach(device_t dev) } sc->sc_gpio_npins = i; - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); rk30_gpio_sc = sc; Modified: stable/10/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 20:37:33 2015 (r278782) @@ -441,8 +441,8 @@ pad_attach(device_t dev) "pad%d.%d", device_get_unit(dev), i); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/ti/ti_gpio.c ============================================================================== --- stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -822,8 +822,8 @@ ti_gpio_attach(device_t dev) } /* Finish of the probe call */ - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/xilinx/zy7_gpio.c ============================================================================== --- stable/10/sys/arm/xilinx/zy7_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/xilinx/zy7_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -329,8 +329,8 @@ zy7_gpio_attach(device_t dev) /* Completely reset. */ zy7_gpio_hw_reset(sc); - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -318,8 +318,9 @@ avila_gpio_attach(device_t dev) sc->sc_valid |= 1 << p->pin; } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); #undef N } Modified: stable/10/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -447,8 +447,9 @@ cambria_gpio_attach(device_t dev) cambria_gpio_pin_setflags(dev, pin, p->flags); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); } Modified: stable/10/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -442,8 +442,9 @@ ar71xx_gpio_attach(device_t dev) if ((pinon & (1 << j)) != 0) ar71xx_gpio_pin_set(dev, j, 1); } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); } Modified: stable/10/sys/mips/cavium/octeon_gpio.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -441,8 +441,9 @@ octeon_gpio_attach(device_t dev) } } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); + return (bus_generic_attach(dev)); } Modified: stable/10/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -511,9 +511,8 @@ rt305x_gpio_attach(device_t dev) } #endif - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); - + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); return (bus_generic_attach(dev)); } Modified: stable/10/sys/powerpc/wii/wii_gpio.c ============================================================================== --- stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 20:32:24 2015 (r278781) +++ stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 20:37:33 2015 (r278782) @@ -182,8 +182,8 @@ wiigpio_attach(device_t dev) "GPIO_PIN_INPUT" : "GPIO_PIN_OUTPUT"); #endif } - device_add_child(dev, "gpioc", device_get_unit(dev)); - device_add_child(dev, "gpiobus", device_get_unit(dev)); + device_add_child(dev, "gpioc", -1); + device_add_child(dev, "gpiobus", -1); /* * We will be responsible for powering off the system. */ From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 20:50:40 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFFE52F4; Sat, 14 Feb 2015 20:50:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1B2F391; Sat, 14 Feb 2015 20:50:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EKoeZg071822; Sat, 14 Feb 2015 20:50:40 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKodXN071813; Sat, 14 Feb 2015 20:50:39 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142050.t1EKodXN071813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278783 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:50:40 -0000 Author: loos Date: Sat Feb 14 20:50:38 2015 New Revision: 278783 URL: https://svnweb.freebsd.org/changeset/base/278783 Log: MFC r273917, r273926: Fix the gpiobus locking by using a more sane model where it isn't necessary hold the gpiobus lock between the gpio calls. gpiobus_acquire_lock() now accepts a third parameter which tells gpiobus what to do when the bus is already busy. When GPIOBUS_WAIT wait is used, the calling thread will be put to sleep until the bus became free. With GPIOBUS_DONTWAIT the calling thread will receive EWOULDBLOCK right away and then it can act upon. This fixes the gpioiic(4) locking issues that arises when doing multiple concurrent access on the bus. Fix the build of non-FDT systems by moving the gpiobusvar.h header outside the FDT #ifdef. While here remove a few unused headers. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobus_if.m stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/gpioiic.c stable/10/sys/dev/gpio/gpioled.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:50:38 2015 (r278783) @@ -53,9 +53,7 @@ static void gpiobus_hinted_child(device_ /* * GPIOBUS interface */ -static void gpiobus_lock_bus(device_t); -static void gpiobus_unlock_bus(device_t); -static void gpiobus_acquire_bus(device_t, device_t); +static int gpiobus_acquire_bus(device_t, device_t, int); static void gpiobus_release_bus(device_t, device_t); static int gpiobus_pin_setflags(device_t, device_t, uint32_t, uint32_t); static int gpiobus_pin_getflags(device_t, device_t, uint32_t, uint32_t*); @@ -326,37 +324,26 @@ gpiobus_hinted_child(device_t bus, const device_delete_child(bus, child); } -static void -gpiobus_lock_bus(device_t busdev) +static int +gpiobus_acquire_bus(device_t busdev, device_t child, int how) { struct gpiobus_softc *sc; sc = device_get_softc(busdev); GPIOBUS_ASSERT_UNLOCKED(sc); GPIOBUS_LOCK(sc); -} - -static void -gpiobus_unlock_bus(device_t busdev) -{ - struct gpiobus_softc *sc; - - sc = device_get_softc(busdev); - GPIOBUS_ASSERT_LOCKED(sc); + if (sc->sc_owner != NULL) { + if (how == GPIOBUS_DONTWAIT) { + GPIOBUS_UNLOCK(sc); + return (EWOULDBLOCK); + } + while (sc->sc_owner != NULL) + mtx_sleep(sc, &sc->sc_mtx, 0, "gpiobuswait", 0); + } + sc->sc_owner = child; GPIOBUS_UNLOCK(sc); -} -static void -gpiobus_acquire_bus(device_t busdev, device_t child) -{ - struct gpiobus_softc *sc; - - sc = device_get_softc(busdev); - GPIOBUS_ASSERT_LOCKED(sc); - - if (sc->sc_owner) - panic("gpiobus: cannot serialize the access to device."); - sc->sc_owner = child; + return (0); } static void @@ -365,14 +352,15 @@ gpiobus_release_bus(device_t busdev, dev struct gpiobus_softc *sc; sc = device_get_softc(busdev); - GPIOBUS_ASSERT_LOCKED(sc); - - if (!sc->sc_owner) + GPIOBUS_ASSERT_UNLOCKED(sc); + GPIOBUS_LOCK(sc); + if (sc->sc_owner == NULL) panic("gpiobus: releasing unowned bus."); if (sc->sc_owner != child) panic("gpiobus: you don't own the bus. game over."); - sc->sc_owner = NULL; + wakeup(sc); + GPIOBUS_UNLOCK(sc); } static int @@ -469,8 +457,6 @@ static device_method_t gpiobus_methods[] DEVMETHOD(bus_hinted_child, gpiobus_hinted_child), /* GPIO protocol */ - DEVMETHOD(gpiobus_lock_bus, gpiobus_lock_bus), - DEVMETHOD(gpiobus_unlock_bus, gpiobus_unlock_bus), DEVMETHOD(gpiobus_acquire_bus, gpiobus_acquire_bus), DEVMETHOD(gpiobus_release_bus, gpiobus_release_bus), DEVMETHOD(gpiobus_pin_getflags, gpiobus_pin_getflags), Modified: stable/10/sys/dev/gpio/gpiobus_if.m ============================================================================== --- stable/10/sys/dev/gpio/gpiobus_if.m Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpiobus_if.m Sat Feb 14 20:50:38 2015 (r278783) @@ -32,25 +32,12 @@ INTERFACE gpiobus; # -# Lock the gpio bus -# -METHOD void lock_bus { - device_t busdev; -}; - -# -# Unlock the gpio bus -# -METHOD void unlock_bus { - device_t busdev; -}; - -# # Dedicate the gpio bus control for a child # -METHOD void acquire_bus { +METHOD int acquire_bus { device_t busdev; device_t dev; + int how; }; # Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:50:38 2015 (r278783) @@ -56,6 +56,9 @@ #define GPIOBUS_ASSERT_LOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_OWNED) #define GPIOBUS_ASSERT_UNLOCKED(_sc) mtx_assert(&_sc->sc_mtx, MA_NOTOWNED) +#define GPIOBUS_WAIT 1 +#define GPIOBUS_DONTWAIT 2 + struct gpiobus_softc { struct mtx sc_mtx; /* bus mutex */ Modified: stable/10/sys/dev/gpio/gpioiic.c ============================================================================== --- stable/10/sys/dev/gpio/gpioiic.c Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpioiic.c Sat Feb 14 20:50:38 2015 (r278783) @@ -154,18 +154,18 @@ static int gpioiic_callback(device_t dev, int index, caddr_t data) { struct gpioiic_softc *sc = device_get_softc(dev); - int error = 0; + int error, how; + how = GPIOBUS_DONTWAIT; + if (data != NULL && (int)*data == IIC_WAIT) + how = GPIOBUS_WAIT; + error = 0; switch (index) { case IIC_REQUEST_BUS: - GPIOBUS_LOCK_BUS(sc->sc_busdev); - GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); + error = GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev, how); break; case IIC_RELEASE_BUS: - GPIOBUS_LOCK_BUS(sc->sc_busdev); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); break; default: error = EINVAL; Modified: stable/10/sys/dev/gpio/gpioled.c ============================================================================== --- stable/10/sys/dev/gpio/gpioled.c Sat Feb 14 20:37:33 2015 (r278782) +++ stable/10/sys/dev/gpio/gpioled.c Sat Feb 14 20:50:38 2015 (r278783) @@ -31,11 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include -#include +#include #include -#include #include #include #include @@ -43,12 +41,12 @@ __FBSDID("$FreeBSD$"); #ifdef FDT #include -#include #include #endif +#include #include -#include + #include "gpiobus_if.h" /* @@ -79,16 +77,23 @@ static int gpioled_detach(device_t); static void gpioled_control(void *priv, int onoff) { - struct gpioled_softc *sc = priv; + int error; + struct gpioled_softc *sc; + + sc = (struct gpioled_softc *)priv; GPIOLED_LOCK(sc); - GPIOBUS_LOCK_BUS(sc->sc_busdev); - GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, - GPIO_PIN_OUTPUT); - GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, - onoff ? GPIO_PIN_HIGH : GPIO_PIN_LOW); + error = GPIOBUS_ACQUIRE_BUS(sc->sc_busdev, sc->sc_dev, + GPIOBUS_DONTWAIT); + if (error != 0) { + GPIOLED_UNLOCK(sc); + return; + } + error = GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, + GPIOLED_PIN, GPIO_PIN_OUTPUT); + if (error == 0) + GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, GPIOLED_PIN, + onoff ? GPIO_PIN_HIGH : GPIO_PIN_LOW); GPIOBUS_RELEASE_BUS(sc->sc_busdev, sc->sc_dev); - GPIOBUS_UNLOCK_BUS(sc->sc_busdev); GPIOLED_UNLOCK(sc); } From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 20:57:28 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCEDD48C; Sat, 14 Feb 2015 20:57: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 BDA6E646; Sat, 14 Feb 2015 20:57: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 t1EKvSDV075463; Sat, 14 Feb 2015 20:57:28 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EKvSSu075459; Sat, 14 Feb 2015 20:57:28 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142057.t1EKvSSu075459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 20:57:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278784 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 20:57:29 -0000 Author: loos Date: Sat Feb 14 20:57:27 2015 New Revision: 278784 URL: https://svnweb.freebsd.org/changeset/base/278784 Log: MFC r274638: Add basic interrupt management code to gpiobus and ofw_gpiobus. This is the general support to allow the use of GPIO pins as interrupt sources for direct gpiobus children. The use of GPIO pins as generic interrupt sources (for an ethernet driver for example) will only be possible when arm/intrng is complete. Then, most of this code will need to be rewritten, but it works for now, is better than what we have and will allow further developments. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/ofw_gpiobus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:50:38 2015 (r278783) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) @@ -38,6 +38,13 @@ __FBSDID("$FreeBSD$"); #include "gpiobus_if.h" +#undef GPIOBUS_DEBUG +#ifdef GPIOBUS_DEBUG +#define dprintf printf +#else +#define dprintf(x, arg...) +#endif + static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -105,6 +112,11 @@ gpiobus_init_softc(device_t dev) sc = GPIOBUS_SOFTC(dev); sc->sc_busdev = dev; sc->sc_dev = device_get_parent(dev); + sc->sc_intr_rman.rm_type = RMAN_ARRAY; + sc->sc_intr_rman.rm_descr = "GPIO Interrupts"; + if (rman_init(&sc->sc_intr_rman) != 0 || + rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0) + panic("%s: failed to set up rman.", __func__); if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) return (ENXIO); @@ -267,6 +279,7 @@ gpiobus_print_child(device_t dev, device retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); gpiobus_print_pins(devi); + resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); return (retval); @@ -304,7 +317,9 @@ gpiobus_add_child(device_t dev, u_int or device_delete_child(dev, child); return (0); } + resource_list_init(&devi->rl); device_set_ivars(child, devi); + return (child); } @@ -314,14 +329,103 @@ gpiobus_hinted_child(device_t bus, const struct gpiobus_softc *sc = GPIOBUS_SOFTC(bus); struct gpiobus_ivar *devi; device_t child; - int pins; - + int irq, pins; child = BUS_ADD_CHILD(bus, 0, dname, dunit); devi = GPIOBUS_IVAR(child); resource_int_value(dname, dunit, "pins", &pins); if (gpiobus_parse_pins(sc, child, pins)) device_delete_child(bus, child); + if (resource_int_value(dname, dunit, "irq", &irq) == 0) { + if (bus_set_resource(child, SYS_RES_IRQ, 0, irq, 1) != 0) + device_printf(bus, + "warning: bus_set_resource() failed\n"); + } +} + +static int +gpiobus_set_resource(device_t dev, device_t child, int type, int rid, + u_long start, u_long count) +{ + struct gpiobus_ivar *devi; + struct resource_list_entry *rle; + + dprintf("%s: entry (%p, %p, %d, %d, %p, %ld)\n", + __func__, dev, child, type, rid, (void *)(intptr_t)start, count); + devi = GPIOBUS_IVAR(child); + rle = resource_list_add(&devi->rl, type, rid, start, + start + count - 1, count); + if (rle == NULL) + return (ENXIO); + + return (0); +} + +static struct resource * +gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct gpiobus_softc *sc; + struct resource *rv; + struct resource_list *rl; + struct resource_list_entry *rle; + int isdefault; + + if (type != SYS_RES_IRQ) + return (NULL); + isdefault = (start == 0UL && end == ~0UL && count == 1); + rle = NULL; + if (isdefault) { + rl = BUS_GET_RESOURCE_LIST(bus, child); + if (rl == NULL) + return (NULL); + rle = resource_list_find(rl, type, *rid); + if (rle == NULL) + return (NULL); + if (rle->res != NULL) + panic("%s: resource entry is busy", __func__); + start = rle->start; + count = rle->count; + end = rle->end; + } + sc = device_get_softc(bus); + rv = rman_reserve_resource(&sc->sc_intr_rman, start, end, count, flags, + child); + if (rv == NULL) + return (NULL); + rman_set_rid(rv, *rid); + if ((flags & RF_ACTIVE) != 0 && + bus_activate_resource(child, type, *rid, rv) != 0) { + rman_release_resource(rv); + return (NULL); + } + + return (rv); +} + +static int +gpiobus_release_resource(device_t bus __unused, device_t child, int type, + int rid, struct resource *r) +{ + int error; + + if (rman_get_flags(r) & RF_ACTIVE) { + error = bus_deactivate_resource(child, type, rid, r); + if (error) + return (error); + } + + return (rman_release_resource(r)); +} + +static struct resource_list * +gpiobus_get_resource_list(device_t bus __unused, device_t child) +{ + struct gpiobus_ivar *ivar; + + ivar = GPIOBUS_IVAR(child); + + return (&ivar->rl); } static int @@ -450,6 +554,15 @@ static device_method_t gpiobus_methods[] DEVMETHOD(device_resume, gpiobus_resume), /* Bus interface */ + DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), + DEVMETHOD(bus_config_intr, bus_generic_config_intr), + DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), + DEVMETHOD(bus_set_resource, gpiobus_set_resource), + DEVMETHOD(bus_alloc_resource, gpiobus_alloc_resource), + DEVMETHOD(bus_release_resource, gpiobus_release_resource), + DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), + DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), + DEVMETHOD(bus_get_resource_list, gpiobus_get_resource_list), DEVMETHOD(bus_add_child, gpiobus_add_child), DEVMETHOD(bus_print_child, gpiobus_print_child), DEVMETHOD(bus_child_pnpinfo_str, gpiobus_child_pnpinfo_str), Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:50:38 2015 (r278783) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:57:27 2015 (r278784) @@ -34,6 +34,7 @@ #include #include +#include #ifdef FDT #include @@ -62,6 +63,7 @@ struct gpiobus_softc { struct mtx sc_mtx; /* bus mutex */ + struct rman sc_intr_rman; /* isr resources */ device_t sc_busdev; /* bus device */ device_t sc_owner; /* bus owner */ device_t sc_dev; /* driver device */ @@ -71,6 +73,7 @@ struct gpiobus_softc struct gpiobus_ivar { + struct resource_list rl; /* isr resource list */ uint32_t npins; /* pins total */ uint32_t *flags; /* pins flags */ uint32_t *pins; /* pins map */ Modified: stable/10/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:50:38 2015 (r278783) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) @@ -238,6 +238,13 @@ ofw_gpiobus_setup_devinfo(device_t dev, free(dinfo, M_DEVBUF); return (NULL); } + /* And now the interrupt resources. */ + resource_list_init(&dinfo->opd_dinfo.rl); + if (ofw_bus_intr_to_rl(dev, node, &dinfo->opd_dinfo.rl) != 0) { + ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); + free(dinfo, M_DEVBUF); + return (NULL); + } return (dinfo); } @@ -246,6 +253,7 @@ static void ofw_gpiobus_destroy_devinfo(struct ofw_gpiobus_devinfo *dinfo) { + resource_list_free(&dinfo->opd_dinfo.rl); ofw_bus_gen_destroy_devinfo(&dinfo->opd_obdinfo); free(dinfo, M_DEVBUF); } @@ -326,6 +334,8 @@ ofw_gpiobus_print_child(device_t dev, de retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); gpiobus_print_pins(&devi->opd_dinfo); + resource_list_print_type(&devi->opd_dinfo.rl, "irq", SYS_RES_IRQ, + "%ld"); retval += bus_print_child_footer(dev, child); return (retval); From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 21:02:34 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C2BF3627; Sat, 14 Feb 2015 21:02:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A331474F; Sat, 14 Feb 2015 21:02:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1EL2YN1079786; Sat, 14 Feb 2015 21:02:34 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1EL2XMS079782; Sat, 14 Feb 2015 21:02:33 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142102.t1EL2XMS079782@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 21:02:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278785 - stable/10/sys/dev/gpio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 21:02:34 -0000 Author: loos Date: Sat Feb 14 21:02:33 2015 New Revision: 278785 URL: https://svnweb.freebsd.org/changeset/base/278785 Log: MFC r274642, 274643: Remove unnecessary code. After r273566, the gpiobus version of bus_print_child() also works on FDT systems. Fix gpiobus_child_location_str() to return a real string with the mapped pins. Make gpiobus_print_pins() static again. Modified: stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/ofw_gpiobus.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 21:02:33 2015 (r278785) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #define dprintf(x, arg...) #endif +static void gpiobus_print_pins(struct gpiobus_ivar *, char *, size_t); static int gpiobus_parse_pins(struct gpiobus_softc *, device_t, int); static int gpiobus_probe(device_t); static int gpiobus_attach(device_t); @@ -69,11 +70,11 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); -void -gpiobus_print_pins(struct gpiobus_ivar *devi) +static void +gpiobus_print_pins(struct gpiobus_ivar *devi, char *buf, size_t buflen) { - int range_start, range_stop, need_coma; - int i; + char tmp[128]; + int i, range_start, range_stop, need_coma; if (devi->npins == 0) return; @@ -83,11 +84,15 @@ gpiobus_print_pins(struct gpiobus_ivar * for (i = 1; i < devi->npins; i++) { if (devi->pins[i] != (range_stop + 1)) { if (need_coma) - printf(","); + strlcat(buf, ",", buflen); + memset(tmp, 0, sizeof(tmp)); if (range_start != range_stop) - printf("%d-%d", range_start, range_stop); + snprintf(tmp, sizeof(tmp) - 1, "%d-%d", + range_start, range_stop); else - printf("%d", range_start); + snprintf(tmp, sizeof(tmp) - 1, "%d", + range_start); + strlcat(buf, tmp, buflen); range_start = range_stop = devi->pins[i]; need_coma = 1; @@ -97,11 +102,15 @@ gpiobus_print_pins(struct gpiobus_ivar * } if (need_coma) - printf(","); + strlcat(buf, ",", buflen); + memset(tmp, 0, sizeof(tmp)); if (range_start != range_stop) - printf("%d-%d", range_start, range_stop); + snprintf(tmp, sizeof(tmp) - 1, "%d-%d", + range_start, range_stop); else - printf("%d", range_start); + snprintf(tmp, sizeof(tmp) - 1, "%d", + range_start); + strlcat(buf, tmp, buflen); } int @@ -273,12 +282,16 @@ gpiobus_resume(device_t dev) static int gpiobus_print_child(device_t dev, device_t child) { - struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + char pins[128]; int retval = 0; + struct gpiobus_ivar *devi; + devi = GPIOBUS_IVAR(child); + memset(pins, 0, sizeof(pins)); retval += bus_print_child_header(dev, child); retval += printf(" at pin(s) "); - gpiobus_print_pins(devi); + gpiobus_print_pins(devi, pins, sizeof(pins)); + retval += printf("%s", pins); resource_list_print_type(&devi->rl, "irq", SYS_RES_IRQ, "%ld"); retval += bus_print_child_footer(dev, child); @@ -289,8 +302,12 @@ static int gpiobus_child_location_str(device_t bus, device_t child, char *buf, size_t buflen) { + struct gpiobus_ivar *devi; + + devi = GPIOBUS_IVAR(child); + strlcpy(buf, "pin(s)=", buflen); + gpiobus_print_pins(devi, buf, buflen); - snprintf(buf, buflen, "pins=?"); return (0); } Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 20:57:27 2015 (r278784) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 21:02:33 2015 (r278785) @@ -94,7 +94,6 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif -void gpiobus_print_pins(struct gpiobus_ivar *); int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: stable/10/sys/dev/gpio/ofw_gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 20:57:27 2015 (r278784) +++ stable/10/sys/dev/gpio/ofw_gpiobus.c Sat Feb 14 21:02:33 2015 (r278785) @@ -324,23 +324,6 @@ ofw_gpiobus_add_child(device_t dev, u_in return (child); } -static int -ofw_gpiobus_print_child(device_t dev, device_t child) -{ - struct ofw_gpiobus_devinfo *devi; - int retval = 0; - - devi = device_get_ivars(child); - retval += bus_print_child_header(dev, child); - retval += printf(" at pin(s) "); - gpiobus_print_pins(&devi->opd_dinfo); - resource_list_print_type(&devi->opd_dinfo.rl, "irq", SYS_RES_IRQ, - "%ld"); - retval += bus_print_child_footer(dev, child); - - return (retval); -} - static const struct ofw_bus_devinfo * ofw_gpiobus_get_devinfo(device_t bus, device_t dev) { @@ -358,7 +341,6 @@ static device_method_t ofw_gpiobus_metho /* Bus interface */ DEVMETHOD(bus_child_pnpinfo_str, ofw_bus_gen_child_pnpinfo_str), - DEVMETHOD(bus_print_child, ofw_gpiobus_print_child), DEVMETHOD(bus_add_child, ofw_gpiobus_add_child), /* ofw_bus interface */ From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 21:16:24 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9B42B7EC; Sat, 14 Feb 2015 21:16: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 82252834; Sat, 14 Feb 2015 21:16: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 t1ELGOKX085078; Sat, 14 Feb 2015 21:16:24 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ELGJGa085048; Sat, 14 Feb 2015 21:16:19 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201502142116.t1ELGJGa085048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Sat, 14 Feb 2015 21:16:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278786 - in stable/10/sys: arm/allwinner arm/broadcom/bcm2835 arm/freescale/imx arm/freescale/vybrid arm/rockchip arm/samsung/exynos arm/ti arm/xscale/ixp425 dev/gpio mips/atheros mips... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 21:16:24 -0000 Author: loos Date: Sat Feb 14 21:16:19 2015 New Revision: 278786 URL: https://svnweb.freebsd.org/changeset/base/278786 Log: MFC r274670, r274671, r276168: Moves all the duplicate code to a single function. Verify for invalid modes and unwanted flags before pass the new flags to driver. Make gpio_default_map_gpios() static. No functional changes. Improves the GPIO API description a little bit. gpio_pin_max must return the maximum supported pin number and not the total number of pins on the system. Modified: stable/10/sys/arm/allwinner/a10_gpio.c stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c stable/10/sys/arm/freescale/imx/imx_gpio.c stable/10/sys/arm/freescale/vybrid/vf_gpio.c stable/10/sys/arm/rockchip/rk30xx_gpio.c stable/10/sys/arm/samsung/exynos/exynos5_pad.c stable/10/sys/arm/ti/ti_gpio.c stable/10/sys/arm/xscale/ixp425/avila_gpio.c stable/10/sys/arm/xscale/ixp425/cambria_gpio.c stable/10/sys/dev/gpio/gpio_if.m stable/10/sys/dev/gpio/gpiobus.c stable/10/sys/dev/gpio/gpiobusvar.h stable/10/sys/dev/gpio/gpioc.c stable/10/sys/mips/atheros/ar71xx_gpio.c stable/10/sys/mips/cavium/octeon_gpio.c stable/10/sys/mips/rt305x/rt305x_gpio.c stable/10/sys/powerpc/wii/wii_gpio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/allwinner/a10_gpio.c ============================================================================== --- stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/allwinner/a10_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -302,20 +302,6 @@ a10_gpio_pin_setflags(device_t dev, uint if (i >= sc->sc_gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - a10_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c ============================================================================== --- stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/broadcom/bcm2835/bcm2835_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -399,20 +399,6 @@ bcm_gpio_pin_setflags(device_t dev, uint if (bcm_gpio_pin_is_ro(sc, pin)) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - bcm_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/freescale/imx/imx_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/freescale/imx/imx_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -268,18 +268,8 @@ imx51_gpio_pin_setflags(device_t dev, ui if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - imx51_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); - return (0); } Modified: stable/10/sys/arm/freescale/vybrid/vf_gpio.c ============================================================================== --- stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/freescale/vybrid/vf_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -312,15 +312,6 @@ vf_gpio_pin_setflags(device_t dev, uint3 if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - vf_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/rockchip/rk30xx_gpio.c ============================================================================== --- stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/rockchip/rk30xx_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -318,20 +318,6 @@ rk30_gpio_pin_setflags(device_t dev, uin if (i >= sc->sc_gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together. */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - - /* Can't mix pull-up/pull-down together. */ - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - rk30_gpio_pin_configure(sc, &sc->sc_gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/samsung/exynos/exynos5_pad.c ============================================================================== --- stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/samsung/exynos/exynos5_pad.c Sat Feb 14 21:16:19 2015 (r278786) @@ -643,15 +643,6 @@ pad_pin_setflags(device_t dev, uint32_t if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - pad_pin_configure(sc, &sc->gpio_pins[i], flags); return (0); Modified: stable/10/sys/arm/ti/ti_gpio.c ============================================================================== --- stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/ti/ti_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -456,16 +456,6 @@ ti_gpio_pin_setflags(device_t dev, uint3 uint32_t mask = (1UL << (pin % PINS_PER_BANK)); uint32_t reg_val; - /* Sanity check the flags supplied are valid, i.e. not input and output */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == 0x0000) - return (EINVAL); - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - if ((flags & (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) == - (GPIO_PIN_PULLUP|GPIO_PIN_PULLDOWN)) - return (EINVAL); - TI_GPIO_LOCK(sc); /* Sanity check the pin number is valid */ Modified: stable/10/sys/arm/xscale/ixp425/avila_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/xscale/ixp425/avila_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -220,16 +220,8 @@ avila_gpio_pin_setflags(device_t dev, ui if (pin >= IXP4XX_GPIO_PINS || !(sc->sc_valid & mask)) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_pins[pin].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - avila_gpio_pin_configure(sc, &sc->sc_pins[pin], flags); + return (0); } Modified: stable/10/sys/arm/xscale/ixp425/cambria_gpio.c ============================================================================== --- stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/arm/xscale/ixp425/cambria_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -317,15 +317,6 @@ cambria_gpio_pin_setflags(device_t dev, if (pin >= GPIO_PINS) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->sc_pins[pin].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - GPIO_LOCK(sc); sc->sc_pins[pin].gp_flags = flags; Modified: stable/10/sys/dev/gpio/gpio_if.m ============================================================================== --- stable/10/sys/dev/gpio/gpio_if.m Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpio_if.m Sat Feb 14 21:16:19 2015 (r278786) @@ -32,9 +32,7 @@ INTERFACE gpio; CODE { - static gpio_map_gpios_t gpio_default_map_gpios; - - int + static int gpio_default_map_gpios(device_t bus, phandle_t dev, phandle_t gparent, int gcells, pcell_t *gpios, uint32_t *pin, uint32_t *flags) @@ -58,11 +56,11 @@ HEADER { }; # -# Get total number of pins +# Get maximum pin number # METHOD int pin_max { device_t dev; - int *npins; + int *maxpin; }; # Modified: stable/10/sys/dev/gpio/gpiobus.c ============================================================================== --- stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpiobus.c Sat Feb 14 21:16:19 2015 (r278786) @@ -30,6 +30,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -70,6 +71,23 @@ static int gpiobus_pin_set(device_t, dev static int gpiobus_pin_get(device_t, device_t, uint32_t, unsigned int*); static int gpiobus_pin_toggle(device_t, device_t, uint32_t); +int +gpio_check_flags(uint32_t caps, uint32_t flags) +{ + + /* Check for unwanted flags. */ + if ((flags & caps) == 0 || (flags & caps) != flags) + return (EINVAL); + /* Cannot mix input/output together. */ + if (flags & GPIO_PIN_INPUT && flags & GPIO_PIN_OUTPUT) + return (EINVAL); + /* Cannot mix pull-up/pull-down together. */ + if (flags & GPIO_PIN_PULLUP && flags & GPIO_PIN_PULLDOWN) + return (EINVAL); + + return (0); +} + static void gpiobus_print_pins(struct gpiobus_ivar *devi, char *buf, size_t buflen) { @@ -490,11 +508,16 @@ gpiobus_pin_setflags(device_t dev, devic { struct gpiobus_softc *sc = GPIOBUS_SOFTC(dev); struct gpiobus_ivar *devi = GPIOBUS_IVAR(child); + uint32_t caps; if (pin >= devi->npins) return (EINVAL); + if (GPIO_PIN_GETCAPS(sc->sc_dev, devi->pins[pin], &caps) != 0) + return (EINVAL); + if (gpio_check_flags(caps, flags) != 0) + return (EINVAL); - return GPIO_PIN_SETFLAGS(sc->sc_dev, devi->pins[pin], flags); + return (GPIO_PIN_SETFLAGS(sc->sc_dev, devi->pins[pin], flags)); } static int Modified: stable/10/sys/dev/gpio/gpiobusvar.h ============================================================================== --- stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpiobusvar.h Sat Feb 14 21:16:19 2015 (r278786) @@ -94,6 +94,7 @@ gpio_map_gpios(device_t bus, phandle_t d device_t ofw_gpiobus_add_fdt_child(device_t, phandle_t); #endif +int gpio_check_flags(uint32_t, uint32_t); int gpiobus_init_softc(device_t); extern driver_t gpiobus_driver; Modified: stable/10/sys/dev/gpio/gpioc.c ============================================================================== --- stable/10/sys/dev/gpio/gpioc.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/dev/gpio/gpioc.c Sat Feb 14 21:16:19 2015 (r278786) @@ -29,19 +29,16 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #include #include +#include #include #include #include #include -#include -#include -#include -#include +#include + #include "gpio_if.h" #undef GPIOC_DEBUG @@ -119,6 +116,7 @@ gpioc_ioctl(struct cdev *cdev, u_long cm struct gpioc_softc *sc = cdev->si_drv1; struct gpio_pin pin; struct gpio_req req; + uint32_t caps; switch (cmd) { case GPIOMAXPIN: @@ -141,8 +139,12 @@ gpioc_ioctl(struct cdev *cdev, u_long cm case GPIOSETCONFIG: bcopy(arg, &pin, sizeof(pin)); dprintf("set config pin %d\n", pin.gp_pin); - res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, - pin.gp_flags); + res = GPIO_PIN_GETCAPS(sc->sc_pdev, pin.gp_pin, &caps); + if (res == 0) + res = gpio_check_flags(caps, pin.gp_flags); + if (res == 0) + res = GPIO_PIN_SETFLAGS(sc->sc_pdev, pin.gp_pin, + pin.gp_flags); break; case GPIOGET: bcopy(arg, &req, sizeof(req)); Modified: stable/10/sys/mips/atheros/ar71xx_gpio.c ============================================================================== --- stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/mips/atheros/ar71xx_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -241,16 +241,8 @@ ar71xx_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); + return (0); } Modified: stable/10/sys/mips/cavium/octeon_gpio.c ============================================================================== --- stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/mips/cavium/octeon_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -219,16 +219,8 @@ octeon_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - octeon_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); + return (0); } Modified: stable/10/sys/mips/rt305x/rt305x_gpio.c ============================================================================== --- stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/mips/rt305x/rt305x_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -242,18 +242,8 @@ rt305x_gpio_pin_setflags(device_t dev, u if (i >= sc->gpio_npins) return (EINVAL); - /* Check for unwanted flags. */ - if ((flags & sc->gpio_pins[i].gp_caps) != flags) - return (EINVAL); - - /* Can't mix input/output together */ - if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) == - (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) - return (EINVAL); - rt305x_gpio_pin_configure(sc, &sc->gpio_pins[i], flags); - return (0); } Modified: stable/10/sys/powerpc/wii/wii_gpio.c ============================================================================== --- stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 21:02:33 2015 (r278785) +++ stable/10/sys/powerpc/wii/wii_gpio.c Sat Feb 14 21:16:19 2015 (r278786) @@ -295,11 +295,6 @@ wiigpio_pin_setflags(device_t dev, uint3 if (pin >= WIIGPIO_NPINS) return (EINVAL); - if ((flags & ~(GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) != 0) - return (EINVAL); - if ((flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) == - (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) - return (EINVAL); sc = device_get_softc(dev); pinbank = WIIGPIO_PINBANK(pin); pinmask = WIIGPIO_PINMASK(pin); From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 23:25:40 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5223EAD; Sat, 14 Feb 2015 23:25: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 9E13D3B0; Sat, 14 Feb 2015 23:25: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 t1ENPe3x046633; Sat, 14 Feb 2015 23:25:40 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENPeJJ046632; Sat, 14 Feb 2015 23:25:40 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142325.t1ENPeJJ046632@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:25:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278788 - in stable: 10/contrib/llvm/tools/clang/lib/Serialization 9/contrib/llvm/tools/clang/lib/Serialization X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:25:40 -0000 Author: dim Date: Sat Feb 14 23:25:39 2015 New Revision: 278788 URL: https://svnweb.freebsd.org/changeset/base/278788 Log: Pull in r201130 from upstream clang trunk (by Ted Kremenek): Fix PCH deserialization bug with local static symbols being treated as local extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes and . This fixes a crash in audio/murmur, which is using both PCH and Boost. Direct commit to stable/10 and stable/9, since head has clang 3.5.1, which already includes this change. Reported by: smh PR: 197389 Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 22:12:17 2015 (r278787) +++ stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 23:25:39 2015 (r278788) @@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDec VD->setCachedLinkage(VarLinkage); // Reconstruct the one piece of the IdentifierNamespace that we need. - if (VarLinkage != NoLinkage && + if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && VD->getLexicalDeclContext()->isFunctionOrMethod()) VD->setLocalExternDecl(); From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 23:25:41 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5975BEAE; Sat, 14 Feb 2015 23:25: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 42D283B1; Sat, 14 Feb 2015 23:25: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 t1ENPfgN046639; Sat, 14 Feb 2015 23:25:41 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENPfY4046638; Sat, 14 Feb 2015 23:25:41 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142325.t1ENPfY4046638@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:25:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278788 - in stable: 10/contrib/llvm/tools/clang/lib/Serialization 9/contrib/llvm/tools/clang/lib/Serialization X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:25:41 -0000 Author: dim Date: Sat Feb 14 23:25:39 2015 New Revision: 278788 URL: https://svnweb.freebsd.org/changeset/base/278788 Log: Pull in r201130 from upstream clang trunk (by Ted Kremenek): Fix PCH deserialization bug with local static symbols being treated as local extern. This triggered a miscompilation of code using Boost's function_template.hpp when it was included inside a PCH file. A local static within that header would be treated as local extern, resulting in the wrong mangling. This only occurred during PCH deserialization. Fixes and . This fixes a crash in audio/murmur, which is using both PCH and Boost. Direct commit to stable/10 and stable/9, since head has clang 3.5.1, which already includes this change. Reported by: smh PR: 197389 Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Changes in other areas also in this revision: Modified: stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp ============================================================================== --- stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 22:12:17 2015 (r278787) +++ stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp Sat Feb 14 23:25:39 2015 (r278788) @@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDec VD->setCachedLinkage(VarLinkage); // Reconstruct the one piece of the IdentifierNamespace that we need. - if (VarLinkage != NoLinkage && + if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && VD->getLexicalDeclContext()->isFunctionOrMethod()) VD->setLocalExternDecl(); From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 23:28:10 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 915C520F; Sat, 14 Feb 2015 23:28: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 7AE843D7; Sat, 14 Feb 2015 23:28: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 t1ENSAdY047021; Sat, 14 Feb 2015 23:28:10 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENSA4K047020; Sat, 14 Feb 2015 23:28:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142328.t1ENSA4K047020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278789 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:28:10 -0000 Author: dim Date: Sat Feb 14 23:28:09 2015 New Revision: 278789 URL: https://svnweb.freebsd.org/changeset/base/278789 Log: Add clang patches corresponding to r278788. Added: stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Added: stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Sat Feb 14 23:28:09 2015 (r278789) @@ -0,0 +1,67 @@ +Pull in r201130 from upstream clang trunk (by Ted Kremenek): + + Fix PCH deserialization bug with local static symbols being treated + as local extern. + + This triggered a miscompilation of code using Boost's + function_template.hpp when it was included inside a PCH file. A + local static within that header would be treated as local extern, + resulting in the wrong mangling. This only occurred during PCH + deserialization. + + Fixes and . + +This fixes a crash in audio/murmur, which is using both PCH and Boost. + +Introduced here: http://svnweb.freebsd.org/changeset/base/278788 + +Index: tools/clang/lib/Serialization/ASTReaderDecl.cpp +=================================================================== +--- tools/clang/lib/Serialization/ASTReaderDecl.cpp ++++ tools/clang/lib/Serialization/ASTReaderDecl.cpp +@@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::V + VD->setCachedLinkage(VarLinkage); + + // Reconstruct the one piece of the IdentifierNamespace that we need. +- if (VarLinkage != NoLinkage && ++ if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && + VD->getLexicalDeclContext()->isFunctionOrMethod()) + VD->setLocalExternDecl(); + +Index: tools/clang/test/PCH/local_static.cpp +=================================================================== +--- tools/clang/test/PCH/local_static.cpp ++++ tools/clang/test/PCH/local_static.cpp +@@ -0,0 +1,20 @@ ++// Test this without PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include %S/local_static.h -fsyntax-only %s -emit-llvm -o %t.no_pch.ll %s ++// RUN: FileCheck --input-file %t.no_pch.ll %s ++ ++// Test with PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -o %t.pch %S/local_static.h ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s ++// RUN: FileCheck --input-file %t.pch.ll %s ++ ++void test(Bar &b) { ++ b.f(); ++ static int s; ++} ++ ++// Check if the mangling of static and local extern variables ++// are correct and preserved by PCH. ++ ++// CHECK: @_ZZ4testR3BarE1s = internal global i32 0, align 4 ++// CHECK: @_ZZN3Bar1fIiEEvvE1y = linkonce_odr constant i32 0, align 4 ++ +Index: tools/clang/test/PCH/local_static.h +=================================================================== +--- tools/clang/test/PCH/local_static.h ++++ tools/clang/test/PCH/local_static.h +@@ -0,0 +1,7 @@ ++class Bar { ++public: ++ template ++ void f() { ++ static const T y = 0; ++ } ++}; From owner-svn-src-stable@FreeBSD.ORG Sat Feb 14 23:28:11 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3834A210; Sat, 14 Feb 2015 23: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 219CC3D8; Sat, 14 Feb 2015 23: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 t1ENSBVl047027; Sat, 14 Feb 2015 23:28:11 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1ENSA8c047026; Sat, 14 Feb 2015 23:28:10 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201502142328.t1ENSA8c047026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 14 Feb 2015 23:28:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r278789 - in stable: 10/contrib/llvm/patches 9/contrib/llvm/patches X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Feb 2015 23:28:11 -0000 Author: dim Date: Sat Feb 14 23:28:09 2015 New Revision: 278789 URL: https://svnweb.freebsd.org/changeset/base/278789 Log: Add clang patches corresponding to r278788. Added: stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Changes in other areas also in this revision: Added: stable/9/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Added: stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/llvm/patches/patch-r278788-clang-r201130-pch-miscompilation.diff Sat Feb 14 23:28:09 2015 (r278789) @@ -0,0 +1,67 @@ +Pull in r201130 from upstream clang trunk (by Ted Kremenek): + + Fix PCH deserialization bug with local static symbols being treated + as local extern. + + This triggered a miscompilation of code using Boost's + function_template.hpp when it was included inside a PCH file. A + local static within that header would be treated as local extern, + resulting in the wrong mangling. This only occurred during PCH + deserialization. + + Fixes and . + +This fixes a crash in audio/murmur, which is using both PCH and Boost. + +Introduced here: http://svnweb.freebsd.org/changeset/base/278788 + +Index: tools/clang/lib/Serialization/ASTReaderDecl.cpp +=================================================================== +--- tools/clang/lib/Serialization/ASTReaderDecl.cpp ++++ tools/clang/lib/Serialization/ASTReaderDecl.cpp +@@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::V + VD->setCachedLinkage(VarLinkage); + + // Reconstruct the one piece of the IdentifierNamespace that we need. +- if (VarLinkage != NoLinkage && ++ if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage && + VD->getLexicalDeclContext()->isFunctionOrMethod()) + VD->setLocalExternDecl(); + +Index: tools/clang/test/PCH/local_static.cpp +=================================================================== +--- tools/clang/test/PCH/local_static.cpp ++++ tools/clang/test/PCH/local_static.cpp +@@ -0,0 +1,20 @@ ++// Test this without PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include %S/local_static.h -fsyntax-only %s -emit-llvm -o %t.no_pch.ll %s ++// RUN: FileCheck --input-file %t.no_pch.ll %s ++ ++// Test with PCH. ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -o %t.pch %S/local_static.h ++// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s ++// RUN: FileCheck --input-file %t.pch.ll %s ++ ++void test(Bar &b) { ++ b.f(); ++ static int s; ++} ++ ++// Check if the mangling of static and local extern variables ++// are correct and preserved by PCH. ++ ++// CHECK: @_ZZ4testR3BarE1s = internal global i32 0, align 4 ++// CHECK: @_ZZN3Bar1fIiEEvvE1y = linkonce_odr constant i32 0, align 4 ++ +Index: tools/clang/test/PCH/local_static.h +=================================================================== +--- tools/clang/test/PCH/local_static.h ++++ tools/clang/test/PCH/local_static.h +@@ -0,0 +1,7 @@ ++class Bar { ++public: ++ template ++ void f() { ++ static const T y = 0; ++ } ++};